summaryrefslogtreecommitdiffstats
path: root/src/opt/dec/dec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opt/dec/dec.h')
-rw-r--r--src/opt/dec/dec.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/opt/dec/dec.h b/src/opt/dec/dec.h
index d0d9981d..4042ac65 100644
--- a/src/opt/dec/dec.h
+++ b/src/opt/dec/dec.h
@@ -21,10 +21,6 @@
#ifndef __DEC_H__
#define __DEC_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -33,6 +29,10 @@ extern "C" {
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
+#ifdef __cplusplus
+extern "C" {
+#endif
+
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
////////////////////////////////////////////////////////////////////////
@@ -212,12 +212,12 @@ static inline Dec_Edge_t Dec_IntToEdge_( unsigned Edge )
static inline Dec_Graph_t * Dec_GraphCreate( int nLeaves )
{
Dec_Graph_t * pGraph;
- pGraph = ALLOC( Dec_Graph_t, 1 );
+ pGraph = ABC_ALLOC( Dec_Graph_t, 1 );
memset( pGraph, 0, sizeof(Dec_Graph_t) );
pGraph->nLeaves = nLeaves;
pGraph->nSize = nLeaves;
pGraph->nCap = 2 * nLeaves + 50;
- pGraph->pNodes = ALLOC( Dec_Node_t, pGraph->nCap );
+ pGraph->pNodes = ABC_ALLOC( Dec_Node_t, pGraph->nCap );
memset( pGraph->pNodes, 0, sizeof(Dec_Node_t) * pGraph->nSize );
return pGraph;
}
@@ -236,7 +236,7 @@ static inline Dec_Graph_t * Dec_GraphCreate( int nLeaves )
static inline Dec_Graph_t * Dec_GraphCreateConst0()
{
Dec_Graph_t * pGraph;
- pGraph = ALLOC( Dec_Graph_t, 1 );
+ pGraph = ABC_ALLOC( Dec_Graph_t, 1 );
memset( pGraph, 0, sizeof(Dec_Graph_t) );
pGraph->fConst = 1;
pGraph->eRoot.fCompl = 1;
@@ -257,7 +257,7 @@ static inline Dec_Graph_t * Dec_GraphCreateConst0()
static inline Dec_Graph_t * Dec_GraphCreateConst1()
{
Dec_Graph_t * pGraph;
- pGraph = ALLOC( Dec_Graph_t, 1 );
+ pGraph = ABC_ALLOC( Dec_Graph_t, 1 );
memset( pGraph, 0, sizeof(Dec_Graph_t) );
pGraph->fConst = 1;
return pGraph;
@@ -297,8 +297,8 @@ static inline Dec_Graph_t * Dec_GraphCreateLeaf( int iLeaf, int nLeaves, int fCo
***********************************************************************/
static inline void Dec_GraphFree( Dec_Graph_t * pGraph )
{
- FREE( pGraph->pNodes );
- free( pGraph );
+ ABC_FREE( pGraph->pNodes );
+ ABC_FREE( pGraph );
}
/**Function*************************************************************
@@ -560,7 +560,7 @@ static inline Dec_Node_t * Dec_GraphAppendNode( Dec_Graph_t * pGraph )
Dec_Node_t * pNode;
if ( pGraph->nSize == pGraph->nCap )
{
- pGraph->pNodes = REALLOC( Dec_Node_t, pGraph->pNodes, 2 * pGraph->nCap );
+ pGraph->pNodes = ABC_REALLOC( Dec_Node_t, pGraph->pNodes, 2 * pGraph->nCap );
pGraph->nCap = 2 * pGraph->nCap;
}
pNode = pGraph->pNodes + pGraph->nSize++;