Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Jan 2020 19:10:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 156920] isspecial(3) is not helpful
Message-ID:  <bug-156920-227-omGF7OYVzh@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-156920-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-156920-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D156920

--- Comment #6 from Conrad Meyer <cem@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 m=
aybe
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) =3D=3D 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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-156920-227-omGF7OYVzh>