Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: TBD

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/iswctype.3c
          +++ new/usr/src/man/man3c/iswctype.3c
   1    1  '\" te
        2 +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
   2    3  .\"  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved  Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   3    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
   4    5  .\" http://www.opengroup.org/bookstore/.
   5    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.
   6    7  .\"  This notice shall appear on any product containing this material.
   7    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.
   8    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.
   9   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]
  10      -.TH ISWCTYPE 3C "Jul 24, 2002"
       11 +.TH ISWCTYPE 3C "Jul 26, 2014"
  11   12  .SH NAME
  12   13  iswctype \- test character for specified class
  13   14  .SH SYNOPSIS
  14   15  .LP
  15   16  .nf
  16   17  #include <wchar.h>
  17   18  
  18   19  \fBint\fR \fBiswctype\fR(\fBwint_t\fR \fIwc\fR, \fBwctype_t\fR \fIcharclass\fR);
  19   20  .fi
       21 +.LP
       22 +.nf
       23 +\fBint\fR \fBiswctype\fR(\fBwint_t\fR \fIwc\fR, \fBwctype_t\fR \fIcharclass\fR, \fBlocale_t\fR \fIloc\fR);
       24 +.fi
  20   25  
  21   26  .SH DESCRIPTION
  22      -.sp
  23   27  .LP
  24      -The \fBiswctype()\fR function determines whether the wide-character code
  25      -\fIwc\fR has the character class \fIcharclass\fR, returning \fBTRUE\fR or
  26      -\fBFALSE\fR. The \fBiswctype()\fR function is defined on \fBWEOF\fR and
  27      -wide-character codes corresponding to the valid character encodings in the
  28      -current locale. If the \fIwc\fR argument is not in the domain of the function,
  29      -the result is undefined. If the value of \fIcharclass\fR is invalid (that is,
  30      -not obtained by a call to \fBwctype\fR(3C) or \fIcharclass \fR is invalidated
  31      -by a subsequent call to \fBsetlocale\fR(3C) that has affected category
  32      -\fBLC_CTYPE\fR), the result is indeterminate.
       28 +The
       29 +.B iswctype()
       30 +and
       31 +.B iswctype_l()
       32 +functions determine whether the wide-character code
       33 +.I wc
       34 +is a member of the character class
       35 +.IR charclass ,
       36 +returning
       37 +.B TRUE
       38 +or
       39 +.BR FALSE .
       40 +These functions are defined on
       41 +.B WEOF
       42 +and wide-character codes corresponding to the valid character encodings in the
       43 +current locale (or
       44 +.I loc
       45 +for 
       46 +.BR iswctype_l() .)
       47 +If the
       48 +.I wc
       49 +argument is not in the domain of the function,
       50 +the result is undefined. If the value of
       51 +.I charclass
       52 +is invalid (that is,
       53 +not obtained by a call to
       54 +.B wctype (3C)
       55 +or obtained from a different locale), the result is indeterminate.
       56 +.LP
       57 +Whereas
       58 +.B iswctype()
       59 +operates in the current locale,
       60 +.B iswctype_l()
       61 +operates in the locale specified with
       62 +.IR loc .
  33   63  .SH RETURN VALUES
  34      -.sp
  35   64  .LP
  36      -The \fBiswctype()\fR function returns \fB0\fR for \fBFALSE\fR and non-zero for
  37      -\fBTRUE\fR.
       65 +These functions return
       66 +.B 0
       67 +for
       68 +.B FALSE
       69 +and non-zero for
       70 +.BR TRUE .
  38   71  .SH USAGE
  39      -.sp
  40   72  .LP
  41   73  There are twelve strings that are reserved for the standard character classes:
  42      -.sp
  43      -
  44      -.sp
  45   74  .TS
  46      -l | l | l
       75 +box;
  47   76  l | l | l .
  48   77  "alnum" "alpha" "blank"
  49   78  _
  50   79  "cntrl" "digit" "graph"
  51   80  _
  52   81  "lower" "print" "punct"
  53   82  _
  54   83  "space" "upper" "xdigit"
  55   84  .TE
  56   85  
  57      -.sp
  58   86  .LP
  59   87  In the table below, the functions in the left column are equivalent to the
  60   88  functions in the right column.
  61      -.sp
  62      -
  63      -.sp
  64   89  .TS
  65      -l l
  66      -l l .
  67      -\fBiswalnum(\fR\fIwc\fR\fB)\fR  iswctype(\fIwc,\fR\fB wctype(\fR"alnum"\fB))\fR
  68      -iswalpha(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"alpha"\fB))\fR
  69      -iswcntrl(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"cntrl"\fB))\fR
  70      -iswdigit(\fI wc\fR\fB)\fR       iswctype(\fIwc,\fR\fB wctype(\fR"digit"\fB))\fR
  71      -iswgraph(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"graph"\fB))\fR
  72      -iswlower(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"lower"\fB))\fR
  73      -iswprint(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"print"\fB))\fR
  74      -iswpunct(\fIwc\fR\fB)\fR        iswctype(\fI wc,\fR\fB wctype(\fR"punct"\fB))\fR
  75      -iswspace(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"space"\fB))\fR
  76      -iswupper(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"upper"\fB))\fR
  77      -iswxdigit(\fIwc\fR\fB)\fR       iswctype(\fIwc,\fR\fB wctype(\fR"xdigit"\fB))\fR
       90 +box;
       91 +l | l .
       92 +\fBiswalnum\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("alnum"))
       93 +\fBiswalpha\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("alpha"))
       94 +\fBiswcntrl\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("cntrl"))
       95 +\fBiswdigit\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("digit"))
       96 +\fBiswgraph\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("graph"))
       97 +\fBiswlower\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("lower"))
       98 +\fBiswprint\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("print"))
       99 +\fBiswpunct\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("punct"))
      100 +\fBiswspace\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("space"))
      101 +\fBiswupper\fR(\fIwc\fR)        \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("upper"))
      102 +\fBiswxdigit\fR(\fIwc\fR)       \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("xdigit"))
  78  103  .TE
  79  104  
  80      -.sp
  81  105  .LP
  82  106  The call
  83      -.sp
  84  107  .LP
  85      -\fBiswctype(\fR\fIwc,\fR\fB wctype(\fR"blank"\fB))\fR
  86      -.sp
      108 +\fBiswctype\fR(\fIwc\fR, \fBwctype\fR("blank"))
  87  109  .LP
  88      -does not have an equivalent  \fBisw*(\|)\fR function.
      110 +does not have an equivalent \fBisw*(\|)\fR function.
  89  111  .SH ATTRIBUTES
  90      -.sp
  91  112  .LP
  92      -See \fBattributes\fR(5) for descriptions of the following attributes:
  93      -.sp
  94      -
  95      -.sp
      113 +See
      114 +.BR attributes (5)
      115 +for descriptions of the following attributes:
  96  116  .TS
  97  117  box;
  98  118  c | c
  99  119  l | l .
 100  120  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 101  121  _
 102  122  CSI     Enabled
 103  123  _
 104  124  Interface Stability     Standard
 105  125  _
 106      -MT-Level        MT-Safe with exceptions
      126 +MT-Level        MT-Safe
 107  127  .TE
 108  128  
 109  129  .SH SEE ALSO
 110      -.sp
 111  130  .LP
 112      -\fBiswalpha\fR(3C), \fBsetlocale\fR(3C), \fBwctype\fR(3C), \fBattributes\fR(5),
 113      -\fBenviron\fR(5), \fBstandards\fR(5)
      131 +.BR iswalpha (3C),
      132 +.BR newlocale (3C),
      133 +.BR setlocale (3C),
      134 +.BR uselocale (3C),
      135 +.BR wctype (3C),
      136 +.BR attributes (5),
      137 +.BR standards (5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX