glcpp: Print integer tokens as decimal, not hex.
authorEric Anholt <eric@anholt.net>
Wed, 28 Jul 2010 23:53:51 +0000 (16:53 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 29 Jul 2010 00:32:11 +0000 (17:32 -0700)
src/glsl/glcpp/glcpp-parse.c
src/glsl/glcpp/glcpp-parse.y

index 8fbbdab..bfbd97f 100644 (file)
@@ -3041,7 +3041,7 @@ _token_print (char **out, token_t *token)
 
        switch (token->type) {
        case INTEGER:
-               glcpp_printf (*out, "%" PRIxMAX, token->value.ival);
+               glcpp_printf (*out, "%" PRIiMAX, token->value.ival);
                break;
        case IDENTIFIER:
        case INTEGER_STRING:
index c6ff32e..2009aea 100644 (file)
@@ -736,7 +736,7 @@ _token_print (char **out, token_t *token)
 
        switch (token->type) {
        case INTEGER:
-               glcpp_printf (*out, "%" PRIxMAX, token->value.ival);
+               glcpp_printf (*out, "%" PRIiMAX, token->value.ival);
                break;
        case IDENTIFIER:
        case INTEGER_STRING: