diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-01-11 13:44:27 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-01-11 13:44:27 +0700 |
commit | 8b8b410af2d9cc75de758516f8c7dcf7a6098edc (patch) | |
tree | 821782fa43830ff2ec0e0ab83c0981f0c2515e13 | |
parent | 89d08cfd06ecb1653ef0613049447c91bc114f46 (diff) | |
download | abc-8b8b410af2d9cc75de758516f8c7dcf7a6098edc.tar.gz abc-8b8b410af2d9cc75de758516f8c7dcf7a6098edc.tar.bz2 abc-8b8b410af2d9cc75de758516f8c7dcf7a6098edc.zip |
Changing file naming in 'show' and '&show'.
-rw-r--r-- | src/aig/aig/aigShow.c | 5 | ||||
-rw-r--r-- | src/aig/gia/giaShow.c | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/aig/aig/aigShow.c b/src/aig/aig/aigShow.c index eac2a510..d983602a 100644 --- a/src/aig/aig/aigShow.c +++ b/src/aig/aig/aigShow.c @@ -19,6 +19,7 @@ ***********************************************************************/ #include "aig.h" +#include "misc/extra/extra.h" ABC_NAMESPACE_IMPL_START @@ -340,12 +341,10 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold ) { extern void Abc_ShowFile( char * FileNameDot ); - static int Counter = 0; char FileNameDot[200]; FILE * pFile; // create the file name -// Aig_ShowGetFileName( pMan->pName, FileNameDot ); - sprintf( FileNameDot, "temp%02d.dot", Counter++ ); + sprintf( FileNameDot, "%s", Extra_FileNameGenericAppend(pMan->pName, ".dot") ); // check that the file can be opened if ( (pFile = fopen( FileNameDot, "w" )) == NULL ) { diff --git a/src/aig/gia/giaShow.c b/src/aig/gia/giaShow.c index 986d5624..5589d384 100644 --- a/src/aig/gia/giaShow.c +++ b/src/aig/gia/giaShow.c @@ -21,6 +21,7 @@ #include "gia.h" #include "proof/cec/cec.h" #include "proof/acec/acec.h" +#include "misc/extra/extra.h" ABC_NAMESPACE_IMPL_START @@ -815,15 +816,10 @@ void Gia_ShowProcess( Gia_Man_t * p, char * pFileName, Vec_Int_t * vAdds, Vec_In void Gia_ManShow( Gia_Man_t * pMan, Vec_Int_t * vBold, int fAdders, int fFadds ) { extern void Abc_ShowFile( char * FileNameDot ); - static int Counter = 0; char FileNameDot[200]; FILE * pFile; - Vec_Int_t * vXors, * vAdds = Ree_ManComputeCuts( pMan, &vXors, 0 ); - - // create the file name -// Gia_ShowGetFileName( pMan->pName, FileNameDot ); - sprintf( FileNameDot, "temp%02d.dot", Counter++ ); + sprintf( FileNameDot, "%s", Extra_FileNameGenericAppend(pMan->pName, ".dot") ); // check that the file can be opened if ( (pFile = fopen( FileNameDot, "w" )) == NULL ) { |