diff options
-rw-r--r-- | src/aig/gia/giaClp.c | 41 | ||||
-rw-r--r-- | src/aig/gia/giaMf.c | 2 | ||||
-rw-r--r-- | src/map/mio/mioUtils.c | 2 | ||||
-rw-r--r-- | src/misc/extra/extraUtilSupp.c | 2 | ||||
-rw-r--r-- | src/misc/util/utilFile.c | 2 | ||||
-rw-r--r-- | src/misc/vec/vecPtr.h | 4 |
6 files changed, 44 insertions, 9 deletions
diff --git a/src/aig/gia/giaClp.c b/src/aig/gia/giaClp.c index ca6db32f..7e8b3456 100644 --- a/src/aig/gia/giaClp.c +++ b/src/aig/gia/giaClp.c @@ -31,7 +31,6 @@ ABC_NAMESPACE_IMPL_START extern int Abc_ConvertZddToSop( DdManager * dd, DdNode * zCover, char * pSop, int nFanins, Vec_Str_t * vCube, int fPhase ); extern int Abc_CountZddCubes( DdManager * dd, DdNode * zCover ); extern int Abc_NtkDeriveFlatGiaSop( Gia_Man_t * pGia, int * gFanins, char * pSop ); -extern Vec_Ptr_t * Abc_NodeGetFakeNames( int nNames ); extern int Gia_ManFactorNode( Gia_Man_t * p, char * pSop, Vec_Int_t * vLeaves ); //////////////////////////////////////////////////////////////////////// @@ -49,6 +48,42 @@ extern int Gia_ManFactorNode( Gia_Man_t * p, char * pSop, Vec_Int_t * vLeaves ); SeeAlso [] ***********************************************************************/ +Vec_Ptr_t * Gia_GetFakeNames( int nNames ) +{ + Vec_Ptr_t * vNames; + char Buffer[5]; + int i; + + vNames = Vec_PtrAlloc( nNames ); + for ( i = 0; i < nNames; i++ ) + { + if ( nNames < 26 ) + { + Buffer[0] = 'a' + i; + Buffer[1] = 0; + } + else + { + Buffer[0] = 'a' + i%26; + Buffer[1] = '0' + i/26; + Buffer[2] = 0; + } + Vec_PtrPush( vNames, Extra_UtilStrsav(Buffer) ); + } + return vNames; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ int Gia_ManRebuildIsop( DdManager * dd, DdNode * bLocal, Gia_Man_t * pNew, Vec_Int_t * vFanins, Vec_Str_t * vSop, Vec_Str_t * vCube ) { char * pSop; @@ -338,8 +373,8 @@ Gia_Man_t * Gia_ManCollapseTest( Gia_Man_t * p, int fVerbose ) Dsd_Decompose( pManDsd, (DdNode **)Vec_PtrArray(vFuncs), Vec_PtrSize(vFuncs) ); if ( fVerbose ) { - Vec_Ptr_t * vNamesCi = Abc_NodeGetFakeNames( Gia_ManCiNum(p) ); - Vec_Ptr_t * vNamesCo = Abc_NodeGetFakeNames( Gia_ManCoNum(p) ); + Vec_Ptr_t * vNamesCi = Gia_GetFakeNames( Gia_ManCiNum(p) ); + Vec_Ptr_t * vNamesCo = Gia_GetFakeNames( Gia_ManCoNum(p) ); char ** ppNamesCi = (char **)Vec_PtrArray( vNamesCi ); char ** ppNamesCo = (char **)Vec_PtrArray( vNamesCo ); Dsd_TreePrint( stdout, pManDsd, ppNamesCi, ppNamesCo, 0, -1 ); diff --git a/src/aig/gia/giaMf.c b/src/aig/gia/giaMf.c index f52cb7ec..03848f1e 100644 --- a/src/aig/gia/giaMf.c +++ b/src/aig/gia/giaMf.c @@ -23,6 +23,7 @@ #include "misc/util/utilTruth.h" #include "misc/extra/extra.h" #include "sat/cnf/cnf.h" +#include "opt/dau/dau.h" ABC_NAMESPACE_IMPL_START @@ -96,7 +97,6 @@ static inline int Mf_CutIsTriv( int * pCut, int i ) { return Mf #define Mf_ObjForEachCut( pCuts, i, nCuts ) for ( i = 0, i < nCuts; i++ ) extern int Kit_TruthToGia( Gia_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory, Vec_Int_t * vLeaves, int fHash ); -extern void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit ); //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c index 57c274ee..978e1128 100644 --- a/src/map/mio/mioUtils.c +++ b/src/map/mio/mioUtils.c @@ -21,6 +21,7 @@ #include "base/main/main.h" #include "exp.h" #include "misc/util/utilTruth.h" +#include "opt/dau/dau.h" ABC_NAMESPACE_IMPL_START @@ -966,7 +967,6 @@ void Nf_ManPreparePrint( int nVars, int * pComp, int * pPerm, char Line[2*720*64 void Nf_ManPrepareLibrary( Mio_Library_t * pLib ) { - extern void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit ); // char Lines[2*720*64][8]; // Nf_ManPreparePrint( 6, pComp, pPerm, Lines ); int * pComp[7]; diff --git a/src/misc/extra/extraUtilSupp.c b/src/misc/extra/extraUtilSupp.c index baf9f3f6..bb513863 100644 --- a/src/misc/extra/extraUtilSupp.c +++ b/src/misc/extra/extraUtilSupp.c @@ -24,6 +24,7 @@ #include <assert.h> #include "misc/vec/vec.h" #include "misc/vec/vecWec.h" +#include "extra.h" ABC_NAMESPACE_IMPL_START @@ -302,7 +303,6 @@ void Abc_SuppTest( int nOnes, int nVars, int fUseSimple, int fCheck, int fVerbos ***********************************************************************/ Vec_Wrd_t * Abc_SuppReadMin( char * pFileName, int * pnVars ) { - extern char * Extra_FileReadContents( char * pFileName ); Vec_Wrd_t * vRes; word uCube; int nCubes = 0, nVars = -1, iVar; char * pCur, * pToken, * pStart = "INPUT F-COVER"; diff --git a/src/misc/util/utilFile.c b/src/misc/util/utilFile.c index c5c5a08f..4bb2f4c6 100644 --- a/src/misc/util/utilFile.c +++ b/src/misc/util/utilFile.c @@ -26,7 +26,7 @@ #include <sys/stat.h> #if defined(_MSC_VER) || defined(__MINGW32__) -#include <Windows.h> +#include <windows.h> #include <process.h> #include <io.h> #else diff --git a/src/misc/vec/vecPtr.h b/src/misc/vec/vecPtr.h index e6125256..e7ed1aa9 100644 --- a/src/misc/vec/vecPtr.h +++ b/src/misc/vec/vecPtr.h @@ -883,8 +883,8 @@ static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) p->pArray[k++] = p->pArray[i]; p->nSize = k; } -static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(), void (*Vec_PtrObjFree)(), Vec_Int_t * vCounts ) ___unused; -static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(), void (*Vec_PtrObjFree)(), Vec_Int_t * vCounts ) +static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(void**, void**), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts ) ___unused; +static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(void**, void**), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts ) { int i, k; if ( vCounts ) |