diff options
author | /dev/humancontroller <devhc@example.com> | 2017-04-13 11:30:00 +0000 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 12:11:01 +0200 |
commit | 60d92bbdcfc22c7248989ad7efb856989d299daa (patch) | |
tree | 74de9d4cb1f1a938705e13257ba136b9872b6600 /src/tools/lcc/cpp/cpp.c | |
parent | 1a5afab2fcd1d43e5d43160ee601fa3bfa375a76 (diff) |
update the tools to the latest revision
URL: https://github.com/darklegion/tremulous
revision: c862a5340c8de44dcc7abaff170c20c04f9340e8, equivalently f45fbef604e05144057dec8d1dbfc5d4f5a2a822
Diffstat (limited to 'src/tools/lcc/cpp/cpp.c')
-rw-r--r-- | src/tools/lcc/cpp/cpp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/lcc/cpp/cpp.c b/src/tools/lcc/cpp/cpp.c index 6739e4d..5c0cfd7 100644 --- a/src/tools/lcc/cpp/cpp.c +++ b/src/tools/lcc/cpp/cpp.c @@ -9,7 +9,7 @@ char rcsid[] = "cpp.c - faked rcsid"; #define OUTS 16384 char outbuf[OUTS]; -char *outp = outbuf; +char *outbufp = outbuf; Source *cursource; int nerrs; struct token nltoken = { NL, 0, 0, 0, 1, (uchar*)"\n" }; @@ -51,7 +51,7 @@ process(Tokenrow *trp) for (;;) { if (trp->tp >= trp->lp) { trp->tp = trp->lp = trp->bp; - outp = outbuf; + outbufp = outbuf; anymacros |= gettokens(trp, 1); trp->tp = trp->bp; } @@ -204,9 +204,14 @@ control(Tokenrow *trp) error(WARNING, "Syntax error in #endif"); break; + case KWARNING: + trp->tp = tp+1; + error(WARNING, "#warning directive: %r", trp); + break; + case KERROR: trp->tp = tp+1; - error(WARNING, "#error directive: %r", trp); + error(ERROR, "#error directive: %r", trp); break; case KLINE: @@ -245,7 +250,6 @@ control(Tokenrow *trp) break; } setempty(trp); - return; } void * |