riched20: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-17 07:11:43 +01:00 committed by Alexandre Julliard
parent 422f362ada
commit 42d0e56643
12 changed files with 221 additions and 222 deletions

View file

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = riched20.dll
IMPORTLIB = riched20
IMPORTS = uuid usp10 ole32 oleaut32 imm32 user32 gdi32

View file

@ -1387,7 +1387,7 @@ void ME_SendSelChange(ME_TextEditor *editor)
if (editor->nEventMask & ENM_SELCHANGE)
{
TRACE("cpMin=%d cpMax=%d seltyp=%d (%s %s)\n",
TRACE("cpMin=%ld cpMax=%ld seltyp=%d (%s %s)\n",
sc.chrg.cpMin, sc.chrg.cpMax, sc.seltyp,
(sc.seltyp & SEL_TEXT) ? "SEL_TEXT" : "",
(sc.seltyp & SEL_MULTICHAR) ? "SEL_MULTICHAR" : "");

View file

@ -77,7 +77,7 @@ static ULONG WINAPI EnumFormatImpl_AddRef(IEnumFORMATETC *iface)
{
EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
}
@ -85,7 +85,7 @@ static ULONG WINAPI EnumFormatImpl_Release(IEnumFORMATETC *iface)
{
EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) {
GlobalFree(This->fmtetc);
@ -100,7 +100,7 @@ static HRESULT WINAPI EnumFormatImpl_Next(IEnumFORMATETC *iface, ULONG celt,
{
EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface);
ULONG count = 0;
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
TRACE("(%p)->(%ld %p %p)\n", This, celt, rgelt, pceltFetched);
if(!rgelt)
return E_INVALIDARG;
@ -119,7 +119,7 @@ static HRESULT WINAPI EnumFormatImpl_Skip(IEnumFORMATETC *iface, ULONG celt)
{
EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface);
ULONG count = 0;
TRACE("(%p)->(%d)\n", This, celt);
TRACE("(%p)->(%ld)\n", This, celt);
count = min(celt, This->fmtetc_cnt-This->cur);
This->cur += count;
@ -194,7 +194,7 @@ static ULONG WINAPI DataObjectImpl_AddRef(IDataObject* iface)
{
DataObjectImpl *This = impl_from_IDataObject(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
}
@ -202,7 +202,7 @@ static ULONG WINAPI DataObjectImpl_Release(IDataObject* iface)
{
DataObjectImpl *This = impl_from_IDataObject(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n",This, ref);
TRACE("(%p) ref=%ld\n",This, ref);
if(!ref) {
if(This->unicode) GlobalFree(This->unicode);
@ -217,7 +217,7 @@ static ULONG WINAPI DataObjectImpl_Release(IDataObject* iface)
static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium)
{
DataObjectImpl *This = impl_from_IDataObject(iface);
TRACE("(%p)->(fmt=0x%08x tym=0x%08x)\n", This, pformatetc->cfFormat, pformatetc->tymed);
TRACE("(%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed);
if(pformatetc->lindex != -1)
return DV_E_LINDEX;
@ -250,7 +250,7 @@ static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC
DataObjectImpl *This = impl_from_IDataObject(iface);
UINT i;
BOOL foundFormat = FALSE;
TRACE("(%p)->(fmt=0x%08x tym=0x%08x)\n", This, pformatetc->cfFormat, pformatetc->tymed);
TRACE("(%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed);
if(pformatetc->lindex != -1)
return DV_E_LINDEX;
@ -290,10 +290,10 @@ static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject* iface, DWORD dwD
IEnumFORMATETC **ppenumFormatEtc)
{
DataObjectImpl *This = impl_from_IDataObject(iface);
TRACE("(%p)->(%d)\n", This, dwDirection);
TRACE("(%p)->(%ld)\n", This, dwDirection);
if(dwDirection != DATADIR_GET) {
FIXME("Unsupported direction: %d\n", dwDirection);
FIXME("Unsupported direction: %ld\n", dwDirection);
/* WinXP riched20 also returns E_NOTIMPL in this case */
*ppenumFormatEtc = NULL;
return E_NOTIMPL;

View file

@ -293,7 +293,7 @@ static LRESULT ME_StreamInText(ME_TextEditor *editor, DWORD dwFormat, ME_InStrea
static const char bom_utf8[] = {0xEF, 0xBB, 0xBF};
TRACE("%08x %p\n", dwFormat, stream);
TRACE("%08lx %p\n", dwFormat, stream);
do {
LONG nWideChars = 0;
@ -1575,7 +1575,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
ME_Cursor *selStart, *selEnd;
LRESULT num_read = 0; /* bytes read for SF_TEXT, non-control chars inserted for SF_RTF */
TRACE("stream==%p editor==%p format==0x%X\n", stream, editor, format);
TRACE("stream==%p editor==%p format==0x%lX\n", stream, editor, format);
editor->nEventMask = 0;
ME_GetSelectionOfs(editor, &from, &to);
@ -1841,11 +1841,11 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH
ME_Cursor cursor;
WCHAR wLastChar = ' ';
TRACE("flags==0x%08x, chrg->cpMin==%d, chrg->cpMax==%d text==%s\n",
TRACE("flags==0x%08lx, chrg->cpMin==%ld, chrg->cpMax==%ld text==%s\n",
flags, chrg->cpMin, chrg->cpMax, debugstr_w(text));
if (flags & ~(FR_DOWN | FR_MATCHCASE | FR_WHOLEWORD))
FIXME("Flags 0x%08x not implemented\n",
FIXME("Flags 0x%08lx not implemented\n",
flags & ~(FR_DOWN | FR_MATCHCASE | FR_WHOLEWORD));
nMin = chrg->cpMin;
@ -2084,7 +2084,7 @@ static int ME_GetTextEx(ME_TextEditor *editor, GETTEXTEX *ex, LPARAM pText)
if (!ex->cb || !pText) return 0;
if (ex->flags & ~(GT_SELECTION | GT_USECRLF))
FIXME("GETTEXTEX flags 0x%08x not supported\n", ex->flags & ~(GT_SELECTION | GT_USECRLF));
FIXME("GETTEXTEX flags 0x%08lx not supported\n", ex->flags & ~(GT_SELECTION | GT_USECRLF));
if (ex->flags & GT_SELECTION)
{
@ -2284,7 +2284,7 @@ static BOOL paste_special(ME_TextEditor *editor, UINT cf, REPASTESPECIAL *ps, BO
init_paste_formats();
if (ps && ps->dwAspect != DVASPECT_CONTENT)
FIXME("Ignoring aspect %x\n", ps->dwAspect);
FIXME("Ignoring aspect %lx\n", ps->dwAspect);
hr = OleGetClipboard( &data );
if (hr != S_OK) return FALSE;
@ -3294,7 +3294,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam,
{
CHARRANGE *pRange = (CHARRANGE *)lParam;
ME_GetSelectionOfs(editor, &pRange->cpMin, &pRange->cpMax);
TRACE("EM_EXGETSEL = (%d,%d)\n", pRange->cpMin, pRange->cpMax);
TRACE("EM_EXGETSEL = (%ld,%ld)\n", pRange->cpMin, pRange->cpMax);
return 0;
}
case EM_SETUNDOLIMIT:
@ -3407,7 +3407,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam,
bUnicode = !bRtf && pStruct->codepage == CP_UNICODE;
bUTF8 = (lParam && (!strncmp((char *)lParam, utf8_bom, 3)));
TRACE("EM_SETTEXTEX - %s, flags %d, cp %d\n",
TRACE("EM_SETTEXTEX - %s, flags %ld, cp %d\n",
bUnicode ? debugstr_w((LPCWSTR)lParam) : debugstr_a((LPCSTR)lParam),
pStruct->flags, pStruct->codepage);
@ -3606,7 +3606,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam,
ME_InternalDeleteText(editor, &cursor, ME_GetTextLength(editor), FALSE);
if (lParam)
{
TRACE("WM_SETTEXT lParam==%lx\n",lParam);
TRACE("WM_SETTEXT lParam==%Ix\n",lParam);
if (!strncmp((char *)lParam, "{\\rtf", 5) ||
!strncmp((char *)lParam, "{\\urtf", 6))
{
@ -3689,7 +3689,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam,
int nEnd = rng->chrg.cpMax;
int textlength = ME_GetTextLength(editor);
TRACE( "EM_GETTEXTRANGE min = %d max = %d textlength = %d\n", rng->chrg.cpMin, rng->chrg.cpMax, textlength );
TRACE( "EM_GETTEXTRANGE min = %ld max = %ld textlength = %d\n", rng->chrg.cpMin, rng->chrg.cpMax, textlength );
if (nStart < 0) return 0;
if ((nStart == 0 && nEnd == -1) || nEnd > textlength)
nEnd = textlength;
@ -3803,7 +3803,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam,
start_ofs = ME_GetCursorOfs( &cursor );
row_end_cursor( row, &cursor, FALSE );
end_ofs = ME_GetCursorOfs( &cursor );
TRACE( "EM_LINELENGTH(%ld)==%d\n", wParam, end_ofs - start_ofs );
TRACE( "EM_LINELENGTH(%Id)==%d\n", wParam, end_ofs - start_ofs );
return end_ofs - start_ofs;
}
case EM_EXLIMITTEXT:

View file

@ -806,10 +806,10 @@ void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048])
DUMP_EFFECT(PFM_RTLPARA, "RTL para:");
DUMP_EFFECT(PFM_SIDEBYSIDE, "Side by side:");
DUMP_EFFECT(PFM_TABLE, "Table:");
DUMP(PFM_OFFSETINDENT, "Offset indent:", "%d", dxStartIndent);
DUMP(PFM_STARTINDENT, "Start indent:", "%d", dxStartIndent);
DUMP(PFM_RIGHTINDENT, "Right indent:", "%d", dxRightIndent);
DUMP(PFM_OFFSET, "Offset:", "%d", dxOffset);
DUMP(PFM_OFFSETINDENT, "Offset indent:", "%ld", dxStartIndent);
DUMP(PFM_STARTINDENT, "Start indent:", "%ld", dxStartIndent);
DUMP(PFM_RIGHTINDENT, "Right indent:", "%ld", dxRightIndent);
DUMP(PFM_OFFSET, "Offset:", "%ld", dxOffset);
if (pFmt->dwMask & PFM_ALIGNMENT) {
switch (pFmt->wAlignment) {
case PFA_LEFT : p += sprintf(p, "Alignment: left\n"); break;
@ -824,12 +824,12 @@ void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048])
if (pFmt->dwMask & PFM_TABSTOPS) {
int i;
p += sprintf(p, "\t");
for (i = 0; i < pFmt->cTabCount; i++) p += sprintf(p, "%x ", pFmt->rgxTabs[i]);
for (i = 0; i < pFmt->cTabCount; i++) p += sprintf(p, "%lx ", pFmt->rgxTabs[i]);
p += sprintf(p, "\n");
}
DUMP(PFM_SPACEBEFORE, "Space Before:", "%d", dySpaceBefore);
DUMP(PFM_SPACEAFTER, "Space After:", "%d", dySpaceAfter);
DUMP(PFM_LINESPACING, "Line spacing:", "%d", dyLineSpacing);
DUMP(PFM_SPACEBEFORE, "Space Before:", "%ld", dySpaceBefore);
DUMP(PFM_SPACEAFTER, "Space After:", "%ld", dySpaceAfter);
DUMP(PFM_LINESPACING, "Line spacing:", "%ld", dyLineSpacing);
DUMP(PFM_STYLE, "Text style:", "%d", sStyle);
DUMP(PFM_LINESPACING, "Line spacing rule:", "%u", bLineSpacingRule);
/* bOutlineLevel should be 0 */

File diff suppressed because it is too large Load diff

View file

@ -199,7 +199,7 @@ void ME_CheckCharOffsets(ME_TextEditor *editor)
ofs = 0;
break;
case diRun:
TRACE_(richedit_check)("run, real ofs = %d (+ofsp = %d), counted = %d, len = %d, txt = %s, flags=%08x, fx&mask = %08x\n",
TRACE_(richedit_check)("run, real ofs = %d (+ofsp = %d), counted = %d, len = %d, txt = %s, flags=%08x, fx&mask = %08lx\n",
p->member.run.nCharOfs, p->member.run.nCharOfs+ofsp, ofsp+ofs,
p->member.run.len, debugstr_run( &p->member.run ),
p->member.run.nFlags,

View file

@ -264,12 +264,12 @@ void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048])
p += sprintf(p, "N/A");
if (pFmt->dwMask & CFM_SIZE)
p += sprintf(p, "\nFont size: %d\n", pFmt->yHeight);
p += sprintf(p, "\nFont size: %ld\n", pFmt->yHeight);
else
p += sprintf(p, "\nFont size: N/A\n");
if (pFmt->dwMask & CFM_OFFSET)
p += sprintf(p, "Char offset: %d\n", pFmt->yOffset);
p += sprintf(p, "Char offset: %ld\n", pFmt->yOffset);
else
p += sprintf(p, "Char offset: N/A\n");

View file

@ -1084,7 +1084,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
HRESULT hr = S_OK;
LRESULT res = 0;
TRACE( "enter hwnd %p msg %04x (%s) %lx %lx, unicode %d\n",
TRACE( "enter hwnd %p msg %04x (%s) %Ix %Ix, unicode %d\n",
hwnd, msg, get_msg_name(msg), wparam, lparam, unicode );
host = (struct host *)GetWindowLongPtrW( hwnd, 0 );
@ -1094,7 +1094,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
{
CREATESTRUCTW *pcs = (CREATESTRUCTW *)lparam;
TRACE( "WM_NCCREATE: hwnd %p style 0x%08x\n", hwnd, pcs->style );
TRACE( "WM_NCCREATE: hwnd %p style 0x%08lx\n", hwnd, pcs->style );
return create_windowed_editor( hwnd, pcs, FALSE );
}
else return DefWindowProcW( hwnd, msg, wparam, lparam );
@ -1108,7 +1108,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
res = send_msg_filter( host, msg, &wparam, &lparam );
if (!--host->notify_level && host->defer_release)
{
TRACE( "exit (filtered deferred release) hwnd %p msg %04x (%s) %lx %lx -> 0\n",
TRACE( "exit (filtered deferred release) hwnd %p msg %04x (%s) %Ix %Ix -> 0\n",
hwnd, msg, get_msg_name(msg), wparam, lparam );
ITextHost2_Release( &host->ITextHost_iface );
return 0;
@ -1116,7 +1116,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
if (res)
{
TRACE( "exit (filtered %lu) hwnd %p msg %04x (%s) %lx %lx -> 0\n",
TRACE( "exit (filtered %Iu) hwnd %p msg %04x (%s) %Ix %Ix -> 0\n",
res, hwnd, msg, get_msg_name(msg), wparam, lparam );
return 0;
}
@ -1497,7 +1497,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
if (hr == S_FALSE)
res = DefWindowProcW( hwnd, msg, wparam, lparam );
TRACE( "exit hwnd %p msg %04x (%s) %lx %lx, unicode %d -> %lu\n",
TRACE( "exit hwnd %p msg %04x (%s) %Ix %Ix, unicode %d -> %Iu\n",
hwnd, msg, get_msg_name(msg), wparam, lparam, unicode, res );
return res;
@ -1536,7 +1536,7 @@ LRESULT WINAPI RichEdit10ANSIWndProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM
{
CREATESTRUCTW *pcs = (CREATESTRUCTW *)lparam;
TRACE( "WM_NCCREATE: hwnd %p style 0x%08x\n", hwnd, pcs->style );
TRACE( "WM_NCCREATE: hwnd %p style 0x%08lx\n", hwnd, pcs->style );
return create_windowed_editor( hwnd, pcs, TRUE );
}
return RichEditANSIWndProc( hwnd, msg, wparam, lparam );
@ -1545,7 +1545,7 @@ LRESULT WINAPI RichEdit10ANSIWndProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM
static LRESULT WINAPI REComboWndProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
/* FIXME: Not implemented */
TRACE( "hwnd %p msg %04x (%s) %08lx %08lx\n",
TRACE( "hwnd %p msg %04x (%s) %08Ix %08Ix\n",
hwnd, msg, get_msg_name( msg ), wparam, lparam );
return DefWindowProcW( hwnd, msg, wparam, lparam );
}
@ -1553,7 +1553,7 @@ static LRESULT WINAPI REComboWndProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM
static LRESULT WINAPI REListWndProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
/* FIXME: Not implemented */
TRACE( "hwnd %p msg %04x (%s) %08lx %08lx\n",
TRACE( "hwnd %p msg %04x (%s) %08Ix %08Ix\n",
hwnd, msg, get_msg_name( msg ), wparam, lparam );
return DefWindowProcW( hwnd, msg, wparam, lparam );
}

View file

@ -65,7 +65,7 @@ static ULONG WINAPI ITextServicesImpl_AddRef(IUnknown *iface)
struct text_services *services = impl_from_IUnknown( iface );
LONG ref = InterlockedIncrement( &services->ref );
TRACE( "(%p) ref = %d\n", services, ref );
TRACE( "(%p) ref = %ld\n", services, ref );
return ref;
}
@ -75,7 +75,7 @@ static ULONG WINAPI ITextServicesImpl_Release(IUnknown *iface)
struct text_services *services = impl_from_IUnknown( iface );
LONG ref = InterlockedDecrement( &services->ref );
TRACE( "(%p) ref = %d\n", services, ref );
TRACE( "(%p) ref = %ld\n", services, ref );
if (!ref)
{
@ -161,7 +161,7 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxDraw( ITextServices *iface, DWORD
HDC dc = draw;
BOOL rewrap = FALSE;
TRACE( "%p: aspect %d, %d, %p, %p, draw %p, target %p, bounds %s, mf_bounds %s, update %s, %p, %d, view %d\n",
TRACE( "%p: aspect %ld, %ld, %p, %p, draw %p, target %p, bounds %s, mf_bounds %s, update %s, %p, %ld, view %ld\n",
services, aspect, index, aspect_info, td, draw, target, wine_dbgstr_rect( (RECT *)bounds ),
wine_dbgstr_rect( (RECT *)mf_bounds ), wine_dbgstr_rect( update ), continue_fn, continue_param, view_id );
@ -226,7 +226,7 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxSetCursor( ITextServices *iface
{
struct text_services *services = impl_from_ITextServices( iface );
TRACE( "%p: %d, %d, %p, %p, draw %p target %p client %s pos (%d, %d)\n", services, aspect, index, aspect_info, td, draw,
TRACE( "%p: %ld, %ld, %p, %p, draw %p target %p client %s pos (%d, %d)\n", services, aspect, index, aspect_info, td, draw,
target, wine_dbgstr_rect( client ), x, y );
if (aspect != DVASPECT_CONTENT || index || aspect_info || td || draw || target || client)
@ -367,7 +367,7 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetNaturalSize( ITextServices *if
BOOL rewrap = FALSE;
HRESULT hr;
TRACE( "%p: aspect %d, draw %p, target %p, td %p, mode %08x, extent %s, *width %d, *height %d\n", services,
TRACE( "%p: aspect %ld, draw %p, target %p, td %p, mode %08lx, extent %s, *width %ld, *height %ld\n", services,
aspect, draw, target, td, mode, wine_dbgstr_point( (POINT *)extent ), *width, *height );
if (aspect != DVASPECT_CONTENT || target || td || mode != TXTNS_FITTOCONTENT )
@ -413,7 +413,7 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxPropertyBitsChange( ITextServic
HRESULT hr;
BOOL repaint = FALSE;
TRACE( "%p, mask %08x, bits %08x\n", services, mask, bits );
TRACE( "%p, mask %08lx, bits %08lx\n", services, mask, bits );
services->editor->props = (services->editor->props & ~mask) | (bits & mask);
if (mask & (TXTBIT_WORDWRAP | TXTBIT_MULTILINE))

View file

@ -136,7 +136,7 @@ static ME_Run *split_run_extents( ME_WrapContext *wc, ME_Run *run, int nVChar )
assert( run->nCharOfs != -1 );
ME_CheckCharOffsets(editor);
TRACE("Before split: %s(%d, %d)\n", debugstr_run( run ),
TRACE("Before split: %s(%ld, %ld)\n", debugstr_run( run ),
run->pt.x, run->pt.y);
run_split( editor, &cursor );
@ -153,7 +153,7 @@ static ME_Run *split_run_extents( ME_WrapContext *wc, ME_Run *run, int nVChar )
ME_CheckCharOffsets(editor);
TRACE("After split: %s(%d, %d), %s(%d, %d)\n",
TRACE("After split: %s(%ld, %ld), %s(%ld, %ld)\n",
debugstr_run( run ), run->pt.x, run->pt.y,
debugstr_run( run2 ), run2->pt.x, run2->pt.y);
@ -274,7 +274,7 @@ static void layout_row( ME_Run *start, ME_Run *last )
for (i = 0, run = start; i < num_runs; run = run_next( run ))
{
run->pt.x = pos[ log_to_vis[ i ] ];
TRACE( "%d: x = %d\n", i, run->pt.x );
TRACE( "%d: x = %ld\n", i, run->pt.x );
i++;
}

View file

@ -76,7 +76,7 @@ ME_StreamOutFlush(ME_OutStream *pStream)
nWritten = pStream->pos;
stream->dwError = stream->pfnCallback(stream->dwCookie, (LPBYTE)pStream->buffer,
pStream->pos, &nWritten);
TRACE("error=%u written=%u\n", stream->dwError, nWritten);
TRACE("error=%lu written=%lu\n", stream->dwError, nWritten);
if (nWritten == 0 || stream->dwError)
return FALSE;
/* Don't resend partial chunks if nWritten < pStream->pos */
@ -92,7 +92,7 @@ static LONG
ME_StreamOutFree(ME_OutStream *pStream)
{
LONG written = pStream->written;
TRACE("total length = %u\n", written);
TRACE("total length = %lu\n", written);
heap_free(pStream);
return written;
@ -400,9 +400,9 @@ static BOOL stream_out_table_props( ME_TextEditor *editor, ME_OutStream *pStream
cell = table_row_first_cell( para );
assert( cell );
if (pFmt->dxOffset)
sprintf(props + strlen(props), "\\trgaph%d", pFmt->dxOffset);
sprintf(props + strlen(props), "\\trgaph%ld", pFmt->dxOffset);
if (pFmt->dxStartIndent)
sprintf(props + strlen(props), "\\trleft%d", pFmt->dxStartIndent);
sprintf(props + strlen(props), "\\trleft%ld", pFmt->dxStartIndent);
do
{
ME_Border* borders[4] = { &cell->border.top, &cell->border.left,
@ -434,9 +434,9 @@ static BOOL stream_out_table_props( ME_TextEditor *editor, ME_OutStream *pStream
assert( !(para->nFlags & (MEPF_ROWSTART | MEPF_ROWEND | MEPF_CELL)) );
if (pFmt->dxOffset)
sprintf(props + strlen(props), "\\trgaph%d", pFmt->dxOffset);
sprintf(props + strlen(props), "\\trgaph%ld", pFmt->dxOffset);
if (pFmt->dxStartIndent)
sprintf(props + strlen(props), "\\trleft%d", pFmt->dxStartIndent);
sprintf(props + strlen(props), "\\trleft%ld", pFmt->dxStartIndent);
for (i = 0; i < 4; i++)
{
if (borders[i]->width)
@ -452,7 +452,7 @@ static BOOL stream_out_table_props( ME_TextEditor *editor, ME_OutStream *pStream
}
for (i = 0; i < pFmt->cTabCount; i++)
{
sprintf(props + strlen(props), "\\cellx%d", pFmt->rgxTabs[i] & 0x00FFFFFF);
sprintf(props + strlen(props), "\\cellx%ld", pFmt->rgxTabs[i] & 0x00FFFFFF);
}
}
if (!ME_StreamOutPrint(pStream, props))
@ -631,13 +631,13 @@ static BOOL stream_out_para_props( ME_TextEditor *editor, ME_OutStream *pStream,
strcat(props, "\\sl-480\\slmult1");
break;
case 3:
sprintf(props + strlen(props), "\\sl%d\\slmult0", fmt->dyLineSpacing);
sprintf(props + strlen(props), "\\sl%ld\\slmult0", fmt->dyLineSpacing);
break;
case 4:
sprintf(props + strlen(props), "\\sl-%d\\slmult0", fmt->dyLineSpacing);
sprintf(props + strlen(props), "\\sl-%ld\\slmult0", fmt->dyLineSpacing);
break;
case 5:
sprintf(props + strlen(props), "\\sl-%d\\slmult1", fmt->dyLineSpacing * 240 / 20);
sprintf(props + strlen(props), "\\sl-%ld\\slmult1", fmt->dyLineSpacing * 240 / 20);
break;
}
}
@ -663,11 +663,11 @@ static BOOL stream_out_para_props( ME_TextEditor *editor, ME_OutStream *pStream,
fmt->dwMask & PFM_TABLE && fmt->wEffects & PFE_TABLE))
{
if (fmt->dxOffset)
sprintf(props + strlen(props), "\\li%d", fmt->dxOffset);
sprintf(props + strlen(props), "\\li%ld", fmt->dxOffset);
if (fmt->dxStartIndent)
sprintf(props + strlen(props), "\\fi%d", fmt->dxStartIndent);
sprintf(props + strlen(props), "\\fi%ld", fmt->dxStartIndent);
if (fmt->dxRightIndent)
sprintf(props + strlen(props), "\\ri%d", fmt->dxRightIndent);
sprintf(props + strlen(props), "\\ri%ld", fmt->dxRightIndent);
if (fmt->dwMask & PFM_TABSTOPS) {
static const char * const leader[6] = { "", "\\tldot", "\\tlhyph", "\\tlul", "\\tlth", "\\tleq" };
@ -690,14 +690,14 @@ static BOOL stream_out_para_props( ME_TextEditor *editor, ME_OutStream *pStream,
}
if (fmt->rgxTabs[i] >> 28 <= 5)
strcat(props, leader[fmt->rgxTabs[i] >> 28]);
sprintf(props+strlen(props), "\\tx%d", fmt->rgxTabs[i]&0x00FFFFFF);
sprintf(props+strlen(props), "\\tx%ld", fmt->rgxTabs[i]&0x00FFFFFF);
}
}
}
if (fmt->dySpaceAfter)
sprintf(props + strlen(props), "\\sa%d", fmt->dySpaceAfter);
sprintf(props + strlen(props), "\\sa%ld", fmt->dySpaceAfter);
if (fmt->dySpaceBefore)
sprintf(props + strlen(props), "\\sb%d", fmt->dySpaceBefore);
sprintf(props + strlen(props), "\\sb%ld", fmt->dySpaceBefore);
if (fmt->sStyle != -1)
sprintf(props + strlen(props), "\\s%d", fmt->sStyle);
@ -791,12 +791,12 @@ ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt)
if (old_fmt->yOffset != fmt->yOffset)
{
if (fmt->yOffset >= 0)
sprintf(props + strlen(props), "\\up%d", fmt->yOffset);
sprintf(props + strlen(props), "\\up%ld", fmt->yOffset);
else
sprintf(props + strlen(props), "\\dn%d", -fmt->yOffset);
sprintf(props + strlen(props), "\\dn%ld", -fmt->yOffset);
}
if (old_fmt->yHeight != fmt->yHeight)
sprintf(props + strlen(props), "\\fs%d", fmt->yHeight / 10);
sprintf(props + strlen(props), "\\fs%ld", fmt->yHeight / 10);
if (old_fmt->sSpacing != fmt->sSpacing)
sprintf(props + strlen(props), "\\expnd%u\\expndtw%u", fmt->sSpacing / 5, fmt->sSpacing);
if ((old_fmt->dwEffects ^ fmt->dwEffects) & (CFM_SUBSCRIPT | CFM_SUPERSCRIPT))