diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-02-22 13:49:07 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-02-22 13:49:07 -0800 |
commit | 2e14b73af6c0cbf6fb612cd9ab19f97689733600 (patch) | |
tree | 36e33a40cf865a4b3175f69521a405b00d1f51c9 /src/misc | |
parent | 91ca83e86485ea6696cae7df502ad7d6bf5ae708 (diff) | |
download | abc-2e14b73af6c0cbf6fb612cd9ab19f97689733600.tar.gz abc-2e14b73af6c0cbf6fb612cd9ab19f97689733600.tar.bz2 abc-2e14b73af6c0cbf6fb612cd9ab19f97689733600.zip |
Allowing for Verilog names of the type slash-<name>-space-[N].
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/util/utilNam.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/misc/util/utilNam.c b/src/misc/util/utilNam.c index 7b8ea738..ccea6322 100644 --- a/src/misc/util/utilNam.c +++ b/src/misc/util/utilNam.c @@ -359,9 +359,15 @@ int Abc_NamStrFind( Abc_Nam_t * p, char * pStr ) ***********************************************************************/ int Abc_NamStrFindOrAdd( Abc_Nam_t * p, char * pStr, int * pfFound ) { - int iHandleNew; + int i, iHandleNew; int *piPlace; - assert( pStr[0] != '\\' || pStr[strlen(pStr)-1] == ' ' ); + if ( !(pStr[0] != '\\' || pStr[strlen(pStr)-1] == ' ') ) + { + for ( i = strlen(pStr) - 1; i >= 0; i-- ) + if ( *pStr == ' ' ) + break; + assert( i < (int)strlen(pStr) ); + } piPlace = Abc_NamStrHashFind( p, pStr ); if ( *piPlace ) { |