|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
||||||||||||||||||||||||||||||||||||||||||||||
2001年10月17日(水) 旧暦 [n年日記]#1 [Namazu] こわれた bzip2 形式を読むと ?I try to index some files (8000+ for that matter) and mknmz fails with a broken bzip2 compressed file. Exit code was 141.というメールが来ている。虫のような気がする。 bzip2 って何だっけ。 ( つっこみ )
#2 [Emacs] w3 が Meta tag を見ていないのかな
を w3-4.0(cvs, 2001/10/15) で見ると、文字が読めない。
telnet で取って来たら、次のようなもの
... Content-Type: text/html <!-- MHonArc v2.4.6 --> <!--X-Subject: 日本語ファイルを保存したら、文字が消えた??? --> ... <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML LANG="ja"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=EUC-JP">c-u r euc-japan しても、やはり読めない。 M-x describe-current-coding-system すると euc-japan になっていない。 Coding system for saving this buffer: J -- iso-2022-jp (alias: junet) Default coding system (for new files): J -- iso-2022-jp (alias: junet) @ 試しに 2001/07 版 + 私家版変更に戻して見たが:Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) +(nil 12) font-spatial-to-canonical("+12pt") css-expand-length("+12pt" t) css-expand-value(height "+12pt") css-parse-args(238 257) css-parse("file:/usr/local/share/default.css" nil nil)これは 2001/04/17 #3 に同じことが書いてある。default.css を変更してしのいで いたのを忘れていた。「新しい版ではこんな小細工は必要ない」かな。 こちらの古い方が快適。CharSet を何にしても読める。不思議。 w3-4.0 cvs ってメーリング・リストがないのかな。 ( つっこみ )
#3 [Network] ipnat
NetBSD/1.5E の上で作業
/etc/rc.conf に ipfilter=YES と書いておいて ipfilter を生かす。 (しかし /etc/ipf.conf は空にしておく) ipnat=YES も書いておく ... Enabling ipfilter. IP Filter: v3.4.9 initialized. Default = pass all, Logging = enabled Installing NAT rules ... 0 entries flushed from NAT table ... /etc/ipnat.conf を設定して map de0 192.168.48.120/24 -> 210.145.40.120/32 proxy port ftp ftp/tcp map de0 192.168.48.120/24 -> 210.145.40.120/32 portmap tcp/udp 10000:40000 touch /etc/ipf.conf ipnat -f /etc/ipnat.confちょっと直したりして、初めからということであれば makoto@komekome 12:22:09/011017(/var/log)# ipnat -C 3 entries flushed from NAT list makoto@komekome 12:22:12/011017(/var/log)# ipnat -f /etc/ipnat.conf makoto@komekome 12:22:18/011017(/var/log)# ipnat -ls mapped in 313 out 418 added 147 expired 146 no memory 0 bad nat 0 inuse 1 rules 3 List of active MAP/Redirect filters: map de0 192.168.48.0/24 -> 210.145.40.120/32 proxy port ftp ftp/tcp map de0 192.168.48.0/24 -> 210.145.40.120/32 portmap tcp/udp 272:40000 List of active sessions: MAP 192.168.48.105 50255 <- -> 210.145.40.120 50255 [210.145.40.114 80] makoto@komekome 12:22:23/011017(/var/log)#de0 と書いてあるものは 外側の i/f。 初め内側の ne0 と書いていて、動かないと悩んでいた。 これって最近移動してしまったという話が。 (20010801 -> 入っている /sbin/ipf) 多分
@ ipfilter:
ipnat でなくて ipfilter の方は、もう少し面倒
(これは cisco IOS の世界)
( つっこみ )
#4 [Namazu] filter が正常終了しなかった時
mknmz の 815 行目付近で、
eval '$err = ' . $var::REQUIRE_ACTIONS{$mtype} . '::filter($orig_cfile, $contref, $weighted_str, $headings, $fields);'; if ($err) { return ($file_size, $file_size, 0, "$mtype; x-error=$err"); }となっているのに、bzip2.pl の方で、 { my $fh = util::efopen("|$bzip2path -d > $tmpfile"); print $fh $$cont; }util.pl の方で、 sub efopen ($) { my ($fname) = @_; my $fh = fopen($fname) || cdie("$fname: $!\n"); return $fh; }となっていては、そこで終ってしまう。 やはり Perl 的には、正常終了で non 0, 問題がある時は undef or 0 を返す ようにした方がいい。
grep util::efopen */* |wcすると 74 箇所もある。 ところが、現在のやり方は、error message を戻したいということがあって、 そこまで変えるかという気がする。 しかし、 やはり file handle も返したい。誤り文も返したいというのは無理な注文。 (だから、今までは cdie していた) 誤り文って $! に 代入してしまえばというのはどう ? @ 試して見ているが、:
表示がうまくない。でも、一応
「file がこわれていても無視して通過する」という
目的は達成しているという説もある。
// 検出された形式: application/x-gzip @@ 部品: gzip.pl // tmpnam: index/NMZ.gzip.tmp @@ Processing gzip file ... (using '/usr/bin/gzip') gzip: stdin: unknown method 126 -- get newer version of gzip // 検出された形式: text/plain // pre_codeconv // load_document 実行後: /tmp/test/index.html.gz: 190, 0, 0, text/plain 1/2 - /tmp/test/index.html.gz は大きさが 0 なので無視しますこれでは何が問題なのかは個別に gunzip して見ないと分らないが。 ( つっこみ )
|
最近の日記 2025年02月13日 ・dvipdfmx ICC profile format spec. version 4.3.0 2025年01月29日 ・ham/wsjtx 2025年01月27日 ・wip/wsjtx 5.4.2 2025年01月25日 ・ham/wsjtx 2025年01月15日 ・今更 advent calendar | ||