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