OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [ctype.h] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _LINUX_CTYPE_H
2
#define _LINUX_CTYPE_H
3
 
4
#define _U      0x01    /* upper */
5
#define _L      0x02    /* lower */
6
#define _D      0x04    /* digit */
7
#define _C      0x08    /* cntrl */
8
#define _P      0x10    /* punct */
9
#define _S      0x20    /* white space (space/lf/tab) */
10
#define _X      0x40    /* hex digit */
11
#define _SP     0x80    /* hard space (0x20) */
12
 
13
extern unsigned char _ctype[];
14
extern char _ctmp;
15
 
16
#define isalnum(c) ((_ctype+1)[c]&(_U|_L|_D))
17
#define isalpha(c) ((_ctype+1)[c]&(_U|_L))
18
#define iscntrl(c) ((_ctype+1)[c]&(_C))
19
#define isdigit(c) ((_ctype+1)[c]&(_D))
20
#define isgraph(c) ((_ctype+1)[c]&(_P|_U|_L|_D))
21
#define islower(c) ((_ctype+1)[c]&(_L))
22
#define isprint(c) ((_ctype+1)[c]&(_P|_U|_L|_D|_SP))
23
#define ispunct(c) ((_ctype+1)[c]&(_P))
24
#define isspace(c) ((_ctype+1)[c]&(_S))
25
#define isupper(c) ((_ctype+1)[c]&(_U))
26
#define isxdigit(c) ((_ctype+1)[c]&(_D|_X))
27
 
28
#define isascii(c) (((unsigned) c)<=0x7f)
29
#define toascii(c) (((unsigned) c)&0x7f)
30
 
31
#define tolower(c) (_ctmp=c,isupper(_ctmp)?_ctmp-('A'-'a'):_ctmp)
32
#define toupper(c) (_ctmp=c,islower(_ctmp)?_ctmp-('a'-'A'):_ctmp)
33
 
34
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.