common.h File Reference

Go to the source code of this file.

Defines

#define BEGIN_C_DECLS
#define END_C_DECLS
#define STR(x)   "x"
#define CONC(x, y)   x/**/y
#define EXIT_SUCCESS   0
#define EXIT_FAILURE   1
#define XCALLOC(type, num)   ((type *) xcalloc ((num), sizeof(type)))
#define XMALLOC(type, num)   ((type *) xmalloc ((num) * sizeof(type)))
#define XREALLOC(type, p, num)   ((type *) xrealloc ((p), (num) * sizeof(type)))
#define XFREE(stale)
#define pocc_debug(S)   { fprintf (stderr, #S); fprintf (stderr, "\n"); }

Functions

BEGIN_C_DECLS void * xcalloc (size_t num, size_t size)
void * xmalloc (size_t num)
void * xrealloc (void *p, size_t num)
char * xstrdup (const char *string)
char * xstrerror (int errnum)


Define Documentation

#define BEGIN_C_DECLS

#define END_C_DECLS

#define STR (  )     "x"

#define CONC ( x,
 )     x/**/y

#define EXIT_SUCCESS   0

#define EXIT_FAILURE   1

#define XCALLOC ( type,
num   )     ((type *) xcalloc ((num), sizeof(type)))

#define XMALLOC ( type,
num   )     ((type *) xmalloc ((num) * sizeof(type)))

#define XREALLOC ( type,
p,
num   )     ((type *) xrealloc ((p), (num) * sizeof(type)))

#define XFREE ( stale   ) 

Value:

do {        \
        if (stale) { free (stale);  stale = 0; }            \
                                                } while (0)

Referenced by main(), pocc_driver_codegen(), pocc_driver_codegen_program_finalize(), pocc_driver_letsee(), and pocc_options_free().

#define pocc_debug (  )     { fprintf (stderr, #S); fprintf (stderr, "\n"); }


Function Documentation

BEGIN_C_DECLS void* xcalloc ( size_t  num,
size_t  size 
)

References xmalloc().

void* xmalloc ( size_t  num  ) 

References pocc_fatal().

Referenced by xcalloc(), and xrealloc().

void* xrealloc ( void *  p,
size_t  num 
)

References pocc_fatal(), and xmalloc().

char* xstrdup ( const char *  string  ) 

Referenced by pocc_set_program_name().

char* xstrerror ( int  errnum  ) 


Generated on Mon Jul 18 03:11:41 2011 for PoCC by  doxygen 1.5.6