abc/src/bool/lucky/luckyRead.c
// write truth tables into file
// (here we write one symbol at a time - it can be optimized by writing 
// each truth table into a string and then writing the string into a file)
write truth tables into file
(here we write one symbol at a time - it can be optimized by writing
each truth table into a string and then writing the string into a file)
write truth tables into file ( here we write one symbol at a time - it can be optimized by writing each truth table into a string and then writing the string into a file )
static void Abc_TruthStoreWrite( char * pFileName, Abc_TtStore_t * p )
{
    FILE * pFile;
    int i;
    pFile = fopen( pFileName, "wb" );
    if ( pFile == NULL )
    {
        printf( "Cannot open file \"%s\" for writing.\n", pFileName );
        return;
    }
    for ( i = 0; i < p->nFuncs; i++ )
    {
        Abc_TruthWriteHex( pFile, p->pFuncs[i], p->nVars );
        fprintf( pFile, "\n" );
    }
    fclose( pFile );
}
static void Abc_TruthStoreWrite ( char * pFileName , Abc_TtStore_t * p ) { FILE * pFile ; int i ; pFile = fopen ( pFileName , " " ) ; if ( pFile == NULL ) { printf ( " \" \" \n " , pFileName ) ; return ; } for ( i = 0 ; i < p -> nFuncs ; i ++ ) { Abc_TruthWriteHex ( pFile , p -> pFuncs [ i ] , p -> nVars ) ; fprintf ( pFile , " \n " ) ; } fclose ( pFile ) ; }
write truth tables into file
(here we write one symbol at a time - it can be optimized by writing
each truth table into a string and then writing the string into a file)
write truth tables into file ( here we write one symbol at a time - it can be optimized by writing each truth table into a string and then writing the string into a file )