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.

52 lines
1.5 KiB

  1. /*** trace.h - Trace function Definitions
  2. *
  3. * Copyright (c) 1996,1997 Microsoft Corporation
  4. * Author: Michael Tsang (MikeTs)
  5. * Created 09/24/96
  6. *
  7. * MODIFICATION HISTORY
  8. */
  9. #ifndef _TRACE_H
  10. #define _TRACE_H
  11. /*** Macros
  12. */
  13. /*XLATOFF*/
  14. #ifdef TRACING
  15. #define TRACENAME(s) char *pszTraceName = s;
  16. #define ENTER(n,p) { \
  17. if (IsTraceOn(n, pszTraceName, TRUE)) \
  18. PRINTF p; \
  19. ++giIndent; \
  20. }
  21. #define EXIT(n,p) { \
  22. --giIndent; \
  23. if (IsTraceOn(n, pszTraceName, FALSE)) \
  24. PRINTF p; \
  25. }
  26. #else
  27. #define TRACENAME(s)
  28. #define ENTER(n,p)
  29. #define EXIT(n,p)
  30. #endif
  31. /*** Exported function prototype
  32. */
  33. #ifdef TRACING
  34. BOOLEAN EXPORT IsTraceOn(UCHAR n, PSZ pszProcName, BOOLEAN fEnter);
  35. LONG LOCAL SetTrace(PCMDARG pArg, PSZ pszArg, ULONG dwArgNum, ULONG dwNonSWArgs);
  36. LONG LOCAL AddTraceTrigPts(PCMDARG pArg, PSZ pszArg, ULONG dwArgNum,
  37. ULONG dwNonSWArgs);
  38. LONG LOCAL ZapTraceTrigPts(PCMDARG pArg, PSZ pszArg, ULONG dwArgNum,
  39. ULONG dwNonSWArgs);
  40. #endif
  41. /*** Exported data
  42. */
  43. extern int giTraceLevel, giIndent;
  44. #endif //ifndef _TRACE_H