]>
git.saurik.com Git - apple/libc.git/blob - include/strhash.h
87bdba859b2120df7b1440c38181db91f40d4ab9
2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
23 #ifndef _STRHASH_H_INCLUDE
24 #define _STRHASH_H_INCLUDE
26 /* $FreeBSD: /repoman/r/ncvs/src/include/strhash.h,v 1.3 1999/08/28 04:59:30 peter Exp $ */
31 * Terry Jones & Jordan Hubbard
33 * PCS Computer Systeme, GmbH.
34 * Munich, West Germany
37 * All rights reserved.
39 * This is unsupported software and is subject to change without notice.
40 * the author makes no representations about the suitability of this software
41 * for any purpose. It is supplied "as is" without express or implied
44 * Permission to use, copy, modify, and distribute this software and its
45 * documentation for any purpose and without fee is hereby granted, provided
46 * that the above copyright notice appear in all copies and that both that
47 * copyright notice and this permission notice appear in supporting
48 * documentation, and that the name of the author not be used in
49 * advertising or publicity pertaining to distribution of the software
50 * without specific, written prior permission.
55 * This is the definition file for hash.c. The plunderer from down-under
56 * did the code, I just helped define the spec. That's why his name gets
62 typedef struct _node
{
73 #include <sys/cdefs.h>
76 hash_table
*hash_create(int size
);
77 void hash_destroy(hash_table
*table
, char *key
,
78 void (*nukefunc
)(char *k
, void *d
));
79 void *hash_search(hash_table
*table
, char *key
, void *datum
,
80 void (*replace_func
)(void *d
));
81 void hash_traverse(hash_table
*table
,
82 int (*func
)(char *k
, void *d
, void *arg
), void *arg
);
83 void hash_purge(hash_table
*table
, void (*purge_func
)(char *k
, void *d
));
86 extern void hash_stats();
90 #endif /* _STRHASH_H_INCLUDE */