generated
[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.33 2002/04/12 03:49:53 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 <A
119 HREF="contact.html"
120 TARGET="_top"
121 >the Contact section</A
122
123  on how to contact the developers.</P
124 ><P
125 ></P
126 ></DIV
127 ></DIV
128 ><HR></DIV
129 ><DIV
130 CLASS="TOC"
131 ><DL
132 ><DT
133 ><B
134 >Table of Contents</B
135 ></DT
136 ><DT
137 ><A
138 HREF="index.html#INTRO"
139 ></A
140 ></DT
141 ><DT
142 >1. <A
143 HREF="introduction.html"
144 >Introduction</A
145 ></DT
146 ><DT
147 >3. <A
148 HREF="quickstart.html"
149 >Quickstart to Privoxy Development</A
150 ></DT
151 ><DT
152 >4. <A
153 HREF="documentation.html"
154 >Documentation Guidelines</A
155 ></DT
156 ><DD
157 ><DL
158 ><DT
159 >4.1. <A
160 HREF="documentation.html#SGML"
161 >Quickstart to Docbook and SGML</A
162 ></DT
163 ><DT
164 >4.2. <A
165 HREF="documentation.html#DOCSTYLE"
166 ><SPAN
167 CLASS="APPLICATION"
168 >Privoxy</SPAN
169 > Documentation Style</A
170 ></DT
171 ><DT
172 >4.3. <A
173 HREF="documentation.html#AEN186"
174 >Privoxy Custom Entities</A
175 ></DT
176 ></DL
177 ></DD
178 ><DT
179 >5. <A
180 HREF="coding.html"
181 >Coding Guidelines</A
182 ></DT
183 ><DD
184 ><DL
185 ><DT
186 >5.1. <A
187 HREF="coding.html#S1"
188 >Introduction</A
189 ></DT
190 ><DT
191 >5.2. <A
192 HREF="coding.html#S2"
193 >Using Comments</A
194 ></DT
195 ><DD
196 ><DL
197 ><DT
198 >5.2.1. <A
199 HREF="coding.html#S3"
200 >Comment, Comment, Comment</A
201 ></DT
202 ><DT
203 >5.2.2. <A
204 HREF="coding.html#S4"
205 >Use blocks for comments</A
206 ></DT
207 ><DT
208 >5.2.3. <A
209 HREF="coding.html#S5"
210 >Keep Comments on their own line</A
211 ></DT
212 ><DT
213 >5.2.4. <A
214 HREF="coding.html#S6"
215 >Comment each logical step</A
216 ></DT
217 ><DT
218 >5.2.5. <A
219 HREF="coding.html#S7"
220 >Comment All Functions Thoroughly</A
221 ></DT
222 ><DT
223 >5.2.6. <A
224 HREF="coding.html#S8"
225 >Comment at the end of braces if the
226     content is more than one screen length</A
227 ></DT
228 ></DL
229 ></DD
230 ><DT
231 >5.3. <A
232 HREF="coding.html#S9"
233 >Naming Conventions</A
234 ></DT
235 ><DD
236 ><DL
237 ><DT
238 >5.3.1. <A
239 HREF="coding.html#S10"
240 >Variable Names</A
241 ></DT
242 ><DT
243 >5.3.2. <A
244 HREF="coding.html#S11"
245 >Function Names</A
246 ></DT
247 ><DT
248 >5.3.3. <A
249 HREF="coding.html#S12"
250 >Header file prototypes</A
251 ></DT
252 ><DT
253 >5.3.4. <A
254 HREF="coding.html#S13"
255 >Enumerations, and #defines</A
256 ></DT
257 ><DT
258 >5.3.5. <A
259 HREF="coding.html#S14"
260 >Constants</A
261 ></DT
262 ></DL
263 ></DD
264 ><DT
265 >5.4. <A
266 HREF="coding.html#S15"
267 >Using Space</A
268 ></DT
269 ><DD
270 ><DL
271 ><DT
272 >5.4.1. <A
273 HREF="coding.html#S16"
274 >Put braces on a line by themselves.</A
275 ></DT
276 ><DT
277 >5.4.2. <A
278 HREF="coding.html#S17"
279 >ALL control statements should have a
280     block</A
281 ></DT
282 ><DT
283 >5.4.3. <A
284 HREF="coding.html#S18"
285 >Do not belabor/blow-up boolean
286     expressions</A
287 ></DT
288 ><DT
289 >5.4.4. <A
290 HREF="coding.html#S19"
291 >Use white space freely because it is
292     free</A
293 ></DT
294 ><DT
295 >5.4.5. <A
296 HREF="coding.html#S20"
297 >Don't use white space around structure
298     operators</A
299 ></DT
300 ><DT
301 >5.4.6. <A
302 HREF="coding.html#S21"
303 >Make the last brace of a function stand
304     out</A
305 ></DT
306 ><DT
307 >5.4.7. <A
308 HREF="coding.html#S22"
309 >Use 3 character indentions</A
310 ></DT
311 ></DL
312 ></DD
313 ><DT
314 >5.5. <A
315 HREF="coding.html#S23"
316 >Initializing</A
317 ></DT
318 ><DD
319 ><DL
320 ><DT
321 >5.5.1. <A
322 HREF="coding.html#S24"
323 >Initialize all variables</A
324 ></DT
325 ></DL
326 ></DD
327 ><DT
328 >5.6. <A
329 HREF="coding.html#S25"
330 >Functions</A
331 ></DT
332 ><DD
333 ><DL
334 ><DT
335 >5.6.1. <A
336 HREF="coding.html#S26"
337 >Name functions that return a boolean as a
338     question.</A
339 ></DT
340 ><DT
341 >5.6.2. <A
342 HREF="coding.html#S27"
343 >Always specify a return type for a
344     function.</A
345 ></DT
346 ><DT
347 >5.6.3. <A
348 HREF="coding.html#S28"
349 >Minimize function calls when iterating by
350     using variables</A
351 ></DT
352 ><DT
353 >5.6.4. <A
354 HREF="coding.html#S29"
355 >Pass and Return by Const Reference</A
356 ></DT
357 ><DT
358 >5.6.5. <A
359 HREF="coding.html#S30"
360 >Pass and Return by Value</A
361 ></DT
362 ><DT
363 >5.6.6. <A
364 HREF="coding.html#S31"
365 >Names of include files</A
366 ></DT
367 ><DT
368 >5.6.7. <A
369 HREF="coding.html#S32"
370 >Provide multiple inclusion
371     protection</A
372 ></DT
373 ><DT
374 >5.6.8. <A
375 HREF="coding.html#S33"
376 >Use `extern "C"` when appropriate</A
377 ></DT
378 ><DT
379 >5.6.9. <A
380 HREF="coding.html#S34"
381 >Where Possible, Use Forward Struct
382     Declaration Instead of Includes</A
383 ></DT
384 ></DL
385 ></DD
386 ><DT
387 >5.7. <A
388 HREF="coding.html#S35"
389 >General Coding Practices</A
390 ></DT
391 ><DD
392 ><DL
393 ><DT
394 >5.7.1. <A
395 HREF="coding.html#S36"
396 >Turn on warnings</A
397 ></DT
398 ><DT
399 >5.7.2. <A
400 HREF="coding.html#S37"
401 >Provide a default case for all switch
402     statements</A
403 ></DT
404 ><DT
405 >5.7.3. <A
406 HREF="coding.html#S38"
407 >Try to avoid falling through cases in a
408     switch statement.</A
409 ></DT
410 ><DT
411 >5.7.4. <A
412 HREF="coding.html#S39"
413 >Use 'long' or 'short' Instead of
414     'int'</A
415 ></DT
416 ><DT
417 >5.7.5. <A
418 HREF="coding.html#S40"
419 >Don't mix size_t and other types</A
420 ></DT
421 ><DT
422 >5.7.6. <A
423 HREF="coding.html#S41"
424 >Declare each variable and struct on its
425     own line.</A
426 ></DT
427 ><DT
428 >5.7.7. <A
429 HREF="coding.html#S42"
430 >Use malloc/zalloc sparingly</A
431 ></DT
432 ><DT
433 >5.7.8. <A
434 HREF="coding.html#S43"
435 >The Programmer Who Uses 'malloc' is
436     Responsible for Ensuring 'free'</A
437 ></DT
438 ><DT
439 >5.7.9. <A
440 HREF="coding.html#S44"
441 >Add loaders to the `file_list' structure
442     and in order</A
443 ></DT
444 ><DT
445 >5.7.10. <A
446 HREF="coding.html#S45"
447 >"Uncertain" new code and/or changes to
448     existing code, use FIXME</A
449 ></DT
450 ></DL
451 ></DD
452 ><DT
453 >5.8. <A
454 HREF="coding.html#S46"
455 >Addendum: Template for files and function
456     comment blocks:</A
457 ></DT
458 ></DL
459 ></DD
460 ><DT
461 >6. <A
462 HREF="cvs.html"
463 >Version Control Guidelines</A
464 ></DT
465 ><DT
466 >7. <A
467 HREF="testing.html"
468 >Testing Guidelines</A
469 ></DT
470 ><DD
471 ><DL
472 ><DT
473 >7.1. <A
474 HREF="testing.html#TESTING-PLAN"
475 >Testplan for releases</A
476 ></DT
477 ><DT
478 >7.2. <A
479 HREF="testing.html#TESTING-REPORT"
480 >Test reports</A
481 ></DT
482 ></DL
483 ></DD
484 ><DT
485 >8. <A
486 HREF="newrelease.html"
487 >Releasing a new version</A
488 ></DT
489 ><DD
490 ><DL
491 ><DT
492 >8.1. <A
493 HREF="newrelease.html#BEFORERELEASE"
494 >Before the Release</A
495 ></DT
496 ><DT
497 >8.2. <A
498 HREF="newrelease.html#NEWRELEASE-WEB"
499 >Update the webserver</A
500 ></DT
501 ><DT
502 >8.3. <A
503 HREF="newrelease.html#NEWRELEASE-RPM"
504 >SuSE or Red Hat</A
505 ></DT
506 ><DT
507 >8.4. <A
508 HREF="newrelease.html#NEWRELEASE-OS2"
509 >OS/2</A
510 ></DT
511 ><DT
512 >8.5. <A
513 HREF="newrelease.html#NEWRELEASE-SOLARIS"
514 >Solaris</A
515 ></DT
516 ><DT
517 >8.6. <A
518 HREF="newrelease.html#NEWRELEASE-WINDOWS"
519 >Windows</A
520 ></DT
521 ><DT
522 >8.7. <A
523 HREF="newrelease.html#NEWRELEASE-DEBIAN"
524 >Debian</A
525 ></DT
526 ><DT
527 >8.8. <A
528 HREF="newrelease.html#NEWRELEASE-MACOSX"
529 >Mac OSX</A
530 ></DT
531 ><DT
532 >8.9. <A
533 HREF="newrelease.html#NEWRELEASE-FREEBSD"
534 >FreeBSD</A
535 ></DT
536 ><DT
537 >8.10. <A
538 HREF="newrelease.html#NEWRELEASE-TARBALL"
539 >Tarball</A
540 ></DT
541 ><DT
542 >8.11. <A
543 HREF="newrelease.html#NEWRELEASE-HPUX"
544 >HP-UX 11</A
545 ></DT
546 ><DT
547 >8.12. <A
548 HREF="newrelease.html#NEWRELEASE-AMIGA"
549 >Amiga OS</A
550 ></DT
551 ><DT
552 >8.13. <A
553 HREF="newrelease.html#NEWRELEASE-AIX"
554 >AIX</A
555 ></DT
556 ></DL
557 ></DD
558 ><DT
559 >9. <A
560 HREF="contact.html"
561 >Contacting the developers, Bug Reporting and Feature Requests</A
562 ></DT
563 ><DT
564 >10. <A
565 HREF="copyright.html"
566 >Copyright and History</A
567 ></DT
568 ><DD
569 ><DL
570 ><DT
571 >10.1. <A
572 HREF="copyright.html#AEN962"
573 >Copyright</A
574 ></DT
575 ><DT
576 >10.2. <A
577 HREF="copyright.html#AEN969"
578 >History</A
579 ></DT
580 ></DL
581 ></DD
582 ><DT
583 >11. <A
584 HREF="seealso.html"
585 >See also</A
586 ></DT
587 ></DL
588 ></DIV
589 ><DIV
590 CLASS="SECT1"
591 ><H1
592 CLASS="SECT1"
593 ><A
594 NAME="INTRO"
595 ></A
596 ></H1
597 ><P
598 > </P
599 ></DIV
600 ></DIV
601 ><DIV
602 CLASS="NAVFOOTER"
603 ><HR
604 ALIGN="LEFT"
605 WIDTH="100%"><TABLE
606 WIDTH="100%"
607 BORDER="0"
608 CELLPADDING="0"
609 CELLSPACING="0"
610 ><TR
611 ><TD
612 WIDTH="33%"
613 ALIGN="left"
614 VALIGN="top"
615 >&nbsp;</TD
616 ><TD
617 WIDTH="34%"
618 ALIGN="center"
619 VALIGN="top"
620 >&nbsp;</TD
621 ><TD
622 WIDTH="33%"
623 ALIGN="right"
624 VALIGN="top"
625 ><A
626 HREF="introduction.html"
627 >Next</A
628 ></TD
629 ></TR
630 ><TR
631 ><TD
632 WIDTH="33%"
633 ALIGN="left"
634 VALIGN="top"
635 >&nbsp;</TD
636 ><TD
637 WIDTH="34%"
638 ALIGN="center"
639 VALIGN="top"
640 >&nbsp;</TD
641 ><TD
642 WIDTH="33%"
643 ALIGN="right"
644 VALIGN="top"
645 >Introduction</TD
646 ></TR
647 ></TABLE
648 ></DIV
649 ></BODY
650 ></HTML
651 >