ftepp->errors++;
va_start(ap, fmt);
- con_vprintmsg(LVL_ERROR, ctx.file, ctx.line, "error", fmt, ap);
+ con_cvprintmsg((void*)&ctx, LVL_ERROR, "error", fmt, ap);
va_end(ap);
}
ftepp->errors++;
va_start(ap, fmt);
- con_vprintmsg(LVL_ERROR, ftepp->lex->tok.ctx.file, ftepp->lex->tok.ctx.line, "error", fmt, ap);
+ con_cvprintmsg((void*)&ftepp->lex->tok.ctx, LVL_ERROR, "error", fmt, ap);
va_end(ap);
}
}
va_start(ap, fmt);
- con_vprintmsg(lvl, ftepp->lex->tok.ctx.file, ftepp->lex->tok.ctx.line, "error", fmt, ap);
+ con_cvprintmsg((void*)&ftepp->lex->tok.ctx, lvl, "error", fmt, ap);
va_end(ap);
return opts_werror;
}
static ppmacro *ppmacro_new(lex_ctx ctx, const char *name)
{
- (void)ctx;
ppmacro *macro = (ppmacro*)mem_a(sizeof(ppmacro));
+
+ (void)ctx;
memset(macro, 0, sizeof(*macro));
macro->name = util_strdup(name);
return macro;
con_out("failed to open file \"%s\"\n", filename);
return false;
}
- if (!ftepp_preprocess(ftepp)) {
- ftepp_delete(ftepp);
+ if (!ftepp_preprocess(ftepp))
return false;
- }
return ftepp_preprocess_done();
}
con_out("failed to create lexer for string \"%s\"\n", name);
return false;
}
- if (!ftepp_preprocess(ftepp)) {
- ftepp_delete(ftepp);
+ if (!ftepp_preprocess(ftepp))
return false;
- }
return ftepp_preprocess_done();
}