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

@ -3,7 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
/* @(#) $Id: adler32.c,v 1.2 2005/07/22 17:42:47 kichik Exp $ */
#define ZLIB_INTERNAL
#include "zlib.h"

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;
}

View file

@ -4,11 +4,15 @@
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2005 Gilles Vollant
Unicode support by Jim Park -- 08/28/2007
*/
#ifndef _ZLIBIOAPI_H
#define _ZLIBIOAPI_H
#include "../../ExDLL/nsis_tchar.h"
#define ZLIB_FILEFUNC_SEEK_CUR (1)
#define ZLIB_FILEFUNC_SEEK_END (2)
@ -35,7 +39,7 @@
extern "C" {
#endif
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const TCHAR* filename, int mode));
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));

View file

@ -4,6 +4,9 @@
Copyright (C) 1998-2005 Gilles Vollant
Read unzip.h for more info
Unicode support by Jim Park -- 08/28/2007
(Unicode ZIP file name, but not the files in the archive itself.)
*/
/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
@ -395,7 +398,7 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
of this unzip package.
*/
extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
const char *path;
const TCHAR *path;
zlib_filefunc_def* pzlib_filefunc_def;
{
unz_s us;
@ -498,7 +501,7 @@ extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
extern unzFile ZEXPORT unzOpen (path)
const char *path;
const TCHAR *path;
{
return unzOpen2(path, NULL);
}

View file

@ -32,6 +32,10 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Unicode support by Jim Park -- 08/28/2007
(Support of the archive file name being Unicode but not the files in
the archive itself. That requires modifying the ZLIB lib not just
here but the user's zlib-based tool.)
*/
@ -132,7 +136,7 @@ extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
*/
extern unzFile ZEXPORT unzOpen OF((const char *path));
extern unzFile ZEXPORT unzOpen OF((const TCHAR *path));
/*
Open a Zip file. path contain the full pathname (by example,
on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
@ -143,7 +147,7 @@ extern unzFile ZEXPORT unzOpen OF((const char *path));
of this unzip package.
*/
extern unzFile ZEXPORT unzOpen2 OF((const char *path,
extern unzFile ZEXPORT unzOpen2 OF((const TCHAR *path,
zlib_filefunc_def* pzlib_filefunc_def));
/*
Open a Zip file, like unzOpen, but provide a set of file low level API