Imported Upstream version 1.4.0
[platform/upstream/libzip.git] / man / zip_source_seek.man
1 .TH "ZIP_SOURCE_SEEK" "3" "December 18, 2017" "NiH" "Library Functions Manual"
2 .nh
3 .if n .ad l
4 .SH "NAME"
5 \fBzip_source_seek\fR
6 \- set read offset in zip source
7 .SH "LIBRARY"
8 libzip (-lzip)
9 .SH "SYNOPSIS"
10 \fB#include <zip.h>\fR
11 .sp
12 \fIint\fR
13 .br
14 .PD 0
15 .HP 4n
16 \fBzip_source_seek\fR(\fIzip_source_t\ *source\fR, \fIzip_int64_t\ offset\fR, \fIint\ whence\fR);
17 .PD
18 .SH "DESCRIPTION"
19 The function
20 \fBzip_source_seek\fR()
21 sets the current read offset for
22 \fIsource\fR.
23 Just like in
24 fseek(3),
25 depending on the
26 \fIwhence\fR
27 argument, the
28 \fIoffset\fR
29 is counted relative from:
30 .RS 6n
31 .TP 12n
32 \fRSEEK_SET\fR
33 start of file
34 .TP 12n
35 \fRSEEK_CUR\fR
36 current read offset in file
37 .TP 12n
38 \fRSEEK_END\fR
39 end of file
40 .RE
41 .SH "RETURN VALUES"
42 Upon successful completion 0 is returned.
43 Otherwise, \-1 is returned and the error information in
44 \fIsource\fR
45 is set to indicate the error.
46 .SH "SEE ALSO"
47 libzip(3),
48 zip_source(3),
49 zip_source_read(3),
50 zip_source_tell(3)
51 .SH "HISTORY"
52 \fBzip_source_seek\fR()
53 was added in libzip 1.0.
54 .SH "AUTHORS"
55 Dieter Baron <\fIdillo@nih.at\fR>
56 and
57 Thomas Klausner <\fItk@giga.or.at\fR>