aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile2
-rw-r--r--scripts/w3mhelp.cgi.in8
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index f785328..c2e4fc7 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -39,7 +39,7 @@ w3mhelp-funcname.pl: w3mhelp-funcname.pl.in ../funcname.tab ../doc/keymap.defaul
@echo ');' >> w3mhelp-funcname.pl
@echo '%keyfunc = (' >> w3mhelp-funcname.pl
@case "$(KEYBIND_SRC)" in *lynx*) keymap=keymap.lynx;; *) keymap=keymap.default;; esac; \
- while read keyword keys func rest; do \
+ while read -r keyword keys func rest; do \
if [ "X$$keyword" = Xkeymap ]; then \
keys=`echo "$$keys" | sed -e 's/\\\\/\\\\&/g'`; \
echo "'$$keys', '$$func',"; \
diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in
index c1a838b..14e4836 100644
--- a/scripts/w3mhelp.cgi.in
+++ b/scripts/w3mhelp.cgi.in
@@ -1,5 +1,5 @@
#!@PERL@
-# $Id: w3mhelp.cgi.in,v 1.9 2001/12/25 17:29:31 ukai Exp $
+# $Id: w3mhelp.cgi.in,v 1.10 2002/01/10 03:45:13 ukai Exp $
if ( $^O =~ /^(ms)?(dos|win(32|nt)?)/i ) {
$CYGPATH = 1;
@@ -187,7 +187,8 @@ sub load_keymap {
sub norm_key {
local($_) = @_;
- s/^\^/C-/;
+ s/\\(.)/$1/g;
+ s/^\^(.)/C-$1/;
s/^(C-\[|M-)/ESC-/;
if (/^ESC-\[/) {
/^ESC-\[A$/ && return "UP";
@@ -197,10 +198,9 @@ sub norm_key {
s/^ESC-/\^\[/;
return $_;
}
- s/^(ESC-)\^/ESC-C-/;
+ s/^ESC-\^(.)/ESC-C-$1/;
s/^(ESC-)?C-[iI]/${1}TAB/;
s/^(ESC-)?C-\?/${1}DEL/;
- s/^\\//;
return $_;
}