debug.h 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* D E B U G G I N G T O O L S */
  7. /* TEMPORARY: */
  8. /* #define DEBUG */
  9. extern int linecount; /* # lines in this file */
  10. extern bool verbose_flag; /* generate verbose output ? */
  11. /* VARARGS 1 */
  12. extern error();
  13. #ifdef TRACE
  14. extern OUTTRACE();
  15. #else
  16. #define OUTTRACE(s,n)
  17. #endif
  18. #ifdef VERBOSE
  19. extern OUTVERBOSE();
  20. #else
  21. #define OUTVERBOSE(s,n1,n2)
  22. #endif
  23. #ifdef DEBUG
  24. /* Some (all?) Unix debuggers don't particularly like
  25. * static procedures and variables. Therefor we make everything
  26. * global when debugging.
  27. */
  28. #define STATIC
  29. #define assert(x) if(!(x)) badassertion(__FILE__,__LINE__)
  30. extern VI();
  31. extern VL();
  32. extern VD();
  33. extern VA();
  34. extern VO();
  35. extern VP();
  36. #else /*DEBUG*/
  37. #define assert(b)
  38. #define VI(i)
  39. #define VL(l)
  40. #define VD(d)
  41. #define VA(a)
  42. #define VO(o)
  43. #define VP(p)
  44. #define STATIC static
  45. #endif