Synthetic commit for tag v_3_0_1
[privoxy.git] / doc / webserver / developer-manual / coding.html
index d8c96f3..2a2ad68 100644 (file)
@@ -73,17 +73,13 @@ CLASS="SECT1"
 ><H1
 CLASS="SECT1"
 ><A
-NAME="CODING"
-></A
->4. Coding Guidelines</H1
+NAME="CODING">4. Coding Guidelines</H1
 ><DIV
 CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S1"
-></A
->4.1. Introduction</H2
+NAME="S1">4.1. Introduction</H2
 ><P
 >This set of standards is designed to make our lives easier.  It is
     developed with the simple goal of helping us keep the "new and improved
@@ -104,17 +100,13 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S2"
-></A
->4.2. Using Comments</H2
+NAME="S2">4.2. Using Comments</H2
 ><DIV
 CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S3"
-></A
->4.2.1. Comment, Comment, Comment</H3
+NAME="S3">4.2.1. Comment, Comment, Comment</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -176,9 +168,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S4"
-></A
->4.2.2. Use blocks for comments</H3
+NAME="S4">4.2.2. Use blocks for comments</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -250,9 +240,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S5"
-></A
->4.2.3. Keep Comments on their own line</H3
+NAME="S5">4.2.3. Keep Comments on their own line</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -329,9 +317,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S6"
-></A
->4.2.4. Comment each logical step</H3
+NAME="S6">4.2.4. Comment each logical step</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -358,9 +344,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S7"
-></A
->4.2.5. Comment All Functions Thoroughly</H3
+NAME="S7">4.2.5. Comment All Functions Thoroughly</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -388,9 +372,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S8"
-></A
->4.2.6. Comment at the end of braces if the
+NAME="S8">4.2.6. Comment at the end of braces if the
     content is more than one screen length</H3
 ><P
 ><SPAN
@@ -451,17 +433,13 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S9"
-></A
->4.3. Naming Conventions</H2
+NAME="S9">4.3. Naming Conventions</H2
 ><DIV
 CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S10"
-></A
->4.3.1. Variable Names</H3
+NAME="S10">4.3.1. Variable Names</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -525,9 +503,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S11"
-></A
->4.3.2. Function Names</H3
+NAME="S11">4.3.2. Function Names</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -592,9 +568,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S12"
-></A
->4.3.3. Header file prototypes</H3
+NAME="S12">4.3.3. Header file prototypes</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -657,9 +631,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S13"
-></A
->4.3.4. Enumerations, and #defines</H3
+NAME="S13">4.3.4. Enumerations, and #defines</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -733,9 +705,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S14"
-></A
->4.3.5. Constants</H3
+NAME="S14">4.3.5. Constants</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -805,17 +775,13 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S15"
-></A
->4.4. Using Space</H2
+NAME="S15">4.4. Using Space</H2
 ><DIV
 CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S16"
-></A
->4.4.1. Put braces on a line by themselves.</H3
+NAME="S16">4.4.1. Put braces on a line by themselves.</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -919,9 +885,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S17"
-></A
->4.4.2. ALL control statements should have a
+NAME="S17">4.4.2. ALL control statements should have a
     block</H3
 ><P
 ><SPAN
@@ -991,9 +955,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S18"
-></A
->4.4.3. Do not belabor/blow-up boolean
+NAME="S18">4.4.3. Do not belabor/blow-up boolean
     expressions</H3
 ><P
 ><SPAN
@@ -1043,9 +1005,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S19"
-></A
->4.4.4. Use white space freely because it is
+NAME="S19">4.4.4. Use white space freely because it is
     free</H3
 ><P
 ><SPAN
@@ -1091,9 +1051,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S20"
-></A
->4.4.5. Don't use white space around structure
+NAME="S20">4.4.5. Don't use white space around structure
     operators</H3
 ><P
 ><SPAN
@@ -1148,9 +1106,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S21"
-></A
->4.4.6. Make the last brace of a function stand
+NAME="S21">4.4.6. Make the last brace of a function stand
     out</H3
 ><P
 ><SPAN
@@ -1222,9 +1178,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S22"
-></A
->4.4.7. Use 3 character indentions</H3
+NAME="S22">4.4.7. Use 3 character indentions</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1284,17 +1238,13 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S23"
-></A
->4.5. Initializing</H2
+NAME="S23">4.5. Initializing</H2
 ><DIV
 CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S24"
-></A
->4.5.1. Initialize all variables</H3
+NAME="S24">4.5.1. Initialize all variables</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1357,17 +1307,13 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S25"
-></A
->4.6. Functions</H2
+NAME="S25">4.6. Functions</H2
 ><DIV
 CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S26"
-></A
->4.6.1. Name functions that return a boolean as a
+NAME="S26">4.6.1. Name functions that return a boolean as a
     question.</H3
 ><P
 ><SPAN
@@ -1408,9 +1354,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S27"
-></A
->4.6.2. Always specify a return type for a
+NAME="S27">4.6.2. Always specify a return type for a
     function.</H3
 ><P
 ><SPAN
@@ -1431,9 +1375,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S28"
-></A
->4.6.3. Minimize function calls when iterating by
+NAME="S28">4.6.3. Minimize function calls when iterating by
     using variables</H3
 ><P
 ><SPAN
@@ -1530,9 +1472,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S29"
-></A
->4.6.4. Pass and Return by Const Reference</H3
+NAME="S29">4.6.4. Pass and Return by Const Reference</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1560,9 +1500,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S30"
-></A
->4.6.5. Pass and Return by Value</H3
+NAME="S30">4.6.5. Pass and Return by Value</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1585,9 +1523,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S31"
-></A
->4.6.6. Names of include files</H3
+NAME="S31">4.6.6. Names of include files</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1663,9 +1599,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S32"
-></A
->4.6.7. Provide multiple inclusion
+NAME="S32">4.6.7. Provide multiple inclusion
     protection</H3
 ><P
 ><SPAN
@@ -1712,9 +1646,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S33"
-></A
->4.6.8. Use `extern "C"` when appropriate</H3
+NAME="S33">4.6.8. Use `extern "C"` when appropriate</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1762,9 +1694,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S34"
-></A
->4.6.9. Where Possible, Use Forward Struct
+NAME="S34">4.6.9. Where Possible, Use Forward Struct
     Declaration Instead of Includes</H3
 ><P
 ><SPAN
@@ -1828,17 +1758,13 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S35"
-></A
->4.7. General Coding Practices</H2
+NAME="S35">4.7. General Coding Practices</H2
 ><DIV
 CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S36"
-></A
->4.7.1. Turn on warnings</H3
+NAME="S36">4.7.1. Turn on warnings</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1857,9 +1783,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S37"
-></A
->4.7.2. Provide a default case for all switch
+NAME="S37">4.7.2. Provide a default case for all switch
     statements</H3
 ><P
 ><SPAN
@@ -1945,9 +1869,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S38"
-></A
->4.7.3. Try to avoid falling through cases in a
+NAME="S38">4.7.3. Try to avoid falling through cases in a
     switch statement.</H3
 ><P
 ><SPAN
@@ -1979,9 +1901,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S39"
-></A
->4.7.4. Use 'long' or 'short' Instead of
+NAME="S39">4.7.4. Use 'long' or 'short' Instead of
     'int'</H3
 ><P
 ><SPAN
@@ -2012,9 +1932,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S40"
-></A
->4.7.5. Don't mix size_t and other types</H3
+NAME="S40">4.7.5. Don't mix size_t and other types</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -2036,9 +1954,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S41"
-></A
->4.7.6. Declare each variable and struct on its
+NAME="S41">4.7.6. Declare each variable and struct on its
     own line.</H3
 ><P
 ><SPAN
@@ -2120,9 +2036,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S42"
-></A
->4.7.7. Use malloc/zalloc sparingly</H3
+NAME="S42">4.7.7. Use malloc/zalloc sparingly</H3
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -2164,9 +2078,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S43"
-></A
->4.7.8. The Programmer Who Uses 'malloc' is
+NAME="S43">4.7.8. The Programmer Who Uses 'malloc' is
     Responsible for Ensuring 'free'</H3
 ><P
 ><SPAN
@@ -2233,9 +2145,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S44"
-></A
->4.7.9. Add loaders to the `file_list' structure
+NAME="S44">4.7.9. Add loaders to the `file_list' structure
     and in order</H3
 ><P
 ><SPAN
@@ -2266,9 +2176,7 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S45"
-></A
->4.7.10. "Uncertain" new code and/or changes to
+NAME="S45">4.7.10. "Uncertain" new code and/or changes to
     existing code, use FIXME</H3
 ><P
 ><SPAN
@@ -2314,9 +2222,7 @@ CLASS="SECT2"
 ><H2
 CLASS="SECT2"
 ><A
-NAME="S46"
-></A
->4.8. Addendum: Template for files and function
+NAME="S46">4.8. Addendum: Template for files and function
     comment blocks:</H2
 ><P
 ><SPAN
@@ -2334,7 +2240,7 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->const char FILENAME_rcs[] = "$Id: developer-manual.sgml,v 1.46.2.11 2002/12/11 13:12:15 hal9 Exp $";
+>const char FILENAME_rcs[] = "$Id: developer-manual.sgml,v 1.46.2.8 2002/08/17 00:16:10 hal9 Exp $";
 /*********************************************************************
  *
  * File        :  $Source$
@@ -2421,7 +2327,7 @@ WIDTH="100%"
 CLASS="PROGRAMLISTING"
 >#ifndef _FILENAME_H
 #define _FILENAME_H
-#define FILENAME_H_VERSION "$Id: developer-manual.sgml,v 1.46.2.11 2002/12/11 13:12:15 hal9 Exp $"
+#define FILENAME_H_VERSION "$Id: developer-manual.sgml,v 1.46.2.8 2002/08/17 00:16:10 hal9 Exp $"
 /*********************************************************************
  *
  * File        :  $Source$