forked from zlib-ng/minizip-ng
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mz_strm_win32.h
62 lines (46 loc) · 1.99 KB
/
mz_strm_win32.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* mz_sstrm_win32.h -- Stream for filesystem access for windows
Version 2.5.4, September 30, 2018
part of the MiniZip project
Copyright (C) 2010-2018 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.
*/
#ifndef MZ_STREAM_WIN32_H
#define MZ_STREAM_WIN32_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************************************/
int32_t mz_stream_win32_open(void *stream, const char *path, int32_t mode);
int32_t mz_stream_win32_is_open(void *stream);
int32_t mz_stream_win32_read(void *stream, void *buf, int32_t size);
int32_t mz_stream_win32_write(void *stream, const void *buf, int32_t size);
int64_t mz_stream_win32_tell(void *stream);
int32_t mz_stream_win32_seek(void *stream, int64_t offset, int32_t origin);
int32_t mz_stream_win32_close(void *stream);
int32_t mz_stream_win32_error(void *stream);
void* mz_stream_win32_create(void **stream);
void mz_stream_win32_delete(void **stream);
void* mz_stream_win32_get_interface(void);
/***************************************************************************/
#if defined(_WIN32) || defined(MZ_WIN32_API)
#define mz_stream_os_open mz_stream_win32_open
#define mz_stream_os_is_open mz_stream_win32_is_open
#define mz_stream_os_read mz_stream_win32_read
#define mz_stream_os_write mz_stream_win32_write
#define mz_stream_os_tell mz_stream_win32_tell
#define mz_stream_os_seek mz_stream_win32_seek
#define mz_stream_os_close mz_stream_win32_close
#define mz_stream_os_error mz_stream_win32_error
#define mz_stream_os_create mz_stream_win32_create
#define mz_stream_os_delete mz_stream_win32_delete
#define mz_stream_os_get_interface \
mz_stream_win32_get_interface
#endif
/***************************************************************************/
#ifdef __cplusplus
}
#endif
#endif