home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / varia / memory-device / source / debug.h < prev    next >
C/C++ Source or Header  |  1977-12-31  |  871b  |  46 lines

  1. #ifndef __DEBUG_H
  2. #define __DEBUG_H
  3. /*
  4. ** $VER: debug.h 1.0 (17 Jun 1995)
  5. **
  6. ** convenient debuggung support
  7. **
  8. ** (C) Copyright 1995 Marius Gröger
  9. **     All Rights Reserved
  10. **
  11. ** $HISTORY:
  12. **
  13. ** 17 Jun 1995 : 001.000 :  created
  14. */
  15.  
  16. #if (DEBUG != 0)
  17. extern void KPrintF(char *, ...), KGetChar(void);
  18. #endif
  19.  
  20. #if (DEBUG & 1)
  21. #  define d(x) do { KPrintF("%s:%s:%ld:",__FILE__,__FUNC__,__LINE__); KPrintF x; } while(0)
  22. #else
  23. #  define d(x)
  24. #endif
  25.  
  26. #if (DEBUG & 2)
  27. #  define d2(x) do { KPrintF("%s:%s:%ld:",__FILE__,__FUNC__,__LINE__); KPrintF x; } while(0)
  28. #else
  29. #  define d2(x)
  30. #endif
  31.  
  32. #if (DEBUG & 4)
  33. #  define d4(x) do { KPrintF("%s:%s:%ld:",__FILE__,__FUNC__,__LINE__); KPrintF x; } while(0)
  34. #else
  35. #  define d4(x)
  36. #endif
  37.  
  38. #if (DEBUG & 8)
  39. #  define d8(x) do { KPrintF("%s:%s:%ld:",__FILE__,__FUNC__,__LINE__); KPrintF x; } while(0)
  40. #else
  41. #  define d8(x)
  42. #endif
  43.  
  44. #endif
  45.  
  46.