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
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
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"};
16 +my $startdir = "$home/GNUstep/Library/AfterStep/start/";
17 +my $tempfile = "$home/.tempasDrinksfile";
18 +my $tempf = "$home/.tempasDrinks";
22 -my $config = "$ENV{HOME}/.asDrinksrc";
23 +my $config = "$home/.asDrinksrc";
24 open(CONFIG, $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
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");
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
43 printf("App Name: %s\n", app_name);
45 if (!strcmp(configfile, "")) {
46 - home = getenv("HOME");
47 + home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
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
58 - if ((home = getenv("HOME")) != NULL)
59 + if ((home = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME")) != NULL)
61 rcfile = malloc(strlen(home) + sizeof(RCFILE));
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
67 int main (gint argc, gchar **argv)
70 + gchar *home_etc = getenv("HOME_ETC");
75 gtk_init (&argc, &argv);
77 - HOMEDIR= getenv("HOME");
78 + HOMEDIR= home_etc ? home_etc : getenv("HOME");
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
86 char* find_rcfile(void)
89 - char* home = getenv("HOME");
90 + char* home_etc = getenv("HOME_ETC");
91 + char* home = home_etc ? home_etc : getenv("HOME");
93 char* afterdir = AFTERDIR;
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
99 configutil::configutil(xutil *xu) {
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"));
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
112 /* Get config file */
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");
128 if (debug) fprintf(stderr, "asmounter: Parsing Resource File... ");
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"))) {
137 char rcfname[MAX_STR_SIZE];
139 + char *home_etc = getenv("HOME_ETC");
141 printf("WARNING: This will remove your existing RC file!\n");
142 printf("Continue (y/n)? ");
145 if (cont != 'y') return;
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);
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
157 /* Read config file */
159 - home_env = getenv("HOME");
160 + home_env = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
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
172 +p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
174 strcat(temp, "/.aspbm/aspbmrc");
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");
186 fp = fopen(temp, "a+");
192 +p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
194 strcat(temp, "/.aspbm/rules/");
195 strcat(temp, string);
196 @@ -2150,7 +2152,7 @@
197 /*********************************************/
200 - p = getenv("HOME");
201 + p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
203 strcat(temp, "/.aspbm/aspbmrc");
205 @@ -2160,7 +2162,7 @@
206 parse_rcfile(temp, aspbm_keys);
209 - p = getenv("HOME");
210 + p = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME");
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
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
230 di_devspec_parmload(str, TRUE);
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);
237 /* Initialize the CD hardware */
238 @@ -2416,7 +2416,7 @@
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);
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 @@
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);
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
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;
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
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;