1 #ifndef _HAD_ZIP_SOURCE_FILE_STDIO_H
2 #define _HAD_ZIP_SOURCE_FILE_STDIO_H
5 zip_source_file_stdio.h -- common header for stdio file implementation
6 Copyright (C) 2020 Dieter Baron and Thomas Klausner
8 This file is part of libzip, a library to manipulate ZIP archives.
9 The authors can be contacted at <info@libzip.org>
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions
14 1. Redistributions of source code must retain the above copyright
15 notice, this list of conditions and the following disclaimer.
16 2. Redistributions in binary form must reproduce the above copyright
17 notice, this list of conditions and the following disclaimer in
18 the documentation and/or other materials provided with the
20 3. The names of the authors may not be used to endorse or promote
21 products derived from this software without specific prior
24 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
25 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
28 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
30 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
33 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
34 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 void _zip_stdio_op_close(zip_source_file_context_t *ctx);
40 zip_int64_t _zip_stdio_op_read(zip_source_file_context_t *ctx, void *buf, zip_uint64_t len);
41 bool _zip_stdio_op_seek(zip_source_file_context_t *ctx, void *f, zip_int64_t offset, int whence);
42 bool _zip_stdio_op_stat(zip_source_file_context_t *ctx, zip_source_file_stat_t *st);
43 zip_int64_t _zip_stdio_op_tell(zip_source_file_context_t *ctx, void *f);
45 FILE *_zip_fopen_close_on_exec(const char *name, bool writeable);
47 #endif /* _HAD_ZIP_SOURCE_FILE_STDIO_H */