summaryrefslogtreecommitdiffstats
path: root/src/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/extra/extra.h1
-rw-r--r--src/misc/extra/extraUtilFile.c8
-rw-r--r--src/misc/vec/vecPtr.h34
3 files changed, 40 insertions, 3 deletions
diff --git a/src/misc/extra/extra.h b/src/misc/extra/extra.h
index 1fff12d5..4aa2c816 100644
--- a/src/misc/extra/extra.h
+++ b/src/misc/extra/extra.h
@@ -110,6 +110,7 @@ typedef unsigned long long uint64;
#ifndef PRT
#define PRT(a,t) printf("%s = ", (a)); printf("%6.2f sec\n", (float)(t)/(float)(CLOCKS_PER_SEC))
+#define PRTn(a,t) printf("%s = ", (a)); printf("%6.2f sec ", (float)(t)/(float)(CLOCKS_PER_SEC))
#endif
#ifndef PRTP
diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c
index 14c987e8..e2f0bcd4 100644
--- a/src/misc/extra/extraUtilFile.c
+++ b/src/misc/extra/extraUtilFile.c
@@ -324,9 +324,11 @@ void Extra_PrintBinary( FILE * pFile, unsigned Sign[], int nBits )
***********************************************************************/
int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars )
{
- int nDigits, Digit, k, c;
- Sign[0] = 0;
- // write the number into the file
+ 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;
for ( k = 0; k < nDigits; k++ )
{
diff --git a/src/misc/vec/vecPtr.h b/src/misc/vec/vecPtr.h
index c6b8defb..6b23d1ac 100644
--- a/src/misc/vec/vecPtr.h
+++ b/src/misc/vec/vecPtr.h
@@ -425,6 +425,40 @@ static inline void Vec_PtrFillExtra( Vec_Ptr_t * p, int nSize, void * Entry )
/**Function*************************************************************
+ Synopsis [Returns the entry even if the place not exist.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+static inline void * Vec_PtrGetEntry( Vec_Ptr_t * p, int i )
+{
+ Vec_PtrFillExtra( p, i + 1, NULL );
+ return Vec_PtrEntry( p, i );
+}
+
+/**Function*************************************************************
+
+ Synopsis [Inserts the entry even if the place does not exist.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+static inline void Vec_PtrSetEntry( Vec_Ptr_t * p, int i, void * Entry )
+{
+ Vec_PtrFillExtra( p, i + 1, NULL );
+ Vec_PtrWriteEntry( p, i, Entry );
+}
+
+/**Function*************************************************************
+
Synopsis []
Description []