Subject: Re: No quoting bug in ash
From: [email-masked] (Fergus Henderson)

7 Mar 1998 16:20:59 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: [email-masked]
Cc: [email-masked]

On 03-Mar-1998, Mikey <[email-masked]> 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 <[email-masked]>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger [email-masked]         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".