28 #if defined (HAVE_STRING_H)
35 #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
43 #define control_character_threshold 0x020
44 #define control_character_mask 0x1f
45 #define meta_character_threshold 0x07f
46 #define control_character_bit 0x40
47 #define meta_character_bit 0x080
48 #define largest_char 255
50 #define CTRL_CHAR(c) ((c) < control_character_threshold)
51 #define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
53 #define CTRL(c) ((c) & control_character_mask)
54 #define META(c) ((c) | meta_character_bit)
56 #define UNMETA(c) ((c) & (~meta_character_bit))
57 #define UNCTRL(c) to_upper(((c)|control_character_bit))
65 #define lowercase_p(c) (islower(c))
66 #define uppercase_p(c) (isupper(c))
67 #define digit_p(x) (isdigit (x))
69 #define pure_alphabetic(c) (lowercase_p(c) || uppercase_p(c))
77 # define to_upper(c) (islower(c) ? toupper(c) : (c))
78 # define to_lower(c) (isupper(c) ? tolower(c) : (c))
82 #define digit_value(x) ((x) - '0')
90 #define RETURN CTRL('M')
104 #define ABORT_CHAR CTRL('G')
109 #define PAGE CTRL('L')
120 #define ESC CTRL('[')