One bug fix and two small changes.

This commit is contained in:
Alan Mishchenko
2014-10-22 20:17:09 -07:00
parent 51bf121073
commit 51be0f4c52
4 changed files with 27 additions and 7 deletions
+1
View File
@@ -104,6 +104,7 @@ extern char * Extra_FileNameAppend( char * pBase, char * pSuffix );
extern char * Extra_FileNameGeneric( char * FileName );
extern char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix );
extern char * Extra_FileNameWithoutPath( char * FileName );
extern char * Extra_FilePathWithoutName( char * FileName );
extern int Extra_FileCheck( char * pFileName );
extern int Extra_FileSize( char * pFileName );
extern char * Extra_FileRead( FILE * pFile );
+13
View File
@@ -213,6 +213,19 @@ char * Extra_FileNameWithoutPath( char * FileName )
return pRes + 1;
return FileName;
}
char * Extra_FilePathWithoutName( char * FileName )
{
char * pRes;
FileName = Abc_UtilStrsav( FileName );
for ( pRes = FileName + strlen(FileName) - 1; pRes >= FileName; pRes-- )
if ( *pRes == '\\' || *pRes == '/' )
{
*pRes = 0;
return FileName;
}
ABC_FREE( FileName );
return NULL;
}
/**Function*************************************************************