Windows NT 4.0 source code leak
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.

122 lines
2.6 KiB

4 years ago
  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-1996 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. // What stuff should we include?
  27. //
  28. #ifdef DEBUG
  29. #define USEDPF
  30. #define USERPF
  31. #define USEASSERT
  32. #endif
  33. #ifdef RDEBUG
  34. #define USERPF
  35. #endif
  36. //
  37. //
  38. //
  39. //
  40. #if defined(USEDPF) || defined(USERPF)
  41. #define DEBUG_SECTION "Debug" // section name for
  42. #define DEBUG_MODULE_NAME "DSOUND" // key name and prefix for output
  43. #define DEBUG_MAX_LINE_LEN 255 // max line length (bytes!)
  44. #endif
  45. //
  46. // based code makes since only in win 16 (to try and keep stuff out of
  47. // [fixed] data segments, etc)...
  48. //
  49. #ifndef BCODE
  50. #ifdef _WIN32
  51. #define BCODE
  52. #else
  53. #define BCODE _based(_segname("_CODE"))
  54. #endif
  55. #endif
  56. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  57. //
  58. //
  59. //
  60. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  61. #ifdef USEASSERT
  62. void WINAPI _Assert( char * szFile, int iLine, char * szExpression );
  63. #define ASSERT(x) if( !(x) ) _Assert( __FILE__, __LINE__, #x )
  64. #else
  65. #define ASSERT(x)
  66. #endif
  67. #ifdef USERPF
  68. void CDECL rprintf( LPSTR szFmt, ...);
  69. void FAR CDECL DbgVPrintF( LPSTR szFormat, va_list va );
  70. #define RPF rprintf
  71. #else
  72. #define RPF()
  73. #ifdef _MSC_VER
  74. #pragma warning(disable:4002)
  75. #endif
  76. #endif
  77. #ifdef USEDPF
  78. BOOL WINAPI DbgEnable(BOOL fEnable);
  79. UINT WINAPI DbgGetLevel(void);
  80. UINT WINAPI DbgSetLevel(UINT uLevel);
  81. UINT WINAPI DbgInitialize(BOOL fEnable);
  82. void FAR CDECL dprintf(UINT uDbgLevel, LPSTR szFmt, ...);
  83. #define D(x) {x;}
  84. #define DPF dprintf
  85. #define DPI(sz) {static char BCODE ach[] = sz; OutputDebugStr(ach);}
  86. #else
  87. #define DbgEnable(x) FALSE
  88. #define DbgGetLevel() 0
  89. #define DbgSetLevel(x) 0
  90. #define DbgInitialize(x) 0
  91. #ifdef _MSC_VER
  92. #pragma warning(disable:4002)
  93. #endif
  94. #define D(x)
  95. #define DPF()
  96. #define DPI(sz)
  97. #endif
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101. #endif // _INC_DEBUG