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

  1. Newsgroups: comp.sources.unix
  2. From: ross@spam.adelaide.edu.au (Ross Williams)
  3. Subject: v26i123: funnelweb - a tool for literate programming in C, Part03/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 123
  9. Archive-Name: funnelweb/part03
  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 3 (of 20)."
  18. # Contents:  answers/pr02.lis answers/sc09.lis answers/sc22.lis
  19. #   answers/sc24.lis answers/sc27.lis answers/sc29.lis
  20. #   hackman/h_ch0.tex hackman/h_manual.aux hackman/h_manual.log
  21. #   sources/as.h sources/clock.h sources/help_gnu.c sources/memory.h
  22. #   sources/misc.c sources/misc.h sources/option.h sources/section.h
  23. #   sources/texhead.c sources/texhead.h
  24. # Wrapped by vixie@gw.home.vix.com on Sun Apr 11 11:00:11 1993
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'answers/pr02.lis' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'answers/pr02.lis'\"
  28. else
  29. echo shar: Extracting \"'answers/pr02.lis'\" \(5398 characters\)
  30. sed "s/^X//" >'answers/pr02.lis' <<'END_OF_FILE'
  31. XFUNNELWEB LISTING FILE
  32. X======================
  33. X
  34. Dump of mapped file "<<Suppressed>>".
  35. X
  36. MEMORY DUMP OF MAPPED FILE
  37. X==========================
  38. X
  39. X+-------------------------------------------------+------------------+
  40. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  41. X+-------------------------------------------------+------------------+
  42. X| 50 52 30 32 3A 20 54 65 73 74 20 74 68 65 20 70 | PR02: Test the p |
  43. X| 61 72 73 69 6E 67 20 6F 66 20 74 79 70 65 73 65 | arsing of typese |
  44. X| 74 74 65 72 20 64 69 72 65 63 74 69 76 65 73 2E | tter directives. |
  45. X| 0A 0A 31 2E 20 54 65 73 74 20 70 61 72 73 69 6E | ..1. Test parsin |
  46. X| 67 20 6F 66 20 6E 65 77 20 70 61 67 65 20 64 69 | g of new page di |
  47. X| 72 65 63 74 69 76 65 2E 0A 40 74 20 6E 65 77 5F | rective..@t new_ |
  48. X| 70 61 67 65 0A 0A 32 2E 20 54 65 73 74 20 70 61 | page..2. Test pa |
  49. X| 72 73 69 6E 67 20 6F 66 20 74 61 62 6C 65 20 6F | rsing of table o |
  50. X| 66 20 63 6F 6E 74 65 6E 74 73 20 64 69 72 65 63 | f contents direc |
  51. X| 74 69 76 65 2E 0A 40 74 20 74 61 62 6C 65 5F 6F | tive..@t table_o |
  52. X| 66 5F 63 6F 6E 74 65 6E 74 73 0A 0A 33 2E 20 54 | f_contents..3. T |
  53. X| 65 73 74 20 70 61 72 73 69 6E 67 20 6F 66 20 76 | est parsing of v |
  54. X| 73 6B 69 70 20 64 69 72 65 63 74 69 76 65 2E 0A | skip directive.. |
  55. X| 40 74 20 76 73 6B 69 70 20 33 32 20 6D 6D 0A 0A | @t vskip 32 mm.. |
  56. X| 34 2E 20 54 65 73 74 20 70 61 72 73 69 6E 67 20 | 4. Test parsing  |
  57. X| 6F 66 20 74 69 74 6C 65 20 64 69 72 65 63 74 69 | of title directi |
  58. X| 76 65 2E 0A 40 74 20 74 69 74 6C 65 20 74 69 74 | ve..@t title tit |
  59. X| 6C 65 66 6F 6E 74 20 6C 65 66 74 20 22 53 6C 6F | lefont left "Slo |
  60. X| 74 68 22 0A 0A                                  | th"..            |
  61. X+-------------------------------------------------+------------------+
  62. X
  63. X
  64. X=========================== Start of LINE LIST DUMP ============================
  65. X
  66. Globl Local| Text
  67. X-----------+--------------------------------------------------------------------
  68. X00001 00001| PR02: Test the parsing of typesetter directives.<010>
  69. X00002 00002| <010>
  70. X00003 00003| 1. Test parsing of new page directive.<010>
  71. X00004 00004| @t new_page<010>
  72. X00005 00005| <010>
  73. X00006 00006| 2. Test parsing of table of contents directive.<010>
  74. X00007 00007| @t table_of_contents<010>
  75. X00008 00008| <010>
  76. X00009 00009| 3. Test parsing of vskip directive.<010>
  77. X00010 00010| @t vskip 32 mm<010>
  78. X00011 00011| <010>
  79. X00012 00012| 4. Test parsing of title directive.<010>
  80. X00013 00013| @t title titlefont left "Sloth"<010>
  81. X00014 00014| <010>
  82. X00015 00015| <End-Of-File><010>
  83. X-----------+--------------------------------------------------------------------
  84. Globl Local| Text
  85. X
  86. X============================ End of LINE LIST DUMP =============================
  87. X
  88. X
  89. X=========================== Start of TOKEN LIST DUMP ===========================
  90. X
  91. Summary: There are 10 tokens in the token list.
  92. X
  93. Line[Column]: Token Description
  94. X-------------------------------
  95. X
  96. X0001[01]: Text. Text scrap[Grey]="PR02: Test the parsing of typesetter directives.<010>
  97. X<010>
  98. X1. Test parsing of new page directive.<010>
  99. X"
  100. X0004[01]: @t.. Newpage. 
  101. X0005[01]: Text. Text scrap[Grey]="<010>
  102. X2. Test parsing of table of contents directive.<010>
  103. X"
  104. X0007[01]: @t.. TOC. 
  105. X0008[01]: Text. Text scrap[Grey]="<010>
  106. X3. Test parsing of vskip directive.<010>
  107. X"
  108. X0010[01]: @t.. Vertical skip. Vertical space skipped=32mm.
  109. X0011[01]: Text. Text scrap[Grey]="<010>
  110. X4. Test parsing of title directive.<010>
  111. X"
  112. X0013[01]: @t.. Title. Font=Title, Alignment=Left. Title text follows:
  113. Text scrap[Grey]="Sloth"
  114. X0014[01]: Text. Text scrap[White]="<010>
  115. X"
  116. X0015[01]: End Of File. 
  117. X============================ End of TOKEN LIST DUMP ============================
  118. X
  119. X
  120. X========================== Start of MACRO TABLE DUMP ===========================
  121. X
  122. X
  123. X=========================== End of MACRO TABLE DUMP ============================
  124. X
  125. X
  126. X========================= Start of DOCUMENT LIST DUMP ==========================
  127. X
  128. X
  129. TEXT COMPONENT: Pos(L,C)=(1,1). 
  130. X
  131. X-- Start of Text Scrap List --
  132. Text scrap[Grey]="PR02: Test the parsing of typesetter directives.<010>
  133. X<010>
  134. X1. Test parsing of new page directive.<010>
  135. X"
  136. X--- End of Text Scrap List ---
  137. X
  138. X
  139. TYPESETTER DIRECTIVE COMPONENT:    New page.
  140. X
  141. TEXT COMPONENT: Pos(L,C)=(5,1). 
  142. X
  143. X-- Start of Text Scrap List --
  144. Text scrap[Grey]="<010>
  145. X2. Test parsing of table of contents directive.<010>
  146. X"
  147. X--- End of Text Scrap List ---
  148. X
  149. X
  150. TYPESETTER DIRECTIVE COMPONENT:    Table of contents.
  151. X
  152. TEXT COMPONENT: Pos(L,C)=(8,1). 
  153. X
  154. X-- Start of Text Scrap List --
  155. Text scrap[Grey]="<010>
  156. X3. Test parsing of vskip directive.<010>
  157. X"
  158. X--- End of Text Scrap List ---
  159. X
  160. X
  161. TYPESETTER DIRECTIVE COMPONENT:    Vertical skip by 32 mm.
  162. X
  163. TEXT COMPONENT: Pos(L,C)=(11,1). 
  164. X
  165. X-- Start of Text Scrap List --
  166. Text scrap[Grey]="<010>
  167. X4. Test parsing of title directive.<010>
  168. X"
  169. X--- End of Text Scrap List ---
  170. X
  171. X
  172. TYPESETTER DIRECTIVE COMPONENT: Font=Title, Alignment=Left. Title text follows:
  173. Text scrap[Grey]="Sloth"
  174. X
  175. TEXT COMPONENT: Pos(L,C)=(14,1). 
  176. X
  177. X-- Start of Text Scrap List --
  178. Text scrap[White]="<010>
  179. X"
  180. X--- End of Text Scrap List ---
  181. X
  182. X
  183. X========================== End of DOCUMENT LIST DUMP ===========================
  184. X
  185. XE: No macros defined.
  186. XE: No output files specified.
  187. X
  188. Global Local| Input File
  189. X------------+-------------------------------------------------------------------
  190. X.................
  191. X------------+-------------------------------------------------------------------
  192. X
  193. There were 2 Errors.
  194. END_OF_FILE
  195. if test 5398 -ne `wc -c <'answers/pr02.lis'`; then
  196.     echo shar: \"'answers/pr02.lis'\" unpacked with wrong size!
  197. fi
  198. # end of 'answers/pr02.lis'
  199. fi
  200. if test -f 'answers/sc09.lis' -a "${1}" != "-c" ; then 
  201.   echo shar: Will not clobber existing file \"'answers/sc09.lis'\"
  202. else
  203. echo shar: Extracting \"'answers/sc09.lis'\" \(5222 characters\)
  204. sed "s/^X//" >'answers/sc09.lis' <<'END_OF_FILE'
  205. XFUNNELWEB LISTING FILE
  206. X======================
  207. X
  208. Dump of mapped file "<<Suppressed>>".
  209. X
  210. MEMORY DUMP OF MAPPED FILE
  211. X==========================
  212. X
  213. X+-------------------------------------------------+------------------+
  214. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  215. X+-------------------------------------------------+------------------+
  216. X| 53 43 30 39 3A 20 44 65 74 65 63 74 69 6F 6E 20 | SC09: Detection  |
  217. X| 6F 66 20 63 6F 6E 74 72 6F 6C 20 63 68 61 72 61 | of control chara |
  218. X| 63 74 65 72 73 2E 0A 0A 53 43 30 39 2E 31 20 54 | cters...SC09.1 T |
  219. X| 65 73 74 20 74 68 61 74 20 63 6F 6E 74 72 6F 6C | est that control |
  220. X| 20 63 68 61 72 61 63 74 65 72 73 20 61 72 65 20 |  characters are  |
  221. X| 64 65 74 65 63 74 65 64 20 61 6E 64 20 72 65 70 | detected and rep |
  222. X| 6C 61 63 65 64 20 62 79 20 22 3F 22 2E 0A 53 43 | laced by "?"..SC |
  223. X| 30 39 2E 32 20 54 65 73 74 20 6E 6F 6E 20 70 72 | 09.2 Test non pr |
  224. X| 69 6E 74 61 62 6C 65 20 74 68 61 74 20 68 61 73 | intable that has |
  225. X| 20 61 20 6D 6E 65 6D 6F 6E 69 63 2E 0A 0A 54 68 |  a mnemonic...Th |
  226. X| 65 72 65 20 69 73 20 61 20 74 61 62 20 62 65 74 | ere is a tab bet |
  227. X| 77 65 65 6E 20 74 68 65 73 65 20 74 77 6F 20 62 | ween these two b |
  228. X| 61 72 73 20 7C 09 7C 20 77 68 69 63 68 20 73 68 | ars |.| which sh |
  229. X| 6F 75 6C 64 20 63 6F 6D 65 20 6F 75 74 20 61 73 | ould come out as |
  230. X| 20 22 3F 22 2E 0A 54 68 65 20 61 62 6F 76 65 20 |  "?"..The above  |
  231. X| 65 72 72 6F 72 20 6D 65 73 73 61 67 65 20 73 68 | error message sh |
  232. X| 6F 75 6C 64 20 63 6F 6E 74 61 69 6E 20 74 68 65 | ould contain the |
  233. X| 20 6D 6E 65 6D 6F 6E 69 63 20 22 48 54 22 2E 0A |  mnemonic "HT".. |
  234. X| 0A 53 43 30 39 2E 33 20 54 65 73 74 20 6E 6F 6E | .SC09.3 Test non |
  235. X| 20 70 72 69 6E 74 61 62 6C 65 20 74 68 61 74 20 |  printable that  |
  236. X| 68 61 73 20 6E 6F 20 6D 6E 65 6D 6F 6E 69 63 2E | has no mnemonic. |
  237. X| 0A 0A 54 68 65 72 65 20 69 73 20 61 20 6E 6F 6E | ..There is a non |
  238. X| 2D 6D 6E 65 6D 6F 6E 69 63 20 63 6F 6E 74 72 6F | -mnemonic contro |
  239. X| 6C 20 63 68 61 72 61 63 74 65 72 20 62 65 74 77 | l character betw |
  240. X| 65 65 6E 20 74 68 65 73 65 20 62 61 72 73 20 7C | een these bars | |
  241. X| EA 7C 2E 0A                                     | .|..             |
  242. X+-------------------------------------------------+------------------+
  243. X
  244. X
  245. X=========================== Start of LINE LIST DUMP ============================
  246. X
  247. Globl Local| Text
  248. X-----------+--------------------------------------------------------------------
  249. X00001 00001| SC09: Detection of control characters.<010>
  250. X00002 00002| <010>
  251. X00003 00003| SC09.1 Test that control characters are detected and replaced by "?".<010>
  252. X00004 00004| SC09.2 Test non printable that has a mnemonic.<010>
  253. X00005 00005| <010>
  254. X00006 00006| There is a tab between these two bars |?| which should come out as "?".<010>
  255. X00007 00007| The above error message should contain the mnemonic "HT".<010>
  256. X00008 00008| <010>
  257. X00009 00009| SC09.3 Test non printable that has no mnemonic.<010>
  258. X00010 00010| <010>
  259. X00011 00011| There is a non-mnemonic control character between these bars |?|.<010>
  260. X00012 00012| <End-Of-File><010>
  261. X-----------+--------------------------------------------------------------------
  262. Globl Local| Text
  263. X
  264. X============================ End of LINE LIST DUMP =============================
  265. X
  266. X
  267. X=========================== Start of TOKEN LIST DUMP ===========================
  268. X
  269. Summary: There are 2 tokens in the token list.
  270. X
  271. Line[Column]: Token Description
  272. X-------------------------------
  273. X
  274. X0001[01]: Text. Text scrap[Grey]="SC09: Detection of control characters.<010>
  275. X<010>
  276. SC09.1 Test that control characters are detected and replaced by "?".<010>
  277. SC09.2 Test non printable that has a mnemonic.<010>
  278. X<010>
  279. There is a tab between these two bars |?| which should come out as "?".<010>
  280. The above error message should contain the mnemonic "HT".<010>
  281. X<010>
  282. SC09.3 Test non printable that has no mnemonic.<010>
  283. X<010>
  284. There is a non-mnemonic control character between these bars |?|.<010>
  285. X"
  286. X0012[01]: End Of File. 
  287. X============================ End of TOKEN LIST DUMP ============================
  288. X
  289. Macro table dump skipped (Parser was not invoked).
  290. Document list dump skipped (Parser was not invoked).
  291. X
  292. Global Local| Input File
  293. X------------+-------------------------------------------------------------------
  294. X     1     1| SC09: Detection of control characters.
  295. X     2     2| 
  296. X     3     3| SC09.1 Test that control characters are detected and replaced by "?".
  297. X     4     4| SC09.2 Test non printable that has a mnemonic.
  298. X     5     5| 
  299. X     6     6| There is a tab between these two bars |?| which should come out as "?".
  300. X       Error|........................................^Non printable character (Sym=HT, Dec=009, Hex=09, Oct=011).
  301. X     7     7| The above error message should contain the mnemonic "HT".
  302. X     8     8| 
  303. X     9     9| SC09.3 Test non printable that has no mnemonic.
  304. X    10    10| 
  305. X    11    11| There is a non-mnemonic control character between these bars |?|.
  306. X       Error|...............................................................^Non printable character (Sym=<none>, Dec=234, Hex=EA, Oct=352).
  307. X            | <End-Of-File>
  308. X------------+-------------------------------------------------------------------
  309. X
  310. There were 2 Errors.
  311. END_OF_FILE
  312. if test 5222 -ne `wc -c <'answers/sc09.lis'`; then
  313.     echo shar: \"'answers/sc09.lis'\" unpacked with wrong size!
  314. fi
  315. # end of 'answers/sc09.lis'
  316. fi
  317. if test -f 'answers/sc22.lis' -a "${1}" != "-c" ; then 
  318.   echo shar: Will not clobber existing file \"'answers/sc22.lis'\"
  319. else
  320. echo shar: Extracting \"'answers/sc22.lis'\" \(7638 characters\)
  321. sed "s/^X//" >'answers/sc22.lis' <<'END_OF_FILE'
  322. XFUNNELWEB LISTING FILE
  323. X======================
  324. X
  325. Dump of mapped file "<<Suppressed>>".
  326. X
  327. MEMORY DUMP OF MAPPED FILE
  328. X==========================
  329. X
  330. X+-------------------------------------------------+------------------+
  331. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  332. X+-------------------------------------------------+------------------+
  333. X| 53 43 32 32 3A 20 54 65 73 74 20 73 79 6E 74 61 | SC22: Test synta |
  334. X| 78 20 63 68 65 63 6B 69 6E 67 20 6F 66 20 69 6E | x checking of in |
  335. X| 70 75 74 20 6C 69 6E 65 20 6C 65 6E 67 74 68 20 | put line length  |
  336. X| 70 72 61 67 6D 61 2E 0A 0A 31 2E 20 54 65 73 74 | pragma...1. Test |
  337. X| 20 6E 6F 74 20 74 68 72 65 65 20 61 72 67 75 6D |  not three argum |
  338. X| 65 6E 74 73 2E 0A 40 70 20 6D 61 78 69 6D 75 6D | ents..@p maximum |
  339. X| 5F 69 6E 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 | _input_line_leng |
  340. X| 74 68 0A 40 70 20 6D 61 78 69 6D 75 6D 5F 69 6E | th.@p maximum_in |
  341. X| 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 74 68 20 | put_line_length  |
  342. X| 3D 0A 40 70 20 6D 61 78 69 6D 75 6D 5F 69 6E 70 | =.@p maximum_inp |
  343. X| 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 74 68 20 3D | ut_line_length = |
  344. X| 20 78 78 78 20 79 79 79 0A 0A 32 2E 20 54 65 73 |  xxx yyy..2. Tes |
  345. X| 74 20 73 65 63 6F 6E 64 20 61 72 67 75 6D 65 6E | t second argumen |
  346. X| 74 20 6E 6F 74 20 22 3D 22 2E 0A 40 70 20 6D 61 | t not "="..@p ma |
  347. X| 78 69 6D 75 6D 5F 69 6E 70 75 74 5F 6C 69 6E 65 | ximum_input_line |
  348. X| 5F 6C 65 6E 67 74 68 20 78 20 73 6C 6F 74 68 0A | _length x sloth. |
  349. X| 0A 33 2E 20 54 65 73 74 20 76 61 6C 75 65 20 6F | .3. Test value o |
  350. X| 66 20 69 6E 66 69 6E 69 74 79 2E 0A 40 70 20 6D | f infinity..@p m |
  351. X| 61 78 69 6D 75 6D 5F 69 6E 70 75 74 5F 6C 69 6E | aximum_input_lin |
  352. X| 65 5F 6C 65 6E 67 74 68 20 3D 20 69 6E 66 69 6E | e_length = infin |
  353. X| 69 74 79 0A 0A 34 2E 20 54 65 73 74 20 6E 6F 6E | ity..4. Test non |
  354. X| 2D 64 65 63 69 6D 61 6C 20 64 69 67 69 74 20 69 | -decimal digit i |
  355. X| 6E 20 6E 75 6D 62 65 72 2E 0A 40 70 20 6D 61 78 | n number..@p max |
  356. X| 69 6D 75 6D 5F 69 6E 70 75 74 5F 6C 69 6E 65 5F | imum_input_line_ |
  357. X| 6C 65 6E 67 74 68 20 3D 20 32 65 66 0A 0A 35 2E | length = 2ef..5. |
  358. X| 20 54 65 73 74 20 6E 75 6D 62 65 72 20 69 73 20 |  Test number is  |
  359. X| 6D 6F 72 65 20 74 68 61 6E 20 65 69 67 68 74 20 | more than eight  |
  360. X| 64 69 67 69 74 73 20 6C 6F 6E 67 2E 0A 40 70 20 | digits long..@p  |
  361. X| 6D 61 78 69 6D 75 6D 5F 69 6E 70 75 74 5F 6C 69 | maximum_input_li |
  362. X| 6E 65 5F 6C 65 6E 67 74 68 20 3D 20 31 32 33 34 | ne_length = 1234 |
  363. X| 35 36 37 38 39 0A 0A 36 2E 20 54 65 73 74 20 6E | 56789..6. Test n |
  364. X| 75 6D 62 65 72 20 69 73 20 65 78 61 63 74 6C 79 | umber is exactly |
  365. X| 20 65 69 67 68 74 20 64 69 67 69 74 73 20 6C 6F |  eight digits lo |
  366. X| 6E 67 2E 0A 40 70 20 6D 61 78 69 6D 75 6D 5F 69 | ng..@p maximum_i |
  367. X| 6E 70 75 74 5F 6C 69 6E 65 5F 6C 65 6E 67 74 68 | nput_line_length |
  368. X| 20 3D 20 31 32 33 34 35 36 37 38 0A 0A 0A       |  = 12345678...   |
  369. X+-------------------------------------------------+------------------+
  370. X
  371. X
  372. X=========================== Start of LINE LIST DUMP ============================
  373. X
  374. Globl Local| Text
  375. X-----------+--------------------------------------------------------------------
  376. X00001 00001| SC22: Test syntax checking of input line length pragma.<010>
  377. X00002 00002| <010>
  378. X00003 00003| 1. Test not three arguments.<010>
  379. X00004 00004| @p maximum_input_line_length<010>
  380. X00005 00005| @p maximum_input_line_length =<010>
  381. X00006 00006| @p maximum_input_line_length = xxx yyy<010>
  382. X00007 00007| <010>
  383. X00008 00008| 2. Test second argument not "=".<010>
  384. X00009 00009| @p maximum_input_line_length x sloth<010>
  385. X00010 00010| <010>
  386. X00011 00011| 3. Test value of infinity.<010>
  387. X00012 00012| @p maximum_input_line_length = infinity<010>
  388. X00013 00013| <010>
  389. X00014 00014| 4. Test non-decimal digit in number.<010>
  390. X00015 00015| @p maximum_input_line_length = 2ef<010>
  391. X00016 00016| <010>
  392. X00017 00017| 5. Test number is more than eight digits long.<010>
  393. X00018 00018| @p maximum_input_line_length = 123456789<010>
  394. X00019 00019| <010>
  395. X00020 00020| 6. Test number is exactly eight digits long.<010>
  396. X00021 00021| @p maximum_input_line_length = 12345678<010>
  397. X00022 00022| <010>
  398. X00023 00023| <010>
  399. X00024 00024| <End-Of-File><010>
  400. X-----------+--------------------------------------------------------------------
  401. Globl Local| Text
  402. X
  403. X============================ End of LINE LIST DUMP =============================
  404. X
  405. X
  406. X=========================== Start of TOKEN LIST DUMP ===========================
  407. X
  408. Summary: There are 8 tokens in the token list.
  409. X
  410. Line[Column]: Token Description
  411. X-------------------------------
  412. X
  413. X0001[01]: Text. Text scrap[Grey]="SC22: Test syntax checking of input line length pragma.<010>
  414. X<010>
  415. X1. Test not three arguments.<010>
  416. X"
  417. X0007[01]: Text. Text scrap[Grey]="<010>
  418. X2. Test second argument not "=".<010>
  419. X"
  420. X0010[01]: Text. Text scrap[Grey]="<010>
  421. X3. Test value of infinity.<010>
  422. X"
  423. X0013[01]: Text. Text scrap[Grey]="<010>
  424. X4. Test non-decimal digit in number.<010>
  425. X"
  426. X0016[01]: Text. Text scrap[Grey]="<010>
  427. X5. Test number is more than eight digits long.<010>
  428. X"
  429. X0019[01]: Text. Text scrap[Grey]="<010>
  430. X6. Test number is exactly eight digits long.<010>
  431. X"
  432. X0022[01]: Text. Text scrap[White]="<010>
  433. X<010>
  434. X"
  435. X0024[01]: End Of File. 
  436. X============================ End of TOKEN LIST DUMP ============================
  437. X
  438. Macro table dump skipped (Parser was not invoked).
  439. Document list dump skipped (Parser was not invoked).
  440. X
  441. Global Local| Input File
  442. X------------+-------------------------------------------------------------------
  443. X     1     1| SC22: Test syntax checking of input line length pragma.
  444. X     2     2| 
  445. X     3     3| 1. Test not three arguments.
  446. X     4     4| @p maximum_input_line_length
  447. X       Error|.^This pragma has the wrong number of arguments.
  448. X            |.^The correct format is: "@p maximum_input_line_length = <num>|infinity".
  449. X            |.^Pragma ignored.
  450. X     5     5| @p maximum_input_line_length =
  451. X       Error|.^This pragma has the wrong number of arguments.
  452. X            |.^The correct format is: "@p maximum_input_line_length = <num>|infinity".
  453. X            |.^Pragma ignored.
  454. X     6     6| @p maximum_input_line_length = xxx yyy
  455. X       Error|.^This pragma has the wrong number of arguments.
  456. X            |.^The correct format is: "@p maximum_input_line_length = <num>|infinity".
  457. X            |.^Pragma ignored.
  458. X     7     7| 
  459. X     8     8| 2. Test second argument not "=".
  460. X     9     9| @p maximum_input_line_length x sloth
  461. X            |.^The correct format is: "@p maximum_input_line_length = <num>|infinity".
  462. X            |.^Pragma ignored.
  463. X       Error|..............................^Expecting "=".
  464. X    10    10| 
  465. X    11    11| 3. Test value of infinity.
  466. X    12    12| @p maximum_input_line_length = infinity
  467. X    13    13| 
  468. X    14    14| 4. Test non-decimal digit in number.
  469. X    15    15| @p maximum_input_line_length = 2ef
  470. X       Error|.................................^Illegal digit. Value must consist entirely of decimal digits.
  471. X            |.................................^You can also use the value "infinity".
  472. X            |.................................^Pragma ignored.
  473. X    16    16| 
  474. X    17    17| 5. Test number is more than eight digits long.
  475. X    18    18| @p maximum_input_line_length = 123456789
  476. X       Error|................................^Too many digits. The maximum is eight.
  477. X            |................................^Pragma ignored.
  478. X    19    19| 
  479. X    20    20| 6. Test number is exactly eight digits long.
  480. X    21    21| @p maximum_input_line_length = 12345678
  481. X    22    22| 
  482. X    23    23| 
  483. X            | <End-Of-File>
  484. X------------+-------------------------------------------------------------------
  485. X
  486. There were 6 Errors.
  487. END_OF_FILE
  488. if test 7638 -ne `wc -c <'answers/sc22.lis'`; then
  489.     echo shar: \"'answers/sc22.lis'\" unpacked with wrong size!
  490. fi
  491. # end of 'answers/sc22.lis'
  492. fi
  493. if test -f 'answers/sc24.lis' -a "${1}" != "-c" ; then 
  494.   echo shar: Will not clobber existing file \"'answers/sc24.lis'\"
  495. else
  496. echo shar: Extracting \"'answers/sc24.lis'\" \(7027 characters\)
  497. sed "s/^X//" >'answers/sc24.lis' <<'END_OF_FILE'
  498. XFUNNELWEB LISTING FILE
  499. X======================
  500. X
  501. Dump of mapped file "<<Suppressed>>".
  502. X
  503. MEMORY DUMP OF MAPPED FILE
  504. X==========================
  505. X
  506. X+-------------------------------------------------+------------------+
  507. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  508. X+-------------------------------------------------+------------------+
  509. X| 53 43 32 33 3A 20 54 65 73 74 20 73 79 6E 74 61 | SC23: Test synta |
  510. X| 78 20 63 68 65 63 6B 69 6E 67 20 6F 66 20 69 6E | x checking of in |
  511. X| 64 65 6E 74 61 74 69 6F 6E 20 70 72 61 67 6D 61 | dentation pragma |
  512. X| 2E 0A 0A 31 2E 20 54 65 73 74 20 6E 6F 74 20 74 | ...1. Test not t |
  513. X| 68 72 65 65 20 61 72 67 75 6D 65 6E 74 73 2E 0A | hree arguments.. |
  514. X| 40 70 20 69 6E 64 65 6E 74 61 74 69 6F 6E 0A 40 | @p indentation.@ |
  515. X| 70 20 69 6E 64 65 6E 74 61 74 69 6F 6E 20 3D 0A | p indentation =. |
  516. X| 40 70 20 69 6E 64 65 6E 74 61 74 69 6F 6E 20 3D | @p indentation = |
  517. X| 20 78 78 78 20 79 79 79 0A 0A 32 2E 20 54 65 73 |  xxx yyy..2. Tes |
  518. X| 74 20 73 65 63 6F 6E 64 20 61 72 67 75 6D 65 6E | t second argumen |
  519. X| 74 20 6E 6F 74 20 22 3D 22 2E 0A 40 70 20 69 6E | t not "="..@p in |
  520. X| 64 65 6E 74 61 74 69 6F 6E 20 78 20 73 6C 6F 74 | dentation x slot |
  521. X| 68 0A 0A 33 2E 20 54 65 73 74 20 74 68 69 72 64 | h..3. Test third |
  522. X| 20 61 72 67 75 6D 65 6E 74 20 69 73 20 6E 6F 74 |  argument is not |
  523. X| 20 6C 65 67 61 6C 2E 0A 40 70 20 69 6E 64 65 6E |  legal..@p inden |
  524. X| 74 61 74 69 6F 6E 20 3D 20 73 6C 6F 74 68 0A 0A | tation = sloth.. |
  525. X| 34 2E 20 54 65 73 74 20 74 68 69 72 64 20 61 72 | 4. Test third ar |
  526. X| 67 75 6D 65 6E 74 20 69 73 20 6E 6F 6E 65 2E 0A | gument is none.. |
  527. X| 40 70 20 69 6E 64 65 6E 74 61 74 69 6F 6E 20 3D | @p indentation = |
  528. X| 20 6E 6F 6E 65 0A 0A 35 2E 20 54 65 73 74 20 74 |  none..5. Test t |
  529. X| 68 69 72 64 20 61 72 67 75 6D 65 6E 74 20 69 73 | hird argument is |
  530. X| 20 62 6C 61 6E 6B 2E 0A 36 2E 20 54 65 73 74 20 |  blank..6. Test  |
  531. X| 70 72 61 67 6D 61 20 6F 70 70 6F 73 65 73 20 65 | pragma opposes e |
  532. X| 61 72 6C 69 65 72 20 70 72 61 67 6D 61 2E 0A 40 | arlier pragma..@ |
  533. X| 70 20 69 6E 64 65 6E 74 61 74 69 6F 6E 20 3D 20 | p indentation =  |
  534. X| 62 6C 61 6E 6B 0A 0A 37 2E 20 54 65 73 74 20 70 | blank..7. Test p |
  535. X| 72 61 67 6D 61 20 64 6F 65 73 20 6E 6F 74 20 6F | ragma does not o |
  536. X| 70 70 6F 73 65 20 65 61 72 6C 69 65 72 20 70 72 | ppose earlier pr |
  537. X| 61 67 6D 61 2E 0A 40 70 20 69 6E 64 65 6E 74 61 | agma..@p indenta |
  538. X| 74 69 6F 6E 20 3D 20 6E 6F 6E 65 0A 0A          | tion = none..    |
  539. X+-------------------------------------------------+------------------+
  540. X
  541. X
  542. X=========================== Start of LINE LIST DUMP ============================
  543. X
  544. Globl Local| Text
  545. X-----------+--------------------------------------------------------------------
  546. X00001 00001| SC23: Test syntax checking of indentation pragma.<010>
  547. X00002 00002| <010>
  548. X00003 00003| 1. Test not three arguments.<010>
  549. X00004 00004| @p indentation<010>
  550. X00005 00005| @p indentation =<010>
  551. X00006 00006| @p indentation = xxx yyy<010>
  552. X00007 00007| <010>
  553. X00008 00008| 2. Test second argument not "=".<010>
  554. X00009 00009| @p indentation x sloth<010>
  555. X00010 00010| <010>
  556. X00011 00011| 3. Test third argument is not legal.<010>
  557. X00012 00012| @p indentation = sloth<010>
  558. X00013 00013| <010>
  559. X00014 00014| 4. Test third argument is none.<010>
  560. X00015 00015| @p indentation = none<010>
  561. X00016 00016| <010>
  562. X00017 00017| 5. Test third argument is blank.<010>
  563. X00018 00018| 6. Test pragma opposes earlier pragma.<010>
  564. X00019 00019| @p indentation = blank<010>
  565. X00020 00020| <010>
  566. X00021 00021| 7. Test pragma does not oppose earlier pragma.<010>
  567. X00022 00022| @p indentation = none<010>
  568. X00023 00023| <010>
  569. X00024 00024| <End-Of-File><010>
  570. X-----------+--------------------------------------------------------------------
  571. Globl Local| Text
  572. X
  573. X============================ End of LINE LIST DUMP =============================
  574. X
  575. X
  576. X=========================== Start of TOKEN LIST DUMP ===========================
  577. X
  578. Summary: There are 8 tokens in the token list.
  579. X
  580. Line[Column]: Token Description
  581. X-------------------------------
  582. X
  583. X0001[01]: Text. Text scrap[Grey]="SC23: Test syntax checking of indentation pragma.<010>
  584. X<010>
  585. X1. Test not three arguments.<010>
  586. X"
  587. X0007[01]: Text. Text scrap[Grey]="<010>
  588. X2. Test second argument not "=".<010>
  589. X"
  590. X0010[01]: Text. Text scrap[Grey]="<010>
  591. X3. Test third argument is not legal.<010>
  592. X"
  593. X0013[01]: Text. Text scrap[Grey]="<010>
  594. X4. Test third argument is none.<010>
  595. X"
  596. X0016[01]: Text. Text scrap[Grey]="<010>
  597. X5. Test third argument is blank.<010>
  598. X6. Test pragma opposes earlier pragma.<010>
  599. X"
  600. X0020[01]: Text. Text scrap[Grey]="<010>
  601. X7. Test pragma does not oppose earlier pragma.<010>
  602. X"
  603. X0023[01]: Text. Text scrap[White]="<010>
  604. X"
  605. X0024[01]: End Of File. 
  606. X============================ End of TOKEN LIST DUMP ============================
  607. X
  608. Macro table dump skipped (Parser was not invoked).
  609. Document list dump skipped (Parser was not invoked).
  610. X
  611. Global Local| Input File
  612. X------------+-------------------------------------------------------------------
  613. X     1     1| SC23: Test syntax checking of indentation pragma.
  614. X     2     2| 
  615. X     3     3| 1. Test not three arguments.
  616. X     4     4| @p indentation
  617. X       Error|.^This indentation pragma has the wrong number of arguments.
  618. X            |.^The correct format is: "@p indentation = none|blank".
  619. X            |.^Pragma ignored.
  620. X     5     5| @p indentation =
  621. X       Error|.^This indentation pragma has the wrong number of arguments.
  622. X            |.^The correct format is: "@p indentation = none|blank".
  623. X            |.^Pragma ignored.
  624. X     6     6| @p indentation = xxx yyy
  625. X       Error|.^This indentation pragma has the wrong number of arguments.
  626. X            |.^The correct format is: "@p indentation = none|blank".
  627. X            |.^Pragma ignored.
  628. X     7     7| 
  629. X     8     8| 2. Test second argument not "=".
  630. X     9     9| @p indentation x sloth
  631. X            |.^The correct format is: "@p indentation = none|blank".
  632. X            |.^Pragma ignored.
  633. X       Error|................^Expecting "=".
  634. X    10    10| 
  635. X    11    11| 3. Test third argument is not legal.
  636. X    12    12| @p indentation = sloth
  637. X            |.^The correct format is: "@p indentation = none|blank".
  638. X            |.^Pragma ignored.
  639. X       Error|..................^Expecting either "none" or "blank".
  640. X    13    13| 
  641. X    14    14| 4. Test third argument is none.
  642. X    15    15| @p indentation = none
  643. X            |.^This pragma is opposed by the pragma at line 19.
  644. X    16    16| 
  645. X    17    17| 5. Test third argument is blank.
  646. X    18    18| 6. Test pragma opposes earlier pragma.
  647. X    19    19| @p indentation = blank
  648. X       Error|.^This pragma opposes the pragma at line 15.
  649. X            |.^You can have as many indentation pragmas as you like,
  650. X            |.^but they all have to be the same!
  651. X            |.^Pragma ignored.
  652. X    20    20| 
  653. X    21    21| 7. Test pragma does not oppose earlier pragma.
  654. X    22    22| @p indentation = none
  655. X    23    23| 
  656. X            | <End-Of-File>
  657. X------------+-------------------------------------------------------------------
  658. X
  659. There were 6 Errors.
  660. END_OF_FILE
  661. if test 7027 -ne `wc -c <'answers/sc24.lis'`; then
  662.     echo shar: \"'answers/sc24.lis'\" unpacked with wrong size!
  663. fi
  664. # end of 'answers/sc24.lis'
  665. fi
  666. if test -f 'answers/sc27.lis' -a "${1}" != "-c" ; then 
  667.   echo shar: Will not clobber existing file \"'answers/sc27.lis'\"
  668. else
  669. echo shar: Extracting \"'answers/sc27.lis'\" \(6024 characters\)
  670. sed "s/^X//" >'answers/sc27.lis' <<'END_OF_FILE'
  671. XFUNNELWEB LISTING FILE
  672. X======================
  673. X
  674. Dump of mapped file "<<Suppressed>>".
  675. X
  676. MEMORY DUMP OF MAPPED FILE
  677. X==========================
  678. X
  679. X+-------------------------------------------------+------------------+
  680. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  681. X+-------------------------------------------------+------------------+
  682. X| 53 43 32 37 3A 20 54 65 73 74 20 73 79 6E 74 61 | SC27: Test synta |
  683. X| 78 20 63 68 65 63 6B 69 6E 67 20 6F 66 20 76 73 | x checking of vs |
  684. X| 6B 69 70 20 74 79 70 65 73 65 74 74 69 6E 67 20 | kip typesetting  |
  685. X| 64 69 72 65 63 74 69 76 65 2E 0A 0A 31 2E 20 54 | directive...1. T |
  686. X| 65 73 74 20 6E 6F 74 20 65 78 61 63 74 6C 79 20 | est not exactly  |
  687. X| 74 68 72 65 65 20 61 72 67 75 6D 65 6E 74 73 20 | three arguments  |
  688. X| 28 69 6E 63 6C 75 64 65 73 20 76 73 6B 69 70 29 | (includes vskip) |
  689. X| 2E 0A 40 74 20 76 73 6B 69 70 0A 40 74 20 76 73 | ..@t vskip.@t vs |
  690. X| 6B 69 70 20 6F 6E 65 0A 40 74 20 76 73 6B 69 70 | kip one.@t vskip |
  691. X| 20 6F 6E 65 20 74 77 6F 20 74 68 72 65 65 20 66 |  one two three f |
  692. X| 6F 75 72 0A 0A 32 2E 20 54 65 73 74 20 74 68 69 | our..2. Test thi |
  693. X| 72 64 20 61 72 67 75 6D 65 6E 74 20 6E 6F 74 20 | rd argument not  |
  694. X| 22 6D 6D 22 2E 0A 40 74 20 76 73 6B 69 70 20 33 | "mm"..@t vskip 3 |
  695. X| 32 20 78 78 0A 0A 33 2E 20 54 65 73 74 20 73 65 | 2 xx..3. Test se |
  696. X| 63 6F 6E 64 20 61 72 67 75 6D 65 6E 74 20 68 61 | cond argument ha |
  697. X| 73 20 62 61 64 20 64 69 67 69 74 2E 0A 40 74 20 | s bad digit..@t  |
  698. X| 76 73 6B 69 70 20 33 66 20 6D 6D 0A 0A 34 2E 20 | vskip 3f mm..4.  |
  699. X| 54 65 73 74 20 6E 75 6D 62 65 72 20 68 61 73 20 | Test number has  |
  700. X| 6D 6F 72 65 20 74 68 61 6E 20 74 68 72 65 65 20 | more than three  |
  701. X| 64 69 67 69 74 73 0A 0A 40 74 20 76 73 6B 69 70 | digits..@t vskip |
  702. X| 20 34 33 35 35 20 6D 6D 0A 0A 35 2E 20 54 65 73 |  4355 mm..5. Tes |
  703. X| 74 20 61 20 6C 65 67 61 6C 20 6F 6E 65 20 74 6F | t a legal one to |
  704. X| 6F 2E 0A 40 74 20 76 73 6B 69 70 20 32 30 20 6D | o..@t vskip 20 m |
  705. X| 6D 0A 0A                                        | m..              |
  706. X+-------------------------------------------------+------------------+
  707. X
  708. X
  709. X=========================== Start of LINE LIST DUMP ============================
  710. X
  711. Globl Local| Text
  712. X-----------+--------------------------------------------------------------------
  713. X00001 00001| SC27: Test syntax checking of vskip typesetting directive.<010>
  714. X00002 00002| <010>
  715. X00003 00003| 1. Test not exactly three arguments (includes vskip).<010>
  716. X00004 00004| @t vskip<010>
  717. X00005 00005| @t vskip one<010>
  718. X00006 00006| @t vskip one two three four<010>
  719. X00007 00007| <010>
  720. X00008 00008| 2. Test third argument not "mm".<010>
  721. X00009 00009| @t vskip 32 xx<010>
  722. X00010 00010| <010>
  723. X00011 00011| 3. Test second argument has bad digit.<010>
  724. X00012 00012| @t vskip 3f mm<010>
  725. X00013 00013| <010>
  726. X00014 00014| 4. Test number has more than three digits<010>
  727. X00015 00015| <010>
  728. X00016 00016| @t vskip 4355 mm<010>
  729. X00017 00017| <010>
  730. X00018 00018| 5. Test a legal one too.<010>
  731. X00019 00019| @t vskip 20 mm<010>
  732. X00020 00020| <010>
  733. X00021 00021| <End-Of-File><010>
  734. X-----------+--------------------------------------------------------------------
  735. Globl Local| Text
  736. X
  737. X============================ End of LINE LIST DUMP =============================
  738. X
  739. X
  740. X=========================== Start of TOKEN LIST DUMP ===========================
  741. X
  742. Summary: There are 8 tokens in the token list.
  743. X
  744. Line[Column]: Token Description
  745. X-------------------------------
  746. X
  747. X0001[01]: Text. Text scrap[Grey]="SC27: Test syntax checking of vskip typesetting directive.<010>
  748. X<010>
  749. X1. Test not exactly three arguments (includes vskip).<010>
  750. X"
  751. X0007[01]: Text. Text scrap[Grey]="<010>
  752. X2. Test third argument not "mm".<010>
  753. X"
  754. X0010[01]: Text. Text scrap[Grey]="<010>
  755. X3. Test second argument has bad digit.<010>
  756. X"
  757. X0013[01]: Text. Text scrap[Grey]="<010>
  758. X4. Test number has more than three digits<010>
  759. X<010>
  760. X"
  761. X0017[01]: Text. Text scrap[Grey]="<010>
  762. X5. Test a legal one too.<010>
  763. X"
  764. X0019[01]: @t.. Vertical skip. Vertical space skipped=20mm.
  765. X0020[01]: Text. Text scrap[White]="<010>
  766. X"
  767. X0021[01]: End Of File. 
  768. X============================ End of TOKEN LIST DUMP ============================
  769. X
  770. Macro table dump skipped (Parser was not invoked).
  771. Document list dump skipped (Parser was not invoked).
  772. X
  773. Global Local| Input File
  774. X------------+-------------------------------------------------------------------
  775. X     1     1| SC27: Test syntax checking of vskip typesetting directive.
  776. X     2     2| 
  777. X     3     3| 1. Test not exactly three arguments (includes vskip).
  778. X     4     4| @t vskip
  779. X       Error|.^This directive has the wrong number of arguments.
  780. X            |.^The correct format is: "@t vskip <num> mm".
  781. X            |.^Directive ignored.
  782. X     5     5| @t vskip one
  783. X       Error|.^This directive has the wrong number of arguments.
  784. X            |.^The correct format is: "@t vskip <num> mm".
  785. X            |.^Directive ignored.
  786. X     6     6| @t vskip one two three four
  787. X       Error|.^This directive has the wrong number of arguments.
  788. X            |.^The correct format is: "@t vskip <num> mm".
  789. X            |.^Directive ignored.
  790. X     7     7| 
  791. X     8     8| 2. Test third argument not "mm".
  792. X     9     9| @t vskip 32 xx
  793. X            |.^The correct format is: "@t vskip <num> mm".
  794. X            |.^Directive ignored.
  795. X       Error|.............^Expecting "mm".
  796. X    10    10| 
  797. X    11    11| 3. Test second argument has bad digit.
  798. X    12    12| @t vskip 3f mm
  799. X       Error|...........^Illegal digit.
  800. X            |...........^Value must consist entirely of decimal digits.
  801. X            |...........^Directive ignored.
  802. X    13    13| 
  803. X    14    14| 4. Test number has more than three digits
  804. X    15    15| 
  805. X    16    16| @t vskip 4355 mm
  806. X       Error|..........^Too many digits. The maximum is three.
  807. X            |..........^Directive ignored.
  808. X    17    17| 
  809. X    18    18| 5. Test a legal one too.
  810. X    19    19| @t vskip 20 mm
  811. X    20    20| 
  812. X            | <End-Of-File>
  813. X------------+-------------------------------------------------------------------
  814. X
  815. There were 6 Errors.
  816. END_OF_FILE
  817. if test 6024 -ne `wc -c <'answers/sc27.lis'`; then
  818.     echo shar: \"'answers/sc27.lis'\" unpacked with wrong size!
  819. fi
  820. # end of 'answers/sc27.lis'
  821. fi
  822. if test -f 'answers/sc29.lis' -a "${1}" != "-c" ; then 
  823.   echo shar: Will not clobber existing file \"'answers/sc29.lis'\"
  824. else
  825. echo shar: Extracting \"'answers/sc29.lis'\" \(6904 characters\)
  826. sed "s/^X//" >'answers/sc29.lis' <<'END_OF_FILE'
  827. XFUNNELWEB LISTING FILE
  828. X======================
  829. X
  830. Dump of mapped file "<<Suppressed>>".
  831. X
  832. MEMORY DUMP OF MAPPED FILE
  833. X==========================
  834. X
  835. X+-------------------------------------------------+------------------+
  836. X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
  837. X+-------------------------------------------------+------------------+
  838. X| 53 43 32 39 3A 20 54 65 73 74 20 73 79 6E 74 61 | SC29: Test synta |
  839. X| 78 20 63 68 65 63 6B 69 6E 67 20 6F 66 20 74 79 | x checking of ty |
  840. X| 70 65 73 65 74 74 65 72 20 70 72 61 67 6D 61 2E | pesetter pragma. |
  841. X| 0A 0A 31 2E 20 54 65 73 74 20 6E 6F 74 20 74 68 | ..1. Test not th |
  842. X| 72 65 65 20 61 72 67 75 6D 65 6E 74 73 2E 0A 40 | ree arguments..@ |
  843. X| 70 20 74 79 70 65 73 65 74 74 65 72 0A 40 70 20 | p typesetter.@p  |
  844. X| 74 79 70 65 73 65 74 74 65 72 20 3D 0A 40 70 20 | typesetter =.@p  |
  845. X| 74 79 70 65 73 65 74 74 65 72 20 3D 20 78 78 78 | typesetter = xxx |
  846. X| 20 79 79 79 0A 0A 32 2E 20 54 65 73 74 20 73 65 |  yyy..2. Test se |
  847. X| 63 6F 6E 64 20 61 72 67 75 6D 65 6E 74 20 6E 6F | cond argument no |
  848. X| 74 20 22 3D 22 2E 0A 40 70 20 74 79 70 65 73 65 | t "="..@p typese |
  849. X| 74 74 65 72 20 78 20 73 6C 6F 74 68 0A 0A 33 2E | tter x sloth..3. |
  850. X| 20 54 65 73 74 20 74 68 69 72 64 20 61 72 67 75 |  Test third argu |
  851. X| 6D 65 6E 74 20 69 73 20 6E 6F 74 20 6C 65 67 61 | ment is not lega |
  852. X| 6C 2E 0A 40 70 20 74 79 70 65 73 65 74 74 65 72 | l..@p typesetter |
  853. X| 20 3D 20 73 6C 6F 74 68 0A 0A 34 2E 20 54 65 73 |  = sloth..4. Tes |
  854. X| 74 20 74 68 69 72 64 20 61 72 67 75 6D 65 6E 74 | t third argument |
  855. X| 20 69 73 20 6E 6F 6E 65 2E 0A 40 70 20 74 79 70 |  is none..@p typ |
  856. X| 65 73 65 74 74 65 72 20 3D 20 6E 6F 6E 65 0A 0A | esetter = none.. |
  857. X| 35 2E 20 54 65 73 74 20 74 68 69 72 64 20 61 72 | 5. Test third ar |
  858. X| 67 75 6D 65 6E 74 20 69 73 20 74 65 78 2E 0A 36 | gument is tex..6 |
  859. X| 2E 20 54 65 73 74 20 70 72 61 67 6D 61 20 6F 70 | . Test pragma op |
  860. X| 70 6F 73 65 73 20 65 61 72 6C 69 65 72 20 70 72 | poses earlier pr |
  861. X| 61 67 6D 61 2E 0A 40 70 20 74 79 70 65 73 65 74 | agma..@p typeset |
  862. X| 74 65 72 20 3D 20 74 65 78 0A 0A 37 2E 20 54 65 | ter = tex..7. Te |
  863. X| 73 74 20 70 72 61 67 6D 61 20 64 6F 65 73 20 6E | st pragma does n |
  864. X| 6F 74 20 6F 70 70 6F 73 65 20 65 61 72 6C 69 65 | ot oppose earlie |
  865. X| 72 20 70 72 61 67 6D 61 2E 0A 40 70 20 74 79 70 | r pragma..@p typ |
  866. X| 65 73 65 74 74 65 72 20 3D 20 6E 6F 6E 65 0A 0A | esetter = none.. |
  867. X+-------------------------------------------------+------------------+
  868. X
  869. X
  870. X=========================== Start of LINE LIST DUMP ============================
  871. X
  872. Globl Local| Text
  873. X-----------+--------------------------------------------------------------------
  874. X00001 00001| SC29: Test syntax checking of typesetter pragma.<010>
  875. X00002 00002| <010>
  876. X00003 00003| 1. Test not three arguments.<010>
  877. X00004 00004| @p typesetter<010>
  878. X00005 00005| @p typesetter =<010>
  879. X00006 00006| @p typesetter = xxx yyy<010>
  880. X00007 00007| <010>
  881. X00008 00008| 2. Test second argument not "=".<010>
  882. X00009 00009| @p typesetter x sloth<010>
  883. X00010 00010| <010>
  884. X00011 00011| 3. Test third argument is not legal.<010>
  885. X00012 00012| @p typesetter = sloth<010>
  886. X00013 00013| <010>
  887. X00014 00014| 4. Test third argument is none.<010>
  888. X00015 00015| @p typesetter = none<010>
  889. X00016 00016| <010>
  890. X00017 00017| 5. Test third argument is tex.<010>
  891. X00018 00018| 6. Test pragma opposes earlier pragma.<010>
  892. X00019 00019| @p typesetter = tex<010>
  893. X00020 00020| <010>
  894. X00021 00021| 7. Test pragma does not oppose earlier pragma.<010>
  895. X00022 00022| @p typesetter = none<010>
  896. X00023 00023| <010>
  897. X00024 00024| <End-Of-File><010>
  898. X-----------+--------------------------------------------------------------------
  899. Globl Local| Text
  900. X
  901. X============================ End of LINE LIST DUMP =============================
  902. X
  903. X
  904. X=========================== Start of TOKEN LIST DUMP ===========================
  905. X
  906. Summary: There are 8 tokens in the token list.
  907. X
  908. Line[Column]: Token Description
  909. X-------------------------------
  910. X
  911. X0001[01]: Text. Text scrap[Grey]="SC29: Test syntax checking of typesetter pragma.<010>
  912. X<010>
  913. X1. Test not three arguments.<010>
  914. X"
  915. X0007[01]: Text. Text scrap[Grey]="<010>
  916. X2. Test second argument not "=".<010>
  917. X"
  918. X0010[01]: Text. Text scrap[Grey]="<010>
  919. X3. Test third argument is not legal.<010>
  920. X"
  921. X0013[01]: Text. Text scrap[Grey]="<010>
  922. X4. Test third argument is none.<010>
  923. X"
  924. X0016[01]: Text. Text scrap[Grey]="<010>
  925. X5. Test third argument is tex.<010>
  926. X6. Test pragma opposes earlier pragma.<010>
  927. X"
  928. X0020[01]: Text. Text scrap[Grey]="<010>
  929. X7. Test pragma does not oppose earlier pragma.<010>
  930. X"
  931. X0023[01]: Text. Text scrap[White]="<010>
  932. X"
  933. X0024[01]: End Of File. 
  934. X============================ End of TOKEN LIST DUMP ============================
  935. X
  936. Macro table dump skipped (Parser was not invoked).
  937. Document list dump skipped (Parser was not invoked).
  938. X
  939. Global Local| Input File
  940. X------------+-------------------------------------------------------------------
  941. X     1     1| SC29: Test syntax checking of typesetter pragma.
  942. X     2     2| 
  943. X     3     3| 1. Test not three arguments.
  944. X     4     4| @p typesetter
  945. X       Error|.^This typesetter pragma has the wrong number of arguments.
  946. X            |.^The correct format is: "@p typesetter = none|tex".
  947. X            |.^Pragma ignored.
  948. X     5     5| @p typesetter =
  949. X       Error|.^This typesetter pragma has the wrong number of arguments.
  950. X            |.^The correct format is: "@p typesetter = none|tex".
  951. X            |.^Pragma ignored.
  952. X     6     6| @p typesetter = xxx yyy
  953. X       Error|.^This typesetter pragma has the wrong number of arguments.
  954. X            |.^The correct format is: "@p typesetter = none|tex".
  955. X            |.^Pragma ignored.
  956. X     7     7| 
  957. X     8     8| 2. Test second argument not "=".
  958. X     9     9| @p typesetter x sloth
  959. X            |.^The correct format is: "@p typesetter = none|tex".
  960. X            |.^Pragma ignored.
  961. X       Error|...............^Expecting "=".
  962. X    10    10| 
  963. X    11    11| 3. Test third argument is not legal.
  964. X    12    12| @p typesetter = sloth
  965. X            |.^The correct format is: "@p typesetter = none|tex".
  966. X            |.^Pragma ignored.
  967. X       Error|.................^Expecting either "none" or "tex".
  968. X    13    13| 
  969. X    14    14| 4. Test third argument is none.
  970. X    15    15| @p typesetter = none
  971. X            |.^This pragma is opposed by the pragma at line 19.
  972. X    16    16| 
  973. X    17    17| 5. Test third argument is tex.
  974. X    18    18| 6. Test pragma opposes earlier pragma.
  975. X    19    19| @p typesetter = tex
  976. X       Error|.^This pragma opposes the pragma at line 15.
  977. X            |.^You can have as many typesetter pragmas as you like,
  978. X            |.^but they all have to be the same!
  979. X            |.^Pragma ignored.
  980. X    20    20| 
  981. X    21    21| 7. Test pragma does not oppose earlier pragma.
  982. X    22    22| @p typesetter = none
  983. X    23    23| 
  984. X            | <End-Of-File>
  985. X------------+-------------------------------------------------------------------
  986. X
  987. There were 6 Errors.
  988. END_OF_FILE
  989. if test 6904 -ne `wc -c <'answers/sc29.lis'`; then
  990.     echo shar: \"'answers/sc29.lis'\" unpacked with wrong size!
  991. fi
  992. # end of 'answers/sc29.lis'
  993. fi
  994. if test -f 'hackman/h_ch0.tex' -a "${1}" != "-c" ; then 
  995.   echo shar: Will not clobber existing file \"'hackman/h_ch0.tex'\"
  996. else
  997. echo shar: Extracting \"'hackman/h_ch0.tex'\" \(6015 characters\)
  998. sed "s/^X//" >'hackman/h_ch0.tex' <<'END_OF_FILE'
  999. X%==============================================================================%
  1000. X%                                 Start of Ch0.tex                             %
  1001. X%==============================================================================%
  1002. X%
  1003. X% Copyright
  1004. X% ---------
  1005. X% Copyright (C) 1992 Ross N. Williams.
  1006. X% This file contains a chapter of the FunnelWeb Hacker's Manual.
  1007. X% See the main TeX file for this manual for further information.
  1008. X%
  1009. X%==============================================================================%
  1010. X
  1011. X\vbox{\relax}
  1012. X\vfill
  1013. X
  1014. X\hrule
  1015. X
  1016. X\medskip
  1017. X
  1018. Copyright \copyright{} 1992 Ross~N.~Williams.
  1019. X\xn{Ross}{Williams}\xx{copyright}{notice}
  1020. X
  1021. Permission is granted to make and distribute verbatim copies of this manual
  1022. provided that the copyright notice and this permission notice are preserved
  1023. on all copies.\note{This paragraph was copied from the GNU Emacs manual to
  1024. avoid my having to get a legal opinion on something I could cook up.}
  1025. X
  1026. X\medskip
  1027. X
  1028. X\hrule
  1029. X
  1030. X\newpage
  1031. X
  1032. X%==============================================================================
  1033. X
  1034. X\tableofcontents
  1035. X
  1036. X\newpage
  1037. X
  1038. X%==============================================================================
  1039. X
  1040. X%I am not using LaTeX's figures and tables numbering so these are commented out.
  1041. X%\pseudochapter{List of Figures}
  1042. X%\pseudochapter{List of Tables}
  1043. X
  1044. X%==============================================================================
  1045. X
  1046. X% No forward.
  1047. X%\pseudochapter{Foreword}
  1048. X%\x{foreword}
  1049. X
  1050. X%==============================================================================
  1051. X
  1052. X\pseudochapter{Preface}
  1053. X\x{preface}
  1054. X
  1055. This manual is for hackers! Anyone who wants to
  1056. bash,
  1057. diddle,
  1058. frob,
  1059. grind,
  1060. mangle,
  1061. patch,
  1062. poke,
  1063. toggle,
  1064. twiddle,
  1065. zap,
  1066. or generally hack FunnelWeb should at least take a look at this manual.
  1067. X
  1068. This document has been created to serve two purposes:
  1069. X
  1070. X\begin{enumerate}
  1071. X
  1072. X\item To act as a repository for specific design and implementation
  1073. information not appropriate to be included in program comments.
  1074. X
  1075. X\item To guide those interested in modifying the program.
  1076. X
  1077. X\end{enumerate}
  1078. X
  1079. As a result, this document has grown in fits and starts.
  1080. This manual is not a particularly polished or well-balanced document
  1081. but it should be of assistance to those (including myself) involved with
  1082. modifying FunnelWeb.
  1083. X
  1084. X\bigskip
  1085. X
  1086. X\leftline{\b{Ross~N.~Williams}}
  1087. X\leftline{\b{Adelaide, Australia}}
  1088. X\leftline{\b{May~1992}}
  1089. X
  1090. X%==============================================================================
  1091. X
  1092. X\pseudochapter{Acknowledgements}
  1093. X\x{acknowledgements}
  1094. X
  1095. Many thanks to \b{David Hulse}\xn{David}{Hulse}
  1096. X(\p{dave@cs.adelaide.edu.au}) for
  1097. translating the original version of FunnelWeb
  1098. X(FunnelWeb~V1) from Ada\x{Ada} into~C
  1099. and getting it to work on Unix and a PC.
  1100. The C code written by David (FunnelWeb~V2) formed
  1101. the basis of FunnelWeb~V3, but was
  1102. entirely rewritten during the intensive refinement and feature-injection
  1103. period leading up to this release (FunnelWeb~V3 is about three times
  1104. the size of FunnelWeb~V2).
  1105. Nevertheless, without this important first translation step,
  1106. I would probably not have found the motivation to develop FunnelWeb to its
  1107. present state.
  1108. X
  1109. Thanks go to \b{Simon Hackett}\xn{Simon}{Hackett}
  1110. X(\p{simon@internode.com.au}) of Internode Systems
  1111. Pty Ltd for the use of his Sun, Mac, and PC, for assistance in porting
  1112. XFunnelWeb to the Sun and PC, and for helpful discussions.
  1113. X
  1114. Thanks go to \b{Jeremy Begg}\xn{Jeremy}{Begg}
  1115. X(\p{jeremy@vsm.com.au}) of VSM Software Services
  1116. for the use of his VAX, and for assistance with the VMS-specific code.
  1117. X
  1118. Thanks to \b{Barry Dwyer}\xn{Barry}{Dwyer} (\p{dwyer@cs.adelaide.edu.au})
  1119. and \b{Roger Brissenden}\xn{Roger}{Brissenden} (\p{rjb@koala.harvard.edu})
  1120. for trying out FunnelWeb Version~1 in 1987 and providing valuable feedback.
  1121. X
  1122. Thanks to Donald Knuth\xn{Donald}{Knuth}
  1123. for establishing the idea of literate programming in the first place.
  1124. X
  1125. X\bigskip
  1126. X
  1127. X\leftline{\b{Ross~N.~Williams}}
  1128. X\leftline{\b{Adelaide, Australia}}
  1129. X\leftline{\b{May~1992}}
  1130. X
  1131. X%==============================================================================
  1132. X
  1133. X\pseudochapter{Presentation Notes}
  1134. X\x{presentation notes}
  1135. X
  1136. X\thing{References:} All references are set in bold and are
  1137. cited in square brackets in the form
  1138. X\b{[}$<$\i{firstauthor}$><$\i{year}$>$\b{]}.
  1139. All references cited in the text appear in the reference list and the index.
  1140. X
  1141. X\thing{Special terms:} New or important terminology has been set in bold
  1142. face and appears in the index.
  1143. X
  1144. X\thing{Typesetting:} This\x{typesetting}
  1145. document was prepared by the author using Andrew
  1146. Trevorrow's\xn{Andrew}{Trevorrow} (\p{akt150@cscgpo.anu.edu.au})\checked{}
  1147. implementation (OzTeX\x{OzTeX}) of the
  1148. X\TeX{}/\LaTeX{}\paper{Knuth84}\paper{Lamport86}\x{TeX}\x{LaTeX}
  1149. typesetting system running on a Macintosh-SE.\x{Macintosh}
  1150. X
  1151. X\thing{Graphics:} All diagrams have been constructed out of text using
  1152. the \LaTeX{}\x{LaTeX} \p{verbatim} environment so as to allow this document to
  1153. be disseminated electronically and printed using \LaTeX{} without access
  1154. to the author's drawing tools.
  1155. X
  1156. X% I think I've got rid of all the fix-it-up footnotes.
  1157. X%\thing{Correction footnotes:} Footnotes\x{footnotes}
  1158. X%commencing with dots ($\bullet$) are
  1159. X%notes to remind the author about something in the document that must be
  1160. X%attended to.\fix{This is an example of such a footnote.} These footnotes
  1161. X%will be attended to and eliminated in later versions.
  1162. X
  1163. X\thing{Known typesetting problems:} While every attempt has been made
  1164. to give a good presentation within the
  1165. time available, some shortcuts have had to be taken. In particular, the author
  1166. has
  1167. been unable to work out how to get \LaTeX{} to suppress blank pages at the
  1168. start of chapters.
  1169. X
  1170. X%==============================================================================
  1171. X
  1172. X% No abstract.
  1173. X%\pseudochapter{Abstract}
  1174. X%\x{abstract}
  1175. X
  1176. X%==============================================================================%
  1177. X%                                End of Ch0.tex                                %
  1178. X%==============================================================================%
  1179. END_OF_FILE
  1180. if test 6015 -ne `wc -c <'hackman/h_ch0.tex'`; then
  1181.     echo shar: \"'hackman/h_ch0.tex'\" unpacked with wrong size!
  1182. fi
  1183. # end of 'hackman/h_ch0.tex'
  1184. fi
  1185. if test -f 'hackman/h_manual.aux' -a "${1}" != "-c" ; then 
  1186.   echo shar: Will not clobber existing file \"'hackman/h_manual.aux'\"
  1187. else
  1188. echo shar: Extracting \"'hackman/h_manual.aux'\" \(7539 characters\)
  1189. sed "s/^X//" >'hackman/h_manual.aux' <<'END_OF_FILE'
  1190. X\relax 
  1191. X\@writefile{toc}{\string\contentsline\space {chapter}{Preface}{5}}
  1192. X\@writefile{toc}{\string\contentsline\space {chapter}{Acknowledgements}{7}}
  1193. X\@writefile{toc}{\string\contentsline\space {chapter}{Presentation Notes}{9}}
  1194. X\@writefile{toc}{\string\contentsline\space {chapter}{\string\numberline\space {1}FunnelWeb Design}{11}}
  1195. X\@writefile{lof}{\string\addvspace\space {10pt}}
  1196. X\@writefile{lot}{\string\addvspace\space {10pt}}
  1197. X\newlabel{chapdesign}{{1}{11}}
  1198. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.1}Motivation for FunnelWeb}{11}}
  1199. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.2}Indentation}{12}}
  1200. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.3}Review of FunnelWeb Syntax}{14}}
  1201. X\@writefile{toc}{\string\contentsline\space {subsection}{\string\numberline\space {1.3.1}Review of Macro Definition Syntax}{14}}
  1202. X\@writefile{toc}{\string\contentsline\space {subsection}{\string\numberline\space {1.3.2}Review of Macro Call Syntax}{16}}
  1203. X\@writefile{toc}{\string\contentsline\space {subsection}{\string\numberline\space {1.3.3}Review of Parameterized Macro Call Syntax}{16}}
  1204. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.4}Document Structuring}{16}}
  1205. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.5}Discussion of Some Miscellaneous Issues}{18}}
  1206. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.6}Automated Regression Testing}{18}}
  1207. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.7}Command Line Interface}{18}}
  1208. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.8}File Name Management}{19}}
  1209. X\@writefile{toc}{\string\contentsline\space {subsection}{\string\numberline\space {1.8.1}Filename Extensions}{20}}
  1210. X\@writefile{toc}{\string\contentsline\space {subsection}{\string\numberline\space {1.8.2}Filename Inheritance}{20}}
  1211. X\@writefile{toc}{\string\contentsline\space {subsection}{\string\numberline\space {1.8.3}Portable Structure of File Names}{21}}
  1212. X\newlabel{portablefilenames}{{1.8.3}{21}}
  1213. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.9}Specifying Constraints on the Number of Instantiations}{22}}
  1214. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.10}The Relationship Between Document Structure and Macro Structure}{23}}
  1215. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.11}Diagnostic Messages}{25}}
  1216. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {1.12}Summary}{25}}
  1217. X\@writefile{toc}{\string\contentsline\space {chapter}{\string\numberline\space {2}FunnelWeb Implementation}{27}}
  1218. X\@writefile{lof}{\string\addvspace\space {10pt}}
  1219. X\@writefile{lot}{\string\addvspace\space {10pt}}
  1220. X\newlabel{chapimplementation}{{2}{27}}
  1221. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.1}Introduction}{27}}
  1222. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.2}History of FunnelWeb Implementations}{27}}
  1223. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.3}Why FunnelWeb Wasn't Used to Write Itself}{28}}
  1224. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.4}Coding Style}{28}}
  1225. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.5}Use of Memory}{29}}
  1226. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.6}The Heap}{29}}
  1227. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.7}The Stack}{30}}
  1228. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.8}Static Variables}{30}}
  1229. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {2.9}Implementing Text Indentation}{30}}
  1230. X\@writefile{toc}{\string\contentsline\space {chapter}{\string\numberline\space {3}FunnelWeb Modification}{35}}
  1231. X\@writefile{lof}{\string\addvspace\space {10pt}}
  1232. X\@writefile{lot}{\string\addvspace\space {10pt}}
  1233. X\newlabel{chapmod}{{3}{35}}
  1234. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.1}Introduction}{35}}
  1235. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.2}The Danger of Modifying Languages}{35}}
  1236. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.3}Authority vs User Security}{36}}
  1237. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.4}What I Want to Protect}{37}}
  1238. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.5}Modifying the Manuals}{38}}
  1239. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.6}How Copyright Law Works}{38}}
  1240. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.7}Management of the Official FunnelWeb}{39}}
  1241. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.8}A GNU Version?}{41}}
  1242. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {3.9}Summary}{41}}
  1243. X\@writefile{toc}{\string\contentsline\space {chapter}{\string\numberline\space {4}FunnelWeb Future}{43}}
  1244. X\@writefile{lof}{\string\addvspace\space {10pt}}
  1245. X\@writefile{lot}{\string\addvspace\space {10pt}}
  1246. X\newlabel{chapfuture}{{4}{43}}
  1247. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.1}Documentation}{43}}
  1248. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.2}Command Line Interface}{43}}
  1249. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.3}Shell Interpreter}{43}}
  1250. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.4}Language Design}{44}}
  1251. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.5}Scanner/Mapper}{44}}
  1252. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.6}Parser}{45}}
  1253. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.7}Analyser}{45}}
  1254. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.8}Tangle}{45}}
  1255. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.9}Weave}{45}}
  1256. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.10}Lister}{46}}
  1257. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.11}Diagnostics}{47}}
  1258. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.12}Speed}{47}}
  1259. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.13}Correctness}{47}}
  1260. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.14}Test Suite}{47}}
  1261. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.15}Machine-Specific Changes}{48}}
  1262. X\@writefile{toc}{\string\contentsline\space {section}{\string\numberline\space {4.16}Summary}{48}}
  1263. X\@writefile{toc}{\string\contentsline\space {chapter}{\string\numberline\space {A}GNU General Public License Version 2}{49}}
  1264. X\@writefile{lof}{\string\addvspace\space {10pt}}
  1265. X\@writefile{lot}{\string\addvspace\space {10pt}}
  1266. X\@writefile{toc}{\string\contentsline\space {chapter}{\string\numberline\space {B}References}{57}}
  1267. X\@writefile{lof}{\string\addvspace\space {10pt}}
  1268. X\@writefile{lot}{\string\addvspace\space {10pt}}
  1269. X\@writefile{toc}{\string\contentsline\space {chapter}{Index}{57}}
  1270. END_OF_FILE
  1271. if test 7539 -ne `wc -c <'hackman/h_manual.aux'`; then
  1272.     echo shar: \"'hackman/h_manual.aux'\" unpacked with wrong size!
  1273. fi
  1274. # end of 'hackman/h_manual.aux'
  1275. fi
  1276. if test -f 'hackman/h_manual.log' -a "${1}" != "-c" ; then 
  1277.   echo shar: Will not clobber existing file \"'hackman/h_manual.log'\"
  1278. else
  1279. echo shar: Extracting \"'hackman/h_manual.log'\" \(4470 characters\)
  1280. sed "s/^X//" >'hackman/h_manual.log' <<'END_OF_FILE'
  1281. This is TeX, Version 3.0 (preloaded format=lplain 90.9.16)  27 MAY 1992 12:56
  1282. X**&LaTeX h_manual.tex
  1283. X(h_manual.tex
  1284. LaTeX Version 2.09 <13 Jun 1989>
  1285. X(:TeX-inputs:book.sty
  1286. Document Style `book' <24 May 89>.
  1287. X(:TeX-inputs:bk10.sty)
  1288. X\descriptionmargin=\dimen99
  1289. X\c@part=\count78
  1290. X\c@chapter=\count79
  1291. X\c@section=\count80
  1292. X\c@subsection=\count81
  1293. X\c@subsubsection=\count82
  1294. X\c@paragraph=\count83
  1295. X\c@subparagraph=\count84
  1296. X\c@figure=\count85
  1297. X\c@table=\count86
  1298. X) (:TeX-inputs:titlepage.sty) [0
  1299. X
  1300. X
  1301. X]
  1302. X\@indexfile=\write3
  1303. X
  1304. Writing index file h_manual.idx 
  1305. X(h_manual.aux)
  1306. X(h_ch0.tex [1] [2
  1307. X
  1308. X] (h_manual.toc [3])
  1309. X\tf@toc=\write4
  1310. X [4] [5
  1311. X
  1312. X] [6
  1313. X
  1314. X]
  1315. Underfull \hbox (badness 10000) in paragraph at lines 120--123
  1316. X[]\tenrm Thanks to \tenbf Barry Dwyer[][] \tenrm (\tentt dwyer@cs.adelaide.edu.
  1317. au\tenrm ) and \tenbf Roger Bris-senden[][]
  1318. X
  1319. X\hbox(7.5+2.5)x426.79134, glue set 5.25278
  1320. X.\hbox(0.0+0.0)x0.0
  1321. X.\tenrm T
  1322. X.\tenrm h
  1323. X.\tenrm a
  1324. X.\tenrm n
  1325. X.etc.
  1326. X
  1327. X[7] [8
  1328. X
  1329. X]
  1330. Underfull \hbox (badness 5652) in paragraph at lines 146--152
  1331. X[]\tenbf Typesetting: \tenrm This[] doc-u-ment was pre-pared by the au-thor us-
  1332. ing An-drew Trevor-
  1333. X
  1334. X\hbox(6.94444+1.94444)x426.79134, glue set 3.83969
  1335. X.\hbox(0.0+0.0)x0.0
  1336. X.\tenbf T
  1337. X.\kern-0.31944
  1338. X.\tenbf y
  1339. X.\tenbf p
  1340. X.etc.
  1341. X
  1342. X
  1343. Underfull \hbox (badness 1117) in paragraph at lines 146--152
  1344. X\tenrm row's[][] (\tentt akt150@cscgpo.anu.edu.au\tenrm ) im-ple-men-ta-tion (O
  1345. z-TeX[]) of the T[]X/L[]T[]X\tenbf [Knuth84][]
  1346. X
  1347. X\hbox(7.5+3.01385)x426.79134, glue set 2.23746
  1348. X.\tenrm r
  1349. X.\tenrm o
  1350. X.\kern-0.27779
  1351. X.\tenrm w
  1352. X.\tenrm '
  1353. X.etc.
  1354. X
  1355. X) (h_ch1.tex [9] [10
  1356. X
  1357. X]
  1358. Chapter 1.
  1359. X[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24])
  1360. X(h_ch2.tex [25] [26
  1361. X
  1362. X]
  1363. Chapter 2.
  1364. X[27] [28] [29] [30] [31] [32]) (h_ch3.tex [33] [34
  1365. X
  1366. X]
  1367. Chapter 3.
  1368. X[35] [36] [37] [38] [39] [40]) (h_ch4.tex [41] [42
  1369. X
  1370. X]
  1371. Chapter 4.
  1372. X[43] [44] [45] [46] [47]) (h_cha.tex [48]
  1373. Appendix A.
  1374. X[49
  1375. X
  1376. X]
  1377. Underfull \vbox (badness 10000) has occurred while \output is active
  1378. X\vbox(682.86613+0.0)x426.79134
  1379. X.\glue(\topskip) 10.0
  1380. X.\hbox(0.0+0.0)x0.0
  1381. X.\glue(\parskip) 0.0
  1382. X.\glue(\baselineskip) 5.88889
  1383. X.\hbox(6.11111+2.22223)x426.79134, glue set 80.29436fil
  1384. X..\hbox(0.0+0.0)x0.0
  1385. X..\penalty 10000
  1386. X..\glue 5.24995
  1387. X..\penalty 10000
  1388. X..\glue 5.24995
  1389. X..etc.
  1390. X.etc.
  1391. X
  1392. X [50]
  1393. Underfull \vbox (badness 10000) has occurred while \output is active
  1394. X\vbox(682.86613+0.0)x426.79134
  1395. X.\glue(\topskip) 10.0
  1396. X.\hbox(0.0+0.0)x0.0
  1397. X.\glue(\parskip) 0.0
  1398. X.\glue(\baselineskip) 5.88889
  1399. X.\hbox(6.11111+2.22223)x426.79134, glue set 64.5445fil
  1400. X..\hbox(0.0+0.0)x0.0
  1401. X..\penalty 10000
  1402. X..\glue 5.24995
  1403. X..\penalty 10000
  1404. X..\glue 5.24995
  1405. X..etc.
  1406. X.etc.
  1407. X
  1408. X [51]
  1409. Underfull \vbox (badness 10000) has occurred while \output is active
  1410. X\vbox(682.86613+0.0)x426.79134
  1411. X.\glue(\topskip) 3.88889
  1412. X.\hbox(6.11111+0.0)x426.79134, glue set 64.5445fil
  1413. X..\hbox(0.0+0.0)x0.0
  1414. X..\penalty 10000
  1415. X..\glue 5.24995
  1416. X..\penalty 10000
  1417. X..\glue 5.24995
  1418. X..etc.
  1419. X.\glue(\parskip) 0.0
  1420. X.\glue(\baselineskip) 5.88889
  1421. X.\hbox(6.11111+2.22223)x426.79134, glue set 164.29362fil
  1422. X..\hbox(0.0+0.0)x0.0
  1423. X..\penalty 10000
  1424. X..\glue 5.24995
  1425. X..\penalty 10000
  1426. X..\glue 5.24995
  1427. X..etc.
  1428. X.etc.
  1429. X
  1430. X [52]
  1431. Underfull \vbox (badness 10000) has occurred while \output is active
  1432. X\vbox(682.86613+0.0)x426.79134
  1433. X.\glue(\topskip) 3.88889
  1434. X.\hbox(6.11111+2.22223)x426.79134, glue set 59.29454fil
  1435. X..\hbox(0.0+0.0)x0.0
  1436. X..\tentt L
  1437. X..\tentt i
  1438. X..\tentt c
  1439. X..\tentt e
  1440. X..etc.
  1441. X.\glue(\parskip) 0.0
  1442. X.\glue(\baselineskip) 3.66666
  1443. X.\hbox(6.11111+2.22223)x426.79134, glue set 90.79427fil
  1444. X..\hbox(0.0+0.0)x0.0
  1445. X..\tentt m
  1446. X..\tentt a
  1447. X..\tentt y
  1448. X..\penalty 10000
  1449. X..etc.
  1450. X.etc.
  1451. X
  1452. X [53]
  1453. Underfull \vbox (badness 10000) has occurred while \output is active
  1454. X\vbox(682.86613+0.0)x426.79134
  1455. X.\glue(\topskip) 3.88889
  1456. X.\hbox(6.11111+1.38887)x426.79134, glue set 38.29472fil
  1457. X..\hbox(0.0+0.0)x0.0
  1458. X..\penalty 10000
  1459. X..\glue 5.24995
  1460. X..\penalty 10000
  1461. X..\glue 5.24995
  1462. X..etc.
  1463. X.\glue(\parskip) 0.0
  1464. X.\glue(\baselineskip) 4.50002
  1465. X.\hbox(6.11111+1.38887)x426.79134, glue set 48.79463fil
  1466. X..\hbox(0.0+0.0)x0.0
  1467. X..\tentt F
  1468. X..\tentt O
  1469. X..\tentt R
  1470. X..\penalty 10000
  1471. X..etc.
  1472. X.etc.
  1473. X
  1474. X [54]
  1475. X[55] [56
  1476. X
  1477. X]
  1478. Appendix B.
  1479. X[57] (h_manual.sin [58
  1480. X
  1481. X] [59] [60]) [61
  1482. X
  1483. X]) (h_manual.aux) ) 
  1484. Here is how much of TeX's memory you used:
  1485. X 220 strings out of 1960
  1486. X 1908 string characters out of 13235
  1487. X 54264 words of memory out of 60001
  1488. X 2151 multiletter control sequences out of 2500
  1489. X 19914 words of font info for 75 fonts, out of 27000 for 100
  1490. X 14 hyphenation exceptions out of 307
  1491. X 15i,6n,15p,200b,226s stack positions out of 200i,40n,60p,500b,600s
  1492. X
  1493. Output written on h_manual.dvi (62 pages, 181584 bytes).
  1494. END_OF_FILE
  1495. if test 4470 -ne `wc -c <'hackman/h_manual.log'`; then
  1496.     echo shar: \"'hackman/h_manual.log'\" unpacked with wrong size!
  1497. fi
  1498. # end of 'hackman/h_manual.log'
  1499. fi
  1500. if test -f 'sources/as.h' -a "${1}" != "-c" ; then 
  1501.   echo shar: Will not clobber existing file \"'sources/as.h'\"
  1502. else
  1503. echo shar: Extracting \"'sources/as.h'\" \(6214 characters\)
  1504. sed "s/^X//" >'sources/as.h' <<'END_OF_FILE'
  1505. X/*##############################################################################
  1506. X
  1507. XFUNNNELWEB COPYRIGHT
  1508. X====================
  1509. XFunnelWeb is a literate-programming macro preprocessor.
  1510. X
  1511. Copyright (C) 1992 Ross N. Williams.
  1512. X
  1513. X   Ross N. Williams
  1514. X   ross@spam.adelaide.edu.au
  1515. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1516. X
  1517. This program is free software; you can redistribute it and/or modify
  1518. it under the terms of Version 2 of the GNU General Public License as
  1519. published by the Free Software Foundation.
  1520. X
  1521. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  1522. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1523. See Version 2 of the GNU General Public License for more details.
  1524. X
  1525. You should have received a copy of Version 2 of the GNU General Public
  1526. License along with this program. If not, you can FTP the license from
  1527. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  1528. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1529. X
  1530. Section 2a of the license requires that all changes to this file be
  1531. recorded prominently in this file. Please record all changes here.
  1532. X
  1533. Programmers:
  1534. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1535. X
  1536. Changes:
  1537. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  1538. X
  1539. X##############################################################################*/
  1540. X
  1541. X
  1542. X/******************************************************************************/
  1543. X/*                                      AS.H                                  */
  1544. X/******************************************************************************/
  1545. X/*                                                                            */
  1546. X/* ASSERTION PACKAGE                                                          */
  1547. X/* =================                                                          */
  1548. X/* This package contains macros and functions that support assertions. An     */
  1549. X/* assertion is a boolean condition that is supposed always to be true at a   */
  1550. X/* particular point during program execution. An assertion statement tests    */
  1551. X/* such a condition and bombs the program if it is false; better to be        */
  1552. X/* alerted to such a condition rather than suffer and erroneous execution.    */
  1553. X/*                                                                            */
  1554. X/* Standard C supports asertions with the <assert.h> header file providing    */
  1555. X/* the "assert" macro. Unfortunately, this does not meet the needs of         */
  1556. X/* FunnelWeb for two reasons:                                                 */
  1557. X/*                                                                            */
  1558. X/* 1) Portability is emphasised in FunnelWeb and the assert macro is fairly   */
  1559. X/*    recent. Its only argument is the boolean condition, which means that    */
  1560. X/*    without the ANSI macros __FILE__ and __LINE__, the macro would be       */
  1561. X/*    unable to indicate where an assertion failure occurred, in a non-ANSI   */
  1562. X/*    environment.                                                            */
  1563. X/*                                                                            */
  1564. X/* 2) There is only one assert macro and it can be either on or off, the      */
  1565. X/*    implication being that in production code, it should be turned off. In  */
  1566. X/*    contrast, the execution speed of the assert macro will usually matter   */
  1567. X/*    only in a small portion of the code as, in most programs, a small       */
  1568. X/*    portion of the code accounts for most of the execution time. By having  */
  1569. X/*    two categories of assertion, we can leave most of the assertions turned */
  1570. X/*    on in the production program.                                           */
  1571. X/*                                                                            */
  1572. X/* This reasoning leads to the slightly different assertion facilty provided  */
  1573. X/* by this package. Here, there are two assertion routines/macros, HOT        */
  1574. X/* assertions for HOT code (code in a program hot spot) and COLD assertions   */
  1575. X/* for COLD code (not in a hot spot). Only the HOT assertions can be turned   */
  1576. X/* off.                                                                       */
  1577. X/*                                                                            */
  1578. X/******************************************************************************/
  1579. X
  1580. X/* Ensure that the body of this header file is included at most once.         */
  1581. X#ifndef DONE_AS
  1582. X#define DONE_AS
  1583. X
  1584. X/******************************************************************************/
  1585. X
  1586. X#include "style.h"
  1587. X
  1588. X/******************************************************************************/
  1589. X
  1590. X/* The following #define determines whether hot assertions are to be turned   */
  1591. X/* on or off. Set to 0 for OFF and 1 for ON.                                  */
  1592. X/* Note: I have left hot assertions on in the production version as FunnelWeb */
  1593. X/*       doesn't go slowly enough to make me want to turn it off.             */
  1594. X#define AS_DOHOT 1
  1595. X
  1596. X/******************************************************************************/
  1597. X
  1598. XEXPORT void as_bomb P_((char *));
  1599. X/* This function writes out its argument string and then bombs the program.   */
  1600. X/* It should be called at any point where it has been determined that an      */
  1601. X/* illegal condition has been detected. The other assertion routines/macros   */
  1602. X/* call this function.                                                        */
  1603. X
  1604. X/* The following two macros define hot and cold assertions. Be sure never to  */
  1605. X/* call them with arguments with side effects!                                */
  1606. X#define as_cold(e,s) {if (!(e)) as_bomb(s);}
  1607. X
  1608. X#if AS_DOHOT
  1609. X#define as_hot(e,s)    {if (!(e)) as_bomb(s);}
  1610. X#define AS_HCODE(CODE) {CODE}
  1611. X#else
  1612. X#define as_hot(e,s)    ((void) 0)
  1613. X#define AS_HCODE(CODE) ((void) 0)
  1614. X#endif
  1615. X
  1616. X/******************************************************************************/
  1617. X
  1618. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  1619. X#endif
  1620. X
  1621. X/******************************************************************************/
  1622. X/*                                     AS.H                                   */
  1623. X/******************************************************************************/
  1624. END_OF_FILE
  1625. if test 6214 -ne `wc -c <'sources/as.h'`; then
  1626.     echo shar: \"'sources/as.h'\" unpacked with wrong size!
  1627. fi
  1628. # end of 'sources/as.h'
  1629. fi
  1630. if test -f 'sources/clock.h' -a "${1}" != "-c" ; then 
  1631.   echo shar: Will not clobber existing file \"'sources/clock.h'\"
  1632. else
  1633. echo shar: Extracting \"'sources/clock.h'\" \(5042 characters\)
  1634. sed "s/^X//" >'sources/clock.h' <<'END_OF_FILE'
  1635. X/*##############################################################################
  1636. X
  1637. XFUNNNELWEB COPYRIGHT
  1638. X====================
  1639. XFunnelWeb is a literate-programming macro preprocessor.
  1640. X
  1641. Copyright (C) 1992 Ross N. Williams.
  1642. X
  1643. X   Ross N. Williams
  1644. X   ross@spam.adelaide.edu.au
  1645. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1646. X
  1647. This program is free software; you can redistribute it and/or modify
  1648. it under the terms of Version 2 of the GNU General Public License as
  1649. published by the Free Software Foundation.
  1650. X
  1651. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  1652. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1653. See Version 2 of the GNU General Public License for more details.
  1654. X
  1655. You should have received a copy of Version 2 of the GNU General Public
  1656. License along with this program. If not, you can FTP the license from
  1657. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  1658. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1659. X
  1660. Section 2a of the license requires that all changes to this file be
  1661. recorded prominently in this file. Please record all changes here.
  1662. X
  1663. Programmers:
  1664. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1665. X
  1666. Changes:
  1667. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  1668. X
  1669. X##############################################################################*/
  1670. X
  1671. X
  1672. X/******************************************************************************/
  1673. X/*                                  CLOCK.H                                   */
  1674. X/******************************************************************************/
  1675. X/*                                                                            */
  1676. X/* This package implements a clock abstraction that is used to generate       */
  1677. X/* timing statistics which are useful for performance tuning. The package     */
  1678. X/* allows the measurement of both real and CPU time. This package gets its    */
  1679. X/* raw information from the tim_cpu() and tim_real() functions of the machine */
  1680. X/* dependent module "machin".                                                 */
  1681. X/*                                                                            */
  1682. X/******************************************************************************/
  1683. X
  1684. X/* Ensure that the body of this header file is included at most once.         */
  1685. X#ifndef DONE_CLOCK
  1686. X#define DONE_CLOCK
  1687. X
  1688. X/******************************************************************************/
  1689. X
  1690. X#include "style.h"
  1691. X
  1692. X/******************************************************************************/
  1693. X
  1694. X/* The following clock type is supposed to be an ADT so don't frob any of its */
  1695. X/* fields manually!                                                           */
  1696. typedef struct
  1697. X  {
  1698. X   ulong ck_mhead; /* Magic number helps detect corruptions.                  */
  1699. X   bool  ck_run;   /* TRUE iff the clock is running.                          */
  1700. X   float ck_csum;  /* Accumulated CPU time.                                   */
  1701. X   float ck_rsum;  /* Accumulated real time.                                  */
  1702. X   float ck_csta;  /* ck_run => CPU  time when clock was started.             */
  1703. X   float ck_rsta;  /* ck_run => Real time when clock was started.             */
  1704. X   ulong ck_mtail; /* Magic number helps detect corruptions.                  */
  1705. X  } ck_t;
  1706. X
  1707. typedef ck_t *p_ck_t;
  1708. X
  1709. X/******************************************************************************/
  1710. X
  1711. XEXPORT void ck_ini P_((p_ck_t));
  1712. X/* Initializes the clock. After this call, the argument clock will be in the  */
  1713. X/* STOPPED state and all its registers will be zero.  A clock must be         */
  1714. X/* initialized before any other operations are performed on it.               */
  1715. X
  1716. XEXPORT void ck_start P_((p_ck_t));
  1717. X/* Changes the clock from the STOPPED state to the RUNNING state. Starts      */
  1718. X/* accumulating real time and CPU time on its registers.                      */
  1719. X/* Raises an error if the clock is not in the STOPPED state.                  */
  1720. X
  1721. XEXPORT void ck_stop P_((p_ck_t));
  1722. X/* Changes the clock from the RUNNING state to the STOPPED state. Stops       */
  1723. X/* accumulating real time and CPU time on its registers.                      */
  1724. X/* Raises an error if the clock is not in the RUNNING state.                  */
  1725. X
  1726. XEXPORT float ck_cpu P_((p_ck_t));
  1727. X/* Returns the number of seconds of CPU time accumulated on the clock.        */
  1728. X/* Raises an error if the clock is not in the STOPPED state.                  */
  1729. X
  1730. XEXPORT float ck_real P_((p_ck_t));
  1731. X/* Returns the number of seconds of real time accumulated on the clock.       */
  1732. X/* Raises an error if the clock is not in the STOPPED state.                  */
  1733. X
  1734. X/******************************************************************************/
  1735. X
  1736. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  1737. X#endif
  1738. X
  1739. X/******************************************************************************/
  1740. X/*                              End of CLOCK.H                                */
  1741. X/******************************************************************************/
  1742. END_OF_FILE
  1743. if test 5042 -ne `wc -c <'sources/clock.h'`; then
  1744.     echo shar: \"'sources/clock.h'\" unpacked with wrong size!
  1745. fi
  1746. # end of 'sources/clock.h'
  1747. fi
  1748. if test -f 'sources/help_gnu.c' -a "${1}" != "-c" ; then 
  1749.   echo shar: Will not clobber existing file \"'sources/help_gnu.c'\"
  1750. else
  1751. echo shar: Extracting \"'sources/help_gnu.c'\" \(4941 characters\)
  1752. sed "s/^X//" >'sources/help_gnu.c' <<'END_OF_FILE'
  1753. X/*##############################################################################
  1754. X
  1755. XFUNNNELWEB COPYRIGHT
  1756. X====================
  1757. XFunnelWeb is a literate-programming macro preprocessor.
  1758. X
  1759. Copyright (C) 1992 Ross N. Williams.
  1760. X
  1761. X   Ross N. Williams
  1762. X   ross@spam.adelaide.edu.au
  1763. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1764. X
  1765. This program is free software; you can redistribute it and/or modify
  1766. it under the terms of Version 2 of the GNU General Public License as
  1767. published by the Free Software Foundation.
  1768. X
  1769. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  1770. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1771. See Version 2 of the GNU General Public License for more details.
  1772. X
  1773. You should have received a copy of Version 2 of the GNU General Public
  1774. License along with this program. If not, you can FTP the license from
  1775. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  1776. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1777. X
  1778. Section 2a of the license requires that all changes to this file be
  1779. recorded prominently in this file. Please record all changes here.
  1780. X
  1781. Programmers:
  1782. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1783. X
  1784. Changes:
  1785. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  1786. X
  1787. X##############################################################################*/
  1788. X
  1789. X
  1790. X/******************************************************************************/
  1791. X/*                                 HELP_GNU.C                                 */
  1792. X/******************************************************************************/
  1793. X/*                                                                            */
  1794. X/* REPRESENTING MESSAGES AS C CODE                                            */
  1795. X/* ===============================                                            */
  1796. X/* Experience has shown that it is much more reliable to code text messages   */
  1797. X/* into a program than to expect the program to track down text files         */
  1798. X/* containing the messages at run time. Worthwhile for smallish files (such   */
  1799. X/* as these help messages) at least. For this reason, all the messages in     */
  1800. X/* this module are represented by code (e.g. as in printf statements).        */
  1801. X/*                                                                            */
  1802. X/* There is no difficulty turning a short message into code; simply place it  */
  1803. X/* in output statements. However, large messages (e.g. the GNU license) are   */
  1804. X/* more tedious, and also present more of a problem if it is necessary to     */
  1805. X/* change them substantially at a later date. This problem has been solved in */
  1806. X/* FunnelWeb by writing a small program that reads a text file and writes out */
  1807. X/* C code that writes the text file. The files involved are:                  */
  1808. X/*                                                                            */
  1809. X/*    help_gnu.mes - The original message.                                    */
  1810. X/*    help_gnu.c   - C code to write out the original message.                */
  1811. X/*                                                                            */
  1812. X/* To turn help_gnu.mes into help_gnu.c, give the following command in        */
  1813. X/* FunnelWeb interactive mode: codify help_gnu.txt help_gnu.c                 */
  1814. X/*                                                                            */
  1815. X/******************************************************************************/
  1816. X
  1817. X#include "style.h"
  1818. X
  1819. X#include "help_gnu.h"
  1820. X
  1821. X/******************************************************************************/
  1822. X
  1823. X/* This module contains many many output statements that call an output       */
  1824. X/* function. To neaten up all these calls, we define a global variable to     */
  1825. X/* hold a pointer to the function and simple macro to write output using      */
  1826. X/* the function.                                                              */
  1827. LOCVAR void (*pf) P_((char *));
  1828. X
  1829. X#define WX(STR) (*pf)(STR);(*pf)("\n")
  1830. X#define WY(STR) (*pf)(STR)
  1831. X
  1832. X/******************************************************************************/
  1833. X
  1834. XEXPORT void hel_gnu (p_outf)
  1835. void (*p_outf) P_((char *));
  1836. X{
  1837. X pf=p_outf;
  1838. X WY("\n");
  1839. X WY("FunnelWeb License\n");
  1840. X WY("-----------------\n");
  1841. X WY("FunnelWeb is distributed under the following license.\n");
  1842. X WY("\n");
  1843. X WY("--<Start of GNU License>--\n");
  1844. X#include "help_gnu.ctx"
  1845. X WY("--<End of GNU License>--\n");
  1846. X WY("\n");
  1847. X WY("If all that scrolled off your screen too quickly, don't worry. You can\n");
  1848. X WY("capture this message (or any other FunnelWeb output) in a file by\n");
  1849. X WY("specifying the +J option when you invoke FunnelWeb. For example:\n");
  1850. X WY("\n");
  1851. X WY("       fw +hlicense +jresult.txt\n");
  1852. X WY("\n");
  1853. X}
  1854. X
  1855. X/******************************************************************************/
  1856. X/*                             End of HELP_GNU.C                              */
  1857. X/******************************************************************************/
  1858. END_OF_FILE
  1859. if test 4941 -ne `wc -c <'sources/help_gnu.c'`; then
  1860.     echo shar: \"'sources/help_gnu.c'\" unpacked with wrong size!
  1861. fi
  1862. # end of 'sources/help_gnu.c'
  1863. fi
  1864. if test -f 'sources/memory.h' -a "${1}" != "-c" ; then 
  1865.   echo shar: Will not clobber existing file \"'sources/memory.h'\"
  1866. else
  1867. echo shar: Extracting \"'sources/memory.h'\" \(6298 characters\)
  1868. sed "s/^X//" >'sources/memory.h' <<'END_OF_FILE'
  1869. X/*##############################################################################
  1870. X
  1871. XFUNNNELWEB COPYRIGHT
  1872. X====================
  1873. XFunnelWeb is a literate-programming macro preprocessor.
  1874. X
  1875. Copyright (C) 1992 Ross N. Williams.
  1876. X
  1877. X   Ross N. Williams
  1878. X   ross@spam.adelaide.edu.au
  1879. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  1880. X
  1881. This program is free software; you can redistribute it and/or modify
  1882. it under the terms of Version 2 of the GNU General Public License as
  1883. published by the Free Software Foundation.
  1884. X
  1885. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  1886. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1887. See Version 2 of the GNU General Public License for more details.
  1888. X
  1889. You should have received a copy of Version 2 of the GNU General Public
  1890. License along with this program. If not, you can FTP the license from
  1891. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  1892. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1893. X
  1894. Section 2a of the license requires that all changes to this file be
  1895. recorded prominently in this file. Please record all changes here.
  1896. X
  1897. Programmers:
  1898. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  1899. X
  1900. Changes:
  1901. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  1902. X
  1903. X##############################################################################*/
  1904. X
  1905. X
  1906. X/******************************************************************************/
  1907. X/*                                  MEMORY.H                                  */
  1908. X/******************************************************************************/
  1909. X/*                                                                            */
  1910. X/* Introduction                                                               */
  1911. X/* ------------                                                               */
  1912. X/* This package provides a memory management facility for FunnelWeb.          */
  1913. X/* The conventional MALLOC does not suit the needs of FunnelWeb. The          */
  1914. X/* following notes give an idea of why:                                       */
  1915. X/*                                                                            */
  1916. X/* 1. At the times where FunnelWeb requires memory, it is nearly always       */
  1917. X/*    the case that failure to provide the memory should result in a bomb.    */
  1918. X/*    It therefore makes sense to wrap MALLOC up inside another function      */
  1919. X/*    that, at the very least, checks the status from malloc and bombs        */
  1920. X/*    the program if the requested memory is not available.                   */
  1921. X/*                                                                            */
  1922. X/* 2. Because FunnelWeb proper can be invoked an indefinite number of         */
  1923. X/*    times from the FunnelWeb command interpreter, it is very important      */
  1924. X/*    to reclaim all the memory used by each invocation. This could be        */
  1925. X/*    done by explicitly tearing apart the data structures constructed        */
  1926. X/*    for each run. However, this is very messy, requiring detailed           */
  1927. X/*    knowledge of the data structures. A far simpler, safer scheme is to     */
  1928. X/*    arrange for a memory manager to keep track of all the memory that it    */
  1929. X/*    allocates and to provide a single call to free it all. This facility    */
  1930. X/*    is provided by this package.                                            */
  1931. X/*                                                                            */
  1932. X/* 3. In addition to the TEMPORARY memory allocations described in (2) above, */
  1933. X/*    it should also be possible to make permanent allocations.               */
  1934. X/*                                                                            */
  1935. X/* 4. FunnelWeb uses linked lists a lot and hence will make many requests     */
  1936. X/*    for small chunks of memory (e.g 10 bytes). Legend has it that some      */
  1937. X/*    malloc libraries are very inefficient in this case, and that it is      */
  1938. X/*    better to use malloc to allocate a large chunk of memory and dole it    */
  1939. X/*    out yourself. This package does this too.                               */
  1940. X/*                                                                            */
  1941. X/* For all these reasons, FunnelWeb memory management has been handed over to */
  1942. X/* this package which provides services that satisfy the conditions outlined  */
  1943. X/* above.                                                                     */
  1944. X/*                                                                            */
  1945. X/******************************************************************************/
  1946. X
  1947. X/* Ensure that the body of this header file is included at most once.         */
  1948. X#ifndef DONE_MEMORY
  1949. X#define DONE_MEMORY
  1950. X
  1951. X/******************************************************************************/
  1952. X
  1953. X#include "style.h"
  1954. X
  1955. X/******************************************************************************/
  1956. X
  1957. XEXPORT p_void mm_perm P_((size_t));
  1958. X/* Allocates a block of memory of the specified size (specified in bytes) and */
  1959. X/* returns a pointer to the new block of memory. Bombs the program if the     */
  1960. X/* memory is not available. Memory allocated using mm_perm is permanently     */
  1961. X/* allocated and cannot be freed.                                             */
  1962. X
  1963. XEXPORT p_void mm_temp P_((size_t));
  1964. X/* Allocates a block of memory of the specified size (specified in bytes) and */
  1965. X/* returns a pointer to the new block of memory. Bombs the program if the     */
  1966. X/* memory is not available. Memory allocated using this function can later be */
  1967. X/* freed in its entirely by making a call to mm_zapt.                         */
  1968. X
  1969. XEXPORT void mm_zapt P_((void));
  1970. X/* This function can be called at any time. Its effect is to free up all the  */
  1971. X/* memory allocated using mm_temp since the last call to mm_zapt or the start */
  1972. X/* of the program, whichever is the more recent.                              */
  1973. X
  1974. X/******************************************************************************/
  1975. X
  1976. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  1977. X#endif
  1978. X
  1979. X/******************************************************************************/
  1980. X/*                               End of MEMORY.H                              */
  1981. X/******************************************************************************/
  1982. END_OF_FILE
  1983. if test 6298 -ne `wc -c <'sources/memory.h'`; then
  1984.     echo shar: \"'sources/memory.h'\" unpacked with wrong size!
  1985. fi
  1986. # end of 'sources/memory.h'
  1987. fi
  1988. if test -f 'sources/misc.c' -a "${1}" != "-c" ; then 
  1989.   echo shar: Will not clobber existing file \"'sources/misc.c'\"
  1990. else
  1991. echo shar: Extracting \"'sources/misc.c'\" \(6635 characters\)
  1992. sed "s/^X//" >'sources/misc.c' <<'END_OF_FILE'
  1993. X/*##############################################################################
  1994. X
  1995. XFUNNNELWEB COPYRIGHT
  1996. X====================
  1997. XFunnelWeb is a literate-programming macro preprocessor.
  1998. X
  1999. Copyright (C) 1992 Ross N. Williams.
  2000. X
  2001. X   Ross N. Williams
  2002. X   ross@spam.adelaide.edu.au
  2003. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2004. X
  2005. This program is free software; you can redistribute it and/or modify
  2006. it under the terms of Version 2 of the GNU General Public License as
  2007. published by the Free Software Foundation.
  2008. X
  2009. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2010. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2011. See Version 2 of the GNU General Public License for more details.
  2012. X
  2013. You should have received a copy of Version 2 of the GNU General Public
  2014. License along with this program. If not, you can FTP the license from
  2015. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2016. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2017. X
  2018. Section 2a of the license requires that all changes to this file be
  2019. recorded prominently in this file. Please record all changes here.
  2020. X
  2021. Programmers:
  2022. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2023. X
  2024. Changes:
  2025. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2026. X
  2027. X##############################################################################*/
  2028. X
  2029. X
  2030. X/******************************************************************************/
  2031. X/*                                    MISC.C                                  */
  2032. X/******************************************************************************/
  2033. X
  2034. X#include <ctype.h>
  2035. X#include "style.h"
  2036. X
  2037. X#include "as.h"
  2038. X#include "data.h"
  2039. X#include "memory.h"
  2040. X#include "misc.h"
  2041. X#include "writfile.h"
  2042. X
  2043. X/******************************************************************************/
  2044. X
  2045. XEXPORT void wr_s  (s) char *s; {wf_wr(&f_s,s);}
  2046. XEXPORT void wr_j  (s) char *s; {wf_wr(&f_j,s);}
  2047. XEXPORT void wr_l  (s) char *s; {wf_wr(&f_l,s);}
  2048. X
  2049. XEXPORT void wl_s  (s) char *s; {wf_wr(&f_s,s); wf_wr(&f_s,"\n");}
  2050. XEXPORT void wl_j  (s) char *s; {wf_wr(&f_j,s); wf_wr(&f_j,"\n");}
  2051. XEXPORT void wl_l  (s) char *s; {wf_wr(&f_l,s); wf_wr(&f_l,"\n");}
  2052. X
  2053. XEXPORT void wr_sj (s) char *s; {wr_s(s); wr_j(s);}
  2054. XEXPORT void wl_sj (s) char *s; {wl_s(s); wl_j(s);}
  2055. X
  2056. XEXPORT void wr_sjl(s) char *s; {wr_s(s); wr_j(s); wr_l(s);}
  2057. XEXPORT void wl_sjl(s) char *s; {wl_s(s); wl_j(s); wl_l(s);}
  2058. X
  2059. X/******************************************************************************/
  2060. X
  2061. XEXPORT char *chabbrev(ch)
  2062. int ch;
  2063. X{
  2064. X switch (ch)
  2065. X   {
  2066. X    case  0: return "NUL";
  2067. X    case  1: return "SOH";
  2068. X    case  2: return "STX";
  2069. X    case  3: return "ETX";
  2070. X    case  4: return "EOT";
  2071. X    case  5: return "ENQ";
  2072. X    case  6: return "ACK";
  2073. X    case  7: return "BEL";
  2074. X    case  8: return  "BS";
  2075. X    case  9: return  "HT";
  2076. X    case 10: return  "LF";
  2077. X    case 11: return  "VT";
  2078. X    case 12: return  "FF";
  2079. X    case 13: return  "CR";
  2080. X    case 14: return  "SO";
  2081. X    case 15: return  "SI";
  2082. X    case 16: return "DLE";
  2083. X    case 17: return "DC1";
  2084. X    case 18: return "DC2";
  2085. X    case 19: return "DC3";
  2086. X    case 20: return "DC4";
  2087. X    case 21: return "NAK";
  2088. X    case 22: return "SYN";
  2089. X    case 23: return "ETB";
  2090. X    case 24: return "CAN";
  2091. X    case 25: return  "EM";
  2092. X    case 26: return "SUB";
  2093. X    case 27: return "ESC";
  2094. X    case 28: return  "FS";
  2095. X    case 29: return  "GS";
  2096. X    case 30: return  "RS";
  2097. X    case 31: return  "US";
  2098. X    case 127:return "DEL";
  2099. X    default: return    "";
  2100. X   }
  2101. X}
  2102. X
  2103. X/******************************************************************************/
  2104. X
  2105. XEXPORT sign signof(n)
  2106. long n;
  2107. X{
  2108. X if (n<0) return -1;
  2109. X if (n>0) return  1;
  2110. X return 0;
  2111. X}
  2112. X
  2113. X/******************************************************************************/
  2114. X
  2115. XEXPORT char * eq_files(name1,name2,p_result)
  2116. char *name1;
  2117. char *name2;
  2118. bool *p_result;
  2119. X{
  2120. X FILE *file1;
  2121. X FILE *file2;
  2122. X
  2123. X /* The following three lines define two comparison buffers. The next part of */
  2124. X /* the two files being compared are read into these buffers and compared.    */
  2125. X /* Using the buffers allows bulk reads, which speeds things up considerably. */
  2126. X#define CMPBUFSIZ 16384
  2127. X STAVAR ubyte_ *buf1 = NULL;
  2128. X STAVAR ubyte_ *buf2 = NULL;
  2129. X
  2130. X /* Set the default result to be FALSE (no match). */
  2131. X *p_result=FALSE;
  2132. X
  2133. X /* Allocate the comparison buffers if they are not already allocated. */
  2134. X if (buf1 == NULL)
  2135. X   {
  2136. X    buf1=(ubyte_ *) mm_perm((size_t) CMPBUFSIZ);
  2137. X    buf2=(ubyte_ *) mm_perm((size_t) CMPBUFSIZ);
  2138. X   }
  2139. X
  2140. X /* Open, for binary reading, the two files to be compared. */
  2141. X file1=fopen(name1,"rb");
  2142. X if (file1 == FOPEN_F)
  2143. X    return "Error opening the first file.";
  2144. X file2=fopen(name2,"rb");
  2145. X if (file2 == FOPEN_F)
  2146. X   {fclose(file1);return "Error opening the second file.";}
  2147. X
  2148. X while (TRUE)
  2149. X   { /* Compare a chunk. */
  2150. X    size_t len1;
  2151. X    size_t len2;
  2152. X
  2153. X    /* Read a chunk from each file. */
  2154. X    len1=fread(buf1,(size_t) 1,(size_t) CMPBUFSIZ,file1);
  2155. X    len2=fread(buf2,(size_t) 1,(size_t) CMPBUFSIZ,file2);
  2156. X    if (ferror(file1))
  2157. X       return "Compare: Error reading the first file.";
  2158. X    if (ferror(file2))
  2159. X       return "Compare: Error reading the second file.";
  2160. X
  2161. X    /* Compare the two chunks. */
  2162. X    if (len1 != len2)                                           break;
  2163. X    if (len1 ==    0)                         {*p_result=TRUE;  break;}
  2164. X    if (memcmp(buf1,buf2,(size_t) len1) != 0)                   break;
  2165. X   }
  2166. X
  2167. X if (fclose(file1) == FCLOSE_F)
  2168. X    {*p_result=FALSE; return "Error closing the first file.";}
  2169. X if (fclose(file2) == FCLOSE_F)
  2170. X    {*p_result=FALSE; return "Error closing the second file.";}
  2171. X
  2172. X /* If we have reached this point, we can be sure that no errors occurred. */
  2173. X return NULL;
  2174. X}
  2175. X
  2176. X/******************************************************************************/
  2177. X
  2178. XEXPORT bool fexists(fn)
  2179. char *fn;
  2180. X{
  2181. X FILE *file;
  2182. X bool success;
  2183. X
  2184. X file=fopen(fn,"rb");
  2185. X if (file==NULL)
  2186. X    return FALSE;
  2187. X
  2188. X success= (fclose(file) != FCLOSE_F);
  2189. X as_cold(success,
  2190. X         "fexists: Error closing file whose existence is being tested!");
  2191. X
  2192. X return TRUE;
  2193. X}
  2194. X
  2195. X/******************************************************************************/
  2196. X
  2197. XEXPORT char *fn_temp()
  2198. X{
  2199. X STAVAR uword filnum=1;
  2200. X STAVAR fn_t  fn;
  2201. X do
  2202. X   {
  2203. X    sprintf(fn,"fwtf%04lu.tmp",(ulong) filnum);
  2204. X    filnum++;
  2205. X   }
  2206. X while (fexists(fn));
  2207. X return fn;
  2208. X}
  2209. X
  2210. X/******************************************************************************/
  2211. X
  2212. XEXPORT void strupper(s)
  2213. char *s;
  2214. X{
  2215. X while (*s != EOS)
  2216. X   {
  2217. X    *s=toupper(*s);
  2218. X    s++;
  2219. X   }
  2220. X}
  2221. X
  2222. X/******************************************************************************/
  2223. X/*                                End of MISC.C                               */
  2224. X/******************************************************************************/
  2225. END_OF_FILE
  2226. if test 6635 -ne `wc -c <'sources/misc.c'`; then
  2227.     echo shar: \"'sources/misc.c'\" unpacked with wrong size!
  2228. fi
  2229. # end of 'sources/misc.c'
  2230. fi
  2231. if test -f 'sources/misc.h' -a "${1}" != "-c" ; then 
  2232.   echo shar: Will not clobber existing file \"'sources/misc.h'\"
  2233. else
  2234. echo shar: Extracting \"'sources/misc.h'\" \(5875 characters\)
  2235. sed "s/^X//" >'sources/misc.h' <<'END_OF_FILE'
  2236. X/*##############################################################################
  2237. X
  2238. XFUNNNELWEB COPYRIGHT
  2239. X====================
  2240. XFunnelWeb is a literate-programming macro preprocessor.
  2241. X
  2242. Copyright (C) 1992 Ross N. Williams.
  2243. X
  2244. X   Ross N. Williams
  2245. X   ross@spam.adelaide.edu.au
  2246. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2247. X
  2248. This program is free software; you can redistribute it and/or modify
  2249. it under the terms of Version 2 of the GNU General Public License as
  2250. published by the Free Software Foundation.
  2251. X
  2252. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2253. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2254. See Version 2 of the GNU General Public License for more details.
  2255. X
  2256. You should have received a copy of Version 2 of the GNU General Public
  2257. License along with this program. If not, you can FTP the license from
  2258. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2259. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2260. X
  2261. Section 2a of the license requires that all changes to this file be
  2262. recorded prominently in this file. Please record all changes here.
  2263. X
  2264. Programmers:
  2265. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2266. X
  2267. Changes:
  2268. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2269. X
  2270. X##############################################################################*/
  2271. X
  2272. X
  2273. X/******************************************************************************/
  2274. X/*                                    MISC.H                                  */
  2275. X/******************************************************************************/
  2276. X/*                                                                            */
  2277. X/* This package contains a ragbag of FunnelWeb-specific functions that didn't */
  2278. X/* seem to have a home anywhere else.                                         */
  2279. X/*                                                                            */
  2280. X/******************************************************************************/
  2281. X
  2282. X#include "style.h"
  2283. X
  2284. X#include "data.h"
  2285. X
  2286. X/******************************************************************************/
  2287. X
  2288. X/* The following functions each write a string to one or more output streams. */
  2289. X/* The code is as follows:                                                    */
  2290. X/*    wr - means write the string only.                                       */
  2291. X/*    wl - means write the string followed by a '\n'.                         */
  2292. X/*     s - The f_s output stream (the console/screen).                        */
  2293. X/*     j - The f_j output stream (the journal file).                          */
  2294. X/*     l - The f_l output stream (the listing file).                          */
  2295. X/* These functions are hard wired to the f_s, f_j, and f_l global variables.  */
  2296. X
  2297. XEXPORT void wr_s P_((char *));
  2298. XEXPORT void wr_j P_((char *));
  2299. XEXPORT void wr_l P_((char *));
  2300. X
  2301. XEXPORT void wl_s P_((char *));
  2302. XEXPORT void wl_j P_((char *));
  2303. XEXPORT void wl_l P_((char *));
  2304. X
  2305. XEXPORT void wr_sj P_((char *));
  2306. XEXPORT void wl_sj P_((char *));
  2307. X
  2308. XEXPORT void wr_sjl P_((char *));
  2309. XEXPORT void wl_sjl P_((char *));
  2310. X
  2311. X/******************************************************************************/
  2312. X
  2313. XEXPORT char *chabbrev P_((int));
  2314. X/* If the argument is non-printable in the range [0,127], returns a pointer   */
  2315. X/* to a constant string containing the mnemonic abbreviation for the          */
  2316. X/* character (e.g. 10="LF"). Otherwise returns the empty string.              */
  2317. X
  2318. X/******************************************************************************/
  2319. X
  2320. XEXPORT sign signof P_((long));
  2321. X/* Returns -1 if its argument is negative. */
  2322. X/* Returns  0 if its argument is zero.     */
  2323. X/* Returns  1 if its argument is positive. */
  2324. X
  2325. X/******************************************************************************/
  2326. X
  2327. XEXPORT char * eq_files P_((char *,char *,bool *));
  2328. X/* Performs an exact binary comparison of the files named name1 and name2.    */
  2329. X/* If there is no error during the comparison, returns NULL and the boolean   */
  2330. X/* parameter carries the result of the comparison with TRUE=>Files identical. */
  2331. X/* If there is an error during the comparison, the boolean parameter is set   */
  2332. X/* to FALSE and the function returns a pointer to a string describing the     */
  2333. X/* error in terms of "the first file" and "the second file".                  */
  2334. X
  2335. X/******************************************************************************/
  2336. X
  2337. XEXPORT bool fexists P_((char *));
  2338. X/* Returns TRUE iff a file of the name given in the parameter exists.         */
  2339. X/* (Does this by attempting to open the file. If it succeeds, it closes it    */
  2340. X/* again).                                                                    */
  2341. X
  2342. X/******************************************************************************/
  2343. X
  2344. XEXPORT char *fn_temp P_((void));
  2345. X/* Creates a filename (not containing a directory component) for which there  */
  2346. X/* is no corresponding file in the current directory.                         */
  2347. X/* Returns a pointer to a static array containing the filename.               */
  2348. X/* Each time this function is called, the new filename overwrites the old.    */
  2349. X/* This function was created after it was discovered that, on some systems,   */
  2350. X/* the standard library function "tmpnam" returns the name of a file in the   */
  2351. X/* /tmp partition. This would not be a problem were it not for the fact that  */
  2352. X/* generally, files cannot be renamed across partitions!                      */
  2353. X
  2354. X/******************************************************************************/
  2355. X
  2356. XEXPORT void strupper P_((char *));
  2357. X/* Converts all lower case letters in the argument string to upper case.      */
  2358. X
  2359. X/******************************************************************************/
  2360. X/*                                End of MISC.H                               */
  2361. X/******************************************************************************/
  2362. END_OF_FILE
  2363. if test 5875 -ne `wc -c <'sources/misc.h'`; then
  2364.     echo shar: \"'sources/misc.h'\" unpacked with wrong size!
  2365. fi
  2366. # end of 'sources/misc.h'
  2367. fi
  2368. if test -f 'sources/option.h' -a "${1}" != "-c" ; then 
  2369.   echo shar: Will not clobber existing file \"'sources/option.h'\"
  2370. else
  2371. echo shar: Extracting \"'sources/option.h'\" \(7760 characters\)
  2372. sed "s/^X//" >'sources/option.h' <<'END_OF_FILE'
  2373. X/*##############################################################################
  2374. X
  2375. XFUNNNELWEB COPYRIGHT
  2376. X====================
  2377. XFunnelWeb is a literate-programming macro preprocessor.
  2378. X
  2379. Copyright (C) 1992 Ross N. Williams.
  2380. X
  2381. X   Ross N. Williams
  2382. X   ross@spam.adelaide.edu.au
  2383. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2384. X
  2385. This program is free software; you can redistribute it and/or modify
  2386. it under the terms of Version 2 of the GNU General Public License as
  2387. published by the Free Software Foundation.
  2388. X
  2389. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2390. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2391. See Version 2 of the GNU General Public License for more details.
  2392. X
  2393. You should have received a copy of Version 2 of the GNU General Public
  2394. License along with this program. If not, you can FTP the license from
  2395. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2396. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2397. X
  2398. Section 2a of the license requires that all changes to this file be
  2399. recorded prominently in this file. Please record all changes here.
  2400. X
  2401. Programmers:
  2402. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2403. X
  2404. Changes:
  2405. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2406. X
  2407. X##############################################################################*/
  2408. X
  2409. X
  2410. X/******************************************************************************/
  2411. X/*                                  OPTION.H                                  */
  2412. X/******************************************************************************/
  2413. X
  2414. X/* Ensure that the body of this header file is included at most once.         */
  2415. X#ifndef DONE_OPTION
  2416. X#define DONE_OPTION
  2417. X
  2418. X/******************************************************************************/
  2419. X
  2420. X#include "style.h"
  2421. X
  2422. X#include "machin.h"
  2423. X#include "help.h"
  2424. X
  2425. X/******************************************************************************/
  2426. X
  2427. X/* THE B7 OPTION                                                              */
  2428. X/* -------------                                                              */
  2429. X/* When FunnelWeb was first ported to different machines and the regression   */
  2430. X/* testing was activated, a most irritating occurance was the failure of the  */
  2431. X/* results of tests on different machines to compare, because of minor        */
  2432. X/* differences in implementation. For example, error messages that contained  */
  2433. X/* file names would differ because the directory name on different machines   */
  2434. X/* was different. Another example was error messages that quoted              */
  2435. X/* implementation limits. This problem was solved by creating the B7 option   */
  2436. X/* which instructs FunnelWeb to suppress all output that is                   */
  2437. X/* non-deterministic, machine specific, or which in any other way would cause */
  2438. X/* an unncessary failure of the test suite.                                   */
  2439. X
  2440. X/* The following symbol provides a simple replacement for filenames in error  */
  2441. X/* messages.                                                                  */
  2442. X#define SUPPNAME "<<Suppressed>>"
  2443. X#define SUPPVAL  "<<Suppressed>>"
  2444. X
  2445. X/******************************************************************************/
  2446. X
  2447. X/* The following structure stores all the information that can be             */
  2448. X/* communicated in one or more command lines. An important aspect of the      */
  2449. X/* structure is that it is totally self contained; it does not contain any    */
  2450. X/* pointers to outside structures such as command lines.                      */
  2451. X/* The rather strange field names are explained as follows:                   */
  2452. X/*    1) Local names must be distinct to 8 characters (for portability).      */
  2453. X/*    2) All structure field names should be unique (for portability).        */
  2454. X/*       Some of the older compilers use a single field structure name space. */
  2455. X/*    3) The op_ is used as a prefix for entities in this whole package.      */
  2456. X/*    4) The next letter is the option letter itself. It is not intended that */
  2457. X/*       the command line option names be tightly bound to the internal       */
  2458. X/*       identifier names -- the command line names are just convenient.      */
  2459. X/*    5) The next letter gives the type: [B]oolean, [S]tring, [I]nteger.      */
  2460. X
  2461. typedef struct
  2462. X  {
  2463. X   bool  op_f_b;  /* The input file. */
  2464. X   fn_t  op_f_s;
  2465. X
  2466. X   bool  op_j_b;  /* The journal file. */
  2467. X   fn_t  op_j_s;
  2468. X
  2469. X   fn_t  op_i_s;  /* Include file (default). */
  2470. X
  2471. X   bool  op_o_b;  /* Product files (default). */
  2472. X   fn_t  op_o_s;
  2473. X
  2474. X   bool  op_t_b;  /* Typeset file (default). */
  2475. X   fn_t  op_t_s;
  2476. X
  2477. X   bool  op_l_b;  /* Listing file (default). */
  2478. X   fn_t  op_l_s;
  2479. X
  2480. X   bool  op_d_b;  /* Delete output files that have not changed? */
  2481. X
  2482. X   uword op_c_i;  /* Lines of error context in listing file. */
  2483. X
  2484. X   bool  op_q_b;  /* Quiet mode. Console chatter suppressed if turned on. */
  2485. X
  2486. X   bool  op_s_b;  /* Send errors to the screen with specified context. */
  2487. X   uword op_s_i;
  2488. X
  2489. X   bool  op_w_b;  /* Set maximum line length of product files. */
  2490. X   uword op_w_i;
  2491. X
  2492. X   bool  op_x_b;  /* Execute specified file in FunnelWeb shell. */
  2493. X   fn_t  op_x_s;
  2494. X
  2495. X   bool  op_k_b;  /* Interactive (keyboard) mode. */
  2496. X
  2497. X                  /* Dump flags:            */
  2498. X   bool  op_b1_b; /* Dump input file image. */
  2499. X   bool  op_b2_b; /* Dump line list.        */
  2500. X   bool  op_b3_b; /* Dump token list.       */
  2501. X   bool  op_b4_b; /* Dump macro table.      */
  2502. X   bool  op_b5_b; /* Dump document list.    */
  2503. X   bool  op_b6_b; /* Dump time summary.     */
  2504. X   bool  op_b7_b; /* Don't write anything non-deterministic or machine */
  2505. X                  /*    specific. This option is designed to assist in */
  2506. X                  /*    regression testing.                            */
  2507. X   
  2508. X   bool  op_h_b;  /* Help messages. */
  2509. X   hn_t  op_h_s;
  2510. X  } op_t;
  2511. X
  2512. typedef op_t *p_op_t;
  2513. X
  2514. X/******************************************************************************/
  2515. X
  2516. XEXPORT void op_ini P_((p_op_t));
  2517. X/* Initializes the specified options structure with default values.           */
  2518. X/* This includes ALL the fields of the structure. If, for example, the        */
  2519. X/* default value of op_l_b is FALSE, op_l_s will be set to the empty string.  */
  2520. X
  2521. XEXPORT bool op_add P_((p_op_t,p_cl_t,void (*)(char *)));
  2522. X/* Parses the specified command line and places the information given in the  */
  2523. X/* command line into specific fields of the options structure. The options    */
  2524. X/* structure should be entirely defined upon entry, as this parsing function  */
  2525. X/* only ADDS information present in the command line. Call op_ini if you      */
  2526. X/* don't want to initialize all the fields manually.                          */
  2527. X/* The comline string should start with the leading command (e.g. "fw").      */
  2528. X/* However, he leading command is ignored.                                    */
  2529. X/* Returns FALSE: One or more syntax errors have been detected. One or error  */
  2530. X/*                messages have been written using the funtion argument.      */
  2531. X/*                *p_op unchanged.                                            */
  2532. X/* Returns TRUE : No syntax errors. Comline information placed in *p_op.      */
  2533. X
  2534. XEXPORT void op_wri P_((p_op_t,void (*)(char *)));
  2535. X/* Writes a text representation of the specified options record using the     */
  2536. X/* function argument.                                                         */
  2537. X
  2538. X/******************************************************************************/
  2539. X
  2540. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  2541. X#endif
  2542. X
  2543. X/******************************************************************************/
  2544. X/*                              End of OPTION.H                               */
  2545. X/******************************************************************************/
  2546. X
  2547. END_OF_FILE
  2548. if test 7760 -ne `wc -c <'sources/option.h'`; then
  2549.     echo shar: \"'sources/option.h'\" unpacked with wrong size!
  2550. fi
  2551. # end of 'sources/option.h'
  2552. fi
  2553. if test -f 'sources/section.h' -a "${1}" != "-c" ; then 
  2554.   echo shar: Will not clobber existing file \"'sources/section.h'\"
  2555. else
  2556. echo shar: Extracting \"'sources/section.h'\" \(5771 characters\)
  2557. sed "s/^X//" >'sources/section.h' <<'END_OF_FILE'
  2558. X/*##############################################################################
  2559. X
  2560. XFUNNNELWEB COPYRIGHT
  2561. X====================
  2562. XFunnelWeb is a literate-programming macro preprocessor.
  2563. X
  2564. Copyright (C) 1992 Ross N. Williams.
  2565. X
  2566. X   Ross N. Williams
  2567. X   ross@spam.adelaide.edu.au
  2568. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2569. X
  2570. This program is free software; you can redistribute it and/or modify
  2571. it under the terms of Version 2 of the GNU General Public License as
  2572. published by the Free Software Foundation.
  2573. X
  2574. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2575. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2576. See Version 2 of the GNU General Public License for more details.
  2577. X
  2578. You should have received a copy of Version 2 of the GNU General Public
  2579. License along with this program. If not, you can FTP the license from
  2580. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2581. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2582. X
  2583. Section 2a of the license requires that all changes to this file be
  2584. recorded prominently in this file. Please record all changes here.
  2585. X
  2586. Programmers:
  2587. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2588. X
  2589. Changes:
  2590. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2591. X
  2592. X##############################################################################*/
  2593. X
  2594. X
  2595. X/******************************************************************************/
  2596. X/*                                   SECTION.H                                */
  2597. X/******************************************************************************/
  2598. X/*                                                                            */
  2599. X/* This package provides a very simple, very small abstraction for a section  */
  2600. X/* number. A section number is a hierarchical group of numbers such as is     */
  2601. X/* used to number the sections in documents. For example: 4.5.1.3 is a        */
  2602. X/* section number. This package provides an abstraction for these numbers     */
  2603. X/* that assists in their incrementing at different levels and in writing them */
  2604. X/* out. The package also checks for hierarchical inconsistencies.             */
  2605. X/*                                                                            */
  2606. X/******************************************************************************/
  2607. X
  2608. X/* Ensure that the body of this header file is included at most once.         */
  2609. X#ifndef DONE_SECTION
  2610. X#define DONE_SECTION
  2611. X
  2612. X/******************************************************************************/
  2613. X
  2614. X#include "style.h"
  2615. X
  2616. X/******************************************************************************/
  2617. X
  2618. X/* The following constant defines the maximum number of levels that a         */
  2619. X/* FunnelWeb document can have. @A corresponds to level 1.                    */
  2620. X#define SECLEV_MAX 5
  2621. X
  2622. X/* The following constant defines the maximum length of a string representing */
  2623. X/* a section. This is calculated as the maximum number of levels multiplied   */
  2624. X/* by 1 (for the separating dots) plus a safe size for a decimal number.      */
  2625. X#define SECSTR_MAX (SECLEV_MAX*(1+10))
  2626. X
  2627. X/* The following structure stores a single section number. The sc_level       */
  2628. X/* field is the level of this field and is in the range [1,SECLEV_MAX]. The   */
  2629. X/* sc_num field is defined only for elements [1,level] and contains the       */
  2630. X/* hierarchy number at each level.                                            */
  2631. X/* Example: For SECLEVMAX=4 and "3.4.1", level=3 and num=[?,3,4,1,?].         */
  2632. X/* Note: The first question mark is for element zero which is always unknown. */
  2633. typedef struct
  2634. X  {
  2635. X   ulong  sn_magic;              /* Used to detect uninitialized sn objects.  */
  2636. X   ubyte_ sn_lev;                /* Level number of section.                  */
  2637. X   uword_ sn_num[SECLEV_MAX+1];  /* Hierarchical level numbers.               */
  2638. X  } sn_t;
  2639. X
  2640. typedef sn_t *p_sn_t;
  2641. X
  2642. X/******************************************************************************/
  2643. X
  2644. XEXPORT void sn_ini P_((p_sn_t));
  2645. X/* Initializes the specified section object to the empty section at level 0.  */
  2646. X/* All sections must be initialized before any other operations are performed.*/
  2647. X
  2648. XEXPORT void sn_set P_((p_sn_t,ubyte));
  2649. X/* Sets the specified section to 1.1.1.1.1.1... at the given level.           */
  2650. X/* Example: sn_set(p_sn,3) yields a section set to 1.1.1.                     */
  2651. X/* Raises an error if the specified level is out of range.                    */
  2652. X
  2653. XEXPORT void sn_inc P_((p_sn_t,ubyte));
  2654. X/* Increments the number of the specified section object at the specified     */
  2655. X/* level. This also has the effect of setting all lower levels to 0. For      */
  2656. X/* example, 3.4.5.1 followed by sn_inc(&sn,2) would become 3.5.               */
  2657. X/* Raises an error if the level is two or more lower than the current level   */
  2658. X/* Example: You can't increment 2.4.1 at level 5.                             */
  2659. X/* Raises an error if the specified level is out of range.                    */
  2660. X/* Raises an error if a number at any level becomes too large (>60000).       */
  2661. X
  2662. XEXPORT ubyte sn_lev P_((p_sn_t));
  2663. X/* Returns the level number of the specified section.                         */
  2664. X
  2665. XEXPORT void sn_str P_((p_sn_t,char *));
  2666. X/* Writes a textual representation of the specified section into the given    */
  2667. X/* string. The string must be able to hold at least SECSTRMAX characters.     */
  2668. X
  2669. X/******************************************************************************/
  2670. X
  2671. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  2672. X#endif
  2673. X
  2674. X/******************************************************************************/
  2675. X/*                               End of SECTION.H                             */
  2676. X/******************************************************************************/
  2677. X
  2678. END_OF_FILE
  2679. if test 5771 -ne `wc -c <'sources/section.h'`; then
  2680.     echo shar: \"'sources/section.h'\" unpacked with wrong size!
  2681. fi
  2682. # end of 'sources/section.h'
  2683. fi
  2684. if test -f 'sources/texhead.c' -a "${1}" != "-c" ; then 
  2685.   echo shar: Will not clobber existing file \"'sources/texhead.c'\"
  2686. else
  2687. echo shar: Extracting \"'sources/texhead.c'\" \(5266 characters\)
  2688. sed "s/^X//" >'sources/texhead.c' <<'END_OF_FILE'
  2689. X/*##############################################################################
  2690. X
  2691. XFUNNNELWEB COPYRIGHT
  2692. X====================
  2693. XFunnelWeb is a literate-programming macro preprocessor.
  2694. X
  2695. Copyright (C) 1992 Ross N. Williams.
  2696. X
  2697. X   Ross N. Williams
  2698. X   ross@spam.adelaide.edu.au
  2699. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2700. X
  2701. This program is free software; you can redistribute it and/or modify
  2702. it under the terms of Version 2 of the GNU General Public License as
  2703. published by the Free Software Foundation.
  2704. X
  2705. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2706. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2707. See Version 2 of the GNU General Public License for more details.
  2708. X
  2709. You should have received a copy of Version 2 of the GNU General Public
  2710. License along with this program. If not, you can FTP the license from
  2711. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2712. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2713. X
  2714. Section 2a of the license requires that all changes to this file be
  2715. recorded prominently in this file. Please record all changes here.
  2716. X
  2717. Programmers:
  2718. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2719. X
  2720. Changes:
  2721. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2722. X
  2723. X##############################################################################*/
  2724. X
  2725. X
  2726. X/******************************************************************************/
  2727. X/*                                  TEXHEAD.C                                 */
  2728. X/******************************************************************************/
  2729. X/*                                                                            */
  2730. X/* TEX HEADER PACKAGE                                                         */
  2731. X/* ==================                                                         */
  2732. X/* This package contains a single function that writes the TeX header         */
  2733. X/* (containing all the Weave macros) to the specified stream. The package     */
  2734. X/* consists of:                                                               */
  2735. X/*                                                                            */
  2736. X/* texhead.tex - The header file ("source code" for texhead.ctx).             */
  2737. X/* texhead.ctx - Automatically generated C code based on texhead.tex.         */
  2738. X/* texhead.h   - Exported header file containing function definition.         */
  2739. X/* texhead.c   - Contains the function body and the codified header file.     */
  2740. X/*                                                                            */
  2741. X/* WARNING: THE ONLY FILE THAT SHOULD EVER BE MODIFIED BY HAND IS TEXHEAD.TEX.*/
  2742. X/* From this can be generated a new version of texhead.ctx. Here's how:       */
  2743. X/* 1. Edit texhead.tex as desired.                                            */
  2744. X/* 2. Fire up the FunnelWeb shell and give the command:                       */
  2745. X/*    codify texhead.tex texhead.ctx                                          */
  2746. X/*                                                                            */
  2747. X/******************************************************************************/
  2748. X
  2749. X#include "style.h"
  2750. X
  2751. X#include "texhead.h"
  2752. X#include "writfile.h"
  2753. X
  2754. X/******************************************************************************/
  2755. X
  2756. XEXPORT void tex_head(p_wf)
  2757. p_wf_t p_wf;
  2758. X/* Writes the FunnelWeb TeX header block to the argument stream. */
  2759. X{
  2760. X
  2761. X /*#############################################################################
  2762. X IMPORTANT COPYRIGHT NOTICE
  2763. X --------------------------
  2764. X The set of FunnelWeb TeX definitions, embodied in C code in the file
  2765. X included by the #include directive below, is a public domain work.
  2766. X
  2767. X Notwithstanding the fact that the public domain set of FunnelWeb TeX
  2768. X definitions is represented in the form of strings in C code #included by the
  2769. X FunnelWeb literate-programming preprocessor program released under GNU General
  2770. X Public License Version 2, the set of TeX definitions themselves do not fall
  2771. X under GNU license. Instead, the set of FunnelWeb TeX definitions is classified
  2772. X as a public domain work that is distributed with FunnelWeb as a "separate
  2773. X work". The set of definitions is included as strings in the FunnelWeb code for
  2774. X the sole reason that this organization avoids FunnelWeb having to locate the
  2775. X file at run time. Thus, when FunnelWeb writes the set of TeX definitions to a
  2776. X .TeX output file, it is not generating a work based on itself, but is merely
  2777. X copying a public domain file (which it happened to represent in the form of
  2778. X code rather than data) into the output file.
  2779. X
  2780. X The motivation for rigorously clarifying the status of the set of
  2781. X FunnelWeb TeX definitions is that it will appear in TeX output files
  2782. X generated by FunnelWeb, and I do not want any output files generated by
  2783. X FunnelWeb to be under any copyright restrictions.
  2784. X -- Ross N. Williams, 5:42pm 07-May-1992, Adelaide, Australia.
  2785. X #############################################################################*/
  2786. X
  2787. X#define WX(STR) wf_wl(p_wf,STR)
  2788. X
  2789. X#include "texhead.ctx"
  2790. X}
  2791. X
  2792. X/******************************************************************************/
  2793. X/*                             End of TEXHEAD.C                               */
  2794. X/******************************************************************************/
  2795. END_OF_FILE
  2796. if test 5266 -ne `wc -c <'sources/texhead.c'`; then
  2797.     echo shar: \"'sources/texhead.c'\" unpacked with wrong size!
  2798. fi
  2799. # end of 'sources/texhead.c'
  2800. fi
  2801. if test -f 'sources/texhead.h' -a "${1}" != "-c" ; then 
  2802.   echo shar: Will not clobber existing file \"'sources/texhead.h'\"
  2803. else
  2804. echo shar: Extracting \"'sources/texhead.h'\" \(7043 characters\)
  2805. sed "s/^X//" >'sources/texhead.h' <<'END_OF_FILE'
  2806. X/*##############################################################################
  2807. X
  2808. XFUNNNELWEB COPYRIGHT
  2809. X====================
  2810. XFunnelWeb is a literate-programming macro preprocessor.
  2811. X
  2812. Copyright (C) 1992 Ross N. Williams.
  2813. X
  2814. X   Ross N. Williams
  2815. X   ross@spam.adelaide.edu.au
  2816. X   16 Lerwick Avenue, Hazelwood Park 5066, Australia.
  2817. X
  2818. This program is free software; you can redistribute it and/or modify
  2819. it under the terms of Version 2 of the GNU General Public License as
  2820. published by the Free Software Foundation.
  2821. X
  2822. This program is distributed WITHOUT ANY WARRANTY; without even the implied
  2823. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  2824. See Version 2 of the GNU General Public License for more details.
  2825. X
  2826. You should have received a copy of Version 2 of the GNU General Public
  2827. License along with this program. If not, you can FTP the license from
  2828. prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
  2829. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2830. X
  2831. Section 2a of the license requires that all changes to this file be
  2832. recorded prominently in this file. Please record all changes here.
  2833. X
  2834. Programmers:
  2835. X   RNW  Ross N. Williams  ross@spam.adelaide.edu.au
  2836. X
  2837. Changes:
  2838. X   07-May-1992  RNW  Program prepared for release under GNU GPL V2.
  2839. X
  2840. X##############################################################################*/
  2841. X
  2842. X
  2843. X/******************************************************************************/
  2844. X/*                                  TEXHEAD.H                                 */
  2845. X/******************************************************************************/
  2846. X/*                                                                            */
  2847. X/* TEX HEADER PACKAGE                                                         */
  2848. X/* ==================                                                         */
  2849. X/* This package contains a single function that writes the TeX header         */
  2850. X/* (containing all the Weave macros) to the specified stream. The package     */
  2851. X/* consists of:                                                               */
  2852. X/*                                                                            */
  2853. X/* texhead.tex - The header file ("source code" for texhead.ctx).             */
  2854. X/* texhead.ctx - C code automatically generated by texhead.tex.               */
  2855. X/* texhead.h   - This file, containing a function definition.                 */
  2856. X/* texhead.c   - Contains a function body.                                    */
  2857. X/*                                                                            */
  2858. X/* The first version of FunnelWeb (1986) generated TeX output files that used */
  2859. X/* a collection of macros to neaten and simplify the bulk of the TeX output   */
  2860. X/* file. For example, the macro \fwbtx provided a simple way to specify       */
  2861. X/* verbatim text. This system worked extremely well, the only inconvenience   */
  2862. X/* being that each FunnelWeb TeX output file had to "\input" the TeX header   */
  2863. X/* file containing all the macros. At the time, this seemed a sensible        */
  2864. X/* factorization of the macros, and, within the limited environment in which  */
  2865. X/* FunnelWeb was operating, worked well.                                      */
  2866. X/*                                                                            */
  2867. X/* In NEW, IMPROVED FunnelWeb, "\input"ing the header file has the potential  */
  2868. X/* to cause lots of problems, the major ones being:                           */
  2869. X/*                                                                            */
  2870. X/* - The header file would have to be installed as part of the FunnelWeb      */
  2871. X/*   system. Currently this means that it would be the ONLY other file        */
  2872. X/*   necessary apart from the FunnelWeb executable. It would be far more      */
  2873. X/*   desirable to avoid having to install the header file.                    */
  2874. X/*                                                                            */
  2875. X/* - The header file would have to be referred to somehow by the TeX file.    */
  2876. X/*   As it makes sense to have only one copy of the header file on a machine, */
  2877. X/*   TeX files would have to refer to that copy. This would require one of a  */
  2878. X/*   number of messy machine-specific mechanisms such as (VMS) logical name   */
  2879. X/*   translation or environment variable translation.                         */
  2880. X/*                                                                            */
  2881. X/* - TeX files could not be easily moved to other machines (particularly      */
  2882. X/*   those not running FunnelWeb themselves) without also sending the header  */
  2883. X/*   file.                                                                    */
  2884. X/*                                                                            */
  2885. X/* - If FunnelWeb and the header file were ever jointly modified, the dynamic */
  2886. X/*   binding of old TeX files would mean that they may no longer be printable.*/
  2887. X/*                                                                            */
  2888. X/* For all these reasons, the decision was made to write the library of TeX   */
  2889. X/* macros at the start of each TeX output file, thus making each TeX output   */
  2890. X/* file entirely self-contained. To do this, the header file had to be        */
  2891. X/* converted into a sequence of C output statments. To this end, a new        */
  2892. X/* FunnelWeb shell command CODIFY was added that performs this transformation.*/
  2893. X/* CODIFY could have been a separate utility program, but if it was, it might */
  2894. X/* somehow be separated from the rest of FunnelWeb during distribution. By    */
  2895. X/* building CODIFY into FunnelWeb itself, this possibility is eliminated.     */
  2896. X/*                                                                            */
  2897. X/* This package encapsulates the automatically generated C code. This header  */
  2898. X/* file defines a function that writes it to a specified stream. The package  */
  2899. X/* body texhead.c contains the body of the function which consists mainly of  */
  2900. X/* a #include of the automatically generated C code in texhead.ctx.           */
  2901. X/*                                                                            */
  2902. X/******************************************************************************/
  2903. X
  2904. X/* Ensure that the body of this header file is included at most once.         */
  2905. X#ifndef DONE_TEXH
  2906. X#define DONE_TEXH
  2907. X
  2908. X/******************************************************************************/
  2909. X
  2910. X#include "style.h"
  2911. X
  2912. X#include "writfile.h"
  2913. X
  2914. X/******************************************************************************/
  2915. X
  2916. XEXPORT void tex_head P_((p_wf_t));
  2917. X/* Writes the FunnelWeb TeX header block to the argument stream. */
  2918. X
  2919. X/******************************************************************************/
  2920. X
  2921. X/* For #ifndef preventing multiple inclusion of the body of this header file. */
  2922. X#endif
  2923. X
  2924. X/******************************************************************************/
  2925. X/*                             End of TEXHEAD.H                               */
  2926. X/******************************************************************************/
  2927. END_OF_FILE
  2928. if test 7043 -ne `wc -c <'sources/texhead.h'`; then
  2929.     echo shar: \"'sources/texhead.h'\" unpacked with wrong size!
  2930. fi
  2931. # end of 'sources/texhead.h'
  2932. fi
  2933. echo shar: End of archive 3 \(of 20\).
  2934. cp /dev/null ark3isdone
  2935. MISSING=""
  2936. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  2937.     if test ! -f ark${I}isdone ; then
  2938.     MISSING="${MISSING} ${I}"
  2939.     fi
  2940. done
  2941. if test "${MISSING}" = "" ; then
  2942.     echo You have unpacked all 20 archives.
  2943.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2944. else
  2945.     echo You still need to unpack the following archives:
  2946.     echo "        " ${MISSING}
  2947. fi
  2948. ##  End of shell archive.
  2949. exit 0
  2950.