mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Remove unused AddSubdirectoryToPath() & FileIsOlderThanFile()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user