ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
util_old.h File Reference
#include "ansi.h"
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <signal.h>
#include <math.h>
#include <varargs.h>
Include dependency graph for util_old.h:

Go to the source code of this file.

Macros

#define NIL(type)
 
#define ALLOC(type, num)
 
#define REALLOC(type, obj, num)
 
#define FREE(obj)
 
#define VOID_HACK   int
 
#define SIGNAL_FN   int
 
#define assert(ex)
 
#define fail(why)
 
#define ABS(a)
 
#define MAX(a, b)
 
#define MIN(a, b)
 
#define ptime()
 
#define print_time(t)
 
#define HUGE   8.9884656743115790e+307
 
#define HUGE_VAL   HUGE
 
#define MAXINT   (1 << 30)
 

Functions

FILE * popen ()
 
FILE * tmpfile ()
 
int pclose ()
 
VOID_HACK clearerr ()
 
VOID_HACK rewind ()
 
VOID_HACK abort ()
 
VOID_HACK free ()
 
VOID_HACK exit ()
 
VOID_HACK perror ()
 
char * getenv ()
 
char * malloc ()
 
char * realloc ()
 
char * calloc ()
 
char * sprintf ()
 
int system ()
 
double atof ()
 
char * strcpy ()
 
char * strncpy ()
 
char * strcat ()
 
char * strncat ()
 
char * strerror ()
 
char * strpbrk ()
 
char * strtok ()
 
char * strchr ()
 
char * strrchr ()
 
char * strstr ()
 
int strcoll ()
 
int strxfrm ()
 
int strncmp ()
 
int strlen ()
 
int strspn ()
 
int strcspn ()
 
char * memmove ()
 
char * memccpy ()
 
char * memchr ()
 
char * memcpy ()
 
char * memset ()
 
int memcmp ()
 
int strcmp ()
 
VOID_HACK srandom ()
 
long random ()
 
EXTERN void MMout_of_memory ARGS ((long))
 
EXTERN char *MMrealloc ARGS ((char *, long))
 
EXTERN void MMfree ARGS ((char *))
 
EXTERN void util_print_cpu_stats ARGS ((FILE *))
 
EXTERN long util_cpu_time ARGS ((void))
 
EXTERN int util_getopt ARGS ((int, char **, char *))
 
EXTERN char *util_file_search ARGS ((char *, char *, char *))
 
EXTERN int util_pipefork ARGS ((char **, FILE **, FILE **, int *))
 
EXTERN int util_save_image ARGS ((char *, char *))
 
EXTERN long getSoftDataLimit ()
 

Variables

int util_optind
 
char * util_optarg
 

Macro Definition Documentation

◆ ABS

#define ABS ( a)
Value:
((a) < 0 ? -(a) : (a))

Definition at line 250 of file util_old.h.

◆ ALLOC

#define ALLOC ( type,
num )
Value:
((type *) MMalloc((long) sizeof(type) * (long) (num)))
type
CUBE COVER and CUBE typedefs ///.
Definition exor.h:90

Definition at line 63 of file util_old.h.

63#define ALLOC(type, num) \
64 ((type *) MMalloc((long) sizeof(type) * (long) (num)))

◆ assert

#define assert ( ex)
Value:
{\
if (! (ex)) {\
(void) fprintf(stderr,\
"Assertion failed: file %s, line %d\n\"%s\"\n",\
__FILE__, __LINE__, "ex");\
(void) fflush(stdout);\
abort();\
}\
}

Definition at line 213 of file util_old.h.

213# define assert(ex) {\
214 if (! (ex)) {\
215 (void) fprintf(stderr,\
216 "Assertion failed: file %s, line %d\n\"%s\"\n",\
217 __FILE__, __LINE__, "ex");\
218 (void) fflush(stdout);\
219 abort();\
220 }\
221}

◆ fail

#define fail ( why)
Value:
{\
(void) fprintf(stderr, "Fatal error: file %s, line %d\n%s\n",\
__FILE__, __LINE__, why);\
(void) fflush(stdout);\
abort();\
}

Definition at line 225 of file util_old.h.

225#define fail(why) {\
226 (void) fprintf(stderr, "Fatal error: file %s, line %d\n%s\n",\
227 __FILE__, __LINE__, why);\
228 (void) fflush(stdout);\
229 abort();\
230}

◆ FREE

#define FREE ( obj)
Value:
((obj) ? (free((void *) (obj)), (obj) = 0) : 0)
VOID_HACK free()

Definition at line 67 of file util_old.h.

67#define FREE(obj) \
68 ((obj) ? (free((void *) (obj)), (obj) = 0) : 0)

◆ HUGE

#define HUGE   8.9884656743115790e+307

Definition at line 293 of file util_old.h.

◆ HUGE_VAL

#define HUGE_VAL   HUGE

Definition at line 295 of file util_old.h.

◆ MAX

#define MAX ( a,
b )
Value:
((a) > (b) ? (a) : (b))

Definition at line 253 of file util_old.h.

◆ MAXINT

#define MAXINT   (1 << 30)

Definition at line 298 of file util_old.h.

◆ MIN

#define MIN ( a,
b )
Value:
((a) < (b) ? (a) : (b))

Definition at line 256 of file util_old.h.

◆ NIL

#define NIL ( type)
Value:
((type *) 0)

Definition at line 42 of file util_old.h.

◆ print_time

#define print_time ( t)
Value:
util_print_time(t)

Definition at line 284 of file util_old.h.

◆ ptime

#define ptime ( )
Value:
#define util_cpu_time
Definition util_hack.h:36

Definition at line 283 of file util_old.h.

◆ REALLOC

#define REALLOC ( type,
obj,
num )
Value:
((type *) MMrealloc((char *) (obj), (long) sizeof(type) * (long) (num)))

Definition at line 65 of file util_old.h.

65#define REALLOC(type, obj, num) \
66 ((type *) MMrealloc((char *) (obj), (long) sizeof(type) * (long) (num)))

◆ SIGNAL_FN

#define SIGNAL_FN   int

Definition at line 143 of file util_old.h.

◆ VOID_HACK

#define VOID_HACK   int

Definition at line 76 of file util_old.h.

Function Documentation

◆ abort()

VOID_HACK abort ( )
extern
Here is the caller graph for this function:

◆ ARGS() [1/9]

EXTERN char *util_tilde_expand ARGS ( (char *) )

◆ ARGS() [2/9]

EXTERN int util_pipefork ARGS ( (char **, FILE **, FILE **, int *) )

◆ ARGS() [3/9]

EXTERN int util_save_image ARGS ( (char *, char *) )

◆ ARGS() [4/9]

EXTERN char *util_file_search ARGS ( (char *, char *, char *) )

◆ ARGS() [5/9]

EXTERN char *MMrealloc ARGS ( (char *, long) )

◆ ARGS() [6/9]

EXTERN void util_print_cpu_stats ARGS ( (FILE *) )

◆ ARGS() [7/9]

EXTERN int util_getopt ARGS ( (int, char **, char *) )
Here is the call graph for this function:

◆ ARGS() [8/9]

EXTERN char *util_print_time ARGS ( (long) )

◆ ARGS() [9/9]

EXTERN FILE *util_tmpfile ARGS ( (void) )

◆ atof()

double atof ( )
extern
Here is the caller graph for this function:

◆ calloc()

char * calloc ( )
Here is the caller graph for this function:

◆ clearerr()

VOID_HACK clearerr ( )
extern

◆ exit()

VOID_HACK exit ( )

◆ free()

VOID_HACK free ( )

◆ getenv()

char * getenv ( )
extern
Here is the caller graph for this function:

◆ getSoftDataLimit()

EXTERN long getSoftDataLimit ( )

◆ malloc()

char * malloc ( )
extern

◆ memccpy()

char * memccpy ( )

◆ memchr()

char * memchr ( )
Here is the caller graph for this function:

◆ memcmp()

int memcmp ( )
extern
Here is the caller graph for this function:

◆ memcpy()

char * memcpy ( )

◆ memmove()

char * memmove ( )
extern
Here is the caller graph for this function:

◆ memset()

char * memset ( )

◆ pclose()

int pclose ( )
extern
Here is the caller graph for this function:

◆ perror()

VOID_HACK perror ( )

◆ popen()

FILE * popen ( )
extern

◆ random()

long random ( )
extern
Here is the caller graph for this function:

◆ realloc()

char * realloc ( )
Here is the caller graph for this function:

◆ rewind()

VOID_HACK rewind ( )
extern
Here is the caller graph for this function:

◆ sprintf()

char * sprintf ( )
extern

◆ srandom()

VOID_HACK srandom ( )
extern
Here is the caller graph for this function:

◆ strcat()

char * strcat ( )
Here is the caller graph for this function:

◆ strchr()

char * strchr ( )
Here is the caller graph for this function:

◆ strcmp()

int strcmp ( )

◆ strcoll()

int strcoll ( )
extern

◆ strcpy()

char * strcpy ( )
extern
Here is the caller graph for this function:

◆ strcspn()

int strcspn ( )

◆ strerror()

char * strerror ( )

◆ strlen()

int strlen ( )

◆ strncat()

char * strncat ( )
Here is the caller graph for this function:

◆ strncmp()

int strncmp ( )
Here is the caller graph for this function:

◆ strncpy()

char * strncpy ( )
Here is the caller graph for this function:

◆ strpbrk()

char * strpbrk ( )
extern

◆ strrchr()

char * strrchr ( )
Here is the caller graph for this function:

◆ strspn()

int strspn ( )

◆ strstr()

char * strstr ( )
Here is the caller graph for this function:

◆ strtok()

char * strtok ( )
Here is the caller graph for this function:

◆ strxfrm()

int strxfrm ( )

◆ system()

int system ( )
extern
Here is the caller graph for this function:

◆ tmpfile()

FILE * tmpfile ( )

Variable Documentation

◆ util_optarg

char* util_optarg
extern

◆ util_optind

int util_optind
extern