Clean up hash code, parameterize some actions, tweak some parameters. Hash
[deliverable/binutils-gdb.git] / gas / hash.h
1 /* hash.h - for hash.c
2 Copyright (C) 1987, 1992 Free Software Foundation, Inc.
3
4 This file is part of GAS, the GNU Assembler.
5
6 GAS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GAS is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19
20 #ifndef hashH
21 #define hashH
22
23 struct hash_entry
24 {
25 const char *hash_string; /* points to where the symbol string is */
26 /* NULL means slot is not used */
27 /* DELETED means slot was deleted */
28 PTR hash_value; /* user's datum, associated with symbol */
29 unsigned long h;
30 };
31
32
33 struct hash_control;
34
35 /* returns control block */
36 struct hash_control *hash_new PARAMS ((void));
37 void hash_die PARAMS ((struct hash_control *));
38 /* returns previous value */
39 PTR hash_delete PARAMS ((struct hash_control *, const char *str));
40 /* returns previous value */
41 PTR hash_replace PARAMS ((struct hash_control *, const char *str, PTR val));
42 /* returns error string or null */
43 const char *hash_insert PARAMS ((struct hash_control *, const char *str,
44 PTR val));
45 /* returns value */
46 PTR hash_find PARAMS ((struct hash_control *, const char *str));
47 /* returns error text or null (internal) */
48 const char *hash_jam PARAMS ((struct hash_control *, const char *str,
49 PTR val));
50
51 void hash_print_statistics PARAMS ((FILE *, const char *,
52 struct hash_control *));
53 #endif /* #ifdef hashH */
54
55 /* end of hash.c */
This page took 0.031513 seconds and 5 git commands to generate.