37 |
|
|
38 |
#ifdef isalpha |
#ifdef isalpha |
39 |
#error "safe-ctype.h and ctype.h may not be used simultaneously" |
#error "safe-ctype.h and ctype.h may not be used simultaneously" |
40 |
|
#endif |
41 |
|
|
42 |
|
/* Determine host character set. */ |
43 |
|
#define HOST_CHARSET_UNKNOWN 0 |
44 |
|
#define HOST_CHARSET_ASCII 1 |
45 |
|
#define HOST_CHARSET_EBCDIC 2 |
46 |
|
|
47 |
|
#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ |
48 |
|
&& 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 |
49 |
|
# define HOST_CHARSET HOST_CHARSET_ASCII |
50 |
#else |
#else |
51 |
|
# if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ |
52 |
|
&& 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A |
53 |
|
# define HOST_CHARSET HOST_CHARSET_EBCDIC |
54 |
|
# else |
55 |
|
# define HOST_CHARSET HOST_CHARSET_UNKNOWN |
56 |
|
# endif |
57 |
|
#endif |
58 |
|
|
59 |
/* Categories. */ |
/* Categories. */ |
60 |
|
|
116 |
#define TOUPPER(c) _sch_toupper[(c) & 0xff] |
#define TOUPPER(c) _sch_toupper[(c) & 0xff] |
117 |
#define TOLOWER(c) _sch_tolower[(c) & 0xff] |
#define TOLOWER(c) _sch_tolower[(c) & 0xff] |
118 |
|
|
|
#endif /* no ctype.h */ |
|
119 |
#endif /* SAFE_CTYPE_H */ |
#endif /* SAFE_CTYPE_H */ |