From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 15:08:41 +0000 (+0100) Subject: linecounting issues in the ftepp X-Git-Tag: 0.1.9~266 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=07fa97b8e741cf31f1b2dfee9d39643d99cf598e;p=xonotic%2Fgmqcc.git linecounting issues in the ftepp --- diff --git a/ftepp.c b/ftepp.c index 1e45de9..d6cdb3d 100644 --- a/ftepp.c +++ b/ftepp.c @@ -295,6 +295,7 @@ static bool ftepp_define_params(ftepp_t *ftepp, ppmacro *macro) static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro) { pptoken *ptok; + size_t l = ftepp_ctx(ftepp).line; while (ftepp->token != TOKEN_EOL && ftepp->token < TOKEN_EOF) { ptok = pptoken_make(ftepp); vec_push(macro->output, ptok); @@ -305,6 +306,8 @@ static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro) ftepp_error(ftepp, "unexpected junk after macro or unexpected end of file"); return false; } + for (; l < ftepp_ctx(ftepp).line; ++l) + ftepp_out(ftepp, "\n", true); return true; }