Back to index

glibc  2.9
Defines | Enumerations | Functions
ctype.h File Reference
#include <features.h>
#include <bits/types.h>
#include <endian.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _ISbit(bit)   (1 << (bit))
#define __isctype(c, type)   ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
#define __isascii(c)   (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */
#define __toascii(c)   ((c) & 0x7f) /* Mask off high bits. */
#define __exctype(name)   extern int name (int) __THROW
#define __tobody(c, f, a, args)
#define isalnum(c)   __isctype((c), _ISalnum)
#define isalpha(c)   __isctype((c), _ISalpha)
#define iscntrl(c)   __isctype((c), _IScntrl)
#define isdigit(c)   __isctype((c), _ISdigit)
#define islower(c)   __isctype((c), _ISlower)
#define isgraph(c)   __isctype((c), _ISgraph)
#define isprint(c)   __isctype((c), _ISprint)
#define ispunct(c)   __isctype((c), _ISpunct)
#define isspace(c)   __isctype((c), _ISspace)
#define isupper(c)   __isctype((c), _ISupper)
#define isxdigit(c)   __isctype((c), _ISxdigit)

Enumerations

enum  {
  _ISupper = _ISbit (0), _ISlower = _ISbit (1), _ISalpha = _ISbit (2), _ISdigit = _ISbit (3),
  _ISxdigit = _ISbit (4), _ISspace = _ISbit (5), _ISprint = _ISbit (6), _ISgraph = _ISbit (7),
  _ISblank = _ISbit (8), _IScntrl = _ISbit (9), _ISpunct = _ISbit (10), _ISalnum = _ISbit (11)
}

Functions

__const unsigned short int ** __ctype_b_loc (void) __THROW __attribute__((__const))
__const __int32_t ** __ctype_tolower_loc (void) __THROW __attribute__((__const))
__const __int32_t ** __ctype_toupper_loc (void) __THROW __attribute__((__const))
__BEGIN_NAMESPACE_STD __exctype (isalnum)
 __exctype (isalpha)
 __exctype (iscntrl)
 __exctype (isdigit)
 __exctype (islower)
 __exctype (isgraph)
 __exctype (isprint)
 __exctype (ispunct)
 __exctype (isspace)
 __exctype (isupper)
 __exctype (isxdigit)
int tolower (int __c) __THROW
int toupper (int __c) __THROW

Define Documentation

#define __exctype (   name)    extern int name (int) __THROW

Definition at line 94 of file ctype.h.

#define __isascii (   c)    (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */

Definition at line 91 of file ctype.h.

#define __isctype (   c,
  type 
)    ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)

Definition at line 88 of file ctype.h.

#define __toascii (   c)    ((c) & 0x7f) /* Mask off high bits. */

Definition at line 92 of file ctype.h.

#define __tobody (   c,
  f,
  a,
  args 
)
Value:
(__extension__                                                       \
   ({ int __res;                                                     \
      if (sizeof (c) > 1)                                            \
       {                                                             \
         if (__builtin_constant_p (c))                                      \
           {                                                         \
             int __c = (c);                                          \
             __res = __c < -128 || __c > 255 ? __c : (a)[__c];              \
           }                                                         \
         else                                                        \
           __res = f args;                                           \
       }                                                             \
      else                                                           \
       __res = (a)[(int) (c)];                                              \
      __res; }))

Definition at line 155 of file ctype.h.

#define _ISbit (   bit)    (1 << (bit))

Definition at line 43 of file ctype.h.

#define isalnum (   c)    __isctype((c), _ISalnum)

Definition at line 173 of file ctype.h.

#define isalpha (   c)    __isctype((c), _ISalpha)

Definition at line 174 of file ctype.h.

#define iscntrl (   c)    __isctype((c), _IScntrl)

Definition at line 175 of file ctype.h.

#define isdigit (   c)    __isctype((c), _ISdigit)

Definition at line 176 of file ctype.h.

#define isgraph (   c)    __isctype((c), _ISgraph)

Definition at line 178 of file ctype.h.

#define islower (   c)    __isctype((c), _ISlower)

Definition at line 177 of file ctype.h.

#define isprint (   c)    __isctype((c), _ISprint)

Definition at line 179 of file ctype.h.

#define ispunct (   c)    __isctype((c), _ISpunct)

Definition at line 180 of file ctype.h.

#define isspace (   c)    __isctype((c), _ISspace)

Definition at line 181 of file ctype.h.

#define isupper (   c)    __isctype((c), _ISupper)

Definition at line 182 of file ctype.h.

#define isxdigit (   c)    __isctype((c), _ISxdigit)

Definition at line 183 of file ctype.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
_ISupper 
_ISlower 
_ISalpha 
_ISdigit 
_ISxdigit 
_ISspace 
_ISprint 
_ISgraph 
_ISblank 
_IScntrl 
_ISpunct 
_ISalnum 

Definition at line 48 of file ctype.h.

{
  _ISupper = _ISbit (0),    /* UPPERCASE.  */
  _ISlower = _ISbit (1),    /* lowercase.  */
  _ISalpha = _ISbit (2),    /* Alphabetic.  */
  _ISdigit = _ISbit (3),    /* Numeric.  */
  _ISxdigit = _ISbit (4),   /* Hexadecimal numeric.  */
  _ISspace = _ISbit (5),    /* Whitespace.  */
  _ISprint = _ISbit (6),    /* Printing.  */
  _ISgraph = _ISbit (7),    /* Graphical.  */
  _ISblank = _ISbit (8),    /* Blank (usually SPC and TAB).  */
  _IScntrl = _ISbit (9),    /* Control character.  */
  _ISpunct = _ISbit (10),   /* Punctuation.  */
  _ISalnum = _ISbit (11)    /* Alphanumeric.  */
};

Function Documentation

__const unsigned short int** __ctype_b_loc ( void  ) const
int tolower ( int  __c)

Here is the caller graph for this function:

int toupper ( int  __c)

Definition at line 51 of file ctype.c.

{
  return c >= -128 && c < 256 ? __ctype_toupper[c] : c;
}

Here is the caller graph for this function: