<link rel="PREVIOUS" title="Documentation Guidelines" href="documentation.html">
<link rel="NEXT" title="Testing Guidelines" href="testing.html">
<link rel="STYLESHEET" type="text/css" href="../p_doc.css">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="NAVHEADER">
maintenance easier and increasing chances of success of the project.</p>
<p>And that of course comes back to us as individuals. If we can increase our development and product
efficiencies then we can solve more of the request for changes/improvements and in general feel good about
- ourselves. ;-></p>
+ ourselves. ;-></p>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="S2" id="S2">4.2. Using Comments</a></h2>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">/* if page size greater than 1k ... */
-if (page_length() > 1024)
-{
- ... "block" the page up ...
-}
+ <pre class="PROGRAMLISTING"> /* if page size greater than 1k ... */
+ if (page_length() > 1024)
+ {
+ ... "block" the page up ...
+ }
-/* if page size is small, send it in blocks */
-if (page_length() > 1024)
-{
- ... "block" the page up ...
-}
+ /* if page size is small, send it in blocks */
+ if (page_length() > 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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">/*********************************************************************
- * This will stand out clearly in your code!
- *********************************************************************/
-if (this_variable == that_variable)
-{
- do_something_very_important();
-}
+ <pre class="PROGRAMLISTING"> /*********************************************************************
+ * 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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<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();
-}
+ <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();
+ }
-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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">if (1 == X)
-{
- do_something_very_important();
- ...some long list of commands...
-} /* -END- if x is 1 */
+ <pre class="PROGRAMLISTING"> 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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">int ms_iis5_hack = 0;</pre>
+ <pre class="PROGRAMLISTING"> int ms_iis5_hack = 0;</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">int msiis5hack = 0; int msIis5Hack = 0;</pre>
+ <pre class="PROGRAMLISTING"> int msiis5hack = 0; int msIis5Hack = 0;</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">int load_some_file(struct client_state *csp)</pre>
+ <pre class="PROGRAMLISTING"> int load_some_file(struct client_state *csp)</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">int loadsomefile(struct client_state *csp)
-int loadSomeFile(struct client_state *csp)</pre>
+ <pre class="PROGRAMLISTING"> int loadsomefile(struct client_state *csp)
+ int loadSomeFile(struct client_state *csp)</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">(.h) extern int load_aclfile(struct client_state *csp);
-(.c) int load_aclfile(struct client_state *csp)</pre>
+ <pre class="PROGRAMLISTING"> (.h) extern int load_aclfile(struct client_state *csp);
+ (.c) int load_aclfile(struct client_state *csp)</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<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>
+ <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>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">(enumeration) : enum Boolean {FALSE, TRUE};
-(#define) : #define DEFAULT_SIZE 100;</pre>
+ <pre class="PROGRAMLISTING"> (enumeration) : enum Boolean {FALSE, TRUE};
+ (#define) : #define DEFAULT_SIZE 100;</pre>
</td>
</tr>
</table>
<p><span class="emphasis"><i class="EMPHASIS">Note:</i></span> We have a standard naming scheme for #defines
- that toggle a feature in the preprocessor: FEATURE_>, where > is a short (preferably 1 or 2 word)
+ that toggle a feature in the preprocessor: FEATURE_>, where > is a short (preferably 1 or 2 word)
description.</p>
<p><span class="emphasis"><i class="EMPHASIS">Example:</i></span></p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">#define FEATURE_FORCE 1
+ <pre class="PROGRAMLISTING"> #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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">#define USE_IMAGE_LIST 1</pre>
+ <pre class="PROGRAMLISTING"> #define USE_IMAGE_LIST 1</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<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>
+ <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>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">if (this == that)
-{
- ...
-}</pre>
+ <pre class="PROGRAMLISTING"> if (this == that)
+ {
+ ...
+ }</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<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;
+ <pre class="PROGRAMLISTING"> 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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">if (this == that)
-{
- do_something();
- do_something_else();
-}</pre>
+ <pre class="PROGRAMLISTING"> if (this == that)
+ {
+ do_something();
+ do_something_else();
+ }</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">structure->flag = (condition);</pre>
+ <pre class="PROGRAMLISTING"> structure->flag = (condition);</pre>
</td>
</tr>
</table>
<p><span class="emphasis"><i class="EMPHASIS">Instead of:</i></span></p>
- <p>if (condition) { structure->flag = 1; } else { structure->flag = 0; }</p>
+ <p>if (condition) { structure->flag = 1; } else { structure->flag = 0; }</p>
<p><span class="emphasis"><i class="EMPHASIS">Note:</i></span> The former is readable and concise. The later is
wordy and inefficient. Please assume that any developer new to the project has at least a "good" knowledge of
C/C++. (Hope I do not offend by that last comment ... 8-)</p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">int first_value = 0;
-int some_value = 0;
-int another_value = 0;
-int this_variable = 0;</pre>
+ <pre class="PROGRAMLISTING"> int first_value = 0;
+ int some_value = 0;
+ int another_value = 0;
+ int this_variable = 0;</pre>
</td>
</tr>
</table>
<div class="SECT3">
<h3 class="SECT3"><a name="S20" id="S20">4.4.5. Don't use white space around structure operators</a></h3>
<p><span class="emphasis"><i class="EMPHASIS">Explanation:</i></span></p>
- <p>- structure pointer operator ( "->" ) - member operator ( "." ) - functions and parentheses</p>
+ <p>- structure pointer operator ( "->" ) - member operator ( "." ) - functions and parentheses</p>
<p>It is a general coding practice to put pointers, references, and function parentheses next to names. With
spaces, the connection between the object and variable/function name is not as clear.</p>
<p><span class="emphasis"><i class="EMPHASIS">Example:</i></span></p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">a_struct->a_member;
-a_struct.a_member;
-function_name();</pre>
+ <pre class="PROGRAMLISTING"> a_struct->a_member;
+ a_struct.a_member;
+ function_name();</pre>
</td>
</tr>
</table>
- <p><span class="emphasis"><i class="EMPHASIS">Instead of:</i></span> a_struct -> a_member; a_struct .
+ <p><span class="emphasis"><i class="EMPHASIS">Instead of:</i></span> a_struct -> a_member; a_struct .
a_member; function_name ();</p>
</div>
<div class="SECT3">
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">int function1( ... )
-{
- ...code...
- return(ret_code);
+ <pre class="PROGRAMLISTING"> int function1( ... )
+ {
+ ...code...
+ return(ret_code);
-} /* -END- function1 */
+ } /* -END- function1 */
-int function2( ... )
-{
-} /* -END- function2 */</pre>
+ int function2( ... )
+ {
+ } /* -END- function2 */</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">static const char * const url_code_map[256] =
-{
- NULL, ...
-};
+ <pre class="PROGRAMLISTING"> 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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">short a_short = 0;
-float a_float = 0;
-struct *ptr = NULL;</pre>
+ <pre class="PROGRAMLISTING"> short a_short = 0;
+ float a_float = 0;
+ struct *ptr = NULL;</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">should_we_block_this();
-contains_an_image();
-is_web_page_blank();</pre>
+ <pre class="PROGRAMLISTING"> should_we_block_this();
+ contains_an_image();
+ is_web_page_blank();</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">for (size_t cnt = 0; cnt < block_list_length(); cnt++)
-{
- ....
-}</pre>
+ <pre class="PROGRAMLISTING"> for (size_t cnt = 0; cnt < block_list_length(); cnt++)
+ {
+ ....
+ }</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">size_t len = block_list_length();
+ <pre class="PROGRAMLISTING"> size_t len = block_list_length();
-for (size_t cnt = 0; cnt < len; cnt++)
-{
- ....
-}</pre>
+ for (size_t cnt = 0; cnt < len; cnt++)
+ {
+ ....
+ }</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">#include <iostream.h> /* This is not a local include */
-#include "config.h" /* This IS a local include */</pre>
+ <pre class="PROGRAMLISTING"> #include <iostream.h> /* This is not a local include */
+ #include "config.h" /* This IS a local include */</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">/* This is not a local include, but requires a path element. */
-#include <sys/fileName.h></pre>
+ <pre class="PROGRAMLISTING"> /* This is not a local include, but requires a path element. */
+ #include <sys/fileName.h></pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">#ifndef PROJECT_H_INCLUDED
-#define PROJECT_H_INCLUDED
- ...
-#endif /* ndef PROJECT_H_INCLUDED */</pre>
+ <pre class="PROGRAMLISTING"> #ifndef PROJECT_H_INCLUDED
+ #define PROJECT_H_INCLUDED
+ ...
+ #endif /* ndef PROJECT_H_INCLUDED */</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">#ifdef __cplusplus
-extern "C"
-{
-#endif /* def __cplusplus */
+ <pre class="PROGRAMLISTING"> #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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">/*********************************************************************
- * We're avoiding an include statement here!
- *********************************************************************/
-struct file_list;
-extern file_list *xyz;</pre>
+ <pre class="PROGRAMLISTING"> /*********************************************************************
+ * We're avoiding an include statement here!
+ *********************************************************************/
+ struct file_list;
+ extern file_list *xyz;</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">switch (hash_string(cmd))
-{
- case hash_actions_file:
- ... code ...
- break;
+ <pre class="PROGRAMLISTING"> 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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">long a = 0;
-long b = 0;
-long c = 0;</pre>
+ <pre class="PROGRAMLISTING"> long a = 0;
+ long b = 0;
+ long c = 0;</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<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>
+ <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>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">int load_re_filterfile(struct client_state *csp) { ... }
-static void unload_re_filterfile(void *f) { ... }</pre>
+ <pre class="PROGRAMLISTING"> int load_re_filterfile(struct client_state *csp) { ... }
+ static void unload_re_filterfile(void *f) { ... }</pre>
</td>
</tr>
</table>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">const char FILENAME_rcs[] = "$I<!-- Break CVS Substitution -->d$";
-/*********************************************************************
- *
- * File : $S<!-- Break CVS Substitution -->ource$
- *
- * 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
- *
- *********************************************************************/
+ <pre class="PROGRAMLISTING"> /*********************************************************************
+ *
+ * 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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">#ifndef _FILENAME_H
-#define _FILENAME_H
-#define FILENAME_H_VERSION "$I<!-- Break CVS Substitution -->d$"
-/*********************************************************************
- *
- * File : $S<!-- Break CVS Substitution -->ource$
- *
- * 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
- *
- *********************************************************************/
+ <pre class="PROGRAMLISTING"> #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>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<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 => Ok, everything else is an error.
- *
- *********************************************************************/
-int FUNCTION_NAME(void *param1, const char *x)
-{
- ...
- return 0;
+ <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 => Ok, everything else is an error.
+ *
+ *********************************************************************/
+ int FUNCTION_NAME(void *param1, const char *x)
+ {
+ ...
+ return 0;
-}</pre>
+ }</pre>
</td>
</tr>
</table>