diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:47 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:47 +0000 |
commit | a722a562112506c63c9b6519b8252d633534a35a (patch) | |
tree | 78dc4b8bbefa910007339970eaf004f012d2082f /scripts | |
parent | Switch upstream to Debian's w3m (diff) | |
parent | New upstream version 0.5.3+git20210102 (diff) | |
download | w3m-a722a562112506c63c9b6519b8252d633534a35a.tar.gz w3m-a722a562112506c63c9b6519b8252d633534a35a.zip |
Update upstream source from tag 'upstream/0.5.3+git20210102'
Update to upstream version '0.5.3+git20210102'
with Debian dir e89c066385156d7c9ed01b0c8a1a08e01019959d
Diffstat (limited to 'scripts')
29 files changed, 425 insertions, 240 deletions
diff --git a/scripts/.cvsignore b/scripts/.cvsignore deleted file mode 100644 index 67b6dc8..0000000 --- a/scripts/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -dirlist.cgi -w3mhelp.cgi -w3mmail.cgi -w3mhelp-funcdesc.en.pl -w3mhelp-funcdesc.ja.pl -w3mhelp-funcname.pl -w3mhelp-funcdesc-stamp -xface2xpm -Makefile diff --git a/scripts/CVS/Entries b/scripts/CVS/Entries deleted file mode 100644 index 2d1a4e5..0000000 --- a/scripts/CVS/Entries +++ /dev/null @@ -1,13 +0,0 @@ -/.cvsignore/1.10/Mon Sep 22 22:53:53 2003// -/dirlist.cgi.in/1.7/Fri Feb 7 15:06:17 2003// -/w3mhelp-funcdesc.en.pl.in/1.4/Mon Mar 22 17:03:13 2004// -/w3mhelp-funcdesc.ja.pl.in/1.4/Mon Mar 22 17:03:13 2004// -/w3mhelp-funcname.pl.in/1.3/Mon Apr 7 15:19:43 2003// -/w3mmail.cgi.in/1.14/Mon Aug 30 16:32:24 2004// -/xface2xbm.in/1.3/Mon Nov 18 17:33:01 2002// -/xface2xpm.in/1.1/Tue Apr 9 14:45:58 2002// -D/bm2menu//// -D/multipart//// -D/w3mman//// -/Makefile.in/1.11/Tue Jan 4 09:22:28 2011// -/w3mhelp.cgi.in/1.29/Tue Jan 4 09:22:28 2011// diff --git a/scripts/CVS/Repository b/scripts/CVS/Repository deleted file mode 100644 index 578c817..0000000 --- a/scripts/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -w3m/scripts diff --git a/scripts/CVS/Root b/scripts/CVS/Root deleted file mode 100644 index 121fa06..0000000 --- a/scripts/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:inu@w3m.cvs.sourceforge.net:/cvsroot/w3m diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 4da9ce5..5beb9b0 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -60,7 +60,7 @@ w3mhelp-funcname.pl: w3mhelp-funcname.pl.in ../funcname.tab $(top_srcdir)/doc/ke @cat $(srcdir)/w3mhelp-funcname.pl.in >> w3mhelp-funcname.pl @echo "done" -w3mhelp-funcdesc-stamp: $(top_srcdir)/doc/README.func $(top_srcdir)/doc-jp/README.func w3mhelp-funcdesc.en.pl.in w3mhelp-funcdesc.ja.pl.in +w3mhelp-funcdesc-stamp: $(top_srcdir)/doc/README.func $(top_srcdir)/doc-jp/README.func $(top_srcdir)/doc-de/README.func w3mhelp-funcdesc.en.pl.in w3mhelp-funcdesc.ja.pl.in w3mhelp-funcdesc.de.pl.in @echo "generating w3mhelp-funcdesc*.pl..." @for dirlang in $(DOCDIRS); do \ dir=`expr "$$dirlang" : "\(.*\):.*"`; \ @@ -87,7 +87,7 @@ install: $(LIB_TARGETS) $(HELP_TARGETS) do \ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(AUXBIN_DIR); \ done - for file in $(LIB_TARGETS); \ + for file in w3mdict.cgi $(LIB_TARGETS); \ do \ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(CGIBIN_DIR); \ done @@ -105,7 +105,7 @@ uninstall: do \ rm -f $(AUXBIN_DIR)/$$file; \ done - -for file in $(LIB_TARGETS); \ + -for file in w3mdict.cgi $(LIB_TARGETS); \ do \ rm -f $(LIB_DIR)/$$file; \ done diff --git a/scripts/bm2menu/CVS/Entries b/scripts/bm2menu/CVS/Entries deleted file mode 100644 index 448ac0a..0000000 --- a/scripts/bm2menu/CVS/Entries +++ /dev/null @@ -1,3 +0,0 @@ -/README/1.1/Thu Nov 15 00:32:14 2001// -/bm2menu.pl/1.1/Thu Nov 15 00:32:14 2001// -D diff --git a/scripts/bm2menu/CVS/Repository b/scripts/bm2menu/CVS/Repository deleted file mode 100644 index c3eaf83..0000000 --- a/scripts/bm2menu/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -w3m/scripts/bm2menu diff --git a/scripts/bm2menu/CVS/Root b/scripts/bm2menu/CVS/Root deleted file mode 100644 index 121fa06..0000000 --- a/scripts/bm2menu/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:inu@w3m.cvs.sourceforge.net:/cvsroot/w3m diff --git a/scripts/bm2menu/README b/scripts/bm2menu/README index b44f144..cc1f89b 100644 --- a/scripts/bm2menu/README +++ b/scripts/bm2menu/README @@ -1,21 +1,21 @@ bm2menu.pl - ブックマークファイル ~/.w3m/bookmark.html を変換して w3m の - ブックマークメニューとして使える様にする。 + 若<ゃ ~/.w3m/bookmark.html 紊 w3m + 若<ャ若篏帥罕 -使用法 +篏睡羈 - ~/.w3m/bookmark.html を変換して ~/.w3m/menu に追加。 + ~/.w3m/bookmark.html 紊 ~/.w3m/menu 菴遵 perl bm2menu.pl ~/.w3m/bookmark.html >> ~/.w3m/menu - 次に、~/.w3m/keymap に + 罨<~/.w3m/keymap keymap x MENU Bookmarks - の様にキーの割り当てを追加します。 + 罕若蚊綵菴遵障 - これで、キー `x' でブックマークメニューが開きます。 - メニューの操作は doc-jp/README.menu を読んでください。 + с `x' с若<ャ若障 + <ャ若篏 doc-jp/README.menu 茯с diff --git a/scripts/multipart/.cvsignore b/scripts/multipart/.cvsignore deleted file mode 100644 index db1dff2..0000000 --- a/scripts/multipart/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -multipart.cgi -Makefile diff --git a/scripts/multipart/CVS/Entries b/scripts/multipart/CVS/Entries deleted file mode 100644 index b503f2a..0000000 --- a/scripts/multipart/CVS/Entries +++ /dev/null @@ -1,6 +0,0 @@ -/.cvsignore/1.2/Mon Sep 22 22:53:53 2003// -/README/1.2/Wed Nov 21 09:21:59 2001// -/mailcap/1.1/Thu Nov 15 00:32:14 2001// -/multipart.cgi.in/1.11/Tue Feb 18 15:26:39 2003// -/Makefile.in/1.6/Tue Jan 4 09:22:28 2011// -D diff --git a/scripts/multipart/CVS/Repository b/scripts/multipart/CVS/Repository deleted file mode 100644 index cb383c6..0000000 --- a/scripts/multipart/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -w3m/scripts/multipart diff --git a/scripts/multipart/CVS/Root b/scripts/multipart/CVS/Root deleted file mode 100644 index 121fa06..0000000 --- a/scripts/multipart/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:inu@w3m.cvs.sourceforge.net:/cvsroot/w3m diff --git a/scripts/multipart/README b/scripts/multipart/README index b82f585..ed1f73d 100644 --- a/scripts/multipart/README +++ b/scripts/multipart/README @@ -1,24 +1,24 @@ -Content-Type: multipart/* を扱う local-CGI +Content-Type: multipart/* 宴 local-CGI - Content-Type: multipart/* なファイルを扱うための local-CGI です。 - 主に mailx などでメールを PAGER="w3m -m" で読む場合を想定しています。 + Content-Type: multipart/* <ゃ宴 local-CGI с + 筝祉 mailx с<若 PAGER="w3m -m" ц翫喝障 -インストール +ゃ潟鴻若 * make install - 必要なら PERL, NKF, LIBDIR を設定してください。 + 綽荀 PERL, NKF, LIBDIR 荐絎 - * mailcap を ~/.w3m/mailcap にマージ - multipart.cgi のパスに注意 + * mailcap ~/.w3m/mailcap 若 + multipart.cgi 鴻羈 - * w3m の Option Setting Panel で、 - 『保存時に Content-Transfer-Encoding をデコードする』を ON - 添付ファイルの保存時に便利です。 + * w3m Option Setting Panel с + 篆絖 Content-Transfer-Encoding 潟若 ON + 羞私<ゃ篆絖箴水с -必要なもの +綽荀 - * NKF モジュールまたは nkf - 文字コード変換や MIME ヘッダのデコードにを使ってます。 - 気にいらなければ変えてください。 + * NKF ≪吾ャ若障 nkf + 絖潟若紊 MIME 潟若篏帥c障 + 羂医 diff --git a/scripts/w3mdict.cgi b/scripts/w3mdict.cgi new file mode 100755 index 0000000..6b0e62e --- /dev/null +++ b/scripts/w3mdict.cgi @@ -0,0 +1,56 @@ +#!/bin/sh +# w3mdict.cgi - A dictd dictionary query cgi for w3m +# +# REQUIREMENTS: +# + dict client software +# + an address of a dict server, for variable ${DICT_SERVER} +# + a name of a favorite database on that server, for variable +# ${FAVORITE_DATABASE} +# OPTIONALLY: +# + locally install a dict server (eg. dictd) and a collection +# of dict databases (eg. wordnet, aka "wn") + +DICT_SERVER="localhost" +FAVORITE_DATABASE="wn" +RETURN_MESSAGE="\n\nPress 'B' to return to the previous page." +printf "Content-type: text/plain\n" +type dict \ +|| { + # Originally, we inconsiderately failed silently ... + # printf "W3m-control: BACK\n\n" + printf "\n\nERROR: dict client software not found${RETURN_MESSAGE}" + exit + } +# First, we check only our best and favorite database. This is most +# likely to give us a best defintion, and avoids displaying a long and +# cluttered page with entries from many databases. +dict --host "${DICT_SERVER}" \ + --database "${FAVORITE_DATABASE}" \ + "${QUERY_STRING}" 2>&1 \ +&& { + printf "${RETURN_MESSAGE}" + } \ +|| { + # The initial attempt failed, so let's search ALL databases + # available on the server. + dict --host "${DICT_SERVER}" \ + "${QUERY_STRING}" 2>&1 \ + && { + printf "${RETURN_MESSAGE}" + } \ + || { + # No defintions were found in any of the server's databases, so + # let's return to the favorite database in order to retrieve its + # guess of what we meant to type. Originally, for this case, we + # pushed the user's default action to be entering another word for + # a dict defintion, so the print command was: + # printf "W3m-control: DICT_WORD\n\n" + # Now, we need only print a blank line to separate the cgi header + # from the page content. + printf "\n" + dict --host "${DICT_SERVER}" \ + --database "${FAVORITE_DATABASE}" \ + "${QUERY_STRING}" 2>&1 + printf "${RETURN_MESSAGE}" + } + } diff --git a/scripts/w3mhelp-funcdesc.de.pl.in b/scripts/w3mhelp-funcdesc.de.pl.in new file mode 100644 index 0000000..11539d1 --- /dev/null +++ b/scripts/w3mhelp-funcdesc.de.pl.in @@ -0,0 +1,66 @@ +# charset +$charset = 'UTF-8'; + +# Buffer selection mode + +%buf_funcdesc = ( + 'BUF:PREV', 'Gehe zum vorherigen Punkt', + 'BUF:NEXT', 'Gehe zum n辰chsten Punkt', + 'BUF:DELETE', 'L旦sche den ausgew辰hlten Eintrag', + 'BUF:GO', 'Gehe zum ausgew辰hlten Eintrag', +); + +%lineedit_funcdesc = ( + 'LINEEDIT:FORWARD', 'Bewege Cursor vorw辰rts', + 'LINEEDIT:BACK', 'Bewege Cursor r端ckw辰rts', + 'LINEEDIT:BS', 'Vorheriges Zeichen l旦schen', + 'LINEEDIT:DEL', 'Aktuelles Zeichen l旦schen', + 'LINEEDIT:KILL_AFTER', 'L旦sche alles nach dem Cursor', + 'LINEEDIT:KILL_BEFORE', 'L旦sche alles vor dem Cursor', + 'LINEEDIT:TOP', 'Gehe zum Zeilenanfang', + 'LINEEDIT:BOTTOM', 'Gehe zum Zeilenende', + 'LINEEDIT:PREV', 'Hole den vorherigen Chronik-Eintrag', + 'LINEEDIT:NEXT', 'Hole den n辰chsten Chronik-Eintrag', + 'LINEEDIT:EDITOR', 'Bearbeite mit externem Editor', + 'LINEEDIT:COMPLETE', 'Versuche, den Dateinamen zu komplettieren', + 'LINEEDIT:ACCEPT', 'Eingabezeile annehmen', +); + +%menu_funcdesc = ( + 'MENU:SELECT', 'W辰hle Eintrag aus', + 'MENU:CLOSE', 'Schliee Men端', + 'MENU:CANCEL', 'Einen Auswahlschritt zur端ck', + 'MENU:DOWN', 'Gehe zum n辰chsten Punkt', + 'MENU:UP', 'Gehe zum vorherigen Punkt', + 'MENU:LINE_UP', 'Scrolle einen Punkt aufw辰rts', + 'MENU:LINE_DOWN', 'Scrolle einen Punkt abw辰rts', + 'MENU:TOP', 'Gehe zum ersten Punkt', + 'MENU:LAST', 'Gehe zum letzten Punkt', + 'MENU:NEXT', 'Gehe zur n辰chsten Seite', + 'MENU:PREV', 'Gehe zur vorherigen Seite', + 'MENU:SEARCH_FORE', 'Suche vorw辰rts', + 'MENU:SEARCH_BACK', 'Suche r端ckw辰rts', + 'MENU:SEARCH_NEXT', 'Suche weitere bereinstimmung', + 'MENU:SEARCH_PREV', 'Suche fr端here bereinstimmung', + 'MENU:SUSPEND', 'Zur端ckstellen', +); + +%title = ( + "Current keymap file", 'Aktuelle Datei mit Tastaturbefehlszuordnung', + "In-page Navigation", 'Navigation auf der Seite', + "Hyperlink Operations", 'Umgang mit Hyperlinks', + "File/Stream Operations", 'Umgang mit Dateien und Datenstr旦men', + "Buffer Operations", 'Umgang mit Puffern', + "Tab Operations", 'Umgang mit Reitern', + "Buffer and Tab Selection Mode", 'Puffer/Reiter-Auswahl-Modus', + "Bookmark Management", 'Lesezeichenverwaltung', + "Searches", 'Suchen', + "Dictionary Lookup", 'Abgleich mit W旦rterbuch', + "Mark Operations", 'Umgang mit Textmarken', + "Miscellaneous", 'Verschiedenes', + "User-defined key bindings", 'Benutzerdefinierte Tastaturbefehle', + "Input Line Editing Mode", 'Bearbeitung der Eingabezeile', + "Popup Menu Mode", 'Navigation in Men端s', +); + +1; diff --git a/scripts/w3mhelp-funcdesc.en.pl.in b/scripts/w3mhelp-funcdesc.en.pl.in index d854b59..b9f4ed8 100644 --- a/scripts/w3mhelp-funcdesc.en.pl.in +++ b/scripts/w3mhelp-funcdesc.en.pl.in @@ -4,44 +4,44 @@ $charset = 'US-ASCII'; # 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', + 'BUF:PREV', 'Previous item', + 'BUF:NEXT', 'Next item', + 'BUF:DELETE', 'Delete item', + 'BUF:GO', 'Select item', ); %lineedit_funcdesc = ( - 'LINEEDIT:FORWARD', 'Move cursor forward', - 'LINEEDIT:BACK', 'Move cursor backward', + 'LINEEDIT:FORWARD', 'Cursor forward', + 'LINEEDIT:BACK', '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:DEL', 'Delete character', + 'LINEEDIT:KILL_AFTER', 'Delete everything after cursor', + 'LINEEDIT:KILL_BEFORE', 'Delete everything before cursor', + 'LINEEDIT:TOP', 'Cursor to the beginning of the line', + 'LINEEDIT:BOTTOM', 'Cursor to the end of the line', 'LINEEDIT:PREV', 'Fetch the previous string from the history list', 'LINEEDIT:NEXT', 'Fetch the next string from the history list', 'LINEEDIT:EDITOR', 'Edit with external editor', - 'LINEEDIT:COMPLETE', 'Complete filename', - 'LINEEDIT:ACCEPT', 'Accept', + 'LINEEDIT:COMPLETE', 'Try to complete filename', + 'LINEEDIT:ACCEPT', 'Accept input line', ); %menu_funcdesc = ( 'MENU:SELECT', 'Select item', 'MENU:CLOSE', 'Close menu', - 'MENU:CANCEL', 'Back', - 'MENU:DOWN', 'Move to next item', - 'MENU:UP', 'Move to previous item', + 'MENU:CANCEL', 'One selection step backward', + 'MENU:DOWN', 'Move to the next item', + 'MENU:UP', 'Move to the previous item', 'MENU:LINE_UP', 'Scroll up one item', 'MENU:LINE_DOWN', 'Scroll down one item', - 'MENU:TOP', 'Go to top item', - 'MENU:LAST', 'Go to last item', - 'MENU:NEXT', 'Go to next page', - 'MENU:PREV', 'Go to previous page', - 'MENU:SEARCH_FORE', 'Search foreward', + 'MENU:TOP', 'Move to the first item', + 'MENU:LAST', 'Move to the final item', + 'MENU:NEXT', 'Go to the next page', + 'MENU:PREV', 'Go to the previous page', + 'MENU:SEARCH_FORE', 'Search forward', 'MENU:SEARCH_BACK', 'Search backward', - 'MENU:SEARCH_NEXT', 'Search next regexp', - 'MENU:SEARCH_PREV', 'Search previous regexp', + 'MENU:SEARCH_NEXT', 'Search for the next match', + 'MENU:SEARCH_PREV', 'Search for the previous match', 'MENU:SUSPEND', 'Suspend', ); diff --git a/scripts/w3mhelp-funcdesc.ja.pl.in b/scripts/w3mhelp-funcdesc.ja.pl.in index 051c888..d3b0b6f 100644 --- a/scripts/w3mhelp-funcdesc.ja.pl.in +++ b/scripts/w3mhelp-funcdesc.ja.pl.in @@ -1,66 +1,66 @@ # charset -$charset = 'EUC-JP'; +$charset = 'UTF-8'; # Buffer selection mode %buf_funcdesc = ( - 'BUF:PREV', '一つ上のバッファを選択', - 'BUF:NEXT', '一つ下のバッファを選択', - 'BUF:DELETE', '現在選択しているバッファを削除', - 'BUF:GO', '現在選択しているバッファを表示', + '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:EDITOR', '外部エディタで編集', - 'LINEEDIT:COMPLETE', 'ファイル名の補完', - 'LINEEDIT:ACCEPT', '入力終了', + 'LINEEDIT:FORWARD', '若純劻悟Щ', + 'LINEEDIT:BACK', '若純綏悟Щ', + 'LINEEDIT:BS', '絖', + 'LINEEDIT:DEL', '若純篏臀絖', + 'LINEEDIT:KILL_AFTER', '若純緇鴻', + 'LINEEDIT:KILL_BEFORE', '若純障с', + 'LINEEDIT:TOP', '茵腱糸', + 'LINEEDIT:BOTTOM', '茵悟Щ', + 'LINEEDIT:PREV', '鴻筝ゅ絖冴', + 'LINEEDIT:NEXT', '鴻罨<絖冴', + 'LINEEDIT:EDITOR', '紊c帥х隈', + 'LINEEDIT:COMPLETE', '<ゃ茖絎', + 'LINEEDIT:ACCEPT', 'ュ腟篋', ); %menu_funcdesc = ( - 'MENU:SELECT', '項目を選択', - 'MENU:CLOSE', 'メニューを閉じる', - 'MENU:CANCEL', '戻る', - 'MENU:DOWN', '一つ下の項目へ', - 'MENU:UP', '一つ上の項目へ', - 'MENU:LINE_UP', '項目を下にスクロール', - 'MENU:LINE_DOWN', '項目を上にスクロール', - 'MENU:TOP', '先頭の項目へ', - 'MENU:LAST', '最後の項目へ', - 'MENU:NEXT', '次ページの項目へ', - 'MENU:PREV', '前ページの項目へ', - 'MENU:SEARCH_FORE', '項目を下に向かって検索', - 'MENU:SEARCH_BACK', '項目を上に向かって検索', - 'MENU:SEARCH_NEXT', '次の項目を検索', - 'MENU:SEARCH_PREV', '前の項目を検索', - 'MENU:SUSPEND', 'サスペンド', + 'MENU:SELECT', '御', + 'MENU:CLOSE', '<ャ若', + 'MENU:CANCEL', '祉', + 'MENU:DOWN', '筝や', + 'MENU:UP', '筝や', + 'MENU:LINE_UP', '筝鴻若', + 'MENU:LINE_DOWN', '筝鴻若', + 'MENU:TOP', '', + 'MENU:LAST', '緇', + 'MENU:NEXT', '罨<若吾', + 'MENU:PREV', '若吾', + 'MENU:SEARCH_FORE', '筝c罎膣', + 'MENU:SEARCH_BACK', '筝c罎膣', + 'MENU:SEARCH_NEXT', '罨<罎膣', + 'MENU:SEARCH_PREV', '罎膣', + 'MENU:SUSPEND', '泣鴻潟', ); %title = ( - "Show keymap file", 'keymap ファイルを見る', - "Page/Cursor motion", 'ページ/カーソル移動', - "Hyperlink operation", 'ハイパーリンク操作', - "File/Stream operation", 'ファイル/ストリーム操作', - "Buffer operation", 'バッファ操作', - "Tab operation", 'タブ操作', - "Buffer selection mode", 'バッファ選択モード', - "Bookmark operation", 'ブックマーク操作', - "Search", '検索', - "Dictionary look-up", '辞書検索', - "Mark operation", 'マーク操作', - "Miscellany", 'その他', - "User defined keymaps", 'ユーザ定義', - "Line-edit mode", '行編集モード', - "Popup menu", 'メニュー', + "Current keymap file", 'keymap <ゃ荀', + "In-page Navigation", '若/若純腱糸', + "Hyperlink Operations", 'ゃ若潟篏', + "File/Stream Operations", '<ゃ/鴻若篏', + "Buffer Operations", '≧篏', + "Tab Operations", '帥篏', + "Buffer and Tab Selection Mode", '♂御≪若', + "Bookmark Management", '若篏', + "Searches", '罎膣', + "Dictionary Lookup", '莨御膣', + "Mark Operations", '若篏', + "Miscellaneous", '篁', + "User-defined key bindings", '若九臂', + "Input Line Editing Mode", '茵膩≪若', + "Popup Menu Mode", '<ャ', ); 1; diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in index b2fca8f..55358f8 100644 --- a/scripts/w3mhelp.cgi.in +++ b/scripts/w3mhelp.cgi.in @@ -48,7 +48,7 @@ if (defined($ENV{'QUERY_STRING'})) { } # print "tlang=$tlang\n"; eval {require "w3mhelp-funcdesc.$tlang.pl";}; - if (defined(%funcdesc)) { + if (%funcdesc) { $lang = $tlang; } } @@ -72,22 +72,26 @@ local (%funckeydesc, $key, $fname, $desc); %funcname = (%funcname, %buf_funcname, %lineedit_funcname, %menu_funcname); %funcdesc = (%funcdesc, %buf_funcdesc, %lineedit_funcdesc, %menu_funcdesc); -while (($fname, $desc) = each %funcdesc) { - $funckeydesc{$funcname{$fname}} = "$fname\n$desc\n"; +# sort for consistent order each time this is run +foreach my $fname (sort keys %funcdesc) { + $funckeydesc{$funcname{$fname}} = "$fname\n$funcdesc{$fname}\n"; } -while (($key, $fname) = each %keyfunc) { +foreach $key (sort keys %keyfunc) { $keydata{$key} && next; - $funckeydesc{$funcname{$fname}} .= "$key,"; + $funckeydesc{$funcname{$keyfunc{$key}}} .= "$key,"; } -while (($key, $fname) = each %buf_keyfunc) { - $funckeydesc{$funcname{$fname}} .= "$key,"; +foreach $key (sort keys %buf_keyfunc) { + $keydata{$key} && next; + $funckeydesc{$funcname{$buf_keyfunc{$key}}} .= "$key,"; } -while (($key, $fname) = each %lineedit_keyfunc) { - $funckeydesc{$funcname{$fname}} .= "$key,"; +foreach $key (sort keys %lineedit_keyfunc) { + $keydata{$key} && next; + $funckeydesc{$funcname{$lineedit_keyfunc{$key}}} .= "$key,"; } -while (($key, $fname) = each %menu_keyfunc) { - $funckeydesc{$funcname{$fname}} .= "$key,"; +foreach $key (sort keys %menu_keyfunc) { + $keydata{$key} && next; + $funckeydesc{$funcname{$menu_keyfunc{$key}}} .= "$key,"; } print <<HEADING; @@ -102,8 +106,7 @@ Content-Type: text/html; charset=$charset ******* <A HREF="http://w3m.sourceforge.net/">w3m</A> (WWW-wo-Miru) Version $version by -<A HREF="mailto:aito\@fw.ipsj.or.jp">A.ITO</A> ********<BR> - ***** Key assign table ***** +<A HREF="mailto:aito\@fw.ipsj.or.jp">A.ITO</A> ******** </CENTER> HEADING @@ -112,77 +115,77 @@ $q_version = $version; $q_version =~ s/[^A-Za-z0-9_\$\.\-]/sprintf('%%%02X', ord($&))/ge; $script = "<A HREF=\"$ENV{'SCRIPT_NAME'}?version=$q_version&lang="; -# doc:en_English doc-jp:ja_Japanese +# doc:en_English doc-jp:ja_Japanese doc-de:de_German for $otherlang (@docdirs) { local(@d) = split(/[:_]/, $otherlang); if ($d[1] ne $lang) { $d[1] =~ s/[^A-Za-z0-9_\$\.\-]/sprintf('%%%02X', ord($&))/ge; - print $script, $d[1], "\">$d[2] version</A>\n"; + print $script, $d[1], "\">[$d[2]]</A>\n"; } } $keymap =~ s/[<>&]/$htmlesc{$&}/ge; -$head = "Show keymap file"; +$head = 'Current keymap file'; if (defined($title{$head})) { $head = $title{$head}; $head =~ s/[<>&]/$htmlesc{$&}/ge; } print "<P><A HREF=\"$keymap\">$head</A>\n"; -&show_keymap("Page/Cursor motion", +&show_keymap('In-page Navigation', split(" ", "pgFore pgBack movR movL movD movU movR1 movL1 movD1 movU1 ldown1 lup1 shiftl shiftr col1L col1R linbeg linend ctrCsrH ctrCsrV goLine goLineF goLineL movRW movLW topA lastA nextA prevA movlistMn nextR nextL nextD nextU nextRD nextLU - undoPos redoPos")); + undoPos redoPos cursorTop cursorMiddle cursorBottom")); -&show_keymap("Hyperlink operation", +&show_keymap('Hyperlink Operations', split(" ", "followA tabA svA followI svI submitForm curURL peekURL peekIMG pginfo curlno chkURL chkWORD chkNMID rFrame extbrz linkbrz linkLst listMn linkMn accessKey")); -&show_keymap("File/Stream operation", +&show_keymap('File/Stream Operations', split(" ", "goURL gorURL tabURL tabrURL ldfile readsh pipesh pipeBuf")); -&show_keymap("Buffer operation", - split(" ", "backBf nextBf prevBf selMn selBuf vwSrc svSrc svBuf - editBf editScr reload reshape rdrwSc dispI stopI")); +&show_keymap('Buffer Operations', + split(" ", "backBf nextBf prevBf goHome selMn selBuf vwSrc svSrc + svBuf editBf editScr reload reshape rdrwSc dispI stopI")); -&show_keymap("Tab operation", +&show_keymap('Tab Operations', split(" ", "newT closeT nextT prevT tabMn tabR tabL")); -&show_keymap("Bookmark operation", +&show_keymap('Bookmark Management', split(" ", "ldBmark adBmark")); -&show_keymap("Search", +&show_keymap('Searches', split(" ", "srchfor srchbak srchnxt srchprv isrchfor isrchbak")); -&show_keymap("Dictionary look-up", +&show_keymap('Dictionary Lookup', split(" ", "dictword dictwordat")); -&show_keymap("Mark operation", +&show_keymap('Mark Operations', split(" ", "_mark nextMk prevMk reMark")); -&show_keymap("Miscellany", +&show_keymap('Miscellaneous', split(" ", "mainMn ldhelp ldOpt dispVer cooLst ldHist ldDL docCSet defCSet msgs msToggle wrapToggle execCmd setAlarm setOpt setEnv defKey reinit execsh susp qquitfm quitfm")); -&show_keymap_data("User defined keymaps"); +&show_keymap_data('User-defined key bindings'); print "<BR>\n<HR WIDTH=80%>\n"; -&show_keymap("Buffer selection mode", +&show_keymap('Buffer and Tab Selection Mode', split(" ", "buffer_next buffer_prev buffer_delete buffer_go")); print "<BR>\n<HR WIDTH=80%>\n"; -&show_keymap("Line-edit mode", +&show_keymap('Input Line Editing Mode', split(" ", "lineedit_forward lineedit_back lineedit_backspace lineedit_delete lineedit_kill_after lineedit_kill_before lineedit_top lineedit_bottom lineedit_prev lineedit_next @@ -190,7 +193,7 @@ print "<BR>\n<HR WIDTH=80%>\n"; print "<BR>\n<HR WIDTH=80%>\n"; -&show_keymap("Popup menu", +&show_keymap('Popup Menu Mode', split(" ", "menu_select menu_close menu_cancel menu_down menu_up menu_line_up menu_line_down menu_top menu_last menu_next menu_prev menu_search_fore menu_search_back menu_search_next diff --git a/scripts/w3mman/.cvsignore b/scripts/w3mman/.cvsignore deleted file mode 100644 index e867c6e..0000000 --- a/scripts/w3mman/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -w3mman -w3mman2html.cgi -w3mman.1 - -Makefile diff --git a/scripts/w3mman/CVS/Entries b/scripts/w3mman/CVS/Entries deleted file mode 100644 index 2cc31ff..0000000 --- a/scripts/w3mman/CVS/Entries +++ /dev/null @@ -1,8 +0,0 @@ -/.cvsignore/1.3/Mon Sep 22 22:53:53 2003// -/README/1.3/Wed Dec 18 16:48:02 2002// -/hlink.cgi/1.1/Thu Nov 15 00:32:14 2001// -/w3mman.1.in/1.6/Fri Apr 7 15:33:56 2006// -/w3mman.in/1.5/Fri Apr 7 15:33:56 2006// -/Makefile.in/1.5/Tue Jan 4 09:22:28 2011// -/w3mman2html.cgi.in/1.9/Tue Jan 4 09:22:28 2011// -D diff --git a/scripts/w3mman/CVS/Repository b/scripts/w3mman/CVS/Repository deleted file mode 100644 index 430e75e..0000000 --- a/scripts/w3mman/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -w3m/scripts/w3mman diff --git a/scripts/w3mman/CVS/Root b/scripts/w3mman/CVS/Root deleted file mode 100644 index 121fa06..0000000 --- a/scripts/w3mman/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:inu@w3m.cvs.sourceforge.net:/cvsroot/w3m diff --git a/scripts/w3mman/Makefile.in b/scripts/w3mman/Makefile.in index 569e2fc..ad1cffe 100644 --- a/scripts/w3mman/Makefile.in +++ b/scripts/w3mman/Makefile.in @@ -33,11 +33,13 @@ ETC_DIR = $(sysconfdir) CONF_DIR = $(sysconfdir)/$(PACKAGE) BIN_DIR = $(bindir) MAN1_DIR = $(mandir)/man1 +MAN1_DE_DIR = $(mandir)/de/man1 TARGETS = w3mman CGIBIN_TARGETS = w3mman2html.cgi MAN1_TARGETS = w3mman.1 -MAN_TARGETS = $(MAN1_TARGETS) +MAN1_DE_TARGETS = w3mman.de.1 +MAN_TARGETS = $(MAN1_TARGETS) $(MAN1_DE_TARGETS) MKDIR = mkdir -p INSTALL = @INSTALL@ @@ -53,6 +55,7 @@ install: $(TARGETS) $(CGIBIN_TARGETS) $(MAN_TARGETS) -$(MKDIR) $(DESTDIR)$(BIN_DIR) -$(MKDIR) $(DESTDIR)$(CGIBIN_DIR) -$(MKDIR) $(DESTDIR)$(MAN1_DIR) + -$(MKDIR) $(DESTDIR)$(MAN1_DE_DIR) for file in $(TARGETS); \ do \ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(BIN_DIR); \ @@ -65,6 +68,12 @@ install: $(TARGETS) $(CGIBIN_TARGETS) $(MAN_TARGETS) do \ $(INSTALL_MAN) $$file $(DESTDIR)$(MAN1_DIR); \ done + for file in $(MAN1_DE_TARGETS); \ + do \ + $(INSTALL_MAN) $$file $(DESTDIR)$(MAN1_DE_DIR); \ + f=`echo "$$file" | sed -e 's/\.de\././'`; \ + mv $(DESTDIR)$(MAN1_DE_DIR)/$$file $(DESTDIR)$(MAN1_DE_DIR)/$$f; \ + done uninstall: -for file in $(TARGETS); \ @@ -79,6 +88,11 @@ uninstall: do \ rm -f $(MAN1_DIR)/$$file; \ done + -for file in $(MAN1_DE_TARGETS); \ + do \ + f=`echo "$$file" | sed -e 's/\.de\././'`; \ + rm -f $(MAN1_DE_DIR)/$$f; \ + done clean: @@ -89,7 +103,7 @@ distclean: dist: all @-rm -fr $(distdir)/w3mman -$(MKDIR) $(distdir)/w3mman - cp Makefile README w3mman.in w3mman2html.cgi.in hlink.cgi w3mman.1.in $(distdir)/w3mman + cp Makefile README w3mman.in w3mman2html.cgi.in hlink.cgi w3mman.1.in w3mman.de.1.in $(distdir)/w3mman ( cd $(distdir); tar -cf - w3mman | GZIP='' gzip ) \ > $(distdir)/w3mman.tar.gz -rm -fr $(distdir)/w3mman diff --git a/scripts/w3mman/README b/scripts/w3mman/README index 3bcbb3b..189e9ac 100644 --- a/scripts/w3mman/README +++ b/scripts/w3mman/README @@ -1,54 +1,54 @@ w3mman - 他のマニュアルやヘッダファイルにリンクをはることができる - man コマンドの代替コマンドです。 + 篁ャ≪<ゃ潟с + man 潟潟篁f帥潟潟с -使用法 +篏睡羈 w3mman w3mman <command>[(<section>)] w3mman [<section>] <command> w3mman -k <keyword> -環境変数 +医紊 W3MMAN_W3M - 使用する w3m コマンドを指定します(デフォルトは w3m) + 篏睡 w3m 潟潟絎障( w3m) W3MMAN_MAN - 使用する man コマンドを指定します(デフォルトは man) + 篏睡 man 潟潟絎障( man) -インストール +ゃ潟鴻若 make install - 必要なら PERL, MAN, LIBDIR を設定してください。 - w3mman2html.cgi もインストールされます。 + 綽荀 PERL, MAN, LIBDIR 荐絎 + w3mman2html.cgi ゃ潟鴻若障 ================ w3mman2html.cgi -使用法 +篏睡羈 w3m file:///$LIB/w3mman2html.cgi w3m file:///$LIB/w3mman2html.cgi?<command>[(<section>)] w3m file:///$LIB/w3mman2html.cgi?man=<command>[§ion=<section>] w3m file:///$LIB/w3mman2html.cgi?keyword=<keyword> -インストール +ゃ潟鴻若 make install - 必要なら PERL, MAN, LIBDIR を設定してください。 - w3mman もインストールされます。 + 綽荀 PERL, MAN, LIBDIR 荐絎 + w3mman ゃ潟鴻若障 ================ hlink.cgi - ヘッダファイルなどにリンクを張る + <ゃ潟綣泣 -インストール +ゃ潟鴻若 - /$LIB/ にコピー - w3mman2html.cgi で使用するならば $CGI2 に設定してください。 + /$LIB/ 潟 + w3mman2html.cgi т戎 $CGI2 荐絎 diff --git a/scripts/w3mman/w3mman.1.in b/scripts/w3mman/w3mman.1.in index 1c0361d..68e3afc 100644 --- a/scripts/w3mman/w3mman.1.in +++ b/scripts/w3mman/w3mman.1.in @@ -1,4 +1,4 @@ -.TH W3MMAN 1 "Nov 5, 2005" +.TH W3MMAN 1 "2016-07-13" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -12,36 +12,54 @@ .\" .sp <n> insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME -w3mman \- an interface to the on-line reference manuals by w3m(1) +w3mman \- an interface to the on-line reference manuals via w3m(1) .SH SYNOPSIS +.\" mh 2016-07-04: "page" is an optional argument. +.\" Started without it, w3mman displays a form that allows selection +.\" of a manual page according to section, name and keyword. +.\" Therefore square brackets introduced .B w3mman -.RI "[-M " path ] " " [ section ] " page" +[ +.BI \-M " path" +] [ [ +.I section +] +.I page +] .br .B w3mman -.RI "[-M " path "] -k " keyword +[ +.BI \-M " path" +] [ +.I section +] +.BI \-k " keyword" .br .B w3mman -.RI -l " file +.BI \-l " file" +.br .SH DESCRIPTION +.\" mh 2016-07-04 text edited. This section shall deliver +.\" more information than section NAME .B w3mman -is the system's manual pager by -.BR w3m (1). +is a Perl script that uses +.BR w3m (1) +to serve as a pager for on-line reference manuals. .SH OPTIONS A summary of options is included below. .TP .BI \-M " path" -Specify +Specify .I path -as MANPATH. +as alternative MANPATH to use. .TP .BI \-k " keyword" -Specify -.I keyword. +Specify \fIkeyword\fP. .TP .BI \-l " file" -Specify a -.I file. +Specify a \fIfile\fP. .SH ENVIRONMENT +Two variables are available for debugging. .TP .B W3MMAN_W3M If W3MMAN_W3M is set, its value is used instead of @W3M@. @@ -51,7 +69,7 @@ If W3MMAN_MAN is set, its value is used instead of @MAN@. .SH FILES .TP .I @libexecdir@/@PACKAGE@/cgi-bin/w3mman2html.cgi -convert manual page to html. +manual page to HTML converter. .SH SEE ALSO .BR man (1), .BR w3m (1). diff --git a/scripts/w3mman/w3mman.de.1.in b/scripts/w3mman/w3mman.de.1.in new file mode 100644 index 0000000..d6c5a44 --- /dev/null +++ b/scripts/w3mman/w3mman.de.1.in @@ -0,0 +1,71 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH W3MMAN 1 2016\-07\-13 +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp <n> insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +w3mman \- eine Schnittstelle zur Anzeige von Online\-Referenzhandb端chern durch +w3m(1) +.SH SYNOPSIS +.\" mh 2016-07-04: "page" is an optional argument. +.\" Started without it, w3mman displays a form that allows selection +.\" of a manual page according to section, name and keyword. +.\" Therefore square brackets introduced +\fBw3mman\fP [ \fB\-M\fP \fIPfad\fP ] [ \fIAbschnitt\fP ] [ \fISeite\fP ] +.br +\fBw3mman\fP [\fB\-M\fP \fIPfad\fP] \fB\-k\fP \fIStichwort\fP +.br +\fBw3mman\fP \fB\-l\fP \fIDatei\fP +.br +.SH BESCHREIBUNG +.\" mh 2016-07-04 text edited. This section shall deliver +.\" more information than section NAME +\fBw3mman\fP ist ein Perl\-Skript, welches auf \fBw3m\fP(1) zur端ckgreift, um als +Betrachter f端r Online\-Referenzhandb端cher zu dienen. +.SH OPTIONEN +Es folgt eine Zusammenfassung der Optionen. +.TP +\fB\-M\fP\fI Pfad\fP +Suchpfad f端r Handbuchseiten auf \fIPfad\fP setzen +.TP +\fB\-k\fP \fIStichwort\fP +zum \fIStichwort\fP passende Handbuchseiten anzeigen +.TP +\fB\-l\fP \fIDatei\fP +die Handbuchseiten\-Datei \fIDatei\fP anzeigen +.SH UMGEBUNGSVARIABLEN +Zur Fehleranalyse stehen zwei Variablen zur Verf端gung. +.TP +\fBW3MMAN_W3M\fP +Ist W3MMAN_W3M gesetzt, wird ihr Wert anstelle von @W3M@ verwendet. +.TP +\fBW3MMAN_MAN\fP +Ist W3MMAN_MAN gesetzt, wird ihr Wert anstelle von @MAN@ verwendet. +.SH DATEIEN +.TP +\fI@libexecdir@/@PACKAGE@/cgi\-bin/w3mman2html.cgi\fP +Skript, welches Handbuchseiten in HTML konvertiert +.SH "SIEHE AUCH" +\fBman\fP(1), \fBw3m\fP(1). +.SH AUTOR +Diese Handbuchseite wurde von Fumitoshi UKAI <ukai@debian.or.jp> f端r +Debian GNU / Linux geschrieben, sie kann aber auch auf anderen Systemen +verwendet werden. +Die deutsche bersetzung wurde 2016 von +.UR markus.hiereth@freenet.de +Markus Hiereth +.UE +erstellt. diff --git a/scripts/w3mman/w3mman.in b/scripts/w3mman/w3mman.in index 6a27e70..061cb1f 100644 --- a/scripts/w3mman/w3mman.in +++ b/scripts/w3mman/w3mman.in @@ -7,7 +7,7 @@ $SCRIPT = 'file:///$LIB/w3mman2html.cgi'; sub usage { ($_ = $0) =~ s@.*/@@; print STDERR "$_ [-M <path>] [[<section>] <command>]\n"; - print STDERR "$_ [-M <path>] [-k <keyword>]\n"; + print STDERR "$_ [-M <path>] [<section>] [-k <keyword>]\n"; print STDERR "$_ [-l <file>]\n"; exit 1; } @@ -20,19 +20,23 @@ while (@ARGV) { $ENV{'MANPATH'} = shift @ARGV; } elsif (/^-k$/) { @ARGV || &usage(); - $query = "?keyword=" . &form_encode(shift @ARGV); - } elsif (/^-l$/) { - @ARGV || &usage(); - $query = "?quit=ok&local=" . &form_encode(shift @ARGV); + if ( $query eq "" ) { $query = "?quit=ok"; } + $query .= "&keyword=" . &form_encode(shift @ARGV); + } elsif (/^-l$/ || /\//) { + if (/^-l$/) { + @ARGV || &usage(); + $_ = shift @ARGV; + } + $query = "?quit=ok&local=" . &form_encode($_); $query .= "&pwd=" . &form_encode($ENV{'PWD'}); } elsif (/^-/) { &usage(); - } elsif (/^\d/ || $_ eq 'n') { - @ARGV || &usage(); - $query = "?quit=ok&man=" . &form_encode(shift @ARGV); + } elsif (/^\d/ || $_ eq 'n' || $_ eq 'l') { + if ( $query eq "" ) { $query = "?quit=ok"; } $query .= "§ion=" . &form_encode($_); } else { - $query = "?quit=ok&man=" . &form_encode($_); + if ( $query eq "" ) { $query = "?quit=ok"; } + $query .= "&man=" . &form_encode($_); } } diff --git a/scripts/w3mman/w3mman2html.cgi.in b/scripts/w3mman/w3mman2html.cgi.in index f430307..2d326a9 100644 --- a/scripts/w3mman/w3mman2html.cgi.in +++ b/scripts/w3mman/w3mman2html.cgi.in @@ -23,18 +23,23 @@ if ((! $query{"man"}) && (! $query{"local"})) { if ($query{"keyword"}) { $keyword = $query{"keyword"}; $k = &html_quote($keyword); + if ($query{"section"}) { + $section = $query{"section"}; + $sectionopt = "-s $section "; + } else { + $sectionopt = ""; + } print <<EOF; Content-Type: text/html <html> -<head><title>man -k $k</title></head> +<head><title>man $sectionopt-k $k</title></head> <body> -<h2>man -k <b>$k</b></h2> +<h2>man $sectionopt-k <b>$k</b></h2> <ul> EOF $keyword =~ s:([^-\w\200-\377.,])::g; - open(F, "$MAN -k $keyword 2> /dev/null |"); - @line = (); + open(F, "$MAN $sectionopt -k $keyword 2> /dev/null |"); while(<F>) { chop; $_ = &html_quote($_); @@ -59,10 +64,10 @@ Content-Type: text/html <body> <form action="$CGI"> <table> -<tr><td>Manual:<td><input name=man> -<tr><td>Section:<td><input name=section> -<tr><td>Keyword:<td><input name=keyword> -<tr><td><td><input type=submit> <input type=reset> +<tr><td>Manual:<td><input name=man /> +<tr><td>Section:<td><input name=section /> +<tr><td>Keyword:<td><input name=keyword /> +<tr><td><td><input type=submit /> <input type=reset /> </table> </form> </body> @@ -76,7 +81,7 @@ if ($query{"local"}) { if (! ($file =~ /^\//)) { $file = $query{"pwd"} . '/' . $file; } - open(F, "MAN_KEEP_FORMATTING=1 $MAN -l $file 2> /dev/null |"); + open(F, "MAN_KEEP_FORMATTING=1 $MAN $file 2> /dev/null |"); } else { $man = $query{"man"}; if ($man =~ s/\((\w+)\)$//) { @@ -126,12 +131,14 @@ while(<F>) { s/\&/\&/g; s/\</\</g; s/\>/\>/g; + # non ASCII UTF-8 codepoint + my $utf8="[\300-\337][\200-\277]|[\340-\357][\200-\277]{2}|[\360-\367][\200-\277]{3}|[\370-\373][\200-\277]{4}|[\374\375][\200-\277]{5}"; - s@([\200-\377].)(\010{1,2}\1)+@<b>$1</b>@g; + s@($utf8)(\010\1)+@<b>$1</b>@g; s@(\&\w+;|.)(\010\1)+@<b>$1</b>@g; - s@__\010{1,2}((\<b\>)?[\200-\377].(\</b\>)?)@<u>$1</u>@g; + s@_\010((\<b\>)?($utf8)(\</b\>)?)@<u>$1</u>@g; s@_\010((\<b\>)?(\&\w+\;|.)(\</b\>)?)@<u>$1</u>@g; - s@((\<b\>)?[\200-\377].(\</b\>)?)\010{1,2}__@<u>$1</u>@g; + s@((\<b\>)?($utf8)(\</b\>)?)\010_@<u>$1</u>@g; s@((\<b\>)?(\&\w+\;|.)(\</b\>)?)\010_@<u>$1</u>@g; s@.\010(.)@$1@g; @@ -156,7 +163,7 @@ EOF } s@(http|ftp)://[\w.\-/~]+[\w/]@<a href="$&">$&</a>@g; - s@(\W)(mailto:)?(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@$1<a href="mailto:$3">$2$3</a>@g; + s@\b(mailto:|)(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@<a href="mailto:$2">$1$2</a>@g; s@(\W)(\~?/[\w.][\w.\-/~]*)@$1 . &file_ref($2)@ge; s@(include(<\/?[bu]\>|\s)*\<)([\w.\-/]+)@$1 . &include_ref($3)@ge; if ($prev && m@^\s*(\<[bu]\>)*(\w[\w.\-]*)(\</[bu]\>)*(\([\dm]\w*\))@) { @@ -220,7 +227,7 @@ sub is_command { local($p); (! -d && -x) || return 0; - if (! defined(%PATH)) { + if (! %PATH) { for $p (split(":", $ENV{'PATH'})) { $p =~ s@/+$@@; $PATH{$p} = 1; |