mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 23:55:07 +00:00
Make lzexpand use winedbg interface.
Merge latest changes with winehq CVS reactos/subsys/system/expand should work now svn path=/trunk/; revision=5777
This commit is contained in:
parent
62e998a88b
commit
9c1b0dcc9f
|
@ -8,9 +8,9 @@ TARGET_NAME = lz32
|
||||||
TARGET_BASE=0x76380000
|
TARGET_BASE=0x76380000
|
||||||
|
|
||||||
# require os code to explicitly request A/W version of structs/functions
|
# require os code to explicitly request A/W version of structs/functions
|
||||||
TARGET_CFLAGS += -D_DISABLE_TIDENTS
|
TARGET_CFLAGS += -D_DISABLE_TIDENTS -D__USE_W32API
|
||||||
|
|
||||||
TARGET_SDKLIBS = ntdll.a
|
TARGET_SDKLIBS = ntdll.a winedbgc.a
|
||||||
|
|
||||||
TARGET_OBJECTS = lzexpand_main.o
|
TARGET_OBJECTS = lzexpand_main.o
|
||||||
|
|
||||||
|
|
|
@ -21,15 +21,26 @@
|
||||||
* FIXME: return values might be wrong
|
* FIXME: return values might be wrong
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "lzexpand.h"
|
#include "lzexpand.h"
|
||||||
|
|
||||||
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/debug.h"
|
||||||
#include "wine/port.h"
|
#include "wine/port.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(file);
|
||||||
|
|
||||||
/* The readahead length of the decompressor. Reading single bytes
|
/* The readahead length of the decompressor. Reading single bytes
|
||||||
* using _lread() would be SLOW.
|
* using _lread() would be SLOW.
|
||||||
*/
|
*/
|
||||||
|
@ -445,7 +456,10 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest )
|
||||||
{
|
{
|
||||||
int usedlzinit=0,ret,wret;
|
int usedlzinit=0,ret,wret;
|
||||||
LONG len;
|
LONG len;
|
||||||
HFILE oldsrc = src;
|
HFILE oldsrc = src, srcfd;
|
||||||
|
FILETIME filetime;
|
||||||
|
struct lzstate *lzs;
|
||||||
|
|
||||||
#define BUFLEN 1000
|
#define BUFLEN 1000
|
||||||
BYTE buf[BUFLEN];
|
BYTE buf[BUFLEN];
|
||||||
/* we need that weird typedef, for i can't seem to get function pointer
|
/* we need that weird typedef, for i can't seem to get function pointer
|
||||||
|
@ -482,6 +496,13 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest )
|
||||||
if (wret!=ret)
|
if (wret!=ret)
|
||||||
return LZERROR_WRITE;
|
return LZERROR_WRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Maintain the timestamp of source file to destination file */
|
||||||
|
srcfd = (!(lzs = GET_LZ_STATE(src))) ? src : lzs->realfd;
|
||||||
|
GetFileTime((HANDLE)srcfd, NULL, NULL, &filetime);
|
||||||
|
SetFileTime((HANDLE)dest, NULL, NULL, &filetime);
|
||||||
|
|
||||||
|
/* close handle */
|
||||||
if (usedlzinit)
|
if (usedlzinit)
|
||||||
LZClose(src);
|
LZClose(src);
|
||||||
return len;
|
return len;
|
||||||
|
@ -507,7 +528,6 @@ static LPSTR LZEXPAND_MangleName( LPCSTR fn )
|
||||||
return mfn;
|
return mfn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* LZOpenFileA (LZ32.@)
|
* LZOpenFileA (LZ32.@)
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue