From 3f4fc5e4507f7fb9df431fc116529b4c209ab97c Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 7 Apr 2006 08:01:00 -0700 Subject: Version abc60407 --- src/misc/vec/vecInt.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/misc/vec/vecInt.h') diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index ee848df7..5a627623 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -446,6 +446,33 @@ static inline void Vec_IntPush( Vec_Int_t * p, int Entry ) p->pArray[p->nSize++] = Entry; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline void Vec_IntPushFirst( Vec_Int_t * p, int Entry ) +{ + int i; + if ( p->nSize == p->nCap ) + { + if ( p->nCap < 16 ) + Vec_IntGrow( p, 16 ); + else + Vec_IntGrow( p, 2 * p->nCap ); + } + p->nSize++; + for ( i = p->nSize - 1; i >= 1; i-- ) + p->pArray[i] = p->pArray[i-1]; + p->pArray[0] = Entry; +} + /**Function************************************************************* Synopsis [] -- cgit v1.2.3