      SUBROUTINE MAIN
      LOGICAL*1 C, ARGBUF(128)
      LOGICAL*1 CLOWER
      INTEGER FD
      INTEGER OPEN
      INTEGER ARGNO, I
      INTEGER CTOI, GETARG, GETLIN
      INTEGER INCREM
      INTEGER PREPND
      COMMON /CNUM/ LINNUM, NUMDIG, ZFILL, LIN(512)
      INTEGER LINNUM
      INTEGER NUMDIG
      INTEGER ZFILL
      LOGICAL*1 LIN
      COMMON /CPOST/ NUMCOL, TABSPC
      INTEGER NUMCOL
      INTEGER TABSPC
      LINNUM = 1
      INCREM = 1
      NUMDIG = 7
      PREPND = 1
      ZFILL = 0
      NUMCOL = 73
      TABSPC = 8
      CALL QUERY( 61Husage:  number [-f] [-z] [-i<n>] [-s<n>] [-d<n>] [-
     *] file ...)
      ARGNO = 1 
23000 IF (.NOT.(GETARG( ARGNO, ARGBUF, 128) .NE. -1 ))GOTO 23002
      IF (.NOT.( ARGBUF(1) .EQ. 45 ))GOTO 23003
      IF (.NOT.( ARGBUF(2) .EQ. 0 ))GOTO 23005
      FD = 1
      GOTO 23006
23005 CONTINUE
      C = CLOWER(ARGBUF(2))
      I = 3
      IF (.NOT.( C .EQ. 102 ))GOTO 23007
      PREPND = 0
      NUMDIG = 8
23007 CONTINUE
      IF (.NOT.( C .EQ. 122 ))GOTO 23009
      ZFILL = 1
23009 CONTINUE
      IF (.NOT.( C .EQ. 105 ))GOTO 23011
      INCREM = CTOI( ARGBUF, I)
23011 CONTINUE
      IF (.NOT.( C .EQ. 115 ))GOTO 23013
      LINNUM = CTOI( ARGBUF, I)
23013 CONTINUE
      IF (.NOT.( C .EQ. 100 ))GOTO 23015
      NUMDIG = CTOI( ARGBUF, I)
23015 CONTINUE
      CALL DELARG(ARGNO)
      ARGNO = ARGNO - 1
      GOTO 23001
23006 CONTINUE
      GOTO 23004
23003 CONTINUE
      FD = OPEN( ARGBUF, 1)
      IF (.NOT.( FD .EQ. -3 ))GOTO 23017
      CALL CANT(ARGBUF)
23017 CONTINUE
23004 CONTINUE
23019 IF (.NOT.(GETLIN(LIN, FD) .NE. -1 ))GOTO 23021
      IF (.NOT.( PREPND .EQ. 1 ))GOTO 23022
      CALL PRE
      GOTO 23023
23022 CONTINUE
      CALL POST
23023 CONTINUE
23020 LINNUM = LINNUM + INCREM 
      GOTO 23019
23021 CONTINUE
      CALL CLOSE(FD)
23001 ARGNO = ARGNO + 1 
      GOTO 23000
23002 CONTINUE
      RETURN
      END
      SUBROUTINE PRE
      COMMON /CNUM/ LINNUM, NUMDIG, ZFILL, LIN(512)
      INTEGER LINNUM
      INTEGER NUMDIG
      INTEGER ZFILL
      LOGICAL*1 LIN
      LOGICAL*1 NUM(20)
      INTEGER JUNK
      INTEGER GITOCF
      IF (.NOT.( ZFILL .EQ. 1 ))GOTO 23024
      JUNK = GITOCF( LINNUM, NUM, 20, 10, NUMDIG, 48)
      CALL PUTLIN( NUM, 2)
      GOTO 23025
23024 CONTINUE
      CALL PUTINT( LINNUM, NUMDIG,2)
23025 CONTINUE
      CALL PUTCH(32,2)
      CALL PUTLIN( LIN, 2)
      RETURN
      END
      SUBROUTINE POST
      COMMON /CNUM/ LINNUM, NUMDIG, ZFILL, LIN(512)
      INTEGER LINNUM
      INTEGER NUMDIG
      INTEGER ZFILL
      LOGICAL*1 LIN
      COMMON /CPOST/ NUMCOL, TABSPC
      INTEGER NUMCOL
      INTEGER TABSPC
      LOGICAL*1 NUM(20)
      INTEGER LENGTH, MOD, GITOCF
      INTEGER JUNK
      LOGICAL*1 C
      INTEGER IINDEX
      INTEGER LINLEN
      INTEGER OINDEX
      LINLEN = LENGTH(LIN)
      IF (.NOT.( LIN(LINLEN) .EQ. 10 ))GOTO 23026
      LIN(LINLEN) = 0
23026 CONTINUE
      OINDEX = 1
      IINDEX = 1 
23028 IF (.NOT.(LIN(IINDEX) .NE. 0 ))GOTO 23030
      C = LIN(IINDEX)
      OINDEX = OINDEX + 1
      IF (.NOT.( C .NE. 9 ))GOTO 23031
      CALL PUTCH(C,2)
      GOTO 23032
23031 CONTINUE
      CALL PUTCH(32,2)
23033 IF (.NOT.(MOD(OINDEX, TABSPC) .NE. 1 ))GOTO 23035
      CALL PUTCH(32,2)
23034 OINDEX = OINDEX + 1 
      GOTO 23033
23035 CONTINUE
23032 CONTINUE
23029 IINDEX = IINDEX + 1 
      GOTO 23028
23030 CONTINUE
23036 IF (.NOT.(OINDEX .LT. NUMCOL ))GOTO 23038
      CALL PUTCH(32,2)
23037 OINDEX = OINDEX + 1 
      GOTO 23036
23038 CONTINUE
      IF (.NOT.( ZFILL .EQ. 1 ))GOTO 23039
      JUNK = GITOCF( LINNUM, NUM, 20, 10, NUMDIG, 48)
      CALL PUTLIN( NUM, 2)
      GOTO 23040
23039 CONTINUE
      CALL PUTINT( LINNUM, NUMDIG,2)
23040 CONTINUE
      CALL PUTCH(10,2)
      RETURN
      END
