1 Privoxy Developer Manual
5 $Id: developer-manual.sgml,v 1.28 2002/04/08 22:59:26 hal9 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 exitinst 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 bugfix / 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 toplevel 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 -------------------------------------------------------------------------------
207 4.1. Quickstart to Docbook and SGML
209 If you are not familiar with SGML, it is a markup language similar to HTML.
210 Actually, not a mark up language per se, but a language used to define markup
211 languages. In fact, HTML is an SGML application. Both will use "tags" to format
212 text and other content. SGML tags can be much more varied, and flexible, but do
213 much of the same kinds of things. The tags, or "elements", are definable in
214 SGML. There is no set "standards". Since we are using Docbook, our tags are
215 those that are defined by Docbook. Much of how the finish document is rendered
216 is determined by the "stylesheets". The stylesheets determine how each tag gets
217 translated to HTML, or other formats.
219 Tags in Docbook SGML need to be always "closed". If not, you will likely
220 generate errors. Example: <title>My Title</title>. They are also
221 case-insensitive, but we strongly suggest using all lower case. This keeps
222 compatibility with [Docbook] XML.
224 Our documents use "sections" for the most part. Sections will be processed into
225 HTML headers (e.g. h1 for sect1). The Docbook stylesheets will use these to
226 also generate the Table of Contents for each doc. Our TOC's are set to a depth
227 of three. Meaning sect1, sect2, and sect3 will have TOC entries, but sect4 will
228 not. Each section requires a <title> element, and at least one <para>. There is
229 a limit of five section levels in Docbook, but generally three should be
230 sufficient for our purposes.
232 Some common elements that you likely will use:
234 , paragraph delimiter. Most text needs to be within paragraph elements (there
235 are some exceptions).
236 , the stylesheets make this italics.
237 , files and directories.
242 , member of the above.
243 , screen output, implies .
245 , for, doh, quoting text.
247 Look at any of the existing docs for examples of all these and more.
249 -------------------------------------------------------------------------------
251 4.2. Privoxy Documentation Style
253 It will be easier if everyone follows a similar writing style. This just makes
254 it easier to read what someone else has written if it is all done in a similar
259 * All tags should be lower case.
261 * Tags delimiting a block of text (even small blocks) should be on their own
269 Tags marking individual words, or few words, should be in-line:
271 Just to <emphasis>emphasize</emphasis>, some text goes here.
274 * Tags should be nested and step indented for block text like: (except
281 Some text goes here in our list example.
288 This makes it easier to find the text amongst the tags ;-)
290 * Use white space to separate logical divisions within a document, like
291 between sections. Running everything together consistently makes it harder
294 * Do not hesitate to make comments. Comments can either use the <comment>
295 element, or the <!-- --> style comment familiar from HTML. (Note in Docbook
296 v4.x <comment> is replaced by <remark>.)
298 * We have an international audience. Refrain from slang, or English
299 idiosyncrasies (too many to list :).
301 * Try to keep overall line lengths in source files to 80 characters or less
302 for obvious reasons. This is not always possible, with lenghty URLs for
305 * Our documents are available in differing formats. Right now, they are just
306 plain text, and HTML, but PDF, and others is always a future possibility.
307 Be careful with URLs (<ulink>), and avoid this mistake:
309 My favorite site is <ulink url="http://example.com">here</ulink>.
311 This will render as "My favorite site is here", which is not real helpful
312 in a text doc. Better like this:
314 My favorite site is <ulink url="http://example.com">example.com</ulink>.
316 * All documents should be spell checked occasionally. aspell can check SGML
317 with the -H option. (ispell I think too.)
319 -------------------------------------------------------------------------------
321 4.3. Privoxy Custom Entities
323 Privoxy documentation is using a number of customized "entities" to facilitate
324 documentation maintenance.
326 We are using a set of "boilerplate" files with generic text, that is used by
327 multiple docs. This way we can write something once, and use it repeatedly
328 without having to re-write the same content over and over again. If editing
329 such a file, keep in mind that it should be generic. That is the purpose; so it
330 can be used in varying contexts without additional modifications.
332 We are also using what Docbook calls "internal entities". These are like
333 variables in programming. Well, sort of. For instance, we have the p-version
334 entity that contains the current Privoxy version string. You are strongly
335 encouraged to use these where possible. Some of these obviously require
336 re-setting with each release (done by the Makefile). A sampling of custom
337 entities are listed below. See any of the main docs for examples.
339 * Re-cyclable "boilerplate" text entities are defined like:
341 <!entity supported SYSTEM "supported.sgml">
343 In this example, the contents of the file, supported.sgml is available for
344 inclusion anywhere in the doc. To make this happen, just reference the now
345 defined entity: &supported; (starts with an ampersand and ends with a
346 semi-colon), and the contents will be dumped into the finished doc at that
349 * Commonly used "internal entities":
351 p-version: the Privoxy version string, e.g. "2.9.13".
352 p-status: the project status, either "ALPHA", "BETA", or "STABLE".
353 p-not-stable: use to conditionally include text in "not stable" releases
355 p-stable: just the opposite.
356 p-text: this doc is only generated as text.
358 There are others in various places that are defined for a specific purpose.
361 -------------------------------------------------------------------------------
367 This set of standards is designed to make our lives easier. It is developed
368 with the simple goal of helping us keep the "new and improved Privoxy"
369 consistent and reliable. Thus making maintenance easier and increasing chances
370 of success of the project.
372 And that of course comes back to us as individuals. If we can increase our
373 development and product efficiencies then we can solve more of the request for
374 changes/improvements and in general feel good about ourselves. ;->
376 -------------------------------------------------------------------------------
380 5.2.1. Comment, Comment, Comment
384 Comment as much as possible without commenting the obvious. For example do not
385 comment "aVariable is equal to bVariable". Instead explain why aVariable should
386 be equal to the bVariable. Just because a person can read code does not mean
387 they will understand why or what is being done. A reader may spend a lot more
388 time figuring out what is going on when a simple comment or explanation would
389 have prevented the extra research. Please help your brother IJB'ers out!
391 The comments will also help justify the intent of the code. If the comment
392 describes something different than what the code is doing then maybe a
393 programming error is occurring.
397 /* if page size greater than 1k ... */
398 if ( PageLength() > 1024 )
400 ... "block" the page up ...
403 /* if page size is small, send it in blocks */
404 if ( PageLength() > 1024 )
406 ... "block" the page up ...
409 This demonstrates 2 cases of "what not to do". The first is a
410 "syntax comment". The second is a comment that does not fit what
411 is actually being done.
413 -------------------------------------------------------------------------------
415 5.2.2. Use blocks for comments
419 Comments can help or they can clutter. They help when they are differentiated
420 from the code they describe. One line comments do not offer effective
421 separation between the comment and the code. Block identifiers do, by
422 surrounding the code with a clear, definable pattern.
426 /*********************************************************************
427 * This will stand out clearly in your code!
428 *********************************************************************/
429 if ( thisVariable == thatVariable )
431 DoSomethingVeryImportant();
435 /* unfortunately, this may not */
436 if ( thisVariable == thatVariable )
438 DoSomethingVeryImportant();
442 if ( thisVariable == thatVariable ) /* this may not either */
444 DoSomethingVeryImportant();
449 If you are trying to add a small logic comment and do not wish to "disrubt" the
450 flow of the code, feel free to use a 1 line comment which is NOT on the same
453 -------------------------------------------------------------------------------
455 5.2.3. Keep Comments on their own line
459 It goes back to the question of readability. If the comment is on the same line
460 as the code it will be harder to read than the comment that is on its own line.
462 There are three exceptions to this rule, which should be violated freely and
463 often: during the definition of variables, at the end of closing braces, when
464 used to comment parameters.
468 /*********************************************************************
469 * This will stand out clearly in your code,
470 * But the second example won't.
471 *********************************************************************/
472 if ( thisVariable == thatVariable )
474 DoSomethingVeryImportant();
477 if ( thisVariable == thatVariable ) /*can you see me?*/
479 DoSomethingVeryImportant(); /*not easily*/
483 /*********************************************************************
484 * But, the encouraged exceptions:
485 *********************************************************************/
486 int urls_read = 0; /* # of urls read + rejected */
487 int urls_rejected = 0; /* # of urls rejected */
491 DoSomethingVeryImportant();
495 short DoSomethingVeryImportant(
496 short firstparam, /* represents something */
497 short nextparam /* represents something else */ )
501 } /* -END- DoSomethingVeryImportant */
503 -------------------------------------------------------------------------------
505 5.2.4. Comment each logical step
509 Logical steps should be commented to help others follow the intent of the
510 written code and comments will make the code more readable.
512 If you have 25 lines of code without a comment, you should probably go back
513 into it to see where you forgot to put one.
515 Most "for", "while", "do", etc... loops _probably_ need a comment. After all,
516 these are usually major logic containers.
518 -------------------------------------------------------------------------------
520 5.2.5. Comment All Functions Thoroughly
524 A reader of the code should be able to look at the comments just prior to the
525 beginning of a function and discern the reason for its existence and the
526 consequences of using it. The reader should not have to read through the code
527 to determine if a given function is safe for a desired use. The proper
528 information thoroughly presented at the introduction of a function not only
529 saves time for subsequent maintenance or debugging, it more importantly aids in
530 code reuse by allowing a user to determine the safety and applicability of any
531 function for the problem at hand. As a result of such benefits, all functions
532 should contain the information presented in the addendum section of this
535 -------------------------------------------------------------------------------
537 5.2.6. Comment at the end of braces if the content is more than one screen
542 Each closing brace should be followed on the same line by a comment that
543 describes the origination of the brace if the original brace is off of the
544 screen, or otherwise far away from the closing brace. This will simplify the
545 debugging, maintenance, and readability of the code.
547 As a suggestion , use the following flags to make the comment and its brace
550 use following a closing brace: } /* -END- if() or while () or etc... */
556 DoSomethingVeryImportant();
557 ...some long list of commands...
558 } /* -END- if x is 1 */
564 DoSomethingVeryImportant();
565 ...some long list of commands...
566 } /* -END- if ( 1 == X ) */
568 -------------------------------------------------------------------------------
570 5.3. Naming Conventions
572 5.3.1. Variable Names
576 Use all lowercase, and seperate words via an underscore ('_'). Do not start an
577 identifier with an underscore. (ANSI C reserves these for use by the compiler
578 and system headers.) Do not use identifiers which are reserved in ANSI C++.
579 (E.g. template, class, true, false, ...). This is in case we ever decide to
584 int ms_iis5_hack = 0;
588 int msiis5hack = 0; int msIis5Hack = 0;
590 -------------------------------------------------------------------------------
592 5.3.2. Function Names
596 Use all lowercase, and seperate words via an underscore ('_'). Do not start an
597 identifier with an underscore. (ANSI C reserves these for use by the compiler
598 and system headers.) Do not use identifiers which are reserved in ANSI C++.
599 (E.g. template, class, true, false, ...). This is in case we ever decide to
604 int load_some_file( struct client_state *csp )
608 int loadsomefile( struct client_state *csp )
609 int loadSomeFile( struct client_state *csp )
611 -------------------------------------------------------------------------------
613 5.3.3. Header file prototypes
617 Use a descriptive parameter name in the function prototype in header files. Use
618 the same parameter name in the header file that you use in the c file.
622 (.h) extern int load_aclfile( struct client_state *csp );
623 (.c) int load_aclfile( struct client_state *csp )
627 (.h) extern int load_aclfile( struct client_state * ); or
628 (.h) extern int load_aclfile();
629 (.c) int load_aclfile( struct client_state *csp )
631 -------------------------------------------------------------------------------
633 5.3.4. Enumerations, and #defines
637 Use all capital letters, with underscores between words. Do not start an
638 identifier with an underscore. (ANSI C reserves these for use by the compiler
643 (enumeration) : enum Boolean { FALSE, TRUE };
644 (#define) : #define DEFAULT_SIZE 100;
646 Note: We have a standard naming scheme for #defines that toggle a feature in
647 the preprocessor: FEATURE_>, where > is a short (preferably 1 or 2 word)
652 #define FEATURE_FORCE 1
655 #define FORCE_PREFIX blah
656 #endif /* def FEATURE_FORCE */
658 -------------------------------------------------------------------------------
664 Spell common words out entirely (do not remove vowels).
666 Use only widely-known domain acronyms and abbreviations. Capitalize all letters
669 Use underscore (_) to separate adjacent acronyms and abbreviations. Never
670 terminate a name with an underscore.
674 #define USE_IMAGE_LIST 1
678 #define USE_IMG_LST 1 or
679 #define _USE_IMAGE_LIST 1 or
680 #define USE_IMAGE_LIST_ 1 or
681 #define use_image_list 1 or
682 #define UseImageList 1
684 -------------------------------------------------------------------------------
688 5.4.1. Put braces on a line by themselves.
692 The brace needs to be on a line all by itself, not at the end of the statement.
693 Curly braces should line up with the construct that they're associated with.
694 This practice makes it easier to identify the opening and closing braces for a
706 if ( this == that ) { ... }
710 if ( this == that ) { ... }
712 Note: In the special case that the if-statement is inside a loop, and it is
713 trivial, i.e. it tests for a condidtion that is obvious from the purpose of the
714 block, one-liners as above may optically preserve the loop structure and make
717 Status: developer-discrection.
721 while ( more lines are read )
723 /* Please document what is/is not a comment line here */
724 if ( it's a comment ) continue;
726 do_something( line );
729 -------------------------------------------------------------------------------
731 5.4.2. ALL control statements should have a block
735 Using braces to make a block will make your code more readable and less prone
736 to error. All control statements should have a block defined.
748 if ( this == that ) DoSomething(); DoSomethingElse();
752 if ( this == that ) DoSomething();
754 Note: The first example in "Instead of" will execute in a manner other than
755 that which the developer desired (per indentation). Using code braces would
756 have prevented this "feature". The "explanation" and "exception" from the point
759 -------------------------------------------------------------------------------
761 5.4.3. Do not belabor/blow-up boolean expressions
765 structure->flag = ( condition );
769 if ( condition ) { structure->flag = 1; } else { structure->flag = 0; }
771 Note: The former is readable and consice. The later is wordy and inefficient.
772 Please assume that any developer new to the project has at least a "good"
773 knowledge of C/C++. (Hope I do not offend by that last comment ... 8-)
775 -------------------------------------------------------------------------------
777 5.4.4. Use white space freely because it is free
781 Make it readable. The notable exception to using white space freely is listed
782 in the next guideline.
788 int anotherValue = 0;
789 int thisVariable = 0;
791 if ( thisVariable == thatVariable )
793 firstValue = oldValue + ( ( someValue - anotherValue ) - whatever )
795 -------------------------------------------------------------------------------
797 5.4.5. Don't use white space around structure operators
801 - structure pointer operator ( "->" ) - member operator ( "." ) - functions and
804 It is a general coding practice to put pointers, references, and function
805 parentheses next to names. With spaces, the connection between the object and
806 variable/function name is not as clear.
814 Instead of: aStruct -> aMember; aStruct . aMember; FunctionName ();
816 -------------------------------------------------------------------------------
818 5.4.6. Make the last brace of a function stand out
827 } /* -END- function1 */
832 } /* -END- function2 */
836 int function1( ... ) { ...code... return( retCode ); } int function2( ... ) { }
838 Note: Use 1 blank line before the closing brace and 2 lines afterwards. This
839 makes the end of function standout to the most casual viewer. Although function
840 comments help seperate functions, this is still a good coding practice. In
841 fact, I follow these rules when using blocks in "for", "while", "do" loops, and
842 long if {} statements too. After all whitespace is free!
844 Status: developer-discrection on the number of blank lines. Enforced is the end
845 of function comments.
847 -------------------------------------------------------------------------------
849 5.4.7. Use 3 character indentions
853 If some use 8 character TABs and some use 3 character TABs, the code can look *
854 very* ragged. So use 3 character indentions only. If you like to use TABs, pass
855 your code through a filter such as "expand -t3" before checking in your code.
859 static const char * const url_code_map[256] =
869 return( ALWAYS_TRUE );
873 return( HOW_DID_YOU_GET_HERE );
876 return( NEVER_GETS_HERE );
880 -------------------------------------------------------------------------------
884 5.5.1. Initialize all variables
888 Do not assume that the variables declared will not be used until after they
889 have been assigned a value somewhere else in the code. Remove the chance of
890 accidentally using an unassigned variable.
898 Note: It is much easier to debug a SIGSEGV if the message says you are trying
899 to access memory address 00000000 and not 129FA012; or arrayPtr[20] causes a
900 SIGSEV vs. arrayPtr[0].
902 Status: developer-discrection if and only if the variable is assigned a value
903 "shortly after" declaration.
905 -------------------------------------------------------------------------------
909 5.6.1. Name functions that return a boolean as a question.
913 Value should be phrased as a question that would logically be answered as a
914 true or false statement
922 -------------------------------------------------------------------------------
924 5.6.2. Always specify a return type for a function.
928 The default return for a function is an int. To avoid ambiguity, create a
929 return for a function when the return has a purpose, and create a void return
930 type if the function does not need to return anything.
932 -------------------------------------------------------------------------------
934 5.6.3. Minimize function calls when iterating by using variables
938 It is easy to write the following code, and a clear argument can be made that
939 the code is easy to understand:
943 for ( size_t cnt = 0; cnt < blockListLength(); cnt ++ )
948 Note: Unfortunately, this makes a function call for each and every iteration.
949 This increases the overhead in the program, because the compiler has to look up
950 the function each time, call it, and return a value. Depending on what occurs
951 in the blockListLength() call, it might even be creating and destroying
952 structures with each iteration, even though in each case it is comparing "cnt"
953 to the same value, over and over. Remember too - even a call to blockListLength
954 () is a function call, with the same overhead.
956 Instead of using a function call during the iterations, assign the value to a
957 variable, and evaluate using the variable.
961 size_t len = blockListLength();
963 for ( size_t cnt = 0; cnt < len; cnt ++ )
968 Exceptions: if the value of blockListLength() *may* change or could *
969 potentially* change, then you must code the function call in the for/while
972 -------------------------------------------------------------------------------
974 5.6.4. Pass and Return by Const Reference
978 This allows a developer to define a const pointer and call your function. If
979 your function does not have the const keyword, we may not be able to use your
980 function. Consider strcmp, if it were defined as: extern int strcmp( char *s1,
983 I could then not use it to compare argv's in main: int main( int argc, const
984 char *argv[] ) { strcmp( argv[0], "privoxy" ); }
986 Both these pointers are *const*! If the c runtime library maintainers do it, we
989 -------------------------------------------------------------------------------
991 5.6.5. Pass and Return by Value
995 Most structures cannot fit onto a normal stack entry (i.e. they are not 4 bytes
996 or less). Aka, a function declaration like: int load_aclfile( struct
999 would not work. So, to be consistent, we should declare all prototypes with
1000 "pass by value": int load_aclfile( struct client_state *csp )
1002 -------------------------------------------------------------------------------
1004 5.6.6. Names of include files
1008 Your include statements should contain the file name without a path. The path
1009 should be listed in the Makefile, using -I as processor directive to search the
1010 indicated paths. An exception to this would be for some proprietary software
1011 that utilizes a partial path to distinguish their header files from system or
1016 #include /* This is not a local include */
1017 #include "config.h" /* This IS a local include */
1021 /* This is not a local include, but requires a path element. */
1024 Note: Please! do not add "-I." to the Makefile without a _very_ good reason.
1025 This duplicates the #include "file.h" behaviour.
1027 -------------------------------------------------------------------------------
1029 5.6.7. Provide multiple inclusion protection
1033 Prevents compiler and linker errors resulting from redefinition of items.
1035 Wrap each header file with the following syntax to prevent multiple inclusions
1036 of the file. Of course, replace PROJECT_H with your file name, with "." Changed
1037 to "_", and make it uppercase.
1041 #ifndef PROJECT_H_INCLUDED
1042 #define PROJECT_H_INCLUDED
1044 #endif /* ndef PROJECT_H_INCLUDED */
1046 -------------------------------------------------------------------------------
1048 5.6.8. Use `extern "C"` when appropriate
1052 If our headers are included from C++, they must declare our functions as
1053 `extern "C"`. This has no cost in C, but increases the potential re-usability
1061 #endif /* def __cplusplus */
1063 ... function definitions here ...
1067 #endif /* def __cplusplus */
1069 -------------------------------------------------------------------------------
1071 5.6.9. Where Possible, Use Forward Struct Declaration Instead of Includes
1075 Useful in headers that include pointers to other struct's. Modifications to
1076 excess header files may cause needless compiles.
1080 /*********************************************************************
1081 * We're avoiding an include statement here!
1082 *********************************************************************/
1084 extern file_list *xyz;
1086 Note: If you declare "file_list xyz;" (without the pointer), then including the
1087 proper header file is necessary. If you only want to prototype a pointer,
1088 however, the header file is unneccessary.
1090 Status: Use with discrection.
1092 -------------------------------------------------------------------------------
1094 5.7. General Coding Practices
1096 5.7.1. Turn on warnings
1100 Compiler warnings are meant to help you find bugs. You should turn on as many
1101 as possible. With GCC, the switch is "-Wall". Try and fix as many warnings as
1104 -------------------------------------------------------------------------------
1106 5.7.2. Provide a default case for all switch statements
1110 What you think is guaranteed is never really guaranteed. The value that you
1111 don't think you need to check is the one that someday will be passed. So, to
1112 protect yourself from the unknown, always have a default step in a switch
1117 switch( hash_string( cmd ) )
1119 case hash_actions_file :
1129 ... anomly code goes here ...
1130 continue; / break; / exit( 1 ); / etc ...
1132 } /* end switch( hash_string( cmd ) ) */
1134 Note: If you already have a default condition, you are obviously exempt from
1135 this point. Of note, most of the WIN32 code calls `DefWindowProc' after the
1136 switch statement. This API call *should* be included in a default statement.
1138 Another Note: This is not so much a readability issue as a robust programming
1139 issue. The "anomly code goes here" may be no more than a print to the STDERR
1140 stream (as in load_config). Or it may really be an ABEND condition.
1142 Status: Programmer discretion is advised.
1144 -------------------------------------------------------------------------------
1146 5.7.3. Try to avoid falling through cases in a switch statement.
1150 In general, you will want to have a 'break' statement within each 'case' of a
1151 switch statement. This allows for the code to be more readable and
1152 understandable, and furthermore can prevent unwanted surprises if someone else
1153 later gets creative and moves the code around.
1155 The language allows you to plan the fall through from one case statement to
1156 another simply by omitting the break statement within the case statement. This
1157 feature does have benefits, but should only be used in rare cases. In general,
1158 use a break statement for each case statement.
1160 If you choose to allow fall through, you should comment both the fact of the
1161 fall through and reason why you felt it was necessary.
1163 -------------------------------------------------------------------------------
1165 5.7.4. Use 'long' or 'short' Instead of 'int'
1169 On 32-bit platforms, int usually has the range of long. On 16-bit platforms,
1170 int has the range of short.
1172 Status: open-to-debate. In the case of most FSF projects (including X/
1173 GNU-Emacs), there are typedefs to int4, int8, int16, (or equivalence ... I
1174 forget the exact typedefs now). Should we add these to IJB now that we have a
1177 -------------------------------------------------------------------------------
1179 5.7.5. Don't mix size_t and other types
1183 The type of size_t varies across platforms. Do not make assumptions about
1184 whether it is signed or unsigned, or about how long it is. Do not compare a
1185 size_t against another variable of a different type (or even against a
1186 constant) without casting one of the values. Try to avoid using size_t if you
1189 -------------------------------------------------------------------------------
1191 5.7.6. Declare each variable and struct on its own line.
1195 It can be tempting to declare a series of variables all on one line. Don't.
1207 Explanation: - there is more room for comments on the individual variables -
1208 easier to add new variables without messing up the original ones - when
1209 searching on a variable to find its type, there is less clutter to "visually"
1212 Exceptions: when you want to declare a bunch of loop variables or other trivial
1213 variables; feel free to declare them on 1 line. You should, although, provide a
1214 good comment on their functions.
1216 Status: developer-discrection.
1218 -------------------------------------------------------------------------------
1220 5.7.7. Use malloc/zalloc sparingly
1224 Create a local stuct (on the stack) if the variable will live and die within
1225 the context of one function call.
1227 Only "malloc" a struct (on the heap) if the variable's life will extend beyond
1228 the context of one function call.
1232 If a function creates a struct and stores a pointer to it in a
1233 list, then it should definately be allocated via `malloc'.
1235 -------------------------------------------------------------------------------
1237 5.7.8. The Programmer Who Uses 'malloc' is Responsible for Ensuring 'free'
1241 If you have to "malloc" an instance, you are responsible for insuring that the
1242 instance is `free'd, even if the deallocation event falls within some other
1243 programmer's code. You are also responsible for ensuring that deletion is
1244 timely (i.e. not too soon, not too late). This is known as "low-coupling" and
1245 is a "good thing (tm)". You may need to offer a free/unload/destuctor type
1246 function to accomodate this.
1250 int load_re_filterfile( struct client_state *csp ) { ... }
1251 static void unload_re_filterfile( void *f ) { ... }
1255 The developer cannot be expected to provide `free'ing functions for C run-time
1256 library functions ... such as `strdup'.
1258 Status: developer-discrection. The "main" use of this standard is for
1259 allocating and freeing data structures (complex or nested).
1261 -------------------------------------------------------------------------------
1263 5.7.9. Add loaders to the `file_list' structure and in order
1267 I have ordered all of the "blocker" file code to be in alpha order. It is
1268 easier to add/read new blockers when you expect a certain order.
1270 Note: It may appear that the alpha order is broken in places by POPUP tests
1271 coming before PCRS tests. But since POPUPs can also be referred to as
1272 KILLPOPUPs, it is clear that it should come first.
1274 -------------------------------------------------------------------------------
1276 5.7.10. "Uncertain" new code and/or changes to exitinst code, use FIXME
1280 If you have enough confidence in new code or confidence in your changes, but
1281 are not *quite* sure of the reprocussions, add this:
1283 /* FIXME: this code has a logic error on platform XYZ, * attempthing to fix */
1284 #ifdef PLATFORM ...changed code here... #endif
1288 /* FIXME: I think the original author really meant this... */ ...changed code
1293 /* FIXME: new code that *may* break something else... */ ...new code here...
1295 Note: If you make it clear that this may or may not be a "good thing (tm)", it
1296 will be easier to identify and include in the project (or conversly exclude
1299 -------------------------------------------------------------------------------
1301 5.8. Addendum: Template for files and function comment blocks:
1303 Example for file comments:
1305 const char FILENAME_rcs[] = "$Id: developer-manual.sgml,v 1.28 2002/04/08 22:59:26 hal9 Exp $";
1306 /*********************************************************************
1310 * Purpose : (Fill me in with a good description!)
1312 * Copyright : Written by and Copyright (C) 2001 the SourceForge
1313 * Privoxy team. http://www.privoxy.org/
1315 * Based on the Internet Junkbuster originally written
1316 * by and Copyright (C) 1997 Anonymous Coders and
1317 * Junkbusters Corporation. http://www.junkbusters.com
1319 * This program is free software; you can redistribute it
1320 * and/or modify it under the terms of the GNU General
1321 * Public License as published by the Free Software
1322 * Foundation; either version 2 of the License, or (at
1323 * your option) any later version.
1325 * This program is distributed in the hope that it will
1326 * be useful, but WITHOUT ANY WARRANTY; without even the
1327 * implied warranty of MERCHANTABILITY or FITNESS FOR A
1328 * PARTICULAR PURPOSE. See the GNU General Public
1329 * License for more details.
1331 * The GNU General Public License should be included with
1332 * this file. If not, you can view it at
1333 * http://www.gnu.org/copyleft/gpl.html
1334 * or write to the Free Software Foundation, Inc., 59
1335 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1340 *********************************************************************/
1345 ...necessary include files for us to do our work...
1347 const char FILENAME_h_rcs[] = FILENAME_H_VERSION;
1349 Note: This declares the rcs variables that should be added to the
1350 "show-proxy-args" page. If this is a brand new creation by you, you are free to
1351 change the "Copyright" section to represent the rights you wish to maintain.
1353 Note: The formfeed character that is present right after the comment flower box
1354 is handy for (X|GNU)Emacs users to skip the verbige and get to the heart of the
1355 code (via `forward-page' and `backward-page'). Please include it if you can.
1357 Example for file header comments:
1361 #define FILENAME_H_VERSION "$Id: developer-manual.sgml,v 1.28 2002/04/08 22:59:26 hal9 Exp $"
1362 /*********************************************************************
1366 * Purpose : (Fill me in with a good description!)
1368 * Copyright : Written by and Copyright (C) 2001 the SourceForge
1369 * Privoxy team. http://www.privoxy.org/
1371 * Based on the Internet Junkbuster originally written
1372 * by and Copyright (C) 1997 Anonymous Coders and
1373 * Junkbusters Corporation. http://www.junkbusters.com
1375 * This program is free software; you can redistribute it
1376 * and/or modify it under the terms of the GNU General
1377 * Public License as published by the Free Software
1378 * Foundation; either version 2 of the License, or (at
1379 * your option) any later version.
1381 * This program is distributed in the hope that it will
1382 * be useful, but WITHOUT ANY WARRANTY; without even the
1383 * implied warranty of MERCHANTABILITY or FITNESS FOR A
1384 * PARTICULAR PURPOSE. See the GNU General Public
1385 * License for more details.
1387 * The GNU General Public License should be included with
1388 * this file. If not, you can view it at
1389 * http://www.gnu.org/copyleft/gpl.html
1390 * or write to the Free Software Foundation, Inc., 59
1391 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1396 *********************************************************************/
1399 #include "project.h"
1405 ... function headers here ...
1408 /* Revision control strings from this header and associated .c file */
1409 extern const char FILENAME_rcs[];
1410 extern const char FILENAME_h_rcs[];
1417 #endif /* ndef _FILENAME_H */
1425 Example for function comments:
1427 /*********************************************************************
1429 * Function : FUNCTION_NAME
1431 * Description : (Fill me in with a good description!)
1434 * 1 : param1 = pointer to an important thing
1435 * 2 : x = pointer to something else
1437 * Returns : 0 => Ok, everything else is an error.
1439 *********************************************************************/
1440 int FUNCTION_NAME( void *param1, const char *x )
1447 Note: If we all follow this practice, we should be able to parse our code to
1448 create a "self-documenting" web page.
1450 -------------------------------------------------------------------------------
1452 6. Version Control Guidelines
1454 To be filled. note on cvs comments. Don't only comment what you did, but also
1457 -------------------------------------------------------------------------------
1459 7. Testing Guidelines
1463 -------------------------------------------------------------------------------
1465 7.1. Testplan for releases
1467 Explain release numbers. major, minor. developer releases. etc.
1469 1. Remove any existing rpm with rpm -e
1471 2. Remove any file that was left over. This includes (but is not limited to)
1479 + /etc/init.d/privoxy
1483 3. Install the rpm. Any error messages?
1485 4. start,stop,status Privoxy with the specific script (e.g. /etc/rc.d/init/
1486 privoxy stop). Reboot your machine. Does autostart work?
1488 5. Start browsing. Does Privoxy work? Logfile written?
1490 6. Remove the rpm. Any error messages? All files removed?
1492 -------------------------------------------------------------------------------
1496 Please submit test reports only with the test form at sourceforge. Three simple
1499 * Select category: the distribution you test on.
1501 * Select group: the version of Privoxy that we are about to release.
1503 * Fill the Summary and Detailed Description with something intelligent (keep
1504 it short and precise).
1506 Do not mail to the mailinglist (we cannot keep track on issues there).
1508 -------------------------------------------------------------------------------
1510 8. Releasing a new version
1512 To minimize trouble with distribution contents, webpage errors and the like, we
1513 strongly encourage you to follow this section if you prepare a new release of
1514 code or new pages on the webserver.
1516 The following programs are required to follow this process: ncftpput (ncftp),
1517 scp (ssh), gmake (GNU's version of make), autoconf, cvs, ???.
1519 -------------------------------------------------------------------------------
1521 8.1. Before the Release
1523 The following must be done by one of the developers prior to each new release:
1525 * Make sure that everybody who has worked on the code in the last couple of
1526 days has had a chance to yell "no!" in case they have pending changes/fixes
1529 * Increment the version number in configure.in in CVS. Also, the RPM release
1530 number in configure.in. Do NOT touch version information after export from
1531 CVS. All packages will use the version and release data from configure.in.
1532 Local files should not be changed, except prior to a CVS commit!!! This way
1533 we are all on the same page!
1535 * If the default actionsfile has changed since last release, bump up its
1536 version info in this line:
1538 {+add-header{X-Actions-File-Version: A.B} -filter -no-popups}
1541 Then change the version info in doc/webserver/actions/index.php, line:
1542 '$required_actions_file_version = "A.B";'
1544 * Tag all files in CVS with the version number with "cvs tag v_X_Y_Z" (where
1545 X = major, Y = minor, Z = point). Don't use vX_Y_Z, ver_X_Y_Z, v_X.Y.Z
1548 * The first package uploaded should be the official "tarball" release. This
1549 is built with the "make tarball-dist" Makefile target, and then can be
1550 uploaded with "make tarball-upload" (see below).
1552 -------------------------------------------------------------------------------
1554 8.2. Update the webserver
1556 All files must be group-readable and group-writable (or no one else will be
1557 able to change them). To update the webserver, create any pages locally in the
1558 doc/webserver directory (or create new directories under doc/webserver), then
1564 Note that "make dok" (or "make redhat-dok") creates doc/webserver/user-manual,
1565 doc/webserver/developer-manual, doc/webserver/faq and doc/webserver/man-page
1568 Please do NOT use any other means of transferring files to the webserver. "make
1569 webserver" not only uploads, but will make sure that the appropriate
1570 permissions are preserved for shared group access.
1572 -------------------------------------------------------------------------------
1574 8.3. SuSE or Red Hat
1576 Ensure that you have the latest code version. Hence run:
1579 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1580 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1585 autoheader && autoconf && ./configure
1590 make suse-dist or make redhat-dist
1593 To upload the package to Sourceforge, simply issue
1595 make suse-upload or make redhat-upload
1598 Go to the displayed URL and release the file publicly on Sourceforge.
1600 -------------------------------------------------------------------------------
1604 Ensure that you have the latest code version. Hence run:
1607 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1608 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1610 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co os2setup
1613 You will need a mix of development tools. The main compilation takes place with
1614 IBM Visual Age C++. Some ancillary work takes place with GNU tools, available
1615 from various sources like hobbes.nmsu.edu. Specificially, you will need
1616 autoheader, autoconf and sh tools. The packaging takes place with WarpIN,
1617 available from various sources, including its home page: xworkplace.
1619 Change directory to the os2setup directory. Edit the os2build.cmd file to set
1620 the final executable filename. For example,
1622 installExeName='privoxyos2_setup_X.Y.Z.exe'
1625 Next, edit the IJB.wis file so the release number matches in the PACKAGEID
1628 PACKAGEID="Privoxy Team\Privoxy\Privoxy Package\X\Y\Z"
1631 You're now ready to build. Run:
1636 And in the ./files directory you will have the WarpIN-installable executable.
1637 Upload this anonymously to uploads.sourceforge.net/incoming, create a release
1638 for it, and you're done.
1640 -------------------------------------------------------------------------------
1644 Login to Sourceforge's compilefarm via ssh
1646 ssh cf.sourceforge.net
1649 Choose the right operating system (not the Debian one). If you have downloaded
1653 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1654 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1657 If not, please checkout Privoxy via CVS first. Run:
1659 autoheader && autoconf && ./configure
1667 which creates a gzip'ed tar archive. Sadly, you cannot use make solaris-upload
1668 on the Sourceforge machine (no ncftpput). You now have to manually upload the
1669 archive to Sourceforge's ftp server and release the file publicly.
1671 -------------------------------------------------------------------------------
1675 Ensure that you have the latest code version. Hence run
1678 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1679 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1684 autoheader && autoconf && ./configure
1689 -------------------------------------------------------------------------------
1693 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
1702 autoheader && autoconf && ./configure
1707 -------------------------------------------------------------------------------
1711 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
1717 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co osxsetup
1720 From the osxsetup directory, run:
1725 This will run autoheader, autoconf and configure as well as make. Finally, it
1726 will copy over the necessary files to the ./osxsetup/files directory for
1727 further processing by PackageMaker.
1729 Bring up PackageMaker with the PrivoxyPackage.pmsp definition file, modify the
1730 package name to match the release, and hit the "Create package" button. If you
1731 specify ./Privoxy.pkg as the output package name, you can then create the
1732 distributable zip file with the command:
1734 zip -r privoxyosx_setup_x.y.z.zip Privoxy.pkg
1737 You can then upload privoxyosx_setup_x.y.z.zip anonymously to
1738 uploads.sourceforge.net/incoming, create a release for it, and you're done.
1740 -------------------------------------------------------------------------------
1744 Change the version number of Privoxy in the configure.in file. Run:
1746 autoheader && autoconf && ./configure
1751 Login to Sourceforge's compilefarm via ssh:
1753 ssh cf.sourceforge.net
1756 Choose the right operating system. If you have downloaded Privoxy before,
1759 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1760 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1763 If not, please checkout Privoxy via CVS first. Run:
1765 autoheader && autoconf && ./configure
1773 which creates a gzip'ed tar archive. Sadly, you cannot use make freebsd-upload
1774 on the Sourceforge machine (no ncftpput). You now have to manually upload the
1775 archive to Sourceforge's ftp server and release the file publicly.
1777 -------------------------------------------------------------------------------
1781 Ensure that you have the latest code version. Hence run:
1784 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1785 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1791 autoheader && autoconf && ./configure
1799 To upload the package to Sourceforge, simply issue
1804 Goto the displayed URL and release the file publicly on Sourceforge.
1806 -------------------------------------------------------------------------------
1810 Ensure that you have the latest code version. Hence run:
1813 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1814 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1819 autoheader && autoconf && ./configure
1824 -------------------------------------------------------------------------------
1828 Ensure that you have the latest code version. Hence run:
1831 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1832 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1837 autoheader && autoconf && ./configure
1842 -------------------------------------------------------------------------------
1846 Login to Sourceforge's compilefarm via ssh:
1848 ssh cf.sourceforge.net
1851 Choose the right operating system. If you have downloaded Privoxy before:
1854 cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login
1855 cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
1858 If not, please checkout Privoxy via CVS first. Run:
1860 autoheader && autoconf && ./configure
1868 which creates a gzip'ed tar archive. Sadly, you cannot use make aix-upload on
1869 the Sourceforge machine (no ncftpput). You now have to manually upload the
1870 archive to Sourceforge's ftp server and release the file publicly.
1872 -------------------------------------------------------------------------------
1874 9. Contacting the developers, Bug Reporting and Feature Requests
1876 We value your feedback. However, to provide you with the best support, please
1879 * Use the Sourceforge Support Forum to get help:
1881 http://sourceforge.net/tracker/?group_id=11118&atid=211118
1884 * Submit bugs only through our Sourceforge Bug Forum:
1886 http://sourceforge.net/tracker/?group_id=11118&atid=111118.
1889 Make sure that the bug has not already been submitted. Please try to verify
1890 that it is a Privoxy bug, and not a browser or site bug first. If you are
1891 using your own custom configuration, please try the stock configs to see if
1892 the problem is a configuration related bug. And if not using the latest
1893 development snapshot, please try the latest one. Or even better, CVS
1894 sources. Please be sure to include the Privoxy/Junkbuster version,
1895 platform, browser, any pertinent log data, any other relevant details
1896 (please be specific) and, if possible, some way to reproduce the bug.
1898 * Submit feature requests only through our Sourceforge feature request forum:
1900 http://sourceforge.net/tracker/?atid=361118&group_id=11118&func=browse.
1903 * Submit missed ads and banners, and incorrectly blocked images, popups, etc:
1905 http://p.p/, and select "actions file feedback system"
1908 This page can also be reached from many of the internal CGI pages.
1910 * For any other issues, feel free to use the mailing lists:
1912 http://sourceforge.net/mail/?group_id=11118.
1915 Anyone interested in actively participating in development and related
1916 discussions can also join the appropriate mailing list. Archives are
1919 -------------------------------------------------------------------------------
1921 10. Copyright and History
1925 Privoxy is free software; you can redistribute it and/or modify it under the
1926 terms of the GNU General Public License as published by the Free Software
1927 Foundation; either version 2 of the License, or (at your option) any later
1930 This program is distributed in the hope that it will be useful, but WITHOUT ANY
1931 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1932 PARTICULAR PURPOSE. See the GNU General Public License for more details, which
1933 is available from the Free Software Foundation, Inc, 59 Temple Place - Suite
1934 330, Boston, MA 02111-1307, USA.
1936 You should have received a copy of the GNU General Public License along with
1937 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
1938 Place, Suite 330, Boston, MA 02111-1307 USA.
1940 -------------------------------------------------------------------------------
1944 Privoxy is evolved, and derived from, the Internet Junkbuster, with many
1945 improvments and enhancements over the original.
1947 Junkbuster was originally written by Anonymous Coders and Junkbusters
1948 Corporation, and was released as free open-source software under the GNU GPL.
1949 Stefan Waldherr made many improvements, and started the SourceForge project
1950 Privoxy to rekindle development. There are now several active developers
1951 contributing. The last stable release of Junkbuster was v2.0.2, which has now
1954 -------------------------------------------------------------------------------
1958 Other references and sites of interest to Privoxy users:
1960 http://www.privoxy.org/, The Privoxy Home page.
1962 http://sourceforge.net/projects/ijbswa, the Project Page for Privoxy on
1965 http://p.p/, access Privoxy from your browser. Alternately, http://
1966 config.privoxy.org may work in some situations where the first does not.
1968 http://p.p/, and select "actions file feedback system" to submit "misses" to
1971 http://www.junkbusters.com/ht/en/cookies.html
1973 http://www.waldherr.org/junkbuster/
1975 http://privacy.net/analyze/
1977 http://www.squid-cache.org/