diff options
Diffstat (limited to 'src/base/io')
-rw-r--r-- | src/base/io/ioReadBlifMv.c | 1 | ||||
-rw-r--r-- | src/base/io/ioReadPla.c | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/base/io/ioReadBlifMv.c b/src/base/io/ioReadBlifMv.c index 00b2a5e6..cc8bff17 100644 --- a/src/base/io/ioReadBlifMv.c +++ b/src/base/io/ioReadBlifMv.c @@ -232,6 +232,7 @@ Abc_Ntk_t * Io_ReadBlifMv( char * pFileName, int fBlifMv, int fCheck ) Vec_PtrForEachEntry( char *, vGlobalLtlArray, pLtlProp, i ) Vec_PtrPush( pNtk->vLtlProperties, pLtlProp ); + Vec_PtrFreeP( &vGlobalLtlArray ); return pNtk; } diff --git a/src/base/io/ioReadPla.c b/src/base/io/ioReadPla.c index 85029ce8..63ffa296 100644 --- a/src/base/io/ioReadPla.c +++ b/src/base/io/ioReadPla.c @@ -51,6 +51,7 @@ Abc_Ntk_t * Io_ReadPla( char * pFileName, int fZeros, int fCheck ) // start the file p = Extra_FileReaderAlloc( pFileName, "#", "\n\r", " \t|" ); +// p = Extra_FileReaderAlloc( pFileName, "", "\n\r", " \t|" ); if ( p == NULL ) return NULL; @@ -91,7 +92,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros ) int nInputs = -1, nOutputs = -1, nProducts = -1; char * pCubeIn, * pCubeOut; int i, k, iLine, nDigits, nCubes; - + // allocate the empty network pNtk = Abc_NtkStartRead( Extra_FileReaderGetFileName(p) ); @@ -103,9 +104,17 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros ) Extra_ProgressBarUpdate( pProgress, Extra_FileReaderGetCurPosition(p), NULL ); // if it is the end of file, quit the loop - if ( strcmp( (char *)vTokens->pArray[0], ".e" ) == 0 ) + if ( strncmp( (char *)vTokens->pArray[0], ".e", 2 ) == 0 ) break; + // if it is the model name, get the name + if ( strcmp( (char *)vTokens->pArray[0], ".model" ) == 0 ) + { + ABC_FREE( pNtk->pName ); + pNtk->pName = Extra_UtilStrsav( (char *)vTokens->pArray[1] ); + continue; + } + if ( vTokens->nSize == 1 ) { printf( "%s (line %d): Wrong number of token.\n", |