Expanded description
| Topic |
Description |
| Name |
for2htmldocs |
| Synopsis |
/infobank/programs/html/for2htmldocs/for2htmldocs.for |
| Description |
Program to extract .doc.html files from FORTRAN .for source code.
|
| Author |
Clint Steele 8/29/2002
|
| Modified |
B.F. 11/21/02
added support for "conditional" run so only it only writes
.doc.html file if it doesn't already exist or if the .for
file has a more recent modification date
|
| Opens |
open (unit = 90,
* access = 'sequential',
* form = 'formatted',
* status = 'old',
* name = '/infobank/programs/keep/fortran_programs.keep')
open (unit = 91,
* access = 'sequential',
* form = 'formatted',
* status = 'old',
* name = AFile(1:AFileLength))
open (unit = 92,
* access = 'sequential',
* form = 'formatted',
* status = 'unknown',
* name = AFile(1:AFileLength-4)//'.doc.html')
open (unit = 93,
* access = 'sequential',
* form = 'formatted',
* status = 'unknown',
* name = '/tmp/for2htmldocs.reads.temp')
open (unit = 94,
* access = 'sequential',
* form = 'formatted',
* status = 'unknown',
* name = '/tmp/for2htmldocs.writes.temp')
open (unit = 95,
* access = 'sequential',
* form = 'formatted',
* status = 'unknown',
* name = '/tmp/for2htmldocs.opens.temp')
open (unit = 96,
* access = 'sequential',
* form = 'formatted',
* status = 'unknown',
* name = '/tmp/for2htmldocs.calls.temp')
open (unit = 98,
* access = 'sequential',
* form = 'formatted',
* status = 'unknown',
* name = '/tmp/for2htmldocs.link.temp')
open (unit = 92,
* access = 'append',
* form = 'formatted',
* status = 'unknown',
* name = AFile(1:AFileLength-4)//'.doc.html')
|
| Reads |
read (90, '(t30,q,a)', end = 99)
* AFileLength, AFile(1:AFileLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (98, '(t30,q,a)', end = 69)
* LinkLength, Link(1:LinkLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
read (91, '(q,a)', end = 98)
* ALineLength, ALine(1:ALineLength)
|
| Writes |
write(unit=*, fmt=*)'stat err with docFile'
write(unit=*, fmt=*)'stat err with sourceFile'
write (92, '(a)')
* '<table border="3" align="center">'
write (92, '(a,/)')
* '<caption>'//
* '<b>Expanded description</b>'//
* '</caption>'
write (92, '(a)') ' <tr>'
write (92, '(a)')
* ' <th ID="T1" bgcolor="#00ffff" align="center">'//
* 'Topic'//
* '</th>'
write (92, '(a)')
* ' <th ID="T2" bgcolor="#ccffff" align="center">'//
* 'Description'//
* '</th>'
write (92, '(a)') ' </tr>'
write (92, '(a,/,a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">Name</td>',
* ' <td headers="T2" bgcolor="#ccffff"><pre>'//
* ALine(5:ALineLength)//'</pre></td>',
* ' </tr>'
write (92, '(a,/,a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Synopsis</td>',
* ' <td headers="T2" bgcolor="#ccffff">'//
* '<a href="http://walrus.wr.usgs.gov'//
* AFile(1:AFileLength)//'">'//
* '<pre>'//AFile(1:AFileLength)//'</pre></a></td>',
* ' </tr>'
write (92, '(a,/,a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Description</td>',
* ' <td headers="T2" bgcolor="#ccffff"><pre>',
* ALine(3:ALineLength)
write (92, '(a)')
* ALine(3:ALineLength)
write (92, '(a,/,a)')
* ' </pre></td>',
* ' </tr>'
write (92, '(a,/,a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">Name</td>',
* ' <td headers="T2" bgcolor="#ccffff"><pre>'//
* AFile(NameStart:NameEnd)//
* '</pre></td>',
* ' </tr>'
write (92, '(a,/,a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Synopsis</td>',
* ' <td headers="T2" bgcolor="#ccffff">'//
* '<a href="http://walrus.wr.usgs.gov'//
* AFile(1:AFileLength)//'">'//
* '<pre>'//AFile(1:AFileLength)//'</pre></a></td>',
* ' </tr>'
write (92, '(a,/,a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Description</td>',
* ' <td headers="T2" bgcolor="#ccffff">'//
* '<pre>(none)</pre></td>',
* ' </tr>'
write (Keyword, '(1024x)')
write (92, '(a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* Keyword(1:KeywordLength)//'</td>',
* ' <td headers="T2" bgcolor="#ccffff">'//
* '<pre>',
* ALine(3:ALineLength)
write (92, '(a)')
* ALine(3:ALineLength)
write (92, '(a,/,a)')
* ' </pre></td>',
* ' </tr>'
write (93, '(a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Reads</td>',
* ' <td headers="T2" bgcolor="#ccffff"><pre>'
write (93, '(a)') ALine(6:ALineLength)
write (93, '(a)') ALine(6:ALineLength)
write (94, '(a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Writes</td>',
* ' <td headers="T2" bgcolor="#ccffff"><pre>'
write (94, '(a)') ALine(6:ALineLength)
write (94, '(a)') ALine(6:ALineLength)
write (95, '(a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Opens</td>',
* ' <td headers="T2" bgcolor="#ccffff"><pre>'
write (95, '(a)') ALine(6:ALineLength)
write (95, '(a)') ALine(6:ALineLength)
write (96, '(a,/,a,/,a)')
* ' <tr>',
* ' <td headers="T1" bgcolor="#00ffff">'//
* 'Calls</td>',
* ' <td headers="T2" bgcolor="#ccffff"><pre>'
write (96, '(a)') ALine(6:ALineLength)
write (96, '(a)') ALine(6:NameStart-1)//
* '<a href="http://walrus.wr.usgs.gov'//
* Link(1:LinkLength-4)//'.doc.html">'//
* ALine(NameStart:NameEnd)//'</a>'//
* ALine(NameEnd+1:ALineLength)
write (96, '(a)') ALine(6:ALineLength)
write (93, '(a,/,a)')
* ' </pre></td>',
* ' </tr>'
write (94, '(a,/,a)')
* ' </pre></td>',
* ' </tr>'
write (95, '(a,/,a)')
* ' </pre></td>',
* ' </tr>'
write (96, '(a,/,a)')
* ' </pre></td>',
* ' </tr>'
write (92, '(a)') '</table>'
|
| Calls |
call system ('/infobank/programs/dbase/'//
* 'fortranupdate/fortranupdate')
call stringlen(docFile, docFileLength)
call htmlhead (92, 'InfoBank program -- '//
* AFile(NameStart:AFileLength-4))
call includeit (92,
* '/infobank/programs/html/tools/activities.tabs')
call includeit (92,
* '/infobank/programs/html/tools/more.programs.tabs')
call includeit (92,
* '/infobank/programs/keep/contents.keep')
call changecase ('SMALLS', ALine(1:ALineLength))
call stringlen (Keyword, KeywordLength)
call changecase ('SMALLS', Keyword(1:KeywordLength))
call changecase ('CAPITAL', Keyword(1:1))
call system ('/bin/grep '//
* ALine(NameStart:NameEnd)//'.for$'//
* ' /infobank/programs/keep/fortran_programs.keep'//
* ' > /tmp/for2htmldocs.link.temp')
if (Exists) call system
* ('/bin/cat /tmp/for2htmldocs.opens.temp >> '//
* AFile(1:AFileLength-4)//'.doc.html')
if (Exists) call system
* ('/bin/rm /tmp/for2htmldocs.opens.temp')
if (Exists) call system
* ('/bin/cat /tmp/for2htmldocs.reads.temp >> '//
* AFile(1:AFileLength-4)//'.doc.html')
if (Exists) call system
* ('/bin/rm /tmp/for2htmldocs.reads.temp')
if (Exists) call system
* ('/bin/cat /tmp/for2htmldocs.writes.temp >> '//
* AFile(1:AFileLength-4)//'.doc.html')
if (Exists) call system
* ('/bin/rm /tmp/for2htmldocs.writes.temp')
if (Exists) call system
* ('/bin/cat /tmp/for2htmldocs.calls.temp >> '//
* AFile(1:AFileLength-4)//'.doc.html')
if (Exists) call system
* ('/bin/rm /tmp/for2htmldocs.calls.temp')
call htmlfoot (92, AFile(1:AFileLength-4)//'.doc.html')
|
|