Rev 2001 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2001 | Rev 2048 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #define KERN_MACROS_H_ |
36 | #define KERN_MACROS_H_ |
37 | 37 | ||
38 | #include <arch/types.h> |
38 | #include <arch/types.h> |
39 | #include <typedefs.h> |
39 | #include <typedefs.h> |
40 | 40 | ||
41 | #define is_digit(d) (((d) >= '0') && ((d) <= '9')) |
41 | #define is_digit(d) (((d) >= '0') && ((d) <= '9')) |
42 | #define is_lower(c) (((c) >= 'a') && ((c) <= 'z')) |
42 | #define is_lower(c) (((c) >= 'a') && ((c) <= 'z')) |
43 | #define is_upper(c) (((c) >= 'A') && ((c) <= 'Z')) |
43 | #define is_upper(c) (((c) >= 'A') && ((c) <= 'Z')) |
44 | #define is_alpha(c) (is_lower(c) || is_upper(c)) |
44 | #define is_alpha(c) (is_lower(c) || is_upper(c)) |
45 | #define is_alphanum(c) (is_alpha(c) || is_digit(c)) |
45 | #define is_alphanum(c) (is_alpha(c) || is_digit(c)) |
46 | #define is_white(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r')) |
46 | #define is_white(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || \ |
- | 47 | ((c) == '\r')) |
|
47 | 48 | ||
48 | #define min(a,b) ((a) < (b) ? (a) : (b)) |
49 | #define min(a,b) ((a) < (b) ? (a) : (b)) |
49 | #define max(a,b) ((a) > (b) ? (a) : (b)) |
50 | #define max(a,b) ((a) > (b) ? (a) : (b)) |
50 | 51 | ||
51 | /** Return true if the interlvals overlap. |
52 | /** Return true if the interlvals overlap. |