      SUBROUTINE MAIN
      LOGICAL*1 BUF(512)
      INTEGER GETARG, OPEN
      INTEGER I
      CALL QUERY( 21Husage:  ul [file] ... )
      I = 1 
23000 CONTINUE
      IF (.NOT.( GETARG( I, BUF, 512) .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 OVERS(INT)
      IF (.NOT.( INT .NE. 1 ))GOTO 23011
      CALL CLOSE(INT)
23011 CONTINUE
23001 I = I + 1 
      GOTO 23000
23002 CONTINUE
      RETURN
      END
      SUBROUTINE OVERS(FD)
      LOGICAL*1 GETCH
      LOGICAL*1 C, LIN1(512), LIN2(512)
      INTEGER FD
      INTEGER INDEXC
      INTEGER BSPCNT, COL, I
      LIN1(1) = 0
      LIN2(1) = 0
      COL = 1
      BSPCNT = 0
      C = GETCH( C, FD) 
23013 IF (.NOT.(C .NE. -1 ))GOTO 23015
      IF (.NOT.( C .EQ. 10 ))GOTO 23016
      I = 1 
23018 IF (.NOT.(LIN1(I) .NE. 0 ))GOTO 23020
      IF (.NOT.( LIN1(I) .EQ. 95 ))GOTO 23021
      LIN1(I) = LIN2(I)
      LIN2(I) = 95
23021 CONTINUE
23019 I = I + 1 
      GOTO 23018
23020 CONTINUE
      CALL PUTLIN( LIN1, 2)
      IF (.NOT.( INDEXC( LIN2, 95) .NE. 0 ))GOTO 23023
      CALL PUTCH(13,2)
      CALL PUTLIN( LIN2, 2)
23023 CONTINUE
      CALL PUTCH(10,2)
      COL = 1
      BSPCNT = 0
      LIN1(1) = 0
      LIN2(1) = 0
      GOTO 23017
23016 CONTINUE
      IF (.NOT.( C .EQ. 8 ))GOTO 23025
      BSPCNT = BSPCNT + 1
      GOTO 23026
23025 CONTINUE
      IF (.NOT.( BSPCNT .GT. 0 ))GOTO 23027
      LIN2( COL - BSPCNT ) = C
      BSPCNT = BSPCNT - 1
      GOTO 23028
23027 CONTINUE
      CALL INSCHR( 32, LIN2, COL)
      CALL INSCHR( C, LIN1, COL)
      COL = COL + 1
23028 CONTINUE
23026 CONTINUE
23017 CONTINUE
23014 C = GETCH( C, FD) 
      GOTO 23013
23015 CONTINUE
      RETURN
      END
      SUBROUTINE INSCHR( C, STR, J)
      LOGICAL*1 C
      LOGICAL*1 STR(512)
      LOGICAL*1 BUF(512)
      INTEGER I, J
      BUF(1) = 0
      CALL SCOPY( STR, J, BUF, 1)
      CALL SCOPY( BUF, 1, STR, J + 1 )
      STR(J) = C
      RETURN
      END
