home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-10 | 122.3 KB | 3,051 lines |
- Newsgroups: comp.sources.unix
- From: ross@spam.adelaide.edu.au (Ross Williams)
- Subject: v26i128: funnelweb - a tool for literate programming in C, Part08/20
- Sender: unix-sources-moderator@vix.com
- Approved: paul@vix.com
-
- Submitted-By: ross@spam.adelaide.edu.au (Ross Williams)
- Posting-Number: Volume 26, Issue 128
- Archive-Name: funnelweb/part08
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 8 (of 20)."
- # Contents: answers/sc13.lis answers/wv04.tex answers/wv05.tex
- # answers/wv06.tex sources/mapper.c userman/u_ch4.tex
- # userman/u_ch5.tex
- # Wrapped by vixie@gw.home.vix.com on Sun Apr 11 11:00:21 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'answers/sc13.lis' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/sc13.lis'\"
- else
- echo shar: Extracting \"'answers/sc13.lis'\" \(17047 characters\)
- sed "s/^X//" >'answers/sc13.lis' <<'END_OF_FILE'
- XFUNNELWEB LISTING FILE
- X======================
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 53 43 31 33 3A 20 56 61 72 69 6F 75 73 20 6B 69 | SC13: Various ki |
- X| 6E 64 73 20 6F 66 20 69 6E 63 6C 75 64 65 20 66 | nds of include f |
- X| 69 6C 65 2E 0A 0A 31 2E 20 49 6E 63 6C 75 64 65 | ile...1. Include |
- X| 20 66 69 6C 65 20 69 73 20 65 6D 70 74 79 2E 0A | file is empty.. |
- X| 42 65 66 6F 72 65 20 69 6E 63 6C 75 64 65 0A 40 | Before include.@ |
- X| 69 20 73 63 31 33 61 0A 41 66 74 65 72 20 69 6E | i sc13a.After in |
- X| 63 6C 75 64 65 0A 0A 32 2E 20 49 6E 63 6C 75 64 | clude..2. Includ |
- X| 65 20 66 69 6C 65 20 63 6F 6E 74 61 69 6E 73 20 | e file contains |
- X| 61 20 73 69 6E 67 6C 65 20 62 6C 61 6E 6B 20 6C | a single blank l |
- X| 69 6E 65 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C | ine..Before incl |
- X| 75 64 65 0A 40 69 20 73 63 31 33 62 0A 41 66 74 | ude.@i sc13b.Aft |
- X| 65 72 20 69 6E 63 6C 75 64 65 0A 0A 33 2E 20 49 | er include..3. I |
- X| 6E 63 6C 75 64 65 20 66 69 6C 65 20 63 6F 6E 74 | nclude file cont |
- X| 61 69 6E 73 20 74 77 6F 20 62 6C 61 6E 6B 20 6C | ains two blank l |
- X| 69 6E 65 73 2E 0A 42 65 66 6F 72 65 20 69 6E 63 | ines..Before inc |
- X| 6C 75 64 65 0A 40 69 20 73 63 31 33 63 0A 41 66 | lude.@i sc13c.Af |
- X| 74 65 72 20 69 6E 63 6C 75 64 65 0A 0A 34 2E 20 | ter include..4. |
- X| 49 6E 63 6C 75 64 65 20 66 69 6C 65 20 63 6F 6E | Include file con |
- X| 74 61 69 6E 73 20 61 20 73 69 6E 67 6C 65 20 6C | tains a single l |
- X| 69 6E 65 20 77 69 74 68 20 74 65 78 74 20 6F 6E | ine with text on |
- X| 20 69 74 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C | it..Before incl |
- X| 75 64 65 0A 40 69 20 73 63 31 33 64 0A 41 66 74 | ude.@i sc13d.Aft |
- X| 65 72 20 69 6E 63 6C 75 64 65 0A 0A 35 2E 20 49 | er include..5. I |
- X| 6E 63 6C 75 64 65 20 66 69 6C 65 27 73 20 6C 61 | nclude file's la |
- X| 73 74 20 6C 69 6E 65 20 69 73 20 6E 6F 74 20 70 | st line is not p |
- X| 72 6F 70 65 72 6C 79 20 74 65 72 6D 69 6E 61 74 | roperly terminat |
- X| 65 64 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C 75 | ed..Before inclu |
- X| 64 65 0A 40 69 20 73 63 31 33 65 0A 41 66 74 65 | de.@i sc13e.Afte |
- X| 72 20 69 6E 63 6C 75 64 65 0A 0A 36 2E 20 49 6E | r include..6. In |
- X| 63 6C 75 64 65 20 66 69 6C 65 20 69 73 20 6F 72 | clude file is or |
- X| 64 69 6E 61 72 79 2E 0A 42 65 66 6F 72 65 20 69 | dinary..Before i |
- X| 6E 63 6C 75 64 65 0A 40 69 20 73 63 31 33 66 0A | nclude.@i sc13f. |
- X| 41 66 74 65 72 20 69 6E 63 6C 75 64 65 0A 0A 37 | After include..7 |
- X| 2E 20 54 65 73 74 20 75 70 70 65 72 20 63 61 73 | . Test upper cas |
- X| 65 20 49 20 61 6E 64 20 66 69 6C 65 20 65 78 74 | e I and file ext |
- X| 65 6E 73 69 6F 6E 20 69 6E 68 65 72 69 74 61 6E | ension inheritan |
- X| 63 65 2E 0A 42 65 66 6F 72 65 20 69 6E 63 6C 75 | ce..Before inclu |
- X| 64 65 0A 40 49 20 73 63 31 33 66 0A 41 66 74 65 | de.@I sc13f.Afte |
- X| 72 20 69 6E 63 6C 75 64 65 0A 0A 45 6E 64 20 6F | r include..End o |
- X| 66 20 74 65 73 74 20 46 69 6C 65 2E 0A | f test File.. |
- X+-------------------------------------------------+------------------+
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X+-------------------------------------------------+------------------+
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 0A | . |
- X+-------------------------------------------------+------------------+
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 0A 0A | .. |
- X+-------------------------------------------------+------------------+
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
- X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
- X| 74 20 53 43 31 33 64 2E 20 4A 75 73 74 20 61 20 | t SC13d. Just a |
- X| 66 69 6C 65 20 63 6F 6E 74 61 69 6E 69 6E 67 20 | file containing |
- X| 6F 6E 65 20 6C 69 6E 65 2E 0A | one line.. |
- X+-------------------------------------------------+------------------+
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
- X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
- X| 74 20 53 43 31 33 65 2E 20 54 68 65 20 74 65 73 | t SC13e. The tes |
- X| 74 20 69 73 20 74 6F 20 73 65 65 20 68 6F 77 20 | t is to see how |
- X| 46 75 6E 6E 65 6C 57 65 62 0A 63 6F 70 65 73 20 | FunnelWeb.copes |
- X| 77 69 74 68 20 61 6E 20 69 6E 63 6C 75 64 65 20 | with an include |
- X| 66 69 6C 65 20 74 68 61 74 20 68 61 73 20 61 6E | file that has an |
- X| 20 69 6D 70 72 6F 70 65 72 6C 79 20 74 65 72 6D | improperly term |
- X| 69 6E 61 74 65 64 20 6C 61 73 74 20 6C 69 6E 65 | inated last line |
- X| 2E 0A 0A 48 65 72 65 20 69 73 20 74 68 65 20 69 | ...Here is the i |
- X| 6D 70 72 6F 70 65 72 20 74 65 72 6D 69 6E 61 74 | mproper terminat |
- X| 69 6F 6E 21 2D 2D 2D 2D 3E | ion!----> |
- X+-------------------------------------------------+------------------+
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
- X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
- X| 74 73 20 53 43 31 33 2E 36 20 61 6E 64 20 53 43 | ts SC13.6 and SC |
- X| 31 33 2E 37 2E 0A 54 68 65 72 65 20 61 72 65 20 | 13.7..There are |
- X| 6F 6E 6C 79 20 74 77 6F 20 6C 69 6E 65 73 2C 20 | only two lines, |
- X| 61 6E 64 20 74 68 69 73 20 69 73 20 74 68 65 20 | and this is the |
- X| 73 65 63 6F 6E 64 20 6F 6E 65 2E 0A | second one.. |
- X+-------------------------------------------------+------------------+
- X
- Dump of mapped file "<<Suppressed>>".
- X
- MEMORY DUMP OF MAPPED FILE
- X==========================
- X
- X+-------------------------------------------------+------------------+
- X| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF |
- X+-------------------------------------------------+------------------+
- X| 54 68 69 73 20 69 73 20 74 68 65 20 69 6E 63 6C | This is the incl |
- X| 75 64 65 20 66 69 6C 65 20 66 6F 72 20 74 65 73 | ude file for tes |
- X| 74 73 20 53 43 31 33 2E 36 20 61 6E 64 20 53 43 | ts SC13.6 and SC |
- X| 31 33 2E 37 2E 0A 54 68 65 72 65 20 61 72 65 20 | 13.7..There are |
- X| 6F 6E 6C 79 20 74 77 6F 20 6C 69 6E 65 73 2C 20 | only two lines, |
- X| 61 6E 64 20 74 68 69 73 20 69 73 20 74 68 65 20 | and this is the |
- X| 73 65 63 6F 6E 64 20 6F 6E 65 2E 0A | second one.. |
- X+-------------------------------------------------+------------------+
- X
- X
- X=========================== Start of LINE LIST DUMP ============================
- X
- Globl Local| Text
- X-----------+--------------------------------------------------------------------
- X00001 00001| SC13: Various kinds of include file.<010>
- X00002 00002| <010>
- X00003 00003| 1. Include file is empty.<010>
- X00004 00004| Before include<010>
- X00005 00005| @i sc13a<010>
- X00006 00006| After include<010>
- X00007 00007| <010>
- X00008 00008| 2. Include file contains a single blank line.<010>
- X00009 00009| Before include<010>
- X00010 00010| @i sc13b<010>
- X00011 00001| <010>
- X00012 00011| After include<010>
- X00013 00012| <010>
- X00014 00013| 3. Include file contains two blank lines.<010>
- X00015 00014| Before include<010>
- X00016 00015| @i sc13c<010>
- X00017 00001| <010>
- X00018 00002| <010>
- X00019 00016| After include<010>
- X00020 00017| <010>
- X00021 00018| 4. Include file contains a single line with text on it.<010>
- X00022 00019| Before include<010>
- X00023 00020| @i sc13d<010>
- X00024 00001| This is the include file for test SC13d. Just a file containing one line.<010>
- X00025 00021| After include<010>
- X00026 00022| <010>
- X00027 00023| 5. Include file's last line is not properly terminated.<010>
- X00028 00024| Before include<010>
- X00029 00025| @i sc13e<010>
- X00030 00001| This is the include file for test SC13e. The test is to see how FunnelWeb<010>
- X00031 00002| copes with an include file that has an improperly terminated last line.<010>
- X00032 00003| <010>
- X00033 00004| Here is the improper termination!----><010>
- X00034 00026| After include<010>
- X00035 00027| <010>
- X00036 00028| 6. Include file is ordinary.<010>
- X00037 00029| Before include<010>
- X00038 00030| @i sc13f<010>
- X00039 00001| This is the include file for tests SC13.6 and SC13.7.<010>
- X00040 00002| There are only two lines, and this is the second one.<010>
- X00041 00031| After include<010>
- X00042 00032| <010>
- X00043 00033| 7. Test upper case I and file extension inheritance.<010>
- X00044 00034| Before include<010>
- X00045 00035| @I sc13f<010>
- X00046 00001| This is the include file for tests SC13.6 and SC13.7.<010>
- X00047 00002| There are only two lines, and this is the second one.<010>
- X00048 00036| After include<010>
- X00049 00037| <010>
- X00050 00038| End of test File.<010>
- X00051 00039| <End-Of-File><010>
- X-----------+--------------------------------------------------------------------
- Globl Local| Text
- X
- X============================ End of LINE LIST DUMP =============================
- X
- X
- X=========================== Start of TOKEN LIST DUMP ===========================
- X
- Summary: There are 15 tokens in the token list.
- X
- Line[Column]: Token Description
- X-------------------------------
- X
- X0001[01]: Text. Text scrap[Grey]="SC13: Various kinds of include file.<010>
- X<010>
- X1. Include file is empty.<010>
- Before include<010>
- X"
- X0006[01]: Text. Text scrap[Grey]="After include<010>
- X<010>
- X2. Include file contains a single blank line.<010>
- Before include<010>
- X"
- X0011[01]: Text. Text scrap[White]="<010>
- X"
- X0012[01]: Text. Text scrap[Grey]="After include<010>
- X<010>
- X3. Include file contains two blank lines.<010>
- Before include<010>
- X"
- X0017[01]: Text. Text scrap[White]="<010>
- X<010>
- X"
- X0019[01]: Text. Text scrap[Grey]="After include<010>
- X<010>
- X4. Include file contains a single line with text on it.<010>
- Before include<010>
- X"
- X0024[01]: Text. Text scrap[Grey]="This is the include file for test SC13d. Just a file containing one line.<010>
- X"
- X0025[01]: Text. Text scrap[Grey]="After include<010>
- X<010>
- X5. Include file's last line is not properly terminated.<010>
- Before include<010>
- X"
- X0030[01]: Text. Text scrap[Grey]="This is the include file for test SC13e. The test is to see how FunnelWeb<010>
- copes with an include file that has an improperly terminated last line.<010>
- X<010>
- Here is the improper termination!----><010>
- X"
- X0034[01]: Text. Text scrap[Grey]="After include<010>
- X<010>
- X6. Include file is ordinary.<010>
- Before include<010>
- X"
- X0039[01]: Text. Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
- There are only two lines, and this is the second one.<010>
- X"
- X0041[01]: Text. Text scrap[Grey]="After include<010>
- X<010>
- X7. Test upper case I and file extension inheritance.<010>
- Before include<010>
- X"
- X0046[01]: Text. Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
- There are only two lines, and this is the second one.<010>
- X"
- X0048[01]: Text. Text scrap[Grey]="After include<010>
- X<010>
- XEnd of test File.<010>
- X"
- X0051[01]: End Of File.
- X============================ End of TOKEN LIST DUMP ============================
- X
- X
- X========================== Start of MACRO TABLE DUMP ===========================
- X
- X
- X=========================== End of MACRO TABLE DUMP ============================
- X
- X
- X========================= Start of DOCUMENT LIST DUMP ==========================
- X
- X
- TEXT COMPONENT: Pos(L,C)=(1,1).
- X
- X-- Start of Text Scrap List --
- Text scrap[Grey]="SC13: Various kinds of include file.<010>
- X<010>
- X1. Include file is empty.<010>
- Before include<010>
- X"
- Text scrap[Grey]="After include<010>
- X<010>
- X2. Include file contains a single blank line.<010>
- Before include<010>
- X"
- Text scrap[White]="<010>
- X"
- Text scrap[Grey]="After include<010>
- X<010>
- X3. Include file contains two blank lines.<010>
- Before include<010>
- X"
- Text scrap[White]="<010>
- X<010>
- X"
- Text scrap[Grey]="After include<010>
- X<010>
- X4. Include file contains a single line with text on it.<010>
- Before include<010>
- X"
- Text scrap[Grey]="This is the include file for test SC13d. Just a file containing one line.<010>
- X"
- Text scrap[Grey]="After include<010>
- X<010>
- X5. Include file's last line is not properly terminated.<010>
- Before include<010>
- X"
- Text scrap[Grey]="This is the include file for test SC13e. The test is to see how FunnelWeb<010>
- copes with an include file that has an improperly terminated last line.<010>
- X<010>
- Here is the improper termination!----><010>
- X"
- Text scrap[Grey]="After include<010>
- X<010>
- X6. Include file is ordinary.<010>
- Before include<010>
- X"
- Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
- There are only two lines, and this is the second one.<010>
- X"
- Text scrap[Grey]="After include<010>
- X<010>
- X7. Test upper case I and file extension inheritance.<010>
- Before include<010>
- X"
- Text scrap[Grey]="This is the include file for tests SC13.6 and SC13.7.<010>
- There are only two lines, and this is the second one.<010>
- X"
- Text scrap[Grey]="After include<010>
- X<010>
- XEnd of test File.<010>
- X"
- X--- End of Text Scrap List ---
- X
- X
- X========================== End of DOCUMENT LIST DUMP ===========================
- X
- XE: No macros defined.
- XE: No output files specified.
- X
- Global Local| Input File
- X------------+-------------------------------------------------------------------
- X 1 1| SC13: Various kinds of include file.
- X 2 2|
- X 3 3| 1. Include file is empty.
- X 4 4| Before include
- X 5 5| @i sc13a
- X Warning|.^Include file is empty (not a byte in syte)!
- X 6 6| After include
- X 7 7|
- X 8 8| 2. Include file contains a single blank line.
- X 9 9| Before include
- X 10 10| @i sc13b
- X 11 1|
- X 12 11| After include
- X 13 12|
- X 14 13| 3. Include file contains two blank lines.
- X 15 14| Before include
- X 16 15| @i sc13c
- X 17 1|
- X 18 2|
- X 19 16| After include
- X 20 17|
- X 21 18| 4. Include file contains a single line with text on it.
- X 22 19| Before include
- X 23 20| @i sc13d
- X 24 1| This is the include file for test SC13d. Just a file containing one line.
- X 25 21| After include
- X 26 22|
- X 27 23| 5. Include file's last line is not properly terminated.
- X 28 24| Before include
- X 29 25| @i sc13e
- X 30 1| This is the include file for test SC13e. The test is to see how FunnelWeb
- X 31 2| copes with an include file that has an improperly terminated last line.
- X 32 3|
- X 33 4| Here is the improper termination!---->
- X 34 26| After include
- X Warning|.^The last line of the include file was terminated by EOF.
- X |.^An EOL was inserted at the end of the last line.
- X 35 27|
- X 36 28| 6. Include file is ordinary.
- X 37 29| Before include
- X 38 30| @i sc13f
- X 39 1| This is the include file for tests SC13.6 and SC13.7.
- X 40 2| There are only two lines, and this is the second one.
- X 41 31| After include
- X 42 32|
- X 43 33| 7. Test upper case I and file extension inheritance.
- X 44 34| Before include
- X 45 35| @I sc13f
- X 46 1| This is the include file for tests SC13.6 and SC13.7.
- X 47 2| There are only two lines, and this is the second one.
- X 48 36| After include
- X 49 37|
- X 50 38| End of test File.
- X | <End-Of-File>
- X------------+-------------------------------------------------------------------
- X
- There were 2 Errors and 2 Warnings.
- END_OF_FILE
- if test 17047 -ne `wc -c <'answers/sc13.lis'`; then
- echo shar: \"'answers/sc13.lis'\" unpacked with wrong size!
- fi
- # end of 'answers/sc13.lis'
- fi
- if test -f 'answers/wv04.tex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/wv04.tex'\"
- else
- echo shar: Extracting \"'answers/wv04.tex'\" \(16542 characters\)
- sed "s/^X//" >'answers/wv04.tex' <<'END_OF_FILE'
- X
- X%*******************************************************************************
- X%* START OF AUTOMATICALLY GENERATED TEX FILE *
- X%*******************************************************************************
- X%* *
- X%* This TeX file was automatically generated by the FunnelWeb preprocessor. *
- X%* You can typeset this file to produce printed documentation by running it *
- X%* through the TeX typesetter using a command such as: *
- X%* tex thisfilename *
- X%* The resultant file thisfilename.dvi can be printed using a command such as: *
- X%* lpr -Pcslw -d thisfilename.dvi *
- X%* *
- X%* FunnelWeb is a preprocessor that allows programmers to weave programs and *
- X%* their documentation together in a single document. The FunnelWeb program *
- X%* analyses such documents producing both program files and typeset *
- X%* documentation such as this TeX file. *
- X%* FunnelWeb was created by Ross Williams. *
- X%* *
- X%* For more information on FunnelWeb look in the following FTP archive: *
- X%* Machine : sirius.itd.adelaide.edu.au [IP=129.127.40.3]. *
- X%* Directory: ~pub/funnelweb/ *
- X%* (or some other appropriately named directory). *
- X%* or email Ross Williams at ross@spam.adelaide.edu.au *
- X%* *
- X%*******************************************************************************
- X
- X
- X%===================== Start of FunnelWeb TeX Definitions ======================
- X
- X
- X% Version
- X% -------
- X% This is FunnelWeb TeX Macro Library Version 1.0.
- X
- X
- X% Copyright
- X% ---------
- X% This set of FunnelWeb TeX definitions was written by Ross Williams and was
- X% originally Copyright (C) 1992 Ross N. Williams. However, I, Ross Williams,
- X% hereby forego any claim to Copyright in this set of FunnelWeb TeX definitions
- X% and hereby authorize that the set of TeX definitions pass into the public
- X% domain. -- Ross N. Williams, 3:41pm 07-May-1992, Adelaide, Australia.
- X
- X
- X% Modification
- X% ------------
- X% Please record all modifications to these TeX definitions here. Unless
- X% otherwise specified, all modified definitions fall in the public domain too.
- X%
- X% Programmers:
- X% RNW Ross N. Williams ross@spam.adelaide.edu.au
- X%
- X% Changes:
- X% 07-May-1992 RNW Prepared this work for public domain release.
- X%
- X
- X
- X% General Comments
- X% ----------------
- X% This set of TeX definitions exists for two reasons:
- X%
- X% 1. To shorten and neaten the FunnelWeb TeX output.
- X% 2. To allow users to fiddle with the output format in their input files
- X% (by inserting redefining "\def"s) without having to resort to
- X% modifying the FunnelWeb code.
- X%
- X% The user is warned that these definitions may be changed from time to time
- X% (but probably not much). The user should not be too sneaky. In particular,
- X% users wishing to redefine some of these macros should do so in an explicitly
- X% defined section at the top of their input file. This will mean that in the
- X% event of problems, that section can simply be deleted or commented out to
- X% allow the document to at least be typeset in the default format. Users should
- X% limit themselves to redefining these macros in such a section and should
- X% refrain from using the macros throughout their documents.
- X
- X
- X% Environment Parameters
- X% ----------------------
- X% \tolerance tells TeX how tolerant it should be about making bad line and
- X% page breaks. Here we set it to it's maximum, as
- X% 1) Computer programs are likely to cause lots of bad breaks.
- X% 2) In most cases the user would probably rather get the TeX file through
- X% TeX without any errors than fiddle with spacings for perfection.
- X\tolerance=10000
- X
- X% I don't like indentation as it makes the page look more busy. Instead,
- X% paragraphs are separated by a little space (see next).
- X\parindent=0pt
- X
- X% In many cases, users will produce documents with long runs of paragraphs.
- X% In order to space out these paragraphs, it is convenient to maintain a
- X% prevailing non-zero \parskip (end-of-paragaph skip). The only trouble is
- X% that the skip becomes a problem in macro definitions which require no skip
- X% and so we have to turn the skip on and off. The following two macros
- X% simplify this process.
- X\def\fwparskipon{\parskip=\medskipamount}
- X\def\fwparskipoff{\parskip=0pt}
- X\fwparskipon
- X
- X% Setting raggedbottom allows TeX to leave a bit of space at the bottom of the
- X% page in order to better vertically align the rest of the page (e.g. skips
- X% won't stretch as much). It also means that headings are less likely to be
- X% isolated at the bottom of the page without any following text.
- X\raggedbottom
- X
- X
- X% Fonts
- X% -----
- X% Most of the typeset output is set in 10pt roman and 10pt tt font.
- X% The major extra font needs spring from titles and headings.
- X% For portability's sake we use only the following fonts:
- X% cmr10
- X% cmbx10
- X% cmtt10
- X% and some enlargements of them. These fonts are all "standard" fonts
- X% in Plain TeX. See The TeXbook p.350.
- X\font\fwfontnote=cmr7
- X
- X\font\fwfontnorm=cmr10
- X\font\fwfontnorma=cmr10 scaled \magstep1
- X\font\fwfontnormb=cmr10 scaled \magstep2
- X
- X\font\fwfontbold=cmbx10
- X\font\fwfontbolda=cmbx10 scaled \magstep1
- X\font\fwfontboldb=cmbx10 scaled \magstep2
- X\font\fwfontboldc=cmbx10 scaled \magstep3
- X\font\fwfontboldd=cmbx10 scaled \magstep4
- X
- X
- X% Macros for Stylistic Details
- X% ----------------------------
- X% This section contains all the fiddly little macros for setting the details
- X% of each macro definition.
- X
- X% Macro definitions are sandwiched by calls to these macros which can be used
- X% to sort out the spacing before and after the macro definition.
- X\def\fwbeginmacro{\fwparskipoff\bigskip}
- X\def\fwendmacro{\fwparskipon\par}
- X
- X% These macros deal with the macro name and definition line.
- X\def\fwmacroname#1#2{{\sl #1\/}$\lbrack$#2$\rbrack$}
- X\def\fwfilename#1#2{{\bf #1}$\lbrack$#2$\rbrack$}
- X\def\fwzero#1{{\bf Z}}
- X\def\fwmany#1{{\bf M}}
- X\def\fwequals{ $\equiv$}
- X\def\fwplusequals{ $+\equiv$}
- X
- X% Now for the actual body of the definition. It looks nice to have the tt
- X% code indented a little. Again, we use macros instead of writing direct TeX,
- X% so as to allow the user to fiddle this stuff to taste without having to
- X% modify the FunnelWeb C code.
- X\def\fwodef{\parindent=15pt\vskip0pt$\lbrace$\parindent=20pt}
- X\def\fwcdef{$\rbrace$\vskip0pt\parindent=0pt}
- X\def\fwoquote{`}
- X\def\fwcquote{'}
- X\def\fwoparen{$($}
- X\def\fwcomma{$,$}
- X\def\fwcparen{$)$}
- X\def\fwparam#1{$\diamond #1$}
- X\def\fwparams#1{$(\diamond #1)$}
- X
- X% These macros deal with the notes that are appended at the end of each
- X% macro definition. Note that even though \fwisafile,\fwusedin, and \fwseealso
- X% have the same definition, they are given different names so as to allow the
- X% user to redefine these macros to typeset each kind of information differently
- X% if desired.
- X\def\fwbeginmacronotes{\begingroup\baselineskip=9pt\smallskip}
- X\def\fwnote#1{{\fwfontnote #1}\par}
- X\def\fwisafile#1{\fwnote{#1}}
- X\def\fwusedin#1{\fwnote{#1}}
- X\def\fwseealso#1{\fwnote{#1}}
- X\def\fwendmacronotes{\endgroup}
- X
- X
- X% Macros to Typeset Program Code Verbatim
- X% ---------------------------------------
- X% This is by far the hairiest and most difficult part of the typesetting task
- X% because we have to turn off most of TeX's natural instincts in order to
- X% typeset the program text exactly as it appears in the input file.
- X% Two macros are defined to pull this off: \fwbtx and \fwverbatimgobble.
- X% Their code was inspired by the following sections of "The TeXbook":
- X% Appendix D: Dirty Tricks, 3.Verbatim listing, p.380-382.
- X% Appendix E: Example Formats, p.421.
- X% The \fwbtx[ (for "FunnelWeb Begin TeXt") macro does most of the hard work.
- X% The liberal use of "%" is because I don't understand TeX well enough to
- X% understand when an end of line will cause trouble, and I am playing it safe.
- X
- X% Before defining the main \fwbtx macro, we have to stash away some definitions
- X% in the hidden part of TeX's environment. Let's hope that these "hidden"
- X% definitions don't affect anything except what is desired to be affected.
- X
- X% The tt font in which we wish to set the text has two Latin lurking ligatures!
- X% These are ?` and !`. To disable them, we define the left quote when ACTIVE
- X% to be defined in such a way as to prevent ligatures. The main TeX text will
- X% normally not be exposed to this definition because normally the leftquote
- X% character is not active. The \fwbtx macro temporarily makes the left quote
- X% character active thus activating the deactivation of left quote ligatures.
- X% See The TeXbook p.381.
- X{\catcode`\`=\active \gdef`{\relax\lq}}
- X
- X% TeX is fairly carefree about spaces and so we have to make it more serious.
- X% To do so we pull the same trick as above, setting up a definition for active
- X% space, but only making space active during the span of the verbatim text.
- X% In Plain TeX the active space is defined to be simply a space, but here we
- X% define it to be a control space. This ensures that the space cannot
- X% be gobbled up by one of TeX's mysterious mechanisms when activated.
- X% See The TeXbook, p.381 and p.352.
- X{\obeyspaces\global\let =\ }
- X
- X% Here is the main \fwbtx verbatim text macro.
- X% Note: The order in which all these pieces of business have to be done is
- X% still a partial mystery to me. Don't fiddle with this stuff unless you
- X% think you know what you are doing.
- X\def\fwbtx[{%
- X%
- X% The funnies involved in getting verbatim output are safely housed inside
- X% this \begingroup, and the \endgroup in \fwverbatimgobble. Groups are used
- X% instead of curly braces because we have to be able to signal the end of
- X% this macro with a curly brace.
- X\begingroup%
- X%
- X% \pars at the end of empty lines in the verbatim text won't come out normally
- X% because TeX is in vertical mode and they get gobbled up. To prevent this,
- X% we force \par to exit vertical mode first. See The TeXbook p.381.
- X\def\par{\leavevmode\endgraf}%
- X%
- X% Activate the leftquote character so as to avoid ligatures (see above).
- X\catcode`\`=\active%
- X%
- X% The \obeylines macro simply defines end of line (^M) to be \par. This ensures
- X% that TeX will treat each verbatim line as a new paragraph.
- X\obeylines%
- X%
- X% To get verbatim output, we have to desex all the special characters. This
- X% is explained in detail in The TeXbook p.380.
- X\def\do##1{\catcode`##1=12 }\dospecials%
- X%
- X% Activate the space character so as to make TeX treat blanks seriously.
- X% This activation invokes an eralier definition (see above).
- X\obeyspaces
- X%
- X% Interparagraph skips do not help the cause.
- X% Note: We have to preserve the indentation though, as the code is actually
- X% indented in the final output. See \fwodef in an earlier section.
- X\parskip=0pt%
- X%
- X% We typeset the verbatim text in tt font (courier on the Macintosh) for a
- X% number of reasons:
- X% - tt font has the same horizontal spacing for each character.
- X% - tt font covers the ASCII character set.
- X% - tt font doesn't have many surprises (e.g. ligatures).
- X% - tt font looks much what you might see on a computer terminal screen.
- X\tt%
- X%
- X% Having set up an environment for verbatim, we are ready to use it.
- X% By invoking \fwverbatimgobble, this \fwbtx macro gobbles up text verbatim (as
- X% part of the parameter of \fwverbatimgobble) until it sees the termination
- X% string "]fwetx=" (the "=" was thrown in to add obscurity as this sequence
- X% must never occur in the verbatim text).
- X\fwverbatimgobble}
- X
- X% The \fwverbatimgobble macro exists to allow \fwbtx to bracket verbatim text.
- X\def\fwverbatimgobble#1]fwetx={#1\endgroup}
- X
- X
- X% Table of Contents
- X% -----------------
- X% The five levels of table of contents that FunnelWeb supports are identified
- X% by the five letters [A..E]. These are used throughout the following macros.
- X
- X% The following macros are utilities to the TOC macros to follow.
- X\def\fwrule{\medskip\hrule\medskip}
- X\def\fwqh{\hskip1.5em\relax}
- X\def\fwbeforesec{\penalty-200\bigskip\medskip\par}
- X
- X% The following macros are used to typeset the table of contents.
- X\def\fwtocstart#1{\fwrule\leftline{\fwfontbolda Table of Contents}\fwrule}
- X\def\fwtoca#1#2{\leftline{{\bf #1 #2}}}
- X\def\fwtocb#1#2{\leftline{\fwqh #1 #2}}
- X\def\fwtocc#1#2{\leftline{\fwqh\fwqh #1 #2}}
- X\def\fwtocd#1#2{\leftline{\fwqh\fwqh\fwqh #1 #2}}
- X\def\fwtoce#1#2{\leftline{\fwqh\fwqh\fwqh\fwqh #1 #2}}
- X\def\fwtocfinish#1{\fwrule}
- X
- X% The following "library" macros define five different strengths of headings
- X% which can be used later in the section macros.
- X\def\fwliba#1#2{\vfill\eject{\fwfontboldc #1 #2}\penalty200\smallskip}
- X\def\fwlibb#1#2{\fwbeforesec{\fwfontboldb #1 #2}\penalty200\smallskip}
- X\def\fwlibc#1#2{\fwbeforesec{\fwfontnormb #1 #2}\penalty200\smallskip}
- X\def\fwlibd#1#2{\fwbeforesec{\bf #1 #2}\penalty200}
- X\def\fwlibe#1#2{\fwbeforesec{\bf #1 #2}}
- X
- X% Here are the macros that actually typeset the section headings throughout
- X% the document. The fwlib system has been employed so as to easily allow the
- X% user to redefine the strengths of headings to taste. For example, the
- X% user could insert in the input document a similar set of definitions to these
- X% but with the b..e headings set to \fwlibc. This would tone down the output.
- X\def\fwseca#1#2{\fwliba{#1}{#2}}
- X\def\fwsecb#1#2{\fwlibb{#1}{#2}}
- X\def\fwsecc#1#2{\fwlibc{#1}{#2}}
- X\def\fwsecd#1#2{\fwlibd{#1}{#2}}
- X\def\fwsece#1#2{\fwlibe{#1}{#2}}
- X
- X
- X% Support for Explicit Typesetting
- X% --------------------------------
- X% FunnelWeb supports pragmas and other constructs that allow
- X% typesetter-independent typesetting commands to be given. The
- X% following macros support these features.
- X
- X% The in-text literal @{sloth@} and emphasise @[walrus@] features.
- X\def\fwlit#1{{\tt #1}}
- X\def\fwemp#1{{\it #1}}
- X
- X% The "@p new_page" pragma.
- X\def\fwnewpage{\vfill\eject}
- X
- X% The "@p vskip Nmm" pragma.
- X\def\fwvskip#1{\null\vskip #1mm}
- X
- X% The "@p title <font> <align> <text>" pragma.
- X\def\fwfontnormal#1{{\fwfontnorm {#1}}}
- X\def\fwfonttitle#1{{\fwfontboldd {#1}}}
- X\def\fwfontsmalltitle#1{{\fwfontboldb {#1}}}
- X\def\fwleftline#1{\leftline{#1}}
- X\def\fwcenterline#1{\centerline{#1}}
- X\def\fwrightline#1{\rightline{#1}}
- X
- X
- X% Support for Old FunnelWeb
- X% -------------------------
- X% The following macros were used extensively in the first version of
- X% FunnelWeb and are retained so that these older input files will still
- X% typeset cleanly.
- X\def\p#1{{\tt #1}} % P for Program text.
- X\def\flagpage#1#2{
- X \null
- X \vfill
- X \centerline{\fwfontboldd #1}
- X \vskip 1cm
- X \centerline{\fwfontboldd #2}
- X \vfill
- X \null
- X \vfill
- X}
- X
- X%====================== End of FunnelWeb TeX Definitions =======================
- WV04: Test ugly string processing.
- X
- X\fwbeginmacro
- X\fwfilename{wv04.out}{1}\fwequals \fwodef \fwcdef
- X\fwbeginmacronotes
- X\fwisafile{This macro is attached to an output file.}
- X\fwendmacronotes
- X\fwendmacro
- X
- X
- X1. Test ugly string in section name.
- X\fwseca{1}{ !\char`\"\#\$\%'()*+,-./0123456789:;$<$=$>$?}
- X\fwseca{2}{ABCDEFGHIJKLMNOPQRSTUVWXYZ[$\backslash$]\char`\^\_`}
- X\fwseca{3}{abcdefghijklmnopqrstuvwxyz$\{$$|$$\}$\char`\~}
- X
- X2. Test ugly string in macro name.
- X\fwbeginmacro
- X\fwmacroname{ !\char`\"\#\$\%'()*+,-./0123456789:;$<$=$>$?}{2}\fwzero{}\fwequals \fwodef \fwcdef
- X\fwbeginmacronotes
- X\fwusedin{This macro is NEVER invoked.}
- X\fwendmacronotes
- X\fwendmacro
- X
- X\fwbeginmacro
- X\fwmacroname{ABCDEFGHIJKLMNOPQRSTUVWXYZ[$\backslash$]\char`\^\_`}{3}\fwzero{}\fwequals \fwodef \fwcdef
- X\fwbeginmacronotes
- X\fwusedin{This macro is NEVER invoked.}
- X\fwendmacronotes
- X\fwendmacro
- X
- X\fwbeginmacro
- X\fwmacroname{abcdefghijklmnopqrstuvwxyz$\{$$|$$\}$\char`\~}{4}\fwzero{}\fwequals \fwodef \fwcdef
- X\fwbeginmacronotes
- X\fwusedin{This macro is NEVER invoked.}
- X\fwendmacronotes
- X\fwendmacro
- X
- X
- X3. Test ugly string in literal section.
- X\fwlit{ !\char`\"\#\$\%'()*+,-./0123456789:;\char`\<=\char`\>?}
- X\fwlit{ABCDEFGHIJKLMNOPQRSTUVWXYZ[\char`\\]\char`\^\_`}
- X\fwlit{abcdefghijklmnopqrstuvwxyz\char`\{\char`\|\char`\}\char`\~}
- X
- X\bye
- X
- X
- X%*******************************************************************************
- X%* END OF AUTOMATICALLY GENERATED TEX FILE *
- X%*******************************************************************************
- X
- END_OF_FILE
- if test 16542 -ne `wc -c <'answers/wv04.tex'`; then
- echo shar: \"'answers/wv04.tex'\" unpacked with wrong size!
- fi
- # end of 'answers/wv04.tex'
- fi
- if test -f 'answers/wv05.tex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/wv05.tex'\"
- else
- echo shar: Extracting \"'answers/wv05.tex'\" \(16706 characters\)
- sed "s/^X//" >'answers/wv05.tex' <<'END_OF_FILE'
- X
- X%*******************************************************************************
- X%* START OF AUTOMATICALLY GENERATED TEX FILE *
- X%*******************************************************************************
- X%* *
- X%* This TeX file was automatically generated by the FunnelWeb preprocessor. *
- X%* You can typeset this file to produce printed documentation by running it *
- X%* through the TeX typesetter using a command such as: *
- X%* tex thisfilename *
- X%* The resultant file thisfilename.dvi can be printed using a command such as: *
- X%* lpr -Pcslw -d thisfilename.dvi *
- X%* *
- X%* FunnelWeb is a preprocessor that allows programmers to weave programs and *
- X%* their documentation together in a single document. The FunnelWeb program *
- X%* analyses such documents producing both program files and typeset *
- X%* documentation such as this TeX file. *
- X%* FunnelWeb was created by Ross Williams. *
- X%* *
- X%* For more information on FunnelWeb look in the following FTP archive: *
- X%* Machine : sirius.itd.adelaide.edu.au [IP=129.127.40.3]. *
- X%* Directory: ~pub/funnelweb/ *
- X%* (or some other appropriately named directory). *
- X%* or email Ross Williams at ross@spam.adelaide.edu.au *
- X%* *
- X%*******************************************************************************
- X
- X
- X%===================== Start of FunnelWeb TeX Definitions ======================
- X
- X
- X% Version
- X% -------
- X% This is FunnelWeb TeX Macro Library Version 1.0.
- X
- X
- X% Copyright
- X% ---------
- X% This set of FunnelWeb TeX definitions was written by Ross Williams and was
- X% originally Copyright (C) 1992 Ross N. Williams. However, I, Ross Williams,
- X% hereby forego any claim to Copyright in this set of FunnelWeb TeX definitions
- X% and hereby authorize that the set of TeX definitions pass into the public
- X% domain. -- Ross N. Williams, 3:41pm 07-May-1992, Adelaide, Australia.
- X
- X
- X% Modification
- X% ------------
- X% Please record all modifications to these TeX definitions here. Unless
- X% otherwise specified, all modified definitions fall in the public domain too.
- X%
- X% Programmers:
- X% RNW Ross N. Williams ross@spam.adelaide.edu.au
- X%
- X% Changes:
- X% 07-May-1992 RNW Prepared this work for public domain release.
- X%
- X
- X
- X% General Comments
- X% ----------------
- X% This set of TeX definitions exists for two reasons:
- X%
- X% 1. To shorten and neaten the FunnelWeb TeX output.
- X% 2. To allow users to fiddle with the output format in their input files
- X% (by inserting redefining "\def"s) without having to resort to
- X% modifying the FunnelWeb code.
- X%
- X% The user is warned that these definitions may be changed from time to time
- X% (but probably not much). The user should not be too sneaky. In particular,
- X% users wishing to redefine some of these macros should do so in an explicitly
- X% defined section at the top of their input file. This will mean that in the
- X% event of problems, that section can simply be deleted or commented out to
- X% allow the document to at least be typeset in the default format. Users should
- X% limit themselves to redefining these macros in such a section and should
- X% refrain from using the macros throughout their documents.
- X
- X
- X% Environment Parameters
- X% ----------------------
- X% \tolerance tells TeX how tolerant it should be about making bad line and
- X% page breaks. Here we set it to it's maximum, as
- X% 1) Computer programs are likely to cause lots of bad breaks.
- X% 2) In most cases the user would probably rather get the TeX file through
- X% TeX without any errors than fiddle with spacings for perfection.
- X\tolerance=10000
- X
- X% I don't like indentation as it makes the page look more busy. Instead,
- X% paragraphs are separated by a little space (see next).
- X\parindent=0pt
- X
- X% In many cases, users will produce documents with long runs of paragraphs.
- X% In order to space out these paragraphs, it is convenient to maintain a
- X% prevailing non-zero \parskip (end-of-paragaph skip). The only trouble is
- X% that the skip becomes a problem in macro definitions which require no skip
- X% and so we have to turn the skip on and off. The following two macros
- X% simplify this process.
- X\def\fwparskipon{\parskip=\medskipamount}
- X\def\fwparskipoff{\parskip=0pt}
- X\fwparskipon
- X
- X% Setting raggedbottom allows TeX to leave a bit of space at the bottom of the
- X% page in order to better vertically align the rest of the page (e.g. skips
- X% won't stretch as much). It also means that headings are less likely to be
- X% isolated at the bottom of the page without any following text.
- X\raggedbottom
- X
- X
- X% Fonts
- X% -----
- X% Most of the typeset output is set in 10pt roman and 10pt tt font.
- X% The major extra font needs spring from titles and headings.
- X% For portability's sake we use only the following fonts:
- X% cmr10
- X% cmbx10
- X% cmtt10
- X% and some enlargements of them. These fonts are all "standard" fonts
- X% in Plain TeX. See The TeXbook p.350.
- X\font\fwfontnote=cmr7
- X
- X\font\fwfontnorm=cmr10
- X\font\fwfontnorma=cmr10 scaled \magstep1
- X\font\fwfontnormb=cmr10 scaled \magstep2
- X
- X\font\fwfontbold=cmbx10
- X\font\fwfontbolda=cmbx10 scaled \magstep1
- X\font\fwfontboldb=cmbx10 scaled \magstep2
- X\font\fwfontboldc=cmbx10 scaled \magstep3
- X\font\fwfontboldd=cmbx10 scaled \magstep4
- X
- X
- X% Macros for Stylistic Details
- X% ----------------------------
- X% This section contains all the fiddly little macros for setting the details
- X% of each macro definition.
- X
- X% Macro definitions are sandwiched by calls to these macros which can be used
- X% to sort out the spacing before and after the macro definition.
- X\def\fwbeginmacro{\fwparskipoff\bigskip}
- X\def\fwendmacro{\fwparskipon\par}
- X
- X% These macros deal with the macro name and definition line.
- X\def\fwmacroname#1#2{{\sl #1\/}$\lbrack$#2$\rbrack$}
- X\def\fwfilename#1#2{{\bf #1}$\lbrack$#2$\rbrack$}
- X\def\fwzero#1{{\bf Z}}
- X\def\fwmany#1{{\bf M}}
- X\def\fwequals{ $\equiv$}
- X\def\fwplusequals{ $+\equiv$}
- X
- X% Now for the actual body of the definition. It looks nice to have the tt
- X% code indented a little. Again, we use macros instead of writing direct TeX,
- X% so as to allow the user to fiddle this stuff to taste without having to
- X% modify the FunnelWeb C code.
- X\def\fwodef{\parindent=15pt\vskip0pt$\lbrace$\parindent=20pt}
- X\def\fwcdef{$\rbrace$\vskip0pt\parindent=0pt}
- X\def\fwoquote{`}
- X\def\fwcquote{'}
- X\def\fwoparen{$($}
- X\def\fwcomma{$,$}
- X\def\fwcparen{$)$}
- X\def\fwparam#1{$\diamond #1$}
- X\def\fwparams#1{$(\diamond #1)$}
- X
- X% These macros deal with the notes that are appended at the end of each
- X% macro definition. Note that even though \fwisafile,\fwusedin, and \fwseealso
- X% have the same definition, they are given different names so as to allow the
- X% user to redefine these macros to typeset each kind of information differently
- X% if desired.
- X\def\fwbeginmacronotes{\begingroup\baselineskip=9pt\smallskip}
- X\def\fwnote#1{{\fwfontnote #1}\par}
- X\def\fwisafile#1{\fwnote{#1}}
- X\def\fwusedin#1{\fwnote{#1}}
- X\def\fwseealso#1{\fwnote{#1}}
- X\def\fwendmacronotes{\endgroup}
- X
- X
- X% Macros to Typeset Program Code Verbatim
- X% ---------------------------------------
- X% This is by far the hairiest and most difficult part of the typesetting task
- X% because we have to turn off most of TeX's natural instincts in order to
- X% typeset the program text exactly as it appears in the input file.
- X% Two macros are defined to pull this off: \fwbtx and \fwverbatimgobble.
- X% Their code was inspired by the following sections of "The TeXbook":
- X% Appendix D: Dirty Tricks, 3.Verbatim listing, p.380-382.
- X% Appendix E: Example Formats, p.421.
- X% The \fwbtx[ (for "FunnelWeb Begin TeXt") macro does most of the hard work.
- X% The liberal use of "%" is because I don't understand TeX well enough to
- X% understand when an end of line will cause trouble, and I am playing it safe.
- X
- X% Before defining the main \fwbtx macro, we have to stash away some definitions
- X% in the hidden part of TeX's environment. Let's hope that these "hidden"
- X% definitions don't affect anything except what is desired to be affected.
- X
- X% The tt font in which we wish to set the text has two Latin lurking ligatures!
- X% These are ?` and !`. To disable them, we define the left quote when ACTIVE
- X% to be defined in such a way as to prevent ligatures. The main TeX text will
- X% normally not be exposed to this definition because normally the leftquote
- X% character is not active. The \fwbtx macro temporarily makes the left quote
- X% character active thus activating the deactivation of left quote ligatures.
- X% See The TeXbook p.381.
- X{\catcode`\`=\active \gdef`{\relax\lq}}
- X
- X% TeX is fairly carefree about spaces and so we have to make it more serious.
- X% To do so we pull the same trick as above, setting up a definition for active
- X% space, but only making space active during the span of the verbatim text.
- X% In Plain TeX the active space is defined to be simply a space, but here we
- X% define it to be a control space. This ensures that the space cannot
- X% be gobbled up by one of TeX's mysterious mechanisms when activated.
- X% See The TeXbook, p.381 and p.352.
- X{\obeyspaces\global\let =\ }
- X
- X% Here is the main \fwbtx verbatim text macro.
- X% Note: The order in which all these pieces of business have to be done is
- X% still a partial mystery to me. Don't fiddle with this stuff unless you
- X% think you know what you are doing.
- X\def\fwbtx[{%
- X%
- X% The funnies involved in getting verbatim output are safely housed inside
- X% this \begingroup, and the \endgroup in \fwverbatimgobble. Groups are used
- X% instead of curly braces because we have to be able to signal the end of
- X% this macro with a curly brace.
- X\begingroup%
- X%
- X% \pars at the end of empty lines in the verbatim text won't come out normally
- X% because TeX is in vertical mode and they get gobbled up. To prevent this,
- X% we force \par to exit vertical mode first. See The TeXbook p.381.
- X\def\par{\leavevmode\endgraf}%
- X%
- X% Activate the leftquote character so as to avoid ligatures (see above).
- X\catcode`\`=\active%
- X%
- X% The \obeylines macro simply defines end of line (^M) to be \par. This ensures
- X% that TeX will treat each verbatim line as a new paragraph.
- X\obeylines%
- X%
- X% To get verbatim output, we have to desex all the special characters. This
- X% is explained in detail in The TeXbook p.380.
- X\def\do##1{\catcode`##1=12 }\dospecials%
- X%
- X% Activate the space character so as to make TeX treat blanks seriously.
- X% This activation invokes an eralier definition (see above).
- X\obeyspaces
- X%
- X% Interparagraph skips do not help the cause.
- X% Note: We have to preserve the indentation though, as the code is actually
- X% indented in the final output. See \fwodef in an earlier section.
- X\parskip=0pt%
- X%
- X% We typeset the verbatim text in tt font (courier on the Macintosh) for a
- X% number of reasons:
- X% - tt font has the same horizontal spacing for each character.
- X% - tt font covers the ASCII character set.
- X% - tt font doesn't have many surprises (e.g. ligatures).
- X% - tt font looks much what you might see on a computer terminal screen.
- X\tt%
- X%
- X% Having set up an environment for verbatim, we are ready to use it.
- X% By invoking \fwverbatimgobble, this \fwbtx macro gobbles up text verbatim (as
- X% part of the parameter of \fwverbatimgobble) until it sees the termination
- X% string "]fwetx=" (the "=" was thrown in to add obscurity as this sequence
- X% must never occur in the verbatim text).
- X\fwverbatimgobble}
- X
- X% The \fwverbatimgobble macro exists to allow \fwbtx to bracket verbatim text.
- X\def\fwverbatimgobble#1]fwetx={#1\endgroup}
- X
- X
- X% Table of Contents
- X% -----------------
- X% The five levels of table of contents that FunnelWeb supports are identified
- X% by the five letters [A..E]. These are used throughout the following macros.
- X
- X% The following macros are utilities to the TOC macros to follow.
- X\def\fwrule{\medskip\hrule\medskip}
- X\def\fwqh{\hskip1.5em\relax}
- X\def\fwbeforesec{\penalty-200\bigskip\medskip\par}
- X
- X% The following macros are used to typeset the table of contents.
- X\def\fwtocstart#1{\fwrule\leftline{\fwfontbolda Table of Contents}\fwrule}
- X\def\fwtoca#1#2{\leftline{{\bf #1 #2}}}
- X\def\fwtocb#1#2{\leftline{\fwqh #1 #2}}
- X\def\fwtocc#1#2{\leftline{\fwqh\fwqh #1 #2}}
- X\def\fwtocd#1#2{\leftline{\fwqh\fwqh\fwqh #1 #2}}
- X\def\fwtoce#1#2{\leftline{\fwqh\fwqh\fwqh\fwqh #1 #2}}
- X\def\fwtocfinish#1{\fwrule}
- X
- X% The following "library" macros define five different strengths of headings
- X% which can be used later in the section macros.
- X\def\fwliba#1#2{\vfill\eject{\fwfontboldc #1 #2}\penalty200\smallskip}
- X\def\fwlibb#1#2{\fwbeforesec{\fwfontboldb #1 #2}\penalty200\smallskip}
- X\def\fwlibc#1#2{\fwbeforesec{\fwfontnormb #1 #2}\penalty200\smallskip}
- X\def\fwlibd#1#2{\fwbeforesec{\bf #1 #2}\penalty200}
- X\def\fwlibe#1#2{\fwbeforesec{\bf #1 #2}}
- X
- X% Here are the macros that actually typeset the section headings throughout
- X% the document. The fwlib system has been employed so as to easily allow the
- X% user to redefine the strengths of headings to taste. For example, the
- X% user could insert in the input document a similar set of definitions to these
- X% but with the b..e headings set to \fwlibc. This would tone down the output.
- X\def\fwseca#1#2{\fwliba{#1}{#2}}
- X\def\fwsecb#1#2{\fwlibb{#1}{#2}}
- X\def\fwsecc#1#2{\fwlibc{#1}{#2}}
- X\def\fwsecd#1#2{\fwlibd{#1}{#2}}
- X\def\fwsece#1#2{\fwlibe{#1}{#2}}
- X
- X
- X% Support for Explicit Typesetting
- X% --------------------------------
- X% FunnelWeb supports pragmas and other constructs that allow
- X% typesetter-independent typesetting commands to be given. The
- X% following macros support these features.
- X
- X% The in-text literal @{sloth@} and emphasise @[walrus@] features.
- X\def\fwlit#1{{\tt #1}}
- X\def\fwemp#1{{\it #1}}
- X
- X% The "@p new_page" pragma.
- X\def\fwnewpage{\vfill\eject}
- X
- X% The "@p vskip Nmm" pragma.
- X\def\fwvskip#1{\null\vskip #1mm}
- X
- X% The "@p title <font> <align> <text>" pragma.
- X\def\fwfontnormal#1{{\fwfontnorm {#1}}}
- X\def\fwfonttitle#1{{\fwfontboldd {#1}}}
- X\def\fwfontsmalltitle#1{{\fwfontboldb {#1}}}
- X\def\fwleftline#1{\leftline{#1}}
- X\def\fwcenterline#1{\centerline{#1}}
- X\def\fwrightline#1{\rightline{#1}}
- X
- X
- X% Support for Old FunnelWeb
- X% -------------------------
- X% The following macros were used extensively in the first version of
- X% FunnelWeb and are retained so that these older input files will still
- X% typeset cleanly.
- X\def\p#1{{\tt #1}} % P for Program text.
- X\def\flagpage#1#2{
- X \null
- X \vfill
- X \centerline{\fwfontboldd #1}
- X \vskip 1cm
- X \centerline{\fwfontboldd #2}
- X \vfill
- X \null
- X \vfill
- X}
- X
- X%====================== End of FunnelWeb TeX Definitions =======================
- WV05: Test processing of ugly strings as ordinary and protected text
- with no typesetter set.
- X
- X\fwbeginmacro
- X\fwfilename{wv05.out}{1}\fwequals \fwodef \fwcdef
- X\fwbeginmacronotes
- X\fwisafile{This macro is attached to an output file.}
- X\fwendmacronotes
- X\fwendmacro
- X
- X
- A paragraph in ordinary mode.
- X
- X33 con!text
- X34 con\char`\"text
- X35 con\#text
- X36 con\$text
- X37 con\%text
- X38 con\&text
- X39 con'text
- X40 con(text
- X41 con)text
- X42 con*text
- X43 con+text
- X44 con,text
- X45 con-text
- X46 con.text
- X47 con/text
- X48-57 con0123456789text
- X58 con:text
- X59 con;text
- X60 con$<$text
- X61 con=text
- X62 con$>$text
- X63 con?text
- X64 con@text
- X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
- X91 con[text
- X92 con$\backslash$text
- X93 con]text
- X94 con\char`\^text
- X95 con\_text
- X96 con`text
- X97-122 conabcdefghijklmnopqrstuvwxyztext
- X123 con$\{$text
- X124 con$|$text
- X125 con$\}$text
- X126 con\char`\~text
- X
- Now again, but this time inside protective braces.
- X
- X\fwlit{
- X33 con!text
- X34 con\char`\"text
- X35 con\#text
- X36 con\$text
- X37 con\%text
- X38 con\&text
- X39 con'text
- X40 con(text
- X41 con)text
- X42 con*text
- X43 con+text
- X44 con,text
- X45 con-text
- X46 con.text
- X47 con/text
- X48-57 con0123456789text
- X58 con:text
- X59 con;text
- X60 con\char`\<text
- X61 con=text
- X62 con\char`\>text
- X63 con?text
- X64 con@text
- X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
- X91 con[text
- X92 con\char`\\text
- X93 con]text
- X94 con\char`\^text
- X95 con\_text
- X96 con`text
- X97-122 conabcdefghijklmnopqrstuvwxyztext
- X123 con\char`\{text
- X124 con\char`\|text
- X125 con\char`\}text
- X126 con\char`\~text
- X}
- X\bye
- X
- X
- X%*******************************************************************************
- X%* END OF AUTOMATICALLY GENERATED TEX FILE *
- X%*******************************************************************************
- X
- END_OF_FILE
- if test 16706 -ne `wc -c <'answers/wv05.tex'`; then
- echo shar: \"'answers/wv05.tex'\" unpacked with wrong size!
- fi
- # end of 'answers/wv05.tex'
- fi
- if test -f 'answers/wv06.tex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'answers/wv06.tex'\"
- else
- echo shar: Extracting \"'answers/wv06.tex'\" \(16657 characters\)
- sed "s/^X//" >'answers/wv06.tex' <<'END_OF_FILE'
- X
- X%*******************************************************************************
- X%* START OF AUTOMATICALLY GENERATED TEX FILE *
- X%*******************************************************************************
- X%* *
- X%* This TeX file was automatically generated by the FunnelWeb preprocessor. *
- X%* You can typeset this file to produce printed documentation by running it *
- X%* through the TeX typesetter using a command such as: *
- X%* tex thisfilename *
- X%* The resultant file thisfilename.dvi can be printed using a command such as: *
- X%* lpr -Pcslw -d thisfilename.dvi *
- X%* *
- X%* FunnelWeb is a preprocessor that allows programmers to weave programs and *
- X%* their documentation together in a single document. The FunnelWeb program *
- X%* analyses such documents producing both program files and typeset *
- X%* documentation such as this TeX file. *
- X%* FunnelWeb was created by Ross Williams. *
- X%* *
- X%* For more information on FunnelWeb look in the following FTP archive: *
- X%* Machine : sirius.itd.adelaide.edu.au [IP=129.127.40.3]. *
- X%* Directory: ~pub/funnelweb/ *
- X%* (or some other appropriately named directory). *
- X%* or email Ross Williams at ross@spam.adelaide.edu.au *
- X%* *
- X%*******************************************************************************
- X
- X
- X%===================== Start of FunnelWeb TeX Definitions ======================
- X
- X
- X% Version
- X% -------
- X% This is FunnelWeb TeX Macro Library Version 1.0.
- X
- X
- X% Copyright
- X% ---------
- X% This set of FunnelWeb TeX definitions was written by Ross Williams and was
- X% originally Copyright (C) 1992 Ross N. Williams. However, I, Ross Williams,
- X% hereby forego any claim to Copyright in this set of FunnelWeb TeX definitions
- X% and hereby authorize that the set of TeX definitions pass into the public
- X% domain. -- Ross N. Williams, 3:41pm 07-May-1992, Adelaide, Australia.
- X
- X
- X% Modification
- X% ------------
- X% Please record all modifications to these TeX definitions here. Unless
- X% otherwise specified, all modified definitions fall in the public domain too.
- X%
- X% Programmers:
- X% RNW Ross N. Williams ross@spam.adelaide.edu.au
- X%
- X% Changes:
- X% 07-May-1992 RNW Prepared this work for public domain release.
- X%
- X
- X
- X% General Comments
- X% ----------------
- X% This set of TeX definitions exists for two reasons:
- X%
- X% 1. To shorten and neaten the FunnelWeb TeX output.
- X% 2. To allow users to fiddle with the output format in their input files
- X% (by inserting redefining "\def"s) without having to resort to
- X% modifying the FunnelWeb code.
- X%
- X% The user is warned that these definitions may be changed from time to time
- X% (but probably not much). The user should not be too sneaky. In particular,
- X% users wishing to redefine some of these macros should do so in an explicitly
- X% defined section at the top of their input file. This will mean that in the
- X% event of problems, that section can simply be deleted or commented out to
- X% allow the document to at least be typeset in the default format. Users should
- X% limit themselves to redefining these macros in such a section and should
- X% refrain from using the macros throughout their documents.
- X
- X
- X% Environment Parameters
- X% ----------------------
- X% \tolerance tells TeX how tolerant it should be about making bad line and
- X% page breaks. Here we set it to it's maximum, as
- X% 1) Computer programs are likely to cause lots of bad breaks.
- X% 2) In most cases the user would probably rather get the TeX file through
- X% TeX without any errors than fiddle with spacings for perfection.
- X\tolerance=10000
- X
- X% I don't like indentation as it makes the page look more busy. Instead,
- X% paragraphs are separated by a little space (see next).
- X\parindent=0pt
- X
- X% In many cases, users will produce documents with long runs of paragraphs.
- X% In order to space out these paragraphs, it is convenient to maintain a
- X% prevailing non-zero \parskip (end-of-paragaph skip). The only trouble is
- X% that the skip becomes a problem in macro definitions which require no skip
- X% and so we have to turn the skip on and off. The following two macros
- X% simplify this process.
- X\def\fwparskipon{\parskip=\medskipamount}
- X\def\fwparskipoff{\parskip=0pt}
- X\fwparskipon
- X
- X% Setting raggedbottom allows TeX to leave a bit of space at the bottom of the
- X% page in order to better vertically align the rest of the page (e.g. skips
- X% won't stretch as much). It also means that headings are less likely to be
- X% isolated at the bottom of the page without any following text.
- X\raggedbottom
- X
- X
- X% Fonts
- X% -----
- X% Most of the typeset output is set in 10pt roman and 10pt tt font.
- X% The major extra font needs spring from titles and headings.
- X% For portability's sake we use only the following fonts:
- X% cmr10
- X% cmbx10
- X% cmtt10
- X% and some enlargements of them. These fonts are all "standard" fonts
- X% in Plain TeX. See The TeXbook p.350.
- X\font\fwfontnote=cmr7
- X
- X\font\fwfontnorm=cmr10
- X\font\fwfontnorma=cmr10 scaled \magstep1
- X\font\fwfontnormb=cmr10 scaled \magstep2
- X
- X\font\fwfontbold=cmbx10
- X\font\fwfontbolda=cmbx10 scaled \magstep1
- X\font\fwfontboldb=cmbx10 scaled \magstep2
- X\font\fwfontboldc=cmbx10 scaled \magstep3
- X\font\fwfontboldd=cmbx10 scaled \magstep4
- X
- X
- X% Macros for Stylistic Details
- X% ----------------------------
- X% This section contains all the fiddly little macros for setting the details
- X% of each macro definition.
- X
- X% Macro definitions are sandwiched by calls to these macros which can be used
- X% to sort out the spacing before and after the macro definition.
- X\def\fwbeginmacro{\fwparskipoff\bigskip}
- X\def\fwendmacro{\fwparskipon\par}
- X
- X% These macros deal with the macro name and definition line.
- X\def\fwmacroname#1#2{{\sl #1\/}$\lbrack$#2$\rbrack$}
- X\def\fwfilename#1#2{{\bf #1}$\lbrack$#2$\rbrack$}
- X\def\fwzero#1{{\bf Z}}
- X\def\fwmany#1{{\bf M}}
- X\def\fwequals{ $\equiv$}
- X\def\fwplusequals{ $+\equiv$}
- X
- X% Now for the actual body of the definition. It looks nice to have the tt
- X% code indented a little. Again, we use macros instead of writing direct TeX,
- X% so as to allow the user to fiddle this stuff to taste without having to
- X% modify the FunnelWeb C code.
- X\def\fwodef{\parindent=15pt\vskip0pt$\lbrace$\parindent=20pt}
- X\def\fwcdef{$\rbrace$\vskip0pt\parindent=0pt}
- X\def\fwoquote{`}
- X\def\fwcquote{'}
- X\def\fwoparen{$($}
- X\def\fwcomma{$,$}
- X\def\fwcparen{$)$}
- X\def\fwparam#1{$\diamond #1$}
- X\def\fwparams#1{$(\diamond #1)$}
- X
- X% These macros deal with the notes that are appended at the end of each
- X% macro definition. Note that even though \fwisafile,\fwusedin, and \fwseealso
- X% have the same definition, they are given different names so as to allow the
- X% user to redefine these macros to typeset each kind of information differently
- X% if desired.
- X\def\fwbeginmacronotes{\begingroup\baselineskip=9pt\smallskip}
- X\def\fwnote#1{{\fwfontnote #1}\par}
- X\def\fwisafile#1{\fwnote{#1}}
- X\def\fwusedin#1{\fwnote{#1}}
- X\def\fwseealso#1{\fwnote{#1}}
- X\def\fwendmacronotes{\endgroup}
- X
- X
- X% Macros to Typeset Program Code Verbatim
- X% ---------------------------------------
- X% This is by far the hairiest and most difficult part of the typesetting task
- X% because we have to turn off most of TeX's natural instincts in order to
- X% typeset the program text exactly as it appears in the input file.
- X% Two macros are defined to pull this off: \fwbtx and \fwverbatimgobble.
- X% Their code was inspired by the following sections of "The TeXbook":
- X% Appendix D: Dirty Tricks, 3.Verbatim listing, p.380-382.
- X% Appendix E: Example Formats, p.421.
- X% The \fwbtx[ (for "FunnelWeb Begin TeXt") macro does most of the hard work.
- X% The liberal use of "%" is because I don't understand TeX well enough to
- X% understand when an end of line will cause trouble, and I am playing it safe.
- X
- X% Before defining the main \fwbtx macro, we have to stash away some definitions
- X% in the hidden part of TeX's environment. Let's hope that these "hidden"
- X% definitions don't affect anything except what is desired to be affected.
- X
- X% The tt font in which we wish to set the text has two Latin lurking ligatures!
- X% These are ?` and !`. To disable them, we define the left quote when ACTIVE
- X% to be defined in such a way as to prevent ligatures. The main TeX text will
- X% normally not be exposed to this definition because normally the leftquote
- X% character is not active. The \fwbtx macro temporarily makes the left quote
- X% character active thus activating the deactivation of left quote ligatures.
- X% See The TeXbook p.381.
- X{\catcode`\`=\active \gdef`{\relax\lq}}
- X
- X% TeX is fairly carefree about spaces and so we have to make it more serious.
- X% To do so we pull the same trick as above, setting up a definition for active
- X% space, but only making space active during the span of the verbatim text.
- X% In Plain TeX the active space is defined to be simply a space, but here we
- X% define it to be a control space. This ensures that the space cannot
- X% be gobbled up by one of TeX's mysterious mechanisms when activated.
- X% See The TeXbook, p.381 and p.352.
- X{\obeyspaces\global\let =\ }
- X
- X% Here is the main \fwbtx verbatim text macro.
- X% Note: The order in which all these pieces of business have to be done is
- X% still a partial mystery to me. Don't fiddle with this stuff unless you
- X% think you know what you are doing.
- X\def\fwbtx[{%
- X%
- X% The funnies involved in getting verbatim output are safely housed inside
- X% this \begingroup, and the \endgroup in \fwverbatimgobble. Groups are used
- X% instead of curly braces because we have to be able to signal the end of
- X% this macro with a curly brace.
- X\begingroup%
- X%
- X% \pars at the end of empty lines in the verbatim text won't come out normally
- X% because TeX is in vertical mode and they get gobbled up. To prevent this,
- X% we force \par to exit vertical mode first. See The TeXbook p.381.
- X\def\par{\leavevmode\endgraf}%
- X%
- X% Activate the leftquote character so as to avoid ligatures (see above).
- X\catcode`\`=\active%
- X%
- X% The \obeylines macro simply defines end of line (^M) to be \par. This ensures
- X% that TeX will treat each verbatim line as a new paragraph.
- X\obeylines%
- X%
- X% To get verbatim output, we have to desex all the special characters. This
- X% is explained in detail in The TeXbook p.380.
- X\def\do##1{\catcode`##1=12 }\dospecials%
- X%
- X% Activate the space character so as to make TeX treat blanks seriously.
- X% This activation invokes an eralier definition (see above).
- X\obeyspaces
- X%
- X% Interparagraph skips do not help the cause.
- X% Note: We have to preserve the indentation though, as the code is actually
- X% indented in the final output. See \fwodef in an earlier section.
- X\parskip=0pt%
- X%
- X% We typeset the verbatim text in tt font (courier on the Macintosh) for a
- X% number of reasons:
- X% - tt font has the same horizontal spacing for each character.
- X% - tt font covers the ASCII character set.
- X% - tt font doesn't have many surprises (e.g. ligatures).
- X% - tt font looks much what you might see on a computer terminal screen.
- X\tt%
- X%
- X% Having set up an environment for verbatim, we are ready to use it.
- X% By invoking \fwverbatimgobble, this \fwbtx macro gobbles up text verbatim (as
- X% part of the parameter of \fwverbatimgobble) until it sees the termination
- X% string "]fwetx=" (the "=" was thrown in to add obscurity as this sequence
- X% must never occur in the verbatim text).
- X\fwverbatimgobble}
- X
- X% The \fwverbatimgobble macro exists to allow \fwbtx to bracket verbatim text.
- X\def\fwverbatimgobble#1]fwetx={#1\endgroup}
- X
- X
- X% Table of Contents
- X% -----------------
- X% The five levels of table of contents that FunnelWeb supports are identified
- X% by the five letters [A..E]. These are used throughout the following macros.
- X
- X% The following macros are utilities to the TOC macros to follow.
- X\def\fwrule{\medskip\hrule\medskip}
- X\def\fwqh{\hskip1.5em\relax}
- X\def\fwbeforesec{\penalty-200\bigskip\medskip\par}
- X
- X% The following macros are used to typeset the table of contents.
- X\def\fwtocstart#1{\fwrule\leftline{\fwfontbolda Table of Contents}\fwrule}
- X\def\fwtoca#1#2{\leftline{{\bf #1 #2}}}
- X\def\fwtocb#1#2{\leftline{\fwqh #1 #2}}
- X\def\fwtocc#1#2{\leftline{\fwqh\fwqh #1 #2}}
- X\def\fwtocd#1#2{\leftline{\fwqh\fwqh\fwqh #1 #2}}
- X\def\fwtoce#1#2{\leftline{\fwqh\fwqh\fwqh\fwqh #1 #2}}
- X\def\fwtocfinish#1{\fwrule}
- X
- X% The following "library" macros define five different strengths of headings
- X% which can be used later in the section macros.
- X\def\fwliba#1#2{\vfill\eject{\fwfontboldc #1 #2}\penalty200\smallskip}
- X\def\fwlibb#1#2{\fwbeforesec{\fwfontboldb #1 #2}\penalty200\smallskip}
- X\def\fwlibc#1#2{\fwbeforesec{\fwfontnormb #1 #2}\penalty200\smallskip}
- X\def\fwlibd#1#2{\fwbeforesec{\bf #1 #2}\penalty200}
- X\def\fwlibe#1#2{\fwbeforesec{\bf #1 #2}}
- X
- X% Here are the macros that actually typeset the section headings throughout
- X% the document. The fwlib system has been employed so as to easily allow the
- X% user to redefine the strengths of headings to taste. For example, the
- X% user could insert in the input document a similar set of definitions to these
- X% but with the b..e headings set to \fwlibc. This would tone down the output.
- X\def\fwseca#1#2{\fwliba{#1}{#2}}
- X\def\fwsecb#1#2{\fwlibb{#1}{#2}}
- X\def\fwsecc#1#2{\fwlibc{#1}{#2}}
- X\def\fwsecd#1#2{\fwlibd{#1}{#2}}
- X\def\fwsece#1#2{\fwlibe{#1}{#2}}
- X
- X
- X% Support for Explicit Typesetting
- X% --------------------------------
- X% FunnelWeb supports pragmas and other constructs that allow
- X% typesetter-independent typesetting commands to be given. The
- X% following macros support these features.
- X
- X% The in-text literal @{sloth@} and emphasise @[walrus@] features.
- X\def\fwlit#1{{\tt #1}}
- X\def\fwemp#1{{\it #1}}
- X
- X% The "@p new_page" pragma.
- X\def\fwnewpage{\vfill\eject}
- X
- X% The "@p vskip Nmm" pragma.
- X\def\fwvskip#1{\null\vskip #1mm}
- X
- X% The "@p title <font> <align> <text>" pragma.
- X\def\fwfontnormal#1{{\fwfontnorm {#1}}}
- X\def\fwfonttitle#1{{\fwfontboldd {#1}}}
- X\def\fwfontsmalltitle#1{{\fwfontboldb {#1}}}
- X\def\fwleftline#1{\leftline{#1}}
- X\def\fwcenterline#1{\centerline{#1}}
- X\def\fwrightline#1{\rightline{#1}}
- X
- X
- X% Support for Old FunnelWeb
- X% -------------------------
- X% The following macros were used extensively in the first version of
- X% FunnelWeb and are retained so that these older input files will still
- X% typeset cleanly.
- X\def\p#1{{\tt #1}} % P for Program text.
- X\def\flagpage#1#2{
- X \null
- X \vfill
- X \centerline{\fwfontboldd #1}
- X \vskip 1cm
- X \centerline{\fwfontboldd #2}
- X \vfill
- X \null
- X \vfill
- X}
- X
- X%====================== End of FunnelWeb TeX Definitions =======================
- WV06: Test processing of ugly strings as ordinary and protected text
- with typesetter = tex.
- X
- X
- X\fwbeginmacro
- X\fwfilename{wv06.out}{1}\fwequals \fwodef \fwcdef
- X\fwbeginmacronotes
- X\fwisafile{This macro is attached to an output file.}
- X\fwendmacronotes
- X\fwendmacro
- X
- X
- A paragraph in ordinary mode.
- X
- X33 con!text
- X34 con"text
- X35 con#text
- X36 con$text
- X37 con%text
- X38 con&text
- X39 con'text
- X40 con(text
- X41 con)text
- X42 con*text
- X43 con+text
- X44 con,text
- X45 con-text
- X46 con.text
- X47 con/text
- X48-57 con0123456789text
- X58 con:text
- X59 con;text
- X60 con<text
- X61 con=text
- X62 con>text
- X63 con?text
- X64 con@text
- X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
- X91 con[text
- X92 con\text
- X93 con]text
- X94 con^text
- X95 con_text
- X96 con`text
- X97-122 conabcdefghijklmnopqrstuvwxyztext
- X123 con{text
- X124 con|text
- X125 con}text
- X126 con~text
- X
- Now again, but this time inside protective braces.
- X
- X\fwlit{
- X33 con!text
- X34 con\char`\"text
- X35 con\#text
- X36 con\$text
- X37 con\%text
- X38 con\&text
- X39 con'text
- X40 con(text
- X41 con)text
- X42 con*text
- X43 con+text
- X44 con,text
- X45 con-text
- X46 con.text
- X47 con/text
- X48-57 con0123456789text
- X58 con:text
- X59 con;text
- X60 con\char`\<text
- X61 con=text
- X62 con\char`\>text
- X63 con?text
- X64 con@text
- X65-90 conABCDEFGHIJKLMNOPQRSTUVWXYZtext
- X91 con[text
- X92 con\char`\\text
- X93 con]text
- X94 con\char`\^text
- X95 con\_text
- X96 con`text
- X97-122 conabcdefghijklmnopqrstuvwxyztext
- X123 con\char`\{text
- X124 con\char`\|text
- X125 con\char`\}text
- X126 con\char`\~text
- X}
- X\bye
- X
- X
- X%*******************************************************************************
- X%* END OF AUTOMATICALLY GENERATED TEX FILE *
- X%*******************************************************************************
- X
- END_OF_FILE
- if test 16657 -ne `wc -c <'answers/wv06.tex'`; then
- echo shar: \"'answers/wv06.tex'\" unpacked with wrong size!
- fi
- # end of 'answers/wv06.tex'
- fi
- if test -f 'sources/mapper.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sources/mapper.c'\"
- else
- echo shar: Extracting \"'sources/mapper.c'\" \(17032 characters\)
- sed "s/^X//" >'sources/mapper.c' <<'END_OF_FILE'
- X/*##############################################################################
- X
- XFUNNNELWEB COPYRIGHT
- X====================
- XFunnelWeb is a literate-programming macro preprocessor.
- X
- Copyright (C) 1992 Ross N. Williams.
- X
- X Ross N. Williams
- X ross@spam.adelaide.edu.au
- X 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X
- This program is free software; you can redistribute it and/or modify
- it under the terms of Version 2 of the GNU General Public License as
- published by the Free Software Foundation.
- X
- This program is distributed WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See Version 2 of the GNU General Public License for more details.
- X
- You should have received a copy of Version 2 of the GNU General Public
- License along with this program. If not, you can FTP the license from
- prep.ai.mit.edu/pub/gnu/COPYING-2 or write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- Section 2a of the license requires that all changes to this file be
- recorded prominently in this file. Please record all changes here.
- X
- Programmers:
- X RNW Ross N. Williams ross@spam.adelaide.edu.au
- X
- Changes:
- X 07-May-1992 RNW Program prepared for release under GNU GPL V2.
- X
- X##############################################################################*/
- X
- X
- X/******************************************************************************/
- X/* MAPPER.C */
- X/******************************************************************************/
- X
- X#include <limits.h>
- X#include "style.h"
- X
- X#include "as.h"
- X#include "machin.h"
- X#include "mapper.h"
- X#include "memory.h"
- X
- X/******************************************************************************/
- X
- X/* When we allocate a block of memory for a mapped file, we have to allocate */
- X/* a little more than the official length of the file. Here are some reasons: */
- X/* */
- X/* - We may wish to append an EOF character later on in the program. */
- X/* - fgets, when requested to fetch n characters, fetches n characters and */
- X/* then puts an EOS on the end of them. */
- X/* - It is conceivable that fgets will insert a "\n" at the end of the */
- X/* block if it doesn't see a "\n" just before the end of file. */
- X/* */
- X/* For all these reasons, we allocate a little more memory than we need. How */
- X/* much more is determined by BLK_FUDGE which is set to be on the safe side. */
- X#define BLK_FUDGE (20)
- X
- X/* The following fudge is useful for avoiding the limits of types. */
- X#define LIM_FUDGE (10)
- X
- X/* On PCs, size_t is 16 bits and malloc cannot allocate contiguous chunks of */
- X/* memory of more than about 64K. This really stuffs up FunnelWeb's capacity */
- X/* map in files of length greater than 64K. I didn't think of this problem */
- X/* when I designed FunnelWeb because I was thinking of the VOLUME of memory */
- X/* available nowadays, rather than its organization on small computers. */
- X/* Anyway, this problem should really be fixed by allowing files to be read */
- X/* in in segments. Perhaps the mapper should hand over a linked list of */
- X/* chunks rather than a single chunk. Unfortunately, I don't have the time to */
- X/* do this now, so users of the PC version of FunnelWeb will have to be */
- X/* content with an (approx) 64K limit to input files. This isn't as bad as it */
- X/* sounds, as large input files can be split using the include facility. */
- X/* 63K is chosen instead of 64K so as to be paranoid. */
- X#define PCFILEMX (63L*1024L)
- X
- X/******************************************************************************/
- X/* */
- X/* Error Strings */
- X/* ------------- */
- X/* Routines in this package return pointers to error strings. These pointers */
- X/* are subsequently bandied about by other packages. Therefore, they must be */
- X/* pointers to constant strings. The trick of returning a pointer to a static */
- X/* character array containing a specific sprintf message will backfire here */
- X/* if there is an error opening more than one input file. Using mm_* to */
- X/* create space for each error string would work though. */
- X/* STOP PRESS: Now that the lister copies error messages, there may no longer */
- X/* be a problem here. */
- X/* */
- X/******************************************************************************/
- X
- X/* Finding The Length of a File */
- X/* ---------------------------- */
- X/* We have to be able to find out the length of a file before reading it in */
- X/* because, in this version of FunnelWeb, the entire file must be read into */
- X/* one contiguous block of memory. */
- X/* */
- X/* As it turns out, finding the length of a file in portable C turns out to */
- X/* be a very hard problem. Here are some possible solutions: */
- X/* */
- X/* 1. Read the entire file in and see how long it is. */
- X/* 2. Use fseek to move to the end of the file and then use ftell. */
- X/* 3. Use the Unix 'stat' call. */
- X/* */
- X/* Of these, only the first is portable. The second alternative is */
- X/* non-portable because some environments do not support the SEEK_END symbol */
- X/* required to perform a seek to the end of file. */
- X/* Alternatives to needing the length are as follows: */
- X/* */
- X/* 4. Read the file/allocate memory in 64K blocks. */
- X/* 5. Read the file in 64K blocks and then copy them to a contiguous one. */
- X/* */
- X/* Perhaps options 4 or 5 could be implemented later. However, right now I */
- X/* haven't got the time to do anything except strive for portability, so */
- X/* option 1 it is. */
- X
- LOCAL char *file_len P_((char *,ulong *));
- LOCAL char *file_len (p_name,p_length)
- X/* Given a filename (in 'p_name'), returns the length of the binary image of */
- X/* the file in *p_length. Returns NULL upon success or a pointer to a string */
- X/* describing an error upon failure. The length is measured in bytes. */
- char *p_name;
- ulong *p_length;
- X{
- X FILE *infile;
- X STAVAR char *p_buf = NULL;
- X
- X/* The length of the buffer handed to fgets is non-critical. However, it */
- X/* mustn't be bigger than 15 bits, as we are passing it as an int to fgets. */
- X#define LENBUFLEN (1024L)
- X#if LENBUFLEN > 30000L
- X #error "mapper.c: LENBUFLEN must be less than 15 bits."
- X#endif
- X
- X /* Allocate the buffer if it has not already been allocated. */
- X if (p_buf == NULL)
- X p_buf=mm_perm((size_t) LENBUFLEN);
- X
- X /* Open for TEXT reading. Earlier, I tried this using a binary read, but */
- X /* I had problems with this on the VAX (I forget what the problems were) and */
- X /* so I have switched back to a text read which is slower, but more reliable.*/
- X infile=fopen(p_name,"r");
- X if (infile == FOPEN_F)
- X return "Error fopen()ing input file (to determine its length).";
- X
- X /* Start with a zero length. */
- X *p_length=0;
- X
- X /* Read the file as text and count the number of bytes it contains. */
- X while (!feof(infile))
- X {
- X /* Set the buffer to the empty string so it is valid even if fgets fails. */
- X p_buf[0]=EOS;
- X
- X /* Read in a whole lot of bytes. */
- X fgets(p_buf,LENBUFLEN,infile);
- X
- X /* If there is an error, abort. */
- X if (ferror(infile))
- X {
- X fclose(infile);
- X return "Error fgets()ing input file (as part of determining its length).";
- X }
- X
- X /* Count the bytes that we have got. If EOF occurred above AND no bytes */
- X /* were read, the EOS we planted earlier saves us. */
- X (*p_length)+=strlen(p_buf);
- X }
- X
- X if (fclose(infile) == FCLOSE_F)
- X return "Error fclose()ing input file (as part of determining its length).";
- X
- X return NULL;
- X}
- X
- X/******************************************************************************/
- X
- X#if PC & UNIX_EOL
- X #error Attempt to use unix_map function on a PC!
- X#endif
- X
- X#if UNIX_EOL
- LOCAL char *unix_map P_((char *,char **,ulong *));
- LOCAL char *unix_map(p_name,pp_mem,p_length)
- X/* If we know that the enclosing environment represents text files in UNIX */
- X/* form, then there is no need to process the file on the way in. All we need */
- X/* to do is map it directly into memory. This will be very fast. */
- char *p_name;
- char **pp_mem;
- ulong *p_length;
- X{
- X ulong file_length; /* Number of bytes in the target input file. */
- X char *p_err; /* Temporary to store pointer to error message. */
- X FILE *infile; /* The file variable for the input file we are reading. */
- X ulong num_bytes; /* Number of bytes actually read in (may be different). */
- X char *p_bytes; /* Pointer to the memory block where all the action is. */
- X
- X /* Obtain the length of the file we are about to map in. */
- X p_err=file_len(p_name,&file_length);
- X if (p_err != NULL)
- X return p_err;
- X
- X /* Allocate memory to hold the mapped file. */
- X /* Note: The memory allocation package bombs if there is no more memory. */
- X p_bytes=(char *) mm_temp((size_t) file_length+BLK_FUDGE);
- X
- X /* Open the file in BINARY mode. */
- X infile=fopen(p_name,"rb");
- X if (infile==FOPEN_F)
- X return "Error fopen()ing the input file (binary open).";
- X
- X /* Read in the file and complain if we haven't read in enough bytes. */
- X num_bytes=fread(p_bytes,(size_t) 1L,(size_t) file_length,infile);
- X if (num_bytes != file_length)
- X return "Error fread()ing the input file.";
- X
- X if (fclose(infile) == FCLOSE_F)
- X return "Error fclose()ing the input file.";
- X
- X /* Success. We got through the IO calls. Now fill in the blanks and go home. */
- X *pp_mem =p_bytes;
- X *p_length =num_bytes;
- X return NULL;
- X}
- X#endif
- X
- X/******************************************************************************/
- X
- X#if !UNIX_EOL
- LOCAL char *stan_map P_((char *,char **,ulong *));
- LOCAL char *stan_map(p_name,pp_mem,p_length)
- X/* Maps in a file using refined text stream IO calls. */
- char *p_name;
- char **pp_mem;
- ulong *p_length;
- X{
- X ulong file_length; /* Number of bytes in the target input file. */
- X char *p_err; /* Temporary to store pointer to error message. */
- X FILE *infile; /* The file variable for the input file we are reading. */
- X ulong num_bytes; /* Number of bytes actually read in (may be different). */
- X char *p_bytes; /* Pointer to the memory block where all the action is. */
- X char *p_curr; /* Pointer to current position in memory block. */
- X long bytes_left; /* Number of bytes still left to read. */
- X
- X /* Obtain the length of the file we are about to map in. */
- X p_err=file_len(p_name,&file_length);
- X if (p_err != NULL)
- X return p_err;
- X
- X /* Complain on the PC if the file is too big to fit in one 64K segment. */
- X#if PC
- X if (file_length+BLK_FUDGE > PCFILEMX)
- X return
- X "Error: Input file too big for PC FunnelWeb. Split using include files.";
- X#endif
- X
- X /* TRACE printf("MAPPER: LENGTH OF INPUT FILE=%lu\n",file_length); */
- X
- X /* Allocate memory to hold the mapped file. */
- X /* Note: The memory allocation package bombs if there is no more memory. */
- X /* Note: As Unix stream format (the format to which we are converting) uses */
- X /* just one byte to mark the end of file, it seems highly unlikely */
- X /* that the file read in will be longer than the binary image. */
- X p_bytes=(char *) mm_temp((size_t) file_length+BLK_FUDGE);
- X
- X /* If the file is of zero length, we already know its contents! */
- X /* This is probably not strictly necessary, but why pressure the code below? */
- X if (file_length==0)
- X {
- X *pp_mem = p_bytes;
- X *p_length = 0;
- X return NULL;
- X }
- X
- X /* Open the file afresh in TEXT mode for portable reading. */
- X infile=fopen(p_name,"r");
- X if (infile==FOPEN_F)
- X return "Error fopen()ing input file (for reading).";
- X
- X /* Read in as much of the file as we can without actually overflowing the */
- X /* buffer. If the file finished before the buffer, things have probably gone */
- X /* OK. If the buffer finishes before the file, we have a problem. */
- X /* Note: bytes_left = file_length+1 because in the following loop, we might */
- X /* read exactly up to the EOF and then be unable to actually trigger the EOF */
- X /* condition without another read. So we add one on to allow this extra read */
- X /* to take place. I don't know if this is necessary, but I certainly can't */
- X /* find anything in all my C books that will tell me. Anyway, it doesn't */
- X /* matter because we fudged in a few extra bytes earlier. */
- X
- X p_curr = p_bytes; /* p_curr runs through the memory. */
- X bytes_left = file_length+1; /* Bytes left in memory allocated to hold file. */
- X
- X while (!feof(infile))
- X {
- X int bytes_try;
- X int bytes_read;
- X
- X /* Try to read as much as we possibly can, but not more than the integer */
- X /* limit (which can be as low as 15 bits). */
- X bytes_try = bytes_left >= ((ulong) (INT_MAX-LIM_FUDGE)) ?
- X (int) INT_MAX-LIM_FUDGE : (int) bytes_left;
- X
- X /* Plan an EOS to cover the EOF case. */
- X *p_curr=EOS;
- X
- X /* Attempt to read bytes_try bytes. +1 is because fgets reads n-1 bytes. */
- X fgets(p_curr,bytes_try+1,infile);
- X if (ferror(infile))
- X {
- X fclose(infile);
- X return "Error fgets()ing the input file.";
- X }
- X
- X /* fgets doesn't return a length so we have to hobble behind with strlen. */
- X /* It's still probably better than using lots of fgetc calls. */
- X /* If we hit EOF and no bytes were read, the EOS we planted saves us. */
- X bytes_read = strlen(p_curr);
- X p_curr += bytes_read;
- X bytes_left -= bytes_read;
- X
- X /* If we have run out of bytes in our allocated memory zone, then the */
- X /* file is longer than the length reported earlier. This is a bad thing. */
- X as_cold(bytes_left >=0,
- X "stan_map: Text representation was longer than binary rep.");
- X }
- X
- X num_bytes=(file_length+1)-bytes_left; /* See earlier to undserstand +1. */
- X
- X /* Note: We can't get fussy here and check the read in length with the */
- X /* official length, as the read-in length is the text representation which */
- X /* is allowed to be shorter than the physical (binary) length of the file. */
- X
- X if (fclose(infile) == FCLOSE_F)
- X return "Error fclose()ing input file.";
- X
- X /* Success. We got through the IO calls. Now fill in the blanks and go home. */
- X *pp_mem = p_bytes;
- X *p_length = num_bytes;
- X return NULL;
- X}
- X#endif
- X
- X/******************************************************************************/
- X
- XEXPORT char *map_file(p_name,pp_mem,p_length)
- char *p_name;
- char **pp_mem;
- ulong *p_length;
- X{
- X /* We choose one of two mapper routines depending on where the operating */
- X /* system represents text files using EOL (\n) as end of line markers. */
- X /* The UNIX_EOL symbol is defined in the machin.h file. */
- X /* Note: I thought of using sprintf to test to see what "\n" translated into */
- X /* so I wouldn't need the UNIXEOL symbol. However, unlike printf (which it */
- X /* is supposed to be like), sprintf does not translate "\n" into its outside */
- X /* form. The only other alternative is writing a short text file and reading */
- X /* it back in binary - an action that would probably take longer than */
- X /* reading the original file to be read using fgetc()! */
- X
- X#if UNIX_EOL
- X return unix_map(p_name,pp_mem,p_length);
- X#else
- X return stan_map(p_name,pp_mem,p_length);
- X#endif
- X}
- X
- X/******************************************************************************/
- X/* End of MAPPER.C */
- X/******************************************************************************/
- X
- END_OF_FILE
- if test 17032 -ne `wc -c <'sources/mapper.c'`; then
- echo shar: \"'sources/mapper.c'\" unpacked with wrong size!
- fi
- # end of 'sources/mapper.c'
- fi
- if test -f 'userman/u_ch4.tex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'userman/u_ch4.tex'\"
- else
- echo shar: Extracting \"'userman/u_ch4.tex'\" \(17359 characters\)
- sed "s/^X//" >'userman/u_ch4.tex' <<'END_OF_FILE'
- X%==============================================================================%
- X% Start of Ch4.tex %
- X%==============================================================================%
- X%
- X% Copyright
- X% ---------
- X% Copyright (C) 1992 Ross N. Williams.
- X% This file contains a chapter of the FunnelWeb User's Manual.
- X% See the main TeX file for this manual for further information.
- X%
- X%==============================================================================%
- X
- X\chapter{FunnelWeb Installation}
- X\label{chapinstall}\xx{FunnelWeb}{installation}
- X
- This chapter describes how to obtain, compile, and install FunnelWeb.
- You will need:
- X
- X\begin{itemize}
- X
- X\item FTP access to the internet \i{or} a FunnelWeb distribution kit on disk.
- X
- X\item A Sun, VMS VAX, Macintosh, or PC \i{or} lots of extra time to port
- XFunnelWeb to a new platform.
- X
- X\item About four megabytes of free disk space. You might be able to
- install it with less, but four megabytes is safe. The distribution kit itself
- is about two and a half megabytes.
- If you are short on space, you can throw away everything after installation
- except the binary executable which will consume about half a megabyte.
- X
- X\item A C compiler.
- X
- X\item An acquaintance with the C programming language and the ability to
- compile and link C programs on your machine.
- X
- X\item Elementary systems programming knowledege for your machine.
- X
- X\item About an hour.
- X
- X\end{itemize}
- X
- You will \i{not} need any sort of system privileges to install FunnelWeb,
- unless you want the FunnelWeb command \p{fw} to be automatically available
- to everyone on your machine as well as yourself.
- X
- X\section{Obtaining a Copy of FunnelWeb}
- X\xx{FunnelWeb}{obtaining}\xx{ftp}{anonymous}
- X
- The simplest way to obtain a copy of FunnelWeb is by anonymous FTP from:
- X
- X\begin{verbatim}
- X Machine : sirius.itd.adelaide.edu.au [IP=129.127.40.3].
- X Directory : ~pub/funnelweb/ (or a directory of similar name).
- X\end{verbatim}
- X
- It is not clear at the time of writing whether FunnelWeb will be presented
- as a \dqp{.tar} file, or as a directory tree,
- or both. Just sniff around and use
- your common sense. Two points deserve attention however:
- X
- X\begin{enumerate}
- X
- X\item Be sure to use the \i{text} transfer mode whenever you transfer
- raw FunnelWeb files. However, you should use \i{binary} mode for TAR files
- and other conglomerate representations.
- X
- X\item If you have to transfer the files individually,
- don't lump all the FunnelWeb files into a single directory. Refer to
- the sections that follow for information on the directory tree you should
- create to receive the FunnelWeb files.
- X
- X\end{enumerate}
- X
- If anonymous FTP is not available to you, contact the author
- for up-to-date information on other channels of distribution.
- X
- X\begin{verbatim}
- X Name: Dr Ross N. Williams
- X Email: ross@spam.adelaide.edu.au
- X Snail: 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X\end{verbatim}
- X
- X\section{Establishing The Directory Tree}
- X\xx{directory}{tree}
- X
- At this stage,
- we will assume that you have somehow obtained a set of files that
- are supposed to be FunnelWeb, and that they are sitting on a disk
- on the machine on which you wish to compile and install
- XFunnelWeb.
- X
- The first thing you have to do is to make sure that
- the FunnelWeb directory tree has been correctly unpacked. The directory
- tree should look like this.
- X
- X\begin{verbatim}
- X fwdir - Root FunnelWeb directory.
- X admin - Administrative files.
- X answers - Answers to test suite.
- X hackman - FunnelWeb Hacker's Manual.
- X results - For test results.
- X scripts - Test scripts.
- X sources - Source code.
- X tests - Test suite.
- X userman - FunnelWeb User's Manual.
- X\end{verbatim}
- X
- The following sections describe the contents of each directory in
- alphabetical order. Check the
- contents to make sure that you have everything. Do not become fussed if
- your configuration is not quite as specified as
- it is very easy for
- installation guides such as this one to go out
- of date as minor last minute changes and updates
- are made to the distribution kit. Check the source from which you obtained
- the kit, and if it is different too, proceed.
- X
- X\subsection{Admin Directory}
- X\xx{admin}{directory}
- X
- The \p{admin} directory contains administrative files to do with licensing
- and such. It is also a catch-all directory for files that don't belong
- anywhere else. At the time of writing, it is not clear
- exactly what will be in the \p{admin} directory. Why not take a look?
- X
- X\subsection{Answers Directory}
- X\xx{answers}{directory}
- X
- The \p{answers} directory contains the
- X\dq{correct answers}\xx{correct}{answers}
- to all the regression testing input files. The regression test scripts
- compare these files to the files generated in the \p{results} directory.
- X
- X\begin{verbatim}
- an01.lis ... an04.lis
- ex01.lis ... ex16.lis
- ex01.out ... ex10.out
- ex11.tex ... ex16.tex
- generate.lis
- hi01.lis ... hi10.lis
- hi01.out ... hi05.out
- hi06a.out
- hi06b.out
- hi07a.out
- hi07b.out
- hi08.out ... hi10.out
- pr01.lis ... pr10.lis
- sc01.lis ... sc29.lis
- tg01.lis ... tg09.lis
- tg01.out ... tg09.out
- wv01.lis ... wv06.lis
- wv01.tex ... wv06.tex
- X\end{verbatim}
- X
- X\subsection{Hackman Directory}
- X\xx{hackman}{directory}
- X
- The \p{hackman} directory contains the \p{.tex} files that make up the
- X\i{FunnelWeb Hacker's Manual}.
- X
- X\begin{verbatim}
- h_ch0.tex - Preface, etc.
- h_ch1.tex - Design.
- h_ch2.tex - Implementation.
- h_ch3.tex - Modification.
- h_ch4.tex - Future.
- h_cha.tex - Appendices.
- h_manual.tex - Main TeX file.
- X\end{verbatim}
- X
- See the comment at the top of \p{h\_manual.tex} file for
- instructions on how to typeset and print the \i{FunnelWeb Hacker's Manual}.
- X
- There is no need to read or print the \i{FunnelWeb Hacker's Manual} unless you
- intend to modify FunnelWeb.
- X
- X\subsection{Results Directory}
- X\xx{results}{directory}
- X
- The \p{results} directory exists as a target directory for
- the output files generated by FunnelWeb during regression testing.
- This directory is distributed empty and
- should be empty at the start of regression testing.
- However, it is permissible for the \p{results} directory to
- contain files generated
- during a previous test run, as the regression testing scripts
- delete specific unwanted files before each test anyway.
- X
- X\subsection{Scripts Directory}
- X\xx{scripts}{directory}
- X
- The \p{scripts} directory stores the FunnelWeb command shell scripts that
- are used to perform regression testing.\xx{regression}{testing}
- X
- X\begin{verbatim}
- master.fws - The master test script. This is the one you run.
- test_gen.fws - Script to generate certain tricky input files.
- test_l.fws - Test FunnelWeb with +L.
- test_ld.fws - Test FunnelWeb with +L +B...
- test_lo.fws - Test FunnelWeb with +L +O.
- test_lo2.fws - Test FunnelWeb with +L +O (two output files).
- test_lot.fws - Test FunnelWeb with +L +O +T.
- test_lt.fws - Test FunnelWeb with +L +T.
- X\end{verbatim}
- X
- X\subsection{Sources Directory}
- X\xx{sources}{directory}
- X
- The \p{sources} directory contains \i{all} of the C source files
- required to build a FunnelWeb binary executable. In the following list,
- files given without an extension represent both \p{.c} and \p{.h} files.
- X
- X\begin{verbatim}
- analyse - The analyser.
- as - Assertions.
- clock - A clock abstraction.
- command - The shell command interpreter.
- data - Shared data structures and global variables.
- dump - Functions to dump internal data structures.
- environ.h - Lightweight machine-dependent, program-independent header.
- help - Module to write out help messages.
- help_gnu - Function to write out the GNU license.
- help_gnu.txt - The GNU license in text form.
- help_gnu.ctx - The GNU license in C code form.
- list - A list abstraction.
- lister - Module to manage the listing file.
- machin - Module to hold machine-dependent, program-dependent stuff.
- main.c - The main() program.
- mapper - Module to read files into memory.
- memory - Memory management.
- misc - Miscellaneous functions.
- option - Command line option processing.
- parser - The parser.
- scanner - The scanner.
- section - A section number abstraction.
- style.h - A machine-independent, program-independent header file.
- table - A table abstraction.
- tangle - The tangler.
- texhead - Module to write out TeX header in documentation files.
- texhead.ctx - The TeX header in C code form.
- texhead.tex - The TeX header in TeX form.
- weave - The weaver.
- writfile - Output abstraction.
- X\end{verbatim}
- X
- The \dqp{.txt}, and \dqp{.tex} files do not participate in the compilation,
- but are considered part of the source code as they
- were used to generate the \dqp{.ctx} files. The \dqp{.ctx} files
- are included by \p{.c} files of the same name. They do not need to be
- compiled themselves.
- X
- X\subsection{Tests Directory}
- X\xx{tests}{directory}
- X
- The \p{tests} directory stores all the input files of the
- regression test suite. These come in two kinds: FunnelWeb input
- files with extensions of \dqp{.fw}, and FunnelWeb include files with
- extensions of \dqp{.fwi}.
- X
- X\begin{verbatim}
- XFunnelWeb Input Files:
- X an01.fw ... an04.fw - Analyser tests.
- X ex01.fw ... ex16.fw - Examples from the tutorial in user manual.
- X generate.fw - Generates a few other tricky input files.
- X hi01.fw ... hi10.fw - Examples from the hints chapter in user manual.
- X pr01.fw ... pr10.fw - Parser tests.
- X sc01_note.fw - A note explaining absence of sc01.fw
- X sc02.fw ... sc29.fw - Scanner tests.
- X tg01.fw ... tg09.fw - Tangler tests.
- X wv01.fw ... wv06.fw - Weaver tests.
- X
- XFunnelWeb Include Files:
- X ex09a.fwi
- X sc13a.fwi ... sc13f.fwi
- X sc15a.fwi
- X tg08a.fwi
- X\end{verbatim}
- X
- X\subsection{Userman Directory}
- X\xx{userman}{directory}
- X
- The \p{userman} directory contains the \p{.tex} files that make up the
- X\i{FunnelWeb User's Manual}.
- X
- X\begin{verbatim}
- u_ch0.tex - Preface, etc.
- u_ch1.tex - Tutorial.
- u_ch2.tex - Hints.
- u_ch3.tex - Definition.
- u_ch4.tex - Installation.
- u_ch5.tex - Administration.
- u_cha.tex - Appendices.
- u_manual.tex - Main TeX file.
- X\end{verbatim}
- X
- See the comment at the top of \p{u\_manual.tex} file for
- instructions on how to typeset and print the \i{FunnelWeb User's Manual}.
- X
- X\section{Compiling FunnelWeb}
- X\xx{compiling}{FunnelWeb}
- X
- The FunnelWeb source code is entirely contained within the \p{sources}
- directory. However, some simple
- script files and makefiles can be found in the \p{admin} directory.
- X
- XFunnelWeb contains some machine-dependent components, so before compiling
- XFunnelWeb, you need to specify your machine in the source file \p{environ.h}.
- To do this,
- edit the \p{environ.h} file and set exactly one of the machine name
- X\p{\#define}s to \p{1}. For example, on the Sun you should set:
- X
- X\begin{verbatim}
- X#define MAC 0
- X#define SUN 1
- X#define VMS 0
- X#define PC 0
- X\end{verbatim}
- X
- There should be little difficulty compiling FunnelWeb for any of these
- platforms.
- If the machine on which you are compiling FunnelWeb is not one of the ones
- listed in the \p{environ.h} file, then choose the closest one you can.
- Try the \p{SUN} if you are running a non-Sun Unix.
- If you run into serious difficulties, you will have to
- customize \p{machin.h} and \p{machin.c} for your machine.
- See the comments in these files
- for instructions on how to do this.
- X
- Once you have specified a target machine, compile FunnelWeb by pointing
- your C compiler at all the
- X\dqp{.c} files in the \p{sources} directory.
- The \dqp{.txt}, and \dqp{.tex} files do not participate in the compilation,
- but appear in the \p{sources} directory because they
- were used to generate the \dqp{.ctx} files. The \dqp{.ctx} files
- are included by \p{.c} files of the same name and do not need to be
- compiled separately.
- Link the results.
- X
- The result of all this should be a binary executable called
- X\p{fw}, or \p{fw.exe},
- or \p{fw.xxx} where \p{.xxx} is whatever file extension is
- appropriate on the target machine. Clean up the
- X\p{sources} directory by deleting all the listing and object files.
- X
- X\section{Testing FunnelWeb}
- X\label{testingfunnelweb}\xx{testing}{FunnelWeb}
- X
- Once you have obtained a binary executable, you should test FunnelWeb
- before making it available to users. To do this:
- X
- X\begin{enumerate}
- X
- X\item Set the default directory to be the \p{scripts} directory.
- X
- X\item Copy the FunnelWeb executable into the scripts directory (or
- be able to invoke it from the scripts directory).
- X
- X\item Edit the script \p{master.fws}. Locate the section called
- X\dq{Define Symbol For the Root Test Directory} and define the \p{R}
- symbol to point to the FunnelWeb root directory \p{fwdir}. The examples
- in the comments in the script should make it clear what is required.
- X
- X\item Invoke FunnelWeb to execute the master test script
- with the command line \p{fw +xmaster}
- X
- X\end{enumerate}
- X
- The \p{master.fws} script should run for a few minutes. If all goes
- well, you will find a differences report on your screen reporting
- zero differences. If this happens, then FunnelWeb has been
- fully tested and is ready to be made available to users. You should
- delete all the files in the \p{results} directory and proceed to the next
- section on installing FunnelWeb for users.
- X
- If there were
- one or more differences, you can either give up and contact the author,
- or attempt to fix the code yourself. If you decide to fix the code
- yourself, start
- with the differences log file and follow your nose. Good luck!
- X
- X\section{Installing FunnelWeb}
- X\xx{installing}{FunnelWeb}
- X
- At this stage you should have a \p{fwdir} directory tree somewhere in your
- file system. Its contents should be almost identical to the directory
- contents specified earlier in this chapter except there should now be
- an additional binary executable file sitting in the \p{scripts}
- directory.
- X
- To make FunnelWeb available to users, you should:
- X
- X\begin{enumerate}
- X
- X\item Make the entire directory tree readable to all users.
- X
- X\item Move the binary executable from the scripts directory to the
- X\p{admin} directory \i{or} copy it to somewhere convenient such as
- a \p{/bin} directory.
- X
- X\item Set up a symbol, path, or command of some kind by the name of \p{fw}
- that \dq{points} to the binary executable. If possible, set this up so
- that the \p{fw} symbol is available to all users. Alternatively,
- you can inform interested users of how they can add a command to their
- X\p{login} command file to make the command available to them.
- X
- X\end{enumerate}
- X
- If you are short of disk space or have a system that is stressed in some other
- way, it may be of assistance to you to know that
- XFunnelWeb has been constructed so that its
- binary executable\xx{FunnelWeb}{executable} is
- X\i{totally self contained}. The binary executable does not rely on any
- other files to operate. Nor does it care about its position in the file system.
- In fact, all that is really required to use FunnelWeb is the binary
- executable and the \i{FunnelWeb User's Manual}. Thus, if you are short
- of disk space, you can move the binary executable to your \dqp{/bin}
- directory and delete the entire FunnelWeb tree. However, making the
- tree available to users is encouraged because:
- X
- X\begin{itemize}
- X
- X\item It allows users to copy the tree and install it on another machine
- without bothering you.
- X
- X\item It allows users access to the \TeX{} code for the \i{FunnelWeb
- User's Manual} and the \i{FunnelWeb Hacker's Manual}.
- X
- X\item It allows users access to the regression test suite. This may not
- seem important, but it could be very convenient for the user as the
- X\p{ex*} and \p{hi*} files of the regression test suite contain most
- of the examples from the \i{FunnelWeb User's Manual}. By making them available
- you will save users the trouble of typing them in.
- X
- X\end{itemize}
- X
- XFinally, you should fill in and send off a FunnelWeb registration form.
- This allows me to get a handle on the size and needs of the user base, and you
- to be kept informed of new FunnelWeb releases (optional).
- See Section~\ref{registration} for more information.
- X
- X\section{Printing Manuals}
- X\xx{printing}{manuals}
- X
- XFunnelWeb comes with two manuals, a \i{FunnelWeb User's Manual} and a
- X\i{FunnelWeb Hacker's Manual}. Instructions for how to
- typeset and print these manuals appear at the top of
- the main \TeX{} files for these manuals
- X\p{u\_manual.tex} and \p{h\_manual.tex}.
- X
- There is no need to print the \i{FunnelWeb Hacker's Manual} unless you
- intend to modify FunnelWeb. However, you should make a few copies of the
- X\i{FunnelWeb User's Manual} available for users, or at least
- let them know where the \TeX{} source for the \i{FunnelWeb User's Manual}
- is kept so that they can typeset and print it themselves.
- X
- X\section{Installation Problems?}
- X\xx{problems}{installation}
- X
- If you run into any problems installing FunnelWeb, please write a short
- report describing the problem and mail it to the author Ross Williams
- X(\p{ross@spam.adelaide.edu.au}). I may not be able to help you with it
- immediately, but I certainly want to know that a problem exists so that
- it can be corrected in future releases of FunnelWeb.
- X
- X%==============================================================================%
- X% End of Ch4.tex %
- X%==============================================================================%
- END_OF_FILE
- if test 17359 -ne `wc -c <'userman/u_ch4.tex'`; then
- echo shar: \"'userman/u_ch4.tex'\" unpacked with wrong size!
- fi
- # end of 'userman/u_ch4.tex'
- fi
- if test -f 'userman/u_ch5.tex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'userman/u_ch5.tex'\"
- else
- echo shar: Extracting \"'userman/u_ch5.tex'\" \(17146 characters\)
- sed "s/^X//" >'userman/u_ch5.tex' <<'END_OF_FILE'
- X%==============================================================================%
- X% Start of Ch5.tex %
- X%==============================================================================%
- X%
- X% Copyright
- X% ---------
- X% Copyright (C) 1992 Ross N. Williams.
- X% This file contains a chapter of the FunnelWeb User's Manual.
- X% See the main TeX file for this manual for further information.
- X%
- X%==============================================================================%
- X
- X\chapter{FunnelWeb Administration}
- X\label{chapadministration}\xx{FunnelWeb}{administration}
- X
- X\section{Introduction}
- X
- Whether a computer program is useful depends not just on the functionality
- provided by the program, but also on the totality of the culture
- and services surrounding it such as license costs, the
- quality of
- documentation, presence of a standard and so on.
- This chapter addresses these issues from a user perspective.
- X
- X\section{The User's Commitment To FunnelWeb}
- X\xx{commitment}{FunnelWeb}
- X
- One of the problems that might prevent potential users from using FunnelWeb
- is the level of commitment that it requires. As soon as the user starts
- creating FunnelWeb \p{.fw} files, the user becomes dependent on the
- XFunnelWeb program, as the files so created will become unmanageable if
- the FunnelWeb program were to become unavailable for some reason.
- There are a number of ways in which computer programs can become unavailable,
- including operating system upgrades, copyright problems, inability to
- fix bugs, or just the inability of the program to be ported to a new target
- platform.
- X
- The fact
- is that FunnelWeb defines an input language and that currently there is
- only one implementation of the language. Users will only write programs
- using that language if they feel comfortable about the availability of its
- implementation.
- X
- I have been critically
- aware of these issues throughout the development of FunnelWeb and have
- taken every possible step to make FunnelWeb a solid base onto which to
- build programs. The following points describe the actions I have taken.
- X
- X\narrowthing{GNU license:}{FunnelWeb's C source code
- has been released under GNU General Public
- License Version 2. This means that the source code to FunnelWeb will always
- be available to anyone who wants it. The FunnelWeb program can never be
- taken away from you.}
- X
- X\narrowthing{Portability:}{FunnelWeb has been designed and written to be
- extremely portable. First, all FunnelWeb really does is read and write
- text files. This makes it easy to make portable. Second,
- XFunnelWeb is written in the C programming language\paper{ANSI}
- with portability as
- a major design goal. Third, FunnelWeb has already been ported to four
- popular platforms: SunOS, VAX VMS, PC, and Macintosh and it should not prove
- hard to move it to others. Fourth, FunnelWeb comes with a huge automated
- regression test suite. This makes it easy to pinpoint problems when it
- is moved to a new platform. Portability is important because, even if \i{you}
- are not using FunnelWeb on some funny platform, you may want to send
- a computer program written using FunnelWeb to someone who does.}
- X
- X\narrowthing{Quality:}{The FunnelWeb source code is high quality code.
- Although it has not been formally developed under any particular coding
- standard, it is well designed and documented. Design decisions have
- not been taken lightly.}
- X
- X\narrowthing{Documentation:}{FunnelWeb is well documented by this manual
- and by the \i{FunnelWeb Hacker's Manual}. This is important because it
- means that if you want to send someone a program written using FunnelWeb,
- you can simply point them to this manual rather than having to explain
- it all yourself. It is also comforting for managers who are controlling
- source code to know that the format in which the source code is written
- is well-documented.}
- X
- X\narrowthing{Standardization:}{Users who create source files using FunnelWeb
- are not only committing to the FunnelWeb program; they are also investing
- in the FunnelWeb language. If FunnelWeb's language changes radically for
- some reason, then this investment by users will be undermined. To protect
- this investment, I intend to maintain an \dq{official} version of FunnelWeb
- whose language will not change radically, at least not
- in a non backward compatible manner.}
- X
- It is my hope that the combination of these factors will alleviate any
- fears that users may have about committing their source files
- to FunnelWeb.
- X
- X\section{Documentation}
- X\xx{FunnelWeb}{documentation}
- X
- The following FunnelWeb documentation is available:
- X
- X\begin{verbatim}
- X "FunnelWeb User's Manual": Tutorial, Hints, Reference Manual.
- X "FunnelWeb Hacker's Manual": Notes on Design and Implementation.
- X\end{verbatim}
- X
- XEveryone involved with FunnelWeb should read the \i{FunnelWeb User's Manual}.
- It contains everything you need to know about how to use FunnelWeb. In fact,
- you are reading it now!
- X
- The \i{FunnelWeb Hacker's Manual}
- is for those who want to install, modify, fix,
- fiddle with, and generally hack the FunnelWeb C source code.
- X
- Both of these manuals are shipped with the FunnelWeb distribution
- kit, and should be available on your machine in the form of LaTeX text
- files. If you cannot find them, you can obtain them from the
- XFunnelWeb FTP archive (see Section~\ref{ftparchive}).
- X
- X\section{Registration}
- X\label{registration}\xx{FunnelWeb}{registration}
- X
- If you install or use FunnelWeb, please register by filling in and
- returning the registration form in \figregform{}.
- XFeel free to expand the form if there is not enough room.
- X
- X
- X\begin{figure}[htbp]
- X\begin{verbatim}
- X +----------------------FunnelWeb Registration Form----------------------+
- X | 1. Date: |
- X | |
- X | 2. Title and name: |
- X | |
- X | 3. Internet email address: |
- X | |
- X | 4. Snail mail address: |
- X | |
- X | 5. Work phone number (country,area,number): |
- X | |
- X | 6. Which category of FunnelWeb user best describes you? |
- X | Latent - Installed FunnelWeb, but don't intend to use it. |
- X | Beginner - Haven't used FunnelWeb much yet; have an open mind. |
- X | Casual - Use FunnelWeb occasionally. |
- X | Convert - Use FunnelWeb to do most programming. |
- X | Fanatic - FunnelWeb has become a way of life. |
- X | |
- X | 7. What changes or new features would you like to see in FunnelWeb? |
- X | |
- X | |
- X | |
- X | |
- X | |
- X | |
- X | 8. Do you want to be kept informed of new FunnelWeb developments? |
- X | |
- X +-----------------------------------------------------------------------+
- X\end{verbatim}
- X\mylabel{\figregform{}: The FunnelWeb registration form.}{%
- X%
- To register as a FunnelWeb user, please fill in this form and email it to
- X\p{ross@spam.adelaide.edu.au}, or snail mail it to
- Ross Williams, 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- You may wish to make a contribution when you register.
- See Section~\ref{support} for more information.
- X%
- X}
- X\end{figure}
- X
- XEmail the form to \p{ross@spam.adelaide.edu.au}, or snail mail it to
- Ross Williams, 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- You may wish to make a contribution when you register.
- See Section~\ref{support} for more information.
- X
- X\section{Support}
- X\xx{FunnelWeb}{support}\label{support}
- X
- XFunnelWeb is released \dq{as is} under a GNU license, and
- no formal support is available.
- You have the right to make changes to FunnelWeb
- and to use the modified versions created by random programmers.
- However, this is discouraged (see Section~\ref{modification}).
- X
- In fact the support that is most needed is your financial
- support for the
- XFunnelWeb developers! It has taken \i{months} of full-time \i{unpaid}
- work to bring FunnelWeb to you in its current form.
- I don't want to inconvenience users who install
- XFunnelWeb, play with it, and then hardly ever use it.
- If you are in this category,
- please register, but don't bother contributing. However, if you find that
- XFunnelWeb has become a useful programming tool, a
- contribution of some positive multiple of US\$50 would be appreciated.
- X
- To make a contribution, send payment with a completed registration form
- X(see Section~\ref{registration}) to:
- X
- X\begin{verbatim}
- X Renaissance Software Pty Ltd
- X Email: ross@spam.adelaide.edu.au
- X Snail: 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X\end{verbatim}
- X
- Payment can be by personal or bank cheque to any bank in the world or by
- Visa or Mastercard. Please give the card name, number, expiry date, and
- the amount to be paid in US dollars. All contributions will be appreciated
- and will encourage further FunnelWeb development. However, no undertaking
- is made whatsoever about how the money will be used.
- X
- X\section{Copyright}
- X\xx{copyright}{FunnelWeb}\xx{FunnelWeb}{license}\xx{GNU}{license}%
- X\label{copyright}
- X
- The FunnelWeb program is Copyright $\copyright$ 1992 Ross Williams.
- X
- However, FunnelWeb has been released by the author and copyright owner Ross
- Williams (\p{ross@spam.adelaide.edu.au}) under Version 2 of the GNU General
- Public
- License published by the Free Software Foundation. Here are some ways
- that you can obtain a copy of this license.
- X
- X\begin{itemize}
- X
- X\item The license appears as an appendix in the \i{FunnelWeb Hacker's
- Manual}.
- X
- X\item If you have a working version of FunnelWeb, invoke it with
- X\p{fw +hlicense +jlicense.txt}.
- X
- X\item Look in the \p{help} module of the FunnelWeb source code.
- X
- X\item FTP the license from \p{prep.ai.mit.edu} in \p{/pub/gnu/COPYING-2}.
- X
- X\item Write to the Free Software
- XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X\end{itemize}
- X
- The license allows you to
- redistribute FunnelWeb and/or modify it under certain conditions.
- The license does not cover the \i{FunnelWeb User's Manual} and
- X\i{FunnelWeb Hacker's Manual} which are distributed under a simpler
- license that prohibits changes.
- X
- Note: FunnelWeb is distributed WITHOUT ANY WARRANTY; without even the
- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- X
- X\section{Nowarranty}
- X\x{warranty}
- X
- Users of FunnelWeb should be aware that FunnelWeb comes with no
- warranty. Here is an extract from the GNU General Public License Version 2,
- under which
- XFunnelWeb is distributed. For more information see Section~\ref{copyright}.
- X
- X\begin{verbatim}
- X 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
- X FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
- X OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
- X PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
- X OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- X MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
- X TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
- X PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
- X REPAIR OR CORRECTION.
- X
- X 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
- X WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- X REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
- X INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
- X OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
- X TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
- X YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
- X PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
- X POSSIBILITY OF SUCH DAMAGES.
- X\end{verbatim}
- X
- X\section{Distribution}
- X\xx{FunnelWeb}{Distribution}
- X
- Users of FunnelWeb should be aware that they can distribute the program
- freely.
- The following is an extract from the GNU General Public License Version 2,
- under which FunnelWeb is distributed.
- X
- X\begin{verbatim}
- X 1. You may copy and distribute verbatim copies of the Program's
- X source code as you receive it, in any medium, provided that you
- X conspicuously and appropriately publish on each copy an appropriate
- X copyright notice and disclaimer of warranty; keep intact all the
- X notices that refer to this License and to the absence of any warranty;
- X and give any other recipients of the Program a copy of this License
- X along with the Program.
- X
- X You may charge a fee for the physical act of transferring a copy, and
- X you may at your option offer warranty protection in exchange for a fee.
- X\end{verbatim}
- X
- The license also allows you other freedoms.
- XFor more information see Section~\ref{copyright}.
- X
- X\section{Modification}
- X\label{modification}
- X
- XFunnelWeb is distributed under a GNU license, and you are free to modify the
- source code and distribute modified copies (see Section~\ref{copyright}).
- However, there are good reasons why you should avoid doing this.
- X
- X\begin{enumerate}
- X
- X\item If you distribute modified versions of FunnelWeb, you run the risk of
- creating a version that will diverge from the \dq{official} version of
- XFunnelWeb that I intend to maintain.
- X
- X\item If you release a version of FunnelWeb with a changed input language,
- users of your modified version will create source files that will no
- longer work on other versions of FunnelWeb. The result would be chaos.
- X
- X\end{enumerate}
- X
- XFor these reasons I request that you do not distribute modified versions of
- XFunnelWeb, particularly versions with a modified language. However, if you must
- distribute a version with a modified language, \i{please change its name}
- X(\ie{}from \dq{FunnelWeb} to something else). Please also allocate a new
- file extension
- to replace \dqp{.fw} as the extension for source files written in the modified
- language.
- X
- XFor more information, refer to the \i{FunnelWeb Hacker's Manual}.
- X
- X\section{Versions}
- X\xx{FunnelWeb}{versions}
- X
- XFunnelWeb was created in 1986 and was used extensively by Ross Williams
- X(\p{ross@spam.adelaide.edu.au}) for three years. However,
- Version~1.0 was written
- in Ada and was not very portable (it was fairly VAX/VMS specific).
- David Hulse
- X(\p{dave@cs.adelaide.edu.au}) took the first step towards a
- release by translating
- the Ada code into C. Ross Williams then extensively reworked the C code, making
- it robust and portable, adding new features, and polishing it to its
- current form.
- X
- X\begin{verbatim}
- X Vers Lang Created Released Author Copyright Licensing
- X ---- ---- ------- -------- -------------- ------------- ---------
- X V1.0 Ada 1986 Never Ross Williams Ross Williams
- X V2.0 C 1989 Never David Hulse Public domain No restriction.
- X V3.0 C 1992 May-1992 Ross Williams Ross Williams GNU release.
- X\end{verbatim}
- X
- This manual was released for:
- X
- X\begin{verbatim}
- X * FunnelWeb V3.0.
- X * User's Manual V1.0.
- X * Hacker's Manual V1.0.
- X * TeX Definitions V1.0.
- X\end{verbatim}
- X
- X\section{FTP Archive and Author}
- X\label{ftparchive}%
- X\xx{author}{contacting}\xx{ftp}{archive}\xx{FunnelWeb}{archive}
- X
- The FunnelWeb FTP archive is:
- X
- X\begin{verbatim}
- X Machine : sirius.itd.adelaide.edu.au [IP=129.127.40.3].
- X Directory : ~pub/funnelweb/ (or a directory of similar name).
- X\end{verbatim}
- X
- The author of FunnelWeb and this manual is:
- X
- X\begin{verbatim}
- X Name: Dr Ross N. Williams
- X Email: ross@spam.adelaide.edu.au
- X Snail: 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
- X\end{verbatim}
- X
- I intend to maintain an \dq{official} version of FunnelWeb which I will
- release under GNU license from time to time. I am happy to receive
- constructive criticism
- about FunnelWeb and its documentation.
- X
- I will always be happy to receive mail about FunnelWeb, but cannot
- guarantee that I will be able to reply to it immediately.
- X
- X%==============================================================================%
- X% End of Ch5.tex %
- X%==============================================================================%
- END_OF_FILE
- if test 17146 -ne `wc -c <'userman/u_ch5.tex'`; then
- echo shar: \"'userman/u_ch5.tex'\" unpacked with wrong size!
- fi
- # end of 'userman/u_ch5.tex'
- fi
- echo shar: End of archive 8 \(of 20\).
- cp /dev/null ark8isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 20 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-