[Bug 156920] isspecial(3) is not helpful
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jan 5 19:10:20 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=156920
--- Comment #6 from Conrad Meyer <cem at freebsd.org> ---
#define isspecial(c) __sbistype((c), _CTYPE_T)
Whatever that means.
@Ed, there are a host of other BSD-specific ctype.h extensions that could maybe
be better defined, or removed:
127-#if __BSD_VISIBLE
128-#define digittoint(c) __sbmaskrune((c), 0xFF)
129-#define ishexnumber(c) __sbistype((c), _CTYPE_X)
130-#define isideogram(c) __sbistype((c), _CTYPE_I)
131-#define isnumber(c) __sbistype((c), _CTYPE_D|_CTYPE_N)
132-#define isphonogram(c) __sbistype((c), _CTYPE_Q)
133-#define isrune(c) __sbistype((c), 0xFFFFFF00L)
(And keep in mind the corresponding wchar versions,
116-#if __BSD_VISIBLE
117-#define iswascii(wc) (((wc) & ~0x7F) == 0)
118-#define iswhexnumber(wc) __istype((wc), _CTYPE_X) /* alias of
iswxdigit */
119-#define iswideogram(wc) __istype((wc), _CTYPE_I)
120-#define iswnumber(wc) __istype((wc), _CTYPE_D|_CTYPE_N)
121-#define iswphonogram(wc) __istype((wc), _CTYPE_Q)
122-#define iswrune(wc) __istype((wc), 0xFFFFFF00L)
123:#define iswspecial(wc) __istype((wc), _CTYPE_T)
)
There is a hardcoded ASCII table in lib/libc/locale/table.c that includes
several characters marked as whitespace (_CTYPE_S) but zero references to
_CTYPE_T.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-doc
mailing list