1 | /* $Id: dbgos2.h 153 2000-07-23 16:21:57Z sandervl $ */
|
---|
2 |
|
---|
3 | //******************************************************************************
|
---|
4 | // Header for debug functions
|
---|
5 | //
|
---|
6 | // Copyright 2000 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
7 | //
|
---|
8 | // This program is free software; you can redistribute it and/or
|
---|
9 | // modify it under the terms of the GNU General Public License as
|
---|
10 | // published by the Free Software Foundation; either version 2 of
|
---|
11 | // the License, or (at your option) any later version.
|
---|
12 | //
|
---|
13 | // This program is distributed in the hope that it will be useful,
|
---|
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
16 | // GNU General Public License for more details.
|
---|
17 | //
|
---|
18 | // You should have received a copy of the GNU General Public
|
---|
19 | // License along with this program; if not, write to the Free
|
---|
20 | // Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
|
---|
21 | // USA.
|
---|
22 | //
|
---|
23 | //******************************************************************************
|
---|
24 | #ifndef __COMMDBG_H__
|
---|
25 | #define __COMMDBG_H__
|
---|
26 |
|
---|
27 | #ifdef __cplusplus
|
---|
28 | extern "C" {
|
---|
29 | #endif
|
---|
30 |
|
---|
31 | void cdecl PrintfOut(char far *DbgStr , ...);
|
---|
32 | extern int dbglevel;
|
---|
33 |
|
---|
34 | #ifdef __cplusplus
|
---|
35 | }
|
---|
36 | #endif
|
---|
37 |
|
---|
38 | #ifdef DEBUG
|
---|
39 | #define dprintf(a) PrintfOut a
|
---|
40 | #define dprintf2(a) if(dbglevel >= 2) PrintfOut a
|
---|
41 | #define dprintf3(a) if(dbglevel >= 3) PrintfOut a
|
---|
42 | #define dprintf4(a) if(dbglevel >= 4) PrintfOut a
|
---|
43 | #define DebugInt3() _asm int 3
|
---|
44 | #else
|
---|
45 | #define dprintf(a)
|
---|
46 | #define dprintf2(a)
|
---|
47 | #define dprintf3(a)
|
---|
48 | #define dprintf4(a)
|
---|
49 | #define DebugInt3()
|
---|
50 | #endif
|
---|
51 |
|
---|
52 | #endif //__COMMDBG_H__
|
---|