From dcfbd6abaaa8015fb36911191a9eeb06bd052f6c Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 30 Nov 2001 18:06:28 +0000 Subject: [w3m-dev 02601] From: Fumitoshi UKAI --- scripts/.cvsignore | 5 ++-- scripts/Makefile | 4 ++-- scripts/w3mhelp-funcdesc.en.pl.in | 26 +++++++++++++++++++++ scripts/w3mhelp-funcdesc.ja.pl.in | 40 ++++++++++++++++++++++++++++++++ scripts/w3mhelp-funcname.pl.in | 49 +++++++++++++++++++++++++++++++++++++++ scripts/w3mhelp.cgi.in | 49 +++++++++++++++++++-------------------- 6 files changed, 144 insertions(+), 29 deletions(-) create mode 100644 scripts/w3mhelp-funcdesc.en.pl.in create mode 100644 scripts/w3mhelp-funcdesc.ja.pl.in create mode 100644 scripts/w3mhelp-funcname.pl.in (limited to 'scripts') diff --git a/scripts/.cvsignore b/scripts/.cvsignore index 191d0e6..b369a7f 100644 --- a/scripts/.cvsignore +++ b/scripts/.cvsignore @@ -1,4 +1,5 @@ dirlist.cgi w3mhelp.cgi -w3hmhelp-*.pl - +w3hmhelp-funcdesc.en.pl +w3hmhelp-funcdesc.ja.pl +w3hmhelp-funcname.pl diff --git a/scripts/Makefile b/scripts/Makefile index 4cf6575..1f055ea 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -41,7 +41,7 @@ helplibs: fi; \ done < ../doc/$$keymap >> w3mhelp-funcname.pl @echo ');' >> w3mhelp-funcname.pl - @echo '1;' >> w3mhelp-funcname.pl + @cat w3mhelp-funcname.pl.in >> w3mhelp-funcname.pl @echo "done" @echo "generating w3mhelp-funcdesc*.pl..." @@ -53,7 +53,7 @@ helplibs: case "$$func" in [a-zA-Z@]*) echo "'$$func', '$$desc', ";; esac; \ done < ../$$dir/README.func >> w3mhelp-funcdesc.$$lang.pl; \ echo ');' >> w3mhelp-funcdesc.$$lang.pl; \ - echo '1;' >> w3mhelp-funcdesc.$$lang.pl; \ + cat w3mhelp-funcdesc.$$lang.pl.in >> w3mhelp-funcdesc.$$lang.pl; \ done @echo done diff --git a/scripts/w3mhelp-funcdesc.en.pl.in b/scripts/w3mhelp-funcdesc.en.pl.in new file mode 100644 index 0000000..565e1a1 --- /dev/null +++ b/scripts/w3mhelp-funcdesc.en.pl.in @@ -0,0 +1,26 @@ + +# Buffer selection mode + +%buf_funcdesc = ( + 'BUF:PREV', 'Select previous buffer', + 'BUF:NEXT', 'Select next buffer', + 'BUF:DELETE', 'Delete current buffer', + 'BUF:GO', 'Go to the selected buffer', +); + +%lineedit_funcdesc = ( + 'LINEEDIT:FORWARD', 'Move cursor forward', + 'LINEEDIT:BACK', 'Move cursor backward', + 'LINEEDIT:BS', 'Delete previous character', + 'LINEEDIT:DEL', 'Delete current character', + 'LINEEDIT:KILL_AFTER', 'Kill everything after cursor', + 'LINEEDIT:KILL_BEFORE', 'Kill everything before cursor', + 'LINEEDIT:TOP', 'Move to the top of line', + 'LINEEDIT:BOTTOM', 'Move to the bottom of line', + 'LINEEDIT:PREV', 'Fetch the previous string from the history list', + 'LINEEDIT:NEXT', 'Fetch the next string from the history list', + 'LINEEDIT:COMPLETE', 'Complete filename', + 'LINEEDIT:ACCEPT', 'Accept', +); + +1; \ No newline at end of file diff --git a/scripts/w3mhelp-funcdesc.ja.pl.in b/scripts/w3mhelp-funcdesc.ja.pl.in new file mode 100644 index 0000000..d869c85 --- /dev/null +++ b/scripts/w3mhelp-funcdesc.ja.pl.in @@ -0,0 +1,40 @@ + +# Buffer selection mode + +%buf_funcdesc = ( + 'BUF:PREV', '一つ上のバッファを選択', + 'BUF:NEXT', '一つ下のバッファを選択', + 'BUF:DELETE', '現在選択しているバッファを削除', + 'BUF:GO', '現在選択しているバッファを表示', +); + +%lineedit_funcdesc = ( + 'LINEEDIT:FORWARD', 'カーソルを右へ移動', + 'LINEEDIT:BACK', 'カーソルを左へ移動', + 'LINEEDIT:BS', '前の文字を削除', + 'LINEEDIT:DEL', 'カーソル位置の文字を削除', + 'LINEEDIT:KILL_AFTER', 'カーソルの後方を全て削除', + 'LINEEDIT:KILL_BEFORE', 'カーソルの前までを全て削除', + 'LINEEDIT:TOP', '行頭に移動', + 'LINEEDIT:BOTTOM', '行末へ移動', + 'LINEEDIT:PREV', 'ヒストリから一つ前の文字列を取り出す', + 'LINEEDIT:NEXT', 'ヒストリから次の文字列を取り出す', + 'LINEEDIT:COMPLETE', 'ファイル名の補完', + 'LINEEDIT:ACCEPT', '入力終了', +); + +%title = ( + "Page/Cursor motion", 'ページ/カーソル移動', + "Hyperlink operation", 'ハイパーリンク操作', + "File/Stream operation", 'ファイル/ストリーム操作', + "Buffer operation", 'バッファ操作', + "Buffer selection mode", 'バッファ選択モード', + "Bookmark operation", 'ブックマーク操作', + "Search", '検索', + "Dictionary look-up", '辞書検索', + "Mark operation", 'マーク操作', + "Miscellany", 'その他', + "Line-edit mode", '行編集モード', +); + +1; \ No newline at end of file diff --git a/scripts/w3mhelp-funcname.pl.in b/scripts/w3mhelp-funcname.pl.in new file mode 100644 index 0000000..16afa16 --- /dev/null +++ b/scripts/w3mhelp-funcname.pl.in @@ -0,0 +1,49 @@ + +%buf_funcname = ( + 'BUF:PREV', 'buffer_prev', + 'BUF:NEXT', 'buffer_next', + 'BUF:DELETE', 'buffer_delete', + 'BUF:GO', 'buffer_go', +); + +%lineedit_funcname = ( + 'LINEEDIT:FORWARD', 'lineedit_forward', + 'LINEEDIT:BACK', 'lineedit_back', + 'LINEEDIT:BS', 'lineedit_backspace', + 'LINEEDIT:DEL', 'lineedit_delete', + 'LINEEDIT:KILL_AFTER', 'lineedit_kill_after', + 'LINEEDIT:KILL_BEFORE', 'lineedit_kill_before', + 'LINEEDIT:TOP', 'lineedit_top', + 'LINEEDIT:BOTTOM', 'lineedit_bottom', + 'LINEEDIT:PREV', 'lineedit_prev', + 'LINEEDIT:NEXT', 'lineedit_next', + 'LINEEDIT:COMPLETE', 'lineedit_complete', + 'LINEEDIT:ACCEPT', 'lineedit_accept', +); + +%buf_keyfunc = ( + 'k', 'BUF:PREV', + 'C-p', 'BUF:PREV', + 'j', 'BUF:NEXT', + 'C-n', 'BUF:NEXT', + 'D', 'BUF:DELETE', + 'RET', 'BUF:GO' +); + +%lineedit_keyfunc = ( + 'C-f', 'LINEEDIT:FORWARD', + 'C-b', 'LINEEDIT:BACK', + 'C-h', 'LINEEDIT:BS', + 'C-d', 'LINEEDIT:DEL', + 'C-k', 'LINEEDIT:KILL_AFTER', + 'C-u', 'LINEEDIT:KILL_BEFORE', + 'C-a', 'LINEEDIT:TOP', + 'C-e', 'LINEEDIT:BOTTOM', + 'C-p', 'LINEEDIT:PREV', + 'C-n', 'LINEEDIT:NEXT', + 'TAB', 'LINEEDIT:COMPLETE', + 'SPC', 'LINEEDIT:COMPLETE', + 'RET', 'LINEEDIT:ACCEPT' +); + +1; diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in index 06d99e9..30632f5 100644 --- a/scripts/w3mhelp.cgi.in +++ b/scripts/w3mhelp.cgi.in @@ -1,5 +1,5 @@ #!@PERL@ -# $Id: w3mhelp.cgi.in,v 1.1 2001/11/30 16:48:19 ukai Exp $ +# $Id: w3mhelp.cgi.in,v 1.2 2001/11/30 18:06:29 ukai Exp $ $helpdir="@HELP_DIR@"; unshift(@INC, $helpdir); @@ -40,12 +40,22 @@ if (-f $keymap) { local (%funckeydesc, $key, $fname, $desc); +%funcname = (%funcname, %buf_funcname, %lineedit_funcname); + +%funcdesc = (%funcdesc, %buf_funcdesc, %lineedit_funcdesc); while (($fname, $desc) = each %funcdesc) { $funckeydesc{$funcname{$fname}} = "$desc\n"; } + while (($key, $fname) = each %keyfunc) { $funckeydesc{$funcname{$fname}} .= "$key,"; } +while (($key, $fname) = each %buf_keyfunc) { + $funckeydesc{$funcname{$fname}} .= "$key,"; +} +while (($key, $fname) = each %lineedit_keyfunc) { + $funckeydesc{$funcname{$fname}} .= "$key,"; +} print <Buffer selection mode - -
k, C-pSelect previous buffer -
j, C-nSelect next buffer -
DDelete current buffer -
RETGo to the selected buffer -
-PAGE +&show_keymap("Buffer selection mode", + qw(buffer_prev buffer_next buffer_delete buffer_go)); &show_keymap("Bookmark operation", qw(ldBmark adBmark)); @@ -123,22 +126,13 @@ PAGE &show_keymap("Miscellany", qw(setAlarm execsh ldhelp ldOpt cooLst susp qquitfm quitfm)); +&show_keymap("Line-edit mode", + qw(lineedit_forward lineedit_back lineedit_backspace + lineedit_delete lineedit_kill_after lineedit_kill_before + lineedit_top lineedit_bottom lineedit_prev lineedit_next + lineedit_complete lineedit_accept)); + print <Line-edit mode - -
C-fMove cursor forward -
C-bMove cursor backward -
C-hDelete previous character -
C-dDelete current character -
C-kKill everything after cursor -
C-uKill everything before cursor -
C-aMove to the top of line -
C-eMove to the bottom of line -
C-pFetch the previous string from the history list -
C-nFetch the next string from the history list -
TAB,SPCComplete filename -
RETURNAccept -

@@ -167,6 +161,11 @@ sub show_keymap { my ($fid); my ($attr) = " WIDTH=140"; + if (defined($title{$head})) { + $head = $title{$head}; + $head =~ s/[<>&]/$htmlesc{$&}/ge; + } + print <$head -- cgit v1.2.3