Release 980301 Sun Mar 1 10:45:23 1998 Andreas Mohr <100.30936@germany.net> * [loader/ne_image.c] Fixed problem with weird DLLs (NE_FFLAGS_SINGLEDATA && DGROUP = 0). * [msdos/dosmem.c] Export address for __0000H, too. * [msdos/dpmi.c] Changed MemAlloc functions to return less fragmented addresses. Sat Feb 28 18:50:12 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [scheduler/process.c] [scheduler/sysdeps.c] Don't use %fs register before threading initialization. Sat Feb 28 14:04:56 1998 Kristian Nielsen <kristian.nielsen@risoe.dk> * [configure.in] [include/acconfig.h] Autoconf macro to check for non-reentrant X libraries. * [windows/winpos.c] In SetWindowPos32(), do not cause WM_SIZE messages when the SWP_NOSIZE flag is specified. This fixes the division-by-zero in Borland C++ 4.0 "Open Project" menu item. Sat Feb 28 13:11:26 1998 James Moody <013263m@dragon.acadiau.ca> * [ole/ole2nls.c] Changed "English" values from German to English. * [files/dos_fs.c] Fixed off-by-one month bug. Fri Feb 27 22:12:01 1998 Douglas Ridgway <ridgway@winehq.com> * [windows/win.c] Fix winelib class menu loading bug. * [include/module.h] [loader/module.c] LoadModule32 should be implemented in terms of CreateProcess. * [programs/view/*] Metafile viewer sample program. * [documentation/wine.texinfo] [documentation/Makefile.in] Improvements and additions, HTML target. Fri Feb 27 04:27:48 1998 Dimitrie O. Paun <dimi@cs.toronto.edu> * [*/*] Switched to the new debug messages interface. For more information please refer to documentation/debug-msgs. Because the new scheme introduces a new semantic level, I had to manually do through about 530 dprintf_xxx! The rest of about 2400 where transformed via a script. Because of the large number of changes that I had to do, some may have not come out as nicely as I wanted them. If this is the case, please let me know. There is a lot of work left to do: -- a few hundred printf's to be converted -- about 2300 fprintf's to be converted -- about 600 FIXME's to be transformed The problem is that in the above mentioned cases, a lot of manual intervention is required because a lot of the information is missing. There are also a lot of other things to be done to the interface and so forth. I have now ideas for a at least a month worth of full time work :) I will proceed with many changes in the next few releases, so please do not start modifing things because there will be a hell of a lot of conflicts. If you have ideas that you want to integrate or you want to work on different things, please coordinate with me. Thu Feb 26 13:04:29 1998 David Lee Lambert <lamber45@egr.msu.edu> * [ole/ole2nls.c] [include/windows.h] First try at OLE date- and time-formatting functions. Wed Feb 25 11:20:35 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/*.c] Changed dos device handling, added 'CON' devicehandling. * [graphics/ddraw.c] Bug fixes, some additions. * [if1632/builtin.c][loader/module.c][library/winestub.c] Small hack so we don't need a dummy BUILTIN_LoadModule in winestub.c. * [ole/*][relay32/ole32.spec][if1632/storage.spec] storage.dll started. winword loads documents (saving doesn't work yet, dunno why). Several ole additions, some cleanups and bugfixes. IMalloc16 implemented. * [loader/pe_image.c] Added some comments, fixed circular dll references, fixed modref ordering, fixed tls allocation. * [memory/global.c] Added validity checks before every GET_ARENA_PTR. (several functions rely on Global* return values on invalid handles, like IsTask). Implemented GlobalUnlockFree16. * [memory/virtual.c] Replaced dprintf_virtual by fprintf, so we can do 'info map' again in the debugger. Increase read linesize for Linux2.1 cases. * [misc/cpu.c][misc/registry.c] Moved cpu registry initialization to misc/cpu.c. * [multimedia/dsound.c] Enhanced, replaced GETOSPACE bufferingcheck by SETFRAGMENT. * [relay32/crtdll.spec][relay32/ntdll.spec] Replaced some ptr by respective 'str' and 'wstr' arguments for libc functions. * [scheduler/thread.c] Added some sanity checks to stackallocation, tlshandling fixed. * [tools/build.c] Fixed cdecl argumenttype order (was reversed). * [win32/ordinals.c] Implemented KERNEL_449. * [windows/dinput.c] Some fixes, needs much more work. Tomb Raider2 works with keyboard ;) Tue Feb 24 20:46:37 1998 James Juran <jrj120@psu.edu> * [windows/win.c] Fixed USER32 ordinal numbers in documentation. Sat Feb 21 12:30:38 1998 John Richardson <jrichard@zko.dec.com> * [files/file.c] [include/k32obj.h] [memory/virtual.c] [scheduler/critsection.c] [scheduler/event.c] [scheduler/handle.c] [scheduler/k32obj.c] [scheduler/mutex.c] [scheduler/process.c] [scheduler/semaphore.c] [scheduler/thread.c] Added generic k32obj read and write routines for k32objs that support I/O. * [documentation/console] Updated console docs. * [win32/console.c] Make console work like a k32obj that supports I/O. * [include/windows.h] Make WriteFile and ReadFile take HANDLE32 for handle. Sun Feb 15 14:07:07 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [controls/menu.c] [misc/ver.c] [multimedia/dsound.c] [multimedia/joystick.c] [windows/dialog.c] Modified some dprintf_xxx's to prepare them for a new dprintf_ scheme. Basically, I changed the dprintf's that outputed a line with many dprintf calls to do just one dprintf call.
diff --git a/controls/combo.c b/controls/combo.c index af61d63..4cacec7 100644 --- a/controls/combo.c +++ b/controls/combo.c
@@ -18,7 +18,6 @@ #include "heap.h" #include "combo.h" #include "drive.h" -#include "stddebug.h" #include "debug.h" /* bits in the dwKeyData */ @@ -63,7 +62,7 @@ CBitHeight = bm.bmHeight; CBitWidth = bm.bmWidth; - dprintf_combo(stddeb, "combo bitmap [%i,%i]\n", CBitWidth, CBitHeight ); + dprintf_info(combo, "combo bitmap [%i,%i]\n", CBitWidth, CBitHeight ); hPrevB = SelectObject16( hDC, hComboBmp); SetRect16( &r, 0, 0, CBitWidth, CBitHeight ); @@ -102,7 +101,7 @@ if( !(wnd->dwExStyle & WS_EX_NOPARENTNOTIFY) ) lphc->wState |= CBF_NOTIFY; - dprintf_combo(stddeb, "COMBO_NCCreate: [0x%08x], style = %08x\n", + dprintf_info(combo, "COMBO_NCCreate: [0x%08x], style = %08x\n", (UINT32)lphc, lphc->dwStyle ); return (LRESULT)(UINT32)wnd->hwndSelf; @@ -120,7 +119,7 @@ { WND* wnd = lphc->self; - dprintf_combo(stddeb,"Combo [%04x]: freeing storage\n", CB_HWND(lphc)); + dprintf_info(combo,"Combo [%04x]: freeing storage\n", CB_HWND(lphc)); if( (CB_GETTYPE(lphc) != CBS_SIMPLE) && lphc->hWndLBox ) DestroyWindow32( lphc->hWndLBox ); @@ -219,7 +218,7 @@ if( lphc->droppedWidth > (lprLB->right - lprLB->left) ) lprLB->right = lprLB->left + (INT16)lphc->droppedWidth; -dprintf_combo(stddeb,"Combo [%04x]: (%i,%i-%i,%i) placement\n\ttext\t= (%i,%i-%i,%i)\ +dprintf_info(combo,"Combo [%04x]: (%i,%i-%i,%i) placement\n\ttext\t= (%i,%i-%i,%i)\ \n\tbutton\t= (%i,%i-%i,%i)\n\tlbox\t= (%i,%i-%i,%i)\n", CB_HWND(lphc), lphc->RectCombo.left, lphc->RectCombo.top, lphc->RectCombo.right, lphc->RectCombo.bottom, lprEdit->left, lprEdit->top, lprEdit->right, lprEdit->bottom, @@ -338,12 +337,12 @@ SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); lphc->wState &= ~CBF_NORESIZE; } - dprintf_combo(stddeb,"COMBO_Create: init done\n"); + dprintf_info(combo,"COMBO_Create: init done\n"); return wnd->hwndSelf; } - dprintf_combo(stderr, "COMBO_Create: edit control failure.\n"); - } else dprintf_combo(stderr, "COMBO_Create: listbox failure.\n"); - } else dprintf_combo(stderr, "COMBO_Create: no owner for visible combo.\n"); + dprintf_err(combo, "COMBO_Create: edit control failure.\n"); + } else dprintf_err(combo, "COMBO_Create: listbox failure.\n"); + } else dprintf_err(combo, "COMBO_Create: no owner for visible combo.\n"); /* CreateWindow() will send WM_NCDESTROY to cleanup */ @@ -562,7 +561,7 @@ if( length > 0 ) pText = (LPSTR) HeapAlloc( GetProcessHeap(), 0, length + 1); - dprintf_combo(stddeb,"\tCBUpdateLBox: edit text length %i\n", length ); + dprintf_info(combo,"\tCBUpdateLBox: edit text length %i\n", length ); if( pText ) { @@ -598,7 +597,7 @@ INT32 length; LPSTR pText = NULL; - dprintf_combo(stddeb,"\tCBUpdateEdit: %i\n", index ); + dprintf_info(combo,"\tCBUpdateEdit: %i\n", index ); if( index == -1 ) { @@ -643,7 +642,7 @@ RECT16 rect; LPRECT16 pRect = NULL; - dprintf_combo(stddeb,"Combo [%04x]: drop down\n", CB_HWND(lphc)); + dprintf_info(combo,"Combo [%04x]: drop down\n", CB_HWND(lphc)); CB_NOTIFY( lphc, CBN_DROPDOWN ); @@ -699,7 +698,7 @@ if( IsWindow32( hWnd ) && CB_GETTYPE(lphc) != CBS_SIMPLE ) { - dprintf_combo(stddeb,"Combo [%04x]: roll up [%i]\n", CB_HWND(lphc), (INT32)ok ); + dprintf_info(combo,"Combo [%04x]: roll up [%i]\n", CB_HWND(lphc), (INT32)ok ); /* always send WM_LBUTTONUP? */ SendMessage32A( lphc->hWndLBox, WM_LBUTTONUP, 0, (LPARAM)(-1) ); @@ -840,7 +839,7 @@ { case (EN_SETFOCUS >> 8): - dprintf_combo(stddeb,"Combo [%04x]: edit [%04x] got focus\n", + dprintf_info(combo,"Combo [%04x]: edit [%04x] got focus\n", CB_HWND(lphc), (HWND16)lphc->hWndEdit ); if( !(lphc->wState & CBF_FOCUSED) ) COMBO_SetFocus( lphc ); @@ -848,7 +847,7 @@ case (EN_KILLFOCUS >> 8): - dprintf_combo(stddeb,"Combo [%04x]: edit [%04x] lost focus\n", + dprintf_info(combo,"Combo [%04x]: edit [%04x] lost focus\n", CB_HWND(lphc), (HWND16)lphc->hWndEdit ); /* NOTE: it seems that Windows' edit control sends an @@ -889,7 +888,7 @@ case LBN_SELCHANGE: case LBN_SELCANCEL: - dprintf_combo(stddeb,"Combo [%04x]: lbox selection change [%04x]\n", + dprintf_info(combo,"Combo [%04x]: lbox selection change [%04x]\n", CB_HWND(lphc), lphc->wState ); /* do not roll up if selection is being tracked @@ -923,7 +922,7 @@ { HWND32 hWnd = lphc->self->hwndSelf; - dprintf_combo(stddeb,"Combo [%04x]: ownerdraw op %04x\n", + dprintf_info(combo,"Combo [%04x]: ownerdraw op %04x\n", CB_HWND(lphc), (UINT16)msg ); #define lpIS ((LPDELETEITEMSTRUCT32)lParam) @@ -1061,7 +1060,7 @@ GetWindowRect16( lphc->self->hwndSelf, &rect ); w = rect.right - rect.left; h = rect.bottom - rect.top; - dprintf_combo(stddeb,"COMBO_Size: w = %i, h = %i\n", w, h ); + dprintf_info(combo,"COMBO_Size: w = %i, h = %i\n", w, h ); /* CreateWindow() may send a bogus WM_SIZE, ignore it */ @@ -1258,7 +1257,7 @@ { LPHEADCOMBO lphc = CB_GETPTR(pWnd); - dprintf_combo( stddeb, "Combo [%04x]: msg %s wp %08x lp %08lx\n", + dprintf_info(combo, "Combo [%04x]: msg %s wp %08x lp %08lx\n", pWnd->hwndSelf, SPY_GetMsgName(message), wParam, lParam ); if( lphc || message == WM_NCCREATE ) @@ -1560,7 +1559,7 @@ return (lphc->wState & CBF_EUI) ? TRUE : FALSE; case (WM_USER + 0x1B): - dprintf_combo(stddeb,"Combo [%04x]: undocumented msg!\n", (HWND16)hwnd ); + dprintf_warn(combo, "Combo [%04x]: undocumented msg!\n", (HWND16)hwnd ); } return DefWindowProc32A(hwnd, message, wParam, lParam); }
diff --git a/controls/edit.c b/controls/edit.c index 303d2f1..35b774f 100644 --- a/controls/edit.c +++ b/controls/edit.c
@@ -18,7 +18,6 @@ #include "combo.h" #include "local.h" #include "resource.h" -#include "stddebug.h" #include "debug.h" #include "callback.h" @@ -110,7 +109,7 @@ #define ORDER_UINT32(x,y) do { if ((UINT32)(y) < (UINT32)(x)) SWAP_UINT32((x),(y)); } while(0) #define DPRINTF_EDIT_NOTIFY(hwnd, str) \ - ({dprintf_edit(stddeb, \ + ({dprintf_info(edit, \ "edit: notification " str " sent to hwnd=%08x\n", \ (UINT32)(hwnd));}) @@ -123,11 +122,11 @@ MAKEWPARAM((wnd)->wIDmenu, wNotifyCode), \ (LPARAM)(wnd)->hwndSelf)) #define DPRINTF_EDIT_MSG16(str) \ - dprintf_edit(stddeb, \ + dprintf_info(edit, \ "edit: 16 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \ (UINT32)hwnd, (UINT32)wParam, (UINT32)lParam) #define DPRINTF_EDIT_MSG32(str) \ - dprintf_edit(stddeb, \ + dprintf_info(edit, \ "edit: 32 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \ (UINT32)hwnd, (UINT32)wParam, (UINT32)lParam) @@ -987,7 +986,7 @@ } else if (es->word_break_proc32A) { - dprintf_relay( stddeb, "CallTo32(wordbrk=%p,str='%s',idx=%d,cnt=%d,act=%d)\n", + dprintf_info(relay, "CallTo32(wordbrk=%p,str='%s',idx=%d,cnt=%d,act=%d)\n", es->word_break_proc32A, es->text + start, index, count, action ); return (INT32)es->word_break_proc32A( es->text + start, index, @@ -1319,7 +1318,7 @@ if (size > es->buffer_limit) size = es->buffer_limit; - dprintf_edit(stddeb, "edit: EDIT_MakeFit: trying to ReAlloc to %d+1\n", size); + dprintf_info(edit, "edit: EDIT_MakeFit: trying to ReAlloc to %d+1\n", size); EDIT_UnlockBuffer(wnd, es, TRUE); if (es->text) { @@ -1329,25 +1328,25 @@ es->buffer_size = 0; } else if (es->hloc32) { if ((hNew32 = LocalReAlloc32(es->hloc32, size + 1, 0))) { - dprintf_edit(stddeb, "edit: EDIT_MakeFit: Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32); + dprintf_info(edit, "edit: EDIT_MakeFit: Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32); es->hloc32 = hNew32; es->buffer_size = MIN(LocalSize32(es->hloc32) - 1, es->buffer_limit); } } else if (es->hloc16) { if ((hNew16 = LOCAL_ReAlloc(wnd->hInstance, es->hloc16, size + 1, LMEM_MOVEABLE))) { - dprintf_edit(stddeb, "edit: EDIT_MakeFit: Old 16 bit handle %08x, new handle %08x\n", es->hloc16, hNew16); + dprintf_info(edit, "edit: EDIT_MakeFit: Old 16 bit handle %08x, new handle %08x\n", es->hloc16, hNew16); es->hloc16 = hNew16; es->buffer_size = MIN(LOCAL_Size(wnd->hInstance, es->hloc16) - 1, es->buffer_limit); } } if (es->buffer_size < size) { EDIT_LockBuffer(wnd, es); - dprintf_edit(stddeb, "edit: EDIT_MakeFit: FAILED ! We now have %d+1\n", es->buffer_size); + dprintf_warn(edit, "edit: EDIT_MakeFit: FAILED ! We now have %d+1\n", es->buffer_size); EDIT_NOTIFY_PARENT(wnd, EN_ERRSPACE, "EN_ERRSPACE"); return FALSE; } else { EDIT_LockBuffer(wnd, es); - dprintf_edit(stddeb, "edit: EDIT_MakeFit: We now have %d+1\n", es->buffer_size); + dprintf_info(edit, "edit: EDIT_MakeFit: We now have %d+1\n", es->buffer_size); return TRUE; } } @@ -1366,12 +1365,12 @@ return TRUE; size = ((size / GROWLENGTH) + 1) * GROWLENGTH; - dprintf_edit(stddeb, "edit: EDIT_MakeUndoFit: trying to ReAlloc to %d+1\n", size); + dprintf_info(edit, "edit: EDIT_MakeUndoFit: trying to ReAlloc to %d+1\n", size); if ((es->undo_text = HeapReAlloc(es->heap, 0, es->undo_text, size + 1))) { es->undo_buffer_size = HeapSize(es->heap, 0, es->undo_text) - 1; if (es->undo_buffer_size < size) { - dprintf_edit(stddeb, "edit: EDIT_MakeUndoFit: FAILED ! We now have %d+1\n", es->undo_buffer_size); + dprintf_warn(edit, "edit: EDIT_MakeUndoFit: FAILED ! We now have %d+1\n", es->undo_buffer_size); return FALSE; } return TRUE; @@ -1659,7 +1658,7 @@ } else if (line) return; - dprintf_edit(stddeb, "edit: EDIT_PaintLine: line=%d\n", line); + dprintf_info(edit, "edit: EDIT_PaintLine: line=%d\n", line); pos = EDIT_EM_PosFromChar(wnd, es, EDIT_EM_LineIndex(wnd, es, line), FALSE); x = SLOWORD(pos); @@ -1868,7 +1867,7 @@ { INT32 ret = 0; - dprintf_edit(stddeb, "edit: EDIT_WordBreakProc: s=%p, index=%u" + dprintf_info(edit, "edit: EDIT_WordBreakProc: s=%p, index=%u" ", count=%u, action=%d\n", s, index, count, action); switch (action) { @@ -2008,7 +2007,7 @@ es->buffer_size = newSize; es->text = newText; EDIT_LockBuffer(wnd, es); - dprintf_edit(stddeb, "edit: EM_GETHANDLE: switched to 32 bit local heap\n"); + dprintf_info(edit, "edit: EM_GETHANDLE: switched to 32 bit local heap\n"); return es->hloc32; } @@ -2047,7 +2046,7 @@ fprintf(stderr, "edit: EM_GETHANDLE: could not initialize local heap\n"); return 0; } - dprintf_edit(stddeb, "edit: EM_GETHANDLE: local heap initialized\n"); + dprintf_info(edit, "edit: EM_GETHANDLE: local heap initialized\n"); } if (!(newBuf = LOCAL_Alloc(wnd->hInstance, LMEM_MOVEABLE, lstrlen32A(es->text) + 1))) { fprintf(stderr, "edit: EM_GETHANDLE: could not allocate new 16 bit buffer\n"); @@ -2072,7 +2071,7 @@ es->buffer_size = newSize; es->text = newText; EDIT_LockBuffer(wnd, es); - dprintf_edit(stddeb, "edit: EM_GETHANDLE: switched to 16 bit buffer\n"); + dprintf_info(edit, "edit: EM_GETHANDLE: switched to 16 bit buffer\n"); return es->hloc16; } @@ -2624,7 +2623,7 @@ if (action & EC_RIGHTMARGIN) es->right_margin = right; } - dprintf_edit(stddeb, "EDIT_EM_SetMargins: left=%d, right=%d\n", es->left_margin, es->right_margin); + dprintf_info(edit, "EDIT_EM_SetMargins: left=%d, right=%d\n", es->left_margin, es->right_margin); } @@ -2810,7 +2809,7 @@ lstrcpy32A(utext, es->undo_text); - dprintf_edit(stddeb, "edit: before UNDO:insertion length = %d, deletion buffer = %s\n", + dprintf_info(edit, "edit: before UNDO:insertion length = %d, deletion buffer = %s\n", es->undo_insert_count, utext); EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); @@ -2819,7 +2818,7 @@ EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); HeapFree(es->heap, 0, utext); - dprintf_edit(stddeb, "edit: after UNDO: insertion length = %d, deletion buffer = %s\n", + dprintf_info(edit, "edit: after UNDO: insertion length = %d, deletion buffer = %s\n", es->undo_insert_count, es->undo_text); return TRUE; @@ -2891,7 +2890,7 @@ EDIT_EM_ScrollCaret(wnd, es); break; default: - dprintf_edit(stddeb, "edit: unknown menu item, please report\n"); + dprintf_err(edit, "edit: unknown menu item, please report\n"); break; } } @@ -3193,7 +3192,7 @@ break; default: - dprintf_edit(stddeb, "edit: undocumented (hacked) WM_HSCROLL parameter, please report\n"); + dprintf_err(edit, "edit: undocumented (hacked) WM_HSCROLL parameter, please report\n"); return 0; } if (dx) @@ -3286,7 +3285,7 @@ HWND32 hCombo = wnd->parent->hwndSelf; BOOL32 bUIFlip = TRUE; - dprintf_combo(stddeb, "EDIT_CheckCombo [%04x]: handling msg %04x (%04x)\n", + dprintf_info(combo, "EDIT_CheckCombo [%04x]: handling msg %04x (%04x)\n", wnd->hwndSelf, (UINT16)msg, (UINT16)key); switch (msg) { @@ -3719,7 +3718,7 @@ { EDIT_EM_SetSel(wnd, es, 0, -1, FALSE); if (text) { - dprintf_edit(stddeb, "\t'%s'\n", text); + dprintf_info(edit, "\t'%s'\n", text); EDIT_EM_ReplaceSel(wnd, es, FALSE, text); es->x_offset = 0; }
diff --git a/controls/listbox.c b/controls/listbox.c index a830489..c1512e7 100644 --- a/controls/listbox.c +++ b/controls/listbox.c
@@ -13,7 +13,6 @@ #include "spy.h" #include "win.h" #include "combo.h" -#include "stddebug.h" #include "debug.h" /* Unimplemented yet: @@ -309,7 +308,7 @@ if ((descr->height > descr->item_height) && (descr->height % descr->item_height)) { - dprintf_listbox(stddeb, "Listbox %04x: changing height %d -> %d\n", + dprintf_info(listbox, "Listbox %04x: changing height %d -> %d\n", wnd->hwndSelf, descr->height, descr->height - descr->height%descr->item_height ); SetWindowPos32( wnd->hwndSelf, 0, 0, 0, @@ -320,7 +319,7 @@ return; } } - dprintf_listbox( stddeb, "Listbox %04x: new size = %d,%d\n", + dprintf_info(listbox, "Listbox %04x: new size = %d,%d\n", wnd->hwndSelf, descr->width, descr->height ); LISTBOX_UpdatePage( wnd, descr ); LISTBOX_UpdateScroll( wnd, descr ); @@ -458,7 +457,7 @@ if (wnd->dwStyle & WS_DISABLED) dis.itemState |= ODS_DISABLED; dis.itemData = item ? item->data : 0; dis.rcItem = *rect; - dprintf_listbox( stddeb, "Listbox %04x: drawitem %d (%s) action=%02x " + dprintf_info(listbox, "Listbox %04x: drawitem %d (%s) action=%02x " "state=%02x rect=%d,%d-%d,%d\n", wnd->hwndSelf, index, item ? item->str : "", action, dis.itemState, rect->left, rect->top, @@ -480,7 +479,7 @@ oldText = SetTextColor32( hdc, GetSysColor32(COLOR_HIGHLIGHTTEXT)); } - dprintf_listbox( stddeb, "Listbox %04x: painting %d (%s) action=%02x " + dprintf_info(listbox, "Listbox %04x: painting %d (%s) action=%02x " "rect=%d,%d-%d,%d\n", wnd->hwndSelf, index, item ? item->str : "", action, rect->left, rect->top, rect->right, rect->bottom ); @@ -603,12 +602,15 @@ { INT32 i; LPINT16 p = (LPINT16)tabs; - dprintf_listbox( stddeb, "Listbox %04x: settabstops ", wnd->hwndSelf); + dbg_decl_str(listbox, 256); + for (i = 0; i < descr->nb_tabs; i++) { - descr->tabs[i] = *p++<<1; /* FIXME */ - dprintf_listbox( stddeb, "%hd ", descr->tabs[i]); + descr->tabs[i] = *p++<<1; /* FIXME */ + if(debugging_info(listbox)) + dsprintf(listbox, "%hd ", descr->tabs[i]); } - dprintf_listbox( stddeb, "\n"); + dprintf_info(listbox, "Listbox %04x: settabstops %s\n", + wnd->hwndSelf, dbg_str(listbox)); } else memcpy( descr->tabs, tabs, descr->nb_tabs * sizeof(INT32) ); /* FIXME: repaint the window? */ @@ -986,7 +988,7 @@ if (descr->style & LBS_OWNERDRAWVARIABLE) { if ((index < 0) || (index >= descr->nb_items)) return LB_ERR; - dprintf_listbox( stddeb, "Listbox %04x: item %d height = %d\n", + dprintf_info(listbox, "Listbox %04x: item %d height = %d\n", wnd->hwndSelf, index, height ); descr->items[index].height = height; LISTBOX_UpdateScroll( wnd, descr ); @@ -994,7 +996,7 @@ } else if (height != descr->item_height) { - dprintf_listbox( stddeb, "Listbox %04x: new height = %d\n", + dprintf_info(listbox, "Listbox %04x: new height = %d\n", wnd->hwndSelf, height ); descr->item_height = height; LISTBOX_UpdatePage( wnd, descr ); @@ -1016,7 +1018,7 @@ pos = descr->horz_extent - descr->width; if (pos < 0) pos = 0; if (!(diff = descr->horz_pos - pos)) return; - dprintf_listbox( stddeb, "Listbox %04x: new horz pos = %d\n", + dprintf_info(listbox, "Listbox %04x: new horz pos = %d\n", wnd->hwndSelf, pos ); descr->horz_pos = pos; LISTBOX_UpdateScroll( wnd, descr ); @@ -1038,7 +1040,7 @@ return LB_OKAY; if (extent <= 0) extent = 1; if (extent == descr->horz_extent) return LB_OKAY; - dprintf_listbox( stddeb, "Listbox %04x: new horz extent = %d\n", + dprintf_info(listbox, "Listbox %04x: new horz extent = %d\n", wnd->hwndSelf, extent ); descr->horz_extent = extent; if (descr->horz_pos > extent - descr->width) @@ -1056,7 +1058,7 @@ { width += 2; /* For left and right margin */ if (width == descr->column_width) return LB_OKAY; - dprintf_listbox( stddeb, "Listbox %04x: new column width = %d\n", + dprintf_info(listbox, "Listbox %04x: new column width = %d\n", wnd->hwndSelf, width ); descr->column_width = width; LISTBOX_UpdatePage( wnd, descr ); @@ -1305,7 +1307,7 @@ mis.itemHeight = descr->item_height; SendMessage32A( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis ); item->height = mis.itemHeight ? mis.itemHeight : 1; - dprintf_listbox( stddeb, "Listbox %04x: measure item %d (%s) = %d\n", + dprintf_info(listbox, "Listbox %04x: measure item %d (%s) = %d\n", wnd->hwndSelf, index, str ? str : "", item->height ); } @@ -1357,7 +1359,7 @@ return ret; } - dprintf_listbox( stddeb, "Listbox %04x: added item %d '%s'\n", + dprintf_info(listbox, "Listbox %04x: added item %d '%s'\n", wnd->hwndSelf, index, HAS_STRINGS(descr) ? new_str : "" ); return index; } @@ -1694,7 +1696,7 @@ WPARAM32 wParam, INT32 x, INT32 y ) { INT32 index = LISTBOX_GetItemFromPoint( wnd, descr, x, y ); - dprintf_listbox( stddeb, "Listbox %04x: lbuttondown %d,%d item %d\n", + dprintf_info(listbox, "Listbox %04x: lbuttondown %d,%d item %d\n", wnd->hwndSelf, x, y, index ); if (!descr->caret_on && (GetFocus32() == wnd->hwndSelf)) return 0; if (index != -1) @@ -2029,7 +2031,7 @@ if( lphc ) { - dprintf_combo(stddeb,"ComboLBox [%04x]: resetting owner %04x -> %04x\n", + dprintf_info(combo,"ComboLBox [%04x]: resetting owner %04x -> %04x\n", wnd->hwndSelf, descr->owner, lphc->self->hwndSelf ); descr->owner = lphc->self->hwndSelf; } @@ -2098,7 +2100,7 @@ if (msg == WM_CREATE) { if (!LISTBOX_Create( wnd, NULL )) return -1; - dprintf_listbox( stddeb, "Listbox: creating wnd=%04x descr=%p\n", + dprintf_info(listbox, "Listbox: creating wnd=%04x descr=%p\n", hwnd, *(LB_DESCR **)wnd->wExtra ); return 0; } @@ -2106,7 +2108,7 @@ return DefWindowProc32A( hwnd, msg, wParam, lParam ); } - dprintf_listbox( stddeb, "Listbox %04x: msg %s wp %08x lp %08lx\n", + dprintf_info(listbox, "Listbox %04x: msg %s wp %08x lp %08lx\n", wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam ); switch(msg) { @@ -2476,7 +2478,7 @@ default: if ((msg >= WM_USER) && (msg < 0xc000)) - dprintf_listbox(stddeb,"Listbox %04x: unknown msg %04x wp %08x lp %08lx\n", + dprintf_warn(listbox, "Listbox %04x: unknown msg %04x wp %08x lp %08lx\n", hwnd, msg, wParam, lParam ); return DefWindowProc32A( hwnd, msg, wParam, lParam ); } @@ -2521,7 +2523,7 @@ { LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra; - dprintf_combo( stddeb, "ComboLBox [%04x]: msg %s wp %08x lp %08lx\n", + dprintf_info(combo, "ComboLBox [%04x]: msg %s wp %08x lp %08lx\n", wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam ); if( descr || msg == WM_CREATE ) @@ -2532,7 +2534,7 @@ { case WM_CREATE: #define lpcs ((LPCREATESTRUCT32A)lParam) - dprintf_combo(stddeb, "\tpassed parent handle = 0x%08x\n", + dprintf_info(combo, "\tpassed parent handle = 0x%08x\n", (UINT32)lpcs->lpCreateParams); lphc = (LPHEADCOMBO)(lpcs->lpCreateParams); @@ -2578,7 +2580,7 @@ } lRet = DefWindowProc32A( hwnd, msg, wParam, lParam ); - dprintf_combo(stddeb,"\tComboLBox: default on msg [%04x]\n", (UINT16)msg ); + dprintf_info(combo,"\tComboLBox: default on msg [%04x]\n", (UINT16)msg ); } return lRet;
diff --git a/controls/menu.c b/controls/menu.c index ee9fadf..24aecd4 100644 --- a/controls/menu.c +++ b/controls/menu.c
@@ -32,7 +32,6 @@ #include "message.h" #include "graphics.h" #include "resource.h" -#include "stddebug.h" #include "tweak.h" #include "debug.h" @@ -165,10 +164,10 @@ */ #define debug_print_menuitem(pre, mp, post) \ - if(debugging_menu) do_debug_print_menuitem(pre, mp, post) + if(!debugging_info(menu)) ; else do_debug_print_menuitem(pre, mp, post) #define MENUOUT(text) \ - p+=sprintf(p, "%s%s", (count++ ? "," : ""), (text)) + dsprintf(menu, "%s%s", (count++ ? "," : ""), (text)) #define MENUFLAG(bit,text) \ do { \ @@ -178,19 +177,17 @@ static void do_debug_print_menuitem(const char *prefix, MENUITEM * mp, const char *postfix) { - char buff[256]; - char *p; + dbg_decl_str(menu, 256); - p = buff; if (mp) { UINT32 flags = mp->fType; int typ = MENU_ITEM_TYPE(flags); - p+=sprintf(p, "{ ID=0x%x", mp->wID); + dsprintf(menu, "{ ID=0x%x", mp->wID); if (flags & MF_POPUP) - p+=sprintf(p, ", Sub=0x%x", mp->hSubMenu); + dsprintf(menu, ", Sub=0x%x", mp->hSubMenu); if (flags) { int count = 0; - p+=sprintf(p, ", Typ="); + dsprintf(menu, ", Typ="); if (typ == MFT_STRING) /* Nothing */ ; else if (typ == MFT_SEPARATOR) @@ -212,12 +209,12 @@ MENUFLAG(MFT_RIGHTJUSTIFY, "right"); if (flags) - p+=sprintf(p, "+0x%x", flags); + dsprintf(menu, "+0x%x", flags); } flags = mp->fState; if (flags) { int count = 0; - p+=sprintf(p, ", State="); + dsprintf(menu, ", State="); MENUFLAG(MFS_GRAYED, "grey"); MENUFLAG(MFS_DISABLED, "dis"); MENUFLAG(MFS_CHECKED, "check"); @@ -225,28 +222,28 @@ MENUFLAG(MF_USECHECKBITMAPS, "usebit"); MENUFLAG(MF_MOUSESELECT, "mouse"); if (flags) - p+=sprintf(p, "+0x%x", flags); + dsprintf(menu, "+0x%x", flags); } if (mp->hCheckBit) - p+=sprintf(p, ", Chk=0x%x", mp->hCheckBit); + dsprintf(menu, ", Chk=0x%x", mp->hCheckBit); if (mp->hUnCheckBit) - p+=sprintf(p, ", Unc=0x%x", mp->hUnCheckBit); + dsprintf(menu, ", Unc=0x%x", mp->hUnCheckBit); if (typ == MFT_STRING) { if (mp->text) - p+=sprintf(p, ", Text=\"%s\"", mp->text); + dsprintf(menu, ", Text=\"%s\"", mp->text); else - p+=sprintf(p, ", Text=Null"); + dsprintf(menu, ", Text=Null"); } else if (mp->text == NULL) /* Nothing */ ; else - p+=sprintf(p, ", Text=%p", mp->text); - p+=sprintf(p, " }"); + dsprintf(menu, ", Text=%p", mp->text); + dsprintf(menu, " }"); } else { - p+=sprintf(p, "NULL"); + dsprintf(menu, "NULL"); } - dprintf_menu(stddeb, "%s %s %s\n", prefix, buff, postfix); + dprintf_info(menu, "%s %s %s\n", prefix, dbg_str(menu), postfix); } #undef MENUOUT @@ -270,7 +267,7 @@ fprintf( stderr, "Unable to load default system menu\n" ); } - dprintf_menu( stddeb, "MENU_CopySysPopup: returning %x.\n", hMenu ); + dprintf_info(menu, "MENU_CopySysPopup: returning %x.\n", hMenu ); return hMenu; } @@ -308,7 +305,7 @@ menu = (POPUPMENU*) USER_HEAP_LIN_ADDR(hPopupMenu); menu->wFlags |= MF_SYSMENU; - dprintf_menu(stddeb,"GetSysMenu hMenu=%04x (%04x)\n", hMenu, hPopupMenu ); + dprintf_info(menu,"GetSysMenu hMenu=%04x (%04x)\n", hMenu, hPopupMenu ); return hMenu; } DestroyMenu32( hMenu ); @@ -456,7 +453,7 @@ break; } - dprintf_menu( stddeb, "MENU_GetStartOfPrevColumn: ret %d.\n", i ); + dprintf_info(menu, "MENU_GetStartOfPrevColumn: ret %d.\n", i ); return i; } @@ -555,7 +552,7 @@ static UINT32 MENU_FindItemByKey( HWND32 hwndOwner, HMENU32 hmenu, UINT32 key, BOOL32 forceMenuChar ) { - dprintf_menu(stddeb,"\tlooking for '%c' in [%04x]\n", (char)key, (UINT16)hmenu ); + dprintf_info(menu,"\tlooking for '%c' in [%04x]\n", (char)key, (UINT16)hmenu ); if (!IsMenu32( hmenu )) { @@ -576,7 +573,7 @@ key = toupper(key); for (i = 0; i < menu->nItems; i++, item++) { - if (IS_STRING_ITEM(item->fType)) + if (item->text && (IS_STRING_ITEM(item->fType))) { char *p = strchr( item->text, '&' ); if (p && (p[1] != '&') && (toupper(p[1]) == key)) return i; @@ -603,7 +600,7 @@ DWORD dwSize; char *p; - dprintf_menu(stddeb, "MENU_CalcItemSize: HDC 0x%x at (%d,%d)\n", + dprintf_info(menu, "MENU_CalcItemSize: HDC 0x%x at (%d,%d)\n", hdc, orgX, orgY); debug_print_menuitem("MENU_CalcItemSize: menuitem:", lpitem, (menuBar ? " (MenuBar)" : "")); @@ -621,7 +618,7 @@ SendMessage32A( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis ); lpitem->rect.bottom += mis.itemHeight; lpitem->rect.right += mis.itemWidth; - dprintf_menu(stddeb, "MENU_CalcItemSize: %08x %dx%d\n", + dprintf_info(menu, "MENU_CalcItemSize: %08x %dx%d\n", lpitem->wID, mis.itemWidth, mis.itemHeight); return; } @@ -756,7 +753,7 @@ if ((lprect == NULL) || (lppop == NULL)) return; if (lppop->nItems == 0) return; - dprintf_menu(stddeb,"MENU_MenuBarCalcSize left=%d top=%d right=%d bottom=%d\n", + dprintf_info(menu,"MENU_MenuBarCalcSize left=%d top=%d right=%d bottom=%d\n", lprect->left, lprect->top, lprect->right, lprect->bottom); lppop->Width = lprect->right - lprect->left; lppop->Height = 0; @@ -776,7 +773,7 @@ if ((i != start) && (lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break; - dprintf_menu( stddeb, + dprintf_info(menu, "MENU_MenuBarCalcSize: calling MENU_CalcItemSize" " org=(%d, %d)\n", orgX, orgY ); debug_print_menuitem (" item: ", lpitem, ""); @@ -847,7 +844,7 @@ { DRAWITEMSTRUCT32 dis; - dprintf_menu( stddeb, "DrawMenuItem: Ownerdraw!\n" ); + dprintf_info(menu, "DrawMenuItem: Ownerdraw!\n" ); dis.CtlType = ODT_MENU; dis.itemID = lpitem->wID; dis.itemData = (DWORD)lpitem->text; @@ -1140,7 +1137,7 @@ lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( (HMENU16)wndPtr->wIDmenu ); if (lppop == NULL || lprect == NULL) return SYSMETRICS_CYMENU; - dprintf_menu(stddeb,"MENU_DrawMenuBar(%04x, %p, %p); !\n", + dprintf_info(menu,"MENU_DrawMenuBar(%04x, %p, %p); !\n", hDC, lprect, lppop); if (lppop->Height == 0) MENU_MenuBarCalcSize(hDC, lprect, lppop, hwnd); lprect->bottom = lprect->top + lppop->Height; @@ -1175,7 +1172,7 @@ { HTASK16 hTask = 0; - dprintf_menu(stddeb,"patching resident popup: %04x %04x [%04x %04x]\n", + dprintf_info(menu,"patching resident popup: %04x %04x [%04x %04x]\n", checkQueue, checkWnd ? checkWnd->hwndSelf : 0, pTopPopupWnd->hmemTaskQ, pTopPopupWnd->owner ? pTopPopupWnd->owner->hwndSelf : 0); @@ -1213,7 +1210,7 @@ pTopPopupWnd->hmemTaskQ = task->hQueue; return TRUE; } - else dprintf_menu(stddeb,"failed to patch resident popup.\n"); + else dprintf_warn(menu,"failed to patch resident popup.\n"); } } return FALSE; @@ -1491,7 +1488,7 @@ if (!(menu = (POPUPMENU *)USER_HEAP_LIN_ADDR(hMenu))) { - dprintf_menu( stddeb, "MENU_InsertItem: %04x not a menu handle\n", + dprintf_warn(menu, "MENU_InsertItem: %04x not a menu handle\n", hMenu ); return NULL; } @@ -1509,13 +1506,13 @@ { if (!MENU_FindItem( &hMenu, &pos, flags )) { - dprintf_menu( stddeb, "MENU_InsertItem: item %x not found\n", + dprintf_warn(menu, "MENU_InsertItem: item %x not found\n", pos ); return NULL; } if (!(menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu))) { - dprintf_menu(stddeb,"MENU_InsertItem: %04x not a menu handle\n", + dprintf_warn(menu,"MENU_InsertItem: %04x not a menu handle\n", hMenu); return NULL; } @@ -1526,7 +1523,7 @@ newItems = HeapAlloc( SystemHeap, 0, sizeof(MENUITEM) * (menu->nItems+1) ); if (!newItems) { - dprintf_menu( stddeb, "MENU_InsertItem: allocation failed\n" ); + dprintf_warn(menu, "MENU_InsertItem: allocation failed\n" ); return NULL; } if (menu->nItems > 0) @@ -1623,7 +1620,7 @@ { LPSTR newstr = HEAP_strdupWtoA(GetProcessHeap(), 0, mii.dwTypeData); - dprintf_menu(stddeb, "Menu item: [%08x,%08x,%04x,%04x,%s]\n", + dprintf_info(menu, "Menu item: [%08x,%08x,%04x,%04x,%s]\n", mii.fType, mii.fState, mii.wID, resinfo, newstr); HeapFree( GetProcessHeap(), 0, newstr ); } @@ -1837,7 +1834,7 @@ item = &menu->items[menu->FocusedItem]; - dprintf_menu(stddeb, "MENU_ExecFocusedItem: %08x %08x %08x\n", + dprintf_info(menu, "MENU_ExecFocusedItem: %08x %08x %08x\n", hMenu, item->wID, item->hSubMenu); if (!(item->fType & MF_POPUP)) @@ -1932,7 +1929,7 @@ pmt->hCurrentMenu = MENU_ShowSubPopup( pmt->hOwnerWnd, hPtMenu, FALSE ); return TRUE; } - else dprintf_menu(stddeb,"\tunable to find clicked item!\n"); + else dprintf_warn(menu, "\tunable to find clicked item!\n"); } return FALSE; } @@ -2026,7 +2023,7 @@ LRESULT l = SendMessage16( pmt->hOwnerWnd, WM_NEXTMENU, (WPARAM16)vk, (IS_SYSTEM_MENU(menu)) ? GetSubMenu16(pmt->hTopMenu,0) : pmt->hTopMenu ); - dprintf_menu(stddeb,"NextMenu: %04x [%04x] -> %04x [%04x]\n", + dprintf_info(menu,"NextMenu: %04x [%04x] -> %04x [%04x]\n", (UINT16)pmt->hCurrentMenu, (UINT16)pmt->hOwnerWnd, LOWORD(l), HIWORD(l) ); if( l == 0 ) @@ -2074,7 +2071,7 @@ /* FIXME: Not sure what to do here, perhaps, * try to track hNewMenu as a popup? */ - dprintf_menu(stddeb,"MENU_DoNextMenu() got confused.\n"); + dprintf_info(menu,"MENU_DoNextMenu() got confused.\n"); return FALSE; } } @@ -2205,7 +2202,7 @@ POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( pmt->hTopMenu ); UINT32 nextcol; - dprintf_menu( stddeb, "MENU_KeyRight called, cur %x (%s), top %x (%s).\n", + dprintf_info(menu, "MENU_KeyRight called, cur %x (%s), top %x (%s).\n", pmt->hCurrentMenu, ((POPUPMENU *)USER_HEAP_LIN_ADDR(pmt->hCurrentMenu))-> items[0].text, @@ -2225,7 +2222,7 @@ /* Check to see if there's another column */ if( (nextcol = MENU_GetStartOfNextColumn( pmt->hCurrentMenu )) != NO_SELECTED_ITEM ) { - dprintf_menu( stddeb, "KeyRight: Going to %d.\n", nextcol ); + dprintf_info(menu, "KeyRight: Going to %d.\n", nextcol ); MENU_SelectItem( pmt->hOwnerWnd, pmt->hCurrentMenu, nextcol, TRUE ); return; @@ -2614,7 +2611,7 @@ if( hwnd == pTopPopupWnd->hwndSelf ) { - dprintf_menu(stddeb,"resident popup destroyed!\n"); + dprintf_err(menu, "resident popup destroyed!\n"); pTopPopupWnd = NULL; uSubPWndLevel = 0; @@ -2663,7 +2660,7 @@ WND *wndPtr; LPPOPUPMENU lppop; - dprintf_menu( stddeb, "MENU_GetMenuBarHeight: HWND 0x%x, width %d, " + dprintf_info(menu, "MENU_GetMenuBarHeight: HWND 0x%x, width %d, " "at (%d, %d).\n", hwnd, menubarWidth, orgX, orgY ); if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0; @@ -2683,7 +2680,7 @@ BOOL16 WINAPI ChangeMenu16( HMENU16 hMenu, UINT16 pos, SEGPTR data, UINT16 id, UINT16 flags ) { - dprintf_menu( stddeb,"ChangeMenu16: menu=%04x pos=%d data=%08lx id=%04x flags=%04x\n", + dprintf_info(menu,"ChangeMenu16: menu=%04x pos=%d data=%08lx id=%04x flags=%04x\n", hMenu, pos, (DWORD)data, id, flags ); if (flags & MF_APPEND) return AppendMenu16( hMenu, flags & ~MF_APPEND, id, data ); @@ -2709,7 +2706,7 @@ BOOL32 WINAPI ChangeMenu32A( HMENU32 hMenu, UINT32 pos, LPCSTR data, UINT32 id, UINT32 flags ) { - dprintf_menu( stddeb,"ChangeMenu32A: menu=%08x pos=%d data=%08lx id=%08x flags=%08x\n", + dprintf_info(menu,"ChangeMenu32A: menu=%08x pos=%d data=%08lx id=%08x flags=%08x\n", hMenu, pos, (DWORD)data, id, flags ); if (flags & MF_APPEND) return AppendMenu32A( hMenu, flags & ~MF_APPEND, id, data ); @@ -2730,7 +2727,7 @@ BOOL32 WINAPI ChangeMenu32W( HMENU32 hMenu, UINT32 pos, LPCWSTR data, UINT32 id, UINT32 flags ) { - dprintf_menu( stddeb,"ChangeMenu32W: menu=%08x pos=%d data=%08lx id=%08x flags=%08x\n", + dprintf_info(menu,"ChangeMenu32W: menu=%08x pos=%d data=%08lx id=%08x flags=%08x\n", hMenu, pos, (DWORD)data, id, flags ); if (flags & MF_APPEND) return AppendMenu32W( hMenu, flags & ~MF_APPEND, id, data ); @@ -2762,7 +2759,7 @@ MENUITEM *item; DWORD ret; - dprintf_menu( stddeb,"CheckMenuItem: %04x %04x %04x\n", hMenu, id, flags ); + dprintf_info(menu,"CheckMenuItem: %04x %04x %04x\n", hMenu, id, flags ); if (!(item = MENU_FindItem( &hMenu, &id, flags ))) return -1; ret = item->fState & MF_CHECKED; if (flags & MF_CHECKED) item->fState |= MF_CHECKED; @@ -2788,7 +2785,7 @@ BOOL32 bRet = FALSE; MENUITEM *item, *first = NULL; - dprintf_menu(stddeb,"EnableMenuItem (%04x, %04X, %04X) !\n", + dprintf_info(menu,"EnableMenuItem (%04x, %04X, %04X) !\n", hMenu, wItemID, wFlags); while( (item = MENU_FindItem( &hMenu, &wItemID, wFlags )) ) @@ -2836,14 +2833,14 @@ { MENUITEM *item; - dprintf_menu( stddeb, "GetMenuString32A: menu=%04x item=%04x ptr=%p len=%d flags=%04x\n", + dprintf_info(menu, "GetMenuString32A: menu=%04x item=%04x ptr=%p len=%d flags=%04x\n", hMenu, wItemID, str, nMaxSiz, wFlags ); if (!str || !nMaxSiz) return 0; str[0] = '\0'; if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return 0; if (!IS_STRING_ITEM(item->fType)) return 0; lstrcpyn32A( str, item->text, nMaxSiz ); - dprintf_menu( stddeb, "GetMenuString32A: returning '%s'\n", str ); + dprintf_info(menu, "GetMenuString32A: returning '%s'\n", str ); return strlen(str); } @@ -2856,7 +2853,7 @@ { MENUITEM *item; - dprintf_menu( stddeb, "GetMenuString32W: menu=%04x item=%04x ptr=%p len=%d flags=%04x\n", + dprintf_info(menu, "GetMenuString32W: menu=%04x item=%04x ptr=%p len=%d flags=%04x\n", hMenu, wItemID, str, nMaxSiz, wFlags ); if (!str || !nMaxSiz) return 0; str[0] = '\0'; @@ -2884,7 +2881,7 @@ UINT32 wHilite ) { LPPOPUPMENU menu; - dprintf_menu(stddeb,"HiliteMenuItem(%04x, %04x, %04x, %04x);\n", + dprintf_info(menu,"HiliteMenuItem(%04x, %04x, %04x, %04x);\n", hWnd, hMenu, wItemID, wHilite); if (!MENU_FindItem( &hMenu, &wItemID, wHilite )) return FALSE; if (!(menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu))) return FALSE; @@ -2910,7 +2907,7 @@ UINT32 WINAPI GetMenuState32( HMENU32 hMenu, UINT32 wItemID, UINT32 wFlags ) { MENUITEM *item; - dprintf_menu(stddeb,"GetMenuState(%04x, %04x, %04x);\n", + dprintf_info(menu,"GetMenuState(%04x, %04x, %04x);\n", hMenu, wItemID, wFlags); if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return -1; debug_print_menuitem (" item: ", item, ""); @@ -2937,7 +2934,7 @@ { LPPOPUPMENU menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu); if (!IS_A_MENU(menu)) return -1; - dprintf_menu( stddeb,"GetMenuItemCount16(%04x) returning %d\n", + dprintf_info(menu,"GetMenuItemCount16(%04x) returning %d\n", hMenu, menu->nItems ); return menu->nItems; } @@ -2950,7 +2947,7 @@ { LPPOPUPMENU menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu); if (!IS_A_MENU(menu)) return -1; - dprintf_menu( stddeb,"GetMenuItemCount32(%04x) returning %d\n", + dprintf_info(menu,"GetMenuItemCount32(%04x) returning %d\n", hMenu, menu->nItems ); return menu->nItems; } @@ -3007,10 +3004,10 @@ MENUITEM *item; if (IS_STRING_ITEM(flags) && str) - dprintf_menu( stddeb, "InsertMenu: hMenu %04x, pos %d, flags %08x, " + dprintf_info(menu, "InsertMenu: hMenu %04x, pos %d, flags %08x, " "id %04x, str '%s'\n", hMenu, pos, flags, id, str ); - else dprintf_menu( stddeb, "InsertMenu: hMenu %04x, pos %d, flags %08x, " + else dprintf_info(menu, "InsertMenu: hMenu %04x, pos %d, flags %08x, " "id %04x, str %08lx (not a string)\n", hMenu, pos, flags, id, (DWORD)str ); @@ -3096,7 +3093,7 @@ LPPOPUPMENU menu; MENUITEM *item; - dprintf_menu(stddeb,"RemoveMenu (%04x, %04x, %04x)\n",hMenu, nPos, wFlags); + dprintf_info(menu,"RemoveMenu (%04x, %04x, %04x)\n",hMenu, nPos, wFlags); if (!(item = MENU_FindItem( &hMenu, &nPos, wFlags ))) return FALSE; if (!(menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu))) return FALSE; @@ -3170,13 +3167,13 @@ if (IS_STRING_ITEM(flags)) { - dprintf_menu( stddeb, "ModifyMenu: %04x %d %04x %04x '%s'\n", + dprintf_info(menu, "ModifyMenu: %04x %d %04x %04x '%s'\n", hMenu, pos, flags, id, str ? str : "#NULL#" ); if (!str) return FALSE; } else { - dprintf_menu( stddeb, "ModifyMenu: %04x %d %04x %04x %08lx\n", + dprintf_info(menu, "ModifyMenu: %04x %d %04x %04x %08lx\n", hMenu, pos, flags, id, (DWORD)str ); } @@ -3254,7 +3251,7 @@ HBITMAP32 hNewUnCheck, HBITMAP32 hNewCheck) { MENUITEM *item; - dprintf_menu(stddeb,"SetMenuItemBitmaps(%04x, %04x, %04x, %04x, %04x)\n", + dprintf_info(menu,"SetMenuItemBitmaps(%04x, %04x, %04x, %04x, %04x)\n", hMenu, nPos, wFlags, hNewCheck, hNewUnCheck); if (!(item = MENU_FindItem( &hMenu, &nPos, wFlags ))) return FALSE; @@ -3299,7 +3296,7 @@ menu->hWnd = 0; menu->items = NULL; menu->FocusedItem = NO_SELECTED_ITEM; - dprintf_menu( stddeb, "CreateMenu: return %04x\n", hMenu ); + dprintf_info(menu, "CreateMenu: return %04x\n", hMenu ); return hMenu; } @@ -3318,7 +3315,7 @@ */ BOOL32 WINAPI DestroyMenu32( HMENU32 hMenu ) { - dprintf_menu(stddeb,"DestroyMenu(%04x)\n", hMenu); + dprintf_info(menu,"DestroyMenu(%04x)\n", hMenu); /* Silently ignore attempts to destroy default system popup */ @@ -3466,7 +3463,7 @@ { WND * wndPtr = WIN_FindWndPtr(hWnd); - dprintf_menu(stddeb,"SetMenu(%04x, %04x);\n", hWnd, hMenu); + dprintf_info(menu,"SetMenu(%04x, %04x);\n", hWnd, hMenu); if (wndPtr && !(wndPtr->dwStyle & WS_CHILD)) { @@ -3578,11 +3575,11 @@ if (HIWORD(name)) { char *str = (char *)PTR_SEG_TO_LIN( name ); - dprintf_menu( stddeb, "LoadMenu(%04x,'%s')\n", instance, str ); + dprintf_info(menu, "LoadMenu(%04x,'%s')\n", instance, str ); if (str[0] == '#') name = (SEGPTR)atoi( str + 1 ); } else - dprintf_resource(stddeb,"LoadMenu(%04x,%04x)\n",instance,LOWORD(name)); + dprintf_info(resource,"LoadMenu(%04x,%04x)\n",instance,LOWORD(name)); if (!name) return 0; @@ -3630,7 +3627,7 @@ WORD version, offset; LPCSTR p = (LPCSTR)template; - dprintf_menu(stddeb,"LoadMenuIndirect16: %p\n", template ); + dprintf_info(menu,"LoadMenuIndirect16: %p\n", template ); version = GET_WORD(p); p += sizeof(WORD); if (version) @@ -3659,7 +3656,7 @@ WORD version, offset; LPCSTR p = (LPCSTR)template; - dprintf_menu(stddeb,"LoadMenuIndirect32A: %p\n", template ); + dprintf_info(menu,"LoadMenuIndirect32A: %p\n", template ); version = GET_WORD(p); p += sizeof(WORD); switch (version) @@ -3934,7 +3931,7 @@ MENUITEM *mifirst, *milast, *micheck; HMENU32 mfirst = hMenu, mlast = hMenu, mcheck = hMenu; - dprintf_menu (stddeb, + dprintf_info(menu, "CheckMenuRadioItem32: ox%x: %d-%d, check %d, bypos=%d\n", hMenu, first, last, check, bypos); @@ -3988,7 +3985,7 @@ MENUITEM *item; HMENU32 orghMenu = hMenu; - dprintf_menu (stddeb, "GetMenuItemRect32 (0x%x,0x%x,%d,%p)\n", + dprintf_info(menu, "GetMenuItemRect32 (0x%x,0x%x,%d,%p)\n", hwnd, hMenu, uItem, rect); item = MENU_FindItem (&hMenu, &uItem, MF_BYPOSITION);
diff --git a/controls/progress.c b/controls/progress.c index 6a6e388..426c2c4 100644 --- a/controls/progress.c +++ b/controls/progress.c
@@ -17,7 +17,6 @@ #include "graphics.h" #include "heap.h" #include "win.h" -#include "stddebug.h" #include "debug.h" /* Control configuration constants */ @@ -27,7 +26,7 @@ /* Work constants */ -#define UNKNOWN_PARAM(msg, wParam, lParam) dprintf_progress(stddeb, \ +#define UNKNOWN_PARAM(msg, wParam, lParam) dprintf_warn(progress, \ "Progress Ctrl: Unknown parameter(s) for message " #msg \ "(%04x): wp=%04x lp=%08lx\n", msg, wParam, lParam); @@ -48,7 +47,7 @@ RECT32 rect; HDC32 hdc; - dprintf_progress(stddeb, "Progress Bar: paint pos=%d min=%d, max=%d\n", + dprintf_info(progress, "Progress Bar: paint pos=%d min=%d, max=%d\n", infoPtr->CurVal, infoPtr->MinVal, infoPtr->MaxVal); /* get a dc */ @@ -115,11 +114,11 @@ infoPtr->MaxVal=100; infoPtr->CurVal=0; infoPtr->Step=10; - dprintf_updown(stddeb, "Progress Ctrl creation, hwnd=%04x\n", hwnd); + dprintf_info(updown, "Progress Ctrl creation, hwnd=%04x\n", hwnd); break; case WM_DESTROY: - dprintf_updown(stddeb, "Progress Ctrl destruction, hwnd=%04x\n", hwnd); + dprintf_info(updown, "Progress Ctrl destruction, hwnd=%04x\n", hwnd); break; case WM_ERASEBKGND:
diff --git a/controls/scroll.c b/controls/scroll.c index f1f4512..956f359 100644 --- a/controls/scroll.c +++ b/controls/scroll.c
@@ -15,7 +15,6 @@ #include "graphics.h" #include "heap.h" #include "win.h" -#include "stddebug.h" #include "debug.h" @@ -616,7 +615,7 @@ return; /* Should never happen */ } - dprintf_scroll( stddeb, "ScrollBar Event: hwnd=%04x bar=%d msg=%x pt=%d,%d hit=%d\n", + dprintf_info(scroll, "ScrollBar Event: hwnd=%04x bar=%d msg=%x pt=%d,%d hit=%d\n", hwnd, nBar, msg, pt.x, pt.y, hittest ); switch(trackHitTest) @@ -795,7 +794,7 @@ } } if (!hUpArrow) SCROLL_LoadBitmaps(); - dprintf_scroll( stddeb, "ScrollBar creation, hwnd=%04x\n", hwnd ); + dprintf_info(scroll, "ScrollBar creation, hwnd=%04x\n", hwnd ); return 0; case WM_LBUTTONDOWN: @@ -910,19 +909,18 @@ SCROLLBAR_INFO *infoPtr; UINT32 new_flags; BOOL32 repaint_arrows = FALSE; + dbg_decl_str(scroll, 256); if (!(infoPtr = SCROLL_GetScrollInfo(hwnd, nBar))) return 0; if (info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)) return 0; if ((info->cbSize != sizeof(*info)) && (info->cbSize != sizeof(*info)-sizeof(info->nTrackPos))) return 0; - dprintf_scroll( stddeb, "SetScrollInfo: hwnd=%04x bar=%d", hwnd, nBar ); - /* Set the page size */ if (info->fMask & SIF_PAGE) { - dprintf_scroll( stddeb, " page=%d", info->nPage ); + dsprintf(scroll, " page=%d", info->nPage ); infoPtr->Page = info->nPage; } @@ -930,7 +928,7 @@ if (info->fMask & SIF_POS) { - dprintf_scroll( stddeb, " pos=%d", info->nPos ); + dsprintf(scroll, " pos=%d", info->nPos ); infoPtr->CurVal = info->nPos; } @@ -938,7 +936,7 @@ if (info->fMask & SIF_RANGE) { - dprintf_scroll( stddeb, " min=%d max=%d", info->nMin, info->nMax ); + dsprintf(scroll, " min=%d max=%d", info->nMin, info->nMax ); /* Invalid range -> range is set to (0,0) */ if ((info->nMin > info->nMax) || @@ -954,6 +952,9 @@ } } + dprintf_info(scroll, "SetScrollInfo: hwnd=%04x bar=%d %s\n", + hwnd, nBar, dbg_str(scroll)); + /* Make sure the page size is valid */ if (infoPtr->Page < 0) infoPtr->Page = 0; @@ -967,7 +968,7 @@ else if (infoPtr->CurVal > infoPtr->MaxVal - MAX( infoPtr->Page-1, 0 )) infoPtr->CurVal = infoPtr->MaxVal - MAX( infoPtr->Page-1, 0 ); - dprintf_scroll( stddeb, "\n new values: page=%d pos=%d min=%d max=%d\n", + dprintf_info(scroll, "\n new values: page=%d pos=%d min=%d max=%d\n", infoPtr->Page, infoPtr->CurVal, infoPtr->MinVal, infoPtr->MaxVal ); @@ -1208,7 +1209,7 @@ WND *wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return FALSE; - dprintf_scroll( stddeb, "ShowScrollBar: hwnd=%04x bar=%d on=%d\n", + dprintf_info(scroll, "ShowScrollBar: hwnd=%04x bar=%d on=%d\n", hwnd, nBar, fShow ); switch(nBar) @@ -1284,7 +1285,7 @@ SCROLLBAR_INFO *infoPtr; if (!(infoPtr = SCROLL_GetScrollInfo( hwnd, nBar ))) return FALSE; - dprintf_scroll( stddeb, "EnableScrollBar: %04x %d %d\n", + dprintf_info(scroll, "EnableScrollBar: %04x %d %d\n", hwnd, nBar, flags ); flags &= ESB_DISABLE_BOTH; if (infoPtr->flags == flags) return FALSE;
diff --git a/controls/uitools.c b/controls/uitools.c index 15779a1..8872a11 100644 --- a/controls/uitools.c +++ b/controls/uitools.c
@@ -574,7 +574,7 @@ */ BOOL32 WINAPI DrawEdge32( HDC32 hdc, LPRECT32 rc, UINT32 edge, UINT32 flags ) { - dprintf_graphics( stddeb, "DrawEdge: %04x %d,%d-%d,%d %04x %04x\n", + dprintf_info(graphics, "DrawEdge: %04x %d,%d-%d,%d %04x %04x\n", hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags );
diff --git a/controls/updown.c b/controls/updown.c index c0a2848..8a8302a 100644 --- a/controls/updown.c +++ b/controls/updown.c
@@ -35,8 +35,6 @@ #include "graphics.h" #include "heap.h" #include "win.h" -#include "stddebug.h" -/*#define DEBUG_UPDOWN*/ #include "debug.h" /* Control configuration constants */ @@ -62,7 +60,7 @@ static int accelIndex = -1; -#define UNKNOWN_PARAM(msg, wParam, lParam) dprintf_updown(stddeb, \ +#define UNKNOWN_PARAM(msg, wParam, lParam) dprintf_warn(updown, \ "UpDown Ctrl: Unknown parameter(s) for message " #msg \ "(%04x): wp=%04x lp=%08lx\n", msg, wParam, lParam); @@ -209,7 +207,7 @@ if(*src || !UPDOWN_InBounds(wndPtr, newVal)) return FALSE; - dprintf_updown(stddeb, "UpDown Ctrl: new value(%d) read from buddy " + dprintf_info(updown, "UpDown Ctrl: new value(%d) read from buddy " "(old=%d)\n", newVal, infoPtr->CurVal); } @@ -234,7 +232,7 @@ if (!IsWindow32(infoPtr->Buddy)) return FALSE; - dprintf_updown(stddeb, "UpDown Ctrl: set new value(%d) to buddy.\n", + dprintf_info(updown, "UpDown Ctrl: set new value(%d) to buddy.\n", infoPtr->CurVal); /*if the buddy is a list window, we must set curr index */ @@ -381,7 +379,7 @@ int old_val = infoPtr->CurVal; NM_UPDOWN ni; - dprintf_updown(stddeb, "UpDown Ctrl action: %s by %d\n", + dprintf_info(updown, "UpDown Ctrl action: %s by %d\n", incr ? "inc" : "dec", delta); /* check if we can do the modification first */ @@ -583,13 +581,13 @@ if(wndPtr->dwStyle & UDS_AUTOBUDDY) UPDOWN_SetBuddy(wndPtr, GetWindow32(wndPtr->hwndSelf, GW_HWNDPREV)); - dprintf_updown(stddeb, "UpDown Ctrl creation, hwnd=%04x\n", hwnd); + dprintf_info(updown, "UpDown Ctrl creation, hwnd=%04x\n", hwnd); break; case WM_DESTROY: if(infoPtr->AccelVect) free(infoPtr->AccelVect); - dprintf_updown(stddeb, "UpDown Ctrl destruction, hwnd=%04x\n", hwnd); + dprintf_info(updown, "UpDown Ctrl destruction, hwnd=%04x\n", hwnd); break; case WM_ENABLE: @@ -679,7 +677,7 @@ return temp; case UDM_SETACCEL: - dprintf_updown(stddeb, "UpDown Ctrl new accel info, hwnd=%04x\n", hwnd); + dprintf_info(updown, "UpDown Ctrl new accel info, hwnd=%04x\n", hwnd); if(infoPtr->AccelVect){ free(infoPtr->AccelVect); infoPtr->AccelCount = 0; @@ -699,7 +697,7 @@ return infoPtr->Base; case UDM_SETBASE: - dprintf_updown(stddeb, "UpDown Ctrl new base(%d), hwnd=%04x\n", + dprintf_info(updown, "UpDown Ctrl new base(%d), hwnd=%04x\n", wParam, hwnd); if ( !(wParam==10 || wParam==16) || lParam) UNKNOWN_PARAM(UDM_SETBASE, wParam, lParam); @@ -721,7 +719,7 @@ temp = infoPtr->Buddy; infoPtr->Buddy = wParam; UPDOWN_SetBuddy(wndPtr, wParam); - dprintf_updown(stddeb, "UpDown Ctrl new buddy(%04x), hwnd=%04x\n", + dprintf_info(updown, "UpDown Ctrl new buddy(%04x), hwnd=%04x\n", infoPtr->Buddy, hwnd); return temp; @@ -735,7 +733,7 @@ if (wParam || HIWORD(lParam)) UNKNOWN_PARAM(UDM_GETPOS, wParam, lParam); temp = SLOWORD(lParam); - dprintf_updown(stddeb, "UpDown Ctrl new value(%d), hwnd=%04x\n", + dprintf_info(updown, "UpDown Ctrl new value(%d), hwnd=%04x\n", temp, hwnd); if(!UPDOWN_InBounds(wndPtr, temp)){ if(temp < infoPtr->MinVal) @@ -760,7 +758,7 @@ infoPtr->MaxVal = SLOWORD(lParam); /* UD_MINVAL <= Max <= UD_MAXVAL */ infoPtr->MinVal = SHIWORD(lParam); /* UD_MINVAL <= Min <= UD_MAXVAL */ /* |Max-Min| <= UD_MAXVAL */ - dprintf_updown(stddeb, "UpDown Ctrl new range(%d to %d), hwnd=%04x\n", + dprintf_info(updown, "UpDown Ctrl new range(%d to %d), hwnd=%04x\n", infoPtr->MinVal, infoPtr->MaxVal, hwnd); break;