PATCH - Build lz32 with Mingw or MS_VC lzexpand.h
Steven Edwards
Steven_Ed4153 at yahoo.com
Tue Apr 29 19:43:36 CDT 2003
I have not tested this so it will need to be tested with something
before applying. Also not that the WINE lzexpand header is not yet 100%
in sync with either the MS_VC or Mingw header. This just gets it to
compile with no warnings. I have been working a little here and there to
build parts of WINE with other headers and have submitted a patch to the
mingw developers so that riched32 will build.
Changelog:
Fix for building lzexpand with Mingw or MS_VC++ includes
Index: lzexpand_main.c
===================================================================
RCS file: /home/wine/wine/dlls/lzexpand/lzexpand_main.c,v
retrieving revision 1.19
diff -u -r1.19 lzexpand_main.c
--- lzexpand_main.c 28 Oct 2002 20:05:55 -0000 1.19
+++ lzexpand_main.c 30 Apr 2003 00:34:22 -0000
@@ -220,7 +220,7 @@
* "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 @@
/***********************************************************************
* 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 @@
/***********************************************************************
* 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 @@
*
* 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 @@
/***********************************************************************
* 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 );
Index: lzexpand16.c
===================================================================
RCS file: /home/wine/wine/dlls/lzexpand/lzexpand16.c,v
retrieving revision 1.2
diff -u -r1.2 lzexpand16.c
--- lzexpand16.c 28 Oct 2002 20:05:55 -0000 1.2
+++ lzexpand16.c 30 Apr 2003 00:35:49 -0000
@@ -57,7 +57,7 @@
/***********************************************************************
* 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 @@
/***********************************************************************
* 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 */
Index: lzexpand.h
===================================================================
RCS file: /home/wine/wine/include/lzexpand.h,v
retrieving revision 1.8
diff -u -r1.8 lzexpand.h
--- lzexpand.h 10 Mar 2002 00:02:34 -0000 1.8
+++ lzexpand.h 30 Apr 2003 00:36:09 -0000
@@ -37,17 +37,17 @@
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
More information about the wine-patches
mailing list