File: debug.h

package info (click to toggle)
netrik 1.16.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,164 kB
  • ctags: 618
  • sloc: ansic: 6,657; sh: 994; makefile: 169
file content (37 lines) | stat: -rw-r--r-- 910 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
   netrik -- The ANTRIK Internet Viewer
   Copyright (C) Olaf D. Buddenhagen AKA antrik, et al (see AUTHORS)
   Published under the GNU GPL; see LICENSE for details.
*/
/*
 * debug.h -- contains macros generating messages in debug mode and definitions
 * for debug.c
 *
 * (C) 2001 antrik
 *
 * If not compiled with -DDEBUG, the DMSG macro is defined to do nothing.
 */
#include <stdio.h>
#include <stdarg.h>

#include "config.h"

#include "cfg.h"

#ifdef DEBUG

   /*
    * if in debug mode, print message; otherwise do nothing.
    *
    * Note: paramter list for DMSG must be enclosed in double parenthesis!
    * (outer parenthesis are for the macro, inner ones for debug_printf() )
    */
   #define DMSG(args) if(cfg.debug) debug_printf args

void debug_printf(char *fmt, ...);    /* print a message */

#else    /* not DEBUG */

   #define DMSG(args)    /* don't compile anything for DMSG */

#endif