]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* |
2 | * | |
3 | * Copyright (c) 1998-2002 | |
4 | * John Maddock | |
5 | * | |
6 | * Use, modification and distribution are subject to the | |
7 | * Boost Software License, Version 1.0. (See accompanying file | |
8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
9 | * | |
10 | */ | |
11 | ||
12 | /* | |
13 | * LOCATION: see http://www.boost.org for most recent version. | |
14 | * FILE boost/regex/config/cwchar.hpp | |
15 | * VERSION see <boost/version.hpp> | |
16 | * DESCRIPTION: regex wide character string fixes. | |
17 | */ | |
18 | ||
19 | #ifndef BOOST_REGEX_CONFIG_CWCHAR_HPP | |
20 | #define BOOST_REGEX_CONFIG_CWCHAR_HPP | |
21 | ||
22 | #include <cwchar> | |
23 | #include <cwctype> | |
24 | #include <boost/config.hpp> | |
25 | ||
26 | #if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) | |
27 | // apparently this is required for the RW STL on Linux: | |
28 | #undef iswalnum | |
29 | #undef iswalpha | |
30 | #undef iswblank | |
31 | #undef iswcntrl | |
32 | #undef iswdigit | |
33 | #undef iswgraph | |
34 | #undef iswlower | |
35 | #undef iswprint | |
36 | #undef iswprint | |
37 | #undef iswpunct | |
38 | #undef iswspace | |
39 | #undef iswupper | |
40 | #undef iswxdigit | |
41 | #undef iswctype | |
42 | #undef towlower | |
43 | #undef towupper | |
44 | #undef towctrans | |
45 | #undef wctrans | |
46 | #undef wctype | |
47 | #endif | |
48 | ||
49 | namespace std{ | |
50 | ||
51 | #ifndef BOOST_NO_STDC_NAMESPACE | |
52 | extern "C"{ | |
53 | #endif | |
54 | ||
55 | #ifdef iswalnum | |
56 | inline int (iswalnum)(wint_t i) | |
57 | { return iswalnum(i); } | |
58 | #undef iswalnum | |
59 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
60 | using ::iswalnum; | |
61 | #endif | |
62 | ||
63 | #ifdef iswalpha | |
64 | inline int (iswalpha)(wint_t i) | |
65 | { return iswalpha(i); } | |
66 | #undef iswalpha | |
67 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
68 | using ::iswalpha; | |
69 | #endif | |
70 | ||
71 | #ifdef iswcntrl | |
72 | inline int (iswcntrl)(wint_t i) | |
73 | { return iswcntrl(i); } | |
74 | #undef iswcntrl | |
75 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
76 | using ::iswcntrl; | |
77 | #endif | |
78 | ||
79 | #ifdef iswdigit | |
80 | inline int (iswdigit)(wint_t i) | |
81 | { return iswdigit(i); } | |
82 | #undef iswdigit | |
83 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
84 | using ::iswdigit; | |
85 | #endif | |
86 | ||
87 | #ifdef iswgraph | |
88 | inline int (iswgraph)(wint_t i) | |
89 | { return iswgraph(i); } | |
90 | #undef iswgraph | |
91 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
92 | using ::iswgraph; | |
93 | #endif | |
94 | ||
95 | #ifdef iswlower | |
96 | inline int (iswlower)(wint_t i) | |
97 | { return iswlower(i); } | |
98 | #undef iswlower | |
99 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
100 | using ::iswlower; | |
101 | #endif | |
102 | ||
103 | #ifdef iswprint | |
104 | inline int (iswprint)(wint_t i) | |
105 | { return iswprint(i); } | |
106 | #undef iswprint | |
107 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
108 | using ::iswprint; | |
109 | #endif | |
110 | ||
111 | #ifdef iswpunct | |
112 | inline int (iswpunct)(wint_t i) | |
113 | { return iswpunct(i); } | |
114 | #undef iswpunct | |
115 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
116 | using ::iswpunct; | |
117 | #endif | |
118 | ||
119 | #ifdef iswspace | |
120 | inline int (iswspace)(wint_t i) | |
121 | { return iswspace(i); } | |
122 | #undef iswspace | |
123 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
124 | using ::iswspace; | |
125 | #endif | |
126 | ||
127 | #ifdef iswupper | |
128 | inline int (iswupper)(wint_t i) | |
129 | { return iswupper(i); } | |
130 | #undef iswupper | |
131 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
132 | using ::iswupper; | |
133 | #endif | |
134 | ||
135 | #ifdef iswxdigit | |
136 | inline int (iswxdigit)(wint_t i) | |
137 | { return iswxdigit(i); } | |
138 | #undef iswxdigit | |
139 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
140 | using ::iswxdigit; | |
141 | #endif | |
142 | ||
143 | #ifdef towlower | |
144 | inline wint_t (towlower)(wint_t i) | |
145 | { return towlower(i); } | |
146 | #undef towlower | |
147 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
148 | using ::towlower; | |
149 | #endif | |
150 | ||
151 | #ifdef towupper | |
152 | inline wint_t (towupper)(wint_t i) | |
153 | { return towupper(i); } | |
154 | #undef towupper | |
155 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
156 | using :: towupper; | |
157 | #endif | |
158 | ||
159 | #ifdef wcscmp | |
160 | inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2) | |
161 | { return wcscmp(p1,p2); } | |
162 | #undef wcscmp | |
163 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
164 | using ::wcscmp; | |
165 | #endif | |
166 | ||
167 | #ifdef wcscoll | |
168 | inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2) | |
169 | { return wcscoll(p1,p2); } | |
170 | #undef wcscoll | |
171 | #elif defined(BOOST_NO_STDC_NAMESPACE) && !defined(UNDER_CE) | |
172 | using ::wcscoll; | |
173 | #endif | |
174 | ||
175 | #ifdef wcscpy | |
176 | inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2) | |
177 | { return wcscpy(p1,p2); } | |
178 | #undef wcscpy | |
179 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
180 | using ::wcscpy; | |
181 | #endif | |
182 | ||
183 | #ifdef wcslen | |
184 | inline size_t (wcslen)(const wchar_t *p) | |
185 | { return wcslen(p); } | |
186 | #undef wcslen | |
187 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
188 | using ::wcslen; | |
189 | #endif | |
190 | ||
191 | #ifdef wcsxfrm | |
192 | size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s) | |
193 | { return wcsxfrm(p1,p2,s); } | |
194 | #undef wcsxfrm | |
195 | #elif defined(BOOST_NO_STDC_NAMESPACE) | |
196 | using ::wcsxfrm; | |
197 | #endif | |
198 | ||
199 | ||
200 | #ifndef BOOST_NO_STDC_NAMESPACE | |
201 | } // extern "C" | |
202 | #endif | |
203 | ||
204 | } // namespace std | |
205 | ||
206 | #endif | |
207 |