aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-21 20:30:54 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-21 20:30:54 +0000
commit94f1eed72cb29867d6450763c0e251c372df489f (patch)
tree680e007f15a696e8e5152c2f15a22909761696ea
parentoops, +cvs (diff)
downloadw3m-94f1eed72cb29867d6450763c0e251c372df489f.tar.gz
w3m-94f1eed72cb29867d6450763c0e251c372df489f.zip
[w3m-dev 02690] RC_DIR in scripts
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
-rw-r--r--ChangeLog15
-rw-r--r--XMakefile4
-rw-r--r--config.h.dist1
-rwxr-xr-xconfigure3
-rw-r--r--scripts/Makefile4
-rwxr-xr-xscripts/dirlist.cgi.in3
-rw-r--r--scripts/w3mhelp.cgi.in27
7 files changed, 47 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 45530be..6e65ac8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
+2001-12-22 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 02690] RC_DIR in scripts
+ * configure (config.h): add RC_DIR
+ * config.h.dist: ditto
+ * XMakefile: pass RC_DIR
+ * scripts/Makefile: subst RC_DIR
+ * scripts/dirlist.cgi.in: $RC_DIR initial value
+ * scripts/w3mhelp.cgi.in: ditto
+ * scripts/w3mhelp.cgi.in (cygwin_pathconv): added
+
2001-12-22 Fumitoshi UKAI <ukai@debian.or.jp>
- * version.c.in: 0.2.3.2-cvs
+ * version.c.in: 0.2.3.2+cvs
2001-12-22 Fumitoshi UKAI <ukai@debian.or.jp>
@@ -1394,4 +1405,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.156 2001/12/21 20:15:58 ukai Exp $
+$Id: ChangeLog,v 1.157 2001/12/21 20:30:54 ukai Exp $
diff --git a/XMakefile b/XMakefile
index b891546..e4f7033 100644
--- a/XMakefile
+++ b/XMakefile
@@ -1,4 +1,4 @@
-# $Id: XMakefile,v 1.18 2001/12/15 17:25:45 ukai Exp $
+# $Id: XMakefile,v 1.19 2001/12/21 20:30:54 ukai Exp $
SRCS=main.c file.c buffer.c display.c etc.c search.c linein.c table.c local.c \
form.c map.c frame.c rc.c menu.c mailcap.c\
func.c cookie.c history.c backend.c $(KEYBIND_SRC)
@@ -115,7 +115,7 @@ install-helpfile:
all-scripts:
for dir in $(SCRIPTSUBDIRS); \
do \
- (cd $$dir; $(MAKE) PERL='$(PERL)' BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)'); \
+ (cd $$dir; $(MAKE) PERL='$(PERL)' BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)' RC_DIR='$(RC_DIR)'); \
done
install-scripts: all-scripts
diff --git a/config.h.dist b/config.h.dist
index cbf0e78..64307e9 100644
--- a/config.h.dist
+++ b/config.h.dist
@@ -68,6 +68,7 @@ BIN_DIR = /usr/local/bin
HELP_DIR = /usr/local/lib/w3m
LIB_DIR = /usr/local/lib/w3m
ETC_DIR = /usr/local/etc/w3m
+RC_DIR = ~/.w3m
HELP_FILE = w3mhelp-w3m_ja.html
SYS_LIBRARIES = -lgpm -lbsd -lnsl -lncurses -L/usr/lib -L/usr/lib -L/usr/local/ssl/lib -L/usr/local/ssl/lib -lssl -lcrypto
LOCAL_LIBRARIES =
diff --git a/configure b/configure
index 19a9c39..ddb9576 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: configure,v 1.42 2001/12/21 02:11:50 ukai Exp $
+# $Id: configure,v 1.43 2001/12/21 20:30:54 ukai Exp $
# Configuration.
#
@@ -1950,6 +1950,7 @@ BIN_DIR = $bindir
HELP_DIR = $helpdir
LIB_DIR = $libdir
ETC_DIR = $sysconfdir
+RC_DIR = ~/.w3m
HELP_FILE = $helpfile
SYS_LIBRARIES = $gpmlib $extlib $termlib $ssllib $v6lib
LOCAL_LIBRARIES = $bsdlib $ldflags
diff --git a/scripts/Makefile b/scripts/Makefile
index 7b0bcaa..f785328 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -4,6 +4,7 @@ DESTDIR =
BIN_DIR = $(prefix)/bin
LIB_DIR = $(prefix)/lib/w3m
HELP_DIR = $(prefix)/lib/w3m
+RC_DIR = ~/.w3m
LIB_TARGETS = dirlist.cgi w3mhelp.cgi
HELP_LIBS = w3mhelp-funcname.pl w3mhelp-funcdesc.pl
@@ -24,7 +25,8 @@ all: $(LIB_TARGETS) $(HELP_LIBS)
.in:
@echo "generating $@..."
@sed -e 's%@PERL@%$(PERL)%' -e 's%@HELP_DIR@%$(HELP_DIR)%' \
- -e 's%@DOCDIRS@%$(DOCDIRS)%' $< > $@
+ -e 's%@DOCDIRS@%$(DOCDIRS)%' \
+ -e 's%@RC_DIR@%$(RC_DIR)%' $< > $@
@chmod +x $@
@echo done
diff --git a/scripts/dirlist.cgi.in b/scripts/dirlist.cgi.in
index 8f11cdd..bd16721 100755
--- a/scripts/dirlist.cgi.in
+++ b/scripts/dirlist.cgi.in
@@ -15,8 +15,7 @@ else {
$WIN32 = 0;
$CYGPATH = 0;
}
-$RC_DIR = '~/.w3m/';
-
+$RC_DIR = '@RC_DIR@';
$RC_DIR =~ s@^~/@$ENV{'HOME'}/@;
if ($CYGPATH) {
$RC_DIR = &cygwin_pathconv("$RC_DIR");
diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in
index 0cf4a5b..b1e94fb 100644
--- a/scripts/w3mhelp.cgi.in
+++ b/scripts/w3mhelp.cgi.in
@@ -1,5 +1,9 @@
#!@PERL@
-# $Id: w3mhelp.cgi.in,v 1.6 2001/12/21 19:25:01 ukai Exp $
+# $Id: w3mhelp.cgi.in,v 1.7 2001/12/21 20:30:54 ukai Exp $
+
+if ( $^O =~ /^(ms)?(dos|win(32|nt)?)/i ) {
+ $CYGPATH = 1;
+}
$helpdir = "@HELP_DIR@";
unshift(@INC, $helpdir);
@@ -15,7 +19,12 @@ $lang = 'en';
'&', '&amp;'
);
-$keymap = "$ENV{'HOME'}/.w3m/keymap";
+$RC_DIR = '@RC_DIR@';
+$RC_DIR =~ s/^~/$ENV{'HOME'}/;
+if ($CYGPATH) {
+ $RC_DIR = &cygwin_pathconv("$RC_DIR");
+}
+$keymap = "$RC_DIR/keymap";
$version = '*unknown*';
if (defined($ENV{'QUERY_STRING'})) {
print "QUERY_STRING=$ENV{'QUERY_STRING'}\n";
@@ -191,3 +200,17 @@ PAGE
}
print "</table>\n";
}
+
+
+sub cygwin_pathconv {
+ local($_) = @_;
+ local(*CYGPATH);
+
+ open(CYGPATH, '-|') || exec('cygpath', '-w', $_);
+ $_ = <CYGPATH>;
+ close(CYGPATH);
+ s/\r?\n$//;
+ s!\\!/!g;
+ s!/$!!;
+ return $_;
+}