Make the console line-bufered. woot.

This commit is contained in:
Adam Olsen 2001-08-09 12:19:15 +00:00
parent 0c63c11b4b
commit 4cd037f025
2 changed files with 7 additions and 2 deletions

View file

@ -33,6 +33,7 @@
# include "config.h"
#endif
#include <stdarg.h>
#include <stdio.h>
#include "QF/console.h"
#include "QF/cvar.h"
@ -44,9 +45,10 @@ void
Con_Init (const char *plugin_name)
{
con_module = PI_LoadPlugin ("console", plugin_name);
if (con_module) {
if (con_module)
con_module->functions->general->p_Init ();
}
else
setvbuf (stdout, 0, _IOLBF, BUFSIZ);
}
void

View file

@ -141,6 +141,9 @@ Con_Init (const char *plugin_name)
wrefresh (output);
wrefresh (status);
wrefresh (input);
#else
if (setvbuf (stdout, 0, _IONBF, BUFSIZ))
Con_Printf ("warning: couldn't set stdout to linebuffered.\n");
#endif
}