bumped version
[privoxy.git] / doc / source / developer-manual.sgml
1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[
2 <!entity % dummy "IGNORE"> 
3 <!entity supported SYSTEM "supported.sgml">
4 <!entity newfeatures SYSTEM "newfeatures.sgml">
5 <!entity p-intro SYSTEM "privoxy.sgml">
6 <!entity history SYSTEM "history.sgml">
7 <!entity seealso SYSTEM "seealso.sgml">
8 <!entity contacting SYSTEM "contacting.sgml">
9 <!entity copyright SYSTEM "copyright.sgml">
10 <!entity p-version "2.9.15">
11 <!entity p-status "beta">
12 <!entity % p-not-stable "INCLUDE">
13 <!entity % p-stable "IGNORE">
14 <!entity % p-text "IGNORE">        <!-- define we are not a text only doc -->
15 <!entity % p-doc "INCLUDE">        <!-- and we are a formal doc           -->
16 ]>
17 <!--
18  File        :  $Source: /cvsroot/ijbswa/current/doc/source/developer-manual.sgml,v $
19
20  Purpose     :  developer manual
21                 This file belongs into
22                 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
23                 
24  $Id: developer-manual.sgml,v 1.40 2002/05/04 00:43:43 hal9 Exp $
25
26  Written by and Copyright (C) 2001 the SourceForge
27  Privoxy team. http://www.privoxy.org/
28
29  Based on the Internet Junkbuster originally written
30  by and Copyright (C) 1997 Anonymous Coders and 
31  Junkbusters Corporation.  http://www.junkbusters.com
32
33
34  ========================================================================
35  NOTE: Please read developer-manual/documentation.html before touching 
36  anything in this, or other Privoxy documentation. You have been warned!
37  Failure to abide by this rule will result in the revocation of your license 
38  to live a peaceful existence!
39  ========================================================================
40
41 -->
42
43 <article id="index">
44   <artheader>
45     <title>Privoxy Developer Manual</title>
46
47     <pubdate>$Id: developer-manual.sgml,v 1.40 2002/05/04 00:43:43 hal9 Exp $</pubdate>
48
49     <authorgroup>
50       <author>
51         <affiliation>
52           <orgname>By: Privoxy Developers</orgname>
53         </affiliation>
54       </author>
55     </authorgroup>
56
57     <abstract>
58 <![%dummy;[
59  <para>
60  <comment>
61   This is here to keep vim syntax file from breaking :/
62   If I knew enough to fix it, I would.
63   PLEASE DO NOT REMOVE! HB: hal@foobox.net
64  </comment>
65  </para>
66  ]]>
67 <para>
68  The developer manual gives the users information on how to help the developer
69  team. It provides guidance on coding, testing, documentation and other
70  issues. 
71  </para>
72
73 <!-- Include privoxy.sgml boilerplate text: -->
74
75 <!--  &p-intro; Someone interested enough in the project to contribute
76                 will already know at this point what Privoxy is. -->
77
78 <!-- end boilerplate -->
79
80 <para>
81  You can find the latest version of the this manual at <ulink
82  url="http://www.privoxy.org/developer-manual/">http://www.privoxy.org/developer-manual/</ulink>.
83  Please see <ulink url="contact.html">the Contact section</ulink> 
84  on how to contact the developers.
85 </para>
86
87 <!--        <para> -->
88 <!--    Feel free to send a note to the developers at <email>ijbswa-developers@lists.sourceforge.net</email>. -->
89 <!--   </para> -->
90
91     </abstract>
92   </artheader>
93
94
95 <!--   ~~~~~       New section      ~~~~~     -->
96   <sect1 id="introduction"><title>Introduction</title>
97 <!--
98
99  I don't like seeing blank space :) So added *something* here.
100
101  --> 
102     <para>
103      <application>Privoxy</application>, as an heir to
104      <application>Junkbuster</application>, is an Open Source project 
105      and licensed under the GPL. As such, <application>Privoxy</application>
106      development is potentially open to anyone who has the time, knowledge,
107      and desire to contribute in any capacity. Our goals are simply to
108      continue the mission, to improve <application>Privoxy</application>, and
109      to make it available to as wide an audience as possible. 
110     </para>
111     <para>
112      One does not have to be a programmer to contribute. Packaging, testing,
113      and porting, are all important jobs as well.
114     </para>
115
116   <!--   ~~~~~       New section      ~~~~~     -->
117   <sect2 id="quickstart"><title>Quickstart to Privoxy Development</title>
118     <para>
119       You'll need an account on <ulink
120       url="http://sourceforge.net/">Sourceforge</ulink> to support our
121       development.  Mail your ID to <ulink
122       url="mailto:developers@privoxy.org">the list</ulink> and wait until a
123       project manager has added you.
124     </para>
125     <para>
126       For the time being (read, this section is under construction), please
127       refer to the extensive comments in the source code.
128     </para>
129    </sect2>
130   </sect1>
131
132   <!--   ~~~~~       New section      ~~~~~     -->
133   <sect1 id="cvs"><title>The CVS Repository</title>
134     <para>
135       If you intend to help us with programming, documentation or packaging
136       you will need write access to our holy grail, the CVS repository.
137       Please read this chapter completely before accessing via CVS.
138     </para>
139
140     <sect2 id="cvsaccess"><title>Access to CVS</title>
141       <para>
142         The project's CVS repository is hosted on
143         <ulink url="http://sourceforge.net/">SourceForge.</ulink>
144         Please refer to the chapters 6 and 7 in
145         <ulink url="http://sourceforge.net/docman/?group_id=1">SF's site
146         documentation</ulink> for the technical access details for your
147         operating system. For historical reasons, the CVS server is
148         called <literal>cvs.ijbswa.sourceforge.net</literal>, the repository is
149         called <literal>ijbswa</literal>, and the source tree module is called
150         <literal>current</literal>.
151       </para>
152     </sect2>
153
154     <sect2 id="cvscommit"><title>CVS Commit Guideline</title>
155       <para>
156         The source tree is the heart of every software project. Every effort must
157         be made to ensure that it is readable, compilable and consistent at all
158         times. We therefore ask anyone with CVS access to strictly adhere to the
159         following guidelines:
160         <itemizedlist>
161           <listitem><para>
162             Never (read: <emphasis>never, ever</emphasis>) be tempted to commit
163             that small change without testing it thoroughly first. When we're
164             close to a public release, ask a fellow developer to review your 
165             changes.
166           </para></listitem>
167           <listitem><para>
168             Your commit message should give a concise overview of <emphasis>what you
169             changed</emphasis> (no big details) and <emphasis>why you changed it</emphasis>
170             Just check previous messages for good examples.
171           </para></listitem>
172           <listitem><para>
173             Don't use the same message on multiple files, unless it equally applies to
174             all those files.
175           </para></listitem>
176           <listitem><para>
177             If your changes span multiple files, and the code won't recompile unless
178             all changes are commited (e.g. when changing the signature of a function),
179             then commit all files one after another, without long delays in beween.
180             If necessary, prepare the commit messages in advance.
181           </para></listitem>
182           <listitem><para>
183             Before changing things on CVS, make sure that your changes are in line
184             with the team's general consensus on what should be done (see below).
185           </para></listitem>
186         </itemizedlist>
187       </para>
188     </sect2>
189
190     <sect2 id="cvswhenask"><title>Discussing Changes First</title>
191       <para>
192         We don't have a too formal policy on this, just use common sense. Hints: If it is..
193         <orderedlist numeration="arabic">
194           <listitem><para>
195             ..a bugfix / clean-up / cosmetic thing: shoot
196           </para></listitem>
197           <listitem><para>
198             ..a new feature that can be turned off: shoot
199           </para></listitem>
200           <listitem><para>
201             ..a clear improvement w/o side effects on other parts of the code: shoot
202           </para></listitem>
203           <listitem><para>
204             ..a matter of taste: <ulink url="mailto:developers@privoxy.org">ask the list</ulink>
205           </para></listitem>
206           <listitem><para>
207             ..a major redesign of some part of the code: <ulink url="mailto:developers@privoxy.org">ask
208             the list</ulink>
209           </para></listitem>
210         </orderedlist>
211       </para>
212       <para>
213         Note that near a major public release, we get a bit more cautious - if
214         unsure, it doesn't hurt to ask first. There is always the possibility
215         to submit a patch to the <ulink
216         url="http://sourceforge.net/tracker/?atid=311118&amp;group_id=11118&amp;func=browse">patches
217         tracker</ulink> instead.
218       </para>
219     </sect2>
220   </sect1>
221         
222   <!--   ~~~~~       New section      ~~~~~     -->
223 <sect1 id="documentation"><title>Documentation Guidelines</title>
224   <para>
225     All formal documents are maintained in Docbook SGML and located in the
226     <computeroutput>doc/source/*</computeroutput> directory. You will need
227     <ulink url="http://www.docbook.org">Docbook</ulink>, the Docbook 
228     DTD's and the Docbook modular stylesheets (or comparable alternatives),
229     and either <application>jade</application> or
230     <application>openjade</application> (recommended) installed in order to
231     build docs from source. Currently there is <ulink
232     url="../user-manual/index.html"><citetitle>user-manual</citetitle></ulink>,
233     <ulink url="../faq/index.html"><citetitle>FAQ</citetitle></ulink>, and, of
234     course this, the <citetitle>developer-manual</citetitle> in this format.
235     The <citetitle>README</citetitle>, <citetitle>AUTHORS</citetitle>
236     <citetitle>privoxy.1</citetitle> (man page) files are also now maintained
237     as Docbook SGML. The finished files are all in the top-level source
238     directory are generated files! Also, <filename>index.html</filename>, the
239     <application>Privoxy</application> home page, is maintained as SGML.
240     <emphasis>DO NOT edit these directly</emphasis>. Edit the SGML source, or
241     contact someone involved in the documentation (at present Stefan and
242     Hal).
243     </para> 
244     <para>
245      Other, less formal documents (e.g. <filename>LICENSE</filename>,
246      <filename>INSTALL</filename>) are maintained as plain text files in the
247      top-level source directory. At least for the time being.
248     </para>
249     <para>
250      Packagers are encouraged to include this documentation. For those without
251      the ability to build the docs locally, text versions of each are kept in
252      CVS. HTML versions are also now being kept in CVS under 
253      <filename>doc/webserver/*</filename>.
254     </para>
255     <para>
256      Formal documents are built with the Makefile targets of
257      <computeroutput>make dok</computeroutput>, or alternately
258      <computeroutput>make redhat-dok</computeroutput>. If you have problems,
259      try both. The build process uses the document SGML sources in
260      <computeroutput>doc/source/*/*</computeroutput> to update all text files in
261      <computeroutput>doc/text/</computeroutput> and to update all HTML
262      documents in <computeroutput>doc/webserver/</computeroutput>.
263     </para>
264     <para>
265      Documentation writers should please make sure documents build
266      successfully before committing to CVS, if possible.
267     </para>
268     <para>
269      How do you update the webserver (i.e. the pages on privoxy.org)?
270      
271      <orderedlist numeration="arabic">
272       <listitem><para>
273         First, build the docs by running <computeroutput>make
274         dok</computeroutput> (or alternately <computeroutput>make
275         redhat-dok</computeroutput>).                 
276       </para></listitem>
277       <listitem><para>
278         Run <computeroutput>make webserver</computeroutput> which copies all
279         files from <computeroutput>doc/webserver</computeroutput> to the
280         sourceforge webserver via scp.
281       </para></listitem>
282      </orderedlist>
283   </para>
284
285   <para>
286    Finished docs should be occasionally submitted to CVS
287    (<filename>doc/webserver/*/*.html</filename>) so that those without 
288    the ability to build them locally, have access to them if needed.
289    This is especially important just prior to a new release! Please
290    do this <emphasis>after</emphasis> the <literal>$VERSION</literal> and
291    other release specific data in <filename>configure.in</filename> has been
292    updated (this is done just prior to a new release).
293   </para>
294
295 <!--   ~~~~~       New section      ~~~~~     -->
296 <sect2 id="sgml">
297 <title>Quickstart to Docbook and SGML</title>
298 <para>
299  If you are not familiar with SGML, it is a markup language similar to HTML. 
300  Actually, not a mark up language per se, but a language used to define 
301  markup languages. In fact, HTML is an SGML application. Both will use
302  <quote>tags</quote> to format text and other content. SGML tags can be much
303  more varied, and flexible, but do much of the same kinds of things. The tags,
304  or <quote>elements</quote>, are definable in SGML. There is no set
305  <quote>standards</quote>. Since we are using
306  <application>Docbook</application>, our tags are those that are defined by 
307  <application>Docbook</application>. Much of how the finish document is
308  rendered is determined by the <quote>stylesheets</quote>.
309  The stylesheets determine how each tag gets translated to HTML, or other
310  formats.
311 </para>
312
313 <para>
314  Tags in Docbook SGML need to be always <quote>closed</quote>. If not, you
315  will likely generate errors. Example: <literal>&lt;title&gt;My
316  Title&lt;/title&gt;</literal>. They are also case-insensitive, but we
317  strongly suggest using all lower case. This keeps compatibility with
318  [Docbook] <application>XML</application>.
319 </para>
320
321 <para>
322  Our documents use <quote>sections</quote> for the most part. Sections
323  will be processed into HTML headers (e.g. <literal>h1</literal> for 
324  <literal>sect1</literal>). The <application>Docbook</application> stylesheets
325  will use these to also generate the Table of Contents for each doc. Our 
326  TOC's are set to a depth of three. Meaning <literal>sect1</literal>, 
327  <literal>sect2</literal>, and <literal>sect3</literal> will have TOC 
328  entries, but <literal>sect4</literal> will not. Each section requires 
329  a <literal>&lt;title&gt;</literal> element, and at least one 
330  <literal>&lt;para&gt;</literal>. There is a limit of five section 
331  levels in Docbook, but generally three should be sufficient for our 
332  purposes.
333 </para>
334
335 <para>
336  Some common elements that you likely will use: 
337 </para>
338
339 <para>
340   <simplelist>
341     <member>
342       <emphasis>&lt;para&gt;&lt;/para&gt;</emphasis>, paragraph delimiter. Most 
343       text needs to be within paragraph elements (there are some exceptions).
344     </member>
345     <member>
346       <emphasis>&lt;emphasis&gt;&lt;/emphasis&gt;</emphasis>, the stylesheets
347       make this italics.
348     </member>
349     <member>
350       <emphasis>&lt;filename&gt;&lt;/filename&gt;</emphasis>, files and directories.
351     </member>
352     <member>
353       <emphasis>&lt;command&gt;&lt;/command&gt;</emphasis>, command examples.
354     </member>
355     <member>
356       <emphasis>&lt;literallayout&gt;&lt;/literallayout&gt;</emphasis>, like 
357       <literal>&lt;pre&gt;</literal>, more or less.
358     </member>
359     <member>
360       <emphasis>&lt;itemizedlist&gt;&lt;/itemizedlist&gt;</emphasis>, list with bullets.
361     </member>
362     <member>
363       <emphasis>&lt;listitem&gt;&lt;/listitem&gt;</emphasis>, member of the above.
364     </member>
365     <member>
366       <emphasis>&lt;screen&gt;&lt;/screen&gt;</emphasis>, screen output, implies 
367       <literal>&lt;literallayout&gt;</literal>.
368     </member>
369     <member>
370       <emphasis>&lt;ulink url="example.com"&gt;&lt;/ulink&gt;</emphasis>, like 
371       HTML <literal>&lt;a&gt;</literal> tag.
372     </member>
373     <member>
374       <emphasis>&lt;quote&gt;&lt;/quote&gt;</emphasis>, for, doh, quoting text. 
375     </member>
376   </simplelist>
377 </para>
378
379 <para>
380  Look at any of the existing docs for examples of all these and more.
381 </para>
382
383 <para>
384  You might also find <quote><ulink
385  url="http://www.bureau-cornavin.com/opensource/crash-course/">Writing Documentation
386  Using DocBook - A Crash Course</ulink></quote> useful.
387 </para>
388 </sect2>
389
390 <!--   ~~~~~       New section      ~~~~~     -->
391   <sect2 id="docstyle">
392   <title><application>Privoxy</application> Documentation Style</title>
393    <para>
394     It will be easier if everyone follows a similar writing style. This 
395     just makes it easier to read what someone else has written if it 
396     is all done in a similar fashion.
397    </para>
398    <para>
399     Here it is:
400    </para>
401    <para>
402     <itemizedlist>
403      <listitem>
404       <para>
405        All tags should be lower case.
406       </para>
407     </listitem> 
408     <listitem>
409      <para>
410        Tags delimiting a <emphasis>block</emphasis> of text (even small
411        blocks) should be on their own line. Like:
412        <literallayout>
413  &lt;para&gt;
414   Some text goes here.
415  &lt;/para&gt;
416        </literallayout>
417        Tags marking individual words, or few words, should be in-line:
418        <literallayout>
419   Just to &lt;emphasis&gt;emphasize&lt;/emphasis&gt;, some text goes here.
420        </literallayout>
421      </para>
422    </listitem> 
423    <listitem>
424     <para>
425       Tags should be nested and step indented for block text like: (except
426       in-line tags) 
427      <literallayout>
428  &lt;para&gt;
429   &lt;itemizedlist&gt;
430    &lt;para&gt;
431     &lt;listitem&gt;
432       Some text goes here in our list example.
433      &lt;/listitem&gt;
434    &lt;/para&gt;
435   &lt;/itemizedlist&gt;
436  &lt;/para&gt;
437        </literallayout>
438       This makes it easier to find the text amongst the tags ;-)
439     </para>
440    </listitem> 
441    <listitem>
442     <para>
443      Use white space to separate logical divisions within a document, 
444      like between sections. Running everything together consistently 
445      makes it harder to read and work on.
446     </para>
447    </listitem> 
448    <listitem>
449     <para>
450      Do not hesitate to make comments. Comments can either use the 
451      &lt;comment&gt; element, or the &lt;!--  --&gt; style comment 
452      familiar from HTML. (Note in Docbook v4.x &lt;comment&gt; is 
453      replaced by &lt;remark&gt;.)
454     </para>
455   </listitem> 
456   <listitem>
457    <para>
458      We have an international audience. Refrain from slang, or English 
459      idiosyncrasies (too many to list :). Humor also does not translate 
460      well sometimes.
461    </para>
462   </listitem> 
463   <listitem>
464    <para>
465     Try to keep overall line lengths in source files to 80 characters or less
466     for obvious reasons. This is not always possible, with lengthy URLs for
467     instance.
468    </para>
469   </listitem> 
470   <listitem>
471    <para>
472     Our documents are available in differing formats. Right now, they 
473     are just plain text, and HTML, but PDF, and others is always a 
474     future possibility. Be careful with URLs (&lt;ulink&gt;), and avoid 
475     this mistake:
476    </para>
477    <para>
478      My favorite site is &lt;ulink url="http://example.com"&gt;here&lt;/ulink&gt;.
479    </para>
480    <para>
481      This will render as <quote>My favorite site is here</quote>, which is 
482      not real helpful in a text doc. Better like this:
483    </para>
484    <para>
485      My favorite site is &lt;ulink url="http://example.com"&gt;example.com&lt;/ulink&gt;.
486    </para>
487   </listitem>
488   <listitem>
489    <para>
490     All documents should be spell checked occasionally.
491     <application>aspell</application> can check SGML with the
492     <literal>-H</literal> option. (<application>ispell</application> I think
493     too.)
494    </para>
495   </listitem> 
496
497   </itemizedlist>
498  </para> 
499   
500   </sect2>
501
502   
503  <!--   ~~~~~       New section      ~~~~~     -->
504
505  <sect2><title>Privoxy Custom Entities</title>
506  <para>
507   <application>Privoxy</application> documentation is using 
508   a number of customized <quote>entities</quote> to facilitate 
509   documentation maintenance. 
510  </para>
511  <para>
512   We are using a set of <quote>boilerplate</quote> files with generic text,
513   that is used by multiple docs. This way we can write something once, and use
514   it repeatedly without having to re-write the same content over and over again.
515   If editing such a file, keep in mind that it should be
516   <emphasis>generic</emphasis>. That is the purpose; so it can be used in varying 
517   contexts without additional modifications.
518  </para>
519  <para>
520   We are also using what <application>Docbook</application> calls 
521   <quote>internal entities</quote>. These are like variables in 
522   programming. Well, sort of. For instance, we have the
523   <literal>p-version</literal> entity that contains the current 
524   <application>Privoxy</application> version string. You are strongly 
525   encouraged to use these where possible. Some of these obviously 
526   require re-setting with each release (done by the Makefile). A sampling of
527   custom entities are listed below. See any of the main docs for examples.
528  </para>
529
530  <para>
531   <itemizedlist>
532   <listitem>
533    <para>
534     Re- <quote>boilerplate</quote> text entities are defined like:
535    </para>
536    <para>
537     <literal>&lt;!entity supported SYSTEM "supported.sgml"&gt;</literal>
538    </para>
539    <para>
540      In this example, the contents of the file,
541      <filename>supported.sgml</filename> is available for inclusion anywhere 
542      in the doc. To make this happen, just reference the now defined 
543      entity: <literal>&#38;supported;</literal> (starts with an ampersand 
544      and ends with a semi-colon), and the contents will be dumped into 
545      the finished doc at that point.
546    </para>
547   </listitem> 
548   <listitem>
549    <para>
550     Commonly used <quote>internal entities</quote>:
551   </para>
552   <simplelist>
553    <member>
554     <emphasis>p-version</emphasis>: the <application>Privoxy</application> 
555     version string, e.g. <quote>&p-version;</quote>.
556    </member>
557    <member>
558     <emphasis>p-status</emphasis>: the project status, either 
559     <quote>alpha</quote>, <quote>beta</quote>, or <quote>stable</quote>.
560    </member>
561    <member>
562     <emphasis>p-not-stable</emphasis>: use to conditionally include 
563     text in <quote>not stable</quote> releases (e.g. <quote>beta</quote>).
564    </member>
565    <member>
566     <emphasis>p-stable</emphasis>: just the opposite.
567    </member>
568    <member>
569     <emphasis>p-text</emphasis>: this doc is only generated as text.
570    </member>
571   </simplelist>
572  </listitem> 
573  </itemizedlist>
574  </para> 
575  <para>
576   There are others in various places that are defined for a specific 
577   purpose. Read the source!
578  </para>
579  
580  </sect2>
581   
582  </sect1>
583
584 <!--     <listitem><para>be consistent with the redirect script (i.e. the <application>Privoxy</application> program -->
585 <!--       points via the redirect URL at sf to valid end-points in the document)</para></listitem> -->
586
587   <!--   ~~~~~       New section      ~~~~~     -->
588   <sect1 id="coding"><title>Coding Guidelines</title>
589
590     <sect2 id="s1"><title>Introduction</title>
591
592     <para>This set of standards is designed to make our lives easier.  It is
593     developed with the simple goal of helping us keep the "new and improved
594     <application>Privoxy</application>" consistent and reliable. Thus making
595     maintenance easier and increasing chances of success of the
596     project.</para>
597
598     <para>And that of course comes back to us as individuals. If we can
599     increase our development and product efficiencies then we can solve more
600     of the request for changes/improvements and in general feel good about
601     ourselves. ;-></para>
602
603   </sect2>
604
605     <sect2 id="s2"><title>Using Comments</title>
606  
607
608     <sect3 id="s3"><title>Comment, Comment, Comment</title>
609
610     <para><emphasis>Explanation:</emphasis></para>
611
612     <para>Comment as much as possible without commenting the obvious.
613     For example do not comment "aVariable is equal to bVariable".
614     Instead explain why aVariable should be equal to the bVariable.
615     Just because a person can read code does not mean they will
616     understand why or what is being done. A reader may spend a lot
617     more time figuring out what is going on when a simple comment
618     or explanation would have prevented the extra research. Please
619     help your brother IJB'ers out!</para>
620
621     <para>The comments will also help justify the intent of the code.
622     If the comment describes something different than what the code
623     is doing then maybe a programming error is occurring.</para>
624
625     <para><emphasis>Example:</emphasis></para>
626 <programlisting>
627 /* if page size greater than 1k ... */
628 if ( PageLength() > 1024 )
629 {
630     ... "block" the page up ...
631 }
632
633 /* if page size is small, send it in blocks */
634 if ( PageLength() > 1024 )
635 {
636     ... "block" the page up ...
637 }
638
639 This demonstrates 2 cases of "what not to do".  The first is a
640 "syntax comment".  The second is a comment that does not fit what
641 is actually being done.
642 </programlisting>
643   </sect3>
644
645     
646
647     <sect3 id="s4"><title>Use blocks for comments</title>
648
649     <para><emphasis>Explanation:</emphasis></para>
650
651     <para>Comments can help or they can clutter. They help when they
652     are differentiated from the code they describe. One line
653     comments do not offer effective separation between the comment
654     and the code. Block identifiers do, by surrounding the code
655     with a clear, definable pattern.</para>
656
657     <para><emphasis>Example:</emphasis></para>
658 <programlisting>
659 /*********************************************************************
660  * This will stand out clearly in your code!
661  *********************************************************************/
662 if ( thisVariable == thatVariable )
663 {
664    DoSomethingVeryImportant();
665 }
666
667
668 /* unfortunately, this may not */
669 if ( thisVariable == thatVariable )
670 {
671    DoSomethingVeryImportant();
672 }
673
674
675 if ( thisVariable == thatVariable ) /* this may not either */
676 {
677    DoSomethingVeryImportant();
678 }</programlisting>
679
680     <para><emphasis>Exception:</emphasis></para>
681
682     <para>If you are trying to add a small logic comment and do not
683     wish to "disrupt" the flow of the code, feel free to use a 1
684     line comment which is NOT on the same line as the code.</para>
685
686     
687   </sect3>
688     
689
690     <sect3 id="s5"><title>Keep Comments on their own line</title>
691
692     <para><emphasis>Explanation:</emphasis></para>
693
694     <para>It goes back to the question of readability. If the comment
695     is on the same line as the code it will be harder to read than
696     the comment that is on its own line.</para>
697
698     <para>There are three exceptions to this rule, which should be
699     violated freely and often: during the definition of variables,
700     at the end of closing braces, when used to comment
701     parameters.</para>
702
703     <para><emphasis>Example:</emphasis></para>
704 <programlisting>
705 /*********************************************************************
706  * This will stand out clearly in your code,
707  * But the second example won't.
708  *********************************************************************/
709 if ( thisVariable == thatVariable )
710 {
711    DoSomethingVeryImportant();
712 }
713
714 if ( thisVariable == thatVariable ) /*can you see me?*/
715 {
716    DoSomethingVeryImportant(); /*not easily*/
717 }
718
719
720 /*********************************************************************
721  * But, the encouraged exceptions:
722  *********************************************************************/
723 int urls_read     = 0;     /* # of urls read + rejected */
724 int urls_rejected = 0;     /* # of urls rejected */
725
726 if ( 1 == X )
727 {
728    DoSomethingVeryImportant();
729 }
730
731
732 short DoSomethingVeryImportant(
733    short firstparam,   /* represents something */
734    short nextparam     /* represents something else */ )
735 {
736    ...code here...
737
738 }   /* -END- DoSomethingVeryImportant */
739 </programlisting>
740   </sect3>
741     
742
743     <sect3 id="s6"><title>Comment each logical step</title>
744
745     <para><emphasis>Explanation:</emphasis></para>
746
747     <para>Logical steps should be commented to help others follow the
748     intent of the written code and comments will make the code more
749     readable.</para>
750
751     <para>If you have 25 lines of code without a comment, you should
752     probably go back into it to see where you forgot to put
753     one.</para>
754
755     <para>Most "for", "while", "do", etc... loops _probably_ need a
756     comment. After all, these are usually major logic
757     containers.</para>
758
759     
760   </sect3>
761     
762
763     <sect3 id="s7"><title>Comment All Functions Thoroughly</title>
764
765     <para><emphasis>Explanation:</emphasis></para>
766
767     <para>A reader of the code should be able to look at the comments
768     just prior to the beginning of a function and discern the
769     reason for its existence and the consequences of using it. The
770     reader should not have to read through the code to determine if
771     a given function is safe for a desired use. The proper
772     information thoroughly presented at the introduction of a
773     function not only saves time for subsequent maintenance or
774     debugging, it more importantly aids in code reuse by allowing a
775     user to determine the safety and applicability of any function
776     for the problem at hand. As a result of such benefits, all
777     functions should contain the information presented in the
778     addendum section of this document.</para>
779
780     
781   </sect3>
782     
783
784     <sect3 id="s8"><title>Comment at the end of braces if the
785     content is more than one screen length</title>
786
787     <para><emphasis>Explanation:</emphasis></para>
788
789     <para>Each closing brace should be followed on the same line by a
790     comment that describes the origination of the brace if the
791     original brace is off of the screen, or otherwise far away from
792     the closing brace. This will simplify the debugging,
793     maintenance, and readability of the code.</para>
794
795     <para>As a suggestion , use the following flags to make the
796     comment and its brace more readable:</para>
797
798     <para>use following a closing brace: } /* -END- if() or while ()
799     or etc... */</para>
800
801     <para><emphasis>Example:</emphasis></para>
802 <programlisting>
803 if ( 1 == X )
804 {
805    DoSomethingVeryImportant();
806    ...some long list of commands...
807 } /* -END- if x is 1 */
808
809 or:
810
811 if ( 1 == X )
812 {
813    DoSomethingVeryImportant();
814    ...some long list of commands...
815 } /* -END- if ( 1 == X ) */
816 </programlisting>
817   </sect3>
818     
819   </sect2>
820
821     <sect2 id="s9"><title>Naming Conventions</title>
822
823     
824
825     <sect3 id="s10"><title>Variable Names</title>
826
827     <para><emphasis>Explanation:</emphasis></para>
828
829     <para>Use all lowercase, and separate words via an underscore
830     ('_'). Do not start an identifier with an underscore. (ANSI C
831     reserves these for use by the compiler and system headers.) Do
832     not use identifiers which are reserved in ANSI C++. (E.g.
833     template, class, true, false, ...). This is in case we ever
834     decide to port Privoxy to C++.</para>
835
836     <para><emphasis>Example:</emphasis></para>
837 <programlisting>
838 int ms_iis5_hack = 0;</programlisting>
839
840     <para><emphasis>Instead of:</emphasis></para>
841
842     <para>
843 <programlisting>
844 int msiis5hack = 0; int msIis5Hack = 0;
845 </programlisting>
846 </para>
847
848     
849
850   </sect3>    
851
852     <sect3 id="s11"><title>Function Names</title>
853
854     <para><emphasis>Explanation:</emphasis></para>
855
856     <para>Use all lowercase, and separate words via an underscore
857     ('_'). Do not start an identifier with an underscore. (ANSI C
858     reserves these for use by the compiler and system headers.) Do
859     not use identifiers which are reserved in ANSI C++. (E.g.
860     template, class, true, false, ...). This is in case we ever
861     decide to port Privoxy to C++.</para>
862
863     <para><emphasis>Example:</emphasis></para>
864 <programlisting>
865 int load_some_file( struct client_state *csp )</programlisting>
866
867     <para><emphasis>Instead of:</emphasis></para>
868
869     <para>
870 <programlisting>
871 int loadsomefile( struct client_state *csp )
872 int loadSomeFile( struct client_state *csp )
873 </programlisting>
874 </para>
875
876     
877   </sect3>
878     
879
880     <sect3 id="s12"><title>Header file prototypes</title>
881
882     <para><emphasis>Explanation:</emphasis></para>
883
884     <para>Use a descriptive parameter name in the function prototype
885     in header files. Use the same parameter name in the header file
886     that you use in the c file.</para>
887
888     <para><emphasis>Example:</emphasis></para>
889 <programlisting>
890 (.h) extern int load_aclfile( struct client_state *csp );
891 (.c) int load_aclfile( struct client_state *csp )</programlisting>
892
893     <para><emphasis>Instead of:</emphasis>
894 <programlisting>
895 (.h) extern int load_aclfile( struct client_state * ); or 
896 (.h) extern int load_aclfile(); 
897 (.c) int load_aclfile( struct client_state *csp )
898 </programlisting>
899 </para>
900
901     
902   </sect3>
903     
904
905     <sect3 id="s13"><title>Enumerations, and #defines</title>
906
907     <para><emphasis>Explanation:</emphasis></para>
908
909     <para>Use all capital letters, with underscores between words. Do
910     not start an identifier with an underscore. (ANSI C reserves
911     these for use by the compiler and system headers.)</para>
912
913     <para><emphasis>Example:</emphasis></para>
914 <programlisting>
915 (enumeration) : enum Boolean { FALSE, TRUE };
916 (#define) : #define DEFAULT_SIZE 100;</programlisting>
917
918     <para><emphasis>Note:</emphasis> We have a standard naming scheme for #defines
919     that toggle a feature in the preprocessor: FEATURE_>, where
920     > is a short (preferably 1 or 2 word) description.</para>
921
922     <para><emphasis>Example:</emphasis></para>
923 <programlisting>
924 #define FEATURE_FORCE 1
925
926 #ifdef FEATURE_FORCE
927 #define FORCE_PREFIX blah
928 #endif /* def FEATURE_FORCE */
929 </programlisting>
930   </sect3>
931     
932
933     <sect3 id="s14"><title>Constants</title>
934
935     <para><emphasis>Explanation:</emphasis></para>
936
937     <para>Spell common words out entirely (do not remove vowels).</para>
938
939     <para>Use only widely-known domain acronyms and abbreviations.
940     Capitalize all letters of an acronym.</para>
941
942     <para>Use underscore (_) to separate adjacent acronyms and
943     abbreviations. Never terminate a name with an underscore.</para>
944
945     <para><emphasis>Example:</emphasis></para>
946 <programlisting>
947 #define USE_IMAGE_LIST 1</programlisting>
948
949     <para><emphasis>Instead of:</emphasis></para>
950
951     <para>
952 <programlisting>
953 #define USE_IMG_LST 1 or 
954 #define _USE_IMAGE_LIST 1 or
955 #define USE_IMAGE_LIST_ 1 or 
956 #define use_image_list 1 or
957 #define UseImageList 1
958 </programlisting>
959 </para>
960
961     
962   </sect3>
963
964   </sect2>
965     
966
967     <sect2 id="s15"><title>Using Space</title>
968
969     
970
971     <sect3 id="s16"><title>Put braces on a line by themselves.</title>
972
973     <para><emphasis>Explanation:</emphasis></para>
974
975     <para>The brace needs to be on a line all by itself, not at the
976     end of the statement. Curly braces should line up with the
977     construct that they're associated with. This practice makes it
978     easier to identify the opening and closing braces for a
979     block.</para>
980
981     <para><emphasis>Example:</emphasis></para>
982 <programlisting>
983 if ( this == that )
984 {
985    ...
986 }</programlisting>
987
988     <para><emphasis>Instead of:</emphasis></para>
989
990     <para>if ( this == that ) { ... }</para>
991
992     <para>or</para>
993
994     <para>if ( this == that ) { ... }</para>
995
996     <para><emphasis>Note:</emphasis> In the special case that the if-statement is
997     inside a loop, and it is trivial, i.e. it tests for a
998     condition that is obvious from the purpose of the block,
999     one-liners as above may optically preserve the loop structure
1000     and make it easier to read.</para>
1001
1002     <para><emphasis>Status:</emphasis> developer-discretion.</para>
1003
1004     <para><emphasis>Example exception:</emphasis></para>
1005 <programlisting>
1006 while ( more lines are read )
1007 {
1008    /* Please document what is/is not a comment line here */
1009    if ( it's a comment ) continue;
1010
1011    do_something( line );
1012 }
1013 </programlisting>
1014   </sect3>
1015     
1016
1017     <sect3 id="s17"><title>ALL control statements should have a
1018     block</title>
1019
1020     <para><emphasis>Explanation:</emphasis></para>
1021
1022     <para>Using braces to make a block will make your code more
1023     readable and less prone to error. All control statements should
1024     have a block defined.</para>
1025
1026     <para><emphasis>Example:</emphasis></para>
1027 <programlisting>
1028 if ( this == that )
1029 {
1030    DoSomething();
1031    DoSomethingElse();
1032 }</programlisting>
1033
1034     <para><emphasis>Instead of:</emphasis></para>
1035
1036     <para>if ( this == that ) DoSomething(); DoSomethingElse();</para>
1037
1038     <para>or</para>
1039
1040     <para>if ( this == that ) DoSomething();</para>
1041
1042     <para><emphasis>Note:</emphasis> The first example in "Instead of" will execute
1043     in a manner other than that which the developer desired (per
1044     indentation). Using code braces would have prevented this
1045     "feature". The "explanation" and "exception" from the point
1046     above also applies.</para>
1047
1048     
1049   </sect3>
1050     
1051
1052     <sect3 id="s18"><title>Do not belabor/blow-up boolean
1053     expressions</title>
1054
1055     <para><emphasis>Example:</emphasis></para>
1056 <programlisting>
1057 structure->flag = ( condition );</programlisting>
1058
1059     <para><emphasis>Instead of:</emphasis></para>
1060
1061     <para>if ( condition ) { structure->flag = 1; } else {
1062     structure->flag = 0; }</para>
1063
1064     <para><emphasis>Note:</emphasis> The former is readable and concise. The later
1065     is wordy and inefficient. Please assume that any developer new
1066     to the project has at least a "good" knowledge of C/C++. (Hope
1067     I do not offend by that last comment ... 8-)</para>
1068
1069     
1070   </sect3>
1071     
1072
1073     <sect3 id="s19"><title>Use white space freely because it is
1074     free</title>
1075
1076     <para><emphasis>Explanation:</emphasis></para>
1077
1078     <para>Make it readable. The notable exception to using white space
1079     freely is listed in the next guideline.</para>
1080
1081     <para><emphasis>Example:</emphasis></para>
1082 <programlisting>
1083 int firstValue   = 0;
1084 int someValue    = 0;
1085 int anotherValue = 0;
1086 int thisVariable = 0;
1087
1088 if ( thisVariable == thatVariable )
1089
1090 firstValue = oldValue + ( ( someValue - anotherValue ) - whatever )
1091 </programlisting>
1092   </sect3>
1093     
1094
1095     <sect3 id="s20"><title>Don't use white space around structure
1096     operators</title>
1097
1098     <para><emphasis>Explanation:</emphasis></para>
1099
1100     <para>- structure pointer operator ( "->" ) - member operator (
1101     "." ) - functions and parentheses</para>
1102
1103     <para>It is a general coding practice to put pointers, references,
1104     and function parentheses next to names. With spaces, the
1105     connection between the object and variable/function name is not
1106     as clear.</para>
1107
1108     <para><emphasis>Example:</emphasis></para>
1109 <programlisting>
1110 aStruct->aMember;
1111 aStruct.aMember;
1112 FunctionName();</programlisting>
1113
1114     <para><emphasis>Instead of:</emphasis> aStruct -> aMember; aStruct . aMember;
1115     FunctionName ();</para>
1116
1117     
1118   </sect3>
1119     
1120
1121     <sect3 id="s21"><title>Make the last brace of a function stand
1122     out</title>
1123
1124     <para><emphasis>Example:</emphasis></para>
1125 <programlisting>
1126 int function1( ... )
1127 {
1128    ...code...
1129    return( retCode );
1130
1131 }   /* -END- function1 */
1132
1133
1134 int function2( ... )
1135 {
1136 }   /* -END- function2 */
1137 </programlisting>
1138
1139     <para><emphasis>Instead of:</emphasis></para>
1140
1141     <para>int function1( ... ) { ...code... return( retCode ); } int
1142     function2( ... ) { }</para>
1143
1144     <para><emphasis>Note:</emphasis> Use 1 blank line before the closing brace and 2
1145     lines afterward. This makes the end of function standout to
1146     the most casual viewer. Although function comments help
1147     separate functions, this is still a good coding practice. In
1148     fact, I follow these rules when using blocks in "for", "while",
1149     "do" loops, and long if {} statements too. After all whitespace
1150     is free!</para>
1151
1152     <para><emphasis>Status:</emphasis> developer-discretion on the number of blank
1153     lines. Enforced is the end of function comments.</para>
1154
1155     
1156   </sect3>
1157     
1158
1159     <sect3 id="s22"><title>Use 3 character indentions</title>
1160
1161     <para><emphasis>Explanation:</emphasis></para>
1162
1163     <para>If some use 8 character TABs and some use 3 character TABs,
1164     the code can look *very* ragged. So use 3 character indentions
1165     only. If you like to use TABs, pass your code through a filter
1166     such as "expand -t3" before checking in your code.</para>
1167
1168     <para><emphasis>Example:</emphasis></para>
1169 <programlisting>
1170 static const char * const url_code_map[256] =
1171 {
1172    NULL, ...
1173 };
1174
1175
1176 int function1( ... )
1177 {
1178    if ( 1 )
1179    {
1180       return( ALWAYS_TRUE );
1181    }
1182    else
1183    {
1184       return( HOW_DID_YOU_GET_HERE );
1185    }
1186
1187    return( NEVER_GETS_HERE );
1188
1189 }
1190 </programlisting>
1191   </sect3>
1192
1193   </sect2>
1194     
1195
1196     <sect2 id="s23"><title>Initializing</title>
1197
1198     
1199
1200     <sect3 id="s24"><title>Initialize all variables</title>
1201
1202     <para><emphasis>Explanation:</emphasis></para>
1203
1204     <para>Do not assume that the variables declared will not be used
1205     until after they have been assigned a value somewhere else in
1206     the code. Remove the chance of accidentally using an unassigned
1207     variable.</para>
1208
1209     <para><emphasis>Example:</emphasis></para>
1210 <programlisting>
1211 short anShort = 0;
1212 float aFloat  = 0;
1213 struct *ptr = NULL;</programlisting>
1214
1215     <para><emphasis>Note:</emphasis> It is much easier to debug a SIGSEGV if the
1216     message says you are trying to access memory address 00000000
1217     and not 129FA012; or arrayPtr[20] causes a SIGSEV vs.
1218     arrayPtr[0].</para>
1219
1220     <para><emphasis>Status:</emphasis> developer-discretion if and only if the
1221     variable is assigned a value "shortly after" declaration.</para>
1222
1223   </sect3>
1224   </sect2>
1225     
1226
1227     <sect2 id="s25"><title>Functions</title>
1228
1229     
1230
1231     <sect3 id="s26"><title>Name functions that return a boolean as a
1232     question.</title>
1233
1234     <para><emphasis>Explanation:</emphasis></para>
1235
1236     <para>Value should be phrased as a question that would logically
1237     be answered as a true or false statement</para>
1238
1239     <para><emphasis>Example:</emphasis></para>
1240 <programlisting>
1241 ShouldWeBlockThis();
1242 ContainsAnImage();
1243 IsWebPageBlank();
1244 </programlisting>
1245   </sect3>
1246     
1247
1248     <sect3 id="s27"><title>Always specify a return type for a
1249     function.</title>
1250
1251     <para><emphasis>Explanation:</emphasis></para>
1252
1253     <para>The default return for a function is an int. To avoid
1254     ambiguity, create a return for a function when the return has a
1255     purpose, and create a void return type if the function does not
1256     need to return anything.</para>
1257
1258     
1259   </sect3>
1260     
1261
1262     <sect3 id="s28"><title>Minimize function calls when iterating by
1263     using variables</title>
1264
1265     <para><emphasis>Explanation:</emphasis></para>
1266
1267     <para>It is easy to write the following code, and a clear argument
1268     can be made that the code is easy to understand:</para>
1269
1270     <para><emphasis>Example:</emphasis></para>
1271 <programlisting>
1272 for ( size_t cnt = 0; cnt &lt; blockListLength(); cnt ++ )
1273 {
1274    ....
1275 }</programlisting>
1276
1277     <para><emphasis>Note:</emphasis> Unfortunately, this makes a function call for
1278     each and every iteration. This increases the overhead in the
1279     program, because the compiler has to look up the function each
1280     time, call it, and return a value. Depending on what occurs in
1281     the blockListLength() call, it might even be creating and
1282     destroying structures with each iteration, even though in each
1283     case it is comparing "cnt" to the same value, over and over.
1284     Remember too - even a call to blockListLength() is a function
1285     call, with the same overhead.</para>
1286
1287     <para>Instead of using a function call during the iterations,
1288     assign the value to a variable, and evaluate using the
1289     variable.</para>
1290
1291     <para><emphasis>Example:</emphasis></para>
1292 <programlisting>
1293 size_t len = blockListLength();
1294
1295 for ( size_t cnt = 0; cnt &lt; len; cnt ++ )
1296 {
1297    ....
1298 }</programlisting>
1299
1300     <para><emphasis>Exceptions:</emphasis> if the value of blockListLength() *may*
1301     change or could *potentially* change, then you must code the
1302     function call in the for/while loop.</para>
1303
1304     
1305   </sect3>
1306     
1307
1308     <sect3 id="s29"><title>Pass and Return by Const Reference</title>
1309
1310     <para><emphasis>Explanation:</emphasis></para>
1311
1312     <para>This allows a developer to define a const pointer and call
1313     your function. If your function does not have the const
1314     keyword, we may not be able to use your function. Consider
1315     strcmp, if it were defined as: extern int strcmp( char *s1,
1316     char *s2 );</para>
1317
1318     <para>I could then not use it to compare argv's in main: int main(
1319     int argc, const char *argv[] ) { strcmp( argv[0], "privoxy"
1320     ); }</para>
1321
1322     <para>Both these pointers are *const*! If the c runtime library
1323     maintainers do it, we should too.</para>
1324
1325     
1326   </sect3>
1327     
1328
1329     <sect3 id="s30"><title>Pass and Return by Value</title>
1330
1331     <para><emphasis>Explanation:</emphasis></para>
1332
1333     <para>Most structures cannot fit onto a normal stack entry (i.e.
1334     they are not 4 bytes or less). Aka, a function declaration
1335     like: int load_aclfile( struct client_state csp )</para>
1336
1337     <para>would not work. So, to be consistent, we should declare all
1338     prototypes with "pass by value": int load_aclfile( struct
1339     client_state *csp )</para>
1340
1341     
1342   </sect3>
1343     
1344
1345     <sect3 id="s31"><title>Names of include files</title>
1346
1347     <para><emphasis>Explanation:</emphasis></para>
1348
1349     <para>Your include statements should contain the file name without
1350     a path. The path should be listed in the Makefile, using -I as
1351     processor directive to search the indicated paths. An exception
1352     to this would be for some proprietary software that utilizes a
1353     partial path to distinguish their header files from system or
1354     other header files.</para>
1355
1356     <para><emphasis>Example:</emphasis></para>
1357 <programlisting>
1358 #include &lt;iostream.h&gt;     /* This is not a local include */
1359 #include "config.h"       /* This IS a local include */
1360 </programlisting>
1361
1362     <para><emphasis>Exception:</emphasis></para>
1363
1364     <para>
1365 <programlisting>
1366 /* This is not a local include, but requires a path element. */ 
1367 #include &lt;sys/fileName.h&gt;
1368 </programlisting>
1369 </para>
1370
1371     <para><emphasis>Note:</emphasis> Please! do not add "-I." to the Makefile
1372     without a _very_ good reason. This duplicates the #include
1373     "file.h" behavior.</para>
1374
1375     
1376   </sect3>
1377     
1378
1379     <sect3 id="s32"><title>Provide multiple inclusion
1380     protection</title>
1381
1382     <para><emphasis>Explanation:</emphasis></para>
1383
1384     <para>Prevents compiler and linker errors resulting from
1385     redefinition of items.</para>
1386
1387     <para>Wrap each header file with the following syntax to prevent
1388     multiple inclusions of the file. Of course, replace PROJECT_H
1389     with your file name, with "." Changed to "_", and make it
1390     uppercase.</para>
1391
1392     <para><emphasis>Example:</emphasis></para>
1393 <programlisting>
1394 #ifndef PROJECT_H_INCLUDED
1395 #define PROJECT_H_INCLUDED
1396  ...
1397 #endif /* ndef PROJECT_H_INCLUDED */
1398 </programlisting>
1399   </sect3>
1400     
1401
1402     <sect3 id="s33"><title>Use `extern "C"` when appropriate</title>
1403
1404     <para><emphasis>Explanation:</emphasis></para>
1405
1406     <para>If our headers are included from C++, they must declare our
1407     functions as `extern "C"`. This has no cost in C, but increases
1408     the potential re-usability of our code.</para>
1409
1410     <para><emphasis>Example:</emphasis></para>
1411 <programlisting>
1412 #ifdef __cplusplus
1413 extern "C"
1414 {
1415 #endif /* def __cplusplus */
1416
1417 ... function definitions here ...
1418
1419 #ifdef __cplusplus
1420 }
1421 #endif /* def __cplusplus */
1422 </programlisting>
1423   </sect3>
1424     
1425
1426     <sect3 id="s34"><title>Where Possible, Use Forward Struct
1427     Declaration Instead of Includes</title>
1428
1429     <para><emphasis>Explanation:</emphasis></para>
1430
1431     <para>Useful in headers that include pointers to other struct's.
1432     Modifications to excess header files may cause needless
1433     compiles.</para>
1434
1435     <para><emphasis>Example:</emphasis></para>
1436 <programlisting>
1437 /*********************************************************************
1438  * We're avoiding an include statement here!
1439  *********************************************************************/
1440 struct file_list;
1441 extern file_list *xyz;</programlisting>
1442
1443     <para><emphasis>Note:</emphasis> If you declare "file_list xyz;" (without the
1444     pointer), then including the proper header file is necessary.
1445     If you only want to prototype a pointer, however, the header
1446     file is unnecessary.</para>
1447
1448     <para><emphasis>Status:</emphasis> Use with discretion.</para>
1449
1450     
1451   </sect3>
1452   </sect2>
1453
1454     <sect2 id="s35"><title>General Coding Practices</title>
1455
1456     
1457
1458     <sect3 id="s36"><title>Turn on warnings</title>
1459
1460     <para><emphasis>Explanation</emphasis></para>
1461
1462     <para>Compiler warnings are meant to help you find bugs. You
1463     should turn on as many as possible. With GCC, the switch is
1464     "-Wall". Try and fix as many warnings as possible.</para>
1465
1466     
1467   </sect3>
1468     
1469
1470     <sect3 id="s37"><title>Provide a default case for all switch
1471     statements</title>
1472
1473     <para><emphasis>Explanation:</emphasis></para>
1474
1475     <para>What you think is guaranteed is never really guaranteed. The
1476     value that you don't think you need to check is the one that
1477     someday will be passed. So, to protect yourself from the
1478     unknown, always have a default step in a switch statement.</para>
1479
1480     <para><emphasis>Example:</emphasis></para>
1481 <programlisting>
1482 switch( hash_string( cmd ) )
1483 {
1484    case hash_actions_file :
1485       ... code ...
1486       break;
1487
1488    case hash_confdir :
1489       ... code ...
1490       break;
1491
1492    default :
1493       log_error( ... );
1494       ... anomaly code goes here ...
1495       continue; / break; / exit( 1 ); / etc ...
1496
1497 } /* end switch( hash_string( cmd ) ) */</programlisting>
1498
1499     <para><emphasis>Note:</emphasis> If you already have a default condition, you
1500     are obviously exempt from this point. Of note, most of the
1501     WIN32 code calls `DefWindowProc' after the switch statement.
1502     This API call *should* be included in a default statement.</para>
1503
1504     <para><emphasis>Another Note:</emphasis> This is not so much a readability issue
1505     as a robust programming issue. The "anomaly code goes here" may
1506     be no more than a print to the STDERR stream (as in
1507     load_config). Or it may really be an ABEND condition.</para>
1508
1509     <para><emphasis>Status:</emphasis> Programmer discretion is advised.</para>
1510
1511     
1512   </sect3>
1513     
1514
1515     <sect3 id="s38"><title>Try to avoid falling through cases in a
1516     switch statement.</title>
1517
1518     <para><emphasis>Explanation:</emphasis></para>
1519
1520     <para>In general, you will want to have a 'break' statement within
1521     each 'case' of a switch statement. This allows for the code to
1522     be more readable and understandable, and furthermore can
1523     prevent unwanted surprises if someone else later gets creative
1524     and moves the code around.</para>
1525
1526     <para>The language allows you to plan the fall through from one
1527     case statement to another simply by omitting the break
1528     statement within the case statement. This feature does have
1529     benefits, but should only be used in rare cases. In general,
1530     use a break statement for each case statement.</para>
1531
1532     <para>If you choose to allow fall through, you should comment both
1533     the fact of the fall through and reason why you felt it was
1534     necessary.</para>
1535
1536     
1537   </sect3>
1538     
1539
1540     <sect3 id="s39"><title>Use 'long' or 'short' Instead of
1541     'int'</title>
1542
1543     <para><emphasis>Explanation:</emphasis></para>
1544
1545     <para>On 32-bit platforms, int usually has the range of long. On
1546     16-bit platforms, int has the range of short.</para>
1547
1548     <para><emphasis>Status:</emphasis> open-to-debate. In the case of most FSF
1549     projects (including X/GNU-Emacs), there are typedefs to int4,
1550     int8, int16, (or equivalence ... I forget the exact typedefs
1551     now). Should we add these to IJB now that we have a "configure"
1552     script?</para>
1553
1554     
1555   </sect3>
1556     
1557
1558     <sect3 id="s40"><title>Don't mix size_t and other types</title>
1559
1560     <para><emphasis>Explanation:</emphasis></para>
1561
1562     <para>The type of size_t varies across platforms. Do not make
1563     assumptions about whether it is signed or unsigned, or about
1564     how long it is. Do not compare a size_t against another
1565     variable of a different type (or even against a constant)
1566     without casting one of the values. Try to avoid using size_t if
1567     you can.</para>
1568
1569     
1570   </sect3>
1571     
1572
1573     <sect3 id="s41"><title>Declare each variable and struct on its
1574     own line.</title>
1575
1576     <para><emphasis>Explanation:</emphasis></para>
1577
1578     <para>It can be tempting to declare a series of variables all on
1579     one line. Don't.</para>
1580
1581     <para><emphasis>Example:</emphasis></para>
1582 <programlisting>
1583 long a = 0;
1584 long b = 0;
1585 long c = 0;</programlisting>
1586
1587     <para><emphasis>Instead of:</emphasis></para>
1588
1589     <para>long a, b, c;</para>
1590
1591     <para><emphasis>Explanation:</emphasis> - there is more room for comments on the
1592     individual variables - easier to add new variables without
1593     messing up the original ones - when searching on a variable to
1594     find its type, there is less clutter to "visually"
1595     eliminate</para>
1596
1597     <para><emphasis>Exceptions:</emphasis> when you want to declare a bunch of loop
1598     variables or other trivial variables; feel free to declare them
1599     on 1 line. You should, although, provide a good comment on
1600     their functions.</para>
1601
1602     <para><emphasis>Status:</emphasis> developer-discretion.</para>
1603
1604     
1605   </sect3>
1606     
1607
1608     <sect3 id="s42"><title>Use malloc/zalloc sparingly</title>
1609
1610     <para><emphasis>Explanation:</emphasis></para>
1611
1612     <para>Create a local struct (on the stack) if the variable will
1613     live and die within the context of one function call.</para>
1614
1615     <para>Only "malloc" a struct (on the heap) if the variable's life
1616     will extend beyond the context of one function call.</para>
1617
1618     <para><emphasis>Example:</emphasis></para>
1619 <programlisting>
1620 If a function creates a struct and stores a pointer to it in a
1621 list, then it should definitely be allocated via `malloc'.
1622 </programlisting>
1623   </sect3>
1624     
1625
1626     <sect3 id="s43"><title>The Programmer Who Uses 'malloc' is
1627     Responsible for Ensuring 'free'</title>
1628
1629     <para><emphasis>Explanation:</emphasis></para>
1630
1631     <para>If you have to "malloc" an instance, you are responsible for
1632     insuring that the instance is `free'd, even if the deallocation
1633     event falls within some other programmer's code. You are also
1634     responsible for ensuring that deletion is timely (i.e. not too
1635     soon, not too late). This is known as "low-coupling" and is a
1636     "good thing (tm)". You may need to offer a
1637     free/unload/destuctor type function to accommodate this.</para>
1638
1639     <para><emphasis>Example:</emphasis></para>
1640 <programlisting>
1641 int load_re_filterfile( struct client_state *csp ) { ... }
1642 static void unload_re_filterfile( void *f ) { ... }</programlisting>
1643
1644     <para><emphasis>Exceptions:</emphasis></para>
1645
1646     <para>The developer cannot be expected to provide `free'ing
1647     functions for C run-time library functions ... such as
1648     `strdup'.</para>
1649
1650     <para><emphasis>Status:</emphasis> developer-discretion. The "main" use of this
1651     standard is for allocating and freeing data structures (complex
1652     or nested).</para>
1653
1654     
1655   </sect3>
1656     
1657
1658     <sect3 id="s44"><title>Add loaders to the `file_list' structure
1659     and in order</title>
1660
1661     <para><emphasis>Explanation:</emphasis></para>
1662
1663     <para>I have ordered all of the "blocker" file code to be in alpha
1664     order. It is easier to add/read new blockers when you expect a
1665     certain order.</para>
1666
1667     <para><emphasis>Note:</emphasis> It may appear that the alpha order is broken in
1668     places by POPUP tests coming before PCRS tests. But since
1669     POPUPs can also be referred to as KILLPOPUPs, it is clear that
1670     it should come first.</para>
1671
1672     
1673   </sect3>
1674     
1675
1676     <sect3 id="s45"><title>"Uncertain" new code and/or changes to
1677     existing code, use FIXME</title>
1678
1679     <para><emphasis>Explanation:</emphasis></para>
1680
1681     <para>If you have enough confidence in new code or confidence in
1682     your changes, but are not *quite* sure of the repercussions,
1683     add this:</para>
1684
1685     <para>/* FIXME: this code has a logic error on platform XYZ, *
1686     attempting to fix */ #ifdef PLATFORM ...changed code here...
1687     #endif</para>
1688
1689     <para>or:</para>
1690
1691     <para>/* FIXME: I think the original author really meant this...
1692     */ ...changed code here...</para>
1693
1694     <para>or:</para>
1695
1696     <para>/* FIXME: new code that *may* break something else... */
1697     ...new code here...</para>
1698
1699     <para><emphasis>Note:</emphasis> If you make it clear that this may or may not
1700     be a "good thing (tm)", it will be easier to identify and
1701     include in the project (or conversely exclude from the
1702     project).</para>
1703
1704     
1705   </sect3>
1706
1707   </sect2>
1708
1709     <sect2 id="s46"><title>Addendum: Template for files and function
1710     comment blocks:</title>
1711
1712     <para><emphasis>Example for file comments:</emphasis></para>
1713 <programlisting>
1714 const char FILENAME_rcs[] = "$Id: developer-manual.sgml,v 1.40 2002/05/04 00:43:43 hal9 Exp $";
1715 /*********************************************************************
1716  *
1717  * File        :  $S<!-- Break CVS Substitution -->ource$
1718  *
1719  * Purpose     :  (Fill me in with a good description!)
1720  *
1721  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
1722  *                Privoxy team. http://www.privoxy.org/
1723  *
1724  *                Based on the Internet Junkbuster originally written
1725  *                by and Copyright (C) 1997 Anonymous Coders and
1726  *                Junkbusters Corporation.  http://www.junkbusters.com
1727  *
1728  *                This program is free software; you can redistribute it
1729  *                and/or modify it under the terms of the GNU General
1730  *                Public License as published by the Free Software
1731  *                Foundation; either version 2 of the License, or (at
1732  *                your option) any later version.
1733  *
1734  *                This program is distributed in the hope that it will
1735  *                be useful, but WITHOUT ANY WARRANTY; without even the
1736  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
1737  *                PARTICULAR PURPOSE.  See the GNU General Public
1738  *                License for more details.
1739  *
1740  *                The GNU General Public License should be included with
1741  *                this file.  If not, you can view it at
1742  *                http://www.gnu.org/copyleft/gpl.html
1743  *                or write to the Free Software Foundation, Inc., 59
1744  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
1745  *
1746  * Revisions   :
1747  *    $L<!-- Break CVS Substitution -->og$
1748  *
1749  *********************************************************************/
1750
1751
1752 #include "config.h"
1753
1754    ...necessary include files for us to do our work...
1755
1756 const char FILENAME_h_rcs[] = FILENAME_H_VERSION;
1757 </programlisting>
1758
1759     <para><emphasis>Note:</emphasis> This declares the rcs variables that should be
1760     added to the "show-proxy-args" page. If this is a brand new
1761     creation by you, you are free to change the "Copyright" section
1762     to represent the rights you wish to maintain.</para>
1763
1764     <para><emphasis>Note:</emphasis> The formfeed character that is present right
1765     after the comment flower box is handy for (X|GNU)Emacs users to
1766     skip the verbiage and get to the heart of the code (via
1767     `forward-page' and `backward-page'). Please include it if you
1768     can.</para>
1769
1770     <para><emphasis>Example for file header comments:</emphasis></para>
1771 <programlisting>
1772 #ifndef _FILENAME_H
1773 #define _FILENAME_H
1774 #define FILENAME_H_VERSION "$Id: developer-manual.sgml,v 1.40 2002/05/04 00:43:43 hal9 Exp $"
1775 /*********************************************************************
1776  *
1777  * File        :  $S<!-- Break CVS Substitution -->ource$
1778  *
1779  * Purpose     :  (Fill me in with a good description!)
1780  *
1781  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
1782  *                Privoxy team. http://www.privoxy.org/
1783  *
1784  *                Based on the Internet Junkbuster originally written
1785  *                by and Copyright (C) 1997 Anonymous Coders and
1786  *                Junkbusters Corporation.  http://www.junkbusters.com
1787  *
1788  *                This program is free software; you can redistribute it
1789  *                and/or modify it under the terms of the GNU General
1790  *                Public License as published by the Free Software
1791  *                Foundation; either version 2 of the License, or (at
1792  *                your option) any later version.
1793  *
1794  *                This program is distributed in the hope that it will
1795  *                be useful, but WITHOUT ANY WARRANTY; without even the
1796  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
1797  *                PARTICULAR PURPOSE.  See the GNU General Public
1798  *                License for more details.
1799  *
1800  *                The GNU General Public License should be included with
1801  *                this file.  If not, you can view it at
1802  *                http://www.gnu.org/copyleft/gpl.html
1803  *                or write to the Free Software Foundation, Inc., 59
1804  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
1805  *
1806  * Revisions   :
1807  *    $L<!-- Break CVS Substitution -->og$
1808  *
1809  *********************************************************************/
1810
1811
1812 #include "project.h"
1813
1814 #ifdef __cplusplus
1815 extern "C" {
1816 #endif
1817
1818    ... function headers here ...
1819
1820
1821 /* Revision control strings from this header and associated .c file */
1822 extern const char FILENAME_rcs[];
1823 extern const char FILENAME_h_rcs[];
1824
1825
1826 #ifdef __cplusplus
1827 } /* extern "C" */
1828 #endif
1829
1830 #endif /* ndef _FILENAME_H */
1831
1832 /*
1833   Local Variables:
1834   tab-width: 3
1835   end:
1836 */
1837 </programlisting>
1838
1839     <para><emphasis>Example for function comments:</emphasis></para>
1840 <programlisting>
1841 /*********************************************************************
1842  *
1843  * Function    :  FUNCTION_NAME
1844  *
1845  * Description :  (Fill me in with a good description!)
1846  *
1847  * parameters  :
1848  *          1  :  param1 = pointer to an important thing
1849  *          2  :  x      = pointer to something else
1850  *
1851  * Returns     :  0 => Ok, everything else is an error.
1852  *
1853  *********************************************************************/
1854 int FUNCTION_NAME( void *param1, const char *x )
1855 {
1856    ...
1857    return( 0 );
1858
1859 }
1860 </programlisting>
1861
1862     <para><emphasis>Note:</emphasis> If we all follow this practice, we should be
1863     able to parse our code to create a "self-documenting" web
1864     page.</para>
1865
1866   </sect2>
1867
1868   </sect1>
1869
1870   <!--   ~~~~~       New section      ~~~~~     -->
1871   <sect1 id="testing"><title>Testing Guidelines</title>
1872     <para>To be filled.
1873 </para>
1874
1875     <!--   ~~~~~       New section      ~~~~~     -->
1876     <sect2 id="testing-plan"><title>Testplan for releases</title>
1877       <para>
1878        Explain release numbers. major, minor. developer releases. etc.
1879
1880 <orderedlist numeration="arabic">
1881           <listitem><para>
1882 Remove any existing rpm with rpm -e
1883 </para></listitem>
1884           <listitem><para>
1885 Remove any file that was left over. This includes (but is not limited to)
1886       <itemizedlist>
1887                 <listitem><para>/var/log/privoxy</para></listitem>
1888                 <listitem><para>/etc/privoxy</para></listitem>
1889                 <listitem><para>/usr/sbin/privoxy</para></listitem>
1890                 <listitem><para>/etc/init.d/privoxy</para></listitem>
1891                 <listitem><para>/usr/doc/privoxy*</para></listitem>
1892               </itemizedlist>
1893 </para></listitem>
1894           <listitem><para>
1895 Install the rpm. Any error messages?
1896 </para></listitem>
1897           <listitem><para>start,stop,status <application>Privoxy</application> with the specific script
1898       (e.g. /etc/rc.d/init/privoxy stop). Reboot your machine. Does
1899       autostart work?</para></listitem>
1900           <listitem><para>Start browsing. Does <application>Privoxy</application> work? Logfile written?</para></listitem>
1901           <listitem><para>Remove the rpm. Any error messages? All files removed?</para></listitem>
1902         </orderedlist>
1903 </para>
1904     </sect2>
1905
1906     <!--   ~~~~~       New section      ~~~~~     -->
1907     <sect2 id="testing-report"><title>Test reports</title>
1908       <para>
1909 Please submit test reports only with the <ulink url="http://sourceforge.net/tracker/?func=add&amp;group_id=11118&amp;atid=395005">test form</ulink>
1910 at sourceforge. Three simple steps:
1911         <itemizedlist>
1912           
1913           <listitem><para>Select category: the distribution you test on.</para></listitem>
1914           <listitem><para>Select group: the version of <application>Privoxy</application> that we are about to release.</para></listitem>
1915           <listitem><para>Fill the Summary and Detailed Description with something
1916               intelligent (keep it short and precise).</para>
1917           </listitem>
1918         </itemizedlist>
1919         Do not mail to the mailinglist (we cannot keep track on issues there).
1920       </para>
1921     </sect2>
1922     
1923   </sect1>
1924
1925   <!--   ~~~~~       New section      ~~~~~     -->
1926   <sect1 id="newrelease"><title>Releasing a New Version</title>
1927     <para>
1928         When we release versions of <application>Privoxy</application>,
1929         our work leaves our cozy secret lab and has to work in the cold
1930         RealWorld[tm]. Once it is released, there is no way to call it
1931         back, so it is very important that great care is taken to ensure
1932         that everything runs fine, and not to introduce problems in the
1933         very last minute.
1934     </para>
1935     <para>
1936         So when releasing a new version, please adhere exactly to the
1937         procedure outlined in this chapter.
1938     </para>
1939
1940     <para>
1941         The following programs are required to follow this process:
1942         <filename>ncftpput</filename> (ncftp), <filename>scp, ssh</filename> (ssh),
1943         <filename>gmake</filename> (GNU's version of make), autoconf, cvs.
1944     </para>
1945
1946     <sect2 id="versionnumbers">
1947     <title>Version numbers</title>
1948
1949     <para>
1950       First you need to determine which version number the release will have. 
1951       <application>Privoxy</application> version numbers consist of three numbers,
1952       separated by dots, like in X.Y.Z, where:
1953         <itemizedlist>
1954           <listitem>
1955             <para>
1956               X, the version major, is rarely ever changed. It is increased by one if
1957               turning a development branch into stable substantially changes the functionality,
1958               user interface or configuration syntax. Majors 1 and 2 were 
1959               <application>Junkbuster</application>, and 3 will be the first stable
1960               <application>Privoxy</application> release.
1961             </para>
1962           </listitem>
1963           <listitem>
1964             <para>
1965               Y, the version minor, represents the branch within the major version.
1966               At any point in time, there are two branches being maintained:
1967               The stable branch, with an even minor, say, 2N, in which no functionality is
1968               being added and only bugfixes are made, and 2N+1, the development branch, in
1969               which the further development of <application>Privoxy</application> takes
1970               place.
1971               This enables us to turn the code upside down and inside out, while at the same time
1972               providing and maintaining a stable version.
1973               The minor is reset to zero (and one) when the major is inrcemented. When a development
1974               branch has matured to the point where it can be turned into stable, the old stable branch
1975               2N is given up (i.e. no longer maintained), the former development branch 2N+1 becomes the
1976               new stable branch 2N+2, and a new development branch 2N+3 is opened.
1977             </para>
1978           </listitem>
1979           <listitem>
1980             <para>
1981               Z, the point or sub version, represents a release of the software within a branch.
1982               It is therefore incremented immediately before each code freeze. 
1983               In development branches, only the even point versions correspond to actual releases,
1984               while the odd ones denote the evolving state of the sources on CVS in between.
1985               It follows that Z is odd on CVS in development branches most of the time. There, it gets
1986               increased to an even number immediately before a code freeze, and is increased to an odd
1987               number again immediately thereafter.
1988               This ensures that builds from CVS snapshots are easily distinguished from released versions.
1989               The point version is reset to zero when the minor changes.
1990             </para>
1991           </listitem>
1992         </itemizedlist>
1993     </para>
1994
1995     </sect2>
1996      
1997     <sect2 id="beforerelease">
1998     <title>Before the Release: Freeze</title>
1999      <para>
2000        The following <emphasis>must be done by one of the
2001        developers</emphasis> prior to each new release.
2002      </para>
2003      <para>
2004       <itemizedlist>
2005        <listitem>
2006         <para>
2007          Make sure that everybody who has worked on the code in the last
2008          couple of days has had a chance to yell <quote>no!</quote> in case
2009          they have pending changes/fixes in their pipelines. Announce the
2010          freeze so that nobody will interfere with last minute changes.
2011         </para>
2012       </listitem> 
2013       <listitem>
2014        <para>
2015          Increment the version number (point from odd to even in development
2016          branches!) in <filename>configure.in</filename>.
2017        </para>
2018       </listitem> 
2019       <listitem>
2020        <para>
2021         If <filename>default.action</filename> has changed since last
2022         release (i.e. software release or standalone actions file release),
2023         bump up its version info to A.B in this line:
2024        </para>
2025        <para> 
2026         <programlisting>
2027   {+add-header{X-Actions-File-Version: A.B} -filter -no-popups}
2028 </programlisting>
2029        </para>
2030        <para> 
2031         Then change the version info in doc/webserver/actions/index.php,
2032         line: '$required_actions_file_version = "A.B";'
2033        </para>
2034       </listitem>
2035       <listitem>
2036        <para>
2037         If the HTML documentation is not in sync with the SGML sources
2038         you need to regenerate and upload it to the webserver. (If in
2039         doubt, just do it.) See the Section "Updating the webserver" in
2040         this manual for details.
2041        </para>
2042       </listitem> 
2043       <listitem>
2044        <para>
2045         <emphasis>Commit all files that were changed in the above steps!</emphasis>
2046        </para>
2047       </listitem>
2048       <listitem>
2049        <para>
2050         Tag all files in CVS with the version number with
2051         <quote><command>cvs tag v_X_Y_Z</command></quote>.
2052         Don't use vX_Y_Z, ver_X_Y_Z, v_X.Y.Z (won't work) etc.
2053        </para>
2054       </listitem> 
2055      <listitem>
2056        <para>
2057         If the release was in a development branch, increase the point version
2058         from even to odd (X.Y.(Z+1)) again in <filename>configure.in</filename> and
2059         commit your change.
2060        </para>
2061       </listitem> 
2062      <listitem>
2063        <para>
2064         On the webserver, copy the user manual to a new top-level directory
2065         called <filename>X.Y.Z</filename>. This ensures that help links from the CGI
2066         pages, which have the version as a prefix, will go into the right version of the manual.
2067         If this is a development branch release, also symlink <filename>X.Y.(Z-1)</filename>
2068         to <filename>X.Y.Z</filename> and <filename>X.Y.(Z+1)</filename> to
2069         <filename>.</filename> (i.e. dot). 
2070        </para>
2071       </listitem> 
2072       </itemizedlist>
2073      </para> 
2074     </sect2>
2075     
2076     <sect2 id="therelease">
2077     <title>Building and Releasing the Packages</title>
2078      <para>
2079       Now the individual packages can be built and released. Note that for
2080       GPL reasons the first package to be released is always the source tarball.
2081      </para>
2082  
2083      <para>
2084       For <emphasis>all</emphasis> types of packages, including the source tarball,
2085       <emphasis>you must make sure that you build from clean sources by exporting
2086       the right version from CVS into an empty directory:</emphasis>.
2087      </para>
2088       
2089      <para>
2090       <programlisting>
2091   mkdir dist # delete or choose different name if it already exists
2092   cd dist
2093   cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
2094   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
2095 </programlisting>
2096     </para>
2097   
2098     <para>
2099      <emphasis>Do NOT change</emphasis> a single bit, including, but not limited to
2100      version information after export from CVS. This is to make sure that
2101      all release packages, and with them, all future bug reports, are based
2102      on exactly the same code.
2103     </para>
2104   
2105     <para>
2106      Please find additional instructions for the source tarball and the
2107      individual platform dependent binary packages below.
2108     </para>
2109
2110     <sect3 id="newrelease-tarball"><title>Source Tarball</title>
2111         <para>
2112         First, <emphasis>make sure that you have freshly exported the right
2113         version into an empty directory</emphasis>. (See "Building and releasing
2114         packages" above). Then run:
2115         </para>
2116         <para>
2117         <programlisting>
2118   cd current
2119   autoheader && autoconf && ./configure
2120 </programlisting>
2121         </para>
2122         <para>
2123         Then do:
2124         </para>
2125         <para>
2126         <programlisting>
2127   make tarball-dist
2128 </programlisting>
2129         </para>
2130         <para>
2131         To upload the package to Sourceforge, simply issue
2132         </para>
2133         <para>
2134         <programlisting>
2135   make tarball-upload
2136 </programlisting>
2137         </para>
2138         <para>
2139         Go to the displayed URL and release the file publicly on Sourceforge.
2140         For the change log field, use the relevant section of the
2141         <filename>ChangeLog</filename> file.
2142       </para>
2143     </sect3>
2144
2145     <sect3 id="newrelease-rpm"><title>SuSE or Red Hat RPM</title>
2146         <para>
2147         In following text, replace <replaceable class="parameter">dist</replaceable>
2148         with either <quote>rh</quote> for Red Hat or <quote>suse</quote> for SuSE.
2149         </para>
2150         <para>
2151         First, <emphasis>make sure that you have freshly exported the right
2152         version into an empty directory</emphasis>. (See "Building and releasing
2153         packages" above). 
2154         </para>
2155         <para>
2156         As the only exception to not changing anything after export from CVS,
2157         now examine the file <filename>privoxy-</filename><replaceable class="parameter">dist</replaceable><filename>.spec</filename>
2158         and make sure that the version information and the RPM release number are
2159         correct. The RPM release numbers for each version start at one. Hence it must
2160         be reset to one if this is the first RPM for
2161         <replaceable class="parameter">dist</replaceable> which is built from version
2162         X.Y.Z. Check the
2163         <ulink url="http://sourceforge.net/project/showfiles.php?group_id=11118">file
2164         list</ulink> if unsure. Else, it must be set to the highest already available RPM
2165         release number for that version plus one.
2166         </para>
2167         <para>
2168         Then run:
2169         </para>
2170         <para>
2171         <programlisting>
2172   cd current
2173   autoheader && autoconf && ./configure
2174 </programlisting>
2175         </para>
2176         <para>
2177         Then do
2178         </para>
2179         <para>
2180         <programlisting>
2181   make <replaceable class="parameter">dist</replaceable>-dist
2182 </programlisting>
2183         </para>
2184         <para>
2185         To upload the package to Sourceforge, simply issue
2186         </para>
2187         <para>
2188         <programlisting>
2189   make <replaceable class="parameter">dist</replaceable>-upload <replaceable class="parameter">rpm_packagerev</replaceable>
2190 </programlisting>
2191         </para>
2192         <para>
2193         where <replaceable class="parameter">rpm_packagerev</replaceable> is the
2194         RPM release number as determined above.
2195         Go to the displayed URL and release the file publicly on Sourceforge.
2196         Use the release notes and change log from the source tarball package.
2197       </para>
2198     </sect3>
2199
2200     <sect3 id="newrelease-os2"><title>OS/2</title>
2201       <para>
2202         First, <emphasis>make sure that you have freshly exported the right
2203         version into an empty directory</emphasis>. (See "Building and releasing
2204         packages" above). Then get the OS/2 Setup module:
2205         </para>
2206         <para>
2207         <programlisting>
2208   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co os2setup
2209 </programlisting>
2210         </para>
2211         <para>
2212         You will need a mix of development tools.
2213         The main compilation takes place with IBM Visual Age C++.
2214         Some ancillary work takes place with GNU tools, available from
2215         various sources like hobbes.nmsu.edu.
2216         Specificially, you will need <filename>autoheader</filename>,
2217         <filename>autoconf</filename> and <filename>sh</filename> tools.
2218         The packaging takes place with WarpIN, available from various sources, including
2219         its home page: <ulink url="http://www.xworkplace.org/">xworkplace</ulink>.
2220         </para>
2221         <para>
2222         Change directory to the <filename>os2setup</filename> directory.
2223         Edit the os2build.cmd file to set the final executable filename.
2224         For example, 
2225         </para>
2226         <para>
2227         <programlisting>
2228   installExeName='privoxyos2_setup_X.Y.Z.exe'
2229 </programlisting>
2230         </para>
2231         <para>
2232         Next, edit the <filename>IJB.wis</filename> file so the release number matches
2233         in the <filename>PACKAGEID</filename> section:
2234         </para>
2235         <para>
2236         <programlisting>
2237   PACKAGEID="Privoxy Team\Privoxy\Privoxy Package\X\Y\Z"
2238 </programlisting>
2239         </para>
2240         <para>
2241         You're now ready to build.  Run:
2242         </para>
2243         <para>
2244         <programlisting>
2245   os2build
2246 </programlisting>
2247         </para>
2248         <para>
2249          You will find the  WarpIN-installable executable in the
2250         <filename>./files</filename> directory. Upload this anonymously to
2251          <filename>uploads.sourceforge.net/incoming</filename>, create a release
2252          for it, and you're done. Use the release notes and Change Log from the
2253          source tarball package.
2254         </para>
2255     </sect3>
2256
2257     <sect3 id="newrelease-solaris"><title>Solaris</title>
2258       <para>
2259         Login to Sourceforge's compilefarm via ssh:
2260         </para>
2261         <para>
2262         <programlisting>
2263   ssh cf.sourceforge.net
2264 </programlisting>
2265         </para>
2266         <para>
2267         Choose the right operating system (not the Debian one).
2268         When logged in, <emphasis>make sure that you have freshly exported the right
2269         version into an empty directory</emphasis>. (See "Building and releasing
2270         packages" above). Then run:
2271         </para>
2272         <para>
2273         <programlisting>
2274   cd current
2275   autoheader && autoconf && ./configure
2276 </programlisting>
2277         </para>
2278         <para>
2279         Then run
2280         </para>
2281         <para>
2282         <programlisting>
2283   gmake solaris-dist
2284 </programlisting>
2285         </para>
2286         <para>
2287         which creates a gzip'ed tar archive. Sadly, you cannot use <command>make
2288         solaris-upload</command> on the Sourceforge machine (no ncftpput). You now have
2289         to manually upload the archive to Sourceforge's ftp server and release
2290         the file publicly. Use the release notes and Change Log from the
2291         source tarball package.
2292         </para>
2293     </sect3>
2294
2295     <sect3 id="newrelease-windows"><title>Windows</title>
2296       <para>
2297         You should ensure you have the latest version of Cygwin (from
2298         <ulink url="http://www.cygwin.com/">http://www.cygwin.com/</ulink>).
2299         Run the following commands from within a Cygwin bash shell.
2300       </para>
2301       <para>
2302         First, <emphasis>make sure that you have freshly exported the right
2303         version into an empty directory</emphasis>. (See "Building and releasing
2304         packages" above). Then get the Windows setup module:
2305       </para>
2306       <para>
2307       <programlisting>
2308         cvs -z3  -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co winsetup
2309 </programlisting>
2310       </para>
2311       <para>
2312         Then you can build the package.  This is fully automated, and is
2313         controlled by <filename>winsetup/GNUmakefile</filename>.
2314         All you need to do is:
2315       </para>
2316       <para>
2317       <programlisting>
2318         cd winsetup
2319         make
2320 </programlisting>
2321       </para>
2322       <para>
2323         Now you can manually rename <filename>privoxy_setup.exe</filename> to
2324         <filename>privoxy_setup_X_Y_Z.exe</filename>, and upload it to
2325         SourceForge. When releasing the package on SourceForge, use the release notes
2326         and Change Log from the source tarball package.
2327       </para>
2328     </sect3>
2329
2330     <sect3 id="newrelease-debian"><title>Debian</title>
2331       <para>
2332         First, <emphasis>make sure that you have freshly exported the right
2333         version into an empty directory</emphasis>. (See "Building and releasing
2334         packages" above). Then, run:
2335         </para>
2336         <para>
2337         <programlisting>
2338   cd current
2339   autoheader && autoconf && ./configure
2340 </programlisting>
2341         </para>
2342         <para>
2343         Then do FIXME.
2344         </para>
2345     </sect3>
2346
2347     <sect3 id="newrelease-macosx"><title>Mac OSX</title>
2348       <para>
2349         First, <emphasis>make sure that you have freshly exported the right
2350         version into an empty directory</emphasis>. (See "Building and releasing
2351         packages" above). Then get the Mac OSX setup module:
2352         </para>
2353         <para>
2354         <programlisting>
2355   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co osxsetup
2356 </programlisting>
2357         </para>
2358         <para>
2359         Then run:
2360         </para>
2361         <para>
2362         <programlisting>
2363   cd osxsetup
2364   build
2365 </programlisting>
2366         </para>
2367         <para>
2368         This will run <filename>autoheader</filename>, <filename>autoconf</filename> and
2369         <filename>configure</filename> as well as <filename>make</filename>.
2370         Finally, it will copy over the necessary files to the ./osxsetup/files directory
2371         for further processing by <filename>PackageMaker</filename>.
2372         </para>
2373         <para>
2374         Bring up PackageMaker with the PrivoxyPackage.pmsp definition file, modify the package
2375         name to match the release, and hit the "Create package" button.
2376         If you specify ./Privoxy.pkg as the output package name, you can then create
2377         the distributable zip file with the command:
2378         </para>
2379         <para>
2380         <programlisting>
2381 zip -r privoxyosx_setup_x.y.z.zip Privoxy.pkg
2382 </programlisting>
2383         </para>
2384         <para>
2385         You can then upload <filename>privoxyosx_setup_x.y.z.zip</filename> anonymously to 
2386         <filename>uploads.sourceforge.net/incoming</filename>,
2387         create a release for it, and you're done. Use the release notes
2388         and Change Log from the source tarball package.
2389         </para>
2390     </sect3>
2391
2392     <sect3 id="newrelease-freebsd"><title>FreeBSD</title>
2393       <para>
2394         Login to Sourceforge's compilefarm via ssh:
2395         </para>
2396         <para>
2397         <programlisting>
2398   ssh cf.sourceforge.net
2399 </programlisting>
2400         </para>
2401         <para>
2402         Choose the right operating system.
2403         When logged in, <emphasis>make sure that you have freshly exported the right
2404         version into an empty directory</emphasis>. (See "Building and releasing
2405         packages" above). Then run:
2406         </para>
2407         <para>
2408         <programlisting>
2409   cd current
2410   autoheader && autoconf && ./configure
2411 </programlisting>
2412         </para>
2413         <para>
2414         Then run:
2415         </para>
2416         <para>
2417         <programlisting>
2418   gmake freebsd-dist
2419 </programlisting>
2420         </para>
2421         <para>
2422         which creates a gzip'ed tar archive. Sadly, you cannot use <command>make
2423         freebsd-upload</command> on the Sourceforge machine (no ncftpput). You now have
2424         to manually upload the archive to Sourceforge's ftp server and release
2425         the file publicly. Use the release notes and Change Log from the
2426         source tarball package.
2427         </para>
2428     </sect3>
2429
2430     <sect3 id="newrelease-hpux"><title>HP-UX 11</title>
2431       <para>
2432         First, <emphasis>make sure that you have freshly exported the right
2433         version into an empty directory</emphasis>. (See "Building and releasing
2434         packages" above). Then run:
2435         </para>
2436         <para>
2437         <programlisting>
2438   cd current
2439   autoheader && autoconf && ./configure
2440 </programlisting>
2441         </para>
2442         <para>
2443         Then do FIXME.
2444         </para>
2445     </sect3>
2446
2447     <sect3 id="newrelease-amiga"><title>Amiga OS</title>
2448       <para>
2449         First, <emphasis>make sure that you have freshly exported the right
2450         version into an empty directory</emphasis>. (See "Building and releasing
2451         packages" above). Then run:
2452         </para>
2453         <para>
2454         <programlisting>
2455   cd current
2456   autoheader && autoconf && ./configure
2457 </programlisting>
2458         </para>
2459         <para>
2460         Then do FIXME.
2461         </para>
2462     </sect3>
2463
2464     <sect3 id="newrelease-aix"><title>AIX</title>
2465       <para>
2466         Login to Sourceforge's compilefarm via ssh:
2467         </para>
2468         <para>
2469         <programlisting>
2470   ssh cf.sourceforge.net
2471 </programlisting>
2472         </para>
2473         <para>
2474         Choose the right operating system.
2475         When logged in, <emphasis>make sure that you have freshly exported the right
2476         version into an empty directory</emphasis>. (See "Building and releasing
2477         packages" above). Then run:
2478         </para>
2479         <para>
2480         <programlisting>
2481   cd current
2482   autoheader && autoconf && ./configure
2483 </programlisting>
2484         </para>
2485         <para>
2486         Then run:
2487         </para>
2488         <para>
2489         <programlisting>
2490   make aix-dist
2491 </programlisting>
2492         </para>
2493         <para>
2494         which creates a gzip'ed tar archive. Sadly, you cannot use <command>make
2495         aix-upload</command> on the Sourceforge machine (no ncftpput). You now have
2496         to manually upload the archive to Sourceforge's ftp server and release
2497         the file publicly. Use the release notes and Change Log from the
2498         source tarball package.
2499         </para>
2500     </sect3>
2501    </sect2>
2502
2503    <sect2 id="releasing">
2504    <title>Uploading and Releasing Your Package</title>
2505     <para>
2506       After the package is ready, it is time to upload it 
2507       to SourceForge, and go through the release steps. The upload
2508       is done via FTP:
2509     </para>
2510      <para>
2511       <itemizedlist>
2512        <listitem>
2513         <para>
2514           Upload to: <ulink url="ftp://upload.sourceforge.net/incoming">ftp://upload.sourceforge.net/incoming</ulink>
2515         </para>
2516       </listitem> 
2517       <listitem>
2518        <para>
2519          user: <literal>anonymous</literal>
2520        </para>
2521       </listitem> 
2522       <listitem>
2523        <para>
2524          password: <literal>ijbswa-developers@lists.sourceforge.net</literal>
2525        </para>
2526       </listitem> 
2527      </itemizedlist>
2528     </para> 
2529     <para>
2530      Once this done go to <ulink url="http://sourceforge.net/project/admin/editpackages.php?group_id=11118">http://sourceforge.net/project/admin/editpackages.php?group_id=11118</ulink>, 
2531      making sure you are logged in. Find your target platform in the 
2532      second column, and click <literal>Add Release</literal>. You will 
2533      then need to create a new release for your package, using the format 
2534      of <literal>$VERSION ($CODE_STATUS)</literal>, e.g. <emphasis>&p-version;
2535      (beta)</emphasis>.
2536     </para>
2537     <para>
2538      Now just follow the prompts. Be sure to add any appropriate Release
2539      notes. You should see your freshly uploaded packages in 
2540      <quote>Step 2. Add Files To This Release</quote>. Check the 
2541      appropriate box(es). Remember at each step to hit the 
2542      <quote>Refresh/Submit</quote> buttons! You should now see your 
2543      file(s) listed in Step 3. Fill out the forms with the appropriate 
2544      information for your platform, being sure to hit <quote>Update</quote>
2545      for each file. If anyone is monitoring your platform, check the 
2546      <quote>email</quote> box at the very bottom to notify them of 
2547      the new package. This should do it!
2548     </para>
2549     <para>
2550      If you have made errors, or need to make changes, you can go through 
2551      essentially the same steps, but select <literal>Edit Release</literal>, 
2552      instead of <literal>Add Release</literal>.
2553     </para>
2554    </sect2>
2555
2556     <sect2 id="afterrelease">
2557     <title>After the Release</title>
2558      <para>
2559       When all (or: most of the) packages have been uploaded and made available,
2560       send an email to the <ulink url="mailto:ijbswa-announce@lists.sourceforge.net">announce
2561       mailing list</ulink>, Subject: "Version X.Y.Z available for download". Be sure to
2562       include the
2563       <ulink url="http://sourceforge.net/project/showfiles.php?group_id=11118">download
2564       location</ulink>, the release notes and the change log.
2565      </para>
2566    </sect2>
2567
2568   </sect1>
2569   
2570   <!--   ~~~~~       New section      ~~~~~     -->
2571   <sect1 id="webserver-update"><title>Update the Webserver</title>
2572    <para>
2573     When updating the webserver, please follow these steps to make
2574     sure that no broken links, incosistent contents or permission
2575     problems will occur:
2576    </para>
2577    <para>
2578     If you have changed anything in the documentation source SGML files,
2579     do:
2580    </para>
2581    <para>
2582     <programlisting>
2583   make dok # (or make redkat-dok if make dok doesn't work for you)
2584 </programlisting>
2585    </para>
2586    <para>
2587     That will generate <filename>doc/webserver/user-manual</filename>,
2588     <filename>doc/webserver/developer-manual</filename>,
2589     <filename>doc/webserver/faq</filename> and
2590     <filename>doc/webserver/index.html</filename> automatically.
2591    </para>
2592    <para>
2593     If you changed the manual page source, generate
2594     <filename>doc/webserver/man-page/privoxy-man-page.html</filename>
2595     by running <quote><command>make man</command></quote>. (This is
2596     a separate target due to dependencies on some obscure perl scripts. 
2597     See comments in <filename>GNUmakefile</filename>.)
2598    </para>
2599    <para>
2600     If you want to add new files to the webserver, create them locally in
2601     the <filename>doc/webserver/*</filename> directory (or
2602     create new directories under <filename>doc/webserver</filename>).
2603    </para>
2604    <para>
2605     Next, commit any changes from the above steps to CVS. All set? Then do
2606    </para>
2607    <para>
2608     <programlisting>
2609   make webserver
2610 </programlisting>
2611    </para>
2612    <para>
2613     This will do the upload to <ulink url="http://www.privoxy.org/">the
2614     webserver</ulink> (www.privoxy.org) and ensure all files and directories
2615     there are group writable.
2616    </para>
2617    <para>
2618     Please do <emphasis>NOT</emphasis> use any other means of transferring
2619     files to the webserver to avoid permission problems.
2620    </para>
2621   </sect1>
2622
2623   <!--   ~~~~~       New section      ~~~~~     -->
2624   <sect1 id="contact"><title>Contacting the developers, Bug Reporting and Feature Requests</title>
2625 <!-- Include contacting.sgml  -->
2626  &contacting;
2627 <!-- end contacting -->
2628   </sect1>
2629   
2630   <!--   ~~~~~       New section      ~~~~~     -->
2631   <sect1 id="copyright"><title>Copyright and History</title>
2632
2633 <sect2><title>Copyright</title>
2634 <!-- Include copyright.sgml -->
2635  &copyright;
2636 <!-- end -->
2637 </sect2>
2638
2639 <sect2><title>History</title>
2640 <!-- Include history.sgml -->
2641  &history;
2642 <!-- end -->
2643 </sect2>
2644
2645   </sect1>
2646   
2647   <!--   ~~~~~       New section      ~~~~~     -->
2648   <sect1 id="seealso"><title>See also</title>
2649 <!-- Include seealso.sgml -->
2650  &seealso;
2651 <!-- end  -->
2652
2653   </sect1>
2654
2655   <!--
2656
2657   This program is free software; you can redistribute it 
2658   and/or modify it under the terms of the GNU General
2659   Public License as published by the Free Software
2660   Foundation; either version 2 of the License, or (at
2661   your option) any later version.
2662
2663   This program is distributed in the hope that it will
2664   be useful, but WITHOUT ANY WARRANTY; without even the
2665   implied warranty of MERCHANTABILITY or FITNESS FOR A
2666   PARTICULAR PURPOSE.  See the GNU General Public
2667   License for more details.
2668
2669   The GNU General Public License should be included with
2670   this file.  If not, you can view it at
2671   http://www.gnu.org/copyleft/gpl.html
2672   or write to the Free Software Foundation, Inc., 59
2673   Temple Place - Suite 330, Boston, MA  02111-1307, USA.
2674
2675   $Log: developer-manual.sgml,v $
2676   Revision 1.40  2002/05/04 00:43:43  hal9
2677   -Remove TOC/first page kludge with proper stylesheet fix.
2678   -Combined the two very brief sections: Intro and Quickstart.
2679
2680   Revision 1.39  2002/05/02 15:08:25  oes
2681   Added explanation about version numbers and RPM package revisions
2682
2683   Revision 1.38  2002/04/29 02:20:31  hal9
2684   Add info on steps for uploading and the release process on SF.
2685
2686   Revision 1.37  2002/04/26 17:23:29  swa
2687   bookmarks cleaned, changed structure of user manual, screen and programlisting cleanups, and numerous other changes that I forgot
2688
2689   Revision 1.36  2002/04/26 05:25:23  hal9
2690   Mass commit to catch a few scattered fixes.
2691
2692   Revision 1.35  2002/04/17 15:16:15  oes
2693   Added link to docbook crash course
2694
2695   Revision 1.34  2002/04/15 23:39:32  oes
2696    - Extended & fixed the release section
2697    - Added CVS guideline sections
2698    - Separated webserver section from release section
2699    - Commented out boilerplate inclusion (If you don't know yet what it is,
2700      you shouldn't mess with its code ;-)
2701    - Nits & fixes
2702
2703   Revision 1.33  2002/04/12 03:49:53  hal9
2704   Spell checked. Clarification on where docs are kept.
2705
2706   Revision 1.32  2002/04/11 21:29:58  jongfoster
2707   Documenting Win32 release procedure
2708
2709   Revision 1.31  2002/04/11 09:32:52  oes
2710   more nits
2711
2712   Revision 1.30  2002/04/11 09:24:53  oes
2713   nits
2714
2715   Revision 1.29  2002/04/10 18:45:14  swa
2716   generated
2717
2718   Revision 1.28  2002/04/08 22:59:26  hal9
2719   Version update. Spell chkconfig correctly :)
2720
2721   Revision 1.27  2002/04/08 15:31:18  hal9
2722   Touch ups to documentation section.
2723
2724   Revision 1.26  2002/04/07 23:50:08  hal9
2725   Documentation changes to reflect HTML docs now in CVS, and new generated files
2726   list.
2727
2728   Revision 1.25  2002/04/06 05:07:28  hal9
2729   -Add privoxy-man-page.sgml, for man page.
2730   -Add authors.sgml for AUTHORS (and p-authors.sgml)
2731   -Reworked various aspects of various docs.
2732   -Added additional comments to sub-docs.
2733
2734   Revision 1.24  2002/04/04 21:33:37  hal9
2735   More on documenting the documents.
2736
2737   Revision 1.23  2002/04/04 18:46:47  swa
2738   consistent look. reuse of copyright, history et. al.
2739
2740   Revision 1.22  2002/04/04 17:27:56  swa
2741   more single file to be included at multiple points. make maintaining easier
2742
2743   Revision 1.21  2002/04/04 06:48:37  hal9
2744   Structural changes to allow for conditional inclusion/exclusion of content
2745   based on entity toggles, e.g. 'entity % p-not-stable  "INCLUDE"'. And
2746   definition of internal entities, e.g. 'entity p-version "2.9.13"' that will
2747   eventually be set by Makefile.
2748   More boilerplate text for use across multiple docs.
2749
2750   Revision 1.20  2002/04/04 03:28:27  david__schmidt
2751   Add Mac OSX section
2752
2753   Revision 1.19  2002/04/03 15:09:42  david__schmidt
2754   Add OS/2 build section
2755
2756   Revision 1.18  2002/04/03 03:51:48  hal9
2757   Touch ups.
2758
2759   Revision 1.17  2002/04/03 01:21:17  hal9
2760   Implementing Andreas's suggestions for Release sections.
2761
2762   Revision 1.16  2002/03/31 23:04:40  hal9
2763   Fleshed out the doc section, and added something for an intro so it was not
2764   blank.
2765
2766   Revision 1.15  2002/03/30 22:29:47  swa
2767   wrong make flavour
2768
2769   Revision 1.14  2002/03/30 19:04:08  swa
2770   people release differently. no good.
2771   I want to make parts of the docs only.
2772
2773   Revision 1.13  2002/03/27 01:16:41  hal9
2774   ditto
2775
2776   Revision 1.12  2002/03/27 01:02:51  hal9
2777   Touch up on name change...
2778
2779   Revision 1.11  2002/03/26 22:29:55  swa
2780   we have a new homepage!
2781
2782   Revision 1.10  2002/03/24 12:33:01  swa
2783   more additions.
2784
2785   Revision 1.9  2002/03/24 11:01:05  swa
2786   name change
2787
2788   Revision 1.8  2002/03/23 15:13:11  swa
2789   renamed every reference to the old name with foobar.
2790   fixed "application foobar application" tag, fixed
2791   "the foobar" with "foobar". left junkbustser in cvs
2792   comments and remarks to history untouched.
2793
2794   Revision 1.7  2002/03/11 13:13:27  swa
2795   correct feedback channels
2796
2797   Revision 1.6  2002/02/24 14:25:06  jongfoster
2798   Formatting changes.  Now changing the doctype to DocBook XML 4.1
2799   will work - no other changes are needed.
2800
2801   Revision 1.5  2001/10/31 18:16:51  swa
2802   documentation added: howto generate docs in text and html
2803   format, howto move stuff to the webserver.
2804
2805   Revision 1.4  2001/09/23 10:13:48  swa
2806   upload process established. run make webserver and
2807   the documentation is moved to the webserver. documents
2808   are now linked correctly.
2809
2810   Revision 1.3  2001/09/13 15:27:40  swa
2811   cosmetics
2812
2813   Revision 1.2  2001/09/13 15:20:17  swa
2814   merged standards into developer manual
2815
2816   Revision 1.1  2001/09/12 15:36:41  swa
2817   source files for junkbuster documentation
2818
2819   Revision 1.3  2001/09/10 17:43:59  swa
2820   first proposal of a structure.
2821
2822   Revision 1.2  2001/06/13 14:28:31  swa
2823   docs should have an author.
2824
2825   Revision 1.1  2001/06/13 14:20:37  swa
2826   first import of project's documentation for the webserver.
2827
2828   -->
2829
2830 </article>