Commit b74b7dfc by Alan Mishchenko

Extending &sim_read to use non-64-divisible pattern counts.

parent 5c8ee4a2
...@@ -1300,10 +1300,20 @@ static inline Vec_Wrd_t * Vec_WrdReadHex( char * pFileName, int * pnWords, int f ...@@ -1300,10 +1300,20 @@ static inline Vec_Wrd_t * Vec_WrdReadHex( char * pFileName, int * pnWords, int f
p = Vec_WrdAlloc( 1000 ); p = Vec_WrdAlloc( 1000 );
while ( (c = fgetc(pFile)) != EOF ) while ( (c = fgetc(pFile)) != EOF )
{ {
if ( c == '\n' && nWords == -1 ) if ( c == '\r' || c == '\t' || c == ' ' )
continue;
if ( c == '\n' )
{
if ( nChars > 0 )
{
Vec_WrdPush( p, Num );
nChars = 0;
Num = 0;
}
if ( nWords == -1 && Vec_WrdSize(p) > 0 )
nWords = Vec_WrdSize(p); nWords = Vec_WrdSize(p);
if ( c == '\n' || c == '\r' || c == '\t' || c == ' ' )
continue; continue;
}
Num |= (word)Vec_WrdReadHexOne((char)c) << (nChars * 4); Num |= (word)Vec_WrdReadHexOne((char)c) << (nChars * 4);
if ( ++nChars < 16 ) if ( ++nChars < 16 )
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment