~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/docs/api_c/set_func_dirfree.html

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--$Id: set_func_dirfree.so,v 10.9 2001/05/01 14:23:13 bostic Exp $-->
 
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
3
<!--All rights reserved.-->
 
4
<html>
 
5
<head>
 
6
<title>Berkeley DB: db_env_set_func_dirfree</title>
 
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
 
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
 
9
</head>
 
10
<body bgcolor=white>
 
11
<a name="2"><!--meow--></a>
 
12
<table width="100%"><tr valign=top>
 
13
<td>
 
14
<h1>db_env_set_func_dirfree</h1>
 
15
</td>
 
16
<td align=right>
 
17
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
18
</td></tr></table>
 
19
<hr size=1 noshade>
 
20
<tt>
 
21
<h3><pre>
 
22
#include &lt;db.h&gt;
 
23
<p>
 
24
int
 
25
db_env_set_func_dirfree(void (*func_dirfree)(char **namesp, int cnt));
 
26
</pre></h3>
 
27
<h1>Description</h1>
 
28
<p>The Berkeley DB library requires the ability to return any memory allocated as part
 
29
of the routine which reads through a directory and creates a list of files
 
30
that the directory contains (see <a href="../api_c/set_func_dirlist.html">db_env_set_func_dirlist</a>).
 
31
The <b>func_dirfree</b> argument must conform to the following interface:
 
32
<p><blockquote><pre>int dirfree(char **namesp, int cnt);</pre></blockquote>
 
33
<p>The <b>namesp</b> and <b>cnt</b> arguments are the same values as were
 
34
returned by the <a href="../api_c/set_func_dirlist.html">db_env_set_func_dirlist</a> function.
 
35
<p>The <b>func_dirfree</b> function must return the value of <b>errno</b> on
 
36
failure and 0 on success.
 
37
<p>The db_env_set_func_dirfree interface affects the entire application, not a single
 
38
database or database environment.
 
39
<p>Although the db_env_set_func_dirfree interface may be used to configure Berkeley DB at any time
 
40
during the life of the application, it should normally be called before
 
41
making any calls to the <a href="../api_c/env_create.html">db_env_create</a> or <a href="../api_c/db_create.html">db_create</a> functions.
 
42
<p>The db_env_set_func_dirfree function returns a non-zero error value on failure and 0 on success.
 
43
<h1>Errors</h1>
 
44
<p>The db_env_set_func_dirfree function may fail and return a non-zero error for the following conditions:
 
45
<p><dl compact>
 
46
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
 
47
</dl>
 
48
<p>The db_env_set_func_dirfree function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.
 
49
If a catastrophic error has occurred, the db_env_set_func_dirfree function may fail and return
 
50
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
 
51
in the same way.
 
52
<h1>See Also</h1>
 
53
<a href="../api_c/set_func_close.html">db_env_set_func_close</a>,
 
54
<a href="../api_c/set_func_dirfree.html">db_env_set_func_dirfree</a>,
 
55
<a href="../api_c/set_func_dirlist.html">db_env_set_func_dirlist</a>,
 
56
<a href="../api_c/set_func_exists.html">db_env_set_func_exists</a>,
 
57
<a href="../api_c/set_func_free.html">db_env_set_func_free</a>,
 
58
<a href="../api_c/set_func_fsync.html">db_env_set_func_fsync</a>,
 
59
<a href="../api_c/set_func_ioinfo.html">db_env_set_func_ioinfo</a>,
 
60
<a href="../api_c/set_func_malloc.html">db_env_set_func_malloc</a>,
 
61
<a href="../api_c/set_func_map.html">db_env_set_func_map</a>,
 
62
<a href="../api_c/set_func_open.html">db_env_set_func_open</a>,
 
63
<a href="../api_c/set_func_read.html">db_env_set_func_read</a>,
 
64
<a href="../api_c/set_func_realloc.html">db_env_set_func_realloc</a>,
 
65
<a href="../api_c/set_func_seek.html">db_env_set_func_seek</a>,
 
66
<a href="../api_c/set_func_sleep.html">db_env_set_func_sleep</a>,
 
67
<a href="../api_c/set_func_unlink.html">db_env_set_func_unlink</a>,
 
68
<a href="../api_c/set_func_unmap.html">db_env_set_func_unmap</a>,
 
69
<a href="../api_c/set_func_write.html">db_env_set_func_write</a>,
 
70
and
 
71
<a href="../api_c/set_func_yield.html">db_env_set_func_yield</a>.
 
72
</tt>
 
73
<table width="100%"><tr><td><br></td><td align=right>
 
74
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
75
</td></tr></table>
 
76
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
77
</body>
 
78
</html>