Source code of Windows XP (NT5)
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.

110 lines
2.9 KiB

  1. // Copyright (c) 1992 Microsoft Corporation
  2. /*
  3. //
  4. // Local header file for MCIHWND - permanent window for MM code
  5. //
  6. */
  7. #define DEBUGLEVELVAR __iDebugLevel
  8. #ifndef RC_INVOKED
  9. #include <string.h>
  10. #include <stdio.h>
  11. #endif /* RC_INVOKED */
  12. #include <windows.h>
  13. #include <mmsystem.h>
  14. #include <mmddk.h>
  15. #include "mci.h"
  16. #if DBG
  17. extern char aszAppName[];
  18. extern int dGetDebugLevel(LPSTR lpszAppName);
  19. #else
  20. #define dGetDebugLevel(x)
  21. #endif
  22. /***************************************************************************
  23. DEBUGGING SUPPORT
  24. ***************************************************************************/
  25. #if DBG
  26. #ifdef DEBUGLEVELVAR
  27. // So that other related modules can use their own debug level
  28. // variable
  29. #define winmmDebugLevel DEBUGLEVELVAR
  30. #endif
  31. extern BOOL fDebugBreak;
  32. extern int winmmDebugLevel;
  33. extern void winmmDbgOut(LPSTR lpszFormat, ...);
  34. extern void dDbgAssert(LPSTR exp, LPSTR file, int line);
  35. DWORD __dwEval;
  36. #ifdef BASE_DEBUG
  37. #define dprintf DbgPrint
  38. #define dprintf1 if (winmmDebugLevel >= 1) DbgPrint
  39. #define dprintf2 if (winmmDebugLevel >= 2) DbgPrint
  40. #define dprintf3 if (winmmDebugLevel >= 3) DbgPrint
  41. #define dprintf4 if (winmmDebugLevel >= 4) DbgPrint
  42. #define dprintf5 if (winmmDebugLevel >= 5) DbgPrint
  43. #else
  44. extern void winmmDbgOut(LPSTR lpszFormat, ...);
  45. #define dprintf winmmDbgOut
  46. #define dprintf1 if (winmmDebugLevel >= 1) winmmDbgOut
  47. #define dprintf2 if (winmmDebugLevel >= 2) winmmDbgOut
  48. #define dprintf3 if (winmmDebugLevel >= 3) winmmDbgOut
  49. #define dprintf4 if (winmmDebugLevel >= 4) winmmDbgOut
  50. #define dprintf5 if (winmmDebugLevel >= 5) winmmDbgOut
  51. #endif // BASE_DEBUG
  52. #define WinAssert(exp) \
  53. ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
  54. #define WinEval(exp) \
  55. ((__dwEval=(DWORD)(exp)), \
  56. __dwEval ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__), __dwEval)
  57. #define DOUT(x) (OutputDebugString(x), OutputDebugString("\r\n"), 0)
  58. #define DOUTX(x) (OutputDebugString(x), 0)
  59. #define ROUTS(x) (OutputDebugString(x), OutputDebugString("\r\n"), 0)
  60. #define ROUT(x) (OutputDebugString(x), OutputDebugString("\r\n"), 0)
  61. #define ROUTX(x) (OutputDebugString(x), 0)
  62. #else
  63. #define DebugBreak()
  64. #define fDebugBreak 0 /* Therefore FALSE */
  65. #define dprintf if (0) ((int (*)(char *, ...)) 0)
  66. #define dprintf1 if (0) ((int (*)(char *, ...)) 0)
  67. #define dprintf2 if (0) ((int (*)(char *, ...)) 0)
  68. #define dprintf3 if (0) ((int (*)(char *, ...)) 0)
  69. #define dprintf4 if (0) ((int (*)(char *, ...)) 0)
  70. #define dprintf5 if (0) ((int (*)(char *, ...)) 0)
  71. #define WinAssert(exp) 0
  72. #define WinEval(exp) (exp)
  73. #define DOUT(x) 0
  74. #define DOUTX(x) 0
  75. #define ROUTS(x) 0
  76. #define ROUT(x) 0
  77. #define ROUTX(x) 0
  78. #endif