File: 0fw_inc.fwi

package info (click to toggle)
funnelweb-doc 3.2b-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,084 kB
  • ctags: 6
  • sloc: perl: 241; makefile: 41
file content (406 lines) | stat: -rw-r--r-- 15,313 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
@!345678901234567890123456789012345678901234567890123456789012345678901234567890
@!******************************************************************************
@!
@! FunnelWeb Macros For The FunnelWeb Webspace
@! -------------------------------------------
@! Copyright (c) Ross N. Williams 1999. All rights reserved.
@!
@! Permission is granted to distribute, modify, and use this file provided
@! that these notices are retained and all modifications are logged below.
@! To the extent permitted by law there is ABSOLUTELY NO WARRANTY.
@!
@! Modifications:
@!    30-Dec-1999 RNW Signed off for public release.
@!
@! RNW = Ross N. Williams (ross@ross.net).
@!
@!******************************************************************************

@p maximum_input_line_length = 200

@$@<FunnelWeb Main Web@>@Z@M@{@-
@<WindowLink@>@(@<FunnelWeb WWW@>index.shtml@,@-
@<FunnelWeb WINDOWNAME@>@,FunnelWeb Main Web@)@}

@$@<FunnelWeb Reference Manual@>@Z@M@{@-
@<WindowLink@>@(@<FunnelWeb Reference WWW@>index.html@,@-
@<FunnelWeb Reference WINDOWNAME@>@,FunnelWeb Reference Manual@)@}

@$@<FunnelWeb Tutorial Manual@>@Z@M@{@-
@<WindowLink@>@(@<FunnelWeb Tutorial WWW@>index.html@,@-
@<FunnelWeb Tutorial WINDOWNAME@>@,FunnelWeb Tutorial Manual@)@}

@$@<FunnelWeb Developer Manual@>@Z@M@{@-
@<WindowLink@>@(@<FunnelWeb Developer WWW@>index.html@,@-
@<FunnelWeb Developer WINDOWNAME@>@,FunnelWeb Developer Manual@)@}

@$@<FunnelWeb linklogo IMAGE@>@Z@M@{
@<WindowLink@>@(@<FunnelWeb WWW@>index.shtml@,@<FunnelWeb WINDOWNAME@>@,
<IMG SRC="@<Bin@>linklogo.gif"
 WIDTH="64" HEIGHT="32"
 BORDER="0" ALT="FunnelWeb"
 HSPACE="0" VSPACE="1">@)@}

@$@<RossNet linklogo IMAGE@>@Z@M@{
@<WindowLink@>@(@<Ross root WWW@>@,@<Ross Root WINDOWNAME@>@,
<IMG SRC="@<Bin@>rossnet_logo.gif"
 WIDTH="64" HEIGHT="32"
 BORDER="0" ALT="RossNet"
 HSPACE="0" VSPACE="1">@)@}

@$@<Nav@>@(@3@)@Z@M@{
@<P@>
<TABLE WIDTH="100%">
<TR>
<TD ALIGN="left"   VALIGN="bottom"><A HREF="@1">@<Left IMAGE@></A></TD>
<TD ALIGN="center" VALIGN="bottom"><A HREF="@2">@<Up IMAGE@></A></TD>
<TD ALIGN="right"  VALIGN="bottom"><A HREF="@3">@<Right IMAGE@></A></TD>
</TR>
</TABLE>
@}

@$@<Nav/first@>@(@3@)@Z@M@{
@<P@>
<TABLE WIDTH="100%">
<TR>
<TD ALIGN="left"   VALIGN="bottom"><A HREF="@1">@<Up IMAGE@></A></TD>
<TD ALIGN="center" VALIGN="bottom"><A HREF="@2">@<Up IMAGE@></A></TD>
<TD ALIGN="right"  VALIGN="bottom"><A HREF="@3">@<Right IMAGE@></A></TD>
</TR>
</TABLE>
@}

@$@<Nav/last@>@(@3@)@Z@M@{
@<P@>
<TABLE WIDTH="100%">
<TR>
<TD ALIGN="left"   VALIGN="bottom"><A HREF="@1">@<Left IMAGE@></A></TD>
<TD ALIGN="center" VALIGN="bottom"><A HREF="@2">@<Up IMAGE@></A></TD>
<TD ALIGN="right"  VALIGN="bottom"><A HREF="@3">@<Up IMAGE@></A></TD>
</TR>
</TABLE>
@}

@$@<Left IMAGE@>@M@{<IMG SRC="@<Bin@>fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev">@}
@$@<Up IMAGE@>@M@{<IMG SRC="@<Bin@>fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up">@}
@$@<Right IMAGE@>@M@{<IMG SRC="@<Bin@>fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next">@}

@$@<email me@>@Z@M@{<A HREF="mailto:@<Ross personal EMAIL@>">email me</A>@}


@$@<FunnelWeb webs copyright page contents@>@M@{
@<FunnelWeb subheading@>@(Copyright Of The FunnelWeb Program@)

@<P@>The FunnelWeb is made available under the GNU General Public
Licence Version 2. See the @<FunnelWeb Developer Manual@> for
a complete copy of this licence.

@<FunnelWeb subheading@>@(Copyright Of The FunnelWeb Webs@)

@<P@>The entire contents of the following webs:

@<P@>
@<Begin indent@>
@<FunnelWeb@>@<BR@>
@<FunnelWeb Reference Manual@>@<BR@>
@<FunnelWeb Tutorial Manual@>@<BR@>
@<FunnelWeb Developer Manual@>@<BR@>
@<End indent@>

@<P@>including, without limitation, all text, images, and
sounds are copyright as follows:

@<P@>
@<Begin center@>
@<Strong@>@(Copyright @<(C)@> Ross N. Williams 1992,1999. All rights reserved.@)
@<End center@>

@! Was the following until 30-Dec-1999.
@! @<P@>You are free to make verbatim copies of these webs for
@! private or internal organizational use. You may also
@! distribute verbatim copies of these webs as documentation
@! accompanying FunnelWeb executables or source code. However,
@! you must not place any part of these webs online publicly as
@! web pages.

@! New message as at 30-Dec-1999:
@<FunnelWeb documentation permission notice@>

@<FunnelWeb subheading@>@(Trademarks@)

@<P@>
@<B@>@(Macintosh@) is a trademark of @<Apple Computer@>@<BR@>
@<B@>@(MS-DOS@) is a trademark of @<Microsoft@>.@<BR@>
@<B@>@(Rocksoft@) is a registered trademark of @<Rocksoft Pty Ltd@>, Australia.@<BR@>
@<B@>@(Unix@) is a registered trademark of @<AT&T@>.@<BR@>
@<B@>@(VAX@) and @<B@>@(OpenVMS@) are trademarks of @<Digital Equipment Corporation@>.@<BR@>

@<FunnelWeb subheading@>@(Questions@)

@<P@>Please @<email me@> if you have any other questions about
the intellectual property aspects of FunnelWeb.

@<FunnelWeb subheading@>@(Credits@)

@<P@>@<FunnelWeb@> was conceived, designed and implemented
by @<Ross Williams@> in 1986, 1992, and 1999. The FunnelWeb
webs were originally written by @<Ross Williams@> in 1992 in
the form of a printed manual, and converted by him to webs
in April 1999.

@<P@>FunnelWeb was the main tool used to create these
FunnelWeb webs. Each web was written as a single FunnelWeb
@<TT@>@(.fw@) file which, when processed by FunnelWeb,
generates all the @<TT@>@(.shtml@) files.

@<P@>I would like to thank a number of
people who assisted me (@<Ross Williams@>) during the
creation of FunnelWeb.

@<P@>Many thanks to @<David Hulse@> for translating the
original version of FunnelWeb (FunnelWeb V1) from Ada into C
(FunnelWeb V2) and getting it to work on Unix and a PC. The
C code written by David (FunnelWeb V2) formed the basis of
FunnelWeb V3.

@<P@>Thanks go to @<Simon Hackett@> of
@<Internode Systems@> for the use of his Sun, Mac, and PC,
for assistance in porting FunnelWeb to the Sun and PC,
and for helpful discussions.

@<P@>Thanks go to @<Jeremy Begg@> of @<VSM Software Services@>
for the use of his VAX, and for assistance with the VMS-specific code.

@<P@>Thanks to @<Barry Dwyer@>
and @<Roger Brissenden@>
for trying out FunnelWeb Version 1 in 1987 and providing valuable feedback.

@<P@>Thanks to @<Donald Knuth@>
for establishing the idea of literate programming in the first place.
@}

@$@<FunnelWeb subheading@>@(@1@)@Z@M@L@{@-
@<P@>@<BR@>@<Size4@>@(@<B@>@(@1@)@)@<BR@>@}


@$@<FunnelWeb documentation permission notice@>@M@{@-
@<P@>Permission is granted to make and distribute verbatim copies of
this FunnelWeb manual provided that all notices (including, without
limitation, the copyright notice, this permission notice, any record
of modification, and all legal notices) are preserved on all copies.
Modified versions of this manual, including translations to other
languages, may be distributed under the same terms, provided that each
modification made to the manual since its original release by
@<Ross N. Williams@> (@<URL/http@>@(www.ross.net@)) is identified on the page
on which it occurs, and the front page of the manual carries a notice
notifying the reader that changes have been made, and referring the
reader to the official FunnelWeb website at
@<URL/http@>@(www.ross.net/funnelweb/@). To the extent permitted by
law there is ABSOLUTELY NO WARRANTY.@}

@!==============================================================================

@$@<Header comment@>@Z@M@{@-
<!--
***********************************************************************
FUNNELWEB MANUAL WEB PAGE
=========================
Copyright (c) Ross N. Williams 1995-1999. All rights reserved.

Permission is granted to make and distribute verbatim copies of this
FunnelWeb manual provided that all notices (including, without
limitation, the copyright notice, this permission notice, any record
of modification, and all legal notices) are preserved on all copies.
Modified versions of this manual, including translations to other
languages, may be distributed under the same terms, provided that each
modification made to the manual since its original release by Ross N.
Williams (www.ross.net) is identified on the page on which it occurs,
and the front page of the manual carries a notice notifying the reader
that changes have been made, and referring the reader to the official
FunnelWeb website at www.ross.net/funnelweb/.

To the extent permitted by law there is ABSOLUTELY NO WARRANTY.

***********************************************************************
-->
@}

@$@<Trailer comment@>@Z@M@{@-
<!-- *********************************************************************** -->
<!--      End Of A FunnelWeb Manual Web Page (www.ross.net/funnelweb/)       -->
<!-- *********************************************************************** -->
@}

@!******************************************************************************

@B@<Searching The FunnelWeb Webs@>

@$@<FunnelWeb_search keyword ARG@>@Z@M@{keywords@}
@$@<FunnelWeb_search main ARG@>@Z@M@{main@}
@$@<FunnelWeb_search reference ARG@>@Z@M@{reference@}
@$@<FunnelWeb_search tutorial ARG@>@Z@M@{tutorial@}
@$@<FunnelWeb_search developer ARG@>@Z@M@{developer@}

@! Including web must define the following files.
@$@<FunnelWeb_search FILE@>@Z@M@{search.html@}
@$@<FunnelWeb_search CGIFORMFILE@>@Z@M@{search_form.cgi@}
@$@<FunnelWeb_search_e_nokeywords FILE@>@Z@M@{search_e_nokeywords.txt@}
@$@<FunnelWeb_search_e_nomanual FILE@>@Z@M@{search_e_nomanual.txt@}
@$@<FunnelWeb_search_head FILE@>@Z@M@{search_head.txt@}
@$@<FunnelWeb_search_tail FILE@>@Z@M@{search_tail.txt@}

@$@<FunnelWeb dir path/abs/noslash@>@M@{@-
@<Ross dir path/abs/noslash@>/funnelweb@}

@$@<FunnelWeb_reference dir path/abs/noslash@>@M@{@-
@<FunnelWeb dir path/abs/noslash@>/reference@}

@$@<FunnelWeb_tutorial dir path/abs/noslash@>@M@{@-
@<FunnelWeb dir path/abs/noslash@>/tutorial@}

@$@<FunnelWeb_developer dir path/abs/noslash@>@M@{@-
@<FunnelWeb dir path/abs/noslash@>/developer@}

@!==============================================================================

@$@<FunnelWeb search form@>@(@4@)@Z@{@-
@<P@>Information about FunnelWeb is divided into the main FunnelWeb
web and the Tutorial, Reference, and Developer manual webs. Choose
a combination of manuals to search, and enter one or more keywords.

@<P@>
@<Begin form/action@>@(@<FunnelWeb_search CGIFORMFILE@>@)

<input type=checkbox name="@<FunnelWeb_search main ARG@>" value="Y" @1>
   @<FunnelWeb@> Main Web (General information)@<BR@>

<input type=checkbox name="@<FunnelWeb_search reference ARG@>" value="Y" @2>
   @<FunnelWeb Reference Manual@> (Official definition)@<BR@>

<input type=checkbox name="@<FunnelWeb_search tutorial ARG@>" value="Y" @3>
   @<FunnelWeb Tutorial Manual@> (Tutorial and hints)@<BR@>

<input type=checkbox name="@<FunnelWeb_search developer ARG@>" value="Y" @4>
   @<FunnelWeb Developer Manual@> (How to compile)@<BR@>

@<BR@>
@<Form textfield@>@(@<FunnelWeb_search keyword ARG@>@,40@)@<BR@>
@<Begin size1@>
* Enter one or more words or word prefixes separated by spaces.@<BR@>
* Matching is case insensitive.@<BR@>
* Finds all pages containing at least one word.@<BR@>
* Add the word AND to find pages containing all the words.@<BR@>
* Searching will not work in offline copies of this web.@<BR@>
@<End size1@>

@<BR@>
@<Form submit button@>@(Search@)
@<End form/nosubmitbutton@>
@}

@!==============================================================================

@$@<FunnelWeb search CGICODE@>@Z@{@-
@<Begin www.ross.net CGI/PERL script@>

&form_parse_and_clean();

$arg_keywords  = $form{"@<FunnelWeb_search keyword ARG@>"};
$arg_main      = $form{"@<FunnelWeb_search main ARG@>"}      ne '';
$arg_reference = $form{"@<FunnelWeb_search reference ARG@>"} ne '';
$arg_tutorial  = $form{"@<FunnelWeb_search tutorial ARG@>"}  ne '';
$arg_developer = $form{"@<FunnelWeb_search developer ARG@>"}  ne '';

if ($arg_keywords eq '')
  { &html_page('@<FunnelWeb_search_e_nokeywords FILE@>'); }
if ((!$arg_main) && (!$arg_reference) && (!$arg_tutorial) && (!$arg_developer))
  { &html_page('@<FunnelWeb_search_e_nomanual FILE@>'); }

&search_parse_keywords($arg_keywords);
&search_notice_and_or;
&search_zap_stop_words;
$search_blank_target=1;

&html_write_standard_content_header;
&file_echo('@<FunnelWeb_search_head FILE@>');

$arg_keywords_tamed = &html_tame($arg_keywords);
print "<P>Searching for: <B>$arg_keywords_tamed</B><BR>\n";

$page_count = 0;

if ($arg_main)
  {
   print "<P><FONT SIZE=3><B><U>FunnelWeb Main Web</U></B></FONT><BR>";
   @@search_dir_required  = ('@<FunnelWeb dir path/abs/noslash@>');
   @@search_dir_excluded  = ('@<FunnelWeb dir path/abs/noslash@>/');
   @@search_file_required = ('.shtml');
   @@search_file_excluded = ();
   $search_target='@<FunnelWeb WINDOWNAME@>';
   $page_count += &search_tree('@<FunnelWeb dir path/abs/noslash@>',
                               '@<FunnelWeb WWW/abs@>');
  }

if ($arg_reference)
  {
   print "<P><FONT SIZE=3><B><U>FunnelWeb Reference Manual</U></B></FONT><BR>";
   @@search_dir_required  = ('@<FunnelWeb_reference dir path/abs/noslash@>');
   @@search_dir_excluded  = ('');
   @@search_file_required = ('.html');
   @@search_file_excluded = ();
   $search_target='@<FunnelWeb Reference WINDOWNAME@>';
   $page_count += &search_tree('@<FunnelWeb_reference dir path/abs/noslash@>',
                               '@<FunnelWeb_reference WWW/abs@>');
  }

if ($arg_tutorial)
  {
   print "<P><FONT SIZE=3><B><U>FunnelWeb Tutorial Manual</U></B></FONT><BR>";
   @@search_dir_required  = ('@<FunnelWeb_tutorial dir path/abs/noslash@>');
   @@search_dir_excluded  = ('');
   @@search_file_required = ('.html');
   @@search_file_excluded = ();
   $search_target='@<FunnelWeb Tutorial WINDOWNAME@>';
   $page_count += &search_tree('@<FunnelWeb_tutorial dir path/abs/noslash@>',
                               '@<FunnelWeb_tutorial WWW/abs@>');
  }

if ($arg_developer)
  {
   print "<P><FONT SIZE=3><B><U>FunnelWeb Developer Manual</U></B></FONT><BR>";
   @@search_dir_required  = ('@<FunnelWeb_developer dir path/abs/noslash@>');
   @@search_dir_excluded  = ('');
   @@search_file_required = ('.html');
   @@search_file_excluded = ();
   $search_target='@<FunnelWeb Developer WINDOWNAME@>';
   $page_count += &search_tree('@<FunnelWeb_developer dir path/abs/noslash@>',
                               '@<FunnelWeb_developer WWW/abs@>');
  }

&file_echo('@<FunnelWeb_search_tail FILE@>');

$email_from = "@<Ross web EMAIL/backslash@>";
$email_to   = "@<Ross webmaster EMAIL/backslash@>";
$email_subj = "FunnelWeb: Someone searched for \"$arg_keywords\".";
&email_open;
&email_line("Someone just performed a FunnelWeb web search:");
&email_line("");
&email_line("   Keywords : $arg_keywords");
$webs_searched = '';
if ($arg_main     ) { $webs_searched .= ' Main'; }
if ($arg_reference) { $webs_searched .= ' Reference'; }
if ($arg_tutorial ) { $webs_searched .= ' Tutorial'; }
if ($arg_developer) { $webs_searched .= ' Developer'; }
&email_line("   Searched :$webs_searched");
&email_line("   Result   : $page_count pages found");
&email_line("   Visitor  : $ENV{'REMOTE_HOST'}");
&email_line("   Referer  : $ENV{'HTTP_REFERER'}");
&email_line("");
&email_line("A FunnelWeb Web");
&email_line("@<FunnelWeb WWW/abs@>");
&email_close;

@<End www.ross.net CGI/PERL script@>
@}

@!******************************************************************************