      SUBROUTINE MAIN
      LOGICAL*1 FIL(36), LIN(402)
      INTEGER NXTFIL
      INTEGER BEGBLK, GETARG, GETLIN, STMODE, NOTE
      INTEGER I, MARKER(2), MAXLEN, MAXLVL, NDX, OMODE, JUNK
      INTEGER IFD
      INTEGER OFD
      LOGICAL*1 ST001Z(43)
      COMMON / CFD / IFD, OFD
      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
     *8/,ST001Z(10)/111/,ST001Z(11)/120/,ST001Z(12)/32/,ST001Z(13)/91/,S
     *T001Z(14)/45/,ST001Z(15)/101/,ST001Z(16)/93/,ST001Z(17)/32/,ST001Z
     *(18)/91/,ST001Z(19)/45/,ST001Z(20)/100/,ST001Z(21)/123/,ST001Z(22)
     */100/,ST001Z(23)/101/,ST001Z(24)/118/,ST001Z(25)/105/,ST001Z(26)/9
     *9/,ST001Z(27)/101/,ST001Z(28)/125/,ST001Z(29)/93/,ST001Z(30)/32/,S
     *T001Z(31)/91/,ST001Z(32)/45/,ST001Z(33)/93/,ST001Z(34)/32/,ST001Z(
     *35)/102/,ST001Z(36)/105/,ST001Z(37)/108/,ST001Z(38)/101/,ST001Z(39
     *)/32/,ST001Z(40)/46/,ST001Z(41)/46/,ST001Z(42)/46/,ST001Z(43)/0/
      CALL QUERY( ST001Z )
      CALL BOXARG
      OFD = 2
      OMODE = STMODE( OFD, 1)
      CALL PUTCH( 10, OFD)
      NDX = 1
23000 CONTINUE
      IFD = NXTFIL( FIL, NDX)
      NDX = NDX + 1
      IF (.NOT.( IFD .EQ. -1 ))GOTO 23003
      GOTO 23002
23003 CONTINUE
23005 IF (.NOT.( GETLIN( LIN, IFD) .NE. -1 ))GOTO 23006
      IF (.NOT.( BEGBLK(LIN) .EQ. 0 ))GOTO 23007
      I = 1 
23009 IF (.NOT.(LIN(I) .NE. 0 ))GOTO 23011
      IF (.NOT.( LIN(I) .NE. 10 ))GOTO 23012
      CALL PUTCH( LIN(I), OFD)
      GOTO 23013
23012 CONTINUE
      IF (.NOT.( OMODE .NE. 0 ))GOTO 23014
      CALL PUTCH( 13, OFD)
23014 CONTINUE
      CALL PUTCH( 10, OFD)
23013 CONTINUE
23010 I = I + 1 
      GOTO 23009
23011 CONTINUE
      GOTO 23008
23007 CONTINUE
      JUNK = NOTE ( MARKER, IFD)
      CALL MEASUR( MAXLEN, MAXLVL)
      CALL SEEK( MARKER, IFD)
      CALL PROCES( MAXLEN, MAXLVL)
23008 CONTINUE
      GOTO 23005
23006 CONTINUE
      IF (.NOT.( IFD .NE. 1 ))GOTO 23016
      CALL CLOSE(IFD)
23016 CONTINUE
23001 GOTO 23000
23002 CONTINUE
      OMODE = STMODE( OFD, 0)
      RETURN
      END
      INTEGER FUNCTION BEGBLK(LIN)
      LOGICAL*1 LIN(402)
      INTEGER I
      I = 1 
23018 IF (.NOT.((LIN(I) .EQ. 32 .OR. LIN(I) .EQ. 9) .AND. LIN(I) .NE. 0 
     *))GOTO 23020
23019 I = I + 1 
      GOTO 23018
23020 CONTINUE
      IF (.NOT.( LIN(I) .EQ. 123 ))GOTO 23021
      BEGBLK=(1)
      RETURN
23021 CONTINUE
      BEGBLK=(0)
      RETURN
23022 CONTINUE
      END
      SUBROUTINE BOXARG
      INTEGER I
      INTEGER EQUAL, GETARG
      LOGICAL*1 ARG(36)
      INTEGER ENTABF
      LOGICAL*1 GRFOFF
      LOGICAL*1 GRFON
      LOGICAL*1 GRFPRF
      LOGICAL*1 GRFBLK
      LOGICAL*1 NWCORN
      LOGICAL*1 NECORN
      LOGICAL*1 SWCORN
      LOGICAL*1 SECORN
      LOGICAL*1 HEDGE
      LOGICAL*1 VEDGE
      INTEGER TABS
      LOGICAL*1 ST002Z(6)
      LOGICAL*1 ST003Z(3)
      LOGICAL*1 ST004Z(3)
      LOGICAL*1 ST005Z(4)
      LOGICAL*1 ST006Z(2)
      LOGICAL*1 ST007Z(2)
      LOGICAL*1 ST008Z(22)
      LOGICAL*1 ST009Z(8)
      LOGICAL*1 ST00AZ(22)
      LOGICAL*1 ST00BZ(8)
      COMMON / CBOX / ENTABF, GRFOFF(3), GRFON(3), GRFPRF, GRFBLK, NWCOR
     *N, NECORN, SWCORN, SECORN, HEDGE, VEDGE
      COMMON / CTABS / TABS(402)
      DATA GRFOFF(1) / 0 /
      DATA GRFON(1) / 0 /
      DATA GRFPRF / 0 /
      DATA GRFBLK / 32 /
      DATA NWCORN / 43 /
      DATA NECORN / 43 /
      DATA SWCORN / 43 /
      DATA SECORN / 43 /
      DATA HEDGE / 45 /
      DATA VEDGE / 124 /
      DATA ENTABF / 0 /
      DATA ST002Z(1)/118/,ST002Z(2)/116/,ST002Z(3)/49/,ST002Z(4)/48/,ST0
     *02Z(5)/48/,ST002Z(6)/0/
      DATA ST003Z(1)/40/,ST003Z(2)/48/,ST003Z(3)/0/
      DATA ST004Z(1)/40/,ST004Z(2)/66/,ST004Z(3)/0/
      DATA ST005Z(1)/104/,ST005Z(2)/49/,ST005Z(3)/57/,ST005Z(4)/0/
      DATA ST006Z(1)/70/,ST006Z(2)/0/
      DATA ST007Z(1)/71/,ST007Z(2)/0/
      DATA ST008Z(1)/73/,ST008Z(2)/32/,ST008Z(3)/100/,ST008Z(4)/111/,ST0
     *08Z(5)/110/,ST008Z(6)/39/,ST008Z(7)/116/,ST008Z(8)/32/,ST008Z(9)/1
     *07/,ST008Z(10)/110/,ST008Z(11)/111/,ST008Z(12)/119/,ST008Z(13)/32/
     *,ST008Z(14)/97/,ST008Z(15)/98/,ST008Z(16)/111/,ST008Z(17)/117/,ST0
     *08Z(18)/116/,ST008Z(19)/32/,ST008Z(20)/97/,ST008Z(21)/32/,ST008Z(2
     *2)/0/
      DATA ST009Z(1)/32/,ST009Z(2)/100/,ST009Z(3)/101/,ST009Z(4)/118/,ST
     *009Z(5)/105/,ST009Z(6)/99/,ST009Z(7)/101/,ST009Z(8)/0/
      DATA ST00AZ(1)/73/,ST00AZ(2)/32/,ST00AZ(3)/100/,ST00AZ(4)/111/,ST0
     *0AZ(5)/110/,ST00AZ(6)/39/,ST00AZ(7)/116/,ST00AZ(8)/32/,ST00AZ(9)/1
     *07/,ST00AZ(10)/110/,ST00AZ(11)/111/,ST00AZ(12)/119/,ST00AZ(13)/32/
     *,ST00AZ(14)/97/,ST00AZ(15)/98/,ST00AZ(16)/111/,ST00AZ(17)/117/,ST0
     *0AZ(18)/116/,ST00AZ(19)/32/,ST00AZ(20)/97/,ST00AZ(21)/32/,ST00AZ(2
     *2)/0/
      DATA ST00BZ(1)/32/,ST00BZ(2)/111/,ST00BZ(3)/112/,ST00BZ(4)/116/,ST
     *00BZ(5)/105/,ST00BZ(6)/111/,ST00BZ(7)/110/,ST00BZ(8)/0/
      CALL SETTAB( 0, TABS)
      I = 1 
23023 IF (.NOT.(GETARG( I, ARG, 36) .NE. -1 ))GOTO 23025
      IF (.NOT.( ARG(1) .EQ. 45 .AND. ARG(2) .NE. 0 ))GOTO 23026
      CALL FOLD(ARG)
      IF (.NOT.( ARG(2) .EQ. 100 ))GOTO 23028
      IF (.NOT.( EQUAL( ARG(3), ST002Z) .EQ. 1 ))GOTO 23030
      CALL STRCPY( ST003Z, GRFON)
      CALL STRCPY( ST004Z, GRFOFF)
      GRFPRF = 27
      GRFBLK = 95
      NWCORN = 108
      NECORN = 107
      SWCORN = 109
      SECORN = 106
      HEDGE = 113
      VEDGE = 120
      GOTO 23031
23030 CONTINUE
      IF (.NOT.( EQUAL( ARG(3), ST005Z) .EQ. 1 ))GOTO 23032
      CALL STRCPY( ST006Z, GRFON)
      CALL STRCPY( ST007Z, GRFOFF)
      GRFPRF = 27
      GRFBLK = 32
      NWCORN = 102
      NECORN = 99
      SWCORN = 101
      SECORN = 100
      HEDGE = 97
      VEDGE = 96
      GOTO 23033
23032 CONTINUE
      CALL BOXERR( ST008Z, ARG(3), ST009Z)
23033 CONTINUE
23031 CONTINUE
      GOTO 23029
23028 CONTINUE
      IF (.NOT.( ARG(2) .EQ. 101 ))GOTO 23034
      ENTABF = 1
      GOTO 23035
23034 CONTINUE
      CALL BOXERR( ST00AZ, ARG(2), ST00BZ)
23035 CONTINUE
23029 CONTINUE
      CALL DELARG(I)
      I = I - 1
23026 CONTINUE
23024 I = I + 1 
      GOTO 23023
23025 CONTINUE
      RETURN
      END
      SUBROUTINE BOXERR( STR1, STR2, STR3)
      LOGICAL*1 STR1(100), STR2(100), STR3(100)
      LOGICAL*1 BOXSTR(8)
      LOGICAL*1 QST1(3)
      LOGICAL*1 QST2(3)
      DATA BOXSTR(1)/63/,BOXSTR(2)/32/,BOXSTR(3)/66/,BOXSTR(4)/111/,BOXS
     *TR(5)/120/,BOXSTR(6)/58/,BOXSTR(7)/32/,BOXSTR(8)/0/
      DATA QST1(1)/96/,QST1(2)/96/,QST1(3)/0/
      DATA QST2(1)/39/,QST2(2)/39/,QST2(3)/0/
      CALL PUTLIN( BOXSTR, 3)
      CALL PUTLIN( STR1, 3)
      CALL PUTLIN( QST1, 3)
      CALL PUTLIN( STR2, 3)
      CALL PUTLIN( QST2, 3)
      CALL REMARK( STR3)
      CALL PUTCH( 10, 3)
      RETURN
      END
      SUBROUTINE BOXLIN(INPLIN)
      LOGICAL*1 INPLIN(100), LIN(402)
      INTEGER I
      INTEGER ENTABF
      LOGICAL*1 GRFOFF
      LOGICAL*1 GRFON
      LOGICAL*1 GRFPRF
      LOGICAL*1 GRFBLK
      LOGICAL*1 NWCORN
      LOGICAL*1 NECORN
      LOGICAL*1 SWCORN
      LOGICAL*1 SECORN
      LOGICAL*1 HEDGE
      LOGICAL*1 VEDGE
      INTEGER IFD
      INTEGER OFD
      INTEGER TABS
      COMMON / CBOX / ENTABF, GRFOFF(3), GRFON(3), GRFPRF, GRFBLK, NWCOR
     *N, NECORN, SWCORN, SECORN, HEDGE, VEDGE
      COMMON / CFD / IFD, OFD
      COMMON / CTABS / TABS(402)
      IF (.NOT.( ENTABF .EQ. 1 ))GOTO 23036
      CALL ENTABL( INPLIN, LIN, TABS)
      GOTO 23037
23036 CONTINUE
      CALL STRCPY( INPLIN, LIN)
23037 CONTINUE
      I = 1 
23038 IF (.NOT.(LIN(I) .NE. 0 ))GOTO 23040
      IF (.NOT.( LIN(I) .EQ. 1 ))GOTO 23041
      CALL GRAFIC( GRFON, OFD)
      CALL PUTCH( NWCORN, OFD)
      I = I + 1 
23043 IF (.NOT.(LIN(I) .EQ. 5 ))GOTO 23045
      CALL PUTCH( HEDGE, OFD)
23044 I = I + 1 
      GOTO 23043
23045 CONTINUE
      IF (.NOT.( LIN(I) .EQ. 2 ))GOTO 23046
      CALL PUTCH( NECORN, OFD)
      GOTO 23047
23046 CONTINUE
      I = I - 1
23047 CONTINUE
      CALL GRAFIC( GRFOFF, OFD)
      GOTO 23042
23041 CONTINUE
      IF (.NOT.( LIN(I) .EQ. 3 ))GOTO 23048
      CALL GRAFIC( GRFON, OFD)
      CALL PUTCH( SWCORN, OFD)
      I = I + 1 
23050 IF (.NOT.(LIN(I) .EQ. 5 ))GOTO 23052
      CALL PUTCH( HEDGE, OFD)
23051 I = I + 1 
      GOTO 23050
23052 CONTINUE
      IF (.NOT.( LIN(I) .EQ. 4 ))GOTO 23053
      CALL PUTCH( SECORN, OFD)
      GOTO 23054
23053 CONTINUE
      I = I - 1
23054 CONTINUE
      CALL GRAFIC( GRFOFF, OFD)
      GOTO 23049
23048 CONTINUE
      IF (.NOT.( LIN(I) .EQ. 6 ))GOTO 23055
      CALL GRAFIC( GRFON, OFD)
23057 IF (.NOT.(LIN(I) .EQ. 6 .OR. LIN(I) .EQ. 32 ))GOTO 23059
      IF (.NOT.( LIN(I) .EQ. 32 ))GOTO 23060
      CALL PUTCH( GRFBLK, OFD)
      GOTO 23061
23060 CONTINUE
      CALL PUTCH( VEDGE, OFD)
23061 CONTINUE
23058 I = I + 1 
      GOTO 23057
23059 CONTINUE
      CALL GRAFIC( GRFOFF, OFD)
      I = I - 1
      GOTO 23056
23055 CONTINUE
      CALL PUTCH( LIN(I), OFD)
23056 CONTINUE
23049 CONTINUE
23042 CONTINUE
23039 I = I + 1 
      GOTO 23038
23040 CONTINUE
      RETURN
      END
      SUBROUTINE DETABL( IN, OUT, TABS)
      LOGICAL*1 IN(100), OUT(100)
      INTEGER I, J, ONDX, TABS(100)
      INTEGER TABPOS
      ONDX = 1
      I = 1 
23062 IF (.NOT.(IN(I) .NE. 0 ))GOTO 23064
      IF (.NOT.( IN(I) .EQ. 9 ))GOTO 23065
      J = I
23067 CONTINUE
      CALL CHCOPY( 32, OUT, ONDX)
      J = J + 1
      IF (.NOT.( TABPOS( J, TABS) .EQ. 1 ))GOTO 23070
      GOTO 23069
23070 CONTINUE
23068 GOTO 23067
23069 CONTINUE
      GOTO 23066
23065 CONTINUE
      CALL CHCOPY( IN(I), OUT, ONDX)
23066 CONTINUE
23063 I = I + 1 
      GOTO 23062
23064 CONTINUE
      OUT(ONDX) = 0
      RETURN
      END
      INTEGER FUNCTION DOBOT( LIN, START, STOP)
      LOGICAL*1 LIN(100)
      INTEGER I, START, STOP
      I = START
      CALL CHCOPY( 3, LIN, I)
23072 IF (.NOT.(I .LE. STOP ))GOTO 23074
      LIN(I) = 5
23073 I = I + 1 
      GOTO 23072
23074 CONTINUE
      LIN(I) = 4
      DOBOT=(I+1)
      RETURN
      END
      INTEGER FUNCTION DOLEFT( LIN, NDX, COUNT)
      LOGICAL*1 LIN(100)
      INTEGER COUNT, I, N, NDX
      I = NDX
      N = COUNT 
23075 IF (.NOT.(N .GT. 0 ))GOTO 23077
      CALL CHCOPY( 6, LIN, I)
      LIN(I) = 32
      I = I + 1
23076 N = N - 1 
      GOTO 23075
23077 CONTINUE
      DOLEFT=(I)
      RETURN
      END
      INTEGER FUNCTION DORITE( LIN, NDX, COUNT)
      LOGICAL*1 LIN(100)
      INTEGER COUNT, I, N, NDX
      I = NDX
      N = COUNT 
23078 IF (.NOT.(N .GT. 0 ))GOTO 23080
      CALL CHCOPY( 32, LIN, I)
      CALL CHCOPY( 6, LIN, I)
23079 N = N - 1 
      GOTO 23078
23080 CONTINUE
      DORITE=(I)
      RETURN
      END
      INTEGER FUNCTION DOTOP( LIN, START, STOP)
      LOGICAL*1 LIN(100)
      INTEGER I, START, STOP
      I = START
      CALL CHCOPY( 1, LIN, I)
23081 IF (.NOT.(I .LE. STOP ))GOTO 23083
      LIN(I) = 5
23082 I = I + 1 
      GOTO 23081
23083 CONTINUE
      LIN(I) = 2
      DOTOP=(I+1)
      RETURN
      END
      INTEGER FUNCTION ENDBLK(LIN)
      LOGICAL*1 LIN(402)
      INTEGER I
      I = 1 
23084 IF (.NOT.((LIN(I) .EQ. 32 .OR. LIN(I) .EQ. 9 ) .AND. LIN(I).NE.0 )
     *)GOTO 23086
23085 I = I + 1 
      GOTO 23084
23086 CONTINUE
      IF (.NOT.( LIN(I) .EQ. 125 ))GOTO 23087
      ENDBLK=(1)
      RETURN
23087 CONTINUE
      ENDBLK=(0)
      RETURN
23088 CONTINUE
      END
      SUBROUTINE ENTABL( IN, OUT, TABS)
      LOGICAL*1 IN(100), OUT(100)
      INTEGER COL, NEWCOL, ONDX, TABS(100)
      INTEGER TABPOS
      ONDX = 1
      COL = 1 
23089 IF (.NOT.(IN(COL) .NE. 0 ))GOTO 23091
      NEWCOL = COL
23092 IF (.NOT.( IN(NEWCOL) .EQ. 32 ))GOTO 23093
      NEWCOL = NEWCOL + 1
      IF (.NOT.( TABPOS( NEWCOL, TABS) .EQ. 1 ))GOTO 23094
      CALL CHCOPY( 9, OUT, ONDX)
      COL = NEWCOL
23094 CONTINUE
      GOTO 23092
23093 CONTINUE
23096 IF (.NOT.(COL .LT. NEWCOL ))GOTO 23098
      CALL CHCOPY( 32, OUT, ONDX)
23097 COL = COL + 1 
      GOTO 23096
23098 CONTINUE
      CALL CHCOPY( IN(COL), OUT, ONDX)
23090 COL = COL + 1 
      GOTO 23089
23091 CONTINUE
      RETURN
      END
      SUBROUTINE GRAFIC( STR, FD)
      LOGICAL*1 STR(100)
      INTEGER FD
      INTEGER ENTABF
      LOGICAL*1 GRFOFF
      LOGICAL*1 GRFON
      LOGICAL*1 GRFPRF
      LOGICAL*1 GRFBLK
      LOGICAL*1 NWCORN
      LOGICAL*1 NECORN
      LOGICAL*1 SWCORN
      LOGICAL*1 SECORN
      LOGICAL*1 HEDGE
      LOGICAL*1 VEDGE
      COMMON / CBOX / ENTABF, GRFOFF(3), GRFON(3), GRFPRF, GRFBLK, NWCOR
     *N, NECORN, SWCORN, SECORN, HEDGE, VEDGE
      IF (.NOT.( GRFPRF .NE. 0 ))GOTO 23099
      CALL PUTCH( GRFPRF, FD)
      CALL PUTLIN( STR, FD)
23099 CONTINUE
      RETURN
      END
      SUBROUTINE MEASUR( MAXLEN, MAXLVL)
      INTEGER I, LEVEL, LINLEN, MAXLEN, MAXLVL
      INTEGER READLN
      LOGICAL*1 LIN(402)
      MAXLEN = 0
      MAXLVL = 0
      LEVEL = 1 
23101 IF (.NOT.(LEVEL .GT. 0 ))GOTO 23103
      IF (.NOT.( LEVEL .GT. MAXLVL ))GOTO 23104
      MAXLVL = LEVEL
23104 CONTINUE
      IF (.NOT.( LINLEN .GT. MAXLEN ))GOTO 23106
      MAXLEN = LINLEN
23106 CONTINUE
23102 LINLEN = READLN( LIN, LEVEL) 
      GOTO 23101
23103 CONTINUE
      RETURN
      END
      INTEGER FUNCTION NXTFIL( FIL, NDX)
      LOGICAL*1 FIL(100)
      INTEGER FD
      INTEGER NDX
      INTEGER GETARG, OPEN
      IF (.NOT.( GETARG( NDX, FIL, 36) .NE. -1 ))GOTO 23108
      IF (.NOT.( FIL(1) .EQ. 45 .AND. FIL(2) .EQ. 0 ))GOTO 23110
      NXTFIL=(1)
      RETURN
23110 CONTINUE
      FD = OPEN( FIL, 1)
      IF (.NOT.( FD .EQ. -3 ))GOTO 23112
      CALL CANT(FIL)
      GOTO 23113
23112 CONTINUE
      NXTFIL=(FD)
      RETURN
23113 CONTINUE
      GOTO 23109
23108 CONTINUE
      IF (.NOT.( NDX .EQ. 1 ))GOTO 23114
      NXTFIL=(1)
      RETURN
23114 CONTINUE
      NXTFIL=(-1)
      RETURN
23115 CONTINUE
23109 CONTINUE
      END
      SUBROUTINE PROCES( MAXLEN, MAXLVL)
      LOGICAL*1 LIN(402)
      INTEGER I, J, MAXLEN, MAXLVL
      INTEGER DOBOT, DOLEFT, DORITE, DOTOP
      INTEGER LCIL
      INTEGER FCIL
      INTEGER LEVEL, LINLEN
      INTEGER BEGBLK, ENDBLK, READLN
      LOGICAL*1 LBRNL(3)
      LOGICAL*1 CRLF(3)
      DATA LBRNL(1)/123/,LBRNL(2)/10/,LBRNL(3)/0/
      DATA CRLF(1)/13/,CRLF(2)/10/,CRLF(3)/0/
      CALL STRCPY( LBRNL, LIN)
      LEVEL = 1 
23116 IF (.NOT.(LEVEL .GT. 0 ))GOTO 23118
      FCIL = LEVEL * 2 - 1
      LCIL = MAXLEN + (MAXLVL - LEVEL) * 2 + 2
      IF (.NOT.( BEGBLK(LIN) .EQ. 1 ))GOTO 23119
      I = 1
      I = DOLEFT( LIN, I, LEVEL - 1 )
      I = DOTOP( LIN, I, LCIL - 1)
      I = DORITE( LIN, I, LEVEL - 1)
      CALL SCOPY( CRLF, 1, LIN, I)
      CALL BOXLIN(LIN)
      GOTO 23120
23119 CONTINUE
      IF (.NOT.( ENDBLK(LIN) .EQ. 1 ))GOTO 23121
      I = 1
      I = DOLEFT( LIN, I, LEVEL)
      I = DOBOT( LIN, I, LCIL - 3)
      I = DORITE( LIN, I, LEVEL)
      CALL SCOPY( CRLF, 1, LIN, I)
      CALL BOXLIN(LIN)
      GOTO 23122
23121 CONTINUE
      I = 1
      I = DOLEFT( LIN, I, LEVEL)
      IF (.NOT.( I .LE. LINLEN ))GOTO 23123
      I = LINLEN + 1
23123 CONTINUE
23125 IF (.NOT.(I .LE. LCIL - 2 ))GOTO 23127
      LIN(I) = 32
23126 I = I + 1 
      GOTO 23125
23127 CONTINUE
      I = DORITE( LIN, I, LEVEL)
      CALL SCOPY( CRLF, 1, LIN, I)
      CALL BOXLIN(LIN)
23122 CONTINUE
23120 CONTINUE
23117 LINLEN = READLN( LIN, LEVEL) 
      GOTO 23116
23118 CONTINUE
      I = 1 
23128 IF (.NOT.(I .LT. FCIL ))GOTO 23130
      LIN(I) = 32
23129 I = I + 1 
      GOTO 23128
23130 CONTINUE
      I = 1
      I = DOLEFT( LIN, I, LEVEL)
      I = DOBOT( LIN, I, LCIL - 1)
      CALL SCOPY( CRLF, 1, LIN, I)
      CALL BOXLIN(LIN)
      RETURN
      END
      INTEGER FUNCTION READLN( LIN, LEVEL)
      LOGICAL*1 INPLIN(402), LIN(402)
      INTEGER I, LEVEL
      INTEGER BEGBLK, ENDBLK, GETLIN, LENGTH
      INTEGER TABS
      INTEGER IFD
      INTEGER OFD
      LOGICAL*1 LBRNL(3)
      LOGICAL*1 RBRNL(3)
      LOGICAL*1 ST00CZ(51)
      COMMON / CTABS / TABS(402)
      COMMON / CFD / IFD, OFD
      DATA LBRNL(1)/123/,LBRNL(2)/10/,LBRNL(3)/0/
      DATA RBRNL(1)/125/,RBRNL(2)/10/,RBRNL(3)/0/
      DATA ST00CZ(1)/80/,ST00CZ(2)/114/,ST00CZ(3)/101/,ST00CZ(4)/109/,ST
     *00CZ(5)/97/,ST00CZ(6)/116/,ST00CZ(7)/117/,ST00CZ(8)/114/,ST00CZ(9)
     */101/,ST00CZ(10)/32/,ST00CZ(11)/69/,ST00CZ(12)/79/,ST00CZ(13)/70/,
     *ST00CZ(14)/32/,ST00CZ(15)/101/,ST00CZ(16)/110/,ST00CZ(17)/99/,ST00
     *CZ(18)/111/,ST00CZ(19)/117/,ST00CZ(20)/110/,ST00CZ(21)/116/,ST00CZ
     *(22)/101/,ST00CZ(23)/114/,ST00CZ(24)/101/,ST00CZ(25)/100/,ST00CZ(2
     *6)/46/,ST00CZ(27)/32/,ST00CZ(28)/32/,ST00CZ(29)/69/,ST00CZ(30)/110
     */,ST00CZ(31)/100/,ST00CZ(32)/66/,ST00CZ(33)/108/,ST00CZ(34)/111/,S
     *T00CZ(35)/99/,ST00CZ(36)/107/,ST00CZ(37)/32/,ST00CZ(38)/108/,ST00C
     *Z(39)/105/,ST00CZ(40)/110/,ST00CZ(41)/101/,ST00CZ(42)/32/,ST00CZ(4
     *3)/105/,ST00CZ(44)/110/,ST00CZ(45)/115/,ST00CZ(46)/101/,ST00CZ(47)
     */114/,ST00CZ(48)/116/,ST00CZ(49)/101/,ST00CZ(50)/100/,ST00CZ(51)/0
     */
      IF (.NOT.( GETLIN( INPLIN, IFD) .NE. -1 ))GOTO 23131
      CALL DETABL( INPLIN, LIN, TABS)
      IF (.NOT.( BEGBLK(LIN) .EQ. 1 ))GOTO 23133
      LEVEL = LEVEL + 1
      CALL STRCPY( LBRNL, LIN)
      READLN=(1)
      RETURN
23133 CONTINUE
      IF (.NOT.( ENDBLK(LIN) .EQ. 1 ))GOTO 23135
      LEVEL = LEVEL - 1
      CALL STRCPY( RBRNL, LIN)
      READLN=(1)
      RETURN
23135 CONTINUE
      I = LENGTH(LIN)
      IF (.NOT.( LIN(I) .EQ. 10 .AND. I .GT. 1 ))GOTO 23137
      I = I - 1
23137 CONTINUE
      IF (.NOT.( LIN(I) .EQ. 35 ))GOTO 23139
      I = I - 1
23141 IF (.NOT.((LIN(I) .EQ. 32 .OR. LIN(I) .EQ. 35) .AND. I .GT. 1 ))GO
     *TO 23143
23142 I = I - 1 
      GOTO 23141
23143 CONTINUE
      LIN(I+1) = 10
      LIN(I+2) = 0
23139 CONTINUE
      READLN=(I)
      RETURN
23136 CONTINUE
23134 CONTINUE
      GOTO 23132
23131 CONTINUE
      CALL REMARK( ST00CZ)
      LEVEL = LEVEL - 1
      CALL STRCPY( RBRNL, LIN)
      READLN=(1)
      RETURN
23132 CONTINUE
      END
