1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 05:24:23 +01:00
Commit Graph

4526 Commits

Author SHA1 Message Date
Wayne Davison
51296c6b81 Even more multibyte code cleanup. 2006-01-12 01:06:03 +00:00
Wayne Davison
4867f99ef9 - 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 01:04:17 +00:00
Wayne Davison
f6fefb2db3 - 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 00:51:53 +00:00
Wayne Davison
542797377a - 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 00:51:50 +00:00
Wayne Davison
e46d08523f - The return value of mbsrtowcs() is also a size_t (like mbrtowc()).
- 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 00:51:44 +00:00
Wayne Davison
eebfabe548 - The return value of mbrtowc() is a size_t (unsigned), so don't
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-12 00:51:41 +00:00
Wayne Davison
3039f65d74 Define MB_INCOMPLETE and MB_INVALID for MULTIBYTE_SUPPORT. 2006-01-12 00:51:38 +00:00
Wayne Davison
5af164ea1f A few more mbrtowc() cleanups. 2006-01-11 20:49:11 +00:00
Wayne Davison
4b831f02df Tweaked the code to handle mbrtowc() converting '\0' the same way as
the other callers do.  Also, changed the variable name to 'cnt'.
2006-01-11 20:12:09 +00:00
Wayne Davison
4c3edda1f1 Decided to use a switch() in mb_niceformat(). 2006-01-11 20:09:03 +00:00
Wayne Davison
23bd860ef7 The return value of mbrtowc() is a size_t (unsigned), so don't
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-11 20:01:27 +00:00
Wayne Davison
c6798bc151 The return value of mbrtowc() is a size_t (unsigned), so don't
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-11 19:49:59 +00:00
Wayne Davison
4ffa433443 The return value of mbrtowc() is a size_t (unsigned), so don't
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-11 19:42:40 +00:00
Peter Stephenson
fa633171fd 22151: bug outputting here-strings from which etc. when already quoted 2006-01-10 16:57:02 +00:00
Wayne Davison
d09c286871 Minor mbrtowc() changes. 2006-01-09 18:04:46 +00:00
Wayne Davison
00465c76fb Changed the name of the "ret" variable in mb_niceformat() to "cnt"
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-09 17:58:57 +00:00
Wayne Davison
cc890edcb5 Changed the name of the "ret" variable in mb_niceformat() to "cnt"
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-09 17:44:02 +00:00
Wayne Davison
90f7b1e173 A test for (size_t)-1 needed to check for (size_t)-2 too. 2006-01-09 17:39:44 +00:00
Wayne Davison
5750513c00 The return value of mbrtowc() is a size_t (unsigned), so don't
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-09 01:09:55 +00:00
Wayne Davison
223ade988b Mention unposted changes to various bits of mbrtowc() code. 2006-01-09 00:52:28 +00:00
Wayne Davison
791bbf7120 The return value of mbrtowc() is a size_t (unsigned), so don't
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-09 00:37:10 +00:00
Wayne Davison
74b4973888 The return value of mbrtowc() is a size_t (unsigned), so don't
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-09 00:29:57 +00:00
Wayne Davison
9cf3f9ad71 The return value of mbrtowc() is a size_t (unsigned), so don't
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-09 00:17:24 +00:00
Wayne Davison
c7c713939d Mention configure.ac changes. 2006-01-08 23:13:53 +00:00
Wayne Davison
8e1306c5b1 Got rid of check for wcswidth() and added my missing commit that
added checks for fchown() and fchmod().
2006-01-08 23:08:39 +00:00
Wayne Davison
08494aa570 An improved version of the patch from 22140. 2006-01-08 22:59:13 +00:00
Wayne Davison
97c34b631c Changed mb_niceformat() so that it does not truncate a name that
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-08 22:57:05 +00:00
Wayne Davison
37c458aa8c Got rid of our use of wcswidth(). 2006-01-08 22:42:07 +00:00
Wayne Davison
2150c0f09b Got rid of wcswidth() define for OpenBSD now that wcswidth() isn't
used.
2006-01-08 22:37:15 +00:00
Wayne Davison
2367a62e4c Changed wcswidth(&c, 1) to wcwidth(c). 2006-01-08 22:36:08 +00:00
Peter Stephenson
e377b38ebf typo in AE and OE ligatures 2006-01-08 18:32:04 +00:00
Peter Stephenson
94953f70b9 22124: handle bad multibyte input better 2006-01-06 14:23:00 +00:00
Peter Stephenson
d8a851a9a8 22123: probe for wcswidth() and assume 1 if not found 2006-01-06 11:41:47 +00:00
Peter Stephenson
b71a632d2f 22118: fix cdpath documentation 2006-01-05 16:13:17 +00:00
Peter Stephenson
4c5e2ca4ad Minor _perforce changes for deleting fixes and changes. 2006-01-04 14:38:28 +00:00
Clint Adams
e2bf91e454 22113: allow single option characters to be combined in completion for last 2006-01-02 01:57:36 +00:00
Wayne Davison
b5f2902241 A couple more improvements to the HIST_SAVE_BY_COPY section. 2005-12-27 07:08:52 +00:00
Clint Adams
13e2483152 22105: ssh -M, -S, and -O 2005-12-25 01:02:24 +00:00
Clint Adams
339989a273 22104: add support for new options such as ControlMaster and ControlPath. 2005-12-25 00:31:43 +00:00
Wayne Davison
ff8ae1ea79 Fixed a bogus file path. 2005-12-23 18:34:55 +00:00
Wayne Davison
096a1887ad Fixed a typo and improved a sentence. 2005-12-23 18:30:47 +00:00
Peter Stephenson
95af03ac65 unposted: updated _yum from Scott Murray 2005-12-19 20:24:20 +00:00
Peter Stephenson
7a389a2fc3 22082: print out uid or gid in stat if name not available 2005-12-19 11:35:40 +00:00
Wayne Davison
8099414599 Changed some UTF-8 apostrophes to normal apostrophes. 2005-12-18 20:13:19 +00:00
Wayne Davison
4c323c984e Changed a UTF-8 closing-single-quote into an ASCII apostrophe. 2005-12-18 20:12:29 +00:00
Wayne Davison
b0144eca96 Changed UTF-8 closing-single-quotes into ASCII apostrophes. 2005-12-18 20:06:00 +00:00
Peter Stephenson
f3100e855a 22095: more multibyte notes. 2005-12-18 19:47:13 +00:00
Wayne Davison
e56c3b8214 22091 2005-12-17 08:11:16 +00:00
Wayne Davison
78168105de Two changes in the HIST_SAVE_BY_COPY code: (1) preserve the group
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-17 07:58:12 +00:00
Peter Stephenson
f7037211ad 22085 and back off 22075: include langinfo.h to get iconv 2005-12-15 14:51:39 +00:00