1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
2 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
5 <meta name="generator" content="HTML Tidy, see www.w3.org">
7 Privoxy Developer Manual
9 <meta name="GENERATOR" content=
10 "Modular DocBook HTML Stylesheet Version 1.79">
11 <link rel="NEXT" title="Introduction" href="introduction.html">
12 <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
13 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
14 <style type="text/css">
16 background-color: #EEEEEE;
19 :link { color: #0000FF }
20 :visited { color: #840084 }
21 :active { color: #0000FF }
22 hr.c2 {text-align: left}
23 dt.c1 {font-weight: bold}
26 <body class="ARTICLE">
28 <div class="TITLEPAGE">
30 <a name="AEN2">Privoxy Developer Manual</a>
33 <sub><a href="copyright.html">Copyright</a> © 2001-2009 by <a
34 href="http://www.privoxy.org/" target="_top">Privoxy
35 Developers</a></sub><br>
38 $Id: index.html,v 1.55 2011/08/17 10:37:48 fabiankeil Exp $<br>
43 The developer manual provides guidance on coding, testing,
44 packaging, documentation and other issues of importance to those
45 involved with <span class="APPLICATION">Privoxy</span>
46 development. It is mandatory (and helpful!) reading for anyone
47 who wants to join the team. Note that it's currently out of date
48 and may not be entirely correct. As always, patches are welcome.
51 Please note that this document is constantly evolving. This copy
52 represents the state at the release of version 3.0.18. You can
53 find the latest version of the this manual at <a href=
54 "http://www.privoxy.org/developer-manual/" target=
55 "_top">http://www.privoxy.org/developer-manual/</a>. Please see
56 <a href="contact.html">the Contact section</a> on how to contact
68 1. <a href="introduction.html">Introduction</a>
73 1.1. <a href="introduction.html#QUICKSTART">Quickstart to
74 Privoxy Development</a>
79 2. <a href="cvs.html">The CVS Repository</a>
84 2.1. <a href="cvs.html#CVSACCESS">Access to CVS</a>
87 2.2. <a href="cvs.html#CVSBRANCHES">Branches</a>
90 2.3. <a href="cvs.html#CVSCOMMIT">CVS Commit Guidelines</a>
95 3. <a href="documentation.html">Documentation Guidelines</a>
100 3.1. <a href="documentation.html#SGML">Quickstart to Docbook
104 3.2. <a href="documentation.html#DOCSTYLE"><span class=
105 "APPLICATION">Privoxy</span> Documentation Style</a>
108 3.3. <a href="documentation.html#AEN217">Privoxy Custom
114 4. <a href="coding.html">Coding Guidelines</a>
119 4.1. <a href="coding.html#S1">Introduction</a>
122 4.2. <a href="coding.html#S2">Using Comments</a>
127 4.2.1. <a href="coding.html#S3">Comment, Comment,
131 4.2.2. <a href="coding.html#S4">Use blocks for
135 4.2.3. <a href="coding.html#S5">Keep Comments on their
139 4.2.4. <a href="coding.html#S6">Comment each logical
143 4.2.5. <a href="coding.html#S7">Comment All Functions
147 4.2.6. <a href="coding.html#S8">Comment at the end of
148 braces if the content is more than one screen length</a>
153 4.3. <a href="coding.html#S9">Naming Conventions</a>
158 4.3.1. <a href="coding.html#S10">Variable Names</a>
161 4.3.2. <a href="coding.html#S11">Function Names</a>
164 4.3.3. <a href="coding.html#S12">Header file
168 4.3.4. <a href="coding.html#S13">Enumerations, and
172 4.3.5. <a href="coding.html#S14">Constants</a>
177 4.4. <a href="coding.html#S15">Using Space</a>
182 4.4.1. <a href="coding.html#S16">Put braces on a line by
186 4.4.2. <a href="coding.html#S17">ALL control statements
187 should have a block</a>
190 4.4.3. <a href="coding.html#S18">Do not belabor/blow-up
191 boolean expressions</a>
194 4.4.4. <a href="coding.html#S19">Use white space freely
195 because it is free</a>
198 4.4.5. <a href="coding.html#S20">Don't use white space
199 around structure operators</a>
202 4.4.6. <a href="coding.html#S21">Make the last brace of a
203 function stand out</a>
206 4.4.7. <a href="coding.html#S22">Use 3 character
212 4.5. <a href="coding.html#S23">Initializing</a>
217 4.5.1. <a href="coding.html#S24">Initialize all
223 4.6. <a href="coding.html#S25">Functions</a>
228 4.6.1. <a href="coding.html#S26">Name functions that
229 return a boolean as a question.</a>
232 4.6.2. <a href="coding.html#S27">Always specify a return
233 type for a function.</a>
236 4.6.3. <a href="coding.html#S28">Minimize function calls
237 when iterating by using variables</a>
240 4.6.4. <a href="coding.html#S29">Pass and Return by Const
244 4.6.5. <a href="coding.html#S30">Pass and Return by
248 4.6.6. <a href="coding.html#S31">Names of include
252 4.6.7. <a href="coding.html#S32">Provide multiple
253 inclusion protection</a>
256 4.6.8. <a href="coding.html#S33">Use `extern "C"` when
260 4.6.9. <a href="coding.html#S34">Where Possible, Use
261 Forward Struct Declaration Instead of Includes</a>
266 4.7. <a href="coding.html#S35">General Coding Practices</a>
271 4.7.1. <a href="coding.html#S36">Turn on warnings</a>
274 4.7.2. <a href="coding.html#S37">Provide a default case
275 for all switch statements</a>
278 4.7.3. <a href="coding.html#S38">Try to avoid falling
279 through cases in a switch statement.</a>
282 4.7.4. <a href="coding.html#S39">Use 'long' or 'short'
286 4.7.5. <a href="coding.html#S40">Don't mix size_t and
290 4.7.6. <a href="coding.html#S41">Declare each variable
291 and struct on its own line.</a>
294 4.7.7. <a href="coding.html#S42">Use malloc/zalloc
298 4.7.8. <a href="coding.html#S43">The Programmer Who Uses
299 'malloc' is Responsible for Ensuring 'free'</a>
302 4.7.9. <a href="coding.html#S44">Add loaders to the
303 `file_list' structure and in order</a>
306 4.7.10. <a href="coding.html#S45">"Uncertain" new code
307 and/or changes to existing code, use FIXME or XXX</a>
312 4.8. <a href="coding.html#S46">Addendum: Template for files
313 and function comment blocks:</a>
318 5. <a href="testing.html">Testing Guidelines</a>
323 5.1. <a href="testing.html#TESTING-PLAN">Testplan for
327 5.2. <a href="testing.html#TESTING-REPORT">Test reports</a>
332 6. <a href="newrelease.html">Releasing a New Version</a>
337 6.1. <a href="newrelease.html#VERSIONNUMBERS">Version
341 6.2. <a href="newrelease.html#BEFORERELEASE">Before the
345 6.3. <a href="newrelease.html#THERELEASE">Building and
346 Releasing the Packages</a>
351 6.3.1. <a href="newrelease.html#PACK-GUIDELINES">Note on
352 Privoxy Packaging</a>
356 "newrelease.html#NEWRELEASE-TARBALL">Source Tarball</a>
359 6.3.3. <a href="newrelease.html#NEWRELEASE-RPM">SuSE,
360 Conectiva or Red Hat RPM</a>
363 6.3.4. <a href="newrelease.html#NEWRELEASE-OS2">OS/2</a>
367 "newrelease.html#NEWRELEASE-SOLARIS">Solaris</a>
371 "newrelease.html#NEWRELEASE-WINDOWS">Windows</a>
375 "newrelease.html#NEWRELEASE-DEBIAN">Debian</a>
378 6.3.8. <a href="newrelease.html#NEWRELEASE-MACOSX">Mac OS
383 "newrelease.html#NEWRELEASE-FREEBSD">FreeBSD</a>
386 6.3.10. <a href="newrelease.html#NEWRELEASE-HPUX">HP-UX
390 6.3.11. <a href="newrelease.html#NEWRELEASE-AMIGA">Amiga
394 6.3.12. <a href="newrelease.html#NEWRELEASE-AIX">AIX</a>
399 6.4. <a href="newrelease.html#RELEASING">Uploading and
400 Releasing Your Package</a>
403 6.5. <a href="newrelease.html#AFTERRELEASE">After the
409 7. <a href="webserver-update.html">Update the Webserver</a>
412 8. <a href="contact.html">Contacting the developers, Bug
413 Reporting and Feature Requests</a>
418 8.1. <a href="contact.html#CONTACT-SUPPORT">Get Support</a>
421 8.2. <a href="contact.html#REPORTING">Reporting Problems</a>
426 8.2.1. <a href="contact.html#CONTACT-ADS">Reporting Ads
427 or Other Configuration Problems</a>
430 8.2.2. <a href="contact.html#CONTACT-BUGS">Reporting
436 8.3. <a href="contact.html#CONTACT-FEATURE">Request New
440 8.4. <a href="contact.html#MAILING-LISTS">Mailing Lists</a>
445 9. <a href="copyright.html">Privoxy Copyright, License and
451 9.1. <a href="copyright.html#AEN1229">License</a>
454 9.2. <a href="copyright.html#AEN1245">History</a>
459 10. <a href="seealso.html">See also</a>
464 <div class="NAVFOOTER">
465 <hr width="100%" class="c2">
466 <table summary="Footer navigation table" width="100%" border="0"
467 cellpadding="0" cellspacing="0">
469 <td width="33%" align="left" valign="top">
472 <td width="34%" align="center" valign="top">
475 <td width="33%" align="right" valign="top">
476 <a href="introduction.html" accesskey="N">Next</a>
480 <td width="33%" align="left" valign="top">
483 <td width="34%" align="center" valign="top">
486 <td width="33%" align="right" valign="top">