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/bdd/parse | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/bdd/parse')
-rw-r--r-- | src/bdd/parse/parseCore.c | 13 | ||||
-rw-r--r-- | src/bdd/parse/parseEqn.c | 10 | ||||
-rw-r--r-- | src/bdd/parse/parseStack.c | 16 |
3 files changed, 20 insertions, 19 deletions
diff --git a/src/bdd/parse/parseCore.c b/src/bdd/parse/parseCore.c index 88888379..85200dd9 100644 --- a/src/bdd/parse/parseCore.c +++ b/src/bdd/parse/parseCore.c @@ -156,7 +156,7 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in } // copy the formula - pFormula = ALLOC( char, strlen(pFormulaInit) + 3 ); + pFormula = ABC_ALLOC( char, strlen(pFormulaInit) + 3 ); sprintf( pFormula, "(%s)", pFormulaInit ); // start the stacks @@ -335,7 +335,7 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in if ( Parse_ParserPerformTopOp( dd, pStackFn, Oper ) == NULL ) { fprintf( pOutput, "Parse_FormulaParser(): Unknown operation\n" ); - free( pFormula ); + ABC_FREE( pFormula ); return NULL; } } @@ -382,7 +382,8 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in for ( i = 0; pTemp[i] && pTemp[i] != ' ' && pTemp[i] != '\t' && pTemp[i] != '\r' && pTemp[i] != '\n' && pTemp[i] != PARSE_SYM_AND1 && pTemp[i] != PARSE_SYM_AND2 && pTemp[i] != PARSE_SYM_XOR1 && pTemp[i] != PARSE_SYM_XOR2 && pTemp[i] != PARSE_SYM_XOR3 && pTemp[i] != PARSE_SYM_XOR && - pTemp[i] != PARSE_SYM_OR1 && pTemp[i] != PARSE_SYM_OR2 && pTemp[i] != PARSE_SYM_CLOSE; + pTemp[i] != PARSE_SYM_OR1 && pTemp[i] != PARSE_SYM_OR2 && pTemp[i] != PARSE_SYM_CLOSE && + pTemp[i] != PARSE_SYM_NEGAFT; i++ ) {} for ( v = 0; v < nVars; v++ ) @@ -446,7 +447,7 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in if ( Parse_ParserPerformTopOp( dd, pStackFn, Oper2 ) == NULL ) { fprintf( pOutput, "Parse_FormulaParser(): Unknown operation\n" ); - free( pFormula ); + ABC_FREE( pFormula ); return NULL; } Parse_StackOpPush( pStackOp, Oper1 ); // push the last operation back @@ -471,7 +472,7 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in Parse_StackFnFree(pStackFn); Parse_StackOpFree(pStackOp); Cudd_Deref( bFunc ); - free( pFormula ); + ABC_FREE( pFormula ); return bFunc; } else @@ -482,7 +483,7 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in else fprintf( pOutput, "Parse_FormulaParser(): The input string is empty\n" ); } - free( pFormula ); + ABC_FREE( pFormula ); return NULL; } diff --git a/src/bdd/parse/parseEqn.c b/src/bdd/parse/parseEqn.c index 02d83966..eceecc0c 100644 --- a/src/bdd/parse/parseEqn.c +++ b/src/bdd/parse/parseEqn.c @@ -91,7 +91,7 @@ Hop_Obj_t * Parse_FormulaParserEqn( FILE * pOutput, char * pFormInit, Vec_Ptr_t } // copy the formula - pFormula = ALLOC( char, strlen(pFormInit) + 3 ); + pFormula = ABC_ALLOC( char, strlen(pFormInit) + 3 ); sprintf( pFormula, "(%s)", pFormInit ); // start the stacks @@ -182,7 +182,7 @@ Hop_Obj_t * Parse_FormulaParserEqn( FILE * pOutput, char * pFormInit, Vec_Ptr_t if ( Parse_ParserPerformTopOp( pMan, pStackFn, Oper ) == NULL ) { fprintf( pOutput, "Parse_FormulaParserEqn(): Unknown operation\n" ); - free( pFormula ); + ABC_FREE( pFormula ); return NULL; } } @@ -273,7 +273,7 @@ Hop_Obj_t * Parse_FormulaParserEqn( FILE * pOutput, char * pFormInit, Vec_Ptr_t if ( Parse_ParserPerformTopOp( pMan, pStackFn, Oper2 ) == NULL ) { fprintf( pOutput, "Parse_FormulaParserEqn(): Unknown operation\n" ); - free( pFormula ); + ABC_FREE( pFormula ); return NULL; } Parse_StackOpPush( pStackOp, Oper1 ); // push the last operation back @@ -298,7 +298,7 @@ Hop_Obj_t * Parse_FormulaParserEqn( FILE * pOutput, char * pFormInit, Vec_Ptr_t Parse_StackFnFree(pStackFn); Parse_StackOpFree(pStackOp); // Cudd_Deref( gFunc ); - free( pFormula ); + ABC_FREE( pFormula ); return gFunc; } else @@ -309,7 +309,7 @@ Hop_Obj_t * Parse_FormulaParserEqn( FILE * pOutput, char * pFormInit, Vec_Ptr_t else fprintf( pOutput, "Parse_FormulaParserEqn(): The input string is empty\n" ); } - free( pFormula ); + ABC_FREE( pFormula ); return NULL; } diff --git a/src/bdd/parse/parseStack.c b/src/bdd/parse/parseStack.c index cd7cd7e3..7ce488f1 100644 --- a/src/bdd/parse/parseStack.c +++ b/src/bdd/parse/parseStack.c @@ -54,9 +54,9 @@ struct ParseStackOpStruct Parse_StackFn_t * Parse_StackFnStart( int nDepth ) { Parse_StackFn_t * p; - p = ALLOC( Parse_StackFn_t, 1 ); + p = ABC_ALLOC( Parse_StackFn_t, 1 ); memset( p, 0, sizeof(Parse_StackFn_t) ); - p->pData = ALLOC( void *, nDepth ); + p->pData = ABC_ALLOC( void *, nDepth ); p->Size = nDepth; return p; } @@ -132,8 +132,8 @@ void * Parse_StackFnPop( Parse_StackFn_t * p ) ***********************************************************************/ void Parse_StackFnFree( Parse_StackFn_t * p ) { - FREE( p->pData ); - FREE( p ); + ABC_FREE( p->pData ); + ABC_FREE( p ); } @@ -153,9 +153,9 @@ void Parse_StackFnFree( Parse_StackFn_t * p ) Parse_StackOp_t * Parse_StackOpStart( int nDepth ) { Parse_StackOp_t * p; - p = ALLOC( Parse_StackOp_t, 1 ); + p = ABC_ALLOC( Parse_StackOp_t, 1 ); memset( p, 0, sizeof(Parse_StackOp_t) ); - p->pData = ALLOC( int, nDepth ); + p->pData = ABC_ALLOC( int, nDepth ); p->Size = nDepth; return p; } @@ -231,8 +231,8 @@ int Parse_StackOpPop( Parse_StackOp_t * p ) ***********************************************************************/ void Parse_StackOpFree( Parse_StackOp_t * p ) { - FREE( p->pData ); - FREE( p ); + ABC_FREE( p->pData ); + ABC_FREE( p ); } |