diff options
Diffstat (limited to 'src/misc/extra/extraUtilFile.c')
-rw-r--r-- | src/misc/extra/extraUtilFile.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c index 9f73a5f1..de8a11cb 100644 --- a/src/misc/extra/extraUtilFile.c +++ b/src/misc/extra/extraUtilFile.c @@ -446,16 +446,9 @@ void Extra_PrintBinary( FILE * pFile, unsigned Sign[], int nBits ) SeeAlso [] ***********************************************************************/ -int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars ) +int Extra_ReadHex( unsigned Sign[], char * pString, int nDigits ) { - int nWords, nDigits, Digit, k, c; - nWords = Extra_TruthWordNum( nVars ); - for ( k = 0; k < nWords; k++ ) - Sign[k] = 0; - // read the number from the string - nDigits = (1 << nVars) / 4; - if ( nDigits == 0 ) - nDigits = 1; + int Digit, k, c; for ( k = 0; k < nDigits; k++ ) { c = nDigits-1-k; @@ -470,6 +463,19 @@ int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars ) } return 1; } +int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars ) +{ + int nWords, nDigits, k; + nWords = Extra_TruthWordNum( nVars ); + for ( k = 0; k < nWords; k++ ) + Sign[k] = 0; + // read the number from the string + nDigits = (1 << nVars) / 4; + if ( nDigits == 0 ) + nDigits = 1; + Extra_ReadHex( Sign, pString, nDigits ); + return 1; +} /**Function************************************************************* |