From 15a1c4b96507b524959d171a26b796d6263ea284 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Tue, 25 Feb 2014 08:03:12 -0800 Subject: g++ compiler errors. --- src/opt/dau/dau.h | 3 ++- src/opt/dau/dauDsd.c | 10 +++++++++- src/opt/dau/dauNonDsd.c | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src/opt') diff --git a/src/opt/dau/dau.h b/src/opt/dau/dau.h index cf2beb97..dab49bc3 100644 --- a/src/opt/dau/dau.h +++ b/src/opt/dau/dau.h @@ -80,7 +80,8 @@ extern unsigned Abc_TtCanonicizePhase( word * pTruth, int nVars ); /*=== dauDsd.c ==========================================================*/ extern int * Dau_DsdComputeMatches( char * p ); extern int Dau_DsdDecompose( word * pTruth, int nVarsInit, int fSplitPrime, int fWriteTruth, char * pRes ); -extern void Dau_DsdPrintFromTruth( FILE * pFile, word * pTruth, int nVarsInit ); +extern void Dau_DsdPrintFromTruthFile( FILE * pFile, word * pTruth, int nVarsInit ); +extern void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit ); extern word * Dau_DsdToTruth( char * p, int nVars ); extern word Dau_Dsd6ToTruth( char * p ); extern void Dau_DsdNormalize( char * p ); diff --git a/src/opt/dau/dauDsd.c b/src/opt/dau/dauDsd.c index 7ffe63be..e5d83d0c 100644 --- a/src/opt/dau/dauDsd.c +++ b/src/opt/dau/dauDsd.c @@ -1897,7 +1897,7 @@ int Dau_DsdDecompose( word * pTruth, int nVarsInit, int fSplitPrime, int fWriteT // assert( p->nSizeNonDec == 0 ); return p->nSizeNonDec; } -void Dau_DsdPrintFromTruth( FILE * pFile, word * pTruth, int nVarsInit ) +void Dau_DsdPrintFromTruthFile( FILE * pFile, word * pTruth, int nVarsInit ) { char pRes[DAU_MAX_STR]; word pTemp[DAU_MAX_WORD]; @@ -1905,6 +1905,14 @@ void Dau_DsdPrintFromTruth( FILE * pFile, word * pTruth, int nVarsInit ) Dau_DsdDecompose( pTemp, nVarsInit, 0, 1, pRes ); fprintf( pFile, "%s\n", pRes ); } +void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit ) +{ + char pRes[DAU_MAX_STR]; + word pTemp[DAU_MAX_WORD]; + Abc_TtCopy( pTemp, pTruth, Abc_TtWordNum(nVarsInit), 0 ); + Dau_DsdDecompose( pTemp, nVarsInit, 0, 1, pRes ); + fprintf( stdout, "%s\n", pRes ); +} void Dau_DsdTest44() { diff --git a/src/opt/dau/dauNonDsd.c b/src/opt/dau/dauNonDsd.c index a6410ebc..e5cc58e1 100644 --- a/src/opt/dau/dauNonDsd.c +++ b/src/opt/dau/dauNonDsd.c @@ -828,7 +828,7 @@ void Dau_DecTrySets( word * pInit, int nVars ) assert( nVars <= 16 ); memcpy( p, pInit, sizeof(word) * Abc_TtWordNum(nVars) ); vSets = Dau_DecFindSets( p, nVars ); - Dau_DsdPrintFromTruth( stdout, p, nVars ); + Dau_DsdPrintFromTruth( p, nVars ); printf( "This %d-variable function has %d decomposable variable sets:\n", nVars, Vec_IntSize(vSets) ); Vec_IntForEachEntry( vSets, Entry, i ) { -- cgit v1.2.3