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