Commit 6b70aa81 authored by Matthew Davison's avatar Matthew Davison Committed by Alexandre Julliard

Made lzexpand compile with STRICT defined.

parent cfcc9e10
EXTRADEFS = -DWINE_NO_STRICT
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
......
...@@ -47,7 +47,7 @@ INT16 WINAPI LZStart16(void) ...@@ -47,7 +47,7 @@ INT16 WINAPI LZStart16(void)
*/ */
HFILE16 WINAPI LZInit16( HFILE16 hfSrc ) HFILE16 WINAPI LZInit16( HFILE16 hfSrc )
{ {
HFILE ret = LZInit( DosFileHandleToWin32Handle(hfSrc) ); HFILE ret = LZInit( (HFILE)DosFileHandleToWin32Handle(hfSrc) );
if (IS_LZ_HANDLE(ret)) return ret; if (IS_LZ_HANDLE(ret)) return ret;
if ((INT)ret <= 0) return ret; if ((INT)ret <= 0) return ret;
return hfSrc; return hfSrc;
...@@ -69,7 +69,7 @@ INT16 WINAPI GetExpandedName16( LPCSTR in, LPSTR out ) ...@@ -69,7 +69,7 @@ INT16 WINAPI GetExpandedName16( LPCSTR in, LPSTR out )
INT16 WINAPI LZRead16( HFILE16 fd, LPVOID buf, UINT16 toread ) INT16 WINAPI LZRead16( HFILE16 fd, LPVOID buf, UINT16 toread )
{ {
if (IS_LZ_HANDLE(fd)) return LZRead( fd, buf, 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 @@ INT16 WINAPI LZRead16( HFILE16 fd, LPVOID buf, UINT16 toread ) ...@@ -79,7 +79,7 @@ INT16 WINAPI LZRead16( HFILE16 fd, LPVOID buf, UINT16 toread )
LONG WINAPI LZSeek16( HFILE16 fd, LONG off, INT16 type ) LONG WINAPI LZSeek16( HFILE16 fd, LONG off, INT16 type )
{ {
if (IS_LZ_HANDLE(fd)) return LZSeek( fd, off, 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 LZSeek16( HFILE16 fd, LONG off, INT16 type ) ...@@ -90,19 +90,19 @@ LONG WINAPI LZSeek16( HFILE16 fd, LONG off, INT16 type )
LONG WINAPI LZCopy16( HFILE16 src, HFILE16 dest ) LONG WINAPI LZCopy16( HFILE16 src, HFILE16 dest )
{ {
/* already a LZ handle? */ /* 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 */ /* no, try to open one */
src = LZInit16(src); src = LZInit16(src);
if ((INT16)src <= 0) return 0; if ((INT16)src <= 0) return 0;
if (IS_LZ_HANDLE(src)) if (IS_LZ_HANDLE(src))
{ {
LONG ret = LZCopy( src, DosFileHandleToWin32Handle(dest) ); LONG ret = LZCopy( src, (HFILE)DosFileHandleToWin32Handle(dest) );
LZClose( src ); LZClose( src );
return ret; return ret;
} }
/* it was not a compressed file */ /* it was not a compressed file */
return LZCopy( DosFileHandleToWin32Handle(src), DosFileHandleToWin32Handle(dest) ); return LZCopy( (HFILE)DosFileHandleToWin32Handle(src), (HFILE)DosFileHandleToWin32Handle(dest) );
} }
...@@ -116,7 +116,7 @@ HFILE16 WINAPI LZOpenFile16( LPCSTR fn, LPOFSTRUCT ofs, UINT16 mode ) ...@@ -116,7 +116,7 @@ HFILE16 WINAPI LZOpenFile16( LPCSTR fn, LPOFSTRUCT ofs, UINT16 mode )
if ((INT)hfret <= 0) return hfret; if ((INT)hfret <= 0) return hfret;
if (IS_LZ_HANDLE(hfret)) return hfret; if (IS_LZ_HANDLE(hfret)) return hfret;
/* but allocate a dos handle for 'normal' files */ /* but allocate a dos handle for 'normal' files */
return Win32HandleToDosFileHandle(hfret); return Win32HandleToDosFileHandle((HANDLE)hfret);
} }
...@@ -126,7 +126,7 @@ HFILE16 WINAPI LZOpenFile16( LPCSTR fn, LPOFSTRUCT ofs, UINT16 mode ) ...@@ -126,7 +126,7 @@ HFILE16 WINAPI LZOpenFile16( LPCSTR fn, LPOFSTRUCT ofs, UINT16 mode )
void WINAPI LZClose16( HFILE16 fd ) void WINAPI LZClose16( HFILE16 fd )
{ {
if (IS_LZ_HANDLE(fd)) LZClose( fd ); if (IS_LZ_HANDLE(fd)) LZClose( fd );
else DisposeLZ32Handle( DosFileHandleToWin32Handle(fd) ); else DisposeLZ32Handle( DosFileHandleToWin32Handle((HFILE)fd) );
} }
......
...@@ -557,7 +557,7 @@ void WINAPI LZClose( HFILE fd ) ...@@ -557,7 +557,7 @@ void WINAPI LZClose( HFILE fd )
else else
{ {
if (lzs->get) HeapFree( GetProcessHeap(), 0, lzs->get ); if (lzs->get) HeapFree( GetProcessHeap(), 0, lzs->get );
CloseHandle(lzs->realfd); CloseHandle((HANDLE)lzs->realfd);
lzstates[fd - 0x400] = NULL; lzstates[fd - 0x400] = NULL;
HeapFree( GetProcessHeap(), 0, lzs ); HeapFree( GetProcessHeap(), 0, lzs );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment