summaryrefslogtreecommitdiffstats
path: root/src/misc/extra/extraUtilFile.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-03-28 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-03-28 08:01:00 -0700
commit4da784c049b79b76d8c1b82297bd27f45ead9377 (patch)
tree8e69de9f95a13f1ef6ec9f3624be997ef080dc0d /src/misc/extra/extraUtilFile.c
parentdd5531caf916d526551049b59151990adaef575d (diff)
downloadabc-4da784c049b79b76d8c1b82297bd27f45ead9377.tar.gz
abc-4da784c049b79b76d8c1b82297bd27f45ead9377.tar.bz2
abc-4da784c049b79b76d8c1b82297bd27f45ead9377.zip
Version abc70328
Diffstat (limited to 'src/misc/extra/extraUtilFile.c')
-rw-r--r--src/misc/extra/extraUtilFile.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c
index 6b130e7e..4c51b8b5 100644
--- a/src/misc/extra/extraUtilFile.c
+++ b/src/misc/extra/extraUtilFile.c
@@ -385,6 +385,34 @@ void Extra_PrintHexadecimal( FILE * pFile, unsigned Sign[], int nVars )
SeeAlso []
***********************************************************************/
+void Extra_PrintHexadecimalString( char * pString, unsigned Sign[], int nVars )
+{
+ int nDigits, Digit, k;
+ // write the number into the file
+ nDigits = (1 << nVars) / 4;
+ for ( k = nDigits - 1; k >= 0; k-- )
+ {
+ Digit = ((Sign[k/8] >> ((k%8) * 4)) & 15);
+ if ( Digit < 10 )
+ *pString++ = '0' + Digit;
+ else
+ *pString++ = 'a' + Digit-10;
+ }
+// fprintf( pFile, "\n" );
+ *pString = 0;
+}
+
+/**Function*************************************************************
+
+ Synopsis [Prints the hex unsigned into a file.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
void Extra_PrintHex( FILE * pFile, unsigned uTruth, int nVars )
{
int nMints, nDigits, Digit, k;