45f6356993baaf551ec089ab6a3fa71838e7fdf3
4 * Functions for testing character types and converting characters.
6 * This file is part of the Mingw32 package.
9 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 * $Date: 2002/09/08 10:22:30 $
30 #define __need_wchar_t
32 #include <msvcrt/stddef.h>
36 * The following flags are used to tell iswctype and _isctype what character
37 * types you are looking for.
44 #define _CONTROL 0x0020
49 #define _LEADBYTE 0x8000
68 #ifndef __STRICT_ANSI__
69 int _isctype (unsigned int c
, int ctypeFlags
);
76 * NOTE: The above are not old name type wrappers, but functions exported
77 * explicitly by MSVCRT. However, underscored versions are also exported.
79 #ifndef __STRICT_ANSI__
85 #define WEOF (wchar_t)(0xFFFF)
89 * TODO: MB_CUR_MAX should be defined here (if not already defined, since
90 * it should also be defined in stdlib.h). It is supposed to be the
91 * maximum number of bytes in a multi-byte character in the current
92 * locale. Perhaps accessible through the __mb_curr_max_dll entry point,
93 * but I think (again) that that is a variable pointer, which leads to
94 * problems under the current Cygwin compiler distribution.
99 /* Wide character equivalents */
100 int iswalnum(wint_t wc
);
101 int iswalpha(wint_t wc
);
102 int iswascii(wint_t wc
);
103 int iswcntrl(wint_t wc
);
104 int iswctype(wint_t wc
, wctype_t wctypeFlags
);
105 int is_wctype(wint_t wc
, wctype_t wctypeFlags
); /* Obsolete! */
106 int iswdigit(wint_t wc
);
107 int iswgraph(wint_t wc
);
108 int iswlower(wint_t wc
);
109 int iswprint(wint_t wc
);
110 int iswpunct(wint_t wc
);
111 int iswspace(wint_t wc
);
112 int iswupper(wint_t wc
);
113 int iswxdigit(wint_t wc
);
115 wchar_t towlower(wchar_t c
);
116 wchar_t towupper(wchar_t c
);
118 int isleadbyte (int c
);
120 #ifndef __STRICT_ANSI__
121 int __isascii (int c
);
122 int __toascii (int c
);
123 int __iscsymf (int c
); /* Valid first character in C symbol */
124 int __iscsym (int c
); /* Valid character in C symbol (after first) */
127 #define isascii(c) __isascii(c)
128 #define toascii(c) _toascii(c)
129 #define iscsymf(c) __iscsymf(c)
130 #define iscsym(c) __iscsym(c)
131 #endif /* Not _NO_OLDNAMES */
133 #endif /* Not __STRICT_ANSI__ */
139 #endif /* Not _CTYPE_H_ */