diff options
Diffstat (limited to 'src/base/io')
-rw-r--r-- | src/base/io/ioReadAiger.c | 14 | ||||
-rw-r--r-- | src/base/io/ioReadBaf.c | 3 | ||||
-rw-r--r-- | src/base/io/ioReadBlifAig.c | 3 | ||||
-rw-r--r-- | src/base/io/ioReadBlifMv.c | 3 |
4 files changed, 17 insertions, 6 deletions
diff --git a/src/base/io/ioReadAiger.c b/src/base/io/ioReadAiger.c index 55ef16db..0644aed9 100644 --- a/src/base/io/ioReadAiger.c +++ b/src/base/io/ioReadAiger.c @@ -21,9 +21,15 @@ // The code in this file is developed in collaboration with Mark Jarvin of Toronto. +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include <time.h> + #include "src/misc/bzlib/bzlib.h" -#include "ioAbc.h" #include "src/misc/zlib/zlib.h" +#include "ioAbc.h" ABC_NAMESPACE_IMPL_START @@ -119,6 +125,7 @@ static char * Ioa_ReadLoadFileBz2Aig( char * pFileName, int * pFileSize ) int bzError; struct buflist * pNext; buflist * bufHead = NULL, * buf = NULL; + int RetValue; pFile = fopen( pFileName, "rb" ); if ( pFile == NULL ) @@ -165,7 +172,7 @@ static char * Ioa_ReadLoadFileBz2Aig( char * pFileName, int * pFileSize ) } pContents = ABC_ALLOC( char, nFileSize + 10 ); rewind( pFile ); - fread( pContents, nFileSize, 1, pFile ); + RetValue = fread( pContents, nFileSize, 1, pFile ); } else { // Some other error. printf( "Ioa_ReadLoadFileBz2(): Unable to read the compressed BLIF.\n" ); @@ -238,6 +245,7 @@ Abc_Ntk_t * Io_ReadAiger( char * pFileName, int fCheck ) int nFileSize = -1, iTerm, nDigits, i; char * pContents, * pDrivers = NULL, * pSymbols, * pCur, * pName, * pType; unsigned uLit0, uLit1, uLit; + int RetValue; // read the file into the buffer if ( !strncmp(pFileName+strlen(pFileName)-4,".bz2",4) ) @@ -250,7 +258,7 @@ Abc_Ntk_t * Io_ReadAiger( char * pFileName, int fCheck ) nFileSize = Extra_FileSize( pFileName ); pFile = fopen( pFileName, "rb" ); pContents = ABC_ALLOC( char, nFileSize ); - fread( pContents, nFileSize, 1, pFile ); + RetValue = fread( pContents, nFileSize, 1, pFile ); fclose( pFile ); } diff --git a/src/base/io/ioReadBaf.c b/src/base/io/ioReadBaf.c index 95c63539..d3ba46be 100644 --- a/src/base/io/ioReadBaf.c +++ b/src/base/io/ioReadBaf.c @@ -52,12 +52,13 @@ Abc_Ntk_t * Io_ReadBaf( char * pFileName, int fCheck ) int nInputs, nOutputs, nLatches, nAnds, nFileSize, Num, i; char * pContents, * pName, * pCur; unsigned * pBufferNode; + int RetValue; // read the file into the buffer nFileSize = Extra_FileSize( pFileName ); pFile = fopen( pFileName, "rb" ); pContents = ABC_ALLOC( char, nFileSize ); - fread( pContents, nFileSize, 1, pFile ); + RetValue = fread( pContents, nFileSize, 1, pFile ); fclose( pFile ); // skip the comments (comment lines begin with '#' and end with '\n') diff --git a/src/base/io/ioReadBlifAig.c b/src/base/io/ioReadBlifAig.c index f365cb4d..4bdb035e 100644 --- a/src/base/io/ioReadBlifAig.c +++ b/src/base/io/ioReadBlifAig.c @@ -433,6 +433,7 @@ static char * Io_BlifLoadFile( char * pFileName ) FILE * pFile; int nFileSize; char * pContents; + int RetValue; pFile = fopen( pFileName, "rb" ); if ( pFile == NULL ) { @@ -449,7 +450,7 @@ static char * Io_BlifLoadFile( char * pFileName ) } pContents = ABC_ALLOC( char, nFileSize + 10 ); rewind( pFile ); - fread( pContents, nFileSize, 1, pFile ); + RetValue = fread( pContents, nFileSize, 1, pFile ); fclose( pFile ); // finish off the file with the spare .end line // some benchmarks suddenly break off without this line diff --git a/src/base/io/ioReadBlifMv.c b/src/base/io/ioReadBlifMv.c index 3e226824..127c4537 100644 --- a/src/base/io/ioReadBlifMv.c +++ b/src/base/io/ioReadBlifMv.c @@ -532,6 +532,7 @@ static char * Io_MvLoadFile( char * pFileName ) FILE * pFile; int nFileSize; char * pContents; + int RetValue; pFile = fopen( pFileName, "rb" ); if ( pFile == NULL ) { @@ -548,7 +549,7 @@ static char * Io_MvLoadFile( char * pFileName ) } pContents = ABC_ALLOC( char, nFileSize + 10 ); rewind( pFile ); - fread( pContents, nFileSize, 1, pFile ); + RetValue = fread( pContents, nFileSize, 1, pFile ); fclose( pFile ); // finish off the file with the spare .end line // some benchmarks suddenly break off without this line |