[142] | 1 | /* $Id: dbgos2.h 205 2007-06-14 01:33:51Z stevenhl $ */
|
---|
| 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 | //******************************************************************************
|
---|
[205] | 24 | #ifndef __DBGOS2_H__
|
---|
| 25 | #define __DBGOS2_H__
|
---|
[142] | 26 |
|
---|
| 27 | #ifdef __cplusplus
|
---|
| 28 | extern "C" {
|
---|
| 29 | #endif
|
---|
| 30 |
|
---|
| 31 | void cdecl PrintfOut(char far *DbgStr , ...);
|
---|
[153] | 32 | extern int dbglevel;
|
---|
[142] | 33 |
|
---|
| 34 | #ifdef __cplusplus
|
---|
| 35 | }
|
---|
| 36 | #endif
|
---|
| 37 |
|
---|
| 38 | #ifdef DEBUG
|
---|
| 39 | #define dprintf(a) PrintfOut a
|
---|
[153] | 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
|
---|
[142] | 43 | #define DebugInt3() _asm int 3
|
---|
| 44 | #else
|
---|
| 45 | #define dprintf(a)
|
---|
[153] | 46 | #define dprintf2(a)
|
---|
| 47 | #define dprintf3(a)
|
---|
| 48 | #define dprintf4(a)
|
---|
[142] | 49 | #define DebugInt3()
|
---|
| 50 | #endif
|
---|
| 51 |
|
---|
[205] | 52 | #endif //__DBGOS2_H__
|
---|