X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=ftepp.c;h=6f2bb9316e9dc0578dfc1a0367e7ddfe082c5b83;hb=20d65da321c8f0da66f187913563e8b0649ea9bc;hp=34ca698c8702e03c65361f0bba4d7225e9c7e0a9;hpb=facd89b188fd9120b8d5405b4d0a05d7d1557b07;p=xonotic%2Fgmqcc.git diff --git a/ftepp.c b/ftepp.c index 34ca698..6f2bb93 100644 --- a/ftepp.c +++ b/ftepp.c @@ -77,7 +77,7 @@ static void ftepp_errorat(ftepp_t *ftepp, lex_ctx ctx, const char *fmt, ...) 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); } @@ -88,7 +88,7 @@ static void ftepp_error(ftepp_t *ftepp, const char *fmt, ...) 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); } @@ -106,7 +106,7 @@ static bool GMQCC_WARN ftepp_warn(ftepp_t *ftepp, int warntype, const char *fmt, } 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; } @@ -134,8 +134,9 @@ static void pptoken_delete(pptoken *self) 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;