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