10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /* wctype.h 1.13 89/11/02 SMI; JLE */
23 /* from AT&T JAE 2.1 */
24 /* definitions for international functions */
25
26 /*
27 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30
31 /*
32 * An application should not include this header directly. Instead it
33 * should be included only through the inclusion of other Sun headers.
34 *
35 * The contents of this header is limited to identifiers specified in the
36 * C Standard. Any new identifiers specified in future amendments to the
37 * C Standard must be placed in this header. If these new identifiers
38 * are required to also be in the C++ Standard "std" namespace, then for
39 * anything other than macro definitions, corresponding "using" directives
40 * must also be added to <wctype.h>.
41 */
42
43 #ifndef _ISO_WCTYPE_ISO_H
44 #define _ISO_WCTYPE_ISO_H
45
46 #pragma ident "%Z%%M% %I% %E% SMI"
47
48 #include <sys/feature_tests.h>
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 #if __cplusplus >= 199711L
55 namespace std {
56 #endif
57
58 #if !defined(_WINT_T) || __cplusplus >= 199711L
59 #define _WINT_T
60 #if defined(_LP64)
61 typedef int wint_t;
62 #else
63 typedef long wint_t;
64 #endif
65 #endif /* !defined(_WINT_T) || __cplusplus >= 199711L */
66
67 #if !defined(_WCTYPE_T) || __cplusplus >= 199711L
77 #if __cplusplus >= 199711L
78 #define WEOF ((std::wint_t)(-1))
79 #else
80 #define WEOF ((wint_t)(-1))
81 #endif
82 #endif /* WEOF */
83 #endif /* not XPG4 and not XPG4v2 */
84
85 #ifdef __STDC__
86 extern int iswalnum(wint_t);
87 extern int iswalpha(wint_t);
88 extern int iswcntrl(wint_t);
89 extern int iswdigit(wint_t);
90 extern int iswgraph(wint_t);
91 extern int iswlower(wint_t);
92 extern int iswprint(wint_t);
93 extern int iswpunct(wint_t);
94 extern int iswspace(wint_t);
95 extern int iswupper(wint_t);
96 extern int iswxdigit(wint_t);
97 /* tow* also become functions */
98 extern wint_t towlower(wint_t);
99 extern wint_t towupper(wint_t);
100 extern wctrans_t wctrans(const char *);
101 extern wint_t towctrans(wint_t, wctrans_t);
102 extern int iswctype(wint_t, wctype_t);
103 extern wctype_t wctype(const char *);
104 #else
105 extern int iswalnum();
106 extern int iswalpha();
107 extern int iswcntrl();
108 extern int iswdigit();
109 extern int iswgraph();
110 extern int iswlower();
111 extern int iswprint();
112 extern int iswpunct();
113 extern int iswspace();
114 extern int iswupper();
115 extern int iswxdigit();
116 /* tow* also become functions */
117 extern wint_t towlower();
118 extern wint_t towupper();
119 extern wctrans_t wctrans();
120 extern wint_t towctrans();
121 extern int iswctype();
122 extern wctype_t wctype();
123 #endif
124
125 /* bit definition for character class */
126
127 #define _E1 0x00000100 /* phonogram (international use) */
128 #define _E2 0x00000200 /* ideogram (international use) */
129 #define _E3 0x00000400 /* English (international use) */
130 #define _E4 0x00000800 /* number (international use) */
131 #define _E5 0x00001000 /* special (international use) */
132 #define _E6 0x00002000 /* other characters (international use) */
133 #define _E7 0x00004000 /* reserved (international use) */
134 #define _E8 0x00008000 /* reserved (international use) */
135
136 #define _E9 0x00010000
137 #define _E10 0x00020000
138 #define _E11 0x00040000
139 #define _E12 0x00080000
140 #define _E13 0x00100000
141 #define _E14 0x00200000
142 #define _E15 0x00400000
143 #define _E16 0x00800000
|
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /* wctype.h 1.13 89/11/02 SMI; JLE */
23 /* from AT&T JAE 2.1 */
24 /* definitions for international functions */
25
26 /*
27 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30 /*
31 * Copyright 2014 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 <wctype.h>.
44 */
45
46 #ifndef _ISO_WCTYPE_ISO_H
47 #define _ISO_WCTYPE_ISO_H
48
49 #include <sys/feature_tests.h>
50
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54
55 #if __cplusplus >= 199711L
56 namespace std {
57 #endif
58
59 #if !defined(_WINT_T) || __cplusplus >= 199711L
60 #define _WINT_T
61 #if defined(_LP64)
62 typedef int wint_t;
63 #else
64 typedef long wint_t;
65 #endif
66 #endif /* !defined(_WINT_T) || __cplusplus >= 199711L */
67
68 #if !defined(_WCTYPE_T) || __cplusplus >= 199711L
78 #if __cplusplus >= 199711L
79 #define WEOF ((std::wint_t)(-1))
80 #else
81 #define WEOF ((wint_t)(-1))
82 #endif
83 #endif /* WEOF */
84 #endif /* not XPG4 and not XPG4v2 */
85
86 #ifdef __STDC__
87 extern int iswalnum(wint_t);
88 extern int iswalpha(wint_t);
89 extern int iswcntrl(wint_t);
90 extern int iswdigit(wint_t);
91 extern int iswgraph(wint_t);
92 extern int iswlower(wint_t);
93 extern int iswprint(wint_t);
94 extern int iswpunct(wint_t);
95 extern int iswspace(wint_t);
96 extern int iswupper(wint_t);
97 extern int iswxdigit(wint_t);
98
99 #if (__cplusplus >= 201103L) || defined(_STDC_C99) || defined(_XPG6) || \
100 !defined(_STRICT_SYMBOLS)
101 extern int iswblank(wint_t);
102 #endif
103
104 /* tow* also become functions */
105 extern wint_t towlower(wint_t);
106 extern wint_t towupper(wint_t);
107 extern wctrans_t wctrans(const char *);
108 extern wint_t towctrans(wint_t, wctrans_t);
109 extern int iswctype(wint_t, wctype_t);
110 extern wctype_t wctype(const char *);
111 #else /* __STDC__ */
112 extern int iswalnum();
113 extern int iswalpha();
114 extern int iswcntrl();
115 extern int iswdigit();
116 extern int iswgraph();
117 extern int iswlower();
118 extern int iswprint();
119 extern int iswpunct();
120 extern int iswspace();
121 extern int iswupper();
122 extern int iswxdigit();
123 /* tow* also become functions */
124 extern wint_t towlower();
125 extern wint_t towupper();
126 extern wctrans_t wctrans();
127 extern wint_t towctrans();
128 extern int iswctype();
129 extern wctype_t wctype();
130 #if defined(_XPG6) || !defined(_STRICT_SYMBOLS)
131 extern int iswblank();
132 #endif
133 #endif /* __STDC__ */
134
135 /* bit definition for character class */
136
137 #define _E1 0x00000100 /* phonogram (international use) */
138 #define _E2 0x00000200 /* ideogram (international use) */
139 #define _E3 0x00000400 /* English (international use) */
140 #define _E4 0x00000800 /* number (international use) */
141 #define _E5 0x00001000 /* special (international use) */
142 #define _E6 0x00002000 /* other characters (international use) */
143 #define _E7 0x00004000 /* reserved (international use) */
144 #define _E8 0x00008000 /* reserved (international use) */
145
146 #define _E9 0x00010000
147 #define _E10 0x00020000
148 #define _E11 0x00040000
149 #define _E12 0x00080000
150 #define _E13 0x00100000
151 #define _E14 0x00200000
152 #define _E15 0x00400000
153 #define _E16 0x00800000
|