[354] | 1 | /* $Id: dbgos2.h,v 1.2 2000/07/23 16:21:54 sandervl Exp $ */
|
---|
| 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 __DBGOS2_H__
|
---|
| 25 | #define __DBGOS2_H__
|
---|
| 26 |
|
---|
| 27 | #ifdef __cplusplus
|
---|
| 28 | extern "C" {
|
---|
| 29 | #endif
|
---|
| 30 |
|
---|
| 31 | void cdecl PrintfOut(char far *DbgStr , ...);
|
---|
| 32 |
|
---|
| 33 | extern int dbglevel;
|
---|
| 34 |
|
---|
| 35 | #ifdef __cplusplus
|
---|
| 36 | }
|
---|
| 37 | #endif
|
---|
| 38 |
|
---|
| 39 | #ifdef DEBUG
|
---|
| 40 | #define dprintf(a) PrintfOut a
|
---|
| 41 | #define dprintf2(a) if(dbglevel >= 2) PrintfOut a
|
---|
| 42 | #define dprintf3(a) if(dbglevel >= 3) PrintfOut a
|
---|
| 43 | #define dprintf4(a) if(dbglevel >= 4) PrintfOut a
|
---|
| 44 | #define DebugInt3() _asm int 3
|
---|
| 45 | #else
|
---|
| 46 | #define dprintf(a)
|
---|
| 47 | #define dprintf2(a)
|
---|
| 48 | #define dprintf3(a)
|
---|
| 49 | #define dprintf4(a)
|
---|
| 50 | #define DebugInt3()
|
---|
| 51 | #endif
|
---|
| 52 |
|
---|
| 53 | #endif //__COMMDBG_H__
|
---|