hns - 日記自動生成システム - Version 2.19.9

先月 2001年09月 来月
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2001年09月11日(火) 旧暦 [n年日記]

#1 [Namazu] 2.0.7pre2

(15 号台風模様の中)
VPATH 修正: http://www.namazu.org/ml/namazu-devel-ja/msg01957.html
を使って作って見る。 (kakasi を入替えたら Text-Kakasi も入直しかな = 1.04) VPATH 修正の一部は既に入っているので
1 out of 1 hunks failed--saving rejects to nmz/Makefile.am.rej
1 out of 1 hunks failed--saving rejects to src/Makefile.am.rej

試しに --with-included-gettext 無でやって見る:

checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... yes
checking for gettext in libc... no
checking for bindtextdomain in -lintl... yes
checking for gettext in libintl... checking for gettext in -lintl... yes
yes
checking for msgfmt... /usr/local/bin/msgfmt
checking for dcgettext... no
checking for gmsgfmt... /usr/local/bin/msgfmt
checking for xgettext... /usr/local/bin/xgettext
checking for catalogs to be installed...  ja ja_JP.SJIS es fr

config.log から:

configure:6374: checking for bindtextdomain in -lintl
configure:6393: gcc -o conftest -g -O2 -Wall -pedantic   conftest.c -lintl   1>&5
configure:6409: checking for gettext in libintl
configure:6414: checking for gettext in -lintl
configure:6433: gcc -o conftest -g -O2 -Wall -pedantic   conftest.c -lintl   1>&5
configure:6472: checking for msgfmt

checking for dcgettext... no の方は -lintl が要るのでは ?:

config.log から
configure:6506: checking for dcgettext
configure:6534: gcc -o conftest -g -O2 -Wall -pedantic   conftest.c  1>&5
/tmp/ccmTkbJ9.o: In function `main':
/usr/local/src/pre2-vpath/configure:6528: undefined reference to `dcgettext'
collect2: ld returned 1 exit status
configure: failed program was:
#line 6511 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char dcgettext(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dcgettext();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_dcgettext) || defined (__stub___dcgettext)
choke me
#else
dcgettext();
#endif

; return 0; }

6442 LIBS="$ac_save_LIBS":

configure の 6419 行目で
   6415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   6416   echo $ac_n "(cached) $ac_c" 1>&6
   6417 else
   6418   ac_save_LIBS="$LIBS"
   6419 LIBS="-lintl  $LIBS"
で -lintl を付けているのに(条件が合わないのか)
   6442 LIBS="$ac_save_LIBS"
   6443 
   6444 fi
と捨てしまっている /usr/local/share/aclocal/gettext.m4 の 0.10.35 と 0.10.38 を 比べると、この辺は変更があって、(手で移動しているけれど)
+   dnl If an already present or preinstalled GNU gettext() is found,
+   dnl use it.  But if this macro is used in GNU gettext, and GNU
+   dnl gettext is already preinstalled in libintl, we update this
+   dnl libintl.  (Cf. the install rule in intl/Makefile.in.)

-   if test "$gt_cv_func_gettext_libc" = "yes" \
-      || test "$gt_cv_func_gettext_libintl" = "yes"; then
+   if test "$gt_cv_func_gnugettext_libc" = "yes" \
+      || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+           && test "$PACKAGE" != gettext; }; then

-      AC_DEFINE(HAVE_GETTEXT)
-      AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-        [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-      if test "$MSGFMT" != "no"; then
-        AC_CHECK_FUNCS(dcgettext)
-        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
..
+     AC_DEFINE(HAVE_GETTEXT, 1,
+        [Define if the GNU gettext() function is already present or preinstalled.])
これを調べる元気はちょっと出ないけれど、0.10.38 でなくて 0.10.35 を使っている理由 は何かな。

pre2 まとめ。:

   116  10:54   tar zxf /home6/tar_files/namazu-2.0.7pre2.tar.gz
   118  10:56   cd namazu-2.0.7pre2/scripts/
   119  10:56   patch -s < /home/ftp/pub/namazu/2000-0327-fast-EXCLUDE-patch
   120  10:56   cd ..
   121  10:57   zcat /home/ftp/pub/namazu/2.0.7-more-japanese-20010907.gz | patch -s -p1
   123  10:57   patch -s -p1 < ~/public_html/diary/attach/20010910-VPATH-3
   126  10:58   cd ..
   128  10:59   mkdir pre2-vpath
   129  10:59   cd pre2-vpath
   140  11:21   ../namazu-2.0.7pre2/configure --with-included-gettext
   141  11:23   time make ; time make check

All 40 tests passed

#2 [Namazu] nkf の最適化

cc -O -o nkf nkf.c
だけれど -O2 にすると、どうだろう。 まずは時間を測る方法を考えておかなくては。 namazu-dev でいいのかな。
#!/bin/sh
MANUAL=/usr/local/share/namazu/doc/ja/manual.html
TUTORIAL=/usr/local/share/namazu/doc/ja/tutorial.html

export MANUAL
export TUTORIAL

for i in 1 2 3 4 5 6 7 8 9 10
 do
 for j in 1 2 3 4 5 6 7 8 9 10
  do
  nkf $MANUAL > /dev/null
  nkf $TUTORIAL > /dev/null
  done
done
測定結果一例。(誤差の範囲で変化なし)
makoto@u ■12:21:10/010911(~/namazu)> time ./nkf-test
1.495u 3.450s 0:09.43 52.3%     0+0k 0+0io 0pf+0w
makoto@u ■13:49:43/010911(~/namazu)> time ./nkf-test
0.516u 1.943s 0:06.66 36.7%     0+0k 0+0io 0pf+0w

メール 100 日分:

mknmz -f ~/.mknmzrc-Mail -O /home6/namazu/Mail-911 --mtime -100 Mail
単に覚えということで
18751/18751 - /amd/ki.nu./export/home/makoto/Mail/uucp-host/127 [message/rfc822]
索引を書き出しています...
[基本]
日付:                Tue Sep 11 12:39:53 2001
追加された文書の数:  18,751
大きさ (bytes):      71,837,464
合計の文書数:        18,751
追加鍵語数:          554,728
合計鍵語数:          554,728
わかち書き:          module_kakasi -ieuc -oeuc -w
経過時間 (秒):       15,755
譜/秒:               1.19
系:                  netbsd
Perl:                5.006001
Namazu:              2.0.7pre1

#3 [Namazu] 文書フィルタ

どこかで読んだ気がしたが、なかなか見つからなかった ( search.namazu.org でも見つからないし)。やっと見つかった。 これを読んだ後の僕の理解 (や付け足や疑問)
  • mediatype()
    他で調べて、それが、ここに書いてある名前と一致すれば、この filter は処理を行なう
    mediatype を 自分で定義(調整)したい時には add_magic() の方の機能を使う
    の意味だろうか hnf.pl の場合は、それとは違う方法のようだ。
    text/hnf (の文字列)は、どこで定義しているのかな。
  • いつ filter が呼ばれて、いつ呼ばれないか
    Content-Type: text/yyyy
    
    で決まる時はいいとして ? いつ filter が呼ばれて、いつ呼ばれないかは、どういうしくみで決まるか ?
  • status()
    利用可能な時 yes を返す
    1/0 の方がいいと思う。
  • recursive()
    フィルタ処理後も更にフィルタ処理が必要そうな時、 1 を返す
  • add_magic()
    どうでもいい時は何を返せばいいの ?
  • filter()
     my ($orig_cfile, $contref, $weighted_str, $headings, $fields)
       = @_;
    
    のように呼ばれる。hnf.pl を見るのが分り易い。
    $orig_cfile    譜名
    $contref       内容を得る為のポインタ $$contref で中身そのものになる
                   (この中を必要に応じて書替える)
    $weighted_str
    $headings
    $fields
    
  • hnf.pl のように uri を返したりする時はどこに書けばいいか
     $fields->{'uri'} = $uri;
    
    に入れておけば良い ?

jeedosaquin.pl:

というのを一応作って見た。
次の一行目の表示も変えたい(170. を消したい) が、これはどこでやればいい ?
1. 170.make.html (点数: 2)
著者: 不明
日付: Tue, 11 Sep 2001 08:00:05
make に必要なもの 2.0 の版を作るために次のものが必要になります。 
(お名前の敬称は略させていただきます。ごめんなさい) 
名称 説明 必須 最新版 必要な版 譜名 作成・配布 入手先(例) その
他 Perl Perl 言語処
/amd/ki.nu./export/home/htdocs/software/namazu/tut/make.html 
(7,782 bytes)
$fields->{'subjec'} らしい。
いまのコードは何でもかんでも *.html を x-type: jdsq にしてしまう。
add_magic のやり方は、また別の問題 ?

#4 [Namazu] VPATH

竹迫さんが試して下さって make install する前だとうまく行かない とのこと。
作り直したもの
mknmz: 存在する索引は古い形式です。今は対応していません
FAIL: ../../namazu/tests/mknmz-2
なんて言われてしまう。これって出力先がない時だったかな。 時間切れ。きょうはおしまい。



最近の日記
2024年05月08日
comparison on ./buildsh tools
2024年05月06日
py-setuptools (python 3.11.9)
make release took 1 hours and 10 min
qemu invocation for 10.99.10
2024年05月05日
Windows 10 version
serial connection
bc bench
2024年05月04日
Trial on 10.99.10
another version (later trial) to succeed
2024年04月29日
dkim
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)