Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.

Compiler output is identical before & after this step

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-03-24 17:22:56 +00:00
parent 4e48722b63
commit 752d7d239a
209 changed files with 9698 additions and 7658 deletions

View file

@ -4,6 +4,7 @@
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2005 Gilles Vollant
Unicode support by Jim Park -- 08/28/2007
*/
#include <stdio.h>
@ -31,7 +32,7 @@
voidpf ZCALLBACK fopen_file_func OF((
voidpf opaque,
const char* filename,
const TCHAR* filename,
int mode));
uLong ZCALLBACK fread_file_func OF((
@ -67,22 +68,22 @@ int ZCALLBACK ferror_file_func OF((
voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
voidpf opaque;
const char* filename;
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;
}