diff options
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/extra/extra.h | 2 | ||||
-rw-r--r-- | src/misc/hash/hashGen.h | 4 | ||||
-rw-r--r-- | src/misc/util/utilSignal.c | 11 | ||||
-rw-r--r-- | src/misc/util/utilSignal.h | 38 | ||||
-rw-r--r-- | src/misc/util/util_hack.h | 47 |
5 files changed, 32 insertions, 70 deletions
diff --git a/src/misc/extra/extra.h b/src/misc/extra/extra.h index 240fee03..dd0edb44 100644 --- a/src/misc/extra/extra.h +++ b/src/misc/extra/extra.h @@ -611,7 +611,7 @@ extern char * Extra_UtilTildeExpand( char *fname ); extern char * Extra_UtilFileSearch( char *file, char *path, char *mode ); extern void (*Extra_UtilMMoutOfMemory)( long size ); -extern const char * globalUtilOptarg; +extern const char * globalUtilOptarg; extern int globalUtilOptind; /**AutomaticEnd***************************************************************/ diff --git a/src/misc/hash/hashGen.h b/src/misc/hash/hashGen.h index 257b9dba..fc1b82c3 100644 --- a/src/misc/hash/hashGen.h +++ b/src/misc/hash/hashGen.h @@ -229,7 +229,7 @@ static inline void Hash_GenWriteEntry( Hash_Gen_t *p, void * key, void * data ) p->nSize++; (*pLast) = pEntry = ABC_ALLOC( Hash_Gen_Entry_t, 1 ); pEntry->pNext = NULL; - pEntry->key = key; + pEntry->key = (char *)key; pEntry->data = data; return; @@ -271,7 +271,7 @@ static inline Hash_Gen_Entry_t * Hash_GenEntry( Hash_Gen_t *p, void * key, int f p->nSize++; (*pLast) = pEntry = ABC_ALLOC( Hash_Gen_Entry_t, 1 ); pEntry->pNext = NULL; - pEntry->key = key; + pEntry->key = (char *)key; pEntry->data = NULL; return pEntry; } diff --git a/src/misc/util/utilSignal.c b/src/misc/util/utilSignal.c index 6a793ce0..7304e410 100644 --- a/src/misc/util/utilSignal.c +++ b/src/misc/util/utilSignal.c @@ -4,17 +4,17 @@ SystemName [ABC: Logic synthesis and verification system.] - PackageName [] + PackageName [Signal handling utilities.] - Synopsis [] + Synopsis [Signal handling utilities.] - Author [] + Author [Baruch Sterin] Affiliation [UC Berkeley] - Date [] + Date [Ver. 1.0. Started - February 1, 2011.] - Revision [] + Revision [$Id: utilSignal.c,v 1.00 2011/02/01 00:00:00 alanmi Exp $] ***********************************************************************/ @@ -23,6 +23,7 @@ #include <signal.h> #include "abc_global.h" #include "hashGen.h" +#include "utilSignal.h" #ifndef _MSC_VER diff --git a/src/misc/util/utilSignal.h b/src/misc/util/utilSignal.h index d9802aa0..30c0ba1d 100644 --- a/src/misc/util/utilSignal.h +++ b/src/misc/util/utilSignal.h @@ -4,17 +4,17 @@ SystemName [ABC: Logic synthesis and verification system.] - PackageName [] + PackageName [Signal handling utilities.] - Synopsis [] + Synopsis [Signal handling utilities.] - Author [] + Author [Baruch Sterin] Affiliation [UC Berkeley] - Date [] + Date [Ver. 1.0. Started - February 1, 2011.] - Revision [] + Revision [$Id: utilSignal.h,v 1.00 2011/02/01 00:00:00 alanmi Exp $] ***********************************************************************/ @@ -44,23 +44,17 @@ ABC_NAMESPACE_HEADER_START //////////////////////////////////////////////////////////////////////// /*=== utilSignal.c ==========================================================*/ - -void Util_SignalCleanup(); - -void Util_SignalStartHandler(); -void Util_SignalResetHandler(); -void Util_SignalStopHandler(); - -void Util_SignalBlockSignals(); -void Util_SignalUnblockSignals(); - -void Util_SignalAddChildPid(int pid); -void Util_SignalRemoveChildPid(int pid); - -int Util_SignalTmpFile(const char* prefix, const char* suffix, char** out_name); -void Util_SignalTmpFileRemove(const char* fname, int fLeave); - -int Util_SignalSystem(const char* cmd); +extern void Util_SignalCleanup(); +extern void Util_SignalStartHandler(); +extern void Util_SignalResetHandler(); +extern void Util_SignalStopHandler(); +extern void Util_SignalBlockSignals(); +extern void Util_SignalUnblockSignals(); +extern void Util_SignalAddChildPid(int pid); +extern void Util_SignalRemoveChildPid(int pid); +extern int Util_SignalTmpFile(const char* prefix, const char* suffix, char** out_name); +extern void Util_SignalTmpFileRemove(const char* fname, int fLeave); +extern int Util_SignalSystem(const char* cmd); ABC_NAMESPACE_HEADER_END diff --git a/src/misc/util/util_hack.h b/src/misc/util/util_hack.h index f7ad89f9..1a734f03 100644 --- a/src/misc/util/util_hack.h +++ b/src/misc/util/util_hack.h @@ -21,7 +21,6 @@ #ifndef __UTIL_HACK_H__ #define __UTIL_HACK_H__ - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -31,50 +30,18 @@ #include "abc_global.h" - ABC_NAMESPACE_HEADER_START +#define NIL(type) ((type *) 0) -#ifndef EXTERN -#define EXTERN extern -#endif -#define NIL(type) ((type *) 0) -#define random rand -#define srandom srand - -#define util_cpu_time Extra_CpuTime -#define getSoftDataLimit Extra_GetSoftDataLimit -#define util_getopt_reset Extra_UtilGetoptReset -#define util_getopt Extra_UtilGetopt -#define util_print_time Extra_UtilPrintTime -#define util_strsav Extra_UtilStrsav -#define util_tilde_expand Extra_UtilTildeExpand -#define util_file_search Extra_UtilFileSearch -#define MMoutOfMemory Extra_UtilMMoutOfMemory - -#define util_optarg globalUtilOptarg -#define util_optind globalUtilOptind - -#ifndef ARGS -#define ARGS(protos) protos -#endif - -extern long Extra_CpuTime(); -extern int Extra_GetSoftDataLimit(); -extern void Extra_UtilGetoptReset(); -extern int Extra_UtilGetopt( int argc, char *argv[], const char *optstring ); -extern char * Extra_UtilPrintTime( long t ); -extern char * Extra_UtilStrsav( char *s ); -extern char * Extra_UtilTildeExpand( char *fname ); -extern char * Extra_UtilFileSearch( char *file, char *path, char *mode ); - -extern char * globalUtilOptarg; -extern int globalUtilOptind; - +#define util_cpu_time Extra_CpuTime +#define getSoftDataLimit Extra_GetSoftDataLimit +#define MMoutOfMemory Extra_UtilMMoutOfMemory +extern long Extra_CpuTime(); +extern int Extra_GetSoftDataLimit(); +extern void (*Extra_UtilMMoutOfMemory)( long size ); ABC_NAMESPACE_HEADER_END - - #endif |