// =======================================================================
void Sys_Shutdown (void)
{
+#ifndef WIN32
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
+#endif
fflush(stdout);
}
char string[MAX_INPUTLINE];
// change stdin to non blocking
+#ifndef WIN32
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
-
+#endif
va_start (argptr,error);
dpvsnprintf (string, sizeof (string), error, argptr);
va_end (argptr);
// BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
// this is because both go to /dev/tty by default!
{
+#ifndef WIN32
int origflags = fcntl (sys.outfd, F_GETFL, 0);
fcntl (sys.outfd, F_SETFL, origflags & ~O_NDELAY);
-#ifdef WIN32
+#else
#define write _write
#endif
while(*text)
break; // sorry, I cannot do anything about this error - without an output
text += written;
}
+#ifndef WIN32
fcntl (sys.outfd, F_SETFL, origflags);
+#endif
}
//fprintf(stdout, "%s", text);
}
sys.outfd = 2;
else
sys.outfd = 1;
-
+#ifndef WIN32
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY);
-
+#endif
Host_Main();
return 0;