From e3180169b42481fbbc4886db741782ca1391c46e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 12 Dec 2016 13:09:44 +0100 Subject: Add fz_remove to cope with utf-8 file names on windows. --- include/mupdf/fitz/system.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h index 3fe4311a..b49d9110 100644 --- a/include/mupdf/fitz/system.h +++ b/include/mupdf/fitz/system.h @@ -156,14 +156,15 @@ static int msvc_snprintf(char *str, size_t size, const char *fmt, ...) #define hypotf _hypotf -FILE *fz_fopen_utf8(const char *name, const char *mode); - #define fz_fopen fz_fopen_utf8 +#define fz_remove fz_remove_utf8 char *fz_utf8_from_wchar(const wchar_t *s); wchar_t *fz_wchar_from_utf8(const char *s); FILE *fz_fopen_utf8(const char *name, const char *mode); +int fz_remove_utf8(const char *name); + char **fz_argv_from_wargv(int argc, wchar_t **wargv); void fz_free_argv(int argc, char **argv); @@ -202,6 +203,9 @@ typedef int64_t fz_off_t; #ifndef fz_fopen #define fz_fopen fopen #endif +#ifndef fz_remove +#define fz_remove remove +#endif #define fz_fseek fseek #define fz_ftell ftell typedef int fz_off_t; -- cgit v1.2.3