diff options
Diffstat (limited to 'contrib/openpam/lib/libpam/openpam_ctype.h')
-rw-r--r-- | contrib/openpam/lib/libpam/openpam_ctype.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/openpam/lib/libpam/openpam_ctype.h b/contrib/openpam/lib/libpam/openpam_ctype.h index 4f5888d..3801622 100644 --- a/contrib/openpam/lib/libpam/openpam_ctype.h +++ b/contrib/openpam/lib/libpam/openpam_ctype.h @@ -39,10 +39,18 @@ (ch >= '0' && ch <= '9') /* + * Evaluates to non-zero if the argument is a hex digit. + */ +#define is_xdigit(ch) \ + ((ch >= '0' && ch <= '9') || \ + (ch >= 'a' && ch <= 'f') || \ + (ch >= 'A' && ch <= 'F')) + +/* * Evaluates to non-zero if the argument is an uppercase letter. */ #define is_upper(ch) \ - (ch >= 'A' && ch <= 'A') + (ch >= 'A' && ch <= 'Z') /* * Evaluates to non-zero if the argument is a lowercase letter. |