Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Better debug token output.
  • Loading branch information
icculus committed Feb 15, 2009
1 parent 5b14d15 commit 2257cf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mojoshader_preprocessor.c
Expand Up @@ -105,6 +105,8 @@ void MOJOSHADER_print_debug_token(const char *subsystem, const char *token,
{
if (token[i] == '\n')
printf("\\n");
else if (token[i] == '\\')
printf("\\\\");
else
printf("%c", token[i]);
} // for
Expand Down Expand Up @@ -157,6 +159,10 @@ void MOJOSHADER_print_debug_token(const char *subsystem, const char *token,
printf("'\\n'");
break;

case ((Token) '\\'):
printf("'\\\\'");
break;

default:
assert(((int)tokenval) < 256);
printf("'%c'", (char) tokenval);
Expand Down

0 comments on commit 2257cf1

Please sign in to comment.