Leaked source code of windows server 2003
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.

122 lines
3.1 KiB

  1. /************************************************************/
  2. /* Windows Write, Copyright 1985-1992 Microsoft Corporation */
  3. /************************************************************/
  4. /* fkpdefs.h -- mw formatted disk page definitions */
  5. /* #include filedefs.h, propdefs.h first */
  6. #define ifcMacInit 10
  7. #define cbFkp (cbSector - sizeof (typeFC) - 1)
  8. #define cchMaxGrpfsprm cbSector
  9. #define cchMaxFsprm 2
  10. struct FKP
  11. { /* Formatted disK Page */
  12. typeFC fcFirst; /* First fc which has formatting info here */
  13. CHAR rgb[cbFkp];
  14. CHAR crun;
  15. };
  16. struct RUN
  17. { /* Char or para run descriptor */
  18. typeFC fcLim; /* last fc of run */
  19. int b; /* Byte offset from page start; if -1, standard props */
  20. };
  21. #define cchRUN (sizeof (struct RUN))
  22. #define bfcRUN 0
  23. struct FCHP
  24. { /* File CHaracter Properties */
  25. CHAR cch; /* Number of bytes stored in chp (rest are vchpStd) */
  26. /* Must not be 0. */
  27. CHAR rgchChp[sizeof (struct CHP)];
  28. };
  29. struct FPAP
  30. { /* File ParagrAph Properties */
  31. CHAR cch; /* Number of bytes stored in pap (rest are vpapStd) */
  32. /* Must not be 0. */
  33. CHAR rgchPap[sizeof (struct PAP)];
  34. };
  35. struct FPRM
  36. { /* File PropeRty Modifiers (stored in scratch file) */
  37. CHAR cch;
  38. CHAR grpfsprm[cchMaxGrpfsprm + cchMaxFsprm]; /* + for overflow */
  39. };
  40. struct FKPD
  41. { /* FKP Descriptor (used for maintaining insert properties) */
  42. int brun; /* offset to next run to add */
  43. int bchFprop; /* offset to byte after last unused byte */
  44. typePN pn; /* pn of working FKP in scratch file */
  45. struct BTE (**hgbte)[]; /* pointer to bin table */
  46. int ibteMac; /* Number of bin table entries */
  47. };
  48. struct BTE
  49. { /* Bin Table Entry */
  50. typeFC fcLim;
  51. typePN pn;
  52. };
  53. #define cwBTE (sizeof(struct BTE)/sizeof(int))
  54. struct FND
  55. { /* Footnote descriptor */
  56. typeCP cpRef; /* Or fcRef (cp of ftn reference) */
  57. typeCP cpFtn; /* Or fc... (first cp of text) */
  58. };
  59. #define cchFND (sizeof (struct FND))
  60. #define cwFND (cchFND / sizeof (int))
  61. #define bcpRefFND 0
  62. #define bcpFtnFND (sizeof (typeCP))
  63. #define cwFNTBBase 2
  64. #define ifndMaxFile ((cbSector - cwFNTBBase * sizeof (int)) / cchFND)
  65. struct FNTB
  66. { /* Footnote table */
  67. int cfnd; /* Number of entries (sorted ascending) */
  68. int cfndMax; /* Heap space allocated */
  69. struct FND rgfnd[ifndMaxFile]; /* Size varies */
  70. };
  71. struct FNTB **HfntbEnsure(), **HfntbGet();
  72. #define HsetbGet(doc) ((**hpdocdod)[doc].hsetb)
  73. struct SED
  74. { /* Section descriptor */
  75. typeCP cp;
  76. int fn;
  77. typeFC fc;
  78. };
  79. #define cchSED (sizeof (struct SED))
  80. #define cwSED (cchSED / sizeof (int))
  81. #define bcpSED 0
  82. #define cwSETBBase 2
  83. #define isedMaxFile ((cbSector - cwSETBBase * sizeof (int)) / cchSED)
  84. struct SETB
  85. { /* Section table */
  86. int csed;
  87. int csedMax;
  88. struct SED rgsed[isedMaxFile]; /* Size varies */
  89. };
  90. struct SETB **HsetbCreate(), **HsetbEnsure();
  91.