aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libpam/openpam_ctype.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpam/openpam_ctype.h')
-rw-r--r--lib/libpam/openpam_ctype.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libpam/openpam_ctype.h b/lib/libpam/openpam_ctype.h
index 4f5888d09024..38016227a687 100644
--- a/lib/libpam/openpam_ctype.h
+++ b/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.