mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-07 03:05:36 +02:00
One bug fix and two small changes.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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*************************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user