summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-12-19 15:00:50 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-19 07:28:20 -0800
commitf487953ad360b941fe225418cd3e5801d5a6508b (patch)
treea284c375543c2de073d4df26500a35d7c30afbe6 /dive.h
parentcad0d45fe17abedcb86bcdae6896d42324efbf96 (diff)
downloadsubsurface-f487953ad360b941fe225418cd3e5801d5a6508b.tar.gz
Files: add wrappers for certain open() methods
Due to filepath encoding issues on win32 we need wrappers for: - open() - fopen() - opendir() - zip_open() (this is readonly on win32) Patch only declares/defines the wrappers in dive.h, windows.c, linux.c, macos.c. Suggestions-by: Thiago Macieira <thiago@macieira.org> Suggestions-by: Jef Driesen <jefdriesen@telenet.be> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 46c42fc4c..4f9b29509 100644
--- a/dive.h
+++ b/dive.h
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <time.h>
#include <math.h>
+#include <zip.h>
/* Windows has no MIN/MAX macros - so let's just roll our own */
#define MIN(x, y) ({ \
@@ -633,6 +634,12 @@ extern void save_dives_logic(const char *filename, bool select_only);
extern void save_dive(FILE *f, struct dive *dive);
extern void export_dives_uddf(const char *filename, const bool selected);
+extern int subsurface_open(const char *path, int oflags, mode_t mode);
+extern FILE *subsurface_fopen(const char *path, const char *mode);
+extern void *subsurface_opendir(const char *path);
+extern struct zip *subsurface_zip_open_readonly(const char *path, int flags, int *errorp);
+extern int subsurface_zip_close(struct zip *zip);
+
extern void shift_times(const timestamp_t amount);
extern xsltStylesheetPtr get_stylesheet(const char *name);