diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-21 16:29:46 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-21 16:29:46 +0000 |
commit | 91c91cb5cdc99ce5acf2beda2cc9fd811535e16e (patch) | |
tree | f2cea7c0e6b8c11d126f09bb53191027f3ad7289 /indep.c | |
parent | [w3m-dev 02473] clean & install-scripts (diff) | |
download | w3m-91c91cb5cdc99ce5acf2beda2cc9fd811535e16e.tar.gz w3m-91c91cb5cdc99ce5acf2beda2cc9fd811535e16e.zip |
[w3m-dev 02479] #ifdef cleanups
make -> $(MAKE)
Diffstat (limited to '')
-rw-r--r-- | indep.c | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -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 */ |