Sync with other docs.
[privoxy.git] / doc / webserver / developer-manual / index.html
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Privoxy Developer Manual</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64
8 "><LINK
9 REL="NEXT"
10 TITLE="Introduction"
11 HREF="introduction.html"><LINK
12 REL="STYLESHEET"
13 TYPE="text/css"
14 HREF="../p_doc.css"></HEAD
15 ><BODY
16 CLASS="ARTICLE"
17 BGCOLOR="#EEEEEE"
18 TEXT="#000000"
19 LINK="#0000FF"
20 VLINK="#840084"
21 ALINK="#0000FF"
22 ><DIV
23 CLASS="ARTICLE"
24 ><DIV
25 CLASS="TITLEPAGE"
26 ><H1
27 CLASS="TITLE"
28 ><A
29 NAME="AEN2"
30 >Privoxy Developer Manual</A
31 ></H1
32 ><DIV
33 CLASS="AUTHORGROUP"
34 ><A
35 NAME="AEN5"
36 ></A
37 ><H3
38 CLASS="AUTHOR"
39 ><A
40 NAME="AEN6"
41 ></A
42 ></H3
43 ><DIV
44 CLASS="AFFILIATION"
45 ><SPAN
46 CLASS="ORGNAME"
47 >By: Privoxy Developers<BR></SPAN
48 ></DIV
49 ></DIV
50 ><P
51 CLASS="PUBDATE"
52 >$Id: developer-manual.sgml,v 1.28 2002/04/08 22:59:26 hal9 Exp $<BR></P
53 ><DIV
54 ><DIV
55 CLASS="ABSTRACT"
56 ><A
57 NAME="AEN9"
58 ></A
59 ><P
60 ></P
61 ><P
62
63  </P
64 ><P
65 > The developer manual gives the users information on how to help the developer
66  team. It provides guidance on coding, testing, documentation and other
67  issues. 
68  </P
69 ><P
70 > <SPAN
71 CLASS="APPLICATION"
72 >Privoxy</SPAN
73 > is a web proxy with advanced filtering
74  capabilities for protecting privacy, filtering web page content, managing
75  cookies, controlling access, and removing ads, banners, pop-ups and other
76  obnoxious Internet junk. <SPAN
77 CLASS="APPLICATION"
78 >Privoxy</SPAN
79 > has a very
80  flexible configuration and can be customized to suit individual needs and
81  tastes. <SPAN
82 CLASS="APPLICATION"
83 >Privoxy</SPAN
84 > has application for both
85  stand-alone systems and multi-user networks.</P
86 ><P
87 > <SPAN
88 CLASS="APPLICATION"
89 >Privoxy</SPAN
90 > is based on the code of the 
91  <SPAN
92 CLASS="APPLICATION"
93 >Internet Junkbuster</SPAN
94 > (tm).
95  <SPAN
96 CLASS="APPLICATION"
97 >Junkbuster</SPAN
98 > was originally written by Junkbusters
99  Corporation, and was released as free open-source software under the GNU GPL.
100  Stefan Waldherr made many improvements, and started the SourceForge project
101  to continue development.</P
102 ><P
103 > <SPAN
104 CLASS="APPLICATION"
105 >Privoxy</SPAN
106 > continues the
107  <SPAN
108 CLASS="APPLICATION"
109 >Junkbuster</SPAN
110 > tradition, but adds many 
111  refinements, enhancements and new features.</P
112 ><P
113 > You can find the latest version of the this manual at <A
114 HREF="http://www.privoxy.org/developer-manual/"
115 TARGET="_top"
116 >http://www.privoxy.org/developer-manual/</A
117 >.
118  Please see the Contact section on how to contact the developers.</P
119 ><P
120 ></P
121 ></DIV
122 ></DIV
123 ><HR></DIV
124 ><DIV
125 CLASS="TOC"
126 ><DL
127 ><DT
128 ><B
129 >Table of Contents</B
130 ></DT
131 ><DT
132 ><A
133 HREF="index.html#INTRO"
134 ></A
135 ></DT
136 ><DT
137 >1. <A
138 HREF="introduction.html"
139 >Introduction</A
140 ></DT
141 ><DT
142 >3. <A
143 HREF="quickstart.html"
144 >Quickstart to Privoxy Development</A
145 ></DT
146 ><DT
147 >4. <A
148 HREF="documentation.html"
149 >Documentation Guidelines</A
150 ></DT
151 ><DD
152 ><DL
153 ><DT
154 >4.1. <A
155 HREF="documentation.html#SGML"
156 >Quickstart to Docbook and SGML</A
157 ></DT
158 ><DT
159 >4.2. <A
160 HREF="documentation.html#DOCSTYLE"
161 ><SPAN
162 CLASS="APPLICATION"
163 >Privoxy</SPAN
164 > Documentation Style</A
165 ></DT
166 ><DT
167 >4.3. <A
168 HREF="documentation.html#AEN179"
169 >Privoxy Custom Entities</A
170 ></DT
171 ></DL
172 ></DD
173 ><DT
174 >5. <A
175 HREF="coding.html"
176 >Coding Guidelines</A
177 ></DT
178 ><DD
179 ><DL
180 ><DT
181 >5.1. <A
182 HREF="coding.html#S1"
183 >Introduction</A
184 ></DT
185 ><DT
186 >5.2. <A
187 HREF="coding.html#S2"
188 >Using Comments</A
189 ></DT
190 ><DD
191 ><DL
192 ><DT
193 >5.2.1. <A
194 HREF="coding.html#S3"
195 >Comment, Comment, Comment</A
196 ></DT
197 ><DT
198 >5.2.2. <A
199 HREF="coding.html#S4"
200 >Use blocks for comments</A
201 ></DT
202 ><DT
203 >5.2.3. <A
204 HREF="coding.html#S5"
205 >Keep Comments on their own line</A
206 ></DT
207 ><DT
208 >5.2.4. <A
209 HREF="coding.html#S6"
210 >Comment each logical step</A
211 ></DT
212 ><DT
213 >5.2.5. <A
214 HREF="coding.html#S7"
215 >Comment All Functions Thoroughly</A
216 ></DT
217 ><DT
218 >5.2.6. <A
219 HREF="coding.html#S8"
220 >Comment at the end of braces if the
221     content is more than one screen length</A
222 ></DT
223 ></DL
224 ></DD
225 ><DT
226 >5.3. <A
227 HREF="coding.html#S9"
228 >Naming Conventions</A
229 ></DT
230 ><DD
231 ><DL
232 ><DT
233 >5.3.1. <A
234 HREF="coding.html#S10"
235 >Variable Names</A
236 ></DT
237 ><DT
238 >5.3.2. <A
239 HREF="coding.html#S11"
240 >Function Names</A
241 ></DT
242 ><DT
243 >5.3.3. <A
244 HREF="coding.html#S12"
245 >Header file prototypes</A
246 ></DT
247 ><DT
248 >5.3.4. <A
249 HREF="coding.html#S13"
250 >Enumerations, and #defines</A
251 ></DT
252 ><DT
253 >5.3.5. <A
254 HREF="coding.html#S14"
255 >Constants</A
256 ></DT
257 ></DL
258 ></DD
259 ><DT
260 >5.4. <A
261 HREF="coding.html#S15"
262 >Using Space</A
263 ></DT
264 ><DD
265 ><DL
266 ><DT
267 >5.4.1. <A
268 HREF="coding.html#S16"
269 >Put braces on a line by themselves.</A
270 ></DT
271 ><DT
272 >5.4.2. <A
273 HREF="coding.html#S17"
274 >ALL control statements should have a
275     block</A
276 ></DT
277 ><DT
278 >5.4.3. <A
279 HREF="coding.html#S18"
280 >Do not belabor/blow-up boolean
281     expressions</A
282 ></DT
283 ><DT
284 >5.4.4. <A
285 HREF="coding.html#S19"
286 >Use white space freely because it is
287     free</A
288 ></DT
289 ><DT
290 >5.4.5. <A
291 HREF="coding.html#S20"
292 >Don't use white space around structure
293     operators</A
294 ></DT
295 ><DT
296 >5.4.6. <A
297 HREF="coding.html#S21"
298 >Make the last brace of a function stand
299     out</A
300 ></DT
301 ><DT
302 >5.4.7. <A
303 HREF="coding.html#S22"
304 >Use 3 character indentions</A
305 ></DT
306 ></DL
307 ></DD
308 ><DT
309 >5.5. <A
310 HREF="coding.html#S23"
311 >Initializing</A
312 ></DT
313 ><DD
314 ><DL
315 ><DT
316 >5.5.1. <A
317 HREF="coding.html#S24"
318 >Initialize all variables</A
319 ></DT
320 ></DL
321 ></DD
322 ><DT
323 >5.6. <A
324 HREF="coding.html#S25"
325 >Functions</A
326 ></DT
327 ><DD
328 ><DL
329 ><DT
330 >5.6.1. <A
331 HREF="coding.html#S26"
332 >Name functions that return a boolean as a
333     question.</A
334 ></DT
335 ><DT
336 >5.6.2. <A
337 HREF="coding.html#S27"
338 >Always specify a return type for a
339     function.</A
340 ></DT
341 ><DT
342 >5.6.3. <A
343 HREF="coding.html#S28"
344 >Minimize function calls when iterating by
345     using variables</A
346 ></DT
347 ><DT
348 >5.6.4. <A
349 HREF="coding.html#S29"
350 >Pass and Return by Const Reference</A
351 ></DT
352 ><DT
353 >5.6.5. <A
354 HREF="coding.html#S30"
355 >Pass and Return by Value</A
356 ></DT
357 ><DT
358 >5.6.6. <A
359 HREF="coding.html#S31"
360 >Names of include files</A
361 ></DT
362 ><DT
363 >5.6.7. <A
364 HREF="coding.html#S32"
365 >Provide multiple inclusion
366     protection</A
367 ></DT
368 ><DT
369 >5.6.8. <A
370 HREF="coding.html#S33"
371 >Use `extern "C"` when appropriate</A
372 ></DT
373 ><DT
374 >5.6.9. <A
375 HREF="coding.html#S34"
376 >Where Possible, Use Forward Struct
377     Declaration Instead of Includes</A
378 ></DT
379 ></DL
380 ></DD
381 ><DT
382 >5.7. <A
383 HREF="coding.html#S35"
384 >General Coding Practices</A
385 ></DT
386 ><DD
387 ><DL
388 ><DT
389 >5.7.1. <A
390 HREF="coding.html#S36"
391 >Turn on warnings</A
392 ></DT
393 ><DT
394 >5.7.2. <A
395 HREF="coding.html#S37"
396 >Provide a default case for all switch
397     statements</A
398 ></DT
399 ><DT
400 >5.7.3. <A
401 HREF="coding.html#S38"
402 >Try to avoid falling through cases in a
403     switch statement.</A
404 ></DT
405 ><DT
406 >5.7.4. <A
407 HREF="coding.html#S39"
408 >Use 'long' or 'short' Instead of
409     'int'</A
410 ></DT
411 ><DT
412 >5.7.5. <A
413 HREF="coding.html#S40"
414 >Don't mix size_t and other types</A
415 ></DT
416 ><DT
417 >5.7.6. <A
418 HREF="coding.html#S41"
419 >Declare each variable and struct on its
420     own line.</A
421 ></DT
422 ><DT
423 >5.7.7. <A
424 HREF="coding.html#S42"
425 >Use malloc/zalloc sparingly</A
426 ></DT
427 ><DT
428 >5.7.8. <A
429 HREF="coding.html#S43"
430 >The Programmer Who Uses 'malloc' is
431     Responsible for Ensuring 'free'</A
432 ></DT
433 ><DT
434 >5.7.9. <A
435 HREF="coding.html#S44"
436 >Add loaders to the `file_list' structure
437     and in order</A
438 ></DT
439 ><DT
440 >5.7.10. <A
441 HREF="coding.html#S45"
442 >"Uncertain" new code and/or changes to
443     exitinst code, use FIXME</A
444 ></DT
445 ></DL
446 ></DD
447 ><DT
448 >5.8. <A
449 HREF="coding.html#S46"
450 >Addendum: Template for files and function
451     comment blocks:</A
452 ></DT
453 ></DL
454 ></DD
455 ><DT
456 >6. <A
457 HREF="cvs.html"
458 >Version Control Guidelines</A
459 ></DT
460 ><DT
461 >7. <A
462 HREF="testing.html"
463 >Testing Guidelines</A
464 ></DT
465 ><DD
466 ><DL
467 ><DT
468 >7.1. <A
469 HREF="testing.html#TESTING-PLAN"
470 >Testplan for releases</A
471 ></DT
472 ><DT
473 >7.2. <A
474 HREF="testing.html#TESTING-REPORT"
475 >Test reports</A
476 ></DT
477 ></DL
478 ></DD
479 ><DT
480 >8. <A
481 HREF="newrelease.html"
482 >Releasing a new version</A
483 ></DT
484 ><DD
485 ><DL
486 ><DT
487 >8.1. <A
488 HREF="newrelease.html#BEFORERELEASE"
489 >Before the Release</A
490 ></DT
491 ><DT
492 >8.2. <A
493 HREF="newrelease.html#NEWRELEASE-WEB"
494 >Update the webserver</A
495 ></DT
496 ><DT
497 >8.3. <A
498 HREF="newrelease.html#NEWRELEASE-RPM"
499 >SuSE or Red Hat</A
500 ></DT
501 ><DT
502 >8.4. <A
503 HREF="newrelease.html#NEWRELEASE-OS2"
504 >OS/2</A
505 ></DT
506 ><DT
507 >8.5. <A
508 HREF="newrelease.html#NEWRELEASE-SOLARIS"
509 >Solaris</A
510 ></DT
511 ><DT
512 >8.6. <A
513 HREF="newrelease.html#NEWRELEASE-WINDOWS"
514 >Windows</A
515 ></DT
516 ><DT
517 >8.7. <A
518 HREF="newrelease.html#NEWRELEASE-DEBIAN"
519 >Debian</A
520 ></DT
521 ><DT
522 >8.8. <A
523 HREF="newrelease.html#NEWRELEASE-MACOSX"
524 >Mac OSX</A
525 ></DT
526 ><DT
527 >8.9. <A
528 HREF="newrelease.html#NEWRELEASE-FREEBSD"
529 >FreeBSD</A
530 ></DT
531 ><DT
532 >8.10. <A
533 HREF="newrelease.html#NEWRELEASE-TARBALL"
534 >Tarball</A
535 ></DT
536 ><DT
537 >8.11. <A
538 HREF="newrelease.html#NEWRELEASE-HPUX"
539 >HP-UX 11</A
540 ></DT
541 ><DT
542 >8.12. <A
543 HREF="newrelease.html#NEWRELEASE-AMIGA"
544 >Amiga OS</A
545 ></DT
546 ><DT
547 >8.13. <A
548 HREF="newrelease.html#NEWRELEASE-AIX"
549 >AIX</A
550 ></DT
551 ></DL
552 ></DD
553 ><DT
554 >9. <A
555 HREF="contact.html"
556 >Contacting the developers, Bug Reporting and Feature Requests</A
557 ></DT
558 ><DT
559 >10. <A
560 HREF="copyright.html"
561 >Copyright and History</A
562 ></DT
563 ><DD
564 ><DL
565 ><DT
566 >10.1. <A
567 HREF="copyright.html#AEN940"
568 >Copyright</A
569 ></DT
570 ><DT
571 >10.2. <A
572 HREF="copyright.html#AEN947"
573 >History</A
574 ></DT
575 ></DL
576 ></DD
577 ><DT
578 >11. <A
579 HREF="seealso.html"
580 >See also</A
581 ></DT
582 ></DL
583 ></DIV
584 ><DIV
585 CLASS="SECT1"
586 ><H1
587 CLASS="SECT1"
588 ><A
589 NAME="INTRO"
590 ></A
591 ></H1
592 ><P
593 > </P
594 ></DIV
595 ></DIV
596 ><DIV
597 CLASS="NAVFOOTER"
598 ><HR
599 ALIGN="LEFT"
600 WIDTH="100%"><TABLE
601 WIDTH="100%"
602 BORDER="0"
603 CELLPADDING="0"
604 CELLSPACING="0"
605 ><TR
606 ><TD
607 WIDTH="33%"
608 ALIGN="left"
609 VALIGN="top"
610 >&nbsp;</TD
611 ><TD
612 WIDTH="34%"
613 ALIGN="center"
614 VALIGN="top"
615 >&nbsp;</TD
616 ><TD
617 WIDTH="33%"
618 ALIGN="right"
619 VALIGN="top"
620 ><A
621 HREF="introduction.html"
622 >Next</A
623 ></TD
624 ></TR
625 ><TR
626 ><TD
627 WIDTH="33%"
628 ALIGN="left"
629 VALIGN="top"
630 >&nbsp;</TD
631 ><TD
632 WIDTH="34%"
633 ALIGN="center"
634 VALIGN="top"
635 >&nbsp;</TD
636 ><TD
637 WIDTH="33%"
638 ALIGN="right"
639 VALIGN="top"
640 >Introduction</TD
641 ></TR
642 ></TABLE
643 ></DIV
644 ></BODY
645 ></HTML
646 >