Linux Perf
sane_ctype.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GIT_SPACE   0x01
 
#define GIT_DIGIT   0x02
 
#define GIT_ALPHA   0x04
 
#define GIT_GLOB_SPECIAL   0x08
 
#define GIT_REGEX_SPECIAL   0x10
 
#define GIT_PRINT_EXTRA   0x20
 
#define GIT_PRINT   0x3E
 
#define sane_istest(x, mask)   ((sane_ctype[(unsigned char)(x)] & (mask)) != 0)
 
#define isascii(x)   (((x) & ~0x7f) == 0)
 
#define isspace(x)   sane_istest(x,GIT_SPACE)
 
#define isdigit(x)   sane_istest(x,GIT_DIGIT)
 
#define isxdigit(x)   (sane_istest(toupper(x), GIT_ALPHA | GIT_DIGIT) && toupper(x) < 'G')
 
#define isalpha(x)   sane_istest(x,GIT_ALPHA)
 
#define isalnum(x)   sane_istest(x,GIT_ALPHA | GIT_DIGIT)
 
#define isprint(x)   sane_istest(x,GIT_PRINT)
 
#define islower(x)   (sane_istest(x,GIT_ALPHA) && (x & 0x20))
 
#define isupper(x)   (sane_istest(x,GIT_ALPHA) && !(x & 0x20))
 
#define tolower(x)   sane_case((unsigned char)(x), 0x20)
 
#define toupper(x)   sane_case((unsigned char)(x), 0)
 

Functions

static int sane_case (int x, int high)
 

Variables

const char * graph_line
 
const char * graph_dotted_line
 
const char * spaces
 
const char * dots
 
unsigned char sane_ctype [256]
 

Macro Definition Documentation

◆ GIT_ALPHA

#define GIT_ALPHA   0x04

Definition at line 26 of file sane_ctype.h.

◆ GIT_DIGIT

#define GIT_DIGIT   0x02

Definition at line 25 of file sane_ctype.h.

◆ GIT_GLOB_SPECIAL

#define GIT_GLOB_SPECIAL   0x08

Definition at line 27 of file sane_ctype.h.

◆ GIT_PRINT

#define GIT_PRINT   0x3E

Definition at line 30 of file sane_ctype.h.

◆ GIT_PRINT_EXTRA

#define GIT_PRINT_EXTRA   0x20

Definition at line 29 of file sane_ctype.h.

◆ GIT_REGEX_SPECIAL

#define GIT_REGEX_SPECIAL   0x10

Definition at line 28 of file sane_ctype.h.

◆ GIT_SPACE

#define GIT_SPACE   0x01

Definition at line 24 of file sane_ctype.h.

◆ isalnum

#define isalnum (   x)    sane_istest(x,GIT_ALPHA | GIT_DIGIT)

Definition at line 38 of file sane_ctype.h.

◆ isalpha

#define isalpha (   x)    sane_istest(x,GIT_ALPHA)

Definition at line 37 of file sane_ctype.h.

◆ isascii

#define isascii (   x)    (((x) & ~0x7f) == 0)

Definition at line 32 of file sane_ctype.h.

◆ isdigit

#define isdigit (   x)    sane_istest(x,GIT_DIGIT)

Definition at line 34 of file sane_ctype.h.

◆ islower

#define islower (   x)    (sane_istest(x,GIT_ALPHA) && (x & 0x20))

Definition at line 40 of file sane_ctype.h.

◆ isprint

#define isprint (   x)    sane_istest(x,GIT_PRINT)

Definition at line 39 of file sane_ctype.h.

◆ isspace

#define isspace (   x)    sane_istest(x,GIT_SPACE)

Definition at line 33 of file sane_ctype.h.

◆ isupper

#define isupper (   x)    (sane_istest(x,GIT_ALPHA) && !(x & 0x20))

Definition at line 41 of file sane_ctype.h.

◆ isxdigit

#define isxdigit (   x)    (sane_istest(toupper(x), GIT_ALPHA | GIT_DIGIT) && toupper(x) < 'G')

Definition at line 35 of file sane_ctype.h.

◆ sane_istest

#define sane_istest (   x,
  mask 
)    ((sane_ctype[(unsigned char)(x)] & (mask)) != 0)

Definition at line 31 of file sane_ctype.h.

◆ tolower

#define tolower (   x)    sane_case((unsigned char)(x), 0x20)

Definition at line 42 of file sane_ctype.h.

◆ toupper

#define toupper (   x)    sane_case((unsigned char)(x), 0)

Definition at line 43 of file sane_ctype.h.

Function Documentation

◆ sane_case()

static int sane_case ( int  x,
int  high 
)
inlinestatic

Definition at line 45 of file sane_ctype.h.

Variable Documentation

◆ dots

const char* dots

Definition at line 46 of file ctype.c.

◆ graph_dotted_line

const char* graph_dotted_line

Definition at line 38 of file ctype.c.

◆ graph_line

const char* graph_line

Definition at line 34 of file ctype.c.

◆ sane_ctype

unsigned char sane_ctype[256]

Definition at line 20 of file ctype.c.

◆ spaces

const char* spaces

Definition at line 42 of file ctype.c.