summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/if/ifMap.c1
-rw-r--r--src/map/mio/mioFunc.c9
-rw-r--r--src/map/mio/mioRead.c28
3 files changed, 24 insertions, 14 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 7e529ef6..75370dff 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -296,6 +296,7 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
}
else if ( If_ObjIsCi(pObj) )
{
+//printf( "processing CI %d\n", pObj->Id );
arrTime = Tim_ManGetCiArrival( p->pManTim, pObj->IdPio );
If_ObjSetArrTime( pObj, arrTime );
}
diff --git a/src/map/mio/mioFunc.c b/src/map/mio/mioFunc.c
index 21a078f9..1fca5764 100644
--- a/src/map/mio/mioFunc.c
+++ b/src/map/mio/mioFunc.c
@@ -25,7 +25,9 @@
// these symbols (and no other) can appear in the formulas
#define MIO_SYMB_AND '*'
-#define MIO_SYMB_OR '+'
+#define MIO_SYMB_OR1 '+'
+#define MIO_SYMB_OR2 '|'
+#define MIO_SYMB_XOR '^'
#define MIO_SYMB_NOT '!'
#define MIO_SYMB_AFTNOT '\''
#define MIO_SYMB_OPEN '('
@@ -239,8 +241,9 @@ int Mio_GateCollectNames( char * pFormula, char * pPinNames[] )
// remove the non-name symbols
for ( pTemp = Buffer; *pTemp; pTemp++ )
- if ( *pTemp == MIO_SYMB_AND || *pTemp == MIO_SYMB_OR || *pTemp == MIO_SYMB_NOT
- || *pTemp == MIO_SYMB_OPEN || *pTemp == MIO_SYMB_CLOSE || *pTemp == MIO_SYMB_AFTNOT )
+ if ( *pTemp == MIO_SYMB_AND || *pTemp == MIO_SYMB_OR1 || *pTemp == MIO_SYMB_OR2
+ || *pTemp == MIO_SYMB_XOR || *pTemp == MIO_SYMB_NOT || *pTemp == MIO_SYMB_OPEN
+ || *pTemp == MIO_SYMB_CLOSE || *pTemp == MIO_SYMB_AFTNOT )
*pTemp = ' ';
// save the names
diff --git a/src/map/mio/mioRead.c b/src/map/mio/mioRead.c
index 13c2cdcd..dc665050 100644
--- a/src/map/mio/mioRead.c
+++ b/src/map/mio/mioRead.c
@@ -265,7 +265,7 @@ Mio_Gate_t * Mio_LibraryReadGate( char ** ppToken, bool fExtendedFormat )
// then rest of the expression
pToken = strtok( NULL, ";" );
- pGate->pForm = Extra_UtilStrsav( pToken );
+ pGate->pForm = chomp( pToken );
// read the pin info
// start the linked list of pins
@@ -392,21 +392,27 @@ Mio_Pin_t * Mio_LibraryReadPin( char ** ppToken, bool fExtendedFormat )
SeeAlso []
***********************************************************************/
-char *chomp( char *s )
+char * chomp( char *s )
{
- char *b = ALLOC(char, strlen(s)+1), *c = b;
- while (*s && isspace(*s))
- ++s;
- while (*s && !isspace(*s))
- *c++ = *s++;
- *c = 0;
- return b;
+ char *a, *b, *c;
+ // remove leading spaces
+ for ( b = s; *b; b++ )
+ if ( !isspace(*b) )
+ break;
+ // strsav the string
+ a = strcpy( ALLOC(char, strlen(b)+1), b );
+ // remove trailing spaces
+ for ( c = a+strlen(a); c > a; c-- )
+ if ( *c == 0 || isspace(*c) )
+ *c = 0;
+ else
+ break;
+ return a;
}
/**Function*************************************************************
- Synopsis [Duplicates string and returns it with leading and
- trailing spaces removed.]
+ Synopsis []
Description []