+ * Revision 1.62 2008/08/31 15:59:02 fabiankeil
+ * There's no reason to let remote toggling support depend
+ * on FEATURE_CGI_EDIT_ACTIONS, so make sure it doesn't.
+ *
+ * Revision 1.61 2008/03/24 18:12:52 fabiankeil
+ * Use sizeof() more often.
+ *
+ * Revision 1.60 2008/03/15 14:52:35 fabiankeil
+ * Add CGI editor support for the "disable all filters of this type"
+ * directives "-client-header-filter", "-server-header-filter",
+ * "-client-header-tagger" and "-server-header-tagger".
+ *
+ * Revision 1.59 2008/03/08 16:25:56 fabiankeil
+ * After three file modification time mismatches, turn the CGI editor off.
+ *
+ * Revision 1.58 2007/11/28 17:57:01 fabiankeil
+ * Fix double free in cgi_edit_actions_list().
+ * Reported by adlab in BR#1840145.
+ *
+ * Revision 1.57 2007/10/27 13:32:23 fabiankeil
+ * Plug minor 5-year-old memory leak. Spotted by
+ * Valgrind and triggered by Privoxy-Regression-Test.
+ *
+ * Revision 1.56 2007/08/05 13:47:03 fabiankeil
+ * #1763173 from Stefan Huehner: s@const static@static const@.
+ *
+ * Revision 1.55 2007/05/31 11:50:20 fabiankeil
+ * Re-enable support for old-school URLs like
+ * http://config.privoxy.org/edit-actions-list?f=default
+ * in the action editor.
+ *
+ * They are no longer used by the CGI pages, but make it easier
+ * to reach the editor directly, without knowing the requested
+ * file's index in csp->config->actions_file[].
+ *
+ * Revision 1.54 2007/05/14 10:33:51 fabiankeil
+ * - Use strlcpy() and strlcat() instead of strcpy() and strcat().
+ *
+ * Revision 1.53 2007/04/15 16:39:20 fabiankeil
+ * Introduce tags as alternative way to specify which
+ * actions apply to a request. At the moment tags can be
+ * created based on client and server headers.
+ *
+ * Revision 1.52 2007/04/12 10:41:23 fabiankeil
+ * - Don't mistake VC++'s _snprintf() for a snprintf() replacement.
+ * - Move some cgi_edit_actions_for_url() variables into structs.
+ * - Remove bogus comment.
+ *
+ * Revision 1.51 2007/04/08 13:21:05 fabiankeil
+ * Reference action files in CGI URLs by id instead
+ * of using the first part of the file name.
+ * Fixes BR 1694250 and BR 1590556.
+ *
+ * Revision 1.50 2007/03/29 11:40:34 fabiankeil
+ * Divide @filter-params@ into @client-header-filter-params@
+ * @content-filter-params@ and @server-header-filter-params@.
+ *
+ * Revision 1.49 2007/03/20 15:16:34 fabiankeil
+ * Use dedicated header filter actions instead of abusing "filter".
+ * Replace "filter-client-headers" and "filter-client-headers"
+ * with "server-header-filter" and "client-header-filter".
+ *
+ * Revision 1.48 2007/02/13 14:35:25 fabiankeil
+ * Replace hash escaping code to prevent
+ * crashes, memory and file corruption.
+ *
+ * Revision 1.47 2006/12/28 18:04:25 fabiankeil
+ * Fixed gcc43 conversion warnings.
+ *
+ * Revision 1.46 2006/12/27 18:44:52 fabiankeil
+ * Stop shadowing string.h's index().
+ *
+ * Revision 1.45 2006/12/21 12:57:48 fabiankeil
+ * Add config option "split-large-forms"
+ * to work around the browser bug reported
+ * in BR #1570678.
+ *
+ * Revision 1.44 2006/12/09 13:49:16 fabiankeil
+ * Fix configure option --disable-toggle.
+ * Thanks to Peter Thoenen for reporting this.
+ *
+ * Revision 1.43 2006/07/18 14:48:45 david__schmidt
+ * Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
+ * with what was really the latest development (the v_3_0_branch branch)
+ *
+ * Revision 1.41.2.12 2006/01/30 15:16:25 david__schmidt
+ * Remove a little residual debugging info
+ *
+ * Revision 1.41.2.11 2006/01/29 23:10:56 david__schmidt
+ * Multiple filter file support
+ *
+ * Revision 1.41.2.10 2005/07/04 03:13:43 david__schmidt
+ * Undo some damaging memory leak patches
+ *
+ * Revision 1.41.2.9 2005/07/04 00:31:04 david__schmidt
+ * Removing a double free
+ *
+ * Revision 1.41.2.8 2005/05/07 21:50:54 david__schmidt
+ * A few memory leaks plugged (mostly on error paths)
+ *
+ * Revision 1.41.2.7 2004/02/17 13:30:23 oes
+ * Moved cgi_error_disabled() from cgiedit.c to
+ * cgi.c to re-enable build with --disable-editor.
+ * Fixes Bug #892744. Thanks to Matthew Fischer
+ * for spotting.
+ *
+ * Revision 1.41.2.6 2003/12/18 08:13:48 oes
+ * One line lost in last commit
+ *
+ * Revision 1.41.2.5 2003/12/17 16:33:47 oes
+ * - All edit functions that redirect back to the list page
+ * now use cgi_redirect
+ * - All redirects now contain useless parameter "foo", whose
+ * value are raw seconds since epoch, in order to force
+ * Opera and Konqueror to properly reload the list. Closes
+ * bug #859993
+ *
+ * Revision 1.41.2.4 2003/03/11 11:53:59 oes
+ * Cosmetic: Renamed cryptic variable
+ *
+ * Revision 1.41.2.3 2002/11/12 15:01:41 oes
+ * Fix: Don't free uninitialized struct editable_file
+ *
+ * Revision 1.41.2.2 2002/08/05 20:02:59 oes
+ * Bugfix: "Insert new section at top" did not work properly if first non-comment line in file was of type FILE_LINE_ACTION
+ *
+ * Revision 1.41.2.1 2002/08/02 12:43:14 oes
+ * Fixed bug #588514: first_time now set on a per-string basis in actions_from_radio; javascriptify now called on copies
+ *
+ * Revision 1.41 2002/05/21 19:09:45 oes
+ * - Made Add/Edit/Remove URL Submit and Cancel
+ * buttons jump back to relevant section in eal
+ * - Bugfix: remove-url-form needs p export
+ *
+ * Revision 1.40 2002/05/19 11:34:35 jongfoster
+ * Handling read-only actions files better - report the actual
+ * error, not "Out of memory"!
+ *
+ * Bug report:
+ * http://sourceforge.net/tracker/index.php?func=detail
+ * &aid=557905&group_id=11118&atid=111118
+ *
+ * Revision 1.39 2002/05/12 21:39:15 jongfoster
+ * - Adding Doxygen-style comments to structures and #defines.
+ * - Correcting function comments
+ *
+ * Revision 1.38 2002/05/03 23:00:38 jongfoster
+ * Support for templates for "standard actions" buttons.
+ * See bug #549871
+ *
+ * Revision 1.37 2002/04/30 11:14:52 oes
+ * Made csp the first parameter in *action_to_html
+ *
+ * Revision 1.36 2002/04/26 21:53:30 jongfoster
+ * Fixing a memory leak. (Near, but not caused by, my earlier commit).
+ *
+ * Revision 1.35 2002/04/26 21:50:02 jongfoster
+ * Honouring default exports in edit-actions-for-url-filter template.
+ *
+ * Revision 1.34 2002/04/26 12:54:17 oes
+ * Adaptions to changes in actions.c
+ *
+ * Revision 1.33 2002/04/24 02:17:47 oes
+ * - Moved get_char_param, get_string_param and get_number_param to cgi.c
+ * - Comments
+ * - Activated Jon's code for editing multiple AFs
+ * - cgi_edit_list_actions now provides context-sensitive
+ * help, looks up all action sets from standard.action and
+ * makes buttons for them in the catchall section
+ * - cgi_edit_action_submit now honors a p parameter, looks up
+ * the corresponding action set, and sets the catchall pattern's
+ * actions accordingly.
+ *