From: Wolfgang (Blub) Bumiller Date: Fri, 2 Nov 2012 17:37:58 +0000 (+0100) Subject: Changed the preprocess test to reproduce the input file X-Git-Tag: 0.1~52 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=caf4771ba16b6ad6d4d99fb34712a1b3f86266e8;p=xonotic%2Fgmqcc.git Changed the preprocess test to reproduce the input file --- diff --git a/preprocess.c b/preprocess.c index adf5e5e..32f9c28 100644 --- a/preprocess.c +++ b/preprocess.c @@ -9,6 +9,7 @@ bool preprocess(const char *filename) do { tok = lex_do(lex); + /* if (tok == TOKEN_EOL) printf("EOL"); else if (tok >= TOKEN_START && tok <= TOKEN_FATAL) @@ -19,6 +20,13 @@ bool preprocess(const char *filename) printf(">>%s<<\n", lex->tok.value); else printf("\n"); + */ + if (tok == TOKEN_EOL) + printf("\n"); + else if (tok >= TOKEN_START && tok < TOKEN_EOF) + printf("%s", lex->tok.value); + else + printf("%c", tok); } while (tok < TOKEN_EOF); lex_close(lex);