ctype.h

00001 /*  wcecompat: Windows CE C Runtime Library "compatibility" library.
00002  *
00003  *  Copyright (C) 2001-2002 Essemer Pty Ltd.  All rights reserved.
00004  *  http://www.essemer.com.au/
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Lesser General Public
00008  *  License as published by the Free Software Foundation; either
00009  *  version 2.1 of the License, or (at your option) any later version.
00010  *
00011  *  This library is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *  Lesser General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Lesser General Public
00017  *  License along with this library; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 
00022 #ifndef __wcecompat__CTYPE_H__
00023 #define __wcecompat__CTYPE_H__
00024 
00025 #include "stddef.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 extern _CRTIMP const unsigned short  _ctype[];
00032 extern _CRTIMP const unsigned short *_pctype;
00033 extern _CRTIMP const wctype_t *_pwctype;
00034 
00035 #define _UPPER      0x1    /* upper case letter */
00036 #define _LOWER      0x2    /* lower case letter */
00037 #define _DIGIT      0x4    /* digit[0-9] */
00038 #define _SPACE      0x8    /* tab, carriage return, newline, */
00039 #define _PUNCT      0x10    /* punctuation character */
00040 #define _CONTROL    0x20    /* control character */
00041 #define _BLANK      0x40    /* space char */
00042 #define _HEX        0x80    /* hexadecimal digit */
00043 #define _ALPHA      (0x0100|_UPPER|_LOWER)    /* alphabetic character */
00044 
00045 // character classification function prototypes
00046 #ifdef _WIN32_WCE_EMULATION
00047 _CRTIMP int     __cdecl iswctype(wint_t, wctype_t);
00048 _CRTIMP wchar_t __cdecl towupper(wchar_t);
00049 _CRTIMP wchar_t __cdecl towlower(wchar_t);
00050 #else
00051 _CRTIMP int     iswctype(wint_t, wctype_t);
00052 _CRTIMP wchar_t towupper(wchar_t);
00053 _CRTIMP wchar_t towlower(wchar_t);
00054 #endif
00055 
00056 // the character classification macro definitions
00057 _CRTIMP int __cdecl        _isctype(int, int);
00058 #define isalpha(_c)      ( _isctype(_c,_ALPHA) )
00059 #define isupper(_c)      ( _isctype(_c,_UPPER) )
00060 #define islower(_c)      ( _isctype(_c,_LOWER) )
00061 #define isdigit(_c)      ( _isctype(_c,_DIGIT) )
00062 #define isxdigit(_c)     ( _isctype(_c,_HEX) )
00063 #define isspace(_c)      ( _isctype(_c,_SPACE) )
00064 #define ispunct(_c)      ( _isctype(_c,_PUNCT) )
00065 #define isalnum(_c)      ( _isctype(_c,_ALPHA|_DIGIT) )
00066 #define isprint(_c)      ( _isctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) )
00067 #define isgraph(_c)      ( _isctype(_c,_PUNCT|_ALPHA|_DIGIT) )
00068 #define iscntrl(_c)      ( _isctype(_c,_CONTROL) )
00069 #define __isascii(_c)    ((unsigned)(_c) < 0x80)
00070 #define isascii          __isascii
00071 
00072 #define iswalpha(_c)     ( iswctype(_c,_ALPHA) )
00073 #define iswupper(_c)     ( iswctype(_c,_UPPER) )
00074 #define iswlower(_c)     ( iswctype(_c,_LOWER) )
00075 #define iswdigit(_c)     ( iswctype(_c,_DIGIT) )
00076 #define iswxdigit(_c)    ( iswctype(_c,_HEX) )
00077 #define iswspace(_c)     ( iswctype(_c,_SPACE) )
00078 #define iswpunct(_c)     ( iswctype(_c,_PUNCT) )
00079 #define iswalnum(_c)     ( iswctype(_c,_ALPHA|_DIGIT) )
00080 #define iswprint(_c)     ( iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) )
00081 #define iswgraph(_c)     ( iswctype(_c,_PUNCT|_ALPHA|_DIGIT) )
00082 #define iswcntrl(_c)     ( iswctype(_c,_CONTROL) )
00083 #define iswascii(_c)     ( (unsigned)(_c) < 0x80 )
00084 #define isleadbyte(_c)   ( IsDBCSLeadByte(_c))
00085 
00086 #ifdef __cplusplus
00087 }
00088 #endif
00089 
00090 #endif /* __wcecompat__CTYPE_H__ */

Generated on Mon Jun 5 10:20:45 2006 for Intelligence.kdevelop by  doxygen 1.4.6