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