summaryrefslogtreecommitdiffstats
path: root/src/aig/bbl
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/bbl')
-rw-r--r--src/aig/bbl/bblif.c13
-rw-r--r--src/aig/bbl/bblif.h16
2 files changed, 20 insertions, 9 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
+
diff --git a/src/aig/bbl/bblif.h b/src/aig/bbl/bblif.h
index 89c58f93..787d649f 100644
--- a/src/aig/bbl/bblif.h
+++ b/src/aig/bbl/bblif.h
@@ -21,6 +21,7 @@
#ifndef __BBLIF_H__
#define __BBLIF_H__
+
/*
This file (taken together with "bblif.c") implements a stand-alone
interface between ABC and an application that uses ABC.
@@ -186,9 +187,10 @@
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-extern "C" {
-#endif
+
+
+ABC_NAMESPACE_HEADER_START
+
#ifdef _WIN32
#define inline __inline
@@ -269,9 +271,11 @@ extern void Bbl_ManDumpBlif( Bbl_Man_t * p, char * pFileName );
extern void Bbl_ManSimpleDemo();
-#ifdef __cplusplus
-}
-#endif
+
+
+ABC_NAMESPACE_HEADER_END
+
+
#endif