summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/chardefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline/chardefs.h')
-rw-r--r--cmd-line-utils/readline/chardefs.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd-line-utils/readline/chardefs.h b/cmd-line-utils/readline/chardefs.h
index 04a3b7a8e9c..def3a111bd3 100644
--- a/cmd-line-utils/readline/chardefs.h
+++ b/cmd-line-utils/readline/chardefs.h
@@ -59,11 +59,7 @@
#define largest_char 255 /* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
-#if largest_char >= 255
-#define META_CHAR(c) ((c) > meta_character_threshold)
-#else
#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
-#endif
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)
@@ -90,6 +86,8 @@
/* Some systems define these; we want our definitions. */
#undef ISPRINT
+/* Beware: these only work with single-byte ASCII characters. */
+
#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))