From: John Hodge Date: Sun, 9 Feb 2014 10:00:13 +0000 (+0800) Subject: Usermode/libc - Add isxdigit X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=fd937b134894af540a322ed3de2c66363d0b584d;p=tpg%2Facess2.git Usermode/libc - Add isxdigit --- diff --git a/Usermode/Libraries/libc.so_src/include_exp/ctype.h b/Usermode/Libraries/libc.so_src/include_exp/ctype.h index 0d437e9b..60753a64 100644 --- a/Usermode/Libraries/libc.so_src/include_exp/ctype.h +++ b/Usermode/Libraries/libc.so_src/include_exp/ctype.h @@ -40,6 +40,14 @@ static inline int isspace(int ch) { if(ch == '\n') return 1; return 0; } + +static inline int isxdigit(int ch) { + if('0'<=ch&&ch<='9') return 1; + if('a'<=ch&&ch<='f') return 1; + if('F'<=ch&&ch<='F') return 1; + return 0; +} + // C99 static inline int isblank(int ch) { if(ch == ' ') return 1;