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.

75 lines
1.4 KiB

  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Filename : base.h
  4. // Project : pqs
  5. // Component: wordbreaker
  6. //
  7. // Author : urib
  8. //
  9. // Log:
  10. // Jun 27 2000 urib Move to use Trace(,, ()) instead of Trace((,,)).
  11. //
  12. ////////////////////////////////////////////////////////////////////////////////
  13. #ifndef BASE_H
  14. #define BASE_H
  15. #pragma once
  16. #define PQS_CODE
  17. #define STRICT
  18. #include <windows.h>
  19. #include "tracer.h"
  20. //
  21. // Append PQS to all our tags
  22. //
  23. //
  24. // Append PQS to all our tags
  25. //
  26. typedef unsigned char* PUSZ;
  27. #if (defined (DEBUG) && !defined(_NO_TRACER)) || defined(USE_TRACER)
  28. #define TRACER_ON
  29. #endif
  30. #ifdef TRACER_ON
  31. #undef DECLARE_TAG
  32. #undef DECLARE_GLOBAL_TAG
  33. #undef USES_TAG
  34. #undef Trace
  35. #define Trace(el, tag, x) \
  36. { \
  37. if (CheckTraceRestrictions(el, tag)) \
  38. { \
  39. CTempTrace1 tmp(__FILE__, __LINE__, tag, el); \
  40. tmp.TraceSZ x; \
  41. } \
  42. }
  43. #define DECLARE_TAG(tagname, psz) \
  44. static CTracerTag tagname##Writer("PQS "##psz); \
  45. static TAG tagname = tagname##Writer;
  46. #define DECLARE_GLOBAL_TAG(tagname, psz) \
  47. static CTracerTag tagname##Writer("PQS "##psz); \
  48. extern TAG tagname = tagname##Writer;
  49. #define USES_TAG(name) extern TAG name;
  50. #else
  51. #undef Trace
  52. #define Trace(el, tag, x)
  53. #endif
  54. #include "excption.h"
  55. #include "MemoryManagement.h"
  56. #endif /* BASE_H */