[comp.sys.xerox] TEdit Page Layout Menu bug/patch

BEC.HEFFRON%ECLA.usc.edu@OBERON.USC.EDU (Matt Heffron) (07/15/89)

The page layout menu for tedit has entries for 8 named heading paragraphs
however only the first 4 will be retrieved when asked to SHOW the current
layout, the rest will be blanked.  If you then do an APPLY, any headings
beyond the first 4 will be lost.  This patch fixes this.
****NOTE:****
This code patches the byte-codes for \TEDIT.SHOW.PAGEFORMATTING.  The offsets
are for Medley 1.1 and TEDITMENU.LCOM 11-jan-89. It checks to see that the
byte to be changed and the one on either side are what it expects before
performing the patch, however, use with caution! the byte offsets ARE different
from the Medley 1.0 release of tedit.

-Matt Heffron			BEC.HEFFRON@ECLA.USC.EDU

;; \TEDIT.SHOW.PAGEFORMATTING only puts 4 Headings into the Page Layout menu,
;; but it should put 8 into the menu, since the menu can set 8 headings

[LET [(TEMP (\GET-COMPILED-CODE-BASE '\TEDIT.SHOW.PAGEFORMATTING]
   (if (AND (= (\GETBASEBYTE TEMP 1023)
               108)
            (= (\GETBASEBYTE TEMP 1024)
               4)
            (= (\GETBASEBYTE TEMP 1025)
               107))
      then
          (\PUTBASEBYTE TEMP 1024 8)
      else
          (printout T "\TEDIT.SHOW.PAGEFORMATTING ccodep incorrect values." T
                      "Not patched." T]
-------