Leaked source code of windows server 2003
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
4.4 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* ERNCTRC.H */
  4. /* */
  5. /* RNC trace macros. */
  6. /* */
  7. /* Copyright Data Connection Ltd. 1995 */
  8. /* */
  9. /****************************************************************************/
  10. /* Changes: */
  11. /* */
  12. /* 16Jun95 NFC Created. */
  13. /* 31Aug95 NFC Removed TAB from TRC_MOD_FMT */
  14. /* */
  15. /****************************************************************************/
  16. #ifndef __ERNCTRC_H_
  17. #define __ERNCTRC_H_
  18. /****************************************************************************/
  19. /* Trace macros - nicked from atrcapi.h. */
  20. /****************************************************************************/
  21. /****************************************************************************/
  22. /* Defines for the formats for printing the various parts of the trace */
  23. /* lines. */
  24. /* */
  25. /* TIME is time in the form hours,mins,secs,100ths */
  26. /* DATE is the date in the form day,month,year */
  27. /* MOD is the module procedure name */
  28. /* LINE is the line number within the source file */
  29. /* TASK is the task identifier */
  30. /* REG is a machine level register */
  31. /****************************************************************************/
  32. #define TRC_TIME_FMT "%02d:%02d:%02d.%02d"
  33. #define TRC_DATE_FMT "%02d/%02d/%02d"
  34. #define TRC_MOD_FMT "%-12.12s"
  35. #define TRC_LINE_FMT "%04d"
  36. #define TRC_TASK_FMT "%04.4x"
  37. #define TRC_REG_FMT "%04.4x"
  38. /****************************************************************************/
  39. /* Define various trace levels. */
  40. /****************************************************************************/
  41. #define TRC_LEVEL_DEBUG 0
  42. #define TRC_LEVEL 1
  43. #define TRC_LEVEL_ALRT 2
  44. #define TRC_LEVEL_EVT_DATA 3
  45. #define TRC_LEVEL_RNC 4
  46. #define TRC_LEVEL_ERROR 5
  47. #ifdef TRACE_FILE
  48. #define _file_name_ (char near *)__filename
  49. static const char near __filename[] = TRACE_FILE;
  50. #else
  51. #define _file_name_ (char near *)__FILE__
  52. #endif /* TRACE_FILE */
  53. #define TRACE_FN(A)
  54. #ifdef DEBUG
  55. #define TRACE_GCC_RESULT(result,text)
  56. #else
  57. #define TRACE_GCC_RESULT(result,text)
  58. #endif
  59. #ifdef DEBUG
  60. extern HDBGZONE ghZoneErn;
  61. #define TRACEX(_tlvl, s) \
  62. { \
  63. if (GETZONEMASK(ghZoneErn) & (1<<_tlvl)) \
  64. { \
  65. CHAR _szTrc[256]; \
  66. wsprintf s; \
  67. DbgZPrintf(ghZoneErn, _tlvl, _szTrc); \
  68. } \
  69. }
  70. #else
  71. #define TRACEX(x,y)
  72. #endif
  73. /****************************************************************************/
  74. /* PROTOTYPES */
  75. /****************************************************************************/
  76. #ifdef DEBUG
  77. void RNCTrcOutput(UINT trclvl,
  78. LPSTR trcmod,
  79. UINT line,
  80. LPSTR trcstr);
  81. #endif /* ifdef DEBUG */
  82. #endif /*__ERNCTRC_H_ */