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.

116 lines
3.1 KiB

  1. //==========================================================================;
  2. //
  3. // Copyright (c) 1991-1995 Microsoft Corporation
  4. //
  5. // You have a royalty-free right to use, modify, reproduce and
  6. // distribute the Sample Files (and/or any modified version) in
  7. // any way you find useful, provided that you agree that
  8. // Microsoft has no warranty obligations or liability for any
  9. // Sample Application Files which are modified.
  10. //
  11. //--------------------------------------------------------------------------;
  12. //
  13. // debug.h
  14. //
  15. // Description:
  16. //
  17. //
  18. // Notes:
  19. //
  20. // To use this library at interrupt time under Win16, you must do
  21. // the following:
  22. //
  23. // 1. Defined ISRDEBUG when compiling debug.c
  24. //
  25. // 2. Add a line in the SEGMENTS section of your .DEF file to
  26. // define the DEBUG_TEXT segment:
  27. //
  28. //
  29. // SEGMENTS
  30. // DEBUG_TEXT FIXED PRELOAD
  31. //
  32. //
  33. // These routines are callable at interrupt time under Win32 by
  34. // default.
  35. //
  36. // 3. No need for UNICODE support for debug routines
  37. //
  38. // win.ini
  39. // [debug]
  40. // MIDIMAP=0|1|2|3|4
  41. //
  42. // History:
  43. // 11/23/92 cjp [curtisp]
  44. //
  45. //==========================================================================;
  46. #ifndef _INC_DEBUG
  47. #define _INC_DEBUG
  48. #ifdef __cplusplus
  49. extern "C"
  50. {
  51. #endif
  52. //
  53. //
  54. //
  55. //
  56. //
  57. #define ISRDEBUG 1
  58. #define DEBUG_SECTION TEXT ("debug") // section name for
  59. #define DEBUG_MODULE_NAME TEXT ("MIDIMAP") // key name and prefix for output
  60. #define DEBUG_MAX_LINE_LEN 255 // max line length (bytes)
  61. #define K_DEFAULT_LOGMEM 32
  62. #define K_MAX_LOGMEM 63
  63. #define DRV_ENABLE_DEBUG (DRV_USER+1) // Enable/disable debug message
  64. #define DRV_SET_DEBUG_LEVEL (DRV_USER+2) // Message to set the debug level
  65. #define WM_DEBUGUPDATE (WM_USER+1000)
  66. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  67. //
  68. //
  69. //
  70. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  71. #ifdef DEBUG
  72. VOID WINAPI WinAssert(LPSTR lpstrExp, LPSTR lpstrFile, DWORD dwLine);
  73. BOOL WINAPI DbgEnable(BOOL fEnable);
  74. UINT WINAPI DbgSetLevel(UINT uLevel);
  75. UINT WINAPI DbgInitialize(BOOL fEnable);
  76. void WINAPI DbgRegisterCallback(HWND hWnd);
  77. BOOL WINAPI DbgGetNextLogEntry(LPTSTR lpstrBuffer, UINT cbBuffer);
  78. void FAR CDECL dprintf(UINT uDbgLevel, LPTSTR szFmt, ...);
  79. #define assert(exp) \
  80. ( (exp) ? (void) 0 : WinAssert(#exp, __FILE__, __LINE__) )
  81. #define DPF dprintf
  82. #define D1(sz) dprintf(1,sz)
  83. #define D2(sz) dprintf(2,sz)
  84. #define D3(sz) dprintf(3,sz)
  85. #define D4(sz) dprintf(4,sz)
  86. #else
  87. #define assert(exp) ((void)0)
  88. #define DbgEnable(x) FALSE
  89. #define DbgSetLevel(x) 0
  90. #define DbgInitialize(x) 0
  91. #define DPF 1 ? (void)0 : (void)
  92. #define D1(sz)
  93. #define D2(sz)
  94. #define D3(sz)
  95. #define D4(sz)
  96. #endif
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100. #endif // _INC_DEBUG