      SUBROUTINE MAIN
      LOGICAL*1 BUF(402)
      INTEGER GETARG, OPEN
      INTEGER I
      LOGICAL*1 ST001Z(26)
      DATA ST001Z(1)/117/,ST001Z(2)/115/,ST001Z(3)/97/,ST001Z(4)/103/,ST
     *001Z(5)/101/,ST001Z(6)/58/,ST001Z(7)/32/,ST001Z(8)/32/,ST001Z(9)/9
     *9/,ST001Z(10)/112/,ST001Z(11)/114/,ST001Z(12)/101/,ST001Z(13)/115/
     *,ST001Z(14)/115/,ST001Z(15)/32/,ST001Z(16)/91/,ST001Z(17)/102/,ST0
     *01Z(18)/105/,ST001Z(19)/108/,ST001Z(20)/101/,ST001Z(21)/93/,ST001Z
     *(22)/32/,ST001Z(23)/46/,ST001Z(24)/46/,ST001Z(25)/46/,ST001Z(26)/0
     */
      CALL QUERY(ST001Z)
      I=1
23000 CONTINUE
      IF (.NOT.(GETARG(I,BUF,402) .EQ. -1))GOTO 23003
      IF (.NOT.(I .NE. 1))GOTO 23005
      GOTO 23002
23005 CONTINUE
      INT = 1
      GOTO 23004
23003 CONTINUE
      IF (.NOT.(BUF(1) .EQ. 45 .AND. BUF(2) .EQ. 0))GOTO 23007
      INT = 1
      GOTO 23008
23007 CONTINUE
      INT = OPEN(BUF,1)
      IF (.NOT.(INT .EQ. -3))GOTO 23009
      CALL CANT(BUF)
23009 CONTINUE
23008 CONTINUE
23004 CONTINUE
      CALL PRESS (INT)
      IF (.NOT.(INT .NE. 1))GOTO 23011
      CALL CLOSE(INT)
23011 CONTINUE
23001 I=I+1
      GOTO 23000
23002 CONTINUE
      RETURN
      END
      SUBROUTINE PRESS (INT)
      LOGICAL*1 GETCH
      LOGICAL*1 BUF(92), C, LASTC
      INTEGER INT, NREP, NSAVE
      NSAVE = 0
      LASTC=GETCH(LASTC,INT)
23013 IF (.NOT.(LASTC .NE. -1))GOTO 23015
      NREP=1
23016 IF (.NOT.(GETCH(C,INT) .EQ. LASTC))GOTO 23018
      IF (.NOT.(NREP .GE. 92))GOTO 23019
      GOTO 23018
23019 CONTINUE
23017 NREP = NREP + 1
      GOTO 23016
23018 CONTINUE
      IF (.NOT.(NREP .LT. 4))GOTO 23021
23023 IF (.NOT.(NREP .GT. 0))GOTO 23025
      NSAVE = NSAVE + 1
      BUF(NSAVE) = LASTC
      IF (.NOT.(NSAVE .GE. 92))GOTO 23026
      CALL PUTBUF(BUF, NSAVE)
23026 CONTINUE
23024 NREP = NREP - 1
      GOTO 23023
23025 CONTINUE
      GOTO 23022
23021 CONTINUE
      CALL PUTBUF(BUF, NSAVE)
      CALL PUTCH(125,2)
      CALL PUTCH(LASTC,2)
      CALL PUTCNT(NREP)
23022 CONTINUE
23014 LASTC = C
      GOTO 23013
23015 CONTINUE
      CALL PUTBUF(BUF, NSAVE)
      RETURN
      END
      SUBROUTINE PUTBUF(BUF, NSAVE)
      LOGICAL*1 BUF(92)
      INTEGER I, NSAVE
      IF (.NOT.(NSAVE .GT. 0))GOTO 23028
      CALL PUTCNT(NSAVE)
      I=1
23030 IF (.NOT.(I.LE.NSAVE))GOTO 23032
      CALL PUTCH(BUF(I),2)
23031 I=I+1
      GOTO 23030
23032 CONTINUE
23028 CONTINUE
      NSAVE = 0
      RETURN
      END
      SUBROUTINE PUTCNT(INT)
      INTEGER INT
      LOGICAL*1 C
      C = INT + 32
      CALL PUTCH(C,2)
      RETURN
      END
