ee3b12c6984fe808cb9136e0c468937ebf24d670
[ircu2.10.12-pk.git] / libs / dbprim / doc / html / group__dbprim__hash.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>Hash tables</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 </head><body bgcolor="#ffffff">
6 <!-- Generated by Doxygen 1.2.8.1 -->
7 <center>
8 <a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; </center>
9 <hr><h1>Hash tables</h1>Operations for hash tables. 
10 <a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
11 <tr><td colspan=2><br><h2>Defines</h2></td></tr>
12 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a></td></tr>
13 <tr><td>&nbsp;</td><td><font size=-1><em>Flag permitting a hash table to automatically grow.</em> <a href="#a16">More...</a><em></em></font><br><br></td></tr>
14 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a></td></tr>
15 <tr><td>&nbsp;</td><td><font size=-1><em>Flag permitting a hash table to automatically shrink.</em> <a href="#a17">More...</a><em></em></font><br><br></td></tr>
16 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a18">HASH_TABLE_INIT</a>(flags, func, comp, resize, extra)</td></tr>
17 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table static initializer.</em> <a href="#a18">More...</a><em></em></font><br><br></td></tr>
18 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a19">ht_verify</a>(table)</td></tr>
19 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table verification macro.</em> <a href="#a19">More...</a><em></em></font><br><br></td></tr>
20 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a20">ht_flags</a>(table)</td></tr>
21 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table flags.</em> <a href="#a20">More...</a><em></em></font><br><br></td></tr>
22 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a21">ht_frozen</a>(table)</td></tr>
23 <tr><td>&nbsp;</td><td><font size=-1><em>Determine if a hash table is frozen.</em> <a href="#a21">More...</a><em></em></font><br><br></td></tr>
24 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a22">ht_modulus</a>(table)</td></tr>
25 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table modulus.</em> <a href="#a22">More...</a><em></em></font><br><br></td></tr>
26 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a23">ht_count</a>(table)</td></tr>
27 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table count.</em> <a href="#a23">More...</a><em></em></font><br><br></td></tr>
28 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a24">ht_func</a>(table)</td></tr>
29 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table hash function.</em> <a href="#a24">More...</a><em></em></font><br><br></td></tr>
30 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a25">ht_comp</a>(table)</td></tr>
31 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table comparison function.</em> <a href="#a25">More...</a><em></em></font><br><br></td></tr>
32 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a26">ht_rsize</a>(table)</td></tr>
33 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table resize callback function.</em> <a href="#a26">More...</a><em></em></font><br><br></td></tr>
34 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a27">ht_extra</a>(table)</td></tr>
35 <tr><td>&nbsp;</td><td><font size=-1><em>Extra pointer data in a hash table.</em> <a href="#a27">More...</a><em></em></font><br><br></td></tr>
36 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a28">ht_size</a>(table)</td></tr>
37 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table memory size.</em> <a href="#a28">More...</a><em></em></font><br><br></td></tr>
38 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a29">HASH_ENTRY_INIT</a>(value)</td></tr>
39 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry static initializer.</em> <a href="#a29">More...</a><em></em></font><br><br></td></tr>
40 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a30">he_verify</a>(entry)</td></tr>
41 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry verification macro.</em> <a href="#a30">More...</a><em></em></font><br><br></td></tr>
42 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a31">he_link</a>(entry)</td></tr>
43 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry linked list element.</em> <a href="#a31">More...</a><em></em></font><br><br></td></tr>
44 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a32">he_flags</a>(entry)</td></tr>
45 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry flags.</em> <a href="#a32">More...</a><em></em></font><br><br></td></tr>
46 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a33">he_table</a>(entry)</td></tr>
47 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry table pointer.</em> <a href="#a33">More...</a><em></em></font><br><br></td></tr>
48 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a34">he_hash</a>(entry)</td></tr>
49 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry hash value.</em> <a href="#a34">More...</a><em></em></font><br><br></td></tr>
50 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a35">he_key</a>(entry)</td></tr>
51 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry key pointer.</em> <a href="#a35">More...</a><em></em></font><br><br></td></tr>
52 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a36">he_value</a>(entry)</td></tr>
53 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry value pointer.</em> <a href="#a36">More...</a><em></em></font><br><br></td></tr>
54 <tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a37">st_rsize</a>(table)</td></tr>
55 <tr><td>&nbsp;</td><td><font size=-1><em>Sparse matrix table resize callback function.</em> <a href="#a37">More...</a><em></em></font><br><br></td></tr>
56 <tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
57 <tr><td nowrap align=right valign=top>typedef struct _hash_table_s&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a></td></tr>
58 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
59 <tr><td nowrap align=right valign=top>typedef struct _hash_entry_s&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a></td></tr>
60 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table entry.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
61 <tr><td nowrap align=right valign=top>typedef unsigned long (*&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *, void *)</td></tr>
62 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table iteration callback.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr>
63 <tr><td nowrap align=right valign=top>typedef unsigned long (*&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *)</td></tr>
64 <tr><td>&nbsp;</td><td><font size=-1><em>Hash function callback.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
65 <tr><td nowrap align=right valign=top>typedef unsigned long (*&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *)</td></tr>
66 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table comparison callback.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
67 <tr><td nowrap align=right valign=top>typedef unsigned long (*&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, unsigned long)</td></tr>
68 <tr><td>&nbsp;</td><td><font size=-1><em>Hash table resize callback.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
69 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
70 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a6">ht_init</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, unsigned long flags, <a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> func, <a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> comp, <a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> resize, void *extra, unsigned long init_mod)</td></tr>
71 <tr><td>&nbsp;</td><td><font size=-1><em>Dynamically initialize a hash table.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr>
72 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a7">ht_add</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *key)</td></tr>
73 <tr><td>&nbsp;</td><td><font size=-1><em>Add an entry to a hash table.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
74 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a8">ht_move</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *key)</td></tr>
75 <tr><td>&nbsp;</td><td><font size=-1><em>Move an entry in the hash table.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
76 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a9">ht_remove</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry)</td></tr>
77 <tr><td>&nbsp;</td><td><font size=-1><em>Remove an element from a hash table.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr>
78 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a10">ht_find</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> **entry_p, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *key)</td></tr>
79 <tr><td>&nbsp;</td><td><font size=-1><em>Find an entry in a hash table.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr>
80 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a11">ht_iter</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> iter_func, void *extra)</td></tr>
81 <tr><td>&nbsp;</td><td><font size=-1><em>Iterate over each entry in a hash table.</em> <a href="#a11">More...</a><em></em></font><br><br></td></tr>
82 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a12">ht_flush</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> flush_func, void *extra)</td></tr>
83 <tr><td>&nbsp;</td><td><font size=-1><em>Flush a hash table.</em> <a href="#a12">More...</a><em></em></font><br><br></td></tr>
84 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a13">ht_resize</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, unsigned long new_size)</td></tr>
85 <tr><td>&nbsp;</td><td><font size=-1><em>Resize a hash table.</em> <a href="#a13">More...</a><em></em></font><br><br></td></tr>
86 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a14">ht_free</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table)</td></tr>
87 <tr><td>&nbsp;</td><td><font size=-1><em>Free memory used by an empty hash table.</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr>
88 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a15">he_init</a> (<a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry, void *value)</td></tr>
89 <tr><td>&nbsp;</td><td><font size=-1><em>Dynamically initialize a hash table entry.</em> <a href="#a15">More...</a><em></em></font><br><br></td></tr>
90 </table>
91 <hr><a name="_details"></a><h2>Detailed Description</h2>
92 Hash tables are a basic data structure used in building databases. Hash tables provide a means of storing data such that an arbitrary entry may be looked up efficiently. This library implements a hash table that may optionally grow and shrink to provide maximum efficiency. The implementation is with two kinds of caller-allocated structures--a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> structure that describes the table and a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> structure for each entry in the table. The library allocates a bucket array which must be released with the <a class="el" href="group__dbprim__hash.html#a14">ht_free</a>() function when the hash table has been emptied. Additionally, the hash table may be manually resized with the <a class="el" href="group__dbprim__hash.html#a13">ht_resize</a>() function.
93 <p>
94 Entries may be added to and removed from the table using the <a class="el" href="group__dbprim__hash.html#a7">ht_add</a>() and <a class="el" href="group__dbprim__hash.html#a9">ht_remove</a>() functions. Additionally, the key on a given entry may be changed using the <a class="el" href="group__dbprim__hash.html#a8">ht_move</a>() function. Of course, any given entry may be looked up using the <a class="el" href="group__dbprim__hash.html#a10">ht_find</a>() function, and <a class="el" href="group__dbprim__hash.html#a11">ht_iter</a>() will execute a user-defined function for each entry in the hash table (in an unspecified order). The <a class="el" href="group__dbprim__hash.html#a12">ht_flush</a>() function will remove all entries from the hash table, optionally executing a user-specified clean-up function. <hr><h2>Define Documentation</h2>
95 <a name="a29" doxytag="dbprim.h.top::HASH_ENTRY_INIT"></a><p>
96 <table width="100%" cellpadding="2" cellspacing="0" border="0">
97   <tr>
98     <td class="md">
99       <table cellpadding="0" cellspacing="0" border="0">
100         <tr>
101           <td nowrap valign="top"><b> 
102 #define HASH_ENTRY_INIT(
103           </b></td>
104           <td valign="bottom"><b>
105 value&nbsp;)
106       </table>
107     </td>
108   </tr>
109 </table>
110 <table cellspacing=5 cellpadding=0 border=0>
111   <tr>
112     <td>
113       &nbsp;
114     </td>
115     <td>
116
117 <p>
118
119 <p>
120  This macro statically initializes a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.<dl compact><dt>
121 <b>Parameters: </b><dd>
122 <table border=0 cellspacing=2 cellpadding=0>
123 <tr><td valign=top><em>value</em>
124 &nbsp;</td><td>
125 A pointer to <code>void</code> representing the object associated with the entry. </td></tr>
126 </table>
127 </dl>    </td>
128   </tr>
129 </table>
130 <a name="a16" doxytag="dbprim.h.top::HASH_FLAG_AUTOGROW"></a><p>
131 <table width="100%" cellpadding="2" cellspacing="0" border="0">
132   <tr>
133     <td class="md">
134       <table cellpadding="0" cellspacing="0" border="0">
135         <tr>
136           <td nowrap valign="top"><b> 
137 #define HASH_FLAG_AUTOGROW
138       </table>
139     </td>
140   </tr>
141 </table>
142 <table cellspacing=5 cellpadding=0 border=0>
143   <tr>
144     <td>
145       &nbsp;
146     </td>
147     <td>
148
149 <p>
150
151 <p>
152  If passed in to <a class="el" href="group__dbprim__hash.html#a18">HASH_TABLE_INIT</a>() or <a class="el" href="group__dbprim__hash.html#a6">ht_init</a>(), allows the hash table to grow automatically.     </td>
153   </tr>
154 </table>
155 <a name="a17" doxytag="dbprim.h.top::HASH_FLAG_AUTOSHRINK"></a><p>
156 <table width="100%" cellpadding="2" cellspacing="0" border="0">
157   <tr>
158     <td class="md">
159       <table cellpadding="0" cellspacing="0" border="0">
160         <tr>
161           <td nowrap valign="top"><b> 
162 #define HASH_FLAG_AUTOSHRINK
163       </table>
164     </td>
165   </tr>
166 </table>
167 <table cellspacing=5 cellpadding=0 border=0>
168   <tr>
169     <td>
170       &nbsp;
171     </td>
172     <td>
173
174 <p>
175
176 <p>
177  If passed in to <a class="el" href="group__dbprim__hash.html#a18">HASH_TABLE_INIT</a>() or <a class="el" href="group__dbprim__hash.html#a6">ht_init</a>(), allows the hash table to shrink automatically.     </td>
178   </tr>
179 </table>
180 <a name="a18" doxytag="dbprim.h.top::HASH_TABLE_INIT"></a><p>
181 <table width="100%" cellpadding="2" cellspacing="0" border="0">
182   <tr>
183     <td class="md">
184       <table cellpadding="0" cellspacing="0" border="0">
185         <tr>
186           <td nowrap valign="top"><b> 
187 #define HASH_TABLE_INIT(
188           </b></td>
189           <td valign="bottom"><b>
190 flags, func, comp, resize, extra&nbsp;)
191       </table>
192     </td>
193   </tr>
194 </table>
195 <table cellspacing=5 cellpadding=0 border=0>
196   <tr>
197     <td>
198       &nbsp;
199     </td>
200     <td>
201
202 <p>
203
204 <p>
205  This macro statically initializes a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.<dl compact><dt>
206 <b>Parameters: </b><dd>
207 <table border=0 cellspacing=2 cellpadding=0>
208 <tr><td valign=top><em>flags</em>
209 &nbsp;</td><td>
210 A bit-wise OR of <a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a>. If neither behavior is desired, use 0. </td></tr>
211 <tr><td valign=top><em>func</em>
212 &nbsp;</td><td>
213 A <a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> function pointer for a hash function. </td></tr>
214 <tr><td valign=top><em>comp</em>
215 &nbsp;</td><td>
216 A <a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> function pointer for a comparison function. </td></tr>
217 <tr><td valign=top><em>resize</em>
218 &nbsp;</td><td>
219 A <a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> function pointer for determining whether resizing is permitted and/or for notification of the resize. </td></tr>
220 <tr><td valign=top><em>extra</em>
221 &nbsp;</td><td>
222 Extra pointer data that should be associated with the hash table. </td></tr>
223 </table>
224 </dl>    </td>
225   </tr>
226 </table>
227 <a name="a32" doxytag="dbprim.h.top::he_flags"></a><p>
228 <table width="100%" cellpadding="2" cellspacing="0" border="0">
229   <tr>
230     <td class="md">
231       <table cellpadding="0" cellspacing="0" border="0">
232         <tr>
233           <td nowrap valign="top"><b> 
234 #define he_flags(
235           </b></td>
236           <td valign="bottom"><b>
237 entry&nbsp;)
238       </table>
239     </td>
240   </tr>
241 </table>
242 <table cellspacing=5 cellpadding=0 border=0>
243   <tr>
244     <td>
245       &nbsp;
246     </td>
247     <td>
248
249 <p>
250
251 <p>
252  This macro retrieves a set of user-defined flags associated with the entry. It may be used as an lvalue to set those flags.<dl compact><dt>
253 <b>Parameters: </b><dd>
254 <table border=0 cellspacing=2 cellpadding=0>
255 <tr><td valign=top><em>entry</em>
256 &nbsp;</td><td>
257 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.
258 <p>
259 </td></tr>
260 </table>
261 </dl><dl compact><dt>
262 <b>Returns: </b><dd>
263 An <code>unsigned long</code> containing the flags associated with the entry. </dl>    </td>
264   </tr>
265 </table>
266 <a name="a34" doxytag="dbprim.h.top::he_hash"></a><p>
267 <table width="100%" cellpadding="2" cellspacing="0" border="0">
268   <tr>
269     <td class="md">
270       <table cellpadding="0" cellspacing="0" border="0">
271         <tr>
272           <td nowrap valign="top"><b> 
273 #define he_hash(
274           </b></td>
275           <td valign="bottom"><b>
276 entry&nbsp;)
277       </table>
278     </td>
279   </tr>
280 </table>
281 <table cellspacing=5 cellpadding=0 border=0>
282   <tr>
283     <td>
284       &nbsp;
285     </td>
286     <td>
287
288 <p>
289
290 <p>
291  This macro retrieves the hash value of the given hash entry. If the hash table has been resized, this value may not be the same as a previous value.<dl compact><dt>
292 <b>Parameters: </b><dd>
293 <table border=0 cellspacing=2 cellpadding=0>
294 <tr><td valign=top><em>entry</em>
295 &nbsp;</td><td>
296 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.
297 <p>
298 </td></tr>
299 </table>
300 </dl><dl compact><dt>
301 <b>Returns: </b><dd>
302 An <code>unsigned long</code> containing the hash code for the entry. </dl>    </td>
303   </tr>
304 </table>
305 <a name="a35" doxytag="dbprim.h.top::he_key"></a><p>
306 <table width="100%" cellpadding="2" cellspacing="0" border="0">
307   <tr>
308     <td class="md">
309       <table cellpadding="0" cellspacing="0" border="0">
310         <tr>
311           <td nowrap valign="top"><b> 
312 #define he_key(
313           </b></td>
314           <td valign="bottom"><b>
315 entry&nbsp;)
316       </table>
317     </td>
318   </tr>
319 </table>
320 <table cellspacing=5 cellpadding=0 border=0>
321   <tr>
322     <td>
323       &nbsp;
324     </td>
325     <td>
326
327 <p>
328
329 <p>
330  This macro retrieves the key associated with the hash table entry.<dl compact><dt>
331 <b>Parameters: </b><dd>
332 <table border=0 cellspacing=2 cellpadding=0>
333 <tr><td valign=top><em>entry</em>
334 &nbsp;</td><td>
335 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.
336 <p>
337 </td></tr>
338 </table>
339 </dl><dl compact><dt>
340 <b>Returns: </b><dd>
341 A pointer to a <a class="el" href="group__dbprim__key.html#a0">db_key_t</a>. </dl>    </td>
342   </tr>
343 </table>
344 <a name="a31" doxytag="dbprim.h.top::he_link"></a><p>
345 <table width="100%" cellpadding="2" cellspacing="0" border="0">
346   <tr>
347     <td class="md">
348       <table cellpadding="0" cellspacing="0" border="0">
349         <tr>
350           <td nowrap valign="top"><b> 
351 #define he_link(
352           </b></td>
353           <td valign="bottom"><b>
354 entry&nbsp;)
355       </table>
356     </td>
357   </tr>
358 </table>
359 <table cellspacing=5 cellpadding=0 border=0>
360   <tr>
361     <td>
362       &nbsp;
363     </td>
364     <td>
365
366 <p>
367
368 <p>
369  This macro provides access to the linked list element buried in the hash table entry. It should *not* be used on entries currently in a hash table. The purpose of this macro is to allow an object containing a hash table entry to be placed upon a free list.<dl compact><dt>
370 <b>Parameters: </b><dd>
371 <table border=0 cellspacing=2 cellpadding=0>
372 <tr><td valign=top><em>entry</em>
373 &nbsp;</td><td>
374 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.
375 <p>
376 </td></tr>
377 </table>
378 </dl><dl compact><dt>
379 <b>Returns: </b><dd>
380 A pointer to a <a class="el" href="group__dbprim__link.html#a1">link_elem_t</a>. </dl>    </td>
381   </tr>
382 </table>
383 <a name="a33" doxytag="dbprim.h.top::he_table"></a><p>
384 <table width="100%" cellpadding="2" cellspacing="0" border="0">
385   <tr>
386     <td class="md">
387       <table cellpadding="0" cellspacing="0" border="0">
388         <tr>
389           <td nowrap valign="top"><b> 
390 #define he_table(
391           </b></td>
392           <td valign="bottom"><b>
393 entry&nbsp;)
394       </table>
395     </td>
396   </tr>
397 </table>
398 <table cellspacing=5 cellpadding=0 border=0>
399   <tr>
400     <td>
401       &nbsp;
402     </td>
403     <td>
404
405 <p>
406
407 <p>
408  This macro retrieves a pointer to the hash table the entry is in.<dl compact><dt>
409 <b>Parameters: </b><dd>
410 <table border=0 cellspacing=2 cellpadding=0>
411 <tr><td valign=top><em>entry</em>
412 &nbsp;</td><td>
413 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.
414 <p>
415 </td></tr>
416 </table>
417 </dl><dl compact><dt>
418 <b>Returns: </b><dd>
419 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </dl>    </td>
420   </tr>
421 </table>
422 <a name="a36" doxytag="dbprim.h.top::he_value"></a><p>
423 <table width="100%" cellpadding="2" cellspacing="0" border="0">
424   <tr>
425     <td class="md">
426       <table cellpadding="0" cellspacing="0" border="0">
427         <tr>
428           <td nowrap valign="top"><b> 
429 #define he_value(
430           </b></td>
431           <td valign="bottom"><b>
432 entry&nbsp;)
433       </table>
434     </td>
435   </tr>
436 </table>
437 <table cellspacing=5 cellpadding=0 border=0>
438   <tr>
439     <td>
440       &nbsp;
441     </td>
442     <td>
443
444 <p>
445
446 <p>
447  This macro retrieves the value associated with the hash table entry. It may be treated as an lvalue to change that value. Care should be taken when using this option.<dl compact><dt>
448 <b>Parameters: </b><dd>
449 <table border=0 cellspacing=2 cellpadding=0>
450 <tr><td valign=top><em>entry</em>
451 &nbsp;</td><td>
452 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.
453 <p>
454 </td></tr>
455 </table>
456 </dl><dl compact><dt>
457 <b>Returns: </b><dd>
458 A pointer to <code>void</code> representing the value associated with this entry. </dl>    </td>
459   </tr>
460 </table>
461 <a name="a30" doxytag="dbprim.h.top::he_verify"></a><p>
462 <table width="100%" cellpadding="2" cellspacing="0" border="0">
463   <tr>
464     <td class="md">
465       <table cellpadding="0" cellspacing="0" border="0">
466         <tr>
467           <td nowrap valign="top"><b> 
468 #define he_verify(
469           </b></td>
470           <td valign="bottom"><b>
471 entry&nbsp;)
472       </table>
473     </td>
474   </tr>
475 </table>
476 <table cellspacing=5 cellpadding=0 border=0>
477   <tr>
478     <td>
479       &nbsp;
480     </td>
481     <td>
482
483 <p>
484
485 <p>
486  This macro verifies that a given pointer actually does point to a hash table entry.<dl compact><dt>
487 <b>Parameters: </b><dd>
488 <table border=0 cellspacing=2 cellpadding=0>
489 <tr><td valign=top><em>entry</em>
490 &nbsp;</td><td>
491 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.
492 <p>
493 </td></tr>
494 </table>
495 </dl><dl compact><dt>
496 <b>Returns: </b><dd>
497 Boolean true if <code>entry</code> is a valid hash table entry or false otherwise. </dl>    </td>
498   </tr>
499 </table>
500 <a name="a25" doxytag="dbprim.h.top::ht_comp"></a><p>
501 <table width="100%" cellpadding="2" cellspacing="0" border="0">
502   <tr>
503     <td class="md">
504       <table cellpadding="0" cellspacing="0" border="0">
505         <tr>
506           <td nowrap valign="top"><b> 
507 #define ht_comp(
508           </b></td>
509           <td valign="bottom"><b>
510 table&nbsp;)
511       </table>
512     </td>
513   </tr>
514 </table>
515 <table cellspacing=5 cellpadding=0 border=0>
516   <tr>
517     <td>
518       &nbsp;
519     </td>
520     <td>
521
522 <p>
523
524 <p>
525  This macro retrieves the comparison function pointer.<dl compact><dt>
526 <b>Parameters: </b><dd>
527 <table border=0 cellspacing=2 cellpadding=0>
528 <tr><td valign=top><em>table</em>
529 &nbsp;</td><td>
530 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
531 <p>
532 </td></tr>
533 </table>
534 </dl><dl compact><dt>
535 <b>Returns: </b><dd>
536 A <a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a>. </dl>    </td>
537   </tr>
538 </table>
539 <a name="a23" doxytag="dbprim.h.top::ht_count"></a><p>
540 <table width="100%" cellpadding="2" cellspacing="0" border="0">
541   <tr>
542     <td class="md">
543       <table cellpadding="0" cellspacing="0" border="0">
544         <tr>
545           <td nowrap valign="top"><b> 
546 #define ht_count(
547           </b></td>
548           <td valign="bottom"><b>
549 table&nbsp;)
550       </table>
551     </td>
552   </tr>
553 </table>
554 <table cellspacing=5 cellpadding=0 border=0>
555   <tr>
556     <td>
557       &nbsp;
558     </td>
559     <td>
560
561 <p>
562
563 <p>
564  This macro retrieves the total number of items actually in the hash table.<dl compact><dt>
565 <b>Parameters: </b><dd>
566 <table border=0 cellspacing=2 cellpadding=0>
567 <tr><td valign=top><em>table</em>
568 &nbsp;</td><td>
569 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
570 <p>
571 </td></tr>
572 </table>
573 </dl><dl compact><dt>
574 <b>Returns: </b><dd>
575 An <code>unsigned long</code> containing a count of the number of items in the hash table. </dl>    </td>
576   </tr>
577 </table>
578 <a name="a27" doxytag="dbprim.h.top::ht_extra"></a><p>
579 <table width="100%" cellpadding="2" cellspacing="0" border="0">
580   <tr>
581     <td class="md">
582       <table cellpadding="0" cellspacing="0" border="0">
583         <tr>
584           <td nowrap valign="top"><b> 
585 #define ht_extra(
586           </b></td>
587           <td valign="bottom"><b>
588 table&nbsp;)
589       </table>
590     </td>
591   </tr>
592 </table>
593 <table cellspacing=5 cellpadding=0 border=0>
594   <tr>
595     <td>
596       &nbsp;
597     </td>
598     <td>
599
600 <p>
601
602 <p>
603  This macro retrieves the extra pointer data associated with a particular hash table.<dl compact><dt>
604 <b>Parameters: </b><dd>
605 <table border=0 cellspacing=2 cellpadding=0>
606 <tr><td valign=top><em>table</em>
607 &nbsp;</td><td>
608 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
609 <p>
610 </td></tr>
611 </table>
612 </dl><dl compact><dt>
613 <b>Returns: </b><dd>
614 A pointer to <code>void</code>. </dl>    </td>
615   </tr>
616 </table>
617 <a name="a20" doxytag="dbprim.h.top::ht_flags"></a><p>
618 <table width="100%" cellpadding="2" cellspacing="0" border="0">
619   <tr>
620     <td class="md">
621       <table cellpadding="0" cellspacing="0" border="0">
622         <tr>
623           <td nowrap valign="top"><b> 
624 #define ht_flags(
625           </b></td>
626           <td valign="bottom"><b>
627 table&nbsp;)
628       </table>
629     </td>
630   </tr>
631 </table>
632 <table cellspacing=5 cellpadding=0 border=0>
633   <tr>
634     <td>
635       &nbsp;
636     </td>
637     <td>
638
639 <p>
640
641 <p>
642  This macro retrieves the flags associated with the hash table. Only <a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a> have any meaning to the application; all other bits are reserved for use in the library. This macro may be used as an lvalue, but care must be taken to avoid modifying the library-specific bits.<dl compact><dt>
643 <b>Parameters: </b><dd>
644 <table border=0 cellspacing=2 cellpadding=0>
645 <tr><td valign=top><em>table</em>
646 &nbsp;</td><td>
647 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
648 <p>
649 </td></tr>
650 </table>
651 </dl><dl compact><dt>
652 <b>Returns: </b><dd>
653 An <code>unsigned long</code> containing the flags for the hash table. </dl>    </td>
654   </tr>
655 </table>
656 <a name="a21" doxytag="dbprim.h.top::ht_frozen"></a><p>
657 <table width="100%" cellpadding="2" cellspacing="0" border="0">
658   <tr>
659     <td class="md">
660       <table cellpadding="0" cellspacing="0" border="0">
661         <tr>
662           <td nowrap valign="top"><b> 
663 #define ht_frozen(
664           </b></td>
665           <td valign="bottom"><b>
666 table&nbsp;)
667       </table>
668     </td>
669   </tr>
670 </table>
671 <table cellspacing=5 cellpadding=0 border=0>
672   <tr>
673     <td>
674       &nbsp;
675     </td>
676     <td>
677
678 <p>
679
680 <p>
681  This macro returns a non-zero value if the table is currently frozen. The hash table may be frozen if there is an iteration in progress.<dl compact><dt>
682 <b>Parameters: </b><dd>
683 <table border=0 cellspacing=2 cellpadding=0>
684 <tr><td valign=top><em>table</em>
685 &nbsp;</td><td>
686 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
687 <p>
688 </td></tr>
689 </table>
690 </dl><dl compact><dt>
691 <b>Returns: </b><dd>
692 A zero value if the table is not frozen or a non-zero value if the table is frozen. </dl>    </td>
693   </tr>
694 </table>
695 <a name="a24" doxytag="dbprim.h.top::ht_func"></a><p>
696 <table width="100%" cellpadding="2" cellspacing="0" border="0">
697   <tr>
698     <td class="md">
699       <table cellpadding="0" cellspacing="0" border="0">
700         <tr>
701           <td nowrap valign="top"><b> 
702 #define ht_func(
703           </b></td>
704           <td valign="bottom"><b>
705 table&nbsp;)
706       </table>
707     </td>
708   </tr>
709 </table>
710 <table cellspacing=5 cellpadding=0 border=0>
711   <tr>
712     <td>
713       &nbsp;
714     </td>
715     <td>
716
717 <p>
718
719 <p>
720  This macro retrieves the hash function pointer.<dl compact><dt>
721 <b>Parameters: </b><dd>
722 <table border=0 cellspacing=2 cellpadding=0>
723 <tr><td valign=top><em>table</em>
724 &nbsp;</td><td>
725 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
726 <p>
727 </td></tr>
728 </table>
729 </dl><dl compact><dt>
730 <b>Returns: </b><dd>
731 A <a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a>. </dl>    </td>
732   </tr>
733 </table>
734 <a name="a22" doxytag="dbprim.h.top::ht_modulus"></a><p>
735 <table width="100%" cellpadding="2" cellspacing="0" border="0">
736   <tr>
737     <td class="md">
738       <table cellpadding="0" cellspacing="0" border="0">
739         <tr>
740           <td nowrap valign="top"><b> 
741 #define ht_modulus(
742           </b></td>
743           <td valign="bottom"><b>
744 table&nbsp;)
745       </table>
746     </td>
747   </tr>
748 </table>
749 <table cellspacing=5 cellpadding=0 border=0>
750   <tr>
751     <td>
752       &nbsp;
753     </td>
754     <td>
755
756 <p>
757
758 <p>
759  This macro retrieves the number of buckets allocated for the hash table. An application may wish to save this value between invocations to avoid the overhead of growing the table while filling it with data.<dl compact><dt>
760 <b>Parameters: </b><dd>
761 <table border=0 cellspacing=2 cellpadding=0>
762 <tr><td valign=top><em>table</em>
763 &nbsp;</td><td>
764 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
765 <p>
766 </td></tr>
767 </table>
768 </dl><dl compact><dt>
769 <b>Returns: </b><dd>
770 An <code>unsigned long</code> containing the number of buckets allocated for the hash table. </dl>    </td>
771   </tr>
772 </table>
773 <a name="a26" doxytag="dbprim.h.top::ht_rsize"></a><p>
774 <table width="100%" cellpadding="2" cellspacing="0" border="0">
775   <tr>
776     <td class="md">
777       <table cellpadding="0" cellspacing="0" border="0">
778         <tr>
779           <td nowrap valign="top"><b> 
780 #define ht_rsize(
781           </b></td>
782           <td valign="bottom"><b>
783 table&nbsp;)
784       </table>
785     </td>
786   </tr>
787 </table>
788 <table cellspacing=5 cellpadding=0 border=0>
789   <tr>
790     <td>
791       &nbsp;
792     </td>
793     <td>
794
795 <p>
796
797 <p>
798  This macro retrieves the resize callback function pointer.<dl compact><dt>
799 <b>Parameters: </b><dd>
800 <table border=0 cellspacing=2 cellpadding=0>
801 <tr><td valign=top><em>table</em>
802 &nbsp;</td><td>
803 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
804 <p>
805 </td></tr>
806 </table>
807 </dl><dl compact><dt>
808 <b>Returns: </b><dd>
809 A <a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a>. </dl>    </td>
810   </tr>
811 </table>
812 <a name="a28" doxytag="dbprim.h.top::ht_size"></a><p>
813 <table width="100%" cellpadding="2" cellspacing="0" border="0">
814   <tr>
815     <td class="md">
816       <table cellpadding="0" cellspacing="0" border="0">
817         <tr>
818           <td nowrap valign="top"><b> 
819 #define ht_size(
820           </b></td>
821           <td valign="bottom"><b>
822 table&nbsp;)
823       </table>
824     </td>
825   </tr>
826 </table>
827 <table cellspacing=5 cellpadding=0 border=0>
828   <tr>
829     <td>
830       &nbsp;
831     </td>
832     <td>
833
834 <p>
835
836 <p>
837  This macro returns the physical size of the bucket array allocated by the library for this hash table.<dl compact><dt>
838 <b>Parameters: </b><dd>
839 <table border=0 cellspacing=2 cellpadding=0>
840 <tr><td valign=top><em>table</em>
841 &nbsp;</td><td>
842 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
843 <p>
844 </td></tr>
845 </table>
846 </dl><dl compact><dt>
847 <b>Returns: </b><dd>
848 A <code>size_t</code>. </dl>    </td>
849   </tr>
850 </table>
851 <a name="a19" doxytag="dbprim.h.top::ht_verify"></a><p>
852 <table width="100%" cellpadding="2" cellspacing="0" border="0">
853   <tr>
854     <td class="md">
855       <table cellpadding="0" cellspacing="0" border="0">
856         <tr>
857           <td nowrap valign="top"><b> 
858 #define ht_verify(
859           </b></td>
860           <td valign="bottom"><b>
861 table&nbsp;)
862       </table>
863     </td>
864   </tr>
865 </table>
866 <table cellspacing=5 cellpadding=0 border=0>
867   <tr>
868     <td>
869       &nbsp;
870     </td>
871     <td>
872
873 <p>
874
875 <p>
876  This macro verifies that a given pointer actually does point to a hash table.<dl compact><dt>
877 <b>Parameters: </b><dd>
878 <table border=0 cellspacing=2 cellpadding=0>
879 <tr><td valign=top><em>table</em>
880 &nbsp;</td><td>
881 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.
882 <p>
883 </td></tr>
884 </table>
885 </dl><dl compact><dt>
886 <b>Returns: </b><dd>
887 Boolean true if <code>table</code> is a valid hash table or false otherwise. </dl>    </td>
888   </tr>
889 </table>
890 <a name="a37" doxytag="dbprim.h.top::st_rsize"></a><p>
891 <table width="100%" cellpadding="2" cellspacing="0" border="0">
892   <tr>
893     <td class="md">
894       <table cellpadding="0" cellspacing="0" border="0">
895         <tr>
896           <td nowrap valign="top"><b> 
897 #define st_rsize(
898           </b></td>
899           <td valign="bottom"><b>
900 table&nbsp;)
901       </table>
902     </td>
903   </tr>
904 </table>
905 <table cellspacing=5 cellpadding=0 border=0>
906   <tr>
907     <td>
908       &nbsp;
909     </td>
910     <td>
911
912 <p>
913
914 <p>
915  This macro retrieves the resize callback function pointer.<dl compact><dt>
916 <b>Parameters: </b><dd>
917 <table border=0 cellspacing=2 cellpadding=0>
918 <tr><td valign=top><em>table</em>
919 &nbsp;</td><td>
920 A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.
921 <p>
922 </td></tr>
923 </table>
924 </dl><dl compact><dt>
925 <b>Returns: </b><dd>
926 A <a class="el" href="group__dbprim__smat.html#a3">smat_resize_t</a>. </dl>    </td>
927   </tr>
928 </table>
929 <hr><h2>Typedef Documentation</h2>
930 <a name="a4" doxytag="dbprim.h.top::hash_comp_t"></a><p>
931 <table width="100%" cellpadding="2" cellspacing="0" border="0">
932   <tr>
933     <td class="md">
934       <table cellpadding="0" cellspacing="0" border="0">
935         <tr>
936           <td nowrap valign="top"><b> 
937 typedef unsigned long(* hash_comp_t)(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *)
938           </b></td>
939         </tr>
940
941       </table>
942     </td>
943   </tr>
944 </table>
945 <table cellspacing=5 cellpadding=0 border=0>
946   <tr>
947     <td>
948       &nbsp;
949     </td>
950     <td>
951
952 <p>
953
954 <p>
955  This function pointer references a callback used to compare entries in a hash table. It should return 0 for identical entries and non-zero otherwise. No assumptions should be made about the order in which the two keys are passed to this function.     </td>
956   </tr>
957 </table>
958 <a name="a1" doxytag="dbprim.h.top::hash_entry_t"></a><p>
959 <table width="100%" cellpadding="2" cellspacing="0" border="0">
960   <tr>
961     <td class="md">
962       <table cellpadding="0" cellspacing="0" border="0">
963         <tr>
964           <td nowrap valign="top"><b> 
965 typedef struct _hash_entry_s hash_entry_t
966           </b></td>
967         </tr>
968
969       </table>
970     </td>
971   </tr>
972 </table>
973 <table cellspacing=5 cellpadding=0 border=0>
974   <tr>
975     <td>
976       &nbsp;
977     </td>
978     <td>
979
980 <p>
981
982 <p>
983  This structure represents a single entry of a hash table.     </td>
984   </tr>
985 </table>
986 <a name="a3" doxytag="dbprim.h.top::hash_func_t"></a><p>
987 <table width="100%" cellpadding="2" cellspacing="0" border="0">
988   <tr>
989     <td class="md">
990       <table cellpadding="0" cellspacing="0" border="0">
991         <tr>
992           <td nowrap valign="top"><b> 
993 typedef unsigned long(* hash_func_t)(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> *)
994           </b></td>
995         </tr>
996
997       </table>
998     </td>
999   </tr>
1000 </table>
1001 <table cellspacing=5 cellpadding=0 border=0>
1002   <tr>
1003     <td>
1004       &nbsp;
1005     </td>
1006     <td>
1007
1008 <p>
1009
1010 <p>
1011  This function is associated with a hash table, and is responsible for generating a hash value. The full 32-bit range of an <code>unsigned long</code> should be used--do *not* reduce the hash value by the modulus of the hash table.     </td>
1012   </tr>
1013 </table>
1014 <a name="a2" doxytag="dbprim.h.top::hash_iter_t"></a><p>
1015 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1016   <tr>
1017     <td class="md">
1018       <table cellpadding="0" cellspacing="0" border="0">
1019         <tr>
1020           <td nowrap valign="top"><b> 
1021 typedef unsigned long(* hash_iter_t)(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *, void *)
1022           </b></td>
1023         </tr>
1024
1025       </table>
1026     </td>
1027   </tr>
1028 </table>
1029 <table cellspacing=5 cellpadding=0 border=0>
1030   <tr>
1031     <td>
1032       &nbsp;
1033     </td>
1034     <td>
1035
1036 <p>
1037
1038 <p>
1039  This function pointer references a callback used by <a class="el" href="group__dbprim__hash.html#a11">ht_iter</a>() and <a class="el" href="group__dbprim__hash.html#a12">ht_flush</a>(). It should return 0 for success. A non-zero return value will terminate the operation and will become the return value of the <a class="el" href="group__dbprim__hash.html#a11">ht_iter</a>() or <a class="el" href="group__dbprim__hash.html#a12">ht_flush</a>() call.     </td>
1040   </tr>
1041 </table>
1042 <a name="a5" doxytag="dbprim.h.top::hash_resize_t"></a><p>
1043 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1044   <tr>
1045     <td class="md">
1046       <table cellpadding="0" cellspacing="0" border="0">
1047         <tr>
1048           <td nowrap valign="top"><b> 
1049 typedef unsigned long(* hash_resize_t)(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, unsigned long)
1050           </b></td>
1051         </tr>
1052
1053       </table>
1054     </td>
1055   </tr>
1056 </table>
1057 <table cellspacing=5 cellpadding=0 border=0>
1058   <tr>
1059     <td>
1060       &nbsp;
1061     </td>
1062     <td>
1063
1064 <p>
1065
1066 <p>
1067  This function pointer references a callback that will be called with both the old and new hash table sizes whenever a hash table is resized. It should return non-zero only when the resize should be inhibited.     </td>
1068   </tr>
1069 </table>
1070 <a name="a0" doxytag="dbprim.h.top::hash_table_t"></a><p>
1071 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1072   <tr>
1073     <td class="md">
1074       <table cellpadding="0" cellspacing="0" border="0">
1075         <tr>
1076           <td nowrap valign="top"><b> 
1077 typedef struct _hash_table_s hash_table_t
1078           </b></td>
1079         </tr>
1080
1081       </table>
1082     </td>
1083   </tr>
1084 </table>
1085 <table cellspacing=5 cellpadding=0 border=0>
1086   <tr>
1087     <td>
1088       &nbsp;
1089     </td>
1090     <td>
1091
1092 <p>
1093
1094 <p>
1095  This structure is the basis of all hash tables maintained by this library.     </td>
1096   </tr>
1097 </table>
1098 <hr><h2>Function Documentation</h2>
1099 <a name="a15" doxytag="he_init.c::he_init"></a><p>
1100 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1101   <tr>
1102     <td class="md">
1103       <table cellpadding="0" cellspacing="0" border="0">
1104         <tr>
1105           <td nowrap valign="top"><b> 
1106 unsigned long he_init (
1107           </b></td>
1108           <td valign="bottom"><b>
1109 <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> * <em>entry</em>, 
1110           </b></td>
1111         </tr>
1112         <tr>
1113           <td></td>
1114           <td><b>
1115 void * <em>value</em>&nbsp;)
1116           </b></td>
1117         </tr>
1118
1119       </table>
1120     </td>
1121   </tr>
1122 </table>
1123 <table cellspacing=5 cellpadding=0 border=0>
1124   <tr>
1125     <td>
1126       &nbsp;
1127     </td>
1128     <td>
1129
1130 <p>
1131
1132 <p>
1133  This function dynamically initializes a hash table entry.<dl compact><dt>
1134 <b>Parameters: </b><dd>
1135 <table border=0 cellspacing=2 cellpadding=0>
1136 <tr><td valign=top><em>entry</em>
1137 &nbsp;</td><td>
1138 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> to be initialized. </td></tr>
1139 <tr><td valign=top><em>value</em>
1140 &nbsp;</td><td>
1141 A pointer to <code>void</code> which will be the value of the hash table entry.</td></tr>
1142 </table>
1143 </dl><dl compact><dt>
1144 <b>Return values: </b><dd>
1145 <table border=0 cellspacing=2 cellpadding=0>
1146 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1147 &nbsp;</td><td>
1148 A <code>NULL</code> pointer was passed for <code>entry</code>. </td></tr>
1149 </table>
1150 </dl>    </td>
1151   </tr>
1152 </table>
1153 <a name="a7" doxytag="ht_add.c::ht_add"></a><p>
1154 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1155   <tr>
1156     <td class="md">
1157       <table cellpadding="0" cellspacing="0" border="0">
1158         <tr>
1159           <td nowrap valign="top"><b> 
1160 unsigned long ht_add (
1161           </b></td>
1162           <td valign="bottom"><b>
1163 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1164           </b></td>
1165         </tr>
1166         <tr>
1167           <td></td>
1168           <td><b>
1169 <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> * <em>entry</em>, 
1170           </b></td>
1171         </tr>
1172         <tr>
1173           <td></td>
1174           <td><b>
1175 <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> * <em>key</em>&nbsp;)
1176           </b></td>
1177         </tr>
1178
1179       </table>
1180     </td>
1181   </tr>
1182 </table>
1183 <table cellspacing=5 cellpadding=0 border=0>
1184   <tr>
1185     <td>
1186       &nbsp;
1187     </td>
1188     <td>
1189
1190 <p>
1191
1192 <p>
1193  This function adds an entry to a hash table.<dl compact><dt>
1194 <b>Parameters: </b><dd>
1195 <table border=0 cellspacing=2 cellpadding=0>
1196 <tr><td valign=top><em>table</em>
1197 &nbsp;</td><td>
1198 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </td></tr>
1199 <tr><td valign=top><em>entry</em>
1200 &nbsp;</td><td>
1201 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> to be added to the table. </td></tr>
1202 <tr><td valign=top><em>key</em>
1203 &nbsp;</td><td>
1204 A pointer to a <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> containing the key for the entry.</td></tr>
1205 </table>
1206 </dl><dl compact><dt>
1207 <b>Return values: </b><dd>
1208 <table border=0 cellspacing=2 cellpadding=0>
1209 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1210 &nbsp;</td><td>
1211 An invalid argument was given. </td></tr>
1212 <tr><td valign=top><em>DB_ERR_BUSY</em>
1213 &nbsp;</td><td>
1214 The entry is already in a table. </td></tr>
1215 <tr><td valign=top><em>DB_ERR_FROZEN</em>
1216 &nbsp;</td><td>
1217 The table is currently frozen. </td></tr>
1218 <tr><td valign=top><em>DB_ERR_NOTABLE</em>
1219 &nbsp;</td><td>
1220 The bucket table has not been allocated and automatic growth is not enabled. </td></tr>
1221 <tr><td valign=top><em>DB_ERR_DUPLICATE</em>
1222 &nbsp;</td><td>
1223 The entry is a duplicate of an existing entry. </td></tr>
1224 <tr><td valign=top><em>DB_ERR_UNRECOVERABLE</em>
1225 &nbsp;</td><td>
1226 An unrecoverable error occurred while resizing the table. </td></tr>
1227 </table>
1228 </dl>    </td>
1229   </tr>
1230 </table>
1231 <a name="a10" doxytag="ht_find.c::ht_find"></a><p>
1232 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1233   <tr>
1234     <td class="md">
1235       <table cellpadding="0" cellspacing="0" border="0">
1236         <tr>
1237           <td nowrap valign="top"><b> 
1238 unsigned long ht_find (
1239           </b></td>
1240           <td valign="bottom"><b>
1241 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1242           </b></td>
1243         </tr>
1244         <tr>
1245           <td></td>
1246           <td><b>
1247 <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> ** <em>entry_p</em>, 
1248           </b></td>
1249         </tr>
1250         <tr>
1251           <td></td>
1252           <td><b>
1253 <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> * <em>key</em>&nbsp;)
1254           </b></td>
1255         </tr>
1256
1257       </table>
1258     </td>
1259   </tr>
1260 </table>
1261 <table cellspacing=5 cellpadding=0 border=0>
1262   <tr>
1263     <td>
1264       &nbsp;
1265     </td>
1266     <td>
1267
1268 <p>
1269
1270 <p>
1271  This function looks up an entry matching the given <code>key</code>.<dl compact><dt>
1272 <b>Parameters: </b><dd>
1273 <table border=0 cellspacing=2 cellpadding=0>
1274 <tr><td valign=top><em>table</em>
1275 &nbsp;</td><td>
1276 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </td></tr>
1277 <tr><td valign=top><em>entry_p</em>
1278 &nbsp;</td><td>
1279 A pointer to a pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>. This is a result parameter. If <code>NULL</code> is passed, the lookup will be performed and an appropriate error code returned.  </td></tr>
1280 <tr><td valign=top><em>key</em>
1281 &nbsp;</td><td>
1282 A pointer to a <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> describing the item to find.</td></tr>
1283 </table>
1284 </dl><dl compact><dt>
1285 <b>Return values: </b><dd>
1286 <table border=0 cellspacing=2 cellpadding=0>
1287 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1288 &nbsp;</td><td>
1289 An argument was invalid. </td></tr>
1290 <tr><td valign=top><em>DB_ERR_NOENTRY</em>
1291 &nbsp;</td><td>
1292 No matching entry was found. </td></tr>
1293 </table>
1294 </dl>    </td>
1295   </tr>
1296 </table>
1297 <a name="a12" doxytag="ht_flush.c::ht_flush"></a><p>
1298 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1299   <tr>
1300     <td class="md">
1301       <table cellpadding="0" cellspacing="0" border="0">
1302         <tr>
1303           <td nowrap valign="top"><b> 
1304 unsigned long ht_flush (
1305           </b></td>
1306           <td valign="bottom"><b>
1307 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1308           </b></td>
1309         </tr>
1310         <tr>
1311           <td></td>
1312           <td><b>
1313 <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> <em>flush_func</em>, 
1314           </b></td>
1315         </tr>
1316         <tr>
1317           <td></td>
1318           <td><b>
1319 void * <em>extra</em>&nbsp;)
1320           </b></td>
1321         </tr>
1322
1323       </table>
1324     </td>
1325   </tr>
1326 </table>
1327 <table cellspacing=5 cellpadding=0 border=0>
1328   <tr>
1329     <td>
1330       &nbsp;
1331     </td>
1332     <td>
1333
1334 <p>
1335
1336 <p>
1337  This function flushes a hash table--that is, it removes each entry from the table. If a <code>flush_func</code> is specified, it will be called on the entry after it has been removed from the table, and may safely call <code>free()</code>.<dl compact><dt>
1338 <b>Parameters: </b><dd>
1339 <table border=0 cellspacing=2 cellpadding=0>
1340 <tr><td valign=top><em>table</em>
1341 &nbsp;</td><td>
1342 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </td></tr>
1343 <tr><td valign=top><em>flush_func</em>
1344 &nbsp;</td><td>
1345 A pointer to a callback function used to perform user-specified actions on an entry after removing it from the table. May be <code>NULL</code>. See the documentation for <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> for more information. </td></tr>
1346 <tr><td valign=top><em>extra</em>
1347 &nbsp;</td><td>
1348 A <code>void</code> pointer that will be passed to <code>flush_func</code>.</td></tr>
1349 </table>
1350 </dl><dl compact><dt>
1351 <b>Return values: </b><dd>
1352 <table border=0 cellspacing=2 cellpadding=0>
1353 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1354 &nbsp;</td><td>
1355 An argument was invalid. </td></tr>
1356 <tr><td valign=top><em>DB_ERR_FROZEN</em>
1357 &nbsp;</td><td>
1358 The hash table is frozen. </td></tr>
1359 </table>
1360 </dl>    </td>
1361   </tr>
1362 </table>
1363 <a name="a14" doxytag="ht_free.c::ht_free"></a><p>
1364 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1365   <tr>
1366     <td class="md">
1367       <table cellpadding="0" cellspacing="0" border="0">
1368         <tr>
1369           <td nowrap valign="top"><b> 
1370 unsigned long ht_free (
1371           </b></td>
1372           <td valign="bottom"><b>
1373 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>&nbsp;)
1374           </b></td>
1375         </tr>
1376
1377       </table>
1378     </td>
1379   </tr>
1380 </table>
1381 <table cellspacing=5 cellpadding=0 border=0>
1382   <tr>
1383     <td>
1384       &nbsp;
1385     </td>
1386     <td>
1387
1388 <p>
1389
1390 <p>
1391  This function releases the memory used by the bucket table in an empty hash table.<dl compact><dt>
1392 <b>Parameters: </b><dd>
1393 <table border=0 cellspacing=2 cellpadding=0>
1394 <tr><td valign=top><em>table</em>
1395 &nbsp;</td><td>
1396 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>.</td></tr>
1397 </table>
1398 </dl><dl compact><dt>
1399 <b>Return values: </b><dd>
1400 <table border=0 cellspacing=2 cellpadding=0>
1401 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1402 &nbsp;</td><td>
1403 An invalid argument was given. </td></tr>
1404 <tr><td valign=top><em>DB_ERR_FROZEN</em>
1405 &nbsp;</td><td>
1406 The table is frozen. </td></tr>
1407 <tr><td valign=top><em>DB_ERR_NOTEMPTY</em>
1408 &nbsp;</td><td>
1409 The table is not empty. </td></tr>
1410 </table>
1411 </dl>    </td>
1412   </tr>
1413 </table>
1414 <a name="a6" doxytag="ht_init.c::ht_init"></a><p>
1415 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1416   <tr>
1417     <td class="md">
1418       <table cellpadding="0" cellspacing="0" border="0">
1419         <tr>
1420           <td nowrap valign="top"><b> 
1421 unsigned long ht_init (
1422           </b></td>
1423           <td valign="bottom"><b>
1424 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1425           </b></td>
1426         </tr>
1427         <tr>
1428           <td></td>
1429           <td><b>
1430 unsigned long <em>flags</em>, 
1431           </b></td>
1432         </tr>
1433         <tr>
1434           <td></td>
1435           <td><b>
1436 <a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> <em>func</em>, 
1437           </b></td>
1438         </tr>
1439         <tr>
1440           <td></td>
1441           <td><b>
1442 <a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> <em>comp</em>, 
1443           </b></td>
1444         </tr>
1445         <tr>
1446           <td></td>
1447           <td><b>
1448 <a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> <em>resize</em>, 
1449           </b></td>
1450         </tr>
1451         <tr>
1452           <td></td>
1453           <td><b>
1454 void * <em>extra</em>, 
1455           </b></td>
1456         </tr>
1457         <tr>
1458           <td></td>
1459           <td><b>
1460 unsigned long <em>init_mod</em>&nbsp;)
1461           </b></td>
1462         </tr>
1463
1464       </table>
1465     </td>
1466   </tr>
1467 </table>
1468 <table cellspacing=5 cellpadding=0 border=0>
1469   <tr>
1470     <td>
1471       &nbsp;
1472     </td>
1473     <td>
1474
1475 <p>
1476
1477 <p>
1478  This function dynamically initializes a hash table.<dl compact><dt>
1479 <b>Parameters: </b><dd>
1480 <table border=0 cellspacing=2 cellpadding=0>
1481 <tr><td valign=top><em>table</em>
1482 &nbsp;</td><td>
1483 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> to be initialized. </td></tr>
1484 <tr><td valign=top><em>flags</em>
1485 &nbsp;</td><td>
1486 A bit-wise OR of <a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a>. If neither behavior is desired, use 0. </td></tr>
1487 <tr><td valign=top><em>func</em>
1488 &nbsp;</td><td>
1489 A <a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> function pointer for a hash function. </td></tr>
1490 <tr><td valign=top><em>comp</em>
1491 &nbsp;</td><td>
1492 A <a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> function pointer for a comparison function. </td></tr>
1493 <tr><td valign=top><em>resize</em>
1494 &nbsp;</td><td>
1495 A <a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> function pointer for determining whether resizing is permitted and/or for notification of the resize. </td></tr>
1496 <tr><td valign=top><em>extra</em>
1497 &nbsp;</td><td>
1498 Extra pointer data that should be associated with the hash table. </td></tr>
1499 <tr><td valign=top><em>init_mod</em>
1500 &nbsp;</td><td>
1501 An initial modulus for the table. This will presumably be extracted by <a class="el" href="group__dbprim__hash.html#a22">ht_modulus</a>() in a previous invocation of the application. A 0 value is valid.</td></tr>
1502 </table>
1503 </dl><dl compact><dt>
1504 <b>Return values: </b><dd>
1505 <table border=0 cellspacing=2 cellpadding=0>
1506 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1507 &nbsp;</td><td>
1508 An invalid argument was given. </td></tr>
1509 <tr><td valign=top><em>ENOMEM</em>
1510 &nbsp;</td><td>
1511 Unable to allocate memory. </td></tr>
1512 </table>
1513 </dl>    </td>
1514   </tr>
1515 </table>
1516 <a name="a11" doxytag="ht_iter.c::ht_iter"></a><p>
1517 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1518   <tr>
1519     <td class="md">
1520       <table cellpadding="0" cellspacing="0" border="0">
1521         <tr>
1522           <td nowrap valign="top"><b> 
1523 unsigned long ht_iter (
1524           </b></td>
1525           <td valign="bottom"><b>
1526 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1527           </b></td>
1528         </tr>
1529         <tr>
1530           <td></td>
1531           <td><b>
1532 <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> <em>iter_func</em>, 
1533           </b></td>
1534         </tr>
1535         <tr>
1536           <td></td>
1537           <td><b>
1538 void * <em>extra</em>&nbsp;)
1539           </b></td>
1540         </tr>
1541
1542       </table>
1543     </td>
1544   </tr>
1545 </table>
1546 <table cellspacing=5 cellpadding=0 border=0>
1547   <tr>
1548     <td>
1549       &nbsp;
1550     </td>
1551     <td>
1552
1553 <p>
1554
1555 <p>
1556  This function iterates over every entry in a hash table (in an unspecified order), executing the given <code>iter_func</code> on each entry.<dl compact><dt>
1557 <b>Parameters: </b><dd>
1558 <table border=0 cellspacing=2 cellpadding=0>
1559 <tr><td valign=top><em>table</em>
1560 &nbsp;</td><td>
1561 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </td></tr>
1562 <tr><td valign=top><em>iter_func</em>
1563 &nbsp;</td><td>
1564 A pointer to a callback function used to perform user-specified actions on an entry in a hash table. <code>NULL</code> is an invalid value. See the documentation for <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> for more information. </td></tr>
1565 <tr><td valign=top><em>extra</em>
1566 &nbsp;</td><td>
1567 A <code>void</code> pointer that will be passed to <code>iter_func</code>.</td></tr>
1568 </table>
1569 </dl><dl compact><dt>
1570 <b>Return values: </b><dd>
1571 <table border=0 cellspacing=2 cellpadding=0>
1572 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1573 &nbsp;</td><td>
1574 An argument was invalid. </td></tr>
1575 <tr><td valign=top><em>DB_ERR_FROZEN</em>
1576 &nbsp;</td><td>
1577 The hash table is frozen. </td></tr>
1578 </table>
1579 </dl>    </td>
1580   </tr>
1581 </table>
1582 <a name="a8" doxytag="ht_move.c::ht_move"></a><p>
1583 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1584   <tr>
1585     <td class="md">
1586       <table cellpadding="0" cellspacing="0" border="0">
1587         <tr>
1588           <td nowrap valign="top"><b> 
1589 unsigned long ht_move (
1590           </b></td>
1591           <td valign="bottom"><b>
1592 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1593           </b></td>
1594         </tr>
1595         <tr>
1596           <td></td>
1597           <td><b>
1598 <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> * <em>entry</em>, 
1599           </b></td>
1600         </tr>
1601         <tr>
1602           <td></td>
1603           <td><b>
1604 <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> * <em>key</em>&nbsp;)
1605           </b></td>
1606         </tr>
1607
1608       </table>
1609     </td>
1610   </tr>
1611 </table>
1612 <table cellspacing=5 cellpadding=0 border=0>
1613   <tr>
1614     <td>
1615       &nbsp;
1616     </td>
1617     <td>
1618
1619 <p>
1620
1621 <p>
1622  This function moves an existing entry in the hash table to correspond to the new key.<dl compact><dt>
1623 <b>Parameters: </b><dd>
1624 <table border=0 cellspacing=2 cellpadding=0>
1625 <tr><td valign=top><em>table</em>
1626 &nbsp;</td><td>
1627 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </td></tr>
1628 <tr><td valign=top><em>entry</em>
1629 &nbsp;</td><td>
1630 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> to be moved. It must already be in the hash table. </td></tr>
1631 <tr><td valign=top><em>key</em>
1632 &nbsp;</td><td>
1633 A pointer to a <a class="el" href="group__dbprim__key.html#a0">db_key_t</a> describing the new key for the entry.</td></tr>
1634 </table>
1635 </dl><dl compact><dt>
1636 <b>Return values: </b><dd>
1637 <table border=0 cellspacing=2 cellpadding=0>
1638 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1639 &nbsp;</td><td>
1640 An invalid argument was given. </td></tr>
1641 <tr><td valign=top><em>DB_ERR_UNUSED</em>
1642 &nbsp;</td><td>
1643 Entry is not in a hash table. </td></tr>
1644 <tr><td valign=top><em>DB_ERR_WRONGTABLE</em>
1645 &nbsp;</td><td>
1646 Entry is not in this hash table. </td></tr>
1647 <tr><td valign=top><em>DB_ERR_FROZEN</em>
1648 &nbsp;</td><td>
1649 Hash table is frozen. </td></tr>
1650 <tr><td valign=top><em>DB_ERR_DUPLICATE</em>
1651 &nbsp;</td><td>
1652 New key is a duplicate of an existing key. </td></tr>
1653 <tr><td valign=top><em>DB_ERR_READDFAILED</em>
1654 &nbsp;</td><td>
1655 Unable to re-add entry to table. </td></tr>
1656 </table>
1657 </dl>    </td>
1658   </tr>
1659 </table>
1660 <a name="a9" doxytag="ht_remove.c::ht_remove"></a><p>
1661 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1662   <tr>
1663     <td class="md">
1664       <table cellpadding="0" cellspacing="0" border="0">
1665         <tr>
1666           <td nowrap valign="top"><b> 
1667 unsigned long ht_remove (
1668           </b></td>
1669           <td valign="bottom"><b>
1670 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1671           </b></td>
1672         </tr>
1673         <tr>
1674           <td></td>
1675           <td><b>
1676 <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> * <em>entry</em>&nbsp;)
1677           </b></td>
1678         </tr>
1679
1680       </table>
1681     </td>
1682   </tr>
1683 </table>
1684 <table cellspacing=5 cellpadding=0 border=0>
1685   <tr>
1686     <td>
1687       &nbsp;
1688     </td>
1689     <td>
1690
1691 <p>
1692
1693 <p>
1694  This function removes the given element from the specified hash table.<dl compact><dt>
1695 <b>Parameters: </b><dd>
1696 <table border=0 cellspacing=2 cellpadding=0>
1697 <tr><td valign=top><em>table</em>
1698 &nbsp;</td><td>
1699 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </td></tr>
1700 <tr><td valign=top><em>entry</em>
1701 &nbsp;</td><td>
1702 A pointer to a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> to be removed from the table.</td></tr>
1703 </table>
1704 </dl><dl compact><dt>
1705 <b>Return values: </b><dd>
1706 <table border=0 cellspacing=2 cellpadding=0>
1707 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1708 &nbsp;</td><td>
1709 An invalid argument was given. </td></tr>
1710 <tr><td valign=top><em>DB_ERR_UNUSED</em>
1711 &nbsp;</td><td>
1712 Entry is not in a hash table. </td></tr>
1713 <tr><td valign=top><em>DB_ERR_WRONGTABLE</em>
1714 &nbsp;</td><td>
1715 Entry is not in this hash table. </td></tr>
1716 <tr><td valign=top><em>DB_ERR_FROZEN</em>
1717 &nbsp;</td><td>
1718 Hash table is frozen. </td></tr>
1719 <tr><td valign=top><em>DB_ERR_UNRECOVERABLE</em>
1720 &nbsp;</td><td>
1721 An unrecoverable error occurred while resizing the table. </td></tr>
1722 </table>
1723 </dl>    </td>
1724   </tr>
1725 </table>
1726 <a name="a13" doxytag="ht_resize.c::ht_resize"></a><p>
1727 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1728   <tr>
1729     <td class="md">
1730       <table cellpadding="0" cellspacing="0" border="0">
1731         <tr>
1732           <td nowrap valign="top"><b> 
1733 unsigned long ht_resize (
1734           </b></td>
1735           <td valign="bottom"><b>
1736 <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> * <em>table</em>, 
1737           </b></td>
1738         </tr>
1739         <tr>
1740           <td></td>
1741           <td><b>
1742 unsigned long <em>new_size</em>&nbsp;)
1743           </b></td>
1744         </tr>
1745
1746       </table>
1747     </td>
1748   </tr>
1749 </table>
1750 <table cellspacing=5 cellpadding=0 border=0>
1751   <tr>
1752     <td>
1753       &nbsp;
1754     </td>
1755     <td>
1756
1757 <p>
1758
1759 <p>
1760  This function resizes a hash table to the given <code>new_size</code>. If <code>new_size</code> is 0, then an appropriate new size based on the current number of items in the hash table will be selected.<dl compact><dt>
1761 <b>Parameters: </b><dd>
1762 <table border=0 cellspacing=2 cellpadding=0>
1763 <tr><td valign=top><em>table</em>
1764 &nbsp;</td><td>
1765 A pointer to a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a>. </td></tr>
1766 <tr><td valign=top><em>new_size</em>
1767 &nbsp;</td><td>
1768 A new size value for the table.</td></tr>
1769 </table>
1770 </dl><dl compact><dt>
1771 <b>Return values: </b><dd>
1772 <table border=0 cellspacing=2 cellpadding=0>
1773 <tr><td valign=top><em>DB_ERR_BADARGS</em>
1774 &nbsp;</td><td>
1775 An argument was invalid. </td></tr>
1776 <tr><td valign=top><em>DB_ERR_FROZEN</em>
1777 &nbsp;</td><td>
1778 The table is currently frozen. </td></tr>
1779 <tr><td valign=top><em>DB_ERR_UNRECOVERABLE</em>
1780 &nbsp;</td><td>
1781 A catastrophic error was encountered. The table is now unusable. </td></tr>
1782 <tr><td valign=top><em>ENOMEM</em>
1783 &nbsp;</td><td>
1784 No memory could be allocated for the new bucket table. </td></tr>
1785 </table>
1786 </dl>    </td>
1787   </tr>
1788 </table>
1789 <hr><address><small>Generated at Thu Mar 6 21:23:10 2003 for dbprim by
1790 <a href="http://www.doxygen.org/index.html">
1791 <img src="doxygen.gif" alt="doxygen" align="middle" border=0 
1792 width=110 height=53></a>1.2.8.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
1793  &copy;&nbsp;1997-2001</small></address>
1794 </body>
1795 </html>