Print this page
Garrett's man page edits.

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/ctype.3c
          +++ new/usr/src/man/man3c/ctype.3c
   1    1  '\" te
   2      -.\" Copyright 2013 Garrett D'Amore <garrett@damore.org>
        2 +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
   3    3  .\" Copyright 1989 AT&T.  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved.  Portions Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved.
   4    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    5  .\" http://www.opengroup.org/bookstore/.
   6    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    7  .\"  This notice shall appear on any product containing this material.
   8    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    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   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 CTYPE 3C "Sep 18, 2013"
       11 +.TH CTYPE 3C "Jun 27, 2014"
  12   12  .SH NAME
  13   13  ctype, isalpha, isalnum, isascii, isblank, iscntrl, isdigit, islower,
  14   14  isprint, isspace, isupper, ispunct, isgraph, isxdigit, isalpha_l,
  15   15  isalnum_l, isblank_l, iscntrl_l, isdigit_l, islower_l, isprint_l,
  16   16  isspace_l, isupper_l, ispunct_l, isgraph_l \- character handling
  17   17  .SH SYNOPSIS
  18   18  .LP
  19   19  .nf
  20   20  #include <ctype.h>
  21   21  
  22   22  \fBint\fR \fBisalpha\fR(\fBint\fR \fIc\fR);
  23   23  .fi
  24      -
  25   24  .LP
  26   25  .nf
  27   26  \fBint\fR \fBisalnum\fR(\fBint\fR \fIc\fR);
  28   27  .fi
  29      -
  30   28  .LP
  31   29  .nf
  32   30  \fBint\fR \fBisascii\fR(\fBint\fR \fIc\fR);
  33   31  .fi
  34      -
  35   32  .LP
  36   33  .nf
  37   34  \fBint\fR \fBisblank\fR(\fBint\fR \fIc\fR);
  38   35  .fi
  39      -
  40   36  .LP
  41   37  .nf
  42   38  \fBint\fR \fBiscntrl\fR(\fBint\fR \fIc\fR);
  43   39  .fi
  44      -
  45   40  .LP
  46   41  .nf
  47   42  \fBint\fR \fBisdigit\fR(\fBint\fR \fIc\fR);
  48   43  .fi
  49      -
  50   44  .LP
  51   45  .nf
  52   46  \fBint\fR \fBisgraph\fR(\fBint\fR \fIc\fR);
  53   47  .fi
  54      -
  55   48  .LP
  56   49  .nf
  57   50  \fBint\fR \fBislower\fR(\fBint\fR \fIc\fR);
  58   51  .fi
  59      -
  60   52  .LP
  61   53  .nf
  62   54  \fBint\fR \fBisprint\fR(\fBint\fR \fIc\fR);
  63   55  .fi
  64      -
  65   56  .LP
  66   57  .nf
  67   58  \fBint\fR \fBispunct\fR(\fBint\fR \fIc\fR);
  68   59  .fi
  69      -
  70   60  .LP
  71   61  .nf
  72   62  \fBint\fR \fBisspace\fR(\fBint\fR \fIc\fR);
  73   63  .fi
  74      -
  75   64  .LP
  76   65  .nf
  77   66  \fBint\fR \fBisupper\fR(\fBint\fR \fIc\fR);
  78   67  .fi
  79      -
  80   68  .LP
  81   69  .nf
  82   70  \fBint\fR \fBisxdigit\fR(\fBint\fR \fIc\fR);
  83   71  .fi
  84      -
  85   72  .LP
  86   73  .nf
  87   74  \fBint\fR \fBisalpha_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
  88   75  .fi
  89      -
  90   76  .LP
  91   77  .nf
  92   78  \fBint\fR \fBisalnum_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
  93   79  .fi
  94      -
  95   80  .LP
  96   81  .nf
  97   82  \fBint\fR \fBisblank_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
  98   83  .fi
  99      -
 100   84  .LP
 101   85  .nf
 102   86  \fBint\fR \fBiscntrl_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 103   87  .fi
 104      -
 105   88  .LP
 106   89  .nf
 107   90  \fBint\fR \fBisdigit_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 108   91  .fi
 109      -
 110   92  .LP
 111   93  .nf
 112   94  \fBint\fR \fBisgraph_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 113   95  .fi
 114      -
 115   96  .LP
 116   97  .nf
 117   98  \fBint\fR \fBislower_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 118   99  .fi
 119      -
 120  100  .LP
 121  101  .nf
 122  102  \fBint\fR \fBisprint_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 123  103  .fi
 124      -
 125  104  .LP
 126  105  .nf
 127  106  \fBint\fR \fBispunct_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 128  107  .fi
 129      -
 130  108  .LP
 131  109  .nf
 132  110  \fBint\fR \fBisspace_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 133  111  .fi
 134      -
 135  112  .LP
 136  113  .nf
 137  114  \fBint\fR \fBisupper_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 138  115  .fi
 139      -
 140  116  .SH DESCRIPTION
 141      -.sp
 142  117  .LP
 143  118  These functions classify character-coded integer values. Each is a
 144  119  predicate returning non-zero for true, \fB0\fR for false. The behavior
 145  120  of these macros, except \fBisascii()\fR, is affected by the current
 146  121  locale (see \fBsetlocale\fR(3C) and \fBuselocale\fR(3C)). To modify
 147  122  the behavior, change the \fBLC_TYPE\fR category in \fBsetlocale()\fR, that is,
 148  123  \fBsetlocale(\fR\fBLC_CTYPE\fR, \fInewlocale\fR). In the "C" locale,
 149  124  or in a locale where character type information is not defined,
 150  125  characters are classified according to the rules of the \fBUS-ASCII\fR
 151  126  7-bit coded character set.
 152      -.sp
 153  127  .LP
 154  128  The functions \fBisalnum_l()\fR, \fBisalpha_l()\fR, \fBisblank_l()\fR,
 155  129  \fBiscntrl_l\fR, \fBisdigit_l()\fR, \fBislower_l()\fR,
 156  130  \fBisprint_l()\fR, \fBispunct_l()\fR, \fBisspace_l()\fR,
 157  131  \fBisupper_l()\fR, all behave identically to their counterparts without
 158  132  the '\fB_l\fR' prefix, except that instead of acting on the current
 159  133  locale, that perform the test on the locale specified in the argument
 160  134  \fIloc\fR.
 161      -.sp
 162  135  .LP
 163  136  The \fBisascii()\fR macro is defined on all integer values. The rest are
 164  137  defined only where the argument is an \fBint\fR, the value of which is
 165  138  representable as an \fBunsigned char\fR, or \fBEOF\fR, which is defined by the
 166  139  <\fBstdio.h\fR> header and represents end-of-file.
 167  140  .sp
 168  141  .ne 2
 169  142  .na
 170  143  \fB\fBisalpha()\fR\fR
 171  144  .ad
↓ open down ↓ 136 lines elided ↑ open up ↑
 308  281  .in +2
 309  282  .nf
 310  283  0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
 311  284  .fi
 312  285  .in -2
 313  286  
 314  287  are included.
 315  288  .RE
 316  289  
 317  290  .SH RETURN VALUES
 318      -.sp
 319  291  .LP
 320  292  If the argument to any of the character handling macros is not in the domain of
 321  293  the function, the result is undefined. Otherwise, the macro or function returns
 322  294  non-zero if the classification is \fBTRUE\fR and \fB0\fR if the classification
 323  295  is \fBFALSE\fR.
 324      -.SH USAGE
 325      -.sp
 326      -.LP
 327      -These macros or functions can be used safely in multithreaded applications, as
 328      -long as \fBsetlocale\fR(3C) is not being called to change the locale.
 329  296  .SH ATTRIBUTES
 330  297  .sp
 331  298  .LP
 332  299  See \fBattributes\fR(5) for descriptions of the following attributes:
 333      -.sp
 334      -
 335      -.sp
 336  300  .TS
 337  301  box;
 338      -l l
 339      -l l .
      302 +c | c
      303 +l | l .
 340  304  ATTRIBUTE TYPE  ATTRIBUTE VALUE
      305 +_
 341  306  CSI     Enabled
      307 +_
 342  308  Interface Stability     Standard
 343      -MT-Level        MT-Safe with exceptions
      309 +_
      310 +MT-Level        MT-Safe
 344  311  .TE
 345  312  
 346  313  .SH SEE ALSO
 347      -.sp
 348  314  .LP
 349      -\fBsetlocale\fR(3C), \fBstdio\fR(3C), \fBascii\fR(5), \fBenviron\fR(5),
      315 +\fBnewlocale\fR(3C), \fBsetlocale\fR(3C), \fBuselocale\fR(3C),
      316 +\fBstdio\fR(3C), \fBascii\fR(5), \fBenviron\fR(5),
 350  317  \fBstandards\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX