OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / release / man3 / lsearch.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" Copyright 1995 Jim Van Zandt <jrv@vanzandt.mv.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\" Corrected prototype and include, aeb, 990927
25 .\"
26 .\" Japanese Version Copyright (c) 1998 Ueyama Rui
27 .\"         all rights reserved.
28 .\" Translated 1998-05-23, Ueyama Rui <rui@linux.or.jp>
29 .\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
30 .\"
31 .\"WORD:        linear search   Àþ·Á¸¡º÷
32 .\"
33 .TH LSEARCH 3  1999-09-27 "GNU" "Linux Programmer's Manual"
34 .SH Ì¾Á°
35 lfind, lsearch \- ÇÛÎó¤òÀþ·Á¸¡º÷¤¹¤ë
36 .SH ½ñ¼°
37 .nf
38 .B #include <search.h>
39 .sp
40 .BI "void *lfind(const void *" key ", const void *" base ", size_t *" nmemb ,
41 .BI "         size_t " size ", int(*" compar ")(const void *, const void *));"
42 .sp
43 .BI "void *lsearch(const void *" key ", void *" base ", size_t *" nmemb ,
44 .BI "         size_t " size ", int(*" compar ")(const void *, const void *));"
45 .fi
46 .SH ÀâÌÀ
47 .BR lfind ()
48 ¤È
49 .BR lsearch ()
50 ¤Ï¡¢
51 .I size
52 ¥Ð¥¤¥È¤ÎÍ×ÁÇ
53 .I *nmemb
54 ¸Ä¤«¤é¤Ê¤ëÇÛÎó
55 .I base
56 ¤«¤é¡¢
57 .I key
58 ¤òÀþ·Á¸¡º÷¤¹¤ë¡£Èæ³Ó¤ò¹Ô¤¦¤Î¤Ï
59 .I compar
60 ¤¬»²¾È¤·¤Æ¤¤¤ë´Ø¿ô¤Ç¡¢
61 ¤³¤ì¤Ï 2¤Ä¤Î°ú¤­¿ô¤ò»ý¤Á¡¢1¤Ä¤á¤Î°ú¤­¿ô¤¬
62 .I key
63 ¤ò¡¢2¤Ä¤á¤Î°ú¤­¿ô¤ÏÇÛÎó¥á¥ó¥Ð¡¼¤ò»Ø¤¹¡£¤Þ¤¿
64 .I compar
65 ¤Ï¡¢
66 .I key
67 ¤¬ÇÛÎó¤Î¥á¥ó¥Ð¡¼¤È¥Þ¥Ã¥Á¤·¤¿¤Ê¤é 0¡¢¤½¤¦¤Ç¤Ê¤±¤ì¤Ð
68 0 °Ê³°¤òÊÖ¤¹¤³¤È¤¬´üÂÔ¤µ¤ì¤Æ¤¤¤ë¡£
69 .PP
70 .BR lsearch ()
71 ¤Ï¡¢¥Þ¥Ã¥Á¤¹¤ëÍ×ÁǤò¸«¤Ä¤±¤é¤ì¤Ê¤«¤Ã¤¿¤È¤­¡¢
72 ÇÛÎó¤ÎºÇ¸å¤Ë
73 .I key
74 ¤ò¤Ä¤±²Ã¤¨¤ë¡£¤½¤·¤Æ
75 .I *nmemb
76 ¤ò 1 ¤Õ¤ä¤¹¡£
77 ¤·¤¿¤¬¤Ã¤Æ¡¢¤³¤Î´Ø¿ô¤ò»ÈÍѤ¹¤ëºÝ¤Ë¤Ï¡¢¥Þ¥Ã¥Á¤¹¤ëÍ×ÁǤ¬Â¸ºß¤¹¤ë¤«¡¢
78 ¤â¤·¤¯¤ÏÇÛÎó¤ËÍ×ÁǤòÄɲ乤뤿¤á¤ÎÎΰ褬¤¢¤ë¤«¡¢¤òÇÄ°®¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ë¡£
79 .SH ÊÖ¤êÃÍ
80 .BR lfind ()
81 ¤ÎÊÖ¤êÃͤϡ¢ÇÛÎó¤Î¥Þ¥Ã¥Á¤·¤¿¥á¥ó¥Ð¡¼¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
82 ¤â¤·¥Þ¥Ã¥Á¤¹¤ë¥á¥ó¥Ð¡¼¤¬¸«¤Ä¤«¤é¤Ê¤¤¤È NULL ¤òÊÖ¤¹¡£
83 .BR lsearch ()
84 ¤ÎÊÖ¤êÃͤ⡢ÇÛÎó¤Î¥Þ¥Ã¥Á¤·¤¿¥á¥ó¥Ð¡¼¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
85 ¥Þ¥Ã¥Á¤¹¤ë¥á¥ó¥Ð¡¼¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¤È¤­¤Ï¡¢
86 ¿·¤¿¤Ë¤Ä¤±²Ã¤¨¤¿¥á¥ó¥Ð¡¼¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
87 .SH ½àµò
88 SVr4, 4.3BSD, POSIX.1-2001.
89 libc ¤Ë¤Ï libc-4.6.27 °Ê¹ß¤Ç¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
90 .SH ¥Ð¥°
91 ´Ø¿ô¤Î̾Á°¤ÎÁª¤ÓÊý¤¬¤è¤¯¤Ê¤¤¡£
92 .SH ´ØÏ¢¹àÌÜ
93 .BR bsearch (3),
94 .BR hsearch (3),
95 .BR tsearch (3)