X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sys_unix.c;h=7fdd1df970917562f9aefa0b08cc39b875626d30;hb=49b4a7773641bbf2a0395bfc43534dc5fa8b5f5f;hp=09929a3793af656f70fda90e4069fa270bc5281f;hpb=efa1b13f3b4e1b512309d16f51d1e2e28d32c013;p=xonotic%2Fdarkplaces.git diff --git a/sys_unix.c b/sys_unix.c index 09929a37..7fdd1df9 100644 --- a/sys_unix.c +++ b/sys_unix.c @@ -22,7 +22,7 @@ sys_t sys; void Sys_Shutdown (void) { #ifndef WIN32 - fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY); + fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK); #endif fflush(stdout); } @@ -34,7 +34,7 @@ void Sys_Error (const char *error, ...) // change stdin to non blocking #ifndef WIN32 - fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY); + fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK); #endif va_start (argptr,error); dpvsnprintf (string, sizeof (string), error, argptr); @@ -55,7 +55,7 @@ void Sys_PrintToTerminal(const char *text) { #ifndef WIN32 int origflags = fcntl (sys.outfd, F_GETFL, 0); - fcntl (sys.outfd, F_SETFL, origflags & ~O_NDELAY); + fcntl (sys.outfd, F_SETFL, origflags & ~O_NONBLOCK); #else #define write _write #endif @@ -162,10 +162,16 @@ int main (int argc, char **argv) else sys.outfd = 1; #ifndef WIN32 - fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY); + fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK); #endif + + // used by everything + Memory_Init(); + Host_Main(); + Sys_Quit(0); + return 0; }