home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / code / stubshack / HeapGraph / h / Debug next >
Encoding:
Text File  |  1995-01-07  |  981 b   |  58 lines

  1. #ifndef __HeapGraph_Debug_h
  2. #define __HeapGraph_Debug_h
  3.  
  4. /*
  5. This header effectively prototypes the following function:
  6.  
  7. void HeapGraph_Debug_Printf( char *, ...);
  8.  
  9. */
  10.  
  11.  
  12. #ifdef HEAPGRAPH_DEBUG
  13.  
  14. #ifndef __HeapGraph_Sendf_h
  15. #include "Sendf.h"
  16. #endif
  17. #define HeapGraph_Debug_Printf HeapGraph__Sendf
  18.  
  19.  
  20.  
  21. #else
  22.  
  23. #ifndef __HeapGraph_Dummyf_h
  24. #include "Dummyf.h"
  25. #endif
  26.  
  27. #define HeapGraph_Debug_Printf if(0) HeapGraph_Dummyf
  28.     /* This should optimise out, unless you're making a DDT    */
  29.     /* version with cc -g                    */
  30.  
  31. #endif
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. #define Debug_Printf HeapGraph_Debug_Printf
  41.     /* A bit easier to type...    */
  42.  
  43.  
  44.  
  45. /*
  46.  
  47. If you #include this header and predefine HEAPGRAPH_DEBUG in your
  48. makefile, you can send debugging info to pipe:C_Debug.xxxx with
  49. Debug_Printf( ...). If you don't predefine HEAPGRAPH_DEBUG, all
  50. Debug_Printf calls will be ignored by the compiler, so you can put loads
  51. of Debug_Printf's in your code and make a normal and a debug version
  52. from the same source code. 
  53.  
  54. */
  55.  
  56.  
  57. #endif
  58.