OSDN Git Service

(split) LDP: Update releases based on LDP 3.52 release
[linuxjm/LDP_man-pages.git] / release / man3 / hsearch.3
index ebb47eb..2ea9640 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\-04\-19 GNU "Linux Programmer's Manual"
 .SH 名前
 hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r \- ハッシュテーブルの管理
 .SH 書式
@@ -110,12 +110,15 @@ typedef struct entry {
 \fBhsearch_r\fP()  関数が \fBhsearch\fP()  と異なるのは、見つかった項目へのポインタを、 関数の結果としてではなく、
 \fI*retval\fP に格納して返す点である。
 .SH 返り値
-\fBhcreate\fP()  と \fBhcreate_r\fP()  は、成功した場合 0 以外の値を返し、 エラーの場合 0 を返す。
-
-成功すると、 \fBhsearch\fP()  は、ハッシュテーブル内のエントリへのポインタを返す。 エラーの場合、 \fBhsearch\fP()  は NULL
-を返す。 エラーとなるのは、 \fIaction\fP が \fBENTER\fP でハッシュテーブルがいっぱいの場合か、 \fIaction\fP が \fBFIND\fP
-で \fIitem\fP がハッシュテーブル内に 見つからない場合である。 \fBhsearch_r\fP()  は、成功すると 0 以外を返し、エラーの場合 0
-を返す。
+\fBhcreate\fP()  and \fBhcreate_r\fP()  return nonzero on success.  They return 0
+on error, with \fIerrno\fP set to indicate the cause of the error.
+
+On success, \fBhsearch\fP()  returns a pointer to an entry in the hash table.
+\fBhsearch\fP()  returns NULL on error, that is, if \fIaction\fP is \fBENTER\fP and
+the hash table is full, or \fIaction\fP is \fBFIND\fP and \fIitem\fP cannot be found
+in the hash table.  \fBhsearch_r\fP()  returns nonzero on success, and 0 on
+error.  In the event of an error, these two functions set \fIerrno\fP to
+indicate the cause of the error.
 .SH エラー
 .LP
 \fBhcreate_r\fP()  と \fBhdestroy_r\fP()  は以下の理由で失敗する可能性がある。
@@ -132,6 +135,13 @@ typedef struct entry {
 \fIaction\fP が \fBFIND\fP で、 \fIkey\fP がテーブル内に見つからなかった。
 .PP
 POSIX.1\-2001 が規定しているのは、エラー \fBENOMEM\fP だけである。
+.SH ATTRIBUTES
+.SS "Multithreading (see pthreads(7))"
+The functions \fBhcreate\fP(), \fBhsearch\fP(), and \fBhdestroy\fP()  use a global
+space for storing the table, so they are not thread\-safe.
+.LP
+The functions \fBhcreate_r\fP(), \fBhsearch_r\fP(), and \fBhdestroy_r\fP()  are
+thread\-safe.
 .SH 準拠
 関数 \fBhcreate\fP(), \fBhsearch\fP(), \fBhdestroy\fP()  は SVr4 から導入されたもので、POSIX.1\-2001
 に記述されている。 関数 \fBhcreate_r\fP, \fBhsearch_r\fP, \fBhdestroy_r\fP は GNU の拡張である。
@@ -199,3 +209,7 @@ int main()
 .fi
 .SH 関連項目
 \fBbsearch\fP(3), \fBlsearch\fP(3), \fBmalloc\fP(3), \fBtsearch\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。