From be16c17ab389dec3fcdf7606bb5af77c111078d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Fri, 21 Apr 2006 23:40:35 +0000 Subject: [PATCH] - orphaned, outdated Changed files: fmio-home_etc.patch -> 1.2 --- fmio-home_etc.patch | 52 --------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 fmio-home_etc.patch diff --git a/fmio-home_etc.patch b/fmio-home_etc.patch deleted file mode 100644 index 3a688b3..0000000 --- a/fmio-home_etc.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -Nru fmio-1.2.29/xsrc/wmfmio.c fmio-1.2.29.new/xsrc/wmfmio.c ---- fmio-1.2.29/xsrc/wmfmio.c Fri Jul 5 17:29:20 2002 -+++ fmio-1.2.29.new/xsrc/wmfmio.c Sat Mar 29 12:21:20 2003 -@@ -148,25 +148,37 @@ - int - main(int argc,char *argv[]) { - char *home; -+ char *config_dir; -+ - myname = argv[0]; - ParseCMDLine(argc, argv); -- -- home = getenv("HOME"); -- if (home == NULL) -- home = "."; -- strncpy(temp, home, TMPBUFSIZE); -- temp[TMPBUFSIZE] = '\0'; -- strncat(temp, "/.", TMPBUFSIZE); -- temp[TMPBUFSIZE] = '\0'; -- strncat(temp, RCFILE, TMPBUFSIZE); -- temp[TMPBUFSIZE] = '\0'; -+ -+ config_dir = getenv("CONFIG_DIR"); -+ if (config_dir) { -+ strncpy(temp, config_dir, TMPBUFSIZE); -+ temp[TMPBUFSIZE] = '\0'; -+ strncat(temp, "/", TMPBUFSIZE); -+ temp[TMPBUFSIZE] = '\0'; -+ strncat(temp, RCFILE, TMPBUFSIZE); -+ temp[TMPBUFSIZE] = '\0'; -+ } else { -+ home = getenv("HOME"); -+ if (home == NULL) -+ home = "."; -+ strncpy(temp, home, TMPBUFSIZE); -+ temp[TMPBUFSIZE] = '\0'; -+ strncat(temp, "/.", TMPBUFSIZE); -+ temp[TMPBUFSIZE] = '\0'; -+ strncat(temp, RCFILE, TMPBUFSIZE); -+ temp[TMPBUFSIZE] = '\0'; -+ } - if ( ParseRCFile(temp) == 1 ) { - strncpy(temp, "/etc/", TMPBUFSIZE); - temp[TMPBUFSIZE] = '\0'; - strncat(temp, RCFILE, TMPBUFSIZE); - temp[TMPBUFSIZE] = '\0'; - if (ParseRCFile(temp) == 1) -- errx(1, "~/.%s or /etc/%s not found", RCFILE, RCFILE); -+ errx(1, "$CONFIG_DIR/%s, ~/.%s or /etc/%s not found", RCFILE, RCFILE, RCFILE); - } - - if (cmdline_preset == ON) -- 2.43.0