Commit 0e1eb989 by Baruch Sterin

make sure all of ABC and related libraries are in the same namespace (when…

make sure all of ABC and related libraries are in the same namespace (when compiled with ABC_NAMESPACE) by removing extern "C" from function definitions
parent 8810ef12
extern int Abc_RealMain(int argc, char *argv[]); #include <misc/util/abc_global.h>
ABC_NAMESPACE_IMPL_START
int Abc_RealMain(int argc, char *argv[]);
ABC_NAMESPACE_IMPL_END
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
return Abc_RealMain(argc, argv); return ABC_NAMESPACE_PREFIX Abc_RealMain(argc, argv);
} }
...@@ -89,10 +89,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddAddFind.c,v 1.8 2004/08/13 18:04:45 fa ...@@ -89,10 +89,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddAddFind.c,v 1.8 2004/08/13 18:04:45 fa
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -103,10 +99,6 @@ static DdNode * addDoIthBit (DdManager *dd, DdNode *f, DdNode *index); ...@@ -103,10 +99,6 @@ static DdNode * addDoIthBit (DdManager *dd, DdNode *f, DdNode *index);
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -103,10 +103,6 @@ static DdNode *background, *zero; ...@@ -103,10 +103,6 @@ static DdNode *background, *zero;
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -118,10 +114,6 @@ static enum st__retval cuddApaStCountfree (char * key, char * value, char * arg) ...@@ -118,10 +114,6 @@ static enum st__retval cuddApaStCountfree (char * key, char * value, char * arg)
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
} /* end of extern "C" */
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
......
...@@ -101,10 +101,6 @@ static int num_calls; ...@@ -101,10 +101,6 @@ static int num_calls;
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -119,10 +115,6 @@ static enum st__retval CorrelCleanUp (char *key, char *value, char *arg); ...@@ -119,10 +115,6 @@ static enum st__retval CorrelCleanUp (char *key, char *value, char *arg);
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
......
...@@ -106,10 +106,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddBridge.c,v 1.19 2008/04/25 06:42:55 fa ...@@ -106,10 +106,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddBridge.c,v 1.19 2008/04/25 06:42:55 fa
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -125,10 +121,6 @@ static DdNode * cuddBddTransferRecur (DdManager *ddS, DdManager *ddD, DdNode *f, ...@@ -125,10 +121,6 @@ static DdNode * cuddBddTransferRecur (DdManager *ddS, DdManager *ddD, DdNode *f,
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
......
...@@ -122,10 +122,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddGenCof.c,v 1.38 2005/05/14 17:27:11 fa ...@@ -122,10 +122,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddGenCof.c,v 1.38 2005/05/14 17:27:11 fa
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -143,10 +139,6 @@ static DdNode * cuddBddSqueeze (DdManager *dd, DdNode *l, DdNode *u); ...@@ -143,10 +139,6 @@ static DdNode * cuddBddSqueeze (DdManager *dd, DdNode *l, DdNode *u);
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -134,10 +134,6 @@ static int cross; /* the number of crossovers to perform */ ...@@ -134,10 +134,6 @@ static int cross; /* the number of crossovers to perform */
*/ */
#define STOREDD(i,j) storedd[(i)*(numvars+1)+(j)] #define STOREDD(i,j) storedd[(i)*(numvars+1)+(j)]
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -160,10 +156,6 @@ static int roulette (int *p1, int *p2); ...@@ -160,10 +156,6 @@ static int roulette (int *p1, int *p2);
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -103,13 +103,7 @@ ABC_NAMESPACE_IMPL_START ...@@ -103,13 +103,7 @@ ABC_NAMESPACE_IMPL_START
/* Type declarations */ /* Type declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*DD_CHKFP)(DdManager *, int, int); typedef int (*DD_CHKFP)(DdManager *, int, int);
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Variable declarations */ /* Variable declarations */
...@@ -139,10 +133,6 @@ static unsigned int originalSize; ...@@ -139,10 +133,6 @@ static unsigned int originalSize;
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -176,10 +166,6 @@ static int ddIsVarHandled (DdManager *dd, int index); ...@@ -176,10 +166,6 @@ static int ddIsVarHandled (DdManager *dd, int index);
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -111,10 +111,6 @@ static DdNode *one, *zero; ...@@ -111,10 +111,6 @@ static DdNode *one, *zero;
#define WEIGHT(weight, col) ((weight) == NULL ? 1 : weight[col]) #define WEIGHT(weight, col) ((weight) == NULL ? 1 : weight[col])
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -129,10 +125,6 @@ static DdNode * getCube (DdManager *manager, st__table *visited, DdNode *f, int ...@@ -129,10 +125,6 @@ static DdNode * getCube (DdManager *manager, st__table *visited, DdNode *f, int
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -158,10 +158,6 @@ static DdNode **currentQueuePage; /* current page */ ...@@ -158,10 +158,6 @@ static DdNode **currentQueuePage; /* current page */
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -179,10 +175,6 @@ static enum st__retval stPathTableDdFree (char *key, char *value, char *arg); ...@@ -179,10 +175,6 @@ static enum st__retval stPathTableDdFree (char *key, char *value, char *arg);
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of Exported functions */ /* Definition of Exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -158,10 +158,6 @@ static long shuffleTable[STAB_SIZE]; ...@@ -158,10 +158,6 @@ static long shuffleTable[STAB_SIZE];
#define bang(f) ((Cudd_IsComplement(f)) ? '!' : ' ') #define bang(f) ((Cudd_IsComplement(f)) ? '!' : ' ')
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -188,10 +184,6 @@ static enum st__retval ddEpdFree (char * key, char * value, char * arg); ...@@ -188,10 +184,6 @@ static enum st__retval ddEpdFree (char * key, char * value, char * arg);
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -95,10 +95,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddZddCount.c,v 1.14 2004/08/13 18:04:53 ...@@ -95,10 +95,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddZddCount.c,v 1.14 2004/08/13 18:04:53
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -112,10 +108,6 @@ static enum st__retval st__zdd_count_dbl_free (char *key, char *value, char *arg ...@@ -112,10 +108,6 @@ static enum st__retval st__zdd_count_dbl_free (char *key, char *value, char *arg
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -107,10 +107,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddZddSetop.c,v 1.25 2004/08/13 18:04:54 ...@@ -107,10 +107,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddZddSetop.c,v 1.25 2004/08/13 18:04:54
/* Macro declarations */ /* Macro declarations */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/ /**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -123,10 +119,6 @@ static void zddVarToConst (DdNode *f, DdNode **gp, DdNode **hp, DdNode *base, Dd ...@@ -123,10 +119,6 @@ static void zddVarToConst (DdNode *f, DdNode **gp, DdNode **hp, DdNode *base, Dd
/**AutomaticEnd***************************************************************/ /**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Definition of exported functions */ /* Definition of exported functions */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// NAMESPACES /// /// NAMESPACES ///
......
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
ABC_NAMESPACE_HEADER_START ABC_NAMESPACE_HEADER_START
#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */
typedef float qps_float_t; typedef float qps_float_t;
typedef struct qps_problem { typedef struct qps_problem {
...@@ -138,11 +134,6 @@ extern "C" { ...@@ -138,11 +134,6 @@ extern "C" {
/* this discards the private data structures assigned by qps_init() */ /* this discards the private data structures assigned by qps_init() */
extern void qps_clean(qps_problem_t *); extern void qps_clean(qps_problem_t *);
#if defined(__cplusplus)
}
#endif /* __cplusplus */
ABC_NAMESPACE_HEADER_END ABC_NAMESPACE_HEADER_END
#endif /* _QPS_H */ #endif /* _QPS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment