]> git.pld-linux.org Git - packages/awesfx.git/blob - awesfx-etc_dir.patch
- release 3
[packages/awesfx.git] / awesfx-etc_dir.patch
1 diff -aurN awesfx-0.5.0.orig/awelib/optfile.c awesfx-0.5.0/awelib/optfile.c
2 --- awesfx-0.5.0.orig/awelib/optfile.c  2004-01-22 19:06:51.000000000 +0100
3 +++ awesfx-0.5.0/awelib/optfile.c       2004-02-06 19:08:05.631829376 +0100
4 @@ -29,6 +29,7 @@
5  
6  #define SYSTEM_RCFILE          "/etc/sfxloadrc"
7  #define RCFILE                 ".sfxloadrc"
8 +#define ETC_DIR_RCFILE         ".sfxloadrc"
9  
10  #define DEFAULT_ID     "default"
11  
12 @@ -50,6 +51,11 @@
13         OptionFile *rec;
14  
15         *rcfile = 0;
16 +       if ((p = getenv("HOME_ETC")) != NULL && *p) {
17 +               snprintf(rcfile, sizeof(rcfile), "%s/%s", p, ETC_DIR_RCFILE);
18 +               if (access(rcfile, R_OK) != 0)
19 +                       rcfile[0] = 0;
20 +       } else
21         if ((p = getenv("HOME")) != NULL && *p) {
22                 snprintf(rcfile, sizeof(rcfile), "%s/%s", p, RCFILE);
23                 if (access(rcfile, R_OK) != 0)
This page took 0.027195 seconds and 3 git commands to generate.