Windows NT 4.0 source code leak
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.

105 lines
3.4 KiB

4 years ago
  1. #ifndef HC_H
  2. #include "hc.h"
  3. #endif
  4. #ifndef _CINPUT_INCLUDED
  5. #include "..\common\cinput.h"
  6. #endif
  7. #ifndef _COUTPUT_INCLUDED
  8. #include "..\common\coutput.h"
  9. #endif
  10. #define wThisVerMajor 0
  11. #define wThisVerMinor 999
  12. #define bWordFormat 0x80 // Followed by 16 bit text format number
  13. #define bNewLine 0x81 // Newline
  14. #define bNewPara 0x82 // New paragraph
  15. #define bTab 0x83 // Left-aligned tab
  16. #define bBlankLine 0x85 // Followed by 16 bit skip count
  17. #define bInlineObject 0x86 // Followed by inline layout object
  18. #define bWrapObjLeft 0x87 // Left- aligned wrapping object
  19. #define bWrapObjRight 0x88 // Right-aligned wrapping object
  20. #define bEndHotspot 0x89 // End of a hotspot
  21. #define bColdspot 0x8A // Coldspot for searchable bitmaps
  22. #define bEnd 0xFF // End of text
  23. #define cbDecompressNil ((UINT) -1)
  24. // w_scan stuff
  25. const int MAX_ZONE_LEN = 128 + _MAX_PATH; // Max Zone Name length
  26. const int MAX_TITLE = 128; //Max Zone title length
  27. #define ByteOff(va) ((va) .bf.byteoff)
  28. typedef DWORD COBJRG;
  29. typedef HANDLE HBGH;
  30. typedef OBJRG* QOBJRG;
  31. #define objrgNil (OBJRG) -1
  32. typedef struct {
  33. DWORD lcbFc; // Size in bytes of Full Context
  34. VA vaPrev; // Offset in TP of prev FC
  35. VA vaCurr; // Offset to current FCP
  36. VA vaNext; // Offset in TP of next FC
  37. DWORD ichText; // Offset with FCP to text
  38. DWORD lcbText; // Size of the text portion of FCP
  39. DWORD lcbDisk; // Size of the text portion of FCP
  40. COBJRG cobjrgP;
  41. HHF hhf; // Topic Identifier
  42. GH hphr; // Handle to phrase table
  43. } FCINFO;
  44. typedef struct {
  45. WORD cWsmag; // number of window smags to follow
  46. WSMAG rgwsmag[MAX_WSMAG]; // array of window smags
  47. } RGWSMAG, *QRGWSMAG;
  48. extern QRGWSMAG qrgwsmag;
  49. typedef FCINFO * QFCINFO;
  50. typedef FCINFO * PFCINFO;
  51. typedef FCINFO * NPFCINFO;
  52. typedef struct tag_ols {
  53. int lichText;
  54. DWORD dwBlockCurr;
  55. DWORD dwcRegion;
  56. } OLS, *QOLS;
  57. extern PA paGlobal;
  58. extern COutput* pcout;
  59. #define XPixelsFromPoints(p1, p2) MulDiv(p2, p1->wXAspectMul, p1->wXAspectDiv)
  60. #define YPixelsFromPoints(p1, p2) MulDiv(p2, p1->wYAspectMul, p1->wYAspectDiv)
  61. #define FResolvedQLA(qla) \
  62. ((qla)->mla.va.dword != vaNil && (qla)->mla.objrg != objrgNil)
  63. #define SetInvalidPA(pa) {(pa).blknum = (DWORD)(-1); (pa).objoff = (DWORD)(-1);}
  64. #define FIsInvalidPA(pa) ((pa).blknum == (DWORD)(-1) && (pa).objoff == (DWORD)(-1))
  65. void STDCALL Break(int c, DWORD ulAddr, DWORD ulRUnit, BYTE ucField);
  66. int STDCALL CbDecompressQch(LPSTR, int, LPSTR, HPHR, UINT);
  67. int STDCALL CbUnpackMOBJ(QMOBJ qmobj, void* qv);
  68. int STDCALL DecompressJPhrase(PSTR pbText, INT cbComp, PSTR pbDecomp, VOID *lpCCompressTable);
  69. void STDCALL DestroyJPhrase(UINT lpCCompressTable);
  70. BYTE * STDCALL FileCore(const char* pucFile);
  71. void STDCALL FixUpBlock(LPVOID qmbhd, LPVOID qbBuf, WORD wVersion);
  72. BOOL STDCALL GetNextAnsFile(FILE *pFf, PSTR lpszAnsFile, PSTR lpszAnsTitle);
  73. GH STDCALL GhFillBuf(QDE, DWORD, int*, int*);
  74. VOID* STDCALL LoadJohnTables(HFS hfs);
  75. void STDCALL OutForageText(DWORD, LPSTR, int, UINT);
  76. void STDCALL TranslateMBHD(LPVOID qvDst, LPVOID qvSrc, WORD wVersion);
  77. VOID STDCALL TranslateMFCP(LPVOID qvDst, LPVOID qvSrc, VA va, WORD wVersion);
  78. VA STDCALL VAFromQLA(QLA, QDE);
  79. WORD STDCALL WCopyContext(QDE qde, VA vaPos, LPSTR qchDest, int cb);
  80. #ifdef _DEBUG
  81. void STDCALL FVerifyQLA(QLA qla);
  82. void STDCALL FVerifyQMOPG(QMOPG qmopg);
  83. #else
  84. #define FVerifyQLA(qla)
  85. #define FVerifyQMOPG(qmopg)
  86. #endif