]> git.pld-linux.org Git - packages/AfterStep-APPS.git/blob - AfterStep-APPS-home_etc.patch
- dropped pre-cvs changelog
[packages/AfterStep-APPS.git] / AfterStep-APPS-home_etc.patch
1 diff -Nru AfterStep-APPS-991125.orig/asDrinks-1.9.4/asDrinks.pl AfterStep-APPS-991125/asDrinks-1.9.4/asDrinks.pl
2 --- AfterStep-APPS-991125.orig/asDrinks-1.9.4/asDrinks.pl       Fri Oct 22 17:27:15 1999
3 +++ AfterStep-APPS-991125/asDrinks-1.9.4/asDrinks.pl    Mon Sep 29 21:47:05 2003
4 @@ -6,13 +6,18 @@
5  # These are the only two variables that might (read: shouldnt) need to be configured
6  # IN the script.  The rest of the configuration should be done in your ~/.asDrinksrc
7  
8 -my $startdir = "$ENV{\"HOME\"}/GNUstep/Library/AfterStep/start/";
9 -my $tempfile = "$ENV{\"HOME\"}/.tempasDrinksfile";
10 -my $tempf = "$ENV{\"HOME\"}/.tempasDrinks";
11 +my home = $ENV{"HOME_ETC"};
12 +if (not defined $ENV{"HOME_ETC"}) {
13 +       home = $ENV{"HOME"};
14 +}
15 +
16 +my $startdir = "$home/GNUstep/Library/AfterStep/start/";
17 +my $tempfile = "$home/.tempasDrinksfile";
18 +my $tempf = "$home/.tempasDrinks";
19  
20  
21  my %config;
22 -my $config = "$ENV{HOME}/.asDrinksrc";
23 +my $config = "$home/.asDrinksrc";
24  open(CONFIG, $config);
25  
26   while (<CONFIG>) {
27 diff -Nru AfterStep-APPS-991125.orig/asapm-2.8/asapm.c AfterStep-APPS-991125/asapm-2.8/asapm.c
28 --- AfterStep-APPS-991125.orig/asapm-2.8/asapm.c        Thu Nov 25 10:17:21 1999
29 +++ AfterStep-APPS-991125/asapm-2.8/asapm.c     Mon Sep 29 21:48:19 2003
30 @@ -129,7 +129,7 @@
31         /*safecopy(asapmrc_file, AFTER_SHAREDIR, 256-6);
32         strcat(asapmrc_file, "/asapm");
33         ReadConfiguration(asapmrc_file);*/
34 -       home = getenv("HOME");
35 +       home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
36         if ( home ) {
37                 safecopy(asapmrc_file, home, 256-10);
38                 strcat(asapmrc_file, "/.asapmrc");
39 diff -Nru AfterStep-APPS-991125.orig/asbutton-0.3/asbutton.c AfterStep-APPS-991125/asbutton-0.3/asbutton.c
40 --- AfterStep-APPS-991125.orig/asbutton-0.3/asbutton.c  Fri Jul 16 23:59:20 1999
41 +++ AfterStep-APPS-991125/asbutton-0.3/asbutton.c       Mon Sep 29 21:49:54 2003
42 @@ -176,7 +176,7 @@
43                 printf("App Name: %s\n", app_name);
44  
45         if (!strcmp(configfile, "")) {
46 -               home = getenv("HOME");
47 +               home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
48                 if( home != NULL ) {
49                 strcpy(configfile, home);
50                 strcat(configfile,"/.");
51 diff -Nru AfterStep-APPS-991125.orig/ascd-0.12.1/libworkman/database.c AfterStep-APPS-991125/ascd-0.12.1/libworkman/database.c
52 --- AfterStep-APPS-991125.orig/ascd-0.12.1/libworkman/database.c        Sun Mar  7 09:36:40 1999
53 +++ AfterStep-APPS-991125/ascd-0.12.1/libworkman/database.c     Mon Sep 29 21:52:03 2003
54 @@ -109,7 +109,7 @@
55         
56         if (rcfile == NULL)
57         {
58 -               if ((home = getenv("HOME")) != NULL)
59 +               if ((home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME")) != NULL)
60                 {
61                         rcfile = malloc(strlen(home) + sizeof(RCFILE));
62                         if (rcfile == NULL)
63 diff -Nru AfterStep-APPS-991125.orig/ascp-1.0.3/src/main.c AfterStep-APPS-991125/ascp-1.0.3/src/main.c
64 --- AfterStep-APPS-991125.orig/ascp-1.0.3/src/main.c    Mon Jul 12 18:52:32 1999
65 +++ AfterStep-APPS-991125/ascp-1.0.3/src/main.c Mon Sep 29 20:51:20 2003
66 @@ -59,13 +59,14 @@
67  int main (gint argc, gchar **argv)
68  {
69         gchar *rcfile;
70 +       gchar *home_etc = getenv("HOME_ETC");
71  #ifdef I18N
72         gtk_set_locale();
73  #endif
74  
75         gtk_init (&argc, &argv);        
76         
77 -       HOMEDIR= getenv("HOME");
78 +       HOMEDIR= home_etc ? home_etc : getenv("HOME");
79         ASCPERROR = FALSE;
80         
81         rcfile = g_malloc(BUFFERSIZE);
82 diff -Nru AfterStep-APPS-991125.orig/asexec-1.3/asexec.c AfterStep-APPS-991125/asexec-1.3/asexec.c
83 --- AfterStep-APPS-991125.orig/asexec-1.3/asexec.c      Sat Nov 14 22:04:35 1998
84 +++ AfterStep-APPS-991125/asexec-1.3/asexec.c   Mon Sep 29 20:57:49 2003
85 @@ -474,7 +474,8 @@
86  char* find_rcfile(void)
87  {
88         FILE* fp;
89 -       char* home = getenv("HOME");
90 +       char* home_etc = getenv("HOME_ETC");
91 +       char* home = home_etc ? home_etc : getenv("HOME");
92         char* rcfile;
93         char* afterdir = AFTERDIR;
94         
95 diff -Nru AfterStep-APPS-991125.orig/asfaces-1.0pre3/configutil.C AfterStep-APPS-991125/asfaces-1.0pre3/configutil.C
96 --- AfterStep-APPS-991125.orig/asfaces-1.0pre3/configutil.C     Fri Jul 18 13:06:20 1997
97 +++ AfterStep-APPS-991125/asfaces-1.0pre3/configutil.C  Mon Sep 29 20:59:04 2003
98 @@ -3,7 +3,7 @@
99  configutil::configutil(xutil *xu) {
100  
101         char    *filename=new char[1024];
102 -       sprintf(filename,"%s/.asfaces",getenv("HOME"));
103 +       sprintf(filename,"%s/.asfaces", getenv("HOME_ETC") != (char *)0 ? getenv("HOME_ETC") : getenv("HOME"));
104  
105         first=NULL;
106         last=NULL;
107 diff -Nru AfterStep-APPS-991125.orig/asmail-0.54/asmail.c AfterStep-APPS-991125/asmail-0.54/asmail.c
108 --- AfterStep-APPS-991125.orig/asmail-0.54/asmail.c     Fri Jun 18 17:55:12 1999
109 +++ AfterStep-APPS-991125/asmail-0.54/asmail.c  Mon Sep 29 21:01:08 2003
110 @@ -165,7 +165,7 @@
111  
112      /* Get config file */
113      if (argc == 1) {
114 -       strcpy(CfgFile, (char *) getenv("HOME"));
115 +       strcpy(CfgFile, (char *) (getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME")));
116          strcat(CfgFile, "/");
117         strcat(CfgFile, FILENAME);
118      } else if (argc == 2) {
119 diff -Nru AfterStep-APPS-991125.orig/asmounter-0.3/asmounter.c AfterStep-APPS-991125/asmounter-0.3/asmounter.c
120 --- AfterStep-APPS-991125.orig/asmounter-0.3/asmounter.c        Sat Mar 27 17:42:07 1999
121 +++ AfterStep-APPS-991125/asmounter-0.3/asmounter.c     Mon Sep 29 21:03:47 2003
122 @@ -615,10 +615,11 @@
123         char rcfname[MAX_STR_SIZE];
124         char buf[MAX_STR_SIZE];
125         XpmAttributes pixatt;
126 +       char *home_etc = getenv("HOME_ETC");
127         
128         if (debug) fprintf(stderr, "asmounter: Parsing Resource File... ");
129  
130 -       sprintf(rcfname,"%s/%s",getenv("HOME"),USER_RC_FILE);
131 +       sprintf(rcfname,"%s/%s",home_etc ? home_etc : getenv("HOME"),USER_RC_FILE);
132         if (NULL == (rcfile = fopen(rcfname, "r"))) {
133                 fprintf(stderr, "asmounter: Unable to open file %s\n", rcfname);
134                 if (NULL == (rcfile = fopen(SYS_RC_FILE, "r"))) {
135 @@ -664,6 +665,7 @@
136         MPInfo mp;
137         char rcfname[MAX_STR_SIZE];
138         char cont = 'y';
139 +       char *home_etc = getenv("HOME_ETC");
140  
141         printf("WARNING: This will remove your existing RC file!\n");
142         printf("Continue (y/n)? ");
143 @@ -671,7 +673,7 @@
144         
145         if (cont != 'y') return;
146         
147 -       sprintf(rcfname,"%s/%s",getenv("HOME"),USER_RC_FILE);
148 +       sprintf(rcfname,"%s/%s",home_etc ? home_etc : getenv("HOME"),USER_RC_FILE);
149         if (NULL == (rcfile = fopen(rcfname, "w"))) {
150                 fprintf(stderr, "asmounter: Unable to open file %s\n", rcfname);
151                 return;
152 diff -Nru AfterStep-APPS-991125.orig/aspbm-1.1/aspbm.c AfterStep-APPS-991125/aspbm-1.1/aspbm.c
153 --- AfterStep-APPS-991125.orig/aspbm-1.1/aspbm.c        Sun Sep  5 16:46:46 1999
154 +++ AfterStep-APPS-991125/aspbm-1.1/aspbm.c     Mon Sep 29 21:05:24 2003
155 @@ -305,7 +305,7 @@
156  
157         /* Read config file */
158  
159 -        home_env = getenv("HOME");
160 +        home_env = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
161  
162          strcpy(logfile, home_env);
163         strcat(logfile,"/.aspbm/log/aspbm.log");
164 diff -Nru AfterStep-APPS-991125.orig/aspbm-1.1/conf/as.c AfterStep-APPS-991125/aspbm-1.1/conf/as.c
165 --- AfterStep-APPS-991125.orig/aspbm-1.1/conf/as.c      Mon Sep  6 11:42:36 1999
166 +++ AfterStep-APPS-991125/aspbm-1.1/conf/as.c   Mon Sep 29 21:11:46 2003
167 @@ -650,7 +650,7 @@
168  FILE   *fp;
169  int    i1,i2;
170  
171 -p = getenv("HOME");
172 +p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
173  strcpy(temp, p);
174  strcat(temp, "/.aspbm/aspbmrc");
175  
176 @@ -658,7 +658,9 @@
177          if (fp==NULL) {                
178          }else{
179                  fclose(fp);
180 -                system("mv -f ~/.aspbm/aspbmrc ~/.aspbm/aspbmrc.bak");
181 +                                                               if (getenv("HOME_ETC"))
182 +                       system("mv -f $HOME_ETC/.aspbm/aspbmrc $HOME_ETC/.aspbm/aspbmrc.bak");
183 +                else system ("mv -f ~/.aspbm/aspbmrc ~/.aspbm/aspbmrc.bak");
184          }                     
185  
186  fp = fopen(temp, "a+"); 
187 @@ -687,7 +689,7 @@
188  
189  fclose(fp);  
190  
191 -p = getenv("HOME");
192 +p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
193  strcpy(temp, p);
194  strcat(temp, "/.aspbm/rules/");
195  strcat(temp, string);
196 @@ -2150,7 +2152,7 @@
197  /*********************************************/
198  
199  
200 -  p = getenv("HOME");  
201 +  p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");  
202    strcpy(temp, p);
203    strcat(temp, "/.aspbm/aspbmrc");
204  
205 @@ -2160,7 +2162,7 @@
206    parse_rcfile(temp, aspbm_keys);       
207    }
208  
209 -  p = getenv("HOME");
210 +  p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
211    strcpy(temp, p);
212    strcat(temp, "/.aspbm/rules/");
213    strcat(temp, rulesrc);
214 diff -Nru AfterStep-APPS-991125.orig/astime-2.4/astime.c AfterStep-APPS-991125/astime-2.4/astime.c
215 --- AfterStep-APPS-991125.orig/astime-2.4/astime.c      Fri Jul  2 08:43:44 1999
216 +++ AfterStep-APPS-991125/astime-2.4/astime.c   Mon Sep 29 21:15:35 2003
217 @@ -587,7 +587,7 @@
218                 }
219         }
220         if ( ! rcfound ) {
221 -               hname = getenv("HOME");
222 +               hname = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
223                 strcpy(rcfname, hname);
224                 if (rcfname[strlen(rcfname) - 1] != '/')
225                         strcat(rcfname, "/");
226 diff -Nru AfterStep-APPS-991125.orig/asxmcd-2.1.1/cda_d/cda.c AfterStep-APPS-991125/asxmcd-2.1.1/cda_d/cda.c
227 --- AfterStep-APPS-991125.orig/asxmcd-2.1.1/cda_d/cda.c Mon Jan 20 02:13:52 1997
228 +++ AfterStep-APPS-991125/asxmcd-2.1.1/cda_d/cda.c      Mon Sep 29 21:35:22 2003
229 @@ -235,7 +235,7 @@
230         di_devspec_parmload(str, TRUE);
231  
232         /* Get user device-specific configuration parameters */
233 -       (void) sprintf(str, USR_DSCFG_PATH, homedir(get_ouid()), bdevname);
234 +       (void) sprintf(str, USR_DSCFG_PATH, getenv("HOME_ETC") ? getenv("HOME_ETC") : homedir(get_ouid()), bdevname);
235         di_devspec_parmload(str, FALSE);
236  
237         /* Initialize the CD hardware */
238 @@ -2416,7 +2416,7 @@
239                 }
240         }
241  
242 -       hd = homedir(get_ouid());
243 +       hd = getenv("HOME_ETC") ? getenv("HOME_ETC") : homedir(get_ouid());
244         if ((int) strlen(hd) >= FILE_PATH_SZ)
245                 CDA_FATAL(app_data.str_longpatherr);
246  
247 diff -Nru AfterStep-APPS-991125.orig/asxmcd-2.1.1/xmcd_d/cdfunc.c AfterStep-APPS-991125/asxmcd-2.1.1/xmcd_d/cdfunc.c
248 --- AfterStep-APPS-991125.orig/asxmcd-2.1.1/xmcd_d/cdfunc.c     Fri Jun 13 11:14:18 1997
249 +++ AfterStep-APPS-991125/asxmcd-2.1.1/xmcd_d/cdfunc.c  Mon Sep 29 21:25:27 2003
250 @@ -1838,7 +1838,7 @@
251                         return;
252                 }
253         }
254 -       hd = homedir(get_ouid());
255 +       hd = getenv("HOME_ETC") ? getenv("HOME_ETC") : homedir(get_ouid());
256         if ((int) strlen(hd) >= FILE_PATH_SZ) {
257                 CD_FATAL(app_data.str_longpatherr);
258                 return;
259 diff -Nru AfterStep-APPS-991125.orig/aterm-0.3.6/src/xdefaults.c AfterStep-APPS-991125/aterm-0.3.6/src/xdefaults.c
260 --- AfterStep-APPS-991125.orig/aterm-0.3.6/src/xdefaults.c      Fri May  7 16:22:02 1999
261 +++ AfterStep-APPS-991125/aterm-0.3.6/src/xdefaults.c   Mon Sep 29 21:37:59 2003
262 @@ -943,7 +943,7 @@
263      FILE           *fd = NULL;
264      char           *home;
265  
266 -    if ((home = getenv("HOME")) != NULL) {
267 +    if ((home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME")) != NULL) {
268         int             i, len = strlen(home) + 2;
269         char           *f = NULL;
270  
271 diff -Nru AfterStep-APPS-991125.orig/xiterm-2.0/src/xdefaults.c AfterStep-APPS-991125/xiterm-2.0/src/xdefaults.c
272 --- AfterStep-APPS-991125.orig/xiterm-2.0/src/xdefaults.c       Fri Sep 25 10:12:13 1998
273 +++ AfterStep-APPS-991125/xiterm-2.0/src/xdefaults.c    Mon Sep 29 21:38:55 2003
274 @@ -789,7 +789,7 @@
275      FILE           *fd = NULL;
276      char           *home;
277  
278 -    if ((home = getenv("HOME")) != NULL) {
279 +    if ((home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME")) != NULL) {
280         int             i, len = strlen(home) + 2;
281         char           *f = NULL;
282  
This page took 0.104924 seconds and 3 git commands to generate.