1search.h(0P)               POSIX Programmer's Manual              search.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       search.h — search tables
14

SYNOPSIS

16       #include <search.h>
17

DESCRIPTION

19       The <search.h> header shall define the ENTRY type for  structure  entry
20       which shall include the following members:
21
22           char    *key
23           void    *data
24
25       and  shall  define  ACTION  and VISIT as enumeration data types through
26       type definitions as follows:
27
28           enum { FIND, ENTER } ACTION;
29           enum { preorder, postorder, endorder, leaf } VISIT;
30
31       The <search.h> header shall define the  size_t  type  as  described  in
32       <sys/types.h>.
33
34       The following shall be declared as functions and may also be defined as
35       macros. Function prototypes shall be provided.
36
37           int    hcreate(size_t);
38           void   hdestroy(void);
39           ENTRY *hsearch(ENTRY, ACTION);
40           void   insque(void *, void *);
41           void  *lfind(const void *, const void *, size_t *,
42                     size_t, int (*)(const void *, const void *));
43           void  *lsearch(const void *, void *, size_t *,
44                     size_t, int (*)(const void *, const void *));
45           void   remque(void *);
46           void  *tdelete(const void *restrict, void **restrict,
47                     int(*)(const void *, const void *));
48           void  *tfind(const void *, void *const *,
49                     int(*)(const void *, const void *));
50           void  *tsearch(const void *, void **,
51                     int(*)(const void *, const void *));
52           void   twalk(const void *,
53                     void (*)(const void *, VISIT, int ));
54
55       The following sections are informative.
56

APPLICATION USAGE

58       None.
59

RATIONALE

61       None.
62

FUTURE DIRECTIONS

64       None.
65

SEE ALSO

67       <sys_types.h>
68
69       The System Interfaces  volume  of  POSIX.1‐2008,  hcreate(),  insque(),
70       lsearch(), tdelete()
71
73       Portions  of  this text are reprinted and reproduced in electronic form
74       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
75       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
76       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
77       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
78       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
79       event of any discrepancy between this version and the original IEEE and
80       The Open Group Standard, the original IEEE and The Open Group  Standard
81       is  the  referee document. The original Standard can be obtained online
82       at http://www.unix.org/online.html .
83
84       Any typographical or formatting errors that appear  in  this  page  are
85       most likely to have been introduced during the conversion of the source
86       files to man page format. To report such errors,  see  https://www.ker
87       nel.org/doc/man-pages/reporting_bugs.html .
88
89
90
91IEEE/The Open Group                  2013                         search.h(0P)
Impressum