summaryrefslogtreecommitdiffstats
path: root/src/base/ver
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/ver')
-rw-r--r--src/base/ver/verCore.c13
-rw-r--r--src/base/ver/verParse.c9
2 files changed, 21 insertions, 1 deletions
diff --git a/src/base/ver/verCore.c b/src/base/ver/verCore.c
index f83747cf..aa213010 100644
--- a/src/base/ver/verCore.c
+++ b/src/base/ver/verCore.c
@@ -623,7 +623,7 @@ void Ver_ParseRemoveSuffixTable( Ver_Man_t * pMan )
***********************************************************************/
int Ver_ParseSignalPrefix( Ver_Man_t * pMan, char ** ppWord, int * pnMsb, int * pnLsb )
{
- char * pWord = *ppWord;
+ char * pWord = *ppWord, * pTemp;
int nMsb, nLsb;
assert( pWord[0] == '[' );
// get the beginning
@@ -654,6 +654,17 @@ int Ver_ParseSignalPrefix( Ver_Man_t * pMan, char ** ppWord, int * pnMsb, int *
}
assert( *pWord == ']' );
pWord++;
+
+ // fix the case when \<name> follows after [] without space
+ if ( *pWord == '\\' )
+ {
+ pWord++;
+ pTemp = pWord;
+ while ( *pTemp && *pTemp != ' ' )
+ pTemp++;
+ if ( *pTemp == ' ' )
+ *pTemp = 0;
+ }
}
assert( nMsb >= 0 && nLsb >= 0 );
// return
diff --git a/src/base/ver/verParse.c b/src/base/ver/verParse.c
index 9462fc8b..c38399f2 100644
--- a/src/base/ver/verParse.c
+++ b/src/base/ver/verParse.c
@@ -101,6 +101,15 @@ char * Ver_ParseGetName( Ver_Man_t * pMan )
pMan->fNameLast = 1;
Ver_StreamPopChar( p );
pWord = Ver_StreamGetWord( p, " \r\n" );
+ Ver_StreamSkipChars( p, " \r\n" );
+ if ( Ver_StreamScanChar(p) == '[' )
+ {
+ char This, * pEnd = pWord + strlen( pWord );
+ while ( (This = Ver_StreamPopChar(p)) != ']' )
+ *pEnd++ = This;
+ *pEnd++ = This;
+ *pEnd = 0;
+ }
}
else
pWord = Ver_StreamGetWord( p, " \t\n\r(),;" );