diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-04-02 21:51:47 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-04-02 21:51:47 -0700 |
commit | f765e666ca4608f8dfe3ab2ecbacaf9966d25129 (patch) | |
tree | 6671beb24d849fee72e6a4254e207277ea52082a /src/sat/bsat | |
parent | 3898ba5486adc01e38199b5385d501e4ca58ddec (diff) | |
download | abc-f765e666ca4608f8dfe3ab2ecbacaf9966d25129.tar.gz abc-f765e666ca4608f8dfe3ab2ecbacaf9966d25129.tar.bz2 abc-f765e666ca4608f8dfe3ab2ecbacaf9966d25129.zip |
Experiments with don't-cares.
Diffstat (limited to 'src/sat/bsat')
-rw-r--r-- | src/sat/bsat/satUtil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sat/bsat/satUtil.c b/src/sat/bsat/satUtil.c index 1d94d685..a8cd3f7e 100644 --- a/src/sat/bsat/satUtil.c +++ b/src/sat/bsat/satUtil.c @@ -85,7 +85,7 @@ void Sat_SolverWriteDimacs( sat_solver * p, char * pFileName, lit* assumpBegin, nUnits++; // start the file - pFile = fopen( pFileName, "wb" ); + pFile = pFileName ? fopen( pFileName, "wb" ) : stdout; if ( pFile == NULL ) { printf( "Sat_SolverWriteDimacs(): Cannot open the ouput file.\n" ); @@ -121,7 +121,7 @@ void Sat_SolverWriteDimacs( sat_solver * p, char * pFileName, lit* assumpBegin, } fprintf( pFile, "\n" ); - fclose( pFile ); + if ( pFileName ) fclose( pFile ); } void Sat_Solver2WriteDimacs( sat_solver2 * p, char * pFileName, lit* assumpBegin, lit* assumpEnd, int incrementVars ) { |