coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ctype.h
Go to the documentation of this file.
1 #ifndef CTYPE_H
2 #define CTYPE_H
3 
4 static inline int isspace(int c)
5 {
6  switch (c) {
7  case ' ': case '\f': case '\n':
8  case '\r': case '\t': case '\v':
9  return 1;
10  default:
11  return 0;
12  }
13 }
14 
15 static inline int isprint(int c)
16 {
17  return c >= ' ' && c <= '~';
18 }
19 
20 static inline int isdigit(int c)
21 {
22  return (c >= '0' && c <= '9');
23 }
24 
25 static inline int isxdigit(int c)
26 {
27  return ((c >= '0' && c <= '9') ||
28  (c >= 'a' && c <= 'f') ||
29  (c >= 'A' && c <= 'F'));
30 }
31 
32 static inline int isupper(int c)
33 {
34  return (c >= 'A' && c <= 'Z');
35 }
36 
37 static inline int islower(int c)
38 {
39  return (c >= 'a' && c <= 'z');
40 }
41 
42 static inline int toupper(int c)
43 {
44  if (islower(c))
45  c -= 'a'-'A';
46  return c;
47 }
48 
49 static inline int tolower(int c)
50 {
51  if (isupper(c))
52  c -= 'A'-'a';
53  return c;
54 }
55 
56 #endif /* CTYPE_H */
static int islower(int c)
Definition: ctype.h:37
static int isupper(int c)
Definition: ctype.h:32
static int tolower(int c)
Definition: ctype.h:49
static int isspace(int c)
Definition: ctype.h:4
static int isprint(int c)
Definition: ctype.h:15
static int toupper(int c)
Definition: ctype.h:42
static int isdigit(int c)
Definition: ctype.h:20
static int isxdigit(int c)
Definition: ctype.h:25
#define c(value, pmcreg, dst_bits)