home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / filedocs / simdif.for < prev    next >
Text File  |  1994-03-04  |  20KB  |  630 lines

  1.       program simdif
  2.       implicit integer (a-z)
  3.  
  4. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  5. c
  6. c
  7. c     SIMDIF -- compare two SimTel index files and list differences.
  8. c
  9. c
  10. c        Author:
  11. c
  12. c           Gregory D. Flint, Purdue University Computing Center, 1990.
  13. c
  14. c
  15. c        Warranty notice:
  16. c
  17. c           Purdue University Computing Center (PUCC) warrants only
  18. c           that PUCC testing has been applied to this code.  No other
  19. c           warranty, expressed or implied, is applicable.
  20. c
  21. c
  22. c        Description:
  23. c
  24. c           The program reads two input files as follows:
  25. c
  26. c              old - previous simtel index file,
  27. c              new - current simtel index file.
  28. c
  29. c           It compares the two files and generates five report files as
  30. c           follows:
  31. c
  32. c              add - a list of files whose entries were added to the new
  33. c                    index,
  34. c              chg - a list of files whose entries were changed in the
  35. c                    new index (version, size, date, desc, etc.),
  36. c              del - a list of files whose entries were deleted from the
  37. c                    new index,
  38. c              ftp - the contents of the add & chg files formatted for
  39. c                    use by the autoftp program (available from
  40. c                    SimTel), and
  41. c              lst - statistics about the run.
  42. c
  43. c
  44. c         Notes:
  45. c
  46. c            Should the format of the index file change, the parameter
  47. c            statements that appear in each routine will need to be
  48. c            changed.
  49. c
  50. c            Do not try to compare index files across a format change
  51. c            after changing the parameter statements as the old file
  52. c            will fail to parse properly.
  53. c
  54. c
  55. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  56.  
  57.  
  58.  
  59. c-----------------------------------------------------------------------
  60. c     parameters:     
  61. c
  62. c        flds = number of fields (+1) in the index files.
  63. c
  64. c        ldrv, ldir, ... = length of a field (+1 if data near max size)
  65. c        pdrv, pdir, ... = position of an output field
  66. c
  67. c        linp = length of an input line (including quote marks)
  68. c
  69. c        add, chg, ... = unit numbers for the seven input/output files
  70. c-----------------------------------------------------------------------
  71.  
  72.       parameter ( flds = 9)
  73. c
  74.       parameter ( ldrv =  4    ,  pdrv =           1 )
  75.       parameter ( ldir = 20    ,  pdir = pdrv + ldrv )
  76.       parameter ( lnam = 12    ,  pnam = pdir + ldir )
  77.       parameter ( lver =  2 + 1,  pver = pnam + lnam )
  78.       parameter ( lsiz =  6 + 1,  psiz = pver + lver )
  79.       parameter ( ltyp =  1    ,  ptyp = psiz + lsiz )
  80.       parameter ( ldat =  6    ,  pdat = ptyp + ltyp )
  81.       parameter ( ldes = 46    ,  pdes = pdat + ldat )
  82.       parameter ( lend =  0    ,  pend = pdes + ldes )
  83. c
  84.       parameter ( linp = 1+ldrv+1 + 1+ldir+1 + 1+lnam+1 +
  85.      *                     lver   +   lsiz   +   ltyp   +
  86.      *                     ldat   + 1+ldes+1 +   flds   )
  87. c
  88.       parameter ( add =  3 )
  89.       parameter ( chg =  4 )
  90.       parameter ( del =  7 )
  91.       parameter ( ftp =  8 )
  92.       parameter ( lst =  9 )
  93.       parameter ( new = 10 )
  94.       parameter ( old = 11 )
  95.  
  96.  
  97. c-----------------------------------------------------------------------
  98. c     /chars/ -- character variable common block
  99. c
  100. c        ascii  = symbol in the index indicating an ascii file
  101. c        inline = input line (from old or new file)
  102. c        outnew = parsed input line from new file
  103. c        outold = parsed output line from old file
  104. c-----------------------------------------------------------------------
  105.  
  106.       common / chars / ascii, inline, outnew, outold
  107.       character*1      ascii
  108.       character*(linp) inline
  109.       character*(pend) outnew, outold
  110.  
  111.  
  112. c-----------------------------------------------------------------------
  113. c     /intgrs/ -- integer variable common block
  114. c
  115. c        added  = number of entries added to the new file
  116. c        chged  = number of entries changed in the new file
  117. c        deled  = number of entries deleted from the new file
  118. c        haderr = if non-zero, indicates the file with a parse error
  119. c        nlines = number of entries read from the new file
  120. c        olines = number of entries read from the old file
  121. c-----------------------------------------------------------------------
  122.  
  123.       common / intgrs / added, chged, deled, haderr, nlines, olines
  124.  
  125.  
  126. c-----------------------------------------------------------------------
  127. c     /fields/ -- field related data
  128. c
  129. c        flen() = array containing the length of each field
  130. c        fpos() = array containing the starting position of each field
  131. c        fptr   = integer pointer to field being processed
  132. c        fquo() = logical array indicating whether or not the field is
  133. c                 bracketed by quote marks
  134. c-----------------------------------------------------------------------
  135.  
  136.       common / fields / flen(flds), fpos(flds), fptr, fquo(flds)
  137.       logical fquo
  138.  
  139.  
  140. c-----------------------------------------------------------------------
  141. c     /eoflag/ -- end of file detected flags
  142. c
  143. c       ndone = true if eof detected on old file
  144. c       odone = true if eof detected on new file
  145. c-----------------------------------------------------------------------
  146.  
  147.       common / eoflag / ndone, odone
  148.       logical ndone, odone
  149.  
  150.  
  151. c
  152. c     open the files and prime the pumps.
  153. c
  154.  
  155.       open (old, file="simold")
  156.       open (new, file="simnew")
  157.       open (del, file="simdel")
  158.       open (add, file="simadd")
  159.       open (chg, file="simchg")
  160.       open (lst, file="simlst")
  161.       open (ftp, file="simftp")
  162. c
  163.       read (old, 10, end=50) inline
  164.    10 format (a)
  165.       olines = olines + 1
  166.       call split (old)
  167.       if (haderr .ne. 0) go to 90
  168.       read (new, 10, end=70) inline
  169.       nlines = nlines + 1
  170.       call split (new)
  171.       if (haderr .ne. 0) go to 110
  172.  
  173. c
  174. c     main loop
  175. c
  176.  
  177.    20 if (outold(pdrv:pver-1) .lt. outnew(pdrv:pver-1)) then
  178.          call dels
  179.       else if (outold(pdrv:pver-1) .gt. outnew(pdrv:pver-1)) then
  180.          call adds
  181.       else 
  182.          call chgs
  183.       endif
  184.       if (haderr .eq. old) go to 90
  185.       if (haderr .eq. new) go to 110
  186.       if (.not.(odone.and.ndone)) go to 20
  187. c
  188.       write (lst, 30) olines, nlines
  189.    30 format (1x,i6," lines read from old file."/
  190.      *        1x,i6," lines read from new file.")
  191.       write (lst, 40) added, chged, deled
  192.    40 format (/1x,i6," files added."/
  193.      *         1x,i6," files changed."/
  194.      *         1x,i6," files deleted.")
  195. c
  196.       stop "simdif -- normal termination"
  197.  
  198. c
  199. c     error processing
  200. c
  201. c
  202.    50 write (lst, 60)
  203.    60 format (1x,"Empty ""old"" file."/)
  204.       go to 130
  205. c
  206.    70 write (lst, 80)
  207.    80 format (1x,"Empty ""new"" file."/)
  208.       go to 130
  209. c
  210.    90 write (lst, 100) fptr
  211.   100 format (1x,"Parse of ""old"" file failed at field",i2/)
  212.       go to 130
  213. c
  214.   110 write (lst, 120) fptr
  215.   120 format (1x,"Parse of ""new"" file failed at field",i2/)
  216. c     go to 130
  217. c
  218.   130 write (lst, 30) olines, nlines
  219.       stop "simdif -- errors detected."
  220. c
  221.       end
  222.       subroutine adds
  223.       implicit integer (a-z)
  224.  
  225. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  226. c
  227. c     adds -- process entries added to the new index file
  228. c
  229. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  230.  
  231.       parameter ( flds = 9)
  232. c
  233.       parameter ( ldrv =  4    ,  pdrv =           1 )
  234.       parameter ( ldir = 20    ,  pdir = pdrv + ldrv )
  235.       parameter ( lnam = 12    ,  pnam = pdir + ldir )
  236.       parameter ( lver =  2 + 1,  pver = pnam + lnam )
  237.       parameter ( lsiz =  6 + 1,  psiz = pver + lver )
  238.       parameter ( ltyp =  1    ,  ptyp = psiz + lsiz )
  239.       parameter ( ldat =  6    ,  pdat = ptyp + ltyp )
  240.       parameter ( ldes = 46    ,  pdes = pdat + ldat )
  241.       parameter ( lend =  0    ,  pend = pdes + ldes )
  242. c
  243.       parameter ( linp = 1+ldrv+1 + 1+ldir+1 + 1+lnam+1 +
  244.      *                     lver   +   lsiz   +   ltyp   +
  245.      *                     ldat   + 1+ldes+1 +   flds   )
  246. c
  247.       parameter ( add =  3 )
  248.       parameter ( chg =  4 )
  249.       parameter ( del =  7 )
  250.       parameter ( ftp =  8 )
  251.       parameter ( lst =  9 )
  252.       parameter ( new = 10 )
  253.       parameter ( old = 11 )
  254. c
  255.       common / chars / ascii, inline, outnew, outold
  256.       character*1      ascii
  257.       character*(linp) inline
  258.       character*(pend) outnew, outold
  259. c
  260.       common / fields / flen(flds), fpos(flds), fptr, fquo(flds)
  261.       logical fquo
  262. c
  263.       common / intgrs / added, chged, deled, haderr, nlines, olines
  264. c
  265.       common / eoflag / ndone, odone
  266.       logical ndone, odone
  267.  
  268.  
  269. c-----------------------------------------------------------------------
  270. c
  271. c     1) list the addition.
  272. c     2) add it to the autoftp file.
  273. c     3) increment the count.
  274. c     4) get and split another line from the new file.
  275. c     5) if end of file, set parsed new line to all [upper case] Z's.
  276. c
  277. c-----------------------------------------------------------------------
  278.  
  279.       write (add, 10) (outnew(fpos(i):fpos(i)+flen(i)-1),i=1,flds-1)
  280.    10 format (1x,3("""",a,""","),4(a,","),"""",a,"""")
  281. c
  282.       write (ftp, 20) outnew(pdrv:pdrv+ldrv-1), outnew(pdir:pdir+ldir-1)
  283.    20 format ("-d ",2a)
  284.       if (outnew(ptyp:ptyp) .eq. ascii) then
  285.          write (ftp, 30) outnew(pnam:pnam+lnam-1)
  286.    30    format ("-a ",a)
  287.       else
  288.          write (ftp, 40) outnew(pnam:pnam+lnam-1)
  289.    40    format ("-8 ",a)
  290.       endif
  291. c
  292.       added = added + 1
  293. c
  294.       read (new, 50, end=60) inline
  295.    50 format (a)
  296.       nlines = nlines + 1
  297.       call split (new)
  298.       return
  299. c
  300.    60 ndone = .true.
  301.       do 70 i = 1, pend
  302.          outnew(i:i) = "Z"
  303.    70 continue
  304.       return
  305. c
  306.       end
  307.       subroutine blckda
  308.       implicit integer (a-z)
  309.  
  310. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  311. c
  312. c     blckda -- preset labeled common block data
  313. c
  314. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  315.  
  316.       parameter ( flds = 9)
  317. c
  318.       parameter ( ldrv =  4    ,  pdrv =           1 )
  319.       parameter ( ldir = 20    ,  pdir = pdrv + ldrv )
  320.       parameter ( lnam = 12    ,  pnam = pdir + ldir )
  321.       parameter ( lver =  2 + 1,  pver = pnam + lnam )
  322.       parameter ( lsiz =  6 + 1,  psiz = pver + lver )
  323.       parameter ( ltyp =  1    ,  ptyp = psiz + lsiz )
  324.       parameter ( ldat =  6    ,  pdat = ptyp + ltyp )
  325.       parameter ( ldes = 46    ,  pdes = pdat + ldat )
  326.       parameter ( lend =  0    ,  pend = pdes + ldes )
  327. c
  328.       parameter ( linp = 1+ldrv+1 + 1+ldir+1 + 1+lnam+1 +
  329.      *                     lver   +   lsiz   +   ltyp   +
  330.      *                     ldat   + 1+ldes+1 +   flds   )
  331. c
  332.       common / chars / ascii, inline, outnew, outold
  333.       character*1      ascii
  334.       character*(linp) inline
  335.       character*(pend) outnew, outold
  336. c
  337.       common / fields / flen(flds), fpos(flds), fptr, fquo(flds)
  338.       logical fquo
  339. c
  340.       common / intgrs / added, chged, deled, haderr, nlines, olines
  341. c
  342.       common / eoflag / ndone, odone
  343.       logical ndone, odone
  344.  
  345.  
  346. c-----------------------------------------------------------------------
  347. c     note that not all fields in each block are preset
  348. c-----------------------------------------------------------------------
  349.  
  350.       data ascii / "7" /
  351. c
  352.       data flen / ldrv, ldir, lnam, lver, lsiz, ltyp, ldat, ldes, lend /
  353.       data fpos / pdrv, pdir, pnam, pver, psiz, ptyp, pdat, pdes, pend /
  354.       data fquo / 3*.true., 4*.false., .true., .false. /
  355. c
  356.       data added, chged, deled, haderr, nlines, olines / 6*0 /
  357. c
  358.       data ndone, odone / .false., .false. /
  359. c
  360.       end
  361.       subroutine chgs
  362.       implicit integer (a-z)
  363.  
  364. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  365. c
  366. c     chgs -- process entries that changed from the old to the new file
  367. c
  368. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  369.  
  370.       parameter ( flds = 9)
  371. c
  372.       parameter ( ldrv =  4    ,  pdrv =           1 )
  373.       parameter ( ldir = 20    ,  pdir = pdrv + ldrv )
  374.       parameter ( lnam = 12    ,  pnam = pdir + ldir )
  375.       parameter ( lver =  2 + 1,  pver = pnam + lnam )
  376.       parameter ( lsiz =  6 + 1,  psiz = pver + lver )
  377.       parameter ( ltyp =  1    ,  ptyp = psiz + lsiz )
  378.       parameter ( ldat =  6    ,  pdat = ptyp + ltyp )
  379.       parameter ( ldes = 46    ,  pdes = pdat + ldat )
  380.       parameter ( lend =  0    ,  pend = pdes + ldes )
  381. c
  382.       parameter ( linp = 1+ldrv+1 + 1+ldir+1 + 1+lnam+1 +
  383.      *                     lver   +   lsiz   +   ltyp   +
  384.      *                     ldat   + 1+ldes+1 +   flds   )
  385. c
  386.       parameter ( add =  3 )
  387.       parameter ( chg =  4 )
  388.       parameter ( del =  7 )
  389.       parameter ( ftp =  8 )
  390.       parameter ( lst =  9 )
  391.       parameter ( new = 10 )
  392.       parameter ( old = 11 )
  393. c
  394.       common / chars / ascii, inline, outnew, outold
  395.       character*1      ascii
  396.       character*(linp) inline
  397.       character*(pend) outnew, outold
  398. c
  399.       common / fields / flen(flds), fpos(flds), fptr, fquo(flds)
  400.       logical fquo
  401. c
  402.       common / intgrs / added, chged, deled, haderr, nlines, olines
  403. c
  404.       common / eoflag / ndone, odone
  405.       logical ndone, odone
  406.  
  407.  
  408. c-----------------------------------------------------------------------
  409. c
  410. c     1) if there is no change, skip to 5) below
  411. c     2) list the change.
  412. c     3) add it to the autoftp file.
  413. c     4) increment the count.
  414. c     5) get and split another line from both files.
  415. c     6) if end of file, set parsed new/old line to all Z's.
  416. c
  417. c-----------------------------------------------------------------------
  418.  
  419.       if (outold .eq. outnew) go to 50
  420. c
  421.       write (chg, 10) olines, nlines,
  422.      *   (outold(fpos(i):fpos(i)+flen(i)-1),i=1,flds-1),
  423.      *   (outnew(fpos(i):fpos(i)+flen(i)-1),i=1,flds-1)
  424.    10 format (1x,"old: ",i6,"   new: ",i6/
  425.      *        1x,"< ",3("""",a,""","),4(a,","),"""",a,""""/
  426.      *        1x,"> ",3("""",a,""","),4(a,","),"""",a,""""/
  427.      *        1x,25("-"))
  428. c
  429. c
  430.       write (ftp, 20) outnew(pdrv:pdrv+ldrv-1), outnew(pdir:pdir+ldir-1)
  431.    20 format ("-d ",2a)
  432.       if (outnew(ptyp:ptyp) .eq. ascii) then
  433.          write (ftp, 30) outnew(pnam:pnam+lnam-1)
  434.    30    format ("-a ",a)
  435.       else
  436.          write (ftp, 40) outnew(pnam:pnam+lnam-1)
  437.    40    format ("-8 ",a)
  438.       endif
  439.       chged = chged + 1
  440. c
  441.    50 read (new, 60, end=70) inline
  442.    60 format (a)
  443.       nlines = nlines + 1
  444.       call split (new)
  445.       if (haderr .ne. 0) return
  446.       go to 90
  447. c
  448.    70 ndone = .true.
  449.       do 80 i = 1, pend
  450.          outnew(i:i) = "Z"
  451.    80 continue
  452. c
  453.    90 read (old, 60, end=100) inline
  454.       olines = olines + 1
  455.       call split (old)
  456.       return
  457. c
  458.   100 odone = .true.
  459.       do 110 i = 1, pend
  460.          outold(i:i) = "Z"
  461.   110 continue
  462.       return
  463. c
  464.       end
  465.       subroutine dels
  466.       implicit integer (a-z)
  467.  
  468. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  469. c
  470. c     dels -- process entries deleted from the new index file
  471. c
  472. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  473.  
  474.       parameter ( flds = 9)
  475. c
  476.       parameter ( ldrv =  4    ,  pdrv =           1 )
  477.       parameter ( ldir = 20    ,  pdir = pdrv + ldrv )
  478.       parameter ( lnam = 12    ,  pnam = pdir + ldir )
  479.       parameter ( lver =  2 + 1,  pver = pnam + lnam )
  480.       parameter ( lsiz =  6 + 1,  psiz = pver + lver )
  481.       parameter ( ltyp =  1    ,  ptyp = psiz + lsiz )
  482.       parameter ( ldat =  6    ,  pdat = ptyp + ltyp )
  483.       parameter ( ldes = 46    ,  pdes = pdat + ldat )
  484.       parameter ( lend =  0    ,  pend = pdes + ldes )
  485. c
  486.       parameter ( linp = 1+ldrv+1 + 1+ldir+1 + 1+lnam+1 +
  487.      *                     lver   +   lsiz   +   ltyp   +
  488.      *                     ldat   + 1+ldes+1 +   flds   )
  489. c
  490.       parameter ( add =  3 )
  491.       parameter ( chg =  4 )
  492.       parameter ( del =  7 )
  493.       parameter ( ftp =  8 )
  494.       parameter ( lst =  9 )
  495.       parameter ( new = 10 )
  496.       parameter ( old = 11 )
  497. c
  498.       common / chars / ascii, inline, outnew, outold
  499.       character*1      ascii
  500.       character*(linp) inline
  501.       character*(pend) outnew, outold
  502. c
  503.       common / fields / flen(flds), fpos(flds), fptr, fquo(flds)
  504.       logical fquo
  505. c
  506.       common / intgrs / added, chged, deled, haderr, nlines, olines
  507. c
  508.       common / eoflag / ndone, odone
  509.       logical ndone, odone
  510.  
  511.  
  512. c-----------------------------------------------------------------------
  513. c
  514. c     1) list the deletion.
  515. c     2) increment the count.
  516. c     3) get and split another line from the old file.
  517. c     4) if end of file, set parsed old line to all [upper case] Z's.
  518. c
  519. c-----------------------------------------------------------------------
  520.  
  521.       write (del, 10) (outold(fpos(i):fpos(i)+flen(i)-1),i=1,flds-1)
  522.    10 format (1x,3("""",a,""","),4(a,","),"""",a,"""")
  523. c
  524.       deled = deled + 1
  525. c
  526.       read (old, 20, end=30) inline
  527.    20 format (a)
  528.       olines = olines + 1
  529.       call split (old)
  530.       return
  531. c
  532.    30 odone = .true.
  533.       do 40 i = 1, pend
  534.          outold(i:i) = "Z"
  535.    40 continue
  536.       return
  537. c
  538.       end
  539.       subroutine split (newold)
  540.       implicit integer (a-z)
  541. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  542. c
  543. c     split -- parse the input line and set the new/old output line
  544. c
  545. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  546.  
  547.       parameter ( flds = 9)
  548. c
  549.       parameter ( ldrv =  4    ,  pdrv =           1 )
  550.       parameter ( ldir = 20    ,  pdir = pdrv + ldrv )
  551.       parameter ( lnam = 12    ,  pnam = pdir + ldir )
  552.       parameter ( lver =  2 + 1,  pver = pnam + lnam )
  553.       parameter ( lsiz =  6 + 1,  psiz = pver + lver )
  554.       parameter ( ltyp =  1    ,  ptyp = psiz + lsiz )
  555.       parameter ( ldat =  6    ,  pdat = ptyp + ltyp )
  556.       parameter ( ldes = 46    ,  pdes = pdat + ldat )
  557.       parameter ( lend =  0    ,  pend = pdes + ldes )
  558. c
  559.       parameter ( linp = 1+ldrv+1 + 1+ldir+1 + 1+lnam+1 +
  560.      *                     lver   +   lsiz   +   ltyp   +
  561.      *                     ldat   + 1+ldes+1 +   flds   )
  562. c
  563.       parameter ( add =  3 )
  564.       parameter ( chg =  4 )
  565.       parameter ( del =  7 )
  566.       parameter ( ftp =  8 )
  567.       parameter ( lst =  9 )
  568.       parameter ( new = 10 )
  569.       parameter ( old = 11 )
  570. c
  571.       common / chars / ascii, inline, outnew, outold
  572.       character*1      ascii
  573.       character*(linp) inline
  574.       character*(pend) outnew, outold
  575. c
  576.       common / fields / flen(flds), fpos(flds), fptr, fquo(flds)
  577.       logical fquo
  578. c
  579.       common / intgrs / added, chged, deled, haderr, nlines, olines
  580. c
  581.       character*(pend) splits, temp
  582.  
  583.  
  584. c-----------------------------------------------------------------------
  585. c
  586. c     1) preset the input pointer and result string
  587. c     2) loop for each field
  588. c        a) build a temporary string from it
  589. c        b) right justify the field if it is not quote-mark-bracketed
  590. c        c) move the temporary string into the result string
  591. c     3) move the result string into the appropriate output string
  592. c
  593. c-----------------------------------------------------------------------
  594.  
  595.       inptr = 1
  596.       splits = " "
  597. c
  598.       do 20 fptr = 1, flds-1
  599.          if (fquo(fptr)) inptr = inptr + 1
  600.          temptr = 1
  601.    10    if ((fquo(fptr).and.inline(inptr:inptr).ne."""") .or.
  602.      *       (.not.fquo(fptr).and.inline(inptr:inptr).ne.",")) then
  603.             if (temptr .gt. flen(fptr)) then
  604.                haderr = newold
  605.                return
  606.             endif
  607.             temp(temptr:temptr) = inline(inptr:inptr)
  608.             temptr = temptr + 1
  609.             inptr = inptr + 1
  610.             go to 10
  611.          endif
  612.          if (fquo(fptr)) then
  613.             inptr = inptr + 2
  614.             splits(fpos(fptr):fpos(fptr)+temptr-1-1) = temp(1:temptr-1)
  615.          else
  616.             inptr = inptr + 1
  617.             splits(fpos(fptr+1)-temptr+1:fpos(fptr+1)-1) = 
  618.      *         temp(1:temptr-1)
  619.          endif
  620.    20 continue
  621. c
  622.       if (newold .eq. old) then
  623.          outold = splits
  624.       else
  625.          outnew = splits
  626.       endif
  627.       return
  628. c
  629.       end
  630.