libc: Redefine "number" ctype - no longer alias of "digit"
commit31c9f6f21147b3a9f25ca8beda029a64af5305f1
authorJohn Marino <draco@marino.st>
Tue, 1 Sep 2015 11:39:38 +0000 (1 13:39 +0200)
committerJohn Marino <draco@marino.st>
Tue, 1 Sep 2015 12:45:10 +0000 (1 14:45 +0200)
treea0bbbe95536dafa51ae63c5fc56003c5431935d8
parent7560f083e12789deca71df340c90dd7327b19025
libc: Redefine "number" ctype - no longer alias of "digit"

FreeBSD extended ctypes to include numbers (e.g. isnumber()) but never
actually implemented it.  The isnumber() function was equivalent to the
isdigit() function in every case.

Now that DragonFly's ctype source files have number definitions, the
number ctype can finally be implemented.  It's given a new flag _CTYPE_N.
The isalnum() and iswalnum() functions have been changed to use this
flag rather than the _CTYPE_D digit flag.

While isalnum(), isnumber(), and their wide equivalents now return
different values in locale cases, the ishexnumber() and iswhexnumber()
functions are unchanged.  They are still aliases for isxdigit() and
iswxdigit().

Also change ctype.h for isdigit and isxdigit to use sbistype like the
other functions.

The "isnumber()" will not work until a full world build is made.  The
reason is that localedef is modified, but it's a bootstrap tool, so the
earlier version that does not support number ctype is still used in a
quickworld build.
include/ctype.h
include/wctype.h
include/xlocale/_ctype.h
lib/libc/locale/isctype.c
lib/libc/locale/iswctype.c
lib/libc/locale/table.c
lib/libc/locale/wctype.c
usr.bin/localedef/ctype.c