]> git.pld-linux.org Git - packages/awesfx.git/blame - awesfx-etc_dir.patch
- release 3
[packages/awesfx.git] / awesfx-etc_dir.patch
CommitLineData
c676546a 1diff -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
f90514cd 6 #define SYSTEM_RCFILE "/etc/sfxloadrc"
7 #define RCFILE ".sfxloadrc"
506bff59 8+#define ETC_DIR_RCFILE ".sfxloadrc"
f90514cd 9
c676546a 10 #define DEFAULT_ID "default"
11
12@@ -50,6 +51,11 @@
f90514cd 13 OptionFile *rec;
14
15 *rcfile = 0;
506bff59 16+ if ((p = getenv("HOME_ETC")) != NULL && *p) {
c676546a 17+ snprintf(rcfile, sizeof(rcfile), "%s/%s", p, ETC_DIR_RCFILE);
f90514cd 18+ if (access(rcfile, R_OK) != 0)
19+ rcfile[0] = 0;
20+ } else
21 if ((p = getenv("HOME")) != NULL && *p) {
c676546a 22 snprintf(rcfile, sizeof(rcfile), "%s/%s", p, RCFILE);
f90514cd 23 if (access(rcfile, R_OK) != 0)
This page took 0.096538 seconds and 4 git commands to generate.