diff --git a/lib/libpam/openpam_ctype.h b/lib/libpam/openpam_ctype.h index f78574d..96389f8 100644 --- a/lib/libpam/openpam_ctype.h +++ b/lib/libpam/openpam_ctype.h @@ -38,6 +38,14 @@ #define is_digit(ch) \ (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. */