Imported from ../bash-2.02.tar.gz.
[platform/upstream/bash.git] / lib / readline / chardefs.h
index 8e6f0ef..3e9e273 100644 (file)
 #ifdef ESC
 #undef ESC
 #endif
-
 #define ESC CTRL('[')
 
+#ifndef ISOCTAL
+#define ISOCTAL(c)      ((c) >= '0' && (c) <= '7')
+#endif
+#define OCTVALUE(c)     ((c) - '0')
+
+#ifndef isxdigit
+#  define isxdigit(c)   (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#endif
+
+#define HEXVALUE(c) \
+  (((c) >= 'a' && (c) <= 'f') \
+       ? (c)-'a'+10 \
+       : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0')
+
 #endif  /* _CHARDEFS_H_ */