summaryrefslogtreecommitdiff
path: root/test/lex.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-09-05 15:20:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-09-05 15:20:32 +0000
commitcb2b54bef28367ef9025f11f193f3f5e0196ca60 (patch)
tree6a689d245cc4e044e87010c9c779084cc73feee1 /test/lex.c
parent447b0eccefefccf3ee4a3396bf979236ab42790e (diff)
downloadlibcss-cb2b54bef28367ef9025f11f193f3f5e0196ca60.tar.gz
libcss-cb2b54bef28367ef9025f11f193f3f5e0196ca60.tar.bz2
Fix compilation of test drivers on 64bit platforms.
svn path=/trunk/libcss/; revision=5261
Diffstat (limited to 'test/lex.c')
-rw-r--r--test/lex.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/test/lex.c b/test/lex.c
index 22da973..cba2d8f 100644
--- a/test/lex.c
+++ b/test/lex.c
@@ -29,34 +29,43 @@ static void printToken(const css_token *token)
switch (token->type) {
case CSS_TOKEN_IDENT:
- printf("IDENT(%.*s)", token->data.len, token->data.ptr);
+ printf("IDENT(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_ATKEYWORD:
- printf("ATKEYWORD(%.*s)", token->data.len, token->data.ptr);
+ printf("ATKEYWORD(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_STRING:
- printf("STRING(%.*s)", token->data.len, token->data.ptr);
+ printf("STRING(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_INVALID_STRING:
- printf("INVALID(%.*s)", token->data.len, token->data.ptr);
+ printf("INVALID(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_HASH:
- printf("HASH(%.*s)", token->data.len, token->data.ptr);
+ printf("HASH(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_NUMBER:
- printf("NUMBER(%.*s)", token->data.len, token->data.ptr);
+ printf("NUMBER(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_PERCENTAGE:
- printf("PERCENTAGE(%.*s)", token->data.len, token->data.ptr);
+ printf("PERCENTAGE(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_DIMENSION:
- printf("DIMENSION(%.*s)", token->data.len, token->data.ptr);
+ printf("DIMENSION(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_URI:
- printf("URI(%.*s)", token->data.len, token->data.ptr);
+ printf("URI(%.*s)", (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_UNICODE_RANGE:
- printf("UNICODE-RANGE(%.*s)", token->data.len, token->data.ptr);
+ printf("UNICODE-RANGE(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_CDO:
printf("CDO");
@@ -68,10 +77,11 @@ static void printToken(const css_token *token)
printf("S");
break;
case CSS_TOKEN_COMMENT:
- printf("COMMENT(%.*s)", token->data.len, token->data.ptr);
+ printf("COMMENT(%.*s)", (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_FUNCTION:
- printf("FUNCTION(%.*s)", token->data.len, token->data.ptr);
+ printf("FUNCTION(%.*s)",
+ (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_INCLUDES:
printf("INCLUDES");
@@ -89,7 +99,7 @@ static void printToken(const css_token *token)
printf("SUBSTRINGMATCH");
break;
case CSS_TOKEN_CHAR:
- printf("CHAR(%.*s)", token->data.len, token->data.ptr);
+ printf("CHAR(%.*s)", (int) token->data.len, token->data.ptr);
break;
case CSS_TOKEN_EOF:
printf("EOF");