Moving all our URL and URL pattern parsing code to urlmatch.c.
[privoxy.git] / actions.c
index 13a6241..c9ec3fa 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1,4 +1,4 @@
-const char actions_rcs[] = "$Id: actions.c,v 1.18 2001/11/07 00:06:06 steudten Exp $";
+const char actions_rcs[] = "$Id: actions.c,v 1.20 2001/11/22 21:56:49 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/actions.c,v $
@@ -33,6 +33,15 @@ const char actions_rcs[] = "$Id: actions.c,v 1.18 2001/11/07 00:06:06 steudten E
  *
  * Revisions   :
  *    $Log: actions.c,v $
+ *    Revision 1.20  2001/11/22 21:56:49  jongfoster
+ *    Making action_spec->flags into an unsigned long rather than just an
+ *    unsigned int.
+ *    Fixing a bug in the display of -add-header and -wafer
+ *
+ *    Revision 1.19  2001/11/13 00:14:07  jongfoster
+ *    Fixing stupid bug now I've figured out what || means.
+ *    (It always returns 0 or 1, not one of it's paramaters.)
+ *
  *    Revision 1.18  2001/11/07 00:06:06  steudten
  *    Add line number in error output for lineparsing for
  *    actionsfile.
@@ -128,6 +137,7 @@ const char actions_rcs[] = "$Id: actions.c,v 1.18 2001/11/07 00:06:06 steudten E
 #ifdef FEATURE_CGI_EDIT_ACTIONS
 #include "encode.h"
 #endif /* def FEATURE_CGI_EDIT_ACTIONS */
+#include "urlmatch.h"
 
 const char actions_h_rcs[] = ACTIONS_H_VERSION;
 
@@ -146,7 +156,7 @@ const char actions_h_rcs[] = ACTIONS_H_VERSION;
 #define AV_ADD_STRING 1 /* +stropt{string} */
 #define AV_REM_STRING 2 /* -stropt */
 #define AV_ADD_MULTI  3 /* +multiopt{string} +multiopt{string2} */
-#define AV_REM_MULTI  4 /* -multiopt{string} -multiopt{*}       */
+#define AV_REM_MULTI  4 /* -multiopt{string} -multiopt          */
 
 /*
  * We need a structure to hold the name, flag changes,
@@ -691,7 +701,7 @@ char * actions_to_text(struct action_spec *action)
 #define DEFINE_ACTION_MULTI(__name, __index)         \
    if (action->multi_remove_all[__index])            \
    {                                                 \
-      string_append(&result, " -" __name "{*}");     \
+      string_append(&result, " -" __name);           \
    }                                                 \
    else                                              \
    {                                                 \
@@ -790,7 +800,7 @@ char * actions_to_html(struct action_spec *action)
 #define DEFINE_ACTION_MULTI(__name, __index)          \
    if (action->multi_remove_all[__index])             \
    {                                                  \
-      string_append(&result, "\n<br>-" __name "{*}"); \
+      string_append(&result, "\n<br>-" __name);       \
    }                                                  \
    else                                               \
    {                                                  \
@@ -871,7 +881,7 @@ char * actions_to_html(struct action_spec *action)
  *********************************************************************/
 char * current_action_to_text(struct current_action_spec *action)
 {
-   unsigned flags  = action->flags;
+   unsigned long flags  = action->flags;
    char * result = strdup("");
    struct list_entry * lst;
 
@@ -1087,7 +1097,7 @@ void unload_actions_file(void *file_data)
    while (cur != NULL)
    {
       next = cur->next;
-      free_url(cur->url);
+      free_url_spec(cur->url);
       free_action(cur->action);
       freez(cur);
       cur = next;