summaryrefslogtreecommitdiff
path: root/readline/chardefs.h
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2006-04-20 20:05:52 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2006-04-20 20:05:52 +0000
commitd74ba4e5b27b8dd827b9ecdffee4526c48a887ce (patch)
tree303f50f87452366cd763f6855df5150e4d00190d /readline/chardefs.h
parentf2267417bd269b36f69e65d88da5bb25ad333606 (diff)
downloadgdb-cvs/import-1.1.1.tar.gz
import of readlilne 5.1import-1.1.1cvs/import-1.1.1
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))