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