remove csh(1)
[unleashed.git] / share / man / man3c / wctype.3c
blob4ff276ea988a2fe6d5a512d8a115a4071969a1be
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
44 .\" Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved.
45 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
46 .\"
47 .TH WCTYPE 3C "Jun 25, 2014"
48 .SH NAME
49 wctype, wctype_l \- define character class
50 .SH SYNOPSIS
51 .LP
52 .nf
53 #include <wchar.h>
55 \fBwctype_t\fR \fBwctype\fR(\fBconst char *\fR\fIcharclass\fR);
56 .fi
57 .LP
58 .nf
59 \fBwctype_t\fR \fBwctype_l\fR(\fBconst char *\fR\fIcharclass\fR, \fBlocale_t\fR \fIloc\fR);
60 .fi
62 .SH DESCRIPTION
63 .LP
64 The \fBwctype()\fR function is defined for valid character class names as
65 defined in the current locale. The \fIcharclass\fR is a string identifying a
66 generic character class for which codeset-specific type information is
67 required. The following character class names are defined in all locales:
68 .IP
69 .TS
70 l l l
71 l l l .
72 "alnum" "alpha" "blank"
73 "cntrl" "digit" "graph"
74 "lower" "print" "punct"
75 "space" "upper" "xdigit"
76 .TE
78 .LP
79 Additional character class names defined in the locale definition file
80 (category \fBLC_CTYPE\fR) can also be specified.
81 .LP
82 The function returns a value of type \fBwctype_t\fR, which can be used as the
83 second argument to subsequent calls of \fBiswctype\fR(3C). The \fBwctype()\fR
84 function determines values of \fBwctype_t\fR according to the rules of the coded
85 character set defined by character type information in the current locale
86 (category \fBLC_CTYPE\fR). The values returned by \fBwctype()\fR are valid
87 only in the locale, or locales with the same \fBLC_CTYPE\fR category.
88 .LP
89 The function \fBwctype_l()\fR behaves identically to \fBwctype()\fR, except
90 instead of operating in the current locale, it operates in the locale
91 specified by \fIloc\fR.
92 .SH RETURN VALUES
93 .LP
94 These functions return \fB0\fR if the given character class name
95 is not valid for the locale (category \fBLC_CTYPE\fR); otherwise it
96 returns an object of type \fBwctype_t\fR that can be used in calls to
97 \fBiswctype\fR(3C).
98 .SH ATTRIBUTES
99 .LP
100 See \fBattributes\fR(5) for descriptions of the following attributes:
102 box;
103 c | c
104 l | l .
105 ATTRIBUTE TYPE  ATTRIBUTE VALUE
107 CSI     Enabled
109 Interface Stability     Standard
111 MT-Level        MT-Safe
114 .SH SEE ALSO
116 \fBiswctype\fR(3C), \fBnewlocale\fR(3C), \fBsetlocale\fR(3C),
117 \fBuselocale\fR(3C),
118 \fBattributes\fR(5),
119 \fBstandards\fR(5)