mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
cad0d45fe1
commit
f487953ad3
4 changed files with 157 additions and 0 deletions
7
dive.h
7
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue