Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0b420d0fce195cf4115dc6a3be5c2da2 > files > 244

sphinxbase-devel-0.7-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>SphinxBase: include/sphinxbase/hash_table.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SphinxBase&#160;<span id="projectnumber">0.6</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('hash__table_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>include/sphinxbase/hash_table.h</h1>  </div>
</div>
<div class="contents">
<a href="hash__table_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */</span>
<a name="l00002"></a>00002 <span class="comment">/* ====================================================================</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights</span>
<a name="l00004"></a>00004 <span class="comment"> * reserved.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00007"></a>00007 <span class="comment"> * modification, are permitted provided that the following conditions</span>
<a name="l00008"></a>00008 <span class="comment"> * are met:</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
<a name="l00011"></a>00011 <span class="comment"> *    notice, this list of conditions and the following disclaimer. </span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
<a name="l00014"></a>00014 <span class="comment"> *    notice, this list of conditions and the following disclaimer in</span>
<a name="l00015"></a>00015 <span class="comment"> *    the documentation and/or other materials provided with the</span>
<a name="l00016"></a>00016 <span class="comment"> *    distribution.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * This work was supported in part by funding from the Defense Advanced </span>
<a name="l00019"></a>00019 <span class="comment"> * Research Projects Agency and the National Science Foundation of the </span>
<a name="l00020"></a>00020 <span class="comment"> * United States of America, and the CMU Sphinx Speech Consortium.</span>
<a name="l00021"></a>00021 <span class="comment"> *</span>
<a name="l00022"></a>00022 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS&#39;&#39; AND </span>
<a name="l00023"></a>00023 <span class="comment"> * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, </span>
<a name="l00024"></a>00024 <span class="comment"> * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</span>
<a name="l00025"></a>00025 <span class="comment"> * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY</span>
<a name="l00026"></a>00026 <span class="comment"> * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span>
<a name="l00027"></a>00027 <span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT </span>
<a name="l00028"></a>00028 <span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, </span>
<a name="l00029"></a>00029 <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY </span>
<a name="l00030"></a>00030 <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT </span>
<a name="l00031"></a>00031 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE </span>
<a name="l00032"></a>00032 <span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00033"></a>00033 <span class="comment"> *</span>
<a name="l00034"></a>00034 <span class="comment"> * ====================================================================</span>
<a name="l00035"></a>00035 <span class="comment"> *</span>
<a name="l00036"></a>00036 <span class="comment"> */</span>
<a name="l00037"></a>00037 <span class="comment">/*</span>
<a name="l00038"></a>00038 <span class="comment"> * hash.h -- Hash table module.</span>
<a name="l00039"></a>00039 <span class="comment"> *</span>
<a name="l00040"></a>00040 <span class="comment"> * **********************************************</span>
<a name="l00041"></a>00041 <span class="comment"> * CMU ARPA Speech Project</span>
<a name="l00042"></a>00042 <span class="comment"> *</span>
<a name="l00043"></a>00043 <span class="comment"> * Copyright (c) 1999 Carnegie Mellon University.</span>
<a name="l00044"></a>00044 <span class="comment"> * ALL RIGHTS RESERVED.</span>
<a name="l00045"></a>00045 <span class="comment"> * **********************************************</span>
<a name="l00046"></a>00046 <span class="comment"> * </span>
<a name="l00047"></a>00047 <span class="comment"> * HISTORY</span>
<a name="l00048"></a>00048 <span class="comment"> * $Log: hash.h,v $</span>
<a name="l00049"></a>00049 <span class="comment"> * Revision 1.7  2005/06/22 03:04:01  arthchan2003</span>
<a name="l00050"></a>00050 <span class="comment"> * 1, Implemented hash_delete and hash_display, 2, Fixed doxygen documentation, 3, Added  keyword.</span>
<a name="l00051"></a>00051 <span class="comment"> *</span>
<a name="l00052"></a>00052 <span class="comment"> * Revision 1.8  2005/05/24 01:10:54  archan</span>
<a name="l00053"></a>00053 <span class="comment"> * Fix a bug when the value only appear in the hash but there is no chain.   Also make sure that prev was initialized to NULL. All success cases were tested, but not tested with the deletion is tested.</span>
<a name="l00054"></a>00054 <span class="comment"> *</span>
<a name="l00055"></a>00055 <span class="comment"> * Revision 1.7  2005/05/24 00:12:31  archan</span>
<a name="l00056"></a>00056 <span class="comment"> * Also add function prototype for hash_display in hash.h</span>
<a name="l00057"></a>00057 <span class="comment"> *</span>
<a name="l00058"></a>00058 <span class="comment"> * Revision 1.4  2005/05/03 04:09:11  archan</span>
<a name="l00059"></a>00059 <span class="comment"> * Implemented the heart of word copy search. For every ci-phone, every word end, a tree will be allocated to preserve its pathscore.  This is different from 3.5 or below, only the best score for a particular ci-phone, regardless of the word-ends will be preserved at every frame.  The graph propagation will not collect unused word tree at this point. srch_WST_propagate_wd_lv2 is also as the most stupid in the century.  But well, after all, everything needs a start.  I will then really get the results from the search and see how it looks.</span>
<a name="l00060"></a>00060 <span class="comment"> *</span>
<a name="l00061"></a>00061 <span class="comment"> * Revision 1.3  2005/03/30 01:22:48  archan</span>
<a name="l00062"></a>00062 <span class="comment"> * Fixed mistakes in last updates. Add</span>
<a name="l00063"></a>00063 <span class="comment"> *</span>
<a name="l00064"></a>00064 <span class="comment"> * </span>
<a name="l00065"></a>00065 <span class="comment"> * 05-May-1999  M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon</span>
<a name="l00066"></a>00066 <span class="comment"> *              Removed hash_key2hash().  Added hash_enter_bkey() and hash_lookup_bkey(),</span>
<a name="l00067"></a>00067 <span class="comment"> *              and len attribute to hash_entry_t.</span>
<a name="l00068"></a>00068 <span class="comment"> * </span>
<a name="l00069"></a>00069 <span class="comment"> * 30-Apr-1999  M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon</span>
<a name="l00070"></a>00070 <span class="comment"> *              Added hash_key2hash().</span>
<a name="l00071"></a>00071 <span class="comment"> * </span>
<a name="l00072"></a>00072 <span class="comment"> * 18-Jun-97    M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon</span>
<a name="l00073"></a>00073 <span class="comment"> *              Included case sensitive/insensitive option.</span>
<a name="l00074"></a>00074 <span class="comment"> * </span>
<a name="l00075"></a>00075 <span class="comment"> * 08-31-95     M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon</span>
<a name="l00076"></a>00076 <span class="comment"> *              Created.</span>
<a name="l00077"></a>00077 <span class="comment"> */</span>
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 
<a name="l00124"></a>00124 <span class="preprocessor">#ifndef _LIBUTIL_HASH_H_</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define _LIBUTIL_HASH_H_</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span>
<a name="l00127"></a>00127 <span class="comment">/* Win32/WinCE DLL gunk */</span>
<a name="l00128"></a>00128 <span class="preprocessor">#include &lt;sphinxbase/sphinxbase_export.h&gt;</span>
<a name="l00129"></a>00129 <span class="preprocessor">#include &lt;sphinxbase/prim_type.h&gt;</span>
<a name="l00130"></a>00130 <span class="preprocessor">#include &lt;sphinxbase/glist.h&gt;</span>
<a name="l00131"></a>00131 
<a name="l00132"></a>00132 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00134"></a>00134 <span class="preprocessor">#endif</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="preprocessor">#if 0</span>
<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="comment">/* Fool Emacs. */</span>
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138 <span class="preprocessor">#endif</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span>
<a name="l00149"></a><a class="code" href="structhash__entry__s.html">00149</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structhash__entry__s.html" title="A note by ARCHAN at 20050510: Technically what we use is so-called &amp;quot;hash table with buckets&amp;quot...">hash_entry_s</a> {
<a name="l00150"></a>00150         <span class="keyword">const</span> <span class="keywordtype">char</span> *key;                
<a name="l00153"></a><a class="code" href="structhash__entry__s.html#af1ec5f16059ced6d9a8ae4d36ca7e2b3">00153</a>         <span class="keywordtype">size_t</span> <a class="code" href="structhash__entry__s.html#af1ec5f16059ced6d9a8ae4d36ca7e2b3" title="Key string, NULL if this is an empty slot.">len</a>;                     
<a name="l00155"></a><a class="code" href="structhash__entry__s.html#a0d57012963084fed93886681108aa636">00155</a>         <span class="keywordtype">void</span> *<a class="code" href="structhash__entry__s.html#a0d57012963084fed93886681108aa636" title="Key-length; the key string does not have to be a C-style NULL terminated string; it can have arbitrar...">val</a>;                      
<a name="l00156"></a><a class="code" href="structhash__entry__s.html#aa855ac854b9c36cf23f60d9ac8093e7f">00156</a>         <span class="keyword">struct </span><a class="code" href="structhash__entry__s.html" title="A note by ARCHAN at 20050510: Technically what we use is so-called &amp;quot;hash table with buckets&amp;quot...">hash_entry_s</a> *<a class="code" href="structhash__entry__s.html#aa855ac854b9c36cf23f60d9ac8093e7f" title="Value associated with above key.">next</a>;      
<a name="l00157"></a>00157 } <a class="code" href="hash__table_8h.html#af70e2b25a853da786ffd99731a5fac5a" title="A note by ARCHAN at 20050510: Technically what we use is so-called &amp;quot;hash table with buckets&amp;quot...">hash_entry_t</a>;
<a name="l00158"></a>00158 
<a name="l00159"></a><a class="code" href="structhash__table__t.html">00159</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00160"></a>00160         <a class="code" href="structhash__entry__s.html" title="A note by ARCHAN at 20050510: Technically what we use is so-called &amp;quot;hash table with buckets&amp;quot...">hash_entry_t</a> *table;    
<a name="l00161"></a><a class="code" href="structhash__table__t.html#a34cc067a2c4f517ce8b8921965d0f8dd">00161</a>         int32 <a class="code" href="structhash__table__t.html#a34cc067a2c4f517ce8b8921965d0f8dd" title="Primary hash table, excluding entries that collide.">size</a>;             
<a name="l00164"></a><a class="code" href="structhash__table__t.html#a8c691525a04e01751972d608948c8ac0">00164</a>         int32 <a class="code" href="structhash__table__t.html#a8c691525a04e01751972d608948c8ac0" title="Primary hash table size, (is a prime#); NOTE: This is the number of primary entries ALLOCATED...">inuse</a>;            
<a name="l00165"></a><a class="code" href="structhash__table__t.html#a09ea72a33026b9a77f76811062a4d692">00165</a>         int32 <a class="code" href="structhash__table__t.html#a09ea72a33026b9a77f76811062a4d692" title="Number of valid entries in the table.">nocase</a>;           
<a name="l00166"></a>00166 } <a class="code" href="structhash__table__t.html">hash_table_t</a>;
<a name="l00167"></a>00167 
<a name="l00168"></a><a class="code" href="structhash__iter__s.html">00168</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structhash__iter__s.html">hash_iter_s</a> {
<a name="l00169"></a><a class="code" href="structhash__iter__s.html#a02844d3426aaa62e41086c98a052ed7d">00169</a>         <a class="code" href="structhash__table__t.html">hash_table_t</a> *<a class="code" href="structhash__iter__s.html#a02844d3426aaa62e41086c98a052ed7d" title="Hash table we are iterating over.">ht</a>;  
<a name="l00170"></a><a class="code" href="structhash__iter__s.html#a8aa7d6656a165e2e74c42ae4c48ed78f">00170</a>         <a class="code" href="structhash__entry__s.html" title="A note by ARCHAN at 20050510: Technically what we use is so-called &amp;quot;hash table with buckets&amp;quot...">hash_entry_t</a> *<a class="code" href="structhash__iter__s.html#a8aa7d6656a165e2e74c42ae4c48ed78f" title="Current entry in that table.">ent</a>; 
<a name="l00171"></a><a class="code" href="structhash__iter__s.html#a9cb2842206d721ef3ef9b15c133ba3c9">00171</a>         <span class="keywordtype">size_t</span> <a class="code" href="structhash__iter__s.html#a9cb2842206d721ef3ef9b15c133ba3c9" title="Index of next bucket to search.">idx</a>;        
<a name="l00172"></a>00172 } <a class="code" href="structhash__iter__s.html">hash_iter_t</a>;
<a name="l00173"></a>00173 
<a name="l00175"></a><a class="code" href="hash__table_8h.html#ac98525ff8ec582358783aecbd388842d">00175</a> <span class="preprocessor">#define hash_entry_val(e)       ((e)-&gt;val)</span>
<a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">#define hash_entry_key(e)       ((e)-&gt;key)</span>
<a name="l00177"></a>00177 <span class="preprocessor"></span><span class="preprocessor">#define hash_entry_len(e)       ((e)-&gt;len)</span>
<a name="l00178"></a>00178 <span class="preprocessor"></span><span class="preprocessor">#define hash_table_inuse(h)     ((h)-&gt;inuse)</span>
<a name="l00179"></a>00179 <span class="preprocessor"></span><span class="preprocessor">#define hash_table_size(h)      ((h)-&gt;size)</span>
<a name="l00180"></a>00180 <span class="preprocessor"></span>
<a name="l00181"></a>00181 
<a name="l00190"></a>00190 SPHINXBASE_EXPORT
<a name="l00191"></a>00191 <a class="code" href="structhash__table__t.html">hash_table_t</a> * <a class="code" href="hash__table_8h.html#a56d93e8c03e066b77377ac6eab50cfae" title="Allocate a new hash table for a given expected size.">hash_table_new</a>(int32 size,       
<a name="l00192"></a>00192                               int32 casearg     
<a name="l00195"></a>00195     );
<a name="l00196"></a>00196 
<a name="l00197"></a>00197 <span class="preprocessor">#define HASH_CASE_YES           0</span>
<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#define HASH_CASE_NO            1</span>
<a name="l00199"></a>00199 <span class="preprocessor"></span>
<a name="l00204"></a>00204 SPHINXBASE_EXPORT
<a name="l00205"></a>00205 <span class="keywordtype">void</span> <a class="code" href="hash__table_8h.html#a0a588c22946f8cc16328973035ed19e3" title="Free the specified hash table; the caller is responsible for freeing the key strings pointed to by th...">hash_table_free</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h 
<a name="l00206"></a>00206     );
<a name="l00207"></a>00207 
<a name="l00208"></a>00208 
<a name="l00215"></a>00215 SPHINXBASE_EXPORT
<a name="l00216"></a>00216 <span class="keywordtype">void</span> *<a class="code" href="hash__table_8h.html#aebfe63c3869c271b125a8413ee384412" title="Try to add a new entry with given key and associated value to hash table h.">hash_table_enter</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h, 
<a name="l00217"></a>00217                        <span class="keyword">const</span> <span class="keywordtype">char</span> *key, 
<a name="l00219"></a>00219                        <span class="keywordtype">void</span> *val          
<a name="l00220"></a>00220     );
<a name="l00221"></a>00221 
<a name="l00228"></a><a class="code" href="hash__table_8h.html#a393c56322e54607a48e6bc61169d92bf">00228</a> <span class="preprocessor">#define hash_table_enter_int32(h,k,v) \</span>
<a name="l00229"></a>00229 <span class="preprocessor">    ((int32)(long)hash_table_enter((h),(k),(void *)(long)(v)))</span>
<a name="l00230"></a>00230 <span class="preprocessor"></span>
<a name="l00244"></a>00244 SPHINXBASE_EXPORT
<a name="l00245"></a>00245 <span class="keywordtype">void</span> *<a class="code" href="hash__table_8h.html#ae61b28ea189a98ef8f2a3c5521482968" title="Add a new entry with given key and value to hash table h.">hash_table_replace</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h, 
<a name="l00246"></a>00246                          <span class="keyword">const</span> <span class="keywordtype">char</span> *key, 
<a name="l00248"></a>00248                          <span class="keywordtype">void</span> *val        
<a name="l00249"></a>00249     );
<a name="l00250"></a>00250 
<a name="l00257"></a><a class="code" href="hash__table_8h.html#a4286033aa772a9d1f3aa219469324f5b">00257</a> <span class="preprocessor">#define hash_table_replace_int32(h,k,v) \</span>
<a name="l00258"></a>00258 <span class="preprocessor">    ((int32)(long)hash_table_replace((h),(k),(void *)(long)(v)))</span>
<a name="l00259"></a>00259 <span class="preprocessor"></span>
<a name="l00265"></a>00265 SPHINXBASE_EXPORT
<a name="l00266"></a>00266 <span class="keywordtype">void</span> *<a class="code" href="hash__table_8h.html#af1d87b1b825c302473f2d7c5a3b88475" title="Delete an entry with given key and associated value to hash table h.">hash_table_delete</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,    
<a name="l00268"></a>00268                         <span class="keyword">const</span> <span class="keywordtype">char</span> *key     
<a name="l00270"></a>00270         );
<a name="l00271"></a>00271 
<a name="l00279"></a>00279 SPHINXBASE_EXPORT
<a name="l00280"></a>00280 <span class="keywordtype">void</span> *<a class="code" href="hash__table_8h.html#aa2ab1f5eb2f1b4689645d1e1c19dc887" title="Like hash_table_delete, but with an explicitly specified key length, instead of a NULL-terminated...">hash_table_delete_bkey</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,    
<a name="l00282"></a>00282                              <span class="keyword">const</span> <span class="keywordtype">char</span> *key,     
<a name="l00284"></a>00284                              <span class="keywordtype">size_t</span> len
<a name="l00285"></a>00285         );
<a name="l00286"></a>00286 
<a name="l00290"></a>00290 SPHINXBASE_EXPORT
<a name="l00291"></a>00291 <span class="keywordtype">void</span> <a class="code" href="hash__table_8h.html#acab374d21e25009d397642e3465308c7" title="Delete all entries from a hash_table.">hash_table_empty</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h    
<a name="l00292"></a>00292     );
<a name="l00293"></a>00293 
<a name="l00301"></a>00301 SPHINXBASE_EXPORT
<a name="l00302"></a>00302 <span class="keywordtype">void</span> *<a class="code" href="hash__table_8h.html#a6f5752fadefe2662adb2c141f1511062" title="Like hash_table_enter, but with an explicitly specified key length, instead of a NULL-terminated, C-style key string.">hash_table_enter_bkey</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,    
<a name="l00304"></a>00304                               <span class="keyword">const</span> <span class="keywordtype">char</span> *key,  
<a name="l00305"></a>00305                               <span class="keywordtype">size_t</span> len,       
<a name="l00306"></a>00306                               <span class="keywordtype">void</span> *val         
<a name="l00307"></a>00307         );
<a name="l00308"></a>00308 
<a name="l00315"></a><a class="code" href="hash__table_8h.html#ada31c1e0bcf359a7ca934748f4680333">00315</a> <span class="preprocessor">#define hash_table_enter_bkey_int32(h,k,l,v) \</span>
<a name="l00316"></a>00316 <span class="preprocessor">    ((int32)(long)hash_table_enter_bkey((h),(k),(l),(void *)(long)(v)))</span>
<a name="l00317"></a>00317 <span class="preprocessor"></span>
<a name="l00325"></a>00325 SPHINXBASE_EXPORT
<a name="l00326"></a>00326 <span class="keywordtype">void</span> *<a class="code" href="hash__table_8h.html#a273237d63833e5625c830f421d9463de" title="Like hash_table_replace, but with an explicitly specified key length, instead of a NULL-terminated...">hash_table_replace_bkey</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h, 
<a name="l00327"></a>00327                               <span class="keyword">const</span> <span class="keywordtype">char</span> *key, 
<a name="l00328"></a>00328                               <span class="keywordtype">size_t</span> len,       
<a name="l00329"></a>00329                               <span class="keywordtype">void</span> *val   
<a name="l00330"></a>00330     );
<a name="l00331"></a>00331 
<a name="l00338"></a><a class="code" href="hash__table_8h.html#ace238b264acacb8e6cb0de14f1035f53">00338</a> <span class="preprocessor">#define hash_table_replace_bkey_int32(h,k,l,v)                          \</span>
<a name="l00339"></a>00339 <span class="preprocessor">    ((int32)(long)hash_table_replace_bkey((h),(k),(l),(void *)(long)(v)))</span>
<a name="l00340"></a>00340 <span class="preprocessor"></span>
<a name="l00346"></a>00346 SPHINXBASE_EXPORT
<a name="l00347"></a>00347 int32 <a class="code" href="hash__table_8h.html#a9a1e5ed410eb96f514b00fdce770fbd7" title="Look up a key in a hash table and optionally return the associated value.">hash_table_lookup</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,        
<a name="l00348"></a>00348                         <span class="keyword">const</span> <span class="keywordtype">char</span> *key,        
<a name="l00349"></a>00349                         <span class="keywordtype">void</span> **val              
<a name="l00351"></a>00351         );
<a name="l00352"></a>00352 
<a name="l00359"></a>00359 SPHINXBASE_EXPORT
<a name="l00360"></a>00360 int32 <a class="code" href="hash__table_8h.html#acaf27e8e7e336faf6653649937c42ed8" title="Look up a 32-bit integer value in a hash table.">hash_table_lookup_int32</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,  
<a name="l00361"></a>00361                               <span class="keyword">const</span> <span class="keywordtype">char</span> *key,  
<a name="l00362"></a>00362                               int32 *val        
<a name="l00364"></a>00364         );
<a name="l00365"></a>00365 
<a name="l00372"></a>00372 SPHINXBASE_EXPORT
<a name="l00373"></a>00373 int32 <a class="code" href="hash__table_8h.html#a91f5b3924c0e3a50f94c86bb5fd078e8" title="Like hash_lookup, but with an explicitly specified key length, instead of a NULL-terminated, C-style key string.">hash_table_lookup_bkey</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,   
<a name="l00374"></a>00374                              <span class="keyword">const</span> <span class="keywordtype">char</span> *key,   
<a name="l00375"></a>00375                              <span class="keywordtype">size_t</span> len,        
<a name="l00376"></a>00376                              <span class="keywordtype">void</span> **val         
<a name="l00378"></a>00378         );
<a name="l00379"></a>00379 
<a name="l00386"></a>00386 SPHINXBASE_EXPORT
<a name="l00387"></a>00387 int32 <a class="code" href="hash__table_8h.html#acc530eda0b105745cf3a47cc3c1148e4" title="Look up a 32-bit integer value in a hash table.">hash_table_lookup_bkey_int32</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,
<a name="l00388"></a>00388                                    <span class="keyword">const</span> <span class="keywordtype">char</span> *key,
<a name="l00389"></a>00389                                    <span class="keywordtype">size_t</span> len,  
<a name="l00390"></a>00390                                    int32 *val   
<a name="l00392"></a>00392         );
<a name="l00393"></a>00393 
<a name="l00397"></a>00397 SPHINXBASE_EXPORT
<a name="l00398"></a>00398 <a class="code" href="structhash__iter__s.html">hash_iter_t</a> *<a class="code" href="hash__table_8h.html#aae6e6373d3c371d57861a9a875edb207" title="Start iterating over key-value pairs in a hash table.">hash_table_iter</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h);
<a name="l00399"></a>00399 
<a name="l00408"></a>00408 SPHINXBASE_EXPORT
<a name="l00409"></a>00409 <a class="code" href="structhash__iter__s.html">hash_iter_t</a> *<a class="code" href="hash__table_8h.html#ad023321efab26a30bd6d855fbdbe08a3" title="Get the next key-value pair in iteration.">hash_table_iter_next</a>(<a class="code" href="structhash__iter__s.html">hash_iter_t</a> *itor);
<a name="l00410"></a>00410 
<a name="l00414"></a>00414 SPHINXBASE_EXPORT
<a name="l00415"></a>00415 <span class="keywordtype">void</span> <a class="code" href="hash__table_8h.html#a7aa43b228d7dc24f5221d281debeb025" title="Delete an unfinished iterator.">hash_table_iter_free</a>(<a class="code" href="structhash__iter__s.html">hash_iter_t</a> *itor);
<a name="l00416"></a>00416 
<a name="l00420"></a>00420 SPHINXBASE_EXPORT
<a name="l00421"></a>00421 <a class="code" href="structgnode__s.html" title="A node in a generic list.">glist_t</a> <a class="code" href="hash__table_8h.html#a61f59389f05d8871003da4692a9c2acc" title="Build a glist of valid hash_entry_t pointers from the given hash table.">hash_table_tolist</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h,      
<a name="l00422"></a>00422                           int32 *count          
<a name="l00425"></a>00425         );
<a name="l00426"></a>00426 
<a name="l00432"></a>00432 SPHINXBASE_EXPORT
<a name="l00433"></a>00433 <span class="keywordtype">void</span>  <a class="code" href="hash__table_8h.html#a2721f6b601c80ceeeae570589fd12e38" title="Display a hash-with-chaining representation on the screen.">hash_table_display</a>(<a class="code" href="structhash__table__t.html">hash_table_t</a> *h, 
<a name="l00434"></a>00434                          int32 showkey    
<a name="l00437"></a>00437         );
<a name="l00438"></a>00438 
<a name="l00439"></a>00439 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00440"></a>00440 <span class="preprocessor"></span>}
<a name="l00441"></a>00441 <span class="preprocessor">#endif</span>
<a name="l00442"></a>00442 <span class="preprocessor"></span>
<a name="l00443"></a>00443 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="hash__table_8h.html">hash_table.h</a>      </li>
      <li class="footer">Generated on Tue Apr 19 2011 for SphinxBase by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>