[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[re-post] Re: windows and ssl-ignore-unknown-ca = true

From: Chris Foote <Chris.Foote_at_xtra.co.nz>
Date: 2003-05-10 19:36:16 CEST

For some reason this didn't make it to the list, so I'm reposting it.

----- Original Message -----
From: "mark benedetto king" <mbk@boredom.org>
To: "Chris Foote" <Chris.Foote@v21.me.uk>
Cc: "solo turn" <soloturn99@yahoo.com>; "Ben Collins-Sussman" <sussman@collab.net>;
<dev@subversion.tigris.org>
Sent: Thursday, May 08, 2003 2:38 PM
Subject: Re: windows and ssl-ignore-unknown-ca = true

>
> I agree that this patch will solve problems with CRNL streams without
> causing trouble for NL streams. Aren't there CR-only streams (Macintosh)?
>
> Can stdin be opened in text mode, leaving the CRNL/CR/NL->NL translation to
> the OS libraries?
>

How about this then, it uses the APR_EOL_STR macro.
Would this work on the Mac?

Log:
Prevent leaving half of the '\r\n' win32 newline sequence in stdin when prompting.

* prompt.c:
  (svn_cl__prompt_user): Finish reading stdin on '\n' and continue when getting
  a '\r'.

Index: subversion/clients/cmdline/prompt.c
===================================================================
--- subversion/clients/cmdline/prompt.c (revision 5854)
+++ subversion/clients/cmdline/prompt.c (working copy)
@@ -67,6 +67,7 @@

   if (! hide)
     {
+ const char* eol = APR_EOL_STR;
       fprintf (stderr, "%s", prompt_native);
       fflush (stderr);

@@ -75,8 +76,19 @@
           status = apr_file_getc (&c, fp);
           if (status && ! APR_STATUS_IS_EOF(status))
             return svn_error_create (status, NULL, "error reading stdin.");
- if ((c == '\n') || (c == '\r'))
- break;
+
+ if (c == *eol)
+ {
+ if (eol[1] == '\0')
+ break;
+ else
+ {
+ ++eol;
+ continue;
+ }
+ }
+ else
+ eol = APR_EOL_STR;

           svn_stringbuf_appendbytes (strbuf, &c, 1);
         }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 10 19:37:37 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.