source: trunk/third/gettext/lib/hash.h @ 16931

Revision 16931, 1.7 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16930, which included commits to RCS files with non-trunk default branches.
Line 
1/* Copyright (C) 1995, 2000 Free Software Foundation, Inc.
2
3   The GNU C Library is free software; you can redistribute it and/or
4   modify it under the terms of the GNU Library General Public License as
5   published by the Free Software Foundation; either version 2 of the
6   License, or (at your option) any later version.
7
8   The GNU C Library is distributed in the hope that it will be useful,
9   but WITHOUT ANY WARRANTY; without even the implied warranty of
10   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11   Library General Public License for more details.
12
13   You should have received a copy of the GNU Library General Public
14   License along with the GNU C Library; see the file COPYING.LIB.  If
15   not, write to the Free Software Foundation, Inc., 59 Temple Place
16   - Suite 330, Boston, MA 02111-1307, USA.  */
17
18#ifndef _HASH_H
19# define _HASH_H
20
21# include <obstack.h>
22
23typedef struct hash_table
24{
25  unsigned long int size;
26  unsigned long int filled;
27  void *first;
28  void *table;
29  struct obstack mem_pool;
30}
31hash_table;
32
33# ifndef PARAMS
34#  if defined (__GNUC__) || __STDC__
35#   define PARAMS(Args) Args
36#  else
37#   define PARAMS(Args) ()
38#  endif
39# endif
40
41extern int init_hash PARAMS ((hash_table *htab, unsigned long int init_size));
42extern int delete_hash PARAMS ((hash_table *htab));
43extern int insert_entry PARAMS ((hash_table *htab,
44                                 const void *key, size_t keylen,
45                                 void *data));
46extern int find_entry PARAMS ((hash_table *htab,
47                               const void *key, size_t keylen,
48                               void **result));
49
50extern int iterate_table PARAMS ((hash_table *htab, void **ptr,
51                                  const void **key, size_t *keylen,
52                                  void **data));
53
54extern unsigned long int next_prime PARAMS ((unsigned long int seed));
55
56#endif /* not _HASH_H */
Note: See TracBrowser for help on using the repository browser.