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.

65 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. debug.h
  5. Abstract:
  6. Debug routines
  7. Author:
  8. Ahmed Mohamed (ahmedm) 12, 01, 2000
  9. Revision History:
  10. --*/
  11. #ifndef _DEBUG_H
  12. #define _DEBUG_H
  13. void
  14. WINAPI
  15. debug_log(char*format, ...);
  16. void
  17. WINAPI
  18. debug_init();
  19. void
  20. WINAPI
  21. debug_log_file(char *logfile);
  22. extern ULONG debugLevel;
  23. #define GS_DEBUG_ERR 0x1
  24. #define GS_DEBUG_CM 0x2
  25. #define GS_DEBUG_MM 0x4
  26. #define GS_DEBUG_FAIL 0x8
  27. #define GS_DEBUG_NS 0x10
  28. #define GS_DEBUG_MSG 0x20
  29. #define GS_DEBUG_DATA 0x40
  30. #define GS_DEBUG_STATE 0x80
  31. #define GS_DEBUG_CRS 0x100
  32. #define gsprint(_x_) debug_log _x_
  33. #define print_log(LEVEL, STRING) { \
  34. if (debugLevel & LEVEL) { \
  35. gsprint(STRING); \
  36. } \
  37. }
  38. #define msg_log(_x_) print_log(GS_DEBUG_MSG, _x_)
  39. #define err_log(_x_) print_log(GS_DEBUG_ERR, _x_)
  40. #define cm_log(_x_) print_log(GS_DEBUG_CM, _x_)
  41. #define recovery_log(_x_) print_log(GS_DEBUG_FAIL, _x_)
  42. #define ns_log(_x_) print_log(GS_DEBUG_NS, _x_)
  43. #define gs_log(_x_) print_log(GS_DEBUG_DATA, _x_)
  44. #define state_log(_x_) print_log(GS_DEBUG_STATE, _x_)
  45. #endif