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

  1. Newsgroups: comp.sources.unix
  2. From: ross@spam.adelaide.edu.au (Ross Williams)
  3. Subject: v26i128: funnelweb - a tool for literate programming in C, Part08/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 128
  9. Archive-Name: funnelweb/part08
  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 8 (of 20)."
  18. # Contents:  answers/sc13.lis answers/wv04.tex answers/wv05.tex
  19. #   answers/wv06.tex sources/mapper.c userman/u_ch4.tex
  20. #   userman/u_ch5.tex
  21. # Wrapped by vixie@gw.home.vix.com on Sun Apr 11 11:00:21 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'answers/sc13.lis' -a "${1}" != "-c" ; then 
  24.   echo shar: Will not clobber existing file \"'answers/sc13.lis'\"
  25. else
  26. echo shar: Extracting \"'answers/sc13.lis'\" \(17047 characters\)
  27. sed "s/^X//" >'answers/sc13.lis' <<'END_OF_FILE'
  28. XFUNNELWEB LISTING FILE
  29. X======================
  30. X
  31. Dump of mapped file "<<Suppressed>>".
  32. X
  33. MEMORY DUMP OF MAPPED FILE
  34. X==========================
  35. X
  36. X+-------------------------------------------------+------------------+
  37. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  38. X+-------------------------------------------------+------------------+
  39. X| 53 43 31 33 3A 20 56 61 72 69 6F 75 73 20 6B 69 | SC13: Various ki |
  40. X| 6E 64 73 20 6F 66 20 69 6E 63 6C 75 64 65 20 66 | nds of include f |
  41. X| 69 6C 65 2E 0A 0A 31 2E 20 49 6E 63 6C 75 64 65 | ile...1. Include |
  42. X| 20 66 69 6C 65 20 69 73 20 65 6D 70 74 79 2E 0A |  file is empty.. |
  43. X| 42 65 66 6F 72 65 20 69 6E 63 6C 75 64 65 0A 40 | Before include.@ |
  44. X| 69 20 73 63 31 33 61 0A 41 66 74 65 72 20 69 6E | i sc13a.After in |
  45. X| 63 6C 75 64 65 0A 0A 32 2E 20 49 6E 63 6C 75 64 | clude..2. Includ |
  46. X| 65 20 66 69 6C 65 20 63 6F 6E 74 61 69 6E 73 20 | e file contains  |
  47. X| 61 20 73 69 6E 67 6C 65 20 62 6C 61 6E 6B 20 6C | a single blank l |
  48. X| 69 6E 65 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C | ine..Before incl |
  49. X| 75 64 65 0A 40 69 20 73 63 31 33 62 0A 41 66 74 | ude.@i sc13b.Aft |
  50. X| 65 72 20 69 6E 63 6C 75 64 65 0A 0A 33 2E 20 49 | er include..3. I |
  51. X| 6E 63 6C 75 64 65 20 66 69 6C 65 20 63 6F 6E 74 | nclude file cont |
  52. X| 61 69 6E 73 20 74 77 6F 20 62 6C 61 6E 6B 20 6C | ains two blank l |
  53. X| 69 6E 65 73 2E 0A 42 65 66 6F 72 65 20 69 6E 63 | ines..Before inc |
  54. X| 6C 75 64 65 0A 40 69 20 73 63 31 33 63 0A 41 66 | lude.@i sc13c.Af |
  55. X| 74 65 72 20 69 6E 63 6C 75 64 65 0A 0A 34 2E 20 | ter include..4.  |
  56. X| 49 6E 63 6C 75 64 65 20 66 69 6C 65 20 63 6F 6E | Include file con |
  57. X| 74 61 69 6E 73 20 61 20 73 69 6E 67 6C 65 20 6C | tains a single l |
  58. X| 69 6E 65 20 77 69 74 68 20 74 65 78 74 20 6F 6E | ine with text on |
  59. X| 20 69 74 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C |  it..Before incl |
  60. X| 75 64 65 0A 40 69 20 73 63 31 33 64 0A 41 66 74 | ude.@i sc13d.Aft |
  61. X| 65 72 20 69 6E 63 6C 75 64 65 0A 0A 35 2E 20 49 | er include..5. I |
  62. X| 6E 63 6C 75 64 65 20 66 69 6C 65 27 73 20 6C 61 | nclude file's la |
  63. X| 73 74 20 6C 69 6E 65 20 69 73 20 6E 6F 74 20 70 | st line is not p |
  64. X| 72 6F 70 65 72 6C 79 20 74 65 72 6D 69 6E 61 74 | roperly terminat |
  65. X| 65 64 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C 75 | ed..Before inclu |
  66. X| 64 65 0A 40 69 20 73 63 31 33 65 0A 41 66 74 65 | de.@i sc13e.Afte |
  67. X| 72 20 69 6E 63 6C 75 64 65 0A 0A 36 2E 20 49 6E | r include..6. In |
  68. X| 63 6C 75 64 65 20 66 69 6C 65 20 69 73 20 6F 72 | clude file is or |
  69. X| 64 69 6E 61 72 79 2E 0A 42 65 66 6F 72 65 20 69 | dinary..Before i |
  70. X| 6E 63 6C 75 64 65 0A 40 69 20 73 63 31 33 66 0A | nclude.@i sc13f. |
  71. X| 41 66 74 65 72 20 69 6E 63 6C 75 64 65 0A 0A 37 | After include..7 |
  72. X| 2E 20 54 65 73 74 20 75 70 70 65 72 20 63 61 73 | . Test upper cas |
  73. X| 65 20 49 20 61 6E 64 20 66 69 6C 65 20 65 78 74 | e I and file ext |
  74. X| 65 6E 73 69 6F 6E 20 69 6E 68 65 72 69 74 61 6E | ension inheritan |
  75. X| 63 65 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C 75 | ce..Before inclu |
  76. X| 64 65 0A 40 49 20 73 63 31 33 66 0A 41 66 74 65 | de.@I sc13f.Afte |
  77. X| 72 20 69 6E 63 6C 75 64 65 0A 0A 45 6E 64 20 6F | r include..End o |
  78. X| 66 20 74 65 73 74 20 46 69 6C 65 2E 0A          | f test File..    |
  79. X+-------------------------------------------------+------------------+
  80. X
  81. Dump of mapped file "<<Suppressed>>".
  82. X
  83. MEMORY DUMP OF MAPPED FILE
  84. X==========================
  85. X
  86. X+-------------------------------------------------+------------------+
  87. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  88. X+-------------------------------------------------+------------------+
  89. X+-------------------------------------------------+------------------+
  90. X
  91. Dump of mapped file "<<Suppressed>>".
  92. X
  93. MEMORY DUMP OF MAPPED FILE
  94. X==========================
  95. X
  96. X+-------------------------------------------------+------------------+
  97. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  98. X+-------------------------------------------------+------------------+
  99. X| 0A                                              | .                |
  100. X+-------------------------------------------------+------------------+
  101. X
  102. Dump of mapped file "<<Suppressed>>".
  103. X
  104. MEMORY DUMP OF MAPPED FILE
  105. X==========================
  106. X
  107. X+-------------------------------------------------+------------------+
  108. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  109. X+-------------------------------------------------+------------------+
  110. X| 0A 0A                                           | ..               |
  111. X+-------------------------------------------------+------------------+
  112. X
  113. Dump of mapped file "<<Suppressed>>".
  114. X
  115. MEMORY DUMP OF MAPPED FILE
  116. X==========================
  117. X
  118. X+-------------------------------------------------+------------------+
  119. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  120. X+-------------------------------------------------+------------------+
  121. X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
  122. X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
  123. X| 74 20 53 43 31 33 64 2E 20 4A 75 73 74 20 61 20 | t SC13d. Just a  |
  124. X| 66 69 6C 65 20 63 6F 6E 74 61 69 6E 69 6E 67 20 | file containing  |
  125. X| 6F 6E 65 20 6C 69 6E 65 2E 0A                   | one line..       |
  126. X+-------------------------------------------------+------------------+
  127. X
  128. Dump of mapped file "<<Suppressed>>".
  129. X
  130. MEMORY DUMP OF MAPPED FILE
  131. X==========================
  132. X
  133. X+-------------------------------------------------+------------------+
  134. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  135. X+-------------------------------------------------+------------------+
  136. X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
  137. X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
  138. X| 74 20 53 43 31 33 65 2E 20 54 68 65 20 74 65 73 | t SC13e. The tes |
  139. X| 74 20 69 73 20 74 6F 20 73 65 65 20 68 6F 77 20 | t is to see how  |
  140. X| 46 75 6E 6E 65 6C 57 65 62 0A 63 6F 70 65 73 20 | FunnelWeb.copes  |
  141. X| 77 69 74 68 20 61 6E 20 69 6E 63 6C 75 64 65 20 | with an include  |
  142. X| 66 69 6C 65 20 74 68 61 74 20 68 61 73 20 61 6E | file that has an |
  143. X| 20 69 6D 70 72 6F 70 65 72 6C 79 20 74 65 72 6D |  improperly term |
  144. X| 69 6E 61 74 65 64 20 6C 61 73 74 20 6C 69 6E 65 | inated last line |
  145. X| 2E 0A 0A 48 65 72 65 20 69 73 20 74 68 65 20 69 | ...Here is the i |
  146. X| 6D 70 72 6F 70 65 72 20 74 65 72 6D 69 6E 61 74 | mproper terminat |
  147. X| 69 6F 6E 21 2D 2D 2D 2D 3E                      | ion!---->        |
  148. X+-------------------------------------------------+------------------+
  149. X
  150. Dump of mapped file "<<Suppressed>>".
  151. X
  152. MEMORY DUMP OF MAPPED FILE
  153. X==========================
  154. X
  155. X+-------------------------------------------------+------------------+
  156. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  157. X+-------------------------------------------------+------------------+
  158. X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
  159. X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
  160. X| 74 73 20 53 43 31 33 2E 36 20 61 6E 64 20 53 43 | ts SC13.6 and SC |
  161. X| 31 33 2E 37 2E 0A 54 68 65 72 65 20 61 72 65 20 | 13.7..There are  |
  162. X| 6F 6E 6C 79 20 74 77 6F 20 6C 69 6E 65 73 2C 20 | only two lines,  |
  163. X| 61 6E 64 20 74 68 69 73 20 69 73 20 74 68 65 20 | and this is the  |
  164. X| 73 65 63 6F 6E 64 20 6F 6E 65 2E 0A             | second one..     |
  165. X+-------------------------------------------------+------------------+
  166. X
  167. Dump of mapped file "<<Suppressed>>".
  168. X
  169. MEMORY DUMP OF MAPPED FILE
  170. X==========================
  171. X
  172. X+-------------------------------------------------+------------------+
  173. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  174. X+-------------------------------------------------+------------------+
  175. X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
  176. X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
  177. X| 74 73 20 53 43 31 33 2E 36 20 61 6E 64 20 53 43 | ts SC13.6 and SC |
  178. X| 31 33 2E 37 2E 0A 54 68 65 72 65 20 61 72 65 20 | 13.7..There are  |
  179. X| 6F 6E 6C 79 20 74 77 6F 20 6C 69 6E 65 73 2C 20 | only two lines,  |
  180. X| 61 6E 64 20 74 68 69 73 20 69 73 20 74 68 65 20 | and this is the  |
  181. X| 73 65 63 6F 6E 64 20 6F 6E 65 2E 0A             | second one..     |
  182. X+-------------------------------------------------+------------------+
  183. X
  184. X
  185. X=========================== Start of LINE LIST DUMP ============================
  186. X
  187. Globl Local| Text
  188. X-----------+--------------------------------------------------------------------
  189. X00001 00001| SC13: Various kinds of include file.<010>
  190. X00002 00002| <010>
  191. X00003 00003| 1. Include file is empty.<010>
  192. X00004 00004| Before include<010>
  193. X00005 00005| @i sc13a<010>
  194. X00006 00006| After include<010>
  195. X00007 00007| <010>
  196. X00008 00008| 2. Include file contains a single blank line.<010>
  197. X00009 00009| Before include<010>
  198. X00010 00010| @i sc13b<010>
  199. X00011 00001| <010>
  200. X00012 00011| After include<010>
  201. X00013 00012| <010>
  202. X00014 00013| 3. Include file contains two blank lines.<010>
  203. X00015 00014| Before include<010>
  204. X00016 00015| @i sc13c<010>
  205. X00017 00001| <010>
  206. X00018 00002| <010>
  207. X00019 00016| After include<010>
  208. X00020 00017| <010>
  209. X00021 00018| 4. Include file contains a single line with text on it.<010>
  210. X00022 00019| Before include<010>
  211. X00023 00020| @i sc13d<010>
  212. X00024 00001| This is the include file for test SC13d. Just a file containing one line.<010>
  213. X00025 00021| After include<010>
  214. X00026 00022| <010>
  215. X00027 00023| 5. Include file's last line is not properly terminated.<010>
  216. X00028 00024| Before include<010>
  217. X00029 00025| @i sc13e<010>
  218. X00030 00001| This is the include file for test SC13e. The test is to see how FunnelWeb<010>
  219. X00031 00002| copes with an include file that has an improperly terminated last line.<010>
  220. X00032 00003| <010>
  221. X00033 00004| Here is the improper termination!----><010>
  222. X00034 00026| After include<010>
  223. X00035 00027| <010>
  224. X00036 00028| 6. Include file is ordinary.<010>
  225. X00037 00029| Before include<010>
  226. X00038 00030| @i sc13f<010>
  227. X00039 00001| This is the include file for tests SC13.6 and SC13.7.<010>
  228. X00040 00002| There are only two lines, and this is the second one.<010>
  229. X00041 00031| After include<010>
  230. X00042 00032| <010>
  231. X00043 00033| 7. Test upper case I and file extension inheritance.<010>
  232. X00044 00034| Before include<010>
  233. X00045 00035| @I sc13f<010>
  234. X00046 00001| This is the include file for tests SC13.6 and SC13.7.<010>
  235. X00047 00002| There are only two lines, and this is the second one.<010>
  236. X00048 00036| After include<010>
  237. X00049 00037| <010>
  238. X00050 00038| End of test File.<010>
  239. X00051 00039| <End-Of-File><010>
  240. X-----------+--------------------------------------------------------------------
  241. Globl Local| Text
  242. X
  243. X============================ End of LINE LIST DUMP =============================
  244. X
  245. X
  246. X=========================== Start of TOKEN LIST DUMP ===========================
  247. X
  248. Summary: There are 15 tokens in the token list.
  249. X
  250. Line[Column]: Token Description
  251. X-------------------------------
  252. X
  253. X0001[01]: Text. Text scrap[Grey]="SC13: Various kinds of include file.<010>
  254. X<010>
  255. X1. Include file is empty.<010>
  256. Before include<010>
  257. X"
  258. X0006[01]: Text. Text scrap[Grey]="After include<010>
  259. X<010>
  260. X2. Include file contains a single blank line.<010>
  261. Before include<010>
  262. X"
  263. X0011[01]: Text. Text scrap[White]="<010>
  264. X"
  265. X0012[01]: Text. Text scrap[Grey]="After include<010>
  266. X<010>
  267. X3. Include file contains two blank lines.<010>
  268. Before include<010>
  269. X"
  270. X0017[01]: Text. Text scrap[White]="<010>
  271. X<010>
  272. X"
  273. X0019[01]: Text. Text scrap[Grey]="After include<010>
  274. X<010>
  275. X4. Include file contains a single line with text on it.<010>
  276. Before include<010>
  277. X"
  278. X0024[01]: Text. Text scrap[Grey]="This is the include file for test SC13d. Just a file containing one line.<010>
  279. X"
  280. X0025[01]: Text. Text scrap[Grey]="After include<010>
  281. X<010>
  282. X5. Include file's last line is not properly terminated.<010>
  283. Before include<010>
  284. X"
  285. X0030[01]: Text. Text scrap[Grey]="This is the include file for test SC13e. The test is to see how FunnelWeb<010>
  286. copes with an include file that has an improperly terminated last line.<010>
  287. X<010>
  288. Here is the improper termination!----><010>
  289. X"
  290. X0034[01]: Text. Text scrap[Grey]="After include<010>
  291. X<010>
  292. X6. Include file is ordinary.<010>
  293. Before include<010>
  294. X"
  295. X0039[01]: Text. Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
  296. There are only two lines, and this is the second one.<010>
  297. X"
  298. X0041[01]: Text. Text scrap[Grey]="After include<010>
  299. X<010>
  300. X7. Test upper case I and file extension inheritance.<010>
  301. Before include<010>
  302. X"
  303. X0046[01]: Text. Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
  304. There are only two lines, and this is the second one.<010>
  305. X"
  306. X0048[01]: Text. Text scrap[Grey]="After include<010>
  307. X<010>
  308. XEnd of test File.<010>
  309. X"
  310. X0051[01]: End Of File. 
  311. X============================ End of TOKEN LIST DUMP ============================
  312. X
  313. X
  314. X========================== Start of MACRO TABLE DUMP ===========================
  315. X
  316. X
  317. X=========================== End of MACRO TABLE DUMP ============================
  318. X
  319. X
  320. X========================= Start of DOCUMENT LIST DUMP ==========================
  321. X
  322. X
  323. TEXT COMPONENT: Pos(L,C)=(1,1). 
  324. X
  325. X-- Start of Text Scrap List --
  326. Text scrap[Grey]="SC13: Various kinds of include file.<010>
  327. X<010>
  328. X1. Include file is empty.<010>
  329. Before include<010>
  330. X"
  331. Text scrap[Grey]="After include<010>
  332. X<010>
  333. X2. Include file contains a single blank line.<010>
  334. Before include<010>
  335. X"
  336. Text scrap[White]="<010>
  337. X"
  338. Text scrap[Grey]="After include<010>
  339. X<010>
  340. X3. Include file contains two blank lines.<010>
  341. Before include<010>
  342. X"
  343. Text scrap[White]="<010>
  344. X<010>
  345. X"
  346. Text scrap[Grey]="After include<010>
  347. X<010>
  348. X4. Include file contains a single line with text on it.<010>
  349. Before include<010>
  350. X"
  351. Text scrap[Grey]="This is the include file for test SC13d. Just a file containing one line.<010>
  352. X"
  353. Text scrap[Grey]="After include<010>
  354. X<010>
  355. X5. Include file's last line is not properly terminated.<010>
  356. Before include<010>
  357. X"
  358. Text scrap[Grey]="This is the include file for test SC13e. The test is to see how FunnelWeb<010>
  359. copes with an include file that has an improperly terminated last line.<010>
  360. X<010>
  361. Here is the improper termination!----><010>
  362. X"
  363. Text scrap[Grey]="After include<010>
  364. X<010>
  365. X6. Include file is ordinary.<010>
  366. Before include<010>
  367. X"
  368. Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
  369. There are only two lines, and this is the second one.<010>
  370. X"
  371. Text scrap[Grey]="After include<010>
  372. X<010>
  373. X7. Test upper case I and file extension inheritance.<010>
  374. Before include<010>
  375. X"
  376. Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
  377. There are only two lines, and this is the second one.<010>
  378. X"
  379. Text scrap[Grey]="After include<010>
  380. X<010>
  381. XEnd of test File.<010>
  382. X"
  383. X--- End of Text Scrap List ---
  384. X
  385. X
  386. X========================== End of DOCUMENT LIST DUMP ===========================
  387. X
  388. XE: No macros defined.
  389. XE: No output files specified.
  390. X
  391. Global Local| Input File
  392. X------------+-------------------------------------------------------------------
  393. X     1     1| SC13: Various kinds of include file.
  394. X     2     2| 
  395. X     3     3| 1. Include file is empty.
  396. X     4     4| Before include
  397. X     5     5| @i sc13a
  398. X     Warning|.^Include file is empty (not a byte in syte)!
  399. X     6     6| After include
  400. X     7     7| 
  401. X     8     8| 2. Include file contains a single blank line.
  402. X     9     9| Before include
  403. X    10    10| @i sc13b
  404. X    11     1| 
  405. X    12    11| After include
  406. X    13    12| 
  407. X    14    13| 3. Include file contains two blank lines.
  408. X    15    14| Before include
  409. X    16    15| @i sc13c
  410. X    17     1| 
  411. X    18     2| 
  412. X    19    16| After include
  413. X    20    17| 
  414. X    21    18| 4. Include file contains a single line with text on it.
  415. X    22    19| Before include
  416. X    23    20| @i sc13d
  417. X    24     1| This is the include file for test SC13d. Just a file containing one line.
  418. X    25    21| After include
  419. X    26    22| 
  420. X    27    23| 5. Include file's last line is not properly terminated.
  421. X    28    24| Before include
  422. X    29    25| @i sc13e
  423. X    30     1| This is the include file for test SC13e. The test is to see how FunnelWeb
  424. X    31     2| copes with an include file that has an improperly terminated last line.
  425. X    32     3| 
  426. X    33     4| Here is the improper termination!---->
  427. X    34    26| After include
  428. X     Warning|.^The last line of the include file was terminated by EOF.
  429. X            |.^An EOL was inserted at the end of the last line.
  430. X    35    27| 
  431. X    36    28| 6. Include file is ordinary.
  432. X    37    29| Before include
  433. X    38    30| @i sc13f
  434. X    39     1| This is the include file for tests SC13.6 and SC13.7.
  435. X    40     2| There are only two lines, and this is the second one.
  436. X    41    31| After include
  437. X    42    32| 
  438. X    43    33| 7. Test upper case I and file extension inheritance.
  439. X    44    34| Before include
  440. X    45    35| @I sc13f
  441. X    46     1| This is the include file for tests SC13.6 and SC13.7.
  442. X    47     2| There are only two lines, and this is the second one.
  443. X    48    36| After include
  444. X    49    37| 
  445. X    50    38| End of test File.
  446. X            | <End-Of-File>
  447. X------------+-------------------------------------------------------------------
  448. X
  449. There were 2 Errors and 2 Warnings.
  450. END_OF_FILE
  451. if test 17047 -ne `wc -c <'answers/sc13.lis'`; then
  452.     echo shar: \"'answers/sc13.lis'\" unpacked with wrong size!
  453. fi
  454. # end of 'answers/sc13.lis'
  455. fi
  456. if test -f 'answers/wv04.tex' -a "${1}" != "-c" ; then 
  457.   echo shar: Will not clobber existing file \"'answers/wv04.tex'\"
  458. else
  459. echo shar: Extracting \"'answers/wv04.tex'\" \(16542 characters\)
  460. sed "s/^X//" >'answers/wv04.tex' <<'END_OF_FILE'
  461. X
  462. X%*******************************************************************************
  463. X%*                    START OF AUTOMATICALLY GENERATED TEX FILE                *
  464. X%*******************************************************************************
  465. X%*                                                                             *
  466. X%* This TeX file was automatically generated by the FunnelWeb preprocessor.    *
  467. X%* You can typeset this file to produce printed documentation by running it    *
  468. X%* through the TeX typesetter using a command such as:                         *
  469. X%*    tex thisfilename                                                         *
  470. X%* The resultant file thisfilename.dvi can be printed using a command such as: *
  471. X%*    lpr -Pcslw -d thisfilename.dvi                                           *
  472. X%*                                                                             *
  473. X%* FunnelWeb is a preprocessor that allows programmers to weave programs and   *
  474. X%* their documentation together in a single document. The FunnelWeb program    *
  475. X%* analyses such documents producing both program files and typeset            *
  476. X%* documentation such as this TeX file.                                        *
  477. X%* FunnelWeb was created by Ross Williams.                                     *
  478. X%*                                                                             *
  479. X%* For more information on FunnelWeb look in the following FTP archive:        *
  480. X%*    Machine  : sirius.itd.adelaide.edu.au [IP=129.127.40.3].                 *
  481. X%*    Directory: ~pub/funnelweb/                                               *
  482. X%*               (or some other appropriately named directory).                *
  483. X%* or email Ross Williams at ross@spam.adelaide.edu.au                         *
  484. X%*                                                                             *
  485. X%*******************************************************************************
  486. X
  487. X
  488. X%===================== Start of FunnelWeb TeX Definitions ======================
  489. X
  490. X
  491. X% Version
  492. X% -------
  493. X% This is FunnelWeb TeX Macro Library Version 1.0.
  494. X
  495. X
  496. X% Copyright
  497. X% ---------
  498. X% This set of FunnelWeb TeX definitions was written by Ross Williams and was
  499. X% originally Copyright (C) 1992 Ross N. Williams.  However, I, Ross Williams,
  500. X% hereby forego any claim to Copyright in this set of FunnelWeb TeX definitions
  501. X% and hereby authorize that the set of TeX definitions pass into the public
  502. X% domain. -- Ross N. Williams, 3:41pm 07-May-1992, Adelaide, Australia.
  503. X
  504. X
  505. X% Modification
  506. X% ------------
  507. X% Please record all modifications to these TeX definitions here. Unless
  508. X% otherwise specified, all modified definitions fall in the public domain too.
  509. X%
  510. X% Programmers:
  511. X%    RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  512. X%
  513. X% Changes:
  514. X%    07-May-1992  RNW  Prepared this work for public domain release.
  515. X%
  516. X
  517. X
  518. X% General Comments
  519. X% ----------------
  520. X% This set of TeX definitions exists for two reasons:
  521. X%
  522. X%    1. To shorten and neaten the FunnelWeb TeX output.
  523. X%    2. To allow users to fiddle with the output format in their input files
  524. X%       (by inserting redefining "\def"s) without having to resort to
  525. X%       modifying the FunnelWeb code.
  526. X%
  527. X% The user is warned that these definitions may be changed from time to time
  528. X% (but probably not much). The user should not be too sneaky. In particular,
  529. X% users wishing to redefine some of these macros should do so in an explicitly
  530. X% defined section at the top of their input file. This will mean that in the
  531. X% event of problems, that section can simply be deleted or commented out to
  532. X% allow the document to at least be typeset in the default format. Users should
  533. X% limit themselves to redefining these macros in such a section and should
  534. X% refrain from using the macros throughout their documents.
  535. X
  536. X
  537. X% Environment Parameters
  538. X% ----------------------
  539. X% \tolerance tells TeX how tolerant it should be about making bad line and
  540. X% page breaks. Here we set it to it's maximum, as
  541. X%   1) Computer programs are likely to cause lots of bad breaks.
  542. X%   2) In most cases the user would probably rather get the TeX file through
  543. X%      TeX without any errors than fiddle with spacings for perfection.
  544. X\tolerance=10000
  545. X
  546. X% I don't like indentation as it makes the page look more busy. Instead,
  547. X% paragraphs are separated by a little space (see next).
  548. X\parindent=0pt
  549. X
  550. X% In many cases, users will produce documents with long runs of paragraphs.
  551. X% In order to space out these paragraphs, it is convenient to maintain a
  552. X% prevailing non-zero \parskip (end-of-paragaph skip). The only trouble is
  553. X% that the skip becomes a problem in macro definitions which require no skip
  554. X% and so we have to turn the skip on and off. The following two macros
  555. X% simplify this process.
  556. X\def\fwparskipon{\parskip=\medskipamount}
  557. X\def\fwparskipoff{\parskip=0pt}
  558. X\fwparskipon
  559. X
  560. X% Setting raggedbottom allows TeX to leave a bit of space at the bottom of the
  561. X% page in order to better vertically align the rest of the page (e.g. skips
  562. X% won't stretch as much). It also means that headings are less likely to be
  563. X% isolated at the bottom of the page without any following text.
  564. X\raggedbottom
  565. X
  566. X
  567. X% Fonts
  568. X% -----
  569. X% Most of the typeset output is set in 10pt roman and 10pt tt font.
  570. X% The major extra font needs spring from titles and headings.
  571. X% For portability's sake we use only the following fonts:
  572. X%    cmr10
  573. X%    cmbx10
  574. X%    cmtt10
  575. X% and some enlargements of them. These fonts are all "standard" fonts
  576. X% in Plain TeX. See The TeXbook p.350.
  577. X\font\fwfontnote=cmr7
  578. X
  579. X\font\fwfontnorm=cmr10
  580. X\font\fwfontnorma=cmr10 scaled \magstep1
  581. X\font\fwfontnormb=cmr10 scaled \magstep2
  582. X
  583. X\font\fwfontbold=cmbx10
  584. X\font\fwfontbolda=cmbx10 scaled \magstep1
  585. X\font\fwfontboldb=cmbx10 scaled \magstep2
  586. X\font\fwfontboldc=cmbx10 scaled \magstep3
  587. X\font\fwfontboldd=cmbx10 scaled \magstep4
  588. X
  589. X
  590. X% Macros for Stylistic Details
  591. X% ----------------------------
  592. X% This section contains all the fiddly little macros for setting the details
  593. X% of each macro definition.
  594. X
  595. X% Macro definitions are sandwiched by calls to these macros which can be used
  596. X% to sort out the spacing before and after the macro definition.
  597. X\def\fwbeginmacro{\fwparskipoff\bigskip}
  598. X\def\fwendmacro{\fwparskipon\par}
  599. X
  600. X% These macros deal with the macro name and definition line.
  601. X\def\fwmacroname#1#2{{\sl #1\/}$\lbrack$#2$\rbrack$}
  602. X\def\fwfilename#1#2{{\bf #1}$\lbrack$#2$\rbrack$}
  603. X\def\fwzero#1{{\bf Z}}
  604. X\def\fwmany#1{{\bf M}}
  605. X\def\fwequals{ $\equiv$}
  606. X\def\fwplusequals{ $+\equiv$}
  607. X
  608. X% Now for the actual body of the definition. It looks nice to have the tt
  609. X% code indented a little. Again, we use macros instead of writing direct TeX,
  610. X% so as to allow the user to fiddle this stuff to taste without having to
  611. X% modify the FunnelWeb C code.
  612. X\def\fwodef{\parindent=15pt\vskip0pt$\lbrace$\parindent=20pt}
  613. X\def\fwcdef{$\rbrace$\vskip0pt\parindent=0pt}
  614. X\def\fwoquote{`}
  615. X\def\fwcquote{'}
  616. X\def\fwoparen{$($}
  617. X\def\fwcomma{$,$}
  618. X\def\fwcparen{$)$}
  619. X\def\fwparam#1{$\diamond #1$}
  620. X\def\fwparams#1{$(\diamond #1)$}
  621. X
  622. X% These macros deal with the notes that are appended at the end of each
  623. X% macro definition. Note that even though \fwisafile,\fwusedin, and \fwseealso
  624. X% have the same definition, they are given different names so as to allow the
  625. X% user to redefine these macros to typeset each kind of information differently
  626. X% if desired.
  627. X\def\fwbeginmacronotes{\begingroup\baselineskip=9pt\smallskip}
  628. X\def\fwnote#1{{\fwfontnote #1}\par}
  629. X\def\fwisafile#1{\fwnote{#1}}
  630. X\def\fwusedin#1{\fwnote{#1}}
  631. X\def\fwseealso#1{\fwnote{#1}}
  632. X\def\fwendmacronotes{\endgroup}
  633. X
  634. X
  635. X% Macros to Typeset Program Code Verbatim
  636. X% ---------------------------------------
  637. X% This is by far the hairiest and most difficult part of the typesetting task
  638. X% because we have to turn off most of TeX's natural instincts in order to
  639. X% typeset the program text exactly as it appears in the input file.
  640. X% Two macros are defined to pull this off: \fwbtx and \fwverbatimgobble.
  641. X% Their code was inspired by the following sections of "The TeXbook":
  642. X%    Appendix D: Dirty Tricks, 3.Verbatim listing, p.380-382.
  643. X%    Appendix E: Example Formats, p.421.
  644. X% The \fwbtx[ (for "FunnelWeb Begin TeXt") macro does most of the hard work.
  645. X% The liberal use of "%" is because I don't understand TeX well enough to
  646. X% understand when an end of line will cause trouble, and I am playing it safe.
  647. X
  648. X% Before defining the main \fwbtx macro, we have to stash away some definitions
  649. X% in the hidden part of TeX's environment. Let's hope that these "hidden"
  650. X% definitions don't affect anything except what is desired to be affected.
  651. X
  652. X% The tt font in which we wish to set the text has two Latin lurking ligatures!
  653. X% These are ?` and !`. To disable them, we define the left quote when ACTIVE
  654. X% to be defined in such a way as to prevent ligatures. The main TeX text will
  655. X% normally not be exposed to this definition because normally the leftquote
  656. X% character is not active. The \fwbtx macro temporarily makes the left quote
  657. X% character active thus activating the deactivation of left quote ligatures.
  658. X% See The TeXbook p.381.
  659. X{\catcode`\`=\active \gdef`{\relax\lq}}
  660. X
  661. X% TeX is fairly carefree about spaces and so we have to make it more serious.
  662. X% To do so we pull the same trick as above, setting up a definition for active
  663. X% space, but only making space active during the span of the verbatim text.
  664. X% In Plain TeX the active space is defined to be simply a space, but here we
  665. X% define it to be a control space. This ensures that the space cannot
  666. X% be gobbled up by one of TeX's mysterious mechanisms when activated.
  667. X% See The TeXbook, p.381 and p.352.
  668. X{\obeyspaces\global\let =\ }
  669. X
  670. X% Here is the main \fwbtx verbatim text macro.
  671. X% Note: The order in which all these pieces of business have to be done is
  672. X% still a partial mystery to me. Don't fiddle with this stuff unless you
  673. X% think you know what you are doing.
  674. X\def\fwbtx[{%
  675. X%
  676. X% The funnies involved in getting verbatim output are safely housed inside
  677. X% this \begingroup, and the \endgroup in \fwverbatimgobble. Groups are used
  678. X% instead of curly braces because we have to be able to signal the end of
  679. X% this macro with a curly brace.
  680. X\begingroup%
  681. X%
  682. X% \pars at the end of empty lines in the verbatim text won't come out normally
  683. X% because TeX is in vertical mode and they get gobbled up. To prevent this,
  684. X% we force \par to exit vertical mode first. See The TeXbook p.381.
  685. X\def\par{\leavevmode\endgraf}%
  686. X%
  687. X% Activate the leftquote character so as to avoid ligatures (see above).
  688. X\catcode`\`=\active%
  689. X%
  690. X% The \obeylines macro simply defines end of line (^M) to be \par. This ensures
  691. X% that TeX will treat each verbatim line as a new paragraph.
  692. X\obeylines%
  693. X%
  694. X% To get verbatim output, we have to desex all the special characters. This
  695. X% is explained in detail in The TeXbook p.380.
  696. X\def\do##1{\catcode`##1=12 }\dospecials%
  697. X%
  698. X% Activate the space character so as to make TeX treat blanks seriously.
  699. X% This activation invokes an eralier definition (see above).
  700. X\obeyspaces
  701. X%
  702. X% Interparagraph skips do not help the cause.
  703. X% Note: We have to preserve the indentation though, as the code is actually
  704. X% indented in the final output. See \fwodef in an earlier section.
  705. X\parskip=0pt%
  706. X%
  707. X% We typeset the verbatim text in tt font (courier on the Macintosh) for a
  708. X% number of reasons:
  709. X%    - tt font has the same horizontal spacing for each character.
  710. X%    - tt font covers the ASCII character set.
  711. X%    - tt font doesn't have many surprises (e.g. ligatures).
  712. X%    - tt font looks much what you might see on a computer terminal screen.
  713. X\tt%
  714. X%
  715. X% Having set up an environment for verbatim, we are ready to use it.
  716. X% By invoking \fwverbatimgobble, this \fwbtx macro gobbles up text verbatim (as
  717. X% part of the parameter of \fwverbatimgobble) until it sees the termination
  718. X% string "]fwetx=" (the "=" was thrown in to add obscurity as this sequence
  719. X% must never occur in the verbatim text).
  720. X\fwverbatimgobble}
  721. X
  722. X% The \fwverbatimgobble macro exists to allow \fwbtx to bracket verbatim text.
  723. X\def\fwverbatimgobble#1]fwetx={#1\endgroup}
  724. X
  725. X
  726. X% Table of Contents
  727. X% -----------------
  728. X% The five levels of table of contents that FunnelWeb supports are identified
  729. X% by the five letters [A..E]. These are used throughout the following macros.
  730. X
  731. X% The following macros are utilities to the TOC macros to follow.
  732. X\def\fwrule{\medskip\hrule\medskip}
  733. X\def\fwqh{\hskip1.5em\relax}
  734. X\def\fwbeforesec{\penalty-200\bigskip\medskip\par}
  735. X
  736. X% The following macros are used to typeset the table of contents.
  737. X\def\fwtocstart#1{\fwrule\leftline{\fwfontbolda Table of Contents}\fwrule}
  738. X\def\fwtoca#1#2{\leftline{{\bf #1 #2}}}
  739. X\def\fwtocb#1#2{\leftline{\fwqh #1 #2}}
  740. X\def\fwtocc#1#2{\leftline{\fwqh\fwqh #1 #2}}
  741. X\def\fwtocd#1#2{\leftline{\fwqh\fwqh\fwqh #1 #2}}
  742. X\def\fwtoce#1#2{\leftline{\fwqh\fwqh\fwqh\fwqh #1 #2}}
  743. X\def\fwtocfinish#1{\fwrule}
  744. X
  745. X% The following "library" macros define five different strengths of headings
  746. X% which can be used later in the section macros.
  747. X\def\fwliba#1#2{\vfill\eject{\fwfontboldc #1 #2}\penalty200\smallskip}
  748. X\def\fwlibb#1#2{\fwbeforesec{\fwfontboldb #1 #2}\penalty200\smallskip}
  749. X\def\fwlibc#1#2{\fwbeforesec{\fwfontnormb #1 #2}\penalty200\smallskip}
  750. X\def\fwlibd#1#2{\fwbeforesec{\bf          #1 #2}\penalty200}
  751. X\def\fwlibe#1#2{\fwbeforesec{\bf          #1 #2}}
  752. X
  753. X% Here are the macros that actually typeset the section headings throughout
  754. X% the document. The fwlib system has been employed so as to easily allow the
  755. X% user to redefine the strengths of headings to taste. For example, the
  756. X% user could insert in the input document a similar set of definitions to these
  757. X% but with the b..e headings set to \fwlibc. This would tone down the output.
  758. X\def\fwseca#1#2{\fwliba{#1}{#2}}
  759. X\def\fwsecb#1#2{\fwlibb{#1}{#2}}
  760. X\def\fwsecc#1#2{\fwlibc{#1}{#2}}
  761. X\def\fwsecd#1#2{\fwlibd{#1}{#2}}
  762. X\def\fwsece#1#2{\fwlibe{#1}{#2}}
  763. X
  764. X
  765. X% Support for Explicit Typesetting
  766. X% --------------------------------
  767. X% FunnelWeb supports pragmas and other constructs that allow
  768. X% typesetter-independent typesetting commands to be given. The
  769. X% following macros support these features.
  770. X
  771. X% The in-text literal @{sloth@} and emphasise @[walrus@] features.
  772. X\def\fwlit#1{{\tt #1}}
  773. X\def\fwemp#1{{\it #1}}
  774. X
  775. X% The "@p new_page" pragma.
  776. X\def\fwnewpage{\vfill\eject}
  777. X
  778. X% The "@p vskip Nmm" pragma.
  779. X\def\fwvskip#1{\null\vskip #1mm}
  780. X
  781. X% The "@p title <font> <align> <text>" pragma.
  782. X\def\fwfontnormal#1{{\fwfontnorm {#1}}}
  783. X\def\fwfonttitle#1{{\fwfontboldd {#1}}}
  784. X\def\fwfontsmalltitle#1{{\fwfontboldb {#1}}}
  785. X\def\fwleftline#1{\leftline{#1}}
  786. X\def\fwcenterline#1{\centerline{#1}}
  787. X\def\fwrightline#1{\rightline{#1}}
  788. X
  789. X
  790. X% Support for Old FunnelWeb
  791. X% -------------------------
  792. X% The following macros were used extensively in the first version of
  793. X% FunnelWeb and are retained so that these older input files will still
  794. X% typeset cleanly.
  795. X\def\p#1{{\tt #1}}  % P for Program text.
  796. X\def\flagpage#1#2{
  797. X   \null
  798. X   \vfill
  799. X   \centerline{\fwfontboldd #1}
  800. X   \vskip 1cm
  801. X   \centerline{\fwfontboldd #2}
  802. X   \vfill
  803. X   \null
  804. X   \vfill
  805. X}
  806. X
  807. X%====================== End of FunnelWeb TeX Definitions =======================
  808. WV04: Test ugly string processing.
  809. X
  810. X\fwbeginmacro
  811. X\fwfilename{wv04.out}{1}\fwequals \fwodef \fwcdef 
  812. X\fwbeginmacronotes
  813. X\fwisafile{This macro is attached to an output file.}
  814. X\fwendmacronotes
  815. X\fwendmacro
  816. X
  817. X
  818. X1. Test ugly string in section name.
  819. X\fwseca{1}{ !\char`\"\#\$\%'()*+,-./0123456789:;$<$=$>$?}
  820. X\fwseca{2}{ABCDEFGHIJKLMNOPQRSTUVWXYZ[$\backslash$]\char`\^\_`}
  821. X\fwseca{3}{abcdefghijklmnopqrstuvwxyz$\{$$|$$\}$\char`\~}
  822. X
  823. X2. Test ugly string in macro name.
  824. X\fwbeginmacro
  825. X\fwmacroname{ !\char`\"\#\$\%'()*+,-./0123456789:;$<$=$>$?}{2}\fwzero{}\fwequals \fwodef \fwcdef 
  826. X\fwbeginmacronotes
  827. X\fwusedin{This macro is NEVER invoked.}
  828. X\fwendmacronotes
  829. X\fwendmacro
  830. X
  831. X\fwbeginmacro
  832. X\fwmacroname{ABCDEFGHIJKLMNOPQRSTUVWXYZ[$\backslash$]\char`\^\_`}{3}\fwzero{}\fwequals \fwodef \fwcdef 
  833. X\fwbeginmacronotes
  834. X\fwusedin{This macro is NEVER invoked.}
  835. X\fwendmacronotes
  836. X\fwendmacro
  837. X
  838. X\fwbeginmacro
  839. X\fwmacroname{abcdefghijklmnopqrstuvwxyz$\{$$|$$\}$\char`\~}{4}\fwzero{}\fwequals \fwodef \fwcdef 
  840. X\fwbeginmacronotes
  841. X\fwusedin{This macro is NEVER invoked.}
  842. X\fwendmacronotes
  843. X\fwendmacro
  844. X
  845. X
  846. X3. Test ugly string in literal section.
  847. X\fwlit{ !\char`\"\#\$\%'()*+,-./0123456789:;\char`\<=\char`\>?}
  848. X\fwlit{ABCDEFGHIJKLMNOPQRSTUVWXYZ[\char`\\]\char`\^\_`}
  849. X\fwlit{abcdefghijklmnopqrstuvwxyz\char`\{\char`\|\char`\}\char`\~}
  850. X
  851. X\bye
  852. X
  853. X
  854. X%*******************************************************************************
  855. X%*                    END OF AUTOMATICALLY GENERATED TEX FILE                  *
  856. X%*******************************************************************************
  857. X
  858. END_OF_FILE
  859. if test 16542 -ne `wc -c <'answers/wv04.tex'`; then
  860.     echo shar: \"'answers/wv04.tex'\" unpacked with wrong size!
  861. fi
  862. # end of 'answers/wv04.tex'
  863. fi
  864. if test -f 'answers/wv05.tex' -a "${1}" != "-c" ; then 
  865.   echo shar: Will not clobber existing file \"'answers/wv05.tex'\"
  866. else
  867. echo shar: Extracting \"'answers/wv05.tex'\" \(16706 characters\)
  868. sed "s/^X//" >'answers/wv05.tex' <<'END_OF_FILE'
  869. X
  870. X%*******************************************************************************
  871. X%*                    START OF AUTOMATICALLY GENERATED TEX FILE                *
  872. X%*******************************************************************************
  873. X%*                                                                             *
  874. X%* This TeX file was automatically generated by the FunnelWeb preprocessor.    *
  875. X%* You can typeset this file to produce printed documentation by running it    *
  876. X%* through the TeX typesetter using a command such as:                         *
  877. X%*    tex thisfilename                                                         *
  878. X%* The resultant file thisfilename.dvi can be printed using a command such as: *
  879. X%*    lpr -Pcslw -d thisfilename.dvi                                           *
  880. X%*                                                                             *
  881. X%* FunnelWeb is a preprocessor that allows programmers to weave programs and   *
  882. X%* their documentation together in a single document. The FunnelWeb program    *
  883. X%* analyses such documents producing both program files and typeset            *
  884. X%* documentation such as this TeX file.                                        *
  885. X%* FunnelWeb was created by Ross Williams.                                     *
  886. X%*                                                                             *
  887. X%* For more information on FunnelWeb look in the following FTP archive:        *
  888. X%*    Machine  : sirius.itd.adelaide.edu.au [IP=129.127.40.3].                 *
  889. X%*    Directory: ~pub/funnelweb/                                               *
  890. X%*               (or some other appropriately named directory).                *
  891. X%* or email Ross Williams at ross@spam.adelaide.edu.au                         *
  892. X%*                                                                             *
  893. X%*******************************************************************************
  894. X
  895. X
  896. X%===================== Start of FunnelWeb TeX Definitions ======================
  897. X
  898. X
  899. X% Version
  900. X% -------
  901. X% This is FunnelWeb TeX Macro Library Version 1.0.
  902. X
  903. X
  904. X% Copyright
  905. X% ---------
  906. X% This set of FunnelWeb TeX definitions was written by Ross Williams and was
  907. X% originally Copyright (C) 1992 Ross N. Williams.  However, I, Ross Williams,
  908. X% hereby forego any claim to Copyright in this set of FunnelWeb TeX definitions
  909. X% and hereby authorize that the set of TeX definitions pass into the public
  910. X% domain. -- Ross N. Williams, 3:41pm 07-May-1992, Adelaide, Australia.
  911. X
  912. X
  913. X% Modification
  914. X% ------------
  915. X% Please record all modifications to these TeX definitions here. Unless
  916. X% otherwise specified, all modified definitions fall in the public domain too.
  917. X%
  918. X% Programmers:
  919. X%    RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  920. X%
  921. X% Changes:
  922. X%    07-May-1992  RNW  Prepared this work for public domain release.
  923. X%
  924. X
  925. X
  926. X% General Comments
  927. X% ----------------
  928. X% This set of TeX definitions exists for two reasons:
  929. X%
  930. X%    1. To shorten and neaten the FunnelWeb TeX output.
  931. X%    2. To allow users to fiddle with the output format in their input files
  932. X%       (by inserting redefining "\def"s) without having to resort to
  933. X%       modifying the FunnelWeb code.
  934. X%
  935. X% The user is warned that these definitions may be changed from time to time
  936. X% (but probably not much). The user should not be too sneaky. In particular,
  937. X% users wishing to redefine some of these macros should do so in an explicitly
  938. X% defined section at the top of their input file. This will mean that in the
  939. X% event of problems, that section can simply be deleted or commented out to
  940. X% allow the document to at least be typeset in the default format. Users should
  941. X% limit themselves to redefining these macros in such a section and should
  942. X% refrain from using the macros throughout their documents.
  943. X
  944. X
  945. X% Environment Parameters
  946. X% ----------------------
  947. X% \tolerance tells TeX how tolerant it should be about making bad line and
  948. X% page breaks. Here we set it to it's maximum, as
  949. X%   1) Computer programs are likely to cause lots of bad breaks.
  950. X%   2) In most cases the user would probably rather get the TeX file through
  951. X%      TeX without any errors than fiddle with spacings for perfection.
  952. X\tolerance=10000
  953. X
  954. X% I don't like indentation as it makes the page look more busy. Instead,
  955. X% paragraphs are separated by a little space (see next).
  956. X\parindent=0pt
  957. X
  958. X% In many cases, users will produce documents with long runs of paragraphs.
  959. X% In order to space out these paragraphs, it is convenient to maintain a
  960. X% prevailing non-zero \parskip (end-of-paragaph skip). The only trouble is
  961. X% that the skip becomes a problem in macro definitions which require no skip
  962. X% and so we have to turn the skip on and off. The following two macros
  963. X% simplify this process.
  964. X\def\fwparskipon{\parskip=\medskipamount}
  965. X\def\fwparskipoff{\parskip=0pt}
  966. X\fwparskipon
  967. X
  968. X% Setting raggedbottom allows TeX to leave a bit of space at the bottom of the
  969. X% page in order to better vertically align the rest of the page (e.g. skips
  970. X% won't stretch as much). It also means that headings are less likely to be
  971. X% isolated at the bottom of the page without any following text.
  972. X\raggedbottom
  973. X
  974. X
  975. X% Fonts
  976. X% -----
  977. X% Most of the typeset output is set in 10pt roman and 10pt tt font.
  978. X% The major extra font needs spring from titles and headings.
  979. X% For portability's sake we use only the following fonts:
  980. X%    cmr10
  981. X%    cmbx10
  982. X%    cmtt10
  983. X% and some enlargements of them. These fonts are all "standard" fonts
  984. X% in Plain TeX. See The TeXbook p.350.
  985. X\font\fwfontnote=cmr7
  986. X
  987. X\font\fwfontnorm=cmr10
  988. X\font\fwfontnorma=cmr10 scaled \magstep1
  989. X\font\fwfontnormb=cmr10 scaled \magstep2
  990. X
  991. X\font\fwfontbold=cmbx10
  992. X\font\fwfontbolda=cmbx10 scaled \magstep1
  993. X\font\fwfontboldb=cmbx10 scaled \magstep2
  994. X\font\fwfontboldc=cmbx10 scaled \magstep3
  995. X\font\fwfontboldd=cmbx10 scaled \magstep4
  996. X
  997. X
  998. X% Macros for Stylistic Details
  999. X% ----------------------------
  1000. X% This section contains all the fiddly little macros for setting the details
  1001. X% of each macro definition.
  1002. X
  1003. X% Macro definitions are sandwiched by calls to these macros which can be used
  1004. X% to sort out the spacing before and after the macro definition.
  1005. X\def\fwbeginmacro{\fwparskipoff\bigskip}
  1006. X\def\fwendmacro{\fwparskipon\par}
  1007. X
  1008. X% These macros deal with the macro name and definition line.
  1009. X\def\fwmacroname#1#2{{\sl #1\/}$\lbrack$#2$\rbrack$}
  1010. X\def\fwfilename#1#2{{\bf #1}$\lbrack$#2$\rbrack$}
  1011. X\def\fwzero#1{{\bf Z}}
  1012. X\def\fwmany#1{{\bf M}}
  1013. X\def\fwequals{ $\equiv$}
  1014. X\def\fwplusequals{ $+\equiv$}
  1015. X
  1016. X% Now for the actual body of the definition. It looks nice to have the tt
  1017. X% code indented a little. Again, we use macros instead of writing direct TeX,
  1018. X% so as to allow the user to fiddle this stuff to taste without having to
  1019. X% modify the FunnelWeb C code.
  1020. X\def\fwodef{\parindent=15pt\vskip0pt$\lbrace$\parindent=20pt}
  1021. X\def\fwcdef{$\rbrace$\vskip0pt\parindent=0pt}
  1022. X\def\fwoquote{`}
  1023. X\def\fwcquote{'}
  1024. X\def\fwoparen{$($}
  1025. X\def\fwcomma{$,$}
  1026. X\def\fwcparen{$)$}
  1027. X\def\fwparam#1{$\diamond #1$}
  1028. X\def\fwparams#1{$(\diamond #1)$}
  1029. X
  1030. X% These macros deal with the notes that are appended at the end of each
  1031. X% macro definition. Note that even though \fwisafile,\fwusedin, and \fwseealso
  1032. X% have the same definition, they are given different names so as to allow the
  1033. X% user to redefine these macros to typeset each kind of information differently
  1034. X% if desired.
  1035. X\def\fwbeginmacronotes{\begingroup\baselineskip=9pt\smallskip}
  1036. X\def\fwnote#1{{\fwfontnote #1}\par}
  1037. X\def\fwisafile#1{\fwnote{#1}}
  1038. X\def\fwusedin#1{\fwnote{#1}}
  1039. X\def\fwseealso#1{\fwnote{#1}}
  1040. X\def\fwendmacronotes{\endgroup}
  1041. X
  1042. X
  1043. X% Macros to Typeset Program Code Verbatim
  1044. X% ---------------------------------------
  1045. X% This is by far the hairiest and most difficult part of the typesetting task
  1046. X% because we have to turn off most of TeX's natural instincts in order to
  1047. X% typeset the program text exactly as it appears in the input file.
  1048. X% Two macros are defined to pull this off: \fwbtx and \fwverbatimgobble.
  1049. X% Their code was inspired by the following sections of "The TeXbook":
  1050. X%    Appendix D: Dirty Tricks, 3.Verbatim listing, p.380-382.
  1051. X%    Appendix E: Example Formats, p.421.
  1052. X% The \fwbtx[ (for "FunnelWeb Begin TeXt") macro does most of the hard work.
  1053. X% The liberal use of "%" is because I don't understand TeX well enough to
  1054. X% understand when an end of line will cause trouble, and I am playing it safe.
  1055. X
  1056. X% Before defining the main \fwbtx macro, we have to stash away some definitions
  1057. X% in the hidden part of TeX's environment. Let's hope that these "hidden"
  1058. X% definitions don't affect anything except what is desired to be affected.
  1059. X
  1060. X% The tt font in which we wish to set the text has two Latin lurking ligatures!
  1061. X% These are ?` and !`. To disable them, we define the left quote when ACTIVE
  1062. X% to be defined in such a way as to prevent ligatures. The main TeX text will
  1063. X% normally not be exposed to this definition because normally the leftquote
  1064. X% character is not active. The \fwbtx macro temporarily makes the left quote
  1065. X% character active thus activating the deactivation of left quote ligatures.
  1066. X% See The TeXbook p.381.
  1067. X{\catcode`\`=\active \gdef`{\relax\lq}}
  1068. X
  1069. X% TeX is fairly carefree about spaces and so we have to make it more serious.
  1070. X% To do so we pull the same trick as above, setting up a definition for active
  1071. X% space, but only making space active during the span of the verbatim text.
  1072. X% In Plain TeX the active space is defined to be simply a space, but here we
  1073. X% define it to be a control space. This ensures that the space cannot
  1074. X% be gobbled up by one of TeX's mysterious mechanisms when activated.
  1075. X% See The TeXbook, p.381 and p.352.
  1076. X{\obeyspaces\global\let =\ }
  1077. X
  1078. X% Here is the main \fwbtx verbatim text macro.
  1079. X% Note: The order in which all these pieces of business have to be done is
  1080. X% still a partial mystery to me. Don't fiddle with this stuff unless you
  1081. X% think you know what you are doing.
  1082. X\def\fwbtx[{%
  1083. X%
  1084. X% The funnies involved in getting verbatim output are safely housed inside
  1085. X% this \begingroup, and the \endgroup in \fwverbatimgobble. Groups are used
  1086. X% instead of curly braces because we have to be able to signal the end of
  1087. X% this macro with a curly brace.
  1088. X\begingroup%
  1089. X%
  1090. X% \pars at the end of empty lines in the verbatim text won't come out normally
  1091. X% because TeX is in vertical mode and they get gobbled up. To prevent this,
  1092. X% we force \par to exit vertical mode first. See The TeXbook p.381.
  1093. X\def\par{\leavevmode\endgraf}%
  1094. X%
  1095. X% Activate the leftquote character so as to avoid ligatures (see above).
  1096. X\catcode`\`=\active%
  1097. X%
  1098. X% The \obeylines macro simply defines end of line (^M) to be \par. This ensures
  1099. X% that TeX will treat each verbatim line as a new paragraph.
  1100. X\obeylines%
  1101. X%
  1102. X% To get verbatim output, we have to desex all the special characters. This
  1103. X% is explained in detail in The TeXbook p.380.
  1104. X\def\do##1{\catcode`##1=12 }\dospecials%
  1105. X%
  1106. X% Activate the space character so as to make TeX treat blanks seriously.
  1107. X% This activation invokes an eralier definition (see above).
  1108. X\obeyspaces
  1109. X%
  1110. X% Interparagraph skips do not help the cause.
  1111. X% Note: We have to preserve the indentation though, as the code is actually
  1112. X% indented in the final output. See \fwodef in an earlier section.
  1113. X\parskip=0pt%
  1114. X%
  1115. X% We typeset the verbatim text in tt font (courier on the Macintosh) for a
  1116. X% number of reasons:
  1117. X%    - tt font has the same horizontal spacing for each character.
  1118. X%    - tt font covers the ASCII character set.
  1119. X%    - tt font doesn't have many surprises (e.g. ligatures).
  1120. X%    - tt font looks much what you might see on a computer terminal screen.
  1121. X\tt%
  1122. X%
  1123. X% Having set up an environment for verbatim, we are ready to use it.
  1124. X% By invoking \fwverbatimgobble, this \fwbtx macro gobbles up text verbatim (as
  1125. X% part of the parameter of \fwverbatimgobble) until it sees the termination
  1126. X% string "]fwetx=" (the "=" was thrown in to add obscurity as this sequence
  1127. X% must never occur in the verbatim text).
  1128. X\fwverbatimgobble}
  1129. X
  1130. X% The \fwverbatimgobble macro exists to allow \fwbtx to bracket verbatim text.
  1131. X\def\fwverbatimgobble#1]fwetx={#1\endgroup}
  1132. X
  1133. X
  1134. X% Table of Contents
  1135. X% -----------------
  1136. X% The five levels of table of contents that FunnelWeb supports are identified
  1137. X% by the five letters [A..E]. These are used throughout the following macros.
  1138. X
  1139. X% The following macros are utilities to the TOC macros to follow.
  1140. X\def\fwrule{\medskip\hrule\medskip}
  1141. X\def\fwqh{\hskip1.5em\relax}
  1142. X\def\fwbeforesec{\penalty-200\bigskip\medskip\par}
  1143. X
  1144. X% The following macros are used to typeset the table of contents.
  1145. X\def\fwtocstart#1{\fwrule\leftline{\fwfontbolda Table of Contents}\fwrule}
  1146. X\def\fwtoca#1#2{\leftline{{\bf #1 #2}}}
  1147. X\def\fwtocb#1#2{\leftline{\fwqh #1 #2}}
  1148. X\def\fwtocc#1#2{\leftline{\fwqh\fwqh #1 #2}}
  1149. X\def\fwtocd#1#2{\leftline{\fwqh\fwqh\fwqh #1 #2}}
  1150. X\def\fwtoce#1#2{\leftline{\fwqh\fwqh\fwqh\fwqh #1 #2}}
  1151. X\def\fwtocfinish#1{\fwrule}
  1152. X
  1153. X% The following "library" macros define five different strengths of headings
  1154. X% which can be used later in the section macros.
  1155. X\def\fwliba#1#2{\vfill\eject{\fwfontboldc #1 #2}\penalty200\smallskip}
  1156. X\def\fwlibb#1#2{\fwbeforesec{\fwfontboldb #1 #2}\penalty200\smallskip}
  1157. X\def\fwlibc#1#2{\fwbeforesec{\fwfontnormb #1 #2}\penalty200\smallskip}
  1158. X\def\fwlibd#1#2{\fwbeforesec{\bf          #1 #2}\penalty200}
  1159. X\def\fwlibe#1#2{\fwbeforesec{\bf          #1 #2}}
  1160. X
  1161. X% Here are the macros that actually typeset the section headings throughout
  1162. X% the document. The fwlib system has been employed so as to easily allow the
  1163. X% user to redefine the strengths of headings to taste. For example, the
  1164. X% user could insert in the input document a similar set of definitions to these
  1165. X% but with the b..e headings set to \fwlibc. This would tone down the output.
  1166. X\def\fwseca#1#2{\fwliba{#1}{#2}}
  1167. X\def\fwsecb#1#2{\fwlibb{#1}{#2}}
  1168. X\def\fwsecc#1#2{\fwlibc{#1}{#2}}
  1169. X\def\fwsecd#1#2{\fwlibd{#1}{#2}}
  1170. X\def\fwsece#1#2{\fwlibe{#1}{#2}}
  1171. X
  1172. X
  1173. X% Support for Explicit Typesetting
  1174. X% --------------------------------
  1175. X% FunnelWeb supports pragmas and other constructs that allow
  1176. X% typesetter-independent typesetting commands to be given. The
  1177. X% following macros support these features.
  1178. X
  1179. X% The in-text literal @{sloth@} and emphasise @[walrus@] features.
  1180. X\def\fwlit#1{{\tt #1}}
  1181. X\def\fwemp#1{{\it #1}}
  1182. X
  1183. X% The "@p new_page" pragma.
  1184. X\def\fwnewpage{\vfill\eject}
  1185. X
  1186. X% The "@p vskip Nmm" pragma.
  1187. X\def\fwvskip#1{\null\vskip #1mm}
  1188. X
  1189. X% The "@p title <font> <align> <text>" pragma.
  1190. X\def\fwfontnormal#1{{\fwfontnorm {#1}}}
  1191. X\def\fwfonttitle#1{{\fwfontboldd {#1}}}
  1192. X\def\fwfontsmalltitle#1{{\fwfontboldb {#1}}}
  1193. X\def\fwleftline#1{\leftline{#1}}
  1194. X\def\fwcenterline#1{\centerline{#1}}
  1195. X\def\fwrightline#1{\rightline{#1}}
  1196. X
  1197. X
  1198. X% Support for Old FunnelWeb
  1199. X% -------------------------
  1200. X% The following macros were used extensively in the first version of
  1201. X% FunnelWeb and are retained so that these older input files will still
  1202. X% typeset cleanly.
  1203. X\def\p#1{{\tt #1}}  % P for Program text.
  1204. X\def\flagpage#1#2{
  1205. X   \null
  1206. X   \vfill
  1207. X   \centerline{\fwfontboldd #1}
  1208. X   \vskip 1cm
  1209. X   \centerline{\fwfontboldd #2}
  1210. X   \vfill
  1211. X   \null
  1212. X   \vfill
  1213. X}
  1214. X
  1215. X%====================== End of FunnelWeb TeX Definitions =======================
  1216. WV05: Test processing of ugly strings as ordinary and protected text
  1217. with no typesetter set.
  1218. X
  1219. X\fwbeginmacro
  1220. X\fwfilename{wv05.out}{1}\fwequals \fwodef \fwcdef 
  1221. X\fwbeginmacronotes
  1222. X\fwisafile{This macro is attached to an output file.}
  1223. X\fwendmacronotes
  1224. X\fwendmacro
  1225. X
  1226. X
  1227. A paragraph in ordinary mode.
  1228. X
  1229. X33 con!text
  1230. X34 con\char`\"text
  1231. X35 con\#text
  1232. X36 con\$text
  1233. X37 con\%text
  1234. X38 con\&text
  1235. X39 con'text
  1236. X40 con(text
  1237. X41 con)text
  1238. X42 con*text
  1239. X43 con+text
  1240. X44 con,text
  1241. X45 con-text
  1242. X46 con.text
  1243. X47 con/text
  1244. X48-57 con0123456789text
  1245. X58 con:text
  1246. X59 con;text
  1247. X60 con$<$text
  1248. X61 con=text
  1249. X62 con$>$text
  1250. X63 con?text
  1251. X64 con@text
  1252. X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
  1253. X91 con[text
  1254. X92 con$\backslash$text
  1255. X93 con]text
  1256. X94 con\char`\^text
  1257. X95 con\_text
  1258. X96 con`text
  1259. X97-122 conabcdefghijklmnopqrstuvwxyztext
  1260. X123 con$\{$text
  1261. X124 con$|$text
  1262. X125 con$\}$text
  1263. X126 con\char`\~text
  1264. X
  1265. Now again, but this time inside protective braces.
  1266. X
  1267. X\fwlit{
  1268. X33 con!text
  1269. X34 con\char`\"text
  1270. X35 con\#text
  1271. X36 con\$text
  1272. X37 con\%text
  1273. X38 con\&text
  1274. X39 con'text
  1275. X40 con(text
  1276. X41 con)text
  1277. X42 con*text
  1278. X43 con+text
  1279. X44 con,text
  1280. X45 con-text
  1281. X46 con.text
  1282. X47 con/text
  1283. X48-57 con0123456789text
  1284. X58 con:text
  1285. X59 con;text
  1286. X60 con\char`\<text
  1287. X61 con=text
  1288. X62 con\char`\>text
  1289. X63 con?text
  1290. X64 con@text
  1291. X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
  1292. X91 con[text
  1293. X92 con\char`\\text
  1294. X93 con]text
  1295. X94 con\char`\^text
  1296. X95 con\_text
  1297. X96 con`text
  1298. X97-122 conabcdefghijklmnopqrstuvwxyztext
  1299. X123 con\char`\{text
  1300. X124 con\char`\|text
  1301. X125 con\char`\}text
  1302. X126 con\char`\~text
  1303. X}
  1304. X\bye
  1305. X
  1306. X
  1307. X%*******************************************************************************
  1308. X%*                    END OF AUTOMATICALLY GENERATED TEX FILE                  *
  1309. X%*******************************************************************************
  1310. X
  1311. END_OF_FILE
  1312. if test 16706 -ne `wc -c <'answers/wv05.tex'`; then
  1313.     echo shar: \"'answers/wv05.tex'\" unpacked with wrong size!
  1314. fi
  1315. # end of 'answers/wv05.tex'
  1316. fi
  1317. if test -f 'answers/wv06.tex' -a "${1}" != "-c" ; then 
  1318.   echo shar: Will not clobber existing file \"'answers/wv06.tex'\"
  1319. else
  1320. echo shar: Extracting \"'answers/wv06.tex'\" \(16657 characters\)
  1321. sed "s/^X//" >'answers/wv06.tex' <<'END_OF_FILE'
  1322. X
  1323. X%*******************************************************************************
  1324. X%*                    START OF AUTOMATICALLY GENERATED TEX FILE                *
  1325. X%*******************************************************************************
  1326. X%*                                                                             *
  1327. X%* This TeX file was automatically generated by the FunnelWeb preprocessor.    *
  1328. X%* You can typeset this file to produce printed documentation by running it    *
  1329. X%* through the TeX typesetter using a command such as:                         *
  1330. X%*    tex thisfilename                                                         *
  1331. X%* The resultant file thisfilename.dvi can be printed using a command such as: *
  1332. X%*    lpr -Pcslw -d thisfilename.dvi                                           *
  1333. X%*                                                                             *
  1334. X%* FunnelWeb is a preprocessor that allows programmers to weave programs and   *
  1335. X%* their documentation together in a single document. The FunnelWeb program    *
  1336. X%* analyses such documents producing both program files and typeset            *
  1337. X%* documentation such as this TeX file.                                        *
  1338. X%* FunnelWeb was created by Ross Williams.                                     *
  1339. X%*                                                                             *
  1340. X%* For more information on FunnelWeb look in the following FTP archive:        *
  1341. X%*    Machine  : sirius.itd.adelaide.edu.au [IP=129.127.40.3].                 *
  1342. X%*    Directory: ~pub/funnelweb/                                               *
  1343. X%*               (or some other appropriately named directory).                *
  1344. X%* or email Ross Williams at ross@spam.adelaide.edu.au                         *
  1345. X%*                                                                             *
  1346. X%*******************************************************************************
  1347. X
  1348. X
  1349. X%===================== Start of FunnelWeb TeX Definitions ======================
  1350. X
  1351. X
  1352. X% Version
  1353. X% -------
  1354. X% This is FunnelWeb TeX Macro Library Version 1.0.
  1355. X
  1356. X
  1357. X% Copyright
  1358. X% ---------
  1359. X% This set of FunnelWeb TeX definitions was written by Ross Williams and was
  1360. X% originally Copyright (C) 1992 Ross N. Williams.  However, I, Ross Williams,
  1361. X% hereby forego any claim to Copyright in this set of FunnelWeb TeX definitions
  1362. X% and hereby authorize that the set of TeX definitions pass into the public
  1363. X% domain. -- Ross N. Williams, 3:41pm 07-May-1992, Adelaide, Australia.
  1364. X
  1365. X
  1366. X% Modification
  1367. X% ------------
  1368. X% Please record all modifications to these TeX definitions here. Unless
  1369. X% otherwise specified, all modified definitions fall in the public domain too.
  1370. X%
  1371. X% Programmers:
  1372. X%    RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1373. X%
  1374. X% Changes:
  1375. X%    07-May-1992  RNW  Prepared this work for public domain release.
  1376. X%
  1377. X
  1378. X
  1379. X% General Comments
  1380. X% ----------------
  1381. X% This set of TeX definitions exists for two reasons:
  1382. X%
  1383. X%    1. To shorten and neaten the FunnelWeb TeX output.
  1384. X%    2. To allow users to fiddle with the output format in their input files
  1385. X%       (by inserting redefining "\def"s) without having to resort to
  1386. X%       modifying the FunnelWeb code.
  1387. X%
  1388. X% The user is warned that these definitions may be changed from time to time
  1389. X% (but probably not much). The user should not be too sneaky. In particular,
  1390. X% users wishing to redefine some of these macros should do so in an explicitly
  1391. X% defined section at the top of their input file. This will mean that in the
  1392. X% event of problems, that section can simply be deleted or commented out to
  1393. X% allow the document to at least be typeset in the default format. Users should
  1394. X% limit themselves to redefining these macros in such a section and should
  1395. X% refrain from using the macros throughout their documents.
  1396. X
  1397. X
  1398. X% Environment Parameters
  1399. X% ----------------------
  1400. X% \tolerance tells TeX how tolerant it should be about making bad line and
  1401. X% page breaks. Here we set it to it's maximum, as
  1402. X%   1) Computer programs are likely to cause lots of bad breaks.
  1403. X%   2) In most cases the user would probably rather get the TeX file through
  1404. X%      TeX without any errors than fiddle with spacings for perfection.
  1405. X\tolerance=10000
  1406. X
  1407. X% I don't like indentation as it makes the page look more busy. Instead,
  1408. X% paragraphs are separated by a little space (see next).
  1409. X\parindent=0pt
  1410. X
  1411. X% In many cases, users will produce documents with long runs of paragraphs.
  1412. X% In order to space out these paragraphs, it is convenient to maintain a
  1413. X% prevailing non-zero \parskip (end-of-paragaph skip). The only trouble is
  1414. X% that the skip becomes a problem in macro definitions which require no skip
  1415. X% and so we have to turn the skip on and off. The following two macros
  1416. X% simplify this process.
  1417. X\def\fwparskipon{\parskip=\medskipamount}
  1418. X\def\fwparskipoff{\parskip=0pt}
  1419. X\fwparskipon
  1420. X
  1421. X% Setting raggedbottom allows TeX to leave a bit of space at the bottom of the
  1422. X% page in order to better vertically align the rest of the page (e.g. skips
  1423. X% won't stretch as much). It also means that headings are less likely to be
  1424. X% isolated at the bottom of the page without any following text.
  1425. X\raggedbottom
  1426. X
  1427. X
  1428. X% Fonts
  1429. X% -----
  1430. X% Most of the typeset output is set in 10pt roman and 10pt tt font.
  1431. X% The major extra font needs spring from titles and headings.
  1432. X% For portability's sake we use only the following fonts:
  1433. X%    cmr10
  1434. X%    cmbx10
  1435. X%    cmtt10
  1436. X% and some enlargements of them. These fonts are all "standard" fonts
  1437. X% in Plain TeX. See The TeXbook p.350.
  1438. X\font\fwfontnote=cmr7
  1439. X
  1440. X\font\fwfontnorm=cmr10
  1441. X\font\fwfontnorma=cmr10 scaled \magstep1
  1442. X\font\fwfontnormb=cmr10 scaled \magstep2
  1443. X
  1444. X\font\fwfontbold=cmbx10
  1445. X\font\fwfontbolda=cmbx10 scaled \magstep1
  1446. X\font\fwfontboldb=cmbx10 scaled \magstep2
  1447. X\font\fwfontboldc=cmbx10 scaled \magstep3
  1448. X\font\fwfontboldd=cmbx10 scaled \magstep4
  1449. X
  1450. X
  1451. X% Macros for Stylistic Details
  1452. X% ----------------------------
  1453. X% This section contains all the fiddly little macros for setting the details
  1454. X% of each macro definition.
  1455. X
  1456. X% Macro definitions are sandwiched by calls to these macros which can be used
  1457. X% to sort out the spacing before and after the macro definition.
  1458. X\def\fwbeginmacro{\fwparskipoff\bigskip}
  1459. X\def\fwendmacro{\fwparskipon\par}
  1460. X
  1461. X% These macros deal with the macro name and definition line.
  1462. X\def\fwmacroname#1#2{{\sl #1\/}$\lbrack$#2$\rbrack$}
  1463. X\def\fwfilename#1#2{{\bf #1}$\lbrack$#2$\rbrack$}
  1464. X\def\fwzero#1{{\bf Z}}
  1465. X\def\fwmany#1{{\bf M}}
  1466. X\def\fwequals{ $\equiv$}
  1467. X\def\fwplusequals{ $+\equiv$}
  1468. X
  1469. X% Now for the actual body of the definition. It looks nice to have the tt
  1470. X% code indented a little. Again, we use macros instead of writing direct TeX,
  1471. X% so as to allow the user to fiddle this stuff to taste without having to
  1472. X% modify the FunnelWeb C code.
  1473. X\def\fwodef{\parindent=15pt\vskip0pt$\lbrace$\parindent=20pt}
  1474. X\def\fwcdef{$\rbrace$\vskip0pt\parindent=0pt}
  1475. X\def\fwoquote{`}
  1476. X\def\fwcquote{'}
  1477. X\def\fwoparen{$($}
  1478. X\def\fwcomma{$,$}
  1479. X\def\fwcparen{$)$}
  1480. X\def\fwparam#1{$\diamond #1$}
  1481. X\def\fwparams#1{$(\diamond #1)$}
  1482. X
  1483. X% These macros deal with the notes that are appended at the end of each
  1484. X% macro definition. Note that even though \fwisafile,\fwusedin, and \fwseealso
  1485. X% have the same definition, they are given different names so as to allow the
  1486. X% user to redefine these macros to typeset each kind of information differently
  1487. X% if desired.
  1488. X\def\fwbeginmacronotes{\begingroup\baselineskip=9pt\smallskip}
  1489. X\def\fwnote#1{{\fwfontnote #1}\par}
  1490. X\def\fwisafile#1{\fwnote{#1}}
  1491. X\def\fwusedin#1{\fwnote{#1}}
  1492. X\def\fwseealso#1{\fwnote{#1}}
  1493. X\def\fwendmacronotes{\endgroup}
  1494. X
  1495. X
  1496. X% Macros to Typeset Program Code Verbatim
  1497. X% ---------------------------------------
  1498. X% This is by far the hairiest and most difficult part of the typesetting task
  1499. X% because we have to turn off most of TeX's natural instincts in order to
  1500. X% typeset the program text exactly as it appears in the input file.
  1501. X% Two macros are defined to pull this off: \fwbtx and \fwverbatimgobble.
  1502. X% Their code was inspired by the following sections of "The TeXbook":
  1503. X%    Appendix D: Dirty Tricks, 3.Verbatim listing, p.380-382.
  1504. X%    Appendix E: Example Formats, p.421.
  1505. X% The \fwbtx[ (for "FunnelWeb Begin TeXt") macro does most of the hard work.
  1506. X% The liberal use of "%" is because I don't understand TeX well enough to
  1507. X% understand when an end of line will cause trouble, and I am playing it safe.
  1508. X
  1509. X% Before defining the main \fwbtx macro, we have to stash away some definitions
  1510. X% in the hidden part of TeX's environment. Let's hope that these "hidden"
  1511. X% definitions don't affect anything except what is desired to be affected.
  1512. X
  1513. X% The tt font in which we wish to set the text has two Latin lurking ligatures!
  1514. X% These are ?` and !`. To disable them, we define the left quote when ACTIVE
  1515. X% to be defined in such a way as to prevent ligatures. The main TeX text will
  1516. X% normally not be exposed to this definition because normally the leftquote
  1517. X% character is not active. The \fwbtx macro temporarily makes the left quote
  1518. X% character active thus activating the deactivation of left quote ligatures.
  1519. X% See The TeXbook p.381.
  1520. X{\catcode`\`=\active \gdef`{\relax\lq}}
  1521. X
  1522. X% TeX is fairly carefree about spaces and so we have to make it more serious.
  1523. X% To do so we pull the same trick as above, setting up a definition for active
  1524. X% space, but only making space active during the span of the verbatim text.
  1525. X% In Plain TeX the active space is defined to be simply a space, but here we
  1526. X% define it to be a control space. This ensures that the space cannot
  1527. X% be gobbled up by one of TeX's mysterious mechanisms when activated.
  1528. X% See The TeXbook, p.381 and p.352.
  1529. X{\obeyspaces\global\let =\ }
  1530. X
  1531. X% Here is the main \fwbtx verbatim text macro.
  1532. X% Note: The order in which all these pieces of business have to be done is
  1533. X% still a partial mystery to me. Don't fiddle with this stuff unless you
  1534. X% think you know what you are doing.
  1535. X\def\fwbtx[{%
  1536. X%
  1537. X% The funnies involved in getting verbatim output are safely housed inside
  1538. X% this \begingroup, and the \endgroup in \fwverbatimgobble. Groups are used
  1539. X% instead of curly braces because we have to be able to signal the end of
  1540. X% this macro with a curly brace.
  1541. X\begingroup%
  1542. X%
  1543. X% \pars at the end of empty lines in the verbatim text won't come out normally
  1544. X% because TeX is in vertical mode and they get gobbled up. To prevent this,
  1545. X% we force \par to exit vertical mode first. See The TeXbook p.381.
  1546. X\def\par{\leavevmode\endgraf}%
  1547. X%
  1548. X% Activate the leftquote character so as to avoid ligatures (see above).
  1549. X\catcode`\`=\active%
  1550. X%
  1551. X% The \obeylines macro simply defines end of line (^M) to be \par. This ensures
  1552. X% that TeX will treat each verbatim line as a new paragraph.
  1553. X\obeylines%
  1554. X%
  1555. X% To get verbatim output, we have to desex all the special characters. This
  1556. X% is explained in detail in The TeXbook p.380.
  1557. X\def\do##1{\catcode`##1=12 }\dospecials%
  1558. X%
  1559. X% Activate the space character so as to make TeX treat blanks seriously.
  1560. X% This activation invokes an eralier definition (see above).
  1561. X\obeyspaces
  1562. X%
  1563. X% Interparagraph skips do not help the cause.
  1564. X% Note: We have to preserve the indentation though, as the code is actually
  1565. X% indented in the final output. See \fwodef in an earlier section.
  1566. X\parskip=0pt%
  1567. X%
  1568. X% We typeset the verbatim text in tt font (courier on the Macintosh) for a
  1569. X% number of reasons:
  1570. X%    - tt font has the same horizontal spacing for each character.
  1571. X%    - tt font covers the ASCII character set.
  1572. X%    - tt font doesn't have many surprises (e.g. ligatures).
  1573. X%    - tt font looks much what you might see on a computer terminal screen.
  1574. X\tt%
  1575. X%
  1576. X% Having set up an environment for verbatim, we are ready to use it.
  1577. X% By invoking \fwverbatimgobble, this \fwbtx macro gobbles up text verbatim (as
  1578. X% part of the parameter of \fwverbatimgobble) until it sees the termination
  1579. X% string "]fwetx=" (the "=" was thrown in to add obscurity as this sequence
  1580. X% must never occur in the verbatim text).
  1581. X\fwverbatimgobble}
  1582. X
  1583. X% The \fwverbatimgobble macro exists to allow \fwbtx to bracket verbatim text.
  1584. X\def\fwverbatimgobble#1]fwetx={#1\endgroup}
  1585. X
  1586. X
  1587. X% Table of Contents
  1588. X% -----------------
  1589. X% The five levels of table of contents that FunnelWeb supports are identified
  1590. X% by the five letters [A..E]. These are used throughout the following macros.
  1591. X
  1592. X% The following macros are utilities to the TOC macros to follow.
  1593. X\def\fwrule{\medskip\hrule\medskip}
  1594. X\def\fwqh{\hskip1.5em\relax}
  1595. X\def\fwbeforesec{\penalty-200\bigskip\medskip\par}
  1596. X
  1597. X% The following macros are used to typeset the table of contents.
  1598. X\def\fwtocstart#1{\fwrule\leftline{\fwfontbolda Table of Contents}\fwrule}
  1599. X\def\fwtoca#1#2{\leftline{{\bf #1 #2}}}
  1600. X\def\fwtocb#1#2{\leftline{\fwqh #1 #2}}
  1601. X\def\fwtocc#1#2{\leftline{\fwqh\fwqh #1 #2}}
  1602. X\def\fwtocd#1#2{\leftline{\fwqh\fwqh\fwqh #1 #2}}
  1603. X\def\fwtoce#1#2{\leftline{\fwqh\fwqh\fwqh\fwqh #1 #2}}
  1604. X\def\fwtocfinish#1{\fwrule}
  1605. X
  1606. X% The following "library" macros define five different strengths of headings
  1607. X% which can be used later in the section macros.
  1608. X\def\fwliba#1#2{\vfill\eject{\fwfontboldc #1 #2}\penalty200\smallskip}
  1609. X\def\fwlibb#1#2{\fwbeforesec{\fwfontboldb #1 #2}\penalty200\smallskip}
  1610. X\def\fwlibc#1#2{\fwbeforesec{\fwfontnormb #1 #2}\penalty200\smallskip}
  1611. X\def\fwlibd#1#2{\fwbeforesec{\bf          #1 #2}\penalty200}
  1612. X\def\fwlibe#1#2{\fwbeforesec{\bf          #1 #2}}
  1613. X
  1614. X% Here are the macros that actually typeset the section headings throughout
  1615. X% the document. The fwlib system has been employed so as to easily allow the
  1616. X% user to redefine the strengths of headings to taste. For example, the
  1617. X% user could insert in the input document a similar set of definitions to these
  1618. X% but with the b..e headings set to \fwlibc. This would tone down the output.
  1619. X\def\fwseca#1#2{\fwliba{#1}{#2}}
  1620. X\def\fwsecb#1#2{\fwlibb{#1}{#2}}
  1621. X\def\fwsecc#1#2{\fwlibc{#1}{#2}}
  1622. X\def\fwsecd#1#2{\fwlibd{#1}{#2}}
  1623. X\def\fwsece#1#2{\fwlibe{#1}{#2}}
  1624. X
  1625. X
  1626. X% Support for Explicit Typesetting
  1627. X% --------------------------------
  1628. X% FunnelWeb supports pragmas and other constructs that allow
  1629. X% typesetter-independent typesetting commands to be given. The
  1630. X% following macros support these features.
  1631. X
  1632. X% The in-text literal @{sloth@} and emphasise @[walrus@] features.
  1633. X\def\fwlit#1{{\tt #1}}
  1634. X\def\fwemp#1{{\it #1}}
  1635. X
  1636. X% The "@p new_page" pragma.
  1637. X\def\fwnewpage{\vfill\eject}
  1638. X
  1639. X% The "@p vskip Nmm" pragma.
  1640. X\def\fwvskip#1{\null\vskip #1mm}
  1641. X
  1642. X% The "@p title <font> <align> <text>" pragma.
  1643. X\def\fwfontnormal#1{{\fwfontnorm {#1}}}
  1644. X\def\fwfonttitle#1{{\fwfontboldd {#1}}}
  1645. X\def\fwfontsmalltitle#1{{\fwfontboldb {#1}}}
  1646. X\def\fwleftline#1{\leftline{#1}}
  1647. X\def\fwcenterline#1{\centerline{#1}}
  1648. X\def\fwrightline#1{\rightline{#1}}
  1649. X
  1650. X
  1651. X% Support for Old FunnelWeb
  1652. X% -------------------------
  1653. X% The following macros were used extensively in the first version of
  1654. X% FunnelWeb and are retained so that these older input files will still
  1655. X% typeset cleanly.
  1656. X\def\p#1{{\tt #1}}  % P for Program text.
  1657. X\def\flagpage#1#2{
  1658. X   \null
  1659. X   \vfill
  1660. X   \centerline{\fwfontboldd #1}
  1661. X   \vskip 1cm
  1662. X   \centerline{\fwfontboldd #2}
  1663. X   \vfill
  1664. X   \null
  1665. X   \vfill
  1666. X}
  1667. X
  1668. X%====================== End of FunnelWeb TeX Definitions =======================
  1669. WV06: Test processing of ugly strings as ordinary and protected text
  1670. with typesetter = tex.
  1671. X
  1672. X
  1673. X\fwbeginmacro
  1674. X\fwfilename{wv06.out}{1}\fwequals \fwodef \fwcdef 
  1675. X\fwbeginmacronotes
  1676. X\fwisafile{This macro is attached to an output file.}
  1677. X\fwendmacronotes
  1678. X\fwendmacro
  1679. X
  1680. X
  1681. A paragraph in ordinary mode.
  1682. X
  1683. X33 con!text
  1684. X34 con"text
  1685. X35 con#text
  1686. X36 con$text
  1687. X37 con%text
  1688. X38 con&text
  1689. X39 con'text
  1690. X40 con(text
  1691. X41 con)text
  1692. X42 con*text
  1693. X43 con+text
  1694. X44 con,text
  1695. X45 con-text
  1696. X46 con.text
  1697. X47 con/text
  1698. X48-57 con0123456789text
  1699. X58 con:text
  1700. X59 con;text
  1701. X60 con<text
  1702. X61 con=text
  1703. X62 con>text
  1704. X63 con?text
  1705. X64 con@text
  1706. X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
  1707. X91 con[text
  1708. X92 con\text
  1709. X93 con]text
  1710. X94 con^text
  1711. X95 con_text
  1712. X96 con`text
  1713. X97-122 conabcdefghijklmnopqrstuvwxyztext
  1714. X123 con{text
  1715. X124 con|text
  1716. X125 con}text
  1717. X126 con~text
  1718. X
  1719. Now again, but this time inside protective braces.
  1720. X
  1721. X\fwlit{
  1722. X33 con!text
  1723. X34 con\char`\"text
  1724. X35 con\#text
  1725. X36 con\$text
  1726. X37 con\%text
  1727. X38 con\&text
  1728. X39 con'text
  1729. X40 con(text
  1730. X41 con)text
  1731. X42 con*text
  1732. X43 con+text
  1733. X44 con,text
  1734. X45 con-text
  1735. X46 con.text
  1736. X47 con/text
  1737. X48-57 con0123456789text
  1738. X58 con:text
  1739. X59 con;text
  1740. X60 con\char`\<text
  1741. X61 con=text
  1742. X62 con\char`\>text
  1743. X63 con?text
  1744. X64 con@text
  1745. X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
  1746. X91 con[text
  1747. X92 con\char`\\text
  1748. X93 con]text
  1749. X94 con\char`\^text
  1750. X95 con\_text
  1751. X96 con`text
  1752. X97-122 conabcdefghijklmnopqrstuvwxyztext
  1753. X123 con\char`\{text
  1754. X124 con\char`\|text
  1755. X125 con\char`\}text
  1756. X126 con\char`\~text
  1757. X}
  1758. X\bye
  1759. X
  1760. X
  1761. X%*******************************************************************************
  1762. X%*                    END OF AUTOMATICALLY GENERATED TEX FILE                  *
  1763. X%*******************************************************************************
  1764. X
  1765. END_OF_FILE
  1766. if test 16657 -ne `wc -c <'answers/wv06.tex'`; then
  1767.     echo shar: \"'answers/wv06.tex'\" unpacked with wrong size!
  1768. fi
  1769. # end of 'answers/wv06.tex'
  1770. fi
  1771. if test -f 'sources/mapper.c' -a "${1}" != "-c" ; then 
  1772.   echo shar: Will not clobber existing file \"'sources/mapper.c'\"
  1773. else
  1774. echo shar: Extracting \"'sources/mapper.c'\" \(17032 characters\)
  1775. sed "s/^X//" >'sources/mapper.c' <<'END_OF_FILE'
  1776. X/*##############################################################################
  1777. X
  1778. XFUNNNELWEB COPYRIGHT
  1779. X====================
  1780. XFunnelWeb is a literate-programming macro preprocessor.
  1781. X
  1782. Copyright (C) 1992 Ross N. Williams.
  1783. X
  1784. X   Ross N. Williams
  1785. X   ross@spam.adelaide.edu.au
  1786. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1787. X
  1788. This program is free software; you can redistribute it and/or modify
  1789. it under the terms of Version 2 of the GNU General Public License as
  1790. published by the Free Software Foundation.
  1791. X
  1792. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  1793. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1794. See Version 2 of the GNU General Public License for more details.
  1795. X
  1796. You should have received a copy of Version 2 of the GNU General Public
  1797. License along with this program. If not, you can FTP the license from
  1798. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  1799. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1800. X
  1801. Section 2a of the license requires that all changes to this file be
  1802. recorded prominently in this file. Please record all changes here.
  1803. X
  1804. Programmers:
  1805. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1806. X
  1807. Changes:
  1808. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  1809. X
  1810. X##############################################################################*/
  1811. X
  1812. X
  1813. X/******************************************************************************/
  1814. X/*                                   MAPPER.C                                 */
  1815. X/******************************************************************************/
  1816. X
  1817. X#include <limits.h>
  1818. X#include "style.h"
  1819. X
  1820. X#include "as.h"
  1821. X#include "machin.h"
  1822. X#include "mapper.h"
  1823. X#include "memory.h"
  1824. X
  1825. X/******************************************************************************/
  1826. X
  1827. X/* When we allocate a block of memory for a mapped file, we have to allocate  */
  1828. X/* a little more than the official length of the file. Here are some reasons: */
  1829. X/*                                                                            */
  1830. X/*    - We may wish to append an EOF character later on in the program.       */
  1831. X/*    - fgets, when requested to fetch n characters, fetches n characters and */
  1832. X/*      then puts an EOS on the end of them.                                  */
  1833. X/*    - It is conceivable that fgets will insert a "\n" at the end of the     */
  1834. X/*      block if it doesn't see a "\n" just before the end of file.           */
  1835. X/*                                                                            */
  1836. X/* For all these reasons, we allocate a little more memory than we need. How  */
  1837. X/* much more is determined by BLK_FUDGE which is set to be on the safe side.  */
  1838. X#define BLK_FUDGE (20)
  1839. X
  1840. X/* The following fudge is useful for avoiding the limits of types.            */
  1841. X#define LIM_FUDGE (10)
  1842. X
  1843. X/* On PCs, size_t is 16 bits and malloc cannot allocate contiguous chunks of  */
  1844. X/* memory of more than about 64K. This really stuffs up FunnelWeb's capacity  */
  1845. X/* map in files of length greater than 64K. I didn't think of this problem    */
  1846. X/* when I designed FunnelWeb because I was thinking of the VOLUME of memory   */
  1847. X/* available nowadays, rather than its organization on small computers.       */
  1848. X/* Anyway, this problem should really be fixed by allowing files to be read   */
  1849. X/* in in segments. Perhaps the mapper should hand over a linked list of       */
  1850. X/* chunks rather than a single chunk. Unfortunately, I don't have the time to */
  1851. X/* do this now, so users of the PC version of FunnelWeb will have to be       */
  1852. X/* content with an (approx) 64K limit to input files. This isn't as bad as it */
  1853. X/* sounds, as large input files can be split using the include facility.      */
  1854. X/* 63K is chosen instead of 64K so as to be paranoid.                         */
  1855. X#define PCFILEMX  (63L*1024L)
  1856. X
  1857. X/******************************************************************************/
  1858. X/*                                                                            */
  1859. X/* Error Strings                                                              */
  1860. X/* -------------                                                              */
  1861. X/* Routines in this package return pointers to error strings. These pointers  */
  1862. X/* are subsequently bandied about by other packages. Therefore, they must be  */
  1863. X/* pointers to constant strings. The trick of returning a pointer to a static */
  1864. X/* character array containing a specific sprintf message will backfire here   */
  1865. X/* if there is an error opening more than one input file. Using mm_* to       */
  1866. X/* create space for each error string would work though.                      */
  1867. X/* STOP PRESS: Now that the lister copies error messages, there may no longer */
  1868. X/* be a problem here.                                                         */
  1869. X/*                                                                            */
  1870. X/******************************************************************************/
  1871. X
  1872. X/* Finding The Length of a File                                               */
  1873. X/* ----------------------------                                               */
  1874. X/* We have to be able to find out the length of a file before reading it in   */
  1875. X/* because, in this version of FunnelWeb, the entire file must be read into   */
  1876. X/* one contiguous block of memory.                                            */
  1877. X/*                                                                            */
  1878. X/* As it turns out, finding the length of a file in portable C turns out to   */
  1879. X/* be a very hard problem. Here are some possible solutions:                  */
  1880. X/*                                                                            */
  1881. X/*    1. Read the entire file in and see how long it is.                      */
  1882. X/*    2. Use fseek to move to the end of the file and then use ftell.         */
  1883. X/*    3. Use the Unix 'stat' call.                                            */
  1884. X/*                                                                            */
  1885. X/* Of these, only the first is portable. The second alternative is            */
  1886. X/* non-portable because some environments do not support the SEEK_END symbol  */
  1887. X/* required to perform a seek to the end of file.                             */
  1888. X/* Alternatives to needing the length are as follows:                         */
  1889. X/*                                                                            */
  1890. X/*    4. Read the file/allocate memory in 64K blocks.                         */
  1891. X/*    5. Read the file in 64K blocks and then copy them to a contiguous one.  */
  1892. X/*                                                                            */
  1893. X/* Perhaps options 4 or 5 could be implemented later. However, right now I    */
  1894. X/* haven't got the time to do anything except strive for portability, so      */
  1895. X/* option 1 it is.                                                            */
  1896. X
  1897. LOCAL char *file_len P_((char *,ulong *));
  1898. LOCAL char *file_len (p_name,p_length)
  1899. X/* Given a filename (in 'p_name'), returns the length of the binary image of  */
  1900. X/* the file in *p_length. Returns NULL upon success or a pointer to a string  */
  1901. X/* describing an error upon failure. The length is measured in bytes.         */
  1902. char  *p_name;
  1903. ulong *p_length;
  1904. X{
  1905. X FILE *infile;
  1906. X STAVAR char *p_buf = NULL;
  1907. X/* The length of the buffer handed to fgets is non-critical. However, it      */
  1908. X/* mustn't be bigger than 15 bits, as we are passing it as an int to fgets.   */
  1909. X#define LENBUFLEN (1024L)
  1910. X#if LENBUFLEN > 30000L
  1911. X   #error "mapper.c: LENBUFLEN must be less than 15 bits."
  1912. X#endif
  1913. X
  1914. X /* Allocate the buffer if it has not already been allocated. */
  1915. X if (p_buf == NULL)
  1916. X    p_buf=mm_perm((size_t) LENBUFLEN);
  1917. X
  1918. X /* Open for TEXT reading. Earlier, I tried this using a binary read, but     */
  1919. X /* I had problems with this on the VAX (I forget what the problems were) and */
  1920. X /* so I have switched back to a text read which is slower, but more reliable.*/
  1921. X infile=fopen(p_name,"r");
  1922. X if (infile == FOPEN_F)
  1923. X    return "Error fopen()ing input file (to determine its length).";
  1924. X
  1925. X /* Start with a zero length. */
  1926. X *p_length=0;
  1927. X
  1928. X /* Read the file as text and count the number of bytes it contains. */
  1929. X while (!feof(infile))
  1930. X   {
  1931. X    /* Set the buffer to the empty string so it is valid even if fgets fails. */
  1932. X    p_buf[0]=EOS;
  1933. X    
  1934. X    /* Read in a whole lot of bytes. */
  1935. X    fgets(p_buf,LENBUFLEN,infile);
  1936. X    
  1937. X    /* If there is an error, abort. */
  1938. X    if (ferror(infile))
  1939. X      {
  1940. X       fclose(infile);
  1941. X       return "Error fgets()ing input file (as part of determining its length).";
  1942. X      }
  1943. X      
  1944. X    /* Count the bytes that we have got. If EOF occurred above AND no bytes   */
  1945. X    /* were read, the EOS we planted earlier saves us.                        */
  1946. X    (*p_length)+=strlen(p_buf);
  1947. X   }
  1948. X
  1949. X if (fclose(infile) == FCLOSE_F)
  1950. X    return "Error fclose()ing input file (as part of determining its length).";
  1951. X
  1952. X return NULL;
  1953. X}
  1954. X
  1955. X/******************************************************************************/
  1956. X
  1957. X#if PC & UNIX_EOL
  1958. X   #error Attempt to use unix_map function on a PC!
  1959. X#endif
  1960. X
  1961. X#if UNIX_EOL
  1962. LOCAL char *unix_map P_((char *,char **,ulong *));
  1963. LOCAL char *unix_map(p_name,pp_mem,p_length)
  1964. X/* If we know that the enclosing environment represents text files in UNIX    */
  1965. X/* form, then there is no need to process the file on the way in. All we need */
  1966. X/* to do is map it directly into memory. This will be very fast.              */
  1967. char   *p_name;
  1968. char  **pp_mem;
  1969. ulong  *p_length;
  1970. X{
  1971. X ulong  file_length;  /* Number of bytes in the target input file.            */
  1972. X char  *p_err;        /* Temporary to store pointer to error message.         */
  1973. X FILE  *infile;       /* The file variable for the input file we are reading. */
  1974. X ulong  num_bytes;    /* Number of bytes actually read in (may be different). */
  1975. X char  *p_bytes;      /* Pointer to the memory block where all the action is. */
  1976. X
  1977. X /* Obtain the length of the file we are about to map in. */
  1978. X p_err=file_len(p_name,&file_length);
  1979. X if (p_err != NULL)
  1980. X    return p_err;
  1981. X /* Allocate memory to hold the mapped file.                                  */
  1982. X /* Note: The memory allocation package bombs if there is no more memory.     */
  1983. X p_bytes=(char *) mm_temp((size_t) file_length+BLK_FUDGE);
  1984. X
  1985. X /* Open the file in BINARY mode. */
  1986. X infile=fopen(p_name,"rb");
  1987. X if (infile==FOPEN_F)
  1988. X    return "Error fopen()ing the input file (binary open).";
  1989. X
  1990. X /* Read in the file and complain if we haven't read in enough bytes. */
  1991. X num_bytes=fread(p_bytes,(size_t) 1L,(size_t) file_length,infile);
  1992. X if (num_bytes != file_length)
  1993. X    return "Error fread()ing the input file.";
  1994. X
  1995. X if (fclose(infile) == FCLOSE_F)
  1996. X    return "Error fclose()ing the input file.";
  1997. X
  1998. X /* Success. We got through the IO calls. Now fill in the blanks and go home. */
  1999. X *pp_mem   =p_bytes;
  2000. X *p_length =num_bytes;
  2001. X return NULL;
  2002. X}
  2003. X#endif
  2004. X
  2005. X/******************************************************************************/
  2006. X
  2007. X#if !UNIX_EOL
  2008. LOCAL char *stan_map P_((char *,char **,ulong *));
  2009. LOCAL char *stan_map(p_name,pp_mem,p_length)
  2010. X/* Maps in a file using refined text stream IO calls. */
  2011. char   *p_name;
  2012. char  **pp_mem;
  2013. ulong  *p_length;
  2014. X{
  2015. X ulong  file_length;  /* Number of bytes in the target input file.            */
  2016. X char  *p_err;        /* Temporary to store pointer to error message.         */
  2017. X FILE  *infile;       /* The file variable for the input file we are reading. */
  2018. X ulong  num_bytes;    /* Number of bytes actually read in (may be different). */
  2019. X char  *p_bytes;      /* Pointer to the memory block where all the action is. */
  2020. X char  *p_curr;       /* Pointer to current position in memory block.         */
  2021. X long  bytes_left;    /* Number of bytes still left to read.                  */
  2022. X
  2023. X /* Obtain the length of the file we are about to map in. */
  2024. X p_err=file_len(p_name,&file_length);
  2025. X if (p_err != NULL)
  2026. X    return p_err;
  2027. X
  2028. X /* Complain on the PC if the file is too big to fit in one 64K segment. */
  2029. X#if PC
  2030. X if (file_length+BLK_FUDGE > PCFILEMX)
  2031. X    return
  2032. X      "Error: Input file too big for PC FunnelWeb. Split using include files.";
  2033. X#endif
  2034. X
  2035. X /* TRACE printf("MAPPER: LENGTH OF INPUT FILE=%lu\n",file_length); */
  2036. X /* Allocate memory to hold the mapped file.                                  */
  2037. X /* Note: The memory allocation package bombs if there is no more memory.     */
  2038. X /* Note: As Unix stream format (the format to which we are converting) uses  */
  2039. X /*       just one byte to mark the end of file, it seems highly unlikely     */
  2040. X /*       that the file read in will be longer than the binary image.         */
  2041. X p_bytes=(char *) mm_temp((size_t) file_length+BLK_FUDGE);
  2042. X
  2043. X /* If the file is of zero length, we already know its contents!              */
  2044. X /* This is probably not strictly necessary, but why pressure the code below? */
  2045. X if (file_length==0)
  2046. X   {
  2047. X    *pp_mem   = p_bytes;
  2048. X    *p_length = 0;
  2049. X    return NULL;
  2050. X   }
  2051. X
  2052. X /* Open the file afresh in TEXT mode for portable reading. */
  2053. X infile=fopen(p_name,"r");
  2054. X if (infile==FOPEN_F)
  2055. X    return "Error fopen()ing input file (for reading).";
  2056. X
  2057. X /* Read in as much of the file as we can without actually overflowing the    */
  2058. X /* buffer. If the file finished before the buffer, things have probably gone */
  2059. X /* OK. If the buffer finishes before the file, we have a problem.            */
  2060. X /* Note: bytes_left = file_length+1 because in the following loop, we might  */
  2061. X /* read exactly up to the EOF and then be unable to actually trigger the EOF */
  2062. X /* condition without another read. So we add one on to allow this extra read */
  2063. X /* to take place. I don't know if this is necessary, but I certainly can't   */
  2064. X /* find anything in all my C books that will tell me. Anyway, it doesn't     */
  2065. X /* matter because we fudged in a few extra bytes earlier.                    */
  2066. X
  2067. X p_curr     = p_bytes;        /* p_curr runs through the memory.              */
  2068. X bytes_left = file_length+1;  /* Bytes left in memory allocated to hold file. */
  2069. X while (!feof(infile))
  2070. X   {
  2071. X    int bytes_try;
  2072. X    int bytes_read;
  2073. X    
  2074. X    /* Try to read as much as we possibly can, but not more than the integer  */
  2075. X    /* limit (which can be as low as 15 bits).                                */
  2076. X    bytes_try = bytes_left >= ((ulong) (INT_MAX-LIM_FUDGE)) ?
  2077. X                  (int) INT_MAX-LIM_FUDGE : (int) bytes_left;
  2078. X    
  2079. X    /* Plan an EOS to cover the EOF case. */
  2080. X    *p_curr=EOS;
  2081. X    
  2082. X    /* Attempt to read bytes_try bytes. +1 is because fgets reads n-1 bytes.  */
  2083. X    fgets(p_curr,bytes_try+1,infile);
  2084. X    if (ferror(infile))
  2085. X      {
  2086. X       fclose(infile);
  2087. X       return "Error fgets()ing the input file.";
  2088. X      }
  2089. X      
  2090. X    /* fgets doesn't return a length so we have to hobble behind with strlen. */
  2091. X    /* It's still probably better than using lots of fgetc calls.             */
  2092. X    /* If we hit EOF and no bytes were read, the EOS we planted saves us.     */
  2093. X    bytes_read  = strlen(p_curr);
  2094. X    p_curr     += bytes_read;
  2095. X    bytes_left -= bytes_read;
  2096. X
  2097. X    /* If we have run out of bytes in our allocated memory zone, then the     */
  2098. X    /* file is longer than the length reported earlier. This is a bad thing.  */
  2099. X    as_cold(bytes_left >=0,
  2100. X            "stan_map: Text representation was longer than binary rep.");
  2101. X   }
  2102. X   
  2103. X num_bytes=(file_length+1)-bytes_left; /* See earlier to undserstand +1.      */
  2104. X /* Note: We can't get fussy here and check the read in length with the       */
  2105. X /* official length, as the read-in length is the text representation which   */
  2106. X /* is allowed to be shorter than the physical (binary) length of the file.   */
  2107. X
  2108. X if (fclose(infile) == FCLOSE_F)
  2109. X    return "Error fclose()ing input file.";
  2110. X
  2111. X /* Success. We got through the IO calls. Now fill in the blanks and go home. */
  2112. X *pp_mem   = p_bytes;
  2113. X *p_length = num_bytes;
  2114. X return NULL;
  2115. X}
  2116. X#endif
  2117. X
  2118. X/******************************************************************************/
  2119. X
  2120. XEXPORT char *map_file(p_name,pp_mem,p_length)
  2121. char   *p_name;
  2122. char  **pp_mem;
  2123. ulong  *p_length;
  2124. X{
  2125. X /* We choose one of two mapper routines depending on where the operating     */
  2126. X /* system represents text files using EOL (\n) as end of line markers.       */
  2127. X /* The UNIX_EOL symbol is defined in the machin.h file.                      */
  2128. X /* Note: I thought of using sprintf to test to see what "\n" translated into */
  2129. X /* so I wouldn't need the UNIXEOL symbol. However, unlike printf (which it   */
  2130. X /* is supposed to be like), sprintf does not translate "\n" into its outside */
  2131. X /* form. The only other alternative is writing a short text file and reading */
  2132. X /* it back in binary - an action that would probably take longer than        */
  2133. X /* reading the original file to be read using fgetc()!                       */
  2134. X
  2135. X#if UNIX_EOL
  2136. X   return unix_map(p_name,pp_mem,p_length);
  2137. X#else
  2138. X   return stan_map(p_name,pp_mem,p_length);
  2139. X#endif
  2140. X}
  2141. X
  2142. X/******************************************************************************/
  2143. X/*                               End of MAPPER.C                              */
  2144. X/******************************************************************************/
  2145. X
  2146. END_OF_FILE
  2147. if test 17032 -ne `wc -c <'sources/mapper.c'`; then
  2148.     echo shar: \"'sources/mapper.c'\" unpacked with wrong size!
  2149. fi
  2150. # end of 'sources/mapper.c'
  2151. fi
  2152. if test -f 'userman/u_ch4.tex' -a "${1}" != "-c" ; then 
  2153.   echo shar: Will not clobber existing file \"'userman/u_ch4.tex'\"
  2154. else
  2155. echo shar: Extracting \"'userman/u_ch4.tex'\" \(17359 characters\)
  2156. sed "s/^X//" >'userman/u_ch4.tex' <<'END_OF_FILE'
  2157. X%==============================================================================%
  2158. X%                              Start of Ch4.tex                                %
  2159. X%==============================================================================%
  2160. X%
  2161. X% Copyright
  2162. X% ---------
  2163. X% Copyright (C) 1992 Ross N. Williams.
  2164. X% This file contains a chapter of the FunnelWeb User's Manual.
  2165. X% See the main TeX file for this manual for further information.
  2166. X%
  2167. X%==============================================================================%
  2168. X
  2169. X\chapter{FunnelWeb Installation}
  2170. X\label{chapinstall}\xx{FunnelWeb}{installation}
  2171. X
  2172. This chapter describes how to obtain, compile, and install FunnelWeb.
  2173. You will need:
  2174. X
  2175. X\begin{itemize}
  2176. X
  2177. X\item FTP access to the internet \i{or} a FunnelWeb distribution kit on disk.
  2178. X
  2179. X\item A Sun, VMS VAX, Macintosh, or PC \i{or} lots of extra time to port
  2180. XFunnelWeb to a new platform.
  2181. X
  2182. X\item About four megabytes of free disk space. You might be able to
  2183. install it with less, but four megabytes is safe. The distribution kit itself
  2184. is about two and a half megabytes.
  2185. If you are short on space, you can throw away everything after installation
  2186. except the binary executable which will consume about half a megabyte.
  2187. X
  2188. X\item A C compiler.
  2189. X
  2190. X\item An acquaintance with the C programming language and the ability to
  2191. compile and link C programs on your machine.
  2192. X
  2193. X\item Elementary systems programming knowledege for your machine.
  2194. X
  2195. X\item About an hour.
  2196. X
  2197. X\end{itemize}
  2198. X
  2199. You will \i{not} need any sort of system privileges to install FunnelWeb,
  2200. unless you want the FunnelWeb command \p{fw} to be automatically available
  2201. to everyone on your machine as well as yourself.
  2202. X
  2203. X\section{Obtaining a Copy of FunnelWeb}
  2204. X\xx{FunnelWeb}{obtaining}\xx{ftp}{anonymous}
  2205. X
  2206. The simplest way to obtain a copy of FunnelWeb is by anonymous FTP from:
  2207. X
  2208. X\begin{verbatim}
  2209. X   Machine   : sirius.itd.adelaide.edu.au [IP=129.127.40.3].
  2210. X   Directory : ~pub/funnelweb/   (or a directory of similar name).
  2211. X\end{verbatim}
  2212. X
  2213. It is not clear at the time of writing whether FunnelWeb will be presented
  2214. as a \dqp{.tar} file, or as a directory tree,
  2215. or both. Just sniff around and use
  2216. your common sense. Two points deserve attention however:
  2217. X
  2218. X\begin{enumerate}
  2219. X
  2220. X\item Be sure to use the \i{text} transfer mode whenever you transfer
  2221. raw FunnelWeb files. However, you should use \i{binary} mode for TAR files
  2222. and other conglomerate representations.
  2223. X
  2224. X\item If you have to transfer the files individually,
  2225. don't lump all the FunnelWeb files into a single directory. Refer to
  2226. the sections that follow for information on the directory tree you should
  2227. create to receive the FunnelWeb files.
  2228. X
  2229. X\end{enumerate}
  2230. X
  2231. If anonymous FTP is not available to you, contact the author
  2232. for up-to-date information on other channels of distribution.
  2233. X
  2234. X\begin{verbatim}
  2235. X   Name:  Dr Ross N. Williams
  2236. X   Email: ross@spam.adelaide.edu.au
  2237. X   Snail: 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2238. X\end{verbatim}
  2239. X
  2240. X\section{Establishing The Directory Tree}
  2241. X\xx{directory}{tree}
  2242. X
  2243. At this stage,
  2244. we will assume that you have somehow obtained a set of files that
  2245. are supposed to be FunnelWeb, and that they are sitting on a disk
  2246. on the machine on which you wish to compile and install
  2247. XFunnelWeb.
  2248. X
  2249. The first thing you have to do is to make sure that
  2250. the FunnelWeb directory tree has been correctly unpacked. The directory
  2251. tree should look like this.
  2252. X
  2253. X\begin{verbatim}
  2254. X   fwdir       - Root FunnelWeb directory.
  2255. X      admin    - Administrative files.
  2256. X      answers  - Answers to test suite.
  2257. X      hackman  - FunnelWeb Hacker's Manual.
  2258. X      results  - For test results.
  2259. X      scripts  - Test scripts.
  2260. X      sources  - Source code.
  2261. X      tests    - Test suite.
  2262. X      userman  - FunnelWeb User's Manual.
  2263. X\end{verbatim}
  2264. X
  2265. The following sections describe the contents of each directory in
  2266. alphabetical order. Check the
  2267. contents to make sure that you have everything. Do not become fussed if
  2268. your configuration is not quite as specified as
  2269. it is very easy for
  2270. installation guides such as this one to go out
  2271. of date as minor last minute changes and updates
  2272. are made to the distribution kit. Check the source from which you obtained
  2273. the kit, and if it is different too, proceed.
  2274. X
  2275. X\subsection{Admin Directory}
  2276. X\xx{admin}{directory}
  2277. X
  2278. The \p{admin} directory contains administrative files to do with licensing
  2279. and such. It is also a catch-all directory for files that don't belong
  2280. anywhere else. At the time of writing, it is not clear
  2281. exactly what will be in the \p{admin} directory. Why not take a look?
  2282. X
  2283. X\subsection{Answers Directory}
  2284. X\xx{answers}{directory}
  2285. X
  2286. The \p{answers} directory contains the
  2287. X\dq{correct answers}\xx{correct}{answers}
  2288. to all the regression testing input files. The regression test scripts
  2289. compare these files to the files generated in the \p{results} directory.
  2290. X
  2291. X\begin{verbatim}
  2292. an01.lis ... an04.lis
  2293. ex01.lis ... ex16.lis
  2294. ex01.out ... ex10.out
  2295. ex11.tex ... ex16.tex
  2296. generate.lis
  2297. hi01.lis ... hi10.lis
  2298. hi01.out ... hi05.out
  2299. hi06a.out
  2300. hi06b.out
  2301. hi07a.out
  2302. hi07b.out
  2303. hi08.out ... hi10.out
  2304. pr01.lis ... pr10.lis
  2305. sc01.lis ... sc29.lis
  2306. tg01.lis ... tg09.lis
  2307. tg01.out ... tg09.out
  2308. wv01.lis ... wv06.lis
  2309. wv01.tex ... wv06.tex
  2310. X\end{verbatim}
  2311. X
  2312. X\subsection{Hackman Directory}
  2313. X\xx{hackman}{directory}
  2314. X
  2315. The \p{hackman} directory contains the \p{.tex} files that make up the
  2316. X\i{FunnelWeb Hacker's Manual}.
  2317. X
  2318. X\begin{verbatim}
  2319. h_ch0.tex     - Preface, etc.
  2320. h_ch1.tex     - Design.
  2321. h_ch2.tex     - Implementation.
  2322. h_ch3.tex     - Modification.
  2323. h_ch4.tex     - Future.
  2324. h_cha.tex     - Appendices.
  2325. h_manual.tex  - Main TeX file.
  2326. X\end{verbatim}
  2327. X
  2328. See the comment at the top of \p{h\_manual.tex} file for
  2329. instructions on how to typeset and print the \i{FunnelWeb Hacker's Manual}.
  2330. X
  2331. There is no need to read or print the \i{FunnelWeb Hacker's Manual} unless you
  2332. intend to modify FunnelWeb.
  2333. X
  2334. X\subsection{Results Directory}
  2335. X\xx{results}{directory}
  2336. X
  2337. The \p{results} directory exists as a target directory for
  2338. the output files generated by FunnelWeb during regression testing.
  2339. This directory is distributed empty and
  2340. should be empty at the start of regression testing.
  2341. However, it is permissible for the \p{results} directory to
  2342. contain files generated
  2343. during a previous test run, as the regression testing scripts
  2344. delete specific unwanted files before each test anyway.
  2345. X
  2346. X\subsection{Scripts Directory}
  2347. X\xx{scripts}{directory}
  2348. X
  2349. The \p{scripts} directory stores the FunnelWeb command shell scripts that
  2350. are used to perform regression testing.\xx{regression}{testing}
  2351. X
  2352. X\begin{verbatim}
  2353. master.fws    - The master test script. This is the one you run.
  2354. test_gen.fws  - Script to generate certain tricky input files.
  2355. test_l.fws    - Test FunnelWeb with +L.
  2356. test_ld.fws   - Test FunnelWeb with +L +B...
  2357. test_lo.fws   - Test FunnelWeb with +L +O.
  2358. test_lo2.fws  - Test FunnelWeb with +L +O (two output files).
  2359. test_lot.fws  - Test FunnelWeb with +L +O +T.
  2360. test_lt.fws   - Test FunnelWeb with +L +T.
  2361. X\end{verbatim}
  2362. X
  2363. X\subsection{Sources Directory}
  2364. X\xx{sources}{directory}
  2365. X
  2366. The \p{sources} directory contains \i{all} of the C source files
  2367. required to build a FunnelWeb binary executable. In the following list,
  2368. files given without an extension represent both \p{.c} and \p{.h} files.
  2369. X
  2370. X\begin{verbatim}
  2371. analyse       - The analyser.
  2372. as            - Assertions.
  2373. clock         - A clock abstraction.
  2374. command       - The shell command interpreter.
  2375. data          - Shared data structures and global variables.
  2376. dump          - Functions to dump internal data structures.
  2377. environ.h     - Lightweight machine-dependent, program-independent header.
  2378. help          - Module to write out help messages.
  2379. help_gnu      - Function to write out the GNU license.
  2380. help_gnu.txt  - The GNU license in text form.
  2381. help_gnu.ctx  - The GNU license in C code form.
  2382. list          - A list abstraction.
  2383. lister        - Module to manage the listing file.
  2384. machin        - Module to hold machine-dependent, program-dependent stuff.
  2385. main.c        - The main() program.
  2386. mapper        - Module to read files into memory.
  2387. memory        - Memory management.
  2388. misc          - Miscellaneous functions.
  2389. option        - Command line option processing.
  2390. parser        - The parser.
  2391. scanner       - The scanner.
  2392. section       - A section number abstraction.
  2393. style.h       - A machine-independent, program-independent header file.
  2394. table         - A table abstraction.
  2395. tangle        - The tangler.
  2396. texhead       - Module to write out TeX header in documentation files.
  2397. texhead.ctx   - The TeX header in C code form.
  2398. texhead.tex   - The TeX header in TeX form.
  2399. weave         - The weaver.
  2400. writfile      - Output abstraction.
  2401. X\end{verbatim}
  2402. X
  2403. The \dqp{.txt}, and \dqp{.tex} files do not participate in the compilation,
  2404. but are considered part of the source code as they
  2405. were used to generate the \dqp{.ctx} files. The \dqp{.ctx} files
  2406. are included by \p{.c} files of the same name. They do not need to be
  2407. compiled themselves.
  2408. X
  2409. X\subsection{Tests Directory}
  2410. X\xx{tests}{directory}
  2411. X
  2412. The \p{tests} directory stores all the input files of the
  2413. regression test suite. These come in two kinds: FunnelWeb input
  2414. files with extensions of \dqp{.fw}, and FunnelWeb include files with
  2415. extensions of \dqp{.fwi}.
  2416. X
  2417. X\begin{verbatim}
  2418. XFunnelWeb Input Files:
  2419. X   an01.fw ... an04.fw    - Analyser tests.
  2420. X   ex01.fw ... ex16.fw    - Examples from the tutorial in user manual.
  2421. X   generate.fw            - Generates a few other tricky input files.
  2422. X   hi01.fw ... hi10.fw    - Examples from the hints chapter in user manual.
  2423. X   pr01.fw ... pr10.fw    - Parser tests.
  2424. X   sc01_note.fw           - A note explaining absence of sc01.fw
  2425. X   sc02.fw ... sc29.fw    - Scanner tests.
  2426. X   tg01.fw ... tg09.fw    - Tangler tests.
  2427. X   wv01.fw ... wv06.fw    - Weaver tests.
  2428. X
  2429. XFunnelWeb Include Files:
  2430. X   ex09a.fwi
  2431. X   sc13a.fwi ... sc13f.fwi
  2432. X   sc15a.fwi
  2433. X   tg08a.fwi
  2434. X\end{verbatim}
  2435. X
  2436. X\subsection{Userman Directory}
  2437. X\xx{userman}{directory}
  2438. X
  2439. The \p{userman} directory contains the \p{.tex} files that make up the
  2440. X\i{FunnelWeb User's Manual}.
  2441. X
  2442. X\begin{verbatim}
  2443. u_ch0.tex     - Preface, etc.
  2444. u_ch1.tex     - Tutorial.
  2445. u_ch2.tex     - Hints.
  2446. u_ch3.tex     - Definition.
  2447. u_ch4.tex     - Installation.
  2448. u_ch5.tex     - Administration.
  2449. u_cha.tex     - Appendices.
  2450. u_manual.tex  - Main TeX file.
  2451. X\end{verbatim}
  2452. X
  2453. See the comment at the top of \p{u\_manual.tex} file for
  2454. instructions on how to typeset and print the \i{FunnelWeb User's Manual}.
  2455. X
  2456. X\section{Compiling FunnelWeb}
  2457. X\xx{compiling}{FunnelWeb}
  2458. X
  2459. The FunnelWeb source code is entirely contained within the \p{sources}
  2460. directory. However, some simple
  2461. script files and makefiles can be found in the \p{admin} directory.
  2462. X
  2463. XFunnelWeb contains some machine-dependent components, so before compiling
  2464. XFunnelWeb, you need to specify your machine in the source file \p{environ.h}.
  2465. To do this,
  2466. edit the \p{environ.h} file and set exactly one of the machine name
  2467. X\p{\#define}s to \p{1}. For example, on the Sun you should set:
  2468. X
  2469. X\begin{verbatim}
  2470. X#define MAC 0
  2471. X#define SUN 1
  2472. X#define VMS 0
  2473. X#define PC  0
  2474. X\end{verbatim}
  2475. X
  2476. There should be little difficulty compiling FunnelWeb for any of these
  2477. platforms.
  2478. If the machine on which you are compiling FunnelWeb is not one of the ones
  2479. listed in the \p{environ.h} file, then choose the closest one you can.
  2480. Try the \p{SUN} if you are running a non-Sun Unix.
  2481. If you run into serious difficulties, you will have to
  2482. customize \p{machin.h} and \p{machin.c} for your machine.
  2483. See the comments in these files
  2484. for instructions on how to do this.
  2485. X
  2486. Once you have specified a target machine, compile FunnelWeb by pointing
  2487. your C compiler at all the
  2488. X\dqp{.c} files in the \p{sources} directory.
  2489. The \dqp{.txt}, and \dqp{.tex} files do not participate in the compilation,
  2490. but appear in the \p{sources} directory because they
  2491. were used to generate the \dqp{.ctx} files. The \dqp{.ctx} files
  2492. are included by \p{.c} files of the same name and do not need to be
  2493. compiled separately.
  2494. Link the results.
  2495. X
  2496. The result of all this should be a binary executable called
  2497. X\p{fw}, or \p{fw.exe},
  2498. or \p{fw.xxx} where \p{.xxx} is whatever file extension is
  2499. appropriate on the target machine. Clean up the
  2500. X\p{sources} directory by deleting all the listing and object files.
  2501. X
  2502. X\section{Testing FunnelWeb}
  2503. X\label{testingfunnelweb}\xx{testing}{FunnelWeb}
  2504. X
  2505. Once you have obtained a binary executable, you should test FunnelWeb
  2506. before making it available to users. To do this:
  2507. X
  2508. X\begin{enumerate}
  2509. X
  2510. X\item Set the default directory to be the \p{scripts} directory.
  2511. X
  2512. X\item Copy the FunnelWeb executable into the scripts directory (or
  2513. be able to invoke it from the scripts directory).
  2514. X
  2515. X\item Edit the script \p{master.fws}. Locate the section called
  2516. X\dq{Define Symbol For the Root Test Directory} and define the \p{R}
  2517. symbol to point to the FunnelWeb root directory \p{fwdir}. The examples
  2518. in the comments in the script should make it clear what is required.
  2519. X
  2520. X\item Invoke FunnelWeb to execute the master test script
  2521. with the command line \p{fw +xmaster}
  2522. X
  2523. X\end{enumerate}
  2524. X
  2525. The \p{master.fws} script should run for a few minutes. If all goes
  2526. well, you will find a differences report on your screen reporting
  2527. zero differences. If this happens, then FunnelWeb has been
  2528. fully tested and is ready to be made available to users. You should
  2529. delete all the files in the \p{results} directory and proceed to the next
  2530. section on installing FunnelWeb for users.
  2531. X
  2532. If there were
  2533. one or more differences, you can either give up and contact the author,
  2534. or attempt to fix the code yourself. If you decide to fix the code
  2535. yourself, start
  2536. with the differences log file and follow your nose. Good luck!
  2537. X
  2538. X\section{Installing FunnelWeb}
  2539. X\xx{installing}{FunnelWeb}
  2540. X
  2541. At this stage you should have a \p{fwdir} directory tree somewhere in your
  2542. file system. Its contents should be almost identical to the directory
  2543. contents specified earlier in this chapter except there should now be
  2544. an additional binary executable file sitting in the \p{scripts}
  2545. directory.
  2546. X
  2547. To make FunnelWeb available to users, you should:
  2548. X
  2549. X\begin{enumerate}
  2550. X
  2551. X\item Make the entire directory tree readable to all users.
  2552. X
  2553. X\item Move the binary executable from the scripts directory to the
  2554. X\p{admin} directory \i{or} copy it to somewhere convenient such as
  2555. a \p{/bin} directory.
  2556. X
  2557. X\item Set up a symbol, path, or command of some kind by the name of \p{fw}
  2558. that \dq{points} to the binary executable. If possible, set this up so
  2559. that the \p{fw} symbol is available to all users. Alternatively,
  2560. you can inform interested users of how they can add a command to their
  2561. X\p{login} command file to make the command available to them.
  2562. X
  2563. X\end{enumerate}
  2564. X
  2565. If you are short of disk space or have a system that is stressed in some other
  2566. way, it may be of assistance to you to know that
  2567. XFunnelWeb has been constructed so that its
  2568. binary executable\xx{FunnelWeb}{executable} is
  2569. X\i{totally self contained}. The binary executable does not rely on any
  2570. other files to operate. Nor does it care about its position in the file system.
  2571. In fact, all that is really required to use FunnelWeb is the binary
  2572. executable and the \i{FunnelWeb User's Manual}. Thus, if you are short
  2573. of disk space, you can move the binary executable to your \dqp{/bin}
  2574. directory and delete the entire FunnelWeb tree.  However, making the
  2575. tree available to users is encouraged because:
  2576. X
  2577. X\begin{itemize}
  2578. X
  2579. X\item It allows users to copy the tree and install it on another machine
  2580. without bothering you.
  2581. X
  2582. X\item It allows users access to the \TeX{} code for the \i{FunnelWeb
  2583. User's Manual} and the \i{FunnelWeb Hacker's Manual}.
  2584. X
  2585. X\item It allows users access to the regression test suite. This may not
  2586. seem important, but it could be very convenient for the user as the
  2587. X\p{ex*} and \p{hi*} files of the regression test suite contain most
  2588. of the examples from the \i{FunnelWeb User's Manual}. By making them available
  2589. you will save users the trouble of typing them in.
  2590. X
  2591. X\end{itemize}
  2592. X
  2593. XFinally, you should fill in and send off a FunnelWeb registration form.
  2594. This allows me to get a handle on the size and needs of the user base, and you
  2595. to be kept informed of new FunnelWeb releases (optional).
  2596. See Section~\ref{registration} for more information.
  2597. X
  2598. X\section{Printing Manuals}
  2599. X\xx{printing}{manuals}
  2600. X
  2601. XFunnelWeb comes with two manuals, a \i{FunnelWeb User's Manual} and a
  2602. X\i{FunnelWeb Hacker's Manual}. Instructions for how to
  2603. typeset and print these manuals appear at the top of
  2604. the main \TeX{} files for these manuals
  2605. X\p{u\_manual.tex} and \p{h\_manual.tex}.
  2606. X
  2607. There is no need to print the \i{FunnelWeb Hacker's Manual} unless you
  2608. intend to modify FunnelWeb. However, you should make a few copies of the
  2609. X\i{FunnelWeb User's Manual} available for users, or at least
  2610. let them know where the \TeX{} source for the \i{FunnelWeb User's Manual}
  2611. is kept so that they can typeset and print it themselves.
  2612. X
  2613. X\section{Installation Problems?}
  2614. X\xx{problems}{installation}
  2615. X
  2616. If you run into any problems installing FunnelWeb, please write a short
  2617. report describing the problem and mail it to the author Ross Williams
  2618. X(\p{ross@spam.adelaide.edu.au}). I may not be able to help you with it
  2619. immediately, but I certainly want to know that a problem exists so that
  2620. it can be corrected in future releases of FunnelWeb.
  2621. X
  2622. X%==============================================================================%
  2623. X%                               End of Ch4.tex                                 %
  2624. X%==============================================================================%
  2625. END_OF_FILE
  2626. if test 17359 -ne `wc -c <'userman/u_ch4.tex'`; then
  2627.     echo shar: \"'userman/u_ch4.tex'\" unpacked with wrong size!
  2628. fi
  2629. # end of 'userman/u_ch4.tex'
  2630. fi
  2631. if test -f 'userman/u_ch5.tex' -a "${1}" != "-c" ; then 
  2632.   echo shar: Will not clobber existing file \"'userman/u_ch5.tex'\"
  2633. else
  2634. echo shar: Extracting \"'userman/u_ch5.tex'\" \(17146 characters\)
  2635. sed "s/^X//" >'userman/u_ch5.tex' <<'END_OF_FILE'
  2636. X%==============================================================================%
  2637. X%                                Start of Ch5.tex                              %
  2638. X%==============================================================================%
  2639. X%
  2640. X% Copyright
  2641. X% ---------
  2642. X% Copyright (C) 1992 Ross N. Williams.
  2643. X% This file contains a chapter of the FunnelWeb User's Manual.
  2644. X% See the main TeX file for this manual for further information.
  2645. X%
  2646. X%==============================================================================%
  2647. X
  2648. X\chapter{FunnelWeb Administration}
  2649. X\label{chapadministration}\xx{FunnelWeb}{administration}
  2650. X
  2651. X\section{Introduction}
  2652. X
  2653. Whether a computer program is useful depends not just on the functionality
  2654. provided by the program, but also on the totality of the culture
  2655. and services surrounding it such as license costs, the
  2656. quality of
  2657. documentation, presence of a standard and so on.
  2658. This chapter addresses these issues from a user perspective.
  2659. X
  2660. X\section{The User's Commitment To FunnelWeb}
  2661. X\xx{commitment}{FunnelWeb}
  2662. X
  2663. One of the problems that might prevent potential users from using FunnelWeb
  2664. is the level of commitment that it requires. As soon as the user starts
  2665. creating FunnelWeb \p{.fw} files, the user becomes dependent on the
  2666. XFunnelWeb program, as the files so created will become unmanageable if
  2667. the FunnelWeb program were to become unavailable for some reason.
  2668. There are a number of ways in which computer programs can become unavailable,
  2669. including operating system upgrades, copyright problems, inability to
  2670. fix bugs, or just the inability of the program to be ported to a new target
  2671. platform.
  2672. X
  2673. The fact
  2674. is that FunnelWeb defines an input language and that currently there is
  2675. only one implementation of the language. Users will only write programs
  2676. using that language if they feel comfortable about the availability of its
  2677. implementation.
  2678. X
  2679. I have been critically
  2680. aware of these issues throughout the development of FunnelWeb and have
  2681. taken every possible step to make FunnelWeb a solid base onto which to
  2682. build programs. The following points describe the actions I have taken.
  2683. X
  2684. X\narrowthing{GNU license:}{FunnelWeb's C source code
  2685. has been released under GNU General Public
  2686. License Version 2. This means that the source code to FunnelWeb will always
  2687. be available to anyone who wants it. The FunnelWeb program can never be
  2688. taken away from you.}
  2689. X
  2690. X\narrowthing{Portability:}{FunnelWeb has been designed and written to be
  2691. extremely portable. First, all FunnelWeb really does is read and write
  2692. text files. This makes it easy to make portable. Second,
  2693. XFunnelWeb is written in the C programming language\paper{ANSI}
  2694. with portability as
  2695. a major design goal. Third, FunnelWeb has already been ported to four
  2696. popular platforms: SunOS, VAX VMS, PC, and Macintosh and it should not prove
  2697. hard to move it to others. Fourth, FunnelWeb comes with a huge automated
  2698. regression test suite. This makes it easy to pinpoint problems when it
  2699. is moved to a new platform. Portability is important because, even if \i{you}
  2700. are not using FunnelWeb on some funny platform, you may want to send
  2701. a computer program written using FunnelWeb to someone who does.}
  2702. X
  2703. X\narrowthing{Quality:}{The FunnelWeb source code is high quality code.
  2704. Although it has not been formally developed under any particular coding
  2705. standard, it is well designed and documented. Design decisions have
  2706. not been taken lightly.}
  2707. X
  2708. X\narrowthing{Documentation:}{FunnelWeb is well documented by this manual
  2709. and by the \i{FunnelWeb Hacker's Manual}. This is important because it
  2710. means that if you want to send someone a program written using FunnelWeb,
  2711. you can simply point them to this manual rather than having to explain
  2712. it all yourself. It is also comforting for managers who are controlling
  2713. source code to know that the format in which the source code is written
  2714. is well-documented.}
  2715. X
  2716. X\narrowthing{Standardization:}{Users who create source files using FunnelWeb
  2717. are not only committing to the FunnelWeb program; they are also investing
  2718. in the FunnelWeb language. If FunnelWeb's language changes radically for
  2719. some reason, then this investment by users will be undermined. To protect
  2720. this investment, I intend to maintain an \dq{official} version of FunnelWeb
  2721. whose language will not change radically, at least not
  2722. in a non backward compatible manner.}
  2723. X
  2724. It is my hope that the combination of these factors will alleviate any
  2725. fears that users may have about committing their source files
  2726. to FunnelWeb.
  2727. X
  2728. X\section{Documentation}
  2729. X\xx{FunnelWeb}{documentation}
  2730. X
  2731. The following FunnelWeb documentation is available:
  2732. X
  2733. X\begin{verbatim}
  2734. X    "FunnelWeb User's   Manual": Tutorial, Hints, Reference Manual.
  2735. X    "FunnelWeb Hacker's Manual": Notes on Design and Implementation.
  2736. X\end{verbatim}
  2737. X
  2738. XEveryone involved with FunnelWeb should read the \i{FunnelWeb User's Manual}.
  2739. It contains everything you need to know about how to use FunnelWeb. In fact,
  2740. you are reading it now!
  2741. The \i{FunnelWeb Hacker's Manual}
  2742. is for those who want to install, modify, fix,
  2743. fiddle with, and generally hack the FunnelWeb C source code.
  2744. Both of these manuals are shipped with the FunnelWeb distribution
  2745. kit, and should be available on your machine in the form of LaTeX text
  2746. files. If you cannot find them, you can obtain them from the
  2747. XFunnelWeb FTP archive (see Section~\ref{ftparchive}).
  2748. X
  2749. X\section{Registration}
  2750. X\label{registration}\xx{FunnelWeb}{registration}
  2751. X
  2752. If you install or use FunnelWeb, please register by filling in and
  2753. returning the registration form in \figregform{}.
  2754. XFeel free to expand the form if there is not enough room.
  2755. X
  2756. X
  2757. X\begin{figure}[htbp]
  2758. X\begin{verbatim}
  2759. X    +----------------------FunnelWeb Registration Form----------------------+
  2760. X    | 1. Date:                                                              |
  2761. X    |                                                                       |
  2762. X    | 2. Title and name:                                                    |
  2763. X    |                                                                       |
  2764. X    | 3. Internet email address:                                            |
  2765. X    |                                                                       |
  2766. X    | 4. Snail mail address:                                                |
  2767. X    |                                                                       |
  2768. X    | 5. Work phone number (country,area,number):                           |
  2769. X    |                                                                       |
  2770. X    | 6. Which category of FunnelWeb user best describes you?               |
  2771. X    |       Latent    - Installed FunnelWeb, but don't intend to use it.    |
  2772. X    |       Beginner  - Haven't used FunnelWeb much yet; have an open mind. |
  2773. X    |       Casual    - Use FunnelWeb occasionally.                         |
  2774. X    |       Convert   - Use FunnelWeb to do most programming.               |
  2775. X    |       Fanatic   - FunnelWeb has become a way of life.                 |
  2776. X    |                                                                       |
  2777. X    | 7. What changes or new features would you like to see in FunnelWeb?   |
  2778. X    |                                                                       |
  2779. X    |                                                                       |
  2780. X    |                                                                       |
  2781. X    |                                                                       |
  2782. X    |                                                                       |
  2783. X    |                                                                       |
  2784. X    | 8. Do you want to be kept informed of new FunnelWeb developments?     |
  2785. X    |                                                                       |
  2786. X    +-----------------------------------------------------------------------+
  2787. X\end{verbatim}
  2788. X\mylabel{\figregform{}: The FunnelWeb registration form.}{%
  2789. X%
  2790. To register as a FunnelWeb user, please fill in this form and email it to
  2791. X\p{ross@spam.adelaide.edu.au}, or snail mail it to
  2792. Ross Williams, 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2793. You may wish to make a contribution when you register.
  2794. See Section~\ref{support} for more information.
  2795. X%
  2796. X}
  2797. X\end{figure}
  2798. X
  2799. XEmail the form to \p{ross@spam.adelaide.edu.au}, or snail mail it to
  2800. Ross Williams, 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2801. You may wish to make a contribution when you register.
  2802. See Section~\ref{support} for more information.
  2803. X
  2804. X\section{Support}
  2805. X\xx{FunnelWeb}{support}\label{support}
  2806. X
  2807. XFunnelWeb is released \dq{as is} under a GNU license, and
  2808. no formal support is available.
  2809. You have the right to make changes to FunnelWeb
  2810. and to use the modified versions created by random programmers.
  2811. However, this is discouraged (see Section~\ref{modification}).
  2812. X
  2813. In fact the support that is most needed is your financial
  2814. support for the
  2815. XFunnelWeb developers! It has taken \i{months} of full-time \i{unpaid}
  2816. work to bring FunnelWeb to you in its current form.
  2817. I don't want to inconvenience users who install
  2818. XFunnelWeb, play with it, and then hardly ever use it.
  2819. If you are in this category,
  2820. please register, but don't bother contributing. However, if you find that
  2821. XFunnelWeb has become a useful programming tool, a
  2822. contribution of some positive multiple of US\$50 would be appreciated.
  2823. X
  2824. To make a contribution, send payment with a completed registration form
  2825. X(see Section~\ref{registration}) to:
  2826. X
  2827. X\begin{verbatim}
  2828. X   Renaissance Software Pty Ltd
  2829. X   Email: ross@spam.adelaide.edu.au
  2830. X   Snail: 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2831. X\end{verbatim}
  2832. X
  2833. Payment can be by personal or bank cheque to any bank in the world or by
  2834. Visa or Mastercard. Please give the card name, number, expiry date, and
  2835. the amount to be paid in US dollars. All contributions will be appreciated
  2836. and will encourage further FunnelWeb development. However, no undertaking
  2837. is made whatsoever about how the money will be used.
  2838. X
  2839. X\section{Copyright}
  2840. X\xx{copyright}{FunnelWeb}\xx{FunnelWeb}{license}\xx{GNU}{license}%
  2841. X\label{copyright}
  2842. X
  2843. The FunnelWeb program is Copyright $\copyright$ 1992 Ross Williams.
  2844. However, FunnelWeb has been released by the author and copyright owner Ross
  2845. Williams (\p{ross@spam.adelaide.edu.au}) under Version 2 of the GNU General
  2846. Public
  2847. License published by the Free Software Foundation. Here are some ways
  2848. that you can obtain a copy of this license.
  2849. X
  2850. X\begin{itemize}
  2851. X
  2852. X\item The license appears as an appendix in the \i{FunnelWeb Hacker's
  2853. Manual}.
  2854. X
  2855. X\item If you have a working version of FunnelWeb, invoke it with
  2856. X\p{fw +hlicense +jlicense.txt}.
  2857. X
  2858. X\item Look in the \p{help} module of the FunnelWeb source code.
  2859. X
  2860. X\item FTP the license from \p{prep.ai.mit.edu} in \p{/pub/gnu/COPYING-2}.
  2861. X
  2862. X\item Write to the Free Software
  2863. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2864. X
  2865. X\end{itemize}
  2866. X
  2867. The license allows you to
  2868. redistribute FunnelWeb and/or modify it under certain conditions.
  2869. The license does not cover the \i{FunnelWeb User's Manual} and
  2870. X\i{FunnelWeb Hacker's Manual} which are distributed under a simpler
  2871. license that prohibits changes.
  2872. Note: FunnelWeb is distributed WITHOUT ANY WARRANTY; without even the
  2873. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2874. X
  2875. X\section{Nowarranty}
  2876. X\x{warranty}
  2877. X
  2878. Users of FunnelWeb should be aware that FunnelWeb comes with no
  2879. warranty. Here is an extract from the GNU General Public License Version 2,
  2880. under which
  2881. XFunnelWeb is distributed. For more information see Section~\ref{copyright}.
  2882. X
  2883. X\begin{verbatim}
  2884. X      11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  2885. X    FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  2886. X    OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  2887. X    PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  2888. X    OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  2889. X    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  2890. X    TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  2891. X    PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  2892. X    REPAIR OR CORRECTION.
  2893. X      12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  2894. X    WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  2895. X    REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  2896. X    INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  2897. X    OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  2898. X    TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  2899. X    YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  2900. X    PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  2901. X    POSSIBILITY OF SUCH DAMAGES.
  2902. X\end{verbatim}
  2903. X
  2904. X\section{Distribution}
  2905. X\xx{FunnelWeb}{Distribution}
  2906. X
  2907. Users of FunnelWeb should be aware that they can distribute the program
  2908. freely.
  2909. The following is an extract from the GNU General Public License Version 2,
  2910. under which FunnelWeb is distributed.
  2911. X
  2912. X\begin{verbatim}
  2913. X      1. You may copy and distribute verbatim copies of the Program's
  2914. X    source code as you receive it, in any medium, provided that you
  2915. X    conspicuously and appropriately publish on each copy an appropriate
  2916. X    copyright notice and disclaimer of warranty; keep intact all the
  2917. X    notices that refer to this License and to the absence of any warranty;
  2918. X    and give any other recipients of the Program a copy of this License
  2919. X    along with the Program.
  2920. X    You may charge a fee for the physical act of transferring a copy, and
  2921. X    you may at your option offer warranty protection in exchange for a fee.
  2922. X\end{verbatim}
  2923. X
  2924. The license also allows you other freedoms.
  2925. XFor more information see Section~\ref{copyright}.
  2926. X
  2927. X\section{Modification}
  2928. X\label{modification}
  2929. X
  2930. XFunnelWeb is distributed under a GNU license, and you are free to modify the
  2931. source code and distribute modified copies (see Section~\ref{copyright}).
  2932. However, there are good reasons why you should avoid doing this.
  2933. X
  2934. X\begin{enumerate}
  2935. X
  2936. X\item If you distribute modified versions of FunnelWeb, you run the risk of
  2937. creating a version that will diverge from the \dq{official} version of
  2938. XFunnelWeb that I intend to maintain.
  2939. X
  2940. X\item If you release a version of FunnelWeb with a changed input language,
  2941. users of your modified version will create source files that will no
  2942. longer work on other versions of FunnelWeb. The result would be chaos.
  2943. X
  2944. X\end{enumerate}
  2945. X
  2946. XFor these reasons I request that you do not distribute modified versions of
  2947. XFunnelWeb, particularly versions with a modified language. However, if you must
  2948. distribute a version with a modified language, \i{please change its name}
  2949. X(\ie{}from \dq{FunnelWeb} to something else). Please also allocate a new
  2950. file extension
  2951. to replace \dqp{.fw} as the extension for source files written in the modified
  2952. language.
  2953. X
  2954. XFor more information, refer to the \i{FunnelWeb Hacker's Manual}.
  2955. X
  2956. X\section{Versions}
  2957. X\xx{FunnelWeb}{versions}
  2958. X
  2959. XFunnelWeb was created in 1986 and was used extensively by Ross Williams
  2960. X(\p{ross@spam.adelaide.edu.au}) for three years. However,
  2961. Version~1.0 was written
  2962. in Ada and was not very portable (it was fairly VAX/VMS specific).
  2963. David Hulse
  2964. X(\p{dave@cs.adelaide.edu.au}) took the first step towards a
  2965. release by translating
  2966. the Ada code into C. Ross Williams then extensively reworked the C code, making
  2967. it robust and portable, adding new features, and polishing it to its
  2968. current form.
  2969. X
  2970. X\begin{verbatim}
  2971. X Vers  Lang  Created  Released   Author          Copyright      Licensing      
  2972. X ----  ----  -------  --------   --------------  -------------  ---------      
  2973. X V1.0  Ada   1986     Never      Ross  Williams  Ross Williams                 
  2974. X V2.0  C     1989     Never      David Hulse     Public domain  No restriction.
  2975. X V3.0  C     1992     May-1992   Ross  Williams  Ross Williams  GNU release.   
  2976. X\end{verbatim}
  2977. X
  2978. This manual was released for:
  2979. X
  2980. X\begin{verbatim}
  2981. X     * FunnelWeb       V3.0.
  2982. X     * User's Manual   V1.0.
  2983. X     * Hacker's Manual V1.0.
  2984. X     * TeX Definitions V1.0.
  2985. X\end{verbatim}
  2986. X
  2987. X\section{FTP Archive and Author}
  2988. X\label{ftparchive}%
  2989. X\xx{author}{contacting}\xx{ftp}{archive}\xx{FunnelWeb}{archive}
  2990. X
  2991. The FunnelWeb FTP archive is:
  2992. X
  2993. X\begin{verbatim}
  2994. X   Machine   : sirius.itd.adelaide.edu.au [IP=129.127.40.3].
  2995. X   Directory : ~pub/funnelweb/   (or a directory of similar name).
  2996. X\end{verbatim}
  2997. X
  2998. The author of FunnelWeb and this manual is:
  2999. X
  3000. X\begin{verbatim}
  3001. X   Name:  Dr Ross N. Williams
  3002. X   Email: ross@spam.adelaide.edu.au
  3003. X   Snail: 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  3004. X\end{verbatim}
  3005. X
  3006. I intend to maintain an \dq{official} version of FunnelWeb which I will
  3007. release under GNU license from time to time. I am happy to receive
  3008. constructive criticism
  3009. about FunnelWeb and its documentation.
  3010. X
  3011. I will always be happy to receive mail about FunnelWeb, but cannot
  3012. guarantee that I will be able to reply to it immediately.
  3013. X
  3014. X%==============================================================================%
  3015. X%                                End of Ch5.tex                                %
  3016. X%==============================================================================%
  3017. END_OF_FILE
  3018. if test 17146 -ne `wc -c <'userman/u_ch5.tex'`; then
  3019.     echo shar: \"'userman/u_ch5.tex'\" unpacked with wrong size!
  3020. fi
  3021. # end of 'userman/u_ch5.tex'
  3022. fi
  3023. echo shar: End of archive 8 \(of 20\).
  3024. cp /dev/null ark8isdone
  3025. MISSING=""
  3026. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  3027.     if test ! -f ark${I}isdone ; then
  3028.     MISSING="${MISSING} ${I}"
  3029.     fi
  3030. done
  3031. if test "${MISSING}" = "" ; then
  3032.     echo You have unpacked all 20 archives.
  3033.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  3034. else
  3035.     echo You still need to unpack the following archives:
  3036.     echo "        " ${MISSING}
  3037. fi
  3038. ##  End of shell archive.
  3039. exit 0
  3040.