diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-10-13 20:43:49 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-10-13 20:43:49 +0000 |
commit | f5dde0166d6658309344f309845075707f207509 (patch) | |
tree | 60bcb837e37411501444484bb02600e974770e25 /usr.bin/localedef/ctype.c | |
parent | 7cefd8ca2a915e8fe9d5565dcc9a562e67c07970 (diff) | |
download | src-f5dde0166d6658309344f309845075707f207509.tar.gz src-f5dde0166d6658309344f309845075707f207509.zip |
Commit log from Dragonfly:
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.
Obtained from: dragonfly
Notes
Notes:
svn path=/projects/collation/; revision=289263
Diffstat (limited to 'usr.bin/localedef/ctype.c')
-rw-r--r-- | usr.bin/localedef/ctype.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/localedef/ctype.c b/usr.bin/localedef/ctype.c index 3081f800e70a..22f4d8b75284 100644 --- a/usr.bin/localedef/ctype.c +++ b/usr.bin/localedef/ctype.c @@ -51,6 +51,11 @@ __FBSDID("$FreeBSD$"); #include "runefile.h" +/* Needed for bootstrapping, _CTYPE_N */ +#ifndef _CTYPE_N +#define _CTYPE_N 0x00400000L +#endif + #define _ISUPPER _CTYPE_U #define _ISLOWER _CTYPE_L #define _ISDIGIT _CTYPE_D @@ -65,7 +70,7 @@ __FBSDID("$FreeBSD$"); #define _E1 _CTYPE_Q #define _E2 _CTYPE_I #define _E3 0 -#define _E4 0 +#define _E4 _CTYPE_N #define _E5 _CTYPE_T static wchar_t last_ctype; |