ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/vendor/pxys2-2.1.0/pxyservd/dbprim/doc/html/group__dbprim__hash.html
Revision: 3253
Committed: Wed Apr 2 20:46:18 2014 UTC (12 years, 3 months ago) by michael
Content type: text/html
File size: 136194 byte(s)
Log Message:
- Imported pxys2-2.1.0

File Contents

# User Rev Content
1 michael 3253 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2     <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3     <title>DatabasePrimitivesLibrary: Hash tables</title>
4     <link href="doxygen.css" rel="stylesheet" type="text/css">
5     </head><body>
6     <!-- Generated by Doxygen 1.4.4 -->
7     <div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
8     <h1>Hash tables</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
9     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#ga1">hash_table_t</a> structure that describes the table and a <a class="el" href="group__dbprim__hash.html#ga2">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#ga18">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#ga17">ht_resize()</a> function.<p>
10     Entries may be added to and removed from the table using the <a class="el" href="group__dbprim__hash.html#ga11">ht_add()</a> and <a class="el" href="group__dbprim__hash.html#ga13">ht_remove()</a> functions. Additionally, the key on a given entry may be changed using the <a class="el" href="group__dbprim__hash.html#ga12">ht_move()</a> function. Of course, any given entry may be looked up using the <a class="el" href="group__dbprim__hash.html#ga14">ht_find()</a> function, and <a class="el" href="group__dbprim__hash.html#ga15">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#ga16">ht_flush()</a> function will remove all entries from the hash table, optionally executing a user-specified clean-up function.
11     <p>
12     <table border="0" cellpadding="0" cellspacing="0">
13     <tr><td></td></tr>
14     <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
15     <tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__hash__table__s.html">_hash_table_s</a></td></tr>
16    
17     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table structure. <a href="struct__hash__table__s.html#_details">More...</a><br></td></tr>
18     <tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__hash__entry__s.html">_hash_entry_s</a></td></tr>
19    
20     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry structure. <a href="struct__hash__entry__s.html#_details">More...</a><br></td></tr>
21     <tr><td colspan="2"><br><h2>Defines</h2></td></tr>
22     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga21">MAX_PRIME</a></td></tr>
23    
24     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Largest prime. <a href="#ga21"></a><br></td></tr>
25     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga22">HASH_TABLE_MAGIC</a></td></tr>
26    
27     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table magic number. <a href="#ga22"></a><br></td></tr>
28     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga23">HASH_FLAG_AUTOGROW</a></td></tr>
29    
30     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag permitting a hash table to automatically grow. <a href="#ga23"></a><br></td></tr>
31     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga24">HASH_FLAG_AUTOSHRINK</a></td></tr>
32    
33     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag permitting a hash table to automatically shrink. <a href="#ga24"></a><br></td></tr>
34     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga25">HASH_FLAG_MASK</a></td></tr>
35    
36     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table flags that may be set by the user. <a href="#ga25"></a><br></td></tr>
37     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga26">HASH_TABLE_INIT</a>(flags, func, comp, resize, extra)</td></tr>
38    
39     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table static initializer. <a href="#ga26"></a><br></td></tr>
40     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga27">ht_verify</a>(table)</td></tr>
41    
42     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table verification macro. <a href="#ga27"></a><br></td></tr>
43     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga28">ht_flags</a>(table)</td></tr>
44    
45     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table flags. <a href="#ga28"></a><br></td></tr>
46     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga29">ht_frozen</a>(table)</td></tr>
47    
48     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determine if a hash table is frozen. <a href="#ga29"></a><br></td></tr>
49     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga30">ht_modulus</a>(table)</td></tr>
50    
51     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table modulus. <a href="#ga30"></a><br></td></tr>
52     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga31">ht_count</a>(table)</td></tr>
53    
54     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table count. <a href="#ga31"></a><br></td></tr>
55     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga32">ht_func</a>(table)</td></tr>
56    
57     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table hash function. <a href="#ga32"></a><br></td></tr>
58     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga33">ht_comp</a>(table)</td></tr>
59    
60     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table comparison function. <a href="#ga33"></a><br></td></tr>
61     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga34">ht_rsize</a>(table)</td></tr>
62    
63     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table resize callback function. <a href="#ga34"></a><br></td></tr>
64     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga35">ht_extra</a>(table)</td></tr>
65    
66     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extra pointer data in a hash table. <a href="#ga35"></a><br></td></tr>
67     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga36">ht_size</a>(table)</td></tr>
68    
69     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table memory size. <a href="#ga36"></a><br></td></tr>
70     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga37">HASH_ENTRY_MAGIC</a></td></tr>
71    
72     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry magic number. <a href="#ga37"></a><br></td></tr>
73     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga38">HASH_ENTRY_INIT</a>(value)</td></tr>
74    
75     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry static initializer. <a href="#ga38"></a><br></td></tr>
76     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga39">he_verify</a>(entry)</td></tr>
77    
78     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry verification macro. <a href="#ga39"></a><br></td></tr>
79     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga40">he_link</a>(entry)</td></tr>
80    
81     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry linked list element. <a href="#ga40"></a><br></td></tr>
82     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga41">he_flags</a>(entry)</td></tr>
83    
84     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry flags. <a href="#ga41"></a><br></td></tr>
85     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga42">he_table</a>(entry)</td></tr>
86    
87     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry table pointer. <a href="#ga42"></a><br></td></tr>
88     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga43">he_hash</a>(entry)</td></tr>
89    
90     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry hash value. <a href="#ga43"></a><br></td></tr>
91     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga44">he_key</a>(entry)</td></tr>
92    
93     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry key pointer. <a href="#ga44"></a><br></td></tr>
94     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga45">he_value</a>(entry)</td></tr>
95    
96     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry value pointer. <a href="#ga45"></a><br></td></tr>
97     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga46">st_rsize</a>(table)</td></tr>
98    
99     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sparse matrix table resize callback function. <a href="#ga46"></a><br></td></tr>
100     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga47">_hash_rollover</a>(mod)</td></tr>
101    
102     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Select hash table roll over size. <a href="#ga47"></a><br></td></tr>
103     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga48">_hash_rollunder</a>(mod)</td></tr>
104    
105     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Select hash table roll under size. <a href="#ga48"></a><br></td></tr>
106     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga49">_hash_fuzz</a>(mod)</td></tr>
107    
108     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fuzz the initial hash table size. <a href="#ga49"></a><br></td></tr>
109     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga50">HASH_FNV_OFFSET</a></td></tr>
110    
111     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FNV offset basis parameter. <a href="#ga50"></a><br></td></tr>
112     <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga51">HASH_FNV_PRIME</a></td></tr>
113    
114     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FNV prime parameter. <a href="#ga51"></a><br></td></tr>
115     <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
116     <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="struct__hash__table__s.html">_hash_table_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a></td></tr>
117    
118     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table. <a href="#ga1"></a><br></td></tr>
119     <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="struct__hash__entry__s.html">_hash_entry_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a></td></tr>
120    
121     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table entry. <a href="#ga2"></a><br></td></tr>
122     <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef unsigned long(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga3">hash_iter_t</a> )(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *ent, void *extra)</td></tr>
123    
124     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table iteration callback. <a href="#ga3"></a><br></td></tr>
125     <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef unsigned long(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a> )(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key)</td></tr>
126    
127     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash function callback. <a href="#ga4"></a><br></td></tr>
128     <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef unsigned long(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a> )(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key1, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key2)</td></tr>
129    
130     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table comparison callback. <a href="#ga5"></a><br></td></tr>
131     <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef unsigned long(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga6">hash_resize_t</a> )(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, unsigned long new_mod)</td></tr>
132    
133     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash table resize callback. <a href="#ga6"></a><br></td></tr>
134     <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
135     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga7">hash_fnv1</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key)</td></tr>
136    
137     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FNV-1 hash function. <a href="#ga7"></a><br></td></tr>
138     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga8">hash_fnv1a</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key)</td></tr>
139    
140     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FNV-1a hash function. <a href="#ga8"></a><br></td></tr>
141     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga9">hash_comp</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key1, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key2)</td></tr>
142    
143     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hash comparison function. <a href="#ga9"></a><br></td></tr>
144     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga10">ht_init</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, unsigned long flags, <a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a> func, <a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a> comp, <a class="el" href="group__dbprim__hash.html#ga6">hash_resize_t</a> resize, void *extra, unsigned long init_mod)</td></tr>
145    
146     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dynamically initialize a hash table. <a href="#ga10"></a><br></td></tr>
147     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga11">ht_add</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *entry, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key)</td></tr>
148    
149     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an entry to a hash table. <a href="#ga11"></a><br></td></tr>
150     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga12">ht_move</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *entry, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key)</td></tr>
151    
152     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move an entry in the hash table. <a href="#ga12"></a><br></td></tr>
153     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga13">ht_remove</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *entry)</td></tr>
154    
155     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove an element from a hash table. <a href="#ga13"></a><br></td></tr>
156     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga14">ht_find</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> **entry_p, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key)</td></tr>
157    
158     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an entry in a hash table. <a href="#ga14"></a><br></td></tr>
159     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga15">ht_iter</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#ga3">hash_iter_t</a> iter_func, void *extra)</td></tr>
160    
161     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterate over each entry in a hash table. <a href="#ga15"></a><br></td></tr>
162     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga16">ht_flush</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#ga3">hash_iter_t</a> flush_func, void *extra)</td></tr>
163    
164     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flush a hash table. <a href="#ga16"></a><br></td></tr>
165     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga17">ht_resize</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, unsigned long new_size)</td></tr>
166    
167     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resize a hash table. <a href="#ga17"></a><br></td></tr>
168     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga18">ht_free</a> (<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table)</td></tr>
169    
170     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Free memory used by an empty hash table. <a href="#ga18"></a><br></td></tr>
171     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga19">he_init</a> (<a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *entry, void *value)</td></tr>
172    
173     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dynamically initialize a hash table entry. <a href="#ga19"></a><br></td></tr>
174     <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga20">_hash_prime</a> (unsigned long start)</td></tr>
175    
176     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Select a prime number. <a href="#ga20"></a><br></td></tr>
177     <tr><td colspan="2"><br><h2>Variables</h2></td></tr>
178     <tr><td class="memItemLeft" nowrap align="right" valign="top">static unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim__hash.html#ga0">primes</a> []</td></tr>
179    
180     <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Table of primes. <a href="#ga0"></a><br></td></tr>
181     </table>
182     <hr><h2>Define Documentation</h2>
183     <a class="anchor" name="ga49"></a><!-- doxytag: member="dbprim_int.h::_hash_fuzz" ref="ga49" args="(mod)" --><p>
184     <table class="mdTable" cellpadding="2" cellspacing="0">
185     <tr>
186     <td class="mdRow">
187     <table cellpadding="0" cellspacing="0" border="0">
188     <tr>
189     <td class="md" nowrap valign="top">#define _hash_fuzz </td>
190     <td class="md" valign="top">(&nbsp;</td>
191     <td class="md" nowrap valign="top">mod&nbsp;</td>
192     <td class="mdname1" valign="top" nowrap> </td>
193     <td class="md" valign="top">&nbsp;)&nbsp;</td>
194     <td class="md" nowrap></td>
195     </tr>
196     </table>
197     </td>
198     </tr>
199     </table>
200     <table cellspacing="5" cellpadding="0" border="0">
201     <tr>
202     <td>
203     &nbsp;
204     </td>
205     <td>
206    
207     <p>
208     <p><b>For internal use only.</b></p>
209     <p>
210     This macro is used to apply a fudge factor to a user-supplied size for the hash table, causing a slightly larger bucket to be allocated.<p>
211     <dl compact><dt><b>Parameters:</b></dt><dd>
212     <table border="0" cellspacing="2" cellpadding="0">
213     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>mod</em>&nbsp;</td><td>The requested table modulus.</td></tr>
214     </table>
215     </dl>
216     <dl compact><dt><b>Returns:</b></dt><dd>The "fuzzed" size.</dd></dl>
217     </p>
218    
219     <p>
220     Definition at line <a class="el" href="dbprim__int_8h-source.html#l00107">107</a> of file <a class="el" href="dbprim__int_8h-source.html">dbprim_int.h</a>.
221     <p>
222     Referenced by <a class="el" href="ht__add_8c-source.html#l00034">ht_add()</a>, and <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>. </td>
223     </tr>
224     </table>
225     <a class="anchor" name="ga47"></a><!-- doxytag: member="dbprim_int.h::_hash_rollover" ref="ga47" args="(mod)" --><p>
226     <table class="mdTable" cellpadding="2" cellspacing="0">
227     <tr>
228     <td class="mdRow">
229     <table cellpadding="0" cellspacing="0" border="0">
230     <tr>
231     <td class="md" nowrap valign="top">#define _hash_rollover </td>
232     <td class="md" valign="top">(&nbsp;</td>
233     <td class="md" nowrap valign="top">mod&nbsp;</td>
234     <td class="mdname1" valign="top" nowrap> </td>
235     <td class="md" valign="top">&nbsp;)&nbsp;</td>
236     <td class="md" nowrap></td>
237     </tr>
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     <p><b>For internal use only.</b></p>
251     <p>
252     This macro is used to compute the "roll over" size--the size at which the hash table will be grown (assuming that the table has <a class="el" href="group__dbprim__hash.html#ga23">HASH_FLAG_AUTOGROW</a> set).<p>
253     <dl compact><dt><b>Parameters:</b></dt><dd>
254     <table border="0" cellspacing="2" cellpadding="0">
255     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>mod</em>&nbsp;</td><td>The table modulus.</td></tr>
256     </table>
257     </dl>
258     <dl compact><dt><b>Returns:</b></dt><dd>The "roll over" size.</dd></dl>
259     </p>
260    
261     <p>
262     Definition at line <a class="el" href="dbprim__int_8h-source.html#l00079">79</a> of file <a class="el" href="dbprim__int_8h-source.html">dbprim_int.h</a>.
263     <p>
264     Referenced by <a class="el" href="ht__init_8c-source.html#l00037">ht_init()</a>, and <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>. </td>
265     </tr>
266     </table>
267     <a class="anchor" name="ga48"></a><!-- doxytag: member="dbprim_int.h::_hash_rollunder" ref="ga48" args="(mod)" --><p>
268     <table class="mdTable" cellpadding="2" cellspacing="0">
269     <tr>
270     <td class="mdRow">
271     <table cellpadding="0" cellspacing="0" border="0">
272     <tr>
273     <td class="md" nowrap valign="top">#define _hash_rollunder </td>
274     <td class="md" valign="top">(&nbsp;</td>
275     <td class="md" nowrap valign="top">mod&nbsp;</td>
276     <td class="mdname1" valign="top" nowrap> </td>
277     <td class="md" valign="top">&nbsp;)&nbsp;</td>
278     <td class="md" nowrap></td>
279     </tr>
280     </table>
281     </td>
282     </tr>
283     </table>
284     <table cellspacing="5" cellpadding="0" border="0">
285     <tr>
286     <td>
287     &nbsp;
288     </td>
289     <td>
290    
291     <p>
292     <p><b>For internal use only.</b></p>
293     <p>
294     This macro is used to compute the "roll under" size--the size at which the hash table will be shrunk (assuming that the table has <a class="el" href="group__dbprim__hash.html#ga24">HASH_FLAG_AUTOSHRINK</a> set).<p>
295     <dl compact><dt><b>Parameters:</b></dt><dd>
296     <table border="0" cellspacing="2" cellpadding="0">
297     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>mod</em>&nbsp;</td><td>The table modulus.</td></tr>
298     </table>
299     </dl>
300     <dl compact><dt><b>Returns:</b></dt><dd>The "roll under" size.</dd></dl>
301     </p>
302    
303     <p>
304     Definition at line <a class="el" href="dbprim__int_8h-source.html#l00093">93</a> of file <a class="el" href="dbprim__int_8h-source.html">dbprim_int.h</a>.
305     <p>
306     Referenced by <a class="el" href="ht__init_8c-source.html#l00037">ht_init()</a>, and <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>. </td>
307     </tr>
308     </table>
309     <a class="anchor" name="ga38"></a><!-- doxytag: member="dbprim.h::HASH_ENTRY_INIT" ref="ga38" args="(value)" --><p>
310     <table class="mdTable" cellpadding="2" cellspacing="0">
311     <tr>
312     <td class="mdRow">
313     <table cellpadding="0" cellspacing="0" border="0">
314     <tr>
315     <td class="md" nowrap valign="top">#define HASH_ENTRY_INIT </td>
316     <td class="md" valign="top">(&nbsp;</td>
317     <td class="md" nowrap valign="top">value&nbsp;</td>
318     <td class="mdname1" valign="top" nowrap> </td>
319     <td class="md" valign="top">&nbsp;)&nbsp;</td>
320     <td class="md" nowrap></td>
321     </tr>
322     </table>
323     </td>
324     </tr>
325     </table>
326     <table cellspacing="5" cellpadding="0" border="0">
327     <tr>
328     <td>
329     &nbsp;
330     </td>
331     <td>
332    
333     <p>
334     This macro statically initializes a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.<p>
335     <dl compact><dt><b>Parameters:</b></dt><dd>
336     <table border="0" cellspacing="2" cellpadding="0">
337     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>value</em>&nbsp;</td><td>A pointer to <code>void</code> representing the object associated with the entry.</td></tr>
338     </table>
339     </dl>
340    
341     <p>
342     Definition at line <a class="el" href="dbprim_8h-source.html#l01512">1512</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
343     </tr>
344     </table>
345     <a class="anchor" name="ga37"></a><!-- doxytag: member="dbprim.h::HASH_ENTRY_MAGIC" ref="ga37" args="" --><p>
346     <table class="mdTable" cellpadding="2" cellspacing="0">
347     <tr>
348     <td class="mdRow">
349     <table cellpadding="0" cellspacing="0" border="0">
350     <tr>
351     <td class="md" nowrap valign="top">#define HASH_ENTRY_MAGIC </td>
352     </tr>
353     </table>
354     </td>
355     </tr>
356     </table>
357     <table cellspacing="5" cellpadding="0" border="0">
358     <tr>
359     <td>
360     &nbsp;
361     </td>
362     <td>
363    
364     <p>
365     <p><b>For internal use only.</b></p>
366     <p>
367     This is the magic number used for the hash table entry structure.</p>
368    
369     <p>
370     Definition at line <a class="el" href="dbprim_8h-source.html#l01502">1502</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
371     <p>
372     Referenced by <a class="el" href="he__init_8c-source.html#l00034">he_init()</a>. </td>
373     </tr>
374     </table>
375     <a class="anchor" name="ga23"></a><!-- doxytag: member="dbprim.h::HASH_FLAG_AUTOGROW" ref="ga23" args="" --><p>
376     <table class="mdTable" cellpadding="2" cellspacing="0">
377     <tr>
378     <td class="mdRow">
379     <table cellpadding="0" cellspacing="0" border="0">
380     <tr>
381     <td class="md" nowrap valign="top">#define HASH_FLAG_AUTOGROW </td>
382     </tr>
383     </table>
384     </td>
385     </tr>
386     </table>
387     <table cellspacing="5" cellpadding="0" border="0">
388     <tr>
389     <td>
390     &nbsp;
391     </td>
392     <td>
393    
394     <p>
395     If passed in to <a class="el" href="group__dbprim__hash.html#ga26">HASH_TABLE_INIT()</a> or <a class="el" href="group__dbprim__hash.html#ga10">ht_init()</a>, allows the hash table to grow automatically.
396     <p>
397     Definition at line <a class="el" href="dbprim_8h-source.html#l01100">1100</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
398     <p>
399     Referenced by <a class="el" href="ht__add_8c-source.html#l00034">ht_add()</a>, and <a class="el" href="ht__init_8c-source.html#l00037">ht_init()</a>. </td>
400     </tr>
401     </table>
402     <a class="anchor" name="ga24"></a><!-- doxytag: member="dbprim.h::HASH_FLAG_AUTOSHRINK" ref="ga24" args="" --><p>
403     <table class="mdTable" cellpadding="2" cellspacing="0">
404     <tr>
405     <td class="mdRow">
406     <table cellpadding="0" cellspacing="0" border="0">
407     <tr>
408     <td class="md" nowrap valign="top">#define HASH_FLAG_AUTOSHRINK </td>
409     </tr>
410     </table>
411     </td>
412     </tr>
413     </table>
414     <table cellspacing="5" cellpadding="0" border="0">
415     <tr>
416     <td>
417     &nbsp;
418     </td>
419     <td>
420    
421     <p>
422     If passed in to <a class="el" href="group__dbprim__hash.html#ga26">HASH_TABLE_INIT()</a> or <a class="el" href="group__dbprim__hash.html#ga10">ht_init()</a>, allows the hash table to shrink automatically.
423     <p>
424     Definition at line <a class="el" href="dbprim_8h-source.html#l01108">1108</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
425     <p>
426     Referenced by <a class="el" href="ht__flush_8c-source.html#l00036">ht_flush()</a>, <a class="el" href="ht__init_8c-source.html#l00037">ht_init()</a>, and <a class="el" href="ht__remove_8c-source.html#l00034">ht_remove()</a>. </td>
427     </tr>
428     </table>
429     <a class="anchor" name="ga25"></a><!-- doxytag: member="dbprim.h::HASH_FLAG_MASK" ref="ga25" args="" --><p>
430     <table class="mdTable" cellpadding="2" cellspacing="0">
431     <tr>
432     <td class="mdRow">
433     <table cellpadding="0" cellspacing="0" border="0">
434     <tr>
435     <td class="md" nowrap valign="top">#define HASH_FLAG_MASK </td>
436     </tr>
437     </table>
438     </td>
439     </tr>
440     </table>
441     <table cellspacing="5" cellpadding="0" border="0">
442     <tr>
443     <td>
444     &nbsp;
445     </td>
446     <td>
447    
448     <p>
449     This flag mask may be used to obtain flags that the hash table user may set on a hash table.
450     <p>
451     Definition at line <a class="el" href="dbprim_8h-source.html#l01116">1116</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
452     </tr>
453     </table>
454     <a class="anchor" name="ga50"></a><!-- doxytag: member="dbprim_int.h::HASH_FNV_OFFSET" ref="ga50" args="" --><p>
455     <table class="mdTable" cellpadding="2" cellspacing="0">
456     <tr>
457     <td class="mdRow">
458     <table cellpadding="0" cellspacing="0" border="0">
459     <tr>
460     <td class="md" nowrap valign="top">#define HASH_FNV_OFFSET </td>
461     </tr>
462     </table>
463     </td>
464     </tr>
465     </table>
466     <table cellspacing="5" cellpadding="0" border="0">
467     <tr>
468     <td>
469     &nbsp;
470     </td>
471     <td>
472    
473     <p>
474     <p><b>For internal use only.</b></p>
475     <p>
476     This is the 32-bit offset basis for the FNV hash algorithm. See <a href="http://www.isthe.com/chongo/tech/comp/fnv/">http://www.isthe.com/chongo/tech/comp/fnv/</a> for more information about the FNV hash algorithm.</p>
477    
478     <p>
479     Definition at line <a class="el" href="dbprim__int_8h-source.html#l00117">117</a> of file <a class="el" href="dbprim__int_8h-source.html">dbprim_int.h</a>.
480     <p>
481     Referenced by <a class="el" href="hash__fnv1_8c-source.html#l00035">hash_fnv1()</a>, and <a class="el" href="hash__fnv1a_8c-source.html#l00035">hash_fnv1a()</a>. </td>
482     </tr>
483     </table>
484     <a class="anchor" name="ga51"></a><!-- doxytag: member="dbprim_int.h::HASH_FNV_PRIME" ref="ga51" args="" --><p>
485     <table class="mdTable" cellpadding="2" cellspacing="0">
486     <tr>
487     <td class="mdRow">
488     <table cellpadding="0" cellspacing="0" border="0">
489     <tr>
490     <td class="md" nowrap valign="top">#define HASH_FNV_PRIME </td>
491     </tr>
492     </table>
493     </td>
494     </tr>
495     </table>
496     <table cellspacing="5" cellpadding="0" border="0">
497     <tr>
498     <td>
499     &nbsp;
500     </td>
501     <td>
502    
503     <p>
504     <p><b>For internal use only.</b></p>
505     <p>
506     This is the 32-bit multiplication prime for the FNV hash algorithm. See <a href="http://www.isthe.com/chongo/tech/comp/fnv/">http://www.isthe.com/chongo/tech/comp/fnv/</a> for more information about the FNV hash algorithm.</p>
507    
508     <p>
509     Definition at line <a class="el" href="dbprim__int_8h-source.html#l00127">127</a> of file <a class="el" href="dbprim__int_8h-source.html">dbprim_int.h</a>.
510     <p>
511     Referenced by <a class="el" href="hash__fnv1_8c-source.html#l00035">hash_fnv1()</a>, and <a class="el" href="hash__fnv1a_8c-source.html#l00035">hash_fnv1a()</a>. </td>
512     </tr>
513     </table>
514     <a class="anchor" name="ga26"></a><!-- doxytag: member="dbprim.h::HASH_TABLE_INIT" ref="ga26" args="(flags, func, comp, resize, extra)" --><p>
515     <table class="mdTable" cellpadding="2" cellspacing="0">
516     <tr>
517     <td class="mdRow">
518     <table cellpadding="0" cellspacing="0" border="0">
519     <tr>
520     <td class="md" nowrap valign="top">#define HASH_TABLE_INIT </td>
521     <td class="md" valign="top">(&nbsp;</td>
522     <td class="md" nowrap valign="top">flags, <tr>
523     <td class="md" nowrap align="right"></td>
524     <td class="md"></td>
525     <td class="md" nowrap>func, <tr>
526     <td class="md" nowrap align="right"></td>
527     <td class="md"></td>
528     <td class="md" nowrap>comp, <tr>
529     <td class="md" nowrap align="right"></td>
530     <td class="md"></td>
531     <td class="md" nowrap>resize, <tr>
532     <td class="md" nowrap align="right"></td>
533     <td class="md"></td>
534     <td class="md" nowrap>extra&nbsp;</td>
535     <td class="mdname1" valign="top" nowrap> </td>
536     <td class="md" valign="top">&nbsp;)&nbsp;</td>
537     <td class="md" nowrap></td>
538     </tr>
539     </table>
540     </td>
541     </tr>
542     </table>
543     <table cellspacing="5" cellpadding="0" border="0">
544     <tr>
545     <td>
546     &nbsp;
547     </td>
548     <td>
549    
550     <p>
551     This macro statically initializes a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.<p>
552     <dl compact><dt><b>Parameters:</b></dt><dd>
553     <table border="0" cellspacing="2" cellpadding="0">
554     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>flags</em>&nbsp;</td><td>A bit-wise OR of <a class="el" href="group__dbprim__hash.html#ga23">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#ga24">HASH_FLAG_AUTOSHRINK</a>. If neither behavior is desired, use 0. </td></tr>
555     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>func</em>&nbsp;</td><td>A <a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a> function pointer for a hash function. </td></tr>
556     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>comp</em>&nbsp;</td><td>A <a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a> function pointer for a comparison function. </td></tr>
557     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>resize</em>&nbsp;</td><td>A <a class="el" href="group__dbprim__hash.html#ga6">hash_resize_t</a> function pointer for determining whether resizing is permitted and/or for notification of the resize. </td></tr>
558     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>extra</em>&nbsp;</td><td>Extra pointer data that should be associated with the hash table.</td></tr>
559     </table>
560     </dl>
561    
562     <p>
563     Definition at line <a class="el" href="dbprim_8h-source.html#l01145">1145</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
564     </tr>
565     </table>
566     <a class="anchor" name="ga22"></a><!-- doxytag: member="dbprim.h::HASH_TABLE_MAGIC" ref="ga22" args="" --><p>
567     <table class="mdTable" cellpadding="2" cellspacing="0">
568     <tr>
569     <td class="mdRow">
570     <table cellpadding="0" cellspacing="0" border="0">
571     <tr>
572     <td class="md" nowrap valign="top">#define HASH_TABLE_MAGIC </td>
573     </tr>
574     </table>
575     </td>
576     </tr>
577     </table>
578     <table cellspacing="5" cellpadding="0" border="0">
579     <tr>
580     <td>
581     &nbsp;
582     </td>
583     <td>
584    
585     <p>
586     <p><b>For internal use only.</b></p>
587     <p>
588     This is the magic number used for the hash table structure.</p>
589    
590     <p>
591     Definition at line <a class="el" href="dbprim_8h-source.html#l01092">1092</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
592     <p>
593     Referenced by <a class="el" href="ht__init_8c-source.html#l00037">ht_init()</a>. </td>
594     </tr>
595     </table>
596     <a class="anchor" name="ga41"></a><!-- doxytag: member="dbprim.h::he_flags" ref="ga41" args="(entry)" --><p>
597     <table class="mdTable" cellpadding="2" cellspacing="0">
598     <tr>
599     <td class="mdRow">
600     <table cellpadding="0" cellspacing="0" border="0">
601     <tr>
602     <td class="md" nowrap valign="top">#define he_flags </td>
603     <td class="md" valign="top">(&nbsp;</td>
604     <td class="md" nowrap valign="top">entry&nbsp;</td>
605     <td class="mdname1" valign="top" nowrap> </td>
606     <td class="md" valign="top">&nbsp;)&nbsp;</td>
607     <td class="md" nowrap></td>
608     </tr>
609     </table>
610     </td>
611     </tr>
612     </table>
613     <table cellspacing="5" cellpadding="0" border="0">
614     <tr>
615     <td>
616     &nbsp;
617     </td>
618     <td>
619    
620     <p>
621     This macro retrieves a set of user-defined flags associated with the entry. It may be used as an lvalue to set those flags.<p>
622     <dl compact><dt><b>Parameters:</b></dt><dd>
623     <table border="0" cellspacing="2" cellpadding="0">
624     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.</td></tr>
625     </table>
626     </dl>
627     <dl compact><dt><b>Returns:</b></dt><dd>An <code>unsigned long</code> containing the flags associated with the entry.</dd></dl>
628    
629     <p>
630     Definition at line <a class="el" href="dbprim_8h-source.html#l01556">1556</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
631     </tr>
632     </table>
633     <a class="anchor" name="ga43"></a><!-- doxytag: member="dbprim.h::he_hash" ref="ga43" args="(entry)" --><p>
634     <table class="mdTable" cellpadding="2" cellspacing="0">
635     <tr>
636     <td class="mdRow">
637     <table cellpadding="0" cellspacing="0" border="0">
638     <tr>
639     <td class="md" nowrap valign="top">#define he_hash </td>
640     <td class="md" valign="top">(&nbsp;</td>
641     <td class="md" nowrap valign="top">entry&nbsp;</td>
642     <td class="mdname1" valign="top" nowrap> </td>
643     <td class="md" valign="top">&nbsp;)&nbsp;</td>
644     <td class="md" nowrap></td>
645     </tr>
646     </table>
647     </td>
648     </tr>
649     </table>
650     <table cellspacing="5" cellpadding="0" border="0">
651     <tr>
652     <td>
653     &nbsp;
654     </td>
655     <td>
656    
657     <p>
658     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.<p>
659     <dl compact><dt><b>Parameters:</b></dt><dd>
660     <table border="0" cellspacing="2" cellpadding="0">
661     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.</td></tr>
662     </table>
663     </dl>
664     <dl compact><dt><b>Returns:</b></dt><dd>An <code>unsigned long</code> containing the hash code for the entry.</dd></dl>
665    
666     <p>
667     Definition at line <a class="el" href="dbprim_8h-source.html#l01581">1581</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
668     </tr>
669     </table>
670     <a class="anchor" name="ga44"></a><!-- doxytag: member="dbprim.h::he_key" ref="ga44" args="(entry)" --><p>
671     <table class="mdTable" cellpadding="2" cellspacing="0">
672     <tr>
673     <td class="mdRow">
674     <table cellpadding="0" cellspacing="0" border="0">
675     <tr>
676     <td class="md" nowrap valign="top">#define he_key </td>
677     <td class="md" valign="top">(&nbsp;</td>
678     <td class="md" nowrap valign="top">entry&nbsp;</td>
679     <td class="mdname1" valign="top" nowrap> </td>
680     <td class="md" valign="top">&nbsp;)&nbsp;</td>
681     <td class="md" nowrap></td>
682     </tr>
683     </table>
684     </td>
685     </tr>
686     </table>
687     <table cellspacing="5" cellpadding="0" border="0">
688     <tr>
689     <td>
690     &nbsp;
691     </td>
692     <td>
693    
694     <p>
695     This macro retrieves the key associated with the hash table entry.<p>
696     <dl compact><dt><b>Parameters:</b></dt><dd>
697     <table border="0" cellspacing="2" cellpadding="0">
698     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.</td></tr>
699     </table>
700     </dl>
701     <dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a>.</dd></dl>
702    
703     <p>
704     Definition at line <a class="el" href="dbprim_8h-source.html#l01592">1592</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
705     <p>
706     Referenced by <a class="el" href="ht__find_8c-source.html#l00034">ht_find()</a>. </td>
707     </tr>
708     </table>
709     <a class="anchor" name="ga40"></a><!-- doxytag: member="dbprim.h::he_link" ref="ga40" args="(entry)" --><p>
710     <table class="mdTable" cellpadding="2" cellspacing="0">
711     <tr>
712     <td class="mdRow">
713     <table cellpadding="0" cellspacing="0" border="0">
714     <tr>
715     <td class="md" nowrap valign="top">#define he_link </td>
716     <td class="md" valign="top">(&nbsp;</td>
717     <td class="md" nowrap valign="top">entry&nbsp;</td>
718     <td class="mdname1" valign="top" nowrap> </td>
719     <td class="md" valign="top">&nbsp;)&nbsp;</td>
720     <td class="md" nowrap></td>
721     </tr>
722     </table>
723     </td>
724     </tr>
725     </table>
726     <table cellspacing="5" cellpadding="0" border="0">
727     <tr>
728     <td>
729     &nbsp;
730     </td>
731     <td>
732    
733     <p>
734     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.<p>
735     <dl compact><dt><b>Parameters:</b></dt><dd>
736     <table border="0" cellspacing="2" cellpadding="0">
737     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.</td></tr>
738     </table>
739     </dl>
740     <dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="group__dbprim__link.html#ga1">link_elem_t</a>.</dd></dl>
741    
742     <p>
743     Definition at line <a class="el" href="dbprim_8h-source.html#l01543">1543</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
744     </tr>
745     </table>
746     <a class="anchor" name="ga42"></a><!-- doxytag: member="dbprim.h::he_table" ref="ga42" args="(entry)" --><p>
747     <table class="mdTable" cellpadding="2" cellspacing="0">
748     <tr>
749     <td class="mdRow">
750     <table cellpadding="0" cellspacing="0" border="0">
751     <tr>
752     <td class="md" nowrap valign="top">#define he_table </td>
753     <td class="md" valign="top">(&nbsp;</td>
754     <td class="md" nowrap valign="top">entry&nbsp;</td>
755     <td class="mdname1" valign="top" nowrap> </td>
756     <td class="md" valign="top">&nbsp;)&nbsp;</td>
757     <td class="md" nowrap></td>
758     </tr>
759     </table>
760     </td>
761     </tr>
762     </table>
763     <table cellspacing="5" cellpadding="0" border="0">
764     <tr>
765     <td>
766     &nbsp;
767     </td>
768     <td>
769    
770     <p>
771     This macro retrieves a pointer to the hash table the entry is in.<p>
772     <dl compact><dt><b>Parameters:</b></dt><dd>
773     <table border="0" cellspacing="2" cellpadding="0">
774     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.</td></tr>
775     </table>
776     </dl>
777     <dl compact><dt><b>Returns:</b></dt><dd>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</dd></dl>
778    
779     <p>
780     Definition at line <a class="el" href="dbprim_8h-source.html#l01567">1567</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
781     </tr>
782     </table>
783     <a class="anchor" name="ga45"></a><!-- doxytag: member="dbprim.h::he_value" ref="ga45" args="(entry)" --><p>
784     <table class="mdTable" cellpadding="2" cellspacing="0">
785     <tr>
786     <td class="mdRow">
787     <table cellpadding="0" cellspacing="0" border="0">
788     <tr>
789     <td class="md" nowrap valign="top">#define he_value </td>
790     <td class="md" valign="top">(&nbsp;</td>
791     <td class="md" nowrap valign="top">entry&nbsp;</td>
792     <td class="mdname1" valign="top" nowrap> </td>
793     <td class="md" valign="top">&nbsp;)&nbsp;</td>
794     <td class="md" nowrap></td>
795     </tr>
796     </table>
797     </td>
798     </tr>
799     </table>
800     <table cellspacing="5" cellpadding="0" border="0">
801     <tr>
802     <td>
803     &nbsp;
804     </td>
805     <td>
806    
807     <p>
808     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.<p>
809     <dl compact><dt><b>Parameters:</b></dt><dd>
810     <table border="0" cellspacing="2" cellpadding="0">
811     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.</td></tr>
812     </table>
813     </dl>
814     <dl compact><dt><b>Returns:</b></dt><dd>A pointer to <code>void</code> representing the value associated with this entry.</dd></dl>
815    
816     <p>
817     Definition at line <a class="el" href="dbprim_8h-source.html#l01606">1606</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
818     <p>
819     Referenced by <a class="el" href="st__flush_8c-source.html#l00066">_st_flush_iter()</a>, <a class="el" href="st__iter_8c-source.html#l00066">_st_iter_iter()</a>, and <a class="el" href="st__find_8c-source.html#l00036">st_find()</a>. </td>
820     </tr>
821     </table>
822     <a class="anchor" name="ga39"></a><!-- doxytag: member="dbprim.h::he_verify" ref="ga39" args="(entry)" --><p>
823     <table class="mdTable" cellpadding="2" cellspacing="0">
824     <tr>
825     <td class="mdRow">
826     <table cellpadding="0" cellspacing="0" border="0">
827     <tr>
828     <td class="md" nowrap valign="top">#define he_verify </td>
829     <td class="md" valign="top">(&nbsp;</td>
830     <td class="md" nowrap valign="top">entry&nbsp;</td>
831     <td class="mdname1" valign="top" nowrap> </td>
832     <td class="md" valign="top">&nbsp;)&nbsp;</td>
833     <td class="md" nowrap></td>
834     </tr>
835     </table>
836     </td>
837     </tr>
838     </table>
839     <table cellspacing="5" cellpadding="0" border="0">
840     <tr>
841     <td>
842     &nbsp;
843     </td>
844     <td>
845    
846     <p>
847     This macro verifies that a given pointer actually does point to a hash table entry.<p>
848     <dl compact><dt><b>Warning:</b></dt><dd>This macro evaluates the <code>entry</code> argument twice.</dd></dl>
849     <dl compact><dt><b>Parameters:</b></dt><dd>
850     <table border="0" cellspacing="2" cellpadding="0">
851     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>.</td></tr>
852     </table>
853     </dl>
854     <dl compact><dt><b>Returns:</b></dt><dd>Boolean <code>true</code> if <code>entry</code> is a valid hash table entry or <code>false</code> otherwise.</dd></dl>
855    
856     <p>
857     Definition at line <a class="el" href="dbprim_8h-source.html#l01528">1528</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
858     <p>
859     Referenced by <a class="el" href="ht__add_8c-source.html#l00034">ht_add()</a>, <a class="el" href="ht__move_8c-source.html#l00034">ht_move()</a>, and <a class="el" href="ht__remove_8c-source.html#l00034">ht_remove()</a>. </td>
860     </tr>
861     </table>
862     <a class="anchor" name="ga33"></a><!-- doxytag: member="dbprim.h::ht_comp" ref="ga33" args="(table)" --><p>
863     <table class="mdTable" cellpadding="2" cellspacing="0">
864     <tr>
865     <td class="mdRow">
866     <table cellpadding="0" cellspacing="0" border="0">
867     <tr>
868     <td class="md" nowrap valign="top">#define ht_comp </td>
869     <td class="md" valign="top">(&nbsp;</td>
870     <td class="md" nowrap valign="top">table&nbsp;</td>
871     <td class="mdname1" valign="top" nowrap> </td>
872     <td class="md" valign="top">&nbsp;)&nbsp;</td>
873     <td class="md" nowrap></td>
874     </tr>
875     </table>
876     </td>
877     </tr>
878     </table>
879     <table cellspacing="5" cellpadding="0" border="0">
880     <tr>
881     <td>
882     &nbsp;
883     </td>
884     <td>
885    
886     <p>
887     This macro retrieves the comparison function pointer.<p>
888     <dl compact><dt><b>Parameters:</b></dt><dd>
889     <table border="0" cellspacing="2" cellpadding="0">
890     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
891     </table>
892     </dl>
893     <dl compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a>.</dd></dl>
894    
895     <p>
896     Definition at line <a class="el" href="dbprim_8h-source.html#l01243">1243</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
897     </tr>
898     </table>
899     <a class="anchor" name="ga31"></a><!-- doxytag: member="dbprim.h::ht_count" ref="ga31" args="(table)" --><p>
900     <table class="mdTable" cellpadding="2" cellspacing="0">
901     <tr>
902     <td class="mdRow">
903     <table cellpadding="0" cellspacing="0" border="0">
904     <tr>
905     <td class="md" nowrap valign="top">#define ht_count </td>
906     <td class="md" valign="top">(&nbsp;</td>
907     <td class="md" nowrap valign="top">table&nbsp;</td>
908     <td class="mdname1" valign="top" nowrap> </td>
909     <td class="md" valign="top">&nbsp;)&nbsp;</td>
910     <td class="md" nowrap></td>
911     </tr>
912     </table>
913     </td>
914     </tr>
915     </table>
916     <table cellspacing="5" cellpadding="0" border="0">
917     <tr>
918     <td>
919     &nbsp;
920     </td>
921     <td>
922    
923     <p>
924     This macro retrieves the total number of items actually in the hash table.<p>
925     <dl compact><dt><b>Parameters:</b></dt><dd>
926     <table border="0" cellspacing="2" cellpadding="0">
927     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
928     </table>
929     </dl>
930     <dl compact><dt><b>Returns:</b></dt><dd>An <code>unsigned long</code> containing a count of the number of items in the hash table.</dd></dl>
931    
932     <p>
933     Definition at line <a class="el" href="dbprim_8h-source.html#l01221">1221</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
934     </tr>
935     </table>
936     <a class="anchor" name="ga35"></a><!-- doxytag: member="dbprim.h::ht_extra" ref="ga35" args="(table)" --><p>
937     <table class="mdTable" cellpadding="2" cellspacing="0">
938     <tr>
939     <td class="mdRow">
940     <table cellpadding="0" cellspacing="0" border="0">
941     <tr>
942     <td class="md" nowrap valign="top">#define ht_extra </td>
943     <td class="md" valign="top">(&nbsp;</td>
944     <td class="md" nowrap valign="top">table&nbsp;</td>
945     <td class="mdname1" valign="top" nowrap> </td>
946     <td class="md" valign="top">&nbsp;)&nbsp;</td>
947     <td class="md" nowrap></td>
948     </tr>
949     </table>
950     </td>
951     </tr>
952     </table>
953     <table cellspacing="5" cellpadding="0" border="0">
954     <tr>
955     <td>
956     &nbsp;
957     </td>
958     <td>
959    
960     <p>
961     This macro retrieves the extra pointer data associated with a particular hash table.<p>
962     <dl compact><dt><b>Parameters:</b></dt><dd>
963     <table border="0" cellspacing="2" cellpadding="0">
964     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
965     </table>
966     </dl>
967     <dl compact><dt><b>Returns:</b></dt><dd>A pointer to <code>void</code>.</dd></dl>
968    
969     <p>
970     Definition at line <a class="el" href="dbprim_8h-source.html#l01266">1266</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
971     <p>
972     Referenced by <a class="el" href="__smat__resize_8c-source.html#l00034">_smat_resize()</a>. </td>
973     </tr>
974     </table>
975     <a class="anchor" name="ga28"></a><!-- doxytag: member="dbprim.h::ht_flags" ref="ga28" args="(table)" --><p>
976     <table class="mdTable" cellpadding="2" cellspacing="0">
977     <tr>
978     <td class="mdRow">
979     <table cellpadding="0" cellspacing="0" border="0">
980     <tr>
981     <td class="md" nowrap valign="top">#define ht_flags </td>
982     <td class="md" valign="top">(&nbsp;</td>
983     <td class="md" nowrap valign="top">table&nbsp;</td>
984     <td class="mdname1" valign="top" nowrap> </td>
985     <td class="md" valign="top">&nbsp;)&nbsp;</td>
986     <td class="md" nowrap></td>
987     </tr>
988     </table>
989     </td>
990     </tr>
991     </table>
992     <table cellspacing="5" cellpadding="0" border="0">
993     <tr>
994     <td>
995     &nbsp;
996     </td>
997     <td>
998    
999     <p>
1000     This macro retrieves the flags associated with the hash table. Only <a class="el" href="group__dbprim__hash.html#ga23">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#ga24">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.<p>
1001     <dl compact><dt><b>Parameters:</b></dt><dd>
1002     <table border="0" cellspacing="2" cellpadding="0">
1003     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
1004     </table>
1005     </dl>
1006     <dl compact><dt><b>Returns:</b></dt><dd>An <code>unsigned long</code> containing the flags for the hash table.</dd></dl>
1007    
1008     <p>
1009     Definition at line <a class="el" href="dbprim_8h-source.html#l01179">1179</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1010     </tr>
1011     </table>
1012     <a class="anchor" name="ga29"></a><!-- doxytag: member="dbprim.h::ht_frozen" ref="ga29" args="(table)" --><p>
1013     <table class="mdTable" cellpadding="2" cellspacing="0">
1014     <tr>
1015     <td class="mdRow">
1016     <table cellpadding="0" cellspacing="0" border="0">
1017     <tr>
1018     <td class="md" nowrap valign="top">#define ht_frozen </td>
1019     <td class="md" valign="top">(&nbsp;</td>
1020     <td class="md" nowrap valign="top">table&nbsp;</td>
1021     <td class="mdname1" valign="top" nowrap> </td>
1022     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1023     <td class="md" nowrap></td>
1024     </tr>
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     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.<p>
1038     <dl compact><dt><b>Parameters:</b></dt><dd>
1039     <table border="0" cellspacing="2" cellpadding="0">
1040     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
1041     </table>
1042     </dl>
1043     <dl compact><dt><b>Returns:</b></dt><dd>A zero value if the table is not frozen or a non-zero value if the table is frozen.</dd></dl>
1044    
1045     <p>
1046     Definition at line <a class="el" href="dbprim_8h-source.html#l01193">1193</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1047     </tr>
1048     </table>
1049     <a class="anchor" name="ga32"></a><!-- doxytag: member="dbprim.h::ht_func" ref="ga32" args="(table)" --><p>
1050     <table class="mdTable" cellpadding="2" cellspacing="0">
1051     <tr>
1052     <td class="mdRow">
1053     <table cellpadding="0" cellspacing="0" border="0">
1054     <tr>
1055     <td class="md" nowrap valign="top">#define ht_func </td>
1056     <td class="md" valign="top">(&nbsp;</td>
1057     <td class="md" nowrap valign="top">table&nbsp;</td>
1058     <td class="mdname1" valign="top" nowrap> </td>
1059     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1060     <td class="md" nowrap></td>
1061     </tr>
1062     </table>
1063     </td>
1064     </tr>
1065     </table>
1066     <table cellspacing="5" cellpadding="0" border="0">
1067     <tr>
1068     <td>
1069     &nbsp;
1070     </td>
1071     <td>
1072    
1073     <p>
1074     This macro retrieves the hash function pointer.<p>
1075     <dl compact><dt><b>Parameters:</b></dt><dd>
1076     <table border="0" cellspacing="2" cellpadding="0">
1077     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
1078     </table>
1079     </dl>
1080     <dl compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a>.</dd></dl>
1081    
1082     <p>
1083     Definition at line <a class="el" href="dbprim_8h-source.html#l01232">1232</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1084     </tr>
1085     </table>
1086     <a class="anchor" name="ga30"></a><!-- doxytag: member="dbprim.h::ht_modulus" ref="ga30" args="(table)" --><p>
1087     <table class="mdTable" cellpadding="2" cellspacing="0">
1088     <tr>
1089     <td class="mdRow">
1090     <table cellpadding="0" cellspacing="0" border="0">
1091     <tr>
1092     <td class="md" nowrap valign="top">#define ht_modulus </td>
1093     <td class="md" valign="top">(&nbsp;</td>
1094     <td class="md" nowrap valign="top">table&nbsp;</td>
1095     <td class="mdname1" valign="top" nowrap> </td>
1096     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1097     <td class="md" nowrap></td>
1098     </tr>
1099     </table>
1100     </td>
1101     </tr>
1102     </table>
1103     <table cellspacing="5" cellpadding="0" border="0">
1104     <tr>
1105     <td>
1106     &nbsp;
1107     </td>
1108     <td>
1109    
1110     <p>
1111     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.<p>
1112     <dl compact><dt><b>Parameters:</b></dt><dd>
1113     <table border="0" cellspacing="2" cellpadding="0">
1114     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
1115     </table>
1116     </dl>
1117     <dl compact><dt><b>Returns:</b></dt><dd>An <code>unsigned long</code> containing the number of buckets allocated for the hash table.</dd></dl>
1118    
1119     <p>
1120     Definition at line <a class="el" href="dbprim_8h-source.html#l01208">1208</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
1121     <p>
1122     Referenced by <a class="el" href="ht__flush_8c-source.html#l00036">ht_flush()</a>, <a class="el" href="ht__init_8c-source.html#l00037">ht_init()</a>, <a class="el" href="ht__iter_8c-source.html#l00034">ht_iter()</a>, and <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>. </td>
1123     </tr>
1124     </table>
1125     <a class="anchor" name="ga34"></a><!-- doxytag: member="dbprim.h::ht_rsize" ref="ga34" args="(table)" --><p>
1126     <table class="mdTable" cellpadding="2" cellspacing="0">
1127     <tr>
1128     <td class="mdRow">
1129     <table cellpadding="0" cellspacing="0" border="0">
1130     <tr>
1131     <td class="md" nowrap valign="top">#define ht_rsize </td>
1132     <td class="md" valign="top">(&nbsp;</td>
1133     <td class="md" nowrap valign="top">table&nbsp;</td>
1134     <td class="mdname1" valign="top" nowrap> </td>
1135     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1136     <td class="md" nowrap></td>
1137     </tr>
1138     </table>
1139     </td>
1140     </tr>
1141     </table>
1142     <table cellspacing="5" cellpadding="0" border="0">
1143     <tr>
1144     <td>
1145     &nbsp;
1146     </td>
1147     <td>
1148    
1149     <p>
1150     This macro retrieves the resize callback function pointer.<p>
1151     <dl compact><dt><b>Parameters:</b></dt><dd>
1152     <table border="0" cellspacing="2" cellpadding="0">
1153     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
1154     </table>
1155     </dl>
1156     <dl compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="group__dbprim__hash.html#ga6">hash_resize_t</a>.</dd></dl>
1157    
1158     <p>
1159     Definition at line <a class="el" href="dbprim_8h-source.html#l01254">1254</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1160     </tr>
1161     </table>
1162     <a class="anchor" name="ga36"></a><!-- doxytag: member="dbprim.h::ht_size" ref="ga36" args="(table)" --><p>
1163     <table class="mdTable" cellpadding="2" cellspacing="0">
1164     <tr>
1165     <td class="mdRow">
1166     <table cellpadding="0" cellspacing="0" border="0">
1167     <tr>
1168     <td class="md" nowrap valign="top">#define ht_size </td>
1169     <td class="md" valign="top">(&nbsp;</td>
1170     <td class="md" nowrap valign="top">table&nbsp;</td>
1171     <td class="mdname1" valign="top" nowrap> </td>
1172     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1173     <td class="md" nowrap></td>
1174     </tr>
1175     </table>
1176     </td>
1177     </tr>
1178     </table>
1179     <table cellspacing="5" cellpadding="0" border="0">
1180     <tr>
1181     <td>
1182     &nbsp;
1183     </td>
1184     <td>
1185    
1186     <p>
1187     This macro returns the physical size of the bucket array allocated by the library for this hash table.<p>
1188     <dl compact><dt><b>Parameters:</b></dt><dd>
1189     <table border="0" cellspacing="2" cellpadding="0">
1190     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
1191     </table>
1192     </dl>
1193     <dl compact><dt><b>Returns:</b></dt><dd>A <code>size_t</code>.</dd></dl>
1194    
1195     <p>
1196     Definition at line <a class="el" href="dbprim_8h-source.html#l01278">1278</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1197     </tr>
1198     </table>
1199     <a class="anchor" name="ga27"></a><!-- doxytag: member="dbprim.h::ht_verify" ref="ga27" args="(table)" --><p>
1200     <table class="mdTable" cellpadding="2" cellspacing="0">
1201     <tr>
1202     <td class="mdRow">
1203     <table cellpadding="0" cellspacing="0" border="0">
1204     <tr>
1205     <td class="md" nowrap valign="top">#define ht_verify </td>
1206     <td class="md" valign="top">(&nbsp;</td>
1207     <td class="md" nowrap valign="top">table&nbsp;</td>
1208     <td class="mdname1" valign="top" nowrap> </td>
1209     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1210     <td class="md" nowrap></td>
1211     </tr>
1212     </table>
1213     </td>
1214     </tr>
1215     </table>
1216     <table cellspacing="5" cellpadding="0" border="0">
1217     <tr>
1218     <td>
1219     &nbsp;
1220     </td>
1221     <td>
1222    
1223     <p>
1224     This macro verifies that a given pointer actually does point to a hash table.<p>
1225     <dl compact><dt><b>Warning:</b></dt><dd>This macro evaluates the <code>table</code> argument twice.</dd></dl>
1226     <dl compact><dt><b>Parameters:</b></dt><dd>
1227     <table border="0" cellspacing="2" cellpadding="0">
1228     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
1229     </table>
1230     </dl>
1231     <dl compact><dt><b>Returns:</b></dt><dd>Boolean <code>true</code> if <code>table</code> is a valid hash table or <code>false</code> otherwise.</dd></dl>
1232    
1233     <p>
1234     Definition at line <a class="el" href="dbprim_8h-source.html#l01162">1162</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>.
1235     <p>
1236     Referenced by <a class="el" href="ht__add_8c-source.html#l00034">ht_add()</a>, <a class="el" href="ht__find_8c-source.html#l00034">ht_find()</a>, <a class="el" href="ht__flush_8c-source.html#l00036">ht_flush()</a>, <a class="el" href="ht__free_8c-source.html#l00036">ht_free()</a>, <a class="el" href="ht__iter_8c-source.html#l00034">ht_iter()</a>, <a class="el" href="ht__move_8c-source.html#l00034">ht_move()</a>, <a class="el" href="ht__remove_8c-source.html#l00034">ht_remove()</a>, and <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>. </td>
1237     </tr>
1238     </table>
1239     <a class="anchor" name="ga21"></a><!-- doxytag: member="_hash_prime.c::MAX_PRIME" ref="ga21" args="" --><p>
1240     <table class="mdTable" cellpadding="2" cellspacing="0">
1241     <tr>
1242     <td class="mdRow">
1243     <table cellpadding="0" cellspacing="0" border="0">
1244     <tr>
1245     <td class="md" nowrap valign="top">#define MAX_PRIME </td>
1246     </tr>
1247     </table>
1248     </td>
1249     </tr>
1250     </table>
1251     <table cellspacing="5" cellpadding="0" border="0">
1252     <tr>
1253     <td>
1254     &nbsp;
1255     </td>
1256     <td>
1257    
1258     <p>
1259     <p><b>For internal use only.</b></p>
1260     <p>
1261     This is the largest prime number that can be handled by the <a class="el" href="group__dbprim__hash.html#ga20">_hash_prime()</a> function.</p>
1262    
1263     <p>
1264     Definition at line <a class="el" href="__hash__prime_8c-source.html#l00041">41</a> of file <a class="el" href="__hash__prime_8c-source.html">_hash_prime.c</a>.
1265     <p>
1266     Referenced by <a class="el" href="__hash__prime_8c-source.html#l00781">_hash_prime()</a>. </td>
1267     </tr>
1268     </table>
1269     <a class="anchor" name="ga46"></a><!-- doxytag: member="dbprim.h::st_rsize" ref="ga46" args="(table)" --><p>
1270     <table class="mdTable" cellpadding="2" cellspacing="0">
1271     <tr>
1272     <td class="mdRow">
1273     <table cellpadding="0" cellspacing="0" border="0">
1274     <tr>
1275     <td class="md" nowrap valign="top">#define st_rsize </td>
1276     <td class="md" valign="top">(&nbsp;</td>
1277     <td class="md" nowrap valign="top">table&nbsp;</td>
1278     <td class="mdname1" valign="top" nowrap> </td>
1279     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1280     <td class="md" nowrap></td>
1281     </tr>
1282     </table>
1283     </td>
1284     </tr>
1285     </table>
1286     <table cellspacing="5" cellpadding="0" border="0">
1287     <tr>
1288     <td>
1289     &nbsp;
1290     </td>
1291     <td>
1292    
1293     <p>
1294     This macro retrieves the resize callback function pointer.<p>
1295     <dl compact><dt><b>Parameters:</b></dt><dd>
1296     <table border="0" cellspacing="2" cellpadding="0">
1297     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__smat.html#ga0">smat_table_t</a>.</td></tr>
1298     </table>
1299     </dl>
1300     <dl compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="group__dbprim__smat.html#ga3">smat_resize_t</a>.</dd></dl>
1301    
1302     <p>
1303     Definition at line <a class="el" href="dbprim_8h-source.html#l01763">1763</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1304     </tr>
1305     </table>
1306     <hr><h2>Typedef Documentation</h2>
1307     <a class="anchor" name="ga5"></a><!-- doxytag: member="dbprim.h::hash_comp_t" ref="ga5" args=")(hash_table_t *table, db_key_t *key1, db_key_t *key2)" --><p>
1308     <table class="mdTable" cellpadding="2" cellspacing="0">
1309     <tr>
1310     <td class="mdRow">
1311     <table cellpadding="0" cellspacing="0" border="0">
1312     <tr>
1313     <td class="md" nowrap valign="top">typedef unsigned long(* <a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a>)(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key1, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key2) </td>
1314     </tr>
1315     </table>
1316     </td>
1317     </tr>
1318     </table>
1319     <table cellspacing="5" cellpadding="0" border="0">
1320     <tr>
1321     <td>
1322     &nbsp;
1323     </td>
1324     <td>
1325    
1326     <p>
1327     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.<p>
1328     <dl compact><dt><b>Parameters:</b></dt><dd>
1329     <table border="0" cellspacing="2" cellpadding="0">
1330     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1331     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key1</em>&nbsp;</td><td>The first key being compared. </td></tr>
1332     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key2</em>&nbsp;</td><td>The second key being compared.</td></tr>
1333     </table>
1334     </dl>
1335     <dl compact><dt><b>Returns:</b></dt><dd>Zero if the keys match, non-zero otherwise.</dd></dl>
1336    
1337     <p>
1338     Definition at line <a class="el" href="dbprim_8h-source.html#l00408">408</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1339     </tr>
1340     </table>
1341     <a class="anchor" name="ga2"></a><!-- doxytag: member="dbprim.h::hash_entry_t" ref="ga2" args="" --><p>
1342     <table class="mdTable" cellpadding="2" cellspacing="0">
1343     <tr>
1344     <td class="mdRow">
1345     <table cellpadding="0" cellspacing="0" border="0">
1346     <tr>
1347     <td class="md" nowrap valign="top">typedef struct <a class="el" href="struct__hash__entry__s.html">_hash_entry_s</a> <a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> </td>
1348     </tr>
1349     </table>
1350     </td>
1351     </tr>
1352     </table>
1353     <table cellspacing="5" cellpadding="0" border="0">
1354     <tr>
1355     <td>
1356     &nbsp;
1357     </td>
1358     <td>
1359    
1360     <p>
1361     This structure represents a single entry of a hash table.
1362     <p>
1363     Definition at line <a class="el" href="dbprim_8h-source.html#l00284">284</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1364     </tr>
1365     </table>
1366     <a class="anchor" name="ga4"></a><!-- doxytag: member="dbprim.h::hash_func_t" ref="ga4" args=")(hash_table_t *table, db_key_t *key)" --><p>
1367     <table class="mdTable" cellpadding="2" cellspacing="0">
1368     <tr>
1369     <td class="mdRow">
1370     <table cellpadding="0" cellspacing="0" border="0">
1371     <tr>
1372     <td class="md" nowrap valign="top">typedef unsigned long(* <a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a>)(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__db__key__s.html">db_key_t</a> *key) </td>
1373     </tr>
1374     </table>
1375     </td>
1376     </tr>
1377     </table>
1378     <table cellspacing="5" cellpadding="0" border="0">
1379     <tr>
1380     <td>
1381     &nbsp;
1382     </td>
1383     <td>
1384    
1385     <p>
1386     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.<p>
1387     <dl compact><dt><b>Parameters:</b></dt><dd>
1388     <table border="0" cellspacing="2" cellpadding="0">
1389     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1390     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key</em>&nbsp;</td><td>The database key to hash.</td></tr>
1391     </table>
1392     </dl>
1393     <dl compact><dt><b>Returns:</b></dt><dd>A 32-bit hash value for <code>key</code>.</dd></dl>
1394    
1395     <p>
1396     Definition at line <a class="el" href="dbprim_8h-source.html#l00392">392</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1397     </tr>
1398     </table>
1399     <a class="anchor" name="ga3"></a><!-- doxytag: member="dbprim.h::hash_iter_t" ref="ga3" args=")(hash_table_t *table, hash_entry_t *ent, void *extra)" --><p>
1400     <table class="mdTable" cellpadding="2" cellspacing="0">
1401     <tr>
1402     <td class="mdRow">
1403     <table cellpadding="0" cellspacing="0" border="0">
1404     <tr>
1405     <td class="md" nowrap valign="top">typedef unsigned long(* <a class="el" href="group__dbprim__hash.html#ga3">hash_iter_t</a>)(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, <a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *ent, void *extra) </td>
1406     </tr>
1407     </table>
1408     </td>
1409     </tr>
1410     </table>
1411     <table cellspacing="5" cellpadding="0" border="0">
1412     <tr>
1413     <td>
1414     &nbsp;
1415     </td>
1416     <td>
1417    
1418     <p>
1419     This function pointer references a callback used by <a class="el" href="group__dbprim__hash.html#ga15">ht_iter()</a> and <a class="el" href="group__dbprim__hash.html#ga16">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#ga15">ht_iter()</a> or <a class="el" href="group__dbprim__hash.html#ga16">ht_flush()</a> call.<p>
1420     <dl compact><dt><b>Parameters:</b></dt><dd>
1421     <table border="0" cellspacing="2" cellpadding="0">
1422     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1423     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>ent</em>&nbsp;</td><td>A pointer to the <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a> being considered. </td></tr>
1424     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>extra</em>&nbsp;</td><td>A <code>void</code> pointer passed to <a class="el" href="group__dbprim__hash.html#ga15">ht_iter()</a> or <a class="el" href="group__dbprim__hash.html#ga16">ht_flush()</a>.</td></tr>
1425     </table>
1426     </dl>
1427     <dl compact><dt><b>Returns:</b></dt><dd>Zero for success, or non-zero to terminate the iteration.</dd></dl>
1428    
1429     <p>
1430     Definition at line <a class="el" href="dbprim_8h-source.html#l00376">376</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1431     </tr>
1432     </table>
1433     <a class="anchor" name="ga6"></a><!-- doxytag: member="dbprim.h::hash_resize_t" ref="ga6" args=")(hash_table_t *table, unsigned long new_mod)" --><p>
1434     <table class="mdTable" cellpadding="2" cellspacing="0">
1435     <tr>
1436     <td class="mdRow">
1437     <table cellpadding="0" cellspacing="0" border="0">
1438     <tr>
1439     <td class="md" nowrap valign="top">typedef unsigned long(* <a class="el" href="group__dbprim__hash.html#ga6">hash_resize_t</a>)(<a class="el" href="struct__hash__table__s.html">hash_table_t</a> *table, unsigned long new_mod) </td>
1440     </tr>
1441     </table>
1442     </td>
1443     </tr>
1444     </table>
1445     <table cellspacing="5" cellpadding="0" border="0">
1446     <tr>
1447     <td>
1448     &nbsp;
1449     </td>
1450     <td>
1451    
1452     <p>
1453     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.<p>
1454     <dl compact><dt><b>Parameters:</b></dt><dd>
1455     <table border="0" cellspacing="2" cellpadding="0">
1456     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1457     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>new_mod</em>&nbsp;</td><td>The new table modulus.</td></tr>
1458     </table>
1459     </dl>
1460     <dl compact><dt><b>Returns:</b></dt><dd>Zero to permit the table resize, non-zero otherwise.</dd></dl>
1461    
1462     <p>
1463     Definition at line <a class="el" href="dbprim_8h-source.html#l00424">424</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1464     </tr>
1465     </table>
1466     <a class="anchor" name="ga1"></a><!-- doxytag: member="dbprim.h::hash_table_t" ref="ga1" args="" --><p>
1467     <table class="mdTable" cellpadding="2" cellspacing="0">
1468     <tr>
1469     <td class="mdRow">
1470     <table cellpadding="0" cellspacing="0" border="0">
1471     <tr>
1472     <td class="md" nowrap valign="top">typedef struct <a class="el" href="struct__hash__table__s.html">_hash_table_s</a> <a class="el" href="struct__hash__table__s.html">hash_table_t</a> </td>
1473     </tr>
1474     </table>
1475     </td>
1476     </tr>
1477     </table>
1478     <table cellspacing="5" cellpadding="0" border="0">
1479     <tr>
1480     <td>
1481     &nbsp;
1482     </td>
1483     <td>
1484    
1485     <p>
1486     This structure is the basis of all hash tables maintained by this library.
1487     <p>
1488     Definition at line <a class="el" href="dbprim_8h-source.html#l00277">277</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td>
1489     </tr>
1490     </table>
1491     <hr><h2>Function Documentation</h2>
1492     <a class="anchor" name="ga20"></a><!-- doxytag: member="dbprim_int.h::_hash_prime" ref="ga20" args="(unsigned long start)" --><p>
1493     <table class="mdTable" cellpadding="2" cellspacing="0">
1494     <tr>
1495     <td class="mdRow">
1496     <table cellpadding="0" cellspacing="0" border="0">
1497     <tr>
1498     <td class="md" nowrap valign="top">unsigned long _hash_prime </td>
1499     <td class="md" valign="top">(&nbsp;</td>
1500     <td class="md" nowrap valign="top">unsigned long&nbsp;</td>
1501     <td class="mdname1" valign="top" nowrap> <em>start</em> </td>
1502     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1503     <td class="md" nowrap></td>
1504     </tr>
1505     </table>
1506     </td>
1507     </tr>
1508     </table>
1509     <table cellspacing="5" cellpadding="0" border="0">
1510     <tr>
1511     <td>
1512     &nbsp;
1513     </td>
1514     <td>
1515    
1516     <p>
1517     <p><b>For internal use only.</b></p>
1518     <p>
1519     This function is used by the hash table system to find the first prime number larger than <code>start</code>. This prime number will be used as the hash table modulus.<p>
1520     <dl compact><dt><b>Parameters:</b></dt><dd>
1521     <table border="0" cellspacing="2" cellpadding="0">
1522     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>start</em>&nbsp;</td><td>The number from which to start looking for the next largest prime.</td></tr>
1523     </table>
1524     </dl>
1525     <dl compact><dt><b>Returns:</b></dt><dd>The first prime number larger than <code>start</code>.</dd></dl>
1526     </p>
1527    
1528     <p>
1529     Definition at line <a class="el" href="__hash__prime_8c-source.html#l00781">781</a> of file <a class="el" href="__hash__prime_8c-source.html">_hash_prime.c</a>.
1530     <p>
1531     References <a class="el" href="__hash__prime_8c-source.html#l00041">MAX_PRIME</a>, and <a class="el" href="__hash__prime_8c-source.html#l00050">primes</a>.
1532     <p>
1533     Referenced by <a class="el" href="ht__init_8c-source.html#l00037">ht_init()</a>, and <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>. </td>
1534     </tr>
1535     </table>
1536     <a class="anchor" name="ga9"></a><!-- doxytag: member="dbprim.h::hash_comp" ref="ga9" args="(hash_table_t *table, db_key_t *key1, db_key_t *key2)" --><p>
1537     <table class="mdTable" cellpadding="2" cellspacing="0">
1538     <tr>
1539     <td class="mdRow">
1540     <table cellpadding="0" cellspacing="0" border="0">
1541     <tr>
1542     <td class="md" nowrap valign="top">unsigned long hash_comp </td>
1543     <td class="md" valign="top">(&nbsp;</td>
1544     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
1545     <td class="mdname" nowrap> <em>table</em>, </td>
1546     </tr>
1547     <tr>
1548     <td class="md" nowrap align="right"></td>
1549     <td class="md"></td>
1550     <td class="md" nowrap><a class="el" href="struct__db__key__s.html">db_key_t</a> *&nbsp;</td>
1551     <td class="mdname" nowrap> <em>key1</em>, </td>
1552     </tr>
1553     <tr>
1554     <td class="md" nowrap align="right"></td>
1555     <td class="md"></td>
1556     <td class="md" nowrap><a class="el" href="struct__db__key__s.html">db_key_t</a> *&nbsp;</td>
1557     <td class="mdname" nowrap> <em>key2</em></td>
1558     </tr>
1559     <tr>
1560     <td class="md"></td>
1561     <td class="md">)&nbsp;</td>
1562     <td class="md" colspan="2"></td>
1563     </tr>
1564     </table>
1565     </td>
1566     </tr>
1567     </table>
1568     <table cellspacing="5" cellpadding="0" border="0">
1569     <tr>
1570     <td>
1571     &nbsp;
1572     </td>
1573     <td>
1574    
1575     <p>
1576     This is a hash comparison function, compatible with <a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a>, based around memcmp().<p>
1577     <dl compact><dt><b>Parameters:</b></dt><dd>
1578     <table border="0" cellspacing="2" cellpadding="0">
1579     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1580     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key1</em>&nbsp;</td><td>The first key being compared. </td></tr>
1581     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key2</em>&nbsp;</td><td>The second key being compared.</td></tr>
1582     </table>
1583     </dl>
1584     <dl compact><dt><b>Returns:</b></dt><dd>Zero if the keys match, non-zero otherwise.</dd></dl>
1585    
1586     <p>
1587     Definition at line <a class="el" href="hash__comp_8c-source.html#l00036">36</a> of file <a class="el" href="hash__comp_8c-source.html">hash_comp.c</a>.
1588     <p>
1589     References <a class="el" href="dbprim_8h-source.html#l00608">dk_key</a>, and <a class="el" href="dbprim_8h-source.html#l00621">dk_len</a>.
1590     <p>
1591     Referenced by <a class="el" href="st__init_8c-source.html#l00034">st_init()</a>. </td>
1592     </tr>
1593     </table>
1594     <a class="anchor" name="ga7"></a><!-- doxytag: member="dbprim.h::hash_fnv1" ref="ga7" args="(hash_table_t *table, db_key_t *key)" --><p>
1595     <table class="mdTable" cellpadding="2" cellspacing="0">
1596     <tr>
1597     <td class="mdRow">
1598     <table cellpadding="0" cellspacing="0" border="0">
1599     <tr>
1600     <td class="md" nowrap valign="top">unsigned long hash_fnv1 </td>
1601     <td class="md" valign="top">(&nbsp;</td>
1602     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
1603     <td class="mdname" nowrap> <em>table</em>, </td>
1604     </tr>
1605     <tr>
1606     <td class="md" nowrap align="right"></td>
1607     <td class="md"></td>
1608     <td class="md" nowrap><a class="el" href="struct__db__key__s.html">db_key_t</a> *&nbsp;</td>
1609     <td class="mdname" nowrap> <em>key</em></td>
1610     </tr>
1611     <tr>
1612     <td class="md"></td>
1613     <td class="md">)&nbsp;</td>
1614     <td class="md" colspan="2"></td>
1615     </tr>
1616     </table>
1617     </td>
1618     </tr>
1619     </table>
1620     <table cellspacing="5" cellpadding="0" border="0">
1621     <tr>
1622     <td>
1623     &nbsp;
1624     </td>
1625     <td>
1626    
1627     <p>
1628     This is a hash function, compatible with <a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a>, based around the FNV-1 hash algorithm. See <a href="http://www.isthe.com/chongo/tech/comp/fnv/">http://www.isthe.com/chongo/tech/comp/fnv/</a> for more information about FNV-1.<p>
1629     <dl compact><dt><b>Parameters:</b></dt><dd>
1630     <table border="0" cellspacing="2" cellpadding="0">
1631     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1632     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key</em>&nbsp;</td><td>The database key to hash.</td></tr>
1633     </table>
1634     </dl>
1635     <dl compact><dt><b>Returns:</b></dt><dd>A 32-bit hash value for <code>key</code>.</dd></dl>
1636    
1637     <p>
1638     Definition at line <a class="el" href="hash__fnv1_8c-source.html#l00035">35</a> of file <a class="el" href="hash__fnv1_8c-source.html">hash_fnv1.c</a>.
1639     <p>
1640     References <a class="el" href="dbprim_8h-source.html#l00608">dk_key</a>, <a class="el" href="dbprim_8h-source.html#l00621">dk_len</a>, <a class="el" href="dbprim__int_8h-source.html#l00117">HASH_FNV_OFFSET</a>, and <a class="el" href="dbprim__int_8h-source.html#l00127">HASH_FNV_PRIME</a>. </td>
1641     </tr>
1642     </table>
1643     <a class="anchor" name="ga8"></a><!-- doxytag: member="dbprim.h::hash_fnv1a" ref="ga8" args="(hash_table_t *table, db_key_t *key)" --><p>
1644     <table class="mdTable" cellpadding="2" cellspacing="0">
1645     <tr>
1646     <td class="mdRow">
1647     <table cellpadding="0" cellspacing="0" border="0">
1648     <tr>
1649     <td class="md" nowrap valign="top">unsigned long hash_fnv1a </td>
1650     <td class="md" valign="top">(&nbsp;</td>
1651     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
1652     <td class="mdname" nowrap> <em>table</em>, </td>
1653     </tr>
1654     <tr>
1655     <td class="md" nowrap align="right"></td>
1656     <td class="md"></td>
1657     <td class="md" nowrap><a class="el" href="struct__db__key__s.html">db_key_t</a> *&nbsp;</td>
1658     <td class="mdname" nowrap> <em>key</em></td>
1659     </tr>
1660     <tr>
1661     <td class="md"></td>
1662     <td class="md">)&nbsp;</td>
1663     <td class="md" colspan="2"></td>
1664     </tr>
1665     </table>
1666     </td>
1667     </tr>
1668     </table>
1669     <table cellspacing="5" cellpadding="0" border="0">
1670     <tr>
1671     <td>
1672     &nbsp;
1673     </td>
1674     <td>
1675    
1676     <p>
1677     This is a hash function, compatible with <a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a>, based around the FNV-1a hash algorithm. See <a href="http://www.isthe.com/chongo/tech/comp/fnv/">http://www.isthe.com/chongo/tech/comp/fnv/</a> for more information about FNV-1a.<p>
1678     <dl compact><dt><b>Parameters:</b></dt><dd>
1679     <table border="0" cellspacing="2" cellpadding="0">
1680     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1681     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key</em>&nbsp;</td><td>The database key to hash.</td></tr>
1682     </table>
1683     </dl>
1684     <dl compact><dt><b>Returns:</b></dt><dd>A 32-bit hash value for <code>key</code>.</dd></dl>
1685    
1686     <p>
1687     Definition at line <a class="el" href="hash__fnv1a_8c-source.html#l00035">35</a> of file <a class="el" href="hash__fnv1a_8c-source.html">hash_fnv1a.c</a>.
1688     <p>
1689     References <a class="el" href="dbprim_8h-source.html#l00608">dk_key</a>, <a class="el" href="dbprim_8h-source.html#l00621">dk_len</a>, <a class="el" href="dbprim__int_8h-source.html#l00117">HASH_FNV_OFFSET</a>, and <a class="el" href="dbprim__int_8h-source.html#l00127">HASH_FNV_PRIME</a>.
1690     <p>
1691     Referenced by <a class="el" href="st__init_8c-source.html#l00034">st_init()</a>. </td>
1692     </tr>
1693     </table>
1694     <a class="anchor" name="ga19"></a><!-- doxytag: member="dbprim.h::he_init" ref="ga19" args="(hash_entry_t *entry, void *value)" --><p>
1695     <table class="mdTable" cellpadding="2" cellspacing="0">
1696     <tr>
1697     <td class="mdRow">
1698     <table cellpadding="0" cellspacing="0" border="0">
1699     <tr>
1700     <td class="md" nowrap valign="top">unsigned long he_init </td>
1701     <td class="md" valign="top">(&nbsp;</td>
1702     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *&nbsp;</td>
1703     <td class="mdname" nowrap> <em>entry</em>, </td>
1704     </tr>
1705     <tr>
1706     <td class="md" nowrap align="right"></td>
1707     <td class="md"></td>
1708     <td class="md" nowrap>void *&nbsp;</td>
1709     <td class="mdname" nowrap> <em>value</em></td>
1710     </tr>
1711     <tr>
1712     <td class="md"></td>
1713     <td class="md">)&nbsp;</td>
1714     <td class="md" colspan="2"></td>
1715     </tr>
1716     </table>
1717     </td>
1718     </tr>
1719     </table>
1720     <table cellspacing="5" cellpadding="0" border="0">
1721     <tr>
1722     <td>
1723     &nbsp;
1724     </td>
1725     <td>
1726    
1727     <p>
1728     This function dynamically initializes a hash table entry.<p>
1729     <dl compact><dt><b>Parameters:</b></dt><dd>
1730     <table border="0" cellspacing="2" cellpadding="0">
1731     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a> to be initialized. </td></tr>
1732     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>value</em>&nbsp;</td><td>A pointer to <code>void</code> which will be the value of the hash table entry.</td></tr>
1733     </table>
1734     </dl>
1735     <dl compact><dt><b>Return values:</b></dt><dd>
1736     <table border="0" cellspacing="2" cellpadding="0">
1737     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>A <code>NULL</code> pointer was passed for <code>entry</code>.</td></tr>
1738     </table>
1739     </dl>
1740    
1741     <p>
1742     Definition at line <a class="el" href="he__init_8c-source.html#l00034">34</a> of file <a class="el" href="he__init_8c-source.html">he_init.c</a>.
1743     <p>
1744     References <a class="el" href="dbprim_8h-source.html#l00584">_db_key_s::dk_key</a>, <a class="el" href="dbprim_8h-source.html#l00585">_db_key_s::dk_len</a>, <a class="el" href="dbprim_8h-source.html#l01502">HASH_ENTRY_MAGIC</a>, <a class="el" href="dbprim_8h-source.html#l01489">_hash_entry_s::he_elem</a>, <a class="el" href="dbprim_8h-source.html#l01491">_hash_entry_s::he_hash</a>, <a class="el" href="dbprim_8h-source.html#l01492">_hash_entry_s::he_key</a>, <a class="el" href="dbprim_8h-source.html#l01488">_hash_entry_s::he_magic</a>, <a class="el" href="dbprim_8h-source.html#l01490">_hash_entry_s::he_table</a>, <a class="el" href="dbprim_8h-source.html#l01493">_hash_entry_s::he_value</a>, and <a class="el" href="le__init_8c-source.html#l00034">le_init()</a>.
1745     <p>
1746     Referenced by <a class="el" href="smat__freelist_8c-source.html#l00048">_smat_alloc()</a>.
1747     <p>
1748     Here is the call graph for this function:<p><center><img src="group__dbprim__hash_ga19_cgraph.png" border="0" usemap="#group__dbprim__hash_ga19_cgraph_map" alt=""></center>
1749     <map name="group__dbprim__hash_ga19_cgraph_map">
1750     <area href="group__dbprim__link.html#ga12" shape="rect" coords="116,6,172,30" alt="">
1751     </map>
1752     </td>
1753     </tr>
1754     </table>
1755     <a class="anchor" name="ga11"></a><!-- doxytag: member="dbprim.h::ht_add" ref="ga11" args="(hash_table_t *table, hash_entry_t *entry, db_key_t *key)" --><p>
1756     <table class="mdTable" cellpadding="2" cellspacing="0">
1757     <tr>
1758     <td class="mdRow">
1759     <table cellpadding="0" cellspacing="0" border="0">
1760     <tr>
1761     <td class="md" nowrap valign="top">unsigned long ht_add </td>
1762     <td class="md" valign="top">(&nbsp;</td>
1763     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
1764     <td class="mdname" nowrap> <em>table</em>, </td>
1765     </tr>
1766     <tr>
1767     <td class="md" nowrap align="right"></td>
1768     <td class="md"></td>
1769     <td class="md" nowrap><a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *&nbsp;</td>
1770     <td class="mdname" nowrap> <em>entry</em>, </td>
1771     </tr>
1772     <tr>
1773     <td class="md" nowrap align="right"></td>
1774     <td class="md"></td>
1775     <td class="md" nowrap><a class="el" href="struct__db__key__s.html">db_key_t</a> *&nbsp;</td>
1776     <td class="mdname" nowrap> <em>key</em></td>
1777     </tr>
1778     <tr>
1779     <td class="md"></td>
1780     <td class="md">)&nbsp;</td>
1781     <td class="md" colspan="2"></td>
1782     </tr>
1783     </table>
1784     </td>
1785     </tr>
1786     </table>
1787     <table cellspacing="5" cellpadding="0" border="0">
1788     <tr>
1789     <td>
1790     &nbsp;
1791     </td>
1792     <td>
1793    
1794     <p>
1795     This function adds an entry to a hash table.<p>
1796     <dl compact><dt><b>Parameters:</b></dt><dd>
1797     <table border="0" cellspacing="2" cellpadding="0">
1798     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1799     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a> to be added to the table. </td></tr>
1800     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a> containing the key for the entry.</td></tr>
1801     </table>
1802     </dl>
1803     <dl compact><dt><b>Return values:</b></dt><dd>
1804     <table border="0" cellspacing="2" cellpadding="0">
1805     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An invalid argument was given. </td></tr>
1806     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BUSY</em>&nbsp;</td><td>The entry is already in a table. </td></tr>
1807     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_FROZEN</em>&nbsp;</td><td>The table is currently frozen. </td></tr>
1808     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_NOTABLE</em>&nbsp;</td><td>The bucket table has not been allocated and automatic growth is not enabled. </td></tr>
1809     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_DUPLICATE</em>&nbsp;</td><td>The entry is a duplicate of an existing entry. </td></tr>
1810     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_UNRECOVERABLE</em>&nbsp;</td><td>An unrecoverable error occurred while resizing the table.</td></tr>
1811     </table>
1812     </dl>
1813    
1814     <p>
1815     Definition at line <a class="el" href="ht__add_8c-source.html#l00034">34</a> of file <a class="el" href="ht__add_8c-source.html">ht_add.c</a>.
1816     <p>
1817     References <a class="el" href="dbprim__int_8h-source.html#l00107">_hash_fuzz</a>, <a class="el" href="dbprim_8h-source.html#l01100">HASH_FLAG_AUTOGROW</a>, <a class="el" href="dbprim_8h-source.html#l01124">HASH_FLAG_FREEZE</a>, <a class="el" href="dbprim_8h-source.html#l01489">_hash_entry_s::he_elem</a>, <a class="el" href="dbprim_8h-source.html#l01491">_hash_entry_s::he_hash</a>, <a class="el" href="dbprim_8h-source.html#l01492">_hash_entry_s::he_key</a>, <a class="el" href="dbprim_8h-source.html#l01490">_hash_entry_s::he_table</a>, <a class="el" href="dbprim_8h-source.html#l01528">he_verify</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="ht__find_8c-source.html#l00034">ht_find()</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="dbprim_8h-source.html#l01080">_hash_table_s::ht_func</a>, <a class="el" href="dbprim_8h-source.html#l01074">_hash_table_s::ht_modulus</a>, <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>, <a class="el" href="dbprim_8h-source.html#l01077">_hash_table_s::ht_rollover</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>, <a class="el" href="dbprim_8h-source.html#l00977">le_object</a>, <a class="el" href="group__dbprim__link.html#gga28a133">LINK_LOC_HEAD</a>, and <a class="el" href="ll__add_8c-source.html#l00034">ll_add()</a>.
1818     <p>
1819     Referenced by <a class="el" href="st__add_8c-source.html#l00036">st_add()</a>.
1820     <p>
1821     Here is the call graph for this function:<p><center><img src="group__dbprim__hash_ga11_cgraph.png" border="0" usemap="#group__dbprim__hash_ga11_cgraph_map" alt=""></center>
1822     <map name="group__dbprim__hash_ga11_cgraph_map">
1823     <area href="group__dbprim__hash.html#ga14" shape="rect" coords="125,5,187,29" alt="">
1824     <area href="group__dbprim__hash.html#ga17" shape="rect" coords="119,104,193,128" alt="">
1825     <area href="group__dbprim__link.html#ga6" shape="rect" coords="265,55,321,79" alt="">
1826     <area href="group__dbprim__hash.html#ga20" shape="rect" coords="244,103,343,127" alt="">
1827     <area href="group__dbprim__link.html#ga5" shape="rect" coords="268,151,319,175" alt="">
1828     <area href="group__dbprim__link.html#ga8" shape="rect" coords="255,199,332,223" alt="">
1829     </map>
1830     </td>
1831     </tr>
1832     </table>
1833     <a class="anchor" name="ga14"></a><!-- doxytag: member="dbprim.h::ht_find" ref="ga14" args="(hash_table_t *table, hash_entry_t **entry_p, db_key_t *key)" --><p>
1834     <table class="mdTable" cellpadding="2" cellspacing="0">
1835     <tr>
1836     <td class="mdRow">
1837     <table cellpadding="0" cellspacing="0" border="0">
1838     <tr>
1839     <td class="md" nowrap valign="top">unsigned long ht_find </td>
1840     <td class="md" valign="top">(&nbsp;</td>
1841     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
1842     <td class="mdname" nowrap> <em>table</em>, </td>
1843     </tr>
1844     <tr>
1845     <td class="md" nowrap align="right"></td>
1846     <td class="md"></td>
1847     <td class="md" nowrap><a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> **&nbsp;</td>
1848     <td class="mdname" nowrap> <em>entry_p</em>, </td>
1849     </tr>
1850     <tr>
1851     <td class="md" nowrap align="right"></td>
1852     <td class="md"></td>
1853     <td class="md" nowrap><a class="el" href="struct__db__key__s.html">db_key_t</a> *&nbsp;</td>
1854     <td class="mdname" nowrap> <em>key</em></td>
1855     </tr>
1856     <tr>
1857     <td class="md"></td>
1858     <td class="md">)&nbsp;</td>
1859     <td class="md" colspan="2"></td>
1860     </tr>
1861     </table>
1862     </td>
1863     </tr>
1864     </table>
1865     <table cellspacing="5" cellpadding="0" border="0">
1866     <tr>
1867     <td>
1868     &nbsp;
1869     </td>
1870     <td>
1871    
1872     <p>
1873     This function looks up an entry matching the given <code>key</code>.<p>
1874     <dl compact><dt><b>Parameters:</b></dt><dd>
1875     <table border="0" cellspacing="2" cellpadding="0">
1876     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1877     <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>entry_p</em>&nbsp;</td><td>A pointer to a pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a>. If <code>NULL</code> is passed, the lookup will be performed and an appropriate error code returned. </td></tr>
1878     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a> describing the item to find.</td></tr>
1879     </table>
1880     </dl>
1881     <dl compact><dt><b>Return values:</b></dt><dd>
1882     <table border="0" cellspacing="2" cellpadding="0">
1883     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An argument was invalid. </td></tr>
1884     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_NOENTRY</em>&nbsp;</td><td>No matching entry was found.</td></tr>
1885     </table>
1886     </dl>
1887    
1888     <p>
1889     Definition at line <a class="el" href="ht__find_8c-source.html#l00034">34</a> of file <a class="el" href="ht__find_8c-source.html">ht_find.c</a>.
1890     <p>
1891     References <a class="el" href="dbprim_8h-source.html#l01592">he_key</a>, <a class="el" href="dbprim_8h-source.html#l01081">_hash_table_s::ht_comp</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="dbprim_8h-source.html#l01080">_hash_table_s::ht_func</a>, <a class="el" href="dbprim_8h-source.html#l01074">_hash_table_s::ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>, <a class="el" href="dbprim_8h-source.html#l00950">le_next</a>, <a class="el" href="dbprim_8h-source.html#l00977">le_object</a>, and <a class="el" href="dbprim_8h-source.html#l00700">ll_first</a>.
1892     <p>
1893     Referenced by <a class="el" href="ht__add_8c-source.html#l00034">ht_add()</a>, <a class="el" href="ht__move_8c-source.html#l00034">ht_move()</a>, and <a class="el" href="st__find_8c-source.html#l00036">st_find()</a>. </td>
1894     </tr>
1895     </table>
1896     <a class="anchor" name="ga16"></a><!-- doxytag: member="dbprim.h::ht_flush" ref="ga16" args="(hash_table_t *table, hash_iter_t flush_func, void *extra)" --><p>
1897     <table class="mdTable" cellpadding="2" cellspacing="0">
1898     <tr>
1899     <td class="mdRow">
1900     <table cellpadding="0" cellspacing="0" border="0">
1901     <tr>
1902     <td class="md" nowrap valign="top">unsigned long ht_flush </td>
1903     <td class="md" valign="top">(&nbsp;</td>
1904     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
1905     <td class="mdname" nowrap> <em>table</em>, </td>
1906     </tr>
1907     <tr>
1908     <td class="md" nowrap align="right"></td>
1909     <td class="md"></td>
1910     <td class="md" nowrap><a class="el" href="group__dbprim__hash.html#ga3">hash_iter_t</a>&nbsp;</td>
1911     <td class="mdname" nowrap> <em>flush_func</em>, </td>
1912     </tr>
1913     <tr>
1914     <td class="md" nowrap align="right"></td>
1915     <td class="md"></td>
1916     <td class="md" nowrap>void *&nbsp;</td>
1917     <td class="mdname" nowrap> <em>extra</em></td>
1918     </tr>
1919     <tr>
1920     <td class="md"></td>
1921     <td class="md">)&nbsp;</td>
1922     <td class="md" colspan="2"></td>
1923     </tr>
1924     </table>
1925     </td>
1926     </tr>
1927     </table>
1928     <table cellspacing="5" cellpadding="0" border="0">
1929     <tr>
1930     <td>
1931     &nbsp;
1932     </td>
1933     <td>
1934    
1935     <p>
1936     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>.<p>
1937     <dl compact><dt><b>Parameters:</b></dt><dd>
1938     <table border="0" cellspacing="2" cellpadding="0">
1939     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
1940     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>flush_func</em>&nbsp;</td><td>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#ga3">hash_iter_t</a> for more information. </td></tr>
1941     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>extra</em>&nbsp;</td><td>A <code>void</code> pointer that will be passed to <code>flush_func</code>.</td></tr>
1942     </table>
1943     </dl>
1944     <dl compact><dt><b>Return values:</b></dt><dd>
1945     <table border="0" cellspacing="2" cellpadding="0">
1946     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An argument was invalid. </td></tr>
1947     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_FROZEN</em>&nbsp;</td><td>The hash table is frozen.</td></tr>
1948     </table>
1949     </dl>
1950    
1951     <p>
1952     Definition at line <a class="el" href="ht__flush_8c-source.html#l00036">36</a> of file <a class="el" href="ht__flush_8c-source.html">ht_flush.c</a>.
1953     <p>
1954     References <a class="el" href="dbprim_8h-source.html#l01108">HASH_FLAG_AUTOSHRINK</a>, <a class="el" href="dbprim_8h-source.html#l01124">HASH_FLAG_FREEZE</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="ht__free_8c-source.html#l00036">ht_free()</a>, <a class="el" href="dbprim_8h-source.html#l01208">ht_modulus</a>, <a class="el" href="ht__remove_8c-source.html#l00034">ht_remove()</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>, <a class="el" href="dbprim_8h-source.html#l00977">le_object</a>, and <a class="el" href="dbprim_8h-source.html#l00700">ll_first</a>.
1955     <p>
1956     Referenced by <a class="el" href="st__flush_8c-source.html#l00086">st_flush()</a>.
1957     <p>
1958     Here is the call graph for this function:<p><center><img src="group__dbprim__hash_ga16_cgraph.png" border="0" usemap="#group__dbprim__hash_ga16_cgraph_map" alt=""></center>
1959     <map name="group__dbprim__hash_ga16_cgraph_map">
1960     <area href="group__dbprim__hash.html#ga18" shape="rect" coords="133,77,197,101" alt="">
1961     <area href="group__dbprim__hash.html#ga13" shape="rect" coords="124,125,207,149" alt="">
1962     <area href="group__dbprim__hash.html#ga17" shape="rect" coords="257,100,332,124" alt="">
1963     <area href="group__dbprim__link.html#ga8" shape="rect" coords="393,149,471,173" alt="">
1964     <area href="group__dbprim__hash.html#ga20" shape="rect" coords="383,5,481,29" alt="">
1965     <area href="group__dbprim__link.html#ga6" shape="rect" coords="404,53,460,77" alt="">
1966     <area href="group__dbprim__link.html#ga5" shape="rect" coords="407,101,457,125" alt="">
1967     </map>
1968     </td>
1969     </tr>
1970     </table>
1971     <a class="anchor" name="ga18"></a><!-- doxytag: member="dbprim.h::ht_free" ref="ga18" args="(hash_table_t *table)" --><p>
1972     <table class="mdTable" cellpadding="2" cellspacing="0">
1973     <tr>
1974     <td class="mdRow">
1975     <table cellpadding="0" cellspacing="0" border="0">
1976     <tr>
1977     <td class="md" nowrap valign="top">unsigned long ht_free </td>
1978     <td class="md" valign="top">(&nbsp;</td>
1979     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
1980     <td class="mdname1" valign="top" nowrap> <em>table</em> </td>
1981     <td class="md" valign="top">&nbsp;)&nbsp;</td>
1982     <td class="md" nowrap></td>
1983     </tr>
1984     </table>
1985     </td>
1986     </tr>
1987     </table>
1988     <table cellspacing="5" cellpadding="0" border="0">
1989     <tr>
1990     <td>
1991     &nbsp;
1992     </td>
1993     <td>
1994    
1995     <p>
1996     This function releases the memory used by the bucket table in an empty hash table.<p>
1997     <dl compact><dt><b>Parameters:</b></dt><dd>
1998     <table border="0" cellspacing="2" cellpadding="0">
1999     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>.</td></tr>
2000     </table>
2001     </dl>
2002     <dl compact><dt><b>Return values:</b></dt><dd>
2003     <table border="0" cellspacing="2" cellpadding="0">
2004     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An invalid argument was given. </td></tr>
2005     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_FROZEN</em>&nbsp;</td><td>The table is frozen. </td></tr>
2006     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_NOTEMPTY</em>&nbsp;</td><td>The table is not empty.</td></tr>
2007     </table>
2008     </dl>
2009    
2010     <p>
2011     Definition at line <a class="el" href="ht__free_8c-source.html#l00036">36</a> of file <a class="el" href="ht__free_8c-source.html">ht_free.c</a>.
2012     <p>
2013     References <a class="el" href="dbprim_8h-source.html#l01124">HASH_FLAG_FREEZE</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="dbprim_8h-source.html#l01074">_hash_table_s::ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01077">_hash_table_s::ht_rollover</a>, <a class="el" href="dbprim_8h-source.html#l01078">_hash_table_s::ht_rollunder</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, and <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>.
2014     <p>
2015     Referenced by <a class="el" href="ht__flush_8c-source.html#l00036">ht_flush()</a>, and <a class="el" href="st__free_8c-source.html#l00034">st_free()</a>. </td>
2016     </tr>
2017     </table>
2018     <a class="anchor" name="ga10"></a><!-- doxytag: member="dbprim.h::ht_init" ref="ga10" args="(hash_table_t *table, unsigned long flags, hash_func_t func, hash_comp_t comp, hash_resize_t resize, void *extra, unsigned long init_mod)" --><p>
2019     <table class="mdTable" cellpadding="2" cellspacing="0">
2020     <tr>
2021     <td class="mdRow">
2022     <table cellpadding="0" cellspacing="0" border="0">
2023     <tr>
2024     <td class="md" nowrap valign="top">unsigned long ht_init </td>
2025     <td class="md" valign="top">(&nbsp;</td>
2026     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
2027     <td class="mdname" nowrap> <em>table</em>, </td>
2028     </tr>
2029     <tr>
2030     <td class="md" nowrap align="right"></td>
2031     <td class="md"></td>
2032     <td class="md" nowrap>unsigned long&nbsp;</td>
2033     <td class="mdname" nowrap> <em>flags</em>, </td>
2034     </tr>
2035     <tr>
2036     <td class="md" nowrap align="right"></td>
2037     <td class="md"></td>
2038     <td class="md" nowrap><a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a>&nbsp;</td>
2039     <td class="mdname" nowrap> <em>func</em>, </td>
2040     </tr>
2041     <tr>
2042     <td class="md" nowrap align="right"></td>
2043     <td class="md"></td>
2044     <td class="md" nowrap><a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a>&nbsp;</td>
2045     <td class="mdname" nowrap> <em>comp</em>, </td>
2046     </tr>
2047     <tr>
2048     <td class="md" nowrap align="right"></td>
2049     <td class="md"></td>
2050     <td class="md" nowrap><a class="el" href="group__dbprim__hash.html#ga6">hash_resize_t</a>&nbsp;</td>
2051     <td class="mdname" nowrap> <em>resize</em>, </td>
2052     </tr>
2053     <tr>
2054     <td class="md" nowrap align="right"></td>
2055     <td class="md"></td>
2056     <td class="md" nowrap>void *&nbsp;</td>
2057     <td class="mdname" nowrap> <em>extra</em>, </td>
2058     </tr>
2059     <tr>
2060     <td class="md" nowrap align="right"></td>
2061     <td class="md"></td>
2062     <td class="md" nowrap>unsigned long&nbsp;</td>
2063     <td class="mdname" nowrap> <em>init_mod</em></td>
2064     </tr>
2065     <tr>
2066     <td class="md"></td>
2067     <td class="md">)&nbsp;</td>
2068     <td class="md" colspan="2"></td>
2069     </tr>
2070     </table>
2071     </td>
2072     </tr>
2073     </table>
2074     <table cellspacing="5" cellpadding="0" border="0">
2075     <tr>
2076     <td>
2077     &nbsp;
2078     </td>
2079     <td>
2080    
2081     <p>
2082     This function dynamically initializes a hash table.<p>
2083     <dl compact><dt><b>Parameters:</b></dt><dd>
2084     <table border="0" cellspacing="2" cellpadding="0">
2085     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a> to be initialized. </td></tr>
2086     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>flags</em>&nbsp;</td><td>A bit-wise OR of <a class="el" href="group__dbprim__hash.html#ga23">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#ga24">HASH_FLAG_AUTOSHRINK</a>. If neither behavior is desired, use 0. </td></tr>
2087     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>func</em>&nbsp;</td><td>A <a class="el" href="group__dbprim__hash.html#ga4">hash_func_t</a> function pointer for a hash function. </td></tr>
2088     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>comp</em>&nbsp;</td><td>A <a class="el" href="group__dbprim__hash.html#ga5">hash_comp_t</a> function pointer for a comparison function. </td></tr>
2089     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>resize</em>&nbsp;</td><td>A <a class="el" href="group__dbprim__hash.html#ga6">hash_resize_t</a> function pointer for determining whether resizing is permitted and/or for notification of the resize. </td></tr>
2090     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>extra</em>&nbsp;</td><td>Extra pointer data that should be associated with the hash table. </td></tr>
2091     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>init_mod</em>&nbsp;</td><td>An initial modulus for the table. This will presumably be extracted by <a class="el" href="group__dbprim__hash.html#ga30">ht_modulus()</a> in a previous invocation of the application. A 0 value is valid.</td></tr>
2092     </table>
2093     </dl>
2094     <dl compact><dt><b>Return values:</b></dt><dd>
2095     <table border="0" cellspacing="2" cellpadding="0">
2096     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An invalid argument was given. </td></tr>
2097     <tr><td valign="top"></td><td valign="top"><em>ENOMEM</em>&nbsp;</td><td>Unable to allocate memory.</td></tr>
2098     </table>
2099     </dl>
2100    
2101     <p>
2102     Definition at line <a class="el" href="ht__init_8c-source.html#l00037">37</a> of file <a class="el" href="ht__init_8c-source.html">ht_init.c</a>.
2103     <p>
2104     References <a class="el" href="__hash__prime_8c-source.html#l00781">_hash_prime()</a>, <a class="el" href="dbprim__int_8h-source.html#l00079">_hash_rollover</a>, <a class="el" href="dbprim__int_8h-source.html#l00093">_hash_rollunder</a>, <a class="el" href="dbprim_8h-source.html#l01100">HASH_FLAG_AUTOGROW</a>, <a class="el" href="dbprim_8h-source.html#l01108">HASH_FLAG_AUTOSHRINK</a>, <a class="el" href="dbprim_8h-source.html#l01092">HASH_TABLE_MAGIC</a>, <a class="el" href="dbprim_8h-source.html#l01081">_hash_table_s::ht_comp</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="dbprim_8h-source.html#l01083">_hash_table_s::ht_extra</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="dbprim_8h-source.html#l01080">_hash_table_s::ht_func</a>, <a class="el" href="dbprim_8h-source.html#l01072">_hash_table_s::ht_magic</a>, <a class="el" href="dbprim_8h-source.html#l01074">_hash_table_s::ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01208">ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01082">_hash_table_s::ht_resize</a>, <a class="el" href="dbprim_8h-source.html#l01077">_hash_table_s::ht_rollover</a>, <a class="el" href="dbprim_8h-source.html#l01078">_hash_table_s::ht_rollunder</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, and <a class="el" href="ll__init_8c-source.html#l00034">ll_init()</a>.
2105     <p>
2106     Referenced by <a class="el" href="st__init_8c-source.html#l00034">st_init()</a>.
2107     <p>
2108     Here is the call graph for this function:<p><center><img src="group__dbprim__hash_ga10_cgraph.png" border="0" usemap="#group__dbprim__hash_ga10_cgraph_map" alt=""></center>
2109     <map name="group__dbprim__hash_ga10_cgraph_map">
2110     <area href="group__dbprim__hash.html#ga20" shape="rect" coords="114,6,212,30" alt="">
2111     <area href="group__dbprim__link.html#ga5" shape="rect" coords="138,54,188,78" alt="">
2112     </map>
2113     </td>
2114     </tr>
2115     </table>
2116     <a class="anchor" name="ga15"></a><!-- doxytag: member="dbprim.h::ht_iter" ref="ga15" args="(hash_table_t *table, hash_iter_t iter_func, void *extra)" --><p>
2117     <table class="mdTable" cellpadding="2" cellspacing="0">
2118     <tr>
2119     <td class="mdRow">
2120     <table cellpadding="0" cellspacing="0" border="0">
2121     <tr>
2122     <td class="md" nowrap valign="top">unsigned long ht_iter </td>
2123     <td class="md" valign="top">(&nbsp;</td>
2124     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
2125     <td class="mdname" nowrap> <em>table</em>, </td>
2126     </tr>
2127     <tr>
2128     <td class="md" nowrap align="right"></td>
2129     <td class="md"></td>
2130     <td class="md" nowrap><a class="el" href="group__dbprim__hash.html#ga3">hash_iter_t</a>&nbsp;</td>
2131     <td class="mdname" nowrap> <em>iter_func</em>, </td>
2132     </tr>
2133     <tr>
2134     <td class="md" nowrap align="right"></td>
2135     <td class="md"></td>
2136     <td class="md" nowrap>void *&nbsp;</td>
2137     <td class="mdname" nowrap> <em>extra</em></td>
2138     </tr>
2139     <tr>
2140     <td class="md"></td>
2141     <td class="md">)&nbsp;</td>
2142     <td class="md" colspan="2"></td>
2143     </tr>
2144     </table>
2145     </td>
2146     </tr>
2147     </table>
2148     <table cellspacing="5" cellpadding="0" border="0">
2149     <tr>
2150     <td>
2151     &nbsp;
2152     </td>
2153     <td>
2154    
2155     <p>
2156     This function iterates over every entry in a hash table (in an unspecified order), executing the given <code>iter_func</code> on each entry.<p>
2157     <dl compact><dt><b>Parameters:</b></dt><dd>
2158     <table border="0" cellspacing="2" cellpadding="0">
2159     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
2160     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>iter_func</em>&nbsp;</td><td>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#ga3">hash_iter_t</a> for more information. </td></tr>
2161     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>extra</em>&nbsp;</td><td>A <code>void</code> pointer that will be passed to <code>iter_func</code>.</td></tr>
2162     </table>
2163     </dl>
2164     <dl compact><dt><b>Return values:</b></dt><dd>
2165     <table border="0" cellspacing="2" cellpadding="0">
2166     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An argument was invalid. </td></tr>
2167     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_FROZEN</em>&nbsp;</td><td>The hash table is frozen.</td></tr>
2168     </table>
2169     </dl>
2170    
2171     <p>
2172     Definition at line <a class="el" href="ht__iter_8c-source.html#l00034">34</a> of file <a class="el" href="ht__iter_8c-source.html">ht_iter.c</a>.
2173     <p>
2174     References <a class="el" href="dbprim_8h-source.html#l01124">HASH_FLAG_FREEZE</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="dbprim_8h-source.html#l01208">ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>, <a class="el" href="dbprim_8h-source.html#l00950">le_next</a>, <a class="el" href="dbprim_8h-source.html#l00977">le_object</a>, and <a class="el" href="dbprim_8h-source.html#l00700">ll_first</a>.
2175     <p>
2176     Referenced by <a class="el" href="st__iter_8c-source.html#l00077">st_iter()</a>. </td>
2177     </tr>
2178     </table>
2179     <a class="anchor" name="ga12"></a><!-- doxytag: member="dbprim.h::ht_move" ref="ga12" args="(hash_table_t *table, hash_entry_t *entry, db_key_t *key)" --><p>
2180     <table class="mdTable" cellpadding="2" cellspacing="0">
2181     <tr>
2182     <td class="mdRow">
2183     <table cellpadding="0" cellspacing="0" border="0">
2184     <tr>
2185     <td class="md" nowrap valign="top">unsigned long ht_move </td>
2186     <td class="md" valign="top">(&nbsp;</td>
2187     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
2188     <td class="mdname" nowrap> <em>table</em>, </td>
2189     </tr>
2190     <tr>
2191     <td class="md" nowrap align="right"></td>
2192     <td class="md"></td>
2193     <td class="md" nowrap><a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *&nbsp;</td>
2194     <td class="mdname" nowrap> <em>entry</em>, </td>
2195     </tr>
2196     <tr>
2197     <td class="md" nowrap align="right"></td>
2198     <td class="md"></td>
2199     <td class="md" nowrap><a class="el" href="struct__db__key__s.html">db_key_t</a> *&nbsp;</td>
2200     <td class="mdname" nowrap> <em>key</em></td>
2201     </tr>
2202     <tr>
2203     <td class="md"></td>
2204     <td class="md">)&nbsp;</td>
2205     <td class="md" colspan="2"></td>
2206     </tr>
2207     </table>
2208     </td>
2209     </tr>
2210     </table>
2211     <table cellspacing="5" cellpadding="0" border="0">
2212     <tr>
2213     <td>
2214     &nbsp;
2215     </td>
2216     <td>
2217    
2218     <p>
2219     This function moves an existing entry in the hash table to correspond to the new key.<p>
2220     <dl compact><dt><b>Parameters:</b></dt><dd>
2221     <table border="0" cellspacing="2" cellpadding="0">
2222     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
2223     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a> to be moved. It must already be in the hash table. </td></tr>
2224     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>key</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a> describing the new key for the entry.</td></tr>
2225     </table>
2226     </dl>
2227     <dl compact><dt><b>Return values:</b></dt><dd>
2228     <table border="0" cellspacing="2" cellpadding="0">
2229     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An invalid argument was given. </td></tr>
2230     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_UNUSED</em>&nbsp;</td><td>Entry is not in a hash table. </td></tr>
2231     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_WRONGTABLE</em>&nbsp;</td><td>Entry is not in this hash table. </td></tr>
2232     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_FROZEN</em>&nbsp;</td><td>Hash table is frozen. </td></tr>
2233     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_DUPLICATE</em>&nbsp;</td><td>New key is a duplicate of an existing key. </td></tr>
2234     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_READDFAILED</em>&nbsp;</td><td>Unable to re-add entry to table.</td></tr>
2235     </table>
2236     </dl>
2237    
2238     <p>
2239     Definition at line <a class="el" href="ht__move_8c-source.html#l00034">34</a> of file <a class="el" href="ht__move_8c-source.html">ht_move.c</a>.
2240     <p>
2241     References <a class="el" href="dbprim_8h-source.html#l01124">HASH_FLAG_FREEZE</a>, <a class="el" href="dbprim_8h-source.html#l01489">_hash_entry_s::he_elem</a>, <a class="el" href="dbprim_8h-source.html#l01491">_hash_entry_s::he_hash</a>, <a class="el" href="dbprim_8h-source.html#l01492">_hash_entry_s::he_key</a>, <a class="el" href="dbprim_8h-source.html#l01490">_hash_entry_s::he_table</a>, <a class="el" href="dbprim_8h-source.html#l01528">he_verify</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="ht__find_8c-source.html#l00034">ht_find()</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="dbprim_8h-source.html#l01080">_hash_table_s::ht_func</a>, <a class="el" href="dbprim_8h-source.html#l01074">_hash_table_s::ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>, <a class="el" href="group__dbprim__link.html#gga28a133">LINK_LOC_HEAD</a>, <a class="el" href="ll__add_8c-source.html#l00034">ll_add()</a>, and <a class="el" href="ll__remove_8c-source.html#l00034">ll_remove()</a>.
2242     <p>
2243     Here is the call graph for this function:<p><center><img src="group__dbprim__hash_ga12_cgraph.png" border="0" usemap="#group__dbprim__hash_ga12_cgraph_map" alt=""></center>
2244     <map name="group__dbprim__hash_ga12_cgraph_map">
2245     <area href="group__dbprim__hash.html#ga14" shape="rect" coords="137,6,199,30" alt="">
2246     <area href="group__dbprim__link.html#ga6" shape="rect" coords="140,54,196,78" alt="">
2247     <area href="group__dbprim__link.html#ga8" shape="rect" coords="129,102,207,126" alt="">
2248     </map>
2249     </td>
2250     </tr>
2251     </table>
2252     <a class="anchor" name="ga13"></a><!-- doxytag: member="dbprim.h::ht_remove" ref="ga13" args="(hash_table_t *table, hash_entry_t *entry)" --><p>
2253     <table class="mdTable" cellpadding="2" cellspacing="0">
2254     <tr>
2255     <td class="mdRow">
2256     <table cellpadding="0" cellspacing="0" border="0">
2257     <tr>
2258     <td class="md" nowrap valign="top">unsigned long ht_remove </td>
2259     <td class="md" valign="top">(&nbsp;</td>
2260     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
2261     <td class="mdname" nowrap> <em>table</em>, </td>
2262     </tr>
2263     <tr>
2264     <td class="md" nowrap align="right"></td>
2265     <td class="md"></td>
2266     <td class="md" nowrap><a class="el" href="struct__hash__entry__s.html">hash_entry_t</a> *&nbsp;</td>
2267     <td class="mdname" nowrap> <em>entry</em></td>
2268     </tr>
2269     <tr>
2270     <td class="md"></td>
2271     <td class="md">)&nbsp;</td>
2272     <td class="md" colspan="2"></td>
2273     </tr>
2274     </table>
2275     </td>
2276     </tr>
2277     </table>
2278     <table cellspacing="5" cellpadding="0" border="0">
2279     <tr>
2280     <td>
2281     &nbsp;
2282     </td>
2283     <td>
2284    
2285     <p>
2286     This function removes the given element from the specified hash table.<p>
2287     <dl compact><dt><b>Parameters:</b></dt><dd>
2288     <table border="0" cellspacing="2" cellpadding="0">
2289     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
2290     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>entry</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga2">hash_entry_t</a> to be removed from the table.</td></tr>
2291     </table>
2292     </dl>
2293     <dl compact><dt><b>Return values:</b></dt><dd>
2294     <table border="0" cellspacing="2" cellpadding="0">
2295     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An invalid argument was given. </td></tr>
2296     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_UNUSED</em>&nbsp;</td><td>Entry is not in a hash table. </td></tr>
2297     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_WRONGTABLE</em>&nbsp;</td><td>Entry is not in this hash table. </td></tr>
2298     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_FROZEN</em>&nbsp;</td><td>Hash table is frozen. </td></tr>
2299     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_UNRECOVERABLE</em>&nbsp;</td><td>An unrecoverable error occurred while resizing the table.</td></tr>
2300     </table>
2301     </dl>
2302    
2303     <p>
2304     Definition at line <a class="el" href="ht__remove_8c-source.html#l00034">34</a> of file <a class="el" href="ht__remove_8c-source.html">ht_remove.c</a>.
2305     <p>
2306     References <a class="el" href="dbprim_8h-source.html#l01108">HASH_FLAG_AUTOSHRINK</a>, <a class="el" href="dbprim_8h-source.html#l01124">HASH_FLAG_FREEZE</a>, <a class="el" href="dbprim_8h-source.html#l01489">_hash_entry_s::he_elem</a>, <a class="el" href="dbprim_8h-source.html#l01491">_hash_entry_s::he_hash</a>, <a class="el" href="dbprim_8h-source.html#l01490">_hash_entry_s::he_table</a>, <a class="el" href="dbprim_8h-source.html#l01528">he_verify</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="ht__resize_8c-source.html#l00038">ht_resize()</a>, <a class="el" href="dbprim_8h-source.html#l01078">_hash_table_s::ht_rollunder</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>, and <a class="el" href="ll__remove_8c-source.html#l00034">ll_remove()</a>.
2307     <p>
2308     Referenced by <a class="el" href="st__remove_8c-source.html#l00035">_st_remove()</a>, <a class="el" href="ht__flush_8c-source.html#l00036">ht_flush()</a>, and <a class="el" href="st__add_8c-source.html#l00036">st_add()</a>.
2309     <p>
2310     Here is the call graph for this function:<p><center><img src="group__dbprim__hash_ga13_cgraph.png" border="0" usemap="#group__dbprim__hash_ga13_cgraph_map" alt=""></center>
2311     <map name="group__dbprim__hash_ga13_cgraph_map">
2312     <area href="group__dbprim__hash.html#ga17" shape="rect" coords="140,100,215,124" alt="">
2313     <area href="group__dbprim__link.html#ga8" shape="rect" coords="276,149,354,173" alt="">
2314     <area href="group__dbprim__hash.html#ga20" shape="rect" coords="266,5,364,29" alt="">
2315     <area href="group__dbprim__link.html#ga6" shape="rect" coords="287,53,343,77" alt="">
2316     <area href="group__dbprim__link.html#ga5" shape="rect" coords="290,101,340,125" alt="">
2317     </map>
2318     </td>
2319     </tr>
2320     </table>
2321     <a class="anchor" name="ga17"></a><!-- doxytag: member="dbprim.h::ht_resize" ref="ga17" args="(hash_table_t *table, unsigned long new_size)" --><p>
2322     <table class="mdTable" cellpadding="2" cellspacing="0">
2323     <tr>
2324     <td class="mdRow">
2325     <table cellpadding="0" cellspacing="0" border="0">
2326     <tr>
2327     <td class="md" nowrap valign="top">unsigned long ht_resize </td>
2328     <td class="md" valign="top">(&nbsp;</td>
2329     <td class="md" nowrap valign="top"><a class="el" href="struct__hash__table__s.html">hash_table_t</a> *&nbsp;</td>
2330     <td class="mdname" nowrap> <em>table</em>, </td>
2331     </tr>
2332     <tr>
2333     <td class="md" nowrap align="right"></td>
2334     <td class="md"></td>
2335     <td class="md" nowrap>unsigned long&nbsp;</td>
2336     <td class="mdname" nowrap> <em>new_size</em></td>
2337     </tr>
2338     <tr>
2339     <td class="md"></td>
2340     <td class="md">)&nbsp;</td>
2341     <td class="md" colspan="2"></td>
2342     </tr>
2343     </table>
2344     </td>
2345     </tr>
2346     </table>
2347     <table cellspacing="5" cellpadding="0" border="0">
2348     <tr>
2349     <td>
2350     &nbsp;
2351     </td>
2352     <td>
2353    
2354     <p>
2355     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.<p>
2356     <dl compact><dt><b>Parameters:</b></dt><dd>
2357     <table border="0" cellspacing="2" cellpadding="0">
2358     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>table</em>&nbsp;</td><td>A pointer to a <a class="el" href="group__dbprim__hash.html#ga1">hash_table_t</a>. </td></tr>
2359     <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>new_size</em>&nbsp;</td><td>A new size value for the table.</td></tr>
2360     </table>
2361     </dl>
2362     <dl compact><dt><b>Return values:</b></dt><dd>
2363     <table border="0" cellspacing="2" cellpadding="0">
2364     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_BADARGS</em>&nbsp;</td><td>An argument was invalid. </td></tr>
2365     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_FROZEN</em>&nbsp;</td><td>The table is currently frozen. </td></tr>
2366     <tr><td valign="top"></td><td valign="top"><em>DB_ERR_UNRECOVERABLE</em>&nbsp;</td><td>A catastrophic error was encountered. The table is now unusable. </td></tr>
2367     <tr><td valign="top"></td><td valign="top"><em>ENOMEM</em>&nbsp;</td><td>No memory could be allocated for the new bucket table.</td></tr>
2368     </table>
2369     </dl>
2370    
2371     <p>
2372     Definition at line <a class="el" href="ht__resize_8c-source.html#l00038">38</a> of file <a class="el" href="ht__resize_8c-source.html">ht_resize.c</a>.
2373     <p>
2374     References <a class="el" href="dbprim__int_8h-source.html#l00107">_hash_fuzz</a>, <a class="el" href="__hash__prime_8c-source.html#l00781">_hash_prime()</a>, <a class="el" href="dbprim__int_8h-source.html#l00079">_hash_rollover</a>, <a class="el" href="dbprim__int_8h-source.html#l00093">_hash_rollunder</a>, <a class="el" href="dbprim_8h-source.html#l01124">HASH_FLAG_FREEZE</a>, <a class="el" href="dbprim_8h-source.html#l01491">_hash_entry_s::he_hash</a>, <a class="el" href="dbprim_8h-source.html#l01492">_hash_entry_s::he_key</a>, <a class="el" href="dbprim_8h-source.html#l01076">_hash_table_s::ht_count</a>, <a class="el" href="dbprim_8h-source.html#l01073">_hash_table_s::ht_flags</a>, <a class="el" href="dbprim_8h-source.html#l01080">_hash_table_s::ht_func</a>, <a class="el" href="dbprim_8h-source.html#l01208">ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01074">_hash_table_s::ht_modulus</a>, <a class="el" href="dbprim_8h-source.html#l01082">_hash_table_s::ht_resize</a>, <a class="el" href="dbprim_8h-source.html#l01077">_hash_table_s::ht_rollover</a>, <a class="el" href="dbprim_8h-source.html#l01078">_hash_table_s::ht_rollunder</a>, <a class="el" href="dbprim_8h-source.html#l01079">_hash_table_s::ht_table</a>, <a class="el" href="dbprim_8h-source.html#l01162">ht_verify</a>, <a class="el" href="dbprim_8h-source.html#l00977">le_object</a>, <a class="el" href="group__dbprim__link.html#gga28a133">LINK_LOC_HEAD</a>, <a class="el" href="ll__add_8c-source.html#l00034">ll_add()</a>, <a class="el" href="dbprim_8h-source.html#l00700">ll_first</a>, <a class="el" href="ll__init_8c-source.html#l00034">ll_init()</a>, and <a class="el" href="ll__remove_8c-source.html#l00034">ll_remove()</a>.
2375     <p>
2376     Referenced by <a class="el" href="ht__add_8c-source.html#l00034">ht_add()</a>, <a class="el" href="ht__remove_8c-source.html#l00034">ht_remove()</a>, and <a class="el" href="st__resize_8c-source.html#l00034">st_resize()</a>.
2377     <p>
2378     Here is the call graph for this function:<p><center><img src="group__dbprim__hash_ga17_cgraph.png" border="0" usemap="#group__dbprim__hash_ga17_cgraph_map" alt=""></center>
2379     <map name="group__dbprim__hash_ga17_cgraph_map">
2380     <area href="group__dbprim__hash.html#ga20" shape="rect" coords="132,6,231,30" alt="">
2381     <area href="group__dbprim__link.html#ga6" shape="rect" coords="153,54,209,78" alt="">
2382     <area href="group__dbprim__link.html#ga5" shape="rect" coords="156,102,207,126" alt="">
2383     <area href="group__dbprim__link.html#ga8" shape="rect" coords="143,150,220,174" alt="">
2384     </map>
2385     </td>
2386     </tr>
2387     </table>
2388     <hr><h2>Variable Documentation</h2>
2389     <a class="anchor" name="ga0"></a><!-- doxytag: member="_hash_prime.c::primes" ref="ga0" args="[]" --><p>
2390     <table class="mdTable" cellpadding="2" cellspacing="0">
2391     <tr>
2392     <td class="mdRow">
2393     <table cellpadding="0" cellspacing="0" border="0">
2394     <tr>
2395     <td class="md" nowrap valign="top">unsigned long <a class="el" href="group__dbprim__hash.html#ga0">primes</a>[]<code> [static]</code> </td>
2396     </tr>
2397     </table>
2398     </td>
2399     </tr>
2400     </table>
2401     <table cellspacing="5" cellpadding="0" border="0">
2402     <tr>
2403     <td>
2404     &nbsp;
2405     </td>
2406     <td>
2407    
2408     <p>
2409     <p><b>For internal use only.</b></p>
2410     <p>
2411     This variable contains a table of 16-bit prime numbers, used by <a class="el" href="group__dbprim__hash.html#ga20">_hash_prime()</a> to test the primality of potential primes.</p>
2412    
2413     <p>
2414     Definition at line <a class="el" href="__hash__prime_8c-source.html#l00050">50</a> of file <a class="el" href="__hash__prime_8c-source.html">_hash_prime.c</a>.
2415     <p>
2416     Referenced by <a class="el" href="__hash__prime_8c-source.html#l00781">_hash_prime()</a>. </td>
2417     </tr>
2418     </table>
2419     <hr size="1"><address style="align: right;"><small>Generated on Sat Jul 15 14:10:58 2006 for DatabasePrimitivesLibrary by&nbsp;
2420     <a href="http://www.doxygen.org/index.html">
2421     <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
2422     </body>
2423     </html>