diff --git a/nq/source/host.c b/nq/source/host.c index d966c116e..2574b819c 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -853,7 +853,6 @@ Host_Init (void) Cmd_Init_Hash (); Cvar_Init (); Sys_Init_Cvars (); - Sys_Init (); Cbuf_Init (); Cmd_Init (); diff --git a/nq/source/sys_sdl.c b/nq/source/sys_sdl.c index 120a7bc4d..e59a07cdc 100644 --- a/nq/source/sys_sdl.c +++ b/nq/source/sys_sdl.c @@ -80,18 +80,12 @@ int noconinput; #endif void -Sys_Init (void) +startup (void) { #ifdef WIN32 OSVERSIONINFO vinfo; -#endif -#ifdef USE_INTEL_ASM -#ifdef _WIN32 Sys_MaskExceptions (); -#endif -#endif -#ifdef _WIN32 // make sure the timer is high precision, otherwise NT gets 18ms resolution timeBeginPeriod (1); @@ -105,6 +99,8 @@ Sys_Init (void) Sys_Error ("This version of " PROGRAM " requires at least Win95 or NT 4.0"); } +#else + signal (SIGFPE, SIG_IGN); #endif } @@ -125,9 +121,7 @@ SDL_main (int c, char **v) { double time, oldtime, newtime; -#ifndef WIN32 - signal (SIGFPE, SIG_IGN); -#endif + startup (); memset (&host_parms, 0, sizeof (host_parms)); diff --git a/nq/source/sys_unix.c b/nq/source/sys_unix.c index 580f6ccb1..7705ad9c0 100644 --- a/nq/source/sys_unix.c +++ b/nq/source/sys_unix.c @@ -62,12 +62,6 @@ static const char rcsid[] = qboolean isDedicated = false; - -void -Sys_Init (void) -{ -} - static void shutdown (void) { diff --git a/nq/source/sys_unixd.c b/nq/source/sys_unixd.c index bb140a582..2676966e5 100644 --- a/nq/source/sys_unixd.c +++ b/nq/source/sys_unixd.c @@ -76,11 +76,6 @@ shutdown (void) fflush (stdout); } -void -Sys_Init (void) -{ -} - int main (int argc, const char **argv) { diff --git a/nq/source/sys_win.c b/nq/source/sys_win.c index 80bdb13c7..d1d2b6c45 100644 --- a/nq/source/sys_win.c +++ b/nq/source/sys_win.c @@ -93,7 +93,7 @@ findhandle (void) void -Sys_Init (void) +startup (void) { LARGE_INTEGER PerformanceFreq; unsigned int lowpart, highpart; @@ -179,6 +179,8 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, if (hPrevInstance) return 0; + startup (); + global_hInstance = hInstance; global_nCmdShow = nCmdShow; diff --git a/nq/source/sys_wind.c b/nq/source/sys_wind.c index d901693c5..0ec9cfc4d 100644 --- a/nq/source/sys_wind.c +++ b/nq/source/sys_wind.c @@ -52,11 +52,6 @@ shutdown (void) { } -void -Sys_Init (void) -{ -} - const char *newargv[256]; int diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 072e7cdaf..d73fbd371 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -1668,7 +1668,6 @@ Host_Init (void) Cmd_Init_Hash (); Cvar_Init (); Sys_Init_Cvars (); - Sys_Init (); Cbuf_Init (); Cmd_Init (); diff --git a/qw/source/cl_sys_sdl.c b/qw/source/cl_sys_sdl.c index df95a67e8..9ae1044d2 100644 --- a/qw/source/cl_sys_sdl.c +++ b/qw/source/cl_sys_sdl.c @@ -81,13 +81,11 @@ int noconinput; #endif void -Sys_Init (void) +startup (void) { #ifdef WIN32 OSVERSIONINFO vinfo; -#endif -#ifdef _WIN32 // make sure the timer is high precision, otherwise NT gets 18ms resolution timeBeginPeriod (1); @@ -101,6 +99,8 @@ Sys_Init (void) Sys_Error ("This version of " PROGRAM " requires at least Win95 or NT 4.0"); } +#else + signal (SIGFPE, SIG_IGN); #endif } @@ -121,9 +121,7 @@ SDL_main (int c, char **v) { double time, oldtime, newtime; -#ifndef WIN32 - signal (SIGFPE, SIG_IGN); -#endif + startup (); memset (&host_parms, 0, sizeof (host_parms)); diff --git a/qw/source/cl_sys_unix.c b/qw/source/cl_sys_unix.c index e8a79f3f4..b188cc53a 100644 --- a/qw/source/cl_sys_unix.c +++ b/qw/source/cl_sys_unix.c @@ -63,11 +63,6 @@ int noconinput = 0; qboolean is_server = false; char *svs_info; -void -Sys_Init (void) -{ -} - static void shutdown (void) { diff --git a/qw/source/cl_sys_win.c b/qw/source/cl_sys_win.c index 12a444245..8a96ab11b 100644 --- a/qw/source/cl_sys_win.c +++ b/qw/source/cl_sys_win.c @@ -77,7 +77,7 @@ HANDLE qwclsemaphore; static HANDLE tevent; void -Sys_Init (void) +startup (void) { OSVERSIONINFO vinfo; @@ -154,6 +154,8 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, if (hPrevInstance) return 0; + startup (); + global_hInstance = hInstance; global_nCmdShow = nCmdShow; diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index eab985ccb..19bbf7596 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -2412,7 +2412,6 @@ SV_Init (void) Cmd_Init_Hash (); Cvar_Init (); Sys_Init_Cvars (); - Sys_Init (); Cvar_Get ("cmd_warncmd", "1", CVAR_NONE, NULL, NULL); diff --git a/qw/source/sv_sys_unix.c b/qw/source/sv_sys_unix.c index 90058a60e..998ac9bca 100644 --- a/qw/source/sv_sys_unix.c +++ b/qw/source/sv_sys_unix.c @@ -111,7 +111,7 @@ wrfpcr(unsigned long val) #endif void -Sys_Init (void) +startup (void) { #ifdef __alpha__ wrfpcr (rdfpcr () | 1L << 47); @@ -123,6 +123,8 @@ main (int argc, const char *argv[]) { double time, oldtime, newtime; + startup (); + memset (&host_parms, 0, sizeof (host_parms)); COM_InitArgv (argc, argv); diff --git a/qw/source/sv_sys_win.c b/qw/source/sv_sys_win.c index c5e9e3628..5d8e7c666 100644 --- a/qw/source/sv_sys_win.c +++ b/qw/source/sv_sys_win.c @@ -48,7 +48,7 @@ info_t **svs_info = &svs.info; void -Sys_Init (void) +startup (void) { OSVERSIONINFO vinfo; @@ -78,6 +78,8 @@ main (int argc, const char **argv) { double newtime, time, oldtime; + startup (); + COM_InitArgv (argc, argv); host_parms.argc = com_argc;