Bug 156920 - isspecial(3) is not helpful
Summary: isspecial(3) is not helpful
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 08:40 UTC by Poul-Henning Kamp
Modified: 2020-01-05 19:14 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Poul-Henning Kamp 2011-05-10 08:40:06 UTC
	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.
Comment 1 Glen Barber freebsd_committer 2011-06-15 02:44:06 UTC
State Changed
From-To: open->analyzed
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-05-06 21:17:39 UTC
State Changed
From-To: analyzed->open

unowned PRs should not be in analyzed
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:54 UTC
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
Comment 4 Yuri Pankov freebsd_committer 2018-11-05 00:43:38 UTC
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.
Comment 5 Ed Maste freebsd_committer 2020-01-05 17:34:43 UTC
(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?
Comment 6 Conrad Meyer freebsd_committer 2020-01-05 19:10:19 UTC
#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.
Comment 7 Conrad Meyer freebsd_committer 2020-01-05 19:13:31 UTC
Similarly, share/ctypedef/C.UTF-8.src declares several classes (alpha, upper, lower, cntrl, digit, "graph", punct) but no "special."
Comment 8 Conrad Meyer freebsd_committer 2020-01-05 19:14:53 UTC
(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.)