Actually fix the segfault this time

This commit is contained in:
Dale Weiler 2012-12-23 08:08:05 +00:00
parent 3b27107676
commit f598fbeaea
3 changed files with 7 additions and 7 deletions

View file

@ -293,11 +293,11 @@ int con_change(const char *out, const char *err) {
* 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;
FILE *con_default_out() {
return (console.handle_out = stdout);
}
void con_default_err() {
console.handle_err = stderr;
FILE *con_default_err() {
return (console.handle_err = stderr);
}
int con_verr(const char *fmt, va_list va) {

View file

@ -663,8 +663,8 @@ enum {
LVL_ERROR
};
void con_default_out();
void con_default_err();
FILE *con_default_out();
FILE *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, ...);

2
main.c
View file

@ -566,7 +566,7 @@ int main(int argc, char **argv) {
}
}
else {
con_default_out();
outfile = con_default_out();
}
}