115 int RetValue, nEntrySize;
119 printf(
"Nm_ManStoreIdName(): Entry with the same ID already exists.\n" );
125 nEntrySize = (nEntrySize /
sizeof(
char*) + ((nEntrySize %
sizeof(
char*)) > 0)) *
sizeof(
char*);
127 pEntry->pNextI2N = pEntry->pNextN2I = pEntry->pNameSake = NULL;
128 pEntry->ObjId = ObjId;
130 sprintf( pEntry->Name,
"%s%s", pName, pSuffix? pSuffix :
"" );
153 if ( pEntry == NULL )
155 printf(
"Nm_ManDeleteIdName(): This entry is not in the table.\n" );
177 static char NameStr[1000];
182 sprintf( NameStr,
"n%d", ObjId );
184 sprintf( NameStr,
"n%d_%d", ObjId, i );
223 return pEntry->ObjId;
266 for ( i = 0; i < p->nBins; i++ )
267 if ( p->pBinsI2N[i] )
int Nm_ManTableDelete(Nm_Man_t *p, int ObjId)
static int Abc_PrimeCudd(unsigned int p)
int Nm_ManFindIdByName(Nm_Man_t *p, char *pName, int Type)
Vec_Int_t * Nm_ManReturnNameIds(Nm_Man_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Nm_Entry_t_ Nm_Entry_t
INCLUDES ///.
ABC_NAMESPACE_IMPL_START Nm_Man_t * Nm_ManCreate(int nSize)
DECLARATIONS ///.
int Nm_ManFindIdByNameTwoTypes(Nm_Man_t *p, char *pName, int Type1, int Type2)
#define ABC_ALLOC(type, num)
void Nm_ManFree(Nm_Man_t *p)
Nm_Entry_t * Nm_ManTableLookupId(Nm_Man_t *p, int ObjId)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_HEADER_START struct Nm_Man_t_ Nm_Man_t
INCLUDES ///.
static void Vec_IntPush(Vec_Int_t *p, int Entry)
char * Nm_ManCreateUniqueName(Nm_Man_t *p, int ObjId)
int Nm_ManNumEntries(Nm_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
Nm_Entry_t * Nm_ManTableLookupName(Nm_Man_t *p, char *pName, int Type)
void Nm_ManDeleteIdName(Nm_Man_t *p, int ObjId)
int Nm_ManTableAdd(Nm_Man_t *p, Nm_Entry_t *pEntry)
MACRO DEFINITIONS ///.
char * Nm_ManStoreIdName(Nm_Man_t *p, int ObjId, int Type, char *pName, char *pSuffix)
char * Nm_ManFindNameById(Nm_Man_t *p, int ObjId)