cvs commit: src/lib/libc/locale isdigit.3 isxdigit.3

Andrey Chernov ache at nagual.pp.ru
Tue Mar 30 01:03:20 PST 2004


On Tue, Mar 30, 2004 at 06:57:17PM +1000, Tim Robbins wrote:
> My understanding is that we do have support for this in an obscure way:
> isdigit() doesn't use the LC_CTYPE data file at all, and always returns
> results from the C/POSIX locale (_DefaultRuneLocale). isnumber() uses

It is as intendend - POSIX explicetely disallows any digits excepting
'0'-'9' in sequence, the like about hex ones, and all our locales are
ASCII-compatible.

> the current locale (_CurrentRuneLocale). So anything listed in the
> LC_CTYPE file as DIGIT will only affect isnumber(), not isdigit().
> I don't know whether this was an intended feature or not.

I prefer to have a clear picture, i.e. left DIGIT as is, i.e. single flag 
(in case someone will test flags directly), and add another NUMBER flag 
(which will be always "| PUNCT").

-- 
Andrey Chernov | http://ache.pp.ru/


More information about the cvs-src mailing list