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.

91 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. common.h
  5. Abstract:
  6. commonly used headers.
  7. Author:
  8. Mu Han (muhan) 1-November-1997
  9. --*/
  10. #ifndef __COMMON_H_
  11. #define __COMMON_H_
  12. #include "msplog.h"
  13. #ifdef MSPLOG
  14. #define ENTER_FUNCTION(s) \
  15. static const CHAR * const __fxName = s
  16. #else
  17. #define ENTER_FUNCTION(s)
  18. #endif // MSPLOG
  19. #ifdef DEBUG
  20. // DEBUG **********************************
  21. int WINAPI MSPDbgPrintf ( LPTSTR lpszFormat, ... );
  22. // fake GETMASK
  23. #define GETMASK(m) 0
  24. // extern HDBGZONE ghDbgZoneMsp; // MSP debug zone control registration
  25. // fake registration temporarily
  26. #define ghDbgZoneMsp 0
  27. #define ZONE_INIT (GETMASK(ghDbgZoneMSP) & 0x0001)
  28. #define ZONE_TERMINAL (GETMASK(ghDbgZoneMSP) & 0x0002)
  29. #define ZONE_STREAM (GETMASK(ghDbgZoneMSP) & 0x0004)
  30. #define ZONE_H245 (GETMASK(ghDbgZoneMSP) & 0x0008)
  31. #define ZONE_MCCOMMANDS (GETMASK(ghDbgZoneMSP) & 0x0010)
  32. #define ZONE_TSPCOMM (GETMASK(ghDbgZoneMSP) & 0x0020)
  33. #define ZONE_CHANNEL (GETMASK(ghDbgZoneMSP) & 0x0040)
  34. #define ZONE_REFCOUNT (GETMASK(ghDbgZoneMSP) & 0x0080)
  35. #define ZONE_U4 (GETMASK(ghDbgZoneMSP) & 0x0100)
  36. #define ZONE_PROFILE (GETMASK(ghDbgZoneMSP) & 0x0200)
  37. //extern HDBGZONE ghDbgZoneStream; // stream debug zone control registration
  38. // fake registration temporarily
  39. #define ghDbgZoneStream 0
  40. #define ZONE_S1 (GETMASK(ghDbgZoneStream) & 0x0001)
  41. #define ZONE_S2 (GETMASK(ghDbgZoneStream) & 0x0002)
  42. #ifndef DEBUGMSG
  43. // #define DEBUGMSG(z,s) ( (z) ? (MSPDbgPrintf s ) : 0)
  44. // #define DEBUGMSG(z,s) ( (z) ? (LOG(s)) : 0)
  45. // ignore the zone temporarily
  46. #define DEBUGMSG(z,s) LOG(s)
  47. #endif // DEBUGMSG
  48. #ifndef FX_ENTRY
  49. #define FX_ENTRY(s) static TCHAR _this_fx_ [] = (s);
  50. #define _fx_ ((LPTSTR) _this_fx_)
  51. #endif // FX_ENTRY
  52. // #define ERRORMESSAGE(m) (MSPDbgPrintf m)
  53. #define ERRORMESSAGE(m) LOG(m)
  54. #else // not DEBUG *******************************
  55. #ifndef FX_ENTRY
  56. #define FX_ENTRY(s)
  57. #endif // FX_ENTRY
  58. #ifndef DEBUGMSG
  59. #define DEBUGMSG(z,s)
  60. #define ERRORMESSAGE(m)
  61. #endif // DEBUGMSG
  62. #define _fx_
  63. #define ERRORMESSAGE(m)
  64. #endif // not DEBUG ***********************
  65. #endif // __COMMON_H_