home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / misc / adoc / source / debug.h < prev    next >
C/C++ Source or Header  |  1995-04-13  |  2KB  |  64 lines

  1. /*                                                               -*- C -*-
  2.  *  DEBUG.H
  3.  *
  4.  *  (c)Copyright 1991-93 by Tobias Ferber,  All Rights Reserved.
  5.  *
  6.  *  This file is free software; you can redistribute it and/or modify
  7.  *  it under the terms of the GNU General Public License as published
  8.  *  by the Free Software Foundation; either version 1 of the License,
  9.  *  or (at your option) any later version.
  10.  *
  11.  *  This file is distributed in the hope that it will be useful,
  12.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  *  GNU General Public License for more details.
  15.  *
  16.  *  You should have received a copy of the GNU General Public License
  17.  *  along with this program; see the file COPYING.  If not, write to
  18.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21. /* $VER: $Id: debug.h,v 1.6 1994/09/22 23:27:35 tf Exp $ */
  22.  
  23. #ifndef DEBUG_H
  24. #define DEBUG_H
  25.  
  26. #include <stdarg.h>
  27. #include <stdio.h>
  28.  
  29. #ifdef DEBUG
  30.  
  31. extern int   bug_level;
  32. extern FILE *bug_stream;
  33.  
  34. /*
  35. #define D(x)  (x)
  36. #define DD(x) while(0)
  37. */
  38.  
  39. #define D(x)  (x)
  40. #define DD(x) if(bug_level > 20) (x)
  41.  
  42. #include "smartmem.h"
  43. #define AUTO_ADVANCE_MEM_HANDLE
  44.  
  45. #include "timer.h"
  46. #define TIMER_HANDLE 1
  47.  
  48. /*#define bug  printf*/
  49. extern void bug(const char *, ...);
  50. extern void bug_enter(const char *, ...);
  51. extern void bug_leave(const char *, ...);
  52.  
  53. extern void bug_init(int, FILE *);
  54. extern void bug_exit(void);
  55.  
  56. #else /* !DEBUG */
  57.  
  58. #define D(x)   while(0)
  59. #define DD(x)  while(0)
  60.  
  61. #endif /* DEBUG */
  62.  
  63. #endif /* !DEBUG_H */
  64.