#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
}
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, ...) {