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

Re: Quoting problem and crashes with ${(#)var}



Bart Schaefer wrote:
> } > +		*widthp = strlen(buf);
> } 
> } If printeightbit is set, then nicechar() may pass 8-bit characters,
> } which may be metafied, straight through, so ztrlen() is probably better.
> } printeightbit doesn't guaranteed to get character lengths right, but
> } counting metafied characters as 1 is more consistent.
> 
> That may be more consistent, but a bit later on the same function computes
> (*swidep = buf + *widthp) so I think what's wanted here is the actual
> width rather than the visible width.

That's true for swidep, it needs to point (in this case) to the NULL at
then end (as there's not wide character following).  However, *widthp
does need to be ztrlen().  So I think it they need to be separate.
(Before that nicechar() was added there couldn't be any metafied
characters at this point.)

pws


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



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