1 diff -Nru fmio-1.2.29/xsrc/wmfmio.c fmio-1.2.29.new/xsrc/wmfmio.c
2 --- fmio-1.2.29/xsrc/wmfmio.c Fri Jul 5 17:29:20 2002
3 +++ fmio-1.2.29.new/xsrc/wmfmio.c Sat Mar 29 12:21:20 2003
6 main(int argc,char *argv[]) {
11 ParseCMDLine(argc, argv);
13 - home = getenv("HOME");
16 - strncpy(temp, home, TMPBUFSIZE);
17 - temp[TMPBUFSIZE] = '\0';
18 - strncat(temp, "/.", TMPBUFSIZE);
19 - temp[TMPBUFSIZE] = '\0';
20 - strncat(temp, RCFILE, TMPBUFSIZE);
21 - temp[TMPBUFSIZE] = '\0';
23 + etc_dir = getenv("ETC_DIR");
25 + strncpy(temp, etc_dir, TMPBUFSIZE);
26 + temp[TMPBUFSIZE] = '\0';
27 + strncat(temp, "/", TMPBUFSIZE);
28 + temp[TMPBUFSIZE] = '\0';
29 + strncat(temp, RCFILE, TMPBUFSIZE);
30 + temp[TMPBUFSIZE] = '\0';
32 + home = getenv("HOME");
35 + strncpy(temp, home, TMPBUFSIZE);
36 + temp[TMPBUFSIZE] = '\0';
37 + strncat(temp, "/.", TMPBUFSIZE);
38 + temp[TMPBUFSIZE] = '\0';
39 + strncat(temp, RCFILE, TMPBUFSIZE);
40 + temp[TMPBUFSIZE] = '\0';
42 if ( ParseRCFile(temp) == 1 ) {
43 strncpy(temp, "/etc/", TMPBUFSIZE);
44 temp[TMPBUFSIZE] = '\0';
45 strncat(temp, RCFILE, TMPBUFSIZE);
46 temp[TMPBUFSIZE] = '\0';
47 if (ParseRCFile(temp) == 1)
48 - errx(1, "~/.%s or /etc/%s not found", RCFILE, RCFILE);
49 + errx(1, "$ETC_DIR/%s, ~/.%s or /etc/%s not found", RCFILE, RCFILE, RCFILE);
52 if (cmdline_preset == ON)