Making +no-cookie-keep -no-cookies the default. Comments on this
[privoxy.git] / actions.c
index ee1f6a5..4e74aaa 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1,4 +1,4 @@
-const char actions_rcs[] = "$Id: actions.c,v 1.17 2001/10/25 03:40:47 david__schmidt Exp $";
+const char actions_rcs[] = "$Id: actions.c,v 1.19 2001/11/13 00:14:07 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/actions.c,v $
@@ -33,6 +33,14 @@ const char actions_rcs[] = "$Id: actions.c,v 1.17 2001/10/25 03:40:47 david__sch
  *
  * Revisions   :
  *    $Log: actions.c,v $
+ *    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.
+ *
  *    Revision 1.17  2001/10/25 03:40:47  david__schmidt
  *    Change in porting tactics: OS/2's EMX porting layer doesn't allow multiple
  *    threads to call select() simultaneously.  So, it's time to do a real, live,
@@ -112,6 +120,7 @@ const char actions_rcs[] = "$Id: actions.c,v 1.17 2001/10/25 03:40:47 david__sch
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
+#include <stdlib.h>
 
 #include "project.h"
 #include "jcc.h"
@@ -141,7 +150,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,
@@ -251,7 +260,7 @@ jb_err merge_actions (struct action_spec *dest,
          /* No "remove all"s to worry about. */
          list_remove_list(dest->multi_add[i], src->multi_remove[i]);
          err = list_append_list_unique(dest->multi_remove[i], src->multi_remove[i]);
-         err = err || list_append_list_unique(dest->multi_add[i], src->multi_add[i]);
+         if (!err) err = list_append_list_unique(dest->multi_add[i], src->multi_add[i]);
       }
 
       if (err)
@@ -308,8 +317,12 @@ jb_err copy_action (struct action_spec *dest,
    for (i = 0; i < ACTION_MULTI_COUNT; i++)
    {
       dest->multi_remove_all[i] = src->multi_remove_all[i];
-      err =        list_duplicate(dest->multi_remove[i], src->multi_remove[i]);
-      err = err || list_duplicate(dest->multi_add[i],    src->multi_add[i]);
+      err = list_duplicate(dest->multi_remove[i], src->multi_remove[i]);
+      if (err)
+      {
+         return err;
+      }
+      err = list_duplicate(dest->multi_add[i],    src->multi_add[i]);
       if (err)
       {
          return err;
@@ -682,7 +695,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                                              \
    {                                                 \
@@ -781,7 +794,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                                               \
    {                                                  \
@@ -862,7 +875,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;