update for HEAD-2003091401
[reactos.git] / lib / msvcrt / ctype / isctype.c
1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/ctype.h>
3
4
5 extern unsigned short _ctype[];
6
7 unsigned short *_pctype = _ctype + 1;
8 unsigned short *_pwctype = _ctype + 1;
9
10
11 /*
12  * @implemented
13  */
14 unsigned short **__p__pctype(void)
15 {
16    return &_pctype;
17 }
18
19 /*
20  * @implemented
21  */
22 unsigned short **__p__pwctype(void)
23 {
24    return &_pwctype;
25 }
26
27 /*
28  * @implemented
29  */
30 int _isctype(unsigned int c, int ctypeFlags)
31 {
32    return (_pctype[(unsigned char)(c & 0xFF)] & ctypeFlags);
33 }
34
35 /*
36  * @implemented
37  */
38 int iswctype(wint_t wc, wctype_t wctypeFlags)
39 {
40    return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags);
41 }
42
43 /*
44  * obsolete
45  *
46  * @implemented
47  */
48 int is_wctype(wint_t wc, wctype_t wctypeFlags)
49 {
50    return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags);
51 }
52
53 /* EOF */