Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1990-2003 Microsoft Corporation
  3. All Rights Reserved
  4. Module Name:
  5. debug.h
  6. Abstract:
  7. This module contains all debugger definitions
  8. [Environment:]
  9. NT Windows - Common Printer Driver UI DLL.
  10. --*/
  11. #if DBG
  12. VOID
  13. cdecl
  14. CPSUIDbgPrint
  15. (
  16. LPSTR pszFormat,
  17. ...
  18. );
  19. VOID
  20. CPSUIDbgType
  21. (
  22. INT Type
  23. );
  24. VOID
  25. _CPSUIAssert
  26. (
  27. LPSTR pMsg,
  28. LPSTR pFalseExp,
  29. LPSTR pFilename,
  30. UINT LineNo,
  31. DWORD Exp,
  32. BOOL Stop
  33. );
  34. extern BOOL DoCPSUIWarn;
  35. #define DBGP(x) (CPSUIDbgPrint x)
  36. #if 1
  37. #define DEFINE_DBGVAR(x) DWORD DBG_CPSUIFILENAME=(x)
  38. #else
  39. #define DEFINE_DBGVAR(x)
  40. #endif
  41. #define CPSUIDBG(x,y) if((x)&DBG_CPSUIFILENAME){CPSUIDbgType(0);DBGP(y);}
  42. #define CPSUIDBGBLK(x) x;
  43. #define CPSUIWARN(x) if(DoCPSUIWarn) { CPSUIDbgType(1);DBGP(x); }
  44. #define CPSUIERR(x) CPSUIDbgType(-1);DBGP(x)
  45. #define CPSUIRIP(x) CPSUIERR(x); DebugBreak()
  46. #define CPSUIASSERT(b,x,e,i) \
  47. if (!(e)) { _CPSUIAssert(x,#e,__FILE__,(UINT)__LINE__,(DWORD)i,b); }
  48. #else // DBG
  49. #define CPSUIDBGBLK(x)
  50. #define DEFINE_DBGVAR(x)
  51. #define CPSUIDBG(x,y)
  52. #define CPSUIWARN(x)
  53. #define CPSUIERR(x)
  54. #define CPSUIRIP(x)
  55. #define CPSUIASSERT(b,x,e,i)
  56. #endif // DBG