OSDN Git Service

2000-05-10 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / bits / std_cctype.h
1 // -*- C++ -*- forwarding header.
2
3 // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library.  This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 2, or (at your option)
9 // any later version.
10
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING.  If not, write to the Free
18 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19 // USA.
20
21 // As a special exception, you may use this file as part of a free software
22 // library without restriction.  Specifically, if other files instantiate
23 // templates or use macros or inline functions from this file, or you compile
24 // this file and link it with other files to produce an executable, this
25 // file does not by itself cause the resulting executable to be covered by
26 // the GNU General Public License.  This exception does not however
27 // invalidate any other reasons why the executable file might be covered by
28 // the GNU General Public License.
29
30 //
31 // ISO C++ 14882: <ccytpe>
32 //
33
34 #ifndef _CPP_CCTYPE
35 #define _CPP_CCTYPE 1
36
37 // This keeps isanum, et al from being propagated as macros.
38 #if __linux__
39 #define __NO_CTYPE 1
40 #endif
41
42 # include_next <ctype.h>
43
44 // Sequester the C non-inline implementations in the _C_Swamp::
45 // namespace, and provide C++ inlines for them in the std:: namespace
46 // where they belong.
47
48 namespace std 
49 {
50   // NB: If not using namespaces, can't have any of these definitions,
51   // as they will duplicate what's in the global namespace. 
52
53 #ifdef toupper
54   inline int 
55   _S_toupper_helper(int __c) { return toupper(__c); }
56 # undef toupper
57   inline int 
58   toupper(int __c) { return _S_toupper_helper(__c); }
59 #else
60   inline int 
61   toupper(int __c) { return ::toupper(__c); }
62 #endif
63
64 #ifdef tolower
65   inline int 
66   _S_tolower_helper(int __c) { return tolower(__c); }
67 # undef tolower
68   inline int 
69   tolower(int __c) { return _S_tolower_helper(__c); }
70 #else
71   inline int 
72   tolower(int __c) { return ::tolower(__c); }
73 #endif
74
75 #ifdef isspace
76   inline int 
77   _S_isspace_helper(int __c) { return isspace(__c); }
78 # undef isspace
79   inline int 
80   isspace(int __c) { return _S_isspace_helper(__c); }
81 #else
82   inline int 
83   isspace(int __c) { return ::isspace(__c); }
84 #endif
85
86 #ifdef isprint
87   inline int 
88   _S_isprint_helper(int __c) { return isprint(__c); }
89 # undef isprint
90   inline int 
91   isprint(int __c) { return _S_isprint_helper(__c); }
92 #else
93   inline int 
94   isprint(int __c) { return ::isprint(__c); }
95 #endif
96
97 #ifdef iscntrl
98   inline int 
99   _S_iscntrl_helper(int __c) { return iscntrl(__c); }
100 # undef iscntrl
101   inline int 
102   iscntrl(int __c) { return _S_iscntrl_helper(__c); }
103 #else
104   inline int 
105   iscntrl(int __c) { return ::iscntrl(__c); }
106 #endif
107
108 #ifdef isupper
109   inline int 
110   _S_isupper_helper(int __c) { return isupper(__c); }
111 # undef isupper
112   inline int 
113   isupper(int __c) { return _S_isupper_helper(__c); }
114 #else
115   inline int 
116   isupper(int __c) { return ::isupper(__c); }
117 #endif
118
119 #ifdef islower
120   inline int 
121   _S_islower_helper(int __c) { return islower(__c); }
122 # undef islower
123   inline int 
124   islower(int __c) { return _S_islower_helper(__c); }
125 #else
126   inline int 
127   islower(int __c) { return ::islower(__c); }
128 #endif
129
130 #ifdef isalpha
131   inline int 
132   _S_isalpha_helper(int __c) { return isalpha(__c); }
133 # undef isalpha
134   inline int 
135   isalpha(int __c) { return _S_isalpha_helper(__c); }
136 #else
137   inline int 
138   isalpha(int __c) { return ::isalpha(__c); }
139 #endif
140
141 #ifdef isdigit
142   inline int 
143   _S_isdigit_helper(int __c) { return isdigit(__c); }
144 # undef isdigit
145   inline int 
146   isdigit(int __c) { return _S_isdigit_helper(__c); }
147 #else
148   inline int 
149   isdigit(int __c) { return ::isdigit(__c); }
150 #endif
151
152 #ifdef ispunct
153   inline int 
154   _S_ispunct_helper(int __c) { return ispunct(__c); }
155 # undef ispunct
156   inline int 
157   ispunct(int __c) { return _S_ispunct_helper(__c); }
158 #else
159   inline int 
160   ispunct(int __c) { return ::ispunct(__c); }
161 #endif
162
163 #ifdef isxdigit
164   inline int 
165   _S_isxdigit_helper(int __c) { return isxdigit(__c); }
166 # undef isxdigit
167   inline int 
168   isxdigit(int __c) { return _S_isxdigit_helper(__c); }
169 #else
170   inline int 
171   isxdigit(int __c) { return ::isxdigit(__c); }
172 #endif
173
174 #ifdef isalnum
175   inline int 
176   _S_isalnum_helper(int __c) { return isalnum(__c); }
177 # undef isalnum
178   inline int 
179   isalnum(int __c) { return _S_isalnum_helper(__c); }
180 #else
181   inline int 
182   isalnum(int __c) { return ::isalnum(__c); }
183 #endif
184
185 #ifdef isgraph
186   inline int 
187   _S_isgraph_helper(int __c) { return isgraph(__c); }
188 # undef isgraph
189   inline int 
190   isgraph(int __c) { return _S_isgraph_helper(__c); }
191 #else
192   inline int 
193   isgraph(int __c) { return ::isgraph(__c); }
194 #endif
195
196 } // namespace std
197
198 #endif // _CPP_CCTYPE
199
200
201
202
203
204
205
206
207
208
209
210