Jim Park's Unicode NSIS merging - Step 2 : merge TCHARs changes into trunk

Compiler output is identical before & after this step

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6037 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-03-26 17:18:17 +00:00
commit cdf7735a77
206 changed files with 8437 additions and 6403 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;
}