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

Tim Robbins tjr at freebsd.org
Tue Mar 30 00:55:34 PST 2004


On Tue, Mar 30, 2004 at 12:29:36PM +0400, Andrey Chernov wrote:

> On Mon, Mar 29, 2004 at 11:02:04PM -0800, Tim J. Robbins wrote:
> >   Document the isnumber() and ishexnumber() functions, and explain how they
> >   differ (at least in theory) from isdigit() and isxdigit().
> 
> Currently we don't support number != digit flag in our mklocale(1) format.
> I think it worth to mention this fact in the BUGS section (short term 
> solution) or add such flag (long term one).

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
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.

But you're right - I'll add something to the manual page about the
number != digit limitation.


Tim


More information about the cvs-src mailing list