-/*
+/*
* LZ Decompression functions
*
* Copyright 1996 Marcus Meissner
*
*/
+#ifdef __REACTOS__
+
#include <k32.h>
#define NDEBUG
#define _lwrite(a, b, c) (long)(_hwrite(a, b, (long)c))
+#else /* __REACTOS__ */
+
+#include "config.h"
+
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "lzexpand.h"
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(file);
+
+#endif /* __REACTOS__ */
+
/* The readahead length of the decompressor. Reading single bytes
* using _lread() would be SLOW.
*/
memcpy(&(head->compressiontype),buf+LZ_MAGIC_LEN,1);
memcpy(&(head->lastchar),buf+LZ_MAGIC_LEN+1,1);
- /* FIXME: consider endianess on non-intel architectures */
+ /* FIXME: consider endianness on non-intel architectures */
memcpy(&(head->reallength),buf+LZ_MAGIC_LEN+2,4);
if (memcmp(head->magic,LZMagic,LZ_MAGIC_LEN))
/* not compressed? just copy */
if (!IS_LZ_HANDLE(src))
+#ifdef __REACTOS__
xread=(_readfun)_hread; // ROSHACK
+#else
+ xread=_lread;
+#endif
else
xread=(_readfun)LZRead;
len=0;
HFILE WINAPI LZOpenFileA( LPSTR fn, LPOFSTRUCT ofs, WORD mode )
{
HFILE fd,cfd;
+ BYTE ofs_cBytes = ofs->cBytes;
TRACE("(%s,%p,%d)\n",fn,ofs,mode);
/* 0x70 represents all OF_SHARE_* flags, ignore them for the check */
fd = OpenFile(mfn,ofs,mode);
HeapFree( GetProcessHeap(), 0, mfn );
}
+ if (fd==HFILE_ERROR)
+ ofs->cBytes = ofs_cBytes;
if ((mode&~0x70)!=OF_READ)
return fd;
if (fd==HFILE_ERROR)
}
}
+#ifdef __REACTOS__
+
/*
* @implemented
*/
return ERROR_CALL_NOT_IMPLEMENTED;
}
+#endif /* __REACTOS__ */