OSDN Git Service

LDP: Address fuzzy changes (search)
authorAkihiro Motoki <amotoki@gmail.com>
Mon, 5 Apr 2021 21:51:02 +0000 (06:51 +0900)
committerAkihiro Motoki <amotoki@gmail.com>
Mon, 5 Apr 2021 21:55:29 +0000 (06:55 +0900)
manual/LDP_man-pages/draft/man3/bsearch.3
manual/LDP_man-pages/draft/man3/hsearch.3
manual/LDP_man-pages/draft/man3/lsearch.3
manual/LDP_man-pages/draft/man3/qsort.3
manual/LDP_man-pages/draft/man3/tsearch.3 [new file with mode: 0644]
manual/LDP_man-pages/po4a/search/po/ja.po
manual/LDP_man-pages/stats/search
manual/LDP_man-pages/untrans.html

index 5bc79c7..20effdc 100644 (file)
@@ -75,7 +75,7 @@ T}    Thread safety   MT\-Safe
 .sp 1
 .SH 準拠
 POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
-.SH EXAMPLES
+.SH 
 以下の例は、 \fBqsort\fP(3)  を使って構造体の配列の並び換えを行った後、 所望の要素を \fBbsearch\fP()
 を使って取得するものである。
 .PP
index 4176343..39cb7e1 100644 (file)
@@ -61,7 +61,7 @@ hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r \- ハッシュテ
 .PP
 \fBvoid hdestroy(void);\fP
 .PP
-\fB#define _GNU_SOURCE\fP         /* See feature_test_macros(7) */
+\fB#define _GNU_SOURCE\fP         /* feature_test_macros(7) 参照 */
 \fB#include <search.h>\fP
 .PP
 \fBint hcreate_r(size_t \fP\fInel\fP\fB, struct hsearch_data *\fP\fIhtab\fP\fB);\fP
@@ -90,11 +90,10 @@ hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r \- ハッシュテ
 で示されるテーブルを対象として動作する。 \fIhtab\fP が指し示す構造体は、 \fBhcreate_r\fP()  を初めて呼び出す前に 0
 で埋めておかなければならない。
 .PP
-The function \fBhdestroy\fP()  frees the memory occupied by the hash table that
-was created by \fBhcreate\fP().  After calling \fBhdestroy\fP(), a new hash table
-can be created using \fBhcreate\fP().  The \fBhdestroy_r\fP()  function performs
-the analogous task for a hash table described by \fI*htab\fP, which was
-previously created using \fBhcreate_r\fP().
+\fBhdestroy\fP()  関数は、 \fBhcreate\fP()  で作成されたハッシュテーブルが占有していたメモリーを解放する。
+ハッシュテーブルによって占有されていたメモリーを解放し、 新しいテーブルを作成できるようにする。 \fBhdestroy\fP()  を呼び出すと、その後は
+\fBhcreate\fP()  を使って新しいハッシュテーブルを作成することができる。 \fBhdestroy_r\fP()  関数は、同様の処理を、それ以前に
+\fBhcreate_r\fP()  を使って作成した \fI*htab\fP で示されるハッシュテーブルに対して実行する。
 .PP
 \fBhsearch\fP()  関数は、\fIitem\fP と同じキーを持つ項目をハッシュテーブルから
 検索し、項目が見つかった場合にはその項目へのポインターを返す (「同じ」かどうかは \fBstrcmp\fP(3)  を使って判定する)。
@@ -143,7 +142,7 @@ NULL を返す。 エラーとなるのは、 \fIaction\fP が \fBENTER\fP で
 \fIaction\fP が \fBFIND\fP で、 \fIkey\fP がテーブル内に見つからなかった。
 .PP
 .\" PROX.1-2001, POSIX.1-2008
-POSIX.1 specifies only the \fBENOMEM\fP error.
+POSIX.1 が規定しているのは、エラー \fBENOMEM\fP だけである。
 .SH 属性
 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
@@ -165,11 +164,10 @@ T{
 T}     Thread safety   MT\-Safe race:htab
 .TE
 .SH 準拠
-The functions \fBhcreate\fP(), \fBhsearch\fP(), and \fBhdestroy\fP()  are from SVr4,
-and are described in POSIX.1\-2001 and POSIX.1\-2008.
+関数 \fBhcreate\fP(), \fBhsearch\fP(), \fBhdestroy\fP()  は SVr4 から導入されたもので、POSIX.1\-2001
+と POSIX.1\-2008 に記述されている。
 .PP
-The functions \fBhcreate_r\fP(), \fBhsearch_r\fP(), and \fBhdestroy_r\fP()  are GNU
-extensions.
+関数 \fBhcreate_r\fP(), \fBhsearch_r\fP(), \fBhdestroy_r\fP() は GNU による拡張である。
 .SH 注意
 通常、ハッシュテーブルの実装は、衝突を最小限にするために テーブルに十分な空き領域がある場合に効率がよくなる。 このため、普通は、 \fInel\fP
 を、呼び出し側がテーブルに格納しようと思っている エントリーの最大数より少なくとも 25% は大きな値にすべきである。
@@ -185,7 +183,7 @@ SVr4 と POSIX.1\-2001 の規定では、 \fIaction\fP は検索が失敗した
 glibc の実装はこの規格に違反しており、 この状況で、指定された \fIkey\fP に対応する \fIdata\fP が更新される。
 .PP
 ハッシュテーブルエントリーの追加はできるが、削除ができない。
-.SH EXAMPLES
+.SH 
 次のプログラムは、ハッシュテーブルに 24 個の項目を挿入し、 それからそのうちのいくつかを表示する。
 .PP
 .EX
@@ -210,11 +208,10 @@ main(void)
 
     for (int i = 0; i < 24; i++) {
         e.key = data[i];
-        /* data is just an integer, instead of a
-           pointer to something */
+        /* データは、ポインターではなく、単なる整数値である。 */
         e.data = (void *) i;
         ep = hsearch(e, ENTER);
-        /* there should be no failures */
+        /* エラーは起こらないはずである。 */
         if (ep == NULL) {
             fprintf(stderr, "entry failed\en");
             exit(EXIT_FAILURE);
@@ -222,8 +219,8 @@ main(void)
     }
 
     for (int i = 22; i < 26; i++) {
-        /* print two entries from the table, and
-           show that two are not in the table */
+        /* テーブルにある 2 つのエントリーを表示し、
+           あとの 2 つがテーブルにないことを示す。 */
         e.key = data[i];
         ep = hsearch(e, FIND);
         printf("%9.9s \-> %9.9s:%d\en", e.key,
index 6a6ce7e..3e9cca9 100644 (file)
@@ -73,8 +73,7 @@ T}    Thread safety   MT\-Safe
 .TE
 .sp 1
 .SH 準拠
-POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.  Present in libc since
-libc\-4.6.27.
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD. libc には libc\-4.6.27 以降で実装されている。
 .SH バグ
 関数の名前の選び方がよくない。
 .SH 関連項目
index 72cefc1..946d420 100644 (file)
@@ -103,9 +103,8 @@ T}  Thread safety   MT\-Safe
 .SH 準拠
 \fBqsort\fP(): POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
 .SH 注意
-To compare C strings, the comparison function can call \fBstrcmp\fP(3), as
-shown in the example below.
-.SH EXAMPLES
+C の文字列を比較する場合、以下の例にあるように比較関数で \fBstrcmp\fP(3) を呼び出すこともできる。
+.SH 例
 使用例については、 \fBbsearch\fP(3)  にある例を参照すること。
 .PP
 以下のプログラムに別の使用例を示す。このプログラムは、 コマンドライン引き数で指定された文字列の並び換えを行う。
diff --git a/manual/LDP_man-pages/draft/man3/tsearch.3 b/manual/LDP_man-pages/draft/man3/tsearch.3
new file mode 100644 (file)
index 0000000..1bf5447
--- /dev/null
@@ -0,0 +1,240 @@
+.\" Copyright 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 ishikawa, keisuke
+.\"         all rights reserved.
+.\" Translated Tue Mar  9 08:21:04 JST 1999
+.\"         by ishikawa, keisuke <ishikawa@sgk.gr.jp>
+.\" Updated & Modified Sun Jan 20 11:31:46 JST 2002
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH TSEARCH 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+tsearch, tfind, tdelete, twalk, tdestroy \- 二分探索木 (binary search tree) の操作
+.SH 書式
+.nf
+\fB#include <search.h>\fP
+.PP
+\fBtypedef enum { preorder, postorder, endorder, leaf } VISIT;\fP
+.PP
+\fBvoid *tsearch(const void *\fP\fIkey\fP\fB, void **\fP\fIrootp\fP\fB,\fP
+\fB                int (*\fP\fIcompar\fP\fB)(const void *, const void *));\fP
+.PP
+\fBvoid *tfind(const void *\fP\fIkey\fP\fB, void *const *\fP\fIrootp\fP\fB,\fP
+\fB                int (*\fP\fIcompar\fP\fB)(const void *, const void *));\fP
+.PP
+\fBvoid *tdelete(const void *\fP\fIkey\fP\fB, void **\fP\fIrootp\fP\fB,\fP
+\fB                int (*\fP\fIcompar\fP\fB)(const void *, const void *));\fP
+.PP
+\fBvoid twalk(const void *\fP\fIroot\fP\fB,\fP
+\fB                void (*\fP\fIaction\fP\fB)(const void *\fP\fInodep\fP\fB, VISIT \fP\fIwhich\fP\fB,\fP
+\fB                               int \fP\fIdepth\fP\fB));\fP
+.PP
+\fB#define _GNU_SOURCE\fP         /* feature_test_macros(7) 参照 */
+\fB#include <search.h>\fP
+.PP
+\fBvoid twalk_r(const void *\fP\fIroot\fP\fB,\fP
+\fB                void (*\fP\fIaction\fP\fB)(const void *\fP\fInodep\fP\fB, VISIT \fP\fIwhich\fP\fB,\fP
+\fB                               void *\fP\fIclosure\fP\fB),\fP
+\fB                void *\fP\fIclosure\fP\fB);\fP
+.PP
+\fBvoid tdestroy(void *\fP\fIroot\fP\fB, void (*\fP\fIfree_node\fP\fB)(void *\fP\fInodep\fP\fB));\fP
+.fi
+.SH 説明
+\fBtsearch\fP(), \fBtfind\fP(), \fBtwalk\fP(), \fBtdelete\fP()  は 二分探索木を操作する関数である。
+これらの関数は Knuth (6.2.2) Algorithm T に基づいている。 木構造における各ノードの最初のフィールドは、対応するデータ
+アイテムへのポインターである。 (参照先のデータは、呼び出しプログラムで用意する。)  \fIcompar\fP は比較ルーチンへのポインターである。
+比較ルーチンは、アイテムへのポインター 2 つを引き数に持つ。 比較ルーチンの返り値は、1 つ目のアイテムが 2 つ目のアイテムよりも
+「小さい、等しい、大きい」によって、 「負、0、正」の整数値でなければならない。
+.PP
+\fBtsearch\fP()  searches the tree for an item.  \fIkey\fP points to the item to
+be searched for.  \fIrootp\fP points to a variable which points to the root of
+the tree.  If the tree is empty, then the variable that \fIrootp\fP points to
+should be set to NULL.  If the item is found in the tree, then \fBtsearch\fP()
+returns a pointer to the corresponding tree node.  (In other words,
+\fBtsearch\fP()  returns a pointer to a pointer to the data item.)  If the item
+is not found, then \fBtsearch\fP()  adds it, and returns a pointer to the
+corresponding tree node.
+.PP
+\fBtfind\fP()  は、 \fBtsearch\fP()  に似ているが、 アイテムが見つからなかった場合 NULL を返す点が異なる。
+.PP
+\fBtdelete\fP()  は木構造からアイテムを削除する。 引き数は \fBtsearch\fP()  と同じである。
+.PP
+\fBtwalk\fP()  は、二分木を深さ優先 (depth\-first) で、 左から右にたどっていく関数である。 \fIroot\fP
+は起点となるノードへのポインターである。 \fIroot\fP に根以外のノードを指定すると、部分木が対象となる。 \fBtwalk\fP()
+は、ノードを訪れる度にユーザー関数 \fIaction\fP を呼び出す (内部ノードに対しては 3 回、葉に対しては 1 回呼び出しが行われる)。
+\fIaction\fP には以下の順に 3 つの引き数が与えられる。 最初の引き数は訪れたノードへのポインターである。 ノードの構造体は規定されていないが、
+ポインターを要素へのポインターのポインターにキャストし、 ノードに格納された要素にアクセスすることができる。
+アプリケーションは、この引き数が指す構造体を変更してはならない。 2 番目の引き数には、内部ノードの場合は訪問回数に応じて \fBpreorder\fP,
+\fBpostorder\fP, \fBendorder\fP のいずれかの整数が、 葉を最初に訪れた場合は \fBleaf\fP の値が渡される (これらのシンボルは
+\fI<search.h>\fP で定義されている)。  3 番目の引き数はノードの深さで、根の場合は深さ 0 である。
+.PP
+(より一般的には、\fBpreorder\fP, \fBpostorder\fP, \fBendorder\fP は \fBpreorder\fP, \fBinorder\fP,
+\fBpostorder\fP として知られている: それぞれ、子要素を辿る前・最初の子要素を辿った後かつ 2 番目の子要素を辿る前・
+子要素を辿った後ということを表している。 よって \fBpost\%order\fP という名前を選ぶのは少し紛らわしい。)
+.PP
+\fBtwalk_r\fP()  is similar to \fBtwalk\fP(), but instead of the \fIdepth\fP
+argument, the \fIclosure\fP argument pointer is passed to each invocation of
+the action callback, unchanged.  This pointer can be used to pass
+information to and from the callback function in a thread\-safe fashion,
+without resorting to global variables.
+.PP
+\fBtdestroy\fP()  は \fIroot\fP が指す木構造全体を削除し、 \fBtsearch\fP()  関数で確保されたリソースを全て解放する。
+木構造の各ノードについて、関数 \fIfree_node\fP が呼び出される。 データへのポインターがこの関数の引き数として渡される。
+そのような動作が必要でなければ、 \fIfree_node\fP は何もしない関数へのポインターでなければならない。
+.SH 返り値
+\fBtsearch\fP()  returns a pointer to a matching node in the tree, or to the
+newly added node, or NULL if there was insufficient memory to add the item.
+\fBtfind\fP()  returns a pointer to the node, or NULL if no match is found.  If
+there are multiple items that match the key, the item whose node is returned
+is unspecified.
+.PP
+\fBtdelete\fP()  returns a pointer to the parent of the node deleted, or NULL
+if the item was not found.  If the deleted node was the root node,
+\fBtdelete\fP()  returns a dangling pointer that must not be accessed.
+.PP
+\fIrootp\fP が NULL の場合、 \fBtsearch\fP(), \fBtfind\fP(), \fBtdelete\fP()  は NULL を返す。
+.SH バージョン
+\fBtwalk_r\fP() は glibc バージョン 2.30 以降で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtsearch\fP(),
+\fBtfind\fP(),
+.br
+\fBtdelete\fP()
+T}     Thread safety   MT\-Safe race:rootp
+T{
+\fBtwalk\fP()
+T}     Thread safety   MT\-Safe race:root
+T{
+\fBtwalk_r\fP()
+T}     Thread safety   MT\-Safe race:root
+T{
+\fBtdestroy\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4.  The functions \fBtdestroy\fP()  and
+\fBtwalk_r\fP()  are GNU extensions.
+.SH 注意
+\fBtwalk\fP()  は根へのポインターを引き数にとるが、 ほかの関数は根へのポインターへのポインターである。
+.PP
+\fBtdelete\fP()  は、削除したノードの使用していたメモリーを解放するが、
+ノードに対応するデータのメモリーは、ユーザーが解放しなければならない。
+.PP
+下のプログラム例は、ユーザー関数が "endorder" か "leaf" を引き数にして 呼び出されて以降は、 \fBtwalk\fP()
+がそのノードを参照しないことを前提としている。 これは GNU ライブラリの実装では機能するが、System V のマニュアルには存在しない。
+.SH 例
+以下のプログラムは 12 個の乱数を二分木に挿入した後、 挿入した数を順番に出力する (挿入の際、重複した乱数は 1 つにまとめられる)。
+.PP
+.EX
+#define _GNU_SOURCE     /* Expose declaration of tdestroy() */
+#include <search.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+static void *root = NULL;
+
+static void *
+xmalloc(size_t n)
+{
+    void *p;
+    p = malloc(n);
+    if (p)
+        return p;
+    fprintf(stderr, "insufficient memory\en");
+    exit(EXIT_FAILURE);
+}
+
+static int
+compare(const void *pa, const void *pb)
+{
+    if (*(int *) pa < *(int *) pb)
+        return \-1;
+    if (*(int *) pa > *(int *) pb)
+        return 1;
+    return 0;
+}
+
+static void
+action(const void *nodep, VISIT which, int depth)
+{
+    int *datap;
+
+    switch (which) {
+    case preorder:
+        break;
+    case postorder:
+        datap = *(int **) nodep;
+        printf("%6d\en", *datap);
+        break;
+    case endorder:
+        break;
+    case leaf:
+        datap = *(int **) nodep;
+        printf("%6d\en", *datap);
+        break;
+    }
+}
+
+int
+main(void)
+{
+    int **val;
+
+    srand(time(NULL));
+    for (int i = 0; i < 12; i++) {
+        int *ptr = xmalloc(sizeof(*ptr));
+        *ptr = rand() & 0xff;
+        val = tsearch(ptr, &root, compare);
+        if (val == NULL)
+            exit(EXIT_FAILURE);
+        else if (*val != ptr)
+            free(ptr);
+    }
+    twalk(root, action);
+    tdestroy(root, free);
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBbsearch\fP(3), \fBhsearch\fP(3), \fBlsearch\fP(3)  \fBqsort\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 585b564..a90db7b 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2021-03-12 14:01+0900\n"
-"PO-Revision-Date: 2021-03-26 13:50+0900\n"
+"PO-Revision-Date: 2021-04-02 21:59+0900\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -24,10 +24,9 @@ msgstr "BSEARCH"
 #. type: TH
 #: build/C/man3/bsearch.3:31 build/C/man3/hsearch.3:35 build/C/man3/qsort.3:37
 #: build/C/man3/tsearch.3:25
-#, fuzzy, no-wrap
-#| msgid "2003-11-01"
+#, no-wrap
 msgid "2020-11-01"
-msgstr "2003-11-01"
+msgstr "2020-11-01"
 
 #. type: TH
 #: build/C/man3/bsearch.3:31 build/C/man3/hsearch.3:35
@@ -201,13 +200,12 @@ msgstr "準拠"
 #. type: Plain text
 #: build/C/man3/bsearch.3:92
 msgid "POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD."
-msgstr ""
+msgstr "POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD."
 
 #. type: SH
 #: build/C/man3/bsearch.3:92 build/C/man3/hsearch.3:299
 #: build/C/man3/qsort.3:121 build/C/man3/tsearch.3:266
-#, fuzzy, no-wrap
-#| msgid "EXAMPLE"
+#, no-wrap
 msgid "EXAMPLES"
 msgstr "例"
 
@@ -262,15 +260,7 @@ msgstr "#define nr_of_months (sizeof(months)/sizeof(months[0]))\n"
 
 #. type: Plain text
 #: build/C/man3/bsearch.3:121
-#, fuzzy, no-wrap
-#| msgid ""
-#| "static int\n"
-#| "compmi(const void *m1, const void *m2)\n"
-#| "{\n"
-#| "    struct mi *mi1 = (struct mi *) m1;\n"
-#| "    struct mi *mi2 = (struct mi *) m2;\n"
-#| "    return strcmp(mi1-E<gt>name, mi2-E<gt>name);\n"
-#| "}\n"
+#, no-wrap
 msgid ""
 "static int\n"
 "compmi(const void *m1, const void *m2)\n"
@@ -283,8 +273,8 @@ msgstr ""
 "static int\n"
 "compmi(const void *m1, const void *m2)\n"
 "{\n"
-"    struct mi *mi1 = (struct mi *) m1;\n"
-"    struct mi *mi2 = (struct mi *) m2;\n"
+"    const struct mi *mi1 = m1;\n"
+"    const struct mi *mi2 = m2;\n"
 "    return strcmp(mi1-E<gt>name, mi2-E<gt>name);\n"
 "}\n"
 
@@ -300,24 +290,17 @@ msgid ""
 "        struct mi key;\n"
 "        struct mi *res;\n"
 msgstr ""
+"int\n"
+"main(int argc, char **argv)\n"
+"{\n"
+"    qsort(months, nr_of_months, sizeof(months[0]), compmi);\n"
+"    for (int i = 1; i E<lt> argc; i++) {\n"
+"        struct mi key;\n"
+"        struct mi *res;\n"
 
 #. type: Plain text
 #: build/C/man3/bsearch.3:140
-#, fuzzy, no-wrap
-#| msgid ""
-#| "    qsort(months, nr_of_months, sizeof(struct mi), compmi);\n"
-#| "    for (i = 1; i E<lt> argc; i++) {\n"
-#| "        struct mi key, *res;\n"
-#| "        key.name = argv[i];\n"
-#| "        res = bsearch(&key, months, nr_of_months,\n"
-#| "                      sizeof(struct mi), compmi);\n"
-#| "        if (res == NULL)\n"
-#| "            printf(\"\\(aq%s\\(aq: unknown month\\en\", argv[i]);\n"
-#| "        else\n"
-#| "            printf(\"%s: month #%d\\en\", res-E<gt>name, res-E<gt>nr);\n"
-#| "    }\n"
-#| "    exit(EXIT_SUCCESS);\n"
-#| "}\n"
+#, no-wrap
 msgid ""
 "        key.name = argv[i];\n"
 "        res = bsearch(&key, months, nr_of_months,\n"
@@ -330,12 +313,9 @@ msgid ""
 "    exit(EXIT_SUCCESS);\n"
 "}\n"
 msgstr ""
-"    qsort(months, nr_of_months, sizeof(struct mi), compmi);\n"
-"    for (i = 1; i E<lt> argc; i++) {\n"
-"        struct mi key, *res;\n"
 "        key.name = argv[i];\n"
 "        res = bsearch(&key, months, nr_of_months,\n"
-"                      sizeof(struct mi), compmi);\n"
+"                      sizeof(months[0]), compmi);\n"
 "        if (res == NULL)\n"
 "            printf(\"\\(aq%s\\(aq: unknown month\\en\", argv[i]);\n"
 "        else\n"
@@ -425,12 +405,13 @@ msgstr "B<void hdestroy(void);>\n"
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:51 build/C/man3/tsearch.3:49
-#, fuzzy, no-wrap
-#| msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
+#, no-wrap
 msgid ""
 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
 "B<#include E<lt>search.hE<gt>>\n"
-msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
+msgstr ""
+"B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
+"B<#include E<lt>search.hE<gt>>\n"
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:53
@@ -512,13 +493,6 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:117
-#, fuzzy
-#| msgid ""
-#| "The function B<hdestroy>()  frees the memory occupied by the hash table "
-#| "that was created by B<hcreate>().  After calling B<hdestroy>()  a new "
-#| "hash table can be created using B<hcreate>().  The B<hdestroy_r>()  "
-#| "function performs the analogous task for a hash table described by "
-#| "I<*htab>, which was previously created using B<hcreate_r>()."
 msgid ""
 "The function B<hdestroy>()  frees the memory occupied by the hash table that "
 "was created by B<hcreate>().  After calling B<hdestroy>(), a new hash table "
@@ -688,10 +662,8 @@ msgstr "I<action> が B<FIND> で、 I<key> がテーブル内に見つからな
 #.  PROX.1-2001, POSIX.1-2008
 #. type: Plain text
 #: build/C/man3/hsearch.3:230
-#, fuzzy
-#| msgid "POSIX.1-2001 specifies only the B<ENOMEM> error."
 msgid "POSIX.1 specifies only the B<ENOMEM> error."
-msgstr "POSIX.1-2001 が規定しているのは、エラー B<ENOMEM> だけである。"
+msgstr "POSIX.1 が規定しているのは、エラー B<ENOMEM> だけである。"
 
 #. type: tbl table
 #: build/C/man3/hsearch.3:241
@@ -746,30 +718,17 @@ msgstr "MT-Safe race:htab"
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:258
-#, fuzzy
-#| msgid ""
-#| "The functions B<hcreate>(), B<hsearch>(), and B<hdestroy>()  are from "
-#| "SVr4, and are described in POSIX.1-2001.  The functions B<hcreate_r>(), "
-#| "B<hsearch_r>(), and B<hdestroy_r>()  are GNU extensions."
 msgid ""
 "The functions B<hcreate>(), B<hsearch>(), and B<hdestroy>()  are from SVr4, "
 "and are described in POSIX.1-2001 and POSIX.1-2008."
-msgstr ""
-"関数 B<hcreate>(), B<hsearch>(), B<hdestroy>()  は SVr4 から導入されたもの"
-"で、POSIX.1-2001 に記述されている。 関数 B<hcreate_r>, B<hsearch_r>, "
-"B<hdestroy_r> は GNU の拡張である。"
+msgstr "関数 B<hcreate>(), B<hsearch>(), B<hdestroy>()  は SVr4 から導入されたもので、POSIX.1-2001 と POSIX.1-2008 に記述されている。"
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:265
-#, fuzzy
-#| msgid ""
-#| "The B<hcreate_r>(), B<hsearch_r>(), and B<hdestroy_r>()  functions are "
-#| "thread-safe."
 msgid ""
 "The functions B<hcreate_r>(), B<hsearch_r>(), and B<hdestroy_r>()  are GNU "
 "extensions."
-msgstr ""
-"関数 B<hcreate_r>(), B<hsearch_r>(), B<hdestroy_r>() はスレッドセーフである。"
+msgstr "関数 B<hcreate_r>(), B<hsearch_r>(), B<hdestroy_r>() は GNU による拡張である。"
 
 #. type: SH
 #: build/C/man3/hsearch.3:265 build/C/man3/qsort.3:117
@@ -879,13 +838,7 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:320
-#, fuzzy, no-wrap
-#| msgid ""
-#| "int\n"
-#| "main(void)\n"
-#| "{\n"
-#| "    ENTRY e, *ep;\n"
-#| "    int i;\n"
+#, no-wrap
 msgid ""
 "int\n"
 "main(void)\n"
@@ -893,10 +846,11 @@ msgid ""
 "    ENTRY e;\n"
 "    ENTRY *ep;\n"
 msgstr ""
-"int main()\n"
+"int\n"
+"main(void)\n"
 "{\n"
-"    ENTRY e, *ep;\n"
-"    int i;\n"
+"    ENTRY e;\n"
+"    ENTRY *ep;\n"
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:322
@@ -906,20 +860,7 @@ msgstr "    hcreate(30);\n"
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:335
-#, fuzzy, no-wrap
-#| msgid ""
-#| "    for (i = 0; i E<lt> 24; i++) {\n"
-#| "        e.key = data[i];\n"
-#| "        /* data is just an integer, instead of a\n"
-#| "           pointer to something */\n"
-#| "        e.data = (void *) i;\n"
-#| "        ep = hsearch(e, ENTER);\n"
-#| "        /* there should be no failures */\n"
-#| "        if (ep == NULL) {\n"
-#| "            fprintf(stderr, \"entry failed\\en\");\n"
-#| "            exit(EXIT_FAILURE);\n"
-#| "        }\n"
-#| "    }\n"
+#, no-wrap
 msgid ""
 "    for (int i = 0; i E<lt> 24; i++) {\n"
 "        e.key = data[i];\n"
@@ -934,7 +875,7 @@ msgid ""
 "        }\n"
 "    }\n"
 msgstr ""
-"    for (i = 0; i E<lt> 24; i++) {\n"
+"    for (int i = 0; i E<lt> 24; i++) {\n"
 "        e.key = data[i];\n"
 "        /* データは、ポインターではなく、単なる整数値である。 */\n"
 "        e.data = (void *) i;\n"
@@ -948,19 +889,7 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/hsearch.3:347
-#, fuzzy, no-wrap
-#| msgid ""
-#| "    for (i = 22; i E<lt> 26; i++) {\n"
-#| "        /* print two entries from the table, and\n"
-#| "           show that two are not in the table */\n"
-#| "        e.key = data[i];\n"
-#| "        ep = hsearch(e, FIND);\n"
-#| "        printf(\"%9.9s -E<gt> %9.9s:%d\\en\", e.key,\n"
-#| "               ep ? ep-E<gt>key : \"NULL\", ep ? (int)(ep-E<gt>data) : 0);\n"
-#| "    }\n"
-#| "    hdestroy();\n"
-#| "    exit(EXIT_SUCCESS);\n"
-#| "}\n"
+#, no-wrap
 msgid ""
 "    for (int i = 22; i E<lt> 26; i++) {\n"
 "        /* print two entries from the table, and\n"
@@ -974,7 +903,7 @@ msgid ""
 "    exit(EXIT_SUCCESS);\n"
 "}\n"
 msgstr ""
-"    for (i = 22; i E<lt> 26; i++) {\n"
+"    for (int i = 22; i E<lt> 26; i++) {\n"
 "        /* テーブルにある 2 つのエントリーを表示し、\n"
 "           あとの 2 つがテーブルにないことを示す。 */\n"
 "        e.key = data[i];\n"
@@ -1001,7 +930,7 @@ msgstr "LSEARCH"
 #: build/C/man3/lsearch.3:26
 #, no-wrap
 msgid "2017-09-15"
-msgstr ""
+msgstr "2017-09-15"
 
 #. type: Plain text
 #: build/C/man3/lsearch.3:29
@@ -1076,15 +1005,14 @@ msgid ""
 "B<lfind>(),\n"
 "B<lsearch>()"
 msgstr ""
+"B<lfind>(),\n"
+"B<lsearch>()"
 
 #. type: Plain text
 #: build/C/man3/lsearch.3:97
-#, fuzzy
-#| msgid "SVr4, 4.3BSD, POSIX.1-2001.  Present in libc since libc-4.6.27."
 msgid ""
 "POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.  Present in libc since libc-4.6.27."
-msgstr ""
-"SVr4, 4.3BSD, POSIX.1-2001.  libc には libc-4.6.27 以降で実装されている。"
+msgstr "POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD. libc には libc-4.6.27 以降で実装されている。"
 
 #. type: Plain text
 #: build/C/man3/lsearch.3:99
@@ -1212,28 +1140,20 @@ msgid ""
 "B<qsort>(),\n"
 "B<qsort_r>()"
 msgstr ""
+"B<qsort>(),\n"
+"B<qsort_r>()"
 
 #. type: Plain text
 #: build/C/man3/qsort.3:117
 msgid "B<qsort>(): POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD."
-msgstr ""
+msgstr "B<qsort>(): POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD."
 
 #. type: Plain text
 #: build/C/man3/qsort.3:121
-#, fuzzy
-#| msgid ""
-#| "Library routines suitable for use as the I<compar> argument to "
-#| "B<qsort>()  include B<alphasort>(3)  and B<versionsort>(3).  To compare C "
-#| "strings, the comparison function can call B<strcmp>(3), as shown in the "
-#| "example below."
 msgid ""
 "To compare C strings, the comparison function can call B<strcmp>(3), as "
 "shown in the example below."
-msgstr ""
-"B<qsort>() の I<compar> 引き数に使用するのに適しているライブラリルーチンと\n"
-"しては B<alphasort>(3), B<versionsort>(3) がある。 C の文字列を比較する場"
-"合、\n"
-"以下の例にあるように比較関数で B<strcmp>(3) を呼び出すこともできる。"
+msgstr "C の文字列を比較する場合、以下の例にあるように比較関数で B<strcmp>(3) を呼び出すこともできる。"
 
 #. type: Plain text
 #: build/C/man3/qsort.3:124
@@ -1269,25 +1189,17 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/qsort.3:142
-#, fuzzy, no-wrap
-#| msgid ""
-#| "    return strcmp(* (char * const *) p1, * (char * const *) p2);\n"
-#| "}\n"
+#, no-wrap
 msgid ""
 "    return strcmp(*(const char **) p1, *(const char **) p2);\n"
 "}\n"
 msgstr ""
-"    return strcmp(* (char * const *) p1, * (char * const *) p2);\n"
+"    return strcmp(*(const char **) p1, *(const char **) p2);\n"
 "}\n"
 
 #. type: Plain text
 #: build/C/man3/qsort.3:150
-#, fuzzy, no-wrap
-#| msgid ""
-#| "    if (argc E<lt> 2) {\n"
-#| "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>...\\en\", argv[0]);\n"
-#| "        exit(EXIT_FAILURE);\n"
-#| "    }\n"
+#, no-wrap
 msgid ""
 "int\n"
 "main(int argc, char *argv[])\n"
@@ -1297,6 +1209,9 @@ msgid ""
 "        exit(EXIT_FAILURE);\n"
 "    }\n"
 msgstr ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
 "    if (argc E<lt> 2) {\n"
 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>...\\en\", argv[0]);\n"
 "        exit(EXIT_FAILURE);\n"
@@ -1310,19 +1225,14 @@ msgstr "    qsort(&argv[1], argc - 1, sizeof(char *), cmpstringp);\n"
 
 #. type: Plain text
 #: build/C/man3/qsort.3:157
-#, fuzzy, no-wrap
-#| msgid ""
-#| "    for (j = 1; j E<lt> argc; j++)\n"
-#| "        puts(argv[j]);\n"
-#| "    exit(EXIT_SUCCESS);\n"
-#| "}\n"
+#, no-wrap
 msgid ""
 "    for (int j = 1; j E<lt> argc; j++)\n"
 "        puts(argv[j]);\n"
 "    exit(EXIT_SUCCESS);\n"
 "}\n"
 msgstr ""
-"    for (j = 1; j E<lt> argc; j++)\n"
+"    for (int j = 1; j E<lt> argc; j++)\n"
 "        puts(argv[j]);\n"
 "    exit(EXIT_SUCCESS);\n"
 "}\n"
@@ -1340,16 +1250,14 @@ msgstr "TSEARCH"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:28
-#, fuzzy
-#| msgid "tsearch, tfind, tdelete, twalk, tdestroy - manage a binary tree"
 msgid "tsearch, tfind, tdelete, twalk, tdestroy - manage a binary search tree"
-msgstr "tsearch, tfind, tdelete, twalk, tdestroy - äº\8cå\88\86æ\9c¨ (binary tree) の操作"
+msgstr "tsearch, tfind, tdelete, twalk, tdestroy - äº\8cå\88\86æ\8e¢ç´¢æ\9c¨ (binary search tree) の操作"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:33
 #, no-wrap
 msgid "B<typedef enum { preorder, postorder, endorder, leaf } VISIT;>\n"
-msgstr ""
+msgstr "B<typedef enum { preorder, postorder, endorder, leaf } VISIT;>\n"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:36
@@ -1383,36 +1291,29 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:46
-#, fuzzy, no-wrap
-#| msgid ""
-#| "B<void twalk(const void *>I<root>B<, void (*>I<action>B<)(const void *>I<nodep>B<,>\n"
-#| "B<                                   const VISIT >I<which>B<,>\n"
-#| "B<                                   const int >I<depth>B<));>\n"
+#, no-wrap
 msgid ""
 "B<void twalk(const void *>I<root>B<,>\n"
 "B<                void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
 "B<                               int >I<depth>B<));>\n"
 msgstr ""
-"B<void twalk(const void *>I<root>B<, void (*>I<action>B<)(const void *>I<nodep>B<,>\n"
-"B<                                   const VISIT >I<which>B<,>\n"
-"B<                                   const int >I<depth>B<));>\n"
+"B<void twalk(const void *>I<root>B<,>\n"
+"B<                void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
+"B<                               int >I<depth>B<));>\n"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:54
-#, fuzzy, no-wrap
-#| msgid ""
-#| "B<void twalk(const void *>I<root>B<, void (*>I<action>B<)(const void *>I<nodep>B<,>\n"
-#| "B<                                   const VISIT >I<which>B<,>\n"
-#| "B<                                   const int >I<depth>B<));>\n"
+#, no-wrap
 msgid ""
 "B<void twalk_r(const void *>I<root>B<,>\n"
 "B<                void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
 "B<                               void *>I<closure>B<),>\n"
 "B<                void *>I<closure>B<);>\n"
 msgstr ""
-"B<void twalk(const void *>I<root>B<, void (*>I<action>B<)(const void *>I<nodep>B<,>\n"
-"B<                                   const VISIT >I<which>B<,>\n"
-"B<                                   const int >I<depth>B<));>\n"
+"B<void twalk_r(const void *>I<root>B<,>\n"
+"B<                void (*>I<action>B<)(const void *>I<nodep>B<, VISIT >I<which>B<,>\n"
+"B<                               void *>I<closure>B<),>\n"
+"B<                void *>I<closure>B<);>\n"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:56
@@ -1422,16 +1323,6 @@ msgstr "B<void tdestroy(void *>I<root>B<, void (*>I<free_node>B<)(void *>I<nodep
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:75
-#, fuzzy
-#| msgid ""
-#| "B<tsearch>(), B<tfind>(), B<twalk>(), and B<tdelete>()  manage a binary "
-#| "tree.  They are generalized from Knuth (6.2.2) Algorithm T.  The first "
-#| "field in each node of the tree is a pointer to the corresponding data "
-#| "item.  (The calling program must store the actual data.)  I<compar> "
-#| "points to a comparison routine, which takes pointers to two items.  It "
-#| "should return an integer which is negative, zero, or positive, depending "
-#| "on whether the first item is less than, equal to, or greater than the "
-#| "second."
 msgid ""
 "B<tsearch>(), B<tfind>(), B<twalk>(), and B<tdelete>()  manage a binary "
 "search tree.  They are generalized from Knuth (6.2.2) Algorithm T.  The "
@@ -1440,15 +1331,7 @@ msgid ""
 "to a comparison routine, which takes pointers to two items.  It should "
 "return an integer which is negative, zero, or positive, depending on whether "
 "the first item is less than, equal to, or greater than the second."
-msgstr ""
-"B<tsearch>(), B<tfind>(), B<twalk>(), B<tdelete>()  は 二分木を操作する関数で"
-"ある。 これらの関数は Knuth (6.2.2) Algorithm T に基づいている。 木構造におけ"
-"る各ノードの最初のフィールドは、対応するデータ アイテムへのポインターであ"
-"る。 (参照先のデータは、呼び出しプログラムで用意する。)  I<compar> は比較ルー"
-"チンへのポインターである。 比較ルーチンは、アイテムへのポインター 2 つを引き"
-"数に持つ。 比較ルーチンの返り値は、1 つ目のアイテムが 2 つ目のアイテムよりも "
-"「小さい、等しい、大きい」によって、 「負、0、正」の整数値でなければならな"
-"い。"
+msgstr "B<tsearch>(), B<tfind>(), B<twalk>(), B<tdelete>()  は 二分探索木を操作する関数である。 これらの関数は Knuth (6.2.2) Algorithm T に基づいている。 木構造における各ノードの最初のフィールドは、対応するデータ アイテムへのポインターである。 (参照先のデータは、呼び出しプログラムで用意する。)  I<compar> は比較ルーチンへのポインターである。 比較ルーチンは、アイテムへのポインター 2 つを引き数に持つ。 比較ルーチンの返り値は、1 つ目のアイテムが 2 つ目のアイテムよりも 「小さい、等しい、大きい」によって、 「負、0、正」の整数値でなければならない。"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:97
@@ -1613,10 +1496,8 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:218
-#, fuzzy
-#| msgid "B<qsort_r>()  was added to glibc in version 2.8."
 msgid "B<twalk_r>()  is available in glibc since version 2.30."
-msgstr "B<qsort_r>() は glibc バージョン 2.8 で追加された。"
+msgstr "B<twalk_r>() は glibc バージョン 2.30 以降で利用可能である。"
 
 #. type: tbl table
 #: build/C/man3/tsearch.3:229
@@ -1715,13 +1596,7 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:278
-#, fuzzy, no-wrap
-#| msgid ""
-#| "#define _GNU_SOURCE     /* Expose declaration of tdestroy() */\n"
-#| "#include E<lt>search.hE<gt>\n"
-#| "#include E<lt>stdlib.hE<gt>\n"
-#| "#include E<lt>stdio.hE<gt>\n"
-#| "#include E<lt>time.hE<gt>\n"
+#, no-wrap
 msgid ""
 "#define _GNU_SOURCE     /* Expose declaration of tdestroy() */\n"
 "#include E<lt>search.hE<gt>\n"
@@ -1732,6 +1607,7 @@ msgid ""
 msgstr ""
 "#define _GNU_SOURCE     /* Expose declaration of tdestroy() */\n"
 "#include E<lt>search.hE<gt>\n"
+"#include E<lt>stddef.hE<gt>\n"
 "#include E<lt>stdlib.hE<gt>\n"
 "#include E<lt>stdio.hE<gt>\n"
 "#include E<lt>time.hE<gt>\n"
@@ -1744,18 +1620,7 @@ msgstr "static void *root = NULL;\n"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:291
-#, fuzzy, no-wrap
-#| msgid ""
-#| "static void *\n"
-#| "xmalloc(unsigned n)\n"
-#| "{\n"
-#| "    void *p;\n"
-#| "    p = malloc(n);\n"
-#| "    if (p)\n"
-#| "        return p;\n"
-#| "    fprintf(stderr, \"insufficient memory\\en\");\n"
-#| "    exit(EXIT_FAILURE);\n"
-#| "}\n"
+#, no-wrap
 msgid ""
 "static void *\n"
 "xmalloc(size_t n)\n"
@@ -1769,7 +1634,7 @@ msgid ""
 "}\n"
 msgstr ""
 "static void *\n"
-"xmalloc(unsigned n)\n"
+"xmalloc(size_t n)\n"
 "{\n"
 "    void *p;\n"
 "    p = malloc(n);\n"
@@ -1805,12 +1670,7 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:306
-#, fuzzy, no-wrap
-#| msgid ""
-#| "static void\n"
-#| "action(const void *nodep, const VISIT which, const int depth)\n"
-#| "{\n"
-#| "    int *datap;\n"
+#, no-wrap
 msgid ""
 "static void\n"
 "action(const void *nodep, VISIT which, int depth)\n"
@@ -1818,7 +1678,7 @@ msgid ""
 "    int *datap;\n"
 msgstr ""
 "static void\n"
-"action(const void *nodep, const VISIT which, const int depth)\n"
+"action(const void *nodep, VISIT which, int depth)\n"
 "{\n"
 "    int *datap;\n"
 
@@ -1860,13 +1720,7 @@ msgstr ""
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:327
-#, fuzzy, no-wrap
-#| msgid ""
-#| "int\n"
-#| "main(void)\n"
-#| "{\n"
-#| "    int i, *ptr;\n"
-#| "    void *val;\n"
+#, no-wrap
 msgid ""
 "int\n"
 "main(void)\n"
@@ -1876,27 +1730,11 @@ msgstr ""
 "int\n"
 "main(void)\n"
 "{\n"
-"    int i, *ptr;\n"
-"    void *val;\n"
+"    int **val;\n"
 
 #. type: Plain text
 #: build/C/man3/tsearch.3:342
-#, fuzzy, no-wrap
-#| msgid ""
-#| "    srand(time(NULL));\n"
-#| "    for (i = 0; i E<lt> 12; i++) {\n"
-#| "        ptr = xmalloc(sizeof(int));\n"
-#| "        *ptr = rand() & 0xff;\n"
-#| "        val = tsearch((void *) ptr, &root, compare);\n"
-#| "        if (val == NULL)\n"
-#| "            exit(EXIT_FAILURE);\n"
-#| "        else if ((*(int **) val) != ptr)\n"
-#| "            free(ptr);\n"
-#| "    }\n"
-#| "    twalk(root, action);\n"
-#| "    tdestroy(root, free);\n"
-#| "    exit(EXIT_SUCCESS);\n"
-#| "}\n"
+#, no-wrap
 msgid ""
 "    srand(time(NULL));\n"
 "    for (int i = 0; i E<lt> 12; i++) {\n"
@@ -1914,13 +1752,13 @@ msgid ""
 "}\n"
 msgstr ""
 "    srand(time(NULL));\n"
-"    for (i = 0; i E<lt> 12; i++) {\n"
-"        ptr = xmalloc(sizeof(int));\n"
+"    for (int i = 0; i E<lt> 12; i++) {\n"
+"        int *ptr = xmalloc(sizeof(*ptr));\n"
 "        *ptr = rand() & 0xff;\n"
-"        val = tsearch((void *) ptr, &root, compare);\n"
+"        val = tsearch(ptr, &root, compare);\n"
 "        if (val == NULL)\n"
 "            exit(EXIT_FAILURE);\n"
-"        else if ((*(int **) val) != ptr)\n"
+"        else if (*val != ptr)\n"
 "            free(ptr);\n"
 "    }\n"
 "    twalk(root, action);\n"
index f04b2c8..e73ddba 100644 (file)
@@ -1,6 +1,2 @@
 # pagename,#complete,#remaining,#all
-bsearch.3,29,6,35
-hsearch.3,66,10,76
-lsearch.3,28,3,31
-qsort.3,37,8,45
-tsearch.3,51,19,70
+tsearch.3,65,5,70
index f2860c4..3be5b95 100644 (file)
 <TR><TD>setns.2</TD><TD>51/117</TD><TD>56.41</TD></TR>
 <TR class="over70"><TD>unshare.2</TD><TD>25/102</TD><TD>75.49</TD></TR>
 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>search</B></TD></TR>
-<TR class="over80"><TD>bsearch.3</TD><TD>6/35</TD><TD>82.86</TD></TR>
-<TR class="over80"><TD>hsearch.3</TD><TD>10/76</TD><TD>86.84</TD></TR>
-<TR class="over80"><TD>lsearch.3</TD><TD>3/31</TD><TD>90.32</TD></TR>
-<TR class="over80"><TD>qsort.3</TD><TD>8/45</TD><TD>82.22</TD></TR>
-<TR class="over70"><TD>tsearch.3</TD><TD>19/70</TD><TD>72.86</TD></TR>
+<TR class="over80"><TD>tsearch.3</TD><TD>5/70</TD><TD>92.86</TD></TR>
 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>semaphore</B></TD></TR>
 <TR class="over80"><TD>sem_getvalue.3</TD><TD>1/34</TD><TD>97.06</TD></TR>
 <TR class="over80"><TD>semctl.2</TD><TD>23/129</TD><TD>82.17</TD></TR>
 <TR class="over80"><TD>login.3</TD><TD>1/46</TD><TD>97.83</TD></TR>
 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>wchar</B></TD></TR>
 <TR class="over80"><TD>mbsnrtowcs.3</TD><TD>1/47</TD><TD>97.87</TD></TR>
-<TR><TD COLSPAN=3>Total 662 pages</TD></TR>
+<TR><TD COLSPAN=3>Total 658 pages</TD></TR>
 </TABLE>
 </BODY></HTML>