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

Re: beta12: 8-bit-cleanliness



> 
> Missing 8-bit-cleanliness especially WRT filename generation.
> It was in zsh up to the release of 2.6-beta10. Imagine the names of your
> working files deliberately scattered with extended characters from i.e.
> the ISO-8859-1 character set. With beta12 this results in mysteriously
> disappearing command lines, and worse, infinite loops in the lexer, when
> completion is requested upon one of those names.
> 
> Tracking that down led to a dubious (unsigned) cast in input.c, present
> since rev. 1.5. It does the same as (int)(unsigned int). But we want the
> effect of (int)(unsigned char) instead:

(unsigned char) was the original cast but this is borken on some machines.
What's wrong with (unsigned)?  There are other places wher (unsigned) cast is
used.  I originally suggested to use the STOUC() macro but someone (rc?)
prefered (unsigned).  If the later works I'd prefer this (but I do not know
what's wrong woth STOUC()).  All of these should have the same effect in the
produced code (really these casting only affect what the compiler thinks about
the content of a register but (int)(unsigned char) misleads some compilers).

Cheers,

  Zoltan



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