-diff -burN bogofilter-0.16.4.orig/src/configfile.c bogofilter-0.16.4/src/configfile.c
---- bogofilter-0.16.4.orig/src/configfile.c 2004-02-05 18:40:11.899160504 +0100
-+++ bogofilter-0.16.4/src/configfile.c 2004-02-05 18:50:35.250396712 +0100
-@@ -213,7 +213,13 @@
+diff -urN bogofilter-0.96.4.orig/src/configfile.c bogofilter-0.96.4/src/configfile.c
+--- bogofilter-0.96.4.orig/src/configfile.c 2005-10-15 23:03:11.000000000 +0200
++++ bogofilter-0.96.4/src/configfile.c 2005-11-03 16:26:38.844514992 +0100
+@@ -148,7 +148,13 @@
+ bool ok = true;
int lineno = 0;
FILE *fp;
- char *filename;
+-
+ char *home_etc = getenv("HOME_ETC");
-
+ if (home_etc && fname[0] == '~') {
-+ char buffer[1024];
-+ snprintf(buffer, 1024, "%s%s", home_etc, fname+1);
-+ filename=xstrdup(buffer);
++ char buffer[1024];
++ snprintf(buffer, 1024, "%s%s", home_etc, fname+1);
++ config_file_name=xstrdup(buffer);
+ } else
- filename = tildeexpand(fname, tilde_expand);
++
+ if (config_file_name != NULL)
+ xfree(config_file_name);
- fp = fopen(filename, "r");
-diff -burN bogofilter-0.16.4.orig/src/paths.c bogofilter-0.16.4/src/paths.c
---- bogofilter-0.16.4.orig/src/paths.c 2004-02-05 18:40:11.966150320 +0100
-+++ bogofilter-0.16.4/src/paths.c 2004-02-05 18:58:56.031266448 +0100
+diff -urN bogofilter-0.96.4.orig/src/paths.c bogofilter-0.96.4/src/paths.c
+--- bogofilter-0.96.4.orig/src/paths.c 2005-08-15 01:03:42.000000000 +0200
++++ bogofilter-0.96.4/src/paths.c 2005-11-03 16:28:51.672322096 +0100
@@ -29,7 +29,7 @@
#ifndef __riscos__
{ PR_ENV_BOGO, "BOGOFILTER_DIR", NULL },
#else
{ PR_ENV_HOME, "Choices$Write", BOGODIR },
{ PR_ENV_HOME, "Bogofilter$Dir", NULL },
-@@ -94,6 +94,7 @@
+@@ -274,6 +274,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 || *env == '\0') return NULL;
env_size = strlen(env);