From b7f974f41b7e1deec03e023fb64788da4bcc35ae Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:01:15 +0300 Subject: [PATCH] Remove unused AddSubdirectoryToPath() & FileIsOlderThanFile() --- Standard Gaming Platform/FileMan.cpp | 71 ---------------------------- Standard Gaming Platform/FileMan.h | 8 ---- 2 files changed, 79 deletions(-) diff --git a/Standard Gaming Platform/FileMan.cpp b/Standard Gaming Platform/FileMan.cpp index cd631004..a127ee77 100644 --- a/Standard Gaming Platform/FileMan.cpp +++ b/Standard Gaming Platform/FileMan.cpp @@ -952,77 +952,6 @@ UINT32 FileSize(STR strFilename) } -//************************************************************************** -// -// AddSubdirectoryToPath -// -// Puts a subdirectory of the current working directory into the current -// task's system path. -// -// Parameter List : -// Return Value : -// Modification history : -// -// 10June98:DB ->creation -// -//************************************************************************** -BOOLEAN AddSubdirectoryToPath(CHAR8 *pDirectory) -{ -CHAR8 *pSystemPath; -CHAR8 *pPath; -UINT32 uiPathLen; - - // Check for NULL - if(!pDirectory) - return(FALSE); - - // Check for zero length string - if(!strlen(pDirectory)) - return(FALSE); - - if((pSystemPath=(CHAR8 *)MemAlloc(_MAX_PATH))==NULL) - return(FALSE); - - memset(pSystemPath, 0, _MAX_PATH); - - if((pPath=(CHAR8 *)MemAlloc(_MAX_PATH))==NULL) - { - MemFree(pSystemPath); - return(FALSE); - } - - memset(pPath, 0, _MAX_PATH); - - // Builds a path to the directory with the SR DLL files. - _getcwd(pPath, _MAX_PATH); - uiPathLen=strlen(pPath); - if(uiPathLen) - uiPathLen--; - if(pPath[uiPathLen]!='\\') - strcat(pPath, "\\"); - - strcat(pPath, pDirectory); - - // Appends it to the path for the current task - if(GetEnvironmentVariable("PATH", pSystemPath, _MAX_PATH)) - { - strcat(pSystemPath, ";"); - strcat(pSystemPath, pPath); - SetEnvironmentVariable("PATH", pSystemPath); - MemFree(pSystemPath); - MemFree(pPath); - return(TRUE); - } - else - { - MemFree(pSystemPath); - MemFree(pPath); - return(FALSE); - } - -} - - UINT32 GetFreeSpaceOnHardDriveWhereGameIsRunningFrom( ) { STRING512 zExecDir; diff --git a/Standard Gaming Platform/FileMan.h b/Standard Gaming Platform/FileMan.h index 1b21e8bc..428b213b 100644 --- a/Standard Gaming Platform/FileMan.h +++ b/Standard Gaming Platform/FileMan.h @@ -148,14 +148,6 @@ void GetFileClose( GETFILESTRUCT *pGFStruct ); //returns true if at end of file, else false BOOLEAN FileCheckEndOfFile( HWFILE hFile ); -// One call comparison of file times, allowing for a certain leeway in cases where -// files times may be slightly different due to SourceSafe of copying -BOOLEAN FileIsOlderThanFile(CHAR8 *pcFileName1, CHAR8 *pcFileName2, UINT32 ulNumSeconds); - - -BOOLEAN AddSubdirectoryToPath(CHAR8 *pDirectory); - - //Gets the amount of free space on the hard drive that the main executeablt is runnning from UINT32 GetFreeSpaceOnHardDriveWhereGameIsRunningFrom( );