-const char cgi_rcs[] = "$Id: cgi.c,v 1.70.2.3 2002/11/28 18:14:32 oes Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.70.2.4 2003/03/07 03:41:03 david__schmidt Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/Attic/cgi.c,v $
*
* Revisions :
* $Log: cgi.c,v $
+ * Revision 1.70.2.4 2003/03/07 03:41:03 david__schmidt
+ * Wrapping all *_r functions (the non-_r versions of them) with mutex semaphores for OSX. Hopefully this will take care of all of those pesky crash reports.
+ *
* Revision 1.70.2.3 2002/11/28 18:14:32 oes
* Disable access to critical CGIs via untrusted referrers.
* This prevents users from being tricked by malicious websites
#include "cgiedit.h"
#endif /* def FEATURE_CGI_EDIT_ACTIONS */
#include "loadcfg.h"
-/* loadcfg.h is for g_bToggleIJB only */
+/* loadcfg.h is for global_toggle_state only */
#ifdef FEATURE_PTHREAD
#include <pthread.h>
#include "jcc.h"
if (!err) err = map(exports, "user-manual", 1, csp->config->usermanual ,1);
if (!err) err = map(exports, "actions-help-prefix", 1, ACTIONS_HELP_PREFIX ,1);
#ifdef FEATURE_TOGGLE
- if (!err) err = map_conditional(exports, "enabled-display", g_bToggleIJB);
+ if (!err) err = map_conditional(exports, "enabled-display", global_toggle_state);
#endif
snprintf(buf, 20, "%d", csp->config->hport);
-const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.41.2.2 2002/08/05 20:02:59 oes Exp $";
+const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.41.2.3 2002/11/12 15:01:41 oes Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/Attic/cgiedit.c,v $
*
* Revisions :
* $Log: cgiedit.c,v $
+ * 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
*
#include "errlog.h"
#include "loaders.h"
#include "loadcfg.h"
-/* loadcfg.h is for g_bToggleIJB only */
+/* loadcfg.h is for global_toggle_state only */
#include "urlmatch.h"
const char cgiedit_h_rcs[] = CGIEDIT_H_VERSION;
if (mode == 'E')
{
/* Enable */
- g_bToggleIJB = 1;
+ global_toggle_state = 1;
}
else if (mode == 'D')
{
/* Disable */
- g_bToggleIJB = 0;
+ global_toggle_state = 0;
}
else if (mode == 'T')
{
/* Toggle */
- g_bToggleIJB = !g_bToggleIJB;
+ global_toggle_state = !global_toggle_state;
}
if (NULL == (exports = default_exports(csp, "toggle")))
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.48.2.1 2002/08/21 17:58:05 oes Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.48.2.2 2002/11/12 16:28:20 oes Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/Attic/loadcfg.c,v $
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.48.2.2 2002/11/12 16:28:20 oes
+ * Move unrelated variable declaration out of #ifdef FEATURE_ACL; fixes bug #636655
+ *
* Revision 1.48.2.1 2002/08/21 17:58:05 oes
* Temp kludge to let user and default action file be edited through win32 GUI (FR 592080)
*
#define ijb_tolower(__X) tolower((int)(unsigned char)(__X))
#ifdef FEATURE_TOGGLE
-/* by haroon - indicates if ijb is enabled */
-int g_bToggleIJB = 1; /* Privoxy is enabled by default. */
+/* Privoxy is enabled by default. */
+int global_toggle_state = 1;
#endif /* def FEATURE_TOGGLE */
/* The filename of the configfile */
log_error(LOG_LEVEL_INFO, "loading configuration file '%s':", configfile);
#ifdef FEATURE_TOGGLE
- g_bToggleIJB = 1;
+ global_toggle_state = 1;
#endif /* def FEATURE_TOGGLE */
fs->f = config = (struct configuration_spec *)zalloc(sizeof(*config));
* *************************************************************************/
#ifdef FEATURE_TOGGLE
case hash_toggle :
- g_bToggleIJB = atoi(arg);
+ global_toggle_state = atoi(arg);
continue;
#endif /* def FEATURE_TOGGLE */
#ifndef LOADCFG_H_INCLUDED
#define LOADCFG_H_INCLUDED
-#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.10 2002/03/24 13:25:43 swa Exp $"
+#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.11 2002/03/26 22:29:55 swa Exp $"
/*********************************************************************
*
- * File : $Source: /cvsroot/ijbswa/current/loadcfg.h,v $
+ * File : $Source: /cvsroot/ijbswa/current/Attic/loadcfg.h,v $
*
* Purpose : Loads settings from the configuration file into
* global variables. This file contains both the
*
* Revisions :
* $Log: loadcfg.h,v $
+ * Revision 1.11 2002/03/26 22:29:55 swa
+ * we have a new homepage!
+ *
* Revision 1.10 2002/03/24 13:25:43 swa
* name change related issues
*
/* Global variables */
#ifdef FEATURE_TOGGLE
-/* indicates if ijb is enabled */
-extern int g_bToggleIJB;
+/* Privoxy's toggle state */
+extern int global_toggle_state;
#endif /* def FEATURE_TOGGLE */
extern const char *configfile;
-const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.2 2002/09/25 15:23:10 oes Exp $";
+const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.3 2002/11/20 14:39:05 oes Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/Attic/w32log.c,v $
*
* Revisions :
* $Log: w32log.c,v $
+ * Revision 1.25.2.3 2002/11/20 14:39:05 oes
+ * Fixed compiler warning
+ *
* Revision 1.25.2.2 2002/09/25 15:23:10 oes
* Uncheck the "Show Privoxy Window" taskbar menu item when window gets minimized. Fixes bug #606804
*
#ifdef FEATURE_TOGGLE
/* by haroon - change toggle to its opposite value */
case ID_TOGGLE_ENABLED:
- g_bToggleIJB = !g_bToggleIJB;
- if (g_bToggleIJB)
+ global_toggle_state = !global_toggle_state;
+ if (global_toggle_state)
{
log_error(LOG_LEVEL_INFO, "Now toggled ON.");
}
CheckMenuItem(hmenu, ID_VIEW_ACTIVITYANIMATION, MF_BYCOMMAND | (g_bShowActivityAnimation ? MF_CHECKED : MF_UNCHECKED));
#ifdef FEATURE_TOGGLE
/* by haroon - menu item for Enable toggle on/off */
- CheckMenuItem(hmenu, ID_TOGGLE_ENABLED, MF_BYCOMMAND | (g_bToggleIJB ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(hmenu, ID_TOGGLE_ENABLED, MF_BYCOMMAND | (global_toggle_state ? MF_CHECKED : MF_UNCHECKED));
#endif /* def FEATURE_TOGGLE */
CheckMenuItem(hmenu, ID_TOGGLE_SHOWWINDOW, MF_BYCOMMAND | (g_bShowLogWindow ? MF_CHECKED : MF_UNCHECKED));