delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/03/07/16:20:59

From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson)
Subject: Re: No quoting bug in ash
7 Mar 1998 16:20:59 -0800 :
Message-ID: <19980305062119.54255.cygnus.gnu-win32@mundook.cs.mu.OZ.AU>
References: <34fc0b4b DOT 147582666 AT smtp DOT netzone DOT com>
Mime-Version: 1.0
To: jeffdb AT netzone DOT com
Cc: gnu-win32 AT cygnus DOT com

On 03-Mar-1998, Mikey <jeffdbREMOVETHIS AT netzone DOT com> wrote:
> Bash is smarter than ash so nobody noticed. From dllinit.diff.
> 
> diff -u cdk/winsup/dcrt0.cc.p2 cdk/winsup/dcrt0.cc
> --- cdk/winsup/dcrt0.cc.p2	Thu Jul 24 15:22:44 1997
> +++ cdk/winsup/dcrt0.cc	Tue Jul 29 11:08:00 1997
> @@ -89,12 +90,12 @@
>        char *d;
>        out[count] = d = s;
>        
> -      if (*s == '"')
> +      if (*s == '\"')
>  	{
>  	  s++;
> -	  while (s[0] && (s[0] != '"' || (s[0] == '"' && s[1] == '"')))
> +	  while (s[0] && (s[0] != '\"' || (s[0] == '\"' && s[1] == '\"')))
>  	    {
> -	      if (*s== '"')
> +	      if (*s== '\"')
>  		s++;
>  	      *d++ = *s++;
>  	    }
> @@ -136,15 +137,15 @@
>  	break;
>        
>        debug_printf ("compute_argc: src is now %s\n", src);
> -      if (*src == '"')
> +      if (*src == '\"')
>  	{
>  	  src++;
>  	  while (src[0])
>  	    {
> -	      if (src[0] == '"') 
> +	      if (src[0] == '\"') 
>  		{
>  		  src++;
> -		  if (src[0] != '"') break;
> +		  if (src[0] != '\"') break;
>  		}
>  	      
>  	      src++;

This diff is just a stylistic change.
In C and C++, '"' and '\"' both mean the same thing:
a value whose type is `char' and whose value is the double-quote character.

-- 
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019