]> git.pld-linux.org Git - packages/aewm.git/blob - aewm-etc_dir.patch
- może wrescie ktoś wykasuje to konto ?
[packages/aewm.git] / aewm-etc_dir.patch
1 diff -Nru aewm-1.2.2/clients/lib/launch.c aewm-1.2.2.new/clients/lib/launch.c
2 --- aewm-1.2.2/clients/lib/launch.c     Sat Nov 23 23:41:14 2002
3 +++ aewm-1.2.2.new/clients/lib/launch.c Sat Mar 22 18:11:25 2003
4 @@ -69,9 +69,13 @@
5  {
6      char defrc_buf[BUF_SIZE];
7      FILE *rc;
8 -
9 +    char *etc_dir = getenv("ETC_DIR");
10 +    
11      if (rcfile && (rc = fopen(rcfile, "r"))) goto opened;
12 -    snprintf(defrc_buf, sizeof defrc_buf, "%s/.aewm/clientsrc", getenv("HOME"));
13 +    if (etc_dir)
14 +        snprintf(defrc_buf, sizeof defrc_buf, "%s/aewm/clientsrc", etc_dir);
15 +    else
16 +        snprintf(defrc_buf, sizeof defrc_buf, "%s/.aewm/clientsrc", getenv("HOME"));
17      if ((rc = fopen(defrc_buf, "r"))) goto opened;
18      if ((rc = fopen(DEF_RC, "r"))) goto opened;
19  
20 diff -Nru aewm-1.2.2/init.c aewm-1.2.2.new/init.c
21 --- aewm-1.2.2/init.c   Sun Nov 24 00:02:51 2002
22 +++ aewm-1.2.2.new/init.c       Sat Mar 22 18:09:32 2003
23 @@ -277,9 +277,13 @@
24  {
25      char defrc_buf[BUF_SIZE];
26      FILE *rc;
27 +       char *etc_dir = getenv("ETC_DIR");
28  
29      if (rcfile && (rc = fopen(rcfile, "r"))) goto opened;
30 -    snprintf(defrc_buf, sizeof defrc_buf, "%s/.aewm/aewmrc", getenv("HOME"));
31 +    if (etc_dir)
32 +        snprintf(defrc_buf, sizeof defrc_buf, "%s/aewm/aewmrc", etc_dir);
33 +    else
34 +        snprintf(defrc_buf, sizeof defrc_buf, "%s/.aewm/aewmrc", getenv("HOME"));
35      if ((rc = fopen(defrc_buf, "r"))) goto opened;
36      if ((rc = fopen(DEF_RC, "r"))) goto opened;
37  
This page took 0.071599 seconds and 3 git commands to generate.