summaryrefslogtreecommitdiffstats
path: root/include/xlocale
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-10-13 20:43:49 +0000
committerbapt <bapt@FreeBSD.org>2015-10-13 20:43:49 +0000
commit979669d923dd13797ab49393a41f37ba706f6068 (patch)
tree60bcb837e37411501444484bb02600e974770e25 /include/xlocale
parent9e21b4c1748fab15f52e0df9745d69b5848856f4 (diff)
downloadFreeBSD-src-979669d923dd13797ab49393a41f37ba706f6068.zip
FreeBSD-src-979669d923dd13797ab49393a41f37ba706f6068.tar.gz
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
Diffstat (limited to 'include/xlocale')
-rw-r--r--include/xlocale/_ctype.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/xlocale/_ctype.h b/include/xlocale/_ctype.h
index b048c55..25a9c72 100644
--- a/include/xlocale/_ctype.h
+++ b/include/xlocale/_ctype.h
@@ -119,7 +119,7 @@ __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc)
{ return __sbistype_l(__c, __cat, __l); }
#endif
-XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D)
+XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D|_CTYPE_N)
XLOCALE_ISCTYPE(alpha, _CTYPE_A)
XLOCALE_ISCTYPE(blank, _CTYPE_B)
XLOCALE_ISCTYPE(cntrl, _CTYPE_C)
@@ -128,7 +128,7 @@ XLOCALE_ISCTYPE(graph, _CTYPE_G)
XLOCALE_ISCTYPE(hexnumber, _CTYPE_X)
XLOCALE_ISCTYPE(ideogram, _CTYPE_I)
XLOCALE_ISCTYPE(lower, _CTYPE_L)
-XLOCALE_ISCTYPE(number, _CTYPE_D)
+XLOCALE_ISCTYPE(number, _CTYPE_D|_CTYPE_N)
XLOCALE_ISCTYPE(phonogram, _CTYPE_Q)
XLOCALE_ISCTYPE(print, _CTYPE_R)
XLOCALE_ISCTYPE(punct, _CTYPE_P)
OpenPOWER on IntegriCloud