diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
commit | 0871bffae307e0553e0c5186336189e8b55cf6a6 (patch) | |
tree | 4571d1563fe33a53a57fea1c35fb668b9d33265f /src/opt/dec/dec.h | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/opt/dec/dec.h')
-rw-r--r-- | src/opt/dec/dec.h | 22 |
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++; |