summaryrefslogtreecommitdiffstats
path: root/src/aig/bbl/bblif.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
commit6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch)
tree0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/aig/bbl/bblif.c
parentf0e77f6797c0504b0da25a56152b707d3357f386 (diff)
downloadabc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip
initial commit of public abc
Diffstat (limited to 'src/aig/bbl/bblif.c')
-rw-r--r--src/aig/bbl/bblif.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/aig/bbl/bblif.c b/src/aig/bbl/bblif.c
index adc10b28..e68258d9 100644
--- a/src/aig/bbl/bblif.c
+++ b/src/aig/bbl/bblif.c
@@ -24,8 +24,12 @@
#include <assert.h>
#include <time.h>
+#include "abc_global.h"
#include "bblif.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -375,9 +379,10 @@ static inline void Vec_IntFillExtra( Vec_Int_t * p, int nSize, int Fill )
int i;
if ( p->nSize >= nSize )
return;
- if ( nSize < 2 * p->nSize )
- nSize = 2 * p->nSize;
- Vec_IntGrow( p, nSize );
+ if ( nSize > 2 * p->nCap )
+ Vec_IntGrow( p, nSize );
+ else if ( nSize > p->nCap )
+ Vec_IntGrow( p, 2 * p->nCap );
for ( i = p->nSize; i < nSize; i++ )
p->pArray[i] = Fill;
p->nSize = nSize;
@@ -1509,3 +1514,5 @@ void Bbl_ManSimpleDemo()
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+