/* * ctype.h * * Functions for testing character types and converting characters. * * This file is part of the Mingw32 package. * * Contributors: * Created by Colin Peters * * THIS SOFTWARE IS NOT COPYRIGHTED * * This source code is offered for use in the public domain. You may * use, modify or distribute it freely. * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY * DISCLAMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * $Revision$ * $Author$ * $Date$ * */ #ifndef _CTYPE_H_ #define _CTYPE_H_ /* All the headers include this file. */ #include <_mingw.h> #define __need_wchar_t #define __need_wint_t #ifndef RC_INVOKED #include #endif /* Not RC_INVOKED */ /* * The following flags are used to tell iswctype and _isctype what character * types you are looking for. */ #define _UPPER 0x0001 #define _LOWER 0x0002 #define _DIGIT 0x0004 #define _SPACE 0x0008 #define _PUNCT 0x0010 #define _CONTROL 0x0020 #define _BLANK 0x0040 #define _HEX 0x0080 #define _LEADBYTE 0x8000 #define _ALPHA 0x0103 #ifndef RC_INVOKED #ifdef __cplusplus extern "C" { #endif int isalnum(int); int isalpha(int); int iscntrl(int); int isdigit(int); int isgraph(int); int islower(int); int isprint(int); int ispunct(int); int isspace(int); int isupper(int); int isxdigit(int); #ifndef __STRICT_ANSI__ int _isctype (int, int); #endif int tolower(int); int toupper(int); /* * NOTE: The above are not old name type wrappers, but functions exported * explicitly by CRTDLL. However, underscored versions are also exported. */ #ifndef __STRICT_ANSI__ int _tolower(int); int _toupper(int); #endif #ifndef WEOF #define WEOF (wchar_t)(0xFFFF) #endif /* Also defined in stdlib.h */ #ifndef MB_CUR_MAX # ifdef __MSVCRT__ # define MB_CUR_MAX __mb_cur_max __MINGW_IMPORT int __mb_cur_max; # else /* not __MSVCRT */ # define MB_CUR_MAX __mb_cur_max_dll __MINGW_IMPORT int __mb_cur_max_dll; # endif /* not __MSVCRT */ #endif /* MB_CUR_MAX */ #ifndef _WCTYPE_T_DEFINED typedef wchar_t wctype_t; #define _WCTYPE_T_DEFINED #endif /* Wide character equivalents */ int iswalnum(wint_t); int iswalpha(wint_t); int iswascii(wint_t); int iswcntrl(wint_t); int iswctype(wint_t, wctype_t); int is_wctype(wint_t, wctype_t); /* Obsolete! */ int iswdigit(wint_t); int iswgraph(wint_t); int iswlower(wint_t); int iswprint(wint_t); int iswpunct(wint_t); int iswspace(wint_t); int iswupper(wint_t); int iswxdigit(wint_t); wchar_t towlower(wchar_t); wchar_t towupper(wchar_t); int isleadbyte (int); #ifndef __STRICT_ANSI__ int __isascii (int); int __toascii (int); int __iscsymf (int); /* Valid first character in C symbol */ int __iscsym (int); /* Valid character in C symbol (after first) */ #ifndef _NO_OLDNAMES int isascii (int); int toascii (int); int iscsymf (int); int iscsym (int); #endif /* Not _NO_OLDNAMES */ #endif /* Not __STRICT_ANSI__ */ #ifdef __cplusplus } #endif #endif /* Not RC_INVOKED */ #endif /* Not _CTYPE_H_ */