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/qcommon/qcommon.h | 1 - src/sys/sys_main.c | 5 +---- src/sys/sys_unix.c | 18 ------------------ src/sys/sys_win32.c | 14 -------------- 4 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index 0413a36c..495c9ca1 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -1072,7 +1072,6 @@ void Sys_ShowIP(void); FILE *Sys_FOpen( const char *ospath, const char *mode ); qboolean Sys_Mkdir( const char *path ); FILE *Sys_Mkfifo( const char *ospath ); -char *Sys_Cwd( void ); void Sys_SetDefaultInstallPath(const char *path); char *Sys_DefaultInstallPath(void); 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