Commit fcfab4e5 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

storage.dll16: Enable compilation with long types.

parent 12576050
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = storage.dll16
IMPORTS = uuid ole32
EXTRADLLFLAGS = -m16 -Wb,--main-module,ole32.dll
......
......@@ -345,12 +345,12 @@ STORAGE_get_big_block(stream_access16 *str,int n,BYTE *block)
if ((SetFilePointer( str->hf, (n+1)*BIGSIZE, NULL,
SEEK_SET ) == INVALID_SET_FILE_POINTER) && GetLastError())
{
WARN("(%p,%d,%p), seek failed (%d)\n",str->hf, n, block, GetLastError());
WARN("(%p,%d,%p), seek failed (%ld)\n",str->hf, n, block, GetLastError());
return FALSE;
}
if (!ReadFile( str->hf, block, BIGSIZE, &result, NULL ) || result != BIGSIZE)
{
WARN("(hf=%p, block size %d): read didn't read (%d)\n",str->hf,n,GetLastError());
WARN("(hf=%p, block size %d): read didn't read (%ld)\n",str->hf,n,GetLastError());
return FALSE;
}
} else {
......@@ -374,7 +374,7 @@ STORAGE_get_big_block(stream_access16 *str,int n,BYTE *block)
(LPVOID)args,
(LPDWORD)&hres
)) {
ERR("CallTo16 ILockBytes16::ReadAt() failed, hres %x\n",hres);
ERR("CallTo16 ILockBytes16::ReadAt() failed, hres %lx\n",hres);
return FALSE;
}
memcpy(block, MapSL(args[3]), BIGSIZE);
......@@ -406,7 +406,7 @@ _ilockbytes16_writeat(SEGPTR lockbytes, DWORD offset, DWORD length, void *buffer
(LPVOID)args,
(LPDWORD)&hres
)) {
ERR("CallTo16 ILockBytes16::WriteAt() failed, hres %x\n",hres);
ERR("CallTo16 ILockBytes16::WriteAt() failed, hres %lx\n",hres);
return FALSE;
}
UnMapLS(args[3]);
......@@ -426,12 +426,12 @@ STORAGE_put_big_block(stream_access16 *str,int n,BYTE *block)
if ((SetFilePointer( str->hf, (n+1)*BIGSIZE, NULL,
SEEK_SET ) == INVALID_SET_FILE_POINTER) && GetLastError())
{
WARN("seek failed (%d)\n",GetLastError());
WARN("seek failed (%ld)\n",GetLastError());
return FALSE;
}
if (!WriteFile( str->hf, block, BIGSIZE, &result, NULL ) || result != BIGSIZE)
{
WARN(" write failed (%d)\n",GetLastError());
WARN(" write failed (%ld)\n",GetLastError());
return FALSE;
}
return TRUE;
......@@ -710,9 +710,9 @@ STORAGE_dump_pps_entry(struct storage_pps_entry *stde) {
return;
TRACE("name: %s\n",name);
TRACE("type: %d\n",stde->pps_type);
TRACE("prev pps: %d\n",stde->pps_prev);
TRACE("next pps: %d\n",stde->pps_next);
TRACE("dir pps: %d\n",stde->pps_dir);
TRACE("prev pps: %ld\n",stde->pps_prev);
TRACE("next pps: %ld\n",stde->pps_next);
TRACE("dir pps: %ld\n",stde->pps_dir);
TRACE("guid: %s\n",debugstr_guid(&(stde->pps_guid)));
if (stde->pps_type !=2) {
time_t t;
......@@ -724,8 +724,8 @@ STORAGE_dump_pps_entry(struct storage_pps_entry *stde) {
t = dw;
TRACE("ts2: %s\n",ctime(&t));
}
TRACE("startblock: %d\n",stde->pps_sb);
TRACE("size: %d\n",stde->pps_size);
TRACE("startblock: %ld\n",stde->pps_sb);
TRACE("size: %ld\n",stde->pps_size);
}
/******************************************************************************
......@@ -1102,7 +1102,7 @@ _ilockbytes16_addref(SEGPTR lockbytes) {
(LPVOID)args,
(LPDWORD)&hres
))
ERR("CallTo16 ILockBytes16::AddRef() failed, hres %x\n",hres);
ERR("CallTo16 ILockBytes16::AddRef() failed, hres %lx\n",hres);
}
static void
......@@ -1120,7 +1120,7 @@ _ilockbytes16_release(SEGPTR lockbytes) {
(LPVOID)args,
(LPDWORD)&hres
))
ERR("CallTo16 ILockBytes16::Release() failed, hres %x\n",hres);
ERR("CallTo16 ILockBytes16::Release() failed, hres %lx\n",hres);
}
static void
......@@ -1138,7 +1138,7 @@ _ilockbytes16_flush(SEGPTR lockbytes) {
(LPVOID)args,
(LPDWORD)&hres
))
ERR("CallTo16 ILockBytes16::Flush() failed, hres %x\n",hres);
ERR("CallTo16 ILockBytes16::Flush() failed, hres %lx\n",hres);
}
/******************************************************************************
......@@ -1176,7 +1176,7 @@ HRESULT CDECL IStream16_fnSeek(IStream16 *iface, LARGE_INTEGER offset, DWORD whe
ULARGE_INTEGER *newpos)
{
IStream16Impl *This = impl_from_IStream16(iface);
TRACE_(relay)("(%p)->([%d.%d],%d,%p)\n",This,offset.u.HighPart,offset.u.LowPart,whence,newpos);
TRACE_(relay)("(%p)->([%ld.%ld],%ld,%p)\n",This,offset.u.HighPart,offset.u.LowPart,whence,newpos);
switch (whence) {
case STREAM_SEEK_SET:
......@@ -1213,7 +1213,7 @@ HRESULT CDECL IStream16_fnRead(IStream16 *iface, void *pv, ULONG cb, ULONG *pcbR
int blocknr;
LPBYTE pbv = pv;
TRACE_(relay)("(%p)->(%p,%d,%p)\n",This,pv,cb,pcbRead);
TRACE_(relay)("(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbRead);
if (!pcbRead) bytesread=&xxread;
*bytesread = 0;
......@@ -1277,7 +1277,7 @@ HRESULT CDECL IStream16_fnWrite(IStream16 *iface, const void *pv, ULONG cb, ULON
if (!pcbWrite) byteswritten=&xxwritten;
*byteswritten = 0;
TRACE_(relay)("(%p)->(%p,%d,%p)\n",This,pv,cb,pcbWrite);
TRACE_(relay)("(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbWrite);
/* do we need to junk some blocks? */
newsize = This->offset.u.LowPart+cb;
oldsize = This->stde.pps_size;
......@@ -1647,7 +1647,7 @@ HRESULT CDECL IStorage16_fnStat(IStorage16 *iface, STATSTG16 *pstatstg, DWORD gr
DWORD len = WideCharToMultiByte( CP_ACP, 0, This->stde.pps_rawname, -1, NULL, 0, NULL, NULL );
LPSTR nameA = HeapAlloc( GetProcessHeap(), 0, len );
TRACE("(%p)->(%p,0x%08x)\n",
TRACE("(%p)->(%p,0x%08lx)\n",
This,pstatstg,grfStatFlag
);
WideCharToMultiByte( CP_ACP, 0, This->stde.pps_rawname, -1, nameA, len, NULL, NULL );
......@@ -1671,7 +1671,7 @@ HRESULT CDECL IStorage16_fnStat(IStorage16 *iface, STATSTG16 *pstatstg, DWORD gr
HRESULT CDECL IStorage16_fnCommit(IStorage16 *iface, DWORD commitflags)
{
IStorage16Impl *This = impl_from_IStorage16(iface);
FIXME("(%p)->(0x%08x),STUB!\n",
FIXME("(%p)->(0x%08lx),STUB!\n",
This,commitflags
);
return S_OK;
......@@ -1684,7 +1684,7 @@ HRESULT CDECL IStorage16_fnCopyTo(IStorage16 *iface, DWORD ciidExclude, const II
SNB16 SNB16Exclude, IStorage16 *pstgDest)
{
IStorage16Impl *This = impl_from_IStorage16(iface);
FIXME("IStorage16(%p)->(0x%08x,%s,%p,%p),stub!\n",
FIXME("IStorage16(%p)->(0x%08lx,%s,%p,%p),stub!\n",
This,ciidExclude,debugstr_guid(rgiidExclude),SNB16Exclude,pstgDest
);
return S_OK;
......@@ -1706,7 +1706,7 @@ HRESULT CDECL IStorage16_fnCreateStorage(IStorage16 *iface, LPCOLESTR16 pwcsName
int nPPSEntries;
READ_HEADER(&This->str);
TRACE("(%p)->(%s,0x%08x,0x%08x,0x%08x,%p)\n",
TRACE("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,grfMode,dwStgFormat,reserved2,ppstg
);
if (grfMode & STGM_TRANSACTED)
......@@ -1773,7 +1773,7 @@ HRESULT CDECL IStorage16_fnCreateStream(IStorage16 *iface, LPCOLESTR16 pwcsName,
BOOL ret;
int nPPSEntries;
TRACE("(%p)->(%s,0x%08x,0x%08x,0x%08x,%p)\n",
TRACE("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,grfMode,reserved1,reserved2,ppstm
);
if (grfMode & STGM_TRANSACTED)
......@@ -1835,7 +1835,7 @@ HRESULT CDECL IStorage16_fnOpenStorage(IStorage16 *iface, LPCOLESTR16 pwcsName,
WCHAR name[33];
int newpps;
TRACE("(%p)->(%s,%p,0x%08x,%p,0x%08x,%p)\n",
TRACE("(%p)->(%s,%p,0x%08lx,%p,0x%08lx,%p)\n",
This,pwcsName,pstgPrio,grfMode,snbExclude,reserved,ppstg
);
if (grfMode & STGM_TRANSACTED)
......@@ -1877,7 +1877,7 @@ HRESULT CDECL IStorage16_fnOpenStream(IStorage16 *iface, LPCOLESTR16 pwcsName, v
WCHAR name[33];
int newpps;
TRACE("(%p)->(%s,%p,0x%08x,0x%08x,%p)\n",
TRACE("(%p)->(%s,%p,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,reserved1,grfMode,reserved2,ppstm
);
if (grfMode & STGM_TRANSACTED)
......@@ -1990,13 +1990,13 @@ HRESULT WINAPI StgCreateDocFile16(
IStorage16Impl* lpstg;
struct storage_pps_entry stde;
TRACE("(%s,0x%08x,0x%08x,%p)\n",
TRACE("(%s,0x%08lx,0x%08lx,%p)\n",
pwcsName,grfMode,reserved,ppstgOpen
);
_create_istorage16(ppstgOpen);
hf = CreateFileA(pwcsName,GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_NEW,0,0);
if (hf==INVALID_HANDLE_VALUE) {
WARN("couldn't open file for storage:%d\n",GetLastError());
WARN("couldn't open file for storage:%ld\n",GetLastError());
return E_FAIL;
}
lpstg = MapSL((SEGPTR)*ppstgOpen);
......@@ -2051,7 +2051,7 @@ HRESULT WINAPI StgOpenStorage16(
IStorage16Impl* lpstg;
struct storage_pps_entry stde;
TRACE("(%s,%p,0x%08x,%p,%d,%p)\n",
TRACE("(%s,%p,0x%08lx,%p,%ld,%p)\n",
pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstgOpen
);
_create_istorage16(ppstgOpen);
......@@ -2106,7 +2106,7 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt)
(LPVOID)args,
(LPDWORD)&hres
)) {
ERR("CallTo16 ILockBytes16::ReadAt() failed, hres %x\n",hres);
ERR("CallTo16 ILockBytes16::ReadAt() failed, hres %lx\n",hres);
return hres;
}
if (memcmp(MapSL(args[3]), STORAGE_magic, sizeof(STORAGE_magic)) == 0) {
......@@ -2135,7 +2135,7 @@ HRESULT WINAPI StgOpenStorageOnILockBytes16(
int i,ret;
struct storage_pps_entry stde;
FIXME("(%x, %p, 0x%08x, %d, %x, %p)\n", plkbyt, pstgPriority, grfMode, (int)snbExclude, reserved, ppstgOpen);
FIXME("(%lx, %p, 0x%08lx, %d, %lx, %p)\n", plkbyt, pstgPriority, grfMode, (int)snbExclude, reserved, ppstgOpen);
if ((plkbyt == 0) || (ppstgOpen == 0))
return STG_E_INVALIDPOINTER;
......
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