1 /* chardefs.h -- Character definitions for readline. */
8 #define savestring(X) _rl_savestring(X)
9 extern char * _rl_savestring ();
13 #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
20 /* Some character stuff. */
21 #define control_character_threshold 0x020 /* Smaller than this is control. */
22 #define meta_character_threshold 0x07f /* Larger than this is Meta. */
23 #define control_character_bit 0x40 /* 0x000000, must be off. */
24 #define meta_character_bit 0x080 /* x0000000, must be on. */
25 #define largest_char 255 /* Largest character value. */
27 #define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
28 #define CTRL(c) ((c) & (~control_character_bit))
29 #define META(c) ((c) | meta_character_bit)
31 #define UNMETA(c) ((c) & (~meta_character_bit))
32 #define UNCTRL(c) to_upper(((c)|control_character_bit))
34 #define lowercase_p(c) (((c) > ('a' - 1) && (c) < ('z' + 1)))
35 #define uppercase_p(c) (((c) > ('A' - 1) && (c) < ('Z' + 1)))
37 #define pure_alphabetic(c) (lowercase_p(c) || uppercase_p(c))
40 #define to_upper(c) (lowercase_p(c) ? ((c) - 32) : (c))
41 #define to_lower(c) (uppercase_p(c) ? ((c) + 32) : (c))
44 #define CTRL_P(c) ((c) < control_character_threshold)
45 #define META_P(c) ((c) > meta_character_threshold)
52 #define RETURN CTRL('M')
66 #define ABORT_CHAR CTRL('G')
71 #define PAGE CTRL('L')
84 #endif /* _CHARDEFS_ */
This page took 0.031454 seconds and 4 git commands to generate.