summaryrefslogtreecommitdiff
path: root/Src
AgeCommit message (Collapse)AuthorFilesLines
2006-01-12- Use "mbs" for the multi-byte state variable name (for consistency).Wayne Davison1-5/+5
- Use the new MB_INVALID and MB_INCOMPLETE defines for the size_t -1 and -2 values (respectively).
2006-01-12- When mbrtowc() returns -2 when given all the remaining chars in aWayne Davison4-31/+42
string, set an end-of-line flag and avoid calling mbrtowc() again for any of the incomplete characters that remain in the string. - Use "mbs" for the multi-byte state variable name (for consistency). - Use the new MB_INVALID and MB_INCOMPLETE defines for the size_t -1 and -2 values (respectively).
2006-01-12- The return value of mbsrtowcs() is also a size_t (like mbrtowc()).Wayne Davison1-21/+33
- When mbrtowc() returns -2 when given all the remaining chars in a string, set an end-of-line flag and avoid calling mbrtowc() again for any of the incomplete characters that remain in the string. - Use "mbs" for the multi-byte state variable name (for consistency). - Use the new MB_INVALID and MB_INCOMPLETE defines for the size_t -1 and -2 values (respectively).
2006-01-12- The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-61/+71
assign it to an int and then check for negativity, as that won't work on a system where an int is larger than a size_t. - When mbrtowc() returns -2 when given all the remaining chars in a string, set an end-of-line flag and avoid calling mbrtowc() again for any of the incomplete characters that remain in the string. - Use STOUC() when passing a char value to nicechar(). - Use "mbs" for the multi-byte state variable name (for consistency). - Be sure to reset the mbs state if mbrtowc() returns -1. - Use the new MB_INVALID and MB_INCOMPLETE defines for the size_t -1 and -2 values (respectively).
2006-01-12Define MB_INCOMPLETE and MB_INVALID for MULTIBYTE_SUPPORT.Wayne Davison1-0/+3
2006-01-11Tweaked the code to handle mbrtowc() converting '\0' the same way asWayne Davison1-11/+20
the other callers do. Also, changed the variable name to 'cnt'.
2006-01-11Decided to use a switch() in mb_niceformat().Wayne Davison1-7/+12
2006-01-11The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-6/+6
assign it to an int and then check if it's <= 0, as that won't work on a system where an int is larger than a size_t.
2006-01-11The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-5/+7
assign it to an int and then check if it's >= 0, as that won't work on a system where an int is larger than a size_t.
2006-01-11The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-3/+6
assign it to an int and then check if it's < 0, as that won't work on a system where an int is larger than a size_t.
2006-01-1022151: bug outputting here-strings from which etc. when already quotedPeter Stephenson1-10/+11
2006-01-09Changed the name of the "ret" variable in mb_niceformat() to "cnt"Wayne Davison1-8/+7
because "ret" is usually used for a variable name to hold the return value of the function. Also, changed the test when checking for a \0 to only check if "cnt" is 0, since we must always change a value of 0 to 1.
2006-01-09Changed the name of the "ret" variable in mb_niceformat() to "cnt"Wayne Davison1-8/+8
because "ret" is usually used for a variable name to hold the return value of the function. Also, changed the test when checking for a \0 to one that checks if "cnt" is 0, since we must always change a value of 0 to 1.
2006-01-09A test for (size_t)-1 needed to check for (size_t)-2 too.Wayne Davison1-1/+1
2006-01-09The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-10/+9
assign it to an int and then check if it's < 0, as that won't work on a system where an int is larger than a size_t. Also, the code that handled partial multibyte characters (that were assembled from multiple bytes of a metafied string) was not advancing past all the assembled bytes, nor was it handling the decoding of a '\0' char (it looks like it could have infinite looped in that case).
2006-01-09The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-15/+10
assign it to an int and then check if it's > 0, as that won't work on a system where an int is larger than a size_t. Also, we needed to use STOUC() on a char value passed to nicechar(), and we need to clear the mbstate_t object if mbrtowc() returns an error.
2006-01-09The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-4/+4
assign it to an int and then check if it's > 0, as that won't work on a system where an int is larger than a size_t. Also, we needed to use STOUC() on a char value passed to nicechar().
2006-01-09The return value of mbrtowc() is a size_t (unsigned), so don'tWayne Davison1-3/+3
assign it to an int and then check if it's > 0, as that won't work on a system where an int is larger than a size_t.
2006-01-08Changed mb_niceformat() so that it does not truncate a name thatWayne Davison1-15/+14
has an invalid character sequence in the current character set, displaying them as \M-... chars. (Improved version of the patch from workers/22140.)
2006-01-08Got rid of wcswidth() define for OpenBSD now that wcswidth() isn'tWayne Davison1-4/+0
used.
2006-01-08Changed wcswidth(&c, 1) to wcwidth(c).Wayne Davison1-1/+1
2006-01-0622124: handle bad multibyte input betterPeter Stephenson2-3/+13
2006-01-0622123: probe for wcswidth() and assume 1 if not foundPeter Stephenson1-0/+4
2005-12-1922082: print out uid or gid in stat if name not availablePeter Stephenson1-6/+18
2005-12-17Two changes in the HIST_SAVE_BY_COPY code: (1) preserve the groupWayne Davison1-2/+20
and permissions on the history file, and (2) fail if zsh's euid differs from the file's uid (since that would change the history file's owner).
2005-12-1522085 and back off 22075: include langinfo.h to get iconvPeter Stephenson2-10/+9
2005-12-15users/9788: add (oN) glob qualifier for no sortingPeter Stephenson1-14/+33
22076: more documentation for multibyte handling
2005-12-1521814: error handling for traps in "always" constructs.Bart Schaefer2-3/+17
2005-12-14Changed ucs4toutf8() into a static function (since it's onlyWayne Davison1-2/+1
used by this file when it's even defined).
2005-12-1422075: assume we can convert characters with wctomb() with --enable-multibytePeter Stephenson1-3/+3
2005-12-12A slightly more optimal way to fix the zle_setline() bug usingWayne Davison1-2/+1
the same zlecs-checking idiom as setline().
2005-12-12Fixed problem in zle_setline() where moving to an empty line wouldWayne Davison1-1/+1
set zlecs to -1. (Reported by Jun T.)
2005-12-1022069: completion listings didn't get unmetafiedPeter Stephenson1-7/+9
2005-12-10Just-added "return" should have returned a value.Wayne Davison1-1/+1
2005-12-0922057: don't use zsh/newuser in emulationPeter Stephenson2-1/+4
22058: tweak docs for release
2005-12-0322049: bug exiting from sourced file within functionPeter Stephenson1-1/+2
2005-11-30Fixed parsedigit() to have it use its arg instead of "lastchar".Wayne Davison1-15/+12
2005-11-30One more fix for the non-multibyte prototype generation.Wayne Davison1-0/+2
2005-11-29fix utils.c prototype generation for non multibyte buildGeoff Wing1-0/+2
2005-11-2522027: more zsh-newuser-install fixesPeter Stephenson1-6/+30
22028: WARN_CREATE_GLOBAL overeager with temporarily set variables
2005-11-2422014: argument-base, insert-unicode-charPeter Stephenson4-16/+75
2005-11-2122009: another double-width character fixPeter Stephenson1-0/+6
2005-11-18Got rid of two unneeded "(char *)" casts.Wayne Davison1-2/+2
2005-11-15Got rid of some compiler warnings about comparisons between signedWayne Davison1-5/+6
and unsigned variables.
2005-11-15Changed zlelineasstring() and zlegetline() to each return a normal charWayne Davison1-29/+25
pointer, not an unsigned char pointer. Changed stringaszleline() to take a normal char pointer for its first arg. Got rid of some unsigned-char/char pointer casts.
2005-11-15Changed zlemetaline into a normal char pointer, not unsigned char.Wayne Davison1-39/+35
Got rid of some unsigned-char/char pointer casts.
2005-11-15Changed zleread() to return a normal char pointer, not unsigned char.Wayne Davison1-8/+7
Got rid of some unsigned-char/char pointer casts.
2005-11-15The non-multibyte version of ZWS() doesn't need to force a cast anymore.Wayne Davison1-2/+2
2005-11-15Changed ztrcmp() to take normal char pointers, not unsigned char.Wayne Davison1-17/+19
2005-11-15Changed two zle functions to each return a char pointer, not anWayne Davison2-5/+5
unsigned char pointer.