]> git.pld-linux.org Git - packages/bvi.git/blame - bvi-home_etc.patch
- s/home_etc/etc_dir/
[packages/bvi.git] / bvi-home_etc.patch
CommitLineData
c2bcfd1f 1diff -Nru bvi-1.3.1/io.c bvi-1.3.1.new/io.c
2--- bvi-1.3.1/io.c Tue Dec 25 13:37:38 2001
3+++ bvi-1.3.1.new/io.c Sun Mar 23 19:07:37 2003
4@@ -264,7 +264,8 @@
5 {
6 char *initstr;
7 char rcpath[MAXCMD];
8-
9+ char *config_dir = getenv("CONFIG_DIR");
10+
11 terminal = getenv("TERM");
12 shell = getenv("SHELL");
13 if (shell == NULL || *shell == '\0')
14@@ -275,9 +276,15 @@
15 return;
16 }
17
18- strncpy(rcpath, getenv("HOME"), MAXCMD - 8);
19- rcpath[MAXCMD - 8] = '\0';
20- strcat(rcpath, "/.bvirc");
21+ if (config_dir) {
22+ strncpy(rcpath, config_dir, MAXCMD - 7);
23+ rcpath[MAXCMD - 7] = '\0';
24+ strcat(rcpath, "/bvirc");
25+ } else {
26+ strncpy(rcpath, getenv("HOME"), MAXCMD - 8);
27+ rcpath[MAXCMD - 8] = '\0';
28+ strcat(rcpath, "/.bvirc");
29+ }
30 if (stat(rcpath, &buf) == 0) {
31 if (buf.st_uid == getuid()) read_rc(rcpath);
32 }
This page took 0.091632 seconds and 4 git commands to generate.