From kido@vnet.IBM.COM Mon Mar 15 02:57:16 1993 Received: from vnet.IBM.COM ([192.239.48.4]) by dkuug.dk with SMTP id AA29072 (5.65c8/IDA-1.4.4j for ); Mon, 15 Mar 1993 02:57:16 +0100 Message-Id: <199303150157.AA29072@dkuug.dk> Received: from YMTVM8 by vnet.IBM.COM (IBM VM SMTP V2R2) with BSMTP id 4006; Sun, 14 Mar 93 20:56:35 EST Date: Mon, 15 Mar 93 10:56:54 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.1 X-Charset: ASCII X-Char-Esc: 29 .SK .H 3 "Wide character handling" .P The header .Cf declares several functions useful for testing and mapping of wide characters. .P For all functions that accept an argument of type .Cf wint_t , the value shall be representable as a .Cf wchar_t or shall equal the value of the macro .Cf WEOF . If this argument has any other value, the behavior is undefined. .P The behavior of these functions is affected by the .Cf LC_CTYPE category of the current locale. .P The term .I "printing wide character" refers to a member of an implementation-defined set of wide characters, each of which occupies at least one printing position on a display device; the term .I "control wide character" refers to a member of an implementation-defined set of wide characters that are not printing wide characters. .H 4 "Wide character testing functions" .P The functions in this subclause return nonzero (true) if and only if the value of the argument .Cf wc conforms to that in the description of the function. .P Except for the .Cf iswgraph and .Cf iswpunct functions with respect to printing white space wide characters other than .Cf "L' '" , each of the following eleven functions shall return true for each wide character that corresponds (as if by a call to the .Cf wctob function) to a character (byte) for which the respectively matching character testing function from \*(AC subclause 7.3.1 returns true.\*F .FS For example, if the expression .Cf isalpha(wctob(wc)) evaluates to true, then the call .Cf iswalpha(wc) must also return true. But, if the expression .Cf isgraph(wctob(wc)) evaluates to true (which cannot occur for .Cf wc .Cf == .Cf "L' '" of course), then either .Cf iswgraph(wc) or .Cf iswprint(wc) .Cf && .Cf iswspace(wc) must be true, but not both. .FE .rF the .Cf wctob function (4.5.6.1.1). .H 5 "The \*(Cwiswalnum\fP function" .HU Synopsis .Cb #include int iswalnum(wint_t wc); .Ce .HU Description .P The .Cf iswalnum function tests for any wide character for which .Cf iswalpha or .Cf iswdigit is true. .H 5 "The \*(Cwiswalpha\fP function" .HU Synopsis .Cb #include int iswalpha(wint_t wc); .Ce .HU Description .P The .Cf iswalpha function tests for any wide character for which .Cf iswupper or .Cf iswlower is true, or any wide character that is one of an implementation-defined set of wide characters for which none of .Cf iswcntrl , .Cf iswdigit , .Cf iswpunct , or .Cf iswspace is true. .H 5 "The \*(Cwiswcntrl\fP function" .HU Synopsis .Cb #include int iswcntrl(wint_t wc); .Ce .HU Description .P The .Cf iswcntrl function tests for any control wide character. .H 5 "The \*(Cwiswdigit\fP function" .HU Synopsis .Cb #include int iswdigit(wint_t wc); .Ce .HU Description .P The .Cf iswdigit function tests for any wide character that corresponds to a decimal-digit character (as defined in \*(AC subclause 5.2.1). .H 5 "The \*(Cwiswgraph\fP function" .HU Synopsis .Cb #include int iswgraph(wint_t wc); .Ce .HU Description .P The .Cf iswgraph function tests for any wide character for which .Cf iswprint is true and .Cf iswspace .ds rN \*F is false.\*(rN .FS Note that the behavior of the .Cf iswgraph and .Cf iswpunct functions may differ from their matching functions in \*(AC subclause 7.3.1 with respect to printing white space basic execution characters other than .Cf "' '" . .FE .H 5 "The \*(Cwiswlower\fP function" .HU Synopsis .Cb #include int iswlower(wint_t wc); .Ce .HU Description .P The .Cf iswlower function tests for any wide character that corresponds to a lowercase letter or is one of an implementation-defined set of wide characters for which none of .Cf iswcntrl , .Cf iswdigit , .Cf iswpunct , or .Cf iswspace is true. .H 5 "The \*(Cwiswprint\fP function" .HU Synopsis .Cb #include int iswprint(wint_t wc); .Ce .HU Description .P The .Cf iswprint function tests for any printing wide character. .H 5 "The \*(Cwiswpunct\fP function" .HU Synopsis .Cb #include int iswpunct(wint_t wc); .Ce .HU Description .P The .Cf iswpunct function tests for any printing wide character that is one of an implementation-defined set of wide characters for which neither .Cf iswspace nor .Cf iswalnum is true.\*(rN .H 5 "The \*(Cwiswspace\fP function" .HU Synopsis .Cb #include int iswspace(wint_t wc); .Ce .HU Description .P The .Cf iswspace function tests for any wide character that corresponds to an implementation-defined set of wide characters for which .Cf iswalnum is false. .H 5 "The \*(Cwiswupper\fP function" .HU Synopsis .Cb #include int iswupper(wint_t wc); .Ce .HU Description .P The .Cf iswupper function tests for any wide character that corresponds to an uppercase letter or is one of an implementation-defined set of wide characters for which none of .Cf iswcntrl , .Cf iswdigit , .Cf iswpunct , or .Cf iswspace is true. .H 5 "The \*(Cwiswxdigit\fP function" .HU Synopsis .Cb #include int iswxdigit(wint_t wc); .Ce .HU Description .P The .Cf iswxdigit function tests for any wide character that corresponds to a hexadecimal-digit character (as defined in \*(AC subclause 6.1.3.2).