Initial revision
[deliverable/binutils-gdb.git] / gas / hash.h
CommitLineData
fecd2382
RP
1/* hash.h - for hash.c
2 Copyright (C) 1987 Free Software Foundation, Inc.
3
4This file is part of GAS, the GNU Assembler.
5
6GAS is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11GAS is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GAS; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20#ifndef hashH
21#define hashH
22
23struct hash_entry
24{
25 char * hash_string; /* points to where the symbol string is */
26 /* NULL means slot is not used */
27 /* DELETED means slot was deleted */
28 char * hash_value; /* user's datum, associated with symbol */
29};
30
31
32#define HASH_STATLENGTH (6)
33struct hash_control
34{
35 struct hash_entry * hash_where; /* address of hash table */
36 int hash_sizelog; /* Log of ( hash_mask + 1 ) */
37 int hash_mask; /* masks a hash into index into table */
38 int hash_full; /* when hash_stat[STAT_USED] exceeds this, */
39 /* grow table */
40 struct hash_entry * hash_wall; /* point just after last (usable) entry */
41 /* here we have some statistics */
42 int hash_stat[HASH_STATLENGTH]; /* lies & statistics */
43 /* we need STAT_USED & STAT_SIZE */
44};
45
46
47/* returns */
48struct hash_control * hash_new(); /* [control block] */
49void hash_die();
50void hash_say();
51char * hash_delete(); /* previous value */
52char * hash_relpace(); /* previous value */
53char * hash_insert(); /* error string */
54char * hash_apply(); /* 0 means OK */
55char * hash_find(); /* value */
56char * hash_jam(); /* error text (internal) */
57#endif /* #ifdef hashH */
58
59/* end: hash.c */
This page took 0.02659 seconds and 4 git commands to generate.