From kido@vnet.IBM.COM Mon Mar 15 02:58:08 1993 Received: from vnet.IBM.COM ([192.239.48.4]) by dkuug.dk with SMTP id AA29182 (5.65c8/IDA-1.4.4j for ); Mon, 15 Mar 1993 02:58:08 +0100 Message-Id: <199303150158.AA29182@dkuug.dk> Received: from YMTVM8 by vnet.IBM.COM (IBM VM SMTP V2R2) with BSMTP id 4009; Sun, 14 Mar 93 20:57:26 EST Date: Mon, 15 Mar 93 10:57:50 JST From: "Akio Kido" To: sc22wg15@dkuug.dk, sc22wg20@dkuug.dk, XoJIG@xopen.co.uk, sig-international@osf.org, uojlg-bse@uiap.ui.org, efischer@donald.aix.kingston.ibm.com Subject: MSE 4.5.2.2.mm X-Charset: ASCII X-Char-Esc: 29 .SK .H 4 "Extensible wide character classification functions" .P The functions .Cf wctype and .Cf iswctype provide extensible wide character classification as well as testing equivalent to that performed by the functions described in the previous subclause (4.5.2.1). .H 5 "The \*(Cwwctype\fP function" .HU Synopsis .Cb #include wctype_t wctype(const char *property); .Ce .HU Description .P The .Cf wctype function constructs a value with type .Cf wctype_t that describes a class of wide characters identified by the string argument, .Cf property . The constructed value is affected by the .Cf LC_CTYPE category of the current locale; the constructed value becomes indeterminate if the category's setting is changed. .P The eleven strings listed in the description of the .Cf iswctype function shall be valid in all locales as .Cf property arguments to the .Cf wctype function. .HU Returns .P If .Cf property identifies a valid class of wide characters according to the .Cf LC_CTYPE category of the current locale, the .Cf wctype function returns a nonzero value that is valid as the second argument to the .Cf iswctype function; otherwise, it returns zero. .H 5 "The \*(Cwiswctype\fP function" .HU Synopsis .Cb #include int iswctype(wint_t wc, wctype_t desc); .Ce .HU Description .P The .Cf iswctype function determines whether the wide character .Cf wc has the property described by .Cf desc . Valid values of .Cf desc are defined in the description of the .Cf wctype function. The value of .Cf desc shall be that returned by a previous call to the .Cf wctype function which has not become indeterminate. .P Each of the following eleven expressions shall have a truth-value equivalent to the call to the wide character testing function (4.5.2.1) in the comment that follows the expression: .Cb iswctype(wc, wctype("alnum")) /*iswalnum(wc)*/ iswctype(wc, wctype("alpha")) /*iswalpha(wc)*/ iswctype(wc, wctype("cntrl")) /*iswcntrl(wc)*/ iswctype(wc, wctype("digit")) /*iswdigit(wc)*/ iswctype(wc, wctype("graph")) /*iswgraph(wc)*/ iswctype(wc, wctype("lower")) /*iswlower(wc)*/ iswctype(wc, wctype("print")) /*iswprint(wc)*/ iswctype(wc, wctype("punct")) /*iswpunct(wc)*/ iswctype(wc, wctype("space")) /*iswspace(wc)*/ iswctype(wc, wctype("upper")) /*iswupper(wc)*/ iswctype(wc, wctype("xdigit")) /*iswxdigit(wc)*/ .Ce .HU Returns .P The .Cf iswctype function returns nonzero (true) if and only if the value of the wide character .Cf wc has the property described by .Cf desc .