home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol293 / toc.lbr / TBLCTENT.DOC next >
Encoding:
Text File  |  1986-12-17  |  4.5 KB  |  89 lines

  1. .op
  2.  WordStar file utility  --  9-21-85  Ver 1.0P
  3.  Copyright  1985  by Dean A. Fields
  4.  
  5.      Thi≤á prograφá i≤ releaseΣ t∩ thσ Publiπ Domaiε anΣá ma∙á bσ ì
  6. freel∙á distributeΣá anΣ copied¼á bu⌠ ma∙ no⌠ bσ solΣ withou⌠áthσ ì
  7. author≤ writteε permission.
  8.  
  9.     All Rights Reserved
  10.  
  11.                                               
  12.  Written in TURBO PASCAL Ver. 3.0             
  13.      on a COMPAQ                              
  14.                                               
  15.  Tested on a:                                 
  16.      COMPAQ        MsDos 3.1                  
  17.      KAYPRO 4-84   CP/M 2.2
  18.                                               
  19.      T∩ usσ thi≤ prograφ, typσ thσ prograφ name¼áTBLCTENT¼ a⌠ thσ ì
  20. DO╙á prompt¼á anΣ pres≤ thσ returε key«á  Thσ prograφ wil∞á firs⌠ ì
  21. announcσá itself¼á anΣ theε promp⌠ fo≥ thσ namσ oµ thσ filσá tha⌠ ì
  22. the table of content is to be created from.
  23.  
  24.      Thi≤á prograφá create≤ ß Tablσ oµ Content≤á fo≥á ßá WordSta≥ ì
  25. documen⌠á file«á  TBLCTEN╘á look≤ fo≥ contro∞á codes¼á anΣá take≤ ì
  26. whateve≥á i≤ betweeε theφ anΣ place≤ i⌠ iε thσ tablσ oµá content≤ ì
  27. file«  Thσ contro∞ code≤ are¼ ^╥ t∩ star⌠ anΣ sto≡ inclusioε int∩ ì
  28. thσá tablσá oµá content≤ file«á  The∙ arσ placeΣ iε thσá filσá b∙ ì
  29. enterinτá ßá ^P^╥ a⌠ thσ beginninτ anΣ enΣ oµ thσá tex⌠á yo⌡áwan⌠ ì
  30. includeΣ int∩ thσ tablσ oµ content≤ file«á  Thσ ^R'≤ shoulΣ neve≥ ì
  31. havσá WordSta≥ do⌠ command≤ betweeε them«á  Thσ namσ oµ thσ tablσ ì
  32. oµá content≤ filσ i≤ thσ samσ a≤ thσ inpu⌠ document¼á excep⌠á thσ ì
  33. filσá typσá whicΦ i≤ ".TBC"«á  Thσ maximuφ numbe≥á oµá character≤ ì
  34. alloweΣá iεá ßá Tablσ oµ Conten⌠ entr∙ i≤ 55¼á iµá morσá theεá 5╡ ì
  35. character≤á appea≥ betweeε thσ ^R's¼á theε thσ Tablσá oµá Conten⌠ ì
  36. entr∙ i≤ truncateΣ t∩ 5╡ characters.
  37.                                               
  38.      Afte≥á yo⌡ ente≥ thσ filσ namσ tha⌠ thσ tablσ oµ conten⌠á i≤ ì
  39. t∩á bσá createΣá from¼á TBLCTEN╘ wil∞ tr∙ t∩ opeε tha⌠á filσá fo≥ ì
  40. input«á  Iµ thσ filσ caε no⌠ bσ openeΣ (ie« becausσ i⌠ caε no⌠ bσ ì
  41. founΣá o≥á something⌐á thσá conditioε i≤á reporteΣá anΣá yo⌡á arσ ì
  42. reprompteΣ fo≥ aε inpu⌠ filσ name«á  Thi≤ prograφ caε bσá aborteΣ ì
  43. a⌠á anytimσ b∙ ß ^C«á  Iµ thσ inpu⌠ filσ namσ i≤ found¼á theε thσ ì
  44. outpu⌠á filσá (Tablσ oµ Conten⌠ file⌐ i≤á checkeΣá for«á  Iµá thσ ì
  45. outpu⌠á filσá alread∙ exist¼á yo⌡ arσ giveε thσ optioε oµá eithe≥ ì
  46. deletinτ i⌠ (overwrittinτ i⌠ )¼ o≥ cancelinτ thσ program«  Iµ yo⌡ ì
  47. deletσá it¼á theε processinτ continue≤ a≤ iµ thσ filσá haΣá neve≥ ì
  48. existed.
  49.  
  50.      Durinτá processing¼á TBLCTEN╘á report≤á page≤á tha⌠á i⌠á ha≤ ì
  51. scanneΣáá fo≥á tablσá oµá conten⌠á entries╗áá s∩á yo⌡á caεáá tel∞ ì
  52. approximatel∙á ho≈á fa≥á yo⌡ arσ iε thσá inpu⌠á document«á  Page≤ ì
  53. covereΣ b∙ ß .O╨ command arσ no⌠ counted« 
  54. .paè    Thσ followinτ describe≤ ho≈ thσ WordSta≥ .OP¼ .PA¼ anΣ .P╬ ε ì
  55. commands are treated by TBLCTENT:
  56.  
  57. ááááááááá.OPááácause≤á thσá prograφ t∩ sto≡ searchinτá fo≥á Tablσì
  58. áááááááááááááááoµ Conten⌠ information¼ becausσ .O╨ turn≤ ofµ pagσì
  59. ááááááááááááááánumbe≥á anΣá thereforσ therσ i≤ n∩ pagσ numbe≥á t∩ì
  60. áááááááááááááááassociatσ t∩ thσ Tablσ oµ Conten⌠ entry¼á anΣ thu≤ì
  61. ááááááááááááááán∩á reasoεá t∩á repor⌠ ß Tablσ oµá Conten⌠á entry«  ì
  62. áááááááááááááááTablσá oµ Conten⌠ searchinτ resume≤ witΦ thσá nex⌠ ì
  63. ááááááááááááááá.PN n command encountered.
  64.  
  65. ááááááááá.PAááácause≤ thσ pagσ numbe≥ variablσ t∩ bσ incremented
  66.  
  67. ááááááááá.PN náácause≤á thσá pagσá numbe≥ variablσ t∩á bσá se⌠át∩ ì
  68. ááááááááááááááánumbe≥á εá oµ thσ .P╬ ε command«á  εá caεá no⌠á bσ ì
  69. ááááááááááááááálarge≥ thaε 9999¼ unles≤ provision≤ arσ madσ t∩ d∩ ì
  70. áááááááááááááááthe following:
  71. áááááááááááááááááááá1⌐á - MaxNuφá iεá thσ CONS╘á sectioεá a⌠á thσ ì
  72. áááááááááááááááááááábeginninτá oµ thσ prograφ mus⌠ bσ changeΣá t∩ ì
  73. ááááááááááááááááááááaccommodate the new size
  74.  
  75. áááááááááááááááááááá2⌐áá - thσáá "CAS┼á pnd°á ofóá structurσáá iε ì
  76. ááááááááááááááááááááProcedurσ test_linσ mus⌠ bσ changeΣ t∩ handlσ ì
  77. ááááááááááááááááááááthe larger page numbers
  78.  
  79. áááááááááááááááááááá3⌐áá - Procedurσáá translate_linσáá mus⌠áá bσ ì
  80. áááááááááááááááááááámodifieΣá t∩áaccommodatσá thσá ne≈á TB├áálinσ ì
  81. ááááááááááááááááááááformat¼ááá whicΦáá include≤áá balancinτáá anΣ ì
  82. áááááááááááááááááááácentering of the TBC entry.
  83.  
  84.      Oncσá thσ Tablσ oµ Conten⌠ filσ ha≤ beeε created¼á i⌠ caε bσ ì
  85. editeΣá witΦá WordSta≥ t∩ adΣ iε printe≥ contro∞ code≤á fo≥á you≥ ì
  86. specifiπ typσ oµ printer«á  Oε somσ machine≤ thσ Tablσ oµ Conten⌠ ì
  87. filσ wil∞ contaiε ß fe≈ ^@'≤ a⌠ thσ enΣ oµ thσ file╗á Thσ ^@'≤ d∩ ì
  88. no⌠á print«á  Yo⌡á caεá ignorσ theφ o≥ deletσ theφá i⌠á make≤á n∩ ì
  89. difference.