From 55e7dd16d363e1d69d818942f7e40185b5c78740 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 24 Apr 2015 21:33:45 -0700 Subject: Suggested fixes to compile with 'gcc -x c++'. --- src/base/cba/cba.h | 1 + src/base/cba/cbaBlast.c | 2 +- src/base/cba/cbaPrsBuild.c | 2 +- src/base/cba/cbaPtr.c | 5 +++-- src/base/cba/cbaWriteBlif.c | 2 +- src/base/cba/cbaWriteVer.c | 2 +- src/base/wlc/wlcReadSmt.c | 4 ++-- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/base/cba/cba.h b/src/base/cba/cba.h index 4ce02c50..6d4262fc 100644 --- a/src/base/cba/cba.h +++ b/src/base/cba/cba.h @@ -982,6 +982,7 @@ extern void Cba_ManDeriveFanout( Cba_Man_t * p ); //extern void Cba_ManAssignInternNames( Cba_Man_t * p ); extern void Cba_ManAssignInternWordNames( Cba_Man_t * p ); extern Cba_Man_t * Cba_ManCollapse( Cba_Man_t * p ); +extern void Cba_ManSetupTypes( char ** pNames, char ** pSymbs ); /*=== cbaPtr.c ===============================================================*/ extern void Cba_PtrFree( Vec_Ptr_t * vDes ); extern int Cba_PtrMemory( Vec_Ptr_t * vDes ); diff --git a/src/base/cba/cbaBlast.c b/src/base/cba/cbaBlast.c index 446cd4b4..b659bf3d 100644 --- a/src/base/cba/cbaBlast.c +++ b/src/base/cba/cbaBlast.c @@ -509,7 +509,7 @@ void Cba_NtkPrepareLibrary( Cba_Man_t * p, Mio_Library_t * pLib ) int Cba_NtkBuildLibrary( Cba_Man_t * p ) { int RetValue = 1; - Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); + Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen(); if ( pLib == NULL ) printf( "The standard cell library is not available.\n" ), RetValue = 0; else diff --git a/src/base/cba/cbaPrsBuild.c b/src/base/cba/cbaPrsBuild.c index ba1bbc24..b5ce2a0c 100644 --- a/src/base/cba/cbaPrsBuild.c +++ b/src/base/cba/cbaPrsBuild.c @@ -47,7 +47,7 @@ ABC_NAMESPACE_IMPL_START int Prs_ManIsMapped( Prs_Ntk_t * pNtk ) { Vec_Int_t * vSigs; int iBox; - Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); + Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen(); if ( pLib == NULL ) return 0; Prs_NtkForEachBox( pNtk, vSigs, iBox ) diff --git a/src/base/cba/cbaPtr.c b/src/base/cba/cbaPtr.c index d5427eff..af97a141 100644 --- a/src/base/cba/cbaPtr.c +++ b/src/base/cba/cbaPtr.c @@ -21,6 +21,7 @@ #include "base/abc/abc.h" #include "base/main/mainInt.h" #include "map/mio/mio.h" +#include "cba.h" ABC_NAMESPACE_IMPL_START @@ -321,7 +322,7 @@ Vec_Ptr_t * Cba_ManCollectGateNamesByTruth( Mio_Library_t * pLib ) void Cba_PtrUpdateBox( Vec_Ptr_t * vBox, Vec_Ptr_t * vGatesNames ) { Mio_Gate_t * pGate; Mio_Pin_t * pPin; int i = 1; - Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); + Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen(); // update gate name char * pNameNew, * pName = (char *)Vec_PtrEntry(vBox, 0); if ( !strcmp(pName, "Const0T") ) @@ -419,7 +420,7 @@ Vec_Ptr_t * Cba_PtrTransformTest( Vec_Ptr_t * vDes ) printf( "ABC framework is not started.\n" ); return NULL; } - pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); + pLib = (Mio_Library_t *)Abc_FrameReadLibGen(); if ( pLib == NULL ) { printf( "Standard cell library is not entered.\n" ); diff --git a/src/base/cba/cbaWriteBlif.c b/src/base/cba/cbaWriteBlif.c index 6b34cf77..38901447 100644 --- a/src/base/cba/cbaWriteBlif.c +++ b/src/base/cba/cbaWriteBlif.c @@ -169,7 +169,7 @@ void Cba_ManWriteBlifLines( FILE * pFile, Cba_Ntk_t * p ) else if ( Cba_ObjIsGate(p, i) ) { char * pGateName = Abc_NamStr(p->pDesign->pMods, Cba_BoxNtkId(p, i)); - Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); + Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen(); Mio_Gate_t * pGate = Mio_LibraryReadGateByName( pLib, pGateName, NULL ); fprintf( pFile, ".gate %s", pGateName ); Cba_BoxForEachBi( p, i, iTerm, k ) diff --git a/src/base/cba/cbaWriteVer.c b/src/base/cba/cbaWriteVer.c index 70042f21..f735257a 100644 --- a/src/base/cba/cbaWriteVer.c +++ b/src/base/cba/cbaWriteVer.c @@ -395,7 +395,7 @@ static inline void Cba_ManWriteGate( Cba_Ntk_t * p, int iObj ) { Vec_Str_t * vStr = p->pDesign->vOut; int iTerm, k; char * pGateName = Abc_NamStr(p->pDesign->pMods, Cba_BoxNtkId(p, iObj)); - Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); + Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen(); Mio_Gate_t * pGate = Mio_LibraryReadGateByName( pLib, pGateName, NULL ); Vec_StrPrintStr( vStr, " " ); Vec_StrPrintStr( vStr, pGateName ); diff --git a/src/base/wlc/wlcReadSmt.c b/src/base/wlc/wlcReadSmt.c index fff760ec..4e09306c 100644 --- a/src/base/wlc/wlcReadSmt.c +++ b/src/base/wlc/wlcReadSmt.c @@ -83,7 +83,7 @@ static Smt_Pair_t s_Types[SMT_PRS_END] = }; static inline char * Smt_GetTypeName( Smt_LineType_t Type ) { - Smt_LineType_t i; + int i; for ( i = 1; i < SMT_PRS_END; i++ ) if ( s_Types[i].Type == Type ) return s_Types[i].pName; @@ -91,7 +91,7 @@ static inline char * Smt_GetTypeName( Smt_LineType_t Type ) } static inline void Smt_AddTypes( Abc_Nam_t * p ) { - Smt_LineType_t Type; + int Type; for ( Type = 1; Type < SMT_PRS_END; Type++ ) Abc_NamStrFindOrAdd( p, Smt_GetTypeName(Type), NULL ); assert( Abc_NamObjNumMax(p) == SMT_PRS_END ); -- cgit v1.2.3