Commit f3c5bab5 by Alan Mishchenko

Adding an option to write new-line after the comment symbol when dumping an AIGER file.

parent 32315113
...@@ -1079,6 +1079,7 @@ Vec_Str_t * Gia_AigerWriteIntoMemoryStrPart( Gia_Man_t * p, Vec_Int_t * vCis, Ve ...@@ -1079,6 +1079,7 @@ Vec_Str_t * Gia_AigerWriteIntoMemoryStrPart( Gia_Man_t * p, Vec_Int_t * vCis, Ve
void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int fCompact ) void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int fCompact )
{ {
int fVerbose = XAIG_VERBOSE; int fVerbose = XAIG_VERBOSE;
int fWriteNewLine = 0;
FILE * pFile; FILE * pFile;
Gia_Man_t * p; Gia_Man_t * p;
Gia_Obj_t * pObj; Gia_Obj_t * pObj;
...@@ -1194,8 +1195,10 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int ...@@ -1194,8 +1195,10 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
} }
// write the comment // write the comment
// fprintf( pFile, "c\n" ); if ( fWriteNewLine )
fprintf( pFile, "c" ); fprintf( pFile, "c\n" );
else
fprintf( pFile, "c" );
// write additional AIG // write additional AIG
if ( p->pAigExtra ) if ( p->pAigExtra )
...@@ -1406,6 +1409,8 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int ...@@ -1406,6 +1409,8 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
fprintf( pFile, "%c", '\0' ); fprintf( pFile, "%c", '\0' );
} }
// write comments // write comments
if ( fWriteNewLine )
fprintf( pFile, "c\n" );
fprintf( pFile, "\nThis file was produced by the GIA package in ABC on %s\n", Gia_TimeStamp() ); fprintf( pFile, "\nThis file was produced by the GIA package in ABC on %s\n", Gia_TimeStamp() );
fprintf( pFile, "For information about AIGER format, refer to %s\n", "http://fmv.jku.at/aiger" ); fprintf( pFile, "For information about AIGER format, refer to %s\n", "http://fmv.jku.at/aiger" );
fclose( pFile ); fclose( pFile );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment