Subject: Re: strange setlocale() issue
To: None <enami@but-b.or.jp>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-userlevel
Date: 10/14/2003 10:11:51
--NextPart-20031014101021-0817700
Content-Type: Text/Plain; charset=us-ascii

> > On -current i386 with /usr/lib complied with -g, I see:
> 
> It looks like mbrtowc() returns strange value.
> 
> enami.

i think attached patch will fix the problem.
(not tested)

YAMAMOTO Takashi

--NextPart-20031014101021-0817700
Content-Type: Text/Plain; charset=us-ascii
Content-Disposition: attachment; filename="euctw.diff"

Index: citrus/modules/citrus_euctw.c
===================================================================
RCS file: /cvs/NetBSD/src/lib/libc/citrus/modules/citrus_euctw.c,v
retrieving revision 1.7
diff -u -p -r1.7 citrus_euctw.c
--- citrus/modules/citrus_euctw.c	2003/06/26 12:09:57	1.7
+++ citrus/modules/citrus_euctw.c	2003/10/14 01:09:37
@@ -214,6 +214,8 @@ _citrus_EUCTW_mbrtowc_priv(_EUCTWEncodin
 		return (0);
 	}
 
+	chlenbak = psenc->chlen;
+
 	/* make sure we have the first byte in the buffer */
 	switch (psenc->chlen) {
 	case 0:

--NextPart-20031014101021-0817700--