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.

98 lines
2.3 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: common.h
  4. //
  5. // Description:
  6. //
  7. //
  8. //@@BEGIN_MSINTERNAL
  9. // Development Team:
  10. // S.Mohanraj
  11. //
  12. // History: Date Author Comment
  13. //
  14. //@@END_MSINTERNAL
  15. //---------------------------------------------------------------------------
  16. //
  17. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  18. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  19. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  20. // PURPOSE.
  21. //
  22. // Copyright (c) 1996 Microsoft Corporation. All Rights Reserved.
  23. //
  24. //---------------------------------------------------------------------------
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #include <stdio.h>
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #if defined(UNDER_NT) && DBG
  33. #define DEBUG 1
  34. #endif
  35. #ifdef DEBUG
  36. #define Trap() {_asm {_emit 0xcc}}
  37. #else
  38. #define Trap()
  39. #endif
  40. #define Break() \
  41. __asm int 3
  42. #define WINICEDEBUGDUMP 1
  43. #ifdef DEBUG
  44. #if WINICEDEBUGDUMP
  45. #define QDBG ""
  46. #else
  47. #define QDBG "'"
  48. #endif
  49. extern int RtDebugLevel;
  50. /*
  51. * Generate debug output in printf type format.
  52. */
  53. #define dprintf( _x_ ) { DbgPrint(QDBG"Glitch: "); DbgPrint _x_ ; DbgPrint(QDBG"\r\n"); }
  54. #define dprintf1( _x_ ) if (RtDebugLevel >= 1) { DbgPrint(QDBG"Glitch: "); DbgPrint _x_ ; DbgPrint(QDBG"\r\n"); }
  55. #define dprintf2( _x_ ) if (RtDebugLevel >= 2) { DbgPrint(QDBG"Glitch: "); DbgPrint _x_ ; DbgPrint(QDBG"\r\n"); }
  56. #define dprintf3( _x_ ) if (RtDebugLevel >= 3) { DbgPrint(QDBG"Glitch: "); DbgPrint _x_ ; DbgPrint(QDBG"\r\n"); }
  57. #define dprintf4( _x_ ) if (RtDebugLevel >= 4) { DbgPrint(QDBG"Glitch: "); DbgPrint _x_ ; DbgPrint(QDBG"\r\n"); }
  58. #else
  59. #define dprintf(x)
  60. #define dprintf1(x)
  61. #define dprintf2(x)
  62. #define dprintf3(x)
  63. #define dprintf4(x)
  64. #endif // DEBUG
  65. #define INIT_CODE code_seg("INIT", "CODE")
  66. #define INIT_DATA data_seg("INIT", "DATA")
  67. #define LOCKED_CODE code_seg(".text", "CODE")
  68. #define LOCKED_DATA data_seg(".data", "DATA")
  69. #define PAGEABLE_CODE code_seg("PAGE", "CODE")
  70. #define PAGEABLE_DATA data_seg("PAGEDATA", "DATA")
  71. #pragma PAGEABLE_CODE
  72. #pragma PAGEABLE_DATA
  73. //---------------------------------------------------------------------------
  74. // End of File: common.h
  75. //---------------------------------------------------------------------------