[w3m-dev 02574] sysconfdir

From: Fumitoshi UKAI <ukai@debian.or.jp>
This commit is contained in:
Fumitoshi UKAI
2001-11-27 18:29:24 +00:00
parent 0369c273f2
commit 600a6bbd4b
6 changed files with 62 additions and 6 deletions

13
rc.c
View File

@@ -1,4 +1,4 @@
/* $Id: rc.c,v 1.14 2001/11/24 02:01:26 ukai Exp $ */
/* $Id: rc.c,v 1.15 2001/11/27 18:29:24 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -1196,7 +1196,7 @@ init_rc(char *config_file)
}
/* open config file */
if ((f = fopen(libFile(W3MCONFIG), "rt")) != NULL) {
if ((f = fopen(etcFile(W3MCONFIG), "rt")) != NULL) {
interpret_rc(f);
fclose(f);
}
@@ -1370,6 +1370,15 @@ libFile(char *base)
return expandName(file->ptr);
}
char *
etcFile(char *base)
{
Str file = Strnew_charp(w3m_etc_dir());
Strcat_char(file, '/');
Strcat_charp(file, base);
return expandName(file->ptr);
}
char *
helpFile(char *base)
{