home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume26 / funnlweb / part04 < prev    next >
Encoding:
Text File  |  1993-04-10  |  130.9 KB  |  3,471 lines

  1. Newsgroups: comp.sources.unix
  2. From: ross@spam.adelaide.edu.au (Ross Williams)
  3. Subject: v26i124: funnelweb - a tool for literate programming in C, Part04/20
  4. Sender: unix-sources-moderator@vix.com
  5. Approved: paul@vix.com
  6.  
  7. Submitted-By: ross@spam.adelaide.edu.au (Ross Williams)
  8. Posting-Number: Volume 26, Issue 124
  9. Archive-Name: funnelweb/part04
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line, then unpack
  13. # it by saving it into a file and typing "sh file".  To overwrite existing
  14. # files, type "sh file -c".  You can also feed this as standard input via
  15. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  16. # will see the following message at the end:
  17. #        "End of archive 4 (of 20)."
  18. # Contents:  answers/sc07.lis answers/sc23.lis hackman/h_manual.idx
  19. #   hackman/h_manual.sin hackman/h_manual.tex scripts/master.fws
  20. #   sources/help.h sources/list.c sources/table.h sources/writfile.c
  21. #   userman/u_ch0.tex userman/u_cha.tex userman/u_manual.tex
  22. # Wrapped by vixie@gw.home.vix.com on Sun Apr 11 11:00:13 1993
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. if test -f 'answers/sc07.lis' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'answers/sc07.lis'\"
  26. else
  27. echo shar: Extracting \"'answers/sc07.lis'\" \(10474 characters\)
  28. sed "s/^X//" >'answers/sc07.lis' <<'END_OF_FILE'
  29. XFUNNELWEB LISTING FILE
  30. X======================
  31. X
  32. Dump of mapped file "<<Suppressed>>".
  33. X
  34. MEMORY DUMP OF MAPPED FILE
  35. X==========================
  36. X
  37. X+-------------------------------------------------+------------------+
  38. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  39. X+-------------------------------------------------+------------------+
  40. X| 53 43 30 37 3A 20 50 72 6F 63 65 73 73 69 6E 67 | SC07: Processing |
  41. X| 20 6F 66 20 6C 6F 6E 67 20 6C 69 6E 65 73 2E 0A |  of long lines.. |
  42. X| 0A 53 43 30 37 2E 31 3A 20 44 65 74 65 63 74 69 | .SC07.1: Detecti |
  43. X| 6F 6E 20 6F 66 20 61 20 6C 69 6E 65 20 6C 6F 6E | on of a line lon |
  44. X| 67 65 72 20 74 68 61 6E 20 74 68 65 20 64 65 66 | ger than the def |
  45. X| 61 75 6C 74 20 6C 69 6D 69 74 2E 0A 0A 54 68 65 | ault limit...The |
  46. X| 20 64 65 66 61 75 6C 74 20 6C 69 6D 69 74 20 69 |  default limit i |
  47. X| 73 20 38 30 20 63 68 61 72 61 63 74 65 72 73 20 | s 80 characters  |
  48. X| 73 6F 20 77 65 20 77 69 6C 6C 20 74 65 73 74 20 | so we will test  |
  49. X| 6F 6E 20 65 69 74 68 65 72 20 73 69 64 65 20 6F | on either side o |
  50. X| 66 0A 74 68 61 74 3A 0A 20 20 20 20 20 20 20 20 | f.that:.         |
  51. X| 20 31 20 20 20 20 20 20 20 20 20 32 20 20 20 20 |  1         2     |
  52. X| 20 20 20 20 20 33 20 20 20 20 20 20 20 20 20 34 |      3         4 |
  53. X| 20 20 20 20 20 20 20 20 20 35 20 20 20 20 20 20 |          5       |
  54. X| 20 20 20 36 20 20 20 20 20 20 20 20 20 37 20 20 |    6         7   |
  55. X| 20 20 20 20 20 20 20 38 0A 31 32 33 34 35 36 37 |        8.1234567 |
  56. X| 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 | 8901234567890123 |
  57. X| 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 | 4567890123456789 |
  58. X| 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 | 0123456789012345 |
  59. X| 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 | 6789012345678901 |
  60. X| 32 33 34 35 36 37 38 39 30 0A 54 68 65 20 61 62 | 234567890.The ab |
  61. X| 6F 76 65 20 73 68 6F 75 6C 64 20 6E 6F 74 20 74 | ove should not t |
  62. X| 72 69 67 67 65 72 20 61 20 22 6C 69 6E 65 20 74 | rigger a "line t |
  63. X| 6F 6F 20 6C 6F 6E 67 20 65 72 72 6F 72 22 2E 20 | oo long error".  |
  64. X| 42 75 74 20 74 68 69 73 20 6C 69 6E 65 20 73 68 | But this line sh |
  65. X| 6F 75 6C 64 21 2D 2D 2D 2D 2D 2D 0A 0A 53 43 30 | ould!------..SC0 |
  66. X| 37 2E 33 3A 20 54 65 73 74 20 74 68 65 20 6C 69 | 7.3: Test the li |
  67. X| 6D 69 74 20 73 65 74 20 61 74 20 69 6E 66 69 6E | mit set at infin |
  68. X| 69 74 79 2E 0A 0A 40 70 20 6D 61 78 69 6D 75 6D | ity...@p maximum |
  69. X| 5F 69 6E 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 | _input_line_leng |
  70. X| 74 68 20 3D 20 69 6E 66 69 6E 69 74 79 0A 0A 20 | th = infinity..  |
  71. X| 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 |         1        |
  72. X| 20 20 32 20 20 20 20 20 20 20 20 20 33 20 20 20 |   2         3    |
  73. X| 20 20 20 20 20 20 34 20 20 20 20 20 20 20 20 20 |       4          |
  74. X| 35 20 20 20 20 20 20 20 20 20 36 20 20 20 20 20 | 5         6      |
  75. X| 20 20 20 20 37 20 20 20 20 20 20 20 20 20 38 0A |     7         8. |
  76. X| 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 | 1234567890123456 |
  77. X| 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 | 7890123456789012 |
  78. X| 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 | 3456789012345678 |
  79. X| 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 | 9012345678901234 |
  80. X| 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 | 5678901234567890 |
  81. X| 0A 54 68 65 20 61 62 6F 76 65 20 73 68 6F 75 6C | .The above shoul |
  82. X| 64 20 6E 6F 74 20 74 72 69 67 67 65 72 20 61 20 | d not trigger a  |
  83. X| 22 6C 69 6E 65 20 74 6F 6F 20 6C 6F 6E 67 20 65 | "line too long e |
  84. X| 72 72 6F 72 22 2E 20 4E 6F 72 20 73 68 6F 75 6C | rror". Nor shoul |
  85. X| 64 20 74 68 69 73 20 6F 6E 65 21 2D 2D 2D 2D 2D | d this one!----- |
  86. X| 2D 2D 0A 0A 53 43 30 37 2E 33 3A 20 54 65 73 74 | --..SC07.3: Test |
  87. X| 20 74 68 65 20 6C 69 6D 69 74 20 73 65 74 20 6C |  the limit set l |
  88. X| 6F 77 65 72 2E 0A 0A 40 70 20 6D 61 78 69 6D 75 | ower...@p maximu |
  89. X| 6D 5F 69 6E 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E | m_input_line_len |
  90. X| 67 74 68 20 3D 20 35 30 0A 0A 20 20 20 20 20 20 | gth = 50..       |
  91. X| 20 20 20 31 20 20 20 20 20 20 20 20 20 32 20 20 |    1         2   |
  92. X| 20 20 20 20 20 20 20 33 20 20 20 20 20 20 20 20 |        3         |
  93. X| 20 34 20 20 20 20 20 20 20 20 20 35 0A 31 32 33 |  4         5.123 |
  94. X| 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 | 4567890123456789 |
  95. X| 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 | 0123456789012345 |
  96. X| 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 0A | 678901234567890. |
  97. X| 4E 6F 20 65 72 72 6F 72 20 66 6F 72 20 74 68 65 | No error for the |
  98. X| 20 61 62 6F 76 65 20 62 75 74 20 74 68 69 73 20 |  above but this  |
  99. X| 6C 69 6E 65 20 77 69 6C 6C 21 2D 2D 2D 2D 2D 2D | line will!------ |
  100. X| 2D 2D 2D 0A                                     | ---.             |
  101. X+-------------------------------------------------+------------------+
  102. X
  103. X
  104. X=========================== Start of LINE LIST DUMP ============================
  105. X
  106. Globl Local| Text
  107. X-----------+--------------------------------------------------------------------
  108. X00001 00001| SC07: Processing of long lines.<010>
  109. X00002 00002| <010>
  110. X00003 00003| SC07.1: Detection of a line longer than the default limit.<010>
  111. X00004 00004| <010>
  112. X00005 00005| The default limit is 80 characters so we will test on either side of<010>
  113. X00006 00006| that:<010>
  114. X00007 00007|          1         2         3         4         5         6         7         8<010>
  115. X00008 00008| 12345678901234567890123456789012345678901234567890123456789012345678901234567890<010>
  116. X00009 00009| The above should not trigger a "line too long error". But this line should!------<010>
  117. X00010 00010| <010>
  118. X00011 00011| SC07.3: Test the limit set at infinity.<010>
  119. X00012 00012| <010>
  120. X00013 00013| @p maximum_input_line_length = infinity<010>
  121. X00014 00014| <010>
  122. X00015 00015|          1         2         3         4         5         6         7         8<010>
  123. X00016 00016| 12345678901234567890123456789012345678901234567890123456789012345678901234567890<010>
  124. X00017 00017| The above should not trigger a "line too long error". Nor should this one!-------<010>
  125. X00018 00018| <010>
  126. X00019 00019| SC07.3: Test the limit set lower.<010>
  127. X00020 00020| <010>
  128. X00021 00021| @p maximum_input_line_length = 50<010>
  129. X00022 00022| <010>
  130. X00023 00023|          1         2         3         4         5<010>
  131. X00024 00024| 12345678901234567890123456789012345678901234567890<010>
  132. X00025 00025| No error for the above but this line will!---------<010>
  133. X00026 00026| <End-Of-File><010>
  134. X-----------+--------------------------------------------------------------------
  135. Globl Local| Text
  136. X
  137. X============================ End of LINE LIST DUMP =============================
  138. X
  139. X
  140. X=========================== Start of TOKEN LIST DUMP ===========================
  141. X
  142. Summary: There are 4 tokens in the token list.
  143. X
  144. Line[Column]: Token Description
  145. X-------------------------------
  146. X
  147. X0001[01]: Text. Text scrap[Grey]="SC07: Processing of long lines.<010>
  148. X<010>
  149. SC07.1: Detection of a line longer than the default limit.<010>
  150. X<010>
  151. The default limit is 80 characters so we will test on either side of<010>
  152. that:<010>
  153. X         1         2         3         4         5         6         7         8<010>
  154. X12345678901234567890123456789012345678901234567890123456789012345678901234567890<010>
  155. The above should not trigger a "line too long error". But this line should!------<010>
  156. X<010>
  157. SC07.3: Test the limit set at infinity.<010>
  158. X<010>
  159. X"
  160. X0014[01]: Text. Text scrap[Grey]="<010>
  161. X         1         2         3         4         5         6         7         8<010>
  162. X12345678901234567890123456789012345678901234567890123456789012345678901234567890<010>
  163. The above should not trigger a "line too long error". Nor should this one!-------<010>
  164. X<010>
  165. SC07.3: Test the limit set lower.<010>
  166. X<010>
  167. X"
  168. X0022[01]: Text. Text scrap[Grey]="<010>
  169. X         1         2         3         4         5<010>
  170. X12345678901234567890123456789012345678901234567890<010>
  171. No error for the above but this line will!---------<010>
  172. X"
  173. X0026[01]: End Of File. 
  174. X============================ End of TOKEN LIST DUMP ============================
  175. X
  176. Macro table dump skipped (Parser was not invoked).
  177. Document list dump skipped (Parser was not invoked).
  178. X
  179. Global Local| Input File
  180. X------------+-------------------------------------------------------------------
  181. X     1     1| SC07: Processing of long lines.
  182. X     2     2| 
  183. X     3     3| SC07.1: Detection of a line longer than the default limit.
  184. X     4     4| 
  185. X     5     5| The default limit is 80 characters so we will test on either side of
  186. X     6     6| that:
  187. X     7     7|          1         2         3         4         5         6         7         8
  188. X     8     8| 12345678901234567890123456789012345678901234567890123456789012345678901234567890
  189. X     9     9| The above should not trigger a "line too long error". But this line should!------
  190. X       Error|.................................................................................^Input line is too long (this character is the first offender).
  191. X            |.................................................................................^Currently, the maximum allowable input line length is 80.
  192. X            |.................................................................................^Note: You can change this using a pragma directive (@p).
  193. X    10    10| 
  194. X    11    11| SC07.3: Test the limit set at infinity.
  195. X    12    12| 
  196. X    13    13| @p maximum_input_line_length = infinity
  197. X    14    14| 
  198. X    15    15|          1         2         3         4         5         6         7         8
  199. X    16    16| 12345678901234567890123456789012345678901234567890123456789012345678901234567890
  200. X    17    17| The above should not trigger a "line too long error". Nor should this one!-------
  201. X    18    18| 
  202. X    19    19| SC07.3: Test the limit set lower.
  203. X    20    20| 
  204. X    21    21| @p maximum_input_line_length = 50
  205. X    22    22| 
  206. X    23    23|          1         2         3         4         5
  207. X    24    24| 12345678901234567890123456789012345678901234567890
  208. X    25    25| No error for the above but this line will!---------
  209. X       Error|...................................................^Input line is too long (this character is the first offender).
  210. X            |...................................................^Currently, the maximum allowable input line length is 50.
  211. X            |...................................................^Note: You can change this using a pragma directive (@p).
  212. X            | <End-Of-File>
  213. X------------+-------------------------------------------------------------------
  214. X
  215. There were 2 Errors.
  216. END_OF_FILE
  217. if test 10474 -ne `wc -c <'answers/sc07.lis'`; then
  218.     echo shar: \"'answers/sc07.lis'\" unpacked with wrong size!
  219. fi
  220. # end of 'answers/sc07.lis'
  221. fi
  222. if test -f 'answers/sc23.lis' -a "${1}" != "-c" ; then 
  223.   echo shar: Will not clobber existing file \"'answers/sc23.lis'\"
  224. else
  225. echo shar: Extracting \"'answers/sc23.lis'\" \(9060 characters\)
  226. sed "s/^X//" >'answers/sc23.lis' <<'END_OF_FILE'
  227. XFUNNELWEB LISTING FILE
  228. X======================
  229. X
  230. Dump of mapped file "<<Suppressed>>".
  231. X
  232. MEMORY DUMP OF MAPPED FILE
  233. X==========================
  234. X
  235. X+-------------------------------------------------+------------------+
  236. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  237. X+-------------------------------------------------+------------------+
  238. X| 53 43 32 33 3A 20 54 65 73 74 20 73 79 6E 74 61 | SC23: Test synta |
  239. X| 78 20 63 68 65 63 6B 69 6E 67 20 6F 66 20 6F 75 | x checking of ou |
  240. X| 74 70 75 74 20 6C 69 6E 65 20 6C 65 6E 67 74 68 | tput line length |
  241. X| 20 70 72 61 67 6D 61 2E 0A 0A 31 2E 20 54 65 73 |  pragma...1. Tes |
  242. X| 74 20 6E 6F 74 20 74 68 72 65 65 20 61 72 67 75 | t not three argu |
  243. X| 6D 65 6E 74 73 2E 0A 40 70 20 6D 61 78 69 6D 75 | ments..@p maximu |
  244. X| 6D 5F 6F 75 74 70 75 74 5F 6C 69 6E 65 5F 6C 65 | m_output_line_le |
  245. X| 6E 67 74 68 0A 40 70 20 6D 61 78 69 6D 75 6D 5F | ngth.@p maximum_ |
  246. X| 6F 75 74 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 | output_line_leng |
  247. X| 74 68 20 3D 0A 40 70 20 6D 61 78 69 6D 75 6D 5F | th =.@p maximum_ |
  248. X| 6F 75 74 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 | output_line_leng |
  249. X| 74 68 20 3D 20 78 78 78 20 79 79 79 0A 0A 32 2E | th = xxx yyy..2. |
  250. X| 20 54 65 73 74 20 73 65 63 6F 6E 64 20 61 72 67 |  Test second arg |
  251. X| 75 6D 65 6E 74 20 6E 6F 74 20 22 3D 22 2E 0A 40 | ument not "="..@ |
  252. X| 70 20 6D 61 78 69 6D 75 6D 5F 6F 75 74 70 75 74 | p maximum_output |
  253. X| 5F 6C 69 6E 65 5F 6C 65 6E 67 74 68 20 78 20 73 | _line_length x s |
  254. X| 6C 6F 74 68 0A 0A 33 2E 20 54 65 73 74 20 76 61 | loth..3. Test va |
  255. X| 6C 75 65 20 6F 66 20 69 6E 66 69 6E 69 74 79 2E | lue of infinity. |
  256. X| 0A 40 70 20 6D 61 78 69 6D 75 6D 5F 6F 75 74 70 | .@p maximum_outp |
  257. X| 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 74 68 20 3D | ut_line_length = |
  258. X| 20 69 6E 66 69 6E 69 74 79 0A 0A 34 2E 20 54 65 |  infinity..4. Te |
  259. X| 73 74 20 6E 6F 6E 2D 64 65 63 69 6D 61 6C 20 64 | st non-decimal d |
  260. X| 69 67 69 74 20 69 6E 20 6E 75 6D 62 65 72 2E 0A | igit in number.. |
  261. X| 40 70 20 6D 61 78 69 6D 75 6D 5F 6F 75 74 70 75 | @p maximum_outpu |
  262. X| 74 5F 6C 69 6E 65 5F 6C 65 6E 67 74 68 20 3D 20 | t_line_length =  |
  263. X| 32 65 66 0A 0A 35 2E 20 54 65 73 74 20 6E 75 6D | 2ef..5. Test num |
  264. X| 62 65 72 20 69 73 20 6D 6F 72 65 20 74 68 61 6E | ber is more than |
  265. X| 20 65 69 67 68 74 20 64 69 67 69 74 73 20 6C 6F |  eight digits lo |
  266. X| 6E 67 2E 0A 40 70 20 6D 61 78 69 6D 75 6D 5F 6F | ng..@p maximum_o |
  267. X| 75 74 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 74 | utput_line_lengt |
  268. X| 68 20 3D 20 31 32 33 34 35 36 37 38 39 0A 0A 36 | h = 123456789..6 |
  269. X| 2E 20 54 65 73 74 20 6E 75 6D 62 65 72 20 69 73 | . Test number is |
  270. X| 20 65 78 61 63 74 6C 79 20 65 69 67 68 74 20 64 |  exactly eight d |
  271. X| 69 67 69 74 73 20 6C 6F 6E 67 2E 0A 37 2E 20 54 | igits long..7. T |
  272. X| 65 73 74 20 70 72 61 67 6D 61 20 6F 70 70 6F 73 | est pragma oppos |
  273. X| 69 6E 67 20 65 61 72 6C 69 65 72 20 70 72 61 67 | ing earlier prag |
  274. X| 6D 61 2E 0A 40 70 20 6D 61 78 69 6D 75 6D 5F 6F | ma..@p maximum_o |
  275. X| 75 74 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 74 | utput_line_lengt |
  276. X| 68 20 3D 20 31 32 33 34 35 36 37 38 0A 0A 38 2E | h = 12345678..8. |
  277. X| 20 54 65 73 74 20 70 72 61 67 6D 61 20 6E 6F 74 |  Test pragma not |
  278. X| 20 6F 70 70 6F 73 69 6E 67 20 65 61 72 6C 69 65 |  opposing earlie |
  279. X| 72 20 70 72 61 67 6D 61 2E 0A 40 70 20 6D 61 78 | r pragma..@p max |
  280. X| 69 6D 75 6D 5F 6F 75 74 70 75 74 5F 6C 69 6E 65 | imum_output_line |
  281. X| 5F 6C 65 6E 67 74 68 20 3D 20 69 6E 66 69 6E 69 | _length = infini |
  282. X| 74 79 0A 0A                                     | ty..             |
  283. X+-------------------------------------------------+------------------+
  284. X
  285. X
  286. X=========================== Start of LINE LIST DUMP ============================
  287. X
  288. Globl Local| Text
  289. X-----------+--------------------------------------------------------------------
  290. X00001 00001| SC23: Test syntax checking of output line length pragma.<010>
  291. X00002 00002| <010>
  292. X00003 00003| 1. Test not three arguments.<010>
  293. X00004 00004| @p maximum_output_line_length<010>
  294. X00005 00005| @p maximum_output_line_length =<010>
  295. X00006 00006| @p maximum_output_line_length = xxx yyy<010>
  296. X00007 00007| <010>
  297. X00008 00008| 2. Test second argument not "=".<010>
  298. X00009 00009| @p maximum_output_line_length x sloth<010>
  299. X00010 00010| <010>
  300. X00011 00011| 3. Test value of infinity.<010>
  301. X00012 00012| @p maximum_output_line_length = infinity<010>
  302. X00013 00013| <010>
  303. X00014 00014| 4. Test non-decimal digit in number.<010>
  304. X00015 00015| @p maximum_output_line_length = 2ef<010>
  305. X00016 00016| <010>
  306. X00017 00017| 5. Test number is more than eight digits long.<010>
  307. X00018 00018| @p maximum_output_line_length = 123456789<010>
  308. X00019 00019| <010>
  309. X00020 00020| 6. Test number is exactly eight digits long.<010>
  310. X00021 00021| 7. Test pragma opposing earlier pragma.<010>
  311. X00022 00022| @p maximum_output_line_length = 12345678<010>
  312. X00023 00023| <010>
  313. X00024 00024| 8. Test pragma not opposing earlier pragma.<010>
  314. X00025 00025| @p maximum_output_line_length = infinity<010>
  315. X00026 00026| <010>
  316. X00027 00027| <End-Of-File><010>
  317. X-----------+--------------------------------------------------------------------
  318. Globl Local| Text
  319. X
  320. X============================ End of LINE LIST DUMP =============================
  321. X
  322. X
  323. X=========================== Start of TOKEN LIST DUMP ===========================
  324. X
  325. Summary: There are 9 tokens in the token list.
  326. X
  327. Line[Column]: Token Description
  328. X-------------------------------
  329. X
  330. X0001[01]: Text. Text scrap[Grey]="SC23: Test syntax checking of output line length pragma.<010>
  331. X<010>
  332. X1. Test not three arguments.<010>
  333. X"
  334. X0007[01]: Text. Text scrap[Grey]="<010>
  335. X2. Test second argument not "=".<010>
  336. X"
  337. X0010[01]: Text. Text scrap[Grey]="<010>
  338. X3. Test value of infinity.<010>
  339. X"
  340. X0013[01]: Text. Text scrap[Grey]="<010>
  341. X4. Test non-decimal digit in number.<010>
  342. X"
  343. X0016[01]: Text. Text scrap[Grey]="<010>
  344. X5. Test number is more than eight digits long.<010>
  345. X"
  346. X0019[01]: Text. Text scrap[Grey]="<010>
  347. X6. Test number is exactly eight digits long.<010>
  348. X7. Test pragma opposing earlier pragma.<010>
  349. X"
  350. X0023[01]: Text. Text scrap[Grey]="<010>
  351. X8. Test pragma not opposing earlier pragma.<010>
  352. X"
  353. X0026[01]: Text. Text scrap[White]="<010>
  354. X"
  355. X0027[01]: End Of File. 
  356. X============================ End of TOKEN LIST DUMP ============================
  357. X
  358. Macro table dump skipped (Parser was not invoked).
  359. Document list dump skipped (Parser was not invoked).
  360. X
  361. Global Local| Input File
  362. X------------+-------------------------------------------------------------------
  363. X     1     1| SC23: Test syntax checking of output line length pragma.
  364. X     2     2| 
  365. X     3     3| 1. Test not three arguments.
  366. X     4     4| @p maximum_output_line_length
  367. X       Error|.^This pragma has the wrong number of arguments.
  368. X            |.^The correct format is: "@p maximum_output_line_length = <num>|infinity".
  369. X            |.^Pragma ignored.
  370. X     5     5| @p maximum_output_line_length =
  371. X       Error|.^This pragma has the wrong number of arguments.
  372. X            |.^The correct format is: "@p maximum_output_line_length = <num>|infinity".
  373. X            |.^Pragma ignored.
  374. X     6     6| @p maximum_output_line_length = xxx yyy
  375. X       Error|.^This pragma has the wrong number of arguments.
  376. X            |.^The correct format is: "@p maximum_output_line_length = <num>|infinity".
  377. X            |.^Pragma ignored.
  378. X     7     7| 
  379. X     8     8| 2. Test second argument not "=".
  380. X     9     9| @p maximum_output_line_length x sloth
  381. X            |.^The correct format is: "@p maximum_output_line_length = <num>|infinity".
  382. X            |.^Pragma ignored.
  383. X       Error|...............................^Expecting "=".
  384. X    10    10| 
  385. X    11    11| 3. Test value of infinity.
  386. X    12    12| @p maximum_output_line_length = infinity
  387. X            |.^This pragma is opposed by the pragma at line 22.
  388. X    13    13| 
  389. X    14    14| 4. Test non-decimal digit in number.
  390. X    15    15| @p maximum_output_line_length = 2ef
  391. X       Error|..................................^Illegal digit. Value must consist entirely of decimal digits.
  392. X            |..................................^You can also use the value "infinity".
  393. X            |..................................^Pragma ignored.
  394. X    16    16| 
  395. X    17    17| 5. Test number is more than eight digits long.
  396. X    18    18| @p maximum_output_line_length = 123456789
  397. X       Error|.................................^Too many digits. The maximum is eight.
  398. X            |.................................^Pragma ignored.
  399. X    19    19| 
  400. X    20    20| 6. Test number is exactly eight digits long.
  401. X    21    21| 7. Test pragma opposing earlier pragma.
  402. X    22    22| @p maximum_output_line_length = 12345678
  403. X       Error|.^This pragma opposes the pragma at line 12.
  404. X            |.^You can have as many output line length pragmas
  405. X            |.^as you like, but they all have to be the same!
  406. X            |.^Pragma ignored.
  407. X    23    23| 
  408. X    24    24| 8. Test pragma not opposing earlier pragma.
  409. X    25    25| @p maximum_output_line_length = infinity
  410. X    26    26| 
  411. X            | <End-Of-File>
  412. X------------+-------------------------------------------------------------------
  413. X
  414. There were 7 Errors.
  415. END_OF_FILE
  416. if test 9060 -ne `wc -c <'answers/sc23.lis'`; then
  417.     echo shar: \"'answers/sc23.lis'\" unpacked with wrong size!
  418. fi
  419. # end of 'answers/sc23.lis'
  420. fi
  421. if test -f 'hackman/h_manual.idx' -a "${1}" != "-c" ; then 
  422.   echo shar: Will not clobber existing file \"'hackman/h_manual.idx'\"
  423. else
  424. echo shar: Extracting \"'hackman/h_manual.idx'\" \(10625 characters\)
  425. sed "s/^X//" >'hackman/h_manual.idx' <<'END_OF_FILE'
  426. X\indexentry{Ross Williams}{1}
  427. X\indexentry{Williams Ross}{1}
  428. X\indexentry{copyright notice}{1}
  429. X\indexentry{notice copyright}{1}
  430. X\indexentry{preface}{5}
  431. X\indexentry{acknowledgements}{7}
  432. X\indexentry{David Hulse}{7}
  433. X\indexentry{Hulse David}{7}
  434. X\indexentry{Ada}{7}
  435. X\indexentry{Simon Hackett}{7}
  436. X\indexentry{Hackett Simon}{7}
  437. X\indexentry{Jeremy Begg}{7}
  438. X\indexentry{Begg Jeremy}{7}
  439. X\indexentry{Barry Dwyer}{7}
  440. X\indexentry{Dwyer Barry}{7}
  441. X\indexentry{Roger Brissenden}{7}
  442. X\indexentry{Brissenden Roger}{7}
  443. X\indexentry{Donald Knuth}{7}
  444. X\indexentry{Knuth Donald}{7}
  445. X\indexentry{presentation notes}{9}
  446. X\indexentry{typesetting}{9}
  447. X\indexentry{Andrew Trevorrow}{9}
  448. X\indexentry{Trevorrow Andrew}{9}
  449. X\indexentry{OzTeX}{9}
  450. X\indexentry{Knuth84}{9}
  451. X\indexentry{Lamport86}{9}
  452. X\indexentry{TeX}{9}
  453. X\indexentry{LaTeX}{9}
  454. X\indexentry{Macintosh}{9}
  455. X\indexentry{LaTeX}{9}
  456. X\indexentry{FunnelWeb design}{11}
  457. X\indexentry{design FunnelWeb}{11}
  458. X\indexentry{FunnelWeb V1}{11}
  459. X\indexentry{backwards compatibility}{11}
  460. X\indexentry{compatibility backwards}{11}
  461. X\indexentry{FunnelWeb motivation}{11}
  462. X\indexentry{motivation FunnelWeb}{11}
  463. X\indexentry{Donald Knuth}{11}
  464. X\indexentry{Knuth Donald}{11}
  465. X\indexentry{Jon Bentley}{11}
  466. X\indexentry{Bentley Jon}{11}
  467. X\indexentry{programming pearls}{11}
  468. X\indexentry{Communications of the ACM}{11}
  469. X\indexentry{Bentley86}{11}
  470. X\indexentry{Knuth83}{11}
  471. X\indexentry{Pascal}{12}
  472. X\indexentry{number output files}{12}
  473. X\indexentry{output files number}{12}
  474. X\indexentry{indentation}{12}
  475. X\indexentry{Occam's razor}{12}
  476. X\indexentry{indentation}{12}
  477. X\indexentry{indentation no}{12}
  478. X\indexentry{no indentation}{12}
  479. X\indexentry{indentation blank}{12}
  480. X\indexentry{blank indentation}{12}
  481. X\indexentry{indentation text}{12}
  482. X\indexentry{text indentation}{12}
  483. X\indexentry{indented macro call}{12}
  484. X\indexentry{no indentation}{12}
  485. X\indexentry{blank indentation}{12}
  486. X\indexentry{text indentation}{12}
  487. X\indexentry{DCL}{13}
  488. X\indexentry{indentation dangers}{13}
  489. X\indexentry{dangers indentation}{13}
  490. X\indexentry{FunnelWeb syntax}{14}
  491. X\indexentry{syntax FunnelWeb}{14}
  492. X\indexentry{==}{14}
  493. X\indexentry{macro definition syntax}{14}
  494. X\indexentry{syntax macro definition}{14}
  495. X\indexentry{parameterized macro definitions syntax}{15}
  496. X\indexentry{syntax parameterized macro definitions}{15}
  497. X\indexentry{macro call syntax}{16}
  498. X\indexentry{syntax macro call}{16}
  499. X\indexentry{parameterized macro call syntax}{16}
  500. X\indexentry{syntax parameterized macro call}{16}
  501. X\indexentry{document structure}{16}
  502. X\indexentry{structure document}{16}
  503. X\indexentry{headings}{16}
  504. X\indexentry{sections}{16}
  505. X\indexentry{miscellaneous issues}{18}
  506. X\indexentry{issues miscellaneous}{18}
  507. X\indexentry{comment duplication}{18}
  508. X\indexentry{duplication comment}{18}
  509. X\indexentry{out of date documentation}{18}
  510. X\indexentry{documentation out of date}{18}
  511. X\indexentry{regression testing}{18}
  512. X\indexentry{testing regression}{18}
  513. X\indexentry{command line interface}{18}
  514. X\indexentry{interface command line}{18}
  515. X\indexentry{Ada}{18}
  516. X\indexentry{vms vax}{18}
  517. X\indexentry{vax vms}{18}
  518. X\indexentry{.cld file}{18}
  519. X\indexentry{file .cld}{18}
  520. X\indexentry{design goals command line interface}{19}
  521. X\indexentry{command line interface design goals}{19}
  522. X\indexentry{file names}{19}
  523. X\indexentry{names file}{19}
  524. X\indexentry{filename extensions}{20}
  525. X\indexentry{extensions filename}{20}
  526. X\indexentry{filename inheritance}{20}
  527. X\indexentry{inheritance filename}{20}
  528. X\indexentry{file names}{21}
  529. X\indexentry{names file}{21}
  530. X\indexentry{portable filenames}{21}
  531. X\indexentry{filenames portable}{21}
  532. X\indexentry{invocations number}{22}
  533. X\indexentry{number invocations}{22}
  534. X\indexentry{@Z}{23}
  535. X\indexentry{@M}{23}
  536. X\indexentry{document structure macro structure}{23}
  537. X\indexentry{macro structure document structure}{23}
  538. X\indexentry{document structure}{23}
  539. X\indexentry{structure document}{23}
  540. X\indexentry{macro structure}{23}
  541. X\indexentry{structure macro}{23}
  542. X\indexentry{hierarchical structure}{23}
  543. X\indexentry{structure hierarchical}{23}
  544. X\indexentry{TeX}{23}
  545. X\indexentry{section numbering}{23}
  546. X\indexentry{numbering section}{23}
  547. X\indexentry{diagnostic messages}{25}
  548. X\indexentry{messages diagnostic}{25}
  549. X\indexentry{FunnelWeb implementation}{27}
  550. X\indexentry{implementation FunnelWeb}{27}
  551. X\indexentry{FunnelWeb history}{27}
  552. X\indexentry{history FunnelWeb}{27}
  553. X\indexentry{FunnelWeb version 1}{27}
  554. X\indexentry{FunnelWeb version 2}{27}
  555. X\indexentry{FunnelWeb version 3}{27}
  556. X\indexentry{Ada}{27}
  557. X\indexentry{USDOD83}{27}
  558. X\indexentry{Ph.D.}{27}
  559. X\indexentry{FunnelWeb past use}{27}
  560. X\indexentry{past use FunnelWeb}{27}
  561. X\indexentry{David Hulse}{27}
  562. X\indexentry{Hulse David}{27}
  563. X\indexentry{University Adelaide}{27}
  564. X\indexentry{Adelaide University}{27}
  565. X\indexentry{FunnelWeb writing itself}{28}
  566. X\indexentry{writing itself FunnelWeb}{28}
  567. X\indexentry{trouble asking for}{28}
  568. X\indexentry{asking for trouble}{28}
  569. X\indexentry{coding style}{28}
  570. X\indexentry{style coding}{28}
  571. X\indexentry{South Australian Government Department of Lands}{28}
  572. X\indexentry{portability}{28}
  573. X\indexentry{Rabinowitz90}{28}
  574. X\indexentry{Horton90}{28}
  575. X\indexentry{Kernighan88}{28}
  576. X\indexentry{ANSI}{28}
  577. X\indexentry{Rabinowitz90}{28}
  578. X\indexentry{identifier}{28}
  579. X\indexentry{identifier abbreviations}{28}
  580. X\indexentry{abbreviations identifier}{28}
  581. X\indexentry{pointers naming}{29}
  582. X\indexentry{naming pointers}{29}
  583. X\indexentry{types naming}{29}
  584. X\indexentry{naming types}{29}
  585. X\indexentry{filenames length}{29}
  586. X\indexentry{length filenames}{29}
  587. X\indexentry{MSDOS}{29}
  588. X\indexentry{use of memory}{29}
  589. X\indexentry{memory use of}{29}
  590. X\indexentry{heap memory}{29}
  591. X\indexentry{memory heap}{29}
  592. X\indexentry{Macintosh}{29}
  593. X\indexentry{malloc}{29}
  594. X\indexentry{memory package}{29}
  595. X\indexentry{package memory}{29}
  596. X\indexentry{memory leakage}{30}
  597. X\indexentry{leakage memory}{30}
  598. X\indexentry{stack memory}{30}
  599. X\indexentry{memory stack}{30}
  600. X\indexentry{stack size}{30}
  601. X\indexentry{size stack}{30}
  602. X\indexentry{memory static}{30}
  603. X\indexentry{static memory}{30}
  604. X\indexentry{static variables}{30}
  605. X\indexentry{variables static}{30}
  606. X\indexentry{Macintosh}{30}
  607. X\indexentry{ThinkC compiler}{30}
  608. X\indexentry{compiler ThinkC}{30}
  609. X\indexentry{text indentation}{30}
  610. X\indexentry{indentation text}{30}
  611. X\indexentry{FunnelWeb modification}{35}
  612. X\indexentry{modification FunnelWeb}{35}
  613. X\indexentry{GNU license}{35}
  614. X\indexentry{license GNU}{35}
  615. X\indexentry{changes dangers}{35}
  616. X\indexentry{dangers changes}{35}
  617. X\indexentry{languages dangers}{35}
  618. X\indexentry{dangers languages}{35}
  619. X\indexentry{video game}{35}
  620. X\indexentry{compiler}{35}
  621. X\indexentry{removing features}{35}
  622. X\indexentry{features removing}{35}
  623. X\indexentry{features modification}{35}
  624. X\indexentry{modification features}{35}
  625. X\indexentry{features adding}{36}
  626. X\indexentry{adding features}{36}
  627. X\indexentry{Hoare80}{36}
  628. X\indexentry{genealogy program}{36}
  629. X\indexentry{program genealogy}{36}
  630. X\indexentry{design authority}{36}
  631. X\indexentry{authority design}{36}
  632. X\indexentry{Unix}{36}
  633. X\indexentry{security authority}{36}
  634. X\indexentry{authority security}{36}
  635. X\indexentry{trademark}{36}
  636. X\indexentry{program availability}{37}
  637. X\indexentry{availability program}{37}
  638. X\indexentry{protection FunnelWeb}{37}
  639. X\indexentry{FunnelWeb protection}{37}
  640. X\indexentry{protection file extension}{37}
  641. X\indexentry{file extension protection}{37}
  642. X\indexentry{modifying manuals}{38}
  643. X\indexentry{manuals modifying}{38}
  644. X\indexentry{copyright law}{38}
  645. X\indexentry{law copyright}{38}
  646. X\indexentry{work}{38}
  647. X\indexentry{copyright}{38}
  648. X\indexentry{license}{38}
  649. X\indexentry{derived work}{38}
  650. X\indexentry{GNU license}{39}
  651. X\indexentry{license GNU}{39}
  652. X\indexentry{FunnelWeb management}{39}
  653. X\indexentry{management FunnelWeb}{39}
  654. X\indexentry{FunnelWeb official}{39}
  655. X\indexentry{official FunnelWeb}{39}
  656. X\indexentry{GNU version}{41}
  657. X\indexentry{version GNU}{41}
  658. X\indexentry{GNU breakout}{41}
  659. X\indexentry{breakout, GNU}{41}
  660. X\indexentry{FunnelWeb future}{43}
  661. X\indexentry{future FunnelWeb}{43}
  662. X\indexentry{documentation}{43}
  663. X\indexentry{official example}{43}
  664. X\indexentry{example official}{43}
  665. X\indexentry{index program}{43}
  666. X\indexentry{program index}{43}
  667. X\indexentry{command interface}{43}
  668. X\indexentry{interface command}{43}
  669. X\indexentry{antiquated features}{43}
  670. X\indexentry{features antiquated}{43}
  671. X\indexentry{shell interpreter}{43}
  672. X\indexentry{interpreter shell}{43}
  673. X\indexentry{command interpreter}{43}
  674. X\indexentry{interpreter command}{43}
  675. X\indexentry{options}{43}
  676. X\indexentry{setall command}{43}
  677. X\indexentry{command setall}{43}
  678. X\indexentry{recursion test}{43}
  679. X\indexentry{test recursion}{43}
  680. X\indexentry{diagnostic counting}{43}
  681. X\indexentry{counting diagnostic}{43}
  682. X\indexentry{make}{44}
  683. X\indexentry{signature file}{44}
  684. X\indexentry{file signature}{44}
  685. X\indexentry{language design}{44}
  686. X\indexentry{design language}{44}
  687. X\indexentry{section syntax}{44}
  688. X\indexentry{syntax section}{44}
  689. X\indexentry{pragma syntax}{44}
  690. X\indexentry{syntax pragma}{44}
  691. X\indexentry{conditionals}{44}
  692. X\indexentry{file markers}{44}
  693. X\indexentry{markers file}{44}
  694. X\indexentry{parameter list formal}{44}
  695. X\indexentry{formal parameter list}{44}
  696. X\indexentry{scanner}{44}
  697. X\indexentry{mapper}{44}
  698. X\indexentry{contiguous memory}{45}
  699. X\indexentry{memory contiguous}{45}
  700. X\indexentry{representation EOL}{45}
  701. X\indexentry{EOL representation}{45}
  702. X\indexentry{ASCII mnemonics}{45}
  703. X\indexentry{mnemonics ASCII}{45}
  704. X\indexentry{version pragma}{45}
  705. X\indexentry{pragma version}{45}
  706. X\indexentry{parser}{45}
  707. X\indexentry{analyser}{45}
  708. X\indexentry{Tarjan72}{45}
  709. X\indexentry{Robert Endre Tarjan}{45}
  710. X\indexentry{Tarjan Robert Endre}{45}
  711. X\indexentry{recursion detection}{45}
  712. X\indexentry{detection recursion}{45}
  713. X\indexentry{tangle}{45}
  714. X\indexentry{text indentation}{45}
  715. X\indexentry{indentation text}{45}
  716. X\indexentry{weave}{45}
  717. X\indexentry{table of contents}{45}
  718. X\indexentry{strength typesetting}{46}
  719. X\indexentry{typesetting strength}{46}
  720. X\indexentry{typesetter generic}{46}
  721. X\indexentry{generic typesetter}{46}
  722. X\indexentry{include file suppression}{46}
  723. X\indexentry{suppression include file}{46}
  724. X\indexentry{cross references}{46}
  725. X\indexentry{references cross}{46}
  726. X\indexentry{Ramsey89}{46}
  727. X\indexentry{spider}{46}
  728. X\indexentry{lister}{46}
  729. X\indexentry{glue factor}{46}
  730. X\indexentry{factor glue}{46}
  731. X\indexentry{diagnostics}{47}
  732. X\indexentry{speed}{47}
  733. X\indexentry{efficiency}{47}
  734. X\indexentry{correctness}{47}
  735. X\indexentry{test suite}{47}
  736. X\indexentry{suite test}{47}
  737. X\indexentry{GNU License}{49}
  738. X\indexentry{License GNU}{49}
  739. X\indexentry{references}{57}
  740. X\indexentry{ANSI}{57}
  741. X\indexentry{Bentley86}{57}
  742. X\indexentry{Hoare80}{57}
  743. X\indexentry{Horton90}{57}
  744. X\indexentry{Kernighan88}{57}
  745. X\indexentry{Knuth83}{57}
  746. X\indexentry{Knuth84}{57}
  747. X\indexentry{Lamport86}{57}
  748. X\indexentry{Rabinowitz90}{57}
  749. X\indexentry{Ramsey89}{57}
  750. X\indexentry{Tarjan72}{57}
  751. X\indexentry{USDOD83}{57}
  752. END_OF_FILE
  753. if test 10625 -ne `wc -c <'hackman/h_manual.idx'`; then
  754.     echo shar: \"'hackman/h_manual.idx'\" unpacked with wrong size!
  755. fi
  756. # end of 'hackman/h_manual.idx'
  757. fi
  758. if test -f 'hackman/h_manual.sin' -a "${1}" != "-c" ; then 
  759.   echo shar: Will not clobber existing file \"'hackman/h_manual.sin'\"
  760. else
  761. echo shar: Extracting \"'hackman/h_manual.sin'\" \(10625 characters\)
  762. sed "s/^X//" >'hackman/h_manual.sin' <<'END_OF_FILE'
  763. X\indexentry{.cld file}{18}
  764. X\indexentry{==}{14}
  765. X\indexentry{@M}{23}
  766. X\indexentry{@Z}{23}
  767. X\indexentry{abbreviations identifier}{28}
  768. X\indexentry{acknowledgements}{7}
  769. X\indexentry{Ada}{18}
  770. X\indexentry{Ada}{27}
  771. X\indexentry{Ada}{7}
  772. X\indexentry{adding features}{36}
  773. X\indexentry{Adelaide University}{27}
  774. X\indexentry{analyser}{45}
  775. X\indexentry{Andrew Trevorrow}{9}
  776. X\indexentry{ANSI}{28}
  777. X\indexentry{ANSI}{57}
  778. X\indexentry{antiquated features}{43}
  779. X\indexentry{ASCII mnemonics}{45}
  780. X\indexentry{asking for trouble}{28}
  781. X\indexentry{authority design}{36}
  782. X\indexentry{authority security}{36}
  783. X\indexentry{availability program}{37}
  784. X\indexentry{backwards compatibility}{11}
  785. X\indexentry{Barry Dwyer}{7}
  786. X\indexentry{Begg Jeremy}{7}
  787. X\indexentry{Bentley Jon}{11}
  788. X\indexentry{Bentley86}{11}
  789. X\indexentry{Bentley86}{57}
  790. X\indexentry{blank indentation}{12}
  791. X\indexentry{blank indentation}{12}
  792. X\indexentry{breakout, GNU}{41}
  793. X\indexentry{Brissenden Roger}{7}
  794. X\indexentry{changes dangers}{35}
  795. X\indexentry{coding style}{28}
  796. X\indexentry{command interface}{43}
  797. X\indexentry{command interpreter}{43}
  798. X\indexentry{command line interface design goals}{19}
  799. X\indexentry{command line interface}{18}
  800. X\indexentry{command setall}{43}
  801. X\indexentry{comment duplication}{18}
  802. X\indexentry{Communications of the ACM}{11}
  803. X\indexentry{compatibility backwards}{11}
  804. X\indexentry{compiler ThinkC}{30}
  805. X\indexentry{compiler}{35}
  806. X\indexentry{conditionals}{44}
  807. X\indexentry{contiguous memory}{45}
  808. X\indexentry{copyright law}{38}
  809. X\indexentry{copyright notice}{1}
  810. X\indexentry{copyright}{38}
  811. X\indexentry{correctness}{47}
  812. X\indexentry{counting diagnostic}{43}
  813. X\indexentry{cross references}{46}
  814. X\indexentry{dangers changes}{35}
  815. X\indexentry{dangers indentation}{13}
  816. X\indexentry{dangers languages}{35}
  817. X\indexentry{David Hulse}{27}
  818. X\indexentry{David Hulse}{7}
  819. X\indexentry{DCL}{13}
  820. X\indexentry{derived work}{38}
  821. X\indexentry{design authority}{36}
  822. X\indexentry{design FunnelWeb}{11}
  823. X\indexentry{design goals command line interface}{19}
  824. X\indexentry{design language}{44}
  825. X\indexentry{detection recursion}{45}
  826. X\indexentry{diagnostic counting}{43}
  827. X\indexentry{diagnostic messages}{25}
  828. X\indexentry{diagnostics}{47}
  829. X\indexentry{document structure macro structure}{23}
  830. X\indexentry{document structure}{16}
  831. X\indexentry{document structure}{23}
  832. X\indexentry{documentation out of date}{18}
  833. X\indexentry{documentation}{43}
  834. X\indexentry{Donald Knuth}{11}
  835. X\indexentry{Donald Knuth}{7}
  836. X\indexentry{duplication comment}{18}
  837. X\indexentry{Dwyer Barry}{7}
  838. X\indexentry{efficiency}{47}
  839. X\indexentry{EOL representation}{45}
  840. X\indexentry{example official}{43}
  841. X\indexentry{extensions filename}{20}
  842. X\indexentry{factor glue}{46}
  843. X\indexentry{features adding}{36}
  844. X\indexentry{features antiquated}{43}
  845. X\indexentry{features modification}{35}
  846. X\indexentry{features removing}{35}
  847. X\indexentry{file .cld}{18}
  848. X\indexentry{file extension protection}{37}
  849. X\indexentry{file markers}{44}
  850. X\indexentry{file names}{19}
  851. X\indexentry{file names}{21}
  852. X\indexentry{file signature}{44}
  853. X\indexentry{filename extensions}{20}
  854. X\indexentry{filename inheritance}{20}
  855. X\indexentry{filenames length}{29}
  856. X\indexentry{filenames portable}{21}
  857. X\indexentry{formal parameter list}{44}
  858. X\indexentry{FunnelWeb design}{11}
  859. X\indexentry{FunnelWeb future}{43}
  860. X\indexentry{FunnelWeb history}{27}
  861. X\indexentry{FunnelWeb implementation}{27}
  862. X\indexentry{FunnelWeb management}{39}
  863. X\indexentry{FunnelWeb modification}{35}
  864. X\indexentry{FunnelWeb motivation}{11}
  865. X\indexentry{FunnelWeb official}{39}
  866. X\indexentry{FunnelWeb past use}{27}
  867. X\indexentry{FunnelWeb protection}{37}
  868. X\indexentry{FunnelWeb syntax}{14}
  869. X\indexentry{FunnelWeb V1}{11}
  870. X\indexentry{FunnelWeb version 1}{27}
  871. X\indexentry{FunnelWeb version 2}{27}
  872. X\indexentry{FunnelWeb version 3}{27}
  873. X\indexentry{FunnelWeb writing itself}{28}
  874. X\indexentry{future FunnelWeb}{43}
  875. X\indexentry{genealogy program}{36}
  876. X\indexentry{generic typesetter}{46}
  877. X\indexentry{glue factor}{46}
  878. X\indexentry{GNU breakout}{41}
  879. X\indexentry{GNU license}{35}
  880. X\indexentry{GNU license}{39}
  881. X\indexentry{GNU License}{49}
  882. X\indexentry{GNU version}{41}
  883. X\indexentry{Hackett Simon}{7}
  884. X\indexentry{headings}{16}
  885. X\indexentry{heap memory}{29}
  886. X\indexentry{hierarchical structure}{23}
  887. X\indexentry{history FunnelWeb}{27}
  888. X\indexentry{Hoare80}{36}
  889. X\indexentry{Hoare80}{57}
  890. X\indexentry{Horton90}{28}
  891. X\indexentry{Horton90}{57}
  892. X\indexentry{Hulse David}{27}
  893. X\indexentry{Hulse David}{7}
  894. X\indexentry{identifier abbreviations}{28}
  895. X\indexentry{identifier}{28}
  896. X\indexentry{implementation FunnelWeb}{27}
  897. X\indexentry{include file suppression}{46}
  898. X\indexentry{indentation blank}{12}
  899. X\indexentry{indentation dangers}{13}
  900. X\indexentry{indentation no}{12}
  901. X\indexentry{indentation text}{12}
  902. X\indexentry{indentation text}{30}
  903. X\indexentry{indentation text}{45}
  904. X\indexentry{indentation}{12}
  905. X\indexentry{indentation}{12}
  906. X\indexentry{indented macro call}{12}
  907. X\indexentry{index program}{43}
  908. X\indexentry{inheritance filename}{20}
  909. X\indexentry{interface command line}{18}
  910. X\indexentry{interface command}{43}
  911. X\indexentry{interpreter command}{43}
  912. X\indexentry{interpreter shell}{43}
  913. X\indexentry{invocations number}{22}
  914. X\indexentry{issues miscellaneous}{18}
  915. X\indexentry{Jeremy Begg}{7}
  916. X\indexentry{Jon Bentley}{11}
  917. X\indexentry{Kernighan88}{28}
  918. X\indexentry{Kernighan88}{57}
  919. X\indexentry{Knuth Donald}{11}
  920. X\indexentry{Knuth Donald}{7}
  921. X\indexentry{Knuth83}{11}
  922. X\indexentry{Knuth83}{57}
  923. X\indexentry{Knuth84}{57}
  924. X\indexentry{Knuth84}{9}
  925. X\indexentry{Lamport86}{57}
  926. X\indexentry{Lamport86}{9}
  927. X\indexentry{language design}{44}
  928. X\indexentry{languages dangers}{35}
  929. X\indexentry{LaTeX}{9}
  930. X\indexentry{LaTeX}{9}
  931. X\indexentry{law copyright}{38}
  932. X\indexentry{leakage memory}{30}
  933. X\indexentry{length filenames}{29}
  934. X\indexentry{license GNU}{35}
  935. X\indexentry{license GNU}{39}
  936. X\indexentry{License GNU}{49}
  937. X\indexentry{license}{38}
  938. X\indexentry{lister}{46}
  939. X\indexentry{Macintosh}{29}
  940. X\indexentry{Macintosh}{30}
  941. X\indexentry{Macintosh}{9}
  942. X\indexentry{macro call syntax}{16}
  943. X\indexentry{macro definition syntax}{14}
  944. X\indexentry{macro structure document structure}{23}
  945. X\indexentry{macro structure}{23}
  946. X\indexentry{make}{44}
  947. X\indexentry{malloc}{29}
  948. X\indexentry{management FunnelWeb}{39}
  949. X\indexentry{manuals modifying}{38}
  950. X\indexentry{mapper}{44}
  951. X\indexentry{markers file}{44}
  952. X\indexentry{memory contiguous}{45}
  953. X\indexentry{memory heap}{29}
  954. X\indexentry{memory leakage}{30}
  955. X\indexentry{memory package}{29}
  956. X\indexentry{memory stack}{30}
  957. X\indexentry{memory static}{30}
  958. X\indexentry{memory use of}{29}
  959. X\indexentry{messages diagnostic}{25}
  960. X\indexentry{miscellaneous issues}{18}
  961. X\indexentry{mnemonics ASCII}{45}
  962. X\indexentry{modification features}{35}
  963. X\indexentry{modification FunnelWeb}{35}
  964. X\indexentry{modifying manuals}{38}
  965. X\indexentry{motivation FunnelWeb}{11}
  966. X\indexentry{MSDOS}{29}
  967. X\indexentry{names file}{19}
  968. X\indexentry{names file}{21}
  969. X\indexentry{naming pointers}{29}
  970. X\indexentry{naming types}{29}
  971. X\indexentry{no indentation}{12}
  972. X\indexentry{no indentation}{12}
  973. X\indexentry{notice copyright}{1}
  974. X\indexentry{number invocations}{22}
  975. X\indexentry{number output files}{12}
  976. X\indexentry{numbering section}{23}
  977. X\indexentry{Occam's razor}{12}
  978. X\indexentry{official example}{43}
  979. X\indexentry{official FunnelWeb}{39}
  980. X\indexentry{options}{43}
  981. X\indexentry{out of date documentation}{18}
  982. X\indexentry{output files number}{12}
  983. X\indexentry{OzTeX}{9}
  984. X\indexentry{package memory}{29}
  985. X\indexentry{parameter list formal}{44}
  986. X\indexentry{parameterized macro call syntax}{16}
  987. X\indexentry{parameterized macro definitions syntax}{15}
  988. X\indexentry{parser}{45}
  989. X\indexentry{Pascal}{12}
  990. X\indexentry{past use FunnelWeb}{27}
  991. X\indexentry{Ph.D.}{27}
  992. X\indexentry{pointers naming}{29}
  993. X\indexentry{portability}{28}
  994. X\indexentry{portable filenames}{21}
  995. X\indexentry{pragma syntax}{44}
  996. X\indexentry{pragma version}{45}
  997. X\indexentry{preface}{5}
  998. X\indexentry{presentation notes}{9}
  999. X\indexentry{program availability}{37}
  1000. X\indexentry{program genealogy}{36}
  1001. X\indexentry{program index}{43}
  1002. X\indexentry{programming pearls}{11}
  1003. X\indexentry{protection file extension}{37}
  1004. X\indexentry{protection FunnelWeb}{37}
  1005. X\indexentry{Rabinowitz90}{28}
  1006. X\indexentry{Rabinowitz90}{28}
  1007. X\indexentry{Rabinowitz90}{57}
  1008. X\indexentry{Ramsey89}{46}
  1009. X\indexentry{Ramsey89}{57}
  1010. X\indexentry{recursion detection}{45}
  1011. X\indexentry{recursion test}{43}
  1012. X\indexentry{references cross}{46}
  1013. X\indexentry{references}{57}
  1014. X\indexentry{regression testing}{18}
  1015. X\indexentry{removing features}{35}
  1016. X\indexentry{representation EOL}{45}
  1017. X\indexentry{Robert Endre Tarjan}{45}
  1018. X\indexentry{Roger Brissenden}{7}
  1019. X\indexentry{Ross Williams}{1}
  1020. X\indexentry{scanner}{44}
  1021. X\indexentry{section numbering}{23}
  1022. X\indexentry{section syntax}{44}
  1023. X\indexentry{sections}{16}
  1024. X\indexentry{security authority}{36}
  1025. X\indexentry{setall command}{43}
  1026. X\indexentry{shell interpreter}{43}
  1027. X\indexentry{signature file}{44}
  1028. X\indexentry{Simon Hackett}{7}
  1029. X\indexentry{size stack}{30}
  1030. X\indexentry{South Australian Government Department of Lands}{28}
  1031. X\indexentry{speed}{47}
  1032. X\indexentry{spider}{46}
  1033. X\indexentry{stack memory}{30}
  1034. X\indexentry{stack size}{30}
  1035. X\indexentry{static memory}{30}
  1036. X\indexentry{static variables}{30}
  1037. X\indexentry{strength typesetting}{46}
  1038. X\indexentry{structure document}{16}
  1039. X\indexentry{structure document}{23}
  1040. X\indexentry{structure hierarchical}{23}
  1041. X\indexentry{structure macro}{23}
  1042. X\indexentry{style coding}{28}
  1043. X\indexentry{suite test}{47}
  1044. X\indexentry{suppression include file}{46}
  1045. X\indexentry{syntax FunnelWeb}{14}
  1046. X\indexentry{syntax macro call}{16}
  1047. X\indexentry{syntax macro definition}{14}
  1048. X\indexentry{syntax parameterized macro call}{16}
  1049. X\indexentry{syntax parameterized macro definitions}{15}
  1050. X\indexentry{syntax pragma}{44}
  1051. X\indexentry{syntax section}{44}
  1052. X\indexentry{table of contents}{45}
  1053. X\indexentry{tangle}{45}
  1054. X\indexentry{Tarjan Robert Endre}{45}
  1055. X\indexentry{Tarjan72}{45}
  1056. X\indexentry{Tarjan72}{57}
  1057. X\indexentry{test recursion}{43}
  1058. X\indexentry{test suite}{47}
  1059. X\indexentry{testing regression}{18}
  1060. X\indexentry{text indentation}{12}
  1061. X\indexentry{text indentation}{12}
  1062. X\indexentry{text indentation}{30}
  1063. X\indexentry{text indentation}{45}
  1064. X\indexentry{TeX}{23}
  1065. X\indexentry{TeX}{9}
  1066. X\indexentry{ThinkC compiler}{30}
  1067. X\indexentry{trademark}{36}
  1068. X\indexentry{Trevorrow Andrew}{9}
  1069. X\indexentry{trouble asking for}{28}
  1070. X\indexentry{types naming}{29}
  1071. X\indexentry{typesetter generic}{46}
  1072. X\indexentry{typesetting strength}{46}
  1073. X\indexentry{typesetting}{9}
  1074. X\indexentry{University Adelaide}{27}
  1075. X\indexentry{Unix}{36}
  1076. X\indexentry{USDOD83}{27}
  1077. X\indexentry{USDOD83}{57}
  1078. X\indexentry{use of memory}{29}
  1079. X\indexentry{variables static}{30}
  1080. X\indexentry{vax vms}{18}
  1081. X\indexentry{version GNU}{41}
  1082. X\indexentry{version pragma}{45}
  1083. X\indexentry{video game}{35}
  1084. X\indexentry{vms vax}{18}
  1085. X\indexentry{weave}{45}
  1086. X\indexentry{Williams Ross}{1}
  1087. X\indexentry{work}{38}
  1088. X\indexentry{writing itself FunnelWeb}{28}
  1089. END_OF_FILE
  1090. if test 10625 -ne `wc -c <'hackman/h_manual.sin'`; then
  1091.     echo shar: \"'hackman/h_manual.sin'\" unpacked with wrong size!
  1092. fi
  1093. # end of 'hackman/h_manual.sin'
  1094. fi
  1095. if test -f 'hackman/h_manual.tex' -a "${1}" != "-c" ; then 
  1096.   echo shar: Will not clobber existing file \"'hackman/h_manual.tex'\"
  1097. else
  1098. echo shar: Extracting \"'hackman/h_manual.tex'\" \(9447 characters\)
  1099. sed "s/^X//" >'hackman/h_manual.tex' <<'END_OF_FILE'
  1100. X%==============================================================================%
  1101. X%                             FUNNELWEB USER'S MANUAL                          %
  1102. X%==============================================================================%
  1103. X%
  1104. X% Summary
  1105. X% -------
  1106. X% This is the main .tex file of the FunnelWeb Hacker's Manual.
  1107. X%
  1108. X% For a list of the other files that contribute to this document,
  1109. X% see the list of files given in \input lines at the end of this file.
  1110. X%
  1111. X% See the TeX comments below to find out how to typeset this document.
  1112. X%
  1113. X%
  1114. X% Copyright
  1115. X% ---------
  1116. X% Copyright (C) 1992 Ross N. Williams.
  1117. X%
  1118. X% Permission is granted to make and distribute verbatim copies of this manual
  1119. X% provided that the copyright notice and this permission notice are preserved
  1120. X% on all copies.
  1121. X%
  1122. X%
  1123. X% Version
  1124. X% -------
  1125. X% Date    : May 1992.
  1126. X% Version : 1.0.
  1127. X%
  1128. X%
  1129. X% Author
  1130. X% ------
  1131. X% Name  : Ross Williams.
  1132. X% Email : ross@spam.adelaide.edu.au
  1133. X% Snail : 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1134. X%
  1135. X%
  1136. X% How to Typeset This Document
  1137. X% ----------------------------
  1138. X% This document is written in a format suitable for processing by the LaTeX
  1139. X% typesetting system which can be found on many machines around the world.
  1140. X% The document is an entirely self contained LaTeX document. To assist in
  1141. X% the electronic distribution of this document, all diagrams have been
  1142. X% constructing using ASCII text from within LaTeX. This means that all you
  1143. X% need to print this document is a LaTeX typesetting system.
  1144. X%
  1145. X% To print this document using LaTeX, give a command sequence that looks
  1146. X% something like this:
  1147. X%
  1148. X%    latex manual
  1149. X%    latex manual
  1150. X%    sort  -f <manual.idx >manual.sin
  1151. X%    % Start here if manual.aux, manual.toc, and manual.sin already exist.
  1152. X%    latex manual
  1153. X%    print manual
  1154. X%
  1155. X% The commands must be given three times so as to allow the cross
  1156. X% referencing information to be correctly assembled.
  1157. X% The "sort" command should perform a case insensitive sort of the lines of
  1158. X% its input, but should not alter the lines it is sorting. In the example
  1159. X% about, the "-f" option specifies that the sort should be case insensitive.
  1160. X% The "print" command should print the .dvi file generated by LaTeX.
  1161. X% The details of the typesetting sequence above may vary on your computer
  1162. X% system.
  1163. X%
  1164. X%=============================================================================%
  1165. X
  1166. X
  1167. X% Basic Document Style
  1168. X% --------------------
  1169. X%    The default font size is 10pt which is what I want.
  1170. X%    titlepage - Instructs LaTeX to produce a title page at the front.
  1171. X%    book      - Use the "book" built in format.
  1172. X\documentstyle[titlepage]{book}
  1173. X
  1174. X% The following pagestyle command instructs LaTeX to set each page with just
  1175. X% a page number at the middle of the bottom of each page.
  1176. X\pagestyle{plain}
  1177. X
  1178. X% By default, the "book" style sets even and odd pages differently on the
  1179. X% assumption that the result is to be used in a two-sided printing process.
  1180. X% However, most people printing this will print it single sided.
  1181. X% To suppress double sided mode, we need to give the \onecolumn command.
  1182. X\onecolumn
  1183. X
  1184. X
  1185. X% Page Size and Position
  1186. X% ----------------------
  1187. X% The following sets the size of the text box and its position on the page.
  1188. X% It works OK on A4 paper. I suppose I should test it on American paper too.
  1189. X\textwidth     15cm
  1190. X\textheight    24cm
  1191. X\topmargin      0cm
  1192. X\oddsidemargin  1.5cm
  1193. X\evensidemargin 1.5cm
  1194. X\headheight     0cm
  1195. X\headsep        0cm
  1196. X
  1197. X
  1198. X% Table of Contents
  1199. X% -----------------
  1200. X% Specify that all headings be numbered and appear in the Table of Contents.
  1201. X\setcounter{secnumdepth}{100}
  1202. X\setcounter{tocdepth}{100}
  1203. X
  1204. X% LaTeX lets you create an unnumbered chapter, but it doesn't put it in
  1205. X% the table of contents. So we have to do it manually.
  1206. X\def\pseudochapter#1{%
  1207. X\chapter*{#1}
  1208. X\addcontentsline{toc}{chapter}{#1}
  1209. X}
  1210. X
  1211. X% Paragraph Separation and Indentation
  1212. X% ------------------------------------
  1213. X% The default LaTeX format is to have paragraphs jammed up against each other
  1214. X% with indentation of text on the first line of each paragraph used to
  1215. X% highlight the start of each paragraph. I prefer to identify paragraphs
  1216. X% by separating them with space and eliminating the indentation.
  1217. X\parskip   \medskipamount
  1218. X\parindent 0pt
  1219. X
  1220. X
  1221. X% Quick Style Macros
  1222. X% ------------------
  1223. X% Use of the following macros is much neater and safer than opening a group
  1224. X% and setting a mode (e.g. {\bf sloth}) as these macros will cause TeX to
  1225. X% scream if they span more than one paragraph whereas the group method
  1226. X% can cause half the document to be set in a funny mode.
  1227. X% Other little macros here serve the same neatening normalizing purposes.
  1228. X\def\i#1{{\it #1}}                    % Italics.
  1229. X\def\b#1{{\bf #1}}                    % Bold.
  1230. X\def\p#1{{\tt #1}}                    % Program text.
  1231. X\def\sq#1{`#1'}                       % Single quotes.
  1232. X\def\dq#1{``#1''}                     % Double quotes.
  1233. X\def\dqp#1{\dq{\p{#1}}}               % Double quoted program text.
  1234. X\def\fix#1{\footnote{$\bullet$ #1}}   % Fix it up footnote.
  1235. X\def\softfix#1{}                      % Marks opportunity for improvement.
  1236. X\def\eg{e.g.~}                        % Spacing regulated "e.g.".
  1237. X\def\ie{i.e.~}                        % Spacing regulated "i.e.".
  1238. X\def\til{\char`\~}                    % For tilde ("~") character.
  1239. X\def\circumflex{\char`\^}             % Circumflex.
  1240. X\def\bs{{\tt\char`\\}}                % Backslash.
  1241. X
  1242. X% Point Making
  1243. X% ------------
  1244. X% LaTeX provides some useful environment for listing points. However, it does
  1245. X% not seem to provide what I want which is a paragraph of text led in by
  1246. X% a label set in bold.
  1247. X\def\thing#1{{\bf #1}}
  1248. X\def\firstthing#1{\thing{#1}}
  1249. X\def\narrowthing#1#2{{%From defintion of \narrower
  1250. X\advance\leftskip1cm%
  1251. X\advance\rightskip1cm%
  1252. X{\bf #1} #2\vskip0pt}}
  1253. X\def\narrowtext#1{{%From defintion of \narrower
  1254. X\advance\leftskip1cm%
  1255. X\advance\rightskip1cm%
  1256. X#1\vskip0pt}}
  1257. X\def\summary{\b{Summary:}\ }
  1258. X
  1259. X% Invisible Annotations
  1260. X% ---------------------
  1261. X% Sometimes it is convenient to be able to annotate the LaTeX code without
  1262. X% causing text to appear in the document.
  1263. X% Here, the \checked{} macro can be placed next to any quotation or
  1264. X% fact, or other externally dependent material that has to be checked
  1265. X% before publication. The \note{} macro can be used to add a note.
  1266. X% Both macros are safer than "%" in a paragraph where the text may be
  1267. X% continually being rearranged across lines.
  1268. X\def\checked#1{}
  1269. X\def\note#1{}
  1270. X
  1271. X
  1272. X% Wide Verbatim Text
  1273. X% ------------------
  1274. X% This document was originally set in 12pt and the result was that many of
  1275. X% the verbatim examples wouldn't fit. To solve this, I created two macros
  1276. X% to reduce and increase the size of the text, and wrapped the longer
  1277. X% verbatim texts in calls to the macros. Later, the document was reset in
  1278. X% 10pt eliminating the original problem, so I redefined the macros to empty.
  1279. X%\def\beginsmall{\scriptsize}
  1280. X%\def\endsmall{\normalsize}
  1281. X\def\beginsmall{}
  1282. X\def\endsmall{}
  1283. X
  1284. X
  1285. X% The Index
  1286. X% ---------
  1287. X% LaTeX provides a single command (\index) for adding index entries to the
  1288. X% index. We shorten it and refine it a little with a few definitions.
  1289. X\def\newterm#1{{\bf #1}\x{#1}}            % Special terminology.
  1290. X\def\x#1{\index{#1}}                      % Normal index entry.
  1291. X\def\xx#1#2{\index{#1 #2}\index{#2 #1}}   % Symmetric index entry.
  1292. X\def\xn#1#2{\xx{#1}{#2}}                  % For a person's name.
  1293. X\def\xs#1#2{\index{#1, #2}}               % For an entry with a subclause.
  1294. X
  1295. X
  1296. X% References
  1297. X% ----------
  1298. X\def\paper#1{{\bf [#1]}\x{#1}\linebreak[1]{}}
  1299. X
  1300. X
  1301. X% Figures and Tables
  1302. X% ------------------
  1303. X% LaTeX numbers figures by chapter and doesn't position captions where I
  1304. X% want them and so I have decided to do it all manually. I haven't got
  1305. X% time for fancy stuff so I am using manual macros.
  1306. X\def\mylabel#1#2{%
  1307. X\begin{quotation}
  1308. X\footnotesize\baselineskip=12pt #2
  1309. X\end{quotation}
  1310. X\centerline{#1}
  1311. X\smallskip}
  1312. X
  1313. X\def\figfor#1{{\bf Figure~#1}}
  1314. X\def\tabfor#1{{\bf Table~#1}}
  1315. X
  1316. X\def\figlicense{\figfor{1}}
  1317. X%\def\figtwo{\figfor{2}}
  1318. X
  1319. X%\def\tabone{\tabfor{1}}
  1320. X%\def\tabtwo{\tabfor{2}}
  1321. X
  1322. X
  1323. X% Glossary
  1324. X% --------
  1325. X\def\gloss#1{\thing{#1:}\x{#1}}
  1326. X
  1327. X
  1328. X% Random Leftover Stuff
  1329. X% ---------------------
  1330. X\def\topicbreak{\bigskip\centerline{--- $\S$ ---}\bigskip}
  1331. X
  1332. X
  1333. X
  1334. X%------------------------------------------------------------------------------
  1335. X
  1336. X% Title Page
  1337. X% ----------
  1338. X% Although the title should really be in the ch0.tex file, LaTeX forces us to
  1339. X% put it here.
  1340. X\begin{titlepage}
  1341. X\vspace*{3cm}
  1342. X\begin{center}
  1343. X\Huge
  1344. X\vspace{2cm}
  1345. XFunnelWeb Hacker's Manual\\
  1346. X\vspace{2cm}
  1347. X\LARGE
  1348. Ross~N.~Williams\\
  1349. X\vspace{1cm}
  1350. X\Large
  1351. V1.0 for FunnelWeb V3.0\\
  1352. X\vspace{1cm}
  1353. May 1992\\
  1354. X\normalsize
  1355. X\end{center}
  1356. X\end{titlepage}
  1357. X
  1358. X% Note: LaTeX sometimes puts a blank page before chapters so as to
  1359. X% start each chapter on an odd-numbered page. There is nothing that I
  1360. X% can do about this. This is part of the cost of using LaTeX instead
  1361. X% of TeX.
  1362. X
  1363. X\makeindex
  1364. X
  1365. X%-------------------------------------------------------------------------------
  1366. X
  1367. X\begin{document}
  1368. X\sloppy
  1369. X\nonstopmode
  1370. X
  1371. X\input h_ch0    % Table of contents etc.
  1372. X\input h_ch1    % FunnelWeb Design
  1373. X\input h_ch2    % FunnelWeb Implementation
  1374. X\input h_ch3    % FunnelWeb Modification
  1375. X\input h_ch4    % FunnelWeb Future
  1376. X\input h_cha    % Appendices
  1377. X
  1378. X\end{document}
  1379. X
  1380. X%==============================================================================%
  1381. X%             End of Main .TeX File of FunnelWeb Hacker's Manual               %
  1382. X%==============================================================================%
  1383. END_OF_FILE
  1384. if test 9447 -ne `wc -c <'hackman/h_manual.tex'`; then
  1385.     echo shar: \"'hackman/h_manual.tex'\" unpacked with wrong size!
  1386. fi
  1387. # end of 'hackman/h_manual.tex'
  1388. fi
  1389. if test -f 'scripts/master.fws' -a "${1}" != "-c" ; then 
  1390.   echo shar: Will not clobber existing file \"'scripts/master.fws'\"
  1391. else
  1392. echo shar: Extracting \"'scripts/master.fws'\" \(7864 characters\)
  1393. sed "s/^X//" >'scripts/master.fws' <<'END_OF_FILE'
  1394. X!============================<Start of Master Script>===========================
  1395. X!
  1396. X! FUNNELWEB MASTER TEST SCRIPT
  1397. X! ============================
  1398. X! This is the master FunnelWeb test script.
  1399. X! To test FunnelWeb:
  1400. X!    1. Create the following directory tree:
  1401. X!       <anyname>
  1402. X!          scripts - A directory containing .fws scripts.
  1403. X!          tests   - A directory containing .fw test files.
  1404. X!          results - An empty directory to receive results of testing.
  1405. X!          answers - A directory containing the correct answers.
  1406. X!    2. Modify the "root test directory" section of this script as described.
  1407. X!    3. Ensure that all of the directories and files are on Read/Write access.
  1408. X!    4. Set default to the "scripts" directory.
  1409. X!    5. Invoke FunnelWeb with the "+k" option.
  1410. X!    6. Give the command "execute master.fws".
  1411. X!    7. The test should last for a few minutes.
  1412. X!    8. Read the test summary on the console at the end of the test.
  1413. X!
  1414. X! Notes on Script Mechanics
  1415. X! -------------------------
  1416. X! * FunnelWeb predefines "$/" to be the character that separates
  1417. X!   directory specifications from file names on whatever machine it is
  1418. X!   running on. (e.g. Mac=":", Sun="/", Vax="]", PC="\").
  1419. X
  1420. write ""
  1421. write "FUNNELWEB TEST SCRIPT"
  1422. write "====================="
  1423. write "This FunnelWeb shellscript applies FunnelWeb to a suite of test files."
  1424. write "The result is a differences report comparing the result files of this"
  1425. write "run with a predefined set of correct "answer" files."
  1426. write ""
  1427. write "Do not be alarmed by errors occurring during the testing as these"
  1428. write "are a consequence of tests of FunnelWeb's detection of various errors."
  1429. write ""
  1430. write "This script cleans up files lying around before testing, so if"
  1431. write "it fails for some reason, you can run it again without having."
  1432. write "to worry about cleaning up after the results of the previous run."
  1433. write ""
  1434. write "This script takes about 10 minutes to run on a 1 MIP machine."
  1435. write "Here we go!"
  1436. write ""
  1437. X!
  1438. X! Define Symbol For The Root Test Directory
  1439. X! -----------------------------------------
  1440. X! IMPORTANT: THIS DEFINITION IS ALL YOU HAVE TO CHANGE TO GET THIS
  1441. X!            SCRIPT WORKING ON YOUR MACHINE.
  1442. X! The script substitution variable <dollar>R must point to the root
  1443. X! directory <anyname> (see above). Here are some examples of definitions
  1444. X! of <dollar>R on various machines onto which FunnelWeb has been ported.
  1445. X
  1446. X!SUN: define R "/usr2/users/ross/fwdir/"
  1447. X!VMS: define R "$$USERS:[ROSS.FWDIR."
  1448. X!PC : define R "\fwdir\"
  1449. X!Mac: define R "fatdisk:fwdir:"
  1450. X
  1451. X! Place your definition here.
  1452. define R "/usr2/users/ross/fwdir/"
  1453. X
  1454. X! Define Symbols for Test Directories
  1455. X! -----------------------------------
  1456. X!      S - The directory containing the .fws FunnelWeb test scripts.
  1457. X!      I - The directory containing the .fw input files.
  1458. X!      O - The directory where all the test output goes.
  1459. X!      A - The directory containing all the correct answers.
  1460. X!      D - The differences file.
  1461. define S "$Rscripts$/"
  1462. define I "$Rtests$/"
  1463. define O "$Rresults$/"
  1464. define A "$Ranswers$/"
  1465. define D "$Rresults$/0testres.dif"
  1466. X
  1467. X! Set FunnelWeb Options Default
  1468. X! -----------------------------
  1469. X! The following options remain as default for all the runs.
  1470. X! The only two options turned on are +c100 and +b7.
  1471. X! The sub-scripts turn on the options they need explicitly.
  1472. X!    -f  No input file specified.
  1473. X!    -j  No journal file.
  1474. X!    =i..Include files come from the input directory.
  1475. X!    -o  No product file(s).
  1476. X!    -t  No typeset file.
  1477. X!    -l  No Listing file.
  1478. X!    -d  No deletion of output files.
  1479. X!    +c100 No suppression of listing in listing file.
  1480. X!    -q  Messages to screen.
  1481. X!    -x  No default script file to execute.
  1482. X!    -w  No limit on product file line length imposed by command line.
  1483. X!    -k  No interactive mode.
  1484. X!    -b1 No dump of input file map.
  1485. X!    -b2 No dump of line list.
  1486. X!    -b3 No dump of token list.
  1487. X!    -b4 No dump of macro table.
  1488. X!    -b5 No dump of document list.
  1489. X!    -b6 No dump of timing results.
  1490. X!    +b7 DONT write anything non-deterministic.
  1491. set -f -j =i$I -o -t -l -d +c100 -q -x -w -k -b123456 +b7
  1492. X
  1493. X! Delete any Old Differences File
  1494. X! -------------------------------
  1495. eneo $D
  1496. X
  1497. X! Zero the Difference Summary Counters
  1498. X! ------------------------------------
  1499. X! This is necessary in case the user runs this script twice in one session.
  1500. diffzero
  1501. X
  1502. X! Clean Test Scripts
  1503. X! ------------------
  1504. X! When text files are copied from one machine to another, they can sometimes
  1505. X! end up with end-of-line characters that are incorrect for the target machine.
  1506. X! The following commands clean up the sub-scripts that we are about to invoke.
  1507. fixeols $Stest_ld.fws
  1508. fixeols $Stest_l.fws
  1509. fixeols $Stest_lo.fws
  1510. fixeols $Stest_lt.fws
  1511. fixeols $Stest_lot.fws
  1512. fixeols $Stest_lo2.fws
  1513. X
  1514. X! Generate Tricky Test Files
  1515. X! --------------------------
  1516. X! This process is a bit messy and requires operations similar to those in the
  1517. X! other sub-scripts (test_ld.fws...), and so I have placed it all in
  1518. X! test_gen.fws.
  1519. execute $Stest_gen.fws
  1520. X
  1521. X! Clean up the Include Files
  1522. X! --------------------------
  1523. X! The test scripts all "purify" their file arguments by running them through
  1524. X! the "fixeols" command. However, the include files aren't automated in this
  1525. X! way, so we have to do them here explicitly.
  1526. fixeols $Isc13a.fwi
  1527. fixeols $Isc13b.fwi
  1528. fixeols $Isc13c.fwi
  1529. fixeols $Isc13d.fwi
  1530. fixeols $Isc13e.fwi
  1531. fixeols $Isc13f.fwi
  1532. fixeols $Isc15a.fwi
  1533. fixeols $Itg08a.fwi
  1534. fixeols $Iex09a.fwi
  1535. fixeols $Iex10a.fwi
  1536. X
  1537. X! Skip Some Tests
  1538. X! ---------------
  1539. X! If you are debugging some tests, you may wish to move the "here" command
  1540. X! further down in the testing so as to skip to the desired tests.
  1541. X! X must be defined because FunnelWeb expands command lines even while skipping
  1542. X! and generates a "leading spaces" error if X is not defined to be non-blank.
  1543. define X "!"
  1544. skipto
  1545. here
  1546. X
  1547. X! Test Scanner and Parser
  1548. X! -----------------------
  1549. define X "execute $Stest_ld.fws"
  1550. X! Special cases:
  1551. X!    sc01 does not exist (test of non-existence input file).
  1552. X!    sc09 contains control characters that we don't want FIXEOLS to frob.
  1553. X$X sc01 !
  1554. X$X sc02
  1555. X$X sc03
  1556. X$X sc04
  1557. X$X sc05
  1558. X$X sc06
  1559. X$X sc07
  1560. X$X sc08
  1561. X$X sc09 !
  1562. X$X sc10
  1563. X$X sc11
  1564. X$X sc12
  1565. X$X sc13
  1566. X$X sc14
  1567. X$X sc15
  1568. X$X sc16
  1569. X$X sc17
  1570. X$X sc18
  1571. X$X sc19
  1572. X$X sc20
  1573. X$X sc21
  1574. X$X sc22
  1575. X$X sc23
  1576. X$X sc24
  1577. X$X sc25
  1578. X$X sc26
  1579. X$X sc27
  1580. X$X sc28
  1581. X$X sc29
  1582. X
  1583. X$X pr01
  1584. X$X pr02
  1585. X$X pr03
  1586. X$X pr04
  1587. X$X pr05
  1588. X$X pr06
  1589. X$X pr07
  1590. X$X pr08
  1591. X$X pr09
  1592. X$X pr10
  1593. X
  1594. X! Test Analyser
  1595. X! -------------
  1596. define X "execute $Stest_l.fws"
  1597. X$X an01
  1598. X$X an02
  1599. X$X an03
  1600. X$X an04
  1601. X
  1602. X! Test Tangle
  1603. X! -----------
  1604. define X "execute $Stest_lo.fws"
  1605. X$X tg01
  1606. X$X tg02
  1607. X$X tg03
  1608. X$X tg04
  1609. X$X tg05
  1610. X$X tg06
  1611. X$X tg07
  1612. X$X tg08
  1613. X$X tg09
  1614. X
  1615. X! Test Weave
  1616. X! ----------
  1617. define X "execute $Stest_lt.fws"
  1618. X$X wv01
  1619. X$X wv02
  1620. X$X wv03
  1621. X$X wv04
  1622. X$X wv05
  1623. X$X wv06
  1624. X
  1625. X! Examples in User Manual Tutorial
  1626. X! --------------------------------
  1627. define X "execute $Stest_lo.fws"
  1628. X$X ex01
  1629. X$X ex02
  1630. define X "execute $Stest_l.fws"
  1631. X$X ex03
  1632. define X "execute $Stest_lo.fws"
  1633. X$X ex04
  1634. X$X ex05
  1635. X$X ex06
  1636. X$X ex07
  1637. X$X ex08
  1638. X$X ex09
  1639. X$X ex10
  1640. X
  1641. define X "execute $Stest_lt.fws"
  1642. X$X ex11
  1643. X$X ex12
  1644. X$X ex13
  1645. X$X ex14
  1646. X$X ex15
  1647. X
  1648. define X "execute $Stest_lot.fws"
  1649. X$X ex16
  1650. X
  1651. X! Examples in Hints Chapter
  1652. X! -------------------------
  1653. define X "execute $Stest_lo.fws"
  1654. X$X hi01
  1655. X$X hi02
  1656. X$X hi03
  1657. X$X hi04
  1658. X$X hi05
  1659. define X "execute $Stest_lo2.fws"
  1660. X$X hi06
  1661. X$X hi07
  1662. define X "execute $Stest_lo.fws"
  1663. X$X hi08
  1664. X$X hi09
  1665. X$X hi10
  1666. X
  1667. X! Final Test Summary
  1668. X! ------------------
  1669. write ""
  1670. write ""
  1671. write "The FunnelWeb test suite script has successfully completed."
  1672. write ""
  1673. diffsummary
  1674. write ""
  1675. write "If the differences summary above gives Different=0, then FunnelWeb"
  1676. write "has passed the test suite and is ready for use."
  1677. write ""
  1678. write "If not, you should examine the file"
  1679. write "   "$D""
  1680. write "to see what went wrong."
  1681. write ""
  1682. write "By the way, there should be 1 Severe, 277 Errors, and 12 Warnings."
  1683. write ""
  1684. X!=============================<End of Master Script>============================
  1685. X
  1686. END_OF_FILE
  1687. if test 7864 -ne `wc -c <'scripts/master.fws'`; then
  1688.     echo shar: \"'scripts/master.fws'\" unpacked with wrong size!
  1689. fi
  1690. # end of 'scripts/master.fws'
  1691. fi
  1692. if test -f 'sources/help.h' -a "${1}" != "-c" ; then 
  1693.   echo shar: Will not clobber existing file \"'sources/help.h'\"
  1694. else
  1695. echo shar: Extracting \"'sources/help.h'\" \(7957 characters\)
  1696. sed "s/^X//" >'sources/help.h' <<'END_OF_FILE'
  1697. X/*##############################################################################
  1698. X
  1699. XFUNNNELWEB COPYRIGHT
  1700. X====================
  1701. XFunnelWeb is a literate-programming macro preprocessor.
  1702. X
  1703. Copyright (C) 1992 Ross N. Williams.
  1704. X
  1705. X   Ross N. Williams
  1706. X   ross@spam.adelaide.edu.au
  1707. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1708. X
  1709. This program is free software; you can redistribute it and/or modify
  1710. it under the terms of Version 2 of the GNU General Public License as
  1711. published by the Free Software Foundation.
  1712. X
  1713. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  1714. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1715. See Version 2 of the GNU General Public License for more details.
  1716. X
  1717. You should have received a copy of Version 2 of the GNU General Public
  1718. License along with this program. If not, you can FTP the license from
  1719. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  1720. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1721. X
  1722. Section 2a of the license requires that all changes to this file be
  1723. recorded prominently in this file. Please record all changes here.
  1724. X
  1725. Programmers:
  1726. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1727. X
  1728. Changes:
  1729. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  1730. X
  1731. X##############################################################################*/
  1732. X
  1733. X
  1734. X/******************************************************************************/
  1735. X/*                                   HELP.H                                   */
  1736. X/******************************************************************************/
  1737. X/*                                                                            */
  1738. X/* HELP PACKAGE                                                               */
  1739. X/* ============                                                               */
  1740. X/* As I came closer and closer to completing the release version of           */
  1741. X/* FunnelWeb, I noticed that the online help was a bit of a mess. I had       */
  1742. X/* random commands and command line options here and there to provide bits of */
  1743. X/* information. After a close look and some thought, I decided to centralize  */
  1744. X/* all of FunnelWeb's help messages into one module, and provide a clean and  */
  1745. X/* consistent interface to the help messages, both in the command line, and   */
  1746. X/* in interactive mode.                                                       */
  1747. X/*                                                                            */
  1748. X/* The result is that all of the help messages have been  moved to            */
  1749. X/* this module. Each help message has a name consisting of a string. One      */
  1750. X/* particular message has the name "MENU" and is the root help message (the   */
  1751. X/* "menu message"). It contains a list of all the help messages available and */
  1752. X/* their names.                                                               */
  1753. X/*                                                                            */
  1754. X/* The command line connects to help by providing a single command line       */
  1755. X/* option called +Hx which has the effect of displaying the help message      */
  1756. X/* called x. The default is -Hmenu. The "-" means that help is not invoked by */
  1757. X/* default, but that if the user specifies +H, the menu message will be       */
  1758. X/* printed. If the user specifies (say) +Hsloth, message SLOTH will be        */
  1759. X/* displayed. The menu message is printed if the user invokes FunnelWeb with  */
  1760. X/* no actions. The +H option is classified as an action option.               */
  1761. X/*                                                                            */
  1762. X/* Interactive mode connects to help through the HELP command. In the spirit  */
  1763. X/* of the command line interface, if no argument is given, the menu message   */
  1764. X/* is displayed. If an argument is given, the specified message is written    */
  1765. X/* out.                                                                       */
  1766. X/*                                                                            */
  1767. X/* This module contributes two things to this process:                        */
  1768. X/*    1) Provides a mapping from message names to messages.                   */
  1769. X/*    2) Acts as a repository for the messages themselves.                    */
  1770. X/*                                                                            */
  1771. X/******************************************************************************/
  1772. X
  1773. X/* Ensure that the body of this header file is included at most once.         */
  1774. X#ifndef DONE_HELP
  1775. X#define DONE_HELP
  1776. X
  1777. X/******************************************************************************/
  1778. X
  1779. X#include "style.h"
  1780. X
  1781. X/******************************************************************************/
  1782. X
  1783. X/* Place a bound on help name length, and define an array type to hold them.  */
  1784. X#define HL_NMLEN 20
  1785. typedef char hn_t[HL_NMLEN+1];
  1786. X
  1787. X/******************************************************************************/
  1788. X
  1789. X/* Each of the messages has a unique symbol and number. The reason for        */
  1790. X/* defining these symbols instead of just using the message names in the code */
  1791. X/* is that doing it this way allows us to change the exact message names      */
  1792. X/* without having to track down all their occurences in the code, or getting  */
  1793. X/* nasty surprises later down the track at run time (the compiler will tell   */
  1794. X/* you in a call containing HL_SLT that the symbol doesn't exist, but it      */
  1795. X/* won't complain about a string argument that just happens not to be the     */
  1796. X/* name of a message anymore).                                                */
  1797. X
  1798. X/* HL_ERR is the non-existent message. */
  1799. X#define HL_ERR 0
  1800. X
  1801. X/* HL_MEN - Help messages.             */
  1802. X/* HL_INT - Introduction to FunnelWeb. */
  1803. X/* HL_OPT - Command line options.      */
  1804. X/* HL_DOP - Option defaults.           */
  1805. X/* HL_COM - Interactive commands.      */
  1806. X/* HL_DOC - Documentation.             */
  1807. X/* HL_REG - Registration.              */
  1808. X/* HL_LIC - The GNU License.           */
  1809. X/* HL_COP - Copyright notice.          */
  1810. X/* HL_NOW - No Warranty notice.        */
  1811. X/* HL_DIS - Distribution notice.       */
  1812. X/* HL_ACK - Acknowledgements.          */
  1813. X/* HL_VER - Versions.                  */
  1814. X/* HL_SUP - Support.                   */
  1815. X/* HL_MOD - Modifications.             */
  1816. X#define HL_MEN  1
  1817. X#define HL_INT  2
  1818. X#define HL_OPT  3
  1819. X#define HL_DOP  4
  1820. X#define HL_COM  5
  1821. X#define HL_DOC  6
  1822. X#define HL_REG  7
  1823. X#define HL_GNU  8
  1824. X#define HL_COP  9
  1825. X#define HL_NOW 10
  1826. X#define HL_DIS 11
  1827. X#define HL_ACK 12
  1828. X#define HL_VER 13
  1829. X#define HL_SUP 14
  1830. X#define HL_MOD 15
  1831. X
  1832. X/* The following symbol does not represent a message. It is the number of     */
  1833. X/* messages. This is useful for range checking and possibly in for loops.     */
  1834. X#define HL_MAX 15
  1835. X
  1836. X/******************************************************************************/
  1837. X
  1838. XEXPORT uword hel_num P_((char *));
  1839. X/* Accepts a character string that is supposed to be the name of a message    */
  1840. X/* and returns the number of the message, or HL_ERR if the string does not    */
  1841. X/* correspond to any defined message. A match will occur if the argument      */
  1842. X/* string is the same (with case independent matching) as the prefix (of      */
  1843. X/* corresponding length) of exactly one message name.                         */
  1844. X
  1845. XEXPORT void hel_wri P_((void (*)(char *),uword));
  1846. X/* Accepts a message number and writes the message using the function         */
  1847. X/* provided in the first argument. Bombs the program if the message number in */
  1848. X/* the second argument is not in the range [1,HL_MAX].                        */
  1849. X
  1850. X/******************************************************************************/
  1851. X
  1852. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  1853. X#endif
  1854. X
  1855. X/******************************************************************************/
  1856. X/*                               End of HELP.H                                */
  1857. X/******************************************************************************/
  1858. END_OF_FILE
  1859. if test 7957 -ne `wc -c <'sources/help.h'`; then
  1860.     echo shar: \"'sources/help.h'\" unpacked with wrong size!
  1861. fi
  1862. # end of 'sources/help.h'
  1863. fi
  1864. if test -f 'sources/list.c' -a "${1}" != "-c" ; then 
  1865.   echo shar: Will not clobber existing file \"'sources/list.c'\"
  1866. else
  1867. echo shar: Extracting \"'sources/list.c'\" \(10513 characters\)
  1868. sed "s/^X//" >'sources/list.c' <<'END_OF_FILE'
  1869. X/*##############################################################################
  1870. X
  1871. XFUNNNELWEB COPYRIGHT
  1872. X====================
  1873. XFunnelWeb is a literate-programming macro preprocessor.
  1874. X
  1875. Copyright (C) 1992 Ross N. Williams.
  1876. X
  1877. X   Ross N. Williams
  1878. X   ross@spam.adelaide.edu.au
  1879. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1880. X
  1881. This program is free software; you can redistribute it and/or modify
  1882. it under the terms of Version 2 of the GNU General Public License as
  1883. published by the Free Software Foundation.
  1884. X
  1885. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  1886. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1887. See Version 2 of the GNU General Public License for more details.
  1888. X
  1889. You should have received a copy of Version 2 of the GNU General Public
  1890. License along with this program. If not, you can FTP the license from
  1891. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  1892. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1893. X
  1894. Section 2a of the license requires that all changes to this file be
  1895. recorded prominently in this file. Please record all changes here.
  1896. X
  1897. Programmers:
  1898. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1899. X
  1900. Changes:
  1901. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  1902. X
  1903. X##############################################################################*/
  1904. X
  1905. X
  1906. X/******************************************************************************/
  1907. X/*                                    LIST.C                                  */
  1908. X/******************************************************************************/
  1909. X
  1910. X#include "style.h"
  1911. X
  1912. X#include "as.h"
  1913. X#include "machin.h"
  1914. X#include "memory.h"
  1915. X
  1916. X/******************************************************************************/
  1917. X
  1918. X/* In order to catch uninitialized and corrupted lists, the first and last    */
  1919. X/* fields of legitimate list objects contain magic numbers. The following     */
  1920. X/* #defines give the values of these numbers. The first thing that each       */
  1921. X/* function of this package does is to check the two magic number fields of   */
  1922. X/* the list it has just been passed, and bomb the package if the fields have  */
  1923. X/* the wrong values. This technique is likely to pick uninitialized lists,    */
  1924. X/* as well as lists that have been partially overwritten.                     */
  1925. X#define MAGIC_HEAD_VALUE  (97673812L)
  1926. X#define MAGIC_TAIL_VALUE  (49357294L)
  1927. X
  1928. X/******************************************************************************/
  1929. X
  1930. typedef struct node_t_      /* Structure used to compose the list proper.     */
  1931. X  {
  1932. X   struct node_t_ *p_prev;  /* Points to adjacent node closer to head.        */
  1933. X   struct node_t_ *p_next;  /* Points to adjacent node closer to tail.        */
  1934. X   p_void          p_data;  /* Points to data in heap for this element.       */
  1935. X  }
  1936. X  node_t;
  1937. X
  1938. typedef node_t *p_node_t;   /* Pointer to node type.                          */
  1939. X
  1940. typedef struct              /* Main list object containing all the goodies.   */
  1941. X  {
  1942. X   ulong    magic_head;     /* Helpful in catching list object corruptions.   */
  1943. X   p_node_t p_head;         /* Points to the head of the list (or NULL).      */
  1944. X   p_node_t p_tail;         /* Points to the tail of the list (or NULL).      */
  1945. X   p_node_t p_mark;         /* Points to the marked element   (or NULL).      */
  1946. X   size_t   data_bytes;     /* Number of bytes in this list's data elements.  */
  1947. X   ulong    length;         /* Number of elements in this list.               */
  1948. X   ulong    magic_tail;     /* Helpful in catching list object corruptions.   */
  1949. X  }
  1950. X  ls_t;
  1951. X
  1952. typedef ls_t *p_ls_t;       /* Main list view type.                           */
  1953. X
  1954. typedef p_void    p_lsel_t; /* Escalating pointers to data elements!          */
  1955. typedef p_lsel_t *pp_lsel_t;
  1956. X
  1957. X/* We need the function prototypes from list.h. The #define ensures that the  */
  1958. X/* abstract exported definition of a list is not visible to us here.          */
  1959. X#define INLISTC
  1960. X#include "list.h"
  1961. X
  1962. X/******************************************************************************/
  1963. X
  1964. LOCAL void ls_check P_((p_ls_t));
  1965. LOCAL void ls_check(p_ls)
  1966. X/* Accepts a pointer to a list and performs a series of checks to make sure   */
  1967. X/* that the list has not been corrupted in some way.                          */
  1968. X/* This function is the sort of function that is normally turned off in       */
  1969. X/* production versions. However, we are too scared to in FunnelWeb because    */
  1970. X/* lists are not typesafe and are used throughout the program.                */
  1971. p_ls_t p_ls;
  1972. X{
  1973. X as_cold(p_ls!=NULL,"ls_check: List pointer is NULL.");
  1974. X as_cold(p_ls->magic_head==MAGIC_HEAD_VALUE,
  1975. X         "ls_check: Magic number at head of record is incorrect.");
  1976. X as_cold(p_ls->magic_tail==MAGIC_TAIL_VALUE,
  1977. X         "ls_check: Magic number at tail of record is incorrect.");
  1978. X}
  1979. X
  1980. X/******************************************************************************/
  1981. X
  1982. XEXPORT p_ls_t ls_cre (data_bytes)
  1983. size_t data_bytes;
  1984. X{
  1985. X p_ls_t p_ls;
  1986. X
  1987. X p_ls=(p_ls_t) mm_temp(sizeof(ls_t));
  1988. X p_ls->magic_head = MAGIC_HEAD_VALUE;
  1989. X p_ls->p_head     = NULL;
  1990. X p_ls->p_tail     = NULL;
  1991. X p_ls->p_mark     = NULL;
  1992. X p_ls->data_bytes = data_bytes;
  1993. X p_ls->length     = 0;
  1994. X p_ls->magic_tail = MAGIC_TAIL_VALUE;
  1995. X return p_ls;
  1996. X}
  1997. X
  1998. X/******************************************************************************/
  1999. X
  2000. XEXPORT void ls_add(p_ls,p_lsel)
  2001. p_ls_t p_ls;
  2002. p_void p_lsel;
  2003. X{
  2004. X p_node_t p_node;
  2005. X
  2006. X AS_HCODE(ls_check(p_ls);)
  2007. X
  2008. X /* Create the list node and the data node hanging off it. Copy the data in. */
  2009. X p_node        =(p_node_t) mm_temp(sizeof(node_t));
  2010. X p_node->p_data=(p_void)   mm_temp(p_ls->data_bytes);
  2011. X memcpy(p_node->p_data,p_lsel,p_ls->data_bytes);
  2012. X
  2013. X /* Attach the new node to the tail of the list. */
  2014. X
  2015. X p_node->p_prev=p_ls->p_tail;      /* Pointers in the new node itself. */
  2016. X p_node->p_next=NULL;
  2017. X
  2018. X if (p_ls->p_head == NULL)         /* Headside pointer pointing to new node. */
  2019. X   p_ls->p_head=p_node;
  2020. X else
  2021. X   p_ls->p_tail->p_next=p_node;
  2022. X
  2023. X p_ls->p_tail=p_node;              /* Tailside pointer pointing to new node. */
  2024. X
  2025. X /* Inc the length. */
  2026. X p_ls->length++;
  2027. X}
  2028. X
  2029. X/******************************************************************************/
  2030. X
  2031. XEXPORT void ls_lop(p_ls)
  2032. p_ls_t p_ls;
  2033. X{
  2034. X /* p_node_t p_targ; ONLY NEEDED IF DEALLOCATING */
  2035. X
  2036. X AS_HCODE(ls_check(p_ls);)
  2037. X
  2038. X as_cold(p_ls->length>0,"ls_lop: List is empty.");
  2039. X
  2040. X /* Make a note of the node being deleted. */
  2041. X /* p_targ=p_ls->p_tail; ONLY NEEDED IF DEALLOCATED. */
  2042. X
  2043. X /* If the target node was the only node, stitch up the ends of the list. */
  2044. X if (--p_ls->length==0)
  2045. X   {
  2046. X    p_ls->p_head=NULL;
  2047. X    p_ls->p_tail=NULL;
  2048. X   }
  2049. X else
  2050. X   { /* Unhook node from tail of list. */
  2051. X    p_ls->p_tail         = p_ls->p_tail->p_prev;
  2052. X    p_ls->p_tail->p_next = NULL;
  2053. X   }
  2054. X
  2055. X /* The following two commented calls show what we WOULD have to do to        */
  2056. X /* deallocate the list node. However, in FunnelWeb, all list items are       */
  2057. X /* allocated under the mm package watermark system using mm_temp calls so    */
  2058. X /* there is no need to free up the memory here.                              */
  2059. X /* DEALLOCATE(PV p_targ->p_data);                                            */
  2060. X /* DEALLOCATE(PV p_targ);                                                    */
  2061. X}
  2062. X
  2063. X/******************************************************************************/
  2064. X
  2065. XEXPORT ulong ls_len(p_ls)
  2066. p_ls_t p_ls;
  2067. X{
  2068. X AS_HCODE(ls_check(p_ls);)
  2069. X return p_ls->length;
  2070. X}
  2071. X
  2072. X/******************************************************************************/
  2073. X
  2074. XEXPORT void ls_fir(p_ls)
  2075. p_ls_t p_ls;
  2076. X{
  2077. X ls_check(p_ls);
  2078. X p_ls->p_mark=p_ls->p_head;
  2079. X}
  2080. X
  2081. X/******************************************************************************/
  2082. X
  2083. XEXPORT void ls_nxt(p_ls,pp_lsel)
  2084. p_ls_t    p_ls;
  2085. pp_lsel_t pp_lsel;
  2086. X{
  2087. X AS_HCODE(ls_check(p_ls);)
  2088. X
  2089. X if (p_ls->p_mark==NULL)
  2090. X   {*pp_lsel=NULL; return;}
  2091. X *pp_lsel=p_ls->p_mark->p_data;
  2092. X p_ls->p_mark=p_ls->p_mark->p_next;
  2093. X}
  2094. X
  2095. X/******************************************************************************/
  2096. X
  2097. XEXPORT void ls_loo(p_ls,index,pp_lsel)
  2098. p_ls_t    p_ls;
  2099. ulong     index;
  2100. pp_lsel_t pp_lsel;
  2101. X{
  2102. X p_node_t p;
  2103. X ulong    i;
  2104. X
  2105. X AS_HCODE(ls_check(p_ls);)
  2106. X
  2107. X p=p_ls->p_head;
  2108. X as_cold(p!=NULL,"is_loo: List is empty.");
  2109. X for(i=1;i<index;i++)
  2110. X   {
  2111. X    p=p->p_next;
  2112. X    as_cold(p!=NULL,"is_loo: Index is too high for this list.");
  2113. X   }
  2114. X *pp_lsel=p->p_data;
  2115. X}
  2116. X
  2117. X/******************************************************************************/
  2118. X
  2119. XEXPORT void ls_tai(p_ls,pp_lsel)
  2120. p_ls_t    p_ls;
  2121. pp_lsel_t pp_lsel;
  2122. X{
  2123. X AS_HCODE(ls_check(p_ls);)
  2124. X
  2125. X as_cold(p_ls->p_tail!=NULL,"ls_tai: List is empty.");
  2126. X *pp_lsel=p_ls->p_tail->p_data;
  2127. X}
  2128. X
  2129. X/******************************************************************************/
  2130. X
  2131. XEXPORT void ls_emp(p_ls)
  2132. p_ls_t p_ls;
  2133. X{
  2134. X AS_HCODE(ls_check(p_ls);)
  2135. X
  2136. X /* The following loop WOULD be required if we had to deallocate the list     */
  2137. X /* elements explicitly.  However, as all list elements are allocated using   */
  2138. X /* mm_temp, it is possible to claim them later as a block. So here, we just  */
  2139. X /* let the list items drift off into the sunset.                             */
  2140. X /* p_node_t p_curr;                */
  2141. X /* p_curr=p_ls->p_head;            */
  2142. X /* while (p_curr != NULL)          */
  2143. X /*   {                             */
  2144. X /*    p_node_t p_targ=p_curr;      */
  2145. X /*    p_curr=p_curr->p_next;       */
  2146. X /*    my_free(PV p_targ->p_data);  */
  2147. X /*    my_free(PV p_targ);          */
  2148. X /*   }                             */
  2149. X
  2150. X p_ls->p_head=NULL;
  2151. X p_ls->p_tail=NULL;
  2152. X p_ls->p_mark=NULL;
  2153. X p_ls->length=0;
  2154. X}
  2155. X
  2156. X/******************************************************************************/
  2157. X
  2158. XEXPORT void ls_des(p_ls)
  2159. p_ls_t p_ls;
  2160. X{
  2161. X ls_check(p_ls);
  2162. X
  2163. X ls_emp(p_ls);
  2164. X p_ls->magic_head=0;  /* Zap the magic numbers in case memory is reused. */
  2165. X p_ls->magic_tail=0;
  2166. X
  2167. X /* The following call WOULD be required if it wasn't for the MM watermark    */
  2168. X /* system of memory allocation.                                              */
  2169. X /* my_free(PV p_ls); */
  2170. X}
  2171. X
  2172. X/******************************************************************************/
  2173. X
  2174. XEXPORT p_void ls_mar (p_ls)
  2175. p_ls_t p_ls;
  2176. X{
  2177. X AS_HCODE(ls_check(p_ls);)
  2178. X return PV p_ls->p_mark;
  2179. X}
  2180. X
  2181. X/******************************************************************************/
  2182. X
  2183. XEXPORT void ls_set(p_ls,p_m)
  2184. p_ls_t p_ls;
  2185. p_void p_m;
  2186. X{
  2187. X AS_HCODE(ls_check(p_ls);)
  2188. X p_ls->p_mark=(p_node_t) p_m;
  2189. X}
  2190. X
  2191. X/******************************************************************************/
  2192. X/*                                End of LIST.C                               */
  2193. X/******************************************************************************/
  2194. END_OF_FILE
  2195. if test 10513 -ne `wc -c <'sources/list.c'`; then
  2196.     echo shar: \"'sources/list.c'\" unpacked with wrong size!
  2197. fi
  2198. # end of 'sources/list.c'
  2199. fi
  2200. if test -f 'sources/table.h' -a "${1}" != "-c" ; then 
  2201.   echo shar: Will not clobber existing file \"'sources/table.h'\"
  2202. else
  2203. echo shar: Extracting \"'sources/table.h'\" \(10727 characters\)
  2204. sed "s/^X//" >'sources/table.h' <<'END_OF_FILE'
  2205. X/*##############################################################################
  2206. X
  2207. XFUNNNELWEB COPYRIGHT
  2208. X====================
  2209. XFunnelWeb is a literate-programming macro preprocessor.
  2210. X
  2211. Copyright (C) 1992 Ross N. Williams.
  2212. X
  2213. X   Ross N. Williams
  2214. X   ross@spam.adelaide.edu.au
  2215. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2216. X
  2217. This program is free software; you can redistribute it and/or modify
  2218. it under the terms of Version 2 of the GNU General Public License as
  2219. published by the Free Software Foundation.
  2220. X
  2221. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2222. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2223. See Version 2 of the GNU General Public License for more details.
  2224. X
  2225. You should have received a copy of Version 2 of the GNU General Public
  2226. License along with this program. If not, you can FTP the license from
  2227. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2228. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2229. X
  2230. Section 2a of the license requires that all changes to this file be
  2231. recorded prominently in this file. Please record all changes here.
  2232. X
  2233. Programmers:
  2234. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2235. X
  2236. Changes:
  2237. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2238. X
  2239. X##############################################################################*/
  2240. X
  2241. X
  2242. X/******************************************************************************/
  2243. X/*                                   TABLE.H                                  */
  2244. X/******************************************************************************/
  2245. X/*                                                                            */
  2246. X/* Introduction                                                               */
  2247. X/* ------------                                                               */
  2248. X/* This table package (table.h and table.c) implements a table abstraction.   */
  2249. X/*                                                                            */
  2250. X/* Facts about Tables                                                         */
  2251. X/* ------------------                                                         */
  2252. X/* - A TABLE stores zero or more (KEY,VALUE) PAIRS.                           */
  2253. X/* - The user decides the types of keys and values and provides a             */
  2254. X/*   COMPARISON FUNCTION providing a complete ordering of the set of keys.    */
  2255. X/* - The comparison function must be consistent between calls.                */
  2256. X/* - Tables store pairs in key order.                                         */
  2257. X/* - A table cannot store more than one pair with the same key.               */
  2258. X/* - Pairs can be added, but not deleted.                                     */
  2259. X/* - A table can return the value corresponding to a given key.               */
  2260. X/* - The pairs in a table can be read sequentially in key order. At all       */
  2261. X/*   times, the table has an imaginary MARKER positioned on one of its pairs  */
  2262. X/*   (or after the last pair). You can move the marker to the first pair and  */
  2263. X/*   you can move the marker to the next pair, reading the pair as you go.    */
  2264. X/*   Upon table creation, a table's marker is at the end-of-table position.   */
  2265. X/* - If you try to perform an illegal operation on a table, the table package */
  2266. X/*   will call "error" to write out an error message and bomb the program.    */
  2267. X/* - Tables store copies of (key,value) pairs. They do not hold pointers to   */
  2268. X/*   outside data (unless your keys or values are pointers themselves).       */
  2269. X/* - If the keys are pointers themselves and point to other data which is     */
  2270. X/*   used by the comparison function, then that data must not be modified     */
  2271. X/*   in a way that will change the order of pairs in the table.               */
  2272. X/* - A table can hold from zero to about 2^31 pairs.                          */
  2273. X/* - The identifier "tb" is used as an abbreviation for "table".              */
  2274. X/* - The identifier "ky" is used as an abbreviation for "key".                */
  2275. X/* - The identifier "vl" is used as an abbreviation for "value".              */
  2276. X/* - The author would like to use longer names, but has chosen to use the     */
  2277. X/*   abbreviations so as to enhance the portability of the code.              */
  2278. X/* - IMPORTANT: Tables get all their memory using mm_temp calls.              */
  2279. X/*                                                                            */
  2280. X/* How To Use This Table Package                                              */
  2281. X/* -----------------------------                                              */
  2282. X/* 1. Include this .H file in your program file.                              */
  2283. X/* 2. Identify the key and value types that you are going to use.             */
  2284. X/* 3. Define a function (having two parameters being pointers to keys)        */
  2285. X/*    that compares two keys and returns [-1,0,1] accordingly.                */
  2286. X/* 4. Define a variable of type p_tb as a view to a table.                    */
  2287. X/* 5. Use the tb_* functions to perform the desired operations.               */
  2288. X/*    Start with a call to tb_cre and (optionally) end with a call to tb_des. */
  2289. X/*                                                                            */
  2290. X/******************************************************************************/
  2291. X
  2292. X/* Ensure that the body of this header file is included at most once.         */
  2293. X#ifndef DONE_TABLE
  2294. X#define DONE_TABLE
  2295. X
  2296. X/******************************************************************************/
  2297. X
  2298. X#include <stddef.h>
  2299. X#include "style.h"
  2300. X
  2301. X/******************************************************************************/
  2302. X
  2303. X/* Hide the exported abstract definition of a table from the table.c package. */
  2304. X/* Table.c defines INTABLEC so as to prevent itself from seeing the following */
  2305. X/* definitions. It defines its own more concrete definitions.                 */
  2306. X#ifndef INTABLEC
  2307. X
  2308. X/* The functions of the table abstraction pass keys and values exclusively    */
  2309. X/* using pointers. These two definitions define types for these pointers.     */
  2310. X/* Although the two types are both 'p_void', the different types are useful   */
  2311. X/* to indicate what is expected in each position of the parameter lists.      */
  2312. typedef p_void p_tbky_t;
  2313. typedef p_void p_tbvl_t;
  2314. X
  2315. X/* Define a type for a function to compare two keys. Such functions are       */
  2316. X/* needed to organize the storage of (key,value) pairs inside the table.      */
  2317. X/* Given the arguments are (a,b), the function should return:                 */
  2318. X/*    -1 if a<b                                                               */
  2319. X/*     0 if a==b                                                              */
  2320. X/*     1 if a>b                                                               */
  2321. X/* The user must create such a function and hand it to the 'tb_create'        */
  2322. X/* function when creating new a new table.                                    */
  2323. typedef sign (*p_kycm_t) P_((p_tbky_t,p_tbky_t));
  2324. X
  2325. X/* Users manipulate tables through pointers to tables. Here the actual table  */
  2326. X/* internals are hidden from the user.                                        */
  2327. typedef struct {word NEVER_USE_THIS_FIELD_UQJTKC;} tb_t;
  2328. typedef tb_t *p_tb_t;
  2329. X
  2330. X#endif
  2331. X
  2332. X/******************************************************************************/
  2333. X
  2334. X/* General Notes About These Functions                                        */
  2335. X/* -----------------------------------                                        */
  2336. X/* - All tables, keys, and values are passed by pointer. Whether a parameter  */
  2337. X/*   is read or written is determined by it's functions description.          */
  2338. X/* - Each function (except tb_cre) accepts a single pointer to a table and    */
  2339. X/*   each function's description is assumed to be referring to the table.     */
  2340. X/* - "Raising an error" means calling the external function "error" to        */
  2341. X/*   write out a message and bomb the program.                                */
  2342. X/* - You must create a table using tb_cre before performing any operations    */
  2343. X/*   upon it. The table operations will usually raise an error if they are    */
  2344. X/*   handed a pointer that does not point to a properly CREated table.        */
  2345. X
  2346. X/* The Functions                                                              */
  2347. X/* -------------                                                              */
  2348. XEXPORT p_tb_t tb_cre P_((size_t,size_t,p_kycm_t));
  2349. X/* CREate. This function creates a new table and returns a pointer to the     */
  2350. X/* table. The user must supply 1) the size in bytes of keys, 2) the size in   */
  2351. X/* bytes of values, 3) a pointer to a function that compares two keys.        */
  2352. X
  2353. XEXPORT bool tb_itb P_((p_tb_t,p_tbky_t));
  2354. X/* InTaBle. Returns TRUE iff the given key is in the table.                   */
  2355. X
  2356. XEXPORT void tb_loo P_((p_tb_t,p_tbky_t,p_tbvl_t));
  2357. X/* LOOkup. Feed this function a table and a key and it will return (in the    */
  2358. X/* p_tbvl_t parameter) the value corresponding to the key. The function       */
  2359. X/* raises an error if the table does not contain the key.                     */
  2360. X
  2361. XEXPORT void tb_ins P_((p_tb_t,p_tbky_t,p_tbvl_t));
  2362. X/* INSert. Inserts the (key,value) pair into the table. Raises an error if    */
  2363. X/* the key is already in the table.                                           */
  2364. X
  2365. XEXPORT ulong tb_len P_((p_tb_t));
  2366. X/* LENgth. Returns the number of pairs in the table. */
  2367. X
  2368. XEXPORT void tb_fir P_((p_tb_t));
  2369. X/* FIRst. Set's the table's marker to the first pair in the table (or the end */
  2370. X/* of table position if the table is empty.                                   */
  2371. X
  2372. XEXPORT bool tb_rea P_((p_tb_t,p_tbky_t,p_tbvl_t));
  2373. X/* REAd. Returns in (p_tbky_t,p_tbvl_t) the (key,value) pair corresponding to */
  2374. X/* the marker and them moves the marker onto the next pair.                   */
  2375. X/* Returns TRUE  => Returned a pair.                                          */
  2376. X/* Returns FALSE => Did not return a pair. No more pairs left.                */
  2377. X/* of key) to be read from the table. Returns TRUE if it returns a pair       */
  2378. X/* This function will not raise an error if it is called more than once with  */
  2379. X/* the marker at the end of the table (it just keeps returning FALSE).        */
  2380. X
  2381. X#if FALSE
  2382. void tb_des P_((p_tb_t));
  2383. X/* DEStroy. Destroys a table, deallocating all its memory.                    */
  2384. X#endif
  2385. X
  2386. X/******************************************************************************/
  2387. X
  2388. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  2389. X#endif
  2390. X
  2391. X/******************************************************************************/
  2392. X/*                                 End of TABLE.H                             */
  2393. X/******************************************************************************/
  2394. END_OF_FILE
  2395. if test 10727 -ne `wc -c <'sources/table.h'`; then
  2396.     echo shar: \"'sources/table.h'\" unpacked with wrong size!
  2397. fi
  2398. # end of 'sources/table.h'
  2399. fi
  2400. if test -f 'sources/writfile.c' -a "${1}" != "-c" ; then 
  2401.   echo shar: Will not clobber existing file \"'sources/writfile.c'\"
  2402. else
  2403. echo shar: Extracting \"'sources/writfile.c'\" \(10102 characters\)
  2404. sed "s/^X//" >'sources/writfile.c' <<'END_OF_FILE'
  2405. X/*##############################################################################
  2406. X
  2407. XFUNNNELWEB COPYRIGHT
  2408. X====================
  2409. XFunnelWeb is a literate-programming macro preprocessor.
  2410. X
  2411. Copyright (C) 1992 Ross N. Williams.
  2412. X
  2413. X   Ross N. Williams
  2414. X   ross@spam.adelaide.edu.au
  2415. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2416. X
  2417. This program is free software; you can redistribute it and/or modify
  2418. it under the terms of Version 2 of the GNU General Public License as
  2419. published by the Free Software Foundation.
  2420. X
  2421. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2422. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2423. See Version 2 of the GNU General Public License for more details.
  2424. X
  2425. You should have received a copy of Version 2 of the GNU General Public
  2426. License along with this program. If not, you can FTP the license from
  2427. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2428. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2429. X
  2430. Section 2a of the license requires that all changes to this file be
  2431. recorded prominently in this file. Please record all changes here.
  2432. X
  2433. Programmers:
  2434. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2435. X
  2436. Changes:
  2437. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2438. X
  2439. X##############################################################################*/
  2440. X
  2441. X
  2442. X/******************************************************************************/
  2443. X/*                                   WRITFILE.C                               */
  2444. X/******************************************************************************/
  2445. X/*                                                                            */
  2446. X/* Implementation Notes                                                       */
  2447. X/* --------------------                                                       */
  2448. X/* The .H file gives most of the details of what this package does. Here we   */
  2449. X/* just give some notes on how it is implemented.                             */
  2450. X/*                                                                            */
  2451. X/* MAGIC NUMBERS: These are placed at the head and tail of wf_t records so as */
  2452. X/* to assist in the detection of uninitialized or corrupted variables.        */
  2453. X/*                                                                            */
  2454. X/* TEXT VS BINARY: A big problem arises in choosing whether to write binary   */
  2455. X/* or text files. Binary files are far faster because they allow us to write  */
  2456. X/* out large slabs of text using fwrite. The only catch is that they do not   */
  2457. X/* translate EOL characters in the end of line representation of the host     */
  2458. X/* environment. Text files, on the other hand are slower (because we have     */
  2459. X/* only fputc and fputs) but do provide the translation. The solution we      */
  2460. X/* adopt is to use binary if the host environment's representation for end of */
  2461. X/* file is EOL (='\n'), but text otherwise. We can determine this by testing  */
  2462. X/* the symbol UNIX_EOL defined in machin.h. If binary output is chosen,       */
  2463. X/* only fwrite is called as we don't know if fwrite and fputc calls can be    */
  2464. X/* mixed (it would seem not).                                                 */
  2465. X/* Note: We could test the preprocessor symbol in each function. However,     */
  2466. X/* the wf_att function introduces a problem as we may be attaching to a text  */
  2467. X/* file in a UNIX_EOL environment (e.g. stdout). So we make the text/binary   */
  2468. X/* attribute and attribute of each file, rather than the environment which we */
  2469. X/* use only to direct us in how to create and tag (as binary or text) a file. */
  2470. X/*                                                                            */
  2471. X/******************************************************************************/
  2472. X
  2473. X#include "style.h"
  2474. X
  2475. X#include "as.h"
  2476. X#include "machin.h"
  2477. X#include "writfile.h"
  2478. X
  2479. X/******************************************************************************/
  2480. X
  2481. X#define MGC_HEAD (4837295L)
  2482. X#define MGC_TAIL (1213839L)
  2483. X
  2484. X/* Set the following to TRUE to bomb the package upon the first error.        */
  2485. X/* This is a good idea during debugging if no output appears.                 */
  2486. X#define BOMB_ON_ERROR FALSE
  2487. X
  2488. X/******************************************************************************/
  2489. X
  2490. LOCAL void wf_check P_((p_wf_t));
  2491. LOCAL void wf_check(p_wf)
  2492. p_wf_t p_wf;
  2493. X{
  2494. X as_cold(p_wf!=NULL,"wf_check: p_wf==NULL.");
  2495. X
  2496. X as_cold(p_wf->wf_mhead==MGC_HEAD,
  2497. X         "wf_check: Magic header field has non-magic value.");
  2498. X
  2499. X as_cold(p_wf->wf_mtail==MGC_TAIL,
  2500. X         "wf_check: Magic trailer field has non-magic value.");
  2501. X
  2502. X as_cold(p_wf->wf_isope || p_wf->wf_pfile==NULL,
  2503. X         "wf_check: WF is closed but wf_pfile!=NULL.");
  2504. X}
  2505. X
  2506. X/******************************************************************************/
  2507. X
  2508. LOCAL void wf_errlg P_((p_wf_t, char *));
  2509. LOCAL void wf_errlg(p_wf,mess)
  2510. X/* This function is called whenever an error occurs on a stream. The main     */
  2511. X/* responsibility of this function is to set the error flag in the stream.    */
  2512. X/* However, it can do other stuff too such as log the error to the screen.    */
  2513. p_wf_t p_wf;
  2514. char   *mess;
  2515. X{
  2516. X p_wf->wf_iserr=TRUE;
  2517. X#if BOMB_ON_ERROR
  2518. X   if (p_wf->wf_pfile == stdout)
  2519. X      fprintf(stderr,"The output file error occurred on STANDARD OUTPUT.\n");
  2520. X   else
  2521. X      fprintf(stderr,"The output file error occurred on an ordinary file.\n");
  2522. X   as_bomb(mess);
  2523. X#endif
  2524. X}
  2525. X
  2526. X/******************************************************************************/
  2527. X
  2528. XEXPORT void wf_ini(p_wf,normal)
  2529. p_wf_t p_wf;
  2530. bool   normal;
  2531. X{
  2532. X p_wf->wf_mhead = MGC_HEAD;
  2533. X p_wf->wf_iserr = !normal;
  2534. X p_wf->wf_isope = FALSE;
  2535. X p_wf->wf_istxt = FALSE;
  2536. X p_wf->wf_pfile = NULL;
  2537. X p_wf->wf_mtail = MGC_TAIL;
  2538. X}
  2539. X
  2540. X/******************************************************************************/
  2541. X
  2542. XEXPORT void wf_att(p_wf,wf_pfile)
  2543. p_wf_t  p_wf;
  2544. XFILE   *wf_pfile;
  2545. X{
  2546. X wf_check(p_wf);
  2547. X if (p_wf->wf_iserr) return;
  2548. X as_cold(!p_wf->wf_isope,"wf_att: WF is already open.");
  2549. X
  2550. X p_wf->wf_pfile = wf_pfile;
  2551. X p_wf->wf_isope = TRUE;
  2552. X p_wf->wf_istxt = TRUE; /* Play it safe with files we didn't open. */
  2553. X wf_check(p_wf);
  2554. X}
  2555. X
  2556. X/******************************************************************************/
  2557. X
  2558. XEXPORT void wf_ope(p_wf,p_name)
  2559. p_wf_t  p_wf;
  2560. char   *p_name;
  2561. X{
  2562. X FILE *result;
  2563. X
  2564. X wf_check(p_wf);
  2565. X if (p_wf->wf_iserr) return;
  2566. X as_cold(!p_wf->wf_isope,"wf_ope: WF is already open.");
  2567. X
  2568. X/* Whether we open the file as text or binary depends on whether EOL maps     */
  2569. X/* to an end of line in the current environment.                              */
  2570. X#if UNIX_EOL
  2571. X result=fopen(p_name,"wb"); p_wf->wf_istxt=FALSE;
  2572. X#else
  2573. X result=fopen(p_name,"w"); p_wf->wf_istxt=TRUE;
  2574. X#endif
  2575. X
  2576. X if (result == FOPEN_F)
  2577. X   {
  2578. X    /* TRACE printf("Output file in error is \"%s\".\n",p_name); */
  2579. X    wf_errlg(p_wf,"wf_ope: Error opening output file.");
  2580. X   }
  2581. X else
  2582. X   {p_wf->wf_isope=TRUE; p_wf->wf_pfile=result;}
  2583. X wf_check(p_wf);
  2584. X}
  2585. X
  2586. X/******************************************************************************/
  2587. X
  2588. XEXPORT void wf_chr(p_wf,ch)
  2589. p_wf_t p_wf;
  2590. intchar   ch;
  2591. X{
  2592. X wf_check(p_wf);
  2593. X if ( p_wf->wf_iserr) return;
  2594. X as_cold(p_wf->wf_isope,"wf_chr: WF is closed.");
  2595. X
  2596. X if (p_wf->wf_istxt)
  2597. X    {
  2598. X     if (fputc((int) ch,p_wf->wf_pfile) == FPUTC_F)
  2599. X        wf_errlg(p_wf,"wf_chr: Error fputc()ing to output file.");
  2600. X    }
  2601. X else
  2602. X   {
  2603. X    if (fwrite(&ch,(size_t) 1,(size_t) 1,p_wf->wf_pfile) != 1)
  2604. X        wf_errlg(p_wf,"wf_chr: Error fwrite()ing to output file.");
  2605. X   }
  2606. X wf_check(p_wf);
  2607. X}
  2608. X
  2609. X/******************************************************************************/
  2610. X
  2611. XEXPORT void wf_wr(p_wf,p_str)
  2612. p_wf_t p_wf;
  2613. char   *p_str;
  2614. X{
  2615. X wf_check(p_wf);
  2616. X if ( p_wf->wf_iserr) return;
  2617. X as_cold(p_wf->wf_isope,"wf_wr: WF is closed.");
  2618. X
  2619. X if (p_wf->wf_istxt)
  2620. X   {
  2621. X    if (fputs(p_str,p_wf->wf_pfile) == FPUTS_F)
  2622. X       wf_errlg(p_wf,"wf_wr: Error fputs()ing to output file.");
  2623. X   }
  2624. X else
  2625. X   {
  2626. X    size_t len = strlen(p_str);
  2627. X    if (fwrite(p_str,(size_t) 1,(size_t) len,p_wf->wf_pfile) != len)
  2628. X       wf_errlg(p_wf,"wf_wr: Error fwrite()ing to output file.");
  2629. X   }
  2630. X wf_check(p_wf);
  2631. X}
  2632. X
  2633. X/******************************************************************************/
  2634. X
  2635. XEXPORT void wf_blk(p_wf,p_blk,blk_len)
  2636. p_wf_t  p_wf;
  2637. char   *p_blk;
  2638. size_t  blk_len;
  2639. X{
  2640. X wf_check(p_wf);
  2641. X if ( p_wf->wf_iserr) return;
  2642. X as_cold(p_wf->wf_isope,"wf_blk: WF is closed.");
  2643. X
  2644. X if (p_wf->wf_istxt)
  2645. X   {
  2646. X    /* Amazingly, fputc seems to be the only way to write out a block of */
  2647. X    /* bytes with end of line translation. Shocking, but true.           */
  2648. X    /* See Section B1.4 (p.246-247) of Kernighan and Ritchie.            */
  2649. X    /* Note: We can't use fputs because that requires a terminating nul. */
  2650. X    char *p;
  2651. X    char *p_post = p_blk+blk_len;
  2652. X    for (p=p_blk; p<p_post; p++)
  2653. X       if (fputc(*p,p_wf->wf_pfile) == FPUTC_F)
  2654. X         {
  2655. X          wf_errlg(p_wf,"wf_blk: Error fputc()ing to output file.");
  2656. X          break;
  2657. X         }
  2658. X   }
  2659. X else
  2660. X   if (fwrite(p_blk,(size_t) 1,(size_t) blk_len,p_wf->wf_pfile) != blk_len)
  2661. X      wf_errlg(p_wf,"wf_blk: Error fwrite()ing to output file.");
  2662. X wf_check(p_wf);
  2663. X}
  2664. X
  2665. X/******************************************************************************/
  2666. X
  2667. XEXPORT void wf_wl(p_wf,p_str)
  2668. p_wf_t p_wf;
  2669. char   *p_str;
  2670. X{
  2671. X wf_wr(p_wf,p_str);
  2672. X wf_chr(p_wf,'\n');
  2673. X}
  2674. X
  2675. X/******************************************************************************/
  2676. X
  2677. XEXPORT void wf_clo(p_wf)
  2678. p_wf_t p_wf;
  2679. X{
  2680. X wf_check(p_wf);
  2681. X if ( p_wf->wf_iserr) return;
  2682. X as_cold(p_wf->wf_isope,"wf_clo: WF is not open.");
  2683. X if (fflush(p_wf->wf_pfile) != FFLUSH_S)
  2684. X    wf_errlg(p_wf,"wf_clo: Error fflush()ing output file.");
  2685. X if (fclose(p_wf->wf_pfile) == FCLOSE_F)
  2686. X    wf_errlg(p_wf,"wf_clo: Error fclose()ing output file.");
  2687. X p_wf->wf_isope=FALSE;
  2688. X p_wf->wf_pfile=NULL;
  2689. X wf_check(p_wf);
  2690. X}
  2691. X
  2692. X/******************************************************************************/
  2693. X
  2694. XEXPORT bool wf_err(p_wf)
  2695. p_wf_t p_wf;
  2696. X{
  2697. X wf_check(p_wf);
  2698. X return p_wf->wf_iserr;
  2699. X}
  2700. X
  2701. X/******************************************************************************/
  2702. X/*                              End of WRITFILE.C                             */
  2703. X/******************************************************************************/
  2704. END_OF_FILE
  2705. if test 10102 -ne `wc -c <'sources/writfile.c'`; then
  2706.     echo shar: \"'sources/writfile.c'\" unpacked with wrong size!
  2707. fi
  2708. # end of 'sources/writfile.c'
  2709. fi
  2710. if test -f 'userman/u_ch0.tex' -a "${1}" != "-c" ; then 
  2711.   echo shar: Will not clobber existing file \"'userman/u_ch0.tex'\"
  2712. else
  2713. echo shar: Extracting \"'userman/u_ch0.tex'\" \(7907 characters\)
  2714. sed "s/^X//" >'userman/u_ch0.tex' <<'END_OF_FILE'
  2715. X%==============================================================================%
  2716. X%                                 Start of Ch0.tex                             %
  2717. X%==============================================================================%
  2718. X%
  2719. X% Copyright
  2720. X% ---------
  2721. X% Copyright (C) 1992 Ross N. Williams.
  2722. X% This file contains a chapter of the FunnelWeb User's Manual.
  2723. X% See the main TeX file for this manual for further information.
  2724. X%
  2725. X%==============================================================================%
  2726. X
  2727. X\vbox{\relax}
  2728. X\vfill
  2729. X
  2730. X\hrule
  2731. X
  2732. X\medskip
  2733. X
  2734. Copyright \copyright{} 1992 Ross~N.~Williams.
  2735. X\xn{Ross}{Williams}\xx{copyright}{notice}
  2736. X
  2737. Permission is granted to make and distribute verbatim copies of this manual
  2738. provided that the copyright notice and this permission notice are preserved
  2739. on all copies.\note{This paragraph was copied from the GNU Emacs manual to
  2740. avoid my having to get a legal opinion on something I could cook up.}
  2741. X
  2742. X\medskip
  2743. X
  2744. X\hrule
  2745. X
  2746. X\newpage
  2747. X
  2748. X%==============================================================================
  2749. X
  2750. X\tableofcontents
  2751. X
  2752. X\newpage
  2753. X
  2754. X%==============================================================================
  2755. X
  2756. X%I am not using LaTeX's figures and tables numbering so these are commented out.
  2757. X%\pseudochapter{List of Figures}
  2758. X%\pseudochapter{List of Tables}
  2759. X
  2760. X%==============================================================================
  2761. X
  2762. X% No forward.
  2763. X%\pseudochapter{Foreword}
  2764. X%\x{foreword}
  2765. X
  2766. X%==============================================================================
  2767. X
  2768. X\pseudochapter{Preface}
  2769. X\x{preface}
  2770. X
  2771. When, in 1986, I first read Donald Knuth's\xn{Donald}{Knuth}
  2772. technical report on Web\paper{Knuth83},\x{Web} and
  2773. tried Web out, I was simultaneously excited by Knuth's idea of literate
  2774. programming, and disappointed by his implementation of it. I was excited
  2775. because I could sense the potential for
  2776. the literate style to transform the state of mind of the programmer, but was
  2777. disappointed by Web's rigidity
  2778. and lack of practicality, which seemed to betray this potential.
  2779. The Web I used was Pascal-specific, \TeX{}-specific, and applied too
  2780. many constraints to the programming process.
  2781. In particular, it insisted on taking control of the
  2782. program text, mangling the code in the Pascal output files,
  2783. and imposing its own rather rigid ideas about indenting in the \TeX{} output.
  2784. All this, combined with the complexity of the tool, led me
  2785. to come to perceive Web as problem rather than solution. 
  2786. X
  2787. Despite all this, I was well and truly hooked on the idea of literate
  2788. programming. The inevitable result was that I designed and implemented
  2789. my own version of Web --- FunnelWeb!
  2790. X
  2791. XFunnelWeb is not the most sophisticated literate programming tool available,
  2792. but it is an extremely \i{practical} tool, striving for simplicity
  2793. and portability in all areas. Not only is FunnelWeb language-independent,
  2794. and to some extent typesetter independent, but its implementation also
  2795. stresses portability, being written in~C, and currently operating on four
  2796. major platforms (Sun, Vax, PC, Mac). FunnelWeb allows the
  2797. programmer total control over the output file, making it suitable
  2798. for use with all sorts of format-sensitive languages. It also allows
  2799. control over its own source code, which has been released under a
  2800. GNU license.\xx{GNU}{license}
  2801. XFunnelWeb is quite solid, having to pass
  2802. a regression testing suite of over 200 tests
  2803. before being released. Finally, FunnelWeb is well documented by this manual
  2804. which provides a tutorial, advanced hints, and a language definition.
  2805. X
  2806. I would like to dedicate FunnelWeb and this manual to Donald Knuth
  2807. and his literate programming tool Web.
  2808. Although this manual is somewhat critical of some aspects of
  2809. Web, this criticism is really a product of differing design goals.
  2810. Knuth designed a paradigm (literate programming) and a tool
  2811. X(Web) aimed at the highest pitch of program presentation and typesetting.
  2812. XFunnelWeb aims lower, relaxing constraints, and making compromises
  2813. in order to achieve simplicity, flexibility, and portability.
  2814. The result is a practical tool which I hope will attract more people to
  2815. the literate style.
  2816. X
  2817. X\bigskip
  2818. X
  2819. X\leftline{\b{Ross~N.~Williams}}
  2820. X\leftline{\b{Adelaide, Australia}}
  2821. X\leftline{\b{May~1992}}
  2822. X
  2823. X%==============================================================================
  2824. X
  2825. X\pseudochapter{Acknowledgements}
  2826. X\x{acknowledgements}
  2827. X
  2828. Many thanks to \b{David Hulse}\xn{David}{Hulse}
  2829. X(\p{dave@cs.adelaide.edu.au}) for
  2830. translating the original version of FunnelWeb
  2831. X(FunnelWeb~V1) from Ada\x{Ada} into~C
  2832. and getting it to work on Unix and a PC.
  2833. The C code written by David (FunnelWeb~V2) formed
  2834. the basis of FunnelWeb~V3, but was
  2835. entirely rewritten during the intensive refinement and feature-injection
  2836. period leading up to this release (FunnelWeb~V3 is about three times
  2837. the size of FunnelWeb~V2).
  2838. Nevertheless, without this important first translation step,
  2839. I would probably not have found the motivation to develop FunnelWeb to its
  2840. present state.
  2841. X
  2842. Thanks go to \b{Simon Hackett}\xn{Simon}{Hackett}
  2843. X(\p{simon@internode.com.au}) of Internode Systems
  2844. Pty Ltd for the use of his Sun, Mac, and PC, for assistance in porting
  2845. XFunnelWeb to the Sun and PC, and for helpful discussions.
  2846. X
  2847. Thanks go to \b{Jeremy Begg}\xn{Jeremy}{Begg}
  2848. X(\p{jeremy@vsm.com.au}) of VSM Software Services
  2849. for the use of his VAX, and for assistance with the VMS-specific code.
  2850. X
  2851. Thanks to \b{Barry Dwyer}\xn{Barry}{Dwyer} (\p{dwyer@cs.adelaide.edu.au})
  2852. and \b{Roger Brissenden}\xn{Roger}{Brissenden} (\p{rjb@koala.harvard.edu})
  2853. for trying out FunnelWeb Version~1 in 1987 and providing valuable feedback.
  2854. X
  2855. Thanks to Donald Knuth\xn{Donald}{Knuth}
  2856. for establishing the idea of literate programming in the first place.
  2857. X
  2858. X\bigskip
  2859. X
  2860. X\leftline{\b{Ross~N.~Williams}}
  2861. X\leftline{\b{Adelaide, Australia}}
  2862. X\leftline{\b{May~1992}}
  2863. X
  2864. X%==============================================================================
  2865. X
  2866. X\pseudochapter{Presentation Notes}
  2867. X\x{presentation notes}
  2868. X
  2869. X\thing{References:} All references are set in bold and are
  2870. cited in square brackets in the form
  2871. X\b{[}$<$\i{firstauthor}$><$\i{year}$>$\b{]}.
  2872. All references cited in the text appear in the reference list and the index.
  2873. X
  2874. X\thing{Special terms:} New or important terminology has been set in bold
  2875. face and appears in the index. A glossary appears as an appendix.
  2876. X
  2877. X\thing{Typesetting:} This\x{typesetting}
  2878. document was prepared by the author using Andrew
  2879. Trevorrow's\xn{Andrew}{Trevorrow} (\p{akt150@cscgpo.anu.edu.au})\checked{}
  2880. implementation (OzTeX\x{OzTeX}) of the
  2881. X\TeX{}/\LaTeX{}\paper{Knuth84}\paper{Lamport86}\x{TeX}\x{LaTeX}
  2882. typesetting system running on a Macintosh-SE.\x{Macintosh}
  2883. X
  2884. X\thing{Graphics:} All diagrams have been constructed out of text using
  2885. the \LaTeX{} \p{verbatim} environment so as to allow this document to
  2886. be disseminated electronically and printed using \LaTeX{} without access
  2887. to the author's drawing tools.
  2888. X
  2889. X%%%%Put this paragraph back again if I insert any \fix footnotes again.
  2890. X%\thing{Correction footnotes:} Footnotes\x{footnotes}
  2891. X%commencing with dots ($\bullet$) are
  2892. X%notes to remind the author about something in the document that must be
  2893. X%attended to.\fix{This is an example of such a footnote.} These footnotes
  2894. X%will be attended to and eliminated in later versions.
  2895. X
  2896. X\thing{Known typesetting problems:} While every attempt has been made
  2897. to give a good presentation within the
  2898. time available, some shortcuts have had to be taken. In particular, the author
  2899. has
  2900. been unable to work out how to get \LaTeX{} to suppress blank pages at the
  2901. start of chapters.
  2902. X
  2903. X%==============================================================================
  2904. X
  2905. X% No abstract.
  2906. X%\pseudochapter{Abstract}
  2907. X%\x{abstract}
  2908. X
  2909. X%==============================================================================%
  2910. X%                                End of Ch0.tex                                %
  2911. X%==============================================================================%
  2912. END_OF_FILE
  2913. if test 7907 -ne `wc -c <'userman/u_ch0.tex'`; then
  2914.     echo shar: \"'userman/u_ch0.tex'\" unpacked with wrong size!
  2915. fi
  2916. # end of 'userman/u_ch0.tex'
  2917. fi
  2918. if test -f 'userman/u_cha.tex' -a "${1}" != "-c" ; then 
  2919.   echo shar: Will not clobber existing file \"'userman/u_cha.tex'\"
  2920. else
  2921. echo shar: Extracting \"'userman/u_cha.tex'\" \(9342 characters\)
  2922. sed "s/^X//" >'userman/u_cha.tex' <<'END_OF_FILE'
  2923. X%==============================================================================%
  2924. X%                               Start of Cha.tex                               %
  2925. X%==============================================================================%
  2926. X%
  2927. X% Copyright
  2928. X% ---------
  2929. X% Copyright (C) 1992 Ross N. Williams.
  2930. X% This file contains a chapter of the FunnelWeb User's Manual.
  2931. X% See the main TeX file for this manual for further information.
  2932. X%
  2933. X%==============================================================================%
  2934. X
  2935. X\appendix
  2936. X
  2937. X%==============================================================================
  2938. X
  2939. X\chapter{Glossary}
  2940. X\x{glossary}
  2941. X
  2942. X\gloss{Analyser} A component of the FunnelWeb program
  2943. that checks the macro table created by the parser for errors.
  2944. XFor example, the analyser checks to see if any macro without a \p{@Z} has
  2945. not been called.
  2946. X
  2947. X\gloss{Argument} A string delimited by blanks appearing on the FunnelWeb
  2948. command line. Arguments are used to control options.
  2949. X
  2950. X\gloss{Directive} A FunnelWeb special sequence or
  2951. cooperating group of special sequences that do not form part of
  2952. a macro definition. A directive can take the form of a pragma.
  2953. X
  2954. X\gloss{Documentation} Descriptive text.
  2955. X
  2956. X\gloss{Documentation file} An output file, produced by the Weave
  2957. component of FunnelWeb, that
  2958. contains typesetter commands. When fed into the appropriate typesetter
  2959. program, the result is a typeset image of the input file.
  2960. X
  2961. X\gloss{Free text} The text in an input file that remains
  2962. if one were to remove macro definitions and directives.
  2963. X
  2964. X\gloss{FunnelWeb} This word has a number of different meanings all
  2965. pertaining to the FunnelWeb system of programming. 1) The
  2966. entire system of programming as in \dq{Maybe FunnelWeb can help.}
  2967. X2) The computer program that implements the
  2968. system as in \dq{Run it through FunnelWeb and see what comes out.}
  2969. X3) The language implemented by the FunnelWeb program as in \dq{I wrote the
  2970. program in FunnelWeb.} or \dq{I wrote the program in Ada using FunnelWeb.}.
  2971. X
  2972. X\gloss{FunnelWeb file} A file whose contents are written in the FunnelWeb
  2973. language.
  2974. X
  2975. X\gloss{FunnelWeb language} The language in which FunnelWeb input files are
  2976. written.
  2977. X
  2978. X\gloss{FunnelWeb proper} Usually, when FunnelWeb is invoked, it processes
  2979. a single input file and then terminates. However, it also has a command
  2980. language mode in which it is possible to invoke \dq{FunnelWeb} many times.
  2981. This leads to confusion between \dq{FunnelWeb} the outer program and
  2982. X\dq{FunnelWeb} the inner program. To avoid this confusion, the inner
  2983. XFunnelWeb is sometimes referred to as \dq{FunnelWeb proper}.
  2984. X
  2985. X\gloss{FW} An abbreviation for \dq{FunnelWeb} that is
  2986. used wherever appropriate.
  2987. X
  2988. X\gloss{Include file} A file read in by FunnelWeb as the result of an
  2989. include pragma (\p{@i filename}).
  2990. X
  2991. X\gloss{Input file} Any file read in by FunnelWeb. The phrase
  2992. X\dq{the input file} refers to the root input file
  2993. X(specified using the \p{+F} option).
  2994. X
  2995. X\gloss{Journal file} An output file containing a copy of the output sent to
  2996. the user's console during an invocation of FunnelWeb. In other systems,
  2997. this file is sometimes called a \dq{log file}.
  2998. X
  2999. X\gloss{Listing file} An output file summarizing the result of processing
  3000. an input file.
  3001. X
  3002. X\gloss{Macro} A binding of a name to a string.
  3003. X
  3004. X\gloss{Macro definition} A construct appearing in a FunnelWeb file that
  3005. binds a name to a text string.
  3006. A FunnelWeb file consists of a series of macro definitions surrounded by
  3007. documentary text.
  3008. X
  3009. X\gloss{Mapper} A component of the FunnelWeb program
  3010. that reads in the input file and creates a copy of it in memory.
  3011. X
  3012. X\gloss{Option} An parameter internal to the FunnelWeb program which can be
  3013. controlled by command line arguments or pragmas.
  3014. X
  3015. X\gloss{Output file} Any file written by FunnelWeb. This includes
  3016. listing, journal, product, and documentation files. (Warning: During most
  3017. of FunnelWeb's development the term \dq{output file} was also used to
  3018. refer to what are now called \dq{product files}. This turned out to be
  3019. extremely confusing and so the term \dq{product file} was invented to
  3020. distinguish the generic from the specific.
  3021. However, as this was a late modification,
  3022. you may find some occurrences of the old
  3023. use of \dq{output file}.).
  3024. X
  3025. X\gloss{Parser} A component of the FunnelWeb program
  3026. that processes the token list generated by the scanner and produces a
  3027. macro table and a document list. The parser mainly
  3028. analyses the input file at the syntactic level, but also does some lightweight
  3029. semantic checking too.
  3030. X
  3031. X\gloss{Pragma} Single-line directives that appears in
  3032. XFunnelWeb files. Pragmas control everything from maximum input line length
  3033. to typesetter dependence. A pragma line starts with \dqp{@p}.
  3034. X
  3035. X\gloss{Printed documentation} Sheets of paper
  3036. resulting from actually typesetting and printing a documentation file.
  3037. X
  3038. X\gloss{Product file} An output file, generated by the Tangle component of
  3039. XFunnelWeb, that contains the expansion of the macros in the input
  3040. file. Note: Other names considered for this were: 
  3041. generated file, expanded file, result file, program file, and tangle file.
  3042. X
  3043. X\gloss{Scanner} A component of the FunnelWeb program
  3044. that scans a copy of the input file in memory and generates a line list
  3045. and a token list to be fed to the parser. The scanner processes the input
  3046. at the lexical level.
  3047. X
  3048. X\gloss{Script} A file containing FunnelWeb shell commands.
  3049. X
  3050. X\gloss{Shell} A command language interpreter built into the FunnelWeb
  3051. program. The interpreter allows the user to invoke FunnelWeb proper
  3052. many times during a single invocation of the FunnelWeb program.
  3053. X
  3054. X\gloss{Special character} A distinguished character
  3055. in a FunnelWeb input file that introduces a special sequence.
  3056. By default the special
  3057. character is \dqp{@}. However, it can be changed using the \dqp{@=} special
  3058. sequence.
  3059. X
  3060. X\gloss{Special sequence} A special sequence is a construct introduced by the
  3061. special character. Special sequences are used to define a structure in a
  3062. XFunnelWeb input file that exists at a higher level to the surrounding text.
  3063. A FunnelWeb input file may be considered to be a sequence of text and
  3064. special sequences.
  3065. X
  3066. X\gloss{Tangle} This is the name for the component of FunnelWeb that
  3067. generates one or more product files containing the expansion of macros
  3068. in the input file.
  3069. X
  3070. X\gloss{Typesetting directive} A FunnelWeb directive whose
  3071. sole effect is to modify the way in which the input file is represented
  3072. in the documentation file.
  3073. X
  3074. X\gloss{Weave} This is the name for the component of FunnelWeb that
  3075. generates a documentation file containing typesetting commands representing
  3076. the input file.
  3077. X
  3078. X%==============================================================================
  3079. X
  3080. X\chapter{References}
  3081. X\x{references}
  3082. X
  3083. X\paper{ANSI} Australian Standard AS~3955-1991, \dq{Programming Languages --- C},
  3084. X(ISBN: 0-7262-6970-0), 12~July~1991. Identical to:
  3085. International Standard ISO/IEC 9899:
  3086. X1990 Programming Languages --- C.\checked{}
  3087. X
  3088. X\paper{ANZE} \dq{Australia, New Zealand Encyclopedia},
  3089. XEntry: \dq{Funnel-web spiders}, Vol~7, pp.~564--565, Bay Books,
  3090. Sydney, (ISBN: 85835--127--7), 1975.\checked{}
  3091. X
  3092. X
  3093. X\paper{BSI82} British Standards Institute, \dq{Specification for
  3094. Computer Programming Language Pascal}, Publication BS6192:1982,
  3095. British Standards Institute, P.O. Box 372, Milton Keynes, MK146LO,
  3096. X1982.\checked{}
  3097. X
  3098. X\paper{Gries81} Gries~D., \dq{The Science of Programming},
  3099. Springer-Verlag, (ISBN: 0-387-90641-X), 1981.
  3100. X
  3101. X\paper{Humphries91} Humphries~B, \dq{Neglected Poems and Other Creatures},
  3102. Angus and Robertson, Sydney, (ISBN: 0-207-17212-9), 1991.\checked{}
  3103. X
  3104. X\paper{Kernighan88} Kernighan~B.W., Ritchie~D.M., \dq{The~C Programming
  3105. Language}, (second edition,\dq{ANSI~C}), Prentice Hall,
  3106. X(ISBN: 0-13-110362-8), 1988.\checked{}
  3107. X
  3108. X\paper{Knuth83} Knuth~D.E., \dq{The WEB System of Structured
  3109. Documentation}, (Web User Manual, Version~2.5, November, 1983),
  3110. Stanford University, 1983.
  3111. X
  3112. X\paper{Knuth84} Knuth~D.E., \dq{The \TeX{}book}, Addison-Wesley,
  3113. X(ISBN: 0-201-13448-9), 1984.
  3114. X
  3115. X\paper{Knuth84} Knuth~D.E., \dq{Literate Programming}, \i{The Computer
  3116. Journal}, Vol.~27, No.~2, pp.~97-111, 1984.\checked{Reference copied from
  3117. SIGPLAN 26(1) p.16} Note: The author of this manual has not yet obtained
  3118. this paper.
  3119. X
  3120. X\paper{Lamport86} Lamport~L., \dq{\LaTeX{}: A Document Preparation System},
  3121. Addison-Wesley, (ISBN: 0-201-15790-X),
  3122. X1986.\checked{}
  3123. X
  3124. X\paper{Rosovsky90} Rosovsky~H., \dq{The University: An Owner's Manual},
  3125. W.W.Norton \& Company, Inc., (ISBN: 0-393-02782-1), 1990.\checked{}
  3126. X
  3127. X\paper{Smith91} Smith~L.M.C., \dq{An Annotated Bibliography
  3128. of Literate Programming}, ACM SIGPLAN Notices, Vol.~26, No.~1,
  3129. January 1991.\checked{}
  3130. X
  3131. X\paper{Strunk79} Strunk~W., White~E.B., \dq{The Elements of
  3132. Style}, Third Edition, MacMillan Publishing Company, New York,
  3133. X(ISBN: 0-02-418200-1),
  3134. X1979.\checked{}
  3135. X
  3136. X\paper{USDOD83} \dq{The Programming Language Ada Reference Manual},
  3137. American National Standards Institute Inc,
  3138. ANSI/MIL-STD-1815A-1983, 1983.\checked{}
  3139. X
  3140. X%==============================================================================
  3141. X
  3142. X\addcontentsline{toc}{chapter}{Index}
  3143. X\def\indexentry#1#2{\item #1~#2}
  3144. X\begin{theindex}
  3145. X\input u_manual.sin
  3146. X\end{theindex}
  3147. X
  3148. X%==============================================================================%
  3149. X%                               End of Cha.tex                                 %
  3150. X%==============================================================================%
  3151. END_OF_FILE
  3152. if test 9342 -ne `wc -c <'userman/u_cha.tex'`; then
  3153.     echo shar: \"'userman/u_cha.tex'\" unpacked with wrong size!
  3154. fi
  3155. # end of 'userman/u_cha.tex'
  3156. fi
  3157. if test -f 'userman/u_manual.tex' -a "${1}" != "-c" ; then 
  3158.   echo shar: Will not clobber existing file \"'userman/u_manual.tex'\"
  3159. else
  3160. echo shar: Extracting \"'userman/u_manual.tex'\" \(9553 characters\)
  3161. sed "s/^X//" >'userman/u_manual.tex' <<'END_OF_FILE'
  3162. X%==============================================================================%
  3163. X%                             FUNNELWEB USER'S MANUAL                          %
  3164. X%==============================================================================%
  3165. X%
  3166. X% Summary
  3167. X% -------
  3168. X% This is the main .tex file of the FunnelWeb User's Manual.
  3169. X%
  3170. X% For a list of the other files that contribute to this document,
  3171. X% see the list of files given in \input lines at the end of this file.
  3172. X%
  3173. X% See the TeX comments below to find out how to typeset this document.
  3174. X%
  3175. X%
  3176. X% Copyright
  3177. X% ---------
  3178. X% Copyright (C) 1992 Ross N. Williams.
  3179. X%
  3180. X% Permission is granted to make and distribute verbatim copies of this manual
  3181. X% provided that the copyright notice and this permission notice are preserved
  3182. X% on all copies.
  3183. X%
  3184. X%
  3185. X% Version
  3186. X% -------
  3187. X% Date    : May 1992.
  3188. X% Version : 1.0.
  3189. X%
  3190. X%
  3191. X% Author
  3192. X% ------
  3193. X% Name  : Ross Williams.
  3194. X% Email : ross@spam.adelaide.edu.au
  3195. X% Snail : 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  3196. X%
  3197. X%
  3198. X% How to Typeset This Document
  3199. X% ----------------------------
  3200. X% This document is written in a format suitable for processing by the LaTeX
  3201. X% typesetting system which can be found on many machines around the world.
  3202. X% The document is an entirely self contained LaTeX document. To assist in
  3203. X% the electronic distribution of this document, all diagrams have been
  3204. X% constructing using ASCII text from within LaTeX. This means that all you
  3205. X% need to print this document is a LaTeX typesetting system.
  3206. X%
  3207. X% To print this document using LaTeX, give a command sequence that looks
  3208. X% something like this:
  3209. X%
  3210. X%    latex manual
  3211. X%    latex manual
  3212. X%    sort  -f <manual.idx >manual.sin
  3213. X%    % Start here if manual.aux, manual.toc, and manual.sin already exist.
  3214. X%    latex manual
  3215. X%    print manual
  3216. X%
  3217. X% The commands must be given three times so as to allow the cross
  3218. X% referencing information to be correctly assembled.
  3219. X% The "sort" command should perform a case insensitive sort of the lines of
  3220. X% its input, but should not alter the lines it is sorting. In the example
  3221. X% about, the "-f" option specifies that the sort should be case insensitive.
  3222. X% The "print" command should print the .dvi file generated by LaTeX.
  3223. X% The details of the typesetting sequence above may vary on your computer
  3224. X% system.
  3225. X%
  3226. X%=============================================================================%
  3227. X
  3228. X
  3229. X% Basic Document Style
  3230. X% --------------------
  3231. X%    The default font size is 10pt which is what I want.
  3232. X%    titlepage - Instructs LaTeX to produce a title page at the front.
  3233. X%    book      - Use the "book" built in format.
  3234. X\documentstyle[titlepage]{book}
  3235. X
  3236. X% The following pagestyle command instructs LaTeX to set each page with just
  3237. X% a page number at the middle of the bottom of each page.
  3238. X\pagestyle{plain}
  3239. X
  3240. X% By default, the "book" style sets even and odd pages differently on the
  3241. X% assumption that the result is to be used in a two-sided printing process.
  3242. X% However, most people printing this will print it single sided.
  3243. X% To suppress double sided mode, we need to give the \onecolumn command.
  3244. X\onecolumn
  3245. X
  3246. X
  3247. X% Page Size and Position
  3248. X% ----------------------
  3249. X% The following sets the size of the text box and its position on the page.
  3250. X% It works OK on A4 paper. I suppose I should test it on American paper too.
  3251. X\textwidth     15cm
  3252. X\textheight    24cm
  3253. X\topmargin      0cm
  3254. X\oddsidemargin  1.5cm
  3255. X\evensidemargin 1.5cm
  3256. X\headheight     0cm
  3257. X\headsep        0cm
  3258. X
  3259. X
  3260. X% Table of Contents
  3261. X% -----------------
  3262. X% Specify that all headings be numbered and appear in the Table of Contents.
  3263. X\setcounter{secnumdepth}{100}
  3264. X\setcounter{tocdepth}{100}
  3265. X
  3266. X% LaTeX lets you create an unnumbered chapter, but it doesn't put it in
  3267. X% the table of contents. So we have to do it manually.
  3268. X\def\pseudochapter#1{%
  3269. X\chapter*{#1}
  3270. X\addcontentsline{toc}{chapter}{#1}
  3271. X}
  3272. X
  3273. X% Paragraph Separation and Indentation
  3274. X% ------------------------------------
  3275. X% The default LaTeX format is to have paragraphs jammed up against each other
  3276. X% with indentation of text on the first line of each paragraph used to
  3277. X% highlight the start of each paragraph. I prefer to identify paragraphs
  3278. X% by separating them with space and eliminating the indentation.
  3279. X\parskip   \medskipamount
  3280. X\parindent 0pt
  3281. X
  3282. X
  3283. X% Quick Style Macros
  3284. X% ------------------
  3285. X% Use of the following macros is much neater and safer than opening a group
  3286. X% and setting a mode (e.g. {\bf sloth}) as these macros will cause TeX to
  3287. X% scream if they span more than one paragraph whereas the group method
  3288. X% can cause half the document to be set in a funny mode.
  3289. X% Other little macros here serve the same neatening normalizing purposes.
  3290. X\def\i#1{{\it #1}}                    % Italics.
  3291. X\def\b#1{{\bf #1}}                    % Bold.
  3292. X\def\p#1{{\tt #1}}                    % Program text.
  3293. X\def\sq#1{`#1'}                       % Single quotes.
  3294. X\def\dq#1{``#1''}                     % Double quotes.
  3295. X\def\dqp#1{\dq{\p{#1}}}               % Double quoted program text.
  3296. X\def\fix#1{\footnote{$\bullet$ #1}}   % Fix it up footnote.
  3297. X\def\softfix#1{}                      % Marks opportunity for improvement.
  3298. X\def\eg{e.g.~}                        % Spacing regulated "e.g.".
  3299. X\def\ie{i.e.~}                        % Spacing regulated "i.e.".
  3300. X\def\til{\char`\~}                    % For tilde ("~") character.
  3301. X\def\circumflex{\char`\^}             % Circumflex.
  3302. X\def\bs{{\tt\char`\\}}                % Backslash.
  3303. X
  3304. X% Point Making
  3305. X% ------------
  3306. X% LaTeX provides some useful environment for listing points. However, it does
  3307. X% not seem to provide what I want which is a paragraph of text led in by
  3308. X% a label set in bold.
  3309. X\def\thing#1{{\bf #1}}
  3310. X\def\firstthing#1{\thing{#1}}
  3311. X\def\narrowthing#1#2{{%From defintion of \narrower
  3312. X\advance\leftskip1cm%
  3313. X\advance\rightskip1cm%
  3314. X{\bf #1} #2\vskip0pt}}
  3315. X\def\narrowtext#1{{%From defintion of \narrower
  3316. X\advance\leftskip1cm%
  3317. X\advance\rightskip1cm%
  3318. X#1\vskip0pt}}
  3319. X\def\summary{\b{Summary:}\ }
  3320. X
  3321. X% Invisible Annotations
  3322. X% ---------------------
  3323. X% Sometimes it is convenient to be able to annotate the LaTeX code without
  3324. X% causing text to appear in the document.
  3325. X% Here, the \checked{} macro can be placed next to any quotation or
  3326. X% fact, or other externally dependent material that has to be checked
  3327. X% before publication. The \note{} macro can be used to add a note.
  3328. X% Both macros are safer than "%" in a paragraph where the text may be
  3329. X% continually being rearranged across lines.
  3330. X\def\checked#1{}
  3331. X\def\note#1{}
  3332. X
  3333. X
  3334. X% Wide Verbatim Text
  3335. X% ------------------
  3336. X% This document was originally set in 12pt and the result was that many of
  3337. X% the verbatim examples wouldn't fit. To solve this, I created two macros
  3338. X% to reduce and increase the size of the text, and wrapped the longer
  3339. X% verbatim texts in calls to the macros. Later, the document was reset in
  3340. X% 10pt eliminating the original problem, so I redefined the macros to empty.
  3341. X%\def\beginsmall{\scriptsize}
  3342. X%\def\endsmall{\normalsize}
  3343. X\def\beginsmall{}
  3344. X\def\endsmall{}
  3345. X
  3346. X
  3347. X% The Index
  3348. X% ---------
  3349. X% LaTeX provides a single command (\index) for adding index entries to the
  3350. X% index. We shorten it and refine it a little with a few definitions.
  3351. X\def\newterm#1{{\bf #1}\x{#1}}            % Special terminology.
  3352. X\def\x#1{\index{#1}}                      % Normal index entry.
  3353. X\def\xx#1#2{\index{#1 #2}\index{#2 #1}}   % Symmetric index entry.
  3354. X\def\xn#1#2{\xx{#1}{#2}}                  % For a person's name.
  3355. X\def\xs#1#2{\index{#1, #2}}               % For an entry with a subclause.
  3356. X
  3357. X
  3358. X% References
  3359. X% ----------
  3360. X\def\paper#1{{\bf [#1]}\x{#1}\linebreak[1]{}}
  3361. X
  3362. X
  3363. X% Figures and Tables
  3364. X% ------------------
  3365. X% LaTeX numbers figures by chapter and doesn't position captions where I
  3366. X% want them and so I have decided to do it all manually. I haven't got
  3367. X% time for fancy stuff so I am using manual macros.
  3368. X\def\mylabel#1#2{%
  3369. X\begin{quotation}
  3370. X\footnotesize\baselineskip=12pt #2
  3371. X\end{quotation}
  3372. X\centerline{#1}
  3373. X\smallskip}
  3374. X
  3375. X\def\figfor#1{{\bf Figure~#1}}
  3376. X\def\tabfor#1{{\bf Table~#1}}
  3377. X
  3378. X\def\figarchitecture{\figfor{1}}
  3379. X\def\figfunarch{\figfor{2}}
  3380. X\def\figphases{\figfor{3}}
  3381. X\def\figregform{\figfor{4}}
  3382. X
  3383. X%\def\tabone{\tabfor{1}}
  3384. X%\def\tabtwo{\tabfor{2}}
  3385. X
  3386. X
  3387. X% Glossary
  3388. X% --------
  3389. X\def\gloss#1{\thing{#1:}\x{#1}}
  3390. X
  3391. X
  3392. X% Random Leftover Stuff
  3393. X% ---------------------
  3394. X\def\topicbreak{\bigskip\centerline{--- $\S$ ---}\bigskip}
  3395. X
  3396. X
  3397. X
  3398. X%------------------------------------------------------------------------------
  3399. X
  3400. X% Title Page
  3401. X% ----------
  3402. X% Although the title should really be in the ch0.tex file, LaTeX forces us to
  3403. X% put it here.
  3404. X\begin{titlepage}
  3405. X\vspace*{3cm}
  3406. X\begin{center}
  3407. X\Huge
  3408. X\vspace{2cm}
  3409. XFunnelWeb User's Manual\\
  3410. X\vspace{2cm}
  3411. X\LARGE
  3412. Ross~N.~Williams\\
  3413. X\vspace{1cm}
  3414. X\Large
  3415. V1.0 for FunnelWeb V3.0\\
  3416. X\vspace{1cm}
  3417. May 1992\\
  3418. X\normalsize
  3419. X\end{center}
  3420. X\end{titlepage}
  3421. X
  3422. X% Note: LaTeX sometimes puts a blank page before chapters so as to
  3423. X% start each chapter on an odd-numbered page. There is nothing that I
  3424. X% can do about this. This is part of the cost of using LaTeX instead
  3425. X% of TeX.
  3426. X
  3427. X\makeindex
  3428. X
  3429. X%-------------------------------------------------------------------------------
  3430. X
  3431. X\begin{document}
  3432. X\sloppy
  3433. X\nonstopmode
  3434. X
  3435. X\input u_ch0    % Table of contents etc.
  3436. X\input u_ch1    % A Tutorial Introduction
  3437. X\input u_ch2    % FunnelWeb Hints
  3438. X\input u_ch3    % FunnelWeb Definition
  3439. X\input u_ch4    % FunnelWeb Installation.
  3440. X\input u_ch5    % FunnelWeb Administration.
  3441. X\input u_cha    % Appendices
  3442. X
  3443. X\end{document}
  3444. X
  3445. X%==============================================================================%
  3446. X%               End of Main .TeX File of FunnelWeb User's Manual               %
  3447. X%==============================================================================%
  3448. END_OF_FILE
  3449. if test 9553 -ne `wc -c <'userman/u_manual.tex'`; then
  3450.     echo shar: \"'userman/u_manual.tex'\" unpacked with wrong size!
  3451. fi
  3452. # end of 'userman/u_manual.tex'
  3453. fi
  3454. echo shar: End of archive 4 \(of 20\).
  3455. cp /dev/null ark4isdone
  3456. MISSING=""
  3457. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  3458.     if test ! -f ark${I}isdone ; then
  3459.     MISSING="${MISSING} ${I}"
  3460.     fi
  3461. done
  3462. if test "${MISSING}" = "" ; then
  3463.     echo You have unpacked all 20 archives.
  3464.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  3465. else
  3466.     echo You still need to unpack the following archives:
  3467.     echo "        " ${MISSING}
  3468. fi
  3469. ##  End of shell archive.
  3470. exit 0
  3471.