Sync to Wine-20040309

svn path=/trunk/; revision=8647
This commit is contained in:
Gé van Geldorp 2004-03-11 20:08:15 +00:00
parent 63c72aa8a8
commit dbdb5a1f76
3 changed files with 10 additions and 18 deletions

View file

@ -42,14 +42,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(cabinet); 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; THOSE_ZIP_CONSTS;
/* all the file IO is abstracted into these routines: /* 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 */ /* seek to end of file and get the length */
if ((cab->filelen = SetFilePointer(fh, 0, NULL, FILE_END)) == INVALID_SET_FILE_POINTER) { if ((cab->filelen = SetFilePointer(fh, 0, NULL, FILE_END)) == INVALID_SET_FILE_POINTER) {
if (GetLastError() != NO_ERROR) { if (GetLastError() != NO_ERROR) {
ERR("Seek END failed: %s", debugstr_a(name)); ERR("Seek END failed: %s\n", debugstr_a(name));
CloseHandle(fh); CloseHandle(fh);
return FALSE; return FALSE;
} }
@ -82,7 +74,7 @@ BOOL cabinet_open(struct cabinet *cab)
/* return to the start of the file */ /* return to the start of the file */
if (SetFilePointer(fh, 0, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) { 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); CloseHandle(fh);
return FALSE; return FALSE;
} }
@ -228,7 +220,7 @@ BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir)
fi->fh = 0; fi->fh = 0;
} }
} else } else
ERR("Couldn't ensure filepath for %s", debugstr_a(name)); ERR("Couldn't ensure filepath for %s\n", debugstr_a(name));
if (!ok) { if (!ok) {
ERR("Couldn't open file %s for writing\n", debugstr_a(name)); 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); TRACE("(cab == ^%p, distance == %u)\n", cab, distance);
if (SetFilePointer(cab->fh, distance, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER) { if (SetFilePointer(cab->fh, distance, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER) {
if (distance != 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 { do {
TRACE("trying cab == %s", debugstr_a(cab)); TRACE("trying cab == %s\n", debugstr_a(cab));
/* we don't want null cabinet filenames */ /* we don't want null cabinet filenames */
if (name[0] == '\0') { if (name[0] == '\0') {

View file

@ -36,12 +36,12 @@
#define CAB_SEARCH_SIZE (32*1024) #define CAB_SEARCH_SIZE (32*1024)
typedef unsigned char cab_UBYTE; /* 8 bits */ typedef unsigned char cab_UBYTE; /* 8 bits */
typedef unsigned short cab_UWORD; /* 16 bits */ typedef UINT16 cab_UWORD; /* 16 bits */
typedef unsigned int cab_ULONG; /* 32 bits */ typedef UINT32 cab_ULONG; /* 32 bits */
typedef signed int cab_LONG; /* 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 */ /* number of bits in a ULONG */
#ifndef CHAR_BIT #ifndef CHAR_BIT

View file