Main Page | Class List | File List | Class Members | File Members | Related Pages

debug.h File Reference

#include <sys/types.h>

Include dependency graph for debug.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define NULL   0
#define UT_DEBUG   1
#define DBG1(msg, args...)   { fprintf(stderr, "DEBUG %s:%d: " msg "\n", __FILE__, __LINE__, ## args); }
#define DBG2(msg, args...)
#define DBG(msg, args...)
#define DBG3(msg, args...)
#define DBG3_S(msg, args...)
#define ASSERT(expr)
#define ASSERT_MSG(expr, msg, args...)
#define ERROR(msg, args...)


Detailed Description

Author:
Antoine Calando (antoine@alliancemca.net)
Note:
EC ##args est une directive propre à gcc.

AC The solution is not to use these macro with only one argument and to create a new macro (with 1 argument) for these cases.

Definition in file debug.h.


Define Documentation

#define ASSERT expr   ) 
 

Value:

if(!(expr)) { \
                fprintf(stderr, "\nASSERT %s:%d: ******* Assertion "  #expr  " failed! ******* \n", __FILE__, __LINE__); \
        }

Definition at line 88 of file debug.h.

#define ASSERT_MSG expr,
msg,
args...   ) 
 

Value:

if(!(expr)) { \
                fprintf(stderr, "\nASSERT %s:%d: ******* Assertion "  #expr  " failed!" msg " ******* \n", __FILE__, __LINE__, ## args); \
        }

Definition at line 92 of file debug.h.

#define ERROR msg,
args...   ) 
 

Value:

{ fprintf(stderr, "ERROR %s:%d:"   msg  "\n", __FILE__, __LINE__, ## args); \
        exit (-1); }

Definition at line 96 of file debug.h.


Generated on Fri Feb 25 18:30:15 2005 for Utrac by  doxygen 1.3.9