aboutsummaryrefslogtreecommitdiffstats
path: root/indep.c
diff options
context:
space:
mode:
Diffstat (limited to 'indep.c')
-rw-r--r--indep.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/indep.c b/indep.c
index 97c11db..a3ce9bd 100644
--- a/indep.c
+++ b/indep.c
@@ -1,4 +1,4 @@
-/* $Id: indep.c,v 1.5 2001/11/20 04:11:16 ukai Exp $ */
+/* $Id: indep.c,v 1.6 2001/11/21 16:29:46 ukai Exp $ */
#include "fm.h"
#include <stdio.h>
#include <pwd.h>
@@ -658,6 +658,28 @@ shell_quote(char *str)
return str;
}
+static char*
+w3m_dir(const char *name, char *dft)
+{
+#ifdef USE_PATH_ENVVAR
+ char *value = getenv(name);
+ return value ? value : dft;
+#else
+ return dft;
+#endif
+}
+
+char *
+w3m_lib_dir()
+{
+ return w3m_dir("W3M_LIB_DIR", LIB_DIR);
+}
+
+char *
+w3m_help_dir()
+{
+ return w3m_dir("W3M_HELP_DIR", HELP_DIR);
+}
/* Local Variables: */
/* c-basic-offset: 4 */
/* tab-width: 8 */