summaryrefslogtreecommitdiffstats
path: root/src/map/mio/mioRead.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-10-12 18:29:15 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-10-12 18:29:15 -0700
commit20c46b5a452c08f949929c02d93a060f79144d79 (patch)
tree1a66c6d0ac2bebd5b765a34627da61ebec2ea7be /src/map/mio/mioRead.c
parentd25473b30722d1567345e2f10e22baa94272085c (diff)
downloadabc-20c46b5a452c08f949929c02d93a060f79144d79.tar.gz
abc-20c46b5a452c08f949929c02d93a060f79144d79.tar.bz2
abc-20c46b5a452c08f949929c02d93a060f79144d79.zip
Experiments with precomputation and matching.
Diffstat (limited to 'src/map/mio/mioRead.c')
-rw-r--r--src/map/mio/mioRead.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/map/mio/mioRead.c b/src/map/mio/mioRead.c
index 6e067fa7..0364d363 100644
--- a/src/map/mio/mioRead.c
+++ b/src/map/mio/mioRead.c
@@ -329,6 +329,16 @@ int Mio_LibraryReadInternal( Mio_Library_t * pLib, char * pBuffer, int fExtended
SeeAlso []
***********************************************************************/
+char * Mio_LibraryCleanStr( char * p )
+{
+ int i, k;
+ char * pRes = Abc_UtilStrsav( p );
+ for ( i = k = 0; pRes[i]; i++ )
+ if ( pRes[i] != ' ' && pRes[i] != '\t' && pRes[i] != '\r' && pRes[i] != '\n' )
+ pRes[k++] = pRes[i];
+ pRes[k] = 0;
+ return pRes;
+}
Mio_Gate_t * Mio_LibraryReadGate( char ** ppToken, int fExtendedFormat )
{
Mio_Gate_t * pGate;
@@ -354,7 +364,7 @@ Mio_Gate_t * Mio_LibraryReadGate( char ** ppToken, int fExtendedFormat )
// then rest of the expression
pToken = strtok( NULL, ";" );
- pGate->pForm = chomp( pToken );
+ pGate->pForm = Mio_LibraryCleanStr( pToken );
// read the pin info
// start the linked list of pins