diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-03-31 16:33:22 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-03-31 16:33:22 -0700 |
commit | 993c2027d8c250e07996dfda2f11fe6eecb46f15 (patch) | |
tree | a42795de47fa7a2fa7107099a0798cd82fdb9baf /src | |
parent | 95207366218ffadcb7f377db1b5577c758b82149 (diff) | |
download | abc-993c2027d8c250e07996dfda2f11fe6eecb46f15.tar.gz abc-993c2027d8c250e07996dfda2f11fe6eecb46f15.tar.bz2 abc-993c2027d8c250e07996dfda2f11fe6eecb46f15.zip |
Added several new APIs.
Diffstat (limited to 'src')
-rw-r--r-- | src/misc/extra/extraUtilFile.c | 1 | ||||
-rw-r--r-- | src/misc/vec/vecInt.h | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c index 5f905814..9f73a5f1 100644 --- a/src/misc/extra/extraUtilFile.c +++ b/src/misc/extra/extraUtilFile.c @@ -185,6 +185,7 @@ char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix ) { static char Buffer[1000]; char * pDot; + assert( strlen(pBase) + strlen(pSuffix) < 1000 ); strcpy( Buffer, pBase ); if ( (pDot = strrchr( Buffer, '.' )) ) *pDot = 0; diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index 4422fc85..fe6e98dd 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -257,6 +257,24 @@ static inline Vec_Int_t * Vec_IntDupArray( Vec_Int_t * pVec ) SeeAlso [] ***********************************************************************/ +static inline void Vec_IntErase( Vec_Int_t * p ) +{ + p->pArray = NULL; + p->nSize = 0; + p->nCap = 0; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ static inline void Vec_IntFree( Vec_Int_t * p ) { ABC_FREE( p->pArray ); |