Jspice3
util.h File Reference

Go to the source code of this file.

Macros

#define MALLOC(x)   calloc(1,(unsigned)(x))
 
#define FREE(x)   {if (x) {free((char *)(x));(x) = 0;}}
 
#define TRUE   1
 
#define FALSE   0
 
#define REALLOC(x, y)   trealloc((char *)(x),(unsigned)(y))
 
#define DEBUGMSG(testargs)
 
#define FABS(a)   ( ((a)<0) ? -(a) : (a) )
 
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define SIGN(a, b)   ( b >= 0 ? (a >= 0 ? a : - a) : (a >= 0 ? - a : a))
 
#define ABORT()   fflush(stderr);fflush(stdout);abort();
 
#define ERROR(CODE, MESSAGE)
 
#define NEW(TYPE)   ((TYPE *) MALLOC(sizeof(TYPE)))
 
#define R_NORM(A, B)
 

Functions

char * malloc ()
 
char * calloc ()
 
char * realloc ()
 
void free ()
 
char * trealloc ()
 
char * tmalloc ()
 

Macro Definition Documentation

#define ABORT ( )    fflush(stderr);fflush(stdout);abort();

Definition at line 61 of file util.h.

#define DEBUGMSG (   testargs)

Definition at line 34 of file util.h.

#define ERROR (   CODE,
  MESSAGE 
)
Value:
{ \
errMsg = MALLOC(strlen(MESSAGE) + 1); \
strcpy(errMsg, (MESSAGE)); \
char * strcpy()
char * errMsg
Definition: main.c:42
#define MALLOC(x)
Definition: util.h:9
return(True)
#define CODE(x, y, c)
Definition: mfblclip.c:21

Definition at line 66 of file util.h.

#define FABS (   a)    ( ((a)<0) ? -(a) : (a) )

Definition at line 41 of file util.h.

#define FALSE   0

Definition at line 28 of file util.h.

#define FREE (   x)    {if (x) {free((char *)(x));(x) = 0;}}

Definition at line 10 of file util.h.

#define MALLOC (   x)    calloc(1,(unsigned)(x))

Definition at line 9 of file util.h.

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

Definition at line 52 of file util.h.

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

Definition at line 48 of file util.h.

#define NEW (   TYPE)    ((TYPE *) MALLOC(sizeof(TYPE)))

Definition at line 74 of file util.h.

#define R_NORM (   A,
 
)
Value:
{ \
if ((A) == 0.0) { \
(B) = 0; \
} else { \
while (FABS(A) > 1.0) { \
(B) += 1; \
(A) /= 2.0; \
} \
while (FABS(A) < 0.5) { \
(B) -= 1; \
(A) *= 2.0; \
} \
} \
}
if(TDesc==NULL)
Definition: cd.c:1326
while(TDesc->tSucc!=NULL)
Definition: cd.c:1335
#define FABS(a)
Definition: util.h:41

Definition at line 78 of file util.h.

#define REALLOC (   x,
 
)    trealloc((char *)(x),(unsigned)(y))

Definition at line 29 of file util.h.

#define SIGN (   a,
 
)    ( b >= 0 ? (a >= 0 ? a : - a) : (a >= 0 ? - a : a))

Definition at line 56 of file util.h.

#define TRUE   1

Definition at line 27 of file util.h.

Function Documentation

char* calloc ( )
void free ( )
char* malloc ( )
char* realloc ( )
char* tmalloc ( )
char* trealloc ( )