| 1 |
@!345678901234567890123456789012345678901234567890123456789012345678901234567890 |
| 2 |
@!****************************************************************************** |
| 3 |
|
| 4 |
@t vskip 50 mm |
| 5 |
@t title titlefont centre "FunnelWeb Developer Manual Web" |
| 6 |
@t vskip 10 mm |
| 7 |
@t title smalltitlefont centre "by Ross N. Williams" |
| 8 |
@t title smalltitlefont centre "21 April 1999" |
| 9 |
@t vskip 10 mm |
| 10 |
@t title smalltitlefont centre "Copyright (c) Ross N. Williams, 1992." |
| 11 |
@t new_page |
| 12 |
@t vskip 20 mm |
| 13 |
@t title titlefont centre "Contents" |
| 14 |
@t vskip 10 mm |
| 15 |
@t table_of_contents |
| 16 |
@t new_page |
| 17 |
|
| 18 |
@!****************************************************************************** |
| 19 |
@!****************************************************************************** |
| 20 |
|
| 21 |
@A@<FunnelWeb Developer Manual Web@> |
| 22 |
|
| 23 |
This document contains the FunnelWeb source for the |
| 24 |
FunnelWeb Developer Manual web. When processed by the |
| 25 |
FunnelWeb macro preprocessor, this file will generate all |
| 26 |
the text files in the web. |
| 27 |
|
| 28 |
@!****************************************************************************** |
| 29 |
|
| 30 |
@B@<Copyright Notice@> |
| 31 |
|
| 32 |
This FunnelWeb source file and all works derived from it |
| 33 |
(including, but not limited to, the output files and printed |
| 34 |
documentation that can be extracted using the FunnelWeb |
| 35 |
preprocessor) are copyright as shown below, and the |
| 36 |
copyright message in the copyright macro applies to all of |
| 37 |
these works. The enclosing macro is called at the start of |
| 38 |
each FunnelWeb output file so that the copyright message |
| 39 |
appears in each output file as well as in this FunnelWeb |
| 40 |
source file. |
| 41 |
|
| 42 |
@$@<Copyright notice/HTML@>@M@{@- |
| 43 |
Copyright @<(C)@> Ross N. Williams 1992,1999. All rights reserved.@} |
| 44 |
|
| 45 |
Permission is granted to redistribute and use this manual in |
| 46 |
any medium, with or without modification, provided that all |
| 47 |
notices (including, without limitation, the copyright |
| 48 |
notice, this permission notice, any record of modification, |
| 49 |
and all legal notices) are preserved on all copies, that all |
| 50 |
modifications are clearly marked, and that modified versions |
| 51 |
are not represented as the original version unless all the |
| 52 |
modifications since the manual's original release by Ross N. |
| 53 |
Williams (www.ross.net) consist of translations or other |
| 54 |
transformations that alter only the manual's form, not its |
| 55 |
content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY |
| 56 |
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT |
| 57 |
LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND |
| 58 |
FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY |
| 59 |
LAW THERE IS ABSOLUTELY NO WARRANTY. |
| 60 |
|
| 61 |
@!****************************************************************************** |
| 62 |
|
| 63 |
@p maximum_input_line_length = 500 |
| 64 |
@p maximum_output_line_length = 500 |
| 65 |
|
| 66 |
@!****************************************************************************** |
| 67 |
|
| 68 |
@B@<Change Log@> |
| 69 |
|
| 70 |
@$@<Change log@>@Z@{ |
| 71 |
21-Apr-1999 RNW Converted the original 1992 FunnelWeb hackers manual to this web. |
| 72 |
12-May-1999 RNW Added versions page. |
| 73 |
29-Dec-1999 RNW compile_compile: Minor fix *.o -> *.c |
| 74 |
29-Dec-1999 RNW Added sidebar image strut to stop it collapsing. |
| 75 |
30-Dec-1999 RNW Added misc_knownbugs page. |
| 76 |
30-Dec-1999 RNW Revised the modify_manuals page. |
| 77 |
30-Dec-1999 RNW Changed manual version number scheme. |
| 78 |
03-Jan-2000 RNW Changed copyright permission notice. |
| 79 |
03-Jan-2000 RNW Added indentation known bug notice. |
| 80 |
06-Jan-2000 RNW Added black background table to sidebar to cope with no-images. |
| 81 |
09-Jan-2000 RNW Moved main version notice into a macro in the fw include file. |
| 82 |
@} |
| 83 |
|
| 84 |
@!****************************************************************************** |
| 85 |
|
| 86 |
@B@<General Notes@> |
| 87 |
|
| 88 |
@$@<General Information@>@Z@{ |
| 89 |
Checking Procedure |
| 90 |
------------------ |
| 91 |
* Spelling check. |
| 92 |
* WebLint check. |
| 93 |
|
| 94 |
Shipping Procedure |
| 95 |
------------------ |
| 96 |
* Use FunnelWeb to ENEO *.html |
| 97 |
* Run FunnelWeb. Eliminate all warnings. |
| 98 |
* Nuke the old web. |
| 99 |
* Upload the new web. |
| 100 |
* Briefly surf to check. |
| 101 |
@} |
| 102 |
|
| 103 |
FORMATTING NOTE: Experimentation has shown that any page containing a |
| 104 |
VERBATIM wider than 55 characters must be set to /wide. |
| 105 |
|
| 106 |
@!****************************************************************************** |
| 107 |
|
| 108 |
@B@<Things To Do@> |
| 109 |
|
| 110 |
@$@<Things to do@>@Z@{ |
| 111 |
TTDList |
| 112 |
------- |
| 113 |
|
| 114 |
@} |
| 115 |
|
| 116 |
@!****************************************************************************** |
| 117 |
|
| 118 |
@B@<Graphic Design Notes@> |
| 119 |
|
| 120 |
These notes record the details of how the graphics in this web were created. |
| 121 |
This will enable the graphics to be easily recreated, duplicated, or modified |
| 122 |
if necessary. |
| 123 |
|
| 124 |
@$@<Graphic Design Notes@>@Z@{ |
| 125 |
Sidebar is 50x1200 colour=(0,51,102). |
| 126 |
|
| 127 |
Title |
| 128 |
Bookman Black SSi, 20pt, Antialias |
| 129 |
|
| 130 |
@} |
| 131 |
|
| 132 |
@!****************************************************************************** |
| 133 |
|
| 134 |
@B@<Conversion Of Printed Manual@> |
| 135 |
|
| 136 |
The FunnelWeb documentation used to be embodied in a single printed manual |
| 137 |
called The FunnelWeb User's Manual. Here's a record of how the material |
| 138 |
in the manual ended up in the FunnelWeb documentation webs: |
| 139 |
|
| 140 |
@$@<Printed Manual Conversion@>@Z@{ |
| 141 |
Printed User Manual Section Where It Ended Up |
| 142 |
--------------------------- ----------------- |
| 143 |
Preface DELETED |
| 144 |
Acknowledgements Copyright page of all FunnelWeb webs. |
| 145 |
Presentation Notes DELETED |
| 146 |
1. A Tutorial Introduction Tut: Chapters 1..4. |
| 147 |
2. FunnelWeb Hints. Tut: Chapter 5..6. |
| 148 |
3. FunnelWeb Definition. Ref: Most of the reference manual. |
| 149 |
4. FunnelWeb Installation. Mainweb,Dev |
| 150 |
5. FunnelWeb Administration. DELETED, but 5.2 => Main: stability |
| 151 |
Glossary Ref: Glossary. |
| 152 |
References Ref: References. |
| 153 |
|
| 154 |
Printed Hacker Manual Section Where It Ended Up |
| 155 |
----------------------------- ----------------- |
| 156 |
Preface Dev: Home page intro. |
| 157 |
Acknowledgements Copyright page of all FunnelWeb webs. |
| 158 |
Presentation Notes DELETED |
| 159 |
1. FunnelWeb Design Dev: Chapter 2. |
| 160 |
2. FunnelWeb Implementation Dev: Chapter 3. |
| 161 |
3. FunnelWeb Modification Dev: Chapter 4. |
| 162 |
4. FunnelWeb Future Dev: Chapter 5. |
| 163 |
A. GNU Licence V2 Dev: Chapter 6. |
| 164 |
References Ref: References. |
| 165 |
@} |
| 166 |
|
| 167 |
@!****************************************************************************** |
| 168 |
@!****************************************************************************** |
| 169 |
|
| 170 |
@B@<Parameter Macros@> |
| 171 |
|
| 172 |
@$@<Body@>@M@{@- |
| 173 |
<BODY BACKGROUND="@<Bin@>background.gif" |
| 174 |
BGCOLOR=@<White@> |
| 175 |
TEXT="#000000" |
| 176 |
VLINK="#660000" |
| 177 |
LINK="#FF0000" |
| 178 |
ALINK="#CC0000">@} |
| 179 |
|
| 180 |
@$@<FunnelWeb WWW@>@Z@M@{../@} |
| 181 |
@$@<FunnelWeb Reference WWW@>@Z@M@{../reference/@} |
| 182 |
@$@<FunnelWeb Tutorial WWW@>@Z@M@{../tutorial/@} |
| 183 |
@$@<FunnelWeb Developer WWW@>@Z@M@{@} |
| 184 |
|
| 185 |
@!****************************************************************************** |
| 186 |
|
| 187 |
@B@<Page Macros@> |
| 188 |
|
| 189 |
The following macros provide macros to set up the top and bottom of pages. |
| 190 |
|
| 191 |
@!------------------------------------------------------------------------------ |
| 192 |
|
| 193 |
@$@<SideLink@>@(@2@)@Z@M@{<A HREF="@1"><FONT COLOR="#FFFFFF">@2</FONT></A>@<BR@>@} |
| 194 |
@$@<SideLink/bold/target@>@(@3@)@M@{@<WindowLink@>@(@1@,@2@,<FONT COLOR="#FFFFFF"><B>@3</B></FONT>@)@<BR@>@} |
| 195 |
@$@<SideLink/bold@>@(@2@)@M@{<A HREF="@1"><FONT COLOR="#FFFFFF"><B>@2</B></FONT></A>@<BR@>@} |
| 196 |
|
| 197 |
@$@<Begin FWDevMan margin@>@M@{ |
| 198 |
<TABLE WIDTH="490"> |
| 199 |
<TR> |
| 200 |
<TD WIDTH="130" VALIGN="top"> |
| 201 |
@<HStrut@>@(130@)@<BR@> |
| 202 |
|
| 203 |
@<Sidebar menu@> |
| 204 |
|
| 205 |
</TD> |
| 206 |
<TD WIDTH="360" VALIGN="top"> |
| 207 |
@<Begin size3@> |
| 208 |
@} |
| 209 |
|
| 210 |
@$@<Begin FWDevMan margin/wide@>@M@{ |
| 211 |
<TABLE WIDTH="590"> |
| 212 |
<TR> |
| 213 |
<TD WIDTH="130" VALIGN="top"> |
| 214 |
@<HStrut@>@(130@)@<BR@> |
| 215 |
|
| 216 |
@<Sidebar menu@> |
| 217 |
|
| 218 |
</TD> |
| 219 |
<TD WIDTH="460" VALIGN="top"> |
| 220 |
@<Begin size3@> |
| 221 |
@} |
| 222 |
|
| 223 |
@$@<End FWDevMan margin@>@M@{ |
| 224 |
@<End size3@> |
| 225 |
</TD> |
| 226 |
</TR> |
| 227 |
@<End table@> |
| 228 |
@} |
| 229 |
|
| 230 |
@$@<Sidebar menu@>@M@{@- |
| 231 |
@<Begin size2@> |
| 232 |
@<BR@> |
| 233 |
@<RossNet linklogo IMAGE@>@<BR@> |
| 234 |
@<BR@> |
| 235 |
@<FunnelWeb linklogo IMAGE@>@<BR@> |
| 236 |
@<BR@> |
| 237 |
@<Begin tablecolour@>@(#000000@) |
| 238 |
@<SideLink/bold/target@>@(@<FunnelWeb Reference WWW@>index.html@,@<FunnelWeb Reference WINDOWNAME@>@,Reference@) |
| 239 |
@<BR@> |
| 240 |
@<SideLink/bold/target@>@(@<FunnelWeb Tutorial WWW@>index.html@,@<FunnelWeb Tutorial WINDOWNAME@>@,Tutorial@) |
| 241 |
@<BR@> |
| 242 |
@<SideLink/bold@>@(@<FunnelWeb Developer WWW@>index.html@,Developer@) |
| 243 |
@<SideLink@>@(@<Compile FILE@>@,@<Compile HEADING/short@>@) |
| 244 |
@<SideLink@>@(@<Design FILE@>@,@<Design HEADING/short@>@) |
| 245 |
@<SideLink@>@(@<Implement FILE@>@,@<Implement HEADING/short@>@) |
| 246 |
@<SideLink@>@(@<Modify FILE@>@,@<Modify HEADING/short@>@) |
| 247 |
@<SideLink@>@(@<Misc FILE@>@,@<Misc HEADING/short@>@) |
| 248 |
@<SideLink@>@(@<GPL FILE@>@,@<GPL HEADING/short@>@) |
| 249 |
|
| 250 |
@<BR@> |
| 251 |
@<SideLink/bold@>@(@<FunnelWeb_search FILE@>@,SEARCH@) |
| 252 |
@<End size2@> |
| 253 |
@<End tablecolour@> |
| 254 |
@} |
| 255 |
|
| 256 |
@!------------------------------------------------------------------------------ |
| 257 |
|
| 258 |
@$@<Begin FWDevMan page/H1@>@(@1@)@Z@M@{@- |
| 259 |
@<Doctype@> |
| 260 |
|
| 261 |
<HTML> |
| 262 |
@<Header comment@> |
| 263 |
<HEAD> |
| 264 |
<TITLE>@1</TITLE> |
| 265 |
@<Suppress hyperlink underlining@> |
| 266 |
</HEAD> |
| 267 |
@<Body@> |
| 268 |
@<Begin FWDevMan margin@> |
| 269 |
@<RunningHeader IMAGE@> |
| 270 |
@<FWDevMan heading@>@(@1@) |
| 271 |
@} |
| 272 |
|
| 273 |
@$@<Begin FWDevMan page/wide/H1@>@(@1@)@Z@M@{@- |
| 274 |
@<Doctype@> |
| 275 |
|
| 276 |
<HTML> |
| 277 |
@<Header comment@> |
| 278 |
<HEAD> |
| 279 |
<TITLE>@1</TITLE> |
| 280 |
@<Suppress hyperlink underlining@> |
| 281 |
</HEAD> |
| 282 |
@<Body@> |
| 283 |
@<Begin FWDevMan margin/wide@> |
| 284 |
@<RunningHeader IMAGE@> |
| 285 |
@<FWDevMan heading@>@(@1@) |
| 286 |
@} |
| 287 |
|
| 288 |
@!------------------------------------------------------------------------------ |
| 289 |
|
| 290 |
@$@<End FWDevMan page@>@Z@M@{ |
| 291 |
@<P@> |
| 292 |
@<HR@> |
| 293 |
@<Begin size2@> |
| 294 |
@<Link@>@(mailto:@<Ross webmaster EMAIL@>@,Webmaster@)@<_@>@<_@>@<_@> |
| 295 |
<A HREF="@<Copyright FILE@>">@<Copyright notice/HTML@></A><BR> |
| 296 |
@<End size2@> |
| 297 |
@<End FWDevMan margin@> |
| 298 |
|
| 299 |
</BODY> |
| 300 |
|
| 301 |
@<Trailer comment@> |
| 302 |
</HTML>@} |
| 303 |
|
| 304 |
@!****************************************************************************** |
| 305 |
|
| 306 |
@B@<Images@> |
| 307 |
|
| 308 |
@$@<RunningHeader IMAGE@>@M@{ |
| 309 |
<A HREF="@<FunnelWeb Developer WWW@>index.html"><IMG SRC="@<Bin@>title.gif" |
| 310 |
WIDTH="316" HEIGHT="24" |
| 311 |
BORDER="0" ALT="FunnelWeb Developer Manual" |
| 312 |
HSPACE="0" VSPACE="0"></A>@} |
| 313 |
|
| 314 |
@!****************************************************************************** |
| 315 |
|
| 316 |
@B@<General Macros@> |
| 317 |
|
| 318 |
@$@<FWDevMan heading@>@(@1@)@M@{@- |
| 319 |
@<P@>@<Size5@>@(@1@)@<BR@>@} |
| 320 |
|
| 321 |
@$@<FWDevMan subheading@>@(@1@)@M@{@- |
| 322 |
@<P@>@<BR@>@<Size4@>@(@<B@>@(@1@)@)@<BR@>@} |
| 323 |
|
| 324 |
@$@<FWDevMan subsubheading@>@(@1@)@Z@M@{@- |
| 325 |
@<P@>@<BR@>@<Size3@>@(@<B@>@(@1@)@)@<BR@>@} |
| 326 |
|
| 327 |
@$@<FWDevMan subsubsubheading@>@(@1@)@Z@M@{@- |
| 328 |
@<P@>@<BR@>@<Size3@>@(@<U@>@(@1@)@)@<BR@>@} |
| 329 |
|
| 330 |
@$@<FWDevMan heading/nospace@>@(@1@)@Z@M@{@- |
| 331 |
@<Size4@>@(@<B@>@(@1@)@)@<BR@>@} |
| 332 |
|
| 333 |
@$@<FWDevMan heading/center@>@(@1@)@Z@M@{@- |
| 334 |
@<P@>@<BR@> |
| 335 |
@<Begin center@> |
| 336 |
@<Size5@>@(@<B@>@(@1@)@)@<BR@> |
| 337 |
@<End center@>@} |
| 338 |
|
| 339 |
@!****************************************************************************** |
| 340 |
|
| 341 |
@$@<FWDevMan keywords and decription@>@{ |
| 342 |
<META NAME="description" |
| 343 |
CONTENT="The FunnelWeb Developer Manual. FunnelWeb is a portable |
| 344 |
free literate programming tool."> |
| 345 |
|
| 346 |
<META NAME="keywords" |
| 347 |
CONTENT="funnelweb,FunnelWeb,funnel,web, |
| 348 |
developer manual,developer,manual, |
| 349 |
literate programming,literate,programming,literate-programming, |
| 350 |
documentation, |
| 351 |
macro,macros,preprocessor,macro preprocessor, |
| 352 |
software,free,freeware, |
| 353 |
open source,open,source,gnu,gpl,copyleft, |
| 354 |
web,development,tool,web tool"> |
| 355 |
@} |
| 356 |
|
| 357 |
@!****************************************************************************** |
| 358 |
@!****************************************************************************** |
| 359 |
|
| 360 |
@A@<HTML Pages@> |
| 361 |
|
| 362 |
This section contains the HTML pages of the web. |
| 363 |
|
| 364 |
@!****************************************************************************** |
| 365 |
|
| 366 |
@$@<Index HEADING@>@M@{FunnelWeb Developer Manual@} |
| 367 |
@$@<Index FILE@>@M@{index.html@} |
| 368 |
@O@<index.html@>@{@- |
| 369 |
@<Doctype@> |
| 370 |
|
| 371 |
<HTML> |
| 372 |
|
| 373 |
<HEAD> |
| 374 |
@<FWDevMan keywords and decription@> |
| 375 |
@<Suppress hyperlink underlining@> |
| 376 |
<TITLE>@<Index HEADING@></TITLE> |
| 377 |
</HEAD> |
| 378 |
|
| 379 |
@<Body@> |
| 380 |
|
| 381 |
@<Begin FWDevMan margin@> |
| 382 |
|
| 383 |
@<RunningHeader IMAGE@> |
| 384 |
|
| 385 |
@<FunnelWeb manual version notice@> |
| 386 |
|
| 387 |
@<P@>@<Bigger@>@(T@)HIS DEVELOPER MANUAL is for hackers! |
| 388 |
Anyone who wants to bash, diddle, frob, grind, mangle, |
| 389 |
patch, poke, toggle, twiddle, zap, or generally hack |
| 390 |
FunnelWeb should at least take a look at this manual, as it |
| 391 |
explains how to compile FunnelWeb, and contains all kinds of |
| 392 |
other useful information about the FunnelWeb source code. |
| 393 |
|
| 394 |
@<P@> |
| 395 |
@<Begin size4@> |
| 396 |
@<Begin indent@> |
| 397 |
|
| 398 |
@<HeadStyle@>@(@<Compile FILE@>@,@<Compile HEADING@>@) |
| 399 |
@<Compile index@> |
| 400 |
|
| 401 |
@<HeadStyle@>@(@<Design FILE@>@,@<Design HEADING@>@) |
| 402 |
@<Design index@> |
| 403 |
|
| 404 |
@<HeadStyle@>@(@<Implement FILE@>@,@<Implement HEADING@>@) |
| 405 |
@<Implement index@> |
| 406 |
|
| 407 |
@<HeadStyle@>@(@<Modify FILE@>@,@<Modify HEADING@>@) |
| 408 |
@<Modify index@> |
| 409 |
|
| 410 |
@<HeadStyle@>@(@<Misc FILE@>@,@<Misc HEADING@>@) |
| 411 |
@<Misc index@> |
| 412 |
|
| 413 |
@<HeadStyle@>@(@<GPL FILE@>@,@<GPL HEADING@>@) |
| 414 |
|
| 415 |
@<End indent@> |
| 416 |
@<End size4@> |
| 417 |
|
| 418 |
@<End FWDevMan page@> |
| 419 |
@} |
| 420 |
|
| 421 |
@$@<HeadStyle@>@(@2@)@M@{@<P@><A HREF="@1"><B>@2</B></A><BR>@} |
| 422 |
|
| 423 |
@!****************************************************************************** |
| 424 |
|
| 425 |
@$@<Compile HEADING@>@M@{@<SH@>@(1@)How To Compile FunnelWeb@} |
| 426 |
@$@<Compile HEADING/short@>@M@{@<SH@>@(1@)Compile@} |
| 427 |
@$@<Compile FILE@>@M@{compile.html@} |
| 428 |
@O@<compile.html@>@{@- |
| 429 |
@<Begin FWDevMan page/H1@>@(@<Compile HEADING@>@) |
| 430 |
|
| 431 |
@<P@> |
| 432 |
|
| 433 |
@<Compile index@> |
| 434 |
|
| 435 |
@<Nav/first@>@(@<Index FILE@>@,@<Index FILE@>@,@<Design FILE@>@) |
| 436 |
|
| 437 |
@<End FWDevMan page@> |
| 438 |
@} |
| 439 |
|
| 440 |
@$@<Compile index@>@M@{ |
| 441 |
@<Begin size3@> |
| 442 |
@<Begin indent/narrow@> |
| 443 |
@<Link@>@(@<Compile_resources FILE@>@,@<Compile_resources HEADING@>@)@<BR@> |
| 444 |
@<Link@>@(@<Compile_ftp FILE@>@,@<Compile_ftp HEADING@>@)@<BR@> |
| 445 |
@<Link@>@(@<Compile_tree FILE@>@,@<Compile_tree HEADING@>@)@<BR@> |
| 446 |
@<Link@>@(@<Compile_compile FILE@>@,@<Compile_compile HEADING@>@)@<BR@> |
| 447 |
@<Link@>@(@<Compile_testing FILE@>@,@<Compile_testing HEADING@>@)@<BR@> |
| 448 |
@<End indent/narrow@> |
| 449 |
@<End size3@> |
| 450 |
@} |
| 451 |
|
| 452 |
@!============================================================================== |
| 453 |
|
| 454 |
@$@<Compile_resources HEADING@>@M@{@<SH@>@(1.1@)Resources Required@} |
| 455 |
@$@<Compile_resources FILE@>@M@{compile_resources.html@} |
| 456 |
@O@<compile_resources.html@>@{@- |
| 457 |
@<Begin FWDevMan page/H1@>@(@<Compile_resources HEADING@>@) |
| 458 |
@<XX@>@(FunnelWeb@,installation@) |
| 459 |
|
| 460 |
@<P@>This chapter describes how to obtain and compile FunnelWeb |
| 461 |
from scratch and set up for further development. |
| 462 |
In order to compile FunnelWeb, you will need: |
| 463 |
|
| 464 |
@<P@> |
| 465 |
@<Begin list@> |
| 466 |
|
| 467 |
@<Item@>FTP access to the internet @<I@>@(OR@) a |
| 468 |
FunnelWeb source distribution kit on disk. |
| 469 |
|
| 470 |
@<Item@>A computer running one of the |
| 471 |
FunnelWeb-supported operating systems @<I@>@(OR@) |
| 472 |
lots of extra time to port FunnelWeb to a new |
| 473 |
platform. |
| 474 |
|
| 475 |
@<Item@>About five megabytes of free disk space. |
| 476 |
|
| 477 |
@<Item@>A C compiler. |
| 478 |
|
| 479 |
@<Item@>An acquaintance with the C programming |
| 480 |
language and the ability to compile and link C |
| 481 |
programs on your machine. |
| 482 |
|
| 483 |
@<Item@>Elementary systems programming knowledege |
| 484 |
for your machine. |
| 485 |
|
| 486 |
@<Item@>About an hour. |
| 487 |
|
| 488 |
@<End list@> |
| 489 |
|
| 490 |
@<P@>You will @<I@>@(not@) need any sort of system |
| 491 |
privileges to install FunnelWeb, unless you want |
| 492 |
the FunnelWeb command @<TT@>@(fw@) to be |
| 493 |
automatically available to everyone on your |
| 494 |
machine as well as yourself. |
| 495 |
|
| 496 |
@<Nav/first@>@(@<Compile FILE@>@,@<Compile FILE@>@,@<Compile_ftp FILE@>@) |
| 497 |
|
| 498 |
@<End FWDevMan page@> |
| 499 |
@} |
| 500 |
|
| 501 |
@!============================================================================== |
| 502 |
|
| 503 |
@$@<Compile_ftp HEADING@>@M@{@<SH@>@(1.2@)FTP The Source Files@} |
| 504 |
@$@<Compile_ftp FILE@>@M@{compile_ftp.html@} |
| 505 |
@O@<compile_ftp.html@>@{@- |
| 506 |
@<Begin FWDevMan page/H1@>@(@<Compile_ftp HEADING@>@) |
| 507 |
@<XX@>@(FunnelWeb@,obtaining@)@<XX@>@(ftp@,anonymous@) |
| 508 |
|
| 509 |
@<P@>The first step is to obtain a copy of the FunnelWeb source |
| 510 |
code and associated files. You can find FunnelWeb in the RossNet |
| 511 |
FTP archive at: |
| 512 |
|
| 513 |
@<P@> |
| 514 |
@<Begin indent@> |
| 515 |
@<URL@>@(@<FunnelWeb FTP@>@) |
| 516 |
@<End indent@> |
| 517 |
|
| 518 |
@<P@>It is not clear at the time of writing whether |
| 519 |
FunnelWeb will be presented as a @<DQP@>@(.tar@) file, or as |
| 520 |
a directory tree, or both. Just sniff around and use your |
| 521 |
common sense. |
| 522 |
|
| 523 |
@<Nav@>@(@<Compile_resources FILE@>@,@<Compile FILE@>@,@<Compile_tree FILE@>@) |
| 524 |
|
| 525 |
@<End FWDevMan page@> |
| 526 |
@} |
| 527 |
|
| 528 |
@!============================================================================== |
| 529 |
|
| 530 |
@$@<Compile_tree HEADING@>@M@{@<SH@>@(1.3@)Establish The Source Tree@} |
| 531 |
@$@<Compile_tree FILE@>@M@{compile_tree.html@} |
| 532 |
@O@<compile_tree.html@>@{@- |
| 533 |
@<Begin FWDevMan page/H1@>@(@<Compile_tree HEADING@>@) |
| 534 |
@<XX@>@(directory@,tree@) |
| 535 |
|
| 536 |
@<P@>At this stage, we will assume that you have |
| 537 |
somehow obtained a set of files that are supposed |
| 538 |
to be FunnelWeb, and that they are sitting on a |
| 539 |
disk on the machine on which you wish to compile |
| 540 |
FunnelWeb. |
| 541 |
|
| 542 |
@<P@>The next thing you have to do is to make |
| 543 |
sure that the FunnelWeb directory tree has been |
| 544 |
correctly unpacked. The directory tree should look |
| 545 |
like this. |
| 546 |
|
| 547 |
@<P@> |
| 548 |
@<Begin verbatim@> |
| 549 |
fwdir - Root FunnelWeb directory. |
| 550 |
admin - Administrative files. |
| 551 |
answers - Answers to test suite. |
| 552 |
results - For test results. |
| 553 |
scripts - Test scripts. |
| 554 |
sources - Source code. |
| 555 |
tests - Test suite. |
| 556 |
web - The FunnelWeb web. |
| 557 |
@<End verbatim@> |
| 558 |
|
| 559 |
@<P@>The following sections describe the contents |
| 560 |
of each directory in alphabetical order. Check the |
| 561 |
contents to make sure that you have everything. Do |
| 562 |
not become fussed if your configuration is not |
| 563 |
quite as specified, as it is very easy for |
| 564 |
installation guides such as this one to go out of |
| 565 |
date. |
| 566 |
|
| 567 |
@<FWDevMan subheading@>@(Admin Directory@) |
| 568 |
@<XX@>@(admin@,directory@) |
| 569 |
|
| 570 |
@<P@>The @<TT@>@(admin@) directory contains |
| 571 |
administrative files to do with licensing and |
| 572 |
such. It is also a catch-all directory for files |
| 573 |
that don't belong anywhere else. At the time of |
| 574 |
writing, it is not clear exactly what will be in |
| 575 |
the @<TT@>@(admin@) directory. Why not take a |
| 576 |
look? |
| 577 |
|
| 578 |
@<FWDevMan subheading@>@(Answers Directory@) |
| 579 |
@<XX@>@(answers@,directory@) |
| 580 |
|
| 581 |
@<P@>The @<TT@>@(answers@) directory contains the |
| 582 |
@<DQ@>@(correct answers@)@<XX@>@(correct@,answers@) to all |
| 583 |
the regression testing input files. The regression test |
| 584 |
scripts compare these files to the files generated in the |
| 585 |
@<TT@>@(results@) directory. |
| 586 |
|
| 587 |
@<P@> |
| 588 |
@<Begin verbatim@> |
| 589 |
an01.lis ... an04.lis |
| 590 |
ex01.lis ... ex16.lis |
| 591 |
ex01.out ... ex10.out |
| 592 |
ex11.tex ... ex16.tex |
| 593 |
generate.lis |
| 594 |
hi01.lis ... hi10.lis |
| 595 |
hi01.out ... hi05.out |
| 596 |
hi06a.out |
| 597 |
hi06b.out |
| 598 |
hi07a.out |
| 599 |
hi07b.out |
| 600 |
hi08.out ... hi10.out |
| 601 |
pr01.lis ... pr10.lis |
| 602 |
sc01.lis ... sc29.lis |
| 603 |
tg01.lis ... tg09.lis |
| 604 |
tg01.out ... tg09.out |
| 605 |
wv01.lis ... wv06.lis |
| 606 |
wv01.tex ... wv06.tex |
| 607 |
@<End verbatim@> |
| 608 |
|
| 609 |
@<FWDevMan subheading@>@(Results Directory@) |
| 610 |
@<XX@>@(results@,directory@) |
| 611 |
|
| 612 |
@<P@>The @<TT@>@(results@) directory exists as a target |
| 613 |
directory for the output files generated by FunnelWeb during |
| 614 |
regression testing. This directory is distributed empty and |
| 615 |
should be empty at the start of regression testing. However, |
| 616 |
it is permissible for the @<TT@>@(results@) directory to |
| 617 |
contain files generated during a previous test run, as the |
| 618 |
regression testing scripts delete specific unwanted files |
| 619 |
before each test anyway. |
| 620 |
|
| 621 |
@<FWDevMan subheading@>@(Scripts Directory@) |
| 622 |
@<XX@>@(scripts@,directory@) |
| 623 |
|
| 624 |
@<P@>The @<TT@>@(scripts@) directory stores the FunnelWeb |
| 625 |
command shell scripts that are used to perform regression |
| 626 |
testing.@<XX@>@(regression@,testing@) |
| 627 |
|
| 628 |
@<P@> |
| 629 |
@<Begin verbatim@> |
| 630 |
master.fws - The master test script. |
| 631 |
test_gen.fws - Script to generate tricky input files. |
| 632 |
test_l.fws - Test FunnelWeb with +L. |
| 633 |
test_ld.fws - Test FunnelWeb with +L +B... |
| 634 |
test_lo.fws - Test FunnelWeb with +L +O. |
| 635 |
test_lo2.fws - Test FunnelWeb with +L +O (2 outfiles). |
| 636 |
test_lot.fws - Test FunnelWeb with +L +O +T. |
| 637 |
test_lt.fws - Test FunnelWeb with +L +T. |
| 638 |
@<End verbatim@> |
| 639 |
|
| 640 |
@<FWDevMan subheading@>@(Sources Directory@) |
| 641 |
@<XX@>@(sources@,directory@) |
| 642 |
|
| 643 |
@<P@>The @<TT@>@(sources@) directory contains @<I@>@(all@) |
| 644 |
of the C source files required to build a FunnelWeb binary |
| 645 |
executable. In the following list, files given without an |
| 646 |
extension represent both @<TT@>@(.c@) and @<TT@>@(.h@) |
| 647 |
files. |
| 648 |
|
| 649 |
@<Begin verbatim@> |
| 650 |
analyse - The analyser. |
| 651 |
as - Assertions. |
| 652 |
clock - A clock abstraction. |
| 653 |
command - The shell command interpreter. |
| 654 |
data - Shared data structures and global vars. |
| 655 |
dump - Dump internal data structures. |
| 656 |
environ.h - Machine-dependent, program-ind header. |
| 657 |
help - Module to write out help messages. |
| 658 |
help_gnu - Function to write out the GNU license. |
| 659 |
help_gnu.txt - The GNU license in text form. |
| 660 |
help_gnu.ctx - The GNU license in C code form. |
| 661 |
list - A list abstraction. |
| 662 |
lister - Module to manage the listing file. |
| 663 |
machin - Module to hold machine-dependent, |
| 664 |
program-dependent stuff. |
| 665 |
main.c - The main() program. |
| 666 |
mapper - Module to read files into memory. |
| 667 |
memory - Memory management. |
| 668 |
misc - Miscellaneous functions. |
| 669 |
option - Command line option processing. |
| 670 |
parser - The parser. |
| 671 |
scanner - The scanner. |
| 672 |
section - A section number abstraction. |
| 673 |
style.h - A machine-independent, |
| 674 |
program-independent header file. |
| 675 |
table - A table abstraction. |
| 676 |
tangle - The tangler. |
| 677 |
texhead - Module to write out TeX header |
| 678 |
in documentation files. |
| 679 |
texhead.ctx - The TeX header in C code form. |
| 680 |
texhead.tex - The TeX header in TeX form. |
| 681 |
weave - The weaver. |
| 682 |
writfile - Output abstraction. |
| 683 |
@<End verbatim@> |
| 684 |
|
| 685 |
@<P@>The @<DQP@>@(.txt@), and @<DQP@>@(.tex@) files do not |
| 686 |
participate in the compilation, but are considered part of |
| 687 |
the source code as they were used to generate the |
| 688 |
@<DQP@>@(.ctx@) files. The @<DQP@>@(.ctx@) files are |
| 689 |
included by @<TT@>@(.c@) files of the same name. They do not |
| 690 |
need to be compiled themselves. |
| 691 |
|
| 692 |
@<FWDevMan subheading@>@(Tests Directory@) |
| 693 |
@<XX@>@(tests@,directory@) |
| 694 |
|
| 695 |
@<P@>The @<TT@>@(tests@) directory stores all the input |
| 696 |
files of the regression test suite. These come in two kinds: |
| 697 |
FunnelWeb input files with extensions of @<DQP@>@(.fw@), and |
| 698 |
FunnelWeb include files with extensions of @<DQP@>@(.fwi@). |
| 699 |
|
| 700 |
@<P@> |
| 701 |
@<Begin verbatim@> |
| 702 |
FunnelWeb Input Files: |
| 703 |
an01.fw ... an04.fw - Analyser tests. |
| 704 |
ex01.fw ... ex16.fw - Examples from the tut man. |
| 705 |
generate.fw - Generates tricky input files. |
| 706 |
hi01.fw ... hi10.fw - Examples from hints. |
| 707 |
pr01.fw ... pr10.fw - Parser tests. |
| 708 |
sc01_note.fw - Explains absence of sc01.fw |
| 709 |
sc02.fw ... sc29.fw - Scanner tests. |
| 710 |
tg01.fw ... tg09.fw - Tangler tests. |
| 711 |
wv01.fw ... wv06.fw - Weaver tests. |
| 712 |
|
| 713 |
FunnelWeb Include Files: |
| 714 |
ex09a.fwi |
| 715 |
sc13a.fwi ... sc13f.fwi |
| 716 |
sc15a.fwi |
| 717 |
tg08a.fwi |
| 718 |
@<End verbatim@> |
| 719 |
|
| 720 |
@<FWDevMan subheading@>@(Web Directory@) |
| 721 |
@<XX@>@(web@,directory@) |
| 722 |
|
| 723 |
@<P@>This directory is for the FunnelWeb webs if you want to |
| 724 |
keep a copy on your local disk so you can surf it quickly. |
| 725 |
|
| 726 |
@<Nav@>@(@<Compile_ftp FILE@>@,@<Compile FILE@>@,@<Compile_compile FILE@>@) |
| 727 |
|
| 728 |
@<End FWDevMan page@> |
| 729 |
@} |
| 730 |
|
| 731 |
@!============================================================================== |
| 732 |
|
| 733 |
@$@<Compile_compile HEADING@>@M@{@<SH@>@(1.4@)Compiling FunnelWeb@} |
| 734 |
@$@<Compile_compile FILE@>@M@{compile_compile.html@} |
| 735 |
@O@<compile_compile.html@>@{@- |
| 736 |
@<Begin FWDevMan page/wide/H1@>@(@<Compile_compile HEADING@>@) |
| 737 |
@<XX@>@(compiling@,FunnelWeb@) |
| 738 |
|
| 739 |
@<P@>The FunnelWeb source code is entirely contained within |
| 740 |
the @<TT@>@(sources@) directory. However, some simple script |
| 741 |
files and makefiles can be found in the @<TT@>@(admin@) |
| 742 |
directory. |
| 743 |
|
| 744 |
@<P@>There should be little difficulty compiling FunnelWeb |
| 745 |
for any of the currently supported platforms. If the machine |
| 746 |
on which you are compiling FunnelWeb is not one of the ones |
| 747 |
listed in the @<TT@>@(environ.h@) file, then choose the |
| 748 |
closest one you can. FunnelWeb contains some |
| 749 |
machine-dependent components, so if you are compiling for a |
| 750 |
currently-unsupported platform, you will probably need to go |
| 751 |
into the modules @<TT@>@(environ.h@), @<TT@>@(machin.h@) and |
| 752 |
@<TT@>@(machin.c@) and make some changes. |
| 753 |
|
| 754 |
@<P@>Compile |
| 755 |
FunnelWeb by pointing your C compiler at all the |
| 756 |
@<DQP@>@(.c@) files in the @<TT@>@(sources@) directory. The |
| 757 |
@<DQP@>@(.txt@), and @<DQP@>@(.tex@) files do not |
| 758 |
participate in the compilation, but appear in the |
| 759 |
@<TT@>@(sources@) directory because they were used to |
| 760 |
generate the @<DQP@>@(.ctx@) files. The @<DQP@>@(.ctx@) |
| 761 |
files are included by @<TT@>@(.c@) files of the same name |
| 762 |
and do not need to be compiled separately. Link the results. |
| 763 |
|
| 764 |
@<P@> |
| 765 |
@<Begin verbatim@> |
| 766 |
cc -c *.c |
| 767 |
cc -o fw *.o |
| 768 |
@<End verbatim@> |
| 769 |
|
| 770 |
@<P@>The result of all this should be a binary executable |
| 771 |
called @<TT@>@(fw@), or @<TT@>@(fw.exe@), or |
| 772 |
@<TT@>@(fw.xxx@) where @<TT@>@(.xxx@) is whatever file |
| 773 |
extension is appropriate on the target machine. Clean up the |
| 774 |
@<TT@>@(sources@) directory by deleting all the listing and |
| 775 |
object files. |
| 776 |
|
| 777 |
@<P@>If you encounter any difficulties compiling FunnelWeb, you |
| 778 |
may wish to refer to the platform-specific notes below. |
| 779 |
|
| 780 |
@<P@>If you port FunnelWeb to a new platform, please @<email me@> |
| 781 |
any information that I can incorporate into the next |
| 782 |
release, or add here to help others porting to the same |
| 783 |
platform. |
| 784 |
|
| 785 |
@<FWDevMan subheading@>@(A Make File@) |
| 786 |
|
| 787 |
@<P@>The FunnelWeb distribution does not provide a makefile |
| 788 |
as compilers are so fast now that the risk of omitting a |
| 789 |
dependency far exceeds the benefits provided by a makefile |
| 790 |
for a program this size. |
| 791 |
|
| 792 |
@<P@>However, some people have complained about the lack of |
| 793 |
a makefile, and in fact Dougal Scott |
| 794 |
(@<Email@>@(dwagon@@nella9.cc.monash.edu.au@)) |
| 795 |
actually sent me one which he constructed using the GNU C -MM |
| 796 |
option. Here it is: |
| 797 |
|
| 798 |
@<P@> |
| 799 |
@<Begin verbatim/size2@> |
| 800 |
------------------------SLICE and DICE here--------------------------------- |
| 801 |
OBJS= analyse.o as.o clock.o command.o data.o dump.o help.o help_gnu.o list.o \ |
| 802 |
lister.o machin.o mapper.o memory.o misc.o option.o parser.o scanner.o \ |
| 803 |
section.o table.o tangle.o texhead.o weave.o writfile.o main.o |
| 804 |
HDRS= analyse.h as.h clock.h command.h data.h dump.h environ.h help.h \ |
| 805 |
help_gnu.h list.h lister.h machin.h mapper.h memory.h misc.h option.h \ |
| 806 |
parser.h scanner.h section.h style.h table.h tangle.h texhead.h weave.h \ |
| 807 |
writfile.h |
| 808 |
CC=gcc |
| 809 |
CFLAGS=-O -Wall |
| 810 |
|
| 811 |
all: fw |
| 812 |
|
| 813 |
fw: $(OBJS) |
| 814 |
$(CC) -o fw $(OBJS) |
| 815 |
|
| 816 |
analyse.o : analyse.c style.h environ.h analyse.h as.h data.h clock.h list.h \ |
| 817 |
table.h option.h machin.h help.h section.h writfile.h lister.h misc.h |
| 818 |
as.o : as.c style.h environ.h as.h machin.h |
| 819 |
clock.o : clock.c style.h environ.h as.h clock.h machin.h |
| 820 |
command.o : command.c style.h environ.h analyse.h as.h command.h machin.h data.h \ |
| 821 |
clock.h list.h table.h option.h help.h section.h writfile.h dump.h lister.h \ |
| 822 |
memory.h mapper.h misc.h parser.h scanner.h tangle.h weave.h |
| 823 |
data.o : data.c data.h style.h environ.h clock.h list.h table.h option.h machin.h \ |
| 824 |
help.h section.h writfile.h |
| 825 |
dump.o : dump.c style.h environ.h as.h clock.h data.h list.h table.h option.h \ |
| 826 |
machin.h help.h section.h writfile.h dump.h misc.h |
| 827 |
help.o : help.c style.h environ.h as.h help.h help_gnu.h misc.h data.h clock.h \ |
| 828 |
list.h table.h option.h machin.h section.h writfile.h |
| 829 |
help_gnu.o : help_gnu.c style.h environ.h help_gnu.h help_gnu.ctx |
| 830 |
list.o : list.c style.h environ.h as.h machin.h memory.h list.h |
| 831 |
lister.o : lister.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 832 |
machin.h help.h section.h writfile.h lister.h misc.h |
| 833 |
machin.o : machin.c style.h environ.h as.h machin.h |
| 834 |
main.o : main.c style.h environ.h as.h command.h machin.h data.h clock.h list.h \ |
| 835 |
table.h option.h help.h section.h writfile.h memory.h |
| 836 |
mapper.o : mapper.c style.h environ.h as.h machin.h mapper.h memory.h |
| 837 |
memory.o : memory.c style.h environ.h as.h machin.h memory.h |
| 838 |
misc.o : misc.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 839 |
machin.h help.h section.h writfile.h memory.h misc.h |
| 840 |
option.o : option.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 841 |
machin.h help.h section.h writfile.h misc.h |
| 842 |
parser.o : parser.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 843 |
machin.h help.h section.h writfile.h lister.h mapper.h memory.h misc.h parser.h |
| 844 |
scanner.o : scanner.c style.h environ.h as.h clock.h data.h list.h table.h option.h \ |
| 845 |
machin.h help.h section.h writfile.h dump.h lister.h mapper.h memory.h misc.h \ |
| 846 |
scanner.h |
| 847 |
section.o : section.c style.h environ.h as.h section.h |
| 848 |
table.o : table.c style.h environ.h as.h machin.h memory.h table.h |
| 849 |
tangle.o : tangle.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 850 |
machin.h help.h section.h writfile.h lister.h memory.h misc.h tangle.h |
| 851 |
texhead.o : texhead.c style.h environ.h texhead.h writfile.h texhead.ctx |
| 852 |
weave.o : weave.c style.h environ.h as.h data.h clock.h list.h table.h option.h \ |
| 853 |
machin.h help.h section.h writfile.h lister.h misc.h texhead.h weave.h |
| 854 |
writfile.o : writfile.c style.h environ.h as.h machin.h writfile.h |
| 855 |
------------------------SLICE and DICE here--------------------------------- |
| 856 |
@<End verbatim/size2@> |
| 857 |
|
| 858 |
@<FWDevMan subheading@>@(Apollo@) |
| 859 |
|
| 860 |
@<P@>16-Oct-1992: David Barton (@<Email@>@(dlb@@hudson.wash.inmet.com@)) |
| 861 |
reports that he has managed to compile FunnelWeb on an Apollo running |
| 862 |
Domain/OS SR10.2. |
| 863 |
|
| 864 |
@<FWDevMan subheading@>@(HP-UX@) |
| 865 |
|
| 866 |
@<P@>15-Oct-1992: On an HP 9000/s300 running HP-UX 8.0, some |
| 867 |
users got FunnelWeb to compile, but found that they were |
| 868 |
running up against buffer size limitations. The problem is |
| 869 |
the definition of FILENAME_MAX in machin.h. When I wrote |
| 870 |
FunnelWeb, I assumed that FILENAME_MAX was the maximum |
| 871 |
length of an entire file specification including the path. |
| 872 |
However, on many machines, it is defined the be the maximum |
| 873 |
length of a filename without the path. The problem can be |
| 874 |
fixed by forcing the definition |
| 875 |
|
| 876 |
@<P@> |
| 877 |
@<Begin verbatim@> |
| 878 |
#define FILENAME_MAX 300 |
| 879 |
@<End verbatim@> |
| 880 |
|
| 881 |
@<P@>in machin.h. This is the only known problem encountered |
| 882 |
by those who have performed HP ports. |
| 883 |
|
| 884 |
@<FWDevMan subheading@>@(Macintosh MPW C@) |
| 885 |
|
| 886 |
@<P@>09-Aug-1992: Tor Olaussen (@<Email@>@(olaussen@@cc.uib.no@)) |
| 887 |
of the Nansen Remote Sensing Center, University of Bergen, |
| 888 |
Norway reports that he has managed to get FunnelWeb to |
| 889 |
compile and run under the Macintosh MPW environment. He |
| 890 |
writes: |
| 891 |
|
| 892 |
@<P@> |
| 893 |
@<Begin verbatim@> |
| 894 |
"If you are interested in my changes, I should be able to generate |
| 895 |
diff files, and send them to you together with a makefile. Otherwise |
| 896 |
you can use me a reference if you receive questions about FunnelWeb |
| 897 |
and MPW." |
| 898 |
@<End verbatim@> |
| 899 |
|
| 900 |
@<FWDevMan subheading@>@(Next@) |
| 901 |
|
| 902 |
@<P@>16-Oct-1992: John Dawson (@<Email@>@(avsoft!john@@cs.utexas.edu@)) |
| 903 |
has installed FunnelWeb on a NeXT machine and has got it to pass |
| 904 |
the regression tests. He writes: |
| 905 |
|
| 906 |
@<P@> |
| 907 |
@<Begin verbatim@> |
| 908 |
"I had to play with the machin.{h,m} and environ.h files to get |
| 909 |
FunnelWeb to compile correctly. The problem area was in machin.h |
| 910 |
where you put all those prototypes for the Sun. They didn't jive |
| 911 |
well with my system. However, every other default for the Sun was |
| 912 |
ok. (A NeXT only needs to be aligned on 2^1-byte boundaries, and |
| 913 |
I think 2^0-byte boundaries might even work, but aligning things on |
| 914 |
2^2-byte boundaries doesn't hurt much.)." |
| 915 |
@<End verbatim@> |
| 916 |
|
| 917 |
@<P@>The modified header files are available in the file: |
| 918 |
|
| 919 |
@<P@> |
| 920 |
@<Begin indent@> |
| 921 |
@<URL@>@(@<FunnelWeb FTP@>funnelweb300/funnelweb300_next_patch.c@) |
| 922 |
@<End indent@> |
| 923 |
|
| 924 |
@<FWDevMan subheading@>@(MS-DOS@) |
| 925 |
|
| 926 |
@<P@>09-Oct-1992: In the lead up to the release of FunnelWeb 3.0, |
| 927 |
the PC that had been |
| 928 |
available for me to use to test the port of FW to the PC became |
| 929 |
unavailable. Because of this, I took the shortcut of not compiling and |
| 930 |
testing the final released version of the code (V3.0) on a PC!!! Worse |
| 931 |
still, I did not provide any notes on what compiler flags should be |
| 932 |
used. |
| 933 |
|
| 934 |
@<P@>As a result, those who have attempted to compile FunnelWeb on PCs ran |
| 935 |
into a few difficulties. |
| 936 |
|
| 937 |
@<P@>If you still want to compile FunnelWeb on the PC, here are |
| 938 |
some notes that I have collected: |
| 939 |
|
| 940 |
@<P@>Most people who compile FunnelWeb on a PC seem to be using Borland |
| 941 |
C++. If you are using this compiler, you need to do the following: |
| 942 |
|
| 943 |
@<Begin list@> |
| 944 |
@<Item@>Insert "#define STDC 1" in environ.h. |
| 945 |
@<Item@>Compile with the HUGE memory model. |
| 946 |
@<Item@>Turn on the ANSI option. |
| 947 |
@<Item@>Turn on the BorlandC++ option. |
| 948 |
@<Item@>Increase the run time stack size from 4K (default) to 32K |
| 949 |
by inserting the line: |
| 950 |
@<TT@>@(extern unsigned _stklen = 32768;@) |
| 951 |
just above the minimain() declaration. Refer to page 608 |
| 952 |
of the borland library reference manual (V3.00). |
| 953 |
@<End list@> |
| 954 |
|
| 955 |
@<P@>You may run into troubles with MSDOS with the regression |
| 956 |
test input file "sc13a" which is a zero length file. It is |
| 957 |
just a zero length file so if you run into difficulties, |
| 958 |
create it any way you like. |
| 959 |
|
| 960 |
@<Nav@>@(@<Compile_tree FILE@>@,@<Compile FILE@>@,@<Compile_testing FILE@>@) |
| 961 |
|
| 962 |
@<End FWDevMan page@> |
| 963 |
@} |
| 964 |
|
| 965 |
@!============================================================================== |
| 966 |
|
| 967 |
@$@<Compile_testing HEADING@>@M@{@<SH@>@(1.5@)Testing FunnelWeb@} |
| 968 |
@$@<Compile_testing FILE@>@M@{compile_testing.html@} |
| 969 |
@O@<compile_testing.html@>@{@- |
| 970 |
@<Begin FWDevMan page/H1@>@(@<Compile_testing HEADING@>@) |
| 971 |
@<XX@>@(testing@,FunnelWeb@) |
| 972 |
|
| 973 |
@<P@>Once you have obtained a binary executable, you should |
| 974 |
test FunnelWeb before using it or making it available to |
| 975 |
users. FunnelWeb comes with a comprehensive regression test |
| 976 |
suite. Here's how to use it: |
| 977 |
|
| 978 |
@<P@> |
| 979 |
@<Begin list/ordered@> |
| 980 |
|
| 981 |
@<Item@>Set the default directory to be the |
| 982 |
@<TT@>@(scripts@) directory. |
| 983 |
|
| 984 |
@<Item@>If you are on a Macintosh, copy the FunnelWeb |
| 985 |
executable into the scripts directory. |
| 986 |
|
| 987 |
@<Item@>Edit the script @<TT@>@(master.fws@). Locate the |
| 988 |
section called @<DQ@>@(Define Symbol For the Root Test |
| 989 |
Directory@) and define the @<TT@>@(R@) symbol to point to |
| 990 |
the FunnelWeb root directory @<TT@>@(fwdir@). The examples |
| 991 |
in the comments in the script should make it clear what is |
| 992 |
required. |
| 993 |
|
| 994 |
@<Item@>Invoke FunnelWeb to execute the master test script |
| 995 |
with the command line @<TT@>@(fw +xmaster@) |
| 996 |
|
| 997 |
@<End list/ordered@> |
| 998 |
|
| 999 |
@<P@>The @<TT@>@(master.fws@) script should run for a minute |
| 1000 |
or two. If all goes well, you will find a differences report |
| 1001 |
on your screen reporting zero differences. If this happens, |
| 1002 |
then FunnelWeb has been fully tested and is ready to be made |
| 1003 |
available to users. You should delete all the files in the |
| 1004 |
@<TT@>@(results@) directory. |
| 1005 |
|
| 1006 |
@<P@>If you run into any problems, please write a short |
| 1007 |
report describing the problem and mail it to me |
| 1008 |
(@<Ross Williams@> (@<Email@>@(@<Ross personal EMAIL@>@))). I may |
| 1009 |
not be able to help you with it immediately, but I certainly |
| 1010 |
want to know that a problem exists, so that it can be |
| 1011 |
corrected in future releases of FunnelWeb. |
| 1012 |
|
| 1013 |
@<Nav/last@>@(@<Compile_compile FILE@>@,@<Compile FILE@>@,@<Compile FILE@>@) |
| 1014 |
|
| 1015 |
@<End FWDevMan page@> |
| 1016 |
@} |
| 1017 |
|
| 1018 |
@!****************************************************************************** |
| 1019 |
|
| 1020 |
@$@<Design HEADING@>@M@{@<SH@>@(2@)FunnelWeb Design Notes@} |
| 1021 |
@$@<Design HEADING/short@>@M@{@<SH@>@(2@)Design@} |
| 1022 |
@$@<Design FILE@>@M@{design.html@} |
| 1023 |
@O@<design.html@>@{@- |
| 1024 |
@<Begin FWDevMan page/H1@>@(@<Design HEADING@>@) |
| 1025 |
|
| 1026 |
@<P@> |
| 1027 |
|
| 1028 |
@<Design index@> |
| 1029 |
|
| 1030 |
@<Nav@>@(@<Compile FILE@>@,@<Index FILE@>@,@<Implement FILE@>@) |
| 1031 |
|
| 1032 |
@<End FWDevMan page@> |
| 1033 |
@} |
| 1034 |
|
| 1035 |
@$@<Design index@>@M@{ |
| 1036 |
@<Begin size3@> |
| 1037 |
@<Begin indent/narrow@> |
| 1038 |
@<Link@>@(@<Design_introduction FILE@>@,@<Design_introduction HEADING@>@)@<BR@> |
| 1039 |
@<Link@>@(@<Design_motivation FILE@>@,@<Design_motivation HEADING@>@)@<BR@> |
| 1040 |
@<Link@>@(@<Design_indentation FILE@>@,@<Design_indentation HEADING@>@)@<BR@> |
| 1041 |
@<Link@>@(@<Design_syntax FILE@>@,@<Design_syntax HEADING@>@)@<BR@> |
| 1042 |
@<Link@>@(@<Design_structure FILE@>@,@<Design_structure HEADING@>@)@<BR@> |
| 1043 |
@<Link@>@(@<Design_testing FILE@>@,@<Design_testing HEADING@>@)@<BR@> |
| 1044 |
@<Link@>@(@<Design_filenames FILE@>@,@<Design_filenames HEADING@>@)@<BR@> |
| 1045 |
@<Link@>@(@<Design_numinst FILE@>@,@<Design_numinst HEADING@>@)@<BR@> |
| 1046 |
@<Link@>@(@<Design_docmac FILE@>@,@<Design_docmac HEADING@>@)@<BR@> |
| 1047 |
@<Link@>@(@<Design_diagnostics FILE@>@,@<Design_diagnostics HEADING@>@)@<BR@> |
| 1048 |
@<End indent/narrow@> |
| 1049 |
@<End size3@> |
| 1050 |
@} |
| 1051 |
|
| 1052 |
@!============================================================================== |
| 1053 |
|
| 1054 |
@$@<Design_introduction HEADING@>@M@{@<SH@>@(2.1@)Introduction@} |
| 1055 |
@$@<Design_introduction FILE@>@M@{design_introduction.html@} |
| 1056 |
@O@<design_introduction.html@>@{@- |
| 1057 |
@<Begin FWDevMan page/H1@>@(@<Design_introduction HEADING@>@) |
| 1058 |
@<XX@>@(FunnelWeb@,design@) |
| 1059 |
|
| 1060 |
@<P@>This chapter contains notes on the design of FunnelWeb. |
| 1061 |
These notes are mostly the result of a complete design |
| 1062 |
review that occurred in late 1991 as part of the process of |
| 1063 |
preparing FunnelWeb V3.0 for public release. |
| 1064 |
|
| 1065 |
@<P@>Throughout the FunnelWeb design process I have tried to |
| 1066 |
stick to the principles of simplicity and clarity. As a |
| 1067 |
rule, it was considered more important that a feature be |
| 1068 |
simple, and not allow the user to outsmart himself, than it |
| 1069 |
was for the feature to be elegant. For example, the |
| 1070 |
FunnelWeb macro calling syntax is not as clean as the C |
| 1071 |
preprocessor syntax, but is simpler and more visible, and so |
| 1072 |
is less likely to cause trouble. |
| 1073 |
|
| 1074 |
@<Nav/first@>@(@<Design FILE@>@,@<Design FILE@>@,@<Design_motivation FILE@>@) |
| 1075 |
|
| 1076 |
@<End FWDevMan page@> |
| 1077 |
@} |
| 1078 |
|
| 1079 |
@!============================================================================== |
| 1080 |
|
| 1081 |
@$@<Design_motivation HEADING@>@M@{@<SH@>@(2.2@)Motivation For FunnelWeb@} |
| 1082 |
@$@<Design_motivation FILE@>@M@{design_motivation.html@} |
| 1083 |
@O@<design_motivation.html@>@{@- |
| 1084 |
@<Begin FWDevMan page/H1@>@(@<Design_motivation HEADING@>@) |
| 1085 |
@<XX@>@(FunnelWeb@,motivation@) |
| 1086 |
|
| 1087 |
@<P@>During 1986, I discovered Donald |
| 1088 |
Knuth's@<XN@>@(Donald@,Knuth@) @<TT@>@(WEB@) literate |
| 1089 |
programming system in the form of Jon |
| 1090 |
Bentley's@<XN@>@(Jon@,Bentley@) @<I@>@(Programming |
| 1091 |
Pearls@)@<X@>@(programming pearls@) column in |
| 1092 |
@<I@>@(Communications@<X@>@(Communications of the ACM@) of |
| 1093 |
the ACM@) @<Paper@>@(Bentley86@). This prompted me to |
| 1094 |
obtain a copy of the report on the Web |
| 1095 |
system@<Paper@>@(Knuth83@) and to try out the WEB program. |
| 1096 |
|
| 1097 |
@<P@>WEB was the best system that I had seen for producing |
| 1098 |
printed and online, inline documentation. To me the most |
| 1099 |
extraordinary aspect of the system was its success despite |
| 1100 |
the fact that it had been built into the horribly antiquated |
| 1101 |
file/batch processing systems that we all know and love |
| 1102 |
(and use). I had imagined sophisticated documentation |
| 1103 |
systems before this time, but had always assumed that they |
| 1104 |
would be parts of complex programming environments. Knuth |
| 1105 |
showed that, to some extent, it can be done using 1960s |
| 1106 |
software technology (excluding the 1980s typesetting |
| 1107 |
technology). |
| 1108 |
|
| 1109 |
@<P@>The WEB system was enticing and promising, but to me |
| 1110 |
suffered from many drawbacks, many of which Knuth had |
| 1111 |
categorized as advantages. The following highly subjective list |
| 1112 |
of disadvantages formed a springboard for the construction |
| 1113 |
of FunnelWeb. |
| 1114 |
|
| 1115 |
@<Begin list@> |
| 1116 |
|
| 1117 |
@<Item@>WEB can only process Pascal@<X@>@(Pascal@) programs. |
| 1118 |
|
| 1119 |
@<Item@>WEB can produce only one output file. In many |
| 1120 |
instances it is desirable to generate more than one output |
| 1121 |
file.@<XX@>@(number@,output files@) |
| 1122 |
|
| 1123 |
@<Item@>WEB enforces Knuth's individual style of |
| 1124 |
indentation. WEB supplies commands to over-ride the |
| 1125 |
automatic indentation, but it is an uphill battle and the |
| 1126 |
code becomes clogged up with format |
| 1127 |
directives.@<X@>@(indentation@) |
| 1128 |
|
| 1129 |
@<Item@>WEB does not cater for non-standard Pascal |
| 1130 |
programs. In particular, all identifiers are truncated to |
| 1131 |
about eight characters. |
| 1132 |
|
| 1133 |
@<Item@>WEB formats the program output file into a form |
| 1134 |
that is unreadable to humans. |
| 1135 |
|
| 1136 |
@<Item@>WEB does not provide an include facility. This |
| 1137 |
was considered a feature essential for supporting macro |
| 1138 |
libraries. |
| 1139 |
|
| 1140 |
@<Item@>WEB provides macros with at most one parameter. |
| 1141 |
Knuth describes a hack that can extract a multiple parameter |
| 1142 |
macro facility from a single parameter one, but it is |
| 1143 |
hardly satisfactory. |
| 1144 |
|
| 1145 |
@<Item@>WEB does not provide conditionals. |
| 1146 |
|
| 1147 |
@<End list@> |
| 1148 |
|
| 1149 |
@<P@>Most of these objections boiled down to two points: |
| 1150 |
that WEB is far too specialized, and that Knuth's |
| 1151 |
@<DQ@>@(Occam's Razor@)@<X@>@(Occam's razor@) had cut too |
| 1152 |
far. What I wanted was a documentation system that employed |
| 1153 |
all the same principles as WEB but was far more general. |
| 1154 |
The result was FunnelWeb@<_@>V1 which could process |
| 1155 |
programs in any language or any combination of languages at |
| 1156 |
the cost of setting the text in @<TT@>@(tt font@) instead |
| 1157 |
of typesetting it in a language-specific way, as WEB does. |
| 1158 |
|
| 1159 |
@<P@>Originally, it was intended that FunnelWeb would be |
| 1160 |
typesetter independent as well as language independent. It |
| 1161 |
was intended that a format file consisting of a set of |
| 1162 |
productions describing how the document file was to be |
| 1163 |
formatted would be handed to FunnelWeb along with the input |
| 1164 |
file. However, time pressures forced me to take the back |
| 1165 |
door and hack up a TeX document file generator. In version |
| 1166 |
3.2 an HTML generator was added. |
| 1167 |
|
| 1168 |
@<Nav@>@(@<Design_introduction FILE@>@,@<Design FILE@>@,@<Design_indentation FILE@>@) |
| 1169 |
|
| 1170 |
@<End FWDevMan page@> |
| 1171 |
@} |
| 1172 |
|
| 1173 |
@!============================================================================== |
| 1174 |
|
| 1175 |
@$@<Design_indentation HEADING@>@M@{@<SH@>@(2.3@)Indentation@} |
| 1176 |
@$@<Design_indentation FILE@>@M@{design_indentation.html@} |
| 1177 |
@O@<design_indentation.html@>@{@- |
| 1178 |
@<Begin FWDevMan page/H1@>@(@<Design_indentation HEADING@>@) |
| 1179 |
@<X@>@(indentation@)@<XX@>@(indentation@,no@) |
| 1180 |
@<XX@>@(indentation@,blank@)@<XX@>@(indentation@,text@) |
| 1181 |
|
| 1182 |
@<P@>How should FunnelWeb insert the text of macros that are |
| 1183 |
not called in column one? A macro call that does not appear |
| 1184 |
at the left margin is called an @<NewTerm@>@(indented macro |
| 1185 |
call@) and suggests three different alternatives for |
| 1186 |
its expansion: @<NewTerm@>@(no indentation@), |
| 1187 |
@<NewTerm@>@(blank indentation@), and @<NewTerm@>@(text |
| 1188 |
indentation@). Here are examples of each kind of |
| 1189 |
indentation. First the example problem. |
| 1190 |
|
| 1191 |
@<P@> |
| 1192 |
@<Begin verbatim@> |
| 1193 |
@@$@@@<<@>Sloth@@@<>@>==@@{@@- |
| 1194 |
Aardvark |
| 1195 |
Walrus@@} |
| 1196 |
|
| 1197 |
@@O@@@<<@>Output@@@<>@>==@@{@@- |
| 1198 |
Zebra@@@<<@>Sloth@@@<>@> |
| 1199 |
Giraffe |
| 1200 |
@@} |
| 1201 |
@<End verbatim@> |
| 1202 |
|
| 1203 |
|
| 1204 |
@<P@>There are three ways that the second line of the |
| 1205 |
@<TT@>@(Sloth@) macro can be indented in the product file. |
| 1206 |
|
| 1207 |
@<P@> |
| 1208 |
@<B@>@(No indentation:@) |
| 1209 |
@<Begin verbatim@> |
| 1210 |
ZebraAardvark |
| 1211 |
Walrus |
| 1212 |
Giraffe |
| 1213 |
@<End verbatim@> |
| 1214 |
|
| 1215 |
@<P@> |
| 1216 |
@<B@>@(Blank indentation:@) |
| 1217 |
@<Begin verbatim@> |
| 1218 |
ZebraAardvark |
| 1219 |
Walrus |
| 1220 |
Giraffe |
| 1221 |
@<End verbatim@> |
| 1222 |
|
| 1223 |
@<P@> |
| 1224 |
@<B@>@(Text indentation:@) |
| 1225 |
@<Begin verbatim@> |
| 1226 |
ZebraAardvark |
| 1227 |
ZebraWalrus |
| 1228 |
Giraffe |
| 1229 |
@<End verbatim@> |
| 1230 |
|
| 1231 |
@<P@>No indentation is useful where the user wishes to view |
| 1232 |
the output as a pure byte stream. Blank |
| 1233 |
indentation is useful when the user wishes to generate |
| 1234 |
indented computer programs. Text indentation is useful where |
| 1235 |
the user wishes to prefix each line of an entire macro |
| 1236 |
invocation with a string. This can be useful for commenting |
| 1237 |
out code (@<eg@>in Ada using @<TT@>@(--@)), and for |
| 1238 |
prepending constructs such as a dollar sign at the start of each |
| 1239 |
line in an OpenVMS DCL script command file.@<X@>@(DCL@) |
| 1240 |
|
| 1241 |
@<P@>The design questions are as follows: |
| 1242 |
|
| 1243 |
@<P@> |
| 1244 |
@<Begin list/ordered@> |
| 1245 |
@<Item@>Which of the three kinds of indentation should FunnelWeb support? |
| 1246 |
@<Item@>What should be the granularity of swapping between indentation modes? |
| 1247 |
@<Item@>Are particular indentation modes dangerous? |
| 1248 |
@<Item@>Is the presence of particular combinations of indentation modes |
| 1249 |
confusing to the user? |
| 1250 |
@<Item@>How and when should the choice of indentation be specified? |
| 1251 |
@<End list/ordered@> |
| 1252 |
|
| 1253 |
@<P@>After a lot of thought, it was decided that the factor |
| 1254 |
that should determine the design is the @<I@>@(clarity@) in |
| 1255 |
the user's mind of the indentation facility, and the |
| 1256 |
@<I@>@(danger@) associated with misunderstanding it. Here |
| 1257 |
are two examples that show how easily a misunderstanding about |
| 1258 |
the indentation model can cause a serious semantic error: |
| 1259 |
|
| 1260 |
@<P@> |
| 1261 |
@<Begin verbatim@> |
| 1262 |
--Misuse of blank (and no) indentation. |
| 1263 |
--@@@<<@>Sloth@@@<>@> |
| 1264 |
@<End verbatim@> |
| 1265 |
|
| 1266 |
@<P@>In this first example, the user has assumed that text |
| 1267 |
indentation is in action and has placed an Ada comment |
| 1268 |
symbol @<DQP@>@(--@) before the invocation of the macro |
| 1269 |
@<TT@>@(@@@<<@>Sloth@@@<>@>@) in the expectation that every |
| 1270 |
line in the expansion of the macro will be prefixed by |
| 1271 |
@<DQP@>@(--@). Unfortunately, if no-indentation or |
| 1272 |
blank-indentation is active, only the first statement of the |
| 1273 |
expansion of macro @<TT@>@(@@@<<@>Sloth@@@<>@>@) will be |
| 1274 |
commented out. |
| 1275 |
|
| 1276 |
@<P@> |
| 1277 |
@<Begin verbatim@> |
| 1278 |
--Misuse of text indentation: |
| 1279 |
a++; @@@<<@>Sloth@@@<>@> |
| 1280 |
@<End verbatim@> |
| 1281 |
|
| 1282 |
@<P@>In this second example, the user has assumed |
| 1283 |
no-indentation or blank-indentation and has placed the call |
| 1284 |
to @<TT@>@(@@@<<@>Sloth@@@<>@>@) after the incrementing of |
| 1285 |
variable @<TT@>@(a@). Under a text-indentation mode, this |
| 1286 |
will result in the statement @<DQP@>@(a++;@) appearing at |
| 1287 |
the start of each line in the macro expansion! |
| 1288 |
|
| 1289 |
@<P@>These examples show that confusion about the |
| 1290 |
indentation model could cause a serious semantic problem in |
| 1291 |
a program written using FunnelWeb. In particular, the |
| 1292 |
examples above pose a dilemma because they are symmetric. |
| 1293 |
One cannot simply pin the blame on one particular |
| 1294 |
indentation form. A little thought reveals that the greatest |
| 1295 |
danger lies in @<I@>@(confusion@) in the user's mind. If the |
| 1296 |
user is confused between text or blank indenting, problems |
| 1297 |
will arise. |
| 1298 |
|
| 1299 |
@<P@>There seems to be two ways to solve the problem. The |
| 1300 |
first is to ban all macro calls that are preceded by |
| 1301 |
non-blank text. This is not a good option because there are |
| 1302 |
so many cases where it is desirable to expand more than one |
| 1303 |
single line macro on the same line. A second option is to |
| 1304 |
eliminate one of the two forms so as to reduce the potential |
| 1305 |
for confusion in the user's mind. I choose the latter |
| 1306 |
option. Of the three forms, the clear choice for elimination |
| 1307 |
is text indenting for the following reasons: |
| 1308 |
|
| 1309 |
@<P@> |
| 1310 |
@<Begin list/ordered@> |
| 1311 |
@<Item@>It actually introduces extra text which gives it an a priori |
| 1312 |
potential for problems. |
| 1313 |
@<Item@>It is harder to implement and would slow down Tangle. |
| 1314 |
@<End list/ordered@> |
| 1315 |
|
| 1316 |
@<P@>The only other decision is the level of granularity of |
| 1317 |
choice between the remaining options: no indentation and |
| 1318 |
blank indentation. FunnelWeb@<_@>V1 allowed this choice to |
| 1319 |
be made in the command line, but this was a bad choice |
| 1320 |
because it made the user responsible for a portion of the |
| 1321 |
file's semantics. A better system, used in FunnelWeb@<_@>V3, |
| 1322 |
is to allow the user to specify the indentation mode in the |
| 1323 |
input file itself. |
| 1324 |
|
| 1325 |
@<P@>Again, to avoid confusion, it seems sensible to allow |
| 1326 |
the user only one indentation mode per FunnelWeb input file. |
| 1327 |
In most cases, the user will be happy with blank indentation |
| 1328 |
(the default) and there will be no need for change anyway. |
| 1329 |
|
| 1330 |
@<Boldthing@>@(Decision:@) Implement only @<DQ@>@(no |
| 1331 |
indentation@) and @<DQ@>@(blank indentation@). Make the |
| 1332 |
choice of indentation a static attribute of a particular |
| 1333 |
FunnelWeb run that is specified in the input file. |
| 1334 |
|
| 1335 |
@<Nav@>@(@<Design_motivation FILE@>@,@<Design FILE@>@,@<Design_syntax FILE@>@) |
| 1336 |
|
| 1337 |
@<End FWDevMan page@> |
| 1338 |
@} |
| 1339 |
|
| 1340 |
@!============================================================================== |
| 1341 |
|
| 1342 |
@$@<Design_syntax HEADING@>@M@{@<SH@>@(2.4@)A Review Of FunnelWeb Syntax@} |
| 1343 |
@$@<Design_syntax FILE@>@M@{design_syntax.html@} |
| 1344 |
@O@<design_syntax.html@>@{@- |
| 1345 |
@<Begin FWDevMan page/H1@>@(@<Design_syntax HEADING@>@) |
| 1346 |
@<XX@>@(FunnelWeb@,syntax@) |
| 1347 |
|
| 1348 |
@<P@>One of the disadvantages of FunnelWeb is its |
| 1349 |
clumsy macro definition and calling syntax. Compared to |
| 1350 |
(say) the C preprocessor, FunnelWeb's macro call syntax is |
| 1351 |
like a freight train in a china shop. Unfortunately, all |
| 1352 |
attempts to convert this syntax to something more elgant |
| 1353 |
have failed, because the existing syntax is the simplest |
| 1354 |
from a conceptual point of view and is the least likely |
| 1355 |
to cause semantic confusion. This page discusses and |
| 1356 |
justifies the FunnelWeb syntax. |
| 1357 |
|
| 1358 |
@<FWDevMan subheading@>@(Macro Definition Syntax@) |
| 1359 |
@<XX@>@(macro definition@,syntax@) |
| 1360 |
|
| 1361 |
@<P@>FunnelWeb's macro definition syntax results in |
| 1362 |
definitions that look like this: |
| 1363 |
|
| 1364 |
@<P@>@<Begin verbatim@> |
| 1365 |
@@$@@@<<@>Put out the cat@@@<>@>==@@{@@- |
| 1366 |
Open the door |
| 1367 |
Say out |
| 1368 |
Close the door@@} |
| 1369 |
@<End verbatim@> |
| 1370 |
|
| 1371 |
@<P@>Here's why this syntax was chosen: |
| 1372 |
|
| 1373 |
@<Narrowthing@>@(Dollars:@,The @<TT@>@(@@$@) is necessary to cue a |
| 1374 |
definition. Without it, the definition might somehow be |
| 1375 |
mistaken for an invocation.@) |
| 1376 |
|
| 1377 |
@<Narrowthing@>@(Name delimiters:@, The @<TT@>@(@@@<<@>@) and |
| 1378 |
@<TT@>@(@@@<>@>@) are required to delimit the name and to |
| 1379 |
resonate syntactically with macro calls.@) |
| 1380 |
|
| 1381 |
@<Narrowthing@>@(Content delimiters:@, The @<TT@>@(@@{@) and |
| 1382 |
@<TT@>@(@@}@) delimit the content of the macro.@) |
| 1383 |
|
| 1384 |
@<Narrowthing@>@(EOL suppressor:@,The @<TT@>@(@@-@) is a |
| 1385 |
result of the simplifying rule that the content of a macro |
| 1386 |
is @<DQ@>@(exactly the text between the |
| 1387 |
@<TT@>@(@@{@) and @<TT@>@(@@}@).@)@) |
| 1388 |
|
| 1389 |
@<P@>The only real target for a syntax purge the |
| 1390 |
@<DQP@>@(==@) which is optional anyway. |
| 1391 |
|
| 1392 |
@<P@>An alternative minimalist approach to macro definitions |
| 1393 |
is: |
| 1394 |
|
| 1395 |
@<P@>@<Begin verbatim@> |
| 1396 |
@@@<<@>Put out the cat@@@<>@> |
| 1397 |
Open the door |
| 1398 |
Say out |
| 1399 |
Close the door@@} |
| 1400 |
@<End verbatim@> |
| 1401 |
|
| 1402 |
@<P@>but this is too dangerous for my tastes as there |
| 1403 |
is no syntax surrounding the name of the macro to |
| 1404 |
indicate that it is a macro definition and not a macro |
| 1405 |
call. |
| 1406 |
|
| 1407 |
@<FWDevMan subheading@>@(Parameterized Macro Definition Syntax@) |
| 1408 |
|
| 1409 |
@<P@>The definitions of parameterized macros are even messier |
| 1410 |
than the normal definitions. |
| 1411 |
|
| 1412 |
@<P@>@<Begin verbatim@> |
| 1413 |
@@$@@@<<@>Put out the cat@@@<>@>@@(@@3@@)==@@{@@- |
| 1414 |
Open the door |
| 1415 |
Say out |
| 1416 |
Close the door@@} |
| 1417 |
@<End verbatim@> |
| 1418 |
|
| 1419 |
This is messy, but the @<DQ@>@(natural@) alternative is even worse: |
| 1420 |
|
| 1421 |
@<P@>@<Begin verbatim@> |
| 1422 |
@@$@@@<<@>Put out the cat@@@<>@>@@(@@1@@,@@2@@,@@3@@)==@@{@@- |
| 1423 |
Open the door |
| 1424 |
Say out |
| 1425 |
Close the door@@} |
| 1426 |
@<End verbatim@> |
| 1427 |
|
| 1428 |
@<P@>Given that the parameters don't have names, it seems cleaner |
| 1429 |
just to specify the number of parameters. |
| 1430 |
pecifying the number of parameters seems sensible. |
| 1431 |
|
| 1432 |
@<FWDevMan subheading@>@(Macro Call Syntax@) |
| 1433 |
@<XX@>@(macro call@,syntax@) |
| 1434 |
|
| 1435 |
@<P@>Here are some syntaxes that were considered for |
| 1436 |
FunnelWeb macro calls. |
| 1437 |
|
| 1438 |
@<P@> |
| 1439 |
@<Begin verbatim@> |
| 1440 |
Open the door |
| 1441 |
@@@<<@>Say Out@@@<>@> @@! Current style. |
| 1442 |
Close the door |
| 1443 |
|
| 1444 |
Open the door |
| 1445 |
@@@<<@>Say out@<>@>@@ |
| 1446 |
Close the door |
| 1447 |
|
| 1448 |
Open the door |
| 1449 |
@@"Say out@@" |
| 1450 |
Close the door |
| 1451 |
|
| 1452 |
Open the door |
| 1453 |
@@(Say out@@) |
| 1454 |
Close the door |
| 1455 |
|
| 1456 |
Open the door |
| 1457 |
@@@<<@>Say out@<>@> |
| 1458 |
Close the door |
| 1459 |
@<End verbatim@> |
| 1460 |
|
| 1461 |
@<P@>Of these, the first was chosen. |
| 1462 |
|
| 1463 |
@<FWDevMan subheading@>@(Parameterized Macro Call Syntax@) |
| 1464 |
@<XX@>@(parameterized macro call@,syntax@) |
| 1465 |
|
| 1466 |
@<P@>FunnelWeb@<_@>V1 provided a messy parameterized macro |
| 1467 |
call syntax: |
| 1468 |
|
| 1469 |
@<P@>@<Begin verbatim@> |
| 1470 |
@@@<<@>Say Out@@@<>@>@@(@@"firstparam@@" @@, |
| 1471 |
@@"Secondparam@@" @@, |
| 1472 |
@@"thirdparam@@" @@) |
| 1473 |
@<End verbatim@> |
| 1474 |
|
| 1475 |
@<P@>This syntax was cleaned up considerably in V3.0 by making |
| 1476 |
the @<TT@>@(@@"@) symbols optional: |
| 1477 |
|
| 1478 |
@<P@>@<Begin verbatim@> |
| 1479 |
@@@<<@>Say Out@@@<>@>@@(firstparam@@,@@- |
| 1480 |
Secondparam@@,thirdparam@@) |
| 1481 |
@<End verbatim@> |
| 1482 |
|
| 1483 |
@<Nav@>@(@<Design_indentation FILE@>@,@<Design FILE@>@,@<Design_structure FILE@>@) |
| 1484 |
|
| 1485 |
@<End FWDevMan page@> |
| 1486 |
@} |
| 1487 |
|
| 1488 |
@!============================================================================== |
| 1489 |
|
| 1490 |
@$@<Design_structure HEADING@>@M@{@<SH@>@(2.5@)Document Structuring@} |
| 1491 |
@$@<Design_structure FILE@>@M@{design_structure.html@} |
| 1492 |
@O@<design_structure.html@>@{@- |
| 1493 |
@<Begin FWDevMan page/H1@>@(@<Design_structure HEADING@>@) |
| 1494 |
|
| 1495 |
@<P@>Knuth's WEB system provided just two levels of headings, |
| 1496 |
and this scheme was used in FunnelWeb@<_@>V1. However, experience |
| 1497 |
showed that there was a need for more levels. Here are some |
| 1498 |
syntaxes that were considered for implementing this: |
| 1499 |
|
| 1500 |
@<P@>@<Begin verbatim@> |
| 1501 |
@@*@@@<<@>Main Program@@@<>@> |
| 1502 |
@@**@@@<<@>Read the Message@@@<>@> |
| 1503 |
@@***@@@<<@>Encrypt the Buffer@@@<>@> |
| 1504 |
|
| 1505 |
@@*@@@<<@>Main Program@@@<>@> |
| 1506 |
@@*@@*@@@<<@>Read the Message@@@<>@> |
| 1507 |
@@*@@*@@*@@@<<@>Encrypt the Buffer@@@<>@> |
| 1508 |
|
| 1509 |
@@s@@@<<@>Main Program@@@<>@> |
| 1510 |
@@ss@@@<<@>Read the Message@@@<>@> |
| 1511 |
@@sss@@@<<@>Encrypt the Buffer@@@<>@> |
| 1512 |
|
| 1513 |
@@s@@@<<@>Main Program@@@<>@> |
| 1514 |
@@s@@s@@@<<@>Read the Message@@@<>@> |
| 1515 |
@@s@@s@@s@@@<<@>Encrypt the Buffer@@@<>@> |
| 1516 |
|
| 1517 |
@@S@@@<<@>Main Program@@@<>@> |
| 1518 |
@@SS@@@<<@>Read the Message@@@<>@> |
| 1519 |
@@SSS@@@<<@>Encrypt the Buffer@@@<>@> |
| 1520 |
|
| 1521 |
@@S@@@<<@>Main Program@@@<>@> |
| 1522 |
@@S@@S@@@<<@>Read the Message@@@<>@> |
| 1523 |
@@S@@S@@S@@@<<@>Encrypt the Buffer@@@<>@> |
| 1524 |
|
| 1525 |
@@1@@@<<@>Main Program@@@<>@> |
| 1526 |
@@2@@@<<@>Read the Message@@@<>@> |
| 1527 |
@@3@@@<<@>Encrypt the Buffer@@@<>@> |
| 1528 |
(using @@A..@@I@@ as macro |
| 1529 |
parameters or overload @@1..@@9) |
| 1530 |
|
| 1531 |
@@*@@1@@@<<@>Main Program@@@<>@> |
| 1532 |
@@*@@2@@@<<@>Read the Message@@@<>@> |
| 1533 |
@@*@@3@@@<<@>Encrypt the Buffer@@@<>@> |
| 1534 |
(using @@A..@@I@@ as macro parameters |
| 1535 |
or overload @@1..@@9) |
| 1536 |
|
| 1537 |
@@A Main Program |
| 1538 |
@@B Read the Message |
| 1539 |
@@C Encrypt the Buffer |
| 1540 |
|
| 1541 |
@@*A Main Program |
| 1542 |
@@*B Read the Message |
| 1543 |
@@*C Encrypt the Buffer |
| 1544 |
|
| 1545 |
The following is the syntax finally chosen. |
| 1546 |
@@A@@@<<@>Main Program@@@<>@> |
| 1547 |
@@B@@@<<@>Read the Message@@@<>@> |
| 1548 |
@@C@@@<<@>Encrypt the Buffer@@@<>@> |
| 1549 |
@<End verbatim@> |
| 1550 |
|
| 1551 |
@<P@>Choosing between these alternatives was not easy. The |
| 1552 |
following thoughts contributed to the decision. |
| 1553 |
|
| 1554 |
@<P@> |
| 1555 |
@<Begin list@> |
| 1556 |
|
| 1557 |
@<Item@>Syntaxes that require visual counting are probably |
| 1558 |
not a good idea. |
| 1559 |
|
| 1560 |
@<Item@>Syntaxes that do not delimit the heading name |
| 1561 |
somehow are likely to cause problems where heading names are |
| 1562 |
omitted. Users will be tempted to start paragraphs after the |
| 1563 |
start of heading symbol, and the result is that the first |
| 1564 |
line of the paragraph will be sucked into the heading. |
| 1565 |
|
| 1566 |
@<Item@>Overloading the @<TT@>@(@@1@), @<LDots@>, |
| 1567 |
@<TT@>@(@@9@) sequences is undesirable. |
| 1568 |
|
| 1569 |
@<End list@> |
| 1570 |
|
| 1571 |
@<P@>For these reasons, the following syntax was chosen: |
| 1572 |
|
| 1573 |
@<P@> |
| 1574 |
@<Begin verbatim@> |
| 1575 |
@@A@@@<<@>Main Program@@@<>@> |
| 1576 |
@@B@@@<<@>Read the Message@@@<>@> |
| 1577 |
@@C@@@<<@>Encrypt the Buffer@@@<>@> |
| 1578 |
@@D@@@<<@>Encrypt the Buffer@@@<>@> |
| 1579 |
@@E@@@<<@>Encrypt the Buffer@@@<>@> |
| 1580 |
@<End verbatim@> |
| 1581 |
|
| 1582 |
@<P@>A maximum of five levels was chosen because it's |
| 1583 |
probably sufficient, and @<TT@>@(@@F@) should be reserved |
| 1584 |
for @<B@>@(F@)ile. |
| 1585 |
|
| 1586 |
@<Nav@>@(@<Design_syntax FILE@>@,@<Design FILE@>@,@<Design_testing FILE@>@) |
| 1587 |
|
| 1588 |
@<End FWDevMan page@> |
| 1589 |
@} |
| 1590 |
|
| 1591 |
@!============================================================================== |
| 1592 |
|
| 1593 |
@$@<Design_testing HEADING@>@M@{@<SH@>@(2.7@)Automated Regression Testing@} |
| 1594 |
@$@<Design_testing FILE@>@M@{design_testing.html@} |
| 1595 |
@O@<design_testing.html@>@{@- |
| 1596 |
@<Begin FWDevMan page/H1@>@(@<Design_testing HEADING@>@) |
| 1597 |
@<XX@>@(regression@,testing@) |
| 1598 |
|
| 1599 |
@<P@>Automated regression testing is extremely important for |
| 1600 |
several reasons: |
| 1601 |
|
| 1602 |
@<P@> @<Begin list/ordered@> |
| 1603 |
|
| 1604 |
@<Item@>It allows portability problems to be pinpointed |
| 1605 |
when the program is moved to a new machine. |
| 1606 |
|
| 1607 |
@<Item@>It provides confidence that changes made to the |
| 1608 |
program have not introduced bugs. |
| 1609 |
|
| 1610 |
@<Item@>It provides ongoing confidence in the integrity |
| 1611 |
of FunnelWeb as a programming tool. |
| 1612 |
|
| 1613 |
@<Item@>It provides a practical confirmation of the semantics |
| 1614 |
of FunnelWeb. |
| 1615 |
|
| 1616 |
@<End list/ordered@> |
| 1617 |
|
| 1618 |
@<P@>The simplest way to set up automated regression testing |
| 1619 |
is to construct a suite of test cases, each of which |
| 1620 |
consists of a test input file and a @<DQ@>@(correct answer@) |
| 1621 |
output file. To test FunnelWeb, the input files are |
| 1622 |
processed and the resulting output files compared with the |
| 1623 |
correct answer output files. |
| 1624 |
|
| 1625 |
@<P@>To automate such a list of tests, some kind of |
| 1626 |
scripting language is required. Unfortunately, at the time |
| 1627 |
of writing FunnelWeb (at least), there was no scripting |
| 1628 |
language that was available on all the platforms to which |
| 1629 |
FunnelWeb had to be ported (Macintosh, IBM-PC, Sun, and |
| 1630 |
OpenVMS). So, after some thought, I decided that the best |
| 1631 |
solution to the problem was to create a command language |
| 1632 |
@<I@>@(within FunnelWeb@) that could be used as a framework |
| 1633 |
for the automation of the testing of the rest of FunnelWeb. |
| 1634 |
|
| 1635 |
@<P@>The resultant scripting language is described in the |
| 1636 |
@<FunnelWeb Reference Manual@>. |
| 1637 |
|
| 1638 |
@<Nav@>@(@<Design_structure FILE@>@,@<Design FILE@>@,@<Design_filenames FILE@>@) |
| 1639 |
|
| 1640 |
@<End FWDevMan page@> |
| 1641 |
@} |
| 1642 |
|
| 1643 |
@!============================================================================== |
| 1644 |
|
| 1645 |
@$@<Design_filenames HEADING@>@M@{@<SH@>@(2.8@)File Name Management@} |
| 1646 |
@$@<Design_filenames FILE@>@M@{design_filenames.html@} |
| 1647 |
@O@<design_filenames.html@>@{@- |
| 1648 |
@<Begin FWDevMan page/H1@>@(@<Design_filenames HEADING@>@) |
| 1649 |
@<XX@>@(file@,names@) |
| 1650 |
|
| 1651 |
@<P@>File names present a host of problems for a program |
| 1652 |
like FunnelWeb. First, FunnelWeb can generate so many |
| 1653 |
different kinds of files that conventions must be adopted to |
| 1654 |
prevent their names from colliding. Second, the |
| 1655 |
constraints on file names, and even the structure of file |
| 1656 |
names themselves varies considerably from machine to |
| 1657 |
machine. These two problems have combined to result in the |
| 1658 |
sophisticated and rather complicated way in which |
| 1659 |
FunnelWeb handles filenames. |
| 1660 |
|
| 1661 |
@<P@>To summarize, the three problems are: |
| 1662 |
|
| 1663 |
@<P@> |
| 1664 |
@<Begin list/ordered@> |
| 1665 |
@<Item@>What filename extensions should be chosen for various kinds of file? |
| 1666 |
@<Item@>What filename inheritance should take place? |
| 1667 |
@<Item@>How should FunnelWeb cope with the variations in filename structure |
| 1668 |
between platforms? |
| 1669 |
@<End list/ordered@> |
| 1670 |
|
| 1671 |
@<P@>These problems are addressed in the following sections. |
| 1672 |
|
| 1673 |
@<FWDevMan subheading@>@(Filename Extensions@) |
| 1674 |
@<XX@>@(filename@,extensions@) |
| 1675 |
|
| 1676 |
@<P@>FunnelWeb is capable of reading and writing a variety |
| 1677 |
of different kinds of files. In particular, FunnelWeb must |
| 1678 |
often operate in an environment where the same information |
| 1679 |
is stored in many forms (@<eg@>prog.fw, prog.c, proc.exe). |
| 1680 |
File extensions are an essential tool in managing this |
| 1681 |
situation. The default filename extensions chosen for |
| 1682 |
FunnelWeb are: |
| 1683 |
|
| 1684 |
@<P@> |
| 1685 |
@<Begin verbatim@> |
| 1686 |
FunnelWeb : .fw |
| 1687 |
Product : None |
| 1688 |
Documentation : .tex or .html |
| 1689 |
Listing : .lis |
| 1690 |
Journal : .jrn |
| 1691 |
@<End verbatim@> |
| 1692 |
|
| 1693 |
@<P@>Lowercase will be used in systems that are case |
| 1694 |
sensitive. |
| 1695 |
|
| 1696 |
@<FWDevMan subheading@>@(Filename Inheritance@) |
| 1697 |
@<XX@>@(filename@,inheritance@) |
| 1698 |
|
| 1699 |
@<P@>Inheritance in filenames refers to how input and output |
| 1700 |
files inherit parts of their name from other filenames and |
| 1701 |
their environment. For example if the command |
| 1702 |
|
| 1703 |
@<P@> |
| 1704 |
@<Begin verbatim@> |
| 1705 |
fw sloth +J +L +T |
| 1706 |
@<End verbatim@> |
| 1707 |
|
| 1708 |
@<P@>were issued, you would expect to see output files |
| 1709 |
@<TT@>@(sloth.jrn@), @<TT@>@(sloth.lis@), and |
| 1710 |
@<TT@>@(sloth.tex@). The output file names have inherited |
| 1711 |
the @<DQP@>@(sloth@) part of the argument. In fact, |
| 1712 |
FunnelWeb implements a comprehensive filename inheritance |
| 1713 |
scheme, which is shown in the following table. Each filename |
| 1714 |
is built up by starting at the top of its column in the |
| 1715 |
table and working down the column, inheriting filename |
| 1716 |
fields (directory, name, extension) that are absent at that |
| 1717 |
point. |
| 1718 |
|
| 1719 |
@<P@> |
| 1720 |
@<Begin center@> |
| 1721 |
@<Begin table/border@> |
| 1722 |
@<Row8@>@(@<_@>@, @<B@>@(Script@) @, @<B@>@(Input@) @, @<B@>@(Include@) @, @<B@>@(Journal@) @, @<B@>@(List@) @, @<B@>@(Document@) @, @<B@>@(Product@) @) |
| 1723 |
@<Row8@>@(1 @, @<_@> @, @<_@> @, @<TT@>@(@@i@) @, @<_@> @, @<_@> @, @<_@> @, @<TT@>@(@@o@) @) |
| 1724 |
@<Row8@>@(2 @, @<TT@>@(+x@) @, @<TT@>@(+f@) @, @<TT@>@(+i@) @, @<TT@>@(+j@) @, @<TT@>@(+l@) @, @<TT@>@(+t@) @, @<TT@>@(+o@) @) |
| 1725 |
@<Row8@>@(3 @, @<DQP@>@(.fws@) @, @<DQP@>@(.fw@) @, @<DQP@>@(.fwi@) @, @<DQP@>@(.jrn@) @, @<DQP@>@(.lis@) @, @<DQP@>@(.tex@) @, @<_@> @) |
| 1726 |
@<Row8@>@(4 @, @<_@> @, @<_@> @, @<TT@>@(+f@) @, @<TT@>@(+f@) @, @<TT@>@(+f@) @, @<TT@>@(+f@) @, @<_@> @) |
| 1727 |
@<Row8@>@(5 @, DefDir @, Defdir @, Defdir @, Defdir @, Defdir @, Defdir @, Defdir @) |
| 1728 |
@<End table@> |
| 1729 |
@<End center@> |
| 1730 |
|
| 1731 |
@<P@>The following notes explain the table. |
| 1732 |
|
| 1733 |
@<P@>@<Begin list/ordered@> |
| 1734 |
|
| 1735 |
@<Item@>Level@<_@>1 has the highest priority because it is a |
| 1736 |
direct specification by the user. |
| 1737 |
|
| 1738 |
@<Item@>Level@<_@>2 comes next because this is also a direct |
| 1739 |
specification from the user on the command line. |
| 1740 |
|
| 1741 |
@<Item@>Level@<_@>3 provides the default file extensions. |
| 1742 |
Product files do not inherit an extension. |
| 1743 |
|
| 1744 |
@<Item@>Level@<_@>5 is built into most operating systems' |
| 1745 |
file specification systems. If you specify file |
| 1746 |
@<DQP@>@(x.y@), it is taken to mean on the default disk in |
| 1747 |
the default directory. |
| 1748 |
|
| 1749 |
@<Item@>Level@<_@>4 looks straightforward, but secretly |
| 1750 |
conceals a difficult design decision. By the time we get |
| 1751 |
down to this level of inheritance, we know for sure that the |
| 1752 |
filename has already picked up a file extension. So all that |
| 1753 |
is left to inherit is the path and the filename proper. |
| 1754 |
Obviously we have to inherit the filename proper (e.g. |
| 1755 |
@<TT@>@(sloth@) in @<TT@>@(sloth.tex@)), but should we |
| 1756 |
inherit the input file path? If we do inherit the input file |
| 1757 |
path, files will be placed in the same directory as the |
| 1758 |
input file. If we don't inherit the input file path, files |
| 1759 |
will be placed in the current directory. The choice made is |
| 1760 |
to send all the logging type files into the same directory |
| 1761 |
as the input file. This means, for example, that |
| 1762 |
@<TT@>@(sloth.lis@) and @<TT@>@(sloth.tex@) will generally |
| 1763 |
land in the same directory as @<TT@>@(sloth.fw@). However, |
| 1764 |
product files are sent to the default directory (if not |
| 1765 |
earlier specified), as this is where the action is. In |
| 1766 |
normal use, the main output of FunnelWeb will be product |
| 1767 |
files, and so the user will expect them to appear in the |
| 1768 |
current directory by default. |
| 1769 |
|
| 1770 |
@<End list/ordered@> |
| 1771 |
|
| 1772 |
@<FWDevMan subheading@>@(Portable Structure of File Names@) |
| 1773 |
@<XX@>@(file@,names@)@<XX@>@(portable@,filenames@) |
| 1774 |
|
| 1775 |
@<P@>Another problem with file names is the variation of |
| 1776 |
their structure between environments. Here are examples of |
| 1777 |
some of the formats that prevail: |
| 1778 |
|
| 1779 |
@<P@> |
| 1780 |
@<Begin verbatim@> |
| 1781 |
UNIX /device/dir1/dir2/name |
| 1782 |
VMS node::device:[dir1.dir2]name.ext;vn |
| 1783 |
MSDOS device:\dir1\dir2\name.ext |
| 1784 |
MAC device:dir1:dir2:name |
| 1785 |
@<End verbatim@> |
| 1786 |
|
| 1787 |
@<P@>The solution to dealing with these different formats is |
| 1788 |
to classify them as non-portable and hide the functions that |
| 1789 |
manipulate them in the machine-specific module of FunnelWeb. |
| 1790 |
Luckily there are not many such functions. |
| 1791 |
|
| 1792 |
@<P@>The main problem is coping with file systems that do |
| 1793 |
not explicitly support file extensions. With so many |
| 1794 |
possible input and output files, FunnelWeb all but needs |
| 1795 |
such extensions. Machines that do not support them pose |
| 1796 |
difficult design decisions. If the user specifies |
| 1797 |
@<DQP@>@(sloth@) as an input file on such a |
| 1798 |
non-extension-supporting system, should FunnelWeb look for |
| 1799 |
@<TT@>@(sloth@) or @<TT@>@(sloth.fw@)? If the user specifies |
| 1800 |
@<TT@>@(walrus@) as a listing file, should it generate |
| 1801 |
@<TT@>@(walrus@) or @<TT@>@(walrus.lis@)? |
| 1802 |
|
| 1803 |
@<P@>Some possible solutions are: |
| 1804 |
|
| 1805 |
@<Begin list/ordered@> |
| 1806 |
|
| 1807 |
@<Item@>Regard the filename @<TT@>@(sloth@) as having an |
| 1808 |
empty extension. It will then default to @<TT@>@(sloth.fw@). |
| 1809 |
|
| 1810 |
@<Item@>Regard the filename @<TT@>@(sloth@) as having a |
| 1811 |
blank but full extension. That is, it cannot be overwritten |
| 1812 |
by inheritance, but it remains blank. |
| 1813 |
|
| 1814 |
@<Item@>Provide an extra syntactic mechanism to allow the |
| 1815 |
user to specify one or other of the two options above. |
| 1816 |
|
| 1817 |
@<End list/ordered@> |
| 1818 |
|
| 1819 |
@<P@>The solution adopted in FunnelWeb is the first option. |
| 1820 |
Use of FunnelWeb results in lots of files lying around |
| 1821 |
(@<eg@>@<TT@>@(sloth.lis@)) and it is hard to see how the |
| 1822 |
user will cope with them all without some kind of naming |
| 1823 |
discipline. If a naming discipline has to be used, it might |
| 1824 |
as well be the FunnelWeb one. |
| 1825 |
|
| 1826 |
@<P@>Thus the names of all files read and written by |
| 1827 |
FunnelWeb will have a file extension of from zero to three |
| 1828 |
letters separated from the rest of the filename by a |
| 1829 |
@<DQP@>@(.@). |
| 1830 |
|
| 1831 |
@<P@>The only exception is product files, whose extension is |
| 1832 |
left undefined. Product files need not contain a |
| 1833 |
@<DQP@>@(.@) and a file extension. |
| 1834 |
|
| 1835 |
@<Nav@>@(@<Design_testing FILE@>@,@<Design FILE@>@,@<Design_numinst FILE@>@) |
| 1836 |
|
| 1837 |
@<End FWDevMan page@> |
| 1838 |
@} |
| 1839 |
|
| 1840 |
@!============================================================================== |
| 1841 |
|
| 1842 |
@$@<Design_numinst HEADING@>@M@{@<SH@>@(2.9@)Constraints On The Number of Instantiations@} |
| 1843 |
@$@<Design_numinst FILE@>@M@{design_numinst.html@} |
| 1844 |
@O@<design_numinst.html@>@{@- |
| 1845 |
@<Begin FWDevMan page/H1@>@(@<Design_numinst HEADING@>@) |
| 1846 |
@<XX@>@(invocations@,number@) |
| 1847 |
|
| 1848 |
@<P@>Experience with FunnelWeb@<_@>V1 demonstrated the need |
| 1849 |
to be able to specify in each macro definitions how many times |
| 1850 |
the macro was expected to be called. FunnelWeb@<_@>V1 |
| 1851 |
generated an error if a macro is not used, but permited |
| 1852 |
macros to be called more than once. This caused problems for |
| 1853 |
macro libraries, many of whose macros were not called. |
| 1854 |
|
| 1855 |
@<P@>By default, FunnelWeb@<_@>V3.0 requires that each macro |
| 1856 |
(except for the ones attached to output files) be called |
| 1857 |
exactly once. However, it also provides syntax that allows |
| 1858 |
you to specify that a macro be allowed to be called |
| 1859 |
zero times or many times. This allows a macro to be |
| 1860 |
specified with the following permissible ranges of numbers |
| 1861 |
of calls depending on the presence or absence of |
| 1862 |
@<DQP@>@(@@Z@) and @<DQP@>@(@@M@): |
| 1863 |
|
| 1864 |
@<P@> |
| 1865 |
@<Begin verbatim@> |
| 1866 |
0..1 @@$@@@<<@>Sloth@@@<>@>@@Z... |
| 1867 |
1 @@$@@@<<@>Sloth@@@<>@>... |
| 1868 |
1..n @@$@@@<<@>Sloth@@@<>@>@@M... |
| 1869 |
0.....n @@$@@@<<@>Sloth@@@<>@>@@Z@@M... |
| 1870 |
@<End verbatim@> |
| 1871 |
|
| 1872 |
@<P@>The initial proposal for this syntax was to allow the |
| 1873 |
user to insert zero, one, or both of @<TT@>@(@@?@) and |
| 1874 |
@<TT@>@(@@M@) just after the @<TT@>@(@@$@) of a macro |
| 1875 |
definition. Here are some other ideas that were considered |
| 1876 |
for the syntax of the calling number constraint. |
| 1877 |
|
| 1878 |
@<P@> |
| 1879 |
@<Begin verbatim@> |
| 1880 |
@@?@@M@@$@@@<<@>Slothy dogs@@@<>@>@@(@@5@@)==@@{@@- |
| 1881 |
This is a short macro. |
| 1882 |
With only a line or two@@} |
| 1883 |
|
| 1884 |
@@$@@@<<@>Slothy dogs@@@<>@>@@?@@M@@(@@5@@)==@@{@@- |
| 1885 |
This is a short macro. |
| 1886 |
With only a line or two@@} |
| 1887 |
|
| 1888 |
@@$@@@<<@>Slothy dogs@@@<>@>@@(@@5@@)@@?@@M==@@{@@- |
| 1889 |
This is a short macro. |
| 1890 |
With only a line or two@@ |
| 1891 |
@<End verbatim@> |
| 1892 |
|
| 1893 |
@<P@>The first form was rejected because it is a good visual |
| 1894 |
rule to start all the macros with @<TT@>@(@@$@). The second |
| 1895 |
form was rejected because it detaches the macro name from |
| 1896 |
the parameter list, thus making it look less like a call, |
| 1897 |
which is a desirable syntactic resonance. The third form is |
| 1898 |
messy, but was adopted with the change that @<TT@>@(@@?@) |
| 1899 |
was changed to @<TT@>@(@@M@). |
| 1900 |
|
| 1901 |
@<P@>After some thought, it was decided that the third |
| 1902 |
syntax was the best, but that the @<DQP@>@(@@?@) sequence be |
| 1903 |
reserved for a possible future conditional facility. It was |
| 1904 |
replaced by @<TT@>@(@@Z@). |
| 1905 |
|
| 1906 |
@<P@>Example of final syntax: |
| 1907 |
|
| 1908 |
@<P@> |
| 1909 |
@<Begin verbatim@> |
| 1910 |
@@$@@@<<@>Slothy dogs@@@<>@>@@(@@5@@)@@Z@@M+=@@{@@- |
| 1911 |
This is a short macro. |
| 1912 |
With only a line or two@@} |
| 1913 |
@<End verbatim@> |
| 1914 |
|
| 1915 |
@<Nav@>@(@<Design_filenames FILE@>@,@<Design FILE@>@,@<Design_docmac FILE@>@) |
| 1916 |
|
| 1917 |
@<End FWDevMan page@> |
| 1918 |
@} |
| 1919 |
|
| 1920 |
@!============================================================================== |
| 1921 |
|
| 1922 |
@$@<Design_docmac HEADING@>@M@{@<SH@>@(2.10@)Document Structure Vs Macro Structure@} |
| 1923 |
@$@<Design_docmac FILE@>@M@{design_docmac.html@} |
| 1924 |
@O@<design_docmac.html@>@{@- |
| 1925 |
@<Begin FWDevMan page/H1@>@(@<Design_docmac HEADING@>@) |
| 1926 |
@<XX@>@(document structure@,macro structure@) |
| 1927 |
@<XX@>@(document@,structure@)@<XX@>@(macro@,structure@) |
| 1928 |
@<XX@>@(hierarchical@,structure@) |
| 1929 |
|
| 1930 |
@<P@>Once the decision was made to adopt five levels of |
| 1931 |
headings as a document structure, the next issue was to |
| 1932 |
decide how this document structure would relate to the macro |
| 1933 |
structure. The issues to be addressed were as follows: |
| 1934 |
|
| 1935 |
@<P@> |
| 1936 |
@<Begin list@> |
| 1937 |
@<Item@>How should the hierarchical structure connect to the macro structure? |
| 1938 |
@<Item@>How can backwards compatibility be achieved? Should it? |
| 1939 |
@<Item@>Should the macros be cross referenced by section or by definition? |
| 1940 |
@<Item@>Should nameless sections inherit macro names as headings? |
| 1941 |
@<Item@>Should TeX macros be used to structure the document? |
| 1942 |
@<End list@> |
| 1943 |
|
| 1944 |
@<P@>This page contains some thoughts on these issues: |
| 1945 |
|
| 1946 |
@<FWDevMan subheading@>@(TeX File Document Basis@) |
| 1947 |
|
| 1948 |
@<P@>One idea is to make the |
| 1949 |
FunnelWeb input file an actual TeX @<TT@>@(.tex@) file |
| 1950 |
which is directly typesettable, and use FunnelWeb to |
| 1951 |
extract code from the TeX file to generate the product files. |
| 1952 |
This approach was rejected because it is too typesetter |
| 1953 |
dependent. Instead, the separate FunnelWeb format was adopted. |
| 1954 |
|
| 1955 |
@<FWDevMan subheading@>@(Hierarchical Heading Numbering@) |
| 1956 |
|
| 1957 |
@<P@>WEB and FunnelWeb@<_@>V1 used two levels of section |
| 1958 |
headings, but numbered them all sequentially. This is |
| 1959 |
unacceptable in a fully hierarchical document which should |
| 1960 |
have hierarchical section numbers such as 3.2.4. So |
| 1961 |
FunnelWeb@<_@>V3 uses hierarchical numbering for its |
| 1962 |
headings in the documentation file. |
| 1963 |
|
| 1964 |
While hierarchical numbering@<XX@>@(section@,numbering@) is |
| 1965 |
good for headings, it is messy and confusing when applied to |
| 1966 |
macro names. In FunnelWeb@<_@>V1's typeset output, each |
| 1967 |
macro call has appended in square brackets the number of the |
| 1968 |
section in which the macro is defined. However, hierarchical |
| 1969 |
numbering would be somewhat messy. For example, in the |
| 1970 |
typeset documentation, a macro call might look like. |
| 1971 |
|
| 1972 |
@<P@>@<Begin verbatim@> |
| 1973 |
Write out the output[6.7.4.3] |
| 1974 |
@<End verbatim@> |
| 1975 |
|
| 1976 |
@<P@>Similarly, cross reference lists would be messy: |
| 1977 |
|
| 1978 |
@<P@> |
| 1979 |
@<Begin verbatim@> |
| 1980 |
This macro is used in 3.4.5, 1.2, 7.8.9, 7.4, 2.2.1.1. |
| 1981 |
@<End verbatim@> |
| 1982 |
|
| 1983 |
@<P@>These problems were solved by numbering headings |
| 1984 |
hierarchically and numbering the macros sequentially |
| 1985 |
and independently. |
| 1986 |
|
| 1987 |
@<FWDevMan subheading@>@(Input Format Matters Most@) |
| 1988 |
|
| 1989 |
@<P@>In terms of legacy commitment, the critical issue is |
| 1990 |
not how FunnelWeb formats programs for printing, but how the |
| 1991 |
FunnelWeb @<TT@>@(.fw@) input file should be formatted. The |
| 1992 |
typeset output can always be changed simply by fiddling with |
| 1993 |
FunnelWeb's Weave module. However, as soon as the input |
| 1994 |
syntax is defined, it will be used in dozens or hundreds of |
| 1995 |
documents and it will be very difficult indeed to change it. |
| 1996 |
Therefore, the important thing is to provide as sensible and |
| 1997 |
expressive a @<TT@>@(.fw@) format as possible. |
| 1998 |
|
| 1999 |
@<P@>Thus, the issue of how to number headings and macros |
| 2000 |
in the typeset documentation is not a serious architectural |
| 2001 |
issue. |
| 2002 |
|
| 2003 |
@<FWDevMan subheading@>@(Naming Sections@) |
| 2004 |
|
| 2005 |
@<P@>How should sections be named? In many cases (especially |
| 2006 |
in the case of high-level sections) the writer will provide |
| 2007 |
an explicit name for a section. In other cases, provision of |
| 2008 |
such a name will merely duplicate the name of the macro |
| 2009 |
contained within the section. It therefore makes sense to |
| 2010 |
allow the user to omit the name from a section, allowing Weave |
| 2011 |
to name the section after the first macro definition in the |
| 2012 |
section. If a macro is unnamed and there is no macro in the |
| 2013 |
section, an error can be generated. |
| 2014 |
|
| 2015 |
@<FWDevMan subheading@>@(Summary@) |
| 2016 |
|
| 2017 |
@<P@>All these thoughts lead to the following scheme: |
| 2018 |
|
| 2019 |
@<P@> |
| 2020 |
@<Begin list@> |
| 2021 |
@<Item@>Documents will be hierarchically structured using @<TT@>@(@@A@), @<TT@>@(@@B@) etc. |
| 2022 |
@<Item@>Each section can be given a name @<TT@>@(@@@<<@>@<LDots@>@<>@>@). |
| 2023 |
@<Item@>Sections that do not have names inherit the name of their first macro. |
| 2024 |
@<Item@>If a section does not have a name or a macro, it is erroneous. |
| 2025 |
@<Item@>Sections will be numbered hierarchically either by FunnelWeb or by TeX. |
| 2026 |
@<Item@>Macro body parts will be numbered sequentially by FunnelWeb and cross |
| 2027 |
referenced by these numbers. |
| 2028 |
@<End list@> |
| 2029 |
|
| 2030 |
@<P@>All this results in a system which: |
| 2031 |
|
| 2032 |
@<P@> |
| 2033 |
@<Begin list@> |
| 2034 |
|
| 2035 |
@<Item@>Provides a hierarchical document structuring capability. |
| 2036 |
@<Item@>Is typesetter independent. |
| 2037 |
@<Item@>Does not require duplication between heading and macro names. |
| 2038 |
@<Item@>Separates the heading and macro systems so that Weave can be configured |
| 2039 |
at a later date to cross reference in different ways without requiring |
| 2040 |
input files to be reworked. |
| 2041 |
@<End list@> |
| 2042 |
|
| 2043 |
@<Nav@>@(@<Design_numinst FILE@>@,@<Design FILE@>@,@<Design_diagnostics FILE@>@) |
| 2044 |
|
| 2045 |
@<End FWDevMan page@> |
| 2046 |
@} |
| 2047 |
|
| 2048 |
@!============================================================================== |
| 2049 |
|
| 2050 |
@$@<Design_diagnostics HEADING@>@M@{@<SH@>@(2.11@)Diagnostic Messages@} |
| 2051 |
@$@<Design_diagnostics FILE@>@M@{design_diagnostics.html@} |
| 2052 |
@O@<design_diagnostics.html@>@{@- |
| 2053 |
@<Begin FWDevMan page/H1@>@(@<Design_diagnostics HEADING@>@) |
| 2054 |
@<XX@>@(diagnostic@,messages@) |
| 2055 |
|
| 2056 |
@<P@>In FunnelWeb, all error messages commence with an |
| 2057 |
indicator indicating the severity of the error message. Here |
| 2058 |
are some of the formats that were considered: |
| 2059 |
|
| 2060 |
@<P@> |
| 2061 |
@<Begin verbatim@> |
| 2062 |
W--Error creating sloth. |
| 2063 |
E--Error opening output file. |
| 2064 |
S--I'm a teapot. |
| 2065 |
F--Can't open output file. |
| 2066 |
|
| 2067 |
W-Error creating sloth. |
| 2068 |
E-Error opening output file. |
| 2069 |
S-I'm a teapot. |
| 2070 |
F-Can't open output file. |
| 2071 |
|
| 2072 |
W:Error creating sloth. |
| 2073 |
E:Error opening output file. |
| 2074 |
S:I'm a teapot. |
| 2075 |
F:Can't open output file. |
| 2076 |
|
| 2077 |
W: Error creating sloth. -- Format chosen. |
| 2078 |
E: Error opening output file. |
| 2079 |
S: I'm a teapot. |
| 2080 |
F: Can't open output file. |
| 2081 |
|
| 2082 |
War-Error creating sloth. |
| 2083 |
Err-Error opening output file. |
| 2084 |
Sev-I'm a teapot. |
| 2085 |
Fat-Can't open output file. |
| 2086 |
|
| 2087 |
W-Old fashioned feature. |
| 2088 |
|
| 2089 |
W-Old fashioned feature. |
| 2090 |
|
| 2091 |
W--Old fashioned feature. |
| 2092 |
|
| 2093 |
W: Old fashioned feature. |
| 2094 |
|
| 2095 |
W:Old fashioned feature. |
| 2096 |
@<End verbatim@> |
| 2097 |
|
| 2098 |
@<Nav/last@>@(@<Design_docmac FILE@>@,@<Design FILE@>@,@<Design FILE@>@) |
| 2099 |
|
| 2100 |
@<End FWDevMan page@> |
| 2101 |
@} |
| 2102 |
|
| 2103 |
@!****************************************************************************** |
| 2104 |
|
| 2105 |
@$@<Implement HEADING@>@M@{@<SH@>@(3@)FunnelWeb Implementation Notes@} |
| 2106 |
@$@<Implement HEADING/short@>@M@{@<SH@>@(3@)Implement@} |
| 2107 |
@$@<Implement FILE@>@M@{implement.html@} |
| 2108 |
@O@<implement.html@>@{@- |
| 2109 |
@<Begin FWDevMan page/H1@>@(@<Implement HEADING@>@) |
| 2110 |
|
| 2111 |
@<P@>This chapter contains some notes on the FunnelWeb C code. |
| 2112 |
|
| 2113 |
@<Implement index@> |
| 2114 |
|
| 2115 |
@<Nav@>@(@<Design FILE@>@,@<Index FILE@>@,@<Modify FILE@>@) |
| 2116 |
|
| 2117 |
@<End FWDevMan page@> |
| 2118 |
@} |
| 2119 |
|
| 2120 |
@$@<Implement index@>@M@{ |
| 2121 |
@<Begin size3@> |
| 2122 |
@<Begin indent/narrow@> |
| 2123 |
@<Link@>@(@<Implement_history FILE@>@,@<Implement_history HEADING@>@)@<BR@> |
| 2124 |
@<Link@>@(@<Implement_self FILE@>@,@<Implement_self HEADING@>@)@<BR@> |
| 2125 |
@<Link@>@(@<Implement_style FILE@>@,@<Implement_style HEADING@>@)@<BR@> |
| 2126 |
@<Link@>@(@<Implement_memory FILE@>@,@<Implement_memory HEADING@>@)@<BR@> |
| 2127 |
@<Link@>@(@<Implement_indentation FILE@>@,@<Implement_indentation HEADING@>@)@<BR@> |
| 2128 |
@<End indent/narrow@> |
| 2129 |
@<End size3@> |
| 2130 |
@} |
| 2131 |
|
| 2132 |
@!============================================================================== |
| 2133 |
|
| 2134 |
@$@<Implement_history HEADING@>@M@{@<SH@>@(3.1@)History of FunnelWeb Implementations@} |
| 2135 |
@$@<Implement_history FILE@>@M@{implement_history.html@} |
| 2136 |
@O@<implement_history.html@>@{@- |
| 2137 |
@<Begin FWDevMan page/H1@>@(@<Implement_history HEADING@>@) |
| 2138 |
@<XX@>@(FunnelWeb@,history@) |
| 2139 |
@<X@>@(FunnelWeb version 1@) |
| 2140 |
@<X@>@(FunnelWeb version 2@) |
| 2141 |
@<X@>@(FunnelWeb version 3@) |
| 2142 |
|
| 2143 |
@<FWDevMan subheading@>@(FunnelWeb V1 (1986)@) |
| 2144 |
|
| 2145 |
@<P@>The first implementation of FunnelWeb was written in |
| 2146 |
Ada@<X@>@(Ada@)@<Paper@>@(USDOD83@) in December 1986. I used |
| 2147 |
FunnelWeb as a program to write to help me learn Ada. |
| 2148 |
FunnelWeb V1 took about one month to write and was fairly |
| 2149 |
VMS dependent. |
| 2150 |
|
| 2151 |
@<P@>I used FunnelWeb@<_@>V1 to write all the Ada software |
| 2152 |
for my Ph.D. project and it was very successful in this |
| 2153 |
role, helping me to document some complicated code. However |
| 2154 |
when I finished the Ph.D work in July@<_@>1989, I lost |
| 2155 |
access to the VAX and hence to FunnelWeb. During my |
| 2156 |
candidature, at least twenty thousand lines of code were |
| 2157 |
written using FunnelWeb, but hardly anyone else used |
| 2158 |
FunnelWeb. After losing access to Ada and the Vax (and hence |
| 2159 |
to FunnelWeb), I was forced back to programming the |
| 2160 |
non-literate way. I recognised a need to translate FunnelWeb |
| 2161 |
into the more portable C programming language, but didn't |
| 2162 |
have the time or energy to create one. |
| 2163 |
|
| 2164 |
@<FWDevMan subheading@>@(FunnelWeb V2 (1991)@) |
| 2165 |
|
| 2166 |
@<P@>About this time (late 1989), David |
| 2167 |
Hulse,@<XN@>@(David@,Hulse@) at the time a student in |
| 2168 |
Computer Science at the University of |
| 2169 |
Adelaide,@<XX@>@(University@,Adelaide@) volunteered to |
| 2170 |
translate the 4000 line Ada version of FunnelWeb into@<_@>C. |
| 2171 |
To my knowledge this translation process took about three |
| 2172 |
weeks (in December 1989). The result was called |
| 2173 |
FunnelWeb@<_@>V2 and was formally signed into the public |
| 2174 |
domain on 5@<_@>May 1992. However, it was never publicly |
| 2175 |
released. |
| 2176 |
|
| 2177 |
@<P@>I would like to take this opportunity to thank David |
| 2178 |
Hulse for translating FunnelWeb from Ada to@<_@>C, as this |
| 2179 |
effort was the basis of later work on FunnelWeb. |
| 2180 |
|
| 2181 |
@<FWDevMan subheading@>@(FunnelWeb V3.0 (1992)@) |
| 2182 |
|
| 2183 |
@<P@>Lack of portability of the translated C@<_@>code, |
| 2184 |
combined with the need for a rather solid design review, |
| 2185 |
combined with the need to strengthen the program to bring it |
| 2186 |
up to production standard, resulted in my performing a |
| 2187 |
complete reworking of the code in late 1991 and early 1992. |
| 2188 |
The C code was entirely, but incrementally, replaced or |
| 2189 |
reformatted. The code was also strengthened and new features |
| 2190 |
were added. This process took about two months (November and |
| 2191 |
December 1991). A further two months (approx) were spent |
| 2192 |
writing documentation, constructing a regression test suite, |
| 2193 |
porting the program to different machines, and sorting out |
| 2194 |
the legal issues involved in its release. FunnelWeb V3.0 was |
| 2195 |
publicly released on the Internet under a GNU licence |
| 2196 |
on 6@<_@>June@<_@>1992. |
| 2197 |
|
| 2198 |
@<P@>Version 3.0 proved very solid, but had the following |
| 2199 |
bugs: |
| 2200 |
|
| 2201 |
@<Begin list@> |
| 2202 |
|
| 2203 |
@<Item@>Bombs with an assertion error if the input file |
| 2204 |
is at least 10000 lines long. |
| 2205 |
|
| 2206 |
@<Blank line@> |
| 2207 |
|
| 2208 |
@<Item@>Bombs with an assertion error if it's generating |
| 2209 |
a listing file and an error occurs on a line longer than 200 |
| 2210 |
characters. |
| 2211 |
|
| 2212 |
@<P@> |
| 2213 |
@<Begin verbatim/size2@> |
| 2214 |
lister.dup: count>=DUPMAX |
| 2215 |
An assertion has failed! See the line above. |
| 2216 |
Press return to abort FunnelWeb> |
| 2217 |
@<End verbatim/size2@> |
| 2218 |
|
| 2219 |
@<Blank line@> |
| 2220 |
|
| 2221 |
@<Item@>The FunnelWeb shell @<TT@>@(diff@) command bombs |
| 2222 |
with an assertion error if it can't open the first file: |
| 2223 |
|
| 2224 |
@<P@> |
| 2225 |
@<Begin verbatim/size2@> |
| 2226 |
FunnelWeb>diff deleteme.list vctest01.ans x.x |
| 2227 |
E: DIFF: Error mapping "deleteme.list". |
| 2228 |
Error fopen()ing input file |
| 2229 |
(to determine its length). |
| 2230 |
do_diff: Image comparison succeeded, |
| 2231 |
but text comparison failed. |
| 2232 |
An assertion has failed! See the line above. |
| 2233 |
Press return to abort FunnelWeb> |
| 2234 |
@<End verbatim/size2@> |
| 2235 |
|
| 2236 |
@<Blank line@> |
| 2237 |
|
| 2238 |
@<Item@>Under VMS FunnelWeb overwrites previous output files |
| 2239 |
with the newly generated output files, rather than generating a |
| 2240 |
new version. |
| 2241 |
|
| 2242 |
@<Blank line@> |
| 2243 |
|
| 2244 |
@<End list@> |
| 2245 |
|
| 2246 |
@<FWDevMan subheading@>@(FunnelWeb V3.1 (1993)@) |
| 2247 |
|
| 2248 |
@<P@>During 1993, the following changes were made, yielding V3.1: |
| 2249 |
|
| 2250 |
@<Begin verbatim@> |
| 2251 |
13-Oct-1993: |
| 2252 |
lister.c: Increased MAXLINES to one million to |
| 2253 |
avoid mes_wri case default bomb. |
| 2254 |
Modified bomb message in mes_wri. |
| 2255 |
memory.* Modified package to count blocks |
| 2256 |
of various sizes. |
| 2257 |
command.c Modified it to call memory to |
| 2258 |
write out mem report. |
| 2259 |
13-Oct-1993 |
| 2260 |
parser.c Change ty_name to ty_pname |
| 2261 |
to save memory. |
| 2262 |
data.h ? |
| 2263 |
weave.c ? |
| 2264 |
@<End verbatim@> |
| 2265 |
|
| 2266 |
@<P@>These changes essentially fixed the "10,000 lines" bug |
| 2267 |
and performed some memory tuning. |
| 2268 |
|
| 2269 |
@<FWDevMan subheading@>@(FunnelWeb 3.05AC@) |
| 2270 |
|
| 2271 |
@<P@>@<Tony Coates@> created a |
| 2272 |
<A HREF="http://www.ems.uq.edu.au:7007/People/Tony/funnelweb.html">FunnelWeb variant</A> |
| 2273 |
called FunnelWeb V3.05AC that fixes some bugs, and provides some extra |
| 2274 |
useful features (including HTML output). This version has been officially |
| 2275 |
classified as an unofficial version. |
| 2276 |
|
| 2277 |
@<FWDevMan subheading@>@(FunnelWeb V3.2 (1999)@) |
| 2278 |
|
| 2279 |
@<P@>In April 1999 I decided to perform extensive housecleaning on |
| 2280 |
FunnelWeb so as to make it more presentable and useable. This process |
| 2281 |
involved: |
| 2282 |
|
| 2283 |
@<P@> |
| 2284 |
@<Begin list@> |
| 2285 |
@<Item@>Eliminating all known bugs. |
| 2286 |
@<Item@>Converting all FunnelWeb documentation to webs. |
| 2287 |
@<Item@>Porting FunnelWeb to a wider range of platforms. |
| 2288 |
@<Item@>Providing FunnelWeb executables online. |
| 2289 |
@<Item@>Reworking the main FunnelWeb web. |
| 2290 |
@<End list@> |
| 2291 |
|
| 2292 |
@<P@>The result was FunnelWeb V3.2. |
| 2293 |
|
| 2294 |
@<Nav/first@>@(@<Implement FILE@>@,@<Implement FILE@>@,@<Implement_self FILE@>@) |
| 2295 |
|
| 2296 |
@<End FWDevMan page@> |
| 2297 |
@} |
| 2298 |
|
| 2299 |
@!============================================================================== |
| 2300 |
|
| 2301 |
@$@<Implement_self HEADING@>@M@{@<SH@>@(3.2@)Why FunnelWeb Wasn't Used to Write Itself@} |
| 2302 |
@$@<Implement_self FILE@>@M@{implement_self.html@} |
| 2303 |
@O@<implement_self.html@>@{@- |
| 2304 |
@<Begin FWDevMan page/H1@>@(@<Implement_self HEADING@>@) |
| 2305 |
@<XX@>@(FunnelWeb@,writing itself@) |
| 2306 |
|
| 2307 |
@<P@>After Knuth created the WEB literate preprocessing |
| 2308 |
system, he re-wrote it using WEB and distributed the source |
| 2309 |
code in WEB source form. To allow the WEB source code to be |
| 2310 |
tangled by users not yet having a copy of WEB, he also |
| 2311 |
included the tangled Pascal code for the Tangler. |
| 2312 |
|
| 2313 |
@<P@>While this approach is heroic and serves to convey a |
| 2314 |
commitment and a confidence in literate programming, it |
| 2315 |
seemed to me that writing FunnelWeb in FunnelWeb would |
| 2316 |
simply be asking for trouble.@<XX@>@(trouble@,asking for@) |
| 2317 |
For a start, it would be very hard to modify any feature of |
| 2318 |
FunnelWeb that had been used to write FunnelWeb. Also, the |
| 2319 |
thought of what would happen if the working executable |
| 2320 |
became inoperative for some reason does not bear thinking |
| 2321 |
upon. |
| 2322 |
|
| 2323 |
@<P@>One million billion computer programs were written in |
| 2324 |
the non-literate style before FunnelWeb was created. Why not |
| 2325 |
one more? |
| 2326 |
|
| 2327 |
@<Nav@>@(@<Implement_history FILE@>@,@<Implement FILE@>@,@<Implement_style FILE@>@) |
| 2328 |
|
| 2329 |
@<End FWDevMan page@> |
| 2330 |
@} |
| 2331 |
|
| 2332 |
@!============================================================================== |
| 2333 |
|
| 2334 |
@$@<Implement_style HEADING@>@M@{@<SH@>@(3.3@)Coding Style@} |
| 2335 |
@$@<Implement_style FILE@>@M@{implement_style.html@} |
| 2336 |
@O@<implement_style.html@>@{@- |
| 2337 |
@<Begin FWDevMan page/H1@>@(@<Implement_style HEADING@>@) |
| 2338 |
@<XX@>@(coding@,style@) |
| 2339 |
|
| 2340 |
@<P@>Although FunnelWeb wasn't coded under any formal C |
| 2341 |
coding standard, it was coded in accordance with a fairly |
| 2342 |
strict personal style of C which developed during the |
| 2343 |
development of FunnelWeb. This section aims to describe some |
| 2344 |
of the more important elements of the coding style. |
| 2345 |
|
| 2346 |
@<Boldthing@>@(Portability:@) This@<X@>@(portability@) was a major |
| 2347 |
goal of the FunnelWeb implementation. Two excellent books |
| 2348 |
guided this move to portability. They were |
| 2349 |
@<Paper@>@(Rabinowitz90@) (which deals with C code itself) |
| 2350 |
and @<Paper@>@(Horton90@) (which deals with the portability |
| 2351 |
of various library calls). Other works such as |
| 2352 |
@<Paper@>@(Kernighan88@) and @<Paper@>@(ANSI@) were also |
| 2353 |
helpful. |
| 2354 |
|
| 2355 |
@<Boldthing@>@(Identifiers:@) |
| 2356 |
@<Paper@>@(Rabinowitz90@)@<XX@>@(identifier@,length@) |
| 2357 |
specifies that for wide portability, identifiers of block |
| 2358 |
and file scope should be unique to eight characters, and |
| 2359 |
identifiers of program scope should be unique to six |
| 2360 |
characters. I have gone further in FunnelWeb and actually |
| 2361 |
made these restrictions actual limits on identifier length. |
| 2362 |
|
| 2363 |
@<P@>Because names must be so short, a system of |
| 2364 |
abbreviations was developed to organize the identifiers used |
| 2365 |
within FunnelWeb. Each abbreviation consists of a letter |
| 2366 |
pair. Here are most of the abbreviations |
| 2367 |
used:@<XX@>@(identifier@,abbreviations@) |
| 2368 |
|
| 2369 |
@<P@> |
| 2370 |
@<Begin verbatim@> |
| 2371 |
bp - Body Part. |
| 2372 |
cm - Compare. Used to prefix comparison |
| 2373 |
routines that return [-1,0,1]. |
| 2374 |
dc - Document component. |
| 2375 |
dm - Dump package. |
| 2376 |
el - Element. |
| 2377 |
eq - Equal. Used to prefix comparison |
| 2378 |
routines that return a boolean. |
| 2379 |
ex - Expression. |
| 2380 |
f - Global files. |
| 2381 |
ll - List of lists. |
| 2382 |
ln - Line record. |
| 2383 |
ls - List Package. |
| 2384 |
lr - Lister package. |
| 2385 |
ma - Macro. |
| 2386 |
mc - Macro Call. |
| 2387 |
mn - Macro Name. |
| 2388 |
op - Options package. |
| 2389 |
pr - Parser. |
| 2390 |
ps - Position record. |
| 2391 |
sc - Scrap record. |
| 2392 |
sn - Section. |
| 2393 |
tb - Table package. |
| 2394 |
ty - Typesetter directive. |
| 2395 |
wf - Write file package. |
| 2396 |
wl - Write with EOL (misc.c). |
| 2397 |
wr - Write (misc.c). |
| 2398 |
@<End verbatim@> |
| 2399 |
|
| 2400 |
@<Boldthing@>@(Pointers:@) Variables or types denoting |
| 2401 |
pointers@<XX@>@(pointers@,naming@) start with @<DQP@>@(p_@). |
| 2402 |
|
| 2403 |
@<Boldthing@>@(Types:@) Names denoting types end in |
| 2404 |
@<DQP@>@(_t@). Thus, a type for a pointer to a table would |
| 2405 |
be named @<TT@>@(p_tb_t@).@<XX@>@(types@,naming@) |
| 2406 |
|
| 2407 |
@<Boldthing@>@(File names:@) All FunnelWeb source |
| 2408 |
files@<XX@>@(filenames@,length@) have file |
| 2409 |
names that are from one to eight characters long and file |
| 2410 |
extensions that are from one to three characters long. This |
| 2411 |
ensures that the FunnelWeb source code can be portably moved |
| 2412 |
to all kinds of machines, including MSDOS!@<X@>@(MSDOS@) |
| 2413 |
|
| 2414 |
@<Nav@>@(@<Implement_self FILE@>@,@<Implement FILE@>@,@<Implement_memory FILE@>@) |
| 2415 |
|
| 2416 |
@<End FWDevMan page@> |
| 2417 |
@} |
| 2418 |
|
| 2419 |
@!============================================================================== |
| 2420 |
|
| 2421 |
@$@<Implement_memory HEADING@>@M@{@<SH@>@(3.4@)Use of Memory@} |
| 2422 |
@$@<Implement_memory FILE@>@M@{implement_memory.html@} |
| 2423 |
@O@<implement_memory.html@>@{@- |
| 2424 |
@<Begin FWDevMan page/H1@>@(@<Implement_memory HEADING@>@) |
| 2425 |
@<XX@>@(use of@,memory@) |
| 2426 |
|
| 2427 |
@<P@>FunnelWeb is not a memory-stressed program. However, |
| 2428 |
during its development, problems with the management of |
| 2429 |
memory seemed to crop up again and again. This section |
| 2430 |
documents some of these problems and the solutions |
| 2431 |
that were adopted. |
| 2432 |
|
| 2433 |
@<P@>There are three places where memory can be obtained: |
| 2434 |
the heap, the stack, and from static variables. The |
| 2435 |
following three sections deal with each of these areas. |
| 2436 |
|
| 2437 |
@<FWDevMan subheading@>@(The Heap@) |
| 2438 |
@<XX@>@(heap@,memory@) |
| 2439 |
|
| 2440 |
@<P@>One of the great frustrations of being a user is to |
| 2441 |
find that a computer program is complaining about lack of |
| 2442 |
memory when one knows full well that one has allocated at |
| 2443 |
least ten times as much memory to the program as it would |
| 2444 |
ever need to do its job. The reason for such error messages |
| 2445 |
usually has to do with the programmer setting a fixed |
| 2446 |
@<DQ@>@(reasonable@) limit to a particular data structure |
| 2447 |
and then locking it up into an array whose bound is |
| 2448 |
specified by a constant. This malody is particularly common in |
| 2449 |
old Pascal programs. While the use of arrays can |
| 2450 |
increase the speed of a program, it also means that the user |
| 2451 |
cannot increase the capacity of the program without |
| 2452 |
obtaining the source code and recompiling it. |
| 2453 |
|
| 2454 |
@<P@>The alternative is to use the heap for all data |
| 2455 |
structures that can grow in proportion to the size of the |
| 2456 |
user's input. This rule has been followed rigorously in |
| 2457 |
FunnelWeb. This means that as memory spaces increase, users |
| 2458 |
will be able to hand their version of FunnelWeb more memory |
| 2459 |
without having to recompile it. |
| 2460 |
|
| 2461 |
@<P@><HR WIDTH=30%> |
| 2462 |
|
| 2463 |
@<P@>Some problems arose early on the |
| 2464 |
Macintosh@<X@>@(Macintosh@) in the use of the heap. |
| 2465 |
For some obscure reason, many of the heap application |
| 2466 |
@<TT@>@(malloc@) calls were failing. Whatever |
| 2467 |
it was, it went away when I replaced direct calls to |
| 2468 |
@<TT@>@(malloc@)@<X@>@(malloc@) with calls to a mini package |
| 2469 |
I wrote (called @<TT@>@(memory@)) that allocated large |
| 2470 |
chunks of memory and then doled out small pieces as required |
| 2471 |
by the rest of the program.@<XX@>@(memory@,package@) |
| 2472 |
|
| 2473 |
@<P@>Having a package to manage all the memory allocation |
| 2474 |
had two other benefits. |
| 2475 |
|
| 2476 |
@<P@>First, only one check was required in the entire |
| 2477 |
program to see if memory had run out (in the memory |
| 2478 |
package), and if that failed, the program could be brought |
| 2479 |
to a screaming halt. This organization was far preferable to |
| 2480 |
having each piece of code that needed to allocate memory |
| 2481 |
having to check to see if @<TT@>@(malloc@) had failed. |
| 2482 |
|
| 2483 |
@<P@>Second, the decision to construct a mini-shell within |
| 2484 |
FunnelWeb to support regression testing meant that FunnelWeb |
| 2485 |
proper (the FunnelWeb @<TT@>@(fw@) shell command) |
| 2486 |
could be run many times in any given invocation of |
| 2487 |
FunnelWeb. As a consequence it was necessary to make sure |
| 2488 |
that there was no memory leakage@<XX@>@(memory@,leakage@) |
| 2489 |
between invocations of FunnelWeb proper. This was |
| 2490 |
accomplished by reworking the memory package to operate a |
| 2491 |
watermark system. The user of the package, when requesting |
| 2492 |
memory, could request @<DQ@>@(temporary@) or |
| 2493 |
@<DQ@>@(permanent@). If permanent, the memory package forgot |
| 2494 |
that it had allocated the memory. If temporary, the memory |
| 2495 |
package places the allocated block on a list. There was then |
| 2496 |
a function in the memory package that could be called to |
| 2497 |
deallocate all the temporary memory. All this meant that |
| 2498 |
so long as all |
| 2499 |
requests for memory within FunnelWeb proper were for |
| 2500 |
temporary memory, and that memory was freed at the end of |
| 2501 |
every run, one could be sure that there was no memory |
| 2502 |
leakage. |
| 2503 |
|
| 2504 |
@<FWDevMan subheading@>@(The Stack@) |
| 2505 |
@<XX@>@(stack@,memory@)@<XX@>@(stack@,size@) |
| 2506 |
|
| 2507 |
@<P@>For a while during the development of FunnelWeb a |
| 2508 |
particularly nasty bug proved extremely hard to find. The |
| 2509 |
symptom was that FunnelWeb would crash, sometimes at random, |
| 2510 |
but more often upon entering a particular function. In the |
| 2511 |
end, about a day of specific debugging was required before |
| 2512 |
the problem was tracked down to a stack problem. It turned |
| 2513 |
out that somehow (either the fault of the Macintosh or the |
| 2514 |
THINK@<_@>C language system), the compiler was allocating |
| 2515 |
just 6K for stack space!!!!!!! |
| 2516 |
|
| 2517 |
@<P@>This experience led me immediately to go through the |
| 2518 |
entire program and eliminate (or remove to the heap) any |
| 2519 |
automatic variable declarations that used more than one |
| 2520 |
hundred or so bytes. |
| 2521 |
|
| 2522 |
@<P@>The lesson is clearly that C@<_@>programs that use more |
| 2523 |
than a few thousand bytes of stack space are risking their |
| 2524 |
portability. All large data structures should be placed in |
| 2525 |
the heap. |
| 2526 |
|
| 2527 |
@<FWDevMan subheading@>@(Static Variables@) |
| 2528 |
@<XX@>@(memory@,static@)@<XX@>@(static@,variables@) |
| 2529 |
|
| 2530 |
@<P@>Static variables also proved a problem on the |
| 2531 |
Macintosh. It turned out that the Macintosh@<X@>@(Macintosh@) |
| 2532 |
THINK@<_@>C compiler@<XX@>@(ThinkC@,compiler@) did not allow |
| 2533 |
more than 32K of statics @<I@>@(in the entire program@). For |
| 2534 |
a while this restriction was a serious threat to the program |
| 2535 |
as it was discovered that constant strings were included in |
| 2536 |
this total! However, some searching revealed a compiler |
| 2537 |
option that removed the strings from the static category. |
| 2538 |
|
| 2539 |
@<P@>Nevertheless, the 32K limit is rather severe. Again, it |
| 2540 |
seems that for portability reasons, C@<_@>programs that use a |
| 2541 |
lot of static variables are risking their portability. As a |
| 2542 |
result, the FunnelWeb code avoids static variables where |
| 2543 |
possible in favour of the heap. |
| 2544 |
|
| 2545 |
@<Nav@>@(@<Implement_style FILE@>@,@<Implement FILE@>@,@<Implement_indentation FILE@>@) |
| 2546 |
|
| 2547 |
@<End FWDevMan page@> |
| 2548 |
@} |
| 2549 |
|
| 2550 |
@!============================================================================== |
| 2551 |
|
| 2552 |
@$@<Implement_indentation HEADING@>@M@{@<SH@>@(3.5@)Implementing Text Indentation@} |
| 2553 |
@$@<Implement_indentation FILE@>@M@{implement_indentation.html@} |
| 2554 |
@O@<implement_indentation.html@>@{@- |
| 2555 |
@<Begin FWDevMan page/wide/H1@>@(@<Implement_indentation HEADING@>@) |
| 2556 |
@<XX@>@(text@,indentation@) |
| 2557 |
|
| 2558 |
@<P@>At one point during the development of FunnelWeb, text |
| 2559 |
indentation was fully implemented. However, it was |
| 2560 |
subsequently removed because it was considered a dangerous |
| 2561 |
feature. This section records the way in which text |
| 2562 |
indentation was implemented so that if the feature ever has |
| 2563 |
to be put back, this technique can be used again. |
| 2564 |
|
| 2565 |
@<P@>1. Create a new field in the @<TT@>@(sc_t@) record call |
| 2566 |
@<TT@>@(sc_postn@). |
| 2567 |
|
| 2568 |
@<P@> |
| 2569 |
@<Begin verbatim@> |
| 2570 |
char *sc_postn; /* Pointer in the range [sc_first,sc_last+1]. */ |
| 2571 |
/* It is the minimum possible value of sc_postn for */ |
| 2572 |
/* which EOL does not appear in *sc_postn..*sc_last. */ |
| 2573 |
/* i.e. Points to the byte following the first EOL in */ |
| 2574 |
/* the scrap or sc_first if EOL does not appear. */ |
| 2575 |
@<End verbatim@> |
| 2576 |
|
| 2577 |
@<P@>2. Modify the scanner so that it generates this field. |
| 2578 |
Sendtext should be modified so that |
| 2579 |
it accepts an argument for the @<TT@>@(p_postn@) value. |
| 2580 |
|
| 2581 |
@<P@> |
| 2582 |
@<Begin verbatim@> |
| 2583 |
LOCAL void sendtext P_((p_ps_t,char *,char *,char *,bool)); |
| 2584 |
LOCAL void sendtext(p_tkps,p_first,p_last,p_postn,is_white) |
| 2585 |
/* Appends a text token to the end of the token list. */ |
| 2586 |
/* IN: p_ps is a pointer to a position structure giving the position of the */ |
| 2587 |
/* first character of the token. */ |
| 2588 |
/* IN: p_first and p_last point to the first and last byte of the text scrap. */ |
| 2589 |
/* IN: p_postn has the same definition as sc_postn (see fwdata.h). */ |
| 2590 |
/* IN: is_white should be set to TRUE iff scrap is entirely whitespace. */ |
| 2591 |
p_ps_t p_tkps; |
| 2592 |
char *p_first; |
| 2593 |
char *p_last; |
| 2594 |
char *p_postn; |
| 2595 |
bool is_white; |
| 2596 |
{ |
| 2597 |
tk_t token; |
| 2598 |
|
| 2599 |
/* Empty text scraps should never be generated. */ |
| 2600 |
assert(p_first@<<@>=p_last,"sendtext: Text scrap bounds are bad."); |
| 2601 |
|
| 2602 |
/* If ch=EOL then we should be scanning more text, not shipping it! */ |
| 2603 |
assert(ch!=EOL,"senttext: Shipping text while still more to scan."); |
| 2604 |
|
| 2605 |
/* Check that p_postn is in range. See definition in fwdata.h. */ |
| 2606 |
assert(p_first@<<@>=p_postn && p_postn@<<@>=p_last+1, |
| 2607 |
"sendtext: p_postn is out of range."); |
| 2608 |
|
| 2609 |
/* Debug: Check the p_postn field using a brute force check. */ |
| 2610 |
{ |
| 2611 |
char *i,*j; |
| 2612 |
j=p_first; |
| 2613 |
for (i=p_first;i@<<@>=p_last;i++) |
| 2614 |
if (*i==EOL) |
| 2615 |
j=i+1; |
| 2616 |
assert(j==p_postn,"sendtext: sc_postn field is incorrect."); |
| 2617 |
} |
| 2618 |
|
| 2619 |
/* Load the text token. */ |
| 2620 |
token.tk_kind = TK_TEXT; |
| 2621 |
ASSIGN(token.tk_ps,*p_tkps); |
| 2622 |
token.tk_sc.sc_first = p_first; |
| 2623 |
token.tk_sc.sc_last = p_last; |
| 2624 |
token.tk_sc.sc_postn = p_postn; |
| 2625 |
token.tk_white = is_white; |
| 2626 |
token.tk_parno = 0; |
| 2627 |
ls_add(token_list,PV &token); |
| 2628 |
} |
| 2629 |
@<End verbatim@> |
| 2630 |
|
| 2631 |
@<P@>Then all the calls to sendtext have to be changed: |
| 2632 |
|
| 2633 |
@<Begin verbatim@> |
| 2634 |
/* @@ instructs FunnelWeb to replace the special construct with the */ |
| 2635 |
/* special character. Luckily one appears just before the @@ !! */ |
| 2636 |
/* Note: FALSE is OK because space is not a legal specialch. */ |
| 2637 |
/* Note: Setting parameter p_postn to p_ch-1 is OK as EOL is not a */ |
| 2638 |
/* legal specialch. */ |
| 2639 |
sendtext(ps_spec,p_ch-1,p_ch-1,p_ch-1,FALSE); |
| 2640 |
break; |
| 2641 |
|
| 2642 |
/* + instructs FunnelWeb to insert an EOL. We can't look to the end of */ |
| 2643 |
/* the previous line to find an EOL as this might be the first line. */ |
| 2644 |
/* Running ahead to the end of the line is expensive, and having the */ |
| 2645 |
/* liner mini-package maintain a variable for it would be extra */ |
| 2646 |
/* housekeeping. Instead of all this, we just point to a static. */ |
| 2647 |
{CONST static char stateol = EOL; |
| 2648 |
sendtext(&ps_spec,&stateol,&stateol,(&stateol)+1,TRUE);} |
| 2649 |
break; |
| 2650 |
|
| 2651 |
/* If we hit something that ends a text token */ |
| 2652 |
/* then we can transmit a white text token. */ |
| 2653 |
if (ch==specialch || ch==EOFCH) |
| 2654 |
{sendtext(&ps_start,p_first,p_ch-1,MAX(p_sol,p_first),TRUE); return;} |
| 2655 |
|
| 2656 |
/* Otherwise we have some more (non-white) text to scan. */ |
| 2657 |
/* We can then send a non-white text token. */ |
| 2658 |
while (ch!=specialch && ch!=EOFCH) |
| 2659 |
NEXTCH; |
| 2660 |
sendtext(&ps_start,p_first,p_ch-1,MAX(p_sol,p_first),FALSE); |
| 2661 |
@<End verbatim@> |
| 2662 |
|
| 2663 |
The dump code needs to be changed too! |
| 2664 |
|
| 2665 |
@<Begin verbatim@> |
| 2666 |
wf_str(p_wf,"\""); |
| 2667 |
assert(token-@<>@>tk_sc.sc_first !=NULL,"dm_tkls: NULL ptr1."); |
| 2668 |
assert(token-@<>@>tk_sc.sc_last !=NULL,"dm_tkls: NULL ptr2."); |
| 2669 |
for (i=token-@<>@>tk_sc.sc_first; i@<<@>=token-@<>@>tk_sc.sc_last; i++) |
| 2670 |
{ |
| 2671 |
if (i==token-@<>@>tk_sc.sc_postn) |
| 2672 |
wf_str(p_wf,"@<<@>postn@<>@>"); |
| 2673 |
if (*i=='\n') |
| 2674 |
wf_wl(p_wf,""); |
| 2675 |
else |
| 2676 |
dm_byte(p_wf,*((ubyte_ *) i)); |
| 2677 |
} |
| 2678 |
if (i==token-@<>@>tk_sc.sc_postn) |
| 2679 |
wf_str(p_wf,"@<<@>postn@<>@>"); |
| 2680 |
wf_str(p_wf,"\""); |
| 2681 |
} |
| 2682 |
@<End verbatim@> |
| 2683 |
|
| 2684 |
@<P@>3. Over in the Tangle module, create a massive array of |
| 2685 |
pointers to scraps to be used as a stack. Maintain pointers |
| 2686 |
into the stack called @<TT@>@(current@) and @<I@>@(base@) |
| 2687 |
(similar to the blank indentation variables). Implement the |
| 2688 |
following: |
| 2689 |
|
| 2690 |
@<P@> |
| 2691 |
@<Begin list@> |
| 2692 |
|
| 2693 |
@<Item@>To write out a scrap, scan it byte by byte. Output |
| 2694 |
each byte. When you hit an EOL, pop the stack back to |
| 2695 |
@<TT@>@(base@). Then write out an EOL followed by the stack |
| 2696 |
contents but writing each scrap only from @<TT@>@(postn@) to |
| 2697 |
end end of each scrap. When you have finished the new scrap, |
| 2698 |
push it on the stack. |
| 2699 |
|
| 2700 |
@<Item@>When you hit a new macro to expand, save |
| 2701 |
@<TT@>@(base@). Restore it later. |
| 2702 |
|
| 2703 |
@<End list@> |
| 2704 |
|
| 2705 |
@<P@>The @<TT@>@(postn@) field solves the big problem of how |
| 2706 |
to cope with something like this: |
| 2707 |
|
| 2708 |
@<P@> |
| 2709 |
@<Begin verbatim@> |
| 2710 |
The rain in Spain |
| 2711 |
falls mainly @@@<<@>on the plain@@@<>@> |
| 2712 |
@<End verbatim@> |
| 2713 |
|
| 2714 |
@<P@>The trouble is that we want to text indent the lines in |
| 2715 |
@<TT@>@(@@@<<@>on the plain@@@<>@>@) with just @<DQP@>@(falls |
| 2716 |
mainly@<_@>@). However, this string is only part of a scrap. The |
| 2717 |
solution is to get the scanner to record, in the |
| 2718 |
@<TT@>@(postn@) field of each scrap, the position of the |
| 2719 |
first byte with a EOL-free run to the end of the scrap. |
| 2720 |
|
| 2721 |
@<P@>This scheme is very efficient because all we are doing |
| 2722 |
is pushing and popping pointers to scraps on a stack array. |
| 2723 |
The main disadvantage is that the array must necessarily be |
| 2724 |
finite and would impose a limit on the depth of indentation |
| 2725 |
nesting. |
| 2726 |
|
| 2727 |
@<Nav/last@>@(@<Implement_memory FILE@>@,@<Implement FILE@>@,@<Implement FILE@>@) |
| 2728 |
|
| 2729 |
@<End FWDevMan page@> |
| 2730 |
@} |
| 2731 |
|
| 2732 |
@!****************************************************************************** |
| 2733 |
|
| 2734 |
@$@<Modify HEADING@>@M@{@<SH@>@(4@)Modifying FunnelWeb@} |
| 2735 |
@$@<Modify HEADING/short@>@M@{@<SH@>@(4@)Modify@} |
| 2736 |
@$@<Modify FILE@>@M@{modify.html@} |
| 2737 |
@O@<modify.html@>@{@- |
| 2738 |
@<Begin FWDevMan page/H1@>@(@<Modify HEADING@>@) |
| 2739 |
@<XX@>@(FunnelWeb@,modification@) |
| 2740 |
|
| 2741 |
@<P@>This chapter deals with modifications to FunnelWeb. |
| 2742 |
Although the GNU license@<XX@>@(GNU@,license@) under which |
| 2743 |
FunnelWeb is distributed allows anyone to modify FunnelWeb |
| 2744 |
and distribute the modified versions, care should be taken |
| 2745 |
before doing this. This chapter discusses some of the issues |
| 2746 |
you should think about if you intend to distribute modified |
| 2747 |
versions of FunnelWeb. |
| 2748 |
|
| 2749 |
@<Modify index@> |
| 2750 |
|
| 2751 |
@<Nav@>@(@<Implement FILE@>@,@<Index FILE@>@,@<Misc FILE@>@) |
| 2752 |
|
| 2753 |
@<End FWDevMan page@> |
| 2754 |
@} |
| 2755 |
|
| 2756 |
@$@<Modify index@>@M@{ |
| 2757 |
@<Begin size3@> |
| 2758 |
@<Begin indent/narrow@> |
| 2759 |
@<Link@>@(@<Modify_languages FILE@>@,@<Modify_languages HEADING@>@)@<BR@> |
| 2760 |
@<Link@>@(@<Modify_authority FILE@>@,@<Modify_authority HEADING@>@)@<BR@> |
| 2761 |
@<Link@>@(@<Modify_protect FILE@>@,@<Modify_protect HEADING@>@)@<BR@> |
| 2762 |
@<Link@>@(@<Modify_manuals FILE@>@,@<Modify_manuals HEADING@>@)@<BR@> |
| 2763 |
@<Link@>@(@<Modify_official FILE@>@,@<Modify_official HEADING@>@)@<BR@> |
| 2764 |
@<End indent/narrow@> |
| 2765 |
@<End size3@> |
| 2766 |
@} |
| 2767 |
|
| 2768 |
@!============================================================================== |
| 2769 |
|
| 2770 |
@$@<Modify_languages HEADING@>@M@{@<SH@>@(4.1@)The Danger of Modifying Languages@} |
| 2771 |
@$@<Modify_languages FILE@>@M@{modify_languages.html@} |
| 2772 |
@O@<modify_languages.html@>@{@- |
| 2773 |
@<Begin FWDevMan page/H1@>@(@<Modify_languages HEADING@>@) |
| 2774 |
@<XX@>@(changes@,dangers@)@<XX@>@(languages@,dangers@) |
| 2775 |
|
| 2776 |
@<P@>FunnelWeb is a computer program that implements the |
| 2777 |
semantics of the FunnelWeb language. As such, you should |
| 2778 |
take great care when making changes to FunnelWeb that |
| 2779 |
modify the syntax or semantics of its language: |
| 2780 |
|
| 2781 |
@<Narrowthing@>@(Removing |
| 2782 |
features:@,Removal@<XX@>@(removing@,features@) of features |
| 2783 |
(featurectomy) is extremely difficult once the legacy base |
| 2784 |
is using the features. If a feature is removed, users will |
| 2785 |
have to go through all their files and find |
| 2786 |
a way to simulate the effect of the removed feature with |
| 2787 |
other features. This is usually unthinkable.@) |
| 2788 |
|
| 2789 |
@<Narrowthing@>@(Modifying |
| 2790 |
features:@,Modification@<XX@>@(features@,modification@) of |
| 2791 |
features has less direct impact than the removal of |
| 2792 |
features, but can cause more subtle errors. Anyone modifying |
| 2793 |
features should be sure that they |
| 2794 |
are not inadvertently laying semantic traps.@) |
| 2795 |
|
| 2796 |
@<Narrowthing@>@(Adding |
| 2797 |
features:@,Although@<XX@>@(features@,adding@) the addition |
| 2798 |
of features is generally the most painless for the user |
| 2799 |
community, as Hoare points out, it is also the most |
| 2800 |
dangerous in the long run.@) |
| 2801 |
|
| 2802 |
@<P@> |
| 2803 |
@<Begin blockquote@> @<DQ@>@(When any new language |
| 2804 |
design project is nearing completion, there is always a mad |
| 2805 |
rush to get new features added before standardization. The |
| 2806 |
rush is mad indeed, because it leads into a trap from which |
| 2807 |
there is no escape. A feature which is omitted can always be |
| 2808 |
added later, when its design and its implications are well |
| 2809 |
understood. A feature which is included before it is fully |
| 2810 |
understood can never be removed later.@)@<Paper@>@(Hoare80@) |
| 2811 |
@<End blockquote@> |
| 2812 |
|
| 2813 |
@<P@>The benefits of tight control over a language are |
| 2814 |
enormous. |
| 2815 |
|
| 2816 |
@<Narrowthing@>@(Universal portability:@,Source files can be |
| 2817 |
treated as portable.@) |
| 2818 |
|
| 2819 |
@<Narrowthing@>@(Clear semantics:@,Doubt about the semantics |
| 2820 |
of the language are minimized.@) |
| 2821 |
|
| 2822 |
@<P@>For these reasons, I have decided to keep tight control |
| 2823 |
over the FunnelWeb syntax and semantics. If you develop |
| 2824 |
a variant of FunnelWeb, please take these issues into account. |
| 2825 |
|
| 2826 |
@<Nav/first@>@(@<Modify FILE@>@,@<Modify FILE@>@,@<Modify_authority FILE@>@) |
| 2827 |
|
| 2828 |
@<End FWDevMan page@> |
| 2829 |
@} |
| 2830 |
|
| 2831 |
@!============================================================================== |
| 2832 |
|
| 2833 |
@$@<Modify_authority HEADING@>@M@{@<SH@>@(4.2@)Authority vs User Security@} |
| 2834 |
@$@<Modify_authority FILE@>@M@{modify_authority.html@} |
| 2835 |
@O@<modify_authority.html@>@{@- |
| 2836 |
@<Begin FWDevMan page/H1@>@(@<Modify_authority HEADING@>@) |
| 2837 |
@<XX@>@(security@,authority@) |
| 2838 |
|
| 2839 |
@<P@>There are a number of ways of providing the strong |
| 2840 |
central design authority required to produce the portability |
| 2841 |
and semantic security desired by users, |
| 2842 |
|
| 2843 |
@<P@> |
| 2844 |
@<Begin list@> |
| 2845 |
|
| 2846 |
@<Item@>Trade mark@<X@>@(trademark@) the name of the |
| 2847 |
language. Publish a specification of the language under the |
| 2848 |
trade name. Warn all users not to trust any implementation |
| 2849 |
that does not guarantee that it implements the language. |
| 2850 |
Then control implementations by only licensing the trade |
| 2851 |
mark to conforming implementations. |
| 2852 |
|
| 2853 |
@<Item@>Create a single implementation of the language. Do |
| 2854 |
not release the source code to the implementation. Release |
| 2855 |
only binary executables. |
| 2856 |
|
| 2857 |
@<Item@>Release the source code to the implementation, but |
| 2858 |
under a license that prohibits the distribution of modified |
| 2859 |
versions. |
| 2860 |
|
| 2861 |
@<End list@> |
| 2862 |
|
| 2863 |
@<P@>Many other variations on these themes are possible, but |
| 2864 |
they are all based on the idea of regulating either the |
| 2865 |
@<DQ@>@(official@) definition of the language or all of its |
| 2866 |
existing implementations. |
| 2867 |
|
| 2868 |
@<P@>The solution that I (@<Ross Williams@> |
| 2869 |
(@<Email@>@(@<Ross personal EMAIL@>@)) have adopted (in 1992) |
| 2870 |
is to release the FunnelWeb source code under a GNU license |
| 2871 |
and then to write this chapter in this manual to encourage |
| 2872 |
programmers to think hard if they make any changes to the |
| 2873 |
language. |
| 2874 |
|
| 2875 |
@<Nav@>@(@<Modify_languages FILE@>@,@<Modify FILE@>@,@<Modify_protect FILE@>@) |
| 2876 |
|
| 2877 |
@<End FWDevMan page@> |
| 2878 |
@} |
| 2879 |
|
| 2880 |
@!============================================================================== |
| 2881 |
|
| 2882 |
@$@<Modify_protect HEADING@>@M@{@<SH@>@(4.3@)What I Want to Protect@} |
| 2883 |
@$@<Modify_protect FILE@>@M@{modify_protect.html@} |
| 2884 |
@O@<modify_protect.html@>@{@- |
| 2885 |
@<Begin FWDevMan page/H1@>@(@<Modify_protect HEADING@>@) |
| 2886 |
@<XX@>@(protection@,FunnelWeb@)@<XX@>@(protection@,file extension@) |
| 2887 |
|
| 2888 |
@<P@>The concerns expressed in the previous section about |
| 2889 |
modifications to the FunnelWeb program do not exclude |
| 2890 |
modifications. They merely suggest that some conditions be |
| 2891 |
observed when modifications are made. In the end there are |
| 2892 |
two things that I want to protect and maintain: |
| 2893 |
|
| 2894 |
@<P@> |
| 2895 |
@<Begin list/ordered@> |
| 2896 |
|
| 2897 |
@<Item@>Restriction of the name @<DQ@>@(FunnelWeb@) only to |
| 2898 |
computer programs that exactly implement my |
| 2899 |
@<DQ@>@(official@) definition of the language. |
| 2900 |
|
| 2901 |
@<Item@>Restriction of the FunnelWeb source file extensions |
| 2902 |
@<DQP@>@(.fw@) (input files) and @<DQP@>@(.fwi@) (include |
| 2903 |
files) only to source files that conform exactly to my |
| 2904 |
@<DQ@>@(official@) definition of the language. |
| 2905 |
|
| 2906 |
@<End list/ordered@> |
| 2907 |
|
| 2908 |
@<P@>So long as these conditions hold, @<TT@>@(.fw@) source file |
| 2909 |
will be universally portable. Here |
| 2910 |
are my suggestions for how to obey these rules. These |
| 2911 |
suggestions are in addition to the GNU license rules about |
| 2912 |
documenting any changes that you make in the source files. |
| 2913 |
|
| 2914 |
@<Narrowthing@>@(Level 0: Modifications that do not affect |
| 2915 |
functionality:@,If you change the FunnelWeb program in a |
| 2916 |
manner that does not affect the functionality of the program |
| 2917 |
in any way (@<eg@>port it to a new machine, or just speed it |
| 2918 |
up), then you should modify the program to write out a |
| 2919 |
message when it starts up saying that it is a modified |
| 2920 |
version of FunnelWeb. No other actions need be taken.@) |
| 2921 |
|
| 2922 |
@<Narrowthing@>@(Level 1: Modifications that affect surface |
| 2923 |
functionality:@,If you make changes to FunnelWeb that affect |
| 2924 |
its functionality without altering or extending |
| 2925 |
the syntax or semantics of the FunnelWeb language, you should |
| 2926 |
augment the name of the program to indicate that it is |
| 2927 |
a FunnelWeb variant. For example, you could call it |
| 2928 |
@<DQ@>@(FunnelWeb-Dave@).@) |
| 2929 |
|
| 2930 |
@<Narrowthing@>@(Level 2: Modifications that affect the language:@,If |
| 2931 |
you make changes to FunnelWeb that affect the FunnelWeb language |
| 2932 |
(@<eg@>by adding some new syntax), you should |
| 2933 |
change the name of the program so that the name no longer |
| 2934 |
contains the word @<DQ@>@(FunnelWeb@), and should choose |
| 2935 |
alternative input and include-file file extensions (the |
| 2936 |
current ones are @<DQP@>@(.fw@) and @<DQP@>@(.fwi@)). For |
| 2937 |
example, you might call your program @<DQ@>@(BananaWeb@) and |
| 2938 |
use the file extensions @<DQP@>@(.bw@) and |
| 2939 |
@<DQP@>@(.bwi@).@) |
| 2940 |
|
| 2941 |
@<P@>These rules are not very restrictive. Basically you can |
| 2942 |
do what you like so long as you change the name of the |
| 2943 |
resulting program. I do not wish to restrict anyone who |
| 2944 |
might want to use FunnelWeb as a foundation for a more |
| 2945 |
sophisticated literate programming system. My sole aim here |
| 2946 |
is to protect the integrity of what already exists. |
| 2947 |
|
| 2948 |
@<Nav@>@(@<Modify_authority FILE@>@,@<Modify FILE@>@,@<Modify_manuals FILE@>@) |
| 2949 |
|
| 2950 |
@<End FWDevMan page@> |
| 2951 |
@} |
| 2952 |
|
| 2953 |
@!============================================================================== |
| 2954 |
|
| 2955 |
@$@<Modify_manuals HEADING@>@M@{@<SH@>@(4.4@)Modifying the Manuals@} |
| 2956 |
@$@<Modify_manuals FILE@>@M@{modify_manuals.html@} |
| 2957 |
@O@<modify_manuals.html@>@{@- |
| 2958 |
@<Begin FWDevMan page/H1@>@(@<Modify_manuals HEADING@>@) |
| 2959 |
@<XX@>@(modifying@,manuals@) |
| 2960 |
|
| 2961 |
@<P@>The FunnelWeb documentation: |
| 2962 |
|
| 2963 |
@<P@> |
| 2964 |
@<Begin indent@> |
| 2965 |
@<FunnelWeb@>@<BR@> |
| 2966 |
@<FunnelWeb Reference Manual@>@<BR@> |
| 2967 |
@<FunnelWeb Tutorial Manual@>@<BR@> |
| 2968 |
@<FunnelWeb Developer Manual@>@<BR@> |
| 2969 |
@<End indent@> |
| 2970 |
|
| 2971 |
@<P@>may be modified and distributed so long as you conform to the |
| 2972 |
conditions of the licence notice associated with this documentation: |
| 2973 |
|
| 2974 |
@<Begin blockquote@> |
| 2975 |
@<FunnelWeb documentation permission notice@> |
| 2976 |
@<End blockquote@> |
| 2977 |
|
| 2978 |
@<Nav@>@(@<Modify_protect FILE@>@,@<Modify FILE@>@,@<Modify_official FILE@>@) |
| 2979 |
|
| 2980 |
@<End FWDevMan page@> |
| 2981 |
@} |
| 2982 |
|
| 2983 |
@!============================================================================== |
| 2984 |
|
| 2985 |
@$@<Modify_official HEADING@>@M@{@<SH@>@(4.5@)Contributions To The Official FunnelWeb@} |
| 2986 |
@$@<Modify_official FILE@>@M@{modify_official.html@} |
| 2987 |
@O@<modify_official.html@>@{@- |
| 2988 |
@<Begin FWDevMan page/wide/H1@>@(@<Modify_official HEADING@>@) |
| 2989 |
@<XX@>@(FunnelWeb@,management@)@<XX@>@(FunnelWeb@,official@) |
| 2990 |
|
| 2991 |
@<P@>Contributions to the official version of FunnelWeb code are welcome, |
| 2992 |
although it may be some time before I will be able to find the time to |
| 2993 |
incorporate the changes into the official version. Here are some of |
| 2994 |
the issues relating to contributions to the official version. |
| 2995 |
|
| 2996 |
@<FWDevMan subheading@>@(Quality Issues@) |
| 2997 |
|
| 2998 |
@<P@>Contributions must be of sufficiently high standard to |
| 2999 |
warrant inclusion in the official version. Whether a |
| 3000 |
modification will be accepted will depend, amongst other |
| 3001 |
things, on the following criteria. |
| 3002 |
|
| 3003 |
@<P@> |
| 3004 |
@<Begin list@> |
| 3005 |
|
| 3006 |
@<Item@>Does the modification fit in with the design goals |
| 3007 |
of FunnelWeb, or is it just a case of creeping featurism? |
| 3008 |
|
| 3009 |
@<Item@>How well coded is the modification? Would it reduce |
| 3010 |
the quality of the code? |
| 3011 |
|
| 3012 |
@<Item@>If the modification changes FunnelWeb's |
| 3013 |
functionality, is this a desirable change? How will it |
| 3014 |
impact on existing users? Does it change the semantics |
| 3015 |
of existing FunnelWeb @<TT@>@(.fw@) files? |
| 3016 |
|
| 3017 |
@<Item@>Would it be quicker for me to make the modification |
| 3018 |
myself than to work out how to incorporate the submitted |
| 3019 |
modification? |
| 3020 |
|
| 3021 |
@<Item@>Does the change come with a corresponding addition |
| 3022 |
to the regression test suite? |
| 3023 |
|
| 3024 |
@<End list@> |
| 3025 |
|
| 3026 |
@<P@>It is my goal to guard the integrity of the design and |
| 3027 |
code of the official version of FunnelWeb and so I will |
| 3028 |
probably be rather fussy about what I regard as a worthwhile |
| 3029 |
modification. |
| 3030 |
|
| 3031 |
@<FWDevMan subheading@>@(Legal Issues@) |
| 3032 |
|
| 3033 |
@<P@>For various reasons, I have decided to maintain |
| 3034 |
complete copyright over the official version of FunnelWeb, |
| 3035 |
but release it under a GNU license each time it is updated. |
| 3036 |
This means that, while you are free to create and distribute |
| 3037 |
different versions of FunnelWeb, if you want your |
| 3038 |
modifications to be incorporated into the official version, |
| 3039 |
you will have to license copyright of the modifications to me |
| 3040 |
(@<Ross Williams@>). Here's how it works: |
| 3041 |
|
| 3042 |
@<P@> |
| 3043 |
@<Begin verbatim@> |
| 3044 |
+-------@<>@>------+----------@<<@>-------+ |
| 3045 |
|(mods by | | |
| 3046 |
| me) V | |
| 3047 |
| +------------------+ | |
| 3048 |
+--<--| My Official Copy | ^ |
| 3049 |
| Of FunnelWeb | | |
| 3050 |
| Copyright (c) Me | | |
| 3051 |
+------------------+ | |
| 3052 |
(Periodic GNU | / \ |
| 3053 |
release) V / \ Programmer |
| 3054 |
+-------------------+ /Legal\ signs away |
| 3055 |
| Official GNU Copy | \Filte/ copyright on |
| 3056 |
+-------------------+ \ r / modifications |
| 3057 |
(Mods made | \ / |
| 3058 |
by random | | |
| 3059 |
programmer) | ^ |
| 3060 |
V | |
| 3061 |
+-----------------------+ |
| 3062 |
| Modified GNU Version | |
| 3063 |
+-----------------------+ |
| 3064 |
|
| 3065 |
@<End verbatim@> |
| 3066 |
|
| 3067 |
@<P@>This organization allows me to retain full use of the |
| 3068 |
source code for any private, public or commercial purpose, |
| 3069 |
and for the purpose of maintaining the integrity of the |
| 3070 |
FunnelWeb language, while still assuring contributors that |
| 3071 |
their contributions will become part of the public GNU |
| 3072 |
version. |
| 3073 |
|
| 3074 |
@<P@>This policy is my current policy as at December 1999, |
| 3075 |
but might change, depending on circumstances. |
| 3076 |
|
| 3077 |
@<Nav/last@>@(@<Modify_manuals FILE@>@,@<Modify FILE@>@,@<Modify FILE@>@) |
| 3078 |
|
| 3079 |
@<End FWDevMan page@> |
| 3080 |
@} |
| 3081 |
|
| 3082 |
@!****************************************************************************** |
| 3083 |
|
| 3084 |
@$@<Misc HEADING@>@M@{@<SH@>@(5@)Miscellaneous@} |
| 3085 |
@$@<Misc HEADING/short@>@M@{@<SH@>@(5@)Misc@} |
| 3086 |
@$@<Misc FILE@>@M@{misc.html@} |
| 3087 |
@O@<misc.html@>@{@- |
| 3088 |
@<Begin FWDevMan page/H1@>@(@<Misc HEADING@>@) |
| 3089 |
|
| 3090 |
@<P@>This chapter contains miscellenous development |
| 3091 |
information. |
| 3092 |
|
| 3093 |
@<Misc index@> |
| 3094 |
|
| 3095 |
@<Nav@>@(@<Modify FILE@>@,@<Index FILE@>@,@<GPL FILE@>@) |
| 3096 |
|
| 3097 |
@<End FWDevMan page@> |
| 3098 |
@} |
| 3099 |
|
| 3100 |
@$@<Misc index@>@M@{ |
| 3101 |
@<Begin size3@> |
| 3102 |
@<Begin indent/narrow@> |
| 3103 |
@<Link@>@(@<Misc_versions FILE@>@,@<Misc_versions HEADING@>@)@<BR@> |
| 3104 |
@<Link@>@(@<Misc_wishlist FILE@>@,@<Misc_wishlist HEADING@>@)@<BR@> |
| 3105 |
@<Link@>@(@<Misc_suggestions FILE@>@,@<Misc_suggestions HEADING@>@)@<BR@> |
| 3106 |
@<Link@>@(@<Misc_knownbugs FILE@>@,@<Misc_knownbugs HEADING@>@)@<BR@> |
| 3107 |
@<End indent/narrow@> |
| 3108 |
@<End size3@> |
| 3109 |
@} |
| 3110 |
|
| 3111 |
@!============================================================================== |
| 3112 |
|
| 3113 |
@$@<Misc_versions HEADING@>@M@{@<SH@>@(5.1@)FunnelWeb Versions@} |
| 3114 |
@$@<Misc_versions FILE@>@M@{misc_versions.html@} |
| 3115 |
@O@<misc_versions.html@>@{@- |
| 3116 |
@<Begin FWDevMan page/H1@>@(@<Misc_versions HEADING@>@) |
| 3117 |
@<XX@>@(FunnelWeb@,versions@) |
| 3118 |
|
| 3119 |
@<FWDevMan subheading@>@(FunnelWeb V1 (1986)@) |
| 3120 |
|
| 3121 |
@<P@>FunnelWeb V1 was written in Ada on a VAX in 1986 by |
| 3122 |
@<Ross Williams@>. FunnelWeb V1 was released as a |
| 3123 |
VAX/VMS executable for use within the @<University of Adelaide@>, |
| 3124 |
but was never publicly released. |
| 3125 |
|
| 3126 |
@<FWDevMan subheading@>@(FunnelWeb V2 (1991)@) |
| 3127 |
|
| 3128 |
@<P@>In late 1991, @<David Hulse@> translated FunnelWeb V1 from |
| 3129 |
Ada to C. This C version was designated V2. It was never publicly |
| 3130 |
released. |
| 3131 |
|
| 3132 |
@<FWDevMan subheading@>@(FunnelWeb V3.0 (June 1992)@) |
| 3133 |
|
| 3134 |
@<P@>In early 1992, @<Ross Williams@> rewrote and expanded |
| 3135 |
V2, creating FunnelWeb V3.0. This version was publicly released |
| 3136 |
on the Internet on 6 June 1992. |
| 3137 |
|
| 3138 |
@<P@>Version 3.0 proved very solid. However, the following |
| 3139 |
bugs were eventually encountered: |
| 3140 |
|
| 3141 |
@<Begin list@> |
| 3142 |
|
| 3143 |
@<Item@>Bombs with an assertion error if the input file |
| 3144 |
is 10000 or more lines long. |
| 3145 |
|
| 3146 |
@<Blank line@> |
| 3147 |
|
| 3148 |
@<Item@>Bombs with an assertion error |
| 3149 |
(@<TT@>@(lister.dup: count@<>@>=DUPMAX@)) |
| 3150 |
if a listing file is being generated, and an error |
| 3151 |
occurs on a line longer than 200 characters. |
| 3152 |
|
| 3153 |
@<Blank line@> |
| 3154 |
|
| 3155 |
@<Item@>The FunnelWeb shell @<TT@>@(diff@) command bombs |
| 3156 |
with an assertion error if it can't open the first file: |
| 3157 |
|
| 3158 |
@<Blank line@> |
| 3159 |
|
| 3160 |
@<Item@>VMS FunnelWeb overwrites previous output files |
| 3161 |
with the newly generated output files, rather than |
| 3162 |
generating a new version. |
| 3163 |
|
| 3164 |
@<End list@> |
| 3165 |
|
| 3166 |
@<FWDevMan subheading@>@(FunnelWeb 3.05AC@) |
| 3167 |
|
| 3168 |
@<P@>@<Tony Coates@> created a |
| 3169 |
<A HREF="http://www.ems.uq.edu.au:7007/People/Tony/funnelweb.html">FunnelWeb variant</A> |
| 3170 |
called FunnelWeb V3.05AC (a variant of FunnelWeb V3.0) that provides |
| 3171 |
some additional useful features. |
| 3172 |
As this is an unofficial version, it's features are not |
| 3173 |
guaranteed to appear in future official versions of |
| 3174 |
FunnelWeb. |
| 3175 |
|
| 3176 |
@<FWDevMan subheading@>@(FunnelWeb V3.1 (October 1993)@) |
| 3177 |
|
| 3178 |
@<P@>In October 1993, the following changes were made, yielding V3.1: |
| 3179 |
|
| 3180 |
@<P@> |
| 3181 |
@<Begin list@> |
| 3182 |
@<Item@>Lister: Increased MAXLINES to one million to avoid 10000 bug. |
| 3183 |
@<Item@>Memory: Modified package to count blocks of various sizes. |
| 3184 |
@<Item@>Command: Modified it to call memory to write out mem report. |
| 3185 |
@<Item@>Parser: Change ty_name to ty_pname to save memory. |
| 3186 |
@<Item@>Data: Some unrecorded changes. |
| 3187 |
@<Item@>Weave: Some unrecorded changes. |
| 3188 |
@<End list@> |
| 3189 |
|
| 3190 |
@<P@>These changes essentially just fixed the "10,000 lines" bug |
| 3191 |
and performed some memory tuning. The other bugs in V3.0 remained. |
| 3192 |
The source code for V3.1 was never released. However, some |
| 3193 |
executables were. |
| 3194 |
|
| 3195 |
@<FWDevMan subheading@>@(FunnelWeb 3.2 (May 1999)@) |
| 3196 |
|
| 3197 |
@<P@>In May 1999, @<Ross Williams@> revised and enhanced |
| 3198 |
FunnelWeb to produce a new official version: FunnelWeb |
| 3199 |
Version 3.2. The changes made were as follows: |
| 3200 |
|
| 3201 |
@<P@> |
| 3202 |
@<Begin list@> |
| 3203 |
@<Item@>Fixed the @<>@>=10,000 lines bug. |
| 3204 |
@<Item@>Fixed the @<TT@>@(DUPMAX@) bug. |
| 3205 |
@<Item@>Fixed the bug in the @<TT@>@(diff@) command. |
| 3206 |
@<Item@>Added HTML output using new @<TT@>@(+u@) option. |
| 3207 |
@<Item@>Added the @<TT@>@(@@L@) library macro feature. |
| 3208 |
@<Item@>Now executes @<TT@>@(fwinit.fws@) if no command line arguments. |
| 3209 |
@<Item@>Now gives a line number in @<TT@>@("Expecting @@)"@) error. |
| 3210 |
@<Item@>Eliminated the 64K input file restriction in the MS-DOS version. |
| 3211 |
@<Item@>Macintosh version now sets creator of output files to BBEdit. |
| 3212 |
@<Item@>Ported to more platforms. |
| 3213 |
@<Item@>Redesigned the main FunnelWeb web. |
| 3214 |
@<Item@>Converted the user manuals to webs and placed online. |
| 3215 |
@<End list@> |
| 3216 |
|
| 3217 |
@<Nav/first@>@(@<Misc FILE@>@,@<Misc FILE@>@,@<Misc_wishlist FILE@>@) |
| 3218 |
|
| 3219 |
@<End FWDevMan page@> |
| 3220 |
@} |
| 3221 |
|
| 3222 |
@!============================================================================== |
| 3223 |
|
| 3224 |
@$@<Misc_wishlist HEADING@>@M@{@<SH@>@(5.2@)Wish List@} |
| 3225 |
@$@<Misc_wishlist FILE@>@M@{misc_wishlist.html@} |
| 3226 |
@O@<misc_wishlist.html@>@{@- |
| 3227 |
@<Begin FWDevMan page/H1@>@(@<Misc_wishlist HEADING@>@) |
| 3228 |
@<XX@>@(FunnelWeb@,future@) |
| 3229 |
|
| 3230 |
@<P@>This page contains the wish list that was included in |
| 3231 |
the original 1992 FunnelWeb Hacker's Manual. As hardly any |
| 3232 |
changes have been made since then, I thought I'd just |
| 3233 |
include it here verbatim. |
| 3234 |
|
| 3235 |
@<FWDevMan subheading@>@(Documentation@) |
| 3236 |
|
| 3237 |
@<Boldthing@>@(An official example:@) A official example |
| 3238 |
program written using FunnelWeb should be constructed and |
| 3239 |
made available.@<XX@>@(official@,example@) |
| 3240 |
|
| 3241 |
@<Boldthing@>@(Index program:@) In order to typeset the |
| 3242 |
documentation, a portable index sorting program is required. |
| 3243 |
One should be written and added to the distribution |
| 3244 |
kit.@<XX@>@(index@,program@) Perhaps this could be the |
| 3245 |
official example! |
| 3246 |
|
| 3247 |
@<FWDevMan subheading@>@(Command Line Interface@) |
| 3248 |
|
| 3249 |
@<Boldthing@>@(Buffer length:@) Currently the FunnelWeb |
| 3250 |
shell uses the @<TT@>@(COMLINE_MAX@) constant to size its |
| 3251 |
internal command line buffers. This is untenable. The |
| 3252 |
maximum length of a shell command line should not be machine |
| 3253 |
dependent. |
| 3254 |
|
| 3255 |
@<Boldthing@>@(Antiquated Features:@) As the FunnelWeb |
| 3256 |
language develops, it is likely that some changes will have |
| 3257 |
to be made that will render one or more language constructs |
| 3258 |
obsolete. When this happens, it may be necessary to add a |
| 3259 |
command line option that has the power to turn on and off |
| 3260 |
warnings or errors flagging antiquated |
| 3261 |
features.@<XX@>@(antiquated@,features@) |
| 3262 |
|
| 3263 |
@<FWDevMan subheading@>@(Shell Interpreter@) |
| 3264 |
|
| 3265 |
@<Boldthing@>@(SETALL command:@) When writing FunnelWeb |
| 3266 |
scripts, it is sometimes desirable to set @<I@>@(all@) of |
| 3267 |
FunnelWeb's options@<X@>@(options@) to some particular value |
| 3268 |
so that the script is not vulnerable to changes in |
| 3269 |
FunnelWeb's default values which might occur from time to |
| 3270 |
time. To this end, it may be worth creating a |
| 3271 |
@<DQP@>@(SETALL@) command that is identical to the |
| 3272 |
@<DQP@>@(SET@) command except that it will generate an error |
| 3273 |
if the value of an option is not specified |
| 3274 |
explicitly.@<XX@>@(setall@,command@) |
| 3275 |
|
| 3276 |
@<Boldthing@>@(Recursion test:@) A test should be added to |
| 3277 |
test for recursive invocation in a |
| 3278 |
shellscript.@<XX@>@(recursion@,test@) |
| 3279 |
|
| 3280 |
@<Boldthing@>@(Diagnostic counting:@) The code for counting |
| 3281 |
diagnostics in the script interpreter is rather messy and |
| 3282 |
perhaps even buggy. It should be cleaned up and |
| 3283 |
commented.@<XX@>@(diagnostic@,counting@) |
| 3284 |
|
| 3285 |
@<Boldthing@>@(Argument counting:@) In the |
| 3286 |
@<TT@>@(command.c@) module, there is a variable that counts |
| 3287 |
the arguments to a command. Currently it takes the value of |
| 3288 |
the number of parameters including the command verb. This |
| 3289 |
has turned out to make the code less readable. It should be |
| 3290 |
changed to be the number of arguments to the command verb. |
| 3291 |
|
| 3292 |
@<Boldthing@>@(Make facility:@) It may be worth building |
| 3293 |
some sort of make facility into the script language so as to |
| 3294 |
support machines such as the Macintosh that do not already |
| 3295 |
have this facility.@<X@>@(make@) |
| 3296 |
|
| 3297 |
@<Boldthing@>@(Signature file:@) One problem with using |
| 3298 |
FunnelWeb in conjunction with an external @<TT@>@(Make@) |
| 3299 |
facility is that a user might change a FunnelWeb source file |
| 3300 |
without making changes that will affect the files that it |
| 3301 |
generates. If FunnelWeb is then run and the @<DQP@>@(+D@) |
| 3302 |
option is on, then the output files will be deleted (to |
| 3303 |
avoid further @<TT@>@(Make@) propagations). If |
| 3304 |
@<TT@>@(Make@) then has a production linking the |
| 3305 |
@<TT@>@(.fw@) file to its output files, then it may conclude |
| 3306 |
that the output files are still out of date. To solve the |
| 3307 |
problem, FunnelWeb could be changed to write a |
| 3308 |
@<TT@>@(.sig@) file whenever it processes a @<TT@>@(.fw@) |
| 3309 |
file. The @<TT@>@(Make@) production could then be wired up |
| 3310 |
to link the @<TT@>@(.fw@) file to the @<TT@>@(.sig@) file |
| 3311 |
instead of to the output files.@<XX@>@(signature@,file@) |
| 3312 |
|
| 3313 |
@<FWDevMan subheading@>@(Language Design@) |
| 3314 |
|
| 3315 |
@<P@>Some proposed changes to FunnelWeb do not correspond to |
| 3316 |
any particular component of FunnelWeb and are really to do |
| 3317 |
with the design of the input language. |
| 3318 |
|
| 3319 |
@<Boldthing@>@(Output or file?:@) The @<DQP@>@(@@O@) special |
| 3320 |
sequence for defining an output file is somewhat |
| 3321 |
non-mnemonic and can be confused with zero (@<DQP@>@(0@)). |
| 3322 |
Perhaps it should be replaced by the @<DQP@>@(@@F@) |
| 3323 |
sequence. |
| 3324 |
|
| 3325 |
@<Boldthing@>@(Syntax of section names:@) Currently section |
| 3326 |
names use the same syntax as macro names. For example |
| 3327 |
@<DQP@>@(@@<Sloth@@>@). It can be argued that angle brackets |
| 3328 |
should be reserved only for macro names and that some other |
| 3329 |
syntax should be found for delimiting section names. This is |
| 3330 |
not a clear issue. It could also be argued that they are |
| 3331 |
both names, and that because sections can inherit their |
| 3332 |
names from the macros they contain, that the names are of |
| 3333 |
the same @<DQ@>@(type@).@<XX@>@(section@,syntax@) |
| 3334 |
|
| 3335 |
@<Boldthing@>@(One macro per section:@) One particular style |
| 3336 |
of using FunnelWeb is to have at most one macro definition |
| 3337 |
per section. It may be worth adding a pragma that instructs |
| 3338 |
FunnelWeb to enforce this. |
| 3339 |
|
| 3340 |
@<Boldthing@>@(Should @@\{ suppress EOL?:@) When defining a |
| 3341 |
macro in FunnelWeb, it seems to be rule rather than the |
| 3342 |
exception that the @<DQP@>@(@@\{@) be followed by |
| 3343 |
@<DQP@>@(@@-@). This suppresses the EOL on the definition |
| 3344 |
line, allowing the first line of the macro to be placed |
| 3345 |
immediately above and in line with the other lines without |
| 3346 |
introducing an EOL at the start of the macro text. One |
| 3347 |
option is to introduce a pragma to determine whether to |
| 3348 |
suppress EOLs following @<DQP@>@(@@\{@). |
| 3349 |
|
| 3350 |
@<Boldthing@>@(Pragma syntax:@) It is not clear how |
| 3351 |
@<DQ@>@(loose@) the syntax of pragmas should be. Perhaps |
| 3352 |
they should be case insensitive.@<XX@>@(pragma@,syntax@) |
| 3353 |
|
| 3354 |
@<Boldthing@>@(Conditionals:@) Depending on demand, it may |
| 3355 |
be worth reintroducing some sort of conditional feature into |
| 3356 |
FunnelWeb. However, it would have to be very simple to |
| 3357 |
compete with the various ways in which conditionals can |
| 3358 |
already be fudged within FunnelWeb as it |
| 3359 |
stands.@<X@>@(conditionals@) |
| 3360 |
|
| 3361 |
@<Boldthing@>@(File markers:@) It might be worth modifying |
| 3362 |
the language so that a special syntactical marker is |
| 3363 |
required at the start and end of files. This will assist in |
| 3364 |
detecting truncations and other |
| 3365 |
corruptions.@<XX@>@(file@,markers@) |
| 3366 |
|
| 3367 |
@<Boldthing@>@(Formal parameter lists:@) It might be worth |
| 3368 |
changing over to a syntax for formal parameter lists that |
| 3369 |
does not require the @<TT@>@(@@(@) and @<TT@>@(@@)@). |
| 3370 |
However, they could be retained as optional for backward |
| 3371 |
compatibility.@<XX@>@(parameter list@,formal@) |
| 3372 |
|
| 3373 |
@<FWDevMan subheading@>@(Scanner/Mapper@) |
| 3374 |
|
| 3375 |
@<Boldthing@>@(All non-contiguous mappings:@) Currently |
| 3376 |
FunnelWeb requires that all input files be mapped into a |
| 3377 |
contiguous lump of memory. This caused problems for two |
| 3378 |
reasons. First, to do this, one has to allocate the memory |
| 3379 |
first, and to do that, you have to know how long the file |
| 3380 |
is, and it turns out that finding out the length of a file |
| 3381 |
in a portable manner is very inefficient. Second, although |
| 3382 |
IBM PC compatibles may have megabytes of memory, it is |
| 3383 |
segmented into blocks of at most 64K. This means that |
| 3384 |
FunnelWeb currently cannot read a file longer than 64K on a |
| 3385 |
PC.@<XX@>@(contiguous@,memory@) |
| 3386 |
|
| 3387 |
These problems could be avoided if the mapper and scanner |
| 3388 |
were reorganized to allow input files to be read in and |
| 3389 |
stored as a linked list of chunks of text rather than a |
| 3390 |
contiguous block. |
| 3391 |
|
| 3392 |
@<Boldthing@>@(EOL is unspecifiable:@) FunnelWeb uses ASCII |
| 3393 |
character decimal ten (10) internally to represent logical |
| 3394 |
end-of-line and is currently organized so that if one of |
| 3395 |
these is inserted into the text by the user using a |
| 3396 |
@<DQP@>@(@@^D(10)@), it will be written out as |
| 3397 |
a logical end of line, rather than as a single ASCII |
| 3398 |
character 10. This should be |
| 3399 |
fixed.@<XX@>@(representation@,EOL@) |
| 3400 |
|
| 3401 |
@<Boldthing@>@(Allow mnemonics for unprintables:@) FunnelWeb |
| 3402 |
allows users to insert unprintable characters into the |
| 3403 |
output using the @<DQP@>@(@@^D(ddd)@) special |
| 3404 |
sequence. Perhaps it would be changed so that it understands |
| 3405 |
ASCII standard mnemonics such as @<DQP@>@(LF@) as well as |
| 3406 |
ASCII numbers.@<XX@>@(ASCII@,mnemonics@) |
| 3407 |
|
| 3408 |
@<Boldthing@>@(Version pragma:@) A @<DQP@>@(version@) pragma |
| 3409 |
should be added that allows the user to specify in the input |
| 3410 |
file the version of FunnelWeb that was around when the input |
| 3411 |
file was created. At a later date, such a construct would be |
| 3412 |
very useful for determining how an input file should be |
| 3413 |
updated if the FunnelWeb language has changed between |
| 3414 |
versions.@<XX@>@(version@,pragma@) |
| 3415 |
|
| 3416 |
@<FWDevMan subheading@>@(Parser@) |
| 3417 |
|
| 3418 |
@<P@>There are no proposals to change the parser except as a |
| 3419 |
consequence of other proposals. |
| 3420 |
|
| 3421 |
@<FWDevMan subheading@>@(Analyser@) |
| 3422 |
|
| 3423 |
@<Boldthing@>@(Recursion detection:@) Currently the |
| 3424 |
FunnelWeb analyser flags, with an error, all macros with an |
| 3425 |
infinite expansion. This would be best changed to flagging |
| 3426 |
all macros that are directly or indirectly recursive. To do |
| 3427 |
this, Tarjan's algorithm@<Paper@>@(Tarjan72@)@<XN@>@(Robert |
| 3428 |
Endre@,Tarjan@) for the detection of strong components |
| 3429 |
should be installed.@<XX@>@(recursion@,detection@) |
| 3430 |
|
| 3431 |
@<Boldthing@>@(Once only macros:@) By default FunnelWeb |
| 3432 |
prevents a macro from being called more than once unless it |
| 3433 |
has a @<DQP@>@(@@M@) associated with it. However, FunnelWeb |
| 3434 |
does allow a macro that calls such a macro to be called more |
| 3435 |
than once. Perhaps this @<DQ@>@(loophole@) should be plugged |
| 3436 |
somehow. |
| 3437 |
|
| 3438 |
@<FWDevMan subheading@>@(Tangle@) |
| 3439 |
|
| 3440 |
@<P@>The Tangler is one of the cleanest components of |
| 3441 |
FunnelWeb, as basically all it has to do is expand some very |
| 3442 |
well-defined macros. |
| 3443 |
|
| 3444 |
@<Boldthing@>@(Text indentation:@) Currently FunnelWeb |
| 3445 |
supports @<I@>@(no indentation@) and @<I@>@(blank |
| 3446 |
indentation@). A third form could be added if it was |
| 3447 |
considered necessary. @<I@>@(Text indentation@) is the same |
| 3448 |
as @<I@>@(blank indentation@) except that instead of |
| 3449 |
indenting with blanks, FunnelWeb would indent with the text |
| 3450 |
to the left of the called macro. This facility could be |
| 3451 |
useful for commenting out large bodies of text in languages |
| 3452 |
that do not have multi-line comments (e.g. Ada). A |
| 3453 |
discussion of the pros and cons of this form of indentation |
| 3454 |
appears earlier.@<XX@>@(text@,indentation@) |
| 3455 |
|
| 3456 |
@<FWDevMan subheading@>@(Weave@) |
| 3457 |
|
| 3458 |
@<P@>Perhaps FunnelWeb's weakest aspect is its typesetting |
| 3459 |
facility. |
| 3460 |
|
| 3461 |
@<Boldthing@>@(Align table of contents:@) When FunnelWeb |
| 3462 |
generates a table of contents, the section numbers are not |
| 3463 |
quite aligned with the start of the controlling heading |
| 3464 |
above them.@<X@>@(table of contents@) |
| 3465 |
|
| 3466 |
@<Boldthing@>@(Typesetting strength:@) It should be possible |
| 3467 |
to specify the level of typesetting strength for headings so |
| 3468 |
that short documents do not look overdone when typeset. A |
| 3469 |
new pragma would be good for |
| 3470 |
this.@<XX@>@(strength@,typesetting@) |
| 3471 |
|
| 3472 |
@<Boldthing@>@(Typeset a portion:@) Sometimes it is |
| 3473 |
desirable to typeset just a portion of a program. A command |
| 3474 |
line option could be added to do this. The option could |
| 3475 |
accept as its argument, a string containing a list of |
| 3476 |
section numbers or heading names. |
| 3477 |
|
| 3478 |
@<Boldthing@>@(Generic typesetter option:@) In addition to |
| 3479 |
building in a number of different versions of Weave, one for |
| 3480 |
each popular typesetter, it would be possible to add a |
| 3481 |
special generic format where the typeset output is expressed |
| 3482 |
in terms of @<I@>@(FunnelWeb macros@). The user could then |
| 3483 |
specify macro definitions for a non-supported typesetter and |
| 3484 |
run the output through FunnelWeb Tangle to get a typeset |
| 3485 |
file in a format suitable for the unsupported |
| 3486 |
typesetter.@<XX@>@(typesetter@,generic@) |
| 3487 |
|
| 3488 |
@<Boldthing@>@(Suppression of include files:@) It should be |
| 3489 |
possible to specify in the input file that particular |
| 3490 |
included files not appear in the typeset output. Currently, |
| 3491 |
the fact that an inclusion has occurred is not even |
| 3492 |
represented in the typeset output. Suppression of inclusions |
| 3493 |
is particularly necessary where a library of macros has been |
| 3494 |
included at the top of each of a group of source |
| 3495 |
files.@<XX@>@(include file@,suppression@) |
| 3496 |
|
| 3497 |
@<Boldthing@>@(Cross reference of identifiers:@) WEB |
| 3498 |
provides a list of identifiers and a list of all the |
| 3499 |
definitions in which they are used. A similar feature could |
| 3500 |
be added to FunnelWeb.@<XX@>@(cross@,references@) |
| 3501 |
|
| 3502 |
@<Boldthing@>@(Support for non-printables:@) Currently |
| 3503 |
FunnelWeb does not provide support for typesetting the |
| 3504 |
special @<DQP@>@(@@\circumflex(num)@) sequences. This should |
| 3505 |
be added. |
| 3506 |
|
| 3507 |
@<Boldthing@>@(Support for @@+ sequences:@) Currently Weave |
| 3508 |
does not see @<DQP@>@(@@+@) sequences as such. Instead it |
| 3509 |
perceives them as ordinary EOLs. However, there are |
| 3510 |
arguments for typesetting them specially. |
| 3511 |
|
| 3512 |
@<Boldthing@>@(Typeset text in macro bodies:@) One of the |
| 3513 |
much-loved features of WEB is the way that it allows the |
| 3514 |
user to switch recursively between document and program |
| 3515 |
formats. FunnelWeb does not allow this, but should. In |
| 3516 |
FunnelWeb, the delimiters @<DQP@>@(@@{@) and |
| 3517 |
@<DQP@>@(@@}@) are already used consistently to delimit |
| 3518 |
macro text. The @<DQP@>@(@@[@) and @<DQP@>@(@@]@) sequences |
| 3519 |
have been reserved for the delimitation of documentation |
| 3520 |
text. |
| 3521 |
|
| 3522 |
@<Boldthing@>@(Non-tt typesetting:@) The current version of |
| 3523 |
FunnelWeb sets all its macro text in @<TT@>@(tt font@). This |
| 3524 |
is both a blessing and a curse. It is a blessing because it |
| 3525 |
connects the reader directly to the code, with no |
| 3526 |
complicated intermediary. It is a curse because it looks |
| 3527 |
ugly compared to the beautifully typeset programs produced |
| 3528 |
by other literate programming tools. |
| 3529 |
|
| 3530 |
@<P@>The difficulty with adding such beautiful typesetting is |
| 3531 |
that it is necessarily language-specific. Keywords and |
| 3532 |
syntax differ from language to language and it would not be |
| 3533 |
easy to come up with a set of language independent rules. |
| 3534 |
|
| 3535 |
@<P@>One approach is to write a set of Weave back-ends, one for |
| 3536 |
each language. Another approach is to @<I@>@(generate@) back |
| 3537 |
ends. This is the approach taken in the @<I@>@(Spider@) |
| 3538 |
system@<Paper@>@(Ramsey89@).@<X@>@(spider@) In the |
| 3539 |
@<I@>@(Spider@) system, the programmer writes production |
| 3540 |
rules for converting lexical components of the program text |
| 3541 |
into typesetter instructions. The @<I@>@(Spider@) program |
| 3542 |
reads these rules and generates a new version of WEB suited |
| 3543 |
for the target language. |
| 3544 |
|
| 3545 |
@<P@>For FunnelWeb a slightly different system is proposed in |
| 3546 |
which Spider-like rules appear in the input file and are |
| 3547 |
used directly by Weave to perform the typesetting. An |
| 3548 |
intermediate abstract typesetting language could be used so |
| 3549 |
that the productions can be made language specific, but not |
| 3550 |
typesetter specific. |
| 3551 |
|
| 3552 |
@<FWDevMan subheading@>@(Lister@) |
| 3553 |
|
| 3554 |
@<Boldthing@>@(Glue factor:@) A glue factor could be added |
| 3555 |
that determines how many lines can be in between two |
| 3556 |
diagnostics in the listing before the two groups of lines |
| 3557 |
are joined together in the listing with no intervening |
| 3558 |
ellipsis.@<XX@>@(glue@,factor@) |
| 3559 |
|
| 3560 |
@<FWDevMan subheading@>@(Diagnostics@) |
| 3561 |
|
| 3562 |
@<Boldthing@>@(Advisory information:@) Some of FunnelWeb's |
| 3563 |
diagnostics provide a detailed explanatory paragraph. While |
| 3564 |
this information might be useful the first time, it has the |
| 3565 |
capacity to clog up a listing file if the user has made the |
| 3566 |
same error many times. To solve this problem, FunnelWeb |
| 3567 |
could be modified so that such explanations are only |
| 3568 |
displayed the first time the error occurs. |
| 3569 |
|
| 3570 |
@<Boldthing@>@(Abort after n errors:@) A facility could be |
| 3571 |
added to prevent FunnelWeb's scanning, parsing, and |
| 3572 |
analysing phases from continuing if a certain number of |
| 3573 |
errors have already been issued. |
| 3574 |
|
| 3575 |
@<FWDevMan subheading@>@(Speed@) |
| 3576 |
|
| 3577 |
@<Boldthing@>@(Measurement of speed:@) Although FunnelWeb |
| 3578 |
can generate a breakdown of where it is spending its time, |
| 3579 |
it does not give a final rating in lines per minute. This |
| 3580 |
should be added. |
| 3581 |
|
| 3582 |
@<Boldthing@>@(Find the hot spots:@) Although FunnelWeb has |
| 3583 |
been designed to allow high speed, not much effort has so |
| 3584 |
far been made to make it fast. This should be done. |
| 3585 |
|
| 3586 |
@<Boldthing@>@(Change some declarations:@) FunnelWeb is full |
| 3587 |
of variable declarations where the variables are wider than |
| 3588 |
they need be. Replacing these might speed it up. |
| 3589 |
|
| 3590 |
@<FWDevMan subheading@>@(Correctness@) |
| 3591 |
|
| 3592 |
@<Boldthing@>@(Bounds analysis:@) Not much effort has gone |
| 3593 |
into the design of FunnelWeb's input boundaries. An analysis |
| 3594 |
should be made of FunnelWeb's behaviour when the following |
| 3595 |
quantities are stretched: |
| 3596 |
|
| 3597 |
@<P@> |
| 3598 |
@<Begin list@> |
| 3599 |
@<Item@> Input line length. |
| 3600 |
@<Item@> Input file size. |
| 3601 |
@<Item@> Number of macros. |
| 3602 |
@<Item@> Length of macro. |
| 3603 |
@<End list@> |
| 3604 |
|
| 3605 |
@<P@>In particular, FunnelWeb's behaviour at 32K and 64K |
| 3606 |
boundaries should be observed. |
| 3607 |
|
| 3608 |
@<Boldthing@>@(Stack detection:@) Macintosh THINK-C provides |
| 3609 |
just 6K of memory for the stack. It might be worth adding |
| 3610 |
checks to make sure that the stack is not being blown. |
| 3611 |
|
| 3612 |
@<FWDevMan subheading@>@(Test Suite@) |
| 3613 |
|
| 3614 |
@<P@>The following tests should be added to the test suite: |
| 3615 |
|
| 3616 |
@<P@> |
| 3617 |
@<Begin verbatim@> |
| 3618 |
Lister |
| 3619 |
------ |
| 3620 |
LR01: Test with a full listing with no diagnostics. |
| 3621 |
LR02: Test with a full listing with diagnostics. |
| 3622 |
LR03: Test abbreviated listing with no diagnostics. |
| 3623 |
LR04: Test abbreviated listing with diagnostics. |
| 3624 |
LR05: Test error context with nearby diagnostics. |
| 3625 |
|
| 3626 |
Boundary Cases |
| 3627 |
-------------- |
| 3628 |
Static analysis might preclude the need for |
| 3629 |
most of these tests. |
| 3630 |
BC01: Test what happens when memory runs out. |
| 3631 |
BC02: File with a single line of a megabyte. |
| 3632 |
BC03: File of a megabyte of EOLs. |
| 3633 |
BC04: Output file with an extremely long line. |
| 3634 |
BC05: Output file with one million lines. |
| 3635 |
BC06: Test on a file with very many macros. |
| 3636 |
|
| 3637 |
General |
| 3638 |
------- |
| 3639 |
GN01: A large legal input file exercising |
| 3640 |
as many features as possible. |
| 3641 |
1. Test listing file. |
| 3642 |
2. Test output files. |
| 3643 |
3. Test typeset file. |
| 3644 |
GN... A selection of ten real-life FunnelWeb files. |
| 3645 |
@<End verbatim@> |
| 3646 |
|
| 3647 |
@<FWDevMan subheading@>@(Platform-Specific Changes@) |
| 3648 |
|
| 3649 |
@<Boldthing@>@(Icon for the Macintosh:@) Currently no icon |
| 3650 |
is supplied for the Macintosh version of FunnelWeb. An icon |
| 3651 |
depicting a spider or a funnelled web of some kind would |
| 3652 |
seem appropriate. |
| 3653 |
|
| 3654 |
@<Nav@>@(@<Misc_versions FILE@>@,@<Misc FILE@>@,@<Misc_suggestions FILE@>@) |
| 3655 |
|
| 3656 |
@<End FWDevMan page@> |
| 3657 |
@} |
| 3658 |
|
| 3659 |
@!============================================================================== |
| 3660 |
|
| 3661 |
@$@<Misc_suggestions HEADING@>@M@{@<SH@>@(5.3@)Suggestions From Users@} |
| 3662 |
@$@<Misc_suggestions FILE@>@M@{misc_suggestions.html@} |
| 3663 |
@O@<misc_suggestions.html@>@{@- |
| 3664 |
@<Begin FWDevMan page/wide/H1@>@(@<Misc_suggestions HEADING@>@) |
| 3665 |
|
| 3666 |
@<P@>This page contains a list of features that FunnelWeb |
| 3667 |
users have suggested. The fact that a suggestion has been |
| 3668 |
made does not automatically mean that I agree with it or |
| 3669 |
that it will be implemented one day. However, most of the |
| 3670 |
suggestions are sound. |
| 3671 |
|
| 3672 |
@<P@>The number in square brackets after each suggestion |
| 3673 |
indicates the number of users who have suggested the |
| 3674 |
feature. |
| 3675 |
|
| 3676 |
@<P@>A quick look at this list suggests that future work on |
| 3677 |
FunnelWeb should be mainly directed towards improving its |
| 3678 |
typesetting facilities. |
| 3679 |
|
| 3680 |
@<P@> |
| 3681 |
@<Begin verbatim@> |
| 3682 |
General |
| 3683 |
------- |
| 3684 |
S: Integrate FW into the Borland C++ development environment. [1] |
| 3685 |
S: Add a feature for updating FW source files after the product |
| 3686 |
files have been modified. [1] |
| 3687 |
|
| 3688 |
Documentation |
| 3689 |
------------- |
| 3690 |
S: Improve the typesetting of the index. [1] |
| 3691 |
S: Add more entries to the index. [1] |
| 3692 |
S: Add a quick reference guide. [1] |
| 3693 |
|
| 3694 |
Scanner |
| 3695 |
------- |
| 3696 |
S: Fix the bug that makes FunnelWeb bomb on excceptionally long input |
| 3697 |
lines. [1] |
| 3698 |
S: If a closing @@} occurs at the start of a line, eliminate the |
| 3699 |
preceeding end of line. [1] |
| 3700 |
S: Allow TABS [1]. |
| 3701 |
S: The syntax is ugly. Redesign it. [2] |
| 3702 |
|
| 3703 |
Parser |
| 3704 |
------ |
| 3705 |
S: Add named parameters for macros. [1] |
| 3706 |
S: Add conditionals. [1] |
| 3707 |
S: Add a feature that enables the user to specify that all the |
| 3708 |
macros called within a particular macros be defined in the order |
| 3709 |
in which they are called. [1] |
| 3710 |
|
| 3711 |
Tangle |
| 3712 |
------ |
| 3713 |
S: Allow line-oriented substitution and so on rather than stream |
| 3714 |
oriented. [1] |
| 3715 |
|
| 3716 |
Weave |
| 3717 |
----- |
| 3718 |
S: Don't typeset non-leaf macros. This will avoid clutter. [1] |
| 3719 |
S: Teach FW C++ so it can typeset it nicely. [1] |
| 3720 |
S: Allow both FW text and TeX in the same document (two modes). [1] |
| 3721 |
S: Include greater support for typesetting a program as a book. [1] |
| 3722 |
"What we need is a facility for TANGLING small WEB files |
| 3723 |
into small source files, but WEAVING those same small |
| 3724 |
WEB files into a single large documentation file, without |
| 3725 |
the seams becoming apparent." |
| 3726 |
S: Add a new format: Microsoft Rich Text Format (RTF). [2] |
| 3727 |
S: Write a program to convert an RTF file into FunnelWeb source. |
| 3728 |
Then people can edit programs in MSWord and run them through |
| 3729 |
FunnelWeb. [1] |
| 3730 |
S: Detailed notes on indexing from one user: [1] |
| 3731 |
S: Add the ability to include typeset comments within program text. [2] |
| 3732 |
R: The @@[..@@] syntax has been reserved for this. |
| 3733 |
S: Add a new format: LaTeX. [1] |
| 3734 |
S: Add a new format: Plain ASCII text. [1] |
| 3735 |
S: Add a GENERIC language typesetting facility: [1] |
| 3736 |
|
| 3737 |
"Have you seen the program 'vgrind' (for TeX) or 'psgrind' (for |
| 3738 |
PostScript)? It contains a termcap-like database of programming |
| 3739 |
language features, e.g. format of a label, format of a |
| 3740 |
producedure/function, keyword listings, character string quoting |
| 3741 |
rules, etc. Perhaps this would be useful for FW?" |
| 3742 |
|
| 3743 |
S: Automatically generate an index. [1] |
| 3744 |
S: Allow @@" and @@" in documentation to typeset double quotes properly. [1] |
| 3745 |
S: Detailed comments from one correspondent: |
| 3746 |
"The ability to generate a cross reference of identifiers |
| 3747 |
(variables and functions) is essential. |
| 3748 |
|
| 3749 |
Constants are generally defined only in 1 place |
| 3750 |
and so a cross reference to the definition |
| 3751 |
macro is useful. |
| 3752 |
|
| 3753 |
Variables are generally declared in 1 place but |
| 3754 |
refered to and defined in multiple places. |
| 3755 |
A cross reference to the declaration site |
| 3756 |
is generally not useful. |
| 3757 |
|
| 3758 |
A cross reference to the site of use is |
| 3759 |
confusing, since there may be many, equally |
| 3760 |
important sites where the variable is assigned |
| 3761 |
a value. |
| 3762 |
|
| 3763 |
functions are generally unique and so a cross reference |
| 3764 |
to the site of definition (or declaration in |
| 3765 |
the absense of a definition) is useful. |
| 3766 |
|
| 3767 |
In FWEB (which I have used extensively recently) each instance |
| 3768 |
of use of an identifier contains a subscript which points |
| 3769 |
to the site of definition of the identifier (I think this |
| 3770 |
is what you refer to in the documents as a feature of the |
| 3771 |
original WEB.) The fact that locating identifiers requires |
| 3772 |
knowledge of the programming language is true." |
| 3773 |
|
| 3774 |
Documentation |
| 3775 |
------------- |
| 3776 |
Page 34, section 1.7.2, paragraph 2, last sentence: |
| 3777 |
"free text be default" should be "free text by default". |
| 3778 |
|
| 3779 |
Page 34, section 1.7.3, paragraph 1, 1st sentence: |
| 3780 |
"divide and conquor" should be "divide and conquer" |
| 3781 |
|
| 3782 |
Page 35, section 1.73, paragraph 2 on page 35: |
| 3783 |
"section heading at level n cannot....at level (n-1) or less." |
| 3784 |
I think this should be: |
| 3785 |
"section heading at level n cannot.. at less than level (n-1)" |
| 3786 |
Otherwise you are saying that level C cannot occur at B or less. |
| 3787 |
|
| 3788 |
Page 50, section 2.11, last paragraph, line 10 of para: |
| 3789 |
"excessibly" should be "excessively" |
| 3790 |
|
| 3791 |
In the example on p. 21, "... the string ``Hello World''" looks like a TeX |
| 3792 |
dependent hangover. |
| 3793 |
|
| 3794 |
The caption under Fig. 4, p.111 came out badly spaced on our system. |
| 3795 |
|
| 3796 |
Isn't it `holistic' rather than `wholistic?' |
| 3797 |
|
| 3798 |
There is often a need to have version dependent documentation as well |
| 3799 |
as version dependent code. It would be nice if there was a special |
| 3800 |
kind of macro that could run the output to a file through the |
| 3801 |
typesetter, i.e., generate TeX files. Meanwhile, you can get some |
| 3802 |
interesting effects by letting FunnelWeb generate .fw files! You |
| 3803 |
might like to mention this exciting possibility in V2 of the user |
| 3804 |
manual. |
| 3805 |
@<End verbatim@> |
| 3806 |
|
| 3807 |
@<Nav@>@(@<Misc_wishlist FILE@>@,@<Misc FILE@>@,@<Misc_knownbugs FILE@>@) |
| 3808 |
|
| 3809 |
@<End FWDevMan page@> |
| 3810 |
@} |
| 3811 |
|
| 3812 |
@!============================================================================== |
| 3813 |
|
| 3814 |
@$@<Misc_knownbugs HEADING@>@M@{@<SH@>@(5.4@)Known Bugs@} |
| 3815 |
@$@<Misc_knownbugs FILE@>@M@{misc_knownbugs.html@} |
| 3816 |
@O@<misc_knownbugs.html@>@{@- |
| 3817 |
@<Begin FWDevMan page/wide/H1@>@(@<Misc_knownbugs HEADING@>@) |
| 3818 |
|
| 3819 |
@<FWDevMan subheading@>@(FunnelWeb 3.2 (May 1999)@) |
| 3820 |
|
| 3821 |
@<P@>A bug exists, at least in the Macintosh version, where FunnelWeb V3.2 |
| 3822 |
hangs when fed the following file: |
| 3823 |
|
| 3824 |
@<P@> |
| 3825 |
@<Begin verbatim@> |
| 3826 |
@=# |
| 3827 |
@O@<X@>@{@<Y@>@} |
| 3828 |
@$@<Y@>@M@{@<Z@>@(@<Y@>@)@} |
| 3829 |
@$@<Z@>@(@1@)@{@1@} |
| 3830 |
#=@ |
| 3831 |
@<End verbatim@> |
| 3832 |
|
| 3833 |
@<P@>FunnelWeb has always (since V1 in 1986) had macro |
| 3834 |
recursion detection, but it appears to fail in this case. |
| 3835 |
You can workaround this bug by eliminating all recursive |
| 3836 |
macro invocations. |
| 3837 |
|
| 3838 |
@<P@> |
| 3839 |
@<HR@> |
| 3840 |
|
| 3841 |
@<P@>A bug exists in the output line length monitoring of |
| 3842 |
FunnelWeb V3.2. If you set the pragma @<TT@>@(indentation |
| 3843 |
= none@), FunnelWeb still counts the output line lengths |
| 3844 |
as if they are being indented, even though they aren't. |
| 3845 |
You can workaround this by ignoring the output file line |
| 3846 |
length errors or by setting: |
| 3847 |
|
| 3848 |
@<P@> |
| 3849 |
@<Begin verbatim@> |
| 3850 |
@@p maximum_output_line_length = infinity |
| 3851 |
@<End verbatim@> |
| 3852 |
|
| 3853 |
@<P@>The following source code patch has been proposed, but |
| 3854 |
not yet tested: |
| 3855 |
|
| 3856 |
@<P@> |
| 3857 |
@<Begin verbatim@> |
| 3858 |
In tangle.c, the code: |
| 3859 |
|
| 3860 |
/* Output an EOL with indentation if desired. */ |
| 3861 |
if (tgindent) |
| 3862 |
eolblank(ind_base); |
| 3863 |
else |
| 3864 |
wf_chr(&f_o,EOL); |
| 3865 |
ind_curr=ind_base; |
| 3866 |
|
| 3867 |
should be changed to: |
| 3868 |
|
| 3869 |
/* Output an EOL with indentation if desired. */ |
| 3870 |
if (tgindent) |
| 3871 |
{ eolblank(ind_base); ind_curr=ind_base; } |
| 3872 |
else |
| 3873 |
{ wf_chr(&f_o,EOL); ind_curr=0; } |
| 3874 |
@<End verbatim@> |
| 3875 |
|
| 3876 |
@<Nav/last@>@(@<Misc_suggestions FILE@>@,@<Misc FILE@>@,@<Misc FILE@>@) |
| 3877 |
|
| 3878 |
@<End FWDevMan page@> |
| 3879 |
@} |
| 3880 |
|
| 3881 |
@!****************************************************************************** |
| 3882 |
|
| 3883 |
@$@<Copyright FILE@>@M@{copyright.html@} |
| 3884 |
@O@<copyright.html@>@{@- |
| 3885 |
@<Begin FWDevMan page/H1@>@(Copyright and Credits@) |
| 3886 |
|
| 3887 |
@<FunnelWeb webs copyright page contents@> |
| 3888 |
|
| 3889 |
@<End FWDevMan page@> |
| 3890 |
@} |
| 3891 |
|
| 3892 |
@!****************************************************************************** |
| 3893 |
|
| 3894 |
@$@<GPL HEADING@>@M@{@<SH@>@(6@)GNU General Public License Version 2@} |
| 3895 |
@$@<GPL HEADING/short@>@M@{@<SH@>@(6@)Licence@} |
| 3896 |
@$@<GPL FILE@>@M@{gpl.html@} |
| 3897 |
@O@<gpl.html@>@{@- |
| 3898 |
@<Begin FWDevMan page/wide/H1@>@(@<GPL HEADING@>@) |
| 3899 |
|
| 3900 |
@<P@>This page contains a verbatim copy of Version@<_@>2 of the GNU |
| 3901 |
General Public License under which the FunnelWeb computer program is |
| 3902 |
released. Note that the FunnelWeb documentation is released and |
| 3903 |
under a much simpler license that does not allow modifications. |
| 3904 |
|
| 3905 |
@<P@> |
| 3906 |
<HR> |
| 3907 |
|
| 3908 |
@<P@> |
| 3909 |
@<Begin verbatim@> |
| 3910 |
GNU GENERAL PUBLIC LICENSE |
| 3911 |
Version 2, June 1991 |
| 3912 |
|
| 3913 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
| 3914 |
675 Mass Ave, Cambridge, MA 02139, USA |
| 3915 |
Everyone is permitted to copy and distribute verbatim copies |
| 3916 |
of this license document, but changing it is not allowed. |
| 3917 |
|
| 3918 |
Preamble |
| 3919 |
|
| 3920 |
The licenses for most software are designed to take away your |
| 3921 |
freedom to share and change it. By contrast, the GNU General Public |
| 3922 |
License is intended to guarantee your freedom to share and change free |
| 3923 |
software--to make sure the software is free for all its users. This |
| 3924 |
General Public License applies to most of the Free Software |
| 3925 |
Foundation's software and to any other program whose authors commit to |
| 3926 |
using it. (Some other Free Software Foundation software is covered by |
| 3927 |
the GNU Library General Public License instead.) You can apply it to |
| 3928 |
your programs, too. |
| 3929 |
|
| 3930 |
When we speak of free software, we are referring to freedom, not |
| 3931 |
price. Our General Public Licenses are designed to make sure that you |
| 3932 |
have the freedom to distribute copies of free software (and charge for |
| 3933 |
this service if you wish), that you receive source code or can get it |
| 3934 |
if you want it, that you can change the software or use pieces of it |
| 3935 |
in new free programs; and that you know you can do these things. |
| 3936 |
|
| 3937 |
To protect your rights, we need to make restrictions that forbid |
| 3938 |
anyone to deny you these rights or to ask you to surrender the rights. |
| 3939 |
These restrictions translate to certain responsibilities for you if you |
| 3940 |
distribute copies of the software, or if you modify it. |
| 3941 |
|
| 3942 |
For example, if you distribute copies of such a program, whether |
| 3943 |
gratis or for a fee, you must give the recipients all the rights that |
| 3944 |
you have. You must make sure that they, too, receive or can get the |
| 3945 |
source code. And you must show them these terms so they know their |
| 3946 |
rights. |
| 3947 |
|
| 3948 |
We protect your rights with two steps: (1) copyright the software, and |
| 3949 |
(2) offer you this license which gives you legal permission to copy, |
| 3950 |
distribute and/or modify the software. |
| 3951 |
|
| 3952 |
Also, for each author's protection and ours, we want to make certain |
| 3953 |
that everyone understands that there is no warranty for this free |
| 3954 |
software. If the software is modified by someone else and passed on, we |
| 3955 |
want its recipients to know that what they have is not the original, so |
| 3956 |
that any problems introduced by others will not reflect on the original |
| 3957 |
authors' reputations. |
| 3958 |
|
| 3959 |
Finally, any free program is threatened constantly by software |
| 3960 |
patents. We wish to avoid the danger that redistributors of a free |
| 3961 |
program will individually obtain patent licenses, in effect making the |
| 3962 |
program proprietary. To prevent this, we have made it clear that any |
| 3963 |
patent must be licensed for everyone's free use or not licensed at all. |
| 3964 |
|
| 3965 |
The precise terms and conditions for copying, distribution and |
| 3966 |
modification follow. |
| 3967 |
|
| 3968 |
GNU GENERAL PUBLIC LICENSE |
| 3969 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 3970 |
|
| 3971 |
0. This License applies to any program or other work which contains |
| 3972 |
a notice placed by the copyright holder saying it may be distributed |
| 3973 |
under the terms of this General Public License. The "Program", below, |
| 3974 |
refers to any such program or work, and a "work based on the Program" |
| 3975 |
means either the Program or any derivative work under copyright law: |
| 3976 |
that is to say, a work containing the Program or a portion of it, |
| 3977 |
either verbatim or with modifications and/or translated into another |
| 3978 |
language. (Hereinafter, translation is included without limitation in |
| 3979 |
the term "modification".) Each licensee is addressed as "you". |
| 3980 |
|
| 3981 |
Activities other than copying, distribution and modification are not |
| 3982 |
covered by this License; they are outside its scope. The act of |
| 3983 |
running the Program is not restricted, and the output from the Program |
| 3984 |
is covered only if its contents constitute a work based on the |
| 3985 |
Program (independent of having been made by running the Program). |
| 3986 |
Whether that is true depends on what the Program does. |
| 3987 |
|
| 3988 |
1. You may copy and distribute verbatim copies of the Program's |
| 3989 |
source code as you receive it, in any medium, provided that you |
| 3990 |
conspicuously and appropriately publish on each copy an appropriate |
| 3991 |
copyright notice and disclaimer of warranty; keep intact all the |
| 3992 |
notices that refer to this License and to the absence of any warranty; |
| 3993 |
and give any other recipients of the Program a copy of this License |
| 3994 |
along with the Program. |
| 3995 |
|
| 3996 |
You may charge a fee for the physical act of transferring a copy, and |
| 3997 |
you may at your option offer warranty protection in exchange for a fee. |
| 3998 |
|
| 3999 |
2. You may modify your copy or copies of the Program or any portion |
| 4000 |
of it, thus forming a work based on the Program, and copy and |
| 4001 |
distribute such modifications or work under the terms of Section 1 |
| 4002 |
above, provided that you also meet all of these conditions: |
| 4003 |
|
| 4004 |
a) You must cause the modified files to carry prominent notices |
| 4005 |
stating that you changed the files and the date of any change. |
| 4006 |
|
| 4007 |
b) You must cause any work that you distribute or publish, that in |
| 4008 |
whole or in part contains or is derived from the Program or any |
| 4009 |
part thereof, to be licensed as a whole at no charge to all third |
| 4010 |
parties under the terms of this License. |
| 4011 |
|
| 4012 |
c) If the modified program normally reads commands interactively |
| 4013 |
when run, you must cause it, when started running for such |
| 4014 |
interactive use in the most ordinary way, to print or display an |
| 4015 |
announcement including an appropriate copyright notice and a |
| 4016 |
notice that there is no warranty (or else, saying that you provide |
| 4017 |
a warranty) and that users may redistribute the program under |
| 4018 |
these conditions, and telling the user how to view a copy of this |
| 4019 |
License. (Exception: if the Program itself is interactive but |
| 4020 |
does not normally print such an announcement, your work based on |
| 4021 |
the Program is not required to print an announcement.) |
| 4022 |
|
| 4023 |
These requirements apply to the modified work as a whole. If |
| 4024 |
identifiable sections of that work are not derived from the Program, |
| 4025 |
and can be reasonably considered independent and separate works in |
| 4026 |
themselves, then this License, and its terms, do not apply to those |
| 4027 |
sections when you distribute them as separate works. But when you |
| 4028 |
distribute the same sections as part of a whole which is a work based |
| 4029 |
on the Program, the distribution of the whole must be on the terms of |
| 4030 |
this License, whose permissions for other licensees extend to the |
| 4031 |
entire whole, and thus to each and every part regardless of who wrote it. |
| 4032 |
|
| 4033 |
Thus, it is not the intent of this section to claim rights or contest |
| 4034 |
your rights to work written entirely by you; rather, the intent is to |
| 4035 |
exercise the right to control the distribution of derivative or |
| 4036 |
collective works based on the Program. |
| 4037 |
|
| 4038 |
In addition, mere aggregation of another work not based on the Program |
| 4039 |
with the Program (or with a work based on the Program) on a volume of |
| 4040 |
a storage or distribution medium does not bring the other work under |
| 4041 |
the scope of this License. |
| 4042 |
|
| 4043 |
3. You may copy and distribute the Program (or a work based on it, |
| 4044 |
under Section 2) in object code or executable form under the terms of |
| 4045 |
Sections 1 and 2 above provided that you also do one of the following: |
| 4046 |
|
| 4047 |
a) Accompany it with the complete corresponding machine-readable |
| 4048 |
source code, which must be distributed under the terms of Sections |
| 4049 |
1 and 2 above on a medium customarily used for software interchange; or, |
| 4050 |
|
| 4051 |
b) Accompany it with a written offer, valid for at least three |
| 4052 |
years, to give any third party, for a charge no more than your |
| 4053 |
cost of physically performing source distribution, a complete |
| 4054 |
machine-readable copy of the corresponding source code, to be |
| 4055 |
distributed under the terms of Sections 1 and 2 above on a medium |
| 4056 |
customarily used for software interchange; or, |
| 4057 |
|
| 4058 |
c) Accompany it with the information you received as to the offer |
| 4059 |
to distribute corresponding source code. (This alternative is |
| 4060 |
allowed only for noncommercial distribution and only if you |
| 4061 |
received the program in object code or executable form with such |
| 4062 |
an offer, in accord with Subsection b above.) |
| 4063 |
|
| 4064 |
The source code for a work means the preferred form of the work for |
| 4065 |
making modifications to it. For an executable work, complete source |
| 4066 |
code means all the source code for all modules it contains, plus any |
| 4067 |
associated interface definition files, plus the scripts used to |
| 4068 |
control compilation and installation of the executable. However, as a |
| 4069 |
special exception, the source code distributed need not include |
| 4070 |
anything that is normally distributed (in either source or binary |
| 4071 |
form) with the major components (compiler, kernel, and so on) of the |
| 4072 |
operating system on which the executable runs, unless that component |
| 4073 |
itself accompanies the executable. |
| 4074 |
|
| 4075 |
If distribution of executable or object code is made by offering |
| 4076 |
access to copy from a designated place, then offering equivalent |
| 4077 |
access to copy the source code from the same place counts as |
| 4078 |
distribution of the source code, even though third parties are not |
| 4079 |
compelled to copy the source along with the object code. |
| 4080 |
|
| 4081 |
4. You may not copy, modify, sublicense, or distribute the Program |
| 4082 |
except as expressly provided under this License. Any attempt |
| 4083 |
otherwise to copy, modify, sublicense or distribute the Program is |
| 4084 |
void, and will automatically terminate your rights under this License. |
| 4085 |
However, parties who have received copies, or rights, from you under |
| 4086 |
this License will not have their licenses terminated so long as such |
| 4087 |
parties remain in full compliance. |
| 4088 |
|
| 4089 |
5. You are not required to accept this License, since you have not |
| 4090 |
signed it. However, nothing else grants you permission to modify or |
| 4091 |
distribute the Program or its derivative works. These actions are |
| 4092 |
prohibited by law if you do not accept this License. Therefore, by |
| 4093 |
modifying or distributing the Program (or any work based on the |
| 4094 |
Program), you indicate your acceptance of this License to do so, and |
| 4095 |
all its terms and conditions for copying, distributing or modifying |
| 4096 |
the Program or works based on it. |
| 4097 |
|
| 4098 |
6. Each time you redistribute the Program (or any work based on the |
| 4099 |
Program), the recipient automatically receives a license from the |
| 4100 |
original licensor to copy, distribute or modify the Program subject to |
| 4101 |
these terms and conditions. You may not impose any further |
| 4102 |
restrictions on the recipients' exercise of the rights granted herein. |
| 4103 |
You are not responsible for enforcing compliance by third parties to |
| 4104 |
this License. |
| 4105 |
|
| 4106 |
7. If, as a consequence of a court judgment or allegation of patent |
| 4107 |
infringement or for any other reason (not limited to patent issues), |
| 4108 |
conditions are imposed on you (whether by court order, agreement or |
| 4109 |
otherwise) that contradict the conditions of this License, they do not |
| 4110 |
excuse you from the conditions of this License. If you cannot |
| 4111 |
distribute so as to satisfy simultaneously your obligations under this |
| 4112 |
License and any other pertinent obligations, then as a consequence you |
| 4113 |
may not distribute the Program at all. For example, if a patent |
| 4114 |
license would not permit royalty-free redistribution of the Program by |
| 4115 |
all those who receive copies directly or indirectly through you, then |
| 4116 |
the only way you could satisfy both it and this License would be to |
| 4117 |
refrain entirely from distribution of the Program. |
| 4118 |
|
| 4119 |
If any portion of this section is held invalid or unenforceable under |
| 4120 |
any particular circumstance, the balance of the section is intended to |
| 4121 |
apply and the section as a whole is intended to apply in other |
| 4122 |
circumstances. |
| 4123 |
|
| 4124 |
It is not the purpose of this section to induce you to infringe any |
| 4125 |
patents or other property right claims or to contest validity of any |
| 4126 |
such claims; this section has the sole purpose of protecting the |
| 4127 |
integrity of the free software distribution system, which is |
| 4128 |
implemented by public license practices. Many people have made |
| 4129 |
generous contributions to the wide range of software distributed |
| 4130 |
through that system in reliance on consistent application of that |
| 4131 |
system; it is up to the author/donor to decide if he or she is willing |
| 4132 |
to distribute software through any other system and a licensee cannot |
| 4133 |
impose that choice. |
| 4134 |
|
| 4135 |
This section is intended to make thoroughly clear what is believed to |
| 4136 |
be a consequence of the rest of this License. |
| 4137 |
|
| 4138 |
8. If the distribution and/or use of the Program is restricted in |
| 4139 |
certain countries either by patents or by copyrighted interfaces, the |
| 4140 |
original copyright holder who places the Program under this License |
| 4141 |
may add an explicit geographical distribution limitation excluding |
| 4142 |
those countries, so that distribution is permitted only in or among |
| 4143 |
countries not thus excluded. In such case, this License incorporates |
| 4144 |
the limitation as if written in the body of this License. |
| 4145 |
|
| 4146 |
9. The Free Software Foundation may publish revised and/or new versions |
| 4147 |
of the General Public License from time to time. Such new versions will |
| 4148 |
be similar in spirit to the present version, but may differ in detail to |
| 4149 |
address new problems or concerns. |
| 4150 |
|
| 4151 |
Each version is given a distinguishing version number. If the Program |
| 4152 |
specifies a version number of this License which applies to it and "any |
| 4153 |
later version", you have the option of following the terms and conditions |
| 4154 |
either of that version or of any later version published by the Free |
| 4155 |
Software Foundation. If the Program does not specify a version number of |
| 4156 |
this License, you may choose any version ever published by the Free Software |
| 4157 |
Foundation. |
| 4158 |
|
| 4159 |
10. If you wish to incorporate parts of the Program into other free |
| 4160 |
programs whose distribution conditions are different, write to the author |
| 4161 |
to ask for permission. For software which is copyrighted by the Free |
| 4162 |
Software Foundation, write to the Free Software Foundation; we sometimes |
| 4163 |
make exceptions for this. Our decision will be guided by the two goals |
| 4164 |
of preserving the free status of all derivatives of our free software and |
| 4165 |
of promoting the sharing and reuse of software generally. |
| 4166 |
|
| 4167 |
NO WARRANTY |
| 4168 |
|
| 4169 |
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
| 4170 |
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
| 4171 |
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
| 4172 |
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
| 4173 |
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 4174 |
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
| 4175 |
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
| 4176 |
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
| 4177 |
REPAIR OR CORRECTION. |
| 4178 |
|
| 4179 |
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
| 4180 |
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
| 4181 |
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
| 4182 |
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
| 4183 |
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
| 4184 |
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
| 4185 |
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
| 4186 |
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
| 4187 |
POSSIBILITY OF SUCH DAMAGES. |
| 4188 |
|
| 4189 |
END OF TERMS AND CONDITIONS |
| 4190 |
|
| 4191 |
Appendix: How to Apply These Terms to Your New Programs |
| 4192 |
|
| 4193 |
If you develop a new program, and you want it to be of the greatest |
| 4194 |
possible use to the public, the best way to achieve this is to make it |
| 4195 |
free software which everyone can redistribute and change under these terms. |
| 4196 |
|
| 4197 |
To do so, attach the following notices to the program. It is safest |
| 4198 |
to attach them to the start of each source file to most effectively |
| 4199 |
convey the exclusion of warranty; and each file should have at least |
| 4200 |
the "copyright" line and a pointer to where the full notice is found. |
| 4201 |
|
| 4202 |
@<<@>one line to give the program's name and a brief idea of what it does.@<>@> |
| 4203 |
Copyright (C) 19yy @<<@>name of author@<>@> |
| 4204 |
|
| 4205 |
This program is free software; you can redistribute it and/or modify |
| 4206 |
it under the terms of the GNU General Public License as published by |
| 4207 |
the Free Software Foundation; either version 2 of the License, or |
| 4208 |
(at your option) any later version. |
| 4209 |
|
| 4210 |
This program is distributed in the hope that it will be useful, |
| 4211 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 4212 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 4213 |
GNU General Public License for more details. |
| 4214 |
|
| 4215 |
You should have received a copy of the GNU General Public License |
| 4216 |
along with this program; if not, write to the Free Software |
| 4217 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 4218 |
|
| 4219 |
Also add information on how to contact you by electronic and paper mail. |
| 4220 |
|
| 4221 |
If the program is interactive, make it output a short notice like this |
| 4222 |
when it starts in an interactive mode: |
| 4223 |
|
| 4224 |
Gnomovision version 69, Copyright (C) 19yy name of author |
| 4225 |
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details |
| 4226 |
type `show w'. |
| 4227 |
This is free software, and you are welcome to redistribute it |
| 4228 |
under certain conditions; type `show c' for details. |
| 4229 |
|
| 4230 |
The hypothetical commands `show w' and `show c' should show the appropriate |
| 4231 |
parts of the General Public License. Of course, the commands you use may |
| 4232 |
be called something other than `show w' and `show c'; they could even be |
| 4233 |
mouse-clicks or menu items--whatever suits your program. |
| 4234 |
|
| 4235 |
You should also get your employer (if you work as a programmer) or your |
| 4236 |
school, if any, to sign a "copyright disclaimer" for the program, if |
| 4237 |
necessary. Here is a sample; alter the names: |
| 4238 |
|
| 4239 |
Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
| 4240 |
`Gnomovision' (which makes passes at compilers) written by James Hacker. |
| 4241 |
|
| 4242 |
@<<@>signature of Ty Coon@<>@>, 1 April 1989 |
| 4243 |
Ty Coon, President of Vice |
| 4244 |
|
| 4245 |
This General Public License does not permit incorporating your program into |
| 4246 |
proprietary programs. If your program is a subroutine library, you may |
| 4247 |
consider it more useful to permit linking proprietary applications with the |
| 4248 |
library. If this is what you want to do, use the GNU Library General |
| 4249 |
Public License instead of this License. |
| 4250 |
@<End verbatim@> |
| 4251 |
|
| 4252 |
@<Nav/last@>@(@<Misc FILE@>@,@<Index FILE@>@,@<Index FILE@>@) |
| 4253 |
|
| 4254 |
@<End FWDevMan page@> |
| 4255 |
@} |
| 4256 |
|
| 4257 |
@!****************************************************************************** |
| 4258 |
|
| 4259 |
@B@<Search Form Section@> |
| 4260 |
|
| 4261 |
The files in this section are all linked in with the FunnelWeb |
| 4262 |
include file. |
| 4263 |
|
| 4264 |
@O@<search.html@>@{@- |
| 4265 |
@<Begin FWDevMan page/H1@>@(Search FunnelWeb Documentation@) |
| 4266 |
|
| 4267 |
@<FunnelWeb search form@>@(@,@,@,checked@) |
| 4268 |
|
| 4269 |
@<End FWDevMan page@> |
| 4270 |
@} |
| 4271 |
|
| 4272 |
@!============================================================================== |
| 4273 |
|
| 4274 |
@O@<search_form.cgi@>@{@- |
| 4275 |
@<FunnelWeb search CGICODE@> |
| 4276 |
@} |
| 4277 |
|
| 4278 |
@!============================================================================== |
| 4279 |
|
| 4280 |
@O@<search_head.txt@>@{@- |
| 4281 |
@<Begin FWDevMan page/H1@>@(Search Results@) |
| 4282 |
@<P@> |
| 4283 |
@} |
| 4284 |
|
| 4285 |
@!============================================================================== |
| 4286 |
|
| 4287 |
@O@<search_tail.txt@>@{@- |
| 4288 |
@<BR@> |
| 4289 |
@<P@>@<Back button@>@(Back To The Search Form@) |
| 4290 |
@<BR@> |
| 4291 |
|
| 4292 |
@<End FWDevMan page@> |
| 4293 |
@} |
| 4294 |
|
| 4295 |
@!============================================================================== |
| 4296 |
|
| 4297 |
@O@<search_e_nokeywords.txt@>@{@- |
| 4298 |
@<Begin FWDevMan page/H1@>@(Error: No Keywords Specified@) |
| 4299 |
|
| 4300 |
@<P@>You must specify one or more keywords to perform a search. |
| 4301 |
|
| 4302 |
@<P@>@<Back button@>@(Back To The Search Form@) |
| 4303 |
|
| 4304 |
@<End FWDevMan page@> |
| 4305 |
@} |
| 4306 |
|
| 4307 |
@!============================================================================== |
| 4308 |
|
| 4309 |
@O@<search_e_nomanual.txt@>@{@- |
| 4310 |
@<Begin FWDevMan page/H1@>@(Error: No Manual Selected@) |
| 4311 |
|
| 4312 |
@<P@>You must specify one or more manuals (using the checkboxes) to |
| 4313 |
perform a search. |
| 4314 |
|
| 4315 |
@<P@>@<Back button@>@(Back To The Search Form@) |
| 4316 |
|
| 4317 |
@<End FWDevMan page@> |
| 4318 |
@} |
| 4319 |
|
| 4320 |
@!****************************************************************************** |
| 4321 |
|
| 4322 |
@O@<0cleanup.vxf@>@{@- |
| 4323 |
eneo *.html |
| 4324 |
eneo *.shtml |
| 4325 |
eneo *.cgi |
| 4326 |
eneo *.txt |
| 4327 |
eneo *.lis |
| 4328 |
eneo *.pl |
| 4329 |
@} |
| 4330 |
|
| 4331 |
@!****************************************************************************** |
| 4332 |
@!****************************************************************************** |
| 4333 |
|
| 4334 |
@! Include the FunnelWeb webs master include file. |
| 4335 |
@! Specify a platform-specific relative (or absolute) path to the include file. |
| 4336 |
@! Unix : @i ../0fw_inc.fwi |
| 4337 |
@! MacOS : @i ::0fw_inc.fwi |
| 4338 |
@! OpenVMS : @i [-]0fw_inc.fwi |
| 4339 |
|
| 4340 |
@i ::0fw_inc.fwi |
| 4341 |
@i ::0www_style.fwi |
| 4342 |
@i ::0www_links.fwi |
| 4343 |
@i ::0www_ross.fwi |
| 4344 |
|
| 4345 |
@!****************************************************************************** |
| 4346 |
@!****************************************************************************** |