The isspecial(3) manpage lacks a usable definition of what is
meant by the word "special"
A grep for "SPECIAL" in src/share/mklocale may enlighten people
with more locale skills than me to what is meant.
unowned PRs should not be in analyzed
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped
There doesn't seem to be a definitive description of "special" class anywhere.
Given that special class is non-standard extension (even if legacy one), and the fact that it's NOT used in the tree, I'm thinking that it would be best to just undocument it to prevent further confusion and use.
(In reply to Yuri Pankov from comment #4)
I wonder if we should request an exp-run with it removed, and just take it out if nothing in ports uses it either?
#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:
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,
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.
Similarly, share/ctypedef/C.UTF-8.src declares several classes (alpha, upper, lower, cntrl, digit, "graph", punct) but no "special."
(This may be an artifact of tools/tools/locale/tools/utf8-rollup.pl, but it's unclear what was intended by isspecial(). Someone could do some CSRG archaeology to discover the original intent, but it seems defunct now.)