DSTRICT: LZexpand

Matthew Davison m.davison at virgin.net
Fri Oct 25 18:05:16 CDT 2002


This is my first patch to wine so if it is wrong please dont chew me up
anyway, here goes.

	ChangeLog:
		Made LZexpand compile with DSTRICT defined.

-- 

Matthew Davison


-------------- next part --------------
? lzexpand
Index: dlls/lzexpand/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/lzexpand/Makefile.in,v
retrieving revision 1.18
diff -u -r1.18 Makefile.in
--- dlls/lzexpand/Makefile.in	18 Oct 2002 23:46:29 -0000	1.18
+++ dlls/lzexpand/Makefile.in	25 Oct 2002 22:02:40 -0000
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_STRICT
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: dlls/lzexpand/lzexpand16.c
===================================================================
RCS file: /home/wine/wine/dlls/lzexpand/lzexpand16.c,v
retrieving revision 1.1
diff -u -r1.1 lzexpand16.c
--- dlls/lzexpand/lzexpand16.c	27 Sep 2002 22:00:41 -0000	1.1
+++ dlls/lzexpand/lzexpand16.c	25 Oct 2002 22:02:41 -0000
@@ -47,7 +47,7 @@
  */
 HFILE16 WINAPI LZInit16( HFILE16 hfSrc )
 {
-    HFILE ret = LZInit( DosFileHandleToWin32Handle(hfSrc) );
+    HFILE ret = LZInit( (HFILE)DosFileHandleToWin32Handle(hfSrc) );
     if (IS_LZ_HANDLE(ret)) return ret;
     if ((INT)ret <= 0) return ret;
     return hfSrc;
@@ -69,7 +69,7 @@
 INT16 WINAPI LZRead16( HFILE16 fd, LPVOID buf, UINT16 toread )
 {
     if (IS_LZ_HANDLE(fd)) return LZRead( fd, buf, toread );
-    return _lread( DosFileHandleToWin32Handle(fd), buf, toread );
+    return _lread( (HFILE)DosFileHandleToWin32Handle(fd), buf, toread );
 }
 
 
@@ -79,7 +79,7 @@
 LONG WINAPI LZSeek16( HFILE16 fd, LONG off, INT16 type )
 {
     if (IS_LZ_HANDLE(fd)) return LZSeek( fd, off, type );
-    return _llseek( DosFileHandleToWin32Handle(fd), off, type );
+    return _llseek( (HFILE)DosFileHandleToWin32Handle(fd), off, type );
 }
 
 
@@ -90,19 +90,19 @@
 LONG WINAPI LZCopy16( HFILE16 src, HFILE16 dest )
 {
     /* already a LZ handle? */
-    if (IS_LZ_HANDLE(src)) return LZCopy( src, DosFileHandleToWin32Handle(dest) );
+    if (IS_LZ_HANDLE(src)) return LZCopy( src, (HFILE)DosFileHandleToWin32Handle(dest) );
 
     /* no, try to open one */
     src = LZInit16(src);
     if ((INT16)src <= 0) return 0;
     if (IS_LZ_HANDLE(src))
     {
-        LONG ret = LZCopy( src, DosFileHandleToWin32Handle(dest) );
+        LONG ret = LZCopy( src, (HFILE)DosFileHandleToWin32Handle(dest) );
         LZClose( src );
         return ret;
     }
     /* it was not a compressed file */
-    return LZCopy( DosFileHandleToWin32Handle(src), DosFileHandleToWin32Handle(dest) );
+    return LZCopy( (HFILE)DosFileHandleToWin32Handle(src), (HFILE)DosFileHandleToWin32Handle(dest) );
 }
 
 
@@ -116,7 +116,7 @@
     if ((INT)hfret <= 0) return hfret;
     if (IS_LZ_HANDLE(hfret)) return hfret;
     /* but allocate a dos handle for 'normal' files */
-    return Win32HandleToDosFileHandle(hfret);
+    return Win32HandleToDosFileHandle((HANDLE)hfret);
 }
 
 
@@ -126,7 +126,7 @@
 void WINAPI LZClose16( HFILE16 fd )
 {
     if (IS_LZ_HANDLE(fd)) LZClose( fd );
-    else DisposeLZ32Handle( DosFileHandleToWin32Handle(fd) );
+    else DisposeLZ32Handle( DosFileHandleToWin32Handle((HFILE)fd) );
 }
 
 
Index: dlls/lzexpand/lzexpand_main.c
===================================================================
RCS file: /home/wine/wine/dlls/lzexpand/lzexpand_main.c,v
retrieving revision 1.18
diff -u -r1.18 lzexpand_main.c
--- dlls/lzexpand/lzexpand_main.c	27 Sep 2002 22:00:41 -0000	1.18
+++ dlls/lzexpand/lzexpand_main.c	25 Oct 2002 22:02:44 -0000
@@ -557,7 +557,7 @@
         else
         {
             if (lzs->get) HeapFree( GetProcessHeap(), 0, lzs->get );
-            CloseHandle(lzs->realfd);
+            CloseHandle((HANDLE)lzs->realfd);
             lzstates[fd - 0x400] = NULL;
             HeapFree( GetProcessHeap(), 0, lzs );
         }


More information about the wine-patches mailing list