      SUBROUTINE MAIN
      INTEGER*4 OLDADR, ADDR
      INTEGER N, STATUS, I, JUNK
      INTEGER GETLIN, GETWRD, DOLINE, PTREQ, NOTE
      LOGICAL*1 OLDWRD(402), BUF(402), WORD(402)
      INTEGER DIF
      INTEGER WIDTH
      INTEGER JUSTFY
      LOGICAL*1 ST001Z(45)
      COMMON / CISAM / DIF, WIDTH, JUSTFY
      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)/1
     *05/,ST001Z(10)/115/,ST001Z(11)/97/,ST001Z(12)/109/,ST001Z(13)/32/,
     *ST001Z(14)/91/,ST001Z(15)/45/,ST001Z(16)/100/,ST001Z(17)/60/,ST001
     *Z(18)/100/,ST001Z(19)/105/,ST001Z(20)/102/,ST001Z(21)/62/,ST001Z(2
     *2)/93/,ST001Z(23)/32/,ST001Z(24)/91/,ST001Z(25)/45/,ST001Z(26)/119
     */,ST001Z(27)/60/,ST001Z(28)/119/,ST001Z(29)/105/,ST001Z(30)/100/,S
     *T001Z(31)/116/,ST001Z(32)/104/,ST001Z(33)/62/,ST001Z(34)/93/,ST001
     *Z(35)/32/,ST001Z(36)/91/,ST001Z(37)/45/,ST001Z(38)/106/,ST001Z(39)
     */60/,ST001Z(40)/108/,ST001Z(41)/47/,ST001Z(42)/114/,ST001Z(43)/62/
     *,ST001Z(44)/93/,ST001Z(45)/0/
      CALL QUERY(ST001Z)
      CALL GETCMD
      OLDWRD(1) = 0
      CALL PTRCPY(0, OLDADR)
      N = 0
23000 CONTINUE
      JUNK = NOTE(ADDR, 1)
      STATUS = GETLIN(BUF, 1)
      IF (.NOT.(STATUS .NE. -1))GOTO 23003
      N = N + 1
      I = 1
      JUNK = GETWRD(BUF, I, WORD)
      IF (.NOT.(DOLINE(N) .EQ. 1))GOTO 23005
      CALL OUTLIN(WORD, ADDR)
23005 CONTINUE
      CALL STRCPY(WORD, OLDWRD)
      CALL PTRCPY(ADDR, OLDADR)
23003 CONTINUE
23001 IF (.NOT.(STATUS .EQ. -1))GOTO 23000
23002 CONTINUE
      IF (.NOT.(DOLINE(N) .EQ. 0 .AND. PTREQ(OLDADR, 0) .EQ. 0))GOTO 230
     *07
      CALL OUTLIN(OLDWRD, OLDADR)
23007 CONTINUE
      RETURN
      END
      INTEGER FUNCTION DOLINE(N)
      INTEGER N
      INTEGER DIF
      INTEGER WIDTH
      INTEGER JUSTFY
      COMMON / CISAM / DIF, WIDTH, JUSTFY
      IF (.NOT.(DIF .EQ. 1))GOTO 23009
      DOLINE=(1)
      RETURN
23009 CONTINUE
      IF (.NOT.(MOD(N, DIF) .EQ. 1))GOTO 23011
      DOLINE=(1)
      RETURN
23011 CONTINUE
      DOLINE=(0)
      RETURN
23012 CONTINUE
23010 CONTINUE
      END
      SUBROUTINE GETCMD
      LOGICAL*1 ARG(36)
      INTEGER GETARG, CTOI
      INTEGER I, J
      INTEGER DIF
      INTEGER WIDTH
      INTEGER JUSTFY
      COMMON / CISAM / DIF, WIDTH, JUSTFY
      DIF = 1
      WIDTH = 25
      JUSTFY = 0
      I=1
23013 IF (.NOT.(GETARG(I, ARG, 36) .NE. -1))GOTO 23015
      CALL FOLD(ARG)
      IF (.NOT.(ARG(1) .EQ. 45))GOTO 23016
      IF (.NOT.(ARG(2) .EQ. 100))GOTO 23018
      J = 3
      DIF = CTOI(ARG, J)
      IF (.NOT.(DIF .LE. 0))GOTO 23020
      DIF = 1
23020 CONTINUE
      GOTO 23019
23018 CONTINUE
      IF (.NOT.(ARG(2) .EQ. 119))GOTO 23022
      J = 3
      WIDTH = CTOI(ARG, J)
      IF (.NOT.(WIDTH .LE. 0))GOTO 23024
      WIDTH = 25
23024 CONTINUE
      GOTO 23023
23022 CONTINUE
      IF (.NOT.(ARG(2) .EQ. 106))GOTO 23026
      IF (.NOT.(ARG(3) .EQ. 108))GOTO 23028
      JUSTFY = 0
      GOTO 23029
23028 CONTINUE
      IF (.NOT.(ARG(3) .EQ. 114))GOTO 23030
      JUSTFY = 1
23030 CONTINUE
23029 CONTINUE
      GOTO 23027
23026 CONTINUE
      CALL BADARG(ARG)
23027 CONTINUE
23023 CONTINUE
23019 CONTINUE
      GOTO 23017
23016 CONTINUE
      CALL BADARG(ARG)
23017 CONTINUE
23014 I=I+1
      GOTO 23013
23015 CONTINUE
      RETURN
      END
      SUBROUTINE OUTLIN(WORD, ADDR)
      LOGICAL*1 WORD(100)
      INTEGER*4 ADDR
      INTEGER DIF
      INTEGER WIDTH
      INTEGER JUSTFY
      COMMON / CISAM / DIF, WIDTH, JUSTFY
      IF (.NOT.(JUSTFY .EQ. 1))GOTO 23032
      CALL PUTSTR(WORD, WIDTH, 2)
      GOTO 23033
23032 CONTINUE
      CALL PUTSTR(WORD, -WIDTH, 2)
23033 CONTINUE
      CALL PUTCH(32,2)
      CALL PUTPTR(ADDR, 2)
      CALL PUTCH(10,2)
      RETURN
      END
