Made actions_to_html independent of FEATURE_CGI_EDIT_ACTIONS
[privoxy.git] / actions.c
index b8c3845..aa1d026 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1,4 +1,4 @@
-const char actions_rcs[] = "$Id: actions.c,v 1.28 2002/04/26 12:53:15 oes Exp $";
+const char actions_rcs[] = "$Id: actions.c,v 1.30 2002/04/30 11:14:52 oes Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/actions.c,v $
@@ -33,6 +33,17 @@ const char actions_rcs[] = "$Id: actions.c,v 1.28 2002/04/26 12:53:15 oes Exp $"
  *
  * Revisions   :
  *    $Log: actions.c,v $
+ *    Revision 1.30  2002/04/30 11:14:52  oes
+ *    Made csp the first parameter in *action_to_html
+ *
+ *    Revision 1.29  2002/04/26 19:30:54  jongfoster
+ *    - current_action_to_html(): Adding help link for the "-" form of
+ *      one-string actions.
+ *    - Some actions had "<br>-", some "<br> -" (note the space).
+ *      Standardizing on no space.
+ *    - Greatly simplifying some of the code by using string_join()
+ *      where appropriate.
+ *
  *    Revision 1.28  2002/04/26 12:53:15  oes
  *     - CGI AF editor now writes action lines split into
  *       single lines with line continuation
@@ -174,9 +185,7 @@ const char actions_rcs[] = "$Id: actions.c,v 1.28 2002/04/26 12:53:15 oes Exp $"
 #include "miscutil.h"
 #include "errlog.h"
 #include "loaders.h"
-#ifdef FEATURE_CGI_EDIT_ACTIONS
 #include "encode.h"
-#endif /* def FEATURE_CGI_EDIT_ACTIONS */
 #include "urlmatch.h"
 #include "cgi.h"
 
@@ -1452,7 +1461,6 @@ char * actions_to_text(struct action_spec *action)
 }
 
 
-#ifdef FEATURE_CGI_EDIT_ACTIONS
 /*********************************************************************
  *
  * Function    :  actions_to_html
@@ -1463,15 +1471,15 @@ char * actions_to_text(struct action_spec *action)
  *                the user manual.
  *
  * Parameters  :
- *          1  :  mask = As from struct url_actions
- *          2  :  add  = As from struct url_actions
+ *          1  :  csp    = Client state (for config)
+ *          2  :  action = Action spec to be converted
  *
  * Returns     :  A string.  Caller must free it.
  *                NULL on out-of-memory error.
  *
  *********************************************************************/
-char * actions_to_html(struct action_spec *action,
-                       struct client_state *csp)
+char * actions_to_html(struct client_state *csp,
+                       struct action_spec *action)
 {
    unsigned mask = action->mask;
    unsigned add  = action->add;
@@ -1558,7 +1566,6 @@ char * actions_to_html(struct action_spec *action,
 
    return result;
 }
-#endif /* def FEATURE_CGI_EDIT_ACTIONS */
 
 
 /*********************************************************************
@@ -1570,14 +1577,15 @@ char * actions_to_html(struct action_spec *action,
  *                the user manual.
  *
  * Parameters  :
- *          1  :  action = Action
+ *          1  :  csp    = Client state (for config) 
+ *          2  :  action = Current action spec to be converted
  *
  * Returns     :  A string.  Caller must free it.
  *                NULL on out-of-memory error.
  *
  *********************************************************************/
-char *current_action_to_html(struct current_action_spec *action,
-                             struct client_state *csp)
+char *current_action_to_html(struct client_state *csp,
+                             struct current_action_spec *action)
 {
    unsigned long flags  = action->flags;
    char * result = strdup("");