Fix for building lzexpand with Mingw or MS_VC++ includes

This commit is contained in:
Steven Edwards 2003-04-30 17:15:06 +00:00 committed by Alexandre Julliard
parent d139e94336
commit e426e9a785
4 changed files with 18 additions and 18 deletions

View File

@ -57,7 +57,7 @@ HFILE16 WINAPI LZInit16( HFILE16 hfSrc )
/***********************************************************************
* GetExpandedName (LZEXPAND.10)
*/
INT16 WINAPI GetExpandedName16( LPCSTR in, LPSTR out )
INT16 WINAPI GetExpandedName16( LPSTR in, LPSTR out )
{
return (INT16)GetExpandedNameA( in, out );
}
@ -109,7 +109,7 @@ LONG WINAPI LZCopy16( HFILE16 src, HFILE16 dest )
/***********************************************************************
* LZOpenFile (LZEXPAND.2)
*/
HFILE16 WINAPI LZOpenFile16( LPCSTR fn, LPOFSTRUCT ofs, UINT16 mode )
HFILE16 WINAPI LZOpenFile16( LPSTR fn, LPOFSTRUCT ofs, UINT16 mode )
{
HFILE hfret = LZOpenFileA( fn, ofs, mode );
/* return errors and LZ handles unmodified */

View File

@ -220,7 +220,7 @@ void WINAPI LZDone(void)
* "FILE.BL_" (with lastchar 'a') is being translated to "FILE.BLA"
*/
INT WINAPI GetExpandedNameA( LPCSTR in, LPSTR out )
INT WINAPI GetExpandedNameA( LPSTR in, LPSTR out )
{
struct lzfileheader head;
HFILE fd;
@ -290,7 +290,7 @@ INT WINAPI GetExpandedNameA( LPCSTR in, LPSTR out )
/***********************************************************************
* GetExpandedNameW (LZ32.@)
*/
INT WINAPI GetExpandedNameW( LPCWSTR in, LPWSTR out )
INT WINAPI GetExpandedNameW( LPWSTR in, LPWSTR out )
{
INT ret;
DWORD len = WideCharToMultiByte( CP_ACP, 0, in, -1, NULL, 0, NULL, NULL );
@ -308,7 +308,7 @@ INT WINAPI GetExpandedNameW( LPCWSTR in, LPWSTR out )
/***********************************************************************
* LZRead (LZ32.@)
*/
INT WINAPI LZRead( HFILE fd, LPVOID vbuf, UINT toread )
INT WINAPI LZRead( HFILE fd, LPSTR vbuf, INT toread )
{
int howmuch;
BYTE b,*buf;
@ -507,7 +507,7 @@ static LPSTR LZEXPAND_MangleName( LPCSTR fn )
*
* Opens a file. If not compressed, open it as a normal file.
*/
HFILE WINAPI LZOpenFileA( LPCSTR fn, LPOFSTRUCT ofs, UINT mode )
HFILE WINAPI LZOpenFileA( LPSTR fn, LPOFSTRUCT ofs, WORD mode )
{
HFILE fd,cfd;
@ -533,7 +533,7 @@ HFILE WINAPI LZOpenFileA( LPCSTR fn, LPOFSTRUCT ofs, UINT mode )
/***********************************************************************
* LZOpenFileW (LZ32.@)
*/
HFILE WINAPI LZOpenFileW( LPCWSTR fn, LPOFSTRUCT ofs, UINT mode )
HFILE WINAPI LZOpenFileW( LPWSTR fn, LPOFSTRUCT ofs, WORD mode )
{
HFILE ret;
DWORD len = WideCharToMultiByte( CP_ACP, 0, fn, -1, NULL, 0, NULL, NULL );

View File

@ -146,7 +146,7 @@ static int read_xx_header( HFILE lzfd )
char magic[3];
LZSeek( lzfd, 0, SEEK_SET );
if ( sizeof(mzh) != LZRead( lzfd, &mzh, sizeof(mzh) ) )
if ( sizeof(mzh) != LZRead( lzfd, (LPSTR)&mzh, sizeof(mzh) ) )
return 0;
if ( mzh.e_magic != IMAGE_DOS_SIGNATURE )
return 0;
@ -183,7 +183,7 @@ static BOOL find_ne_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid,
/* Read in NE header */
nehdoffset = LZSeek( lzfd, 0, SEEK_CUR );
if ( sizeof(nehd) != LZRead( lzfd, &nehd, sizeof(nehd) ) ) return 0;
if ( sizeof(nehd) != LZRead( lzfd, (LPSTR)&nehd, sizeof(nehd) ) ) return 0;
resTabSize = nehd.ne_restab - nehd.ne_rsrctab;
if ( !resTabSize )
@ -286,7 +286,7 @@ static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid,
/* Read in PE header */
pehdoffset = LZSeek( lzfd, 0, SEEK_CUR );
if ( sizeof(pehd) != LZRead( lzfd, &pehd, sizeof(pehd) ) ) return 0;
if ( sizeof(pehd) != LZRead( lzfd, (LPSTR)&pehd, sizeof(pehd) ) ) return 0;
resDataDir = pehd.OptionalHeader.DataDirectory+IMAGE_FILE_RESOURCE_DIRECTORY;
if ( !resDataDir->Size )
@ -307,7 +307,7 @@ static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid,
pehd.FileHeader.SizeOfOptionalHeader, SEEK_SET );
if ( nSections * sizeof(IMAGE_SECTION_HEADER) !=
LZRead( lzfd, sections, nSections * sizeof(IMAGE_SECTION_HEADER) ) )
LZRead( lzfd, (LPSTR)sections, nSections * sizeof(IMAGE_SECTION_HEADER) ) )
{
HeapFree( GetProcessHeap(), 0, sections );
return FALSE;
@ -404,7 +404,7 @@ DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName, LPCSTR lpszResType,
debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
lpszResId );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ );
if ( lzfd < 0 ) return 0;
switch ( read_xx_header( lzfd ) )
@ -441,7 +441,7 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType,
debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
dwFileOffset, dwResLen, lpvData );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ );
if ( lzfd < 0 ) return 0;
if ( !dwFileOffset )

View File

@ -37,17 +37,17 @@ extern "C" {
VOID WINAPI LZDone(void);
LONG WINAPI CopyLZFile(HFILE,HFILE);
HFILE WINAPI LZOpenFileA(LPCSTR,LPOFSTRUCT,UINT);
HFILE WINAPI LZOpenFileW(LPCWSTR,LPOFSTRUCT,UINT);
HFILE WINAPI LZOpenFileA(LPSTR,LPOFSTRUCT,WORD);
HFILE WINAPI LZOpenFileW(LPWSTR,LPOFSTRUCT,WORD);
#define LZOpenFile WINELIB_NAME_AW(LZOpenFile)
INT WINAPI LZRead(HFILE,LPVOID,UINT);
INT WINAPI LZRead(INT,LPSTR,INT);
INT WINAPI LZStart(void);
void WINAPI LZClose(HFILE);
LONG WINAPI LZCopy(HFILE,HFILE);
HFILE WINAPI LZInit(HFILE);
LONG WINAPI LZSeek(HFILE,LONG,INT);
INT WINAPI GetExpandedNameA(LPCSTR,LPSTR);
INT WINAPI GetExpandedNameW(LPCWSTR,LPWSTR);
INT WINAPI GetExpandedNameA(LPSTR,LPSTR);
INT WINAPI GetExpandedNameW(LPWSTR,LPWSTR);
#define GetExpandedName WINELIB_NAME_AW(GetExpandedName)
#ifdef __cplusplus