1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
5 >Privoxy Developer Manual</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
11 HREF="introduction.html"><LINK
14 HREF="../p_doc.css"><META
15 HTTP-EQUIV="Content-Type"
17 charset=ISO-8859-1"></HEAD
33 >Privoxy Developer Manual</A
41 HREF="https://www.privoxy.org/user-manual/copyright.html"
47 HREF="https://www.privoxy.org/"
49 >Privoxy Developers</A
63 > The developer manual provides guidance on coding, testing, packaging, documentation
64 and other issues of importance to those involved with
68 > development. It is mandatory (and helpful!) reading
69 for anyone who wants to join the team. Note that it's currently out of date
70 and may not be entirely correct. As always, patches are welcome.</P
72 > Please note that this document is constantly evolving. This copy represents
73 the state at the release of version 3.0.27.
74 You can find the latest version of the this manual at <A
75 HREF="https://www.privoxy.org/developer-manual/"
77 >https://www.privoxy.org/developer-manual/</A
79 Please have a look at the
81 HREF="https://www.privoxy.org/user-manual/contact.html"
83 >contact section in the user manual</A
85 if you are interested in contacting the developers.</P
100 HREF="introduction.html"
107 HREF="introduction.html#QUICKSTART"
108 >Quickstart to Privoxy Development</A
115 >The Git Repository</A
121 HREF="git.html#GITACCESS"
126 HREF="git.html#GITBRANCHES"
131 HREF="git.html#GITCOMMIT"
132 >Git Commit Guidelines</A
138 HREF="documentation.html"
139 >Documentation Guidelines</A
145 HREF="documentation.html#SGML"
146 >Quickstart to Docbook and SGML</A
150 HREF="documentation.html#DOCSTYLE"
154 > Documentation Style</A
158 HREF="documentation.html#AEN203"
159 >Privoxy Custom Entities</A
166 >Coding Guidelines</A
172 HREF="coding.html#S1"
177 HREF="coding.html#S2"
184 HREF="coding.html#S3"
185 >Comment, Comment, Comment</A
189 HREF="coding.html#S4"
190 >Use blocks for comments</A
194 HREF="coding.html#S5"
195 >Keep Comments on their own line</A
199 HREF="coding.html#S6"
200 >Comment each logical step</A
204 HREF="coding.html#S7"
205 >Comment All Functions Thoroughly</A
209 HREF="coding.html#S8"
210 >Comment at the end of braces if the
211 content is more than one screen length</A
217 HREF="coding.html#S9"
218 >Naming Conventions</A
224 HREF="coding.html#S10"
229 HREF="coding.html#S11"
234 HREF="coding.html#S12"
235 >Header file prototypes</A
239 HREF="coding.html#S13"
240 >Enumerations, and #defines</A
244 HREF="coding.html#S14"
251 HREF="coding.html#S15"
258 HREF="coding.html#S16"
259 >Put braces on a line by themselves.</A
263 HREF="coding.html#S17"
264 >ALL control statements should have a
269 HREF="coding.html#S18"
270 >Do not belabor/blow-up boolean
275 HREF="coding.html#S19"
276 >Use white space freely because it is
281 HREF="coding.html#S20"
282 >Don't use white space around structure
287 HREF="coding.html#S21"
288 >Make the last brace of a function stand
293 HREF="coding.html#S22"
294 >Use 3 character indentions</A
300 HREF="coding.html#S23"
307 HREF="coding.html#S24"
308 >Initialize all variables</A
314 HREF="coding.html#S25"
321 HREF="coding.html#S26"
322 >Name functions that return a boolean as a
327 HREF="coding.html#S27"
328 >Always specify a return type for a
333 HREF="coding.html#S28"
334 >Minimize function calls when iterating by
339 HREF="coding.html#S29"
340 >Pass and Return by Const Reference</A
344 HREF="coding.html#S30"
345 >Pass and Return by Value</A
349 HREF="coding.html#S31"
350 >Names of include files</A
354 HREF="coding.html#S32"
355 >Provide multiple inclusion
360 HREF="coding.html#S33"
361 >Use `extern "C"` when appropriate</A
365 HREF="coding.html#S34"
366 >Where Possible, Use Forward Struct
367 Declaration Instead of Includes</A
373 HREF="coding.html#S35"
374 >General Coding Practices</A
380 HREF="coding.html#S36"
385 HREF="coding.html#S37"
386 >Provide a default case for all switch
391 HREF="coding.html#S38"
392 >Try to avoid falling through cases in a
397 HREF="coding.html#S40"
398 >Don't mix size_t and other types</A
402 HREF="coding.html#S41"
403 >Declare each variable and struct on its
408 HREF="coding.html#S42"
409 >Use malloc/zalloc sparingly</A
413 HREF="coding.html#S43"
414 >The Programmer Who Uses 'malloc' is
415 Responsible for Ensuring 'free'</A
419 HREF="coding.html#S44"
420 >Add loaders to the `file_list' structure
425 HREF="coding.html#S45"
426 >"Uncertain" new code and/or changes to
427 existing code, use XXX</A
433 HREF="coding.html#S46"
434 >Addendum: Template for files and function
442 >Testing Guidelines</A
448 HREF="testing.html#TESTING-PLAN"
449 >Testplan for releases</A
453 HREF="testing.html#FUZZING"
460 HREF="newrelease.html"
461 >Releasing a New Version</A
467 HREF="newrelease.html#VERSIONNUMBERS"
472 HREF="newrelease.html#BEFORERELEASE"
473 >Before the Release: Freeze</A
477 HREF="newrelease.html#THERELEASE"
478 >Building and Releasing the Packages</A
484 HREF="newrelease.html#PACK-GUIDELINES"
485 >Note on Privoxy Packaging</A
489 HREF="newrelease.html#NEWRELEASE-TARBALL"
494 HREF="newrelease.html#NEWRELEASE-RPM"
495 >SuSE, Conectiva or Red Hat RPM</A
499 HREF="newrelease.html#NEWRELEASE-OS2"
504 HREF="newrelease.html#NEWRELEASE-SOLARIS"
509 HREF="newrelease.html#NEWRELEASE-WINDOWS"
514 HREF="newrelease.html#NEWRELEASE-DEBIAN"
519 HREF="newrelease.html#NEWRELEASE-MACOSX"
524 HREF="newrelease.html#NEWRELEASE-FREEBSD"
531 HREF="newrelease.html#RELEASING"
532 >Uploading and Releasing Your Package</A
536 HREF="newrelease.html#AFTERRELEASE"
537 >After the Release</A
543 HREF="webserver-update.html"
544 >Update the Webserver</A
554 SUMMARY="Footer navigation table"
575 HREF="introduction.html"