From 91c91cb5cdc99ce5acf2beda2cc9fd811535e16e Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Wed, 21 Nov 2001 16:29:46 +0000 Subject: [w3m-dev 02479] #ifdef cleanups make -> $(MAKE) --- indep.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'indep.c') 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 #include @@ -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 */ -- cgit v1.2.3