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

Re: bug in completion/expansion of files with LANG=C

On Sun, Jan 08, 2006 at 06:03:09PM +0000, Peter Stephenson wrote:
> You mean output everything remaining in the string as special codes
> rather than real (multibyte) characters?  Yes, that would make sense.

OK, I've made the code do this in all the instances where a -2 means
that it scanned clear to the end of the string (not when we're
converting a single input byte at a time).

Some other changes that I made:

 - A few more places in the code now treat the size_t return value from
   mbrtowc() and mbsrtowcs() as a size_t.

 - A spot in utils.c was treating the return of wctomb() as a size_t
   instead of an int.

 - Defined MB_INCOMPLETE & MB_INVALID to be used instead of some literal
   (size_t)-2 and (size_t)-1 values.

 - Tweaked some variable names to make them more consistent (e.g. we use
   "mbs" for the multibyte state everywhere instead of sometimes mbs,
   and sometimes ps).

 - Found a couple more places that needed to reset "mbs" on error.

A diff of what I changed can be found here for those who wish to see it:



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