search.h (1d717f206a16611a52d73b75489b07291cd9989d) | search.h (9823a90c79bac3a172a02f7e76947fcbb57e0955) |
---|---|
1/*- | 1/*- |
2 * Written by J.T. Conklin <jtc@netbsd.org> | 2 * Written by J.T. Conklin <jtc@NetBSD.org> |
3 * Public domain. 4 * | 3 * Public domain. 4 * |
5 * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ | 5 * $NetBSD: search.h,v 1.16 2005/02/03 04:39:32 perry Exp $ |
6 * $FreeBSD$ 7 */ 8 9#ifndef _SEARCH_H_ 10#define _SEARCH_H_ 11 12#include <sys/cdefs.h> 13#include <sys/_types.h> --- 26 unchanged lines hidden (view full) --- 40} node_t; 41 42struct que_elem { 43 struct que_elem *next; 44 struct que_elem *prev; 45}; 46#endif 47 | 6 * $FreeBSD$ 7 */ 8 9#ifndef _SEARCH_H_ 10#define _SEARCH_H_ 11 12#include <sys/cdefs.h> 13#include <sys/_types.h> --- 26 unchanged lines hidden (view full) --- 40} node_t; 41 42struct que_elem { 43 struct que_elem *next; 44 struct que_elem *prev; 45}; 46#endif 47 |
48#if __BSD_VISIBLE 49struct _ENTRY; 50struct hsearch_data { 51 struct _ENTRY *table; 52 size_t size; 53 size_t filled; 54}; 55#endif 56 |
|
48__BEGIN_DECLS 49int hcreate(size_t); 50void hdestroy(void); 51ENTRY *hsearch(ENTRY, ACTION); 52void insque(void *, void *); 53void *lfind(const void *, const void *, size_t *, size_t, 54 int (*)(const void *, const void *)); 55void *lsearch(const void *, void *, size_t *, size_t, 56 int (*)(const void *, const void *)); 57void remque(void *); 58void *tdelete(const void * __restrict, void ** __restrict, 59 int (*)(const void *, const void *)); 60void *tfind(const void *, void * const *, 61 int (*)(const void *, const void *)); 62void *tsearch(const void *, void **, int (*)(const void *, const void *)); 63void twalk(const void *, void (*)(const void *, VISIT, int)); | 57__BEGIN_DECLS 58int hcreate(size_t); 59void hdestroy(void); 60ENTRY *hsearch(ENTRY, ACTION); 61void insque(void *, void *); 62void *lfind(const void *, const void *, size_t *, size_t, 63 int (*)(const void *, const void *)); 64void *lsearch(const void *, void *, size_t *, size_t, 65 int (*)(const void *, const void *)); 66void remque(void *); 67void *tdelete(const void * __restrict, void ** __restrict, 68 int (*)(const void *, const void *)); 69void *tfind(const void *, void * const *, 70 int (*)(const void *, const void *)); 71void *tsearch(const void *, void **, int (*)(const void *, const void *)); 72void twalk(const void *, void (*)(const void *, VISIT, int)); |
73 74#if __BSD_VISIBLE 75int hcreate_r(size_t, struct hsearch_data *); 76void hdestroy_r(struct hsearch_data *); 77int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *); 78#endif 79 |
|
64__END_DECLS 65 66#endif /* !_SEARCH_H_ */ | 80__END_DECLS 81 82#endif /* !_SEARCH_H_ */ |