diff options
author | ache <ache@FreeBSD.org> | 1998-04-28 06:22:20 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-04-28 06:22:20 +0000 |
commit | 27ef633cd3f7fd5fb6cb033edd2c1747a6e59acb (patch) | |
tree | 6dc2ca04460e2afc2586db7905a62d8345684052 /contrib/libreadline/chardefs.h | |
parent | 53ee3efdd804d38a5c57372c0722804607ceb256 (diff) | |
download | FreeBSD-src-27ef633cd3f7fd5fb6cb033edd2c1747a6e59acb.zip FreeBSD-src-27ef633cd3f7fd5fb6cb033edd2c1747a6e59acb.tar.gz |
V2.2 import
Diffstat (limited to 'contrib/libreadline/chardefs.h')
-rw-r--r-- | contrib/libreadline/chardefs.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/libreadline/chardefs.h b/contrib/libreadline/chardefs.h index 8e6f0ef..3e9e273 100644 --- a/contrib/libreadline/chardefs.h +++ b/contrib/libreadline/chardefs.h @@ -121,7 +121,20 @@ #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_ */ |