]> git.pld-linux.org Git - packages/bvi.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:
    bvi-etc_dir.patch -> 1.1

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

diff --git a/bvi-etc_dir.patch b/bvi-etc_dir.patch
new file mode 100644 (file)
index 0000000..1cd95f1
--- /dev/null
@@ -0,0 +1,32 @@
+diff -Nru bvi-1.3.1/io.c bvi-1.3.1.new/io.c
+--- bvi-1.3.1/io.c     Tue Dec 25 13:37:38 2001
++++ bvi-1.3.1.new/io.c Sun Mar 23 19:07:37 2003
+@@ -264,7 +264,8 @@
+ {
+       char    *initstr;
+       char    rcpath[MAXCMD];
+-
++      char    *etc_dir = getenv("ETC_DIR");
++      
+       terminal = getenv("TERM");
+       shell = getenv("SHELL");
+       if (shell == NULL || *shell == '\0')
+@@ -275,9 +276,15 @@
+               return;
+       }
+       
+-      strncpy(rcpath, getenv("HOME"), MAXCMD - 8);
+-      rcpath[MAXCMD - 8] = '\0';
+-      strcat(rcpath, "/.bvirc");
++      if (etc_dir) {
++              strncpy(rcpath, etc_dir, MAXCMD - 7);
++              rcpath[MAXCMD - 7] = '\0';
++              strcat(rcpath, "/bvirc");
++      } else {
++              strncpy(rcpath, getenv("HOME"), MAXCMD - 8);
++              rcpath[MAXCMD - 8] = '\0';
++              strcat(rcpath, "/.bvirc");
++      }
+       if (stat(rcpath, &buf) == 0) {
+               if (buf.st_uid == getuid()) read_rc(rcpath);
+       }
This page took 0.0971109999999999 seconds and 4 git commands to generate.