X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=error.c;h=e6a1c7da2f5f499f483d03b2de47c462e0756803;hb=fc1622140b4569d2623113fab9fe757a9b66efc6;hp=daac62b9ef3cf7b34c046714310c6eaa2d70bf3c;hpb=965331f315810f54aef2ad63e221bcf993598afc;p=xonotic%2Fgmqcc.git diff --git a/error.c b/error.c index daac62b..e6a1c7d 100644 --- a/error.c +++ b/error.c @@ -40,9 +40,9 @@ int levelcolor[] = { void vprintmsg(int level, const char *name, size_t line, const char *msgtype, const char *msg, va_list ap) { #ifndef WIN32 - fprintf (stderr, "\033[0;%dm%s:%d: \033[0;%dm%s: \033[0m", CON_CYAN, name, (int)line, levelcolor[level], errtype); + fprintf (stderr, "\033[0;%dm%s:%d: \033[0;%dm%s: \033[0m", CON_CYAN, name, (int)line, levelcolor[level], msgtype); #else - fprintf (stderr, "%s:%d: %s: ", name, line, errtype); + fprintf (stderr, "%s:%d: %s: ", name, line, msgtype); #endif vfprintf(stderr, msg, ap); fprintf (stderr, "\n"); @@ -52,13 +52,13 @@ void printmsg(int level, const char *name, size_t line, const char *msgtype, con { va_list va; va_start(va, msg); - vprintmsg(level, name, line, errtype, msg, va); + vprintmsg(level, name, line, msgtype, msg, va); va_end (va); } void cvprintmsg(lex_ctx ctx, int lvl, const char *msgtype, const char *msg, va_list ap) { - vprintmsg(lvl, ctx.name, ctx.line, msgtype, msg, ap); + vprintmsg(lvl, ctx.file, ctx.line, msgtype, msg, ap); } void cprintmsg (lex_ctx ctx, int lvl, const char *msgtype, const char *msg, ...)