Add #117: Dynamic variables are documented poorly.
[privoxy.git] / project.h
index efcb456..1f6e7d4 100644 (file)
--- a/project.h
+++ b/project.h
@@ -1,7 +1,7 @@
 #ifndef PROJECT_H_INCLUDED
 #define PROJECT_H_INCLUDED
 /** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.198 2013/11/24 14:22:51 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.202 2013/11/24 14:26:27 fabiankeil Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/project.h,v $
@@ -137,16 +137,19 @@ typedef int jb_socket;
  * A standard error code.  This should be JB_ERR_OK or one of the JB_ERR_xxx
  * series of errors.
  */
-typedef int jb_err;
+enum privoxy_err
+{
+   JB_ERR_OK         = 0, /**< Success, no error                        */
+   JB_ERR_MEMORY     = 1, /**< Out of memory                            */
+   JB_ERR_CGI_PARAMS = 2, /**< Missing or corrupt CGI parameters        */
+   JB_ERR_FILE       = 3, /**< Error opening, reading or writing a file */
+   JB_ERR_PARSE      = 4, /**< Error parsing file                       */
+   JB_ERR_MODIFIED   = 5, /**< File has been modified outside of the
+                               CGI actions editor.                      */
+   JB_ERR_COMPRESS   = 6  /**< Error on decompression                   */
+};
 
-#define JB_ERR_OK         0 /**< Success, no error                        */
-#define JB_ERR_MEMORY     1 /**< Out of memory                            */
-#define JB_ERR_CGI_PARAMS 2 /**< Missing or corrupt CGI parameters        */
-#define JB_ERR_FILE       3 /**< Error opening, reading or writing a file */
-#define JB_ERR_PARSE      4 /**< Error parsing file                       */
-#define JB_ERR_MODIFIED   5 /**< File has been modified outside of the
-                                 CGI actions editor.                      */
-#define JB_ERR_COMPRESS   6 /**< Error on decompression                   */
+typedef enum privoxy_err jb_err;
 
 /**
  * This macro is used to free a pointer that may be NULL.
@@ -196,14 +199,6 @@ typedef int jb_err;
  */
 #define HOSTENT_BUFFER_SIZE 2048
 
-/**
- * Do not use.  Originally this was so that you can
- * say "while (FOREVER) { ...do something... }".
- * However, this gives a warning with some compilers (e.g. VC++).
- * Instead, use "for (;;) { ...do something... }".
- */
-#define FOREVER 1
-
 /**
  * Default TCP/IP address to listen on, as a string.
  * Set to "127.0.0.1:8118".
@@ -393,6 +388,17 @@ struct pattern_spec
  */
 #define ANCHOR_RIGHT 2
 
+/** Pattern spec bitmap: It's an URL pattern. */
+#define PATTERN_SPEC_URL_PATTERN          0x00000001UL
+
+/** Pattern spec bitmap: It's a TAG pattern. */
+#define PATTERN_SPEC_TAG_PATTERN          0x00000002UL
+
+/** Pattern spec bitmap: It's a NO-REQUEST-TAG pattern. */
+#define PATTERN_SPEC_NO_REQUEST_TAG_PATTERN 0x00000004UL
+
+/** Pattern spec bitmap: It's a NO-RESPONSE-TAG pattern. */
+#define PATTERN_SPEC_NO_RESPONSE_TAG_PATTERN 0x00000008UL
 
 /**
  * An I/O buffer.  Holds a string which can be appended to, and can have data
@@ -597,7 +603,7 @@ struct action_spec
    unsigned long add;  /**< Actions to add.  A bit set to "1" means add action.    */
 
    /**
-    * Paramaters for those actions that require them.
+    * Parameters for those actions that require them.
     * Each entry is valid if & only if the corresponding entry in "flags" is
     * set.
     */