5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25
26 /*
27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30 /*
31 * Copyright 2013 Garrett D'Amore <garrett@damore.org>
32 */
33
34 /*
35 * An application should not include this header directly. Instead it
36 * should be included only through the inclusion of other Sun headers.
37 *
38 * The contents of this header is limited to identifiers specified in the
39 * C Standard. Any new identifiers specified in future amendments to the
40 * C Standard must be placed in this header. If these new identifiers
41 * are required to also be in the C++ Standard "std" namespace, then for
42 * anything other than macro definitions, corresponding "using" directives
43 * must also be added to <ctype.h>.
44 */
45
46 #ifndef _ISO_CTYPE_ISO_H
47 #define _ISO_CTYPE_ISO_H
48
49 #include <sys/feature_tests.h>
50
51 #ifdef __cplusplus
52 extern "C" {
62 #define _X 0x00000080 /* heXadecimal digit */
63
64 #define _ISUPPER _U
65 #define _ISLOWER _L
66 #define _ISDIGIT _N
67 #define _ISSPACE _S
68 #define _ISPUNCT _P
69 #define _ISCNTRL _C
70 #define _ISBLANK _B
71 #define _ISXDIGIT _X
72 #define _ISGRAPH 0x00002000
73 #define _ISALPHA 0x00004000
74 #define _ISPRINT 0x00008000
75 #define _ISALNUM (_ISALPHA | _ISDIGIT)
76
77 extern unsigned char __ctype[];
78 extern unsigned int *__ctype_mask;
79 extern int *__trans_upper;
80 extern int *__trans_lower;
81
82 #if defined(__STDC__)
83
84 #if __cplusplus >= 199711L
85 namespace std {
86 #endif
87
88 /*
89 * These used to be macros, which while more efficient, precludes operation
90 * with thread specific locales. The old macros will still work, but new
91 * code compiles to use functions. This is specifically permitted by the
92 * various standards. Only _tolower and _toupper were required to be
93 * delivered in macro form.
94 */
95 extern int isalnum(int);
96 extern int isalpha(int);
97 extern int iscntrl(int);
98 extern int isdigit(int);
99 extern int isgraph(int);
100 extern int islower(int);
101 extern int isprint(int);
102 extern int ispunct(int);
103 extern int isspace(int);
104 extern int isupper(int);
105 extern int isxdigit(int);
106 #if defined(_XPG6) || defined(_STDC_C99) || !defined(_STRICT_SYMBOLS)
107 extern int isblank(int);
108 #endif
109
110 extern int tolower(int);
111 extern int toupper(int);
112
113 #if __cplusplus >= 199711L
114 } /* end of namespace std */
115 #endif
116
117 #else /* defined(__STDC__) */
118
119 #if !defined(__lint)
120
121 extern int isalpha();
122 extern int isupper();
123 extern int islower();
124 extern int isdigit();
125 extern int isxdigit();
126 extern int isalnum();
127 extern int isspace();
128 extern int ispunct();
129 extern int isprint();
130 extern int isgraph();
131 extern int iscntrl();
132 extern int isblank();
133
134 #endif /* !defined(__lint) */
135
136 #endif /* defined(__STDC__) */
137
138 #ifdef __cplusplus
139 }
140 #endif
141
142 #endif /* _ISO_CTYPE_ISO_H */
|
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25 /*
26 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 *
28 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
30 */
31
32 /*
33 * An application should not include this header directly. Instead it
34 * should be included only through the inclusion of other Sun headers.
35 *
36 * The contents of this header is limited to identifiers specified in the
37 * C Standard. Any new identifiers specified in future amendments to the
38 * C Standard must be placed in this header. If these new identifiers
39 * are required to also be in the C++ Standard "std" namespace, then for
40 * anything other than macro definitions, corresponding "using" directives
41 * must also be added to <ctype.h>.
42 */
43
44 #ifndef _ISO_CTYPE_ISO_H
45 #define _ISO_CTYPE_ISO_H
46
47 #include <sys/feature_tests.h>
48
49 #ifdef __cplusplus
50 extern "C" {
60 #define _X 0x00000080 /* heXadecimal digit */
61
62 #define _ISUPPER _U
63 #define _ISLOWER _L
64 #define _ISDIGIT _N
65 #define _ISSPACE _S
66 #define _ISPUNCT _P
67 #define _ISCNTRL _C
68 #define _ISBLANK _B
69 #define _ISXDIGIT _X
70 #define _ISGRAPH 0x00002000
71 #define _ISALPHA 0x00004000
72 #define _ISPRINT 0x00008000
73 #define _ISALNUM (_ISALPHA | _ISDIGIT)
74
75 extern unsigned char __ctype[];
76 extern unsigned int *__ctype_mask;
77 extern int *__trans_upper;
78 extern int *__trans_lower;
79
80 #if __cplusplus >= 199711L
81 namespace std {
82 #endif
83
84 /*
85 * These used to be macros, which while more efficient, precludes operation
86 * with thread specific locales. The old macros will still work, but new
87 * code compiles to use functions. This is specifically permitted by the
88 * various standards. Only _tolower and _toupper were required to be
89 * delivered in macro form.
90 */
91 extern int isalnum(int);
92 extern int isalpha(int);
93 extern int iscntrl(int);
94 extern int isdigit(int);
95 extern int isgraph(int);
96 extern int islower(int);
97 extern int isprint(int);
98 extern int ispunct(int);
99 extern int isspace(int);
100 extern int isupper(int);
101 extern int isxdigit(int);
102 #if defined(_XPG6) || defined(_STDC_C99) || !defined(_STRICT_SYMBOLS)
103 extern int isblank(int);
104 #endif
105
106 extern int tolower(int);
107 extern int toupper(int);
108
109 #if __cplusplus >= 199711L
110 } /* end of namespace std */
111 #endif
112
113 #ifdef __cplusplus
114 }
115 #endif
116
117 #endif /* _ISO_CTYPE_ISO_H */
|