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.

94 lines
2.2 KiB

  1. //==========================================================================;
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1992 - 1994 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------;
  11. //
  12. // debug.h
  13. //
  14. // Description:
  15. //
  16. //
  17. //
  18. //==========================================================================;
  19. #ifndef _INC_DEBUG
  20. #define _INC_DEBUG
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. //
  26. //
  27. //
  28. //
  29. #ifdef DEBUG
  30. #define DEBUG_SECTION "Debug" // section name for
  31. #define DEBUG_MODULE_NAME "ACMAPP" // key name and prefix for output
  32. #define DEBUG_MAX_LINE_LEN 255 // max line length (bytes!)
  33. #endif
  34. //
  35. // based code makes since only in win 16 (to try and keep stuff out of
  36. // [fixed] data segments, etc)...
  37. //
  38. #ifndef BCODE
  39. #ifdef WIN32
  40. #define BCODE
  41. #else
  42. #define BCODE _based(_segname("_CODE"))
  43. #endif
  44. #endif
  45. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  46. //
  47. //
  48. //
  49. // #pragma message(REMIND("this is a reminder"))
  50. //
  51. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  52. #define DEBUG_QUOTE(x) #x
  53. #define DEBUG_QQUOTE(y) DEBUG_QUOTE(y)
  54. #define REMIND(sz) __FILE__ "(" DEBUG_QQUOTE(__LINE__) ") : " sz
  55. #ifdef DEBUG
  56. BOOL WINAPI DbgEnable(BOOL fEnable);
  57. UINT WINAPI DbgGetLevel(void);
  58. UINT WINAPI DbgSetLevel(UINT uLevel);
  59. UINT WINAPI DbgInitialize(BOOL fEnable);
  60. void FAR CDECL dprintf(UINT uDbgLevel, LPSTR szFmt, ...);
  61. #define D(x) {x;}
  62. #define DPF dprintf
  63. #define DPI(sz) {static char BCODE ach[] = sz; OutputDebugStr(ach);}
  64. #else
  65. #define DbgEnable(x) FALSE
  66. #define DbgGetLevel() 0
  67. #define DbgSetLevel(x) 0
  68. #define DbgInitialize(x) 0
  69. #ifdef _MSC_VER
  70. #pragma warning(disable:4002)
  71. #endif
  72. #define D(x)
  73. #define DPF()
  74. #define DPI(sz)
  75. #endif
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. #endif // _INC_DEBUG