comdlg32: Win64 printf format warning fixes.

This commit is contained in:
Michael Ploujnikov 2006-10-13 09:04:43 -04:00 committed by Alexandre Julliard
parent 0293abb2a6
commit fb7ed587e9
13 changed files with 41 additions and 42 deletions

View File

@ -7,7 +7,6 @@ IMPORTLIB = libcomdlg32.$(IMPLIBEXT)
IMPORTS = shell32 shlwapi comctl32 winspool user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = ole32
EXTRALIBS = -luuid
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \
cdlg32.c \

View File

@ -73,7 +73,7 @@ static const char * GPA_string = "Failed to get entry point %s for hinst = 0x%08
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
{
TRACE("(%p, %ld, %p)\n", hInstance, Reason, Reserved);
TRACE("(%p, %d, %p)\n", hInstance, Reason, Reserved);
switch(Reason)
{
@ -154,7 +154,7 @@ LPVOID COMDLG32_AllocMem(
*/
void COMDLG32_SetCommDlgExtendedError(DWORD err)
{
TRACE("(%08lx)\n", err);
TRACE("(%08x)\n", err);
if (COMDLG32_TlsIndex == TLS_OUT_OF_INDEXES)
COMDLG32_TlsIndex = TlsAlloc();
if (COMDLG32_TlsIndex != TLS_OUT_OF_INDEXES)

View File

@ -447,7 +447,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
if (!hGlobal16)
{
COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
ERR("alloc failure for %ld bytes\n", size);
ERR("alloc failure for %d bytes\n", size);
return FALSE;
}
template = GlobalLock16(hGlobal16);

View File

@ -255,7 +255,7 @@ static BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos)
/* test for missing functionality */
if (fodInfos->ofnInfos->Flags & UNIMPLEMENTED_FLAGS)
{
FIXME("Flags 0x%08lx not yet implemented\n",
FIXME("Flags 0x%08x not yet implemented\n",
fodInfos->ofnInfos->Flags & UNIMPLEMENTED_FLAGS);
}
@ -1915,7 +1915,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
if(SUCCEEDED(IShellFolder_ParseDisplayName(lpsf, hwnd, NULL, lpwstrTemp, &dwEaten, &pidl, &dwAttributes)))
{
/* the path component is valid, we have a pidl of the next path component */
TRACE("parse OK attr=0x%08lx pidl=%p\n", dwAttributes, pidl);
TRACE("parse OK attr=0x%08x pidl=%p\n", dwAttributes, pidl);
if(dwAttributes & SFGAO_FOLDER)
{
if(FAILED(IShellFolder_BindToObject(lpsf, pidl, 0, &IID_IShellFolder, (LPVOID*)&lpsfChild)))
@ -2832,7 +2832,7 @@ static int FILEDLG95_LOOKIN_AddItem(HWND hwnd,LPITEMIDLIST pidl, int iInsertId)
SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX
| SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED);
TRACE("-- Add %s attr=%08lx\n", sfi.szDisplayName, sfi.dwAttributes);
TRACE("-- Add %s attr=%08x\n", sfi.szDisplayName, sfi.dwAttributes);
if((sfi.dwAttributes & SFGAO_FILESYSANCESTOR) || (sfi.dwAttributes & SFGAO_FILESYSTEM))
{
@ -3425,7 +3425,7 @@ BOOL IsPidlFolder (LPSHELLFOLDER psf, LPCITEMIDLIST pidl)
ret = IShellFolder_GetAttributesOf( psf, 1, &pidl, &uAttr );
TRACE("-- 0x%08lx 0x%08lx\n", uAttr, ret);
TRACE("-- 0x%08x 0x%08x\n", uAttr, ret);
/* see documentation shell 4.1*/
return uAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER);
}
@ -3757,7 +3757,7 @@ static BOOL GetFileName31A(LPOPENFILENAMEA lpofn, /* addess of structure with da
if (!lpofn || !FD31_Init()) return FALSE;
TRACE("ofn flags %08lx\n", lpofn->Flags);
TRACE("ofn flags %08x\n", lpofn->Flags);
FD32_SetupCallbacks(&callbacks);
lfs = FD31_AllocPrivate((LPARAM) lpofn, dlgType, &callbacks, (DWORD) FALSE);
if (lfs)
@ -3820,7 +3820,7 @@ BOOL WINAPI GetOpenFileNameA(
{
BOOL win16look = FALSE;
TRACE("flags %08lx\n", ofn->Flags);
TRACE("flags %08x\n", ofn->Flags);
/* OFN_FILEMUSTEXIST implies OFN_PATHMUSTEXIST */
if (ofn->Flags & OFN_FILEMUSTEXIST)
@ -3850,7 +3850,7 @@ BOOL WINAPI GetOpenFileNameW(
{
BOOL win16look = FALSE;
TRACE("flags %08lx\n", ofn->Flags);
TRACE("flags %08x\n", ofn->Flags);
/* OFN_FILEMUSTEXIST implies OFN_PATHMUSTEXIST */
if (ofn->Flags & OFN_FILEMUSTEXIST)

View File

@ -135,7 +135,7 @@ static BOOL FD16_GetTemplate(PFD31_DATA lfs)
if (!hGlobal16)
{
COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
ERR("alloc failure for %ld bytes\n", size);
ERR("alloc failure for %d bytes\n", size);
return FALSE;
}
template = GlobalLock16(hGlobal16);

View File

@ -826,7 +826,7 @@ LONG FD31_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
lfs->hwnd = hWnd;
ofn = lfs->ofnW;
TRACE("flags=%lx initialdir=%s\n", ofn->Flags, debugstr_w(ofn->lpstrInitialDir));
TRACE("flags=%x initialdir=%s\n", ofn->Flags, debugstr_w(ofn->lpstrInitialDir));
SetWindowTextW( hWnd, ofn->lpstrTitle );
/* read custom filter information */
@ -872,7 +872,7 @@ LONG FD31_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
SendDlgItemMessageW(hWnd, cmb1, CB_SETCURSEL, ofn->nFilterIndex - 1, 0);
lstrcpynW(tmpstr, FD31_GetFileType(ofn->lpstrCustomFilter,
(LPWSTR)ofn->lpstrFilter, ofn->nFilterIndex - 1),BUFFILE);
TRACE("nFilterIndex = %ld, SetText of edt1 to %s\n",
TRACE("nFilterIndex = %d, SetText of edt1 to %s\n",
ofn->nFilterIndex, debugstr_w(tmpstr));
SetDlgItemTextW( hWnd, edt1, tmpstr );
/* get drive list */

View File

@ -164,7 +164,7 @@ static void COMDLG32_UpdateCurrentDir(FileOpenDlgInfos *fodInfos)
/* copied from shell32 to avoid linking to it */
static HRESULT COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
{
TRACE("dest=%p len=0x%lx strret=%p pidl=%p stub\n",dest,len,src,pidl);
TRACE("dest=%p len=0x%x strret=%p pidl=%p stub\n",dest,len,src,pidl);
switch (src->uType)
{
@ -275,7 +275,7 @@ static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface)
IShellBrowserImpl *This = (IShellBrowserImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p,%lu)\n", This, ref - 1);
TRACE("(%p,%u)\n", This, ref - 1);
return ref;
}
@ -288,7 +288,7 @@ static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface)
IShellBrowserImpl *This = (IShellBrowserImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p,%lu)\n", This, ref + 1);
TRACE("(%p,%u)\n", This, ref + 1);
if (!ref)
{
@ -488,7 +488,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
return hRes;
error:
ERR("Failed with error 0x%08lx\n", hRes);
ERR("Failed with error 0x%08x\n", hRes);
return hRes;
}
@ -533,7 +533,7 @@ static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface,
{
IShellBrowserImpl *This = (IShellBrowserImpl *)iface;
FIXME("(%p 0x%08lx %p)\n", This, grfMode, ppStrm);
FIXME("(%p 0x%08x %p)\n", This, grfMode, ppStrm);
/* Feature not implemented */
return E_NOTIMPL;

View File

@ -126,7 +126,7 @@ static BOOL FINDDLG_Get16BitsTemplate(LFRPRIVATE lfr)
if (!hGlobal16)
{
COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
ERR("alloc failure for %ld bytes\n", size);
ERR("alloc failure for %d bytes\n", size);
return FALSE;
}
lfr->template = GlobalLock16(hGlobal16);

View File

@ -374,7 +374,7 @@ static HWND COMDLG32_FR_DoFindReplace(
DWORD error;
LPDLGTEMPLATEW rcs;
TRACE("hInst=%p, Flags=%08lx\n", pdata->fr.hInstance, pdata->fr.Flags);
TRACE("hInst=%p, Flags=%08x\n", pdata->fr.hInstance, pdata->fr.Flags);
if(!(pdata->fr.Flags & FR_ENABLETEMPLATEHANDLE))
{

View File

@ -471,7 +471,7 @@ INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
HDC hdc;
TRACE("(nFontType=%d)\n",nFontType);
TRACE(" %s h=%ld w=%ld e=%ld o=%ld wg=%ld i=%d u=%d s=%d"
TRACE(" %s h=%d w=%d e=%d o=%d wg=%d i=%d u=%d s=%d"
" ch=%d op=%d cp=%d q=%d pf=%xh\n",
debugstr_w(lplf->lfFaceName),lplf->lfHeight,lplf->lfWidth,
lplf->lfEscapement,lplf->lfOrientation,
@ -869,7 +869,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
HDC hdc;
LPLOGFONTW lpxx=lpcf->lpLogFont;
TRACE("WM_COMMAND wParam=%08lX lParam=%08lX\n", (LONG)wParam, lParam);
TRACE("WM_COMMAND wParam=%08X lParam=%08lX\n", (LONG)wParam, lParam);
switch (LOWORD(wParam))
{
case cmb1:
@ -1082,7 +1082,7 @@ LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpcf)
MapWindowPoints( 0, hDlg, (LPPOINT) &info.rcWindow, 2);
hdc = BeginPaint( hDlg, &ps );
TRACE("erase %d, rect=(%ld,%ld)-(%ld,%ld)\n", ps.fErase,
TRACE("erase %d, rect=(%d,%d)-(%d,%d)\n", ps.fErase,
ps.rcPaint.left, ps.rcPaint.top,
ps.rcPaint.right, ps.rcPaint.bottom);

View File

@ -231,7 +231,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
if (!hGlobal16)
{
COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
ERR("alloc failure for %ld bytes\n", size);
ERR("alloc failure for %d bytes\n", size);
return FALSE;
}
template = GlobalLock16(hGlobal16);

View File

@ -2006,7 +2006,7 @@ BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
}
TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
"pp. %d-%d, min p %d, max p %d, copies %d, hinst %p\n"
"flags %08lx (%s)\n",
"flags %08x (%s)\n",
lppd, lppd->hwndOwner, lppd->hDevMode, lppd->hDevNames,
lppd->nFromPage, lppd->nToPage, lppd->nMinPage, lppd->nMaxPage,
lppd->nCopies, lppd->hInstance, lppd->Flags, flagstr);
@ -2042,7 +2042,7 @@ BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
GetPrinterDriverA(hprn, NULL, 3, NULL, 0, &needed);
dbuf = HeapAlloc(GetProcessHeap(),0,needed);
if (!GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed)) {
ERR("GetPrinterDriverA failed, le %ld, fix your config for printer %s!\n",GetLastError(),pbuf->pPrinterName);
ERR("GetPrinterDriverA failed, le %d, fix your config for printer %s!\n",GetLastError(),pbuf->pPrinterName);
COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
return FALSE;
}
@ -2148,7 +2148,7 @@ BOOL WINAPI PrintDlgW(
}
TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
"pp. %d-%d, min p %d, max p %d, copies %d, hinst %p\n"
"flags %08lx (%s)\n",
"flags %08x (%s)\n",
lppd, lppd->hwndOwner, lppd->hDevMode, lppd->hDevNames,
lppd->nFromPage, lppd->nToPage, lppd->nMinPage, lppd->nMaxPage,
lppd->nCopies, lppd->hInstance, lppd->Flags, flagstr);
@ -2184,7 +2184,7 @@ BOOL WINAPI PrintDlgW(
GetPrinterDriverW(hprn, NULL, 3, NULL, 0, &needed);
dbuf = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*needed);
if (!GetPrinterDriverW(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed)) {
ERR("GetPrinterDriverA failed, le %ld, fix your config for printer %s!\n",GetLastError(),debugstr_w(pbuf->pPrinterName));
ERR("GetPrinterDriverA failed, le %d, fix your config for printer %s!\n",GetLastError(),debugstr_w(pbuf->pPrinterName));
COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
return FALSE;
}
@ -2378,15 +2378,15 @@ static void
_c_size2strA(PageSetupDataA *pda,DWORD size,LPSTR strout) {
strcpy(strout,"<undef>");
if (pda->dlga->Flags & PSD_INHUNDREDTHSOFMILLIMETERS) {
sprintf(strout,"%ld",(size)/100);
sprintf(strout,"%d",(size)/100);
return;
}
if (pda->dlga->Flags & PSD_INTHOUSANDTHSOFINCHES) {
sprintf(strout,"%ldin",(size)/1000);
sprintf(strout,"%din",(size)/1000);
return;
}
pda->dlga->Flags |= PSD_INHUNDREDTHSOFMILLIMETERS;
sprintf(strout,"%ld",(size)/100);
sprintf(strout,"%d",(size)/100);
return;
}
static void
@ -2687,7 +2687,7 @@ PRINTDLG_PS_ChangePaperPrev(PageSetupDataA *pda)
}
x = (pda->rtDrawRect.right + pda->rtDrawRect.left - width) / 2;
y = (pda->rtDrawRect.bottom + pda->rtDrawRect.top - height) / 2;
TRACE("rtDrawRect(%ld, %ld, %ld, %ld) x=%ld, y=%ld, w=%ld, h=%ld\n",
TRACE("rtDrawRect(%d, %d, %d, %d) x=%d, y=%d, w=%d, h=%d\n",
pda->rtDrawRect.left, pda->rtDrawRect.top, pda->rtDrawRect.right, pda->rtDrawRect.bottom,
x, y, width, height);
@ -3343,7 +3343,7 @@ BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA setupdlg) {
}
}
TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
"hinst %p, flags %08lx (%s)\n",
"hinst %p, flags %08x (%s)\n",
setupdlg, setupdlg->hwndOwner, setupdlg->hDevMode,
setupdlg->hDevNames,
setupdlg->hInstance, setupdlg->Flags, flagstr);
@ -3445,7 +3445,7 @@ BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg) {
}
}
TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
"hinst %p, flags %08lx (%s)\n",
"hinst %p, flags %08x (%s)\n",
setupdlg, setupdlg->hwndOwner, setupdlg->hDevMode,
setupdlg->hDevNames,
setupdlg->hInstance, setupdlg->Flags, flagstr);

View File

@ -249,7 +249,7 @@ static HGLOBAL16 PRINTDLG_Get16TemplateFrom32(LPCSTR PrintResourceName)
if (!hGlobal16)
{
COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
ERR("alloc failure for %ld bytes\n", size);
ERR("alloc failure for %d bytes\n", size);
return 0;
}
template = GlobalLock16(hGlobal16);
@ -356,14 +356,14 @@ BOOL16 WINAPI PrintDlg16(
}
TRACE("(%p): hwndOwner = %08x, hDevMode = %08x, hDevNames = %08x\n"
"pp. %d-%d, min p %d, max p %d, copies %d, hinst %08x\n"
"flags %08lx (%s)\n",
"flags %08x (%s)\n",
lppd, lppd->hwndOwner, lppd->hDevMode, lppd->hDevNames,
lppd->nFromPage, lppd->nToPage, lppd->nMinPage, lppd->nMaxPage,
lppd->nCopies, lppd->hInstance, lppd->Flags, flagstr);
}
if(lppd->lStructSize != sizeof(PRINTDLG16)) {
ERR("structure size %ld\n",lppd->lStructSize);
ERR("structure size %d\n",lppd->lStructSize);
COMDLG32_SetCommDlgExtendedError(CDERR_STRUCTSIZE);
return FALSE;
}
@ -391,7 +391,7 @@ BOOL16 WINAPI PrintDlg16(
GetPrinterDriverA(hprn, NULL, 3, NULL, 0, &needed);
dbuf = HeapAlloc(GetProcessHeap(),0,needed);
if (!GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed)) {
ERR("GetPrinterDriverA failed for %s, le %ld, fix your config!\n",
ERR("GetPrinterDriverA failed for %s, le %d, fix your config!\n",
pbuf->pPrinterName,GetLastError());
HeapFree(GetProcessHeap(), 0, dbuf);
COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);