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
1 1 .\"
2 2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 3 .\" permission to reproduce portions of its copyrighted documentation.
4 4 .\" Original documentation from The Open Group can be obtained online at
5 5 .\" http://www.opengroup.org/bookstore/.
6 6 .\"
7 7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 8 .\" Group, have given us permission to reprint portions of their
9 9 .\" documentation.
10 10 .\"
11 11 .\" In the following statement, the phrase ``this text'' refers to portions
12 12 .\" of the system documentation.
13 13 .\"
14 14 .\" Portions of this text are reprinted and reproduced in electronic form
15 15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 16 .\" Standard for Information Technology -- Portable Operating System
17 17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 20 .\" between these versions and the original IEEE and The Open Group
21 21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 22 .\" document. The original Standard can be obtained online at
23 23 .\" http://www.opengroup.org/unix/online.html.
24 24 .\"
25 25 .\" This notice shall appear on any product containing this material.
26 26 .\"
27 27 .\" The contents of this file are subject to the terms of the
28 28 .\" Common Development and Distribution License (the "License").
29 29 .\" You may not use this file except in compliance with the License.
30 30 .\"
31 31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 32 .\" or http://www.opensolaris.org/os/licensing.
33 33 .\" See the License for the specific language governing permissions
34 34 .\" and limitations under the License.
35 35 .\"
36 36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 38 .\" If applicable, add the following below this CDDL HEADER, with the
↓ 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
67 66 .nf
68 67 \fBint\fR \fBisascii\fR(\fBint\fR \fIc\fR);
69 68 .fi
70 69 .LP
71 70 .nf
72 71 \fBint\fR \fBisblank\fR(\fBint\fR \fIc\fR);
73 72 .fi
74 73 .LP
75 74 .nf
76 75 \fBint\fR \fBiscntrl\fR(\fBint\fR \fIc\fR);
77 76 .fi
78 77 .LP
79 78 .nf
80 79 \fBint\fR \fBisdigit\fR(\fBint\fR \fIc\fR);
81 80 .fi
82 81 .LP
83 82 .nf
84 83 \fBint\fR \fBisgraph\fR(\fBint\fR \fIc\fR);
85 84 .fi
86 85 .LP
87 86 .nf
88 87 \fBint\fR \fBislower\fR(\fBint\fR \fIc\fR);
89 88 .fi
90 89 .LP
91 90 .nf
92 91 \fBint\fR \fBisprint\fR(\fBint\fR \fIc\fR);
93 92 .fi
94 93 .LP
95 94 .nf
96 95 \fBint\fR \fBispunct\fR(\fBint\fR \fIc\fR);
97 96 .fi
98 97 .LP
99 98 .nf
100 99 \fBint\fR \fBisspace\fR(\fBint\fR \fIc\fR);
101 100 .fi
102 101 .LP
103 102 .nf
104 103 \fBint\fR \fBisupper\fR(\fBint\fR \fIc\fR);
105 104 .fi
106 105 .LP
107 106 .nf
108 107 \fBint\fR \fBisxdigit\fR(\fBint\fR \fIc\fR);
109 108 .fi
110 109 .LP
111 110 .nf
112 111 \fBint\fR \fBisalpha_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
113 112 .fi
114 113 .LP
115 114 .nf
116 115 \fBint\fR \fBisalnum_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
117 116 .fi
118 117 .LP
119 118 .nf
120 119 \fBint\fR \fBisblank_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
121 120 .fi
122 121 .LP
123 122 .nf
124 123 \fBint\fR \fBiscntrl_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
125 124 .fi
126 125 .LP
127 126 .nf
128 127 \fBint\fR \fBisdigit_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
129 128 .fi
130 129 .LP
131 130 .nf
132 131 \fBint\fR \fBisgraph_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
133 132 .fi
134 133 .LP
135 134 .nf
136 135 \fBint\fR \fBislower_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
137 136 .fi
138 137 .LP
139 138 .nf
140 139 \fBint\fR \fBisprint_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
141 140 .fi
142 141 .LP
143 142 .nf
144 143 \fBint\fR \fBispunct_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
145 144 .fi
146 145 .LP
147 146 .nf
148 147 \fBint\fR \fBisspace_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
↓ 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
170 168 The functions \fBisalnum_l()\fR, \fBisalpha_l()\fR, \fBisblank_l()\fR,
171 169 \fBiscntrl_l\fR, \fBisdigit_l()\fR, \fBisgraph_l()\fR,
172 170 \fBislower_l()\fR, \fBisprint_l()\fR, \fBispunct_l()\fR,
173 171 \fBisspace_l()\fR, \fBisupper_l()\fR, and \fBisxdigit_l()\fR all behave
174 172 identically to their counterparts without the '\fB_l\fR' prefix, except
↓ 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