home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / text / hyper / hsc_source.lha / hsc / source / ugly / udebug.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-08  |  864 b   |  42 lines

  1. #ifndef UGLY_DEBUG_H
  2. #define UGLY_DEBUG_H
  3. /*
  4.  * ugly/debug.h
  5.  *
  6.  * ugly debugging defines.
  7.  *
  8.  * (C) by Tommy-Saftwörx 1996
  9.  *
  10.  */
  11.  
  12. #ifdef DEBUG_UGLY
  13.  
  14. /* NOTE: for some defines, a value of "2" enables
  15.  * extended debuggin information:
  16.  *
  17.  * DEBUG_UGLY_EXPSTR=2 display every call to set_estr()
  18.  * DEBUG_UGLY_MEMORY=2 display every call to umalloc/ufree
  19.  */
  20. #define DEBUG_UGLY_ARG    0
  21. #define DEBUG_UGLY_EXPSTR 1
  22. #define DEBUG_UGLY_INFILE 0
  23. #define DEBUG_UGLY_MEMORY 1
  24. #define DEBUG_UGLY_TIME   1
  25.  
  26. #else
  27.  
  28. #define DEBUG_UGLY_ARG    0
  29. #define DEBUG_UGLY_EXPSTR 0
  30. #define DEBUG_UGLY_INFILE 0
  31. #define DEBUG_UGLY_MEMORY 0
  32. #define DEBUG_UGLY_TIME   0
  33.  
  34. #endif /* DEBUG_UGLY */
  35.  
  36. #define panic(msg) {                                 \
  37.     fprintf(stderr, "** PANIC at \"%s\" (%u): %s\n", \
  38.             __FILE__, __LINE__, (msg)); exit(255); } \
  39.  
  40. #endif /* UGLY_DEBUG_H */
  41.  
  42.