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.

131 lines
5.2 KiB

  1. /***************************************************************************
  2. Name : FDEBUG.H
  3. Comment :
  4. Functions: (see Prototypes just below)
  5. Copyright (c) Microsoft Corp. 1991, 1992, 1993
  6. Revision Log
  7. Date Name Description
  8. -------- ----- ---------------------------------------------------------
  9. ***************************************************************************/
  10. /****************** begin prototypes from debug.c *****************/
  11. void InitCommErrCount(PThrdGlbl pTG);
  12. extern void far D_GotError(PThrdGlbl pTG, LONG_PTR nCid, int err, COMSTAT far* lpcs);
  13. extern void far D_FComPrint(PThrdGlbl pTG, LONG_PTR nCid);
  14. extern void far D_HexPrint(LPB b1, UWORD incnt);
  15. #ifdef DEBUG
  16. void D_ChkMsg(LPSTR func, LPMSG lpmsg, UWORD wTimer, UWORD errevents, UWORD expected);
  17. void D_PrintIE(int err);
  18. void D_PrintCE(int err);
  19. void D_PrintCOMSTAT(PThrdGlbl pTG, COMSTAT far* lpcs);
  20. void D_PrintEvent(UWORD uwEvent);
  21. void D_FComCheck(PThrdGlbl pTG, LONG_PTR nCid);
  22. void D_FComDumpFlush(PThrdGlbl pTG, int nCid, int queue);
  23. void D_SafePrint(PThrdGlbl pTG, LPB b1, UWORD incnt);
  24. void D_PrintFrame(LPB npb, UWORD cb);
  25. #else
  26. # define D_ChkMsg(f, l, t, er, ex) {}
  27. # define D_PrintIE(err) {}
  28. # define D_PrintCE(err) {}
  29. # define D_PrintCOMSTAT(pTG, lpcs) {}
  30. # define D_PrintEvent(uwEvent) {}
  31. // # define D_GotError(nCid, err, lpcs) {}
  32. # define D_FComCheck(pTG, nCid) {}
  33. // # define D_FComPrint(nCid) {}
  34. # define D_FComDumpFlush(pTG, nCid, queue) {}
  35. # define D_SafePrint(PTG, b1, incnt) {}
  36. // # define D_HexPrint(b1, incnt) {}
  37. # define D_PrintFrame(npb, cb) {}
  38. #endif
  39. /***************** end of prototypes from debug.c *****************/
  40. #ifndef MON3
  41. # define PUTEVENT(wFlags, ID, SubID, dw0, dw1, lpsz) 0
  42. #ifdef MON
  43. # define MONBUFSIZE 0x00010000L // 65536 decimal
  44. /****
  45. # define MONBUFSIZE 0x00004000L // 16384 decimal
  46. # define CHKMONMASK 0x00003FFFL // want it aligned to multiple of it's size
  47. # define WRAPMONMASK (~(MONBUFSIZE)) // zap the 15th bit
  48. ****/
  49. extern void InitMonBufs(PThrdGlbl pTG);
  50. extern void PutMonBufs(PThrdGlbl pTG);
  51. extern void FreeMonBufs(PThrdGlbl pTG);
  52. #ifdef MON2
  53. # define INMON(pTG, lpb, cb) { lpbCurrIn = WrapCopy(pTG,lpbCurrIn,lpb,cb, lpbMonIn); \
  54. lpbCurrInOut = WrapCopy(pTG,lpbCurrInOut,lpb,cb, lpbMonInOut); }
  55. # define OUTMON(pTG, lpb, cb) { lpbCurrOut = WrapCopy(pTG,lpbCurrOut,lpb,cb, lpbMonOut); \
  56. lpbCurrInOut = WrapCopy(pTG,lpbCurrInOut,lpb,cb, lpbMonInOut); }
  57. #else //MON2
  58. # define INMON(pTG, lpb, cb) { lpbCurrInOut = WrapCopy(pTG,lpbCurrInOut,lpb,cb, lpbMonInOut); }
  59. # define OUTMON(pTG, lpb, cb) { lpbCurrInOut = WrapCopy(pTG,lpbCurrInOut,lpb,cb, lpbMonInOut); }
  60. #endif //MON2
  61. extern LPBYTE lpbCurrIn, lpbCurrOut, lpbCurrInOut;
  62. extern LPB WrapCopy(PThrdGlbl pTG, LPB lpbDest, LPB lpbSrc, UWORD cbSrc, LPB lpbStart);
  63. #else
  64. # define InitMonBufs() {}
  65. # define PutMonBufs() {}
  66. # define FreeMonBufs() {}
  67. # define INMON(lpb, cb) { }
  68. # define OUTMON(lpb, cb) { }
  69. #endif // MON
  70. #endif //!MON3
  71. #define SZMOD "FCom: "
  72. #ifdef DEBUG
  73. extern DBGPARAM dpCurSettings;
  74. #endif
  75. // #define ZONE_FRAMES ((1L << 1) & dpCurSettings.ulZoneMask)
  76. #define ZONE_FC ((1L << 2) & dpCurSettings.ulZoneMask)
  77. #define ZONE_FC2 ((1L << 3) & dpCurSettings.ulZoneMask)
  78. #define ZONE_FC3 ((1L << 4) & dpCurSettings.ulZoneMask)
  79. #define ZONE_FC4 ((1L << 5) & dpCurSettings.ulZoneMask)
  80. #define ZONE_MD ((1L << 6) & dpCurSettings.ulZoneMask)
  81. #define ZONE_DIA ((1L << 7) & dpCurSettings.ulZoneMask)
  82. #define ZONE_FIL ((1L << 9) & dpCurSettings.ulZoneMask)
  83. #define ZONE_ID ((1L << 10) & dpCurSettings.ulZoneMask)
  84. #define ZONE_ID2 ((1L << 11) & dpCurSettings.ulZoneMask)
  85. #define ZONE_DB ((1L << 12) & dpCurSettings.ulZoneMask)
  86. #define ZONE_DB3 ((1L << 13) & dpCurSettings.ulZoneMask)
  87. #define ZONE_TIMEOUT ((1L << 14) & dpCurSettings.ulZoneMask)
  88. #define ZONE_TO ((1L << 15) & dpCurSettings.ulZoneMask)
  89. // #ifdef DEBUG
  90. // # define ST_FRAMES(x) if(ZONE_FRAMES) { x; }
  91. // #else
  92. // # define ST_FRAMES(x) { }
  93. // #endif
  94. #define TRACE(m) DEBUGMSG(1, m)
  95. #define MODID MODID_MODEMDRV
  96. #define FILEID_FCOM 21
  97. #define FILEID_FDEBUG 22
  98. #define FILEID_FILTER 23
  99. #define FILEID_IDENTIFY 24
  100. #define FILEID_MODEM 25
  101. #define FILEID_NCUPARMS 26
  102. #define FILEID_TIMEOUTS 27