1 Privoxy Developer Manual
5 $Id: developer-manual.sgml,v 1.31 2002/04/11 09:32:52 oes Exp $
7 The developer manual gives the users information on how to help the developer
8 team. It provides guidance on coding, testing, documentation and other issues.
10 Privoxy is a web proxy with advanced filtering capabilities for protecting
11 privacy, filtering web page content, managing cookies, controlling access, and
12 removing ads, banners, pop-ups and other obnoxious Internet junk. Privoxy has a
13 very flexible configuration and can be customized to suit individual needs and
14 tastes. Privoxy has application for both stand-alone systems and multi-user
17 Privoxy is based on the code of the Internet Junkbuster (tm). Junkbuster was
18 originally written by Junkbusters Corporation, and was released as free
19 open-source software under the GNU GPL. Stefan Waldherr made many improvements,
20 and started the SourceForge project to continue development.
22 Privoxy continues the Junkbuster tradition, but adds many refinements,
23 enhancements and new features.
25 You can find the latest version of the this manual at http://www.privoxy.org/
26 developer-manual/. Please see the Contact section on how to contact the
29 -------------------------------------------------------------------------------
34 3. Quickstart to Privoxy Development
35 4. Documentation Guidelines
37 4.1. Quickstart to Docbook and SGML
38 4.2. Privoxy Documentation Style
39 4.3. Privoxy Custom Entities
46 5.2.1. Comment, Comment, Comment
47 5.2.2. Use blocks for comments
48 5.2.3. Keep Comments on their own line
49 5.2.4. Comment each logical step
50 5.2.5. Comment All Functions Thoroughly
51 5.2.6. Comment at the end of braces if the content is more than one
54 5.3. Naming Conventions
58 5.3.3. Header file prototypes
59 5.3.4. Enumerations, and #defines
64 5.4.1. Put braces on a line by themselves.
65 5.4.2. ALL control statements should have a block
66 5.4.3. Do not belabor/blow-up boolean expressions
67 5.4.4. Use white space freely because it is free
68 5.4.5. Don't use white space around structure operators
69 5.4.6. Make the last brace of a function stand out
70 5.4.7. Use 3 character indentions
74 5.5.1. Initialize all variables
78 5.6.1. Name functions that return a boolean as a question.
79 5.6.2. Always specify a return type for a function.
80 5.6.3. Minimize function calls when iterating by using variables
81 5.6.4. Pass and Return by Const Reference
82 5.6.5. Pass and Return by Value
83 5.6.6. Names of include files
84 5.6.7. Provide multiple inclusion protection
85 5.6.8. Use `extern "C"` when appropriate
86 5.6.9. Where Possible, Use Forward Struct Declaration Instead of
89 5.7. General Coding Practices
91 5.7.1. Turn on warnings
92 5.7.2. Provide a default case for all switch statements
93 5.7.3. Try to avoid falling through cases in a switch statement.
94 5.7.4. Use 'long' or 'short' Instead of 'int'
95 5.7.5. Don't mix size_t and other types
96 5.7.6. Declare each variable and struct on its own line.
97 5.7.7. Use malloc/zalloc sparingly
98 5.7.8. The Programmer Who Uses 'malloc' is Responsible for Ensuring
100 5.7.9. Add loaders to the `file_list' structure and in order
101 5.7.10. "Uncertain" new code and/or changes to existing code, use FIXME
103 5.8. Addendum: Template for files and function comment blocks:
105 6. Version Control Guidelines
106 7. Testing Guidelines
108 7.1. Testplan for releases
111 8. Releasing a new version
113 8.1. Before the Release
114 8.2. Update the webserver
127 9. Contacting the developers, Bug Reporting and Feature Requests
128 10. Copyright and History
135 -------------------------------------------------------------------------------
139 Privoxy, as an heir to Junkbuster, is an Open Source project and licensed under
140 the GPL. As such, Privoxy development is potentially open to anyone who has the
141 time, knowledge, and desire to contribute in any capacity. Our goals are simply
142 to continue the mission, to improve Privoxy, and to make it available to as
143 wide an audience as possible.
145 One does not have to be a programmer to contribute. Packaging, testing, and
146 porting, are all important jobs as well.
148 -------------------------------------------------------------------------------
150 3. Quickstart to Privoxy Development
152 You'll need an account on Sourceforge to support our development. Mail your ID
153 to the list and wait until a project manager has added you.
155 For the time being (read, this section is under construction), please note the
156 following guidelines for changing stuff in the code. If it is
158 1. A bug-fix / clean-up / cosmetic thing: shoot
160 2. A new feature that can be turned off: shoot
162 3. A clear improvement w/o side effects on other parts of the code: shoot
164 4. A matter of taste: ask the list
166 5. A major redesign of some part of the code: ask the list
168 -------------------------------------------------------------------------------
170 4. Documentation Guidelines
172 All formal documents are maintained in Docbook SGML and located in the doc/
173 source/* directory. You will need Docbook, the Docbook DTD's and the Docbook
174 modular stylesheets (or comparable alternatives), and either jade or openjade
175 (recommended) installed in order to build docs from source. Currently there is
176 user-manual, FAQ, and, of course this, the developer-manual in this format. The
177 README, AUTHORS privoxy.1 (man page) files are also now maintained as Docbook
178 SGML. The finished files are all in the top-level source directory are
179 generated files! Also, index.html, the Privoxy home page, is maintained as
180 SGML. DO NOT edit these directly. Edit the SGML source, or contact someone
181 involved in the documentation (at present Stefan and Hal).
183 Other, less formal documents (e.g. LICENSE, INSTALL) are maintained as plain
184 text files in the top-level source directory. At least for the time being.
186 Packagers are encouraged to include this documentation. For those without the
187 ability to build the docs locally, text versions of each are kept in CVS. HTML
188 versions are also now being kept in CVS under doc/webserver/*.
190 Formal documents are built with the Makefile targets of make dok, or
191 alternately make redhat-dok. If you have problems, try both. The build process
192 uses the document SGML sources in doc/source/*/* to update all text files in
193 doc/text/ and to update all HTML documents in doc/webserver/.
195 Documentation writers should please make sure documents build successfully
196 before committing to CVS.
198 How do you update the webserver (i.e. the pages on privoxy.org)?
200 1. First, build the docs by running make dok (or alternately make redhat-dok).
202 2. Run make webserver which copies all files from doc/webserver to the
203 sourceforge webserver via scp.
205 Finished docs should be occasionally submitted to CVS (doc/webserver/*/*.html)
206 so that those without the ability to build them locally, have access to them if
207 needed. This is especially important just prior to a new release! Please do
208 this after the $VERSION and other release specific data in configure.in has
209 been updated (this is done just prior to a new release).
211 -------------------------------------------------------------------------------
213 4.1. Quickstart to Docbook and SGML
215 If you are not familiar with SGML, it is a markup language similar to HTML.
216 Actually, not a mark up language per se, but a language used to define markup
217 languages. In fact, HTML is an SGML application. Both will use "tags" to format
218 text and other content. SGML tags can be much more varied, and flexible, but do
219 much of the same kinds of things. The tags, or "elements", are definable in
220 SGML. There is no set "standards". Since we are using Docbook, our tags are
221 those that are defined by Docbook. Much of how the finish document is rendered
222 is determined by the "stylesheets". The stylesheets determine how each tag gets
223 translated to HTML, or other formats.
225 Tags in Docbook SGML need to be always "closed". If not, you will likely
226 generate errors. Example: <title>My Title</title>. They are also
227 case-insensitive, but we strongly suggest using all lower case. This keeps
228 compatibility with [Docbook] XML.
230 Our documents use "sections" for the most part. Sections will be processed into
231 HTML headers (e.g. h1 for sect1). The Docbook stylesheets will use these to
232 also generate the Table of Contents for each doc. Our TOC's are set to a depth
233 of three. Meaning sect1, sect2, and sect3 will have TOC entries, but sect4 will
234 not. Each section requires a <title> element, and at least one <para>. There is
235 a limit of five section levels in Docbook, but generally three should be
236 sufficient for our purposes.
238 Some common elements that you likely will use:
240 <para></para>, paragraph delimiter. Most text needs to be within paragraph
241 elements (there are some exceptions).
242 <emphasis></emphasis>, the stylesheets make this italics.
243 <filename></filename>, files and directories.
244 <command></command>, command examples.
245 <literallayout></literallayout>, like <pre>, more or less.
246 <itemizedlist></itemizedlist>, list with bullets.
247 <listitem></listitem>, member of the above.
248 <screen></screen>, screen output, implies <literallayout>.
249 <ulink url="example.com"></ulink>, like HTML <a> tag.
250 <quote></quote>, for, doh, quoting text.
252 Look at any of the existing docs for examples of all these and more.
254 -------------------------------------------------------------------------------
256 4.2. Privoxy Documentation Style
258 It will be easier if everyone follows a similar writing style. This just makes
259 it easier to read what someone else has written if it is all done in a similar
264 * All tags should be lower case.
266 * Tags delimiting a block of text (even small blocks) should be on their own
274 Tags marking individual words, or few words, should be in-line:
276 Just to <emphasis>emphasize</emphasis>, some text goes here.
279 * Tags should be nested and step indented for block text like: (except
286 Some text goes here in our list example.
293 This makes it easier to find the text amongst the tags ;-)
295 * Use white space to separate logical divisions within a document, like
296 between sections. Running everything together consistently makes it harder
299 * Do not hesitate to make comments. Comments can either use the <comment>
300 element, or the <!-- --> style comment familiar from HTML. (Note in Docbook
301 v4.x <comment> is replaced by <remark>.)
303 * We have an international audience. Refrain from slang, or English
304 idiosyncrasies (too many to list :). Humor also does not translate well
307 * Try to keep overall line lengths in source files to 80 characters or less
308 for obvious reasons. This is not always possible, with lengthy URLs for
311 * Our documents are available in differing formats. Right now, they are just
312 plain text, and HTML, but PDF, and others is always a future possibility.
313 Be careful with URLs (<ulink>), and avoid this mistake:
315 My favorite site is <ulink url="http://example.com">here</ulink>.
317 This will render as "My favorite site is here", which is not real helpful
318 in a text doc. Better like this:
320 My favorite site is <ulink url="http://example.com">example.com</ulink>.
322 * All documents should be spell checked occasionally. aspell can check SGML
323 with the -H option. (ispell I think too.)
325 -------------------------------------------------------------------------------
327 4.3. Privoxy Custom Entities
329 Privoxy documentation is using a number of customized "entities" to facilitate
330 documentation maintenance.
332 We are using a set of "boilerplate" files with generic text, that is used by
333 multiple docs. This way we can write something once, and use it repeatedly
334 without having to re-write the same content over and over again. If editing
335 such a file, keep in mind that it should be generic. That is the purpose; so it
336 can be used in varying contexts without additional modifications.
338 We are also using what Docbook calls "internal entities". These are like
339 variables in programming. Well, sort of. For instance, we have the p-version
340 entity that contains the current Privoxy version string. You are strongly
341 encouraged to use these where possible. Some of these obviously require
342 re-setting with each release (done by the Makefile). A sampling of custom
343 entities are listed below. See any of the main docs for examples.
345 * Re- "boilerplate" text entities are defined like:
347 <!entity supported SYSTEM "supported.sgml">
349 In this example, the contents of the file, supported.sgml is available for
350 inclusion anywhere in the doc. To make this happen, just reference the now
351 defined entity: &supported; (starts with an ampersand and ends with a
352 semi-colon), and the contents will be dumped into the finished doc at that
355 * Commonly used "internal entities":
357 p-version: the Privoxy version string, e.g. "2.9.14".
358 p-status: the project status, either "alpha", "beta", or "stable".
359 p-not-stable: use to conditionally include text in "not stable" releases
361 p-stable: just the opposite.
362 p-text: this doc is only generated as text.
364 There are others in various places that are defined for a specific purpose.
367 -------------------------------------------------------------------------------
373 This set of standards is designed to make our lives easier. It is developed
374 with the simple goal of helping us keep the "new and improved Privoxy"
375 consistent and reliable. Thus making maintenance easier and increasing chances
376 of success of the project.
378 And that of course comes back to us as individuals. If we can increase our
379 development and product efficiencies then we can solve more of the request for
380 changes/improvements and in general feel good about ourselves. ;->
382 -------------------------------------------------------------------------------
386 5.2.1. Comment, Comment, Comment
390 Comment as much as possible without commenting the obvious. For example do not
391 comment "aVariable is equal to bVariable". Instead explain why aVariable should
392 be equal to the bVariable. Just because a person can read code does not mean
393 they will understand why or what is being done. A reader may spend a lot more
394 time figuring out what is going on when a simple comment or explanation would
395 have prevented the extra research. Please help your brother IJB'ers out!
397 The comments will also help justify the intent of the code. If the comment
398 describes something different than what the code is doing then maybe a
399 programming error is occurring.
403 /* if page size greater than 1k ... */
404 if ( PageLength() > 1024 )
406 ... "block" the page up ...
409 /* if page size is small, send it in blocks */
410 if ( PageLength() > 1024 )
412 ... "block" the page up ...
415 This demonstrates 2 cases of "what not to do". The first is a
416 "syntax comment". The second is a comment that does not fit what
417 is actually being done.
419 -------------------------------------------------------------------------------
421 5.2.2. Use blocks for comments
425 Comments can help or they can clutter. They help when they are differentiated
426 from the code they describe. One line comments do not offer effective
427 separation between the comment and the code. Block identifiers do, by
428 surrounding the code with a clear, definable pattern.
432 /*********************************************************************
433 * This will stand out clearly in your code!
434 *********************************************************************/
435 if ( thisVariable == thatVariable )
437 DoSomethingVeryImportant();
441 /* unfortunately, this may not */
442 if ( thisVariable == thatVariable )
444 DoSomethingVeryImportant();
448 if ( thisVariable == thatVariable ) /* this may not either */
450 DoSomethingVeryImportant();
455 If you are trying to add a small logic comment and do not wish to "disrupt" the
456 flow of the code, feel free to use a 1 line comment which is NOT on the same
459 -------------------------------------------------------------------------------
461 5.2.3. Keep Comments on their own line
465 It goes back to the question of readability. If the comment is on the same line
466 as the code it will be harder to read than the comment that is on its own line.
468 There are three exceptions to this rule, which should be violated freely and
469 often: during the definition of variables, at the end of closing braces, when
470 used to comment parameters.
474 /*********************************************************************
475 * This will stand out clearly in your code,
476 * But the second example won't.
477 *********************************************************************/
478 if ( thisVariable == thatVariable )
480 DoSomethingVeryImportant();
483 if ( thisVariable == thatVariable ) /*can you see me?*/
485 DoSomethingVeryImportant(); /*not easily*/
489 /*********************************************************************
490 * But, the encouraged exceptions:
491 *********************************************************************/
492 int urls_read = 0; /* # of urls read + rejected */
493 int urls_rejected = 0; /* # of urls rejected */
497 DoSomethingVeryImportant();
501 short DoSomethingVeryImportant(
502 short firstparam, /* represents something */
503 short nextparam /* represents something else */ )
507 } /* -END- DoSomethingVeryImportant */
509 -------------------------------------------------------------------------------
511 5.2.4. Comment each logical step
515 Logical steps should be commented to help others follow the intent of the
516 written code and comments will make the code more readable.
518 If you have 25 lines of code without a comment, you should probably go back
519 into it to see where you forgot to put one.
521 Most "for", "while", "do", etc... loops _probably_ need a comment. After all,
522 these are usually major logic containers.
524 -------------------------------------------------------------------------------
526 5.2.5. Comment All Functions Thoroughly
530 A reader of the code should be able to look at the comments just prior to the
531 beginning of a function and discern the reason for its existence and the
532 consequences of using it. The reader should not have to read through the code
533 to determine if a given function is safe for a desired use. The proper
534 information thoroughly presented at the introduction of a function not only
535 saves time for subsequent maintenance or debugging, it more importantly aids in
536 code reuse by allowing a user to determine the safety and applicability of any
537 function for the problem at hand. As a result of such benefits, all functions
538 should contain the information presented in the addendum section of this
541 -------------------------------------------------------------------------------
543 5.2.6. Comment at the end of braces if the content is more than one screen
548 Each closing brace should be followed on the same line by a comment that
549 describes the origination of the brace if the original brace is off of the
550 screen, or otherwise far away from the closing brace. This will simplify the
551 debugging, maintenance, and readability of the code.
553 As a suggestion , use the following flags to make the comment and its brace
556 use following a closing brace: } /* -END- if() or while () or etc... */
562 DoSomethingVeryImportant();
563 ...some long list of commands...
564 } /* -END- if x is 1 */
570 DoSomethingVeryImportant();
571 ...some long list of commands...
572 } /* -END- if ( 1 == X ) */
574 -------------------------------------------------------------------------------
576 5.3. Naming Conventions
578 5.3.1. Variable Names
582 Use all lowercase, and separate words via an underscore ('_'). Do not start an
583 identifier with an underscore. (ANSI C reserves these for use by the compiler
584 and system headers.) Do not use identifiers which are reserved in ANSI C++.
585 (E.g. template, class, true, false, ...). This is in case we ever decide to
590 int ms_iis5_hack = 0;
594 int msiis5hack = 0; int msIis5Hack = 0;
596 -------------------------------------------------------------------------------
598 5.3.2. Function Names
602 Use all lowercase, and separate words via an underscore ('_'). Do not start an
603 identifier with an underscore. (ANSI C reserves these for use by the compiler
604 and system headers.) Do not use identifiers which are reserved in ANSI C++.
605 (E.g. template, class, true, false, ...). This is in case we ever decide to
610 int load_some_file( struct client_state *csp )
614 int loadsomefile( struct client_state *csp )
615 int loadSomeFile( struct client_state *csp )
617 -------------------------------------------------------------------------------
619 5.3.3. Header file prototypes
623 Use a descriptive parameter name in the function prototype in header files. Use
624 the same parameter name in the header file that you use in the c file.
628 (.h) extern int load_aclfile( struct client_state *csp );
629 (.c) int load_aclfile( struct client_state *csp )
633 (.h) extern int load_aclfile( struct client_state * ); or
634 (.h) extern int load_aclfile();
635 (.c) int load_aclfile( struct client_state *csp )
637 -------------------------------------------------------------------------------
639 5.3.4. Enumerations, and #defines
643 Use all capital letters, with underscores between words. Do not start an
644 identifier with an underscore. (ANSI C reserves these for use by the compiler
649 (enumeration) : enum Boolean { FALSE, TRUE };
650 (#define) : #define DEFAULT_SIZE 100;
652 Note: We have a standard naming scheme for #defines that toggle a feature in
653 the preprocessor: FEATURE_>, where > is a short (preferably 1 or 2 word)
658 #define FEATURE_FORCE 1
661 #define FORCE_PREFIX blah
662 #endif /* def FEATURE_FORCE */
664 -------------------------------------------------------------------------------
670 Spell common words out entirely (do not remove vowels).
672 Use only widely-known domain acronyms and abbreviations. Capitalize all letters
675 Use underscore (_) to separate adjacent acronyms and abbreviations. Never
676 terminate a name with an underscore.
680 #define USE_IMAGE_LIST 1
684 #define USE_IMG_LST 1 or
685 #define _USE_IMAGE_LIST 1 or
686 #define USE_IMAGE_LIST_ 1 or
687 #define use_image_list 1 or
688 #define UseImageList 1
690 -------------------------------------------------------------------------------
694 5.4.1. Put braces on a line by themselves.
698 The brace needs to be on a line all by itself, not at the end of the statement.
699 Curly braces should line up with the construct that they're associated with.
700 This practice makes it easier to identify the opening and closing braces for a
712 if ( this == that ) { ... }
716 if ( this == that ) { ... }
718 Note: In the special case that the if-statement is inside a loop, and it is
719 trivial, i.e. it tests for a condition that is obvious from the purpose of the
720 block, one-liners as above may optically preserve the loop structure and make
723 Status: developer-discretion.
727 while ( more lines are read )
729 /* Please document what is/is not a comment line here */
730 if ( it's a comment ) continue;
732 do_something( line );
735 -------------------------------------------------------------------------------
737 5.4.2. ALL control statements should have a block
741 Using braces to make a block will make your code more readable and less prone
742 to error. All control statements should have a block defined.
754 if ( this == that ) DoSomething(); DoSomethingElse();
758 if ( this == that ) DoSomething();
760 Note: The first example in "Instead of" will execute in a manner other than
761 that which the developer desired (per indentation). Using code braces would
762 have prevented this "feature". The "explanation" and "exception" from the point
765 -------------------------------------------------------------------------------
767 5.4.3. Do not belabor/blow-up boolean expressions
771 structure->flag = ( condition );
775 if ( condition ) { structure->flag = 1; } else { structure->flag = 0; }
777 Note: The former is readable and concise. The later is wordy and inefficient.
778 Please assume that any developer new to the project has at least a "good"
779 knowledge of C/C++. (Hope I do not offend by that last comment ... 8-)
781 -------------------------------------------------------------------------------
783 5.4.4. Use white space freely because it is free
787 Make it readable. The notable exception to using white space freely is listed
788 in the next guideline.
794 int anotherValue = 0;
795 int thisVariable = 0;
797 if ( thisVariable == thatVariable )
799 firstValue = oldValue + ( ( someValue - anotherValue ) - whatever )
801 -------------------------------------------------------------------------------
803 5.4.5. Don't use white space around structure operators
807 - structure pointer operator ( "->" ) - member operator ( "." ) - functions and
810 It is a general coding practice to put pointers, references, and function
811 parentheses next to names. With spaces, the connection between the object and
812 variable/function name is not as clear.
820 Instead of: aStruct -> aMember; aStruct . aMember; FunctionName ();
822 -------------------------------------------------------------------------------
824 5.4.6. Make the last brace of a function stand out
833 } /* -END- function1 */
838 } /* -END- function2 */
842 int function1( ... ) { ...code... return( retCode ); } int function2( ... ) { }
844 Note: Use 1 blank line before the closing brace and 2 lines afterward. This
845 makes the end of function standout to the most casual viewer. Although function
846 comments help separate functions, this is still a good coding practice. In
847 fact, I follow these rules when using blocks in "for", "while", "do" loops, and
848 long if {} statements too. After all whitespace is free!
850 Status: developer-discretion on the number of blank lines. Enforced is the end
851 of function comments.
853 -------------------------------------------------------------------------------
855 5.4.7. Use 3 character indentions
859 If some use 8 character TABs and some use 3 character TABs, the code can look *
860 very* ragged. So use 3 character indentions only. If you like to use TABs, pass
861 your code through a filter such as "expand -t3" before checking in your code.
865 static const char * const url_code_map[256] =
875 return( ALWAYS_TRUE );
879 return( HOW_DID_YOU_GET_HERE );
882 return( NEVER_GETS_HERE );
886 -------------------------------------------------------------------------------
890 5.5.1. Initialize all variables
894 Do not assume that the variables declared will not be used until after they
895 have been assigned a value somewhere else in the code. Remove the chance of
896 accidentally using an unassigned variable.
904 Note: It is much easier to debug a SIGSEGV if the message says you are trying
905 to access memory address 00000000 and not 129FA012; or arrayPtr[20] causes a
906 SIGSEV vs. arrayPtr[0].
908 Status: developer-discretion if and only if the variable is assigned a value
909 "shortly after" declaration.
911 -------------------------------------------------------------------------------
915 5.6.1. Name functions that return a boolean as a question.
919 Value should be phrased as a question that would logically be answered as a
920 true or false statement
928 -------------------------------------------------------------------------------
930 5.6.2. Always specify a return type for a function.
934 The default return for a function is an int. To avoid ambiguity, create a
935 return for a function when the return has a purpose, and create a void return
936 type if the function does not need to return anything.
938 -------------------------------------------------------------------------------
940 5.6.3. Minimize function calls when iterating by using variables
944 It is easy to write the following code, and a clear argument can be made that
945 the code is easy to understand:
949 for ( size_t cnt = 0; cnt < blockListLength(); cnt ++ )
954 Note: Unfortunately, this makes a function call for each and every iteration.
955 This increases the overhead in the program, because the compiler has to look up
956 the function each time, call it, and return a value. Depending on what occurs
957 in the blockListLength() call, it might even be creating and destroying
958 structures with each iteration, even though in each case it is comparing "cnt"
959 to the same value, over and over. Remember too - even a call to blockListLength
960 () is a function call, with the same overhead.
962 Instead of using a function call during the iterations, assign the value to a
963 variable, and evaluate using the variable.
967 size_t len = blockListLength();
969 for ( size_t cnt = 0; cnt < len; cnt ++ )
974 Exceptions: if the value of blockListLength() *may* change or could *
975 potentially* change, then you must code the function call in the for/while
978 -------------------------------------------------------------------------------
980 5.6.4. Pass and Return by Const Reference
984 This allows a developer to define a const pointer and call your function. If
985 your function does not have the const keyword, we may not be able to use your
986 function. Consider strcmp, if it were defined as: extern int strcmp( char *s1,
989 I could then not use it to compare argv's in main: int main( int argc, const
990 char *argv[] ) { strcmp( argv[0], "privoxy" ); }
992 Both these pointers are *const*! If the c runtime library maintainers do it, we
995 -------------------------------------------------------------------------------
997 5.6.5. Pass and Return by Value
1001 Most structures cannot fit onto a normal stack entry (i.e. they are not 4 bytes
1002 or less). Aka, a function declaration like: int load_aclfile( struct
1005 would not work. So, to be consistent, we should declare all prototypes with
1006 "pass by value": int load_aclfile( struct client_state *csp )
1008 -------------------------------------------------------------------------------
1010 5.6.6. Names of include files
1014 Your include statements should contain the file name without a path. The path
1015 should be listed in the Makefile, using -I as processor directive to search the
1016 indicated paths. An exception to this would be for some proprietary software
1017 that utilizes a partial path to distinguish their header files from system or
1022 #include <iostream.h> /* This is not a local include */
1023 #include "config.h" /* This IS a local include */
1027 /* This is not a local include, but requires a path element. */
1028 #include <sys/fileName.h>
1030 Note: Please! do not add "-I." to the Makefile without a _very_ good reason.
1031 This duplicates the #include "file.h" behavior.
1033 -------------------------------------------------------------------------------
1035 5.6.7. Provide multiple inclusion protection
1039 Prevents compiler and linker errors resulting from redefinition of items.
1041 Wrap each header file with the following syntax to prevent multiple inclusions
1042 of the file. Of course, replace PROJECT_H with your file name, with "." Changed
1043 to "_", and make it uppercase.
1047 #ifndef PROJECT_H_INCLUDED
1048 #define PROJECT_H_INCLUDED
1050 #endif /* ndef PROJECT_H_INCLUDED */
1052 -------------------------------------------------------------------------------
1054 5.6.8. Use `extern "C"` when appropriate
1058 If our headers are included from C++, they must declare our functions as
1059 `extern "C"`. This has no cost in C, but increases the potential re-usability
1067 #endif /* def __cplusplus */
1069 ... function definitions here ...
1073 #endif /* def __cplusplus */
1075 -------------------------------------------------------------------------------
1077 5.6.9. Where Possible, Use Forward Struct Declaration Instead of Includes
1081 Useful in headers that include pointers to other struct's. Modifications to
1082 excess header files may cause needless compiles.
1086 /*********************************************************************
1087 * We're avoiding an include statement here!
1088 *********************************************************************/
1090 extern file_list *xyz;
1092 Note: If you declare "file_list xyz;" (without the pointer), then including the
1093 proper header file is necessary. If you only want to prototype a pointer,
1094 however, the header file is unnecessary.
1096 Status: Use with discretion.
1098 -------------------------------------------------------------------------------
1100 5.7. General Coding Practices
1102 5.7.1. Turn on warnings
1106 Compiler warnings are meant to help you find bugs. You should turn on as many
1107 as possible. With GCC, the switch is "-Wall". Try and fix as many warnings as
1110 -------------------------------------------------------------------------------
1112 5.7.2. Provide a default case for all switch statements
1116 What you think is guaranteed is never really guaranteed. The value that you
1117 don't think you need to check is the one that someday will be passed. So, to
1118 protect yourself from the unknown, always have a default step in a switch
1123 switch( hash_string( cmd ) )
1125 case hash_actions_file :
1135 ... anomaly code goes here ...
1136 continue; / break; / exit( 1 ); / etc ...
1138 } /* end switch( hash_string( cmd ) ) */
1140 Note: If you already have a default condition, you are obviously exempt from
1141 this point. Of note, most of the WIN32 code calls `DefWindowProc' after the
1142 switch statement. This API call *should* be included in a default statement.
1144 Another Note: This is not so much a readability issue as a robust programming
1145 issue. The "anomaly code goes here" may be no more than a print to the STDERR
1146 stream (as in load_config). Or it may really be an ABEND condition.
1148 Status: Programmer discretion is advised.
1150 -------------------------------------------------------------------------------
1152 5.7.3. Try to avoid falling through cases in a switch statement.
1156 In general, you will want to have a 'break' statement within each 'case' of a
1157 switch statement. This allows for the code to be more readable and
1158 understandable, and furthermore can prevent unwanted surprises if someone else
1159 later gets creative and moves the code around.
1161 The language allows you to plan the fall through from one case statement to
1162 another simply by omitting the break statement within the case statement. This
1163 feature does have benefits, but should only be used in rare cases. In general,
1164 use a break statement for each case statement.
1166 If you choose to allow fall through, you should comment both the fact of the
1167 fall through and reason why you felt it was necessary.
1169 -------------------------------------------------------------------------------
1171 5.7.4. Use 'long' or 'short' Instead of 'int'
1175 On 32-bit platforms, int usually has the range of long. On 16-bit platforms,
1176 int has the range of short.
1178 Status: open-to-debate. In the case of most FSF projects (including X/
1179 GNU-Emacs), there are typedefs to int4, int8, int16, (or equivalence ... I
1180 forget the exact typedefs now). Should we add these to IJB now that we have a
1183 -------------------------------------------------------------------------------
1185 5.7.5. Don't mix size_t and other types
1189 The type of size_t varies across platforms. Do not make assumptions about
1190 whether it is signed or unsigned, or about how long it is. Do not compare a
1191 size_t against another variable of a different type (or even against a
1192 constant) without casting one of the values. Try to avoid using size_t if you
1195 -------------------------------------------------------------------------------
1197 5.7.6. Declare each variable and struct on its own line.
1201 It can be tempting to declare a series of variables all on one line. Don't.
1213 Explanation: - there is more room for comments on the individual variables -
1214 easier to add new variables without messing up the original ones - when
1215 searching on a variable to find its type, there is less clutter to "visually"
1218 Exceptions: when you want to declare a bunch of loop variables or other trivial
1219 variables; feel free to declare them on 1 line. You should, although, provide a
1220 good comment on their functions.
1222 Status: developer-discretion.
1224 -------------------------------------------------------------------------------
1226 5.7.7. Use malloc/zalloc sparingly
1230 Create a local struct (on the stack) if the variable will live and die within
1231 the context of one function call.
1233 Only "malloc" a struct (on the heap) if the variable's life will extend beyond
1234 the context of one function call.
1238 If a function creates a struct and stores a pointer to it in a
1239 list, then it should definitely be allocated via `malloc'.
1241 -------------------------------------------------------------------------------
1243 5.7.8. The Programmer Who Uses 'malloc' is Responsible for Ensuring 'free'
1247 If you have to "malloc" an instance, you are responsible for insuring that the
1248 instance is `free'd, even if the deallocation event falls within some other
1249 programmer's code. You are also responsible for ensuring that deletion is
1250 timely (i.e. not too soon, not too late). This is known as "low-coupling" and
1251 is a "good thing (tm)". You may need to offer a free/unload/destuctor type
1252 function to accommodate this.
1256 int load_re_filterfile( struct client_state *csp ) { ... }
1257 static void unload_re_filterfile( void *f ) { ... }
1261 The developer cannot be expected to provide `free'ing functions for C run-time
1262 library functions ... such as `strdup'.
1264 Status: developer-discretion. The "main" use of this standard is for allocating
1265 and freeing data structures (complex or nested).
1267 -------------------------------------------------------------------------------
1269 5.7.9. Add loaders to the `file_list' structure and in order
1273 I have ordered all of the "blocker" file code to be in alpha order. It is
1274 easier to add/read new blockers when you expect a certain order.
1276 Note: It may appear that the alpha order is broken in places by POPUP tests
1277 coming before PCRS tests. But since POPUPs can also be referred to as
1278 KILLPOPUPs, it is clear that it should come first.
1280 -------------------------------------------------------------------------------
1282 5.7.10. "Uncertain" new code and/or changes to existing code, use FIXME
1286 If you have enough confidence in new code or confidence in your changes, but
1287 are not *quite* sure of the repercussions, add this:
1289 /* FIXME: this code has a logic error on platform XYZ, * attempting to fix */ #
1290 ifdef PLATFORM ...changed code here... #endif
1294 /* FIXME: I think the original author really meant this... */ ...changed code
1299 /* FIXME: new code that *may* break something else... */ ...new code here...
1301 Note: If you make it clear that this may or may not be a "good thing (tm)", it
1302 will be easier to identify and include in the project (or conversely exclude
1305 -------------------------------------------------------------------------------
1307 5.8. Addendum: Template for files and function comment blocks:
1309 Example for file comments:
1311 const char FILENAME_rcs[] = "$Id: developer-manual.sgml,v 1.31 2002/04/11 09:32:52 oes Exp $";
1312 /*********************************************************************
1316 * Purpose : (Fill me in with a good description!)
1318 * Copyright : Written by and Copyright (C) 2001 the SourceForge
1319 * Privoxy team. http://www.privoxy.org/
1321 * Based on the Internet Junkbuster originally written
1322 * by and Copyright (C) 1997 Anonymous Coders and
1323 * Junkbusters Corporation. http://www.junkbusters.com
1325 * This program is free software; you can redistribute it
1326 * and/or modify it under the terms of the GNU General
1327 * Public License as published by the Free Software
1328 * Foundation; either version 2 of the License, or (at
1329 * your option) any later version.
1331 * This program is distributed in the hope that it will
1332 * be useful, but WITHOUT ANY WARRANTY; without even the
1333 * implied warranty of MERCHANTABILITY or FITNESS FOR A
1334 * PARTICULAR PURPOSE. See the GNU General Public
1335 * License for more details.
1337 * The GNU General Public License should be included with
1338 * this file. If not, you can view it at
1339 * http://www.gnu.org/copyleft/gpl.html
1340 * or write to the Free Software Foundation, Inc., 59
1341 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1346 *********************************************************************/
1351 ...necessary include files for us to do our work...
1353 const char FILENAME_h_rcs[] = FILENAME_H_VERSION;
1355 Note: This declares the rcs variables that should be added to the
1356 "show-proxy-args" page. If this is a brand new creation by you, you are free to
1357 change the "Copyright" section to represent the rights you wish to maintain.
1359 Note: The formfeed character that is present right after the comment flower box
1360 is handy for (X|GNU)Emacs users to skip the verbiage and get to the heart of
1361 the code (via `forward-page' and `backward-page'). Please include it if you
1364 Example for file header comments:
1368 #define FILENAME_H_VERSION "$Id: developer-manual.sgml,v 1.31 2002/04/11 09:32:52 oes Exp $"
1369 /*********************************************************************
1373 * Purpose : (Fill me in with a good description!)
1375 * Copyright : Written by and Copyright (C) 2001 the SourceForge
1376 * Privoxy team. http://www.privoxy.org/
1378 * Based on the Internet Junkbuster originally written
1379 * by and Copyright (C) 1997 Anonymous Coders and
1380 * Junkbusters Corporation. http://www.junkbusters.com
1382 * This program is free software; you can redistribute it
1383 * and/or modify it under the terms of the GNU General
1384 * Public License as published by the Free Software
1385 * Foundation; either version 2 of the License, or (at
1386 * your option) any later version.
1388 * This program is distributed in the hope that it will
1389 * be useful, but WITHOUT ANY WARRANTY; without even the
1390 * implied warranty of MERCHANTABILITY or FITNESS FOR A
1391 * PARTICULAR PURPOSE. See the GNU General Public
1392 * License for more details.
1394 * The GNU General Public License should be included with
1395 * this file. If not, you can view it at
1396 * http://www.gnu.org/copyleft/gpl.html
1397 * or write to the Free Software Foundation, Inc., 59
1398 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1403 *********************************************************************/
1406 #include "project.h"
1412 ... function headers here ...
1415 /* Revision control strings from this header and associated .c file */
1416 extern const char FILENAME_rcs[];
1417 extern const char FILENAME_h_rcs[];
1424 #endif /* ndef _FILENAME_H */
1432 Example for function comments:
1434 /*********************************************************************
1436 * Function : FUNCTION_NAME
1438 * Description : (Fill me in with a good description!)
1441 * 1 : param1 = pointer to an important thing
1442 * 2 : x = pointer to something else
1444 * Returns : 0 => Ok, everything else is an error.
1446 *********************************************************************/
1447 int FUNCTION_NAME( void *param1, const char *x )
1454 Note: If we all follow this practice, we should be able to parse our code to
1455 create a "self-documenting" web page.
1457 -------------------------------------------------------------------------------
1459 6. Version Control Guidelines
1461 To be filled. note on cvs comments. Don't only comment what you did, but also
1464 -------------------------------------------------------------------------------
1466 7. Testing Guidelines
1470 -------------------------------------------------------------------------------
1472 7.1. Testplan for releases
1474 Explain release numbers. major, minor. developer releases. etc.
1476 1. Remove any existing rpm with rpm -e
1478 2. Remove any file that was left over. This includes (but is not limited to)
1486 + /etc/init.d/privoxy
1490 3. Install the rpm. Any error messages?
1492 4. start,stop,status Privoxy with the specific script (e.g. /etc/rc.d/init/
1493 privoxy stop). Reboot your machine. Does autostart work?
1495 5. Start browsing. Does Privoxy work? Logfile written?
1497 6. Remove the rpm. Any error messages? All files removed?
1499 -------------------------------------------------------------------------------
1503 Please submit test reports only with the test form at sourceforge. Three simple
1506 * Select category: the distribution you test on.
1508 * Select group: the version of Privoxy that we are about to release.
1510 * Fill the Summary and Detailed Description with something intelligent (keep
1511 it short and precise).
1513 Do not mail to the mailinglist (we cannot keep track on issues there).
1515 -------------------------------------------------------------------------------
1517 8. Releasing a new version
1519 To minimize trouble with distribution contents, web-page errors and the like,
1520 we strongly encourage you to follow this section if you prepare a new release
1521 of code or new pages on the webserver.
1523 The following programs are required to follow this process: ncftpput (ncftp),
1524 scp (ssh), gmake (GNU's version of make), autoconf, cvs, ???.
1526 Replace X, Y and Z with the actual version number (X = major, Y = minor, Z =
1529 -------------------------------------------------------------------------------
1531 8.1. Before the Release
1533 The following must be done by one of the developers prior to each new release.
1535 * Make sure that everybody who has worked on the code in the last couple of
1536 days has had a chance to yell "no!" in case they have pending changes/fixes
1539 * Increment the version number in configure.in in CVS. Also, increase or
1540 reset the RPM release number in configure.in as appropriate. Do NOT touch
1541 version information after export from CVS. All packages will use the
1542 version and release data from configure.in. Local files should not be
1543 changed, except prior to a CVS commit!!! This way we are all on the same
1546 * If the default actionsfile has changed since last release, bump up its
1547 version info in this line:
1549 {+add-header{X-Actions-File-Version: A.B} -filter -no-popups}
1552 Then change the version info in doc/webserver/actions/index.php, line:
1553 '$required_actions_file_version = "A.B";'
1555 * Commit all files that were changed in the above steps!
1557 * Tag all files in CVS with the version number with "cvs tag v_X_Y_Z". Don't
1558 use vX_Y_Z, ver_X_Y_Z, v_X.Y.Z (won't work) etc.
1560 * The first package uploaded should be the official "tarball" release, as
1561 required by the GPL. This is built with the "make tarball-dist" Makefile
1562 target, and then can be uploaded with "make tarball-upload" (see below).
1564 -------------------------------------------------------------------------------
1566 8.2. Update the webserver
1568 All files must be group-readable and group-writable (or no one else will be
1569 able to change them)! To update the webserver, create any pages locally in the
1570 doc/webserver/* directory (or create new directories under doc/webserver), then
1576 This will do the upload to the webserver (www.privoxy.org).
1578 Note that "make dok" (or "make redhat-dok") creates doc/webserver/user-manual,
1579 doc/webserver/developer-manual, doc/webserver/faq and doc/webserver/index.html
1580 automatically. (doc/webserver/man-page/privoxy-man-page.html is created by a
1581 separate Makefile target, "make man", due to dependencies on some obscure perl
1582 scripts. See comments in GNUmakefile.)
1584 Someone should also commit these to CVS so that packagers without the ability
1585 to build docs locally, have access to them. This is a separate step, and should
1586 also be done before each official release.
1588 Please do NOT use any other means of transferring files to the webserver. "make
1589 webserver" not only uploads, but will make sure that the appropriate
1590 permissions are preserved for shared group access.
1592 -------------------------------------------------------------------------------
1594 8.3. SuSE or Red Hat
1596 Ensure that you have the latest code version. Hence run:
1598 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1599 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1605 autoheader && autoconf && ./configure
1610 make suse-dist or make redhat-dist
1613 To upload the package to Sourceforge, simply issue
1615 make suse-upload (or make redhat-upload)
1618 Go to the displayed URL and release the file publicly on Sourceforge.
1620 -------------------------------------------------------------------------------
1624 Ensure that you have the latest code version. Hence run:
1626 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1627 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1629 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co os2setup
1632 You will need a mix of development tools. The main compilation takes place with
1633 IBM Visual Age C++. Some ancillary work takes place with GNU tools, available
1634 from various sources like hobbes.nmsu.edu. Specificially, you will need
1635 autoheader, autoconf and sh tools. The packaging takes place with WarpIN,
1636 available from various sources, including its home page: xworkplace.
1638 Change directory to the os2setup directory. Edit the os2build.cmd file to set
1639 the final executable filename. For example,
1641 installExeName='privoxyos2_setup_X.Y.Z.exe'
1644 Next, edit the IJB.wis file so the release number matches in the PACKAGEID
1647 PACKAGEID="Privoxy Team\Privoxy\Privoxy Package\X\Y\Z"
1650 You're now ready to build. Run:
1655 And in the ./files directory you will have the WarpIN-installable executable.
1656 Upload this anonymously to uploads.sourceforge.net/incoming, create a release
1657 for it, and you're done.
1659 -------------------------------------------------------------------------------
1663 Login to Sourceforge's compilefarm via ssh
1665 ssh cf.sourceforge.net
1668 Choose the right operating system (not the Debian one). If you have downloaded
1671 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1672 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1676 If not, please checkout Privoxy via CVS first. Run:
1678 autoheader && autoconf && ./configure
1686 which creates a gzip'ed tar archive. Sadly, you cannot use make solaris-upload
1687 on the Sourceforge machine (no ncftpput). You now have to manually upload the
1688 archive to Sourceforge's ftp server and release the file publicly.
1690 -------------------------------------------------------------------------------
1694 Ensure that you have the latest code version. Hence run
1696 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1697 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1703 autoheader && autoconf && ./configure
1708 -------------------------------------------------------------------------------
1712 Ensure that you have the latest code version. Hence run:
1714 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1715 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1721 autoheader && autoconf && ./configure
1726 -------------------------------------------------------------------------------
1730 Ensure that you have the latest code version. Hence run:
1732 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1733 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1735 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co osxsetup
1738 From the osxsetup directory, run:
1743 This will run autoheader, autoconf and configure as well as make. Finally, it
1744 will copy over the necessary files to the ./osxsetup/files directory for
1745 further processing by PackageMaker.
1747 Bring up PackageMaker with the PrivoxyPackage.pmsp definition file, modify the
1748 package name to match the release, and hit the "Create package" button. If you
1749 specify ./Privoxy.pkg as the output package name, you can then create the
1750 distributable zip file with the command:
1752 zip -r privoxyosx_setup_x.y.z.zip Privoxy.pkg
1755 You can then upload privoxyosx_setup_x.y.z.zip anonymously to
1756 uploads.sourceforge.net/incoming, create a release for it, and you're done.
1758 -------------------------------------------------------------------------------
1762 Change the version number of Privoxy in the configure.in file. Run:
1764 autoheader && autoconf && ./configure
1769 Login to Sourceforge's compilefarm via ssh:
1771 ssh cf.sourceforge.net
1774 Choose the right operating system.
1776 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1777 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1783 autoheader && autoconf && ./configure
1791 which creates a gzip'ed tar archive. Sadly, you cannot use make freebsd-upload
1792 on the Sourceforge machine (no ncftpput). You now have to manually upload the
1793 archive to Sourceforge's ftp server and release the file publicly.
1795 -------------------------------------------------------------------------------
1799 Ensure that you have the right code version. Hence run:
1801 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1802 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1808 autoheader && autoconf && ./configure
1816 To upload the package to Sourceforge, simply issue
1821 Goto the displayed URL and release the file publicly on Sourceforge.
1823 -------------------------------------------------------------------------------
1827 Ensure that you have the latest code version. Hence run:
1829 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1830 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1836 autoheader && autoconf && ./configure
1841 -------------------------------------------------------------------------------
1845 Ensure that you have the latest code version. Hence run:
1847 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1848 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1854 autoheader && autoconf && ./configure
1859 -------------------------------------------------------------------------------
1863 Login to Sourceforge's compilefarm via ssh:
1865 ssh cf.sourceforge.net
1868 Choose the right operating system. If you have downloaded Privoxy before:
1870 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1871 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1875 If not, please checkout Privoxy via CVS first. Run:
1877 autoheader && autoconf && ./configure
1885 which creates a gzip'ed tar archive. Sadly, you cannot use make aix-upload on
1886 the Sourceforge machine (no ncftpput). You now have to manually upload the
1887 archive to Sourceforge's ftp server and release the file publicly.
1889 -------------------------------------------------------------------------------
1891 9. Contacting the developers, Bug Reporting and Feature Requests
1893 We value your feedback. However, to provide you with the best support, please
1896 * Use the Sourceforge Support Forum to get help:
1898 http://sourceforge.net/tracker/?group_id=11118&atid=211118
1901 * Submit bugs only through our Sourceforge Bug Forum:
1903 http://sourceforge.net/tracker/?group_id=11118&atid=111118.
1906 Make sure that the bug has not already been submitted. Please try to verify
1907 that it is a Privoxy bug, and not a browser or site bug first. If you are
1908 using your own custom configuration, please try the stock configs to see if
1909 the problem is a configuration related bug. And if not using the latest
1910 development snapshot, please try the latest one. Or even better, CVS
1911 sources. Please be sure to include the Privoxy/Junkbuster version,
1912 platform, browser, any pertinent log data, any other relevant details
1913 (please be specific) and, if possible, some way to reproduce the bug.
1915 * Submit feature requests only through our Sourceforge feature request forum:
1917 http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse.
1920 * Submit missed ads and banners, and incorrectly blocked images, popups, etc:
1922 http://p.p/, and select "actions file feedback system"
1925 This page can also be reached from many of the internal CGI pages.
1927 * For any other issues, feel free to use the mailing lists:
1929 http://sourceforge.net/mail/?group_id=11118.
1932 Anyone interested in actively participating in development and related
1933 discussions can also join the appropriate mailing list. Archives are
1936 -------------------------------------------------------------------------------
1938 10. Copyright and History
1942 Privoxy is free software; you can redistribute it and/or modify it under the
1943 terms of the GNU General Public License as published by the Free Software
1944 Foundation; either version 2 of the License, or (at your option) any later
1947 This program is distributed in the hope that it will be useful, but WITHOUT ANY
1948 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1949 PARTICULAR PURPOSE. See the GNU General Public License for more details, which
1950 is available from the Free Software Foundation, Inc, 59 Temple Place - Suite
1951 330, Boston, MA 02111-1307, USA.
1953 You should have received a copy of the GNU General Public License along with
1954 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
1955 Place, Suite 330, Boston, MA 02111-1307 USA.
1957 -------------------------------------------------------------------------------
1961 Privoxy is evolved, and derived from, the Internet Junkbuster, with many
1962 improvments and enhancements over the original.
1964 Junkbuster was originally written by Anonymous Coders and Junkbusters
1965 Corporation, and was released as free open-source software under the GNU GPL.
1966 Stefan Waldherr made many improvements, and started the SourceForge project
1967 Privoxy to rekindle development. There are now several active developers
1968 contributing. The last stable release of Junkbuster was v2.0.2, which has now
1971 -------------------------------------------------------------------------------
1975 Other references and sites of interest to Privoxy users:
1977 http://www.privoxy.org/, The Privoxy Home page.
1979 http://sourceforge.net/projects/ijbswa, the Project Page for Privoxy on
1982 http://p.p/, access Privoxy from your browser. Alternately, http://
1983 config.privoxy.org may work in some situations where the first does not.
1985 http://p.p/, and select "actions file feedback system" to submit "misses" to
1988 http://www.junkbusters.com/ht/en/cookies.html
1990 http://www.waldherr.org/junkbuster/
1992 http://privacy.net/analyze/
1994 http://www.squid-cache.org/