Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ${(s::)VAR} vs "${(s::)VAR}"



On Fri, 27 Apr 2012 19:50:48 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> }  	for (; (c = findsep(&s, sep, 0)) >= 0; s += sl)
> } -	    if ((c && *(s + sl)) || mul)
> } +	    if ((c || mul) && *(s + sl))
> }  		r++;
> 
> Does it matter that the changed line dereferences s+sl in cases where
> the original line does not?

That's true only if c is 0 and mul is 1 (before c had to be 1).	 c is 0
if we're already at a separator, so I think dereferencing s+sl is still
OK.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author