summaryrefslogtreecommitdiff
path: root/readline/chardefs.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-05-05 18:26:14 +0000
committerDaniel Jacobowitz <drow@false.org>2006-05-05 18:26:14 +0000
commit5bdf8622148be4764cc0757fd5b3e41f4d73b2b2 (patch)
treeec69331983824d95160ec9a14f71d6bccd23ed42 /readline/chardefs.h
parent7f8411279d59ee620d1e2e153329c0bd47c4ca86 (diff)
downloadbinutils-gdb-5bdf8622148be4764cc0757fd5b3e41f4d73b2b2.tar.gz
Readline 5.1 import for HEAD.
Diffstat (limited to 'readline/chardefs.h')
-rw-r--r--readline/chardefs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/readline/chardefs.h b/readline/chardefs.h
index a537be220b0..def3a111bd3 100644
--- a/readline/chardefs.h
+++ b/readline/chardefs.h
@@ -77,11 +77,17 @@
# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
#endif
-#define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
+#if defined (CTYPE_NON_ASCII)
+# define NON_NEGATIVE(c) 1
+#else
+# define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
+#endif
/* 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))