1ZIP_SOURCE_SEEK_COMPU... BSD Library Functions Manual ZIP_SOURCE_SEEK_COMPU...
2

NAME

4     zip_source_seek_compute_offset — validate arguments and compute offset
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

10     #include <zip.h>
11
12     zip_int64_t
13     zip_source_seek_compute_offset(zip_uint64_t offset, zip_uint64_t length,
14         void *data, zip_uint64_t data_length, zip_error_t *error);
15

DESCRIPTION

17     Use this function to compute the offset for a ZIP_SOURCE_SEEK or
18     ZIP_SOURCE_SEEK_WRITE command.  data and data_length are the arguments to
19     the source callback, offset is the current offset and length is the
20     length of the source data or, for ZIP_SOURCE_SEEK_WRITE, the amount of
21     data written.
22

RETURN VALUES

24     On success, it returns the new offset, on error it returns -1 and sets
25     error.
26

ERRORS

28     zip_source_seek_compute_offset() fails if:
29
30     [ZIP_ER_INVAL]     One of the arguments is invalid or the seek would
31                        place the offset outside the data.
32

SEE ALSO

34     zip_source_function(3)
35

HISTORY

37     zip_source_seek_compute_offset() was added in libzip 1.0.
38

AUTHORS

40     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
41
42BSD                            December 18, 2017                           BSD
Impressum