ctype.h

Go to the documentation of this file.
00001 /* ctype.h */
00002 
00003 /* This file contains macros definitions and extern declarations for a
00004  * version of <ctype.h> which is aware of the o_flipcase letters used in
00005  * elvis.
00006  *
00007  * This file uses the "uchar" data type and "UCHAR" conversion macro which
00008  * are defined in "config.h".  Consequently, any file that includes this
00009  * header must include config.h first.
00010  */
00011 
00012 #ifndef _CT_UPPER
00013 
00014 #define _CT_UPPER       0x01
00015 #define _CT_LOWER       0x02
00016 #define _CT_SPACE       0x04
00017 #define _CT_DIGIT       0x08
00018 #define _CT_ALNUM       0x10
00019 #define _CT_CNTRL       0x20
00020 
00021 #define isalnum(c)      (_ct_ctypes[UCHAR(c)] & _CT_ALNUM)
00022 #define isalpha(c)      (_ct_ctypes[UCHAR(c)] & (_CT_LOWER|_CT_UPPER))
00023 #define isdigit(c)      (_ct_ctypes[UCHAR(c)] & _CT_DIGIT)
00024 #define islower(c)      (_ct_ctypes[UCHAR(c)] & _CT_LOWER)
00025 #define isspace(c)      (_ct_ctypes[UCHAR(c)] & _CT_SPACE)
00026 #define isupper(c)      (_ct_ctypes[UCHAR(c)] & _CT_UPPER)
00027 #define iscntrl(c)      (_ct_ctypes[UCHAR(c)] & _CT_CNTRL)
00028 #define ispunct(c)      (!_ct_ctypes[UCHAR(c)]) /* punct = "none of the above" */
00029 
00030 #define isascii(c)      (!((c) & 0x80))
00031 
00032 #define toupper(c)      _ct_toupper[UCHAR(c)]
00033 #define tolower(c)      _ct_tolower[UCHAR(c)]
00034 
00035 extern uchar    _ct_toupper[];
00036 extern uchar    _ct_tolower[];
00037 extern uchar    _ct_ctypes[];
00038 extern void     _ct_init(/* char *flipcase */);
00039 
00040 #endif /* ndef _CT_UPPER */

Generated on Fri Apr 14 22:56:52 2006 for minix by  doxygen 1.4.6