From dbdb5a1f76fffbebdbe9a531c2684334834dfdf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 11 Mar 2004 20:08:15 +0000 Subject: [PATCH] Sync to Wine-20040309 svn path=/trunk/; revision=8647 --- reactos/lib/cabinet/cabextract.c | 18 +++++------------- reactos/lib/cabinet/cabinet.h | 10 +++++----- reactos/lib/cabinet/winehq2ros.patch | 0 3 files changed, 10 insertions(+), 18 deletions(-) create mode 100644 reactos/lib/cabinet/winehq2ros.patch diff --git a/reactos/lib/cabinet/cabextract.c b/reactos/lib/cabinet/cabextract.c index a7350b3a42b..566cccd162f 100644 --- a/reactos/lib/cabinet/cabextract.c +++ b/reactos/lib/cabinet/cabextract.c @@ -42,14 +42,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cabinet); -/* ReactOS Hack */ -extern inline DWORD WINAPI GetLastError(void) -{ - DWORD ret; - __asm__ __volatile__( ".byte 0x64\n\tmovl 0x34,%0" : "=r" (ret) ); - return ret; -} - THOSE_ZIP_CONSTS; /* all the file IO is abstracted into these routines: @@ -74,7 +66,7 @@ BOOL cabinet_open(struct cabinet *cab) /* seek to end of file and get the length */ if ((cab->filelen = SetFilePointer(fh, 0, NULL, FILE_END)) == INVALID_SET_FILE_POINTER) { if (GetLastError() != NO_ERROR) { - ERR("Seek END failed: %s", debugstr_a(name)); + ERR("Seek END failed: %s\n", debugstr_a(name)); CloseHandle(fh); return FALSE; } @@ -82,7 +74,7 @@ BOOL cabinet_open(struct cabinet *cab) /* return to the start of the file */ if (SetFilePointer(fh, 0, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) { - ERR("Seek BEGIN failed: %s", debugstr_a(name)); + ERR("Seek BEGIN failed: %s\n", debugstr_a(name)); CloseHandle(fh); return FALSE; } @@ -228,7 +220,7 @@ BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir) fi->fh = 0; } } else - ERR("Couldn't ensure filepath for %s", debugstr_a(name)); + ERR("Couldn't ensure filepath for %s\n", debugstr_a(name)); if (!ok) { ERR("Couldn't open file %s for writing\n", debugstr_a(name)); @@ -287,7 +279,7 @@ void cabinet_skip(struct cabinet *cab, cab_off_t distance) TRACE("(cab == ^%p, distance == %u)\n", cab, distance); if (SetFilePointer(cab->fh, distance, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER) { if (distance != INVALID_SET_FILE_POINTER) - ERR("%s", debugstr_a((char *) cab->filename)); + ERR("%s\n", debugstr_a((char *) cab->filename)); } } @@ -2099,7 +2091,7 @@ void find_cabinet_file(char **cabname, LPCSTR origcab) { } do { - TRACE("trying cab == %s", debugstr_a(cab)); + TRACE("trying cab == %s\n", debugstr_a(cab)); /* we don't want null cabinet filenames */ if (name[0] == '\0') { diff --git a/reactos/lib/cabinet/cabinet.h b/reactos/lib/cabinet/cabinet.h index 22e1bbf941e..47221d26b6d 100644 --- a/reactos/lib/cabinet/cabinet.h +++ b/reactos/lib/cabinet/cabinet.h @@ -36,12 +36,12 @@ #define CAB_SEARCH_SIZE (32*1024) -typedef unsigned char cab_UBYTE; /* 8 bits */ -typedef unsigned short cab_UWORD; /* 16 bits */ -typedef unsigned int cab_ULONG; /* 32 bits */ -typedef signed int cab_LONG; /* 32 bits */ +typedef unsigned char cab_UBYTE; /* 8 bits */ +typedef UINT16 cab_UWORD; /* 16 bits */ +typedef UINT32 cab_ULONG; /* 32 bits */ +typedef INT32 cab_LONG; /* 32 bits */ -typedef unsigned int cab_off_t; +typedef UINT32 cab_off_t; /* number of bits in a ULONG */ #ifndef CHAR_BIT diff --git a/reactos/lib/cabinet/winehq2ros.patch b/reactos/lib/cabinet/winehq2ros.patch new file mode 100644 index 00000000000..e69de29bb2d