This is mostly proposed copyright/licensing additions and changes. 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 ><P
33 CLASS="PUBDATE"
34 >     <SUB
35 >    
36     
37       <A
38 HREF="copyright.html"
39 >Copyright</A
40 > © 2001, 2002 by 
41       <A
42 HREF="http://www.privoxy.org"
43 TARGET="_top"
44 >Privoxy Developers</A
45 >
46      </SUB
47 >
48     <BR></P
49 ><P
50 CLASS="PUBDATE"
51 >$Id: developer-manual.sgml,v 1.42 2002/05/05 20:26:02 hal9 Exp $<BR></P
52 ><DIV
53 ><DIV
54 CLASS="ABSTRACT"
55 ><A
56 NAME="AEN9"
57 ></A
58 ><P
59 ></P
60 ><P
61 > The developer manual gives the users information on how to help the developer
62  team. It provides guidance on coding, testing, documentation and other
63  issues. 
64  </P
65 ><P
66 > You can find the latest version of the this manual at <A
67 HREF="http://www.privoxy.org/developer-manual/"
68 TARGET="_top"
69 >http://www.privoxy.org/developer-manual/</A
70 >.
71  Please see <A
72 HREF="contact.html"
73 TARGET="_top"
74 >the Contact section</A
75
76  on how to contact the developers.</P
77 ><P
78 ></P
79 ></DIV
80 ></DIV
81 ><HR></DIV
82 ><DIV
83 CLASS="TOC"
84 ><DL
85 ><DT
86 ><B
87 >Table of Contents</B
88 ></DT
89 ><DT
90 >1. <A
91 HREF="introduction.html"
92 >Introduction</A
93 ></DT
94 ><DD
95 ><DL
96 ><DT
97 >1.1. <A
98 HREF="introduction.html#QUICKSTART"
99 >Quickstart to Privoxy Development</A
100 ></DT
101 ></DL
102 ></DD
103 ><DT
104 >2. <A
105 HREF="cvs.html"
106 >The CVS Repository</A
107 ></DT
108 ><DD
109 ><DL
110 ><DT
111 >2.1. <A
112 HREF="cvs.html#CVSACCESS"
113 >Access to CVS</A
114 ></DT
115 ><DT
116 >2.2. <A
117 HREF="cvs.html#CVSCOMMIT"
118 >CVS Commit Guideline</A
119 ></DT
120 ><DT
121 >2.3. <A
122 HREF="cvs.html#CVSWHENASK"
123 >Discussing Changes First</A
124 ></DT
125 ></DL
126 ></DD
127 ><DT
128 >3. <A
129 HREF="documentation.html"
130 >Documentation Guidelines</A
131 ></DT
132 ><DD
133 ><DL
134 ><DT
135 >3.1. <A
136 HREF="documentation.html#SGML"
137 >Quickstart to Docbook and SGML</A
138 ></DT
139 ><DT
140 >3.2. <A
141 HREF="documentation.html#DOCSTYLE"
142 ><SPAN
143 CLASS="APPLICATION"
144 >Privoxy</SPAN
145 > Documentation Style</A
146 ></DT
147 ><DT
148 >3.3. <A
149 HREF="documentation.html#AEN209"
150 >Privoxy Custom Entities</A
151 ></DT
152 ></DL
153 ></DD
154 ><DT
155 >4. <A
156 HREF="coding.html"
157 >Coding Guidelines</A
158 ></DT
159 ><DD
160 ><DL
161 ><DT
162 >4.1. <A
163 HREF="coding.html#S1"
164 >Introduction</A
165 ></DT
166 ><DT
167 >4.2. <A
168 HREF="coding.html#S2"
169 >Using Comments</A
170 ></DT
171 ><DD
172 ><DL
173 ><DT
174 >4.2.1. <A
175 HREF="coding.html#S3"
176 >Comment, Comment, Comment</A
177 ></DT
178 ><DT
179 >4.2.2. <A
180 HREF="coding.html#S4"
181 >Use blocks for comments</A
182 ></DT
183 ><DT
184 >4.2.3. <A
185 HREF="coding.html#S5"
186 >Keep Comments on their own line</A
187 ></DT
188 ><DT
189 >4.2.4. <A
190 HREF="coding.html#S6"
191 >Comment each logical step</A
192 ></DT
193 ><DT
194 >4.2.5. <A
195 HREF="coding.html#S7"
196 >Comment All Functions Thoroughly</A
197 ></DT
198 ><DT
199 >4.2.6. <A
200 HREF="coding.html#S8"
201 >Comment at the end of braces if the
202     content is more than one screen length</A
203 ></DT
204 ></DL
205 ></DD
206 ><DT
207 >4.3. <A
208 HREF="coding.html#S9"
209 >Naming Conventions</A
210 ></DT
211 ><DD
212 ><DL
213 ><DT
214 >4.3.1. <A
215 HREF="coding.html#S10"
216 >Variable Names</A
217 ></DT
218 ><DT
219 >4.3.2. <A
220 HREF="coding.html#S11"
221 >Function Names</A
222 ></DT
223 ><DT
224 >4.3.3. <A
225 HREF="coding.html#S12"
226 >Header file prototypes</A
227 ></DT
228 ><DT
229 >4.3.4. <A
230 HREF="coding.html#S13"
231 >Enumerations, and #defines</A
232 ></DT
233 ><DT
234 >4.3.5. <A
235 HREF="coding.html#S14"
236 >Constants</A
237 ></DT
238 ></DL
239 ></DD
240 ><DT
241 >4.4. <A
242 HREF="coding.html#S15"
243 >Using Space</A
244 ></DT
245 ><DD
246 ><DL
247 ><DT
248 >4.4.1. <A
249 HREF="coding.html#S16"
250 >Put braces on a line by themselves.</A
251 ></DT
252 ><DT
253 >4.4.2. <A
254 HREF="coding.html#S17"
255 >ALL control statements should have a
256     block</A
257 ></DT
258 ><DT
259 >4.4.3. <A
260 HREF="coding.html#S18"
261 >Do not belabor/blow-up boolean
262     expressions</A
263 ></DT
264 ><DT
265 >4.4.4. <A
266 HREF="coding.html#S19"
267 >Use white space freely because it is
268     free</A
269 ></DT
270 ><DT
271 >4.4.5. <A
272 HREF="coding.html#S20"
273 >Don't use white space around structure
274     operators</A
275 ></DT
276 ><DT
277 >4.4.6. <A
278 HREF="coding.html#S21"
279 >Make the last brace of a function stand
280     out</A
281 ></DT
282 ><DT
283 >4.4.7. <A
284 HREF="coding.html#S22"
285 >Use 3 character indentions</A
286 ></DT
287 ></DL
288 ></DD
289 ><DT
290 >4.5. <A
291 HREF="coding.html#S23"
292 >Initializing</A
293 ></DT
294 ><DD
295 ><DL
296 ><DT
297 >4.5.1. <A
298 HREF="coding.html#S24"
299 >Initialize all variables</A
300 ></DT
301 ></DL
302 ></DD
303 ><DT
304 >4.6. <A
305 HREF="coding.html#S25"
306 >Functions</A
307 ></DT
308 ><DD
309 ><DL
310 ><DT
311 >4.6.1. <A
312 HREF="coding.html#S26"
313 >Name functions that return a boolean as a
314     question.</A
315 ></DT
316 ><DT
317 >4.6.2. <A
318 HREF="coding.html#S27"
319 >Always specify a return type for a
320     function.</A
321 ></DT
322 ><DT
323 >4.6.3. <A
324 HREF="coding.html#S28"
325 >Minimize function calls when iterating by
326     using variables</A
327 ></DT
328 ><DT
329 >4.6.4. <A
330 HREF="coding.html#S29"
331 >Pass and Return by Const Reference</A
332 ></DT
333 ><DT
334 >4.6.5. <A
335 HREF="coding.html#S30"
336 >Pass and Return by Value</A
337 ></DT
338 ><DT
339 >4.6.6. <A
340 HREF="coding.html#S31"
341 >Names of include files</A
342 ></DT
343 ><DT
344 >4.6.7. <A
345 HREF="coding.html#S32"
346 >Provide multiple inclusion
347     protection</A
348 ></DT
349 ><DT
350 >4.6.8. <A
351 HREF="coding.html#S33"
352 >Use `extern "C"` when appropriate</A
353 ></DT
354 ><DT
355 >4.6.9. <A
356 HREF="coding.html#S34"
357 >Where Possible, Use Forward Struct
358     Declaration Instead of Includes</A
359 ></DT
360 ></DL
361 ></DD
362 ><DT
363 >4.7. <A
364 HREF="coding.html#S35"
365 >General Coding Practices</A
366 ></DT
367 ><DD
368 ><DL
369 ><DT
370 >4.7.1. <A
371 HREF="coding.html#S36"
372 >Turn on warnings</A
373 ></DT
374 ><DT
375 >4.7.2. <A
376 HREF="coding.html#S37"
377 >Provide a default case for all switch
378     statements</A
379 ></DT
380 ><DT
381 >4.7.3. <A
382 HREF="coding.html#S38"
383 >Try to avoid falling through cases in a
384     switch statement.</A
385 ></DT
386 ><DT
387 >4.7.4. <A
388 HREF="coding.html#S39"
389 >Use 'long' or 'short' Instead of
390     'int'</A
391 ></DT
392 ><DT
393 >4.7.5. <A
394 HREF="coding.html#S40"
395 >Don't mix size_t and other types</A
396 ></DT
397 ><DT
398 >4.7.6. <A
399 HREF="coding.html#S41"
400 >Declare each variable and struct on its
401     own line.</A
402 ></DT
403 ><DT
404 >4.7.7. <A
405 HREF="coding.html#S42"
406 >Use malloc/zalloc sparingly</A
407 ></DT
408 ><DT
409 >4.7.8. <A
410 HREF="coding.html#S43"
411 >The Programmer Who Uses 'malloc' is
412     Responsible for Ensuring 'free'</A
413 ></DT
414 ><DT
415 >4.7.9. <A
416 HREF="coding.html#S44"
417 >Add loaders to the `file_list' structure
418     and in order</A
419 ></DT
420 ><DT
421 >4.7.10. <A
422 HREF="coding.html#S45"
423 >"Uncertain" new code and/or changes to
424     existing code, use FIXME</A
425 ></DT
426 ></DL
427 ></DD
428 ><DT
429 >4.8. <A
430 HREF="coding.html#S46"
431 >Addendum: Template for files and function
432     comment blocks:</A
433 ></DT
434 ></DL
435 ></DD
436 ><DT
437 >5. <A
438 HREF="testing.html"
439 >Testing Guidelines</A
440 ></DT
441 ><DD
442 ><DL
443 ><DT
444 >5.1. <A
445 HREF="testing.html#TESTING-PLAN"
446 >Testplan for releases</A
447 ></DT
448 ><DT
449 >5.2. <A
450 HREF="testing.html#TESTING-REPORT"
451 >Test reports</A
452 ></DT
453 ></DL
454 ></DD
455 ><DT
456 >6. <A
457 HREF="newrelease.html"
458 >Releasing a New Version</A
459 ></DT
460 ><DD
461 ><DL
462 ><DT
463 >6.1. <A
464 HREF="newrelease.html#VERSIONNUMBERS"
465 >Version numbers</A
466 ></DT
467 ><DT
468 >6.2. <A
469 HREF="newrelease.html#BEFORERELEASE"
470 >Before the Release: Freeze</A
471 ></DT
472 ><DT
473 >6.3. <A
474 HREF="newrelease.html#THERELEASE"
475 >Building and Releasing the Packages</A
476 ></DT
477 ><DD
478 ><DL
479 ><DT
480 >6.3.1. <A
481 HREF="newrelease.html#NEWRELEASE-TARBALL"
482 >Source Tarball</A
483 ></DT
484 ><DT
485 >6.3.2. <A
486 HREF="newrelease.html#NEWRELEASE-RPM"
487 >SuSE or Red Hat RPM</A
488 ></DT
489 ><DT
490 >6.3.3. <A
491 HREF="newrelease.html#NEWRELEASE-OS2"
492 >OS/2</A
493 ></DT
494 ><DT
495 >6.3.4. <A
496 HREF="newrelease.html#NEWRELEASE-SOLARIS"
497 >Solaris</A
498 ></DT
499 ><DT
500 >6.3.5. <A
501 HREF="newrelease.html#NEWRELEASE-WINDOWS"
502 >Windows</A
503 ></DT
504 ><DT
505 >6.3.6. <A
506 HREF="newrelease.html#NEWRELEASE-DEBIAN"
507 >Debian</A
508 ></DT
509 ><DT
510 >6.3.7. <A
511 HREF="newrelease.html#NEWRELEASE-MACOSX"
512 >Mac OSX</A
513 ></DT
514 ><DT
515 >6.3.8. <A
516 HREF="newrelease.html#NEWRELEASE-FREEBSD"
517 >FreeBSD</A
518 ></DT
519 ><DT
520 >6.3.9. <A
521 HREF="newrelease.html#NEWRELEASE-HPUX"
522 >HP-UX 11</A
523 ></DT
524 ><DT
525 >6.3.10. <A
526 HREF="newrelease.html#NEWRELEASE-AMIGA"
527 >Amiga OS</A
528 ></DT
529 ><DT
530 >6.3.11. <A
531 HREF="newrelease.html#NEWRELEASE-AIX"
532 >AIX</A
533 ></DT
534 ></DL
535 ></DD
536 ><DT
537 >6.4. <A
538 HREF="newrelease.html#RELEASING"
539 >Uploading and Releasing Your Package</A
540 ></DT
541 ><DT
542 >6.5. <A
543 HREF="newrelease.html#AFTERRELEASE"
544 >After the Release</A
545 ></DT
546 ></DL
547 ></DD
548 ><DT
549 >7. <A
550 HREF="webserver-update.html"
551 >Update the Webserver</A
552 ></DT
553 ><DT
554 >8. <A
555 HREF="contact.html"
556 >Contacting the developers, Bug Reporting and Feature Requests</A
557 ></DT
558 ><DD
559 ><DL
560 ><DT
561 >8.1. <A
562 HREF="contact.html#CONTACT-SUPPORT"
563 >Get Support</A
564 ></DT
565 ><DT
566 >8.2. <A
567 HREF="contact.html#CONTACT-BUGS"
568 >Report bugs</A
569 ></DT
570 ><DT
571 >8.3. <A
572 HREF="contact.html#CONTACT-FEATURE"
573 >Request new features</A
574 ></DT
575 ><DT
576 >8.4. <A
577 HREF="contact.html#CONTACT-ADS"
578 >Report ads or other filter problems</A
579 ></DT
580 ><DT
581 >8.5. <A
582 HREF="contact.html#CONTACT-OTHER"
583 >Other</A
584 ></DT
585 ></DL
586 ></DD
587 ><DT
588 >9. <A
589 HREF="copyright.html"
590 >Privoxy Copyright, License and History</A
591 ></DT
592 ><DD
593 ><DL
594 ><DT
595 >9.1. <A
596 HREF="copyright.html#AEN1061"
597 >License</A
598 ></DT
599 ><DT
600 >9.2. <A
601 HREF="copyright.html#AEN1077"
602 >History</A
603 ></DT
604 ></DL
605 ></DD
606 ><DT
607 >10. <A
608 HREF="seealso.html"
609 >See also</A
610 ></DT
611 ></DL
612 ></DIV
613 ></DIV
614 ><DIV
615 CLASS="NAVFOOTER"
616 ><HR
617 ALIGN="LEFT"
618 WIDTH="100%"><TABLE
619 WIDTH="100%"
620 BORDER="0"
621 CELLPADDING="0"
622 CELLSPACING="0"
623 ><TR
624 ><TD
625 WIDTH="33%"
626 ALIGN="left"
627 VALIGN="top"
628 >&nbsp;</TD
629 ><TD
630 WIDTH="34%"
631 ALIGN="center"
632 VALIGN="top"
633 >&nbsp;</TD
634 ><TD
635 WIDTH="33%"
636 ALIGN="right"
637 VALIGN="top"
638 ><A
639 HREF="introduction.html"
640 >Next</A
641 ></TD
642 ></TR
643 ><TR
644 ><TD
645 WIDTH="33%"
646 ALIGN="left"
647 VALIGN="top"
648 >&nbsp;</TD
649 ><TD
650 WIDTH="34%"
651 ALIGN="center"
652 VALIGN="top"
653 >&nbsp;</TD
654 ><TD
655 WIDTH="33%"
656 ALIGN="right"
657 VALIGN="top"
658 >Introduction</TD
659 ></TR
660 ></TABLE
661 ></DIV
662 ></BODY
663 ></HTML
664 >