summaryrefslogtreecommitdiff
path: root/src/lex
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-11 13:00:33 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-11 13:00:33 +0000
commit51af89dc9d475cf40751eaee8401fbc8a272a0da (patch)
tree2c56c3763a1fc9fecd4f0848ea1535470cd76b6c /src/lex
parent01356fb18c747c6e1920db67379776bf6f57866a (diff)
downloadlibcss-51af89dc9d475cf40751eaee8401fbc8a272a0da.tar.gz
libcss-51af89dc9d475cf40751eaee8401fbc8a272a0da.tar.bz2
Beginnings of a colour specifier parser.
svn path=/trunk/libcss/; revision=6037
Diffstat (limited to 'src/lex')
-rw-r--r--src/lex/lex.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/lex/lex.c b/src/lex/lex.c
index 3ee01a7..ad513c9 100644
--- a/src/lex/lex.c
+++ b/src/lex/lex.c
@@ -159,7 +159,6 @@ static inline css_error consumeUnicode(css_lexer *lexer, uint32_t ucs);
static inline css_error consumeURLChars(css_lexer *lexer);
static inline css_error consumeWChars(css_lexer *lexer);
-static inline uint32_t charToHex(uint8_t c);
static inline bool startNMChar(uint8_t c);
static inline bool startNMStart(uint8_t c);
static inline bool startStringChar(uint8_t c);
@@ -2112,46 +2111,6 @@ css_error consumeWChars(css_lexer *lexer)
* More utility routines *
******************************************************************************/
-uint32_t charToHex(uint8_t c)
-{
- switch (c) {
- case 'a': case 'A':
- return 0xa;
- case 'b': case 'B':
- return 0xb;
- case 'c': case 'C':
- return 0xc;
- case 'd': case 'D':
- return 0xd;
- case 'e': case 'E':
- return 0xe;
- case 'f': case 'F':
- return 0xf;
- case '0':
- return 0x0;
- case '1':
- return 0x1;
- case '2':
- return 0x2;
- case '3':
- return 0x3;
- case '4':
- return 0x4;
- case '5':
- return 0x5;
- case '6':
- return 0x6;
- case '7':
- return 0x7;
- case '8':
- return 0x8;
- case '9':
- return 0x9;
- }
-
- return 0;
-}
-
bool startNMChar(uint8_t c)
{
return c == '_' || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ||