4 * Copyright (c) 1998-2002, Darren Hiebert
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
9 * External interface to debug.c
17 #include "general.h" /* must always come first */
29 # define debug(level) ((Option.debugLevel & (long)(level)) != 0)
30 # define DebugStatement(x) x
31 # define PrintStatus(x) if (debug(DEBUG_STATUS)) printf x;
32 # define Assert(c) assert(c)
34 # define DebugStatement(x)
35 # define PrintStatus(x)
46 /* Defines the debugging levels.
49 DEBUG_READ
= 0x01, /* echo raw (filtered) characters */
50 DEBUG_PARSE
= 0x02, /* echo parsing results */
51 DEBUG_STATUS
= 0x04, /* echo file status information */
52 DEBUG_OPTION
= 0x08, /* echo option parsing */
53 DEBUG_CPP
= 0x10, /* echo characters out of pre-processor */
54 DEBUG_RAW
= 0x20 /* echo raw (filtered) characters */
60 extern void lineBreak (void);
61 extern void debugPrintf (const enum eDebugLevels level
, const char *const format
, ...) __printf__ (2, 3);
62 extern void debugPutc (const int level
, const int c
);
63 extern void debugParseNest (const boolean increase
, const unsigned int level
);
64 extern void debugCppNest (const boolean begin
, const unsigned int level
);
65 extern void debugCppIgnore (const boolean ignore
);
66 extern void clearString (char *const string
, const int length
);
67 extern void debugEntry (const tagEntryInfo
*const tag
);
71 /* vi:set tabstop=4 shiftwidth=4: */