Privoxy Developer Manual

By: Privoxy Developers

$Id: developer-manual.sgml,v 1.31 2002/04/11 09:32:52 oes Exp $


Table of Contents
1. Introduction
3. Quickstart to Privoxy Development
4. Documentation Guidelines
4.1. Quickstart to Docbook and SGML
4.2. Privoxy Documentation Style
4.3. Privoxy Custom Entities
5. Coding Guidelines
5.1. Introduction
5.2. Using Comments
5.2.1. Comment, Comment, Comment
5.2.2. Use blocks for comments
5.2.3. Keep Comments on their own line
5.2.4. Comment each logical step
5.2.5. Comment All Functions Thoroughly
5.2.6. Comment at the end of braces if the content is more than one screen length
5.3. Naming Conventions
5.3.1. Variable Names
5.3.2. Function Names
5.3.3. Header file prototypes
5.3.4. Enumerations, and #defines
5.3.5. Constants
5.4. Using Space
5.4.1. Put braces on a line by themselves.
5.4.2. ALL control statements should have a block
5.4.3. Do not belabor/blow-up boolean expressions
5.4.4. Use white space freely because it is free
5.4.5. Don't use white space around structure operators
5.4.6. Make the last brace of a function stand out
5.4.7. Use 3 character indentions
5.5. Initializing
5.5.1. Initialize all variables
5.6. Functions
5.6.1. Name functions that return a boolean as a question.
5.6.2. Always specify a return type for a function.
5.6.3. Minimize function calls when iterating by using variables
5.6.4. Pass and Return by Const Reference
5.6.5. Pass and Return by Value
5.6.6. Names of include files
5.6.7. Provide multiple inclusion protection
5.6.8. Use `extern "C"` when appropriate
5.6.9. Where Possible, Use Forward Struct Declaration Instead of Includes
5.7. General Coding Practices
5.7.1. Turn on warnings
5.7.2. Provide a default case for all switch statements
5.7.3. Try to avoid falling through cases in a switch statement.
5.7.4. Use 'long' or 'short' Instead of 'int'
5.7.5. Don't mix size_t and other types
5.7.6. Declare each variable and struct on its own line.
5.7.7. Use malloc/zalloc sparingly
5.7.8. The Programmer Who Uses 'malloc' is Responsible for Ensuring 'free'
5.7.9. Add loaders to the `file_list' structure and in order
5.7.10. "Uncertain" new code and/or changes to exitinst code, use FIXME
5.8. Addendum: Template for files and function comment blocks:
6. Version Control Guidelines
7. Testing Guidelines
7.1. Testplan for releases
7.2. Test reports
8. Releasing a new version
8.1. Before the Release
8.2. Update the webserver
8.3. SuSE or Red Hat
8.4. OS/2
8.5. Solaris
8.6. Windows
8.7. Debian
8.8. Mac OSX
8.9. FreeBSD
8.10. Tarball
8.11. HP-UX 11
8.12. Amiga OS
8.13. AIX
9. Contacting the developers, Bug Reporting and Feature Requests
10. Copyright and History
10.1. Copyright
10.2. History
11. See also