Commit a5e9563a by Alan Mishchenko

Handling corner cases in TT print-out.

parent 9ff1776d
...@@ -592,6 +592,10 @@ void Extra_PrintHexadecimal( FILE * pFile, unsigned Sign[], int nVars ) ...@@ -592,6 +592,10 @@ void Extra_PrintHexadecimal( FILE * pFile, unsigned Sign[], int nVars )
void Extra_PrintHexadecimalString( char * pString, unsigned Sign[], int nVars ) void Extra_PrintHexadecimalString( char * pString, unsigned Sign[], int nVars )
{ {
int nDigits, Digit, k; int nDigits, Digit, k;
if ( nVars == 0 && !(Sign[0] & 1) ) { sprintf(pString, "0"); return; } // const0
if ( nVars == 0 && (Sign[0] & 1) ) { sprintf(pString, "1"); return; } // const1
if ( nVars == 1 && (Sign[0] & 1) ) { sprintf(pString, "1"); return; } // inverter
if ( nVars == 1 && !(Sign[0] & 1) ) { sprintf(pString, "2"); return; } // buffer
// write the number into the file // write the number into the file
nDigits = (1 << nVars) / 4; nDigits = (1 << nVars) / 4;
for ( k = nDigits - 1; k >= 0; k-- ) for ( k = nDigits - 1; k >= 0; k-- )
......
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