Commit 3ac8aa9c by Alan Mishchenko

Recommended changes for portability.

parent bc4164a4
......@@ -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 );
......
......@@ -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 ///
......
......@@ -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];
......
......@@ -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";
......
......@@ -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
......
......@@ -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 )
......
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