blob: 6fad8030046cfb89089e4807e15c85b70f083ae8 [file] [log] [blame]
Thomas Klausner37ca2c62018-04-10 12:40:44 +02001<!DOCTYPE html>
2<html>
Thomas Klausner0001d262018-04-14 22:34:06 +02003<!-- This is an automatically generated file. Do not edit.
4 zip_source_seek.mdoc -- set read offset in source
5 Copyright (C) 2014-2017 Dieter Baron and Thomas Klausner
6
7 This file is part of libzip, a library to manipulate ZIP archives.
8 The authors can be contacted at <libzip@nih.at>
9
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions
12 are met:
13 1. Redistributions of source code must retain the above copyright
14 notice, this list of conditions and the following disclaimer.
15 2. Redistributions in binary form must reproduce the above copyright
16 notice, this list of conditions and the following disclaimer in
17 the documentation and/or other materials provided with the
18 distribution.
19 3. The names of the authors may not be used to endorse or promote
20 products derived from this software without specific prior
21 written permission.
22
23 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
24 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
27 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
33 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 -->
Thomas Klausner37ca2c62018-04-10 12:40:44 +020035<head>
36 <meta charset="utf-8"/>
Thomas Klausner37ca2c62018-04-10 12:40:44 +020037 <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
38 <title>ZIP_SOURCE_SEEK(3)</title>
39</head>
40<body>
41<table class="head">
42 <tr>
43 <td class="head-ltitle">ZIP_SOURCE_SEEK(3)</td>
44 <td class="head-vol">Library Functions Manual</td>
45 <td class="head-rtitle">ZIP_SOURCE_SEEK(3)</td>
46 </tr>
47</table>
48<div class="manual-text">
Thomas Klausner8fb14f92019-03-12 12:44:02 +010049<section class="Sh">
50<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
51<code class="Nm">zip_source_seek</code> &#x2014;
52<div class="Nd">set read offset in zip source</div>
53</section>
54<section class="Sh">
55<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
Thomas Klausner37ca2c62018-04-10 12:40:44 +020056libzip (-lzip)
Thomas Klausner8fb14f92019-03-12 12:44:02 +010057</section>
58<section class="Sh">
59<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
60<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
61<p class="Pp"><var class="Ft">int</var>
62 <br/>
63 <code class="Fn">zip_source_seek</code>(<var class="Fa" style="white-space: nowrap;">zip_source_t
64 *source</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t
65 offset</var>, <var class="Fa" style="white-space: nowrap;">int
66 whence</var>);</p>
67</section>
68<section class="Sh">
69<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
70The function <code class="Fn">zip_source_seek</code>() sets the current read
71 offset for <var class="Fa">source</var>. Just like in
72 <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html">fseek(3)</a>, depending on the
73 <var class="Ar">whence</var> argument, the <var class="Ar">offset</var> is
74 counted relative from:
Thomas Klausnerff556822018-12-23 19:58:03 +010075<div class="Bd-indent">
76<dl class="Bl-tag">
Thomas Klausner8fb14f92019-03-12 12:44:02 +010077 <dt><a class="permalink" href="#SEEK_SET"><code class="Dv" id="SEEK_SET">SEEK_SET</code></a></dt>
Thomas Klausnerd4ec9862018-05-19 20:35:35 +020078 <dd>start of file</dd>
Thomas Klausner8fb14f92019-03-12 12:44:02 +010079 <dt><a class="permalink" href="#SEEK_CUR"><code class="Dv" id="SEEK_CUR">SEEK_CUR</code></a></dt>
Thomas Klausnerd4ec9862018-05-19 20:35:35 +020080 <dd>current read offset in file</dd>
Thomas Klausner8fb14f92019-03-12 12:44:02 +010081 <dt><a class="permalink" href="#SEEK_END"><code class="Dv" id="SEEK_END">SEEK_END</code></a></dt>
Thomas Klausnerd4ec9862018-05-19 20:35:35 +020082 <dd>end of file</dd>
Thomas Klausner37ca2c62018-04-10 12:40:44 +020083</dl>
84</div>
Thomas Klausner8fb14f92019-03-12 12:44:02 +010085</section>
86<section class="Sh">
87<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
Thomas Klausner0001d262018-04-14 22:34:06 +020088 VALUES</a></h1>
Thomas Klausner37ca2c62018-04-10 12:40:44 +020089Upon successful completion 0 is returned. Otherwise, -1 is returned and the
Thomas Klausner8fb14f92019-03-12 12:44:02 +010090 error information in <var class="Ar">source</var> is set to indicate the
91 error.
92</section>
93<section class="Sh">
94<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
Thomas Klausner0001d262018-04-14 22:34:06 +020095 ALSO</a></h1>
Thomas Klausner8fb14f92019-03-12 12:44:02 +010096<a class="Xr" href="libzip.html">libzip(3)</a>,
97 <a class="Xr" href="zip_source.html">zip_source(3)</a>,
98 <a class="Xr" href="zip_source_read.html">zip_source_read(3)</a>,
99 <a class="Xr" href="zip_source_tell.html">zip_source_tell(3)</a>
100</section>
101<section class="Sh">
102<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
103<code class="Fn">zip_source_seek</code>() was added in libzip 1.0.
104</section>
105<section class="Sh">
106<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
107<span class="An">Dieter Baron</span>
108 &lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
109 <span class="An">Thomas Klausner</span>
110 &lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
111</section>
112</div>
Thomas Klausner37ca2c62018-04-10 12:40:44 +0200113<table class="foot">
114 <tr>
115 <td class="foot-date">December 18, 2017</td>
Thomas Klausner6aecb022020-07-11 10:38:46 +0200116 <td class="foot-os">NiH</td>
Thomas Klausner37ca2c62018-04-10 12:40:44 +0200117 </tr>
118</table>
119</body>
120</html>