]>
Commit | Line | Data |
---|---|---|
f91e239f AG |
1 | diff -burN bvi-1.3.2.orig/io.c bvi-1.3.2/io.c |
2 | --- bvi-1.3.2.orig/io.c 2004-02-15 00:17:56.704261504 +0100 | |
3 | +++ bvi-1.3.2/io.c 2004-02-15 00:21:35.243038560 +0100 | |
4 | @@ -265,6 +265,7 @@ | |
c2bcfd1f | 5 | { |
6 | char *initstr; | |
7 | char rcpath[MAXCMD]; | |
f91e239f AG |
8 | + char *home_etc = getenv("HOME_ETC"); |
9 | ||
c2bcfd1f | 10 | terminal = getenv("TERM"); |
11 | shell = getenv("SHELL"); | |
f91e239f AG |
12 | @@ -285,8 +286,13 @@ |
13 | read_rc(rcpath); | |
14 | read_rc("BVI.RC"); | |
15 | #else | |
16 | + if (home_etc) { | |
17 | + strncpy(rcpath, home_etc, MAXCMD - 7); | |
c2bcfd1f | 18 | + rcpath[MAXCMD - 7] = '\0'; |
c2bcfd1f | 19 | + } else { |
f91e239f AG |
20 | strncpy(rcpath, getenv("HOME"), MAXCMD - 8); |
21 | rcpath[MAXCMD - 8] = '\0'; | |
22 | + }; | |
23 | strcat(rcpath, "/.bvirc"); | |
c2bcfd1f | 24 | if (stat(rcpath, &buf) == 0) { |
25 | if (buf.st_uid == getuid()) read_rc(rcpath); |