Debian Codegraph @

0fw_inc.fwi

raw
1 @!345678901234567890123456789012345678901234567890123456789012345678901234567890
2 @!******************************************************************************
3 @!
4 @! FunnelWeb Macros For The FunnelWeb Webspace
5 @! -------------------------------------------
6 @! Copyright (c) Ross N. Williams 1999. All rights reserved.
7 @!
8 @! Permission is granted to distribute, modify, and use this file provided
9 @! that these notices are retained and all modifications are logged below.
10 @! To the extent permitted by law there is ABSOLUTELY NO WARRANTY.
11 @!
12 @! Modifications:
13 @! 30-Dec-1999 RNW Signed off for public release.
14 @! 03-Jan-2000 RNW Revised copyright permission notice.
15 @! 03-Jan-2000 RNW Added original/mirror macros.
16 @!
17 @! RNW = Ross N. Williams ([email protected]).
18 @!
19 @!******************************************************************************
20
21 @p maximum_input_line_length = 200
22
23 @A@<FunnelWeb Website Include Macros@>
24
25 @!******************************************************************************
26
27 @B@<Web Parameters@>
28
29 Set these parameters before generating the webs.
30
31 This web is deployed in two context. In the first context, the web is deployed
32 as the original main FunnelWeb web at http://www.ross.net/funnelweb/ and
33 all its scripts work. In the second context the web is a mirror of the original
34 and either appears somewhere on the world wide web, or on someone's disk to be
35 surfed directly. In the mirror context, the scripts will not work.
36
37 Choose the context you want by commenting/uncommenting the following macros.
38
39 @! Uncomment these when you are generating the original web.
40 @! @$@<IFOriginal@>@(@1@)@Z@M@{@1@}
41 @! @$@<IFCopy@>@(@1@)@Z@M@{@}
42
43 @! Uncomment these when you are generating a copy.
44 @$@<IFOriginal@>@(@1@)@Z@M@{@}
45 @$@<IFCopy@>@(@1@)@Z@M@{@1@}
46
47 @$@<CopyDate@>@Z@M@{9@<_@>January@<_@>2000@}
48
49 @$@<FunnelWeb manual version notice@>@Z@M@{@-
50 @<P@>@<B@>@(@<Size4@>@(Version 3.2d (9 Jan 2000) for FunnelWeb V3.2@)@)@}
51
52 @!******************************************************************************
53
54
55 @$@<FunnelWeb Main Web@>@Z@M@{@-
56 @<WindowLink@>@(@<FunnelWeb WWW@>index.shtml@,@-
57 @<FunnelWeb WINDOWNAME@>@,FunnelWeb Main Web@)@}
58
59 @$@<FunnelWeb Reference Manual@>@Z@M@{@-
60 @<WindowLink@>@(@<FunnelWeb Reference WWW@>index.html@,@-
61 @<FunnelWeb Reference WINDOWNAME@>@,FunnelWeb Reference Manual@)@}
62
63 @$@<FunnelWeb Tutorial Manual@>@Z@M@{@-
64 @<WindowLink@>@(@<FunnelWeb Tutorial WWW@>index.html@,@-
65 @<FunnelWeb Tutorial WINDOWNAME@>@,FunnelWeb Tutorial Manual@)@}
66
67 @$@<FunnelWeb Developer Manual@>@Z@M@{@-
68 @<WindowLink@>@(@<FunnelWeb Developer WWW@>index.html@,@-
69 @<FunnelWeb Developer WINDOWNAME@>@,FunnelWeb Developer Manual@)@}
70
71 @$@<FunnelWeb linklogo IMAGE@>@Z@M@{
72 @<WindowLink@>@(@<FunnelWeb WWW@>index.shtml@,@<FunnelWeb WINDOWNAME@>@,
73 <IMG SRC="@<Bin@>linklogo.gif"
74 WIDTH="64" HEIGHT="32"
75 BORDER="0" ALT="FunnelWeb"
76 HSPACE="0" VSPACE="1">@)@}
77
78 @$@<RossNet linklogo IMAGE@>@Z@M@{
79 @<WindowLink@>@(@<Ross root WWW@>@,@<Ross Root WINDOWNAME@>@,
80 <IMG SRC="@<Bin@>rossnet_logo.gif"
81 WIDTH="64" HEIGHT="32"
82 BORDER="0" ALT="RossNet"
83 HSPACE="0" VSPACE="1">@)@}
84
85 @$@<Nav@>@(@3@)@Z@M@{
86 @<P@>
87 <TABLE WIDTH="100%">
88 <TR>
89 <TD ALIGN="left" VALIGN="bottom"><A HREF="@1">@<Left IMAGE@></A></TD>
90 <TD ALIGN="center" VALIGN="bottom"><A HREF="@2">@<Up IMAGE@></A></TD>
91 <TD ALIGN="right" VALIGN="bottom"><A HREF="@3">@<Right IMAGE@></A></TD>
92 </TR>
93 </TABLE>
94 @}
95
96 @$@<Nav/first@>@(@3@)@Z@M@{
97 @<P@>
98 <TABLE WIDTH="100%">
99 <TR>
100 <TD ALIGN="left" VALIGN="bottom"><A HREF="@1">@<Up IMAGE@></A></TD>
101 <TD ALIGN="center" VALIGN="bottom"><A HREF="@2">@<Up IMAGE@></A></TD>
102 <TD ALIGN="right" VALIGN="bottom"><A HREF="@3">@<Right IMAGE@></A></TD>
103 </TR>
104 </TABLE>
105 @}
106
107 @$@<Nav/last@>@(@3@)@Z@M@{
108 @<P@>
109 <TABLE WIDTH="100%">
110 <TR>
111 <TD ALIGN="left" VALIGN="bottom"><A HREF="@1">@<Left IMAGE@></A></TD>
112 <TD ALIGN="center" VALIGN="bottom"><A HREF="@2">@<Up IMAGE@></A></TD>
113 <TD ALIGN="right" VALIGN="bottom"><A HREF="@3">@<Up IMAGE@></A></TD>
114 </TR>
115 </TABLE>
116 @}
117
118 @$@<Left IMAGE@>@M@{<IMG SRC="@<Bin@>fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev">@}
119 @$@<Up IMAGE@>@M@{<IMG SRC="@<Bin@>fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up">@}
120 @$@<Right IMAGE@>@M@{<IMG SRC="@<Bin@>fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next">@}
121
122 @$@<email me@>@Z@M@{<A HREF="mailto:@<Ross personal EMAIL@>">email me</A>@}
123
124
125 @$@<FunnelWeb webs copyright page contents@>@M@{
126 @<FunnelWeb subheading@>@(Copyright Of The FunnelWeb Program@)
127
128 @<P@>The FunnelWeb is made available under the GNU General Public
129 Licence Version 2. See the @<FunnelWeb Developer Manual@> for
130 a complete copy of this licence.
131
132 @<FunnelWeb subheading@>@(Copyright Of The FunnelWeb Webs@)
133
134 @<P@>The entire contents of the following webs:
135
136 @<P@>
137 @<Begin indent@>
138 @<FunnelWeb@>@<BR@>
139 @<FunnelWeb Reference Manual@>@<BR@>
140 @<FunnelWeb Tutorial Manual@>@<BR@>
141 @<FunnelWeb Developer Manual@>@<BR@>
142 @<End indent@>
143
144 @<P@>including, without limitation, all text, images, and
145 sounds are copyright as follows:
146
147 @<P@>
148 @<Begin center@>
149 @<Strong@>@(Copyright @<(C)@> Ross N. Williams 1992,1999. All rights reserved.@)
150 @<End center@>
151
152 @! Was the following until 30-Dec-1999.
153 @! @<P@>You are free to make verbatim copies of these webs for
154 @! private or internal organizational use. You may also
155 @! distribute verbatim copies of these webs as documentation
156 @! accompanying FunnelWeb executables or source code. However,
157 @! you must not place any part of these webs online publicly as
158 @! web pages.
159
160 @! New message as at 30-Dec-1999:
161 @<FunnelWeb documentation permission notice@>
162
163 @<FunnelWeb subheading@>@(Trademarks@)
164
165 @<P@>
166 @<B@>@(Macintosh@) is a trademark of @<Apple Computer@>@<BR@>
167 @<B@>@(MS-DOS@) is a trademark of @<Microsoft@>.@<BR@>
168 @<B@>@(Rocksoft@) is a registered trademark of @<Rocksoft Pty Ltd@>, Australia.@<BR@>
169 @<B@>@(Unix@) is a registered trademark of @<AT&T@>.@<BR@>
170 @<B@>@(VAX@) and @<B@>@(OpenVMS@) are trademarks of @<Digital Equipment Corporation@>.@<BR@>
171
172 @<FunnelWeb subheading@>@(Questions@)
173
174 @<P@>Please @<email me@> if you have any other questions about
175 the intellectual property aspects of FunnelWeb.
176
177 @<FunnelWeb subheading@>@(Credits@)
178
179 @<P@>@<FunnelWeb@> was conceived, designed and implemented
180 by @<Ross Williams@> in 1986, 1992, and 1999. The FunnelWeb
181 webs were originally written by @<Ross Williams@> in 1992 in
182 the form of a printed manual, and converted by him to webs
183 in April 1999.
184
185 @<P@>FunnelWeb was the main tool used to create these
186 FunnelWeb webs. Each web was written as a single FunnelWeb
187 @<TT@>@(.fw@) file which, when processed by FunnelWeb,
188 generates all the @<TT@>@(.shtml@) files.
189
190 @<P@>I would like to thank a number of
191 people who assisted me (@<Ross Williams@>) during the
192 creation of FunnelWeb.
193
194 @<P@>Many thanks to @<David Hulse@> for translating the
195 original version of FunnelWeb (FunnelWeb V1) from Ada into C
196 (FunnelWeb V2) and getting it to work on Unix and a PC. The
197 C code written by David (FunnelWeb V2) formed the basis of
198 FunnelWeb V3.
199
200 @<P@>Thanks go to @<Simon Hackett@> of
201 @<Internode Systems@> for the use of his Sun, Mac, and PC,
202 for assistance in porting FunnelWeb to the Sun and PC,
203 and for helpful discussions.
204
205 @<P@>Thanks go to @<Jeremy Begg@> of @<VSM Software Services@>
206 for the use of his VAX, and for assistance with the VMS-specific code.
207
208 @<P@>Thanks to @<Barry Dwyer@>
209 and @<Roger Brissenden@>
210 for trying out FunnelWeb Version 1 in 1987 and providing valuable feedback.
211
212 @<P@>Thanks to @<Donald Knuth@>
213 for establishing the idea of literate programming in the first place.
214 @}
215
216 @$@<FunnelWeb subheading@>@(@1@)@Z@M@L@{@-
217 @<P@>@<BR@>@<Size4@>@(@<B@>@(@1@)@)@<BR@>@}
218
219
220 @$@<FunnelWeb documentation permission notice@>@M@{@-
221 @<P@>Permission is granted to redistribute and use this manual in
222 any medium, with or without modification, provided that all
223 notices (including, without limitation, the copyright
224 notice, this permission notice, any record of modification,
225 and all legal notices) are preserved on all copies, that all
226 modifications are clearly marked, and that modified versions
227 are not represented as the original version unless all the
228 modifications since the manual's original release by
229 @<Ross N. Williams@> (@<www.ross.net@>) consist of translations or other
230 transformations that alter only the manual's form, not its
231 content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY
232 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
233 LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
234 FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY
235 LAW THERE IS ABSOLUTELY NO WARRANTY.@}
236
237 @!==============================================================================
238
239 @$@<Header comment@>@Z@M@{@-
240 <!--
241 ***********************************************************************
242 FUNNELWEB MANUAL WEB PAGE
243 =========================
244 Copyright (c) Ross N. Williams 1992,1999. All rights reserved.
245
246 Permission is granted to redistribute and use this manual in
247 any medium, with or without modification, provided that all
248 notices (including, without limitation, the copyright
249 notice, this permission notice, any record of modification,
250 and all legal notices) are preserved on all copies, that all
251 modifications are clearly marked, and that modified versions
252 are not represented as the original version unless all the
253 modifications since the manual's original release by Ross N.
254 Williams (www.ross.net) consist of translations or other
255 transformations that alter only the manual's form, not its
256 content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY
257 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
258 LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
259 FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY
260 LAW THERE IS ABSOLUTELY NO WARRANTY.
261
262 ***********************************************************************
263 -->
264 @}
265
266 @$@<Trailer comment@>@Z@M@{@-
267 <!-- *********************************************************************** -->
268 <!-- End Of A FunnelWeb Manual Web Page (www.ross.net/funnelweb/) -->
269 <!-- *********************************************************************** -->
270 @}
271
272 @!******************************************************************************
273
274 @B@<Searching The FunnelWeb Webs@>
275
276 @$@<FunnelWeb_search keyword ARG@>@Z@M@{keywords@}
277 @$@<FunnelWeb_search main ARG@>@Z@M@{main@}
278 @$@<FunnelWeb_search reference ARG@>@Z@M@{reference@}
279 @$@<FunnelWeb_search tutorial ARG@>@Z@M@{tutorial@}
280 @$@<FunnelWeb_search developer ARG@>@Z@M@{developer@}
281
282 @! Including web must define the following files.
283 @$@<FunnelWeb_search FILE@>@Z@M@{search.html@}
284 @$@<FunnelWeb_search CGIFORMFILE@>@Z@M@{search_form.cgi@}
285 @$@<FunnelWeb_search_e_nokeywords FILE@>@Z@M@{search_e_nokeywords.txt@}
286 @$@<FunnelWeb_search_e_nomanual FILE@>@Z@M@{search_e_nomanual.txt@}
287 @$@<FunnelWeb_search_head FILE@>@Z@M@{search_head.txt@}
288 @$@<FunnelWeb_search_tail FILE@>@Z@M@{search_tail.txt@}
289
290 @$@<FunnelWeb dir path/abs/noslash@>@M@{@-
291 @<Ross dir path/abs/noslash@>/funnelweb@}
292
293 @$@<FunnelWeb_reference dir path/abs/noslash@>@M@{@-
294 @<FunnelWeb dir path/abs/noslash@>/reference@}
295
296 @$@<FunnelWeb_tutorial dir path/abs/noslash@>@M@{@-
297 @<FunnelWeb dir path/abs/noslash@>/tutorial@}
298
299 @$@<FunnelWeb_developer dir path/abs/noslash@>@M@{@-
300 @<FunnelWeb dir path/abs/noslash@>/developer@}
301
302 @!==============================================================================
303
304 @$@<FunnelWeb search form@>@(@4@)@Z@{@-
305 @<P@>Information about FunnelWeb is divided into the main FunnelWeb
306 web and the Tutorial, Reference, and Developer manual webs. Choose
307 a combination of manuals to search, and enter one or more keywords.
308
309 @<P@>
310 @<Begin form/action@>@(@<FunnelWeb_search CGIFORMFILE@>@)
311
312 <input type=checkbox name="@<FunnelWeb_search main ARG@>" value="Y" @1>
313 @<FunnelWeb@> Main Web (General information)@<BR@>
314
315 <input type=checkbox name="@<FunnelWeb_search reference ARG@>" value="Y" @2>
316 @<FunnelWeb Reference Manual@> (Official definition)@<BR@>
317
318 <input type=checkbox name="@<FunnelWeb_search tutorial ARG@>" value="Y" @3>
319 @<FunnelWeb Tutorial Manual@> (Tutorial and hints)@<BR@>
320
321 <input type=checkbox name="@<FunnelWeb_search developer ARG@>" value="Y" @4>
322 @<FunnelWeb Developer Manual@> (How to compile)@<BR@>
323
324 @<BR@>
325 @<Form textfield@>@(@<FunnelWeb_search keyword ARG@>@,40@)@<BR@>
326 @<Begin size1@>
327 * Enter one or more words or word prefixes separated by spaces.@<BR@>
328 * Matching is case insensitive.@<BR@>
329 * Finds all pages containing at least one word.@<BR@>
330 * Add the word AND to find pages containing all the words.@<BR@>
331 * Searching will not work in offline copies of this web.@<BR@>
332 @<End size1@>
333
334 @<BR@>
335 @<Form submit button@>@(Search@)
336
337 @<IFCopy@>@(
338 @<Boldthing@>@(Note:@) This search facility is
339 @<Blink@>@(@<B@>@(UNAVAILABLE@)@) because it invokes PERL
340 scripts specific to the original web's webserver, and you
341 are currently browsing a @<B@>@(copy@) of the
342 original online web. If you need to perform a search, visit the
343 search page in the
344 @<WindowLink@>@(@<FunnelWeb WWW/abs@>@,@-
345 @<FunnelWeb WINDOWNAME@>@,Official Online FunnelWeb Website@).
346 @)
347
348 @<End form/nosubmitbutton@>
349 @}
350
351 @!==============================================================================
352
353 @$@<FunnelWeb search CGICODE@>@Z@{@-
354 @<Begin www.ross.net CGI/PERL script@>
355
356 &form_parse_and_clean();
357
358 $arg_keywords = $form{"@<FunnelWeb_search keyword ARG@>"};
359 $arg_main = $form{"@<FunnelWeb_search main ARG@>"} ne '';
360 $arg_reference = $form{"@<FunnelWeb_search reference ARG@>"} ne '';
361 $arg_tutorial = $form{"@<FunnelWeb_search tutorial ARG@>"} ne '';
362 $arg_developer = $form{"@<FunnelWeb_search developer ARG@>"} ne '';
363
364 if ($arg_keywords eq '')
365 { &html_page('@<FunnelWeb_search_e_nokeywords FILE@>'); }
366 if ((!$arg_main) && (!$arg_reference) && (!$arg_tutorial) && (!$arg_developer))
367 { &html_page('@<FunnelWeb_search_e_nomanual FILE@>'); }
368
369 &search_parse_keywords($arg_keywords);
370 &search_notice_and_or;
371 &search_zap_stop_words;
372 $search_blank_target=1;
373
374 &html_write_standard_content_header;
375 &file_echo('@<FunnelWeb_search_head FILE@>');
376
377 $arg_keywords_tamed = &html_tame($arg_keywords);
378 print "<P>Searching for: <B>$arg_keywords_tamed</B><BR>\n";
379
380 $page_count = 0;
381
382 if ($arg_main)
383 {
384 print "<P><FONT SIZE=3><B><U>FunnelWeb Main Web</U></B></FONT><BR>";
385 @@search_dir_required = ('@<FunnelWeb dir path/abs/noslash@>');
386 @@search_dir_excluded = ('@<FunnelWeb dir path/abs/noslash@>/');
387 @@search_file_required = ('.shtml');
388 @@search_file_excluded = ();
389 $search_target='@<FunnelWeb WINDOWNAME@>';
390 $page_count += &search_tree('@<FunnelWeb dir path/abs/noslash@>',
391 '@<FunnelWeb WWW/abs@>');
392 }
393
394 if ($arg_reference)
395 {
396 print "<P><FONT SIZE=3><B><U>FunnelWeb Reference Manual</U></B></FONT><BR>";
397 @@search_dir_required = ('@<FunnelWeb_reference dir path/abs/noslash@>');
398 @@search_dir_excluded = ('');
399 @@search_file_required = ('.html');
400 @@search_file_excluded = ();
401 $search_target='@<FunnelWeb Reference WINDOWNAME@>';
402 $page_count += &search_tree('@<FunnelWeb_reference dir path/abs/noslash@>',
403 '@<FunnelWeb_reference WWW/abs@>');
404 }
405
406 if ($arg_tutorial)
407 {
408 print "<P><FONT SIZE=3><B><U>FunnelWeb Tutorial Manual</U></B></FONT><BR>";
409 @@search_dir_required = ('@<FunnelWeb_tutorial dir path/abs/noslash@>');
410 @@search_dir_excluded = ('');
411 @@search_file_required = ('.html');
412 @@search_file_excluded = ();
413 $search_target='@<FunnelWeb Tutorial WINDOWNAME@>';
414 $page_count += &search_tree('@<FunnelWeb_tutorial dir path/abs/noslash@>',
415 '@<FunnelWeb_tutorial WWW/abs@>');
416 }
417
418 if ($arg_developer)
419 {
420 print "<P><FONT SIZE=3><B><U>FunnelWeb Developer Manual</U></B></FONT><BR>";
421 @@search_dir_required = ('@<FunnelWeb_developer dir path/abs/noslash@>');
422 @@search_dir_excluded = ('');
423 @@search_file_required = ('.html');
424 @@search_file_excluded = ();
425 $search_target='@<FunnelWeb Developer WINDOWNAME@>';
426 $page_count += &search_tree('@<FunnelWeb_developer dir path/abs/noslash@>',
427 '@<FunnelWeb_developer WWW/abs@>');
428 }
429
430 &file_echo('@<FunnelWeb_search_tail FILE@>');
431
432 $email_from = "@<Ross web EMAIL/backslash@>";
433 $email_to = "@<Ross webmaster EMAIL/backslash@>";
434 $email_subj = "FunnelWeb: Someone searched for \"$arg_keywords\".";
435 &email_open;
436 &email_line("Someone just performed a FunnelWeb web search:");
437 &email_line("");
438 &email_line(" Keywords : $arg_keywords");
439 $webs_searched = '';
440 if ($arg_main ) { $webs_searched .= ' Main'; }
441 if ($arg_reference) { $webs_searched .= ' Reference'; }
442 if ($arg_tutorial ) { $webs_searched .= ' Tutorial'; }
443 if ($arg_developer) { $webs_searched .= ' Developer'; }
444 &email_line(" Searched :$webs_searched");
445 &email_line(" Result : $page_count pages found");
446 &email_line(" Visitor : $ENV{'REMOTE_HOST'}");
447 &email_line(" Referer : $ENV{'HTTP_REFERER'}");
448 &email_line("");
449 &email_line("A FunnelWeb Web");
450 &email_line("@<FunnelWeb WWW/abs@>");
451 &email_close;
452
453 @<End www.ross.net CGI/PERL script@>
454 @}
455
456 @!******************************************************************************