diff options
author | des <des@FreeBSD.org> | 2014-02-26 17:06:54 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2014-02-26 17:06:54 +0000 |
commit | 4baac54a79605b45065e10092843b501b66c2aa6 (patch) | |
tree | 075b355417c8b24db7abc85f7499fd9be1086ab9 /lib/libpam | |
parent | 98d0de9c95f5cc284f307feca7764fba995849b2 (diff) | |
download | FreeBSD-src-4baac54a79605b45065e10092843b501b66c2aa6.zip FreeBSD-src-4baac54a79605b45065e10092843b501b66c2aa6.tar.gz |
Merge upstream r763: fix is_upper() predicate.
Diffstat (limited to 'lib/libpam')
-rw-r--r-- | lib/libpam/openpam_ctype.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libpam/openpam_ctype.h b/lib/libpam/openpam_ctype.h index 4f5888d..3801622 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. |