      SUBROUTINE EDIT(FILENM,FDIN,FDOUT)
      INTEGER FILENM(1)
      INTEGER FDIN,FDOUT
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER LIN(102)
      INTEGER LED$7,LED$25,LED$26,LED$31,GETLIN,LED$42
      INTEGER CURSAV,I,STATUS
      LOGICAL LED$53,BRKFL0
      EXTERNAL LED$27
      SHORTCALL MKONU$(22)
      INTEGER AAAAA0(5)
      DATA AAAAA0/7,-13105,-14385,-10796,-23392/
      CALL BREAK$(1)
      FDINA0=FDIN
      FDOUT0=FDOUT
      PROBA0=0
      SAVER0=14
      ERRCO0=14
      PROMPT(1)=0
      PAT(1)=0
      TLPAT(1)=0
      SUBS(1)=0
      SAVFIL(1)=0
      SAVKNM=160
      NLDEF(1)=0
      DDIR=0
      TUNE=0
      GLOBA0=0
      CALL LED$73(1)
      CALL LED$72
      CURLN=0
      IF((FILENM(1).EQ.0))GOTO 10000
        CALL CTOC(FILENM,SAVFIL,102)
        IF((LED$31(0,SAVFIL).NE.-3))GOTO 10001
          CALL REMARK('?.')
          GOTO 10002
10001     CURLN=MIN0(1,LASTLN)
10002 CONTINUE
10000 SAVER0=ERRCO0
      UPDFLG=0
      CALL MKONU$(AAAAA0,LOC(LED$27))
10003 IF((GETLIN(LIN,FDINA0).EQ.-1))GOTO 10004
        IF((.NOT.LED$53(BRKFL0)))GOTO 10005
          STATUS=-3
          GOTO 10006
10005     I=1
          ERRCO0=7
          CURSAV=CURLN
          CALL LED$56(LIN)
          IF((LED$42(LIN,I,STATUS).NE.-2))GOTO 10007
            IF((LED$7(LIN,I,STATUS).NE.-2))GOTO 10008
              STATUS=LED$26(LIN,I,CURSAV,STATUS)
              GOTO 10009
10008         IF((STATUS.EQ.-3))GOTO 10010
                STATUS=LED$25(LIN,I,0,STATUS)
10010       CONTINUE
10009     CONTINUE
10007   CONTINUE
10006   IF((STATUS.NE.-3))GOTO 10011
          CALL REMARK('?.')
          IF((CURSAV.GT.LASTLN))GOTO 10012
            CURLN=CURSAV
            CALL PUTDEC(CURLN,0,SAFET0)
            CALL PUTCH(138,SAFET0)
10012     SAVER0=ERRCO0
          GOTO 10013
10011     IF((STATUS.NE.-1))GOTO 10014
            GOTO 10004
10014   CONTINUE
10013   CALL PUTLIN(PROMPT,FDOUT0)
        IF((.NOT.LED$53(BRKFL0)))GOTO 10003
10015 GOTO 10003
10004 CALL LED$11
      IF((UPDFLG.NE.0))GOTO 10016
        CALL LED$73(2)
        GOTO 10017
10016   CALL CLOSE(SAFET0)
10017 CALL BREAK$(0)
      RETURN
      END
      INTEGER FUNCTION LED$1(LINE,GLOB)
      INTEGER LINE,GLOB
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER LIN(102)
      INTEGER GETLIN,LED$52
      IF((GLOB.NE.1))GOTO 10018
        LED$1=-3
        ERRCO0=9
        GOTO 10019
10018   CURLN=LINE
        LED$1=1
        GOTO 10022
10020   CONTINUE
10022   IF((LED$1.NE.1))GOTO 10021
          IF((GETLIN(LIN,FDINA0).NE.-1))GOTO 10023
            LED$1=-1
            GOTO 10024
10023       IF((LIN(1).NE.174))GOTO 10025
            IF((LIN(2).NE.138))GOTO 10025
              LED$1=-2
              GOTO 10026
10025         IF((LED$52(LIN).NE.-3))GOTO 10027
                LED$1=-3
                GOTO 10028
10027           UPDFLG=1
10028       CONTINUE
10026     CONTINUE
10024     CALL LED$56(LIN)
        GOTO 10020
10021 CONTINUE
10019 RETURN
      END
      SUBROUTINE LED$2(LINE,IX,WAY)
      INTEGER LINE,IX,WAY
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER LED$40
      IF((WAY.NE.0))GOTO 10029
        IX=BUF(IX+1)
        IF((IX.NE.LINE0))GOTO 10030
          LINE=0
          GOTO 10032
10030     LINE=LINE+(1)
10031   GOTO 10032
10029   IF((IX.NE.LINE0))GOTO 10033
          LINE=LASTLN
          GOTO 10034
10033     LINE=LINE-(1)
10034   IX=BUF(IX+0)
10032 RETURN
      END
      SUBROUTINE LED$3(LIN,NEW,I,MAXNEW)
      INTEGER LIN(1),NEW(MAXNEW)
      INTEGER I,MAXNEW
      INTEGER F
      F=1
      GOTO 10037
10035 F=F+(1)
10037 IF((LIN(F).EQ.0))GOTO 10036
      IF((LIN(F).EQ.138))GOTO 10036
        IF((I.LE.MAXNEW))GOTO 10038
          GOTO 10036
10038   NEW(I)=LIN(F)
        I=I+(1)
      GOTO 10035
10036 RETURN
      END
      INTEGER FUNCTION LED$6(CH,ALTCH,LIN,I,FLAG,STATUS)
      INTEGER LIN(1),I,FLAG,STATUS
      INTEGER CH,ALTCH
      IF((LIN(I).EQ.CH))GOTO 10040
      IF((LIN(I).EQ.ALTCH))GOTO 10040
      GOTO 10039
10040   I=I+(1)
        FLAG=1
        GOTO 10041
10039   FLAG=0
10041 STATUS=-2
      LED$6=-2
      RETURN
      END
      INTEGER FUNCTION LED$7(LIN,I,STATUS)
      INTEGER LIN(102)
      INTEGER I,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K,LINE,USEPAT,USEMA0,TMP
      INTEGER LED$23,MATCH,LED$62,LED$41
      LOGICAL LED$53,BRKFL0
      STATUS=-2
      USEPAT=-1
      USEMA0=-1
      IF((LIN(I).EQ.167))GOTO 10043
      IF((LIN(I).EQ.161))GOTO 10043
      GOTO 10042
10043   IF((LIN(I).NE.167))GOTO 10044
          USEMA0=1
          GOTO 10045
10044     USEMA0=0
10045   I=I+(1)
        IF((LED$41(LIN,I,SAVKNM,SAVKNM).NE.-3))GOTO 10046
          STATUS=-3
10046 CONTINUE
10042 IF((LIN(I).EQ.231))GOTO 10048
      IF((LIN(I).EQ.248))GOTO 10048
      IF((LIN(I).EQ.199))GOTO 10048
      IF((LIN(I).EQ.216))GOTO 10048
      GOTO 10047
10048   IF((LIN(I).EQ.231))GOTO 10050
        IF((LIN(I).EQ.199))GOTO 10050
        GOTO 10049
10050     USEPAT=1
          GOTO 10051
10049     USEPAT=0
10051   I=I+(1)
        IF((LED$62(LIN,I).NE.-3))GOTO 10052
          STATUS=-3
          GOTO 10053
10052     I=I+(1)
10053 CONTINUE
10047 IF((STATUS.NE.-2))GOTO 10054
      IF((USEPAT.NE.-1))GOTO 10054
      IF((USEMA0.NE.-1))GOTO 10054
        STATUS=-1
        GOTO 10055
10054   IF((STATUS.NE.-2))GOTO 10056
          STATUS=LED$23(1,LASTLN,STATUS)
10056 CONTINUE
10055 IF((STATUS.NE.-2))GOTO 10057
        K=LINE0
        LINE=0
        GOTO 10060
10058   LINE=LINE+(1)
10060   IF((LINE.GE.LINE1))GOTO 10063
          BUF(K+2)=0
          K=BUF(K+1)
        GOTO 10058
10061   LINE=LINE+(1)
10063   IF((LINE.GT.LINE2))GOTO 10074
          IF((.NOT.LED$53(BRKFL0)))GOTO 10064
            LED$7=-3
            STATUS=-3
            RETURN
10064     TMP=0
          IF((USEMA0.EQ.-1))GOTO 10066
          IF((USEMA0.NE.1))GOTO 10067
          IF((BUF(K+6).NE.SAVKNM))GOTO 10067
          GOTO 10066
10067     IF((USEMA0.NE.0))GOTO 10065
          IF((BUF(K+6).EQ.SAVKNM))GOTO 10065
          GOTO 10066
10066       IF((USEPAT.NE.-1))GOTO 10069
              TMP=1
              GOTO 10070
10069         CALL LED$50(K)
              IF((MATCH(TXT,PAT).NE.USEPAT))GOTO 10071
                TMP=1
10071       CONTINUE
10070     CONTINUE
10065     BUF(K+2)=TMP
          K=BUF(K+1)
        GOTO 10061
10072   K=BUF(K+1)
10074   IF((K.EQ.LINE0))GOTO 10073
          BUF(K+2)=0
        GOTO 10072
10073 CONTINUE
10057 LED$7=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$8(LIN,I,PFLAG,STATUS)
      INTEGER LIN(102)
      INTEGER I,PFLAG,STATUS
      INTEGER J
      J=I
      IF((LIN(J).EQ.240))GOTO 10076
      IF((LIN(J).EQ.208))GOTO 10076
      GOTO 10075
10076   J=J+(1)
        PFLAG=1
        GOTO 10077
10075   PFLAG=0
10077 IF((LIN(J).NE.138))GOTO 10078
        STATUS=-2
        GOTO 10079
10078   STATUS=-3
10079 LED$8=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$9(LIN,I,STATUS)
      INTEGER I,STATUS
      INTEGER LIN(1)
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER FLAG
      INTEGER LED$6
      STATUS=LED$6(161,161,LIN,I,FLAG,STATUS)
      IF((FLAG.NE.0))GOTO 10080
      IF((UPDFLG.NE.1))GOTO 10080
      IF((PROBA0.NE.0))GOTO 10080
        STATUS=-3
        ERRCO0=20
        CALL REMARK('(not saved).')
        PROBA0=1
10080 LED$9=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$15(LINE3)
      INTEGER LINE3
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I,K,PTR3,AFTER3
      INTEGER LED$52,LED$40
      LED$15=-2
      PTR3=LED$40(LINE3)
      AFTER3=BUF(PTR3+1)
      IF((LINE1.GT.0))GOTO 10081
        LED$15=-3
        ERRCO0=12
        GOTO 10082
10081   CURLN=LINE3
        K=LED$40(LINE1)
        I=LINE1
        GOTO 10085
10083   I=I+(1)
10085   IF((I.GT.LINE2))GOTO 10084
          CALL LED$50(K)
          IF((LED$52(TXT).NE.-3))GOTO 10086
            LED$15=-3
            GOTO 10084
10086     IF((K.NE.PTR3))GOTO 10087
            K=AFTER3
            GOTO 10083
10087       K=BUF(K+1)
10088   GOTO 10083
10084 CONTINUE
10082 RETURN
      END
      INTEGER FUNCTION LED$23(DEF1,DEF2,STATUS)
      INTEGER DEF1,DEF2,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      IF((NLINES.NE.0))GOTO 10089
        LINE1=DEF1
        LINE2=DEF2
10089 IF((LINE1.LE.LINE2))GOTO 10090
        STATUS=-3
        ERRCO0=1
        GOTO 10091
10090   IF((LINE1.GT.0))GOTO 10092
          STATUS=-3
          ERRCO0=12
          GOTO 10093
10092     STATUS=-2
10093 CONTINUE
10091 LED$23=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$24(PFROM,PTO,STATUS)
      INTEGER PFROM,PTO,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K1,K2,J1,J2,L1,L2,FROM,TO
      INTEGER LED$40,LED$61,LED$63
      FROM=PFROM
      TO=PTO
      IF((FROM.GT.0))GOTO 10094
        STATUS=-3
        ERRCO0=12
        GOTO 10095
10094   K1=LED$40(LED$63(FROM))
        J1=LED$40(FROM)
        J2=LED$40(TO)
        K2=LED$40(LED$61(TO))
        LASTLN=LASTLN-(TO-FROM+1)
        CURLN=LED$63(FROM)
        CALL LED$69(K1,K2,K1,K2)
        IF((LIMBO.EQ.-1))GOTO 10096
          L1=LIMBO
          L2=BUF(L1+0)
          BUF(L1+0)=FREE
          FREE=L2
10096   LIMBO=J1
        LIMCNT=TO-FROM+1
        CALL LED$69(J2,J1,J2,J1)
        STATUS=-2
        UPDFLG=1
10095 LED$24=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$25(LIN,I,GLOB,STATUS)
      INTEGER LIN(102)
      INTEGER I,GLOB,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER GFLAG,LINE3,PFLAG,FLAG,JUNK,KNAME,ALLBUT
      INTEGER LED$1,LED$24,LED$30,LED$31,LED$35,LED$60,LED$75,LED$28,LED
     *$65,LED$41,LED$29,LED$6,LED$9,LED$48,LED$58,LED$46,LED$33,LED$8,LE
     *D$23,LED$39,LED$44,LED$47,LED$61,LED$62,LED$63,LED$34,LED$15,LED$3
     *6,LED$54,LED$32,LED$45
      INTEGER FILE(102),SUB(256)
      LOGICAL LED$53,BRKFL0
      INTEGER J,MISSI0
      INTEGER AAAAB0
      INTEGER AAAAC0
      PFLAG=0
      STATUS=-3
      IF((.NOT.LED$53(BRKFL0)))GOTO 10097
        GOTO 10098
10097   AAAAB0=LIN(I)
        GOTO 10099
10100     IF((LIN(I+1).NE.138))GOTO 10102
            STATUS=-2
            CALL LED$64
10101   GOTO 10102
10103     IF((LIN(I+1).NE.138))GOTO 10102
            STATUS=LED$1(LINE2,GLOB)
10104   GOTO 10102
10105     IF((LIN(I+1).NE.138))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            CALL LED$37(STATUS)
10106   GOTO 10102
10107     IF((LIN(I+1).NE.138))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
          IF((LED$24(LINE1,LINE2,STATUS).NE.-2))GOTO 10102
            STATUS=LED$1(LED$63(LINE1),GLOB)
10108   GOTO 10102
10109     IF((LED$8(LIN,I+1,PFLAG,STATUS).NE.-2))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
          IF((LED$24(LINE1,LINE2,STATUS).NE.-2))GOTO 10102
          IF((DDIR.NE.0))GOTO 10102
          IF((LED$61(CURLN).EQ.0))GOTO 10102
            CURLN=LED$61(CURLN)
10110   GOTO 10102
10111     IF((LIN(I+1).NE.138))GOTO 10102
            STATUS=LED$1(LED$63(LINE2),GLOB)
10112   GOTO 10102
10113     IF((LED$8(LIN,I+1,PFLAG,STATUS).NE.-2))GOTO 10102
            CALL PUTDEC(LINE2,1,FDOUT0)
            CALL PUTCH(138,FDOUT0)
10114   GOTO 10102
10115     I=I+(1)
          IF((LED$44(LIN,I,LINE3,STATUS).NE.-1))GOTO 10116
            STATUS=-3
10116     IF((STATUS.NE.-2))GOTO 10102
          IF((LED$8(LIN,I,PFLAG,STATUS).NE.-2))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$60(LINE3)
10117   GOTO 10102
10118     I=I+(1)
          IF((LED$44(LIN,I,LINE3,STATUS).NE.-1))GOTO 10119
            STATUS=-3
10119     IF((STATUS.NE.-2))GOTO 10102
          IF((LED$8(LIN,I,PFLAG,STATUS).NE.-2))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$15(LINE3)
10120   GOTO 10102
10121     I=I+(1)
          IF((LIN(I).NE.138))GOTO 10122
            LIN(I+0)=175
            LIN(I+1)=175
            LIN(I+2)=166
            LIN(I+3)=175
            LIN(I+4)=240
            LIN(I+5)=138
            LIN(I+6)=0
            GOTO 10123
10122       MISSI0=1
            J=I+1
            GOTO 10126
10124       J=J+(1)
10126       IF((LIN(J).EQ.0))GOTO 10125
              IF((LIN(J).NE.192))GOTO 10127
              IF((LIN(J+1).NE.LIN(I)))GOTO 10127
                J=J+(1)
                GOTO 10124
10127           IF((LIN(J).NE.LIN(I)))GOTO 10129
                  MISSI0=0
                  GOTO 10125
10129         CONTINUE
10128       GOTO 10124
10125       IF((MISSI0.NE.1))GOTO 10130
              GOTO 10133
10131         J=J+(1)
10133         IF((LIN(J).EQ.0))GOTO 10132
              GOTO 10131
10132         J=J-(1)
              LIN(J)=LIN(I)
              LIN(J+1)=138
              LIN(J+2)=0
10130     CONTINUE
10123     IF((LED$62(LIN,I).NE.-2))GOTO 10102
          IF((LED$47(LIN,I,SUB,GFLAG).NE.-2))GOTO 10102
          IF((LED$8(LIN,I+1,PFLAG,STATUS).NE.-2))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$75(SUB,GFLAG,GLOB)
10134   GOTO 10102
10135     I=I+(1)
          IF((LIN(I).NE.138))GOTO 10136
            LIN(I+0)=175
            LIN(I+1)=175
            LIN(I+2)=166
            LIN(I+3)=175
            LIN(I+4)=240
            LIN(I+5)=138
            LIN(I+6)=0
            GOTO 10137
10136       MISSI0=1
            J=I+1
            GOTO 10140
10138       J=J+(1)
10140       IF((LIN(J).EQ.0))GOTO 10139
              IF((LIN(J).NE.192))GOTO 10141
              IF((LIN(J+1).NE.LIN(I)))GOTO 10141
                J=J+(1)
                GOTO 10138
10141           IF((LIN(J).NE.LIN(I)))GOTO 10143
                  MISSI0=0
                  GOTO 10139
10143         CONTINUE
10142       GOTO 10138
10139       IF((MISSI0.NE.1))GOTO 10144
              GOTO 10147
10145         J=J+(1)
10147         IF((LIN(J).EQ.0))GOTO 10146
              GOTO 10145
10146         J=J-(1)
              LIN(J)=LIN(I)
              LIN(J+1)=138
              LIN(J+2)=0
10144     CONTINUE
10137     IF((LED$46(LIN,I,TLPAT,256,ALLBUT).NE.-2))GOTO 10102
          IF((LED$58(LIN,I,SUB,256).NE.-2))GOTO 10102
          IF((LED$8(LIN,I+1,PFLAG,STATUS).NE.-2))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$33(SUB,ALLBUT)
10148   GOTO 10102
10149     I=I+(1)
          IF((LED$48(LIN,I,SUB,256).NE.-2))GOTO 10102
          IF((LED$8(LIN,I+1,PFLAG,STATUS).NE.-2))GOTO 10102
          IF((LED$23(LED$63(CURLN),CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$54(SUB)
10150   GOTO 10102
10151     I=I+(1)
          JUNK=LED$23(CURLN,CURLN,JUNK)
          IF((LED$6(196,228,LIN,I,FLAG,STATUS).NE.-2))GOTO 10102
          IF((LED$8(LIN,I,PFLAG,STATUS).NE.-2))GOTO 10102
            STATUS=LED$34(FLAG,STATUS)
10152   GOTO 10102
10153     I=I+(1)
          IF((NLINES.NE.0))GOTO 10102
          IF((LED$9(LIN,I,STATUS).NE.-2))GOTO 10102
            IF((LED$39(LIN,I-1,FILE).NE.-2))GOTO 10155
              CALL SCOPY(FILE,1,SAVFIL,1)
              CALL LED$11
              CALL LED$72
              STATUS=LED$31(0,FILE)
              IF((STATUS.NE.-3))GOTO 10156
                CURLN=0
                GOTO 10157
10156           CURLN=1
10157         UPDFLG=0
              GOTO 10158
10155         STATUS=-3
10158     CONTINUE
10154   GOTO 10102
10159     IF((NLINES.NE.0))GOTO 10102
          IF((LED$39(LIN,I,FILE).NE.-2))GOTO 10102
            CALL SCOPY(FILE,1,SAVFIL,1)
            CALL PUTLIN(SAVFIL,FDOUT0)
            CALL PUTCH(138,FDOUT0)
            STATUS=-2
10160   GOTO 10102
10161     IF((LED$39(LIN,I,FILE).NE.-2))GOTO 10102
            STATUS=LED$31(LINE2,FILE)
10162   GOTO 10102
10163     I=I+(1)
          IF((LED$6(171,190,LIN,I,FLAG,JUNK).NE.-2))GOTO 10102
          IF((LED$39(LIN,I-1,FILE).NE.-2))GOTO 10102
          IF((LED$23(1,LASTLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$35(LINE1,LINE2,FILE,FLAG)
10164   GOTO 10102
10165     IF((LIN(I+1).NE.138))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$30(LINE1,LINE2)
10166   GOTO 10102
10167     IF((LIN(I+1).NE.138))GOTO 10102
            STATUS=LED$23(LED$61(CURLN),LASTLN,STATUS)
            IF((NLINES.NE.1))GOTO 10169
              LINE2=LASTLN
10169       IF((STATUS.NE.-2))GOTO 10170
              STATUS=LED$30(LINE1,MIN0(LINE2,LINE1+22))
10170     CONTINUE
10168   GOTO 10102
10171     IF((LIN(I+1).NE.138))GOTO 10172
            IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
              STATUS=LED$65(LINE1,LINE2)
10173       GOTO 10102
10172       I=I+(1)
            IF((LED$41(LIN,I,KNAME,160).NE.-2))GOTO 10175
            IF((LIN(I).NE.138))GOTO 10175
              CALL LED$76(KNAME,STATUS)
10175     CONTINUE
10174   GOTO 10102
10176     I=I+(1)
          IF((LED$41(LIN,I,KNAME,160).NE.-2))GOTO 10102
          IF((LIN(I).NE.138))GOTO 10102
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$28(KNAME)
10177   GOTO 10102
10178     STATUS=-2
          IF((NLINES.NE.0))GOTO 10179
            LINE2=LED$61(CURLN)
10179     IF((STATUS.NE.-2))GOTO 10102
            STATUS=LED$30(LINE2,LINE2)
10180   GOTO 10102
10181     CALL LED$77
          STATUS=-2
        GOTO 10102
10182     STATUS=LED$29(LIN,I)
        GOTO 10102
10183     I=I+(1)
          IF((NLINES.NE.0))GOTO 10102
          IF((LED$9(LIN,I,STATUS).NE.-2))GOTO 10102
            IF((LIN(I).NE.138))GOTO 10185
              STATUS=-1
              GOTO 10186
10185         STATUS=-3
10186     CONTINUE
10184   GOTO 10102
10187     I=I+(1)
          IF((LED$23(CURLN,CURLN,STATUS).NE.-2))GOTO 10102
            STATUS=LED$32(LIN,I)
10188   GOTO 10102
10099   IF(AAAAB0.EQ.138)GOTO 10178
        AAAAC0=AAAAB0-185
        GOTO(10167,10189,10189,10113,10189,10100,10189,10103,10189,10107
     *,10109,10153,10159,10189,10189,10111,10149,10176,10181,10115,10171
     *,10182,10165,10183,10161,10121,10135,10151,10105,10163,10189,10118
     *,10189,10189,10189,10189,10189,10189,10189,10103,10189,10107,10109
     *,10153,10159,10189,10189,10111,10149,10176,10181,10115,10171,10182
     *,10165,10183,10161,10121,10135,10151,10105,10163,10189,10118,10189
     *,10189,10189,10189,10187),AAAAC0
10189     ERRCO0=21
10102 CONTINUE
10098 IF((STATUS.NE.-2))GOTO 10190
        IF((PFLAG.NE.1))GOTO 10191
          STATUS=LED$30(CURLN,CURLN)
10191   PROBA0=0
10190 LED$25=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$26(LIN,I,CURSAV,STATUS)
      INTEGER LIN(102)
      INTEGER I,CURSAV,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER ISTART,K,LINE
      INTEGER LED$25,LED$42
      LOGICAL LED$53,BRKFL0
      STATUS=-2
      ISTART=I
      K=LINE0
      LINE=0
10192   LINE=LINE+(1)
        K=BUF(K+1)
        IF((BUF(K+2).NE.1))GOTO 10193
          BUF(K+2)=0
          CURLN=LINE
          CURSAV=CURLN
          I=ISTART
          IF((LED$42(LIN,I,STATUS).NE.-2))GOTO 10194
            STATUS=LED$25(LIN,I,1,STATUS)
10194     LINE=0
          K=LINE0
10193   IF((.NOT.LED$53(BRKFL0)))GOTO 10195
          STATUS=-3
10195 CONTINUE
      IF((LINE.GT.LASTLN))GOTO 10196
      IF((STATUS.NE.-2))GOTO 10196
      GOTO 10192
10196 CONTINUE
      LED$26=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$28(KNAME)
      INTEGER KNAME
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K,LINE
      INTEGER LED$40
      LOGICAL LED$53,BRKFL0
      IF((LINE1.GT.0))GOTO 10197
        ERRCO0=12
        LED$28=-3
        GOTO 10198
10197   K=LED$40(LINE1)
        LINE=LINE1
        GOTO 10201
10199   LINE=LINE+(1)
10201   IF((LINE.GT.LINE2))GOTO 10200
          BUF(K+6)=KNAME
          IF((.NOT.LED$53(BRKFL0)))GOTO 10202
            LED$28=-3
            RETURN
10202     K=BUF(K+1)
        GOTO 10199
10200   LED$28=-2
10198 RETURN
      END
      SUBROUTINE LED$77
      INTEGER FD,OPEN,GETLIN,LENGTH
      INTEGER I
      INTEGER PLACE(102)
      INTEGER UNKNO0(8)
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER AAAAD0(15)
      INTEGER AAAAE0(5)
      DATA UNKNO0/245,238,235,238,239,247,238,0/
      DATA AAAAD0/189,233,238,243,244,225,236,236,225,244,233,239,238,18
     *9,0/
      DATA AAAAE0/170,243,170,238,0/
      FD=OPEN(AAAAD0,1)
      IF((FD.NE.-3))GOTO 10203
        CALL SCOPY(UNKNO0,1,PLACE,1)
        GOTO 10204
10203   I=GETLIN(PLACE,FD,102)
        IF((I.EQ.-3))GOTO 10206
        IF((I.EQ.-1))GOTO 10206
        GOTO 10205
10206     CALL SCOPY(UNKNO0,1,PLACE,1)
10205   CALL CLOSE(FD)
10204 I=LENGTH(PLACE)
      IF((PLACE(I).NE.138))GOTO 10207
        PLACE(I)=0
10207 CALL PRINT(FDOUT0,AAAAE0,PLACE)
      RETURN
      END
      INTEGER FUNCTION LED$29(LIN,I)
      INTEGER LIN(1)
      INTEGER I
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER J
      INTEGER CTOI,LED$36,LED$30,LED$48,LED$45
      INTEGER AAAAF0
      INTEGER AAAAG0
      I=I+(1)
      LED$29=-3
      AAAAF0=LIN(I)
      GOTO 10208
10209   I=I+(1)
        IF((LIN(I).NE.138))GOTO 10213
          LED$29=-2
          GLOBA0=1+0-GLOBA0
          IF((GLOBA0.NE.1))GOTO 10211
            CALL REMARK('failed global substitutes continue.')
            GOTO 10212
10211       CALL REMARK('failed global substitutes stop.')
10212   CONTINUE
10210 GOTO 10213
10214   I=I+(1)
        IF((LIN(I).NE.138))GOTO 10215
          IF((PROMPT(1).NE.0))GOTO 10216
            PROMPT(1)=170
            PROMPT(2)=160
            PROMPT(3)=0
            GOTO 10217
10216       PROMPT(1)=0
10217     LED$29=-2
          GOTO 10213
10215     IF((LED$45(LIN,I,PROMPT,102).NE.-2))GOTO 10219
          IF((LIN(I+1).NE.138))GOTO 10219
            LED$29=-2
10219   CONTINUE
10218 GOTO 10213
10220   IF((LIN(I+1).NE.138))GOTO 10213
          LED$29=-2
          IF((UPDFLG.NE.1))GOTO 10222
            CALL REMARK('not saved.')
            GOTO 10223
10222       CALL REMARK('saved.')
10223   CONTINUE
10221 GOTO 10213
10224   IF((LIN(I+1).NE.138))GOTO 10225
          IF((DDIR.NE.0))GOTO 10226
            CALL PUTCH(190,FDOUT0)
            GOTO 10227
10226       CALL PUTCH(188,FDOUT0)
10227     CALL PUTCH(138,FDOUT0)
          LED$29=-2
          GOTO 10213
10225     IF((LIN(I+2).EQ.138))GOTO 10229
            ERRCO0=16
            GOTO 10230
10229       IF((LIN(I+1).NE.190))GOTO 10231
              LED$29=-2
              DDIR=0
              GOTO 10232
10231         IF((LIN(I+1).NE.188))GOTO 10233
                LED$29=-2
                DDIR=-1
                GOTO 10234
10233           ERRCO0=16
10234       CONTINUE
10232     CONTINUE
10230   CONTINUE
10228 GOTO 10213
10208 AAAAG0=AAAAF0-195
      GOTO(10224,10235,10235,10209,10235,10235,10235,10220,10235,10235, 
     *    10235,10235,10214),AAAAG0
      AAAAG0=AAAAF0-227
      GOTO(10224,10235,10235,10209,10235,10235,10235,10220,10235,10235, 
     *    10235,10235,10214),AAAAG0
10235   ERRCO0=18
10213 RETURN
      END
      INTEGER FUNCTION LED$30(FROM,TO)
      INTEGER FROM,TO
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I,J
      INTEGER LED$40
      LOGICAL LED$53,BRKFL0
      IF((FROM.GT.0))GOTO 10236
        LED$30=-3
        ERRCO0=12
        GOTO 10237
10236   J=LED$40(FROM)
        I=FROM
        GOTO 10240
10238   I=I+(1)
10240   IF((I.GT.TO))GOTO 10239
          CALL LED$50(J)
          CALL PUTLIN(TXT,FDOUT0)
          IF((.NOT.LED$53(BRKFL0)))GOTO 10241
            LED$30=-3
            CURLN=I
            RETURN
10241     J=BUF(J+1)
        GOTO 10238
10239   CURLN=TO
        LED$30=-2
10237 RETURN
      END
      SUBROUTINE LED$27(CP)
      INTEGER * 4 CP
      INTEGER JUNK,I,LENGTH
      INTEGER NEWFI0(102),ARGZE0(102)
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER AAAAH0(17)
      DATA AAAAH0/189,232,239,237,229,189,175,170,243,174,236,239,231,23
     *9,245,244,0/
      CALL GETARG(0,ARGZE0,102)
      I=LENGTH(ARGZE0)
      GOTO 10244
10242 I=I-(1)
10244 IF((I.LE.1))GOTO 10243
        IF((ARGZE0(I).NE.175))GOTO 10242
          I=I+(1)
          GOTO 10243
10243 CALL ENCODE(NEWFI0,102,AAAAH0,ARGZE0(I))
      CALL REMARK('saving buffer because of pending logout.')
      CALL LED$35(1,LASTLN,NEWFI0,0)
      CALL LED$11
      CALL CNSIG$(JUNK)
      RETURN
      END
      INTEGER FUNCTION LED$31(LINE,FILE)
      INTEGER FILE(102)
      INTEGER LINE
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER LIN(102)
      INTEGER COUNT,FD
      INTEGER GETLIN,LED$52,OPEN
      LOGICAL LED$53,BRKFL0
      FD=OPEN(FILE,1)
      IF((FD.NE.-3))GOTO 10246
        LED$31=-3
        ERRCO0=6
        GOTO 10247
10246   CURLN=LINE
        LED$31=-2
        COUNT=0
        GOTO 10250
10248   COUNT=COUNT+(1)
10250   IF((GETLIN(LIN,FD).EQ.-1))GOTO 10249
          LED$31=LED$52(LIN)
          IF((LED$31.NE.-3))GOTO 10251
            GOTO 10249
10251       UPDFLG=1
          IF((.NOT.LED$53(BRKFL0)))GOTO 10248
            LED$31=-3
            GOTO 10249
10249   CALL CLOSE(FD)
        CALL PUTDEC(COUNT,1,FDOUT0)
        CALL PUTCH(138,FDOUT0)
10247 RETURN
      END
      INTEGER FUNCTION LED$32(LIN,INI)
      INTEGER LIN(1)
      INTEGER INI
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER C
      INTEGER I,J,K
      INTEGER INTER0,EXPAN0
      INTEGER NEWCO0(102)
      INTEGER SAVCOM(102)
      INTEGER RETUR0,SHELL,SUBSYS
      INTEGER AAAAI0(5)
      INTEGER AAAAJ0(5)
      DATA SAVCOM(1)/0/
      DATA AAAAI0/170,243,170,238,0/
      DATA AAAAJ0/170,227,170,238,0/
      EXPAN0=0
      IF((NLINES.NE.0))GOTO 10253
        IF((LIN(INI).NE.138))GOTO 10254
          INTER0=1
          GOTO 10255
10254     INTER0=0
10255   IF((LIN(INI).NE.161))GOTO 10256
          IF((SAVCOM(1).EQ.0))GOTO 10257
            J=1
            GOTO 10260
10258       J=J+(1)
10260       IF((SAVCOM(J).EQ.0))GOTO 10259
              NEWCO0(J)=SAVCOM(J)
            GOTO 10258
10259       IF((NEWCO0(J-1).NE.138))GOTO 10261
              J=J-(1)
10261       INI=INI+(1)
            EXPAN0=1
            GOTO 10263
10257       ERRCO0=32
            LED$32=-3
            RETURN
10256     J=1
10263   I=INI
        GOTO 10266
10264   I=I+(1)
10266   IF((LIN(I).EQ.0))GOTO 10265
          IF((LIN(I).NE.192))GOTO 10267
            IF((LIN(I+1).EQ.165))GOTO 10268
              NEWCO0(J)=192
              NEWCO0(J+1)=LIN(I+1)
              J=J+(2)
              I=I+(1)
              GOTO 10264
10268         I=I+(1)
              NEWCO0(J)=LIN(I)
              J=J+(1)
10269       GOTO 10264
10267       IF((LIN(I).NE.165))GOTO 10271
              K=1
              GOTO 10274
10272         K=K+(1)
10274         IF((SAVFIL(K).EQ.0))GOTO 10273
                NEWCO0(J)=SAVFIL(K)
                J=J+(1)
              GOTO 10272
10273         EXPAN0=1
              GOTO 10275
10271         NEWCO0(J)=LIN(I)
              J=J+(1)
10275     CONTINUE
10270   GOTO 10264
10265   IF((NEWCO0(J-1).NE.138))GOTO 10276
          J=J-(1)
10276   NEWCO0(J)=0
        CALL SCOPY(NEWCO0,1,SAVCOM,1)
        IF((INTER0.NE.1))GOTO 10277
          RETUR0=SHELL(-10)
          GOTO 10278
10277     IF((EXPAN0.NE.1))GOTO 10279
            CALL PRINT(-11,AAAAI0,NEWCO0)
10279     RETUR0=SUBSYS(NEWCO0)
10278   CALL PRINT(-11,AAAAJ0,254)
        IF((RETUR0.NE.-3))GOTO 10280
          ERRCO0=31
          LED$32=-3
          RETURN
10280     LED$32=-2
          RETURN
10253   CALL REMARK('Not implemented.')
      LED$32=-2
      RETURN
      END
      INTEGER FUNCTION LED$33(SUB,ALLBUT)
      INTEGER SUB(1)
      INTEGER ALLBUT
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER NEW(102)
      INTEGER COLLAP,X,I,J,LINE,LASTS0,INX,KNAME,STATUS
      INTEGER LENGTH,LED$81,LED$52,LED$40,LED$49
      LOGICAL BRKFL0,LED$53
      LED$33=-3
      IF((LINE1.GT.0))GOTO 10281
        ERRCO0=12
        RETURN
10281 LASTS0=LENGTH(SUB)
      IF((LENGTH(TLPAT).GT.LASTS0))GOTO 10283
      IF((ALLBUT.EQ.1))GOTO 10283
      GOTO 10282
10283   COLLAP=1
        GOTO 10284
10282   COLLAP=0
10284 LINE=LINE1
      GOTO 10287
10285 LINE=LINE+(1)
10287 IF((LINE.GT.LINE2))GOTO 10286
        IF((.NOT.LED$53(BRKFL0)))GOTO 10288
          LED$33=-3
          RETURN
10288   INX=LED$49(LINE)
        J=1
        I=1
        GOTO 10291
10289   I=I+(1)
10291   IF((TXT(I).EQ.0))GOTO 10290
          X=LED$81(TLPAT,TXT(I),ALLBUT,LASTS0)
          IF((COLLAP.NE.1))GOTO 10292
          IF((X.LT.LASTS0))GOTO 10292
          IF((LASTS0.LE.0))GOTO 10292
            NEW(J)=SUB(LASTS0)
            J=J+(1)
            I=I+(1)
            GOTO 10295
10293       I=I+(1)
10295       IF((TXT(I).EQ.0))GOTO 10294
              X=LED$81(TLPAT,TXT(I),ALLBUT,LASTS0)
              IF((X.GE.LASTS0))GOTO 10293
                GOTO 10294
10294     CONTINUE
10292     IF((TXT(I).NE.0))GOTO 10297
            GOTO 10290
10297     IF((X.LE.0))GOTO 10298
          IF((LASTS0.LE.0))GOTO 10298
            NEW(J)=SUB(X)
            J=J+(1)
            GOTO 10289
10298       IF((X.NE.0))GOTO 10300
              NEW(J)=TXT(I)
              J=J+(1)
10300     CONTINUE
10299   GOTO 10289
10290   NEW(J)=0
        KNAME=BUF(INX+6)
        CALL LED$24(LINE,LINE,STATUS)
        LED$33=LED$52(NEW)
        IF((LED$33.NE.-3))GOTO 10301
          GOTO 10286
10301   INX=LED$40(CURLN)
        BUF(INX+6)=KNAME
        LED$33=-2
        UPDFLG=1
      GOTO 10285
10286 RETURN
      END
      INTEGER FUNCTION LED$34(DFLG,STATUS)
      INTEGER STATUS,DFLG
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K1,K2,L1,L2,OLDCNT
      INTEGER LED$61,LED$40
      STATUS=-3
      IF((DFLG.NE.0))GOTO 10302
      IF((LINE1.GT.0))GOTO 10302
        ERRCO0=12
        GOTO 10303
10302   IF((LIMBO.NE.-1))GOTO 10304
          ERRCO0=15
          GOTO 10305
10304     IF((LINE1.LE.LINE2))GOTO 10306
            ERRCO0=1
            GOTO 10307
10306       IF((LINE2.LE.LASTLN))GOTO 10308
              ERRCO0=23
              GOTO 10309
10308         STATUS=-2
              CURLN=LINE2
              K1=LED$40(LINE2)
              K2=LED$40(LED$61(LINE2))
              L1=LIMBO
              L2=BUF(L1+0)
              CALL LED$69(K1,L1,L2,K2)
              CALL LED$69(L2,K2,K1,L1)
              OLDCNT=LIMCNT
              LIMCNT=0
              LIMBO=-1
              LASTLN=LASTLN+(OLDCNT)
              IF((DFLG.NE.0))GOTO 10310
                CALL LED$24(LINE1,LINE2,STATUS)
10310         CURLN=CURLN+(OLDCNT)
10309     CONTINUE
10307   CONTINUE
10305 CONTINUE
10303 LED$34=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$35(FROM,TO,FILE,AFLAG)
      INTEGER FROM,TO
      INTEGER FILE(102)
      INTEGER AFLAG
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER FD,K,LINE
      INTEGER CREATE,LED$40,OPEN
      LOGICAL LED$53,BRKFL0
      IF((AFLAG.NE.1))GOTO 10311
        FD=OPEN(FILE,3)
        GOTO 10312
10311   FD=CREATE(FILE,2)
10312 IF((FD.NE.-3))GOTO 10313
        LED$35=-3
        ERRCO0=24
        GOTO 10314
10313   LED$35=-2
        IF((AFLAG.NE.1))GOTO 10315
          CALL WIND(FD)
10315   K=LED$40(FROM)
        LINE=FROM
        GOTO 10318
10316   LINE=LINE+(1)
10318   IF((LINE.GT.TO))GOTO 10317
          IF((.NOT.LED$53(BRKFL0)))GOTO 10319
            LED$35=-3
            GOTO 10317
10319     CALL LED$50(K)
          CALL PUTLIN(TXT,FD)
          K=BUF(K+1)
        GOTO 10316
10317   CALL CLOSE(FD)
        CALL PUTDEC(LINE-FROM,1,FDOUT0)
        CALL PUTCH(138,FDOUT0)
        IF((FROM.NE.1))GOTO 10320
        IF((LINE-1.NE.LASTLN))GOTO 10320
          CALL LED$73(2)
          CALL LED$73(1)
          UPDFLG=0
10320 CONTINUE
10314 RETURN
      END
      INTEGER FUNCTION LED$36(STR,STATUS)
      INTEGER STR(1)
      INTEGER STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I
      INTEGER LED$44,LED$61
      I=1
      IF((STR(1).NE.0))GOTO 10321
        STATUS=-2
        LED$36=LED$61(CURLN)
        GOTO 10322
10321   IF((LED$44(STR,I,LED$36,STATUS).NE.-1))GOTO 10323
          STATUS=-3
10323 CONTINUE
10322 RETURN
      END
      SUBROUTINE LED$37(STATUS)
      INTEGER STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER NEW(102)
      INTEGER LNG,JUNK,LNGNEW
      INTEGER GETLIN,LED$49,LED$52,LENGTH
      CURLN=LINE1
      GOTO 10326
10324 CURLN=CURLN+(1)
10326 IF((CURLN.GT.LINE2))GOTO 10325
        JUNK=LED$49(CURLN)
        LNG=LENGTH(TXT)
        TXT(LNG)=0
        CALL PUTLIN(TXT,FDOUT0)
        LNGNEW=GETLIN(NEW,FDINA0)
        IF((LNGNEW.NE.-1))GOTO 10327
          STATUS=-1
          RETURN
10327   IF((NEW(1).NE.174))GOTO 10328
        IF((NEW(2).NE.138))GOTO 10328
          STATUS=-2
          RETURN
10328   IF((NEW(1).NE.138))GOTO 10329
          GOTO 10324
10329   STATUS=-3
        IF((LNG+LNGNEW.LT.102))GOTO 10330
          ERRCO0=13
          RETURN
10330   CALL SCOPY(NEW,1,TXT,LNG)
        CALL LED$24(CURLN,CURLN,STATUS)
        IF((STATUS.NE.-2))GOTO 10331
          STATUS=LED$52(TXT)
10331   IF((STATUS.NE.-3))GOTO 10324
          RETURN
10325 CURLN=LINE2
      RETURN
      END
      INTEGER FUNCTION LED$39(LIN,I,FILE)
      INTEGER LIN(102),FILE(102)
      INTEGER I
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER J,K
      LED$39=-3
      IF((LIN(I+1).NE.160))GOTO 10333
        J=I+2
        CALL LED$74(LIN,J)
        K=1
        GOTO 10336
10334   K=K+(1)
10336   IF((LIN(J).EQ.138))GOTO 10335
          FILE(K)=LIN(J)
          J=J+(1)
        GOTO 10334
10335   FILE(K)=0
        IF((K.LE.1))GOTO 10338
          LED$39=-2
10337   GOTO 10338
10333   IF((LIN(I+1).NE.138))GOTO 10339
        IF((SAVFIL(1).EQ.0))GOTO 10339
          CALL SCOPY(SAVFIL,1,FILE,1)
          LED$39=-2
          GOTO 10340
10339     IF((LIN(I+1).NE.138))GOTO 10341
            ERRCO0=27
            GOTO 10342
10341       ERRCO0=8
10342   CONTINUE
10340 CONTINUE
10338 IF(((LED$39.NE.-2).OR.(SAVFIL(1).NE.0)))GOTO 10343
        CALL SCOPY(FILE,1,SAVFIL,1)
10343 RETURN
      END
      INTEGER FUNCTION LED$40(LINE)
      INTEGER LINE
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER J,K
      K=LINE0
      J=0
      GOTO 10346
10344 J=J+(1)
10346 IF((J.GE.LINE))GOTO 10345
        K=BUF(K+1)
      GOTO 10344
10345 LED$40=K
      RETURN
      END
      INTEGER FUNCTION LED$41(LIN,I,KNAME,DFLTNM)
      INTEGER LIN(1)
      INTEGER I,KNAME,DFLTNM
      IF((LIN(I).EQ.138))GOTO 10348
      IF((LIN(I).EQ.0))GOTO 10348
      GOTO 10347
10348   KNAME=DFLTNM
        GOTO 10349
10347   KNAME=LIN(I)
        I=I+(1)
10349 LED$41=-2
      RETURN
      END
      INTEGER FUNCTION LED$42(LIN,I,STATUS)
      INTEGER LIN(102)
      INTEGER I,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER NUM
      INTEGER LED$44,MIN0
      LINE2=0
      NLINES=0
      GOTO 10352
10350 CONTINUE
10352 IF((LED$44(LIN,I,NUM,STATUS).NE.-2))GOTO 10351
        LINE1=LINE2
        LINE2=NUM
        NLINES=NLINES+(1)
        IF((LIN(I).EQ.172))GOTO 10353
        IF((LIN(I).EQ.187))GOTO 10353
          GOTO 10351
10353   IF((LIN(I).NE.187))GOTO 10354
          CURLN=NUM
10354   I=I+(1)
      GOTO 10350
10351 NLINES=MIN0(NLINES,2)
      IF((NLINES.NE.0))GOTO 10355
        LINE2=CURLN
10355 IF((NLINES.GT.1))GOTO 10356
        LINE1=LINE2
10356 IF((STATUS.EQ.-3))GOTO 10357
        STATUS=-2
10357 LED$42=STATUS
      RETURN
      END
      INTEGER FUNCTION LED$43(LIN,I,PNUM,STATUS)
      INTEGER LIN(102)
      INTEGER I,PNUM,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER J
      INTEGER MISSI0,K
      INTEGER CTOI,LED$62,LED$66,LED$55,LED$41
      INTEGER AAAAK0
      INTEGER AAAAL0
      LED$43=-2
10358 IF((LIN(I).NE.160))GOTO 10359
        I=I+(1)
      GOTO 10358
10359 AAAAK0=LIN(I)
      GOTO 10360
10361   PNUM=CTOI(LIN,I)
        I=I-(1)
      GOTO 10362
10363   PNUM=CURLN
      GOTO 10362
10364   PNUM=LASTLN
      GOTO 10362
10365   PNUM=CURLN-1
      GOTO 10362
10366   MISSI0=1
        K=I+1
        GOTO 10369
10367   K=K+(1)
10369   IF((LIN(K).EQ.0))GOTO 10368
          IF((LIN(K).NE.192))GOTO 10370
          IF((LIN(K+1).NE.LIN(I)))GOTO 10370
            K=K+(1)
            GOTO 10367
10370       IF((LIN(K).NE.LIN(I)))GOTO 10372
              MISSI0=0
              GOTO 10368
10372     CONTINUE
10371   GOTO 10367
10368   IF((MISSI0.NE.1))GOTO 10373
          GOTO 10376
10374     K=K+(1)
10376     IF((LIN(K).EQ.0))GOTO 10375
          GOTO 10374
10375     K=K-(1)
          LIN(K)=LIN(I)
          LIN(K+1)=138
          LIN(K+2)=0
10373   IF((LED$62(LIN,I).NE.-3))GOTO 10377
          LED$43=-3
          GOTO 10362
10377     IF((LIN(I).NE.175))GOTO 10379
            LED$43=LED$66(0,PNUM)
            GOTO 10380
10379       LED$43=LED$66(-1,PNUM)
10380   CONTINUE
10378 GOTO 10362
10381   J=I
        I=I+(1)
        IF((LED$41(LIN,I,SAVKNM,SAVKNM).NE.-3))GOTO 10382
          LED$43=-3
          GOTO 10383
10382     IF((LIN(J).NE.190))GOTO 10384
            LED$43=LED$55(0,PNUM)
            GOTO 10385
10384       LED$43=LED$55(-1,PNUM)
10385   CONTINUE
10383   I=I-(1)
      GOTO 10362
10360 IF(AAAAK0.EQ.164)GOTO 10364
      AAAAL0=AAAAK0-172
      GOTO(10365,10363,10366,10361,10361,10361,10361,10361,10361,10361, 
     *    10361,10361,10361,10386,10386,10381,10386,10381,10386,10386,  
     *   10386,10386,10386,10386,10386,10386,10386,10386,10386,10386,   
     *  10386,10386,10386,10386,10386,10386,10386,10386,10386,10386,    
     * 10386,10386,10386,10386,10386,10386,10386,10366,10386,10365),AAAA
     *L0
10386   LED$43=-1
10362 IF((LED$43.NE.-2))GOTO 10387
        I=I+(1)
10387 STATUS=LED$43
      RETURN
      END
      INTEGER FUNCTION LED$44(LIN,I,NUM,STATUS)
      INTEGER LIN(102)
      INTEGER I,NUM,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER ISTART,MUL,PNUM,PORM
      INTEGER LED$43
      ISTART=I
      NUM=0
      CALL LED$74(LIN,I)
      IF((LED$43(LIN,I,NUM,STATUS).NE.-2))GOTO 10388
10389     PORM=0
          CALL LED$74(LIN,I)
          IF((LIN(I).NE.173))GOTO 10390
            MUL=-1
            PORM=1
            I=I+(1)
            GOTO 10391
10390       IF((LIN(I).NE.171))GOTO 10392
              I=I+(1)
              PORM=1
10392       MUL=+1
10391     CALL LED$74(LIN,I)
          IF((LED$43(LIN,I,PNUM,STATUS).NE.-2))GOTO 10393
            NUM=NUM+(MUL*PNUM)
10393     IF((STATUS.NE.-1))GOTO 10394
          IF((PORM.NE.1))GOTO 10394
            STATUS=-3
10394   CONTINUE
        IF((STATUS.EQ.-2))GOTO 10389
10388 IF((NUM.LT.0))GOTO 10396
      IF((NUM.GT.LASTLN))GOTO 10396
      GOTO 10395
10396   STATUS=-3
        ERRCO0=17
10395 IF((STATUS.NE.-3))GOTO 10397
        LED$44=-3
        GOTO 10398
10397   IF((I.GT.ISTART))GOTO 10399
          LED$44=-1
          GOTO 10400
10399     LED$44=-2
10400 CONTINUE
10398 STATUS=LED$44
      RETURN
      END
      INTEGER FUNCTION LED$45(LIN,I,DST,MAXDST)
      INTEGER LIN(102),DST(MAXDST)
      INTEGER I,MAXDST
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER DELIM
      INTEGER ESC
      INTEGER J,K,D
      J=I
      LED$45=-3
      ERRCO0=4
      DELIM=LIN(J)
      IF((DELIM.NE.138))GOTO 10401
        LIN(J)=175
        LIN(J+1)=175
        LIN(J+2)=138
        LIN(J+3)=0
        DELIM=LIN(J)
        GOTO 10402
10401   IF((DELIM.EQ.240))GOTO 10404
        IF((DELIM.EQ.208))GOTO 10404
        GOTO 10403
10404   IF((LIN(J+1).NE.138))GOTO 10403
          LIN(J)=175
          LIN(J+1)=175
          LIN(J+2)=DELIM
          LIN(J+3)=138
          LIN(J+4)=0
          DELIM=LIN(J)
10403 CONTINUE
10402 IF((LIN(J+1).NE.138))GOTO 10405
        DST(1)=0
        ERRCO0=14
        LED$45=-2
        RETURN
10405 K=J+1
      GOTO 10408
10406 K=K+(1)
10408 IF((LIN(K).EQ.138))GOTO 10407
      GOTO 10406
10407 K=K-(1)
      IF((LIN(K).EQ.240))GOTO 10410
      IF((LIN(K).EQ.208))GOTO 10410
      GOTO 10409
10410   K=K-(1)
        IF((LIN(K).NE.DELIM))GOTO 10411
        IF((LIN(K-1).NE.192))GOTO 10414
        IF((LIN(K-2).EQ.192))GOTO 10414
        GOTO 10411
10411     K=K+(2)
          LIN(K)=DELIM
          LIN(K+1)=138
          LIN(K+2)=0
10413   GOTO 10414
10409   IF((LIN(K).NE.DELIM))GOTO 10416
        IF((LIN(K-1).NE.192))GOTO 10415
        IF((LIN(K-2).EQ.192))GOTO 10415
        GOTO 10416
10416     K=K+(1)
          LIN(K)=DELIM
          LIN(K+1)=138
          LIN(K+2)=0
10415 CONTINUE
10414 K=J+1
      GOTO 10420
10418 K=K+(1)
10420 IF((LIN(K).EQ.DELIM))GOTO 10419
        IF((LIN(K).EQ.138))GOTO 10422
        IF((LIN(K).EQ.0))GOTO 10422
        GOTO 10421
10422     IF((DELIM.NE.160))GOTO 10423
            GOTO 10419
10423       RETURN
10421   CALL ESC(LIN,K)
      GOTO 10418
10419 IF((K-J.LE.MAXDST))GOTO 10424
        RETURN
10424 D=1
      J=J+(1)
      GOTO 10427
10425 D=D+(1)
      J=J+(1)
10427 IF((J.GE.K))GOTO 10426
        DST(D)=ESC(LIN,J)
      GOTO 10425
10426 DST(D)=0
      I=J
      ERRCO0=7
      LED$45=-2
      RETURN
      END
      INTEGER FUNCTION LED$46(ARRAY,K,SET,SIZE,ALLBUT)
      INTEGER ARRAY(1),SET(1)
      INTEGER K,SIZE,ALLBUT
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I,J
      INTEGER ADDSET
      ERRCO0=28
      I=K+1
      IF((ARRAY(I).NE.254))GOTO 10428
        ALLBUT=1
        I=I+(1)
        GOTO 10429
10428   ALLBUT=0
10429 J=1
      LED$46=-3
      CALL FILSET(ARRAY(K),ARRAY,I,SET,J,SIZE)
      IF((ARRAY(I).EQ.ARRAY(K)))GOTO 10430
        SET(1)=0
        RETURN
10430 IF((SET(1).NE.0))GOTO 10431
        ERRCO0=29
        RETURN
10431 IF((J.LE.1))GOTO 10432
      IF((ADDSET(0,SET,J,SIZE).NE.0))GOTO 10432
        SET(1)=0
        RETURN
10432 K=I
      LED$46=-2
      ERRCO0=7
      RETURN
      END
      INTEGER FUNCTION LED$47(LIN,I,SUB,GFLAG)
      INTEGER LIN(102),SUB(256)
      INTEGER GFLAG,I
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER MAKSUB
      INTEGER J
      ERRCO0=5
      LED$47=-3
      IF((LIN(I).NE.0))GOTO 10433
        RETURN
10433 IF((LIN(I+1).NE.166))GOTO 10434
      IF((LIN(I+2).EQ.LIN(I)))GOTO 10435
      IF((LIN(I+2).EQ.138))GOTO 10435
      GOTO 10434
10435   CALL CTOC(SUBS,SUB,256)
        I=I+(2)
        IF((LIN(I).NE.138))GOTO 10437
          LIN(I)=LIN(I-2)
          LIN(I+1)=240
          LIN(I+2)=138
          LIN(I+3)=0
10436   GOTO 10437
10434   IF((LIN(I+1).NE.138))GOTO 10438
          LIN(I+1)=LIN(I)
          LIN(I+2)=240
          LIN(I+3)=138
          LIN(I+4)=0
          GOTO 10439
10438     J=I
          GOTO 10442
10440     J=J+(1)
10442     IF((LIN(J).EQ.0))GOTO 10441
          GOTO 10440
10441     J=J-(2)
          IF((LIN(J).EQ.240))GOTO 10444
          IF((LIN(J).EQ.208))GOTO 10444
          GOTO 10443
10444       J=J-(1)
            IF((LIN(J).EQ.231))GOTO 10446
            IF((LIN(J).EQ.199))GOTO 10446
            GOTO 10445
10446         IF((J.LE.I+1))GOTO 10447
              IF((LIN(J-1).NE.LIN(I)))GOTO 10447
              IF((LIN(J-2).NE.192))GOTO 10454
              IF((LIN(J-3).EQ.192))GOTO 10454
              GOTO 10447
10447           J=J+(2)
                LIN(J)=LIN(I)
                LIN(J+1)=240
                LIN(J+2)=138
                LIN(J+3)=0
10449         GOTO 10454
10445         IF((J.LE.I+1))GOTO 10451
              IF((LIN(J).NE.LIN(I)))GOTO 10451
              IF((LIN(J-1).NE.192))GOTO 10453
              IF((LIN(J-2).EQ.192))GOTO 10453
              GOTO 10451
10451           J=J+(2)
                LIN(J)=LIN(I)
                LIN(J+1)=240
                LIN(J+2)=138
                LIN(J+3)=0
10453       CONTINUE
10450       GOTO 10454
10443       IF((LIN(J).EQ.231))GOTO 10456
            IF((LIN(J).EQ.199))GOTO 10456
            GOTO 10455
10456         J=J-(1)
              IF((J.LE.I+1))GOTO 10457
              IF((LIN(J).NE.LIN(I)))GOTO 10457
              IF((LIN(J-1).NE.192))GOTO 10460
              IF((LIN(J-2).EQ.192))GOTO 10460
              GOTO 10457
10457           J=J+(2)
                LIN(J)=LIN(I)
                LIN(J+1)=240
                LIN(J+2)=138
                LIN(J+3)=0
10459         GOTO 10460
10455         IF((LIN(J).NE.LIN(I)))GOTO 10462
              IF((LIN(J).NE.LIN(I)))GOTO 10461
              IF((LIN(J-1).NE.192))GOTO 10461
              IF((LIN(J-2).EQ.192))GOTO 10461
              GOTO 10462
10462           J=J+(1)
                LIN(J)=LIN(I)
                LIN(J+1)=240
                LIN(J+2)=138
                LIN(J+3)=0
10461       CONTINUE
10460     CONTINUE
10454   CONTINUE
10439   I=MAKSUB(LIN,I+1,LIN(I),SUB)
        IF((I.NE.-3))GOTO 10464
          RETURN
10464   CALL CTOC(SUB,SUBS,256)
10437 IF((LIN(I+1).EQ.231))GOTO 10466
      IF((LIN(I+1).EQ.199))GOTO 10466
      GOTO 10465
10466   I=I+(1)
        GFLAG=1
        GOTO 10467
10465   GFLAG=0
10467 ERRCO0=7
      LED$47=-2
      RETURN
      END
      INTEGER FUNCTION LED$48(LIN,I,DST,MAXDST)
      INTEGER LIN(102),DST(MAXDST)
      INTEGER I,MAXDST
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER DELIM
      INTEGER ESC
      INTEGER J,K,D
      J=I
      LED$48=-3
      ERRCO0=4
      DELIM=LIN(J)
      IF((DELIM.NE.138))GOTO 10468
        LIN(J)=175
        LIN(J+1)=160
        LIN(J+2)=175
        LIN(J+3)=240
        LIN(J+4)=138
        LIN(J+5)=0
        DELIM=LIN(J)
        GOTO 10469
10468   IF((DELIM.EQ.240))GOTO 10471
        IF((DELIM.EQ.208))GOTO 10471
        GOTO 10470
10471   IF((LIN(J+1).NE.138))GOTO 10470
          LIN(J)=175
          LIN(J+1)=160
          LIN(J+2)=175
          LIN(J+3)=DELIM
          LIN(J+4)=138
          LIN(J+5)=0
          DELIM=LIN(J)
10470 CONTINUE
10469 IF((LIN(J+1).NE.138))GOTO 10472
        DST(1)=0
        ERRCO0=14
        LED$48=-2
        RETURN
10472 K=J+1
      GOTO 10475
10473 K=K+(1)
10475 IF((LIN(K).EQ.138))GOTO 10474
      GOTO 10473
10474 K=K-(1)
      IF((LIN(K).EQ.240))GOTO 10477
      IF((LIN(K).EQ.208))GOTO 10477
      GOTO 10476
10477   K=K-(1)
        IF((LIN(K).NE.DELIM))GOTO 10478
        IF((LIN(K-1).NE.192))GOTO 10481
        IF((LIN(K-2).EQ.192))GOTO 10481
        GOTO 10478
10478     K=K+(2)
          LIN(K)=DELIM
          LIN(K+1)=240
          LIN(K+2)=138
          LIN(K+3)=0
10480   GOTO 10481
10476   IF((LIN(K).NE.DELIM))GOTO 10483
        IF((LIN(K-1).NE.192))GOTO 10482
        IF((LIN(K-2).EQ.192))GOTO 10482
        GOTO 10483
10483     K=K+(1)
          LIN(K)=DELIM
          LIN(K+1)=240
          LIN(K+2)=138
          LIN(K+3)=0
10482 CONTINUE
10481 K=J+1
      GOTO 10487
10485 K=K+(1)
10487 IF((LIN(K).EQ.DELIM))GOTO 10486
        IF((LIN(K).EQ.138))GOTO 10489
        IF((LIN(K).EQ.0))GOTO 10489
        GOTO 10488
10489     IF((DELIM.NE.160))GOTO 10490
            GOTO 10486
10490       RETURN
10488   CALL ESC(LIN,K)
      GOTO 10485
10486 IF((K-J.LE.MAXDST))GOTO 10491
        RETURN
10491 D=1
      J=J+(1)
      GOTO 10494
10492 D=D+(1)
      J=J+(1)
10494 IF((J.GE.K))GOTO 10493
        DST(D)=ESC(LIN,J)
      GOTO 10492
10493 DST(D)=0
      I=J
      ERRCO0=7
      LED$48=-2
      RETURN
      END
      INTEGER FUNCTION LED$49(LINE)
      INTEGER LINE
      INTEGER K
      INTEGER LED$40
      K=LED$40(LINE)
      CALL LED$50(K)
      LED$49=K
      RETURN
      END
      INTEGER FUNCTION LED$54(SUB)
      INTEGER SUB(256)
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER NEW(102)
      INTEGER T,LINE,K
      INTEGER LED$52,LED$24,LED$40
      LOGICAL LED$53,BRKFL0
      LED$54=-3
      IF((LINE1.GT.0))GOTO 10495
        ERRCO0=12
        GOTO 10496
10495   T=1
        LINE=LINE1
        K=LED$40(LINE)
10497     IF((.NOT.LED$53(BRKFL0)))GOTO 10498
            RETURN
10498     CALL LED$50(K)
          CALL LED$3(TXT,NEW,T,102)
          IF((LINE.LT.LINE2))GOTO 10499
            GOTO 10500
10499     CALL LED$3(SUB,NEW,T,102)
          LINE=LINE+(1)
          K=BUF(K+1)
        GOTO 10497
10500   IF((T+2.LE.102))GOTO 10501
          ERRCO0=13
          GOTO 10502
10501     NEW(T)=138
          NEW(T+1)=0
          LED$54=LED$24(LINE1,LINE2,LED$54)
          IF((LED$54.NE.-2))GOTO 10503
            LED$54=LED$52(NEW)
10503   CONTINUE
10502 CONTINUE
10496 RETURN
      END
      INTEGER FUNCTION LED$55(WAY,NUM)
      INTEGER WAY,NUM
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K
      INTEGER LED$40
      LOGICAL LED$53,BRKFL0
      NUM=CURLN
      K=LED$40(NUM)
10504   CALL LED$2(NUM,K,WAY)
        IF((BUF(K+6).NE.SAVKNM))GOTO 10505
          LED$55=-2
          RETURN
10505 CONTINUE
      IF((NUM.EQ.CURLN))GOTO 10506
      IF(LED$53(BRKFL0))GOTO 10506
      GOTO 10504
10506 CONTINUE
      LED$55=-3
      IF((ERRCO0.NE.7))GOTO 10507
        ERRCO0=11
10507 RETURN
      END
      SUBROUTINE LED$56(STUFF)
      INTEGER STUFF(1)
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      CALL PUTLIN(STUFF,SAFET0)
      RETURN
      END
      INTEGER FUNCTION LED$58(ARRAY,K,SET,SIZE)
      INTEGER ARRAY(1),SET(1)
      INTEGER K,SIZE
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I,J,L
      INTEGER ADDSET
      LED$58=-3
      ERRCO0=28
      IF((ARRAY(K).NE.0))GOTO 10508
        RETURN
10508 IF((ARRAY(K+1).NE.166))GOTO 10509
      IF((ARRAY(K+2).EQ.ARRAY(K)))GOTO 10510
      IF((ARRAY(K+2).EQ.138))GOTO 10510
      GOTO 10509
10510   CALL CTOC(TSET,SET,256)
        K=K+(2)
        IF((ARRAY(K).NE.138))GOTO 10512
          ARRAY(K)=ARRAY(K-2)
          ARRAY(K+1)=240
          ARRAY(K+2)=138
          ARRAY(K+3)=0
10511   GOTO 10512
10509   L=K
        GOTO 10515
10513   L=L+(1)
10515   IF((ARRAY(L).EQ.0))GOTO 10514
        GOTO 10513
10514   L=L-(2)
        IF((L.NE.K))GOTO 10516
          ARRAY(K+1)=ARRAY(K)
          ARRAY(K+2)=240
          ARRAY(K+3)=138
          ARRAY(K+4)=0
          GOTO 10517
10516     IF((ARRAY(L).EQ.240))GOTO 10519
          IF((ARRAY(L).EQ.208))GOTO 10519
          GOTO 10518
10519       L=L-(1)
            IF((L.LT.K+1))GOTO 10520
            IF((ARRAY(L).NE.ARRAY(K)))GOTO 10520
            IF((ARRAY(L-1).NE.192))GOTO 10523
            IF((ARRAY(L-2).EQ.192))GOTO 10523
            GOTO 10520
10520         L=L+(2)
              ARRAY(L)=ARRAY(K)
              ARRAY(L+1)=240
              ARRAY(L+2)=138
              ARRAY(L+3)=0
10522       GOTO 10523
10518       IF((ARRAY(L).NE.ARRAY(K)))GOTO 10525
            IF((ARRAY(L-1).NE.192))GOTO 10524
            IF((ARRAY(L-2).EQ.192))GOTO 10524
            GOTO 10525
10525         L=L+(1)
              ARRAY(L)=ARRAY(K)
              ARRAY(L+1)=240
              ARRAY(L+2)=138
              ARRAY(L+3)=0
10524     CONTINUE
10523   CONTINUE
10517   J=1
        I=K+1
        CALL FILSET(ARRAY(K),ARRAY,I,SET,J,SIZE)
        IF((ARRAY(I).EQ.ARRAY(K)))GOTO 10527
          RETURN
10527   IF((ADDSET(0,SET,J,SIZE).NE.0))GOTO 10528
          RETURN
10528   CALL CTOC(SET,TSET,256)
        K=I
10512 ERRCO0=7
      LED$58=-2
      RETURN
      END
      INTEGER FUNCTION LED$60(LINE3)
      INTEGER LINE3
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K0,K1,K2,K3,K4,K5
      INTEGER LED$40,LED$61,LED$63
      LED$60=-3
      IF((LINE1.GT.0))GOTO 10529
        ERRCO0=12
        GOTO 10530
10529   IF(((LINE1.GT.LINE3).OR.(LINE3.GT.LINE2)))GOTO 10531
          ERRCO0=10
          GOTO 10532
10531     K0=LED$40(LED$63(LINE1))
          K3=LED$40(LED$61(LINE2))
          K1=LED$40(LINE1)
          K2=LED$40(LINE2)
          CALL LED$69(K0,K3,K0,K3)
          IF((LINE3.LE.LINE1))GOTO 10533
            CURLN=LINE3
            LINE3=LINE3-(LINE2-LINE1+1)
            GOTO 10534
10533       CURLN=LINE3+(LINE2-LINE1+1)
10534     K4=LED$40(LINE3)
          K5=LED$40(LED$61(LINE3))
          CALL LED$69(K4,K1,K2,K5)
          CALL LED$69(K2,K5,K4,K1)
          LED$60=-2
          UPDFLG=1
10532 CONTINUE
10530 RETURN
      END
      INTEGER FUNCTION LED$61(LINE)
      INTEGER LINE
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      LED$61=LINE+1
      IF((LED$61.LE.LASTLN))GOTO 10535
        LED$61=0
10535 RETURN
      END
      INTEGER FUNCTION LED$62(LIN,I)
      INTEGER LIN(102)
      INTEGER I
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER MAKPAT
      IF((LIN(I).EQ.0))GOTO 10537
      IF((LIN(I+1).EQ.0))GOTO 10537
      GOTO 10536
10537   I=-3
        GOTO 10538
10536   IF((LIN(I+1).NE.LIN(I)))GOTO 10539
          I=I+(1)
          GOTO 10540
10539     I=MAKPAT(LIN,I+1,LIN(I),PAT)
10540 CONTINUE
10538 IF((PAT(1).NE.0))GOTO 10541
        LED$62=-3
        ERRCO0=2
        GOTO 10542
10541   IF((I.NE.-3))GOTO 10543
          PAT(1)=0
          LED$62=-3
          ERRCO0=3
          GOTO 10544
10543     LED$62=-2
10544 CONTINUE
10542 RETURN
      END
      INTEGER FUNCTION LED$63(LINE)
      INTEGER LINE
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      LED$63=LINE-1
      IF((LED$63.GE.0))GOTO 10545
        LED$63=LASTLN
10545 RETURN
      END
      SUBROUTINE LED$64
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER AAAAM0
      AAAAM0=SAVER0
      GOTO 10546
10547   CALL REMARK('Line numbers in backward order.')
      GOTO 10548
10549   CALL REMARK('Can''t inject new line!.')
      GOTO 10548
10550   CALL REMARK('Bad syntax in pattern.')
      GOTO 10548
10551   CALL REMARK('Bad syntax in string parameter.')
      GOTO 10548
10552   CALL REMARK('Bad syntax in substitution string.')
      GOTO 10548
10553   CALL REMARK('Can''t open file to read.')
      GOTO 10548
10554   CALL REMARK('Can''t open file to write.')
      GOTO 10548
10555   CALL REMARK('There seems to be garbage after your command.')
      GOTO 10548
10556   CALL REMARK('Bad syntax in file name.')
      GOTO 10548
10557   CALL REMARK('You can''t append in a global operation.')
      GOTO 10548
10558   CALL REMARK('I''m sure you don''t want to move a group into itse
     *lf.')
      GOTO 10548
10559   CALL REMARK('I can''t find a line with that mark name.')
      GOTO 10548
10560   CALL REMARK('At end or beginning.')
      GOTO 10548
10561   CALL REMARK('Resulting line too long to handle.')
      GOTO 10548
10562   CALL REMARK('No match for pattern.')
      GOTO 10548
10563   CALL REMARK('No error to report.')
      GOTO 10548
10564   CALL REMARK('No lines have been deleted since last undelete.')
      GOTO 10548
10565   CALL REMARK('Expected ''<'', ''>'', or nothing after ''od''.')
      GOTO 10548
10566   CALL REMARK('Line number out of range (< 0 or > $).')
      GOTO 10548
10567   CALL REMARK('Can''t recognize option after ''o''.')
      GOTO 10548
10568   CALL REMARK('No line matching that pattern could be found.')
      GOTO 10548
10569   CALL REMARK('Changes have been made since last ''w'' command.')
      GOTO 10548
10570   CALL REMARK('No command recognized.')
      GOTO 10548
10571   CALL REMARK('The last in your list of line numbers is > $.')
      GOTO 10548
10572   CALL REMARK('You interrupted me.')
      GOTO 10548
10573   CALL REMARK('No saved pattern -- sorry.')
      GOTO 10548
10574   CALL REMARK('No saved character list -- sorry.')
      GOTO 10548
10575   CALL REMARK('No saved filename.')
      GOTO 10548
10576   CALL REMARK('Bad syntax in character list.')
      GOTO 10548
10577   CALL REMARK('No saved replacement --- sorry.')
      GOTO 10548
10578   CALL REMARK('Shell returned ERR.')
      GOTO 10548
10579   CALL REMARK('No saved shell command -- sorry.')
      GOTO 10548
10546 GOTO(10547,10573,10550,10551,10552,10553,10555,10556,10557,10558, 
     *    10559,10560,10561,10563,10564,10565,10566,10567,10568,10569,  
     *   10570,10572,10571,10554,10549,10562,10575,10576,10574,10577,   
     *  10578,10579),AAAAM0
        CALL REMARK('In printverboseerrormessage: can''t happen.')
10548 SAVER0=14
      RETURN
      END
      INTEGER FUNCTION LED$65(FROM,TO)
      INTEGER FROM,TO
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I,J
      INTEGER LED$40
      LOGICAL LED$53,BRKFL0
      IF((FROM.GT.0))GOTO 10580
        LED$65=-3
        ERRCO0=12
        GOTO 10581
10580   I=FROM
        GOTO 10584
10582   I=I+(1)
10584   IF((I.GT.TO))GOTO 10583
          IF((.NOT.LED$53(BRKFL0)))GOTO 10585
            LED$65=-3
            RETURN
10585     J=LED$40(I)
          CALL PUTCH(BUF(J+6),FDOUT0)
          CALL PUTCH(138,FDOUT0)
        GOTO 10582
10583   CURLN=TO
        LED$65=-2
10581 RETURN
      END
      INTEGER FUNCTION LED$66(WAY,NUM)
      INTEGER WAY,NUM
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K
      INTEGER MATCH,LED$40
      LOGICAL LED$53,BRKFL0
      NUM=CURLN
      K=LED$40(NUM)
10586   CALL LED$2(NUM,K,WAY)
        CALL LED$50(K)
        IF((MATCH(TXT,PAT).NE.1))GOTO 10587
          LED$66=-2
          RETURN
10587 CONTINUE
      IF((NUM.EQ.CURLN))GOTO 10588
      IF(LED$53(BRKFL0))GOTO 10588
      GOTO 10586
10588 CONTINUE
      LED$66=-3
      IF((ERRCO0.NE.7))GOTO 10589
        ERRCO0=19
10589 RETURN
      END
      SUBROUTINE LED$69(A,X,Y,B)
      INTEGER A,B,X,Y
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      BUF(X+0)=A
      BUF(Y+1)=B
      RETURN
      END
      SUBROUTINE LED$73(ACTION)
      INTEGER ACTION
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER JUNK
      INTEGER CREATE,REMOVE
      INTEGER FILEN0(18)
      DATA FILEN0/189,244,229,237,240,189,175,243,227,242,233,240,244,24
     *8,248,248,248,0/
      IF((ACTION.NE.1))GOTO 10590
        CALL DATE(4,FILEN0(14))
        SAFET0=CREATE(FILEN0,2)
        IF((SAFET0.NE.-3))GOTO 10591
          CALL ERROR('Cannot create safety logfile.')
10591   IF((SAVFIL(1).EQ.0))GOTO 10593
          CALL PUTCH(229,SAFET0)
          CALL PUTCH(160,SAFET0)
          CALL PUTLIN(SAVFIL,SAFET0)
          CALL PUTCH(138,SAFET0)
10592   GOTO 10593
10590   CALL CLOSE(SAFET0)
        JUNK=REMOVE(FILEN0)
10593 RETURN
      END
      SUBROUTINE LED$74(LIN,I)
      INTEGER LIN(1)
      INTEGER I
10594 IF((LIN(I).EQ.160))GOTO 10596
      IF((LIN(I).EQ.137))GOTO 10596
      GOTO 10595
10596   I=I+(1)
      GOTO 10594
10595 RETURN
      END
      INTEGER FUNCTION LED$75(SUB,GFLAG,GLOB)
      INTEGER SUB(256)
      INTEGER GFLAG,GLOB
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER NEW(102)
      INTEGER J,JUNK,K,LASTM,LINE,M,STATUS,SUBBED,INX,KNAME,TAGBEG(10),T
     *AGEND(10)
      INTEGER ADDSET,AMATCH,LED$49,LED$52,LED$40
      LOGICAL LED$53,BRKFL0
      IF((GLOBA0.NE.1))GOTO 10597
      IF((GLOB.NE.1))GOTO 10597
        LED$75=-2
        GOTO 10598
10597   LED$75=-3
10598 IF((LINE1.GT.0))GOTO 10599
        ERRCO0=12
        RETURN
10599 LINE=LINE1
      GOTO 10602
10600 LINE=LINE+(1)
10602 IF((LINE.GT.LINE2))GOTO 10601
        IF((.NOT.LED$53(BRKFL0)))GOTO 10603
          LED$75=-3
          RETURN
10603   J=1
        SUBBED=0
        INX=LED$49(LINE)
        LASTM=0
        K=1
        GOTO 10606
10604   CONTINUE
10606   IF((TXT(K).EQ.0))GOTO 10605
          DO 10607 M=2,10
            TAGBEG(M)=0
            TAGEND(M)=0
10607     CONTINUE
10608     IF((GFLAG.EQ.1))GOTO 10610
          IF((SUBBED.EQ.0))GOTO 10610
          GOTO 10609
10610       M=AMATCH(TXT,K,PAT,TAGBEG(2),TAGEND(2))
            GOTO 10611
10609       M=0
10611     IF((M.LE.0))GOTO 10612
          IF((LASTM.EQ.M))GOTO 10612
            TAGBEG(1)=K
            TAGEND(1)=M
            SUBBED=1
            CALL CATSUB(TXT,TAGBEG,TAGEND,SUB,NEW,J,102)
            LASTM=M
10612     IF((M.EQ.0))GOTO 10614
          IF((M.EQ.K))GOTO 10614
          GOTO 10613
10614       JUNK=ADDSET(TXT(K),NEW,J,102)
            K=K+(1)
            GOTO 10604
10613       K=M
10615   GOTO 10604
10605   IF((SUBBED.NE.1))GOTO 10616
          IF((ADDSET(0,NEW,J,102).NE.0))GOTO 10617
            LED$75=-3
            ERRCO0=13
            GOTO 10601
10617     KNAME=BUF(INX+6)
          CALL LED$24(LINE,LINE,STATUS)
          LED$75=LED$52(NEW)
          IF((LED$75.NE.-3))GOTO 10618
            GOTO 10601
10618     INX=LED$40(CURLN)
          BUF(INX+6)=KNAME
          LED$75=-2
          UPDFLG=1
          GOTO 10600
10616     ERRCO0=26
10619 GOTO 10600
10601 RETURN
      END
      SUBROUTINE LED$76(KNAME,STATUS)
      INTEGER KNAME,STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER K,LINE
      INTEGER LED$23
      IF((LED$23(CURLN,CURLN,STATUS).EQ.-2))GOTO 10620
        RETURN
10620 IF((LINE2.GT.0))GOTO 10621
        STATUS=-3
        ERRCO0=12
        RETURN
10621 STATUS=-2
      LINE=0
      K=LINE0
10622   LINE=LINE+(1)
        K=BUF(K+1)
        IF((LINE.NE.LINE2))GOTO 10623
          BUF(K+6)=KNAME
          GOTO 10624
10623     IF((BUF(K+6).NE.KNAME))GOTO 10625
            BUF(K+6)=160
10625   CONTINUE
10624 CONTINUE
      IF((LINE.LT.LASTLN))GOTO 10622
      RETURN
      END
      INTEGER FUNCTION LED$81(ARRAY,C,ALLBUT,LASTTO)
      INTEGER ARRAY(1),C
      INTEGER ALLBUT,LASTTO
      INTEGER INDEX
      IF((C.NE.0))GOTO 10626
        LED$81=0
        GOTO 10627
10626   IF((ALLBUT.NE.0))GOTO 10628
          LED$81=INDEX(ARRAY,C)
          GOTO 10629
10628     IF((INDEX(ARRAY,C).LE.0))GOTO 10630
            LED$81=0
            GOTO 10631
10630       LED$81=LASTTO+1
10631   CONTINUE
10629 CONTINUE
10627 RETURN
      END
      SUBROUTINE LED$50(K)
      INTEGER K
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER J
      CALL LED$71(BUF(K+3))
      CALL LED$68(TXT,BUF(K+5))
      J=BUF(K+5)+1
      IF((J.LE.1))GOTO 10632
        TXT(J-1)=138
10632 TXT(J)=0
      RETURN
      END
      INTEGER FUNCTION LED$52(LIN)
      INTEGER LIN(102)
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I,K1,K2,K3
      INTEGER LED$40,LED$57,LED$61
      I=1
      GOTO 10635
10633 CONTINUE
10635 IF((LIN(I).EQ.0))GOTO 10634
        I=LED$57(LIN,I,K3)
        IF((I.NE.-3))GOTO 10636
          LED$52=-3
          ERRCO0=25
          GOTO 10634
10636   K1=LED$40(CURLN)
        K2=LED$40(LED$61(CURLN))
        CALL LED$69(K1,K3,K3,K2)
        CALL LED$69(K3,K2,K1,K3)
        CURLN=CURLN+(1)
        LASTLN=LASTLN+(1)
        LED$52=-2
      GOTO 10633
10634 RETURN
      END
      SUBROUTINE LED$67(BUFFER,COUNT,FD)
      INTEGER BUFFER(1),COUNT,FD
      INTEGER JUNK,CODE
      INTEGER MAPFD
      CALL PRWF$$(:1,MAPFD(FD),LOC(BUFFER),COUNT,INTL(0),JUNK,CODE)
      IF((CODE.NE.0))GOTO 10637
        RETURN
10637 CALL ERRPR$(0,CODE,'fatal scratch file error',24,'readf',5)
      END
      SUBROUTINE LED$79(BUFFER,COUNT,FD)
      INTEGER BUFFER(1),COUNT,FD
      INTEGER JUNK,CODE
      INTEGER MAPFD
      CALL PRWF$$(:2,MAPFD(FD),LOC(BUFFER),COUNT,INTL(0),JUNK,CODE)
      IF((CODE.NE.0))GOTO 10638
        RETURN
10638 CALL ERRPR$(0,CODE,'fatal scratch file error',24,'writef',6)
      END
      SUBROUTINE LED$70(OFFSET,FD)
      INTEGER OFFSET(2),FD
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER JUNK,CODE
      INTEGER MAPFD
      INTEGER * 4 POS
      POS=INTL(OFFSET(1))*INTL(880)+INTL(OFFSET(2))
      CALL PRWF$$(:3+:10,MAPFD(FD),LOC(0),0,POS,JUNK,CODE)
      IF((CODE.NE.0))GOTO 10639
        RETURN
10639 CALL ERRPR$(0,CODE,'fatal scratch file error',24,'seek',4)
      END
      INTEGER FUNCTION LED$57(LIN,I,NEWIND)
      INTEGER LIN(102)
      INTEGER I,NEWIND
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER J,K,JUNK,TXTEND
      INTEGER ADDSET,LENGTH,LED$59
      LED$57=-3
      IF((FREE.NE.-1))GOTO 10640
        NEWIND=LASTBF
10641   IF((LASTBF+7.LE.FENCE))GOTO 10642
          IF((LED$59(JUNK).NE.-3))GOTO 10641
            RETURN
10642   LASTBF=LASTBF+7
        GOTO 10644
10640   NEWIND=FREE
        FREE=BUF(FREE+0)
10644 TXTEND=1
      J=I
      GOTO 10647
10645 CONTINUE
10647 IF((LIN(J).EQ.0))GOTO 10646
        JUNK=ADDSET(LIN(J),TXT,TXTEND,102)
        J=J+(1)
        IF((LIN(J-1).NE.138))GOTO 10645
          GOTO 10646
10646 IF((ADDSET(0,TXT,TXTEND,102).NE.0))GOTO 10649
        RETURN
10649 CALL LED$71(SCREND)
      BUF(NEWIND+3)=SCREND(1)
      BUF(NEWIND+4)=SCREND(2)
      K=LENGTH(TXT)
      BUF(NEWIND+5)=K
      CALL LED$80(TXT,K)
      SCREND(2)=SCREND(2)+(K)
10650 IF((SCREND(2).LT.880))GOTO 10651
        SCREND(2)=SCREND(2)-(880)
        SCREND(1)=SCREND(1)+(1)
      GOTO 10650
10651 BUF(NEWIND+2)=0
      BUF(NEWIND+6)=160
      UPDFLG=1
      LED$57=J
      RETURN
      END
      SUBROUTINE LED$72
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER I,K,JUNK
      INTEGER CREATE,LED$57
      INTEGER NULL(1)
      INTEGER STEMP(14)
      DATA NULL/0/
      DATA STEMP/189,244,229,237,240,189,175,229,228,248,248,248,248,0/
      CALL SCOPY(STEMP,1,SCRFIL,1)
      CALL DATE(4,SCRFIL(10))
      SCR=CREATE(SCRFIL,3+:2000)
      IF((SCR.NE.-3))GOTO 10652
        CALL ERROR('Can''t open scratch file.')
10652 SCREND(1)=0
      SCREND(2)=0
      TRUEND=0
      I=32760+1-(880+3)
      GOTO 10655
10653 I=I-((880+3))
10655 IF((I.LE.1000))GOTO 10654
        BUF(I+0)=-2
        BUF(I+2)=1
        FENCE=I
      GOTO 10653
10654 CURBUF=FENCE
      ROBIN=FENCE
      LINE0=1
      LASTBF=LINE0
      FREE=-1
      LIMBO=-1
      LIMCNT=0
      JUNK=LED$57(NULL,1,K)
      CALL LED$69(K,K,K,K)
      BUF(K+6)=0
      CURLN=0
      LASTLN=0
      RETURN
      END
      SUBROUTINE LED$11
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      CALL CLOSE(SCR)
      CALL REMOVE(SCRFIL)
      RETURN
      END
      SUBROUTINE LED$51
      RETURN
      END
      SUBROUTINE LED$71(ADDR)
      INTEGER ADDR(2)
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      VADDR(1)=ADDR(1)
      VADDR(2)=ADDR(2)
      RETURN
      END
      INTEGER FUNCTION LED$59(STATUS)
      INTEGER STATUS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER B
      IF((TUNE.LE.0))GOTO 10656
        CALL REMARK('(mkroom).')
10656 B=FENCE
      IF((FENCE+(880+3).LE.32760))GOTO 10657
        STATUS=-3
        GOTO 10658
10657   IF((CURBUF.NE.FENCE))GOTO 10659
          CURBUF=32760+1-(880+3)
10659   IF((BUF(FENCE+0).GT.TRUEND))GOTO 10660
        IF((BUF(FENCE+2).NE.0))GOTO 10660
          CALL LED$78(FENCE)
10660   FENCE=FENCE+((880+3))
        IF((BUF(B+2).NE.0))GOTO 10661
          VADDR(2)=0
          VADDR(1)=BUF(B+0)
          CALL LED$80(BUF(B+3),880)
          IF((TUNE.LE.0))GOTO 10662
            CALL REMARK('(shuffle).')
10662   CONTINUE
10661   STATUS=-2
10658 LED$59=STATUS
      RETURN
      END
      SUBROUTINE LED$78(B)
      INTEGER B
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER IX,ADDR(2)
      ADDR(1)=BUF(B+0)
      ADDR(2)=0
      CALL LED$70(ADDR,SCR)
      IX=B+3
      CALL LED$79(BUF(IX),880,SCR)
      IF((ADDR(1).NE.TRUEND))GOTO 10663
        TRUEND=ADDR(1)+1
        GOTO 10664
10663   IF((ADDR(1).LE.TRUEND))GOTO 10665
          CALL ERROR('in wout: can''t happen.')
10665 CONTINUE
10664 BUF(B+2)=1
      RETURN
      END
      SUBROUTINE LED$80(UBUF,NWORDS)
      INTEGER UBUF(1),NWORDS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER P,T,TGT
      CALL LED$38(TGT)
      P=1
      GOTO 10668
10666 P=P+(1)
10668 IF((P.GT.NWORDS))GOTO 10667
        T=VADDR(2)+TGT
        BUF(T)=UBUF(P)
        VADDR(2)=VADDR(2)+(1)
        IF((VADDR(2).LT.880))GOTO 10666
          BUF(CURBUF+2)=0
          VADDR(2)=0
          VADDR(1)=VADDR(1)+(1)
          CALL LED$38(TGT)
10669 GOTO 10666
10667 BUF(CURBUF+2)=0
      RETURN
      END
      SUBROUTINE LED$68(UBUF,NWORDS)
      INTEGER UBUF(1),NWORDS
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER P,T,TGT
      CALL LED$38(TGT)
      P=1
      GOTO 10672
10670 P=P+(1)
10672 IF((P.GT.NWORDS))GOTO 10671
        T=VADDR(2)+TGT
        UBUF(P)=BUF(T)
        VADDR(2)=VADDR(2)+(1)
        IF((VADDR(2).LT.880))GOTO 10670
          VADDR(2)=0
          VADDR(1)=VADDR(1)+(1)
          CALL LED$38(TGT)
10673 GOTO 10670
10671 RETURN
      END
      SUBROUTINE LED$38(TGT)
      INTEGER TGT
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      INTEGER B,ADDR(2),A,LASTA
      DATA LASTA/0/
      B=CURBUF
      A=VADDR(1)
      IF((BUF(B+0).NE.A))GOTO 10674
      IF((B.LT.FENCE))GOTO 10674
        TGT=B+3
        RETURN
10674 B=FENCE
      GOTO 10677
10675 B=B+((880+3))
10677 IF((B.GE.32760))GOTO 10676
        IF((BUF(B+0).NE.A))GOTO 10675
          GOTO 10676
10676 IF((B.LE.32760))GOTO 10679
        CALL LED$22(B)
        IF((BUF(B+0).LE.A))GOTO 10682
        IF((A.LE.LASTA))GOTO 10682
        GOTO 10681
10682   IF((BUF(B+0).GE.A))GOTO 10680
        IF((A.GE.LASTA))GOTO 10680
        GOTO 10681
10681     CALL LED$22(B)
10680   LASTA=A
        IF((BUF(B+2).NE.0))GOTO 10684
          CALL LED$78(B)
10684   BUF(B+0)=A
        IF((BUF(B+0).GE.TRUEND))GOTO 10685
          ADDR(1)=BUF(B+0)
          ADDR(2)=0
          CALL LED$70(ADDR,SCR)
          CALL LED$67(BUF(B+3),880,SCR)
10685 CONTINUE
10679 TGT=B+3
      CURBUF=B
      RETURN
      END
      SUBROUTINE LED$22(B)
      INTEGER B
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
10686   IF((ROBIN.LT.32760+1-(880+3)))GOTO 10687
          ROBIN=FENCE
          GOTO 10688
10687     ROBIN=ROBIN+(880+3)
10688 CONTINUE
      IF((BUF(ROBIN+0).LE.TRUEND))GOTO 10689
      IF((BUF(ROBIN+2).EQ.1))GOTO 10689
      GOTO 10686
10689 CONTINUE
      B=ROBIN
      RETURN
      END
      LOGICAL FUNCTION LED$53(ARG)
      LOGICAL ARG
      COMMON /LED$10/LINE1,LINE2,NLINES,CURLN,LASTLN
      INTEGER LINE1
      INTEGER LINE2
      INTEGER NLINES
      INTEGER CURLN
      INTEGER LASTLN
      COMMON /LED$16/PAT(256),TLPAT(256),SUBS(256),TSET(256)
      INTEGER PAT
      INTEGER TLPAT
      INTEGER SUBS
      INTEGER TSET
      COMMON /LED$18/TXT(102)
      INTEGER TXT
      COMMON /LED$5/SAVFIL(102),FDINA0,FDOUT0
      INTEGER SAVFIL
      INTEGER FDINA0
      INTEGER FDOUT0
      COMMON /LED$4/BUF(32760),LASTBF,FENCE,FREE,LINE0,ROBIN
      INTEGER BUF
      INTEGER LASTBF
      INTEGER FENCE
      INTEGER LINE0
      INTEGER FREE
      INTEGER ROBIN
      COMMON /LED$19/LIMBO,LIMCNT
      INTEGER LIMBO
      INTEGER LIMCNT
      COMMON /LED$17/SCR,SCREND(2),SCRFIL(20)
      INTEGER SCR
      INTEGER SCREND
      INTEGER SCRFIL
      COMMON /LED$13/UPDFLG,ERRCO0,SAVER0,PROBA0,SAFET0
      INTEGER UPDFLG
      INTEGER ERRCO0
      INTEGER SAVER0
      INTEGER PROBA0
      INTEGER SAFET0
      COMMON /LED$12/SAVKNM
      INTEGER SAVKNM
      COMMON /LED$14/PROMPT(102),DDIR,NLDEF(102),TUNE,GLOBA0
      INTEGER PROMPT
      INTEGER DDIR
      INTEGER NLDEF
      INTEGER TUNE
      INTEGER GLOBA0
      COMMON /LED$20/VADDR(2),TRUEND,CURBUF
      INTEGER VADDR
      INTEGER TRUEND
      INTEGER CURBUF
      LOGICAL TQUIT$
      LED$53=TQUIT$(ARG)
      IF((.NOT.LED$53))GOTO 10690
        ERRCO0=22
        CALL WIND(FDINA0)
10690 RETURN
      END
C ---- Long Name Map ----
C safetylogfile                  safet0
C errcode                        errco0
C globals                        globa0
C unknown                        unkno0
C led$10                         led$10
C led$20                         led$20
C led$30                         led$30
C newfile                        newfi0
C filename                       filen0
C led$40                         led$40
C led$50                         led$50
C interactive                    inter0
C led$60                         led$60
C led$70                         led$70
C led$80                         led$80
C expanded                       expan0
C probation                      proba0
C usemark                        usema0
C newcommand                     newco0
C argzero                        argze0
C missingdelim                   missi0
C saverrcode                     saver0
C lastsub                        lasts0
C brkflag                        brkfl0
C Fdout                          fdout0
C Fdin                           fdina0
C returncode                     retur0
