Back to index

cell-binutils  2.17cvs20070401
Defines | Enumerations | Variables
safe-ctype.h File Reference

Go to the source code of this file.

Defines

#define HOST_CHARSET_UNKNOWN   0
#define HOST_CHARSET_ASCII   1
#define HOST_CHARSET_EBCDIC   2
#define HOST_CHARSET   HOST_CHARSET_UNKNOWN
#define _sch_test(c, bit)   (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
#define ISALPHA(c)   _sch_test(c, _sch_isalpha)
#define ISALNUM(c)   _sch_test(c, _sch_isalnum)
#define ISBLANK(c)   _sch_test(c, _sch_isblank)
#define ISCNTRL(c)   _sch_test(c, _sch_iscntrl)
#define ISDIGIT(c)   _sch_test(c, _sch_isdigit)
#define ISGRAPH(c)   _sch_test(c, _sch_isgraph)
#define ISLOWER(c)   _sch_test(c, _sch_islower)
#define ISPRINT(c)   _sch_test(c, _sch_isprint)
#define ISPUNCT(c)   _sch_test(c, _sch_ispunct)
#define ISSPACE(c)   _sch_test(c, _sch_isspace)
#define ISUPPER(c)   _sch_test(c, _sch_isupper)
#define ISXDIGIT(c)   _sch_test(c, _sch_isxdigit)
#define ISIDNUM(c)   _sch_test(c, _sch_isidnum)
#define ISIDST(c)   _sch_test(c, _sch_isidst)
#define IS_ISOBASIC(c)   _sch_test(c, _sch_isbasic)
#define IS_VSPACE(c)   _sch_test(c, _sch_isvsp)
#define IS_NVSPACE(c)   _sch_test(c, _sch_isnvsp)
#define IS_SPACE_OR_NUL(c)   _sch_test(c, _sch_iscppsp)
#define TOUPPER(c)   _sch_toupper[(c) & 0xff]
#define TOLOWER(c)   _sch_tolower[(c) & 0xff]

Enumerations

enum  {
  _sch_isblank = 0x0001, _sch_iscntrl = 0x0002, _sch_isdigit = 0x0004, _sch_islower = 0x0008,
  _sch_isprint = 0x0010, _sch_ispunct = 0x0020, _sch_isspace = 0x0040, _sch_isupper = 0x0080,
  _sch_isxdigit = 0x0100, _sch_isidst = 0x0200, _sch_isvsp = 0x0400, _sch_isnvsp = 0x0800,
  _sch_isalpha = _sch_isupper|_sch_islower, _sch_isalnum = _sch_isalpha|_sch_isdigit, _sch_isidnum = _sch_isidst|_sch_isdigit, _sch_isgraph = _sch_isalnum|_sch_ispunct,
  _sch_iscppsp = _sch_isvsp|_sch_isnvsp, _sch_isbasic = _sch_isprint|_sch_iscppsp
}

Variables

const unsigned short _sch_istable [256]
const unsigned char _sch_toupper [256]
const unsigned char _sch_tolower [256]

Define Documentation

#define _sch_test (   c,
  bit 
)    (_sch_istable[(c) & 0xff] & (unsigned short)(bit))

Definition at line 91 of file safe-ctype.h.

Definition at line 55 of file safe-ctype.h.

#define HOST_CHARSET_ASCII   1

Definition at line 44 of file safe-ctype.h.

#define HOST_CHARSET_EBCDIC   2

Definition at line 45 of file safe-ctype.h.

#define HOST_CHARSET_UNKNOWN   0

Definition at line 43 of file safe-ctype.h.

#define IS_ISOBASIC (   c)    _sch_test(c, _sch_isbasic)

Definition at line 108 of file safe-ctype.h.

#define IS_NVSPACE (   c)    _sch_test(c, _sch_isnvsp)

Definition at line 110 of file safe-ctype.h.

#define IS_SPACE_OR_NUL (   c)    _sch_test(c, _sch_iscppsp)

Definition at line 111 of file safe-ctype.h.

#define IS_VSPACE (   c)    _sch_test(c, _sch_isvsp)

Definition at line 109 of file safe-ctype.h.

#define ISALNUM (   c)    _sch_test(c, _sch_isalnum)

Definition at line 94 of file safe-ctype.h.

#define ISALPHA (   c)    _sch_test(c, _sch_isalpha)

Definition at line 93 of file safe-ctype.h.

#define ISBLANK (   c)    _sch_test(c, _sch_isblank)

Definition at line 95 of file safe-ctype.h.

#define ISCNTRL (   c)    _sch_test(c, _sch_iscntrl)

Definition at line 96 of file safe-ctype.h.

#define ISDIGIT (   c)    _sch_test(c, _sch_isdigit)

Definition at line 97 of file safe-ctype.h.

#define ISGRAPH (   c)    _sch_test(c, _sch_isgraph)

Definition at line 98 of file safe-ctype.h.

#define ISIDNUM (   c)    _sch_test(c, _sch_isidnum)

Definition at line 106 of file safe-ctype.h.

#define ISIDST (   c)    _sch_test(c, _sch_isidst)

Definition at line 107 of file safe-ctype.h.

#define ISLOWER (   c)    _sch_test(c, _sch_islower)

Definition at line 99 of file safe-ctype.h.

#define ISPRINT (   c)    _sch_test(c, _sch_isprint)

Definition at line 100 of file safe-ctype.h.

#define ISPUNCT (   c)    _sch_test(c, _sch_ispunct)

Definition at line 101 of file safe-ctype.h.

#define ISSPACE (   c)    _sch_test(c, _sch_isspace)

Definition at line 102 of file safe-ctype.h.

#define ISUPPER (   c)    _sch_test(c, _sch_isupper)

Definition at line 103 of file safe-ctype.h.

#define ISXDIGIT (   c)    _sch_test(c, _sch_isxdigit)

Definition at line 104 of file safe-ctype.h.

#define TOLOWER (   c)    _sch_tolower[(c) & 0xff]

Definition at line 117 of file safe-ctype.h.

#define TOUPPER (   c)    _sch_toupper[(c) & 0xff]

Definition at line 116 of file safe-ctype.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
_sch_isblank 
_sch_iscntrl 
_sch_isdigit 
_sch_islower 
_sch_isprint 
_sch_ispunct 
_sch_isspace 
_sch_isupper 
_sch_isxdigit 
_sch_isidst 
_sch_isvsp 
_sch_isnvsp 
_sch_isalpha 
_sch_isalnum 
_sch_isidnum 
_sch_isgraph 
_sch_iscppsp 
_sch_isbasic 

Definition at line 61 of file safe-ctype.h.

     {
  /* In C99 */
  _sch_isblank  = 0x0001,   /* space \t */
  _sch_iscntrl  = 0x0002,   /* nonprinting characters */
  _sch_isdigit  = 0x0004,   /* 0-9 */
  _sch_islower  = 0x0008,   /* a-z */
  _sch_isprint  = 0x0010,   /* any printing character including ' ' */
  _sch_ispunct  = 0x0020,   /* all punctuation */
  _sch_isspace  = 0x0040,   /* space \t \n \r \f \v */
  _sch_isupper  = 0x0080,   /* A-Z */
  _sch_isxdigit = 0x0100,   /* 0-9A-Fa-f */

  /* Extra categories useful to cpplib.  */
  _sch_isidst = 0x0200,     /* A-Za-z_ */
  _sch_isvsp    = 0x0400,   /* \n \r */
  _sch_isnvsp   = 0x0800,   /* space \t \f \v \0 */

  /* Combinations of the above.  */
  _sch_isalpha  = _sch_isupper|_sch_islower,     /* A-Za-z */
  _sch_isalnum  = _sch_isalpha|_sch_isdigit,     /* A-Za-z0-9 */
  _sch_isidnum  = _sch_isidst|_sch_isdigit,      /* A-Za-z0-9_ */
  _sch_isgraph  = _sch_isalnum|_sch_ispunct,     /* isprint and not space */
  _sch_iscppsp  = _sch_isvsp|_sch_isnvsp, /* isspace + \0 */
  _sch_isbasic  = _sch_isprint|_sch_iscppsp     /* basic charset of ISO C
                                             (plus ` and @)  */
};

Variable Documentation

Definition at line 159 of file safe-ctype.c.

Definition at line 191 of file safe-ctype.c.

Definition at line 220 of file safe-ctype.c.