mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
linecounting...
This commit is contained in:
parent
04347508e6
commit
b457bfec2a
1 changed files with 5 additions and 3 deletions
8
ftepp.c
8
ftepp.c
|
@ -295,7 +295,6 @@ static bool ftepp_define_params(ftepp_t *ftepp, ppmacro *macro)
|
||||||
static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro)
|
static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro)
|
||||||
{
|
{
|
||||||
pptoken *ptok;
|
pptoken *ptok;
|
||||||
size_t l = ftepp_ctx(ftepp).line;
|
|
||||||
while (ftepp->token != TOKEN_EOL && ftepp->token < TOKEN_EOF) {
|
while (ftepp->token != TOKEN_EOL && ftepp->token < TOKEN_EOF) {
|
||||||
ptok = pptoken_make(ftepp);
|
ptok = pptoken_make(ftepp);
|
||||||
vec_push(macro->output, ptok);
|
vec_push(macro->output, ptok);
|
||||||
|
@ -306,14 +305,14 @@ static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro)
|
||||||
ftepp_error(ftepp, "unexpected junk after macro or unexpected end of file");
|
ftepp_error(ftepp, "unexpected junk after macro or unexpected end of file");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (; l < ftepp_ctx(ftepp).line; ++l)
|
|
||||||
ftepp_out(ftepp, "\n", true);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ftepp_define(ftepp_t *ftepp)
|
static bool ftepp_define(ftepp_t *ftepp)
|
||||||
{
|
{
|
||||||
ppmacro *macro;
|
ppmacro *macro;
|
||||||
|
size_t l = ftepp_ctx(ftepp).line;
|
||||||
|
|
||||||
(void)ftepp_next(ftepp);
|
(void)ftepp_next(ftepp);
|
||||||
if (!ftepp_skipspace(ftepp))
|
if (!ftepp_skipspace(ftepp))
|
||||||
return false;
|
return false;
|
||||||
|
@ -354,6 +353,9 @@ static bool ftepp_define(ftepp_t *ftepp)
|
||||||
else {
|
else {
|
||||||
ppmacro_delete(macro);
|
ppmacro_delete(macro);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (; l < ftepp_ctx(ftepp).line; ++l)
|
||||||
|
ftepp_out(ftepp, "\n", true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue