You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Chris Foote <Ch...@xtra.co.nz> on 2003/05/10 17:36:16 UTC

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

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

----- Original Message -----
From: "mark benedetto king" <mb...@boredom.org>
To: "Chris Foote" <Ch...@v21.me.uk>
Cc: "solo turn" <so...@yahoo.com>; "Ben Collins-Sussman" <su...@collab.net>;
<de...@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