Debian Codegraph @

docs/api_reference/C/db_env_set_func_seek.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>db_env_set_func_seek</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10 <link rel="up" href="setfunc.html" title="Appendix C.  Berkeley DB Application Space Static Functions" />
11 <link rel="prev" href="db_env_set_func_rename.html" title="db_env_set_func_rename" />
12 <link rel="next" href="db_env_set_func_unlink.html" title="db_env_set_func_unlink" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">db_env_set_func_seek</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="db_env_set_func_rename.html">Prev</a> </td>
25 <th width="60%" align="center">Appendix C. 
26 Berkeley DB Application Space Static Functions
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="db_env_set_func_unlink.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="db_env_set_func_seek"></a>db_env_set_func_seek</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 db_env_set_func_seek(int (*func_seek)(int fd, off_t offset, int whence)); </pre>
45 <p>
46 The Berkeley DB library requires the ability to specify that a
47 subsequent read from or write to a file will occur at a specific
48 location in that file.
49 </p>
50 <p>
51 The <code class="function">db_env_set_func_seek()</code> function configures all operations performed by
52 a process and all of its threads of control, not operations confined
53 to a single database environment.
54 </p>
55 <p>
56 Although the <code class="function">db_env_set_func_seek()</code> function may be called at any time
57 during the life of the application, it should normally be called
58 before making calls to the <a class="xref" href="envcreate.html" title="db_env_create">db_env_create</a> or
59 <a class="xref" href="dbcreate.html" title="db_create">db_create</a> methods.
60 </p>
61 <p>
62 The <code class="function">db_env_set_func_seek()</code> <span>
63 function returns a non-zero error value on failure and 0 on success.
64 </span>
65 </p>
66 <div class="sect2" lang="en" xml:lang="en">
67 <div class="titlepage">
68 <div>
69 <div>
70 <h3 class="title"><a id="idp55725208"></a>Parameters</h3>
71 </div>
72 </div>
73 </div>
74 <div class="sect3" lang="en" xml:lang="en">
75 <div class="titlepage">
76 <div>
77 <div>
78 <h4 class="title"><a id="idp55725400"></a>func_seek</h4>
79 </div>
80 </div>
81 </div>
82 <p>
83 The <span class="bold"><strong>func_seek</strong></span> parameter is the
84 function which seeks to a specific location in a file.
85 </p>
86 <p>
87 The <span class="bold"><strong>fd</strong></span> parameter is an open file
88 descriptor on the file.
89 </p>
90 <p>
91 The <span class="bold"><strong>seek</strong></span> function must cause a
92 subsequent read from or write to the file to occur at the byte offset
93 specified by the <span class="bold"><strong>offset</strong></span> parameter.
94 </p>
95 <p>
96 The <span class="bold"><strong>whence</strong></span> parameter specifies where
97 in the file the byte offset is relative to, as described by the
98 IEEE/ANSI Std 1003.1 (POSIX) <span class="bold"><strong>lseek</strong></span>
99 system call.
100 </p>
101 <p>
102 The <span class="bold"><strong>func_seek</strong></span> function must return
103 the value of <span class="bold"><strong>errno</strong></span> on failure and 0
104 on success.
105 </p>
106 </div>
107 </div>
108 <div class="sect2" lang="en" xml:lang="en">
109 <div class="titlepage">
110 <div>
111 <div>
112 <h3 class="title"><a id="idp55722768"></a>See Also</h3>
113 </div>
114 </div>
115 </div>
116 <p>
117 <a href="../../programmer_reference/program_runtime.html" class="olink">Run-time configuration</a>
118 </p>
119 </div>
120 </div>
121 <div class="navfooter">
122 <hr />
123 <table width="100%" summary="Navigation footer">
124 <tr>
125 <td width="40%" align="left"><a accesskey="p" href="db_env_set_func_rename.html">Prev</a> </td>
126 <td width="20%" align="center">
127 <a accesskey="u" href="setfunc.html">Up</a>
128 </td>
129 <td width="40%" align="right"> <a accesskey="n" href="db_env_set_func_unlink.html">Next</a></td>
130 </tr>
131 <tr>
132 <td width="40%" align="left" valign="top">db_env_set_func_rename </td>
133 <td width="20%" align="center">
134 <a accesskey="h" href="index.html">Home</a>
135 </td>
136 <td width="40%" align="right" valign="top"> db_env_set_func_unlink</td>
137 </tr>
138 </table>
139 </div>
140 </body>
141 </html>