5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
8 * Permission to use or copy this software for any purpose is hereby granted
9 * without fee, provided the above notices are retained on all copies.
10 * Permission to modify the code and to distribute modified code is granted,
11 * provided the above notices are retained, and a notice that the code was
12 * modified is included with the above copyright notice.
18 /* Workaround for a "misbehaviour" when compiling resource scripts using
19 * eMbedded Visual C++. The standard .rc file includes windows header files,
20 * which in turn include ctype.h, which results in warnings and errors
22 #if !defined(RC_INVOKED)
24 # if !defined (_STLP_OUTERMOST_HEADER_ID)
25 # define _STLP_OUTERMOST_HEADER_ID 0x219
26 # include <stl/_prolog.h>
27 # elif (_STLP_OUTERMOST_HEADER_ID == 0x219)
28 # define _STLP_DONT_POP_HEADER_ID
29 # define _STLP_CTYPE_H
32 # if defined(_STLP_WCE_EVC3)
36 # if defined (_STLP_HAS_INCLUDE_NEXT)
37 # include_next <ctype.h>
39 # include _STLP_NATIVE_C_HEADER(ctype.h)
42 /* on evc4 including ctype.h also defines setjmp macro */
43 # if defined (_STLP_WCE)
44 # define _STLP_NATIVE_SETJMP_H_INCLUDED
47 # ifndef _STLP_CTYPE_H_SEEN
48 # define _STLP_CTYPE_H_SEEN
50 /* Undef convenience interfaces */
65 # if defined (UNDER_CE)
67 # if (_WIN32_WCE < 300) /* Only wide chars for older versions */
68 # define _isctype iswctype
71 __inline
int (isalpha
)(int c
) { return _isctype(c
, _ALPHA
); }
72 __inline
int (isupper
)(int c
) { return _isctype(c
, _UPPER
); }
73 __inline
int (islower
)(int c
) { return _isctype(c
, _LOWER
); }
74 __inline
int (isdigit
)(int c
) { return _isctype(c
, _DIGIT
); }
75 __inline
int (isxdigit
)(int c
) { return _isctype(c
, _HEX
); }
76 __inline
int (isspace
)(int c
) { return _isctype(c
, _SPACE
); }
77 __inline
int (ispunct
)(int c
) { return _isctype(c
, _PUNCT
); }
78 __inline
int (isalnum
)(int c
) { return _isctype(c
, _ALPHA
|_DIGIT
); }
79 __inline
int (isprint
)(int c
) { return _isctype(c
, _BLANK
|_PUNCT
|_ALPHA
|_DIGIT
); }
80 __inline
int (isgraph
)(int c
) { return _isctype(c
, _PUNCT
|_ALPHA
|_DIGIT
); }
81 __inline
int (iscntrl
)(int c
) { return _isctype(c
, _CONTROL
); }
82 __inline
int (isascii
)(int c
) { return ((unsigned)(c
) < 0x80); }
86 __inline
int (iswalpha
)(int c
) { return iswctype((unsigned short)(c
), _ALPHA
); }
87 __inline
int (iswupper
)(int c
) { return iswctype((unsigned short)(c
), _UPPER
); }
88 __inline
int (iswlower
)(int c
) { return iswctype((unsigned short)(c
), _LOWER
); }
89 __inline
int (iswdigit
)(int c
) { return iswctype((unsigned short)(c
), _DIGIT
); }
90 __inline
int (iswxdigit
)(int c
) { return iswctype((unsigned short)(c
), _HEX
); }
91 __inline
int (iswspace
)(int c
) { return iswctype((unsigned short)(c
), _SPACE
); }
92 __inline
int (iswpunct
)(int c
) { return iswctype((unsigned short)(c
), _PUNCT
); }
93 __inline
int (iswalnum
)(int c
) { return iswctype((unsigned short)(c
), _ALPHA
|_DIGIT
); }
94 __inline
int (iswprint
)(int c
) { return iswctype((unsigned short)(c
), _BLANK
|_PUNCT
|_ALPHA
|_DIGIT
); }
95 __inline
int (iswgraph
)(int c
) { return iswctype((unsigned short)(c
), _PUNCT
|_ALPHA
|_DIGIT
); }
96 __inline
int (iswcntrl
)(int c
) { return iswctype((unsigned short)(c
), _CONTROL
); }
97 __inline
int (iswascii
)(int c
) { return ((unsigned)(c
) < 0x80); }
99 # endif /* UNDER_CE */
101 # endif /* _STLP_CTYPE_H_SEEN */
103 # if (_STLP_OUTERMOST_HEADER_ID == 0x219)
104 # if ! defined (_STLP_DONT_POP_HEADER_ID)
105 # include <stl/_epilog.h>
106 # undef _STLP_OUTERMOST_HEADER_ID
108 # undef _STLP_DONT_POP_HEADER_ID
112 #endif /* RC_INVOKED */
114 #endif /* _STLP_CTYPE_H */