diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-05-25 18:19:38 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-05-25 18:19:38 -0700 |
commit | d0bbb46191e1f87244bd792b340b5e2785dd0d99 (patch) | |
tree | c277d44de72a4903f2913aabd2b72c3418b8e1bd /src/aig | |
parent | 14b7a520a14eba14aeb8ae63f692e23add5c660f (diff) | |
download | abc-d0bbb46191e1f87244bd792b340b5e2785dd0d99.tar.gz abc-d0bbb46191e1f87244bd792b340b5e2785dd0d99.tar.bz2 abc-d0bbb46191e1f87244bd792b340b5e2785dd0d99.zip |
Changing the way extension 'b' is written.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaAiger.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/aig/gia/giaAiger.c b/src/aig/gia/giaAiger.c index bc40e4ca..6457927b 100644 --- a/src/aig/gia/giaAiger.c +++ b/src/aig/gia/giaAiger.c @@ -680,8 +680,10 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipS pNew->pCellStr = Abc_UtilStrsav( (char*)pCur ); pCur += strlen((char*)pCur) + 1; nSize = nSize - strlen(pNew->pCellStr) - 1; assert( nSize % 4 == 0 ); - pNew->vConfigs = Vec_IntStart(nSize / 4); - memcpy(Vec_IntArray(pNew->vConfigs), pCur, nSize); pCur += nSize; + pNew->vConfigs = Vec_IntAlloc(nSize / 4); +// memcpy(Vec_IntArray(pNew->vConfigs), pCur, nSize); pCur += nSize; + for ( i = 0; i < nSize / 4; i++ ) + Vec_IntPush( pNew->vConfigs, Gia_AigerReadInt(pCur) ), pCur += 4; assert( pCur == pCurTemp ); if ( fVerbose ) printf( "Finished reading extension \"b\".\n" ); } @@ -1289,7 +1291,9 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int assert( p->pCellStr != NULL ); Gia_FileWriteBufferSize( pFile, 4*Vec_IntSize(p->vConfigs) + strlen(p->pCellStr) + 1 ); fwrite( p->pCellStr, 1, strlen(p->pCellStr) + 1, pFile ); - fwrite( Vec_IntArray(p->vConfigs), 1, 4*Vec_IntSize(p->vConfigs), pFile ); +// fwrite( Vec_IntArray(p->vConfigs), 1, 4*Vec_IntSize(p->vConfigs), pFile ); + for ( i = 0; i < Vec_IntSize(p->vConfigs); i++ ) + Gia_FileWriteBufferSize( pFile, Vec_IntEntry(p->vConfigs, i) ); } // write choices if ( Gia_ManHasChoices(p) ) |