From 89e3e3215e93439e265068facfc36b508d52a05b Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Mon, 15 Jun 2015 19:08:28 +0200 Subject: stop referencing the current working directory remove Sys_GetCwd() --- src/sys/sys_main.c | 5 +---- src/sys/sys_unix.c | 18 ------------------ src/sys/sys_win32.c | 14 -------------- 3 files changed, 1 insertion(+), 36 deletions(-) (limited to 'src/sys') diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index fbb0c5b4..c45b96c8 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -83,10 +83,7 @@ Sys_DefaultInstallPath */ char *Sys_DefaultInstallPath(void) { - if (*installPath) - return installPath; - else - return Sys_Cwd(); + return installPath; } /* diff --git a/src/sys/sys_unix.c b/src/sys/sys_unix.c index 22af0fcf..3caed9fd 100644 --- a/src/sys/sys_unix.c +++ b/src/sys/sys_unix.c @@ -237,24 +237,6 @@ FILE *Sys_Mkfifo( const char *ospath ) return fifo; } -/* -================== -Sys_Cwd -================== -*/ -char *Sys_Cwd( void ) -{ - static char cwd[MAX_OSPATH]; - - char *result = getcwd( cwd, sizeof( cwd ) - 1 ); - if( result != cwd ) - return NULL; - - cwd[MAX_OSPATH-1] = 0; - - return cwd; -} - /* ============================================================== diff --git a/src/sys/sys_win32.c b/src/sys/sys_win32.c index d8e589b0..fb0f51a7 100644 --- a/src/sys/sys_win32.c +++ b/src/sys/sys_win32.c @@ -293,20 +293,6 @@ FILE *Sys_Mkfifo( const char *ospath ) return NULL; } -/* -============== -Sys_Cwd -============== -*/ -char *Sys_Cwd( void ) { - static char cwd[MAX_OSPATH]; - - _getcwd( cwd, sizeof( cwd ) - 1 ); - cwd[MAX_OSPATH-1] = 0; - - return cwd; -} - /* ============================================================== -- cgit