From 703a8b505cf698c310497086334408d44397d121 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 22 Jan 2009 00:45:26 +0000 Subject: Move isDigit() and isHex() to utils.h. Fix #rgb/#rrggbb parsing to ensure that the characters are valid hex digits. svn path=/trunk/libcss/; revision=6167 --- src/lex/lex.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/lex/lex.c') diff --git a/src/lex/lex.c b/src/lex/lex.c index 2b565d0..159be24 100644 --- a/src/lex/lex.c +++ b/src/lex/lex.c @@ -163,8 +163,6 @@ static inline bool startNMChar(uint8_t c); static inline bool startNMStart(uint8_t c); static inline bool startStringChar(uint8_t c); static inline bool startURLChar(uint8_t c); -static inline bool isDigit(uint8_t c); -static inline bool isHex(uint8_t c); static inline bool isSpace(uint8_t c); /** @@ -2133,16 +2131,6 @@ bool startURLChar(uint8_t c) ('*' <= c && c <= '~') || c >= 0x80 || c == '\\'; } -bool isDigit(uint8_t c) -{ - return '0' <= c && c <= '9'; -} - -bool isHex(uint8_t c) -{ - return isDigit(c) || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F'); -} - bool isSpace(uint8_t c) { return c == ' ' || c == '\r' || c == '\n' || c == '\f' || c == '\t'; -- cgit v1.2.3