mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-19 06:40:49 +00:00
con_default_out for opts.pp_only (removes recently added TODO .. and fixes a segfault)
This commit is contained in:
parent
c3964cf29d
commit
3b27107676
3 changed files with 15 additions and 1 deletions
11
conout.c
11
conout.c
|
@ -289,6 +289,17 @@ int con_change(const char *out, const char *err) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Defaultizer because stdio.h shouldn't be used anywhere except here
|
||||
* and inside file.c To prevent mis-match of wrapper-interfaces.
|
||||
*/
|
||||
void con_default_out() {
|
||||
console.handle_out = stdout;
|
||||
}
|
||||
void con_default_err() {
|
||||
console.handle_err = stderr;
|
||||
}
|
||||
|
||||
int con_verr(const char *fmt, va_list va) {
|
||||
return con_write(console.handle_err, fmt, va);
|
||||
}
|
||||
|
|
3
gmqcc.h
3
gmqcc.h
|
@ -663,6 +663,9 @@ enum {
|
|||
LVL_ERROR
|
||||
};
|
||||
|
||||
void con_default_out();
|
||||
void con_default_err();
|
||||
|
||||
void con_vprintmsg (int level, const char *name, size_t line, const char *msgtype, const char *msg, va_list ap);
|
||||
void con_printmsg (int level, const char *name, size_t line, const char *msgtype, const char *msg, ...);
|
||||
void con_cvprintmsg(void *ctx, int lvl, const char *msgtype, const char *msg, va_list ap);
|
||||
|
|
2
main.c
2
main.c
|
@ -566,7 +566,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* TODO: stdout without stdout .. */
|
||||
con_default_out();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue