summaryrefslogtreecommitdiff
path: root/print/cpsuisam/DEBUG.H
blob: 5d6b88a385c30363c8dc59bcbf836d11fe6d8251 (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*++

Copyright (c) 1990-2003 Microsoft Corporation
All Rights Reserved


Module Name:

    debug.h


Abstract:

    This module contains all debugger definitions


[Environment:]

    NT Windows - Common Printer Driver UI DLL.


--*/


#if DBG

VOID
cdecl
CPSUIDbgPrint
(
    LPCSTR   pszFormat,
    ...
);

VOID
CPSUIDbgType
(
    INT    Type
);

extern BOOL DoCPSUIWarn;

#define DBGP(x)                 (CPSUIDbgPrint x)

#define DEFINE_DBGVAR(x)        DWORD DBG_CPSUIFILENAME=(x)

#define CPSUIDBG(x,y)           if((x)&DBG_CPSUIFILENAME){CPSUIDbgType(0);DBGP(y);}

#define CPSUIDBGBLK(x)          x;
#define CPSUIWARN(x)            if(DoCPSUIWarn) { CPSUIDbgType(1);DBGP(x); }
#define CPSUIERR(x)             CPSUIDbgType(-1);DBGP(x)
#define CPSUIRIP(x)             CPSUIERR(x); DebugBreak()
#define CPSUIASSERT(b,x,e,i)     \
            if (!(e)) { _CPSUIAssert(x,#e,__FILE__,(UINT)__LINE__,(DWORD)i,b); }

#else   // DBG

#define CPSUIDBGBLK(x)
#define DEFINE_DBGVAR(x)
#define CPSUIDBG(x,y)
#define CPSUIWARN(x)
#define CPSUIERR(x)
#define CPSUIRIP(x)
#define CPSUIASSERT(b,x,e,i)

#endif  // DBG