diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2010-11-01 01:35:04 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2010-11-01 01:35:04 -0700 |
commit | 6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch) | |
tree | 0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/aig/ntl/ntlTable.c | |
parent | f0e77f6797c0504b0da25a56152b707d3357f386 (diff) | |
download | abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2 abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip |
initial commit of public abc
Diffstat (limited to 'src/aig/ntl/ntlTable.c')
-rw-r--r-- | src/aig/ntl/ntlTable.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/aig/ntl/ntlTable.c b/src/aig/ntl/ntlTable.c index 0b87c8be..23207081 100644 --- a/src/aig/ntl/ntlTable.c +++ b/src/aig/ntl/ntlTable.c @@ -20,6 +20,9 @@ #include "ntl.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -55,7 +58,9 @@ static unsigned Ntl_HashString( const char * pName, int TableSize ) Ntl_Net_t * Ntl_ModelCreateNet( Ntl_Mod_t * p, const char * pName ) { Ntl_Net_t * pNet; - pNet = (Ntl_Net_t *)Aig_MmFlexEntryFetch( p->pMan->pMemObjs, sizeof(Ntl_Net_t) + strlen(pName) + 1 ); + int nSize = sizeof(Ntl_Net_t) + strlen(pName) + 1; + nSize = (nSize / sizeof(char*) + ((nSize % sizeof(char*)) > 0)) * sizeof(char*); // added by Saurabh on Sep 3, 2009 + pNet = (Ntl_Net_t *)Aig_MmFlexEntryFetch( p->pMan->pMemObjs, nSize ); memset( pNet, 0, sizeof(Ntl_Net_t) ); strcpy( pNet->pName, pName ); pNet->NetId = Vec_PtrSize( p->vNets ); @@ -362,7 +367,7 @@ int Ntl_ModelFindPioNumber( Ntl_Mod_t * p, int fPiOnly, int fPoOnly, const char } if ( fPoOnly ) { - pTerm = pNet->pCopy; + pTerm = (Ntl_Obj_t *)pNet->pCopy; if ( pTerm && Ntl_ObjIsPo(pTerm) ) { *pNumber = pTerm->iTemp; @@ -370,7 +375,7 @@ int Ntl_ModelFindPioNumber( Ntl_Mod_t * p, int fPiOnly, int fPoOnly, const char } return 0; } - pTerm = pNet->pCopy; + pTerm = (Ntl_Obj_t *)pNet->pCopy; if ( pTerm && Ntl_ObjIsPo(pTerm) ) { *pNumber = pTerm->iTemp; @@ -545,3 +550,5 @@ Ntl_Mod_t * Ntl_ManFindModel( Ntl_Man_t * p, const char * pName ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |