Commit 51be0f4c by Alan Mishchenko

One bug fix and two small changes.

parent 51bf1210
......@@ -13247,6 +13247,8 @@ int Abc_CommandRestore( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1;
}
Abc_FrameReplaceCurrentNetwork( pAbc, Abc_NtkDup(pAbc->pNtkBackup) );
pAbc->nFrames = -1;
pAbc->Status = -1;
return 0;
usage:
......@@ -25327,7 +25329,8 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Read( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Gia_Man_t * pAig;
extern void Abc3_ReadShowHie( char * pFileName, int fFlat );
Gia_Man_t * pAig = NULL;
FILE * pFile;
char ** pArgvNew;
char * FileName, * pTemp;
......@@ -25379,9 +25382,12 @@ int Abc_CommandAbc9Read( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( fUseMini )
pAig = Gia_ManReadMiniAig( FileName );
else
else if ( Extra_FileIsType( FileName, ".v", NULL, NULL ) )
Abc3_ReadShowHie( FileName, fSkipStrash );
else
pAig = Gia_AigerRead( FileName, fSkipStrash, 0 );
Abc_FrameUpdateGia( pAbc, pAig );
if ( pAig )
Abc_FrameUpdateGia( pAbc, pAig );
return 0;
usage:
......@@ -17,14 +17,14 @@ SRC += src/base/abci/abc.c \
src/base/abci/abcDsd.c \
src/base/abci/abcExtract.c \
src/base/abci/abcFraig.c \
src/base/abci/abcFx.c \
src/base/abci/abcFxu.c \
src/base/abci/abcGen.c \
src/base/abci/abcFx.c \
src/base/abci/abcFxu.c \
src/base/abci/abcGen.c \
src/base/abci/abcHaig.c \
src/base/abci/abcIf.c \
src/base/abci/abcIfif.c \
src/base/abci/abcIfMux.c \
src/base/abci/abcIvy.c \
src/base/abci/abcIvy.c \
src/base/abci/abcLog.c \
src/base/abci/abcLut.c \
src/base/abci/abcLutmin.c \
......
......@@ -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*************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment