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.

87 lines
2.1 KiB

  1. /************************************************************/
  2. /* Windows Write, Copyright 1985-1992 Microsoft Corporation */
  3. /************************************************************/
  4. #define NOCLIPBOARD
  5. #define NOGDICAPMASKS
  6. #define NOCTLMGR
  7. #define NOVIRTUALKEYCODES
  8. #define NOWINMESSAGES
  9. #define NOWINSTYLES
  10. #define NOSYSMETRICS
  11. #define NOMENUS
  12. #define NOKEYSTATE
  13. #define NOGDI
  14. #define NOHDC
  15. #define NORASTEROPS
  16. #define NOSYSCOMMANDS
  17. #define NOSHOWWINDOW
  18. #define NOCOLOR
  19. #define NOATOM
  20. #define NOBITMAP
  21. #define NOICON
  22. #define NOBRUSH
  23. #define NOCREATESTRUCT
  24. #define NOMB
  25. #define NOFONT
  26. #define NOMSG
  27. #define NOOPENFILE
  28. #define NOPEN
  29. #define NOPOINT
  30. #define NOREGION
  31. #define NOSCROLL
  32. #define NOSOUND
  33. #define NOWH
  34. #define NOWINOFFSETS
  35. #define NOWNDCLASS
  36. #define NOCOMM
  37. #include <windows.h>
  38. #include "mw.h"
  39. #include "cmddefs.h"
  40. #include "docdefs.h"
  41. #include "editdefs.h"
  42. #include "filedefs.h"
  43. #include "str.h"
  44. #include "propdefs.h"
  45. #include "fkpdefs.h"
  46. #include "printdef.h" /* printdefs.h */
  47. #include "debug.h"
  48. extern struct FCB (**hpfnfcb)[];
  49. int **HAllocate();
  50. RemoveDelPgd(doc, cpFirst, cpLim, hpgtb)
  51. int doc;
  52. typeCP cpFirst, cpLim;
  53. struct PGTB **hpgtb;
  54. {
  55. struct PGTB *ppgtb;
  56. struct PGD *ppgd, *ppgdT;
  57. int ipgd, cpgd, cpgdDel;
  58. {
  59. ppgtb = *hpgtb;
  60. ppgd = &ppgtb->rgpgd[0];
  61. ppgd += (ipgd =
  62. IcpSearch(cpFirst + 1, ppgd, cwPGD * sizeof(int),
  63. bcpPGD, cpgd = ppgtb->cpgd));
  64. if (ppgd->cpMin > cpFirst) /* Ensure not past last page */
  65. { /* Find all page breaks in deleted area. */
  66. for (ppgdT = ppgd, cpgdDel = 0;
  67. ipgd + cpgdDel < cpgd && ppgdT->cpMin <= cpLim;
  68. ppgdT++, cpgdDel++)
  69. continue;
  70. if (cpgdDel != 0)
  71. { /* Close up pgtb. */
  72. blt(ppgdT, ppgd, cwPGD * ((cpgd -= cpgdDel) - ipgd));
  73. (*hpgtb)->cpgd = cpgd;
  74. }
  75. }
  76. }
  77. } /* end of R e m o v e D e l P g d */
  78.