Update developer manual with new macOS packaging instructions
[privoxy.git] / doc / webserver / developer-manual / coding.html
index 6898541..fb4208f 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <HTML
 ><HEAD
 ><TITLE
@@ -134,7 +134,7 @@ CLASS="EMPHASIS"
     understand why or what is being done. A reader may spend a lot
     more time figuring out what is going on when a simple comment
     or explanation would have prevented the extra research. Please
-    help your brother IJB'ers out!</P
+    help your fellow Privoxy developers out!</P
 ><P
 >The comments will also help justify the intent of the code.
     If the comment describes something different than what the code
@@ -155,21 +155,21 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->/* if page size greater than 1k ... */
-if ( page_length() &#62; 1024 )
-{
-    ... "block" the page up ...
-}
+>  /* if page size greater than 1k ... */
+  if (page_length() &#62; 1024)
+  {
+      ... "block" the page up ...
+  }
 
-/* if page size is small, send it in blocks */
-if ( page_length() &#62; 1024 )
-{
-    ... "block" the page up ...
-}
+  /* if page size is small, send it in blocks */
+  if (page_length() &#62; 1024)
+  {
+      ... "block" the page up ...
+  }
 
-This demonstrates 2 cases of "what not to do".  The first is a
-"syntax comment".  The second is a comment that does not fit what
-is actually being done.</PRE
+  This demonstrates 2 cases of "what not to do".  The first is a
+  "syntax comment".  The second is a comment that does not fit what
+  is actually being done.</PRE
 ></TD
 ></TR
 ></TABLE
@@ -212,26 +212,26 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->/*********************************************************************
- * This will stand out clearly in your code!
- *********************************************************************/
-if ( this_variable == that_variable )
-{
-   do_something_very_important();
-}
+>  /*********************************************************************
  * This will stand out clearly in your code!
  *********************************************************************/
+  if (this_variable == that_variable)
+  {
+     do_something_very_important();
+  }
 
 
-/* unfortunately, this may not */
-if ( this_variable == that_variable )
-{
-   do_something_very_important();
-}
+  /* unfortunately, this may not */
+  if (this_variable == that_variable)
+  {
+     do_something_very_important();
+  }
 
 
-if ( this_variable == that_variable ) /* this may not either */
-{
-   do_something_very_important();
-}</PRE
+  if (this_variable == that_variable) /* this may not either */
+  {
+     do_something_very_important();
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -289,40 +289,40 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->/*********************************************************************
- * This will stand out clearly in your code,
- * But the second example won't.
- *********************************************************************/
-if ( this_variable == this_variable )
-{
-   do_something_very_important();
-}
+>  /*********************************************************************
  * This will stand out clearly in your code,
  * But the second example won't.
  *********************************************************************/
+  if (this_variable == this_variable)
+  {
+     do_something_very_important();
+  }
 
-if ( this_variable == this_variable ) /*can you see me?*/
-{
-   do_something_very_important(); /*not easily*/
-}
+  if (this_variable == this_variable) /*can you see me?*/
+  {
+     do_something_very_important(); /*not easily*/
+  }
 
 
-/*********************************************************************
- * But, the encouraged exceptions:
- *********************************************************************/
-int urls_read     = 0;     /* # of urls read + rejected */
-int urls_rejected = 0;     /* # of urls rejected */
+  /*********************************************************************
  * But, the encouraged exceptions:
  *********************************************************************/
+  int urls_read     = 0;     /* # of urls read + rejected */
+  int urls_rejected = 0;     /* # of urls rejected */
 
-if ( 1 == X )
-{
-   do_something_very_important();
-}
+  if (1 == X)
+  {
+     do_something_very_important();
+  }
 
 
-short do_something_very_important(
-   short firstparam,   /* represents something */
-   short nextparam     /* represents something else */ )
-{
-   ...code here...
+  short do_something_very_important(
+     short firstparam,   /* represents something */
+     short nextparam     /* represents something else */ )
+  {
+     ...code here...
 
-}   /* -END- do_something_very_important */</PRE
+  }   /* -END- do_something_very_important */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -431,19 +431,19 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->if ( 1 == X )
-{
-   do_something_very_important();
-   ...some long list of commands...
-} /* -END- if x is 1 */
+>  if (1 == X)
+  {
+     do_something_very_important();
+     ...some long list of commands...
+  } /* -END- if x is 1 */
 
-or:
+  or:
 
-if ( 1 == X )
-{
-   do_something_very_important();
-   ...some long list of commands...
-} /* -END- if ( 1 == X ) */</PRE
+  if (1 == X)
+  {
+     do_something_very_important();
+     ...some long list of commands...
+  } /* -END- if (1 == X) */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -496,7 +496,7 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->int ms_iis5_hack = 0;</PRE
+>  int ms_iis5_hack = 0;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -508,7 +508,6 @@ CLASS="EMPHASIS"
 >Instead of:</I
 ></SPAN
 ></P
-><P
 ><TABLE
 BORDER="0"
 BGCOLOR="#E0E0E0"
@@ -517,11 +516,10 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->int msiis5hack = 0; int msIis5Hack = 0;</PRE
+>  int msiis5hack = 0; int msIis5Hack = 0;</PRE
 ></TD
 ></TR
 ></TABLE
-></P
 ></DIV
 ><DIV
 CLASS="SECT3"
@@ -562,7 +560,7 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->int load_some_file( struct client_state *csp )</PRE
+>  int load_some_file(struct client_state *csp)</PRE
 ></TD
 ></TR
 ></TABLE
@@ -574,7 +572,6 @@ CLASS="EMPHASIS"
 >Instead of:</I
 ></SPAN
 ></P
-><P
 ><TABLE
 BORDER="0"
 BGCOLOR="#E0E0E0"
@@ -583,12 +580,11 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->int loadsomefile( struct client_state *csp )
-int loadSomeFile( struct client_state *csp )</PRE
+>  int loadsomefile(struct client_state *csp)
+  int loadSomeFile(struct client_state *csp)</PRE
 ></TD
 ></TR
 ></TABLE
-></P
 ></DIV
 ><DIV
 CLASS="SECT3"
@@ -626,8 +622,8 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->(.h) extern int load_aclfile( struct client_state *csp );
-(.c) int load_aclfile( struct client_state *csp )</PRE
+>  (.h) extern int load_aclfile(struct client_state *csp);
+  (.c) int load_aclfile(struct client_state *csp)</PRE
 ></TD
 ></TR
 ></TABLE
@@ -638,8 +634,8 @@ CLASS="emphasis"
 CLASS="EMPHASIS"
 >Instead of:</I
 ></SPAN
->
-<TABLE
+></P
+><TABLE
 BORDER="0"
 BGCOLOR="#E0E0E0"
 WIDTH="100%"
@@ -647,13 +643,12 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->(.h) extern int load_aclfile( struct client_state * ); or 
-(.h) extern int load_aclfile(); 
-(.c) int load_aclfile( struct client_state *csp )</PRE
+>  (.h) extern int load_aclfile(struct client_state *); or
+  (.h) extern int load_aclfile();
+  (.c) int load_aclfile(struct client_state *csp)</PRE
 ></TD
 ></TR
 ></TABLE
-></P
 ></DIV
 ><DIV
 CLASS="SECT3"
@@ -691,8 +686,8 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->(enumeration) : enum Boolean { FALSE, TRUE };
-(#define) : #define DEFAULT_SIZE 100;</PRE
+>  (enumeration) : enum Boolean {FALSE, TRUE};
+  (#define) : #define DEFAULT_SIZE 100;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -722,11 +717,11 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define FEATURE_FORCE 1
+>  #define FEATURE_FORCE 1
 
-#ifdef FEATURE_FORCE
-#define FORCE_PREFIX blah
-#endif /* def FEATURE_FORCE */</PRE
+  #ifdef FEATURE_FORCE
+  #define FORCE_PREFIX blah
+  #endif /* def FEATURE_FORCE */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -771,7 +766,7 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define USE_IMAGE_LIST 1</PRE
+>  #define USE_IMAGE_LIST 1</PRE
 ></TD
 ></TR
 ></TABLE
@@ -783,7 +778,6 @@ CLASS="EMPHASIS"
 >Instead of:</I
 ></SPAN
 ></P
-><P
 ><TABLE
 BORDER="0"
 BGCOLOR="#E0E0E0"
@@ -792,15 +786,14 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define USE_IMG_LST 1 or 
-#define _USE_IMAGE_LIST 1 or
-#define USE_IMAGE_LIST_ 1 or 
-#define use_image_list 1 or
-#define UseImageList 1</PRE
+>  #define USE_IMG_LST 1 or
+  #define _USE_IMAGE_LIST 1 or
+  #define USE_IMAGE_LIST_ 1 or
+  #define use_image_list 1 or
+  #define UseImageList 1</PRE
 ></TD
 ></TR
 ></TABLE
-></P
 ></DIV
 ></DIV
 ><DIV
@@ -849,10 +842,10 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->if ( this == that )
-{
-   ...
-}</PRE
+>  if (this == that)
+  {
+     ...
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -865,11 +858,11 @@ CLASS="EMPHASIS"
 ></SPAN
 ></P
 ><P
->if ( this == that ) { ... }</P
+>if (this == that) { ... }</P
 ><P
 >or</P
 ><P
->if ( this == that ) { ... }</P
+>if (this == that) { ... }</P
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -906,13 +899,13 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->while ( more lines are read )
-{
-   /* Please document what is/is not a comment line here */
-   if ( it's a comment ) continue;
+>  while (more lines are read)
+  {
+     /* Please document what is/is not a comment line here */
+     if (it's a comment) continue;
 
-   do_something( line );
-}</PRE
+     do_something(line);
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -954,11 +947,11 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->if ( this == that )
-{
-   do_something();
-   do_something_else();
-}</PRE
+>  if (this == that)
+  {
+     do_something();
+     do_something_else();
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -971,11 +964,11 @@ CLASS="EMPHASIS"
 ></SPAN
 ></P
 ><P
->if ( this == that ) do_something(); do_something_else();</P
+>if (this == that) do_something(); do_something_else();</P
 ><P
 >or</P
 ><P
->if ( this == that ) do_something();</P
+>if (this == that) do_something();</P
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1014,7 +1007,7 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->structure-&#62;flag = ( condition );</PRE
+>  structure-&#62;flag = (condition);</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1027,7 +1020,7 @@ CLASS="EMPHASIS"
 ></SPAN
 ></P
 ><P
->if ( condition ) { structure-&#62;flag = 1; } else {
+>if (condition) { structure-&#62;flag = 1; } else {
     structure-&#62;flag = 0; }</P
 ><P
 ><SPAN
@@ -1077,14 +1070,10 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->int first_value   = 0;
-int some_value    = 0;
-int another_value = 0;
-int this_variable = 0;
-
-if ( this_variable == this_variable )
-
-first_value = old_value + ( ( some_value - another_value ) - whatever )</PRE
+>  int first_value   = 0;
+  int some_value    = 0;
+  int another_value = 0;
+  int this_variable = 0;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1130,9 +1119,9 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->a_struct-&#62;a_member;
-a_struct.a_member;
-function_name();</PRE
+>  a_struct-&#62;a_member;
+  a_struct.a_member;
+  function_name();</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1171,17 +1160,17 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->int function1( ... )
-{
-   ...code...
-   return( ret_code );
+>  int function1( ... )
+  {
+     ...code...
+     return(ret_code);
 
-}   /* -END- function1 */
+  } /* -END- function1 */
 
 
-int function2( ... )
-{
-}   /* -END- function2 */</PRE
+  int function2( ... )
+  {
+  } /* -END- function2 */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1194,7 +1183,7 @@ CLASS="EMPHASIS"
 ></SPAN
 ></P
 ><P
->int function1( ... ) { ...code... return( ret_code ); } int
+>int function1( ... ) { ...code... return(ret_code); } int
     function2( ... ) { }</P
 ><P
 ><SPAN
@@ -1257,26 +1246,26 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->static const char * const url_code_map[256] =
-{
-   NULL, ...
-};
+>  static const char * const url_code_map[256] =
+  {
+     NULL, ...
+  };
 
 
-int function1( ... )
-{
-   if ( 1 )
-   {
-      return( ALWAYS_TRUE );
-   }
-   else
-   {
-      return( HOW_DID_YOU_GET_HERE );
-   }
+  int function1( ... )
+  {
+     if (1)
+     {
+        return ALWAYS_TRUE;
+     }
+     else
+     {
+        return HOW_DID_YOU_GET_HERE;
+     }
 
-   return( NEVER_GETS_HERE );
+     return NEVER_GETS_HERE;
 
-}</PRE
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1327,9 +1316,9 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->short a_short = 0;
-float a_float  = 0;
-struct *ptr = NULL;</PRE
+>  short a_short = 0;
+  float a_float  = 0;
+  struct *ptr = NULL;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1399,9 +1388,9 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->should_we_block_this();
-contains_an_image();
-is_web_page_blank();</PRE
+>  should_we_block_this();
+  contains_an_image();
+  is_web_page_blank();</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1465,10 +1454,10 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->for ( size_t cnt = 0; cnt &#60; block_list_length(); cnt++ )
-{
-   ....
-}</PRE
+>  for (size_t cnt = 0; cnt &lt; block_list_length(); cnt++)
+  {
+     ....
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1508,12 +1497,12 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->size_t len = block_list_length();
+>  size_t len = block_list_length();
 
-for ( size_t cnt = 0; cnt &#60; len; cnt++ )
-{
-   ....
-}</PRE
+  for (size_t cnt = 0; cnt &lt; len; cnt++)
+  {
+     ....
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1548,12 +1537,12 @@ CLASS="EMPHASIS"
 >This allows a developer to define a const pointer and call
     your function. If your function does not have the const
     keyword, we may not be able to use your function. Consider
-    strcmp, if it were defined as: extern int strcmp( char *s1,
-    char *s2 );</P
+    strcmp, if it were defined as: extern int strcmp(char *s1,
+    char *s2);</P
 ><P
->I could then not use it to compare argv's in main: int main(
-    int argc, const char *argv[] ) { strcmp( argv[0], "privoxy"
-    ); }</P
+>I could then not use it to compare argv's in main: int
+    main(int argc, const char *argv[]) { strcmp(argv[0], "privoxy");
+     }</P
 ><P
 >Both these pointers are *const*! If the c runtime library
     maintainers do it, we should too.</P
@@ -1577,11 +1566,11 @@ CLASS="EMPHASIS"
 ><P
 >Most structures cannot fit onto a normal stack entry (i.e.
     they are not 4 bytes or less). Aka, a function declaration
-    like: int load_aclfile( struct client_state csp )</P
+    like: int load_aclfile(struct client_state csp)</P
 ><P
 >would not work. So, to be consistent, we should declare all
-    prototypes with "pass by value": int load_aclfile( struct
-    client_state *csp )</P
+    prototypes with "pass by value": int load_aclfile(struct
+    client_state *csp)</P
 ></DIV
 ><DIV
 CLASS="SECT3"
@@ -1622,8 +1611,8 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#include &#60;iostream.h&#62;     /* This is not a local include */
-#include "config.h"       /* This IS a local include */</PRE
+>  #include &lt;iostream.h&gt;     /* This is not a local include */
+  #include "config.h"       /* This IS a local include */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1635,7 +1624,6 @@ CLASS="EMPHASIS"
 >Exception:</I
 ></SPAN
 ></P
-><P
 ><TABLE
 BORDER="0"
 BGCOLOR="#E0E0E0"
@@ -1644,12 +1632,11 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->/* This is not a local include, but requires a path element. */ 
-#include &#60;sys/fileName.h&#62;</PRE
+>  /* This is not a local include, but requires a path element. */
+  #include &lt;sys/fileName.h&gt;</PRE
 ></TD
 ></TR
 ></TABLE
-></P
 ><P
 ><SPAN
 CLASS="emphasis"
@@ -1702,10 +1689,10 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#ifndef PROJECT_H_INCLUDED
-#define PROJECT_H_INCLUDED
- ...
-#endif /* ndef PROJECT_H_INCLUDED */</PRE
+>  #ifndef PROJECT_H_INCLUDED
+  #define PROJECT_H_INCLUDED
  ...
+  #endif /* ndef PROJECT_H_INCLUDED */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1746,16 +1733,16 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#ifdef __cplusplus
-extern "C"
-{
-#endif /* def __cplusplus */
+>  #ifdef __cplusplus
+  extern "C"
+  {
+  #endif /* def __cplusplus */
 
-... function definitions here ...
+  ... function definitions here ...
 
-#ifdef __cplusplus
-}
-#endif /* def __cplusplus */</PRE
+  #ifdef __cplusplus
+  }
+  #endif /* def __cplusplus */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1797,11 +1784,11 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->/*********************************************************************
- * We're avoiding an include statement here!
- *********************************************************************/
-struct file_list;
-extern file_list *xyz;</PRE
+>  /*********************************************************************
  * We're avoiding an include statement here!
  *********************************************************************/
+  struct file_list;
+  extern file_list *xyz;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1893,22 +1880,22 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->switch( hash_string( cmd ) )
-{
-   case hash_actions_file :
-      ... code ...
-      break;
+>  switch (hash_string(cmd))
+  {
+     case hash_actions_file:
+        ... code ...
+        break;
 
-   case hash_confdir :
-      ... code ...
-      break;
+     case hash_confdir:
+        ... code ...
+        break;
 
-   default :
-      log_error( ... );
-      ... anomaly code goes here ...
-      continue; / break; / exit( 1 ); / etc ...
+     default:
+        log_error( ... );
+        ... anomaly code goes here ...
+        continue; / break; / exit( 1 ); / etc ...
 
-} /* end switch( hash_string( cmd ) ) */</PRE
+  } /* end switch (hash_string(cmd)) */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -1982,41 +1969,8 @@ CLASS="SECT3"
 ><H3
 CLASS="SECT3"
 ><A
-NAME="S39"
->4.7.4. Use 'long' or 'short' Instead of
-    'int'</A
-></H3
-><P
-><SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->Explanation:</I
-></SPAN
-></P
-><P
->On 32-bit platforms, int usually has the range of long. On
-    16-bit platforms, int has the range of short.</P
-><P
-><SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->Status:</I
-></SPAN
-> open-to-debate. In the case of most FSF
-    projects (including X/GNU-Emacs), there are typedefs to int4,
-    int8, int16, (or equivalence ... I forget the exact typedefs
-    now). Should we add these to IJB now that we have a "configure"
-    script?</P
-></DIV
-><DIV
-CLASS="SECT3"
-><H3
-CLASS="SECT3"
-><A
 NAME="S40"
->4.7.5. Don't mix size_t and other types</A
+>4.7.4. Don't mix size_t and other types</A
 ></H3
 ><P
 ><SPAN
@@ -2039,7 +1993,7 @@ CLASS="SECT3"
 CLASS="SECT3"
 ><A
 NAME="S41"
->4.7.6. Declare each variable and struct on its
+>4.7.5. Declare each variable and struct on its
     own line.</A
 ></H3
 ><P
@@ -2069,9 +2023,9 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->long a = 0;
-long b = 0;
-long c = 0;</PRE
+>  long a = 0;
+  long b = 0;
+  long c = 0;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -2123,7 +2077,7 @@ CLASS="SECT3"
 CLASS="SECT3"
 ><A
 NAME="S42"
->4.7.7. Use malloc/zalloc sparingly</A
+>4.7.6. Use malloc/zalloc sparingly</A
 ></H3
 ><P
 ><SPAN
@@ -2155,8 +2109,8 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->If a function creates a struct and stores a pointer to it in a
-list, then it should definitely be allocated via `malloc'.</PRE
+>  If a function creates a struct and stores a pointer to it in a
+  list, then it should definitely be allocated via `malloc'.</PRE
 ></TD
 ></TR
 ></TABLE
@@ -2167,7 +2121,7 @@ CLASS="SECT3"
 CLASS="SECT3"
 ><A
 NAME="S43"
->4.7.8. The Programmer Who Uses 'malloc' is
+>4.7.7. The Programmer Who Uses 'malloc' is
     Responsible for Ensuring 'free'</A
 ></H3
 ><P
@@ -2202,8 +2156,8 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->int load_re_filterfile( struct client_state *csp ) { ... }
-static void unload_re_filterfile( void *f ) { ... }</PRE
+>  int load_re_filterfile(struct client_state *csp) { ... }
+  static void unload_re_filterfile(void *f) { ... }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -2236,7 +2190,7 @@ CLASS="SECT3"
 CLASS="SECT3"
 ><A
 NAME="S44"
->4.7.9. Add loaders to the `file_list' structure
+>4.7.8. Add loaders to the `file_list' structure
     and in order</A
 ></H3
 ><P
@@ -2269,8 +2223,8 @@ CLASS="SECT3"
 CLASS="SECT3"
 ><A
 NAME="S45"
->4.7.10. "Uncertain" new code and/or changes to
-    existing code, use FIXME or XXX</A
+>4.7.9. "Uncertain" new code and/or changes to
+    existing code, use XXX</A
 ></H3
 ><P
 ><SPAN
@@ -2285,18 +2239,18 @@ CLASS="EMPHASIS"
     your changes, but are not *quite* sure of the repercussions,
     add this:</P
 ><P
->/* FIXME: this code has a logic error on platform XYZ, *
+>/* XXX: this code has a logic error on platform XYZ, *
     attempting to fix */ #ifdef PLATFORM ...changed code here...
     #endif</P
 ><P
 >or:</P
 ><P
->/* FIXME: I think the original author really meant this...
+>/* XXX: I think the original author really meant this...
     */ ...changed code here...</P
 ><P
 >or:</P
 ><P
->/* FIXME: new code that *may* break something else... */
+>/* XXX: new code that *may* break something else... */
     ...new code here...</P
 ><P
 ><SPAN
@@ -2336,43 +2290,42 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->const char FILENAME_rcs[] = "$Id$";
-/*********************************************************************
- *
- * File        :  $Source$
- *
- * Purpose     :  (Fill me in with a good description!)
- *
- * Copyright   :  Written by and Copyright (C) 2001-2009
- *                the Privoxy team. http://www.privoxy.org/
- *
- *                This program is free software; you can redistribute it
- *                and/or modify it under the terms of the GNU General
- *                Public License as published by the Free Software
- *                Foundation; either version 2 of the License, or (at
- *                your option) any later version.
- *
- *                This program is distributed in the hope that it will
- *                be useful, but WITHOUT ANY WARRANTY; without even the
- *                implied warranty of MERCHANTABILITY or FITNESS FOR A
- *                PARTICULAR PURPOSE.  See the GNU General Public
- *                License for more details.
- *
- *                The GNU General Public License should be included with
- *                this file.  If not, you can view it at
- *                http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- *                or write to the Free Software Foundation, Inc., 
- *                51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ,
- *                USA
- *
- *********************************************************************/
+>  /*********************************************************************
+   *
+   * File        :  $Source
+   *
+   * Purpose     :  (Fill me in with a good description!)
+   *
+   * Copyright   :  Written by and Copyright (C) 2001-2009
+   *                the Privoxy team. https://www.privoxy.org/
+   *
+   *                This program is free software; you can redistribute it
+   *                and/or modify it under the terms of the GNU General
+   *                Public License as published by the Free Software
+   *                Foundation; either version 2 of the License, or (at
+   *                your option) any later version.
+   *
+   *                This program is distributed in the hope that it will
+   *                be useful, but WITHOUT ANY WARRANTY; without even the
+   *                implied warranty of MERCHANTABILITY or FITNESS FOR A
+   *                PARTICULAR PURPOSE.  See the GNU General Public
+   *                License for more details.
+   *
+   *                The GNU General Public License should be included with
+   *                this file.  If not, you can view it at
+   *                http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+   *                or write to the Free Software Foundation, Inc.,
+   *                51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ,
+   *                USA
+   *
+   *********************************************************************/
 
 
-#include "config.h"
+  #include "config.h"
 
-   ...necessary include files for us to do our work...
+     ...necessary include files for us to do our work...
 
-const char FILENAME_h_rcs[] = FILENAME_H_VERSION;</PRE
+  const char FILENAME_h_rcs[] = FILENAME_H_VERSION;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -2384,7 +2337,7 @@ CLASS="EMPHASIS"
 >Note:</I
 ></SPAN
 > This declares the rcs variables that should be
-    added to the "show-proxy-args" page. If this is a brand new
+    added to the "show-version" page. If this is a brand new
     creation by you, you are free to change the "Copyright" section
     to represent the rights you wish to maintain.</P
 ><P
@@ -2415,65 +2368,64 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#ifndef _FILENAME_H
-#define _FILENAME_H
-#define FILENAME_H_VERSION "$Id$"
-/*********************************************************************
- *
- * File        :  $Source$
- *
- * Purpose     :  (Fill me in with a good description!)
- *
- * Copyright   :  Written by and Copyright (C) 2001-2009
- *                the Privoxy team. http://www.privoxy.org/
- *
- *                This program is free software; you can redistribute it
- *                and/or modify it under the terms of the GNU General
- *                Public License as published by the Free Software
- *                Foundation; either version 2 of the License, or (at
- *                your option) any later version.
- *
- *                This program is distributed in the hope that it will
- *                be useful, but WITHOUT ANY WARRANTY; without even the
- *                implied warranty of MERCHANTABILITY or FITNESS FOR A
- *                PARTICULAR PURPOSE.  See the GNU General Public
- *                License for more details.
- *
- *                The GNU General Public License should be included with
- *                this file.  If not, you can view it at
- *                http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- *                or write to the Free Software Foundation, Inc., 
- *                51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ,
- *                USA
- *
- *********************************************************************/
+>  #ifndef _FILENAME_H
+  #define _FILENAME_H
+  /*********************************************************************
+   *
+   * File        :  $Source
+   *
+   * Purpose     :  (Fill me in with a good description!)
+   *
+   * Copyright   :  Written by and Copyright (C) 2001-2009
+   *                the Privoxy team. https://www.privoxy.org/
+   *
+   *                This program is free software; you can redistribute it
+   *                and/or modify it under the terms of the GNU General
+   *                Public License as published by the Free Software
+   *                Foundation; either version 2 of the License, or (at
+   *                your option) any later version.
+   *
+   *                This program is distributed in the hope that it will
+   *                be useful, but WITHOUT ANY WARRANTY; without even the
+   *                implied warranty of MERCHANTABILITY or FITNESS FOR A
+   *                PARTICULAR PURPOSE.  See the GNU General Public
+   *                License for more details.
+   *
+   *                The GNU General Public License should be included with
+   *                this file.  If not, you can view it at
+   *                http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+   *                or write to the Free Software Foundation, Inc.,
+   *                51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ,
+   *                USA
+   *
+   *********************************************************************/
 
 
-#include "project.h"
+  #include "project.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+  #ifdef __cplusplus
+  extern "C" {
+  #endif
 
-   ... function headers here ...
+     ... function headers here ...
 
 
-/* Revision control strings from this header and associated .c file */
-extern const char FILENAME_rcs[];
-extern const char FILENAME_h_rcs[];
+  /* Revision control strings from this header and associated .c file */
+  extern const char FILENAME_rcs[];
+  extern const char FILENAME_h_rcs[];
 
 
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
+  #ifdef __cplusplus
+  } /* extern "C" */
+  #endif
 
-#endif /* ndef _FILENAME_H */
+  #endif /* ndef _FILENAME_H */
 
-/*
-  Local Variables:
-  tab-width: 3
-  end:
-*/</PRE
+  /*
+    Local Variables:
+    tab-width: 3
+    end:
+  */</PRE
 ></TD
 ></TR
 ></TABLE
@@ -2493,25 +2445,25 @@ WIDTH="100%"
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->/*********************************************************************
- *
- * Function    :  FUNCTION_NAME
- *
- * Description :  (Fill me in with a good description!)
- *
- * parameters  :
- *          1  :  param1 = pointer to an important thing
- *          2  :  x      = pointer to something else
- *
- * Returns     :  0 =&#62; Ok, everything else is an error.
- *
- *********************************************************************/
-int FUNCTION_NAME( void *param1, const char *x )
-{
-   ...
-   return( 0 );
+>  /*********************************************************************
  *
  * Function    :  FUNCTION_NAME
  *
  * Description :  (Fill me in with a good description!)
  *
  * parameters  :
  *          1  :  param1 = pointer to an important thing
  *          2  :  x      = pointer to something else
  *
  * Returns     :  0 =&#62; Ok, everything else is an error.
  *
  *********************************************************************/
+  int FUNCTION_NAME(void *param1, const char *x)
+  {
+     ...
+     return 0;
 
-}</PRE
+  }</PRE
 ></TD
 ></TR
 ></TABLE
@@ -2587,4 +2539,4 @@ VALIGN="top"
 ></DIV
 ></BODY
 ></HTML
->
+>
\ No newline at end of file