OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man3 / hsearch.3
index 09b6e65..6ad8b4c 100644 (file)
@@ -1,8 +1,8 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
 .\" Copyright 1993 Ulrich Drepper (drepper@karlsruhe.gmd.de)
 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
 .\"     <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
@@ -19,9 +19,9 @@
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     SunOS 4.1.1 man pages
@@ -37,7 +37,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH HSEARCH 3 2011\-09\-10 GNU "Linux Programmer's Manual"
+.TH HSEARCH 3 2013\-07\-22 GNU "Linux Programmer's Manual"
 .SH 名前
 hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r \- ハッシュテーブルの管理
 .SH 書式
@@ -110,12 +110,13 @@ typedef struct entry {
 \fBhsearch_r\fP()  関数が \fBhsearch\fP()  と異なるのは、見つかった項目へのポインタを、 関数の結果としてではなく、
 \fI*retval\fP に格納して返す点である。
 .SH 返り値
-\fBhcreate\fP()  と \fBhcreate_r\fP()  は、成功した場合 0 以外の値を返し、 エラーの場合 0 を返す。
+\fBhcreate\fP()  と \fBhcreate_r\fP()  は、成功した場合 0 以外の値を返す。 エラーの場合 0 を返し、 \fIerrno\fP
+にエラーの原因を示す値を設定する。
 
 成功すると、 \fBhsearch\fP()  は、ハッシュテーブル内のエントリへのポインタを返す。 エラーの場合、 \fBhsearch\fP()  は NULL
 を返す。 エラーとなるのは、 \fIaction\fP が \fBENTER\fP でハッシュテーブルがいっぱいの場合か、 \fIaction\fP が \fBFIND\fP
 で \fIitem\fP がハッシュテーブル内に 見つからない場合である。 \fBhsearch_r\fP()  は、成功すると 0 以外を返し、エラーの場合 0
-を返す。
+を返す。 エラーの場合、 これら二つの関数は \fIerrno\fP にエラーの原因を示す値を設定する。
 .SH エラー
 .LP
 \fBhcreate_r\fP()  と \fBhdestroy_r\fP()  は以下の理由で失敗する可能性がある。
@@ -132,6 +133,13 @@ typedef struct entry {
 \fIaction\fP が \fBFIND\fP で、 \fIkey\fP がテーブル内に見つからなかった。
 .PP
 POSIX.1\-2001 が規定しているのは、エラー \fBENOMEM\fP だけである。
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+The \fBhcreate\fP(), \fBhsearch\fP(), and \fBhdestroy\fP()  functions use a global
+space for storing the table, so they are not thread\-safe.
+.LP
+The \fBhcreate_r\fP(), \fBhsearch_r\fP(), and \fBhdestroy_r\fP()  functions are
+thread\-safe.
 .SH 準拠
 関数 \fBhcreate\fP(), \fBhsearch\fP(), \fBhdestroy\fP()  は SVr4 から導入されたもので、POSIX.1\-2001
 に記述されている。 関数 \fBhcreate_r\fP, \fBhsearch_r\fP, \fBhdestroy_r\fP は GNU の拡張である。
@@ -200,6 +208,6 @@ int main()
 .SH 関連項目
 \fBbsearch\fP(3), \fBlsearch\fP(3), \fBmalloc\fP(3), \fBtsearch\fP(3)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。