Remove unused AddSubdirectoryToPath() & FileIsOlderThanFile()

This commit is contained in:
Asdow
2023-10-21 15:38:31 +03:00
parent c07f3f460b
commit b7f974f41b
2 changed files with 0 additions and 79 deletions
-71
View File
@@ -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;
-8
View File
@@ -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( );