X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=conout.cpp;h=5eb81db94dcac0dd3069fb244b3baf9bcaab7c26;hp=9d0659b4b691c3a9f44fb1b011af5f514b608cf2;hb=620bd76e76804b1fc1de46daa03724e23339e8bf;hpb=65362d93aa4678209bfeeba92fb5aa41f5955777 diff --git a/conout.cpp b/conout.cpp index 9d0659b..5eb81db 100644 --- a/conout.cpp +++ b/conout.cpp @@ -5,18 +5,18 @@ #define GMQCC_IS_STDERR(X) ((X) == stderr) #define GMQCC_IS_DEFINE(X) (GMQCC_IS_STDERR(X) || GMQCC_IS_STDOUT(X)) -typedef struct { +struct con_t { FILE *handle_err; FILE *handle_out; int color_err; int color_out; -} con_t; +}; static con_t console; /* * Enables color on output if supported. - * NOTE: The support for checking colors is NULL. On windows this will + * NOTE: The support for checking colors is nullptr. On windows this will * always work, on *nix it depends if the term has colors. * * NOTE: This prevents colored output to piped stdout/err via isatty @@ -138,7 +138,7 @@ static void con_vprintmsg_c(int level, const char *name, size_t line, size_t col } void con_vprintmsg(int level, const char *name, size_t line, size_t column, const char *msgtype, const char *msg, va_list ap) { - con_vprintmsg_c(level, name, line, column, msgtype, msg, ap, NULL); + con_vprintmsg_c(level, name, line, column, msgtype, msg, ap, nullptr); } void con_printmsg(int level, const char *name, size_t line, size_t column, const char *msgtype, const char *msg, ...) { @@ -176,7 +176,7 @@ void vcompile_error(lex_ctx_t ctx, const char *msg, va_list ap) con_cvprintmsg(ctx, LVL_ERROR, "error", msg, ap); } -void compile_error(lex_ctx_t ctx, const char *msg, ...) +void compile_error_(lex_ctx_t ctx, const char *msg, ...) { va_list ap; va_start(ap, msg); @@ -215,7 +215,7 @@ bool GMQCC_WARN vcompile_warning(lex_ctx_t ctx, int warntype, const char *fmt, v return OPTS_WERROR(warntype) && OPTS_FLAG(BAIL_ON_WERROR); } -bool GMQCC_WARN compile_warning(lex_ctx_t ctx, int warntype, const char *fmt, ...) +bool GMQCC_WARN compile_warning_(lex_ctx_t ctx, int warntype, const char *fmt, ...) { bool r; va_list ap;