wctype.h 2.34 KB
Newer Older
1 2 3 4
/*
 * Unicode definitions
 *
 * Copyright 2000 Francois Gouget.
5 6 7 8 9 10 11 12 13 14 15 16 17 18
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 20 21
 */
#ifndef __WINE_WCTYPE_H
#define __WINE_WCTYPE_H
22
#ifndef __WINE_USE_MSVCRT
23
#define __WINE_USE_MSVCRT
24
#endif
25

26 27
#ifndef _WCHAR_T_DEFINED
#define _WCHAR_T_DEFINED
28
#ifndef __cplusplus
29
typedef unsigned short wchar_t;
30
#endif
31 32 33
#endif

/* ASCII char classification table - binary compatible */
34 35 36 37 38 39 40 41
#define _UPPER        0x0001  /* C1_UPPER */
#define _LOWER        0x0002  /* C1_LOWER */
#define _DIGIT        0x0004  /* C1_DIGIT */
#define _SPACE        0x0008  /* C1_SPACE */
#define _PUNCT        0x0010  /* C1_PUNCT */
#define _CONTROL      0x0020  /* C1_CNTRL */
#define _BLANK        0x0040  /* C1_BLANK */
#define _HEX          0x0080  /* C1_XDIGIT */
42
#define _LEADBYTE     0x8000
43
#define _ALPHA       (0x0100|_UPPER|_LOWER)  /* (C1_ALPHA|_UPPER|_LOWER) */
44

45 46 47
#ifndef WEOF
#define WEOF        (wint_t)(0xFFFF)
#endif
48

49
#ifndef _WCTYPE_T_DEFINED
50 51
typedef unsigned short  wint_t;
typedef unsigned short  wctype_t;
52
#define _WCTYPE_T_DEFINED
53
#endif
54 55 56 57 58 59 60 61

/* FIXME: there's something to do with __p__pctype and __p__pwctype */


#ifdef __cplusplus
extern "C" {
#endif

62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
#ifndef _WCTYPE_DEFINED
#define _WCTYPE_DEFINED
int is_wctype(wint_t,wctype_t);
int isleadbyte(int);
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswascii(wint_t);
int iswcntrl(wint_t);
int iswctype(wint_t,wctype_t);
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);
#endif /* _WCTYPE_DEFINED */
82 83 84 85 86 87

#ifdef __cplusplus
}
#endif

#endif /* __WINE_WCTYPE_H */