Add to git.
[c2lib.git] / doc / hash_exists.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>hash_get</title>
6 </head>
7 <body>
8
9 <h1 align=center>hash_get</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16
17 <hr>
18 <!-- Creator     : groff version 1.17.2 -->
19 <!-- CreationDate: Fri May  3 14:56:48 2002 -->
20 <a name="NAME"></a>
21 <h2>NAME</h2>
22 <table width="100%" border=0 rules="none" frame="void"
23        cols="2" cellspacing="0" cellpadding="0">
24 <tr valign="top" align="left">
25 <td width="10%"></td><td width="90%">
26 hash_get, _hash_get, hash_get_ptr, _hash_get_ptr, hash_exists - look up in a hash</td></table>
27 <a name="SYNOPSIS"></a>
28 <h2>SYNOPSIS</h2>
29
30 <table width="100%" border=0 rules="none" frame="void"
31        cols="2" cellspacing="0" cellpadding="0">
32 <tr valign="top" align="left">
33 <td width="10%"></td><td width="90%">
34 <pre><b>#include &lt;hash.h&gt;
35
36 #define hash_get(h,key,value) _hash_get ((h), &amp;(key), &amp;(value))
37 int _hash_get (hash, const void *key, void *value);
38 #define hash_get_ptr(h,key,ptr) _hash_get_ptr ((h), &amp;(key), &amp;(ptr))
39 int _hash_get_ptr (hash, const void *key, void **ptr);
40 #define hash_exists(h,key) _hash_get_ptr ((h), &amp;(key), 0)
41 </b></pre></td></table>
42 <a name="DESCRIPTION"></a>
43 <h2>DESCRIPTION</h2>
44
45 <table width="100%" border=0 rules="none" frame="void"
46        cols="2" cellspacing="0" cellpadding="0">
47 <tr valign="top" align="left">
48 <td width="10%"></td><td width="90%">
49 Get the <b>value</b> associated with key <b>key</b> and
50 return true. If there is no <b>value</b> associated with
51 <b>key</b>, this returns false and <b>value</b> is left
52 unchanged.</td></table>
53
54 <table width="100%" border=0 rules="none" frame="void"
55        cols="2" cellspacing="0" cellpadding="0">
56 <tr valign="top" align="left">
57 <td width="10%"></td><td width="90%">
58 The <b>*_ptr</b> variants return a pointer rather than
59 copying out the entire value object. The pointer is
60 typically only valid for a short period of time.
61 Particularly if you insert or remove elements from the hash,
62 this pointer may become invalid.</td></table>
63
64 <table width="100%" border=0 rules="none" frame="void"
65        cols="2" cellspacing="0" cellpadding="0">
66 <tr valign="top" align="left">
67 <td width="10%"></td><td width="90%">
68 <b>hash_exists</b> simply tests whether or not <b>key</b>
69 exists in the hash. If so, it returns true, otherwise
70 false.</td></table>
71 <a name="AUTHOR"></a>
72 <h2>AUTHOR</h2>
73
74 <table width="100%" border=0 rules="none" frame="void"
75        cols="2" cellspacing="0" cellpadding="0">
76 <tr valign="top" align="left">
77 <td width="10%"></td><td width="90%">
78 Richard Jones &lt;rich@annexia.org&gt;</td></table>
79 <a name="LICENSE"></a>
80 <h2>LICENSE</h2>
81
82 <table width="100%" border=0 rules="none" frame="void"
83        cols="2" cellspacing="0" cellpadding="0">
84 <tr valign="top" align="left">
85 <td width="10%"></td><td width="90%">
86 GNU LGPL (see http://www.gnu.org/)</td></table>
87 <a name="VERSION"></a>
88 <h2>VERSION</h2>
89
90 <table width="100%" border=0 rules="none" frame="void"
91        cols="2" cellspacing="0" cellpadding="0">
92 <tr valign="top" align="left">
93 <td width="10%"></td><td width="90%">
94 c2lib-1.2.13</td></table>
95 <hr>
96 </body>
97 </html>