git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9619
d7cf8633-e32d-0410-b094-
e92efae38249
// =======================================================================
void Sys_Shutdown (void)
{
// =======================================================================
void Sys_Shutdown (void)
{
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
#endif
fflush(stdout);
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
#endif
fflush(stdout);
char string[MAX_INPUTLINE];
// change stdin to non blocking
char string[MAX_INPUTLINE];
// change stdin to non blocking
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
#endif
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
#endif
void Sys_PrintToTerminal(const char *text)
{
void Sys_PrintToTerminal(const char *text)
{
// BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
int origflags = fcntl (1, F_GETFL, 0);
fcntl (1, F_SETFL, origflags & ~FNDELAY);
// BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
int origflags = fcntl (1, F_GETFL, 0);
fcntl (1, F_SETFL, origflags & ~FNDELAY);
#define write _write
#endif
while(*text)
#define write _write
#endif
while(*text)
break; // sorry, I cannot do anything about this error - without an output
text += written;
}
break; // sorry, I cannot do anything about this error - without an output
text += written;
}
fcntl (1, F_SETFL, origflags);
#endif
//fprintf(stdout, "%s", text);
fcntl (1, F_SETFL, origflags);
#endif
//fprintf(stdout, "%s", text);
com_argc = argc;
com_argv = (const char **)argv;
com_argc = argc;
com_argv = (const char **)argv;
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
#endif
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
#endif