home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / phvm.zip / mkphvm.cmd < prev    next >
OS/2 REXX Batch file  |  1998-06-11  |  25KB  |  656 lines

  1. /*****************************************************************************/
  2. /* MKHVM.CMD                                                             1.0 */
  3. /*****************************************************************************/
  4. /* Make your own Personal Hobbes Virtual Mirror                              */
  5. /*****************************************************************************/
  6. /*****************************************************************************/
  7. /* Permission to use this program for any purpose is hereby granted without  */
  8. /* fee, provided that the author's name not be used in advertising or        */
  9. /* publicity pertaining to distribution of the software without specific     */
  10. /* written prior permision.                                                  */
  11. /*                                                                           */
  12. /* THIS SOFTWARE PACKAGE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED      */
  13. /* WARRANTY.                                                                 */
  14. /* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE PACKAGE, */
  15. /* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.          */
  16. /* IN NO EVENT SHALL THE AUTHOR OR ANY PERSON OR INSTITUTION ASSOCIATED WITH */
  17. /* THIS PRODUCT BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT OR CONSEQUENTIAL */
  18. /* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR     */
  19. /* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS   */
  20. /* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF    */
  21. /* THIS SOFTWARE PACKAGE.                                                    */
  22. /*****************************************************************************/
  23. /*****************************************************************************/
  24. /* Written by R.H.LindengrĂ¼n in 1998   Internet:rhlindengrun@mail.telepac.pt */
  25. /*****************************************************************************/
  26.  
  27. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  28. call SysLoadFuncs
  29.  
  30. /* MUST CHANGE MUST CHANGE MUST CHANGE MUST CHANGE MUST CHANGE MUST CHANGE   */
  31. /* This is the variable where you must your e-mail address as the WebMaster  */
  32. /* of this mirror site                                                       */
  33. WebMaster='rhlindengrun@mail.telepac.pt'
  34.  
  35.  
  36. /* CHANGE AT WILL CHANGE AT WILL CHANGE AT WILL CHANGE AT WILL CHANGE AT WILL*/
  37. /* This variable controls if the files begining with "00", like 00global.txt */
  38. /* shoul be hidden (=1) or not (=0)                                          */
  39. Hide00Files=0
  40. /* This variable controls if pages will be made using the <TABLE> tag (=1)   */
  41. /* or not (=0).(Have you noticed any browser not suppoting tables lately ?)  */
  42. TableEnable=1
  43. /* This is the name of the first file that will be created. I called it this */
  44. /* name so that my HTTPD could load it by default.                           */
  45. MainFile='index.html'
  46. /* Where you put your own comments to a file in Hobbes                       */
  47. CommentsFile='comments.hvm'
  48. /* Where you assign a diferent URL or icon to a file in Hobbes               */
  49. LocalFile='local.hvm'
  50. /* Where you assign a diferent icon to each file extension (zip, gif, etc...)*/
  51. IconFile='icon.hvm'
  52.  
  53.  
  54. /* UNLIKELY TO CHANGE UNLIKELY TO CHANGE UNLIKELY TO CHANGE UNLIKELY TO CHANG*/
  55. /* The number of words in a date. It could be like "1998/01/01" (=1) word or */
  56. /* like "Jan 01 1998" (=3) words. Check it if some thing goes wrong.         */
  57. WordsInDate=1
  58. /* This is the URL pointing to the Hobbes root.                              */
  59. HobbesRoot='ftp://hobbes.nmsu.edu'
  60. /* This is the name of the file we are analyzing. Don't forget to update the */
  61. /* file often to reflect last changes in Hobbes structure.                   */
  62. InputFile='00global.txt'
  63.  
  64.  
  65. /* YOU'R AT YOUR OWN NOW YOU'R AT YOUR OWN NOW YOU'R AT YOUR OWN NOW YOU'R AT*/
  66. SubDirStem.0=1
  67. SubDirStem.1=MainFile
  68.  
  69. HVMLastUpdate='?????'
  70. HVMCurDir=''
  71. HVMCurRoot=''
  72.  
  73. LocalStem.0=0
  74. IconStem.0=0
  75. CommentStem.0=0
  76.  
  77. CurRecStem.0=6
  78. CurRecStem.icon=''
  79. CurRecStem.name=''
  80. CurRecStem.URL=''
  81. CurRecStem.size=''
  82. CurRecStem.date=''
  83. CurRecStem.info=''
  84.  
  85. CurPageStem.0=6
  86. CurPageStem.name=MainFile
  87. CurPageStem.title='Root of Hobbes Archive'
  88. CurPageStem.directory=''
  89. CurPageStem.parent=MainFile
  90. CurPageStem.previous=MainFile
  91. CurPageStem.records=0
  92.  
  93. ArchiveStem.0=0
  94. ArchiveStem.FileID=''
  95. ArchiveStem.PathID=''
  96. ArchiveStem.FoundFile=''
  97. ArchiveStem.Sudjest=''
  98.  
  99.    call Prepare
  100.  
  101.    call MainPage CurPageStem.name
  102.  
  103.    call LineIn InputFile,1,0
  104.    do while Lines(InputFile)
  105.  
  106.       call ProccessLine LineIn(InputFile)
  107.  
  108.    end
  109.  
  110.    call MakeFooter
  111.    call LineOut InputFile
  112.    call ShowLostFiles
  113. return
  114.  
  115. /*---------------------------------------------------------------------------*/
  116. /* ProccessLine(Line)                                                        */
  117. /*...........................................................................*/
  118. /* The main processing logic                                                 */
  119. /*---------------------------------------------------------------------------*/
  120. ProccessLine:
  121. parse arg line
  122.  
  123.    /* This is an empty line: Nothing to do */
  124.    if line = '' then do
  125.       return
  126.    end
  127.  
  128.    /* Begins with ' ' or TAB then add to previous line as a multiline comment*/
  129.    if substr(line,1,1)=' ' | substr(line,1,1)='09'x then do
  130.       call MakeRestOfComments line
  131.       return
  132.    end
  133.  
  134.    /* We don't need spaces any more */
  135.    line=strip(line)
  136.  
  137.    /* If begins with a "." or "/" and ends with a ":" this is a new directory */
  138.    if (substr(line,1,1) = '.' | substr(line,1,1) = '/' ) & substr(line,length(line),1)=':' then do
  139.       call MakeFooter
  140.       call MakeNewPage line
  141.       return
  142.    end
  143.  
  144.    /* If the first word ends with a "/" then this line is a subdirectory */
  145.    if right(subword(line,1,1),1)='/' then do
  146.       call RegisterSubDir line
  147.       call MakeDirRef line
  148.       return
  149.    end
  150.  
  151.    /* At this point it must be a regular file record */
  152.    call MakeFileRef line
  153.  
  154. return
  155.  
  156. /*---------------------------------------------------------------------------*/
  157. /* Prepare                                                                   */
  158. /*...........................................................................*/
  159. /* Loads configuration files and prepares the running environment            */
  160. /*---------------------------------------------------------------------------*/
  161. Prepare:
  162.  
  163.    rc=SysFileTree(InputFile,'file',"O")
  164.    HVMCurRoot=translate(substr(file.1,1,lastpos('\',file.1)-1))
  165.  
  166.    say 'Root:'HVMCurRoot
  167.  
  168.    HVMLastUpdate = stream(InputFile,'c','query datetime')
  169.  
  170.    n=1
  171.    call LineIn LocalFile,1,0
  172.    do while Lines(LocalFile)
  173.       ref=strip(LineIn(LocalFile))
  174.       if substr(ref,1,2)='./' then do
  175.          LocalStem.0=n
  176.          LocalStem.n.orig=substr(subword(ref,1,1),3)
  177.          LocalStem.n.dest=subword(ref,2,1)
  178.          LocalStem.n.icon=subword(ref,3,1)
  179.          n=n+1
  180.       end
  181.    end
  182.    call lineout LocalFile
  183.  
  184.    n=1
  185.    call LineIn IconFile,1,0
  186.    do while Lines(IconFile)
  187.       ref=strip(LineIn(IconFile))
  188.       if substr(ref,1,1)\='#' then do
  189.          IconStem.0=n
  190.          IconStem.n.orig=subword(ref,1,1)
  191.          IconStem.n.dest=translate(subword(ref,2,1))
  192.          n=n+1
  193.       end
  194.    end
  195.    call lineout IconFile
  196.  
  197.    n=1
  198.    call LineIn CommentsFile,1,0
  199.    do while Lines(CommentsFile)
  200.       ref=strip(LineIn(CommentsFile))
  201.       if substr(ref,1,2)='./' then do
  202.          CommentStem.0=n
  203.          CommentStem.n.orig=substr(subword(ref,1,1),3)
  204.          CommentStem.n.info=subword(ref,2)
  205.          n=n+1
  206.       end
  207.    end
  208.    call lineout CommentsFile
  209.  
  210.    call ListArchived
  211. return
  212.  
  213. /*---------------------------------------------------------------------------*/
  214. /* ListArchived                                                              */
  215. /*...........................................................................*/
  216. /*                                                                           */
  217. /*---------------------------------------------------------------------------*/
  218. ListArchived:
  219.    rc=SysFileTree('*.*','arch',"DO")
  220.    do y=1 to arch.0
  221.       rc=SysFileTree(arch.y'\*.*','file',"FOS")
  222.       do n=1 to file.0
  223.          ArchiveStem.FileID.n=translate(substr(file.n,lastpos('\',file.n)+1))
  224.          ArchiveStem.PathID.n=translate(substr(file.n,1,lastpos('\',file.n)-1))
  225.          ArchiveStem.PathID.n=substr(ArchiveStem.PathID.n,length(HVMCurRoot)+2)
  226.          ArchiveStem.FoundFile.n=0
  227.          ArchiveStem.Sudjest.n=''
  228.          ArchiveStem.0=n
  229.       end
  230.    end
  231. return
  232. /*---------------------------------------------------------------------------*/
  233. /* ShowLostFiles                                                             */
  234. /*...........................................................................*/
  235. /*                                                                           */
  236. /*---------------------------------------------------------------------------*/
  237. ShowLostFiles:
  238. FoundAny=0
  239.    say ''
  240.    do y=1 to ArchiveStem.0
  241.       if ArchiveStem.FoundFile.y=0 then do
  242.          if ArchiveStem.Sudjest.y='' then do 
  243.             say 'Del 'ArchiveStem.PathID.y'\'ArchiveStem.FileID.y
  244.          end
  245.          else do
  246.             say 'Move 'ArchiveStem.PathID.y'\'ArchiveStem.FileID.y' 'ArchiveStem.Sudjest.y'\'ArchiveStem.FileID.y
  247.          end
  248.          FoundAny=1
  249.       end
  250.    end 
  251.    if FoundAny=0 then
  252.       say 'Found no lost files'
  253.    else
  254. return
  255. /*---------------------------------------------------------------------------*/
  256. /* FindFile                                                                  */
  257. /*...........................................................................*/
  258. /*                                                                           */
  259. /*---------------------------------------------------------------------------*/
  260. FindFile:
  261. FilePath=arg(1)
  262. FileName=arg(2)
  263.  
  264. FilePath=translate(FilePath)
  265. FilePath=translate(FilePath,'\','/')
  266. FileName=translate(FileName)
  267.  
  268. retval=0   
  269.  
  270.    do y=1 to ArchiveStem.0
  271.       if ArchiveStem.FileID.y=FileName then do
  272.          if ArchiveStem.PathID.y=FilePath then do
  273.             ArchiveStem.FoundFile.y=1
  274.             retval=1
  275.             leave
  276.          end
  277.          else do
  278.             ArchiveStem.Sudjest.y=FilePath
  279.          end
  280.       end
  281.    end 
  282. return retval
  283. /*---------------------------------------------------------------------------*/
  284. /* MakeDirRef(Line)                                                          */
  285. /*...........................................................................*/
  286. /*                                                                           */
  287. /*---------------------------------------------------------------------------*/
  288. MakeDirRef:
  289. parse arg line
  290.  
  291.    if words(line)>1 then do
  292.       CurRecStem.name=subword(line,1,1)
  293.       CurRecStem.size=subword(line,2,1)
  294.       CurRecStem.date=subword(line,3,WordsInDate)
  295.       CurRecStem.info=subword(line,3+WordsInDate)
  296.    end
  297.    else do
  298.       CurRecStem.name=subword(line,1,1)
  299.       CurRecStem.size=''
  300.       CurRecStem.date=''
  301.       CurRecStem.info=''
  302.    end
  303.    CurRecStem.icon='vmfilsub.gif'
  304.    if HVMCurdir ='' then
  305.       CurRecStem.URL=MakePageName(CurRecStem.name)
  306.    else
  307.       CurRecStem.URL=MakePageName(HVMCurdir'/'CurRecStem.name)
  308.    call MakeLine
  309. return
  310. /*---------------------------------------------------------------------------*/
  311. /* MakeFileRef(Line)                                                         */
  312. /*...........................................................................*/
  313. /*                                                                           */
  314. /*---------------------------------------------------------------------------*/
  315. MakeFileRef:
  316. parse arg line
  317.  
  318.    CurPageStem.records=CurPageStem.records+1
  319.  
  320.    CurRecStem.icon=''
  321.    if words(line)>1 then do
  322.       CurRecStem.name=subword(line,1,1)
  323.       CurRecStem.size=subword(line,2,1)
  324.       CurRecStem.date=subword(line,3,WordsInDate)
  325.       CurRecStem.info=subword(line,3+WordsInDate)
  326.    end
  327.    else do
  328.       CurRecStem.name=subword(line,1,1)
  329.       CurRecStem.size=''
  330.       CurRecStem.date=''
  331.       CurRecStem.info=''
  332.    end
  333.    CurRecStem.icon=GetImageFile(CurRecStem.name)
  334.    CurRecStem.URL=GetReferenceFile(CurRecStem.name)
  335.    call MakeLine
  336.  
  337.  
  338. return
  339. /*---------------------------------------------------------------------------*/
  340. /* GetReferenceFile(FileName)                                                */
  341. /*...........................................................................*/
  342. /*                                                                           */
  343. /*---------------------------------------------------------------------------*/
  344. GetReferenceFile:
  345. parse arg FileName
  346. FilePath=''
  347.  
  348.    if HVMCurdir ='' then
  349.       Reference=FileName
  350.    else
  351.       Reference=HVMCurdir'/'FileName
  352.  
  353.    if LocalStem.0>0 then do
  354.       do n=1 to LocalStem.0
  355.          if LocalStem.n.orig = Reference then do
  356.             if LocalStem.n.dest \= '?' then do
  357.                FilePath=LocalStem.n.dest
  358.             end
  359.             if LocalStem.n.icon \= '' then
  360.                CurRecStem.icon=LocalStem.n.icon
  361.             leave
  362.          end
  363.       end
  364.       if FilePath='' then
  365.          FilePath=HobbesRoot'/'Reference
  366.    end
  367.    else do
  368.       FilePath=HobbesRoot'/'Reference
  369.    end
  370.  
  371.    if CommentStem.0>0 then do
  372.       do n=1 to CommentStem.0
  373.          if CommentStem.n.orig = Reference then do
  374.             CurRecStem.info=CurRecStem.info' <BR> 'CommentStem.n.info
  375.             leave
  376.          end
  377.       end
  378.    end
  379.  
  380. return FilePath
  381. /*---------------------------------------------------------------------------*/
  382. /* RegisterSubDir(Line)                                                      */
  383. /*...........................................................................*/
  384. /*                                                                           */
  385. /*---------------------------------------------------------------------------*/
  386. RegisterSubDir:
  387. parse arg line
  388.  
  389.    DirName=subword(line,1,1)
  390.    DirInfo=subword(line,2)
  391.  
  392.  
  393.    found=0
  394.  
  395.    if HVMCurdir = '' then
  396.       RealName=DirName
  397.    else
  398.       RealName=HVMCurdir'/'DirName
  399.    CurNum=SubDirStem.0
  400.    do n=2 to CurNum
  401.       if SubDirStem.n=RealName then do
  402.          Found=n
  403.          leave
  404.       end
  405.    end
  406.    if found =0 then do
  407.       CurNum=CurNum+1
  408.       SubDirStem.0=CurNum
  409.       SubDirStem.CurNum = RealName
  410.    end
  411.  
  412. return
  413.  
  414. /*---------------------------------------------------------------------------*/
  415. /* MakePageName(file)                                                        */
  416. /*...........................................................................*/
  417. /*                                                                           */
  418. /*---------------------------------------------------------------------------*/
  419. MakePageName:
  420. parse arg file
  421.  
  422. RetName=''
  423.  
  424.    do n=2 to SubDirStem.0
  425.       if SubDirStem.n=file then do
  426.          RetName='HVM'n'.html'
  427.          leave
  428.       end
  429.    end
  430.  
  431. return RetName
  432.  
  433.  
  434. /*---------------------------------------------------------------------------*/
  435. /* MakeNewPage(Line)                                                         */
  436. /*...........................................................................*/
  437. /*                                                                           */
  438. /*---------------------------------------------------------------------------*/
  439. MakeNewPage:
  440. parse arg line
  441.  
  442.    CurPageStem.previous  = CurPageStem.name
  443.  
  444.    if substr(line,1,1) = '.' then do
  445.       HVMCurdir=substr(line,3,length(line)-3)
  446.    end
  447.    else do
  448.       HVMCurdir=substr(line,2,length(line)-2)
  449.    end
  450.  
  451.    if substr(line,1,9) = '/net/ftp/' then do
  452.       HVMCurdir=substr(line,10,length(line)-10)
  453.    end
  454.  
  455.    CurPageStem.directory = HVMCurdir
  456.    CurPageStem.title     = HVMCurdir
  457.    CurPageStem.name      = MakePageName(HVMCurdir'/')
  458.    CurPageStem.parent    = GetParentFile(HVMCurdir)
  459.    CurPageStem.records   = 0
  460.    call MakeHeader
  461.  
  462.    CurRecStem.icon = 'vmfilpar.gif'
  463.    CurRecStem.name = 'Parent Directory'
  464.    CurRecStem.URL  = CurPageStem.parent
  465.    CurRecStem.size = ''
  466.    CurRecStem.date = ''
  467.    CurRecStem.info = ''
  468.    call MakeLine
  469.  
  470. return
  471.  
  472. /*---------------------------------------------------------------------------*/
  473. /* GetParentFile(Path)                                                       */
  474. /*...........................................................................*/
  475. /*                                                                           */
  476. /*---------------------------------------------------------------------------*/
  477. GetParentFile:
  478. parse arg path
  479.  
  480.    position=lastpos('/',path)
  481.    if position = 0 then do
  482.       filename=SubDirStem.1
  483.    end
  484.    else do
  485.       filename=MakePageName(substr(path,1,position))
  486.    end
  487.  
  488. return filename
  489.  
  490. /*---------------------------------------------------------------------------*/
  491. /* MainPage(FileName)                                                        */
  492. /*...........................................................................*/
  493. /*                                                                           */
  494. /*---------------------------------------------------------------------------*/
  495. MainPage:
  496. parse arg FileName
  497.  
  498.    call MakeHeader
  499.  
  500. return
  501.  
  502. /*---------------------------------------------------------------------------*/
  503. /* GetImage(FileName)                                                        */
  504. /*...........................................................................*/
  505. /*                                                                           */
  506. /*---------------------------------------------------------------------------*/
  507. GetImageFile:
  508. parse upper arg FileName
  509. IconFile='vmfilfil.gif'
  510.  
  511.    FileType=substr(FileName,pos('.',FileName)+1)
  512.  
  513.    if IconStem.0>0 then do
  514.       do n=1 to IconStem.0
  515.          if wordpos(FileType,IconStem.n.dest)>0 then do
  516.             IconFile=IconStem.n.orig
  517.             leave
  518.          end
  519.       end
  520.    end
  521.  
  522. return IconFile
  523.  
  524.  
  525. /*---------------------------------------------------------------------------*/
  526. /* MakeHeader                                                                */
  527. /*...........................................................................*/
  528. /* Builds the page Header                                                    */
  529. /*---------------------------------------------------------------------------*/
  530. MakeHeader:
  531.  
  532.    say CurPageStem.name' 'CurPageStem.directory
  533.    call SysFileDelete CurPageStem.name
  534.    call lineout CurPageStem.name, '<HTML>'
  535.    call lineout CurPageStem.name, '<HEAD>'
  536. /* call lineout CurPageStem.name, '<META http-equiv="content-type" content="text/html; charset=ISO-8859-2">' */
  537.    call lineout CurPageStem.name, '<TITLE>Personal Hobbes Virtual Mirror ('CurPageStem.title')</TITLE>'
  538.    call lineout CurPageStem.name, '</HEAD>'
  539.    call lineout CurPageStem.name, ''
  540.    call lineout CurPageStem.name, '<BODY background="vmbackgr.gif">'
  541.    call lineout CurPageStem.name, '<img src = "vmbanner.jpg"  ALT=" ">'
  542.    call lineout CurPageStem.name, '<CENTER>'
  543.    call lineout CurPageStem.name, '<H1>Personal Hobbes Virtual Mirror</H1>'
  544.    call lineout CurPageStem.name, '<H2>'translate(CurPageStem.title)'</H2>'
  545.    call lineout CurPageStem.name, '<HR>'
  546.    call lineout CurPageStem.name, 'Switch to a different mirror site:<BR>'
  547.    call lineout CurPageStem.name, '[ <A HREF = "http://www.columbia.edu/~chs11/hvm/HVMindex.hobbes.html">HVM</A> ] '
  548.    call lineout CurPageStem.name, '[ <A HREF = "http://www.teamos2.org/hvm/Hobbes/HVMindex.hobbes.html">Team OS/2</A> ] '
  549.    call lineout CurPageStem.name, '[ <A HREF = "http://www.math.fu-berlin.de:80/~rene/os2/hvm/HVMindex.fu-berlin.html">FU Berlin</A> ] '
  550.    call lineout CurPageStem.name, '[ <A HREF = "http://sunsite.nus.sg/pub/os2/hvm/HVMindex.hobbes.html">SunSite</A> ] '
  551.    call lineout CurPageStem.name, '[ <A HREF = "http://www.uni-leipzig.de/~os2/HVM/HVMindex.uni-leipzig.html">Leipzig</A> ] '
  552.    call lineout CurPageStem.name, '[ <A HREF = "http://www.peryt.waw.pl/produkty/software/ibm/hvm/HVMindex.hobbes.html">Peryt</A> ] '
  553.    call lineout CurPageStem.name, '<HR>'
  554.    call lineout CurPageStem.name, '</CENTER>'
  555.    if TableEnable then
  556.       call lineout CurPageStem.name, '<TABLE>'
  557.    else
  558.       call lineout CurPageStem.name, '<PRE>'
  559.  
  560. return
  561.  
  562. /*---------------------------------------------------------------------------*/
  563. /* MakeLine                                                                  */
  564. /*...........................................................................*/
  565. /* Builds each page line                                                     */
  566. /*---------------------------------------------------------------------------*/
  567. MakeLine:
  568.  
  569.    if \(Hide00Files = 1 & substr(CurRecStem.name,1,2) = '00') then do
  570.  
  571.       if TableEnable then do
  572.          call lineout CurPageStem.name, '<TR VALIGN="top">'
  573.          if CurPageStem.directory = '' then do
  574.             fname=CurRecStem.name
  575.          end
  576.          else do
  577.             fname=CurPageStem.directory'/'CurRecStem.name
  578.          end
  579.  
  580.          call FindFile CurPageStem.directory, CurRecStem.name
  581.  
  582.          rc=SysFileTree(fname,'file',"FO")
  583.          if file.0>0 then do
  584.             call lineout CurPageStem.name, '<TD><A HREF="'fname'"><IMG SRC="vmfilcas.gif" ALT=" " BORDER=0></A></TD>'
  585.          end
  586.          else do
  587.             call lineout CurPageStem.name, '<TD></TD>'
  588.          end
  589.          call lineout CurPageStem.name, '<TD ALIGN="center"><IMG SRC="'CurRecStem.icon'" ALT=" "></TD>'
  590.          call lineout CurPageStem.name, '<TD NOWRAP="NOWRAP"><A HREF="'CurRecStem.URL'">'CurRecStem.name'</A></TD>'
  591.          call lineout CurPageStem.name, '<TD ALIGN="right">'CurRecStem.size'</TD>'
  592.          call lineout CurPageStem.name, '<TD NOWRAP="NOWRAP">'CurRecStem.date'</TD>'
  593.          call lineout CurPageStem.name, '<TD>'CurRecStem.info'</TD>'
  594.          call lineout CurPageStem.name, '</TR>'
  595.       end
  596.       else do
  597.          call lineout CurPageStem.name, '<IMG SRC="'CurRecStem.icon'" ALT=" "><A HREF="'CurRecStem.URL'">'CurRecStem.Name'</A>'CurRecStem.Size' 'CurRecStem.Date' 'CurRecStem.Info
  598.       end
  599.    end
  600.  
  601. return
  602.  
  603.  
  604. /*---------------------------------------------------------------------------*/
  605. /* MakeRestOfComments(Line)                                                  */
  606. /*...........................................................................*/
  607. /* When multiline comment appears                                            */
  608. /*---------------------------------------------------------------------------*/
  609. MakeRestOfComments:
  610. parse arg line
  611.  
  612.    call lineout CurPageStem.name, line
  613.  
  614. return
  615.  
  616.  
  617. /*---------------------------------------------------------------------------*/
  618. /* MakeFooter                                                                */
  619. /*...........................................................................*/
  620. /* Builds the page footer                                                    */
  621. /*---------------------------------------------------------------------------*/
  622. MakeFooter:
  623.  
  624.    if TableEnable then
  625.       call lineout CurPageStem.name, '</TABLE>'
  626.    else
  627.       call lineout CurPageStem.name, '</PRE>'
  628.    call lineout CurPageStem.name, '<P>'
  629.    call lineout CurPageStem.name, 'Total: 'CurPageStem.records' Files'
  630.    call lineout CurPageStem.name, '<CENTER>'
  631.    call lineout CurPageStem.name, '<HR>'
  632.    call lineout CurPageStem.name, '<A HREF="'SubDirStem.1'"><img src = "vmbuthom.gif"  ALT="[ Home Page ]" BORDER=0></A>'
  633.    call lineout CurPageStem.name, '<A HREF="'CurPageStem.parent'"><img src = "vmbutpre.gif"  ALT="[ Previous Page ]" BORDER=0></A>'
  634.    call lineout CurPageStem.name, '<A HREF="mailto:'WebMaster'"><img src = "vmbutmal.gif"  ALT="[ E-mail ]" BORDER=0></A>'
  635.    call lineout CurPageStem.name, '<A HREF="PHVM.html#Usage"><img src = "vmbuthlp.gif"  ALT="[ Help ]" BORDER=0></A>'
  636.    call lineout CurPageStem.name, '<HR>'
  637.    call lineout CurPageStem.name, '</CENTER>'
  638.    call lineout CurPageStem.name, 'Last update: 'HVMLastUpdate
  639.    call lineout CurPageStem.name, '<BR>'
  640.    call lineout CurPageStem.name, 'Directory: 'CurPageStem.title
  641.    call lineout CurPageStem.name, '<P>'
  642.    call lineout CurPageStem.name, 'This index was created using the '
  643.    call lineout CurPageStem.name, '<A HREF="PHVM.html"> Personal Hobbes Virtual Mirror</A>'
  644.    call lineout CurPageStem.name, ' (PHVM) software.'
  645.    call lineout CurPageStem.name, '<BR>'
  646.    call lineout CurPageStem.name, 'For more information on PHVM, email to '
  647.    call lineout CurPageStem.name, '<A HREF="mailto:rhlindengrun@mail.telepac.pt">Ricardo H. Lindengrun</A>'
  648.    call lineout CurPageStem.name, '.'
  649.    call lineout CurPageStem.name, ''
  650.    call lineout CurPageStem.name, '</BODY>'
  651.    call lineout CurPageStem.name, '</HTML>'
  652.  
  653.    call lineout CurPageStem.name
  654.  
  655. return
  656.