home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 199.lha / GimmeLib / debug.h < prev    next >
C/C++ Source or Header  |  1988-12-27  |  1KB  |  46 lines

  1. #ifndef GIMMELIB_DEBUG_H
  2. #define GIMMELIB_DEBUG_H
  3.  
  4. #ifdef DEBUG
  5.  
  6. #define DEBUGCMD(c) c
  7. #define DEBUGMSG(c) printf(c)
  8. #define DEBUGMSG1(c,p) printf(c,p)
  9. #define DEBUGMSG2(c,p1,p2) printf(c,p1,p2)
  10. #define DEBUGMSG3(c,p1,p2,p3) printf(c,p1,p2,p3)
  11. #define DEBUGMSG4(c,p1,p2,p3,p4) printf(c,p1,p2,p3,p4)
  12.  
  13. #ifndef OWNDEBUG
  14. /* doPrintf parms: process-port, reply-port, c, p1, p2, p3, p4
  15.  * note regarding reply-port: if it is NULL, then the printf might not get
  16.  * done before a crash since doPrintf will not wait for a reply to make
  17.  * sure that the printf was done
  18.  * THIS VERSION uses gimMainPort as a default port, so it had better be there!!
  19. */
  20. /* subtask debug message */
  21. #define STDEBUGMSG(c) doPrintf(gimMainPort,NULL,c,0,0,0,0)
  22. #define STDEBUGMSG1(c,p) doPrintf(gimMainPort,NULL,c,p,0,0,0)
  23. #define STDEBUGMSG2(c,p1,p2) doPrintf(gimMainPort,NULL,c,p1,p2,0,0,0)
  24. #define STDEBUGMSG3(c,p1,p2,p3) doPrintf(gimMainPort,NULL,c,p1,p2,p3,0)
  25. #define STDEBUGMSG4(c,p1,p2,p3,p4) doPrintf(gimMainPort,NULL,c,p1,p2,p3,p4)
  26. #endif !OWNDEBUG
  27.  
  28. #else
  29.  
  30. #define DEBUGCMD(c)
  31. #define DEBUGMSG(c)
  32. #define DEBUGMSG1(c,p)
  33. #define DEBUGMSG2(c,p1,p2)
  34. #define DEBUGMSG3(c,p1,p2,p3)
  35. #define DEBUGMSG4(c,p1,p2,p3,p4)
  36.  
  37. #define STDEBUGMSG(c)
  38. #define STDEBUGMSG1(c,p)
  39. #define STDEBUGMSG2(c,p1,p2)
  40. #define STDEBUGMSG3(c,p1,p2,p3)
  41. #define STDEBUGMSG4(c,p1,p2,p3,p4)
  42.  
  43. #endif else !DEBUG
  44.  
  45. #endif !GIMMELIB_DEBUG_H
  46.