Cosmetic: Renamed cryptic variable
authoroes <oes@users.sourceforge.net>
Tue, 11 Mar 2003 11:53:59 +0000 (11:53 +0000)
committeroes <oes@users.sourceforge.net>
Tue, 11 Mar 2003 11:53:59 +0000 (11:53 +0000)
cgi.c
cgiedit.c
loadcfg.c
loadcfg.h
w32log.c

diff --git a/cgi.c b/cgi.c
index 77ed1db..803d98a 100644 (file)
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-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 $
@@ -38,6 +38,9 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.70.2.3 2002/11/28 18:14:32 oes Exp $";
  *
  * 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
@@ -434,7 +437,7 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.70.2.3 2002/11/28 18:14:32 oes Exp $";
 #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"
@@ -2043,7 +2046,7 @@ struct map *default_exports(const struct client_state *csp, const char *caller)
    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);
index 2793ca8..0477211 100644 (file)
--- a/cgiedit.c
+++ b/cgiedit.c
@@ -1,4 +1,4 @@
-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 $
@@ -42,6 +42,9 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.41.2.2 2002/08/05 20:02:59 oes Ex
  *
  * 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
  *
@@ -292,7 +295,7 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.41.2.2 2002/08/05 20:02:59 oes Ex
 #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;
@@ -4378,17 +4381,17 @@ jb_err cgi_toggle(struct client_state *csp,
    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")))
index 54ea6d6..48d1a25 100644 (file)
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-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 $
@@ -35,6 +35,9 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.48.2.1 2002/08/21 17:58:05 oes Ex
  *
  * 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)
  *
@@ -372,8 +375,8 @@ const char loadcfg_h_rcs[] = LOADCFG_H_VERSION;
 #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 */
@@ -575,7 +578,7 @@ struct configuration_spec * load_config(void)
    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));
@@ -1199,7 +1202,7 @@ struct configuration_spec * load_config(void)
  * *************************************************************************/
 #ifdef FEATURE_TOGGLE
          case hash_toggle :
-            g_bToggleIJB = atoi(arg);
+            global_toggle_state = atoi(arg);
             continue;
 #endif /* def FEATURE_TOGGLE */
 
index 3e71b75..e652da5 100644 (file)
--- a/loadcfg.h
+++ b/loadcfg.h
@@ -1,9 +1,9 @@
 #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 
@@ -37,6 +37,9 @@
  *
  * 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
  *
@@ -149,8 +152,8 @@ struct configuration_spec;
 /* 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;
index e69d2a1..c06f78e 100644 (file)
--- a/w32log.c
+++ b/w32log.c
@@ -1,4 +1,4 @@
-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 $
@@ -32,6 +32,9 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.2 2002/09/25 15:23:10 oes Exp
  *
  * 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
  *
@@ -1105,8 +1108,8 @@ void OnLogCommand(int nCommand)
 #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.");
          }
@@ -1197,7 +1200,7 @@ void OnLogInitMenu(HMENU hmenu)
    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));