1 diff -burN abook-0.5.4.orig/abook.c abook-0.5.4/abook.c
2 --- abook-0.5.4.orig/abook.c 2005-09-05 09:05:10.903458032 +0200
3 +++ abook-0.5.4/abook.c 2005-09-05 09:17:13.733571152 +0200
10 assert(!is_ui_initialized());
12 if(alternative_datafile)
15 - dir = strconcat(getenv("HOME"), "/" DIR_IN_HOME, NULL);
16 + home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
17 + dir = strconcat(home, "/" DIR_IN_HOME, NULL);
20 if(stat(dir, &s) == -1) {
27 if( (stat(getenv("HOME"), &s)) == -1 || ! S_ISDIR(s.st_mode) ) {
28 fprintf(stderr,_("%s is not a valid HOME directory\n"), getenv("HOME") );
32 + home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
35 - datafile = strconcat(getenv("HOME"), "/" DIR_IN_HOME "/"
36 + datafile = strconcat(home, "/" DIR_IN_HOME "/"
40 - rcfile = strconcat(getenv("HOME"), "/" DIR_IN_HOME "/"
41 + rcfile = strconcat(home, "/" DIR_IN_HOME "/"
44 atexit(free_filenames);