Print this page
11586 NAME field in man pages should match what's installed

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/ctype.3c
          +++ new/usr/src/man/man3c/ctype.3c
↓ open down ↓ 38 lines elided ↑ open up ↑
  39   39  .\" fields enclosed by brackets "[]" replaced with your own identifying
  40   40  .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41   41  .\"
  42   42  .\"
  43   43  .\" Copyright 1989 AT&T.
  44   44  .\" Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
  45   45  .\" Portions Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved.
  46   46  .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
  47   47  .\" Copyright 2016 Joyent, Inc.
  48   48  .\"
  49      -.TH CTYPE 3C "Mar 14, 2016"
       49 +.TH CTYPE 3C "Aug 20, 2019"
  50   50  .SH NAME
  51   51  ctype, isalpha, isalnum, isascii, isblank, iscntrl, isdigit, islower,
  52   52  isprint, isspace, isupper, ispunct, isgraph, isxdigit, isalpha_l,
  53   53  isalnum_l, isblank_l, iscntrl_l, isdigit_l, islower_l, isprint_l,
  54      -isspace_l, isupper_l, ispunct_l, isgraph_l isxdigit_l \- character handling
       54 +isspace_l, isupper_l, ispunct_l, isgraph_l, isxdigit_l \- character handling
  55   55  .SH SYNOPSIS
  56      -.LP
  57   56  .nf
  58   57  #include <ctype.h>
  59   58  
  60   59  \fBint\fR \fBisalpha\fR(\fBint\fR \fIc\fR);
  61   60  .fi
  62   61  .LP
  63   62  .nf
  64   63  \fBint\fR \fBisalnum\fR(\fBint\fR \fIc\fR);
  65   64  .fi
  66   65  .LP
↓ open down ↓ 82 lines elided ↑ open up ↑
 149  148  .fi
 150  149  .LP
 151  150  .nf
 152  151  \fBint\fR \fBisupper_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 153  152  .fi
 154  153  .LP
 155  154  .nf
 156  155  \fBint\fR \fBisxdigit_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
 157  156  .fi
 158  157  .SH DESCRIPTION
 159      -.LP
 160  158  These functions classify character-coded integer values. Each is a
 161  159  predicate returning non-zero for true, \fB0\fR for false. The behavior
 162  160  of these macros, except \fBisascii()\fR, is affected by the current
 163  161  locale (see \fBsetlocale\fR(3C) and \fBuselocale\fR(3C)). To modify
 164  162  the behavior, change the \fBLC_TYPE\fR category in \fBsetlocale()\fR, that is,
 165  163  \fBsetlocale(\fR\fBLC_CTYPE\fR, \fInewlocale\fR). In the "C" locale,
 166  164  or in a locale where character type information is not defined,
 167  165  characters are classified according to the rules of the \fBUS-ASCII\fR
 168  166  7-bit coded character set.
 169  167  .LP
↓ open down ↓ 5 lines elided ↑ open up ↑
 175  173  that instead of acting on the current locale, they perform the test on
 176  174  the locale specified in the argument \fIloc\fR.
 177  175  .LP
 178  176  The \fBisascii()\fR macro is defined on all integer values. The rest are
 179  177  defined only where the argument is an \fBint\fR, the value of which is
 180  178  representable as an \fBunsigned char\fR, or \fBEOF\fR, which is defined by the
 181  179  <\fBstdio.h\fR> header and represents end-of-file.
 182  180  .sp
 183  181  .ne 2
 184  182  .na
 185      -\fB\fBisalpha()\fR\fR
      183 +\fBisalpha()\fR
 186  184  .ad
 187  185  .RS 13n
 188  186  Tests for any character for which \fBisupper()\fR or \fBislower()\fR is true,
 189  187  or any character that is one of the current locale-defined set of characters
 190  188  for which none of \fBiscntrl()\fR, \fBisdigit()\fR, \fBispunct()\fR, or
 191  189  \fBisspace()\fR is true. In "C" locale, \fBisalpha()\fR returns true only for
 192  190  the characters for which \fBisupper()\fR or \fBislower()\fR is true.
 193  191  .RE
 194  192  
 195  193  .sp
 196  194  .ne 2
 197  195  .na
 198      -\fB\fBisalnum()\fR\fR
      196 +\fBisalnum()\fR
 199  197  .ad
 200  198  .RS 13n
 201  199  Tests for any character for which \fBisalpha()\fR or \fBisdigit()\fR is true
 202  200  (letter or digit).
 203  201  .RE
 204  202  
 205  203  .sp
 206  204  .ne 2
 207  205  .na
 208      -\fB\fBisascii()\fR\fR
      206 +\fBisascii()\fR
 209  207  .ad
 210  208  .RS 13n
 211  209  Tests for any ASCII character, code between \fB0\fR and \fB0177\fR inclusive.
 212  210  .RE
 213  211  
 214  212  .sp
 215  213  .ne 2
 216  214  .na
 217      -\fB\fBisblank()\fR\fR
      215 +\fBisblank()\fR
 218  216  .ad
 219  217  .RS 13n
 220  218  Tests whether \fIc\fR is a character of class blank in the current locale. This
 221  219  macro/function is not available to applications conforming to standards prior
 222  220  to SUSv3. See \fBstandards\fR(5)
 223  221  .RE
 224  222  
 225  223  .sp
 226  224  .ne 2
 227  225  .na
 228      -\fB\fBiscntrl()\fR\fR
      226 +\fBiscntrl()\fR
 229  227  .ad
 230  228  .RS 13n
 231  229  Tests for any ``control character'' as defined by the character set.
 232  230  .RE
 233  231  
 234  232  .sp
 235  233  .ne 2
 236  234  .na
 237      -\fB\fBisdigit()\fR\fR
      235 +\fBisdigit()\fR
 238  236  .ad
 239  237  .RS 13n
 240  238  Tests for any decimal-digit character.
 241  239  .RE
 242  240  
 243  241  .sp
 244  242  .ne 2
 245  243  .na
 246      -\fB\fBisgraph()\fR\fR
      244 +\fBisgraph()\fR
 247  245  .ad
 248  246  .RS 13n
 249  247  Tests for any character for which \fBisalnum()\fR and \fBispunct()\fR are true,
 250  248  or any character in the current locale-defined "graph" class which is neither a
 251  249  space ("\|") nor a character for which \fBiscntrl()\fR is true.
 252  250  .RE
 253  251  
 254  252  .sp
 255  253  .ne 2
 256  254  .na
 257      -\fB\fBislower()\fR\fR
      255 +\fBislower()\fR
 258  256  .ad
 259  257  .RS 13n
 260  258  Tests for any character that is a lower-case letter or is one of the current
 261  259  locale-defined set of characters for which none of \fBiscntrl()\fR,
 262  260  \fBisdigit()\fR, \fBispunct()\fR, \fBisspace()\fR, or \fBisupper()\fR is true.
 263  261  In the "C" locale, \fBislower()\fR returns true only for the characters defined
 264  262  as lower-case \fBASCII\fR characters.
 265  263  .RE
 266  264  
 267  265  .sp
 268  266  .ne 2
 269  267  .na
 270      -\fB\fBisprint()\fR\fR
      268 +\fBisprint()\fR
 271  269  .ad
 272  270  .RS 13n
 273  271  Tests for any character for which \fBiscntrl()\fR is false, and
 274  272  \fBisalnum()\fR, \fBisgraph()\fR, \fBispunct()\fR, the space character ("\|"),
 275  273  and the characters in the current locale-defined "print" class are true.
 276  274  .RE
 277  275  
 278  276  .sp
 279  277  .ne 2
 280  278  .na
 281      -\fB\fBispunct()\fR\fR
      279 +\fBispunct()\fR
 282  280  .ad
 283  281  .RS 13n
 284  282  Tests for any printing character which is neither a space ("\|") nor a
 285  283  character for which \fBisalnum()\fR or \fBiscntrl()\fR is true.
 286  284  .RE
 287  285  
 288  286  .sp
 289  287  .ne 2
 290  288  .na
 291      -\fB\fBisspace()\fR\fR
      289 +\fBisspace()\fR
 292  290  .ad
 293  291  .RS 13n
 294  292  Tests for any space, tab, carriage-return, newline, vertical-tab or form-feed
 295  293  (standard white-space characters) or for one of the current locale-defined set
 296  294  of characters for which \fBisalnum()\fR is false.  In the "C" locale,
 297  295  \fBisspace()\fR returns true only for the standard white-space characters.
 298  296  .RE
 299  297  
 300  298  .sp
 301  299  .ne 2
 302  300  .na
 303      -\fB\fBisupper()\fR\fR
      301 +\fBisupper()\fR
 304  302  .ad
 305  303  .RS 13n
 306  304  Tests for any character that is an upper-case letter or is one of the current
 307  305  locale-defined set of characters for which none of \fBiscntrl()\fR,
 308  306  \fBisdigit()\fR, \fBispunct()\fR, \fBisspace()\fR, or \fBislower()\fR is true.
 309  307  In the "C" locale, \fBisupper()\fR returns true only for the characters defined
 310  308  as upper-case \fBASCII\fR characters.
 311  309  .RE
 312  310  
 313  311  .sp
 314  312  .ne 2
 315  313  .na
 316      -\fB\fBisxdigit()\fR\fR
      314 +\fBisxdigit()\fR
 317  315  .ad
 318  316  .RS 14n
 319  317  Tests for any hexadecimal-digit character (\fB[0\(mi9]\fR, \fB[A\(miF]\fR, or
 320  318  \fB[a\(mif]\fR or the current locale-defined sets of characters representing
 321  319  the hexadecimal digits \fB10\fR to \fB15\fR inclusive). In the "C" locale, only
 322  320  .sp
 323  321  .in +2
 324  322  .nf
 325  323  0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
 326  324  .fi
 327  325  .in -2
 328  326  
 329  327  are included.
 330  328  .RE
 331  329  
 332  330  .SH RETURN VALUES
 333      -.LP
 334  331  If the argument to any of the character handling macros is not in the domain of
 335  332  the function, the result is undefined. Otherwise, the macro or function returns
 336  333  non-zero if the classification is \fBTRUE\fR and \fB0\fR if the classification
 337  334  is \fBFALSE\fR.
 338  335  .SH ATTRIBUTES
 339      -.LP
 340  336  See \fBattributes\fR(5) for descriptions of the following attributes:
 341  337  .TS
 342  338  box;
 343  339  c | c
 344  340  l | l .
 345  341  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 346  342  _
 347  343  CSI     Enabled
 348  344  _
 349  345  Interface Stability     Standard
 350  346  _
 351  347  MT-Level        MT-Safe
 352  348  .TE
 353  349  
 354  350  .SH SEE ALSO
 355      -.LP
 356  351  \fBnewlocale\fR(3C), \fBsetlocale\fR(3C), \fBuselocale\fR(3C),
 357  352  \fBstdio\fR(3C), \fBascii\fR(5), \fBenviron\fR(5),
 358  353  \fBstandards\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX