]> git.pld-linux.org Git - packages/elmo.git/commitdiff
- s/CONFIG_DIR/ETC_DIR/
authorjuandon <witekfl@pld-linux.org>
Mon, 7 Apr 2003 12:21:34 +0000 (12:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- s/home_etc/etc_dir/

Changed files:
    elmo-etc_dir.patch -> 1.1

elmo-etc_dir.patch [new file with mode: 0644]

diff --git a/elmo-etc_dir.patch b/elmo-etc_dir.patch
new file mode 100644 (file)
index 0000000..d264b59
--- /dev/null
@@ -0,0 +1,48 @@
+diff -Nru elmo-0.4/src/abook.c elmo-0.4.new/src/abook.c
+--- elmo-0.4/src/abook.c       Thu Mar 13 20:51:32 2003
++++ elmo-0.4.new/src/abook.c   Sat Mar 29 07:34:33 2003
+@@ -194,8 +194,14 @@
+   FILE *fp;
+   afile = cf_txtvar_lookup ("addressbook");
+-  if (afile == NULL)
+-    afile = file_with_dir (getenv ("HOME"), ".addressbook");
++  if (afile == NULL) {
++    char *etc_dir = getenv("ETC_DIR");
++    
++    if (etc_dir)
++      afile = file_with_dir (etc_dir, "addressbook");
++    else
++      afile = file_with_dir (getenv ("HOME"), ".addressbook");
++  }
+   else
+     afile = xstrdup (afile);
+   
+diff -Nru elmo-0.4/src/confread.c elmo-0.4.new/src/confread.c
+--- elmo-0.4/src/confread.c    Mon Mar 17 08:24:02 2003
++++ elmo-0.4.new/src/confread.c        Sat Mar 29 07:31:40 2003
+@@ -53,6 +53,7 @@
+ #define BUFFER_SIZE 128
+ #define CONF_FILE ".elmorc"
++#define ETC_DIR_CONF_FILE "elmorc"
+ enum type_t {TYPE_TXT, TYPE_NUM};
+@@ -272,8 +273,14 @@
+   conf_table  = htable_create (size);
+   initialized = 1;
+-  if (config_file == NULL)
+-    file = file_with_dir (getenv ("HOME"), CONF_FILE);
++  if (config_file == NULL){
++    char *etc_dir = getenv("ETC_DIR");
++    
++    if (etc_dir)
++      file = file_with_dir (etc_dir, ETC_DIR_CONF_FILE);
++    else
++      file = file_with_dir (getenv ("HOME"), CONF_FILE);
++  }
+   else
+     file = xstrdup (config_file);
+   cf_read_file (file);
This page took 0.125514 seconds and 4 git commands to generate.