PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
propgcc
propeller-elf
include
sys
ctype.h
Go to the documentation of this file.
1
5
/*
6
* doxygen note.
7
* \@file uses include/sys/ctype.h to differentiate from include/ctype.h
8
*/
9
10
#ifndef _SYS_CTYPE_H
11
#define _SYS_CTYPE_H
12
13
14
/* internal definitions for ctype.h and wctype.h */
15
/* we have an array of 129 bytes (0..128) */
16
extern
unsigned
char
__ctype[];
17
#if defined(__GNUC__)
18
#define __ctype_get(c) __extension__({unsigned int _i_ = c; if (_i_ > 128) _i_ = 128; __ctype[_i_];})
19
#else
20
#define __ctype_get(c) __ctype[((unsigned int)(c) > 128 ? 128 : (c))]
21
#endif
22
23
#define _CTc 0x01
/* control character */
24
#define _CTd 0x02
/* numeric digit */
25
#define _CTu 0x04
/* upper case */
26
#define _CTl 0x08
/* lower case */
27
#define _CTs 0x10
/* whitespace */
28
#define _CTp 0x20
/* punctuation */
29
#define _CTx 0x40
/* hexadecimal */
30
#define _CTb 0x80
/* "blank" (space or horizontal tab) */
31
32
#define _CTYPE_T unsigned short
33
34
/* the upper 8 bits of the wctype_t are not actually stored in the
35
* table, but rather denote various special conditions
36
*/
37
#define _CTmask 0x00ff
38
39
#define _CTanybut 0x4000
/* character has some bit set other than the ones specified in the lower 8 bits */
40
#define _CTnot 0x8000
/* invert condition in the remaining bits */
41
42
/* some useful combinations */
43
#define _CTalnum (_CTu|_CTl|_CTd)
44
#define _CTalpha (_CTu|_CTl)
45
#define _CTgraph (_CTanybut|(_CTc|_CTs))
46
#define _CTprint (_CTanybut|_CTc)
47
48
#endif
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17