]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
28bf4b0b | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | ** | |
5 | */ | |
6 | /* | |
7 | ** mapping.h | |
8 | */ | |
9 | ||
10 | # ifndef MAPPING_H | |
11 | # define MAPPING_H | |
12 | ||
28bf4b0b | 13 | typedef struct s_mappair { |
885824d3 | 14 | lsymbol domain, range; |
28bf4b0b | 15 | /*@null@*/ struct s_mappair *next; |
885824d3 | 16 | } mappair; |
17 | ||
18 | typedef /*@relnull@*/ /*@only@*/ mappair *o_mappair; | |
19 | ||
28bf4b0b | 20 | typedef /*@abstract@*/ struct { |
885824d3 | 21 | unsigned int count; |
22 | /*@relnull@*/ /*@only@*/ o_mappair *buckets; | |
28bf4b0b | 23 | } *mapping; |
885824d3 | 24 | |
25 | ||
28bf4b0b | 26 | extern /*@only@*/ mapping mapping_create (void); |
27 | extern lsymbol mapping_find (mapping p_t, lsymbol p_domain); | |
28 | extern void mapping_bind (mapping p_t, lsymbol p_domain, lsymbol p_range); | |
29 | extern void mapping_free (/*@only@*/ mapping p_m); | |
885824d3 | 30 | |
31 | # else | |
32 | # error "Multiple include" | |
33 | # endif |