* Made it work for Big5 locales (Patches by Matthew Fischer).

* Fixed a problem with the 'r' command in EUC-JP and Big5 locales (Bugreport
  by Matthew Fischer).
This commit is contained in:
Gunnar Ritter
2005-01-20 22:33:32 +00:00
parent 28950221e4
commit 11445d2b92
5 changed files with 14 additions and 10 deletions

View File

@@ -73,7 +73,7 @@
#ifndef lint
#ifdef DOSCCS
static char sccsid[] = "@(#)ex_vget.c 1.27 (gritter) 1/16/05";
static char sccsid[] = "@(#)ex_vget.c 1.28 (gritter) 1/20/05";
#endif
#endif
@@ -168,9 +168,8 @@ readwc(int fd, int *cp)
}
if (pbuf[idx][0] & 0200) {
sz = 1;
while (pbuf[idx][i-1] & 0200 && i < mb_cur_max &&
(sz = mbrtowc(&wc, pbuf[idx], i,
&state[idx])) == (size_t)-2) {
while ((sz = mbrtowc(&wc, pbuf[idx], i, &state[idx]))
== (size_t)-2 && i < mb_cur_max) {
if ((c = read(fd, &b, 1)) <= 0) {
incompl[idx] = 1;
break;