Subject: Re: locale ctype corrections
To: None <tech-userlevel@netbsd.org>
From: Takehiko NOZAKI <th-nozaki@netwrk.co.jp>
List: tech-userlevel
Date: 03/08/2005 15:15:55
hi,
> I'm not sure which is the best place to post this,
> but the attached patch fixes some bugs in the ctype
> sources.
it seems that the bug affect isxdigit(3) only,
because isxdigit(3) checking 'digit' or 'xdigit'
(snip)
src/include/ctype.h
#define isxdigit(c) ((int)((_ctype_ + 1)[(c)] & (_N|_X)))
(snip)
so that, i think it's better to change iswxdigit(3) than LC_CTYPE.
(snip)
Index: iswctype.c
===================================================================
RCS file: /cvsroot/src/lib/libc/locale/iswctype.c,v
retrieving revision 1.15
diff -u -r1.15 iswctype.c
--- iswctype.c 9 Feb 2005 21:35:46 -0000 1.15
+++ iswctype.c 8 Mar 2005 05:58:08 -0000
@@ -189,7 +189,7 @@
iswxdigit(c)
wint_t c;
{
- return (__isctype_w((c), _CTYPE_X));
+ return (__isctype_w((c), _CTYPE_D | _CTYPE_X));
}
#undef towupper
comments?
very truly yours.
--
Takehiko NOZAKI <tnozaki@NetBSD.org>