      SUBROUTINE MAIN
      INTEGER I, GETARG, VERBOS, ISATTY, GETLIN, NARG
      LOGICAL*1 BUF(512), CLOWER
      CALL QUERY(26Husage:  rm [-v] [file] ...)
      VERBOS = 0
      I=1
23000 IF (.NOT.(GETARG(I,BUF,40) .NE. -1))GOTO 23002
      IF (.NOT.(BUF(1) .EQ. 45 .AND. CLOWER(BUF(2)) .EQ. 118))GOTO 23003
      VERBOS = 1
23003 CONTINUE
23001 I=I+1
      GOTO 23000
23002 CONTINUE
      IF (.NOT.(VERBOS .EQ. 1))GOTO 23005
      NARG = I - 2
      GOTO 23006
23005 CONTINUE
      NARG = I - 1
23006 CONTINUE
      IF (.NOT.(NARG .GT. 0))GOTO 23007
      I=1
23009 IF (.NOT.(GETARG(I, BUF, 40) .NE. -1))GOTO 23011
      IF (.NOT.(BUF(1) .NE. 45))GOTO 23012
      CALL RMFILE(BUF, VERBOS)
23012 CONTINUE
23010 I=I+1
      GOTO 23009
23011 CONTINUE
      GOTO 23008
23007 CONTINUE
      IF (.NOT.(ISATTY(1) .EQ. 0))GOTO 23014
      I=GETLIN(BUF, 1)
23016 IF (.NOT.(I .NE. -1))GOTO 23018
      BUF(I) = 0
      CALL RMFILE(BUF, VERBOS)
23017 I=GETLIN(BUF, 1)
      GOTO 23016
23018 CONTINUE
23014 CONTINUE
23008 CONTINUE
      RETURN
      END
      SUBROUTINE RMFILE(FILE, VERBOS)
      LOGICAL*1 FILE(40)
      INTEGER VERBOS
      IF (.NOT.(VERBOS .EQ. 1))GOTO 23019
      CALL REMARK(FILE)
23019 CONTINUE
      CALL REMOVE(FILE)
      RETURN
      END
