]> git.pld-linux.org Git - packages/bogofilter.git/blobdiff - bogofilter-home_etc.patch
- updated to 0.94.10
[packages/bogofilter.git] / bogofilter-home_etc.patch
index 78f1949908c85b3c47c706b01902701d70ed6b1f..2916027daff1312040a524234f07cfce9a39ef51 100644 (file)
@@ -1,24 +1,24 @@
-diff -Nru bogofilter-0.15.8.orig/src/configfile.c bogofilter-0.15.8/src/configfile.c
---- bogofilter-0.15.8.orig/src/configfile.c    2003-10-06 00:01:40.000000000 +0200
-+++ bogofilter-0.15.8/src/configfile.c 2003-11-12 18:12:59.000000000 +0100
-@@ -195,8 +195,14 @@
+diff -urN bogofilter-0.92.8.oryg/src/configfile.c bogofilter-0.92.8/src/configfile.c
+--- bogofilter-0.92.8.oryg/src/configfile.c    2004-08-22 17:52:28.000000000 +0200
++++ bogofilter-0.92.8/src/configfile.c 2004-10-24 18:20:00.925433952 +0200
+@@ -125,7 +125,14 @@
+     bool ok = true;
+     int lineno = 0;
      FILE *fp;
-     char *filename;
-     char *arg = NULL, *val = NULL;
-+    char *home_etc = getenv("HOME_ETC");              
++    char *home_etc = getenv("HOME_ETC");
  
--    filename = tildeexpand(fname, tilde_expand);
 +    if (home_etc && fname[0] == '~') {
-+      char buffer[1024];
-+      
-+      snprintf(buffer, 1024, "%s%s", home_etc, fname + 1);
-+      filename = xstrdup(buffer);
-+    } else filename = tildeexpand(fname, tilde_expand);
-     fp = fopen(filename, "r");
---- bogofilter-0.15.8.orig/src/paths.c 2003-09-30 00:31:20.000000000 +0200
-+++ bogofilter-0.15.8/src/paths.c      2003-11-12 18:27:10.000000000 +0100
++      char buffer[1024];
++      snprintf(buffer, 1024, "%s%s", home_etc, fname+1);
++      config_file_name=xstrdup(buffer);
++    } else
++    
+     if (config_file_name != NULL)
+       xfree(config_file_name);
+     config_file_name = tildeexpand(fname, tilde_expand);
+diff -urN bogofilter-0.92.8.oryg/src/paths.c bogofilter-0.92.8/src/paths.c
+--- bogofilter-0.92.8.oryg/src/paths.c 2004-05-18 02:22:52.000000000 +0200
++++ bogofilter-0.92.8/src/paths.c      2004-10-24 18:22:51.345526160 +0200
 @@ -29,7 +29,7 @@
  #ifndef __riscos__
      { PR_ENV_BOGO, "BOGOFILTER_DIR", NULL },
@@ -28,11 +28,11 @@ diff -Nru bogofilter-0.15.8.orig/src/configfile.c bogofilter-0.15.8/src/configfi
  #else
      { PR_ENV_HOME, "Choices$Write",  BOGODIR },
      { PR_ENV_HOME, "Bogofilter$Dir", NULL },
-@@ -91,6 +91,7 @@
+@@ -104,6 +104,7 @@
      size_t path_size, env_size;
  
      env = getenv(var);
-+    if (env == NULL && strcmp(var, "HOME_ETC") == 0) env = getenv("HOME"); 
-     if (env == NULL || strlen(env) == 0) return NULL;
++    if (env == NULL && strcmp(var, "HOME_ETC") == 0) env = getenv("HOME");
+     if (env == NULL || *env == '\0') return NULL;
  
      env_size = strlen(env);
This page took 0.052249 seconds and 4 git commands to generate.