forked from zlib-ng/minizip-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mz_os.h
78 lines (56 loc) · 2.09 KB
/
mz_os.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* mz_os.h -- System functions
Version 2.6.0, October 8, 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_OS_H
#define MZ_OS_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************************************/
#if !defined(_WIN32) && !defined(MZ_WIN32_API)
#include "mz_os_posix.h"
#include "mz_strm_posix.h"
#else
#include "mz_os_win32.h"
#include "mz_strm_win32.h"
#endif
/***************************************************************************/
#ifdef HAVE_LZMA
#define MZ_VERSION_MADEBY_ZIP_VERSION (63)
#elif HAVE_AES
#define MZ_VERSION_MADEBY_ZIP_VERSION (51)
#elif HAVE_BZIP2
#define MZ_VERSION_MADEBY_ZIP_VERSION (46)
#else
#define MZ_VERSION_MADEBY_ZIP_VERSION (45)
#endif
#define MZ_VERSION_MADEBY ((MZ_VERSION_MADEBY_HOST_SYSTEM << 8) | \
(MZ_VERSION_MADEBY_ZIP_VERSION))
/***************************************************************************/
int32_t mz_path_combine(char *path, const char *join, int32_t max_path);
// Combines two paths
int32_t mz_path_compare_wc(const char *path, const char *wildcard, uint8_t ignore_case);
// Compare two paths with wildcard
int32_t mz_path_resolve(const char *path, char *target, int32_t max_target);
// Resolves path
int32_t mz_path_remove_filename(char *path);
// Remove the filename from a path
int32_t mz_path_get_filename(const char *path, const char **filename);
// Get the filename from a path
int32_t mz_dir_make(const char *path);
// Creates a directory recursively
int32_t mz_file_get_crc(const char *path, uint32_t *result_crc);
// Gets the crc32 hash of a file
int32_t mz_encoding_cp437_to_utf8(const char *source, char *target, int32_t max_target);
// Converts ibm cp437 encoded string to utf8
/***************************************************************************/
#ifdef __cplusplus
}
#endif
#endif