summaryrefslogtreecommitdiff
path: root/plugins/Zlib/src/ioapi.c
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-07 20:31:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-07 20:31:50 +0000
commit39de8f56fe51fb8fe82f290d1008eb1381c53290 (patch)
tree337d658a44390c16d102c4e54ecc4ca3c19cc1c5 /plugins/Zlib/src/ioapi.c
parentf2b61a664ae3660ad503eee73ef82ee562a5a5db (diff)
perverted zlib with TCHAR file names
git-svn-id: http://svn.miranda-ng.org/main/trunk@5618 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Zlib/src/ioapi.c')
-rw-r--r--plugins/Zlib/src/ioapi.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/Zlib/src/ioapi.c b/plugins/Zlib/src/ioapi.c
index 7f5c191b2a..8c601556c1 100644
--- a/plugins/Zlib/src/ioapi.c
+++ b/plugins/Zlib/src/ioapi.c
@@ -34,7 +34,7 @@ voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename
return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
else
{
- return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
+ return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const TCHAR*)filename,mode);
}
}
@@ -84,7 +84,7 @@ void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filef
-static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
+static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const TCHAR* filename, int mode));
static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
@@ -92,39 +92,39 @@ static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPO
static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
-static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
+static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const TCHAR* filename, int mode)
{
FILE* file = NULL;
- const char* mode_fopen = NULL;
+ const TCHAR* mode_fopen = NULL;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
+ mode_fopen = _T("rb");
else
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
+ mode_fopen = _T("r+b");
else
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
+ mode_fopen = _T("wb");
if ((filename!=NULL) && (mode_fopen != NULL))
- file = fopen(filename, mode_fopen);
+ file = _tfopen(filename, mode_fopen);
return file;
}
static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
{
FILE* file = NULL;
- const char* mode_fopen = NULL;
+ const TCHAR* mode_fopen = NULL;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
+ mode_fopen = _T("rb");
else
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
+ mode_fopen = _T("r+b");
else
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
+ mode_fopen = _T("wb");
if ((filename!=NULL) && (mode_fopen != NULL))
- file = FOPEN_FUNC((const char*)filename, mode_fopen);
+ file = _tfopen((const TCHAR*)filename, mode_fopen);
return file;
}