Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: TBD
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/iso/wctype_iso.h
+++ new/usr/src/head/iso/wctype_iso.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
20 20 */
21 21
22 22 /* wctype.h 1.13 89/11/02 SMI; JLE */
23 23 /* from AT&T JAE 2.1 */
24 24 /* definitions for international functions */
25 25
26 26 /*
27 27 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
28 28 * Use is subject to license terms.
29 29 */
30 +/*
31 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32 + */
30 33
31 34 /*
32 35 * An application should not include this header directly. Instead it
33 36 * should be included only through the inclusion of other Sun headers.
34 37 *
35 38 * The contents of this header is limited to identifiers specified in the
36 39 * C Standard. Any new identifiers specified in future amendments to the
37 40 * C Standard must be placed in this header. If these new identifiers
38 41 * are required to also be in the C++ Standard "std" namespace, then for
39 42 * anything other than macro definitions, corresponding "using" directives
40 43 * must also be added to <wctype.h>.
41 44 */
42 45
43 46 #ifndef _ISO_WCTYPE_ISO_H
44 47 #define _ISO_WCTYPE_ISO_H
45 48
46 -#pragma ident "%Z%%M% %I% %E% SMI"
47 -
48 49 #include <sys/feature_tests.h>
49 50
50 51 #ifdef __cplusplus
51 52 extern "C" {
52 53 #endif
53 54
54 55 #if __cplusplus >= 199711L
55 56 namespace std {
56 57 #endif
57 58
58 59 #if !defined(_WINT_T) || __cplusplus >= 199711L
59 60 #define _WINT_T
60 61 #if defined(_LP64)
61 62 typedef int wint_t;
62 63 #else
63 64 typedef long wint_t;
64 65 #endif
65 66 #endif /* !defined(_WINT_T) || __cplusplus >= 199711L */
66 67
67 68 #if !defined(_WCTYPE_T) || __cplusplus >= 199711L
68 69 #define _WCTYPE_T
69 70 typedef int wctype_t;
70 71 #endif
71 72
72 73 typedef unsigned int wctrans_t;
73 74
74 75 /* not XPG4 and not XPG4v2 */
75 76 #if !defined(_XPG4) || defined(_XPG5)
76 77 #ifndef WEOF
77 78 #if __cplusplus >= 199711L
78 79 #define WEOF ((std::wint_t)(-1))
79 80 #else
80 81 #define WEOF ((wint_t)(-1))
81 82 #endif
82 83 #endif /* WEOF */
83 84 #endif /* not XPG4 and not XPG4v2 */
84 85
85 86 #ifdef __STDC__
86 87 extern int iswalnum(wint_t);
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
87 88 extern int iswalpha(wint_t);
88 89 extern int iswcntrl(wint_t);
89 90 extern int iswdigit(wint_t);
90 91 extern int iswgraph(wint_t);
91 92 extern int iswlower(wint_t);
92 93 extern int iswprint(wint_t);
93 94 extern int iswpunct(wint_t);
94 95 extern int iswspace(wint_t);
95 96 extern int iswupper(wint_t);
96 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 +
97 104 /* tow* also become functions */
98 105 extern wint_t towlower(wint_t);
99 106 extern wint_t towupper(wint_t);
100 107 extern wctrans_t wctrans(const char *);
101 108 extern wint_t towctrans(wint_t, wctrans_t);
102 109 extern int iswctype(wint_t, wctype_t);
103 110 extern wctype_t wctype(const char *);
104 -#else
111 +#else /* __STDC__ */
105 112 extern int iswalnum();
106 113 extern int iswalpha();
107 114 extern int iswcntrl();
108 115 extern int iswdigit();
109 116 extern int iswgraph();
110 117 extern int iswlower();
111 118 extern int iswprint();
112 119 extern int iswpunct();
113 120 extern int iswspace();
114 121 extern int iswupper();
115 122 extern int iswxdigit();
116 123 /* tow* also become functions */
117 124 extern wint_t towlower();
118 125 extern wint_t towupper();
119 126 extern wctrans_t wctrans();
120 127 extern wint_t towctrans();
121 128 extern int iswctype();
122 129 extern wctype_t wctype();
130 +#if defined(_XPG6) || !defined(_STRICT_SYMBOLS)
131 +extern int iswblank();
123 132 #endif
133 +#endif /* __STDC__ */
124 134
125 135 /* bit definition for character class */
126 136
127 137 #define _E1 0x00000100 /* phonogram (international use) */
128 138 #define _E2 0x00000200 /* ideogram (international use) */
129 139 #define _E3 0x00000400 /* English (international use) */
130 140 #define _E4 0x00000800 /* number (international use) */
131 141 #define _E5 0x00001000 /* special (international use) */
132 142 #define _E6 0x00002000 /* other characters (international use) */
133 143 #define _E7 0x00004000 /* reserved (international use) */
134 144 #define _E8 0x00008000 /* reserved (international use) */
135 145
136 146 #define _E9 0x00010000
137 147 #define _E10 0x00020000
138 148 #define _E11 0x00040000
139 149 #define _E12 0x00080000
140 150 #define _E13 0x00100000
141 151 #define _E14 0x00200000
142 152 #define _E15 0x00400000
143 153 #define _E16 0x00800000
144 154 #define _E17 0x01000000
145 155 #define _E18 0x02000000
146 156 #define _E19 0x04000000
147 157 #define _E20 0x08000000
148 158 #define _E21 0x10000000
149 159 #define _E22 0x20000000
150 160 #define _E23 0x40000000
151 161 #define _E24 0x80000000
152 162
153 163 #if __cplusplus >= 199711L
154 164 }
155 165 #endif /* end of namespace std */
156 166
157 167 #ifdef __cplusplus
158 168 }
159 169 #endif
160 170
161 171 #endif /* _ISO_WCTYPE_ISO_H */
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX