]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[libc] Add isxdigit()
authorPiotr Jaroszyński <p.jaroszynski@gmail.com>
Sun, 18 Jul 2010 15:53:47 +0000 (17:53 +0200)
committerMichael Brown <mcb30@ipxe.org>
Tue, 17 Aug 2010 13:44:27 +0000 (14:44 +0100)
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ctype.h

index ed4d884697f7180346e817243e1725fb819b0d69..9f5127bf1cdf7ef49c54a12f4e6eb4e477dec579 100644 (file)
@@ -11,6 +11,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
 #define isdigit(c)     ((c) >= '0' && (c) <= '9')
 #define islower(c)     ((c) >= 'a' && (c) <= 'z')
 #define isupper(c)     ((c) >= 'A' && (c) <= 'Z')
+#define isxdigit(c)    (isdigit(c) || ((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f'))
 
 static inline unsigned char tolower(unsigned char c)
 {