Changeset 759 in openpam for trunk/lib


Ignore:
Timestamp:
Jan 24, 2014, 1:44:34 PM (7 years ago)
Author:
Dag-Erling Smørgrav
Message:

Add is_xdigit() predicate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libpam/openpam_ctype.h

    r666 r759  
    3838#define is_digit(ch)                            \
    3939        (ch >= '0' && ch <= '9')
     40
     41/*
     42 * Evaluates to non-zero if the argument is a hex digit.
     43 */
     44#define is_xdigit(ch)                           \
     45        ((ch >= '0' && ch <= '9') ||            \
     46         (ch >= 'a' && ch <= 'f') ||            \
     47         (ch >= 'A' && ch <= 'F'))
    4048
    4149/*
Note: See TracChangeset for help on using the changeset viewer.