Converted to the new debugging interface (done with the help of the

script written by Patrik Stridvall).
This commit is contained in:
Alexandre Julliard 1999-05-02 14:32:27 +00:00
parent 50b3d7b3e3
commit 06c275a643
61 changed files with 2351 additions and 2354 deletions

View File

@ -18,7 +18,7 @@
#include "combo.h" #include "combo.h"
#include "local.h" #include "local.h"
#include "resource.h" #include "resource.h"
#include "debug.h" #include "debugtools.h"
#include "callback.h" #include "callback.h"
#include "tweak.h" #include "tweak.h"
@ -113,7 +113,7 @@ typedef struct
#define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0) #define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0)
#define DPRINTF_EDIT_NOTIFY(hwnd, str) \ #define DPRINTF_EDIT_NOTIFY(hwnd, str) \
({TRACE(edit, "notification " str " sent to hwnd=%08x\n", \ ({TRACE_(edit)("notification " str " sent to hwnd=%08x\n", \
(UINT)(hwnd));}) (UINT)(hwnd));})
/* used for disabled or read-only edit control */ /* used for disabled or read-only edit control */
#define EDIT_SEND_CTLCOLORSTATIC(wnd,hdc) \ #define EDIT_SEND_CTLCOLORSTATIC(wnd,hdc) \
@ -128,11 +128,11 @@ typedef struct
MAKEWPARAM((wnd)->wIDmenu, wNotifyCode), \ MAKEWPARAM((wnd)->wIDmenu, wNotifyCode), \
(LPARAM)(wnd)->hwndSelf)) (LPARAM)(wnd)->hwndSelf))
#define DPRINTF_EDIT_MSG16(str) \ #define DPRINTF_EDIT_MSG16(str) \
TRACE(edit, \ TRACE_(edit)(\
"16 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \ "16 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \
(UINT)hwnd, (UINT)wParam, (UINT)lParam) (UINT)hwnd, (UINT)wParam, (UINT)lParam)
#define DPRINTF_EDIT_MSG32(str) \ #define DPRINTF_EDIT_MSG32(str) \
TRACE(edit, \ TRACE_(edit)(\
"32 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \ "32 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \
(UINT)hwnd, (UINT)wParam, (UINT)lParam) (UINT)hwnd, (UINT)wParam, (UINT)lParam)
@ -1008,7 +1008,7 @@ static INT EDIT_CallWordBreakProc(WND *wnd, EDITSTATE *es, INT start, INT index,
} }
else if (es->word_break_proc32A) else if (es->word_break_proc32A)
{ {
TRACE(relay, "(wordbrk=%p,str='%s',idx=%d,cnt=%d,act=%d)\n", TRACE_(relay)("(wordbrk=%p,str='%s',idx=%d,cnt=%d,act=%d)\n",
es->word_break_proc32A, es->text + start, index, es->word_break_proc32A, es->text + start, index,
count, action ); count, action );
return (INT)es->word_break_proc32A( es->text + start, index, return (INT)es->word_break_proc32A( es->text + start, index,
@ -1190,7 +1190,7 @@ static LPSTR EDIT_GetPasswordPointer_SL(WND *wnd, EDITSTATE *es)
static void EDIT_LockBuffer(WND *wnd, EDITSTATE *es) static void EDIT_LockBuffer(WND *wnd, EDITSTATE *es)
{ {
if (!es) { if (!es) {
ERR(edit, "no EDITSTATE ... please report\n"); ERR_(edit)("no EDITSTATE ... please report\n");
return; return;
} }
if (!(es->style & ES_MULTILINE)) if (!(es->style & ES_MULTILINE))
@ -1201,7 +1201,7 @@ static void EDIT_LockBuffer(WND *wnd, EDITSTATE *es)
else if (es->hloc16) else if (es->hloc16)
es->text = LOCAL_Lock(wnd->hInstance, es->hloc16); es->text = LOCAL_Lock(wnd->hInstance, es->hloc16);
else { else {
ERR(edit, "no buffer ... please report\n"); ERR_(edit)("no buffer ... please report\n");
return; return;
} }
} }
@ -1340,7 +1340,7 @@ static BOOL EDIT_MakeFit(WND *wnd, EDITSTATE *es, INT size)
if (size > es->buffer_limit) if (size > es->buffer_limit)
size = es->buffer_limit; size = es->buffer_limit;
TRACE(edit, "trying to ReAlloc to %d+1\n", size); TRACE_(edit)("trying to ReAlloc to %d+1\n", size);
EDIT_UnlockBuffer(wnd, es, TRUE); EDIT_UnlockBuffer(wnd, es, TRUE);
if (es->text) { if (es->text) {
@ -1350,25 +1350,25 @@ static BOOL EDIT_MakeFit(WND *wnd, EDITSTATE *es, INT size)
es->buffer_size = 0; es->buffer_size = 0;
} else if (es->hloc32) { } else if (es->hloc32) {
if ((hNew32 = LocalReAlloc(es->hloc32, size + 1, 0))) { if ((hNew32 = LocalReAlloc(es->hloc32, size + 1, 0))) {
TRACE(edit, "Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32); TRACE_(edit)("Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32);
es->hloc32 = hNew32; es->hloc32 = hNew32;
es->buffer_size = MIN(LocalSize(es->hloc32) - 1, es->buffer_limit); es->buffer_size = MIN(LocalSize(es->hloc32) - 1, es->buffer_limit);
} }
} else if (es->hloc16) { } else if (es->hloc16) {
if ((hNew16 = LOCAL_ReAlloc(wnd->hInstance, es->hloc16, size + 1, LMEM_MOVEABLE))) { if ((hNew16 = LOCAL_ReAlloc(wnd->hInstance, es->hloc16, size + 1, LMEM_MOVEABLE))) {
TRACE(edit, "Old 16 bit handle %08x, new handle %08x\n", es->hloc16, hNew16); TRACE_(edit)("Old 16 bit handle %08x, new handle %08x\n", es->hloc16, hNew16);
es->hloc16 = hNew16; es->hloc16 = hNew16;
es->buffer_size = MIN(LOCAL_Size(wnd->hInstance, es->hloc16) - 1, es->buffer_limit); es->buffer_size = MIN(LOCAL_Size(wnd->hInstance, es->hloc16) - 1, es->buffer_limit);
} }
} }
if (es->buffer_size < size) { if (es->buffer_size < size) {
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
WARN(edit, "FAILED ! We now have %d+1\n", es->buffer_size); WARN_(edit)("FAILED ! We now have %d+1\n", es->buffer_size);
EDIT_NOTIFY_PARENT(wnd, EN_ERRSPACE, "EN_ERRSPACE"); EDIT_NOTIFY_PARENT(wnd, EN_ERRSPACE, "EN_ERRSPACE");
return FALSE; return FALSE;
} else { } else {
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
TRACE(edit, "We now have %d+1\n", es->buffer_size); TRACE_(edit)("We now have %d+1\n", es->buffer_size);
return TRUE; return TRUE;
} }
} }
@ -1387,12 +1387,12 @@ static BOOL EDIT_MakeUndoFit(WND *wnd, EDITSTATE *es, INT size)
return TRUE; return TRUE;
size = ((size / GROWLENGTH) + 1) * GROWLENGTH; size = ((size / GROWLENGTH) + 1) * GROWLENGTH;
TRACE(edit, "trying to ReAlloc to %d+1\n", size); TRACE_(edit)("trying to ReAlloc to %d+1\n", size);
if ((es->undo_text = HeapReAlloc(es->heap, 0, es->undo_text, size + 1))) { 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; es->undo_buffer_size = HeapSize(es->heap, 0, es->undo_text) - 1;
if (es->undo_buffer_size < size) { if (es->undo_buffer_size < size) {
WARN(edit, "FAILED ! We now have %d+1\n", es->undo_buffer_size); WARN_(edit)("FAILED ! We now have %d+1\n", es->undo_buffer_size);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -1680,7 +1680,7 @@ static void EDIT_PaintLine(WND *wnd, EDITSTATE *es, HDC dc, INT line, BOOL rev)
} else if (line) } else if (line)
return; return;
TRACE(edit, "line=%d\n", line); TRACE_(edit)("line=%d\n", line);
pos = EDIT_EM_PosFromChar(wnd, es, EDIT_EM_LineIndex(wnd, es, line), FALSE); pos = EDIT_EM_PosFromChar(wnd, es, EDIT_EM_LineIndex(wnd, es, line), FALSE);
x = SLOWORD(pos); x = SLOWORD(pos);
@ -1809,17 +1809,17 @@ static void EDIT_SetRectNP(WND *wnd, EDITSTATE *es, LPRECT rc)
static void EDIT_UnlockBuffer(WND *wnd, EDITSTATE *es, BOOL force) static void EDIT_UnlockBuffer(WND *wnd, EDITSTATE *es, BOOL force)
{ {
if (!es) { if (!es) {
ERR(edit, "no EDITSTATE ... please report\n"); ERR_(edit)("no EDITSTATE ... please report\n");
return; return;
} }
if (!(es->style & ES_MULTILINE)) if (!(es->style & ES_MULTILINE))
return; return;
if (!es->lock_count) { if (!es->lock_count) {
ERR(edit, "lock_count == 0 ... please report\n"); ERR_(edit)("lock_count == 0 ... please report\n");
return; return;
} }
if (!es->text) { if (!es->text) {
ERR(edit, "es->text == 0 ... please report\n"); ERR_(edit)("es->text == 0 ... please report\n");
return; return;
} }
if (force || (es->lock_count == 1)) { if (force || (es->lock_count == 1)) {
@ -1850,7 +1850,7 @@ static INT EDIT_WordBreakProc(LPSTR s, INT index, INT count, INT action)
{ {
INT ret = 0; INT ret = 0;
TRACE(edit, "s=%p, index=%u, count=%u, action=%d\n", TRACE_(edit)("s=%p, index=%u, count=%u, action=%d\n",
s, index, count, action); s, index, count, action);
switch (action) { switch (action) {
@ -1894,7 +1894,7 @@ static INT EDIT_WordBreakProc(LPSTR s, INT index, INT count, INT action)
ret = (s[index] == ' '); ret = (s[index] == ' ');
break; break;
default: default:
ERR(edit, "unknown action code, please report !\n"); ERR_(edit)("unknown action code, please report !\n");
break; break;
} }
return ret; return ret;
@ -1940,7 +1940,7 @@ static BOOL EDIT_EM_FmtLines(WND *wnd, EDITSTATE *es, BOOL add_eol)
es->flags &= ~EF_USE_SOFTBRK; es->flags &= ~EF_USE_SOFTBRK;
if (add_eol) { if (add_eol) {
es->flags |= EF_USE_SOFTBRK; es->flags |= EF_USE_SOFTBRK;
FIXME(edit, "soft break enabled, not implemented\n"); FIXME_(edit)("soft break enabled, not implemented\n");
} }
return add_eol; return add_eol;
} }
@ -1977,12 +1977,12 @@ static HLOCAL EDIT_EM_GetHandle(WND *wnd, EDITSTATE *es)
return (HLOCAL)es->hloc16; return (HLOCAL)es->hloc16;
if (!(newBuf = LocalAlloc(LMEM_MOVEABLE, lstrlenA(es->text) + 1))) { if (!(newBuf = LocalAlloc(LMEM_MOVEABLE, lstrlenA(es->text) + 1))) {
ERR(edit, "could not allocate new 32 bit buffer\n"); ERR_(edit)("could not allocate new 32 bit buffer\n");
return 0; return 0;
} }
newSize = MIN(LocalSize(newBuf) - 1, es->buffer_limit); newSize = MIN(LocalSize(newBuf) - 1, es->buffer_limit);
if (!(newText = LocalLock(newBuf))) { if (!(newText = LocalLock(newBuf))) {
ERR(edit, "could not lock new 32 bit buffer\n"); ERR_(edit)("could not lock new 32 bit buffer\n");
LocalFree(newBuf); LocalFree(newBuf);
return 0; return 0;
} }
@ -1995,7 +1995,7 @@ static HLOCAL EDIT_EM_GetHandle(WND *wnd, EDITSTATE *es)
es->buffer_size = newSize; es->buffer_size = newSize;
es->text = newText; es->text = newText;
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
TRACE(edit, "switched to 32 bit local heap\n"); TRACE_(edit)("switched to 32 bit local heap\n");
return es->hloc32; return es->hloc32;
} }
@ -2031,18 +2031,18 @@ static HLOCAL16 EDIT_EM_GetHandle16(WND *wnd, EDITSTATE *es)
if (!LOCAL_HeapSize(wnd->hInstance)) { if (!LOCAL_HeapSize(wnd->hInstance)) {
if (!LocalInit16(wnd->hInstance, 0, if (!LocalInit16(wnd->hInstance, 0,
GlobalSize16(wnd->hInstance))) { GlobalSize16(wnd->hInstance))) {
ERR(edit, "could not initialize local heap\n"); ERR_(edit)("could not initialize local heap\n");
return 0; return 0;
} }
TRACE(edit, "local heap initialized\n"); TRACE_(edit)("local heap initialized\n");
} }
if (!(newBuf = LOCAL_Alloc(wnd->hInstance, LMEM_MOVEABLE, lstrlenA(es->text) + 1))) { if (!(newBuf = LOCAL_Alloc(wnd->hInstance, LMEM_MOVEABLE, lstrlenA(es->text) + 1))) {
ERR(edit, "could not allocate new 16 bit buffer\n"); ERR_(edit)("could not allocate new 16 bit buffer\n");
return 0; return 0;
} }
newSize = MIN(LOCAL_Size(wnd->hInstance, newBuf) - 1, es->buffer_limit); newSize = MIN(LOCAL_Size(wnd->hInstance, newBuf) - 1, es->buffer_limit);
if (!(newText = LOCAL_Lock(wnd->hInstance, newBuf))) { if (!(newText = LOCAL_Lock(wnd->hInstance, newBuf))) {
ERR(edit, "could not lock new 16 bit buffer\n"); ERR_(edit)("could not lock new 16 bit buffer\n");
LOCAL_Free(wnd->hInstance, newBuf); LOCAL_Free(wnd->hInstance, newBuf);
return 0; return 0;
} }
@ -2059,7 +2059,7 @@ static HLOCAL16 EDIT_EM_GetHandle16(WND *wnd, EDITSTATE *es)
es->buffer_size = newSize; es->buffer_size = newSize;
es->text = newText; es->text = newText;
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
TRACE(edit, "switched to 16 bit buffer\n"); TRACE_(edit)("switched to 16 bit buffer\n");
return es->hloc16; return es->hloc16;
} }
@ -2559,7 +2559,7 @@ static void EDIT_EM_SetHandle(WND *wnd, EDITSTATE *es, HLOCAL hloc)
return; return;
if (!hloc) { if (!hloc) {
WARN(edit, "called with NULL handle\n"); WARN_(edit)("called with NULL handle\n");
return; return;
} }
@ -2602,7 +2602,7 @@ static void EDIT_EM_SetHandle16(WND *wnd, EDITSTATE *es, HLOCAL16 hloc)
return; return;
if (!hloc) { if (!hloc) {
WARN(edit, "called with NULL handle\n"); WARN_(edit)("called with NULL handle\n");
return; return;
} }
@ -2681,7 +2681,7 @@ static void EDIT_EM_SetMargins(WND *wnd, EDITSTATE *es, INT action,
else else
es->right_margin = es->char_width / 3; es->right_margin = es->char_width / 3;
} }
TRACE(edit, "left=%d, right=%d\n", es->left_margin, es->right_margin); TRACE_(edit)("left=%d, right=%d\n", es->left_margin, es->right_margin);
} }
@ -2865,7 +2865,7 @@ static BOOL EDIT_EM_Undo(WND *wnd, EDITSTATE *es)
lstrcpyA(utext, es->undo_text); lstrcpyA(utext, es->undo_text);
TRACE(edit, "before UNDO:insertion length = %d, deletion buffer = %s\n", TRACE_(edit)("before UNDO:insertion length = %d, deletion buffer = %s\n",
es->undo_insert_count, utext); es->undo_insert_count, utext);
EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE);
@ -2874,7 +2874,7 @@ static BOOL EDIT_EM_Undo(WND *wnd, EDITSTATE *es)
EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE);
HeapFree(es->heap, 0, utext); HeapFree(es->heap, 0, utext);
TRACE(edit, "after UNDO:insertion length = %d, deletion buffer = %s\n", TRACE_(edit)("after UNDO:insertion length = %d, deletion buffer = %s\n",
es->undo_insert_count, es->undo_text); es->undo_insert_count, es->undo_text);
return TRUE; return TRUE;
@ -2946,7 +2946,7 @@ static void EDIT_WM_Command(WND *wnd, EDITSTATE *es, INT code, INT id, HWND cont
EDIT_EM_ScrollCaret(wnd, es); EDIT_EM_ScrollCaret(wnd, es);
break; break;
default: default:
ERR(edit, "unknown menu item, please report\n"); ERR_(edit)("unknown menu item, please report\n");
break; break;
} }
} }
@ -3133,9 +3133,9 @@ static LRESULT EDIT_HScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
LRESULT ret = 0; LRESULT ret = 0;
if (!(es->flags & EF_HSCROLL_HACK)) { if (!(es->flags & EF_HSCROLL_HACK)) {
ERR(edit, "hacked WM_HSCROLL handler invoked\n"); ERR_(edit)("hacked WM_HSCROLL handler invoked\n");
ERR(edit, " if you are _not_ running 16 bit notepad, please report\n"); ERR_(edit)(" if you are _not_ running 16 bit notepad, please report\n");
ERR(edit, " (this message is only displayed once per edit control)\n"); ERR_(edit)(" (this message is only displayed once per edit control)\n");
es->flags |= EF_HSCROLL_HACK; es->flags |= EF_HSCROLL_HACK;
} }
@ -3190,7 +3190,7 @@ static LRESULT EDIT_HScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
break; break;
default: default:
ERR(edit, "undocumented (hacked) WM_HSCROLL parameter, please report\n"); ERR_(edit)("undocumented (hacked) WM_HSCROLL parameter, please report\n");
return 0; return 0;
} }
if (dx) if (dx)
@ -3260,7 +3260,7 @@ static LRESULT EDIT_WM_HScroll(WND *wnd, EDITSTATE *es, INT action, INT pos, HWN
break; break;
default: default:
ERR(edit, "undocumented WM_HSCROLL parameter, please report\n"); ERR_(edit)("undocumented WM_HSCROLL parameter, please report\n");
return 0; return 0;
} }
if (dx) if (dx)
@ -3283,7 +3283,7 @@ static BOOL EDIT_CheckCombo(WND *wnd, UINT msg, INT key, DWORD key_data)
HWND hCombo = wnd->parent->hwndSelf; HWND hCombo = wnd->parent->hwndSelf;
BOOL bUIFlip = TRUE; BOOL bUIFlip = TRUE;
TRACE(combo, "[%04x]: handling msg %04x (%04x)\n", TRACE_(combo)("[%04x]: handling msg %04x (%04x)\n",
wnd->hwndSelf, (UINT16)msg, (UINT16)key); wnd->hwndSelf, (UINT16)msg, (UINT16)key);
switch (msg) { switch (msg) {
@ -3816,10 +3816,10 @@ static void EDIT_WM_SetText(WND *wnd, EDITSTATE *es, LPCSTR text)
{ {
EDIT_EM_SetSel(wnd, es, 0, -1, FALSE); EDIT_EM_SetSel(wnd, es, 0, -1, FALSE);
if (text) { if (text) {
TRACE(edit, "\t'%s'\n", text); TRACE_(edit)("\t'%s'\n", text);
EDIT_EM_ReplaceSel(wnd, es, FALSE, text); EDIT_EM_ReplaceSel(wnd, es, FALSE, text);
} else { } else {
TRACE(edit, "\t<NULL>\n"); TRACE_(edit)("\t<NULL>\n");
EDIT_EM_ReplaceSel(wnd, es, FALSE, ""); EDIT_EM_ReplaceSel(wnd, es, FALSE, "");
} }
es->x_offset = 0; es->x_offset = 0;
@ -3902,9 +3902,9 @@ static LRESULT EDIT_VScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
LRESULT ret = 0; LRESULT ret = 0;
if (!(es->flags & EF_VSCROLL_HACK)) { if (!(es->flags & EF_VSCROLL_HACK)) {
ERR(edit, "hacked WM_VSCROLL handler invoked\n"); ERR_(edit)("hacked WM_VSCROLL handler invoked\n");
ERR(edit, " if you are _not_ running 16 bit notepad, please report\n"); ERR_(edit)(" if you are _not_ running 16 bit notepad, please report\n");
ERR(edit, " (this message is only displayed once per edit control)\n"); ERR_(edit)(" (this message is only displayed once per edit control)\n");
es->flags |= EF_VSCROLL_HACK; es->flags |= EF_VSCROLL_HACK;
} }
@ -3947,7 +3947,7 @@ static LRESULT EDIT_VScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
break; break;
default: default:
ERR(edit, "undocumented (hacked) WM_VSCROLL parameter, please report\n"); ERR_(edit)("undocumented (hacked) WM_VSCROLL parameter, please report\n");
return 0; return 0;
} }
if (dy) if (dy)
@ -4004,7 +4004,7 @@ static LRESULT EDIT_WM_VScroll(WND *wnd, EDITSTATE *es, INT action, INT pos, HWN
break; break;
default: default:
ERR(edit, "undocumented WM_VSCROLL action %d, please report\n", ERR_(edit)("undocumented WM_VSCROLL action %d, please report\n",
action); action);
return 0; return 0;
} }

View File

@ -14,7 +14,7 @@
#include "spy.h" #include "spy.h"
#include "win.h" #include "win.h"
#include "combo.h" #include "combo.h"
#include "debug.h" #include "debugtools.h"
#include "tweak.h" #include "tweak.h"
DECLARE_DEBUG_CHANNEL(combo) DECLARE_DEBUG_CHANNEL(combo)
@ -106,14 +106,14 @@ void LISTBOX_Dump( WND *wnd )
LB_ITEMDATA *item; LB_ITEMDATA *item;
LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra; LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra;
DUMP( "Listbox:\n" ); TRACE_(listbox)( "Listbox:\n" );
DUMP( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n", TRACE_(listbox)( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n",
wnd->hwndSelf, (UINT)descr, descr->heap, descr->nb_items, wnd->hwndSelf, (UINT)descr, descr->heap, descr->nb_items,
descr->top_item ); descr->top_item );
for (i = 0, item = descr->items; i < descr->nb_items; i++, item++) for (i = 0, item = descr->items; i < descr->nb_items; i++, item++)
{ {
DUMP( "%4d: %-40s %d %08lx %3d\n", TRACE_(listbox)( "%4d: %-40s %d %08lx %3d\n",
i, item->str, item->selected, item->data, item->height ); i, item->str, item->selected, item->data, item->height );
} }
} }
@ -324,7 +324,7 @@ static void LISTBOX_UpdateSize( WND *wnd, LB_DESCR *descr )
if ((descr->height > descr->item_height) && if ((descr->height > descr->item_height) &&
(descr->height % descr->item_height)) (descr->height % descr->item_height))
{ {
TRACE(listbox, "[%04x]: changing height %d -> %d\n", TRACE_(listbox)("[%04x]: changing height %d -> %d\n",
wnd->hwndSelf, descr->height, wnd->hwndSelf, descr->height,
descr->height - descr->height%descr->item_height ); descr->height - descr->height%descr->item_height );
SetWindowPos( wnd->hwndSelf, 0, 0, 0, SetWindowPos( wnd->hwndSelf, 0, 0, 0,
@ -335,7 +335,7 @@ static void LISTBOX_UpdateSize( WND *wnd, LB_DESCR *descr )
return; return;
} }
} }
TRACE(listbox, "[%04x]: new size = %d,%d\n", TRACE_(listbox)("[%04x]: new size = %d,%d\n",
wnd->hwndSelf, descr->width, descr->height ); wnd->hwndSelf, descr->width, descr->height );
LISTBOX_UpdatePage( wnd, descr ); LISTBOX_UpdatePage( wnd, descr );
LISTBOX_UpdateScroll( wnd, descr ); LISTBOX_UpdateScroll( wnd, descr );
@ -464,7 +464,7 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC hdc,
if (action == ODA_FOCUS) if (action == ODA_FOCUS)
DrawFocusRect( hdc, rect ); DrawFocusRect( hdc, rect );
else else
FIXME(listbox,"called with an out of bounds index %d(%d) in owner draw, Not good.\n",index,descr->nb_items); FIXME_(listbox)("called with an out of bounds index %d(%d) in owner draw, Not good.\n",index,descr->nb_items);
return; return;
} }
dis.CtlType = ODT_LISTBOX; dis.CtlType = ODT_LISTBOX;
@ -481,7 +481,7 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC hdc,
if (wnd->dwStyle & WS_DISABLED) dis.itemState |= ODS_DISABLED; if (wnd->dwStyle & WS_DISABLED) dis.itemState |= ODS_DISABLED;
dis.itemData = item ? item->data : 0; dis.itemData = item ? item->data : 0;
dis.rcItem = *rect; dis.rcItem = *rect;
TRACE(listbox, "[%04x]: drawitem %d (%s) action=%02x " TRACE_(listbox)("[%04x]: drawitem %d (%s) action=%02x "
"state=%02x rect=%d,%d-%d,%d\n", "state=%02x rect=%d,%d-%d,%d\n",
wnd->hwndSelf, index, item ? item->str : "", action, wnd->hwndSelf, index, item ? item->str : "", action,
dis.itemState, rect->left, rect->top, dis.itemState, rect->left, rect->top,
@ -503,7 +503,7 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC hdc,
oldText = SetTextColor( hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); oldText = SetTextColor( hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
} }
TRACE(listbox, "[%04x]: painting %d (%s) action=%02x " TRACE_(listbox)("[%04x]: painting %d (%s) action=%02x "
"rect=%d,%d-%d,%d\n", "rect=%d,%d-%d,%d\n",
wnd->hwndSelf, index, item ? item->str : "", action, wnd->hwndSelf, index, item ? item->str : "", action,
rect->left, rect->top, rect->right, rect->bottom ); rect->left, rect->top, rect->right, rect->bottom );
@ -633,7 +633,7 @@ static BOOL LISTBOX_SetTabStops( WND *wnd, LB_DESCR *descr, INT count,
if(TRACE_ON(listbox)) if(TRACE_ON(listbox))
dsprintf(listbox, "%hd ", descr->tabs[i]); dsprintf(listbox, "%hd ", descr->tabs[i]);
} }
TRACE(listbox, "[%04x]: settabstops %s\n", TRACE_(listbox)("[%04x]: settabstops %s\n",
wnd->hwndSelf, dbg_str(listbox)); wnd->hwndSelf, dbg_str(listbox));
} }
else memcpy( descr->tabs, tabs, descr->nb_tabs * sizeof(INT) ); else memcpy( descr->tabs, tabs, descr->nb_tabs * sizeof(INT) );
@ -1013,7 +1013,7 @@ static LRESULT LISTBOX_SetItemHeight( WND *wnd, LB_DESCR *descr, INT index,
if (descr->style & LBS_OWNERDRAWVARIABLE) if (descr->style & LBS_OWNERDRAWVARIABLE)
{ {
if ((index < 0) || (index >= descr->nb_items)) return LB_ERR; if ((index < 0) || (index >= descr->nb_items)) return LB_ERR;
TRACE(listbox, "[%04x]: item %d height = %d\n", TRACE_(listbox)("[%04x]: item %d height = %d\n",
wnd->hwndSelf, index, height ); wnd->hwndSelf, index, height );
descr->items[index].height = height; descr->items[index].height = height;
LISTBOX_UpdateScroll( wnd, descr ); LISTBOX_UpdateScroll( wnd, descr );
@ -1021,7 +1021,7 @@ static LRESULT LISTBOX_SetItemHeight( WND *wnd, LB_DESCR *descr, INT index,
} }
else if (height != descr->item_height) else if (height != descr->item_height)
{ {
TRACE(listbox, "[%04x]: new height = %d\n", TRACE_(listbox)("[%04x]: new height = %d\n",
wnd->hwndSelf, height ); wnd->hwndSelf, height );
descr->item_height = height; descr->item_height = height;
LISTBOX_UpdatePage( wnd, descr ); LISTBOX_UpdatePage( wnd, descr );
@ -1043,7 +1043,7 @@ static void LISTBOX_SetHorizontalPos( WND *wnd, LB_DESCR *descr, INT pos )
pos = descr->horz_extent - descr->width; pos = descr->horz_extent - descr->width;
if (pos < 0) pos = 0; if (pos < 0) pos = 0;
if (!(diff = descr->horz_pos - pos)) return; if (!(diff = descr->horz_pos - pos)) return;
TRACE(listbox, "[%04x]: new horz pos = %d\n", TRACE_(listbox)("[%04x]: new horz pos = %d\n",
wnd->hwndSelf, pos ); wnd->hwndSelf, pos );
descr->horz_pos = pos; descr->horz_pos = pos;
LISTBOX_UpdateScroll( wnd, descr ); LISTBOX_UpdateScroll( wnd, descr );
@ -1065,7 +1065,7 @@ static LRESULT LISTBOX_SetHorizontalExtent( WND *wnd, LB_DESCR *descr,
return LB_OKAY; return LB_OKAY;
if (extent <= 0) extent = 1; if (extent <= 0) extent = 1;
if (extent == descr->horz_extent) return LB_OKAY; if (extent == descr->horz_extent) return LB_OKAY;
TRACE(listbox, "[%04x]: new horz extent = %d\n", TRACE_(listbox)("[%04x]: new horz extent = %d\n",
wnd->hwndSelf, extent ); wnd->hwndSelf, extent );
descr->horz_extent = extent; descr->horz_extent = extent;
if (descr->horz_pos > extent - descr->width) if (descr->horz_pos > extent - descr->width)
@ -1083,7 +1083,7 @@ static LRESULT LISTBOX_SetColumnWidth( WND *wnd, LB_DESCR *descr, UINT width)
{ {
width += 2; /* For left and right margin */ width += 2; /* For left and right margin */
if (width == descr->column_width) return LB_OKAY; if (width == descr->column_width) return LB_OKAY;
TRACE(listbox, "[%04x]: new column width = %d\n", TRACE_(listbox)("[%04x]: new column width = %d\n",
wnd->hwndSelf, width ); wnd->hwndSelf, width );
descr->column_width = width; descr->column_width = width;
LISTBOX_UpdatePage( wnd, descr ); LISTBOX_UpdatePage( wnd, descr );
@ -1106,7 +1106,7 @@ static INT LISTBOX_SetFont( WND *wnd, LB_DESCR *descr, HFONT font )
if (!(hdc = GetDCEx( wnd->hwndSelf, 0, DCX_CACHE ))) if (!(hdc = GetDCEx( wnd->hwndSelf, 0, DCX_CACHE )))
{ {
ERR(listbox, "unable to get DC.\n" ); ERR_(listbox)("unable to get DC.\n" );
return 16; return 16;
} }
if (font) oldFont = SelectObject( hdc, font ); if (font) oldFont = SelectObject( hdc, font );
@ -1338,7 +1338,7 @@ static LRESULT LISTBOX_InsertItem( WND *wnd, LB_DESCR *descr, INT index,
mis.itemHeight = descr->item_height; mis.itemHeight = descr->item_height;
SendMessageA( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis ); SendMessageA( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis );
item->height = mis.itemHeight ? mis.itemHeight : 1; item->height = mis.itemHeight ? mis.itemHeight : 1;
TRACE(listbox, "[%04x]: measure item %d (%s) = %d\n", TRACE_(listbox)("[%04x]: measure item %d (%s) = %d\n",
wnd->hwndSelf, index, str ? str : "", item->height ); wnd->hwndSelf, index, str ? str : "", item->height );
} }
@ -1390,7 +1390,7 @@ static LRESULT LISTBOX_InsertString( WND *wnd, LB_DESCR *descr, INT index,
return ret; return ret;
} }
TRACE(listbox, "[%04x]: added item %d '%s'\n", TRACE_(listbox)("[%04x]: added item %d '%s'\n",
wnd->hwndSelf, index, HAS_STRINGS(descr) ? new_str : "" ); wnd->hwndSelf, index, HAS_STRINGS(descr) ? new_str : "" );
return index; return index;
} }
@ -1727,7 +1727,7 @@ static LRESULT LISTBOX_HandleLButtonDown( WND *wnd, LB_DESCR *descr,
WPARAM wParam, INT x, INT y ) WPARAM wParam, INT x, INT y )
{ {
INT index = LISTBOX_GetItemFromPoint( wnd, descr, x, y ); INT index = LISTBOX_GetItemFromPoint( wnd, descr, x, y );
TRACE(listbox, "[%04x]: lbuttondown %d,%d item %d\n", TRACE_(listbox)("[%04x]: lbuttondown %d,%d item %d\n",
wnd->hwndSelf, x, y, index ); wnd->hwndSelf, x, y, index );
if (!descr->caret_on && (GetFocus() == wnd->hwndSelf)) return 0; if (!descr->caret_on && (GetFocus() == wnd->hwndSelf)) return 0;
if (index != -1) if (index != -1)
@ -2074,7 +2074,7 @@ static BOOL LISTBOX_Create( WND *wnd, LPHEADCOMBO lphc )
if( lphc ) if( lphc )
{ {
TRACE(combo,"[%04x]: resetting owner %04x -> %04x\n", TRACE_(combo)("[%04x]: resetting owner %04x -> %04x\n",
wnd->hwndSelf, descr->owner, lphc->self->hwndSelf ); wnd->hwndSelf, descr->owner, lphc->self->hwndSelf );
descr->owner = lphc->self->hwndSelf; descr->owner = lphc->self->hwndSelf;
} }
@ -2144,7 +2144,7 @@ static inline LRESULT WINAPI ListBoxWndProc_locked( WND* wnd, UINT msg,
{ {
if (!LISTBOX_Create( wnd, NULL )) if (!LISTBOX_Create( wnd, NULL ))
return -1; return -1;
TRACE(listbox, "creating wnd=%04x descr=%p\n", TRACE_(listbox)("creating wnd=%04x descr=%p\n",
hwnd, *(LB_DESCR **)wnd->wExtra ); hwnd, *(LB_DESCR **)wnd->wExtra );
return 0; return 0;
} }
@ -2152,7 +2152,7 @@ static inline LRESULT WINAPI ListBoxWndProc_locked( WND* wnd, UINT msg,
return DefWindowProcA( hwnd, msg, wParam, lParam ); return DefWindowProcA( hwnd, msg, wParam, lParam );
} }
TRACE(listbox, "[%04x]: msg %s wp %08x lp %08lx\n", TRACE_(listbox)("[%04x]: msg %s wp %08x lp %08lx\n",
wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam ); wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam );
switch(msg) switch(msg)
{ {
@ -2529,7 +2529,7 @@ static inline LRESULT WINAPI ListBoxWndProc_locked( WND* wnd, UINT msg,
return DefWindowProcA( hwnd, msg, wParam, lParam ); return DefWindowProcA( hwnd, msg, wParam, lParam );
default: default:
if ((msg >= WM_USER) && (msg < 0xc000)) if ((msg >= WM_USER) && (msg < 0xc000))
WARN(listbox, "[%04x]: unknown msg %04x wp %08x lp %08lx\n", WARN_(listbox)("[%04x]: unknown msg %04x wp %08x lp %08lx\n",
hwnd, msg, wParam, lParam ); hwnd, msg, wParam, lParam );
return DefWindowProcA( hwnd, msg, wParam, lParam ); return DefWindowProcA( hwnd, msg, wParam, lParam );
} }
@ -2591,7 +2591,7 @@ static inline LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
{ {
LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra; LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra;
TRACE(combo, "[%04x]: msg %s wp %08x lp %08lx\n", TRACE_(combo)("[%04x]: msg %s wp %08x lp %08lx\n",
wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam ); wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam );
if( descr || msg == WM_CREATE ) if( descr || msg == WM_CREATE )
@ -2602,7 +2602,7 @@ static inline LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
{ {
case WM_CREATE: case WM_CREATE:
#define lpcs ((LPCREATESTRUCTA)lParam) #define lpcs ((LPCREATESTRUCTA)lParam)
TRACE(combo, "\tpassed parent handle = 0x%08x\n", TRACE_(combo)("\tpassed parent handle = 0x%08x\n",
(UINT)lpcs->lpCreateParams); (UINT)lpcs->lpCreateParams);
lphc = (LPHEADCOMBO)(lpcs->lpCreateParams); lphc = (LPHEADCOMBO)(lpcs->lpCreateParams);
@ -2649,7 +2649,7 @@ static inline LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
} }
lRet = DefWindowProcA( hwnd, msg, wParam, lParam ); lRet = DefWindowProcA( hwnd, msg, wParam, lParam );
TRACE(combo,"\t default on msg [%04x]\n", (UINT16)msg ); TRACE_(combo)("\t default on msg [%04x]\n", (UINT16)msg );
} }
return lRet; return lRet;
} }

View File

@ -9,7 +9,7 @@
#include "winerror.h" #include "winerror.h"
#include "heap.h" #include "heap.h"
#include "ntddk.h" #include "ntddk.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(advapi) DECLARE_DEBUG_CHANNEL(advapi)
DECLARE_DEBUG_CHANNEL(security) DECLARE_DEBUG_CHANNEL(security)
@ -488,7 +488,7 @@ BOOL WINAPI
MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc, MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen ) PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
{ {
FIXME(advapi,"(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen); FIXME_(advapi)("(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);
return TRUE; return TRUE;
} }
@ -498,7 +498,7 @@ MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
BOOL GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
/* fixme: PSECURITY_DESCRIPTOR_CONTROL*/ LPVOID pControl, LPDWORD lpdwRevision) /* fixme: PSECURITY_DESCRIPTOR_CONTROL*/ LPVOID pControl, LPDWORD lpdwRevision)
{ FIXME(advapi,"(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision); { FIXME_(advapi)("(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
return 1; return 1;
} }
@ -524,7 +524,7 @@ BOOL GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
BOOL WINAPI BOOL WINAPI
LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid ) LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
{ {
FIXME(advapi,"(%s,%s,%p): stub\n",debugstr_w(lpSystemName), FIXME_(advapi)("(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
debugstr_w(lpName), lpLuid); debugstr_w(lpName), lpLuid);
return TRUE; return TRUE;
} }
@ -556,7 +556,7 @@ GetFileSecurityA( LPCSTR lpFileName,
PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded ) DWORD nLength, LPDWORD lpnLengthNeeded )
{ {
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName)); FIXME_(advapi)("(%s) : stub\n", debugstr_a(lpFileName));
return TRUE; return TRUE;
} }
@ -580,7 +580,7 @@ GetFileSecurityW( LPCWSTR lpFileName,
PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded ) DWORD nLength, LPDWORD lpnLengthNeeded )
{ {
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) ); FIXME_(advapi)("(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE; return TRUE;
} }
@ -593,7 +593,7 @@ LookupAccountSidA( LPCSTR system, PSID sid, LPCSTR account,
LPDWORD accountSize, LPCSTR domain, LPDWORD domainSize, LPDWORD accountSize, LPCSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use ) PSID_NAME_USE name_use )
{ {
FIXME(security,"(%s,%p,%p,%p,%p,%p,%p): stub\n", FIXME_(security)("(%s,%p,%p,%p,%p,%p,%p): stub\n",
system,sid,account,accountSize,domain,domainSize,name_use); system,sid,account,accountSize,domain,domainSize,name_use);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -616,7 +616,7 @@ LookupAccountSidW( LPCWSTR system, PSID sid, LPCWSTR account,
LPDWORD accountSize, LPCWSTR domain, LPDWORD domainSize, LPDWORD accountSize, LPCWSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use ) PSID_NAME_USE name_use )
{ {
FIXME(security,"(%p,%p,%p,%p,%p,%p,%p): stub\n", FIXME_(security)("(%p,%p,%p,%p,%p,%p,%p): stub\n",
system,sid,account,accountSize,domain,domainSize,name_use); system,sid,account,accountSize,domain,domainSize,name_use);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -630,7 +630,7 @@ BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation, SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor) PSECURITY_DESCRIPTOR pSecurityDescriptor)
{ {
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName)); FIXME_(advapi)("(%s) : stub\n", debugstr_a(lpFileName));
return TRUE; return TRUE;
} }
@ -648,7 +648,7 @@ SetFileSecurityW( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation, SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor ) PSECURITY_DESCRIPTOR pSecurityDescriptor )
{ {
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) ); FIXME_(advapi)("(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE; return TRUE;
} }
@ -661,7 +661,7 @@ SetFileSecurityW( LPCWSTR lpFileName,
BOOL WINAPI BOOL WINAPI
QueryWindows31FilesMigration( DWORD x1 ) QueryWindows31FilesMigration( DWORD x1 )
{ {
FIXME(advapi,"(%ld):stub\n",x1); FIXME_(advapi)("(%ld):stub\n",x1);
return TRUE; return TRUE;
} }
@ -678,7 +678,7 @@ BOOL WINAPI
SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3, SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
DWORD x4 ) DWORD x4 )
{ {
FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4); FIXME_(advapi)("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
return TRUE; return TRUE;
} }
@ -694,7 +694,7 @@ SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
BOOL WINAPI BOOL WINAPI
LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 ) LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
{ {
FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4); FIXME_(advapi)("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
return 0xc0000000; /* generic error */ return 0xc0000000; /* generic error */
} }
@ -707,7 +707,7 @@ LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
BOOL WINAPI BOOL WINAPI
NotifyBootConfigStatus( DWORD x1 ) NotifyBootConfigStatus( DWORD x1 )
{ {
FIXME(advapi,"(0x%08lx):stub\n",x1); FIXME_(advapi)("(0x%08lx):stub\n",x1);
return 1; return 1;
} }
@ -720,7 +720,7 @@ NotifyBootConfigStatus( DWORD x1 )
BOOL WINAPI BOOL WINAPI
RevertToSelf( void ) RevertToSelf( void )
{ {
FIXME(advapi,"(), stub\n"); FIXME_(advapi)("(), stub\n");
return TRUE; return TRUE;
} }
@ -730,7 +730,7 @@ RevertToSelf( void )
BOOL WINAPI BOOL WINAPI
ImpersonateSelf(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel) ImpersonateSelf(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
{ {
FIXME(advapi, "(%08lx), stub\n", ImpersonationLevel); FIXME_(advapi)("(%08lx), stub\n", ImpersonationLevel);
return TRUE; return TRUE;
} }
@ -740,7 +740,7 @@ ImpersonateSelf(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
BOOL WINAPI BOOL WINAPI
AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, LPVOID/*LPGENERIC_MAPPING*/ GenericMapping, LPVOID/*LPPRIVILEGE_SET*/ PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus) AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, LPVOID/*LPGENERIC_MAPPING*/ GenericMapping, LPVOID/*LPPRIVILEGE_SET*/ PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus)
{ {
FIXME(advapi, "(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n", pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus); FIXME_(advapi)("(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n", pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus);
*AccessStatus = TRUE; *AccessStatus = TRUE;
return TRUE; return TRUE;
} }

View File

@ -12,7 +12,7 @@
#include "mmsystem.h" #include "mmsystem.h"
#include "winerror.h" #include "winerror.h"
#include "debugstr.h" #include "debugstr.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(avifile) DECLARE_DEBUG_CHANNEL(avifile)
DECLARE_DEBUG_CHANNEL(msvideo) DECLARE_DEBUG_CHANNEL(msvideo)
@ -46,7 +46,7 @@ typedef struct IAVIStreamImpl {
void WINAPI void WINAPI
AVIFileInit(void) { AVIFileInit(void) {
FIXME(avifile,"(),stub!\n"); FIXME_(avifile)("(),stub!\n");
} }
typedef struct IAVIFileImpl { typedef struct IAVIFileImpl {
@ -63,7 +63,7 @@ static HRESULT WINAPI IAVIFile_fnQueryInterface(IAVIFile* iface,REFIID refiid,LP
char xrefiid[50]; char xrefiid[50];
WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); WINE_StringFromCLSID((LPCLSID)refiid,xrefiid);
TRACE(relay,"(%p)->QueryInterface(%s,%p)\n",This,xrefiid,obj); TRACE_(relay)("(%p)->QueryInterface(%s,%p)\n",This,xrefiid,obj);
if ( !memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown)) || if ( !memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown)) ||
!memcmp(&IID_IAVIFile,refiid,sizeof(IID_IAVIFile)) !memcmp(&IID_IAVIFile,refiid,sizeof(IID_IAVIFile))
) { ) {
@ -76,14 +76,14 @@ static HRESULT WINAPI IAVIFile_fnQueryInterface(IAVIFile* iface,REFIID refiid,LP
static ULONG WINAPI IAVIFile_fnAddRef(IAVIFile* iface) { static ULONG WINAPI IAVIFile_fnAddRef(IAVIFile* iface) {
ICOM_THIS(IAVIFileImpl,iface); ICOM_THIS(IAVIFileImpl,iface);
FIXME(relay,"(%p)->AddRef()\n",iface); FIXME_(relay)("(%p)->AddRef()\n",iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI IAVIFile_fnRelease(IAVIFile* iface) { static ULONG WINAPI IAVIFile_fnRelease(IAVIFile* iface) {
ICOM_THIS(IAVIFileImpl,iface); ICOM_THIS(IAVIFileImpl,iface);
FIXME(relay,"(%p)->Release()\n",iface); FIXME_(relay)("(%p)->Release()\n",iface);
if (!--(This->ref)) { if (!--(This->ref)) {
HeapFree(GetProcessHeap(),0,iface); HeapFree(GetProcessHeap(),0,iface);
return 0; return 0;
@ -92,14 +92,14 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile* iface) {
} }
static HRESULT WINAPI IAVIFile_fnInfo(IAVIFile*iface,AVIFILEINFOW*afi,LONG size) { static HRESULT WINAPI IAVIFile_fnInfo(IAVIFile*iface,AVIFILEINFOW*afi,LONG size) {
FIXME(avifile,"(%p)->Info(%p,%ld)\n",iface,afi,size); FIXME_(avifile)("(%p)->Info(%p,%ld)\n",iface,afi,size);
/* FIXME: fill out struct? */ /* FIXME: fill out struct? */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam) { static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam) {
FIXME(avifile,"(%p)->GetStream(%p,0x%08lx,%ld)\n",iface,avis,fccType,lParam); FIXME_(avifile)("(%p)->GetStream(%p,0x%08lx,%ld)\n",iface,avis,fccType,lParam);
/* FIXME: create interface etc. */ /* FIXME: create interface etc. */
return E_FAIL; return E_FAIL;
} }
@ -109,18 +109,18 @@ static HRESULT WINAPI IAVIFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVI
char fcc[5]; char fcc[5];
IAVIStreamImpl *istream; IAVIStreamImpl *istream;
FIXME(avifile,"(%p,%p,%p)\n",This,avis,asi); FIXME_(avifile)("(%p,%p,%p)\n",This,avis,asi);
istream = (IAVIStreamImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIStreamImpl)); istream = (IAVIStreamImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIStreamImpl));
istream->ref = 1; istream->ref = 1;
istream->lpvtbl = &iavist; istream->lpvtbl = &iavist;
fcc[4]='\0'; fcc[4]='\0';
memcpy(fcc,(char*)&(asi->fccType),4); memcpy(fcc,(char*)&(asi->fccType),4);
FIXME(avifile,"\tfccType '%s'\n",fcc); FIXME_(avifile)("\tfccType '%s'\n",fcc);
memcpy(fcc,(char*)&(asi->fccHandler),4); memcpy(fcc,(char*)&(asi->fccHandler),4);
FIXME(avifile,"\tfccHandler '%s'\n",fcc); FIXME_(avifile)("\tfccHandler '%s'\n",fcc);
FIXME(avifile,"\tdwFlags 0x%08lx\n",asi->dwFlags); FIXME_(avifile)("\tdwFlags 0x%08lx\n",asi->dwFlags);
FIXME(avifile,"\tdwCaps 0x%08lx\n",asi->dwCaps); FIXME_(avifile)("\tdwCaps 0x%08lx\n",asi->dwCaps);
FIXME(avifile,"\tname '%s'\n",debugstr_w(asi->szName)); FIXME_(avifile)("\tname '%s'\n",debugstr_w(asi->szName));
istream->curframe = 0; istream->curframe = 0;
*avis = (PAVISTREAM)istream; *avis = (PAVISTREAM)istream;
@ -128,25 +128,25 @@ static HRESULT WINAPI IAVIFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVI
} }
static HRESULT WINAPI IAVIFile_fnWriteData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG size) { static HRESULT WINAPI IAVIFile_fnWriteData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG size) {
FIXME(avifile,"(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,ckid,lpData,size); FIXME_(avifile)("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,ckid,lpData,size);
/* FIXME: write data to file */ /* FIXME: write data to file */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG *size) { static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG *size) {
FIXME(avifile,"(%p)->ReadData(0x%08lx,%p,%p)\n",iface,ckid,lpData,size); FIXME_(avifile)("(%p)->ReadData(0x%08lx,%p,%p)\n",iface,ckid,lpData,size);
/* FIXME: read at most size bytes from file */ /* FIXME: read at most size bytes from file */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface) { static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface) {
FIXME(avifile,"(%p)->EndRecord()\n",iface); FIXME_(avifile)("(%p)->EndRecord()\n",iface);
/* FIXME: end record? */ /* FIXME: end record? */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam) { static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam) {
FIXME(avifile,"(%p)->DeleteStream(0x%08lx,%ld)\n",iface,fccType,lParam); FIXME_(avifile)("(%p)->DeleteStream(0x%08lx,%ld)\n",iface,fccType,lParam);
/* FIXME: delete stream? */ /* FIXME: delete stream? */
return E_FAIL; return E_FAIL;
} }
@ -176,7 +176,7 @@ HRESULT WINAPI AVIFileOpenA(
else else
sprintf(buf,"<clsid-0x%04lx>",(DWORD)lpHandler); sprintf(buf,"<clsid-0x%04lx>",(DWORD)lpHandler);
FIXME(avifile,"(%p,%s,0x%08lx,%s),stub!\n",ppfile,szFile,(DWORD)uMode,buf); FIXME_(avifile)("(%p,%s,0x%08lx,%s),stub!\n",ppfile,szFile,(DWORD)uMode,buf);
iavi = (IAVIFileImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIFileImpl)); iavi = (IAVIFileImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIFileImpl));
iavi->ref = 1; iavi->ref = 1;
iavi->lpvtbl = &iavift; iavi->lpvtbl = &iavift;
@ -189,7 +189,7 @@ static HRESULT WINAPI IAVIStream_fnQueryInterface(IAVIStream*iface,REFIID refiid
char xrefiid[50]; char xrefiid[50];
WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); WINE_StringFromCLSID((LPCLSID)refiid,xrefiid);
TRACE(relay,"(%p)->QueryInterface(%s,%p)\n",This,xrefiid,obj); TRACE_(relay)("(%p)->QueryInterface(%s,%p)\n",This,xrefiid,obj);
if ( !memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown)) || if ( !memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown)) ||
!memcmp(&IID_IAVIStream,refiid,sizeof(IID_IAVIStream)) !memcmp(&IID_IAVIStream,refiid,sizeof(IID_IAVIStream))
) { ) {
@ -203,14 +203,14 @@ static HRESULT WINAPI IAVIStream_fnQueryInterface(IAVIStream*iface,REFIID refiid
static ULONG WINAPI IAVIStream_fnAddRef(IAVIStream*iface) { static ULONG WINAPI IAVIStream_fnAddRef(IAVIStream*iface) {
ICOM_THIS(IAVIStreamImpl,iface); ICOM_THIS(IAVIStreamImpl,iface);
FIXME(relay,"(%p)->AddRef()\n",iface); FIXME_(relay)("(%p)->AddRef()\n",iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI IAVIStream_fnRelease(IAVIStream* iface) { static ULONG WINAPI IAVIStream_fnRelease(IAVIStream* iface) {
ICOM_THIS(IAVIStreamImpl,iface); ICOM_THIS(IAVIStreamImpl,iface);
FIXME(relay,"(%p)->Release()\n",iface); FIXME_(relay)("(%p)->Release()\n",iface);
if (!--(This->ref)) { if (!--(This->ref)) {
HeapFree(GetProcessHeap(),0,This); HeapFree(GetProcessHeap(),0,This);
return 0; return 0;
@ -219,22 +219,22 @@ static ULONG WINAPI IAVIStream_fnRelease(IAVIStream* iface) {
} }
HRESULT WINAPI IAVIStream_fnCreate(IAVIStream*iface,LPARAM lParam1,LPARAM lParam2) { HRESULT WINAPI IAVIStream_fnCreate(IAVIStream*iface,LPARAM lParam1,LPARAM lParam2) {
FIXME(avifile,"(%p)->Create(0x%08lx,0x%08lx)\n",iface,lParam1,lParam2); FIXME_(avifile)("(%p)->Create(0x%08lx,0x%08lx)\n",iface,lParam1,lParam2);
return E_FAIL; return E_FAIL;
} }
HRESULT WINAPI IAVIStream_fnInfo(IAVIStream*iface,AVISTREAMINFOW *psi,LONG size) { HRESULT WINAPI IAVIStream_fnInfo(IAVIStream*iface,AVISTREAMINFOW *psi,LONG size) {
FIXME(avifile,"(%p)->Info(%p,%ld)\n",iface,psi,size); FIXME_(avifile)("(%p)->Info(%p,%ld)\n",iface,psi,size);
return E_FAIL; return E_FAIL;
} }
LONG WINAPI IAVIStream_fnFindSample(IAVIStream*iface,LONG pos,LONG flags) { LONG WINAPI IAVIStream_fnFindSample(IAVIStream*iface,LONG pos,LONG flags) {
FIXME(avifile,"(%p)->FindSample(%ld,0x%08lx)\n",iface,pos,flags); FIXME_(avifile)("(%p)->FindSample(%ld,0x%08lx)\n",iface,pos,flags);
return E_FAIL; return E_FAIL;
} }
HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG *formatsize) { HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG *formatsize) {
FIXME(avifile,"(%p)->ReadFormat(%ld,%p,%p)\n",iface,pos,format,formatsize); FIXME_(avifile)("(%p)->ReadFormat(%ld,%p,%p)\n",iface,pos,format,formatsize);
return E_FAIL; return E_FAIL;
} }
@ -244,7 +244,7 @@ HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID format,L
HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG formatsize) { HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG formatsize) {
IAVIStreamImpl *as = (IAVIStreamImpl*)iface; IAVIStreamImpl *as = (IAVIStreamImpl*)iface;
FIXME(avifile,"(%p)->SetFormat(%ld,%p,%ld)\n",iface,pos,format,formatsize); FIXME_(avifile)("(%p)->SetFormat(%ld,%p,%ld)\n",iface,pos,format,formatsize);
if (as->lpInputFormat) HeapFree(GetProcessHeap(),0,as->lpInputFormat); if (as->lpInputFormat) HeapFree(GetProcessHeap(),0,as->lpInputFormat);
as->inputformatsize = formatsize; as->inputformatsize = formatsize;
as->lpInputFormat = HeapAlloc(GetProcessHeap(),0,formatsize); as->lpInputFormat = HeapAlloc(GetProcessHeap(),0,formatsize);
@ -276,7 +276,7 @@ HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID format,LO
} }
HRESULT WINAPI IAVIStream_fnRead(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread) { HRESULT WINAPI IAVIStream_fnRead(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread) {
FIXME(avifile,"(%p)->Read(%ld,%ld,%p,%ld,%p,%p)\n",iface,start,samples,buffer,buffersize,bytesread,samplesread); FIXME_(avifile)("(%p)->Read(%ld,%ld,%p,%ld,%p,%p)\n",iface,start,samples,buffer,buffersize,bytesread,samplesread);
return E_FAIL; return E_FAIL;
} }
@ -284,7 +284,7 @@ HRESULT WINAPI IAVIStream_fnWrite(IAVIStream*iface,LONG start,LONG samples,LPVOI
IAVIStreamImpl *as = (IAVIStreamImpl*)iface; IAVIStreamImpl *as = (IAVIStreamImpl*)iface;
DWORD ckid,xflags; DWORD ckid,xflags;
FIXME(avifile,"(%p)->Write(%ld,%ld,%p,%ld,0x%08lx,%p,%p)\n",iface,start,samples,buffer,buffersize,flags,sampwritten,byteswritten); FIXME_(avifile)("(%p)->Write(%ld,%ld,%p,%ld,0x%08lx,%p,%p)\n",iface,start,samples,buffer,buffersize,flags,sampwritten,byteswritten);
ICCompress( ICCompress(
as->hic,flags, as->hic,flags,
@ -310,22 +310,22 @@ HRESULT WINAPI IAVIStream_fnWrite(IAVIStream*iface,LONG start,LONG samples,LPVOI
} }
HRESULT WINAPI IAVIStream_fnDelete(IAVIStream*iface,LONG start,LONG samples) { HRESULT WINAPI IAVIStream_fnDelete(IAVIStream*iface,LONG start,LONG samples) {
FIXME(avifile,"(%p)->Delete(%ld,%ld)\n",iface,start,samples); FIXME_(avifile)("(%p)->Delete(%ld,%ld)\n",iface,start,samples);
return E_FAIL; return E_FAIL;
} }
HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG *lpread) { HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG *lpread) {
FIXME(avifile,"(%p)->ReadData(0x%08lx,%p,%p)\n",iface,fcc,lp,lpread); FIXME_(avifile)("(%p)->ReadData(0x%08lx,%p,%p)\n",iface,fcc,lp,lpread);
return E_FAIL; return E_FAIL;
} }
HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size) { HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size) {
FIXME(avifile,"(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,fcc,lp,size); FIXME_(avifile)("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,fcc,lp,size);
return E_FAIL; return E_FAIL;
} }
HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen) { HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen) {
FIXME(avifile,"(%p)->SetInfo(%p,%ld)\n",iface,info,infolen); FIXME_(avifile)("(%p)->SetInfo(%p,%ld)\n",iface,info,infolen);
return E_FAIL; return E_FAIL;
} }
@ -401,13 +401,13 @@ HRESULT WINAPI AVIFileInfoW(PAVIFILE iface,LPAVIFILEINFOW afi,LONG size) {
HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *aco,CLSID *pclsidHandler) { HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *aco,CLSID *pclsidHandler) {
char fcc[5]; char fcc[5];
IAVIStreamImpl *as; IAVIStreamImpl *as;
FIXME(avifile,"(%p,%p,%p,%p)\n",ppsCompressed,ppsSource,aco,pclsidHandler); FIXME_(avifile)("(%p,%p,%p,%p)\n",ppsCompressed,ppsSource,aco,pclsidHandler);
fcc[4]='\0'; fcc[4]='\0';
memcpy(fcc,&(aco->fccType),4); memcpy(fcc,&(aco->fccType),4);
FIXME(avifile,"\tfccType: '%s'\n",fcc); FIXME_(avifile)("\tfccType: '%s'\n",fcc);
memcpy(fcc,&(aco->fccHandler),4); memcpy(fcc,&(aco->fccHandler),4);
FIXME(avifile,"\tfccHandler: '%s'\n",fcc); FIXME_(avifile)("\tfccHandler: '%s'\n",fcc);
FIXME(avifile,"\tdwFlags: 0x%08lx\n",aco->dwFlags); FIXME_(avifile)("\tdwFlags: 0x%08lx\n",aco->dwFlags);
/* we just create a duplicate for now */ /* we just create a duplicate for now */
((IUnknown*)ppsSource)->lpvtbl->fnAddRef((IUnknown*)ppsSource); ((IUnknown*)ppsSource)->lpvtbl->fnAddRef((IUnknown*)ppsSource);
@ -422,7 +422,7 @@ HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsS
return AVIERR_UNSUPPORTED; return AVIERR_UNSUPPORTED;
ICGetInfo(as->hic,&(as->icinfo),sizeof(ICINFO)); ICGetInfo(as->hic,&(as->icinfo),sizeof(ICINFO));
FIXME(avifile,"Opened compressor: '%s' '%s'\n",debugstr_w(as->icinfo.szName),debugstr_w(as->icinfo.szDescription)); FIXME_(avifile)("Opened compressor: '%s' '%s'\n",debugstr_w(as->icinfo.szName),debugstr_w(as->icinfo.szDescription));
as->iscompressing = TRUE; as->iscompressing = TRUE;
memcpy(&(as->aco),aco,sizeof(*aco)); memcpy(&(as->aco),aco,sizeof(*aco));
if (as->icinfo.dwFlags & VIDCF_COMPRESSFRAMES) { if (as->icinfo.dwFlags & VIDCF_COMPRESSFRAMES) {
@ -487,7 +487,7 @@ ULONG WINAPI AVIStreamRelease(PAVISTREAM iface) {
} }
PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM iface,LPBITMAPINFOHEADER bmi) { PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM iface,LPBITMAPINFOHEADER bmi) {
FIXME(msvideo,"(%p)->(%p),stub!\n",iface,bmi); FIXME_(msvideo)("(%p)->(%p),stub!\n",iface,bmi);
return NULL; return NULL;
} }
@ -505,5 +505,5 @@ ULONG WINAPI AVIFileRelease(PAVIFILE iface) {
} }
void WINAPI AVIFileExit(void) { void WINAPI AVIFileExit(void) {
FIXME(avifile,"(), stub.\n"); FIXME_(avifile)("(), stub.\n");
} }

View File

@ -18,7 +18,7 @@
#include "winbase.h" #include "winbase.h"
#include "commctrl.h" #include "commctrl.h"
#include "flatsb.h" #include "flatsb.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(commctrl) DECLARE_DEBUG_CHANNEL(commctrl)
DECLARE_DEBUG_CHANNEL(datetime) DECLARE_DEBUG_CHANNEL(datetime)
@ -30,42 +30,42 @@ DECLARE_DEBUG_CHANNEL(datetime)
BOOL WINAPI BOOL WINAPI
FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2) FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag) FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max) FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info) FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
INT WINAPI INT WINAPI
FlatSB_GetScrollPos(HWND hwnd, INT code) FlatSB_GetScrollPos(HWND hwnd, INT code)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop) FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
@ -73,41 +73,41 @@ FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
INT WINAPI INT WINAPI
FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw) FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
INT WINAPI INT WINAPI
FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw) FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
INT WINAPI INT WINAPI
FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw) FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag) FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
BOOL WINAPI InitializeFlatSB(HWND hwnd) BOOL WINAPI InitializeFlatSB(HWND hwnd)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
HRESULT WINAPI UninitializeFlatSB(HWND hwnd) HRESULT WINAPI UninitializeFlatSB(HWND hwnd)
{ {
FIXME(commctrl,"stub\n"); FIXME_(commctrl)("stub\n");
return 0; return 0;
} }
@ -143,7 +143,7 @@ FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
default: default:
if (uMsg >= WM_USER) if (uMsg >= WM_USER)
ERR (datetime, "unknown msg %04x wp=%08x lp=%08lx\n", ERR_(datetime)("unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam); uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam); return DefWindowProcA (hwnd, uMsg, wParam, lParam);
} }

View File

@ -12,7 +12,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include "debug.h" #include "debugtools.h"
#include "shell.h" #include "shell.h"
#include "shlguid.h" #include "shlguid.h"
#include "winerror.h" #include "winerror.h"
@ -33,17 +33,17 @@ void pdump (LPCITEMIDLIST pidl)
CHAR * szShortName; CHAR * szShortName;
LPITEMIDLIST pidltemp = pidl; LPITEMIDLIST pidltemp = pidl;
if (! pidltemp) if (! pidltemp)
{ TRACE(pidl,"-------- pidl = NULL (Root)\n"); { TRACE_(pidl)("-------- pidl = NULL (Root)\n");
return; return;
} }
TRACE(pidl,"-------- pidl=%p \n", pidl); TRACE_(pidl)("-------- pidl=%p \n", pidl);
if (pidltemp->mkid.cb) if (pidltemp->mkid.cb)
{ do { do
{ type = _ILGetDataPointer(pidltemp)->type; { type = _ILGetDataPointer(pidltemp)->type;
szData = _ILGetTextPointer(type, _ILGetDataPointer(pidltemp)); szData = _ILGetTextPointer(type, _ILGetDataPointer(pidltemp));
szShortName = _ILGetSTextPointer(type, _ILGetDataPointer(pidltemp)); szShortName = _ILGetSTextPointer(type, _ILGetDataPointer(pidltemp));
TRACE(pidl,"---- pidl=%p size=%u type=%lx %s, (%s)\n", TRACE_(pidl)("---- pidl=%p size=%u type=%lx %s, (%s)\n",
pidltemp, pidltemp->mkid.cb,type,debugstr_a(szData), debugstr_a(szShortName)); pidltemp, pidltemp->mkid.cb,type,debugstr_a(szData), debugstr_a(szShortName));
pidltemp = ILGetNext(pidltemp); pidltemp = ILGetNext(pidltemp);
@ -51,7 +51,7 @@ void pdump (LPCITEMIDLIST pidl)
return; return;
} }
else else
TRACE(pidl,"empty pidl (Desktop)\n"); TRACE_(pidl)("empty pidl (Desktop)\n");
} }
#define BYTES_PRINTED 32 #define BYTES_PRINTED 32
@ -94,7 +94,7 @@ BOOL pcheck (LPCITEMIDLIST pidl)
szTemp[i+BYTES_PRINTED*3] = (c>=0x20 && c <=0x80) ? c : '.'; szTemp[i+BYTES_PRINTED*3] = (c>=0x20 && c <=0x80) ? c : '.';
} }
szTemp[BYTES_PRINTED*4] = 0x00; szTemp[BYTES_PRINTED*4] = 0x00;
ERR (pidl,"unknown IDLIST type size=%u type=%lx\n%s\n",pidltemp->mkid.cb,type, szTemp); ERR_(pidl)("unknown IDLIST type size=%u type=%lx\n%s\n",pidltemp->mkid.cb,type, szTemp);
ret = FALSE; ret = FALSE;
} }
} }
@ -108,7 +108,7 @@ BOOL pcheck (LPCITEMIDLIST pidl)
* ILGetDisplayName [SHELL32.15] * ILGetDisplayName [SHELL32.15]
*/ */
BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl,LPSTR path) BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl,LPSTR path)
{ TRACE(shell,"pidl=%p %p semi-stub\n",pidl,path); { TRACE_(shell)("pidl=%p %p semi-stub\n",pidl,path);
return SHGetPathFromIDListA(pidl, path); return SHGetPathFromIDListA(pidl, path);
} }
/************************************************************************* /*************************************************************************
@ -117,7 +117,7 @@ BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl,LPSTR path)
LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl) LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl)
{ LPITEMIDLIST pidlLast = NULL; { LPITEMIDLIST pidlLast = NULL;
TRACE(pidl,"(pidl=%p)\n",pidl); TRACE_(pidl)("(pidl=%p)\n",pidl);
while (pidl->mkid.cb) while (pidl->mkid.cb)
{ pidlLast = pidl; { pidlLast = pidl;
@ -131,7 +131,7 @@ LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl)
* Removes the last item * Removes the last item
*/ */
BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl) BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl)
{ TRACE(shell,"pidl=%p\n",pidl); { TRACE_(shell)("pidl=%p\n",pidl);
if (!pidl || !pidl->mkid.cb) if (!pidl || !pidl->mkid.cb)
return 0; return 0;
ILFindLastID(pidl)->mkid.cb = 0; ILFindLastID(pidl)->mkid.cb = 0;
@ -156,7 +156,7 @@ LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl)
if (newpidl) if (newpidl)
memcpy(newpidl,pidl,len); memcpy(newpidl,pidl,len);
TRACE(pidl,"pidl=%p newpidl=%p\n",pidl, newpidl); TRACE_(pidl)("pidl=%p newpidl=%p\n",pidl, newpidl);
pdump(pidl); pdump(pidl);
return newpidl; return newpidl;
@ -171,7 +171,7 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
{ DWORD len; { DWORD len;
LPITEMIDLIST newpidl=NULL; LPITEMIDLIST newpidl=NULL;
TRACE(pidl,"pidl=%p \n",pidl); TRACE_(pidl)("pidl=%p \n",pidl);
pdump(pidl); pdump(pidl);
if (pidl) if (pidl)
@ -182,7 +182,7 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
ILGetNext(newpidl)->mkid.cb = 0x00; ILGetNext(newpidl)->mkid.cb = 0x00;
} }
} }
TRACE(pidl,"-- newpidl=%p\n",newpidl); TRACE_(pidl)("-- newpidl=%p\n",newpidl);
return newpidl; return newpidl;
} }
@ -198,7 +198,7 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl)
HRESULT ret = E_FAIL; HRESULT ret = E_FAIL;
TRACE(shell,"%p %p\n", pStream , ppPidl); TRACE_(shell)("%p %p\n", pStream , ppPidl);
if (*ppPidl) if (*ppPidl)
{ SHFree(*ppPidl); { SHFree(*ppPidl);
@ -241,7 +241,7 @@ HRESULT WINAPI SHILCreateFromPathA (LPSTR path, LPITEMIDLIST * ppidl, DWORD attr
DWORD pchEaten; DWORD pchEaten;
HRESULT ret = E_FAIL; HRESULT ret = E_FAIL;
TRACE(shell, "%s %p 0x%08lx\n",path,ppidl,attributes); TRACE_(shell)("%s %p 0x%08lx\n",path,ppidl,attributes);
LocalToWideChar(lpszDisplayName, path, MAX_PATH); LocalToWideChar(lpszDisplayName, path, MAX_PATH);
@ -256,7 +256,7 @@ HRESULT WINAPI SHILCreateFromPathW (LPWSTR path, LPITEMIDLIST * ppidl, DWORD att
DWORD pchEaten; DWORD pchEaten;
HRESULT ret = E_FAIL; HRESULT ret = E_FAIL;
TRACE(shell, "%s %p 0x%08lx\n",debugstr_w(path),ppidl,attributes); TRACE_(shell)("%s %p 0x%08lx\n",debugstr_w(path),ppidl,attributes);
if (SUCCEEDED (SHGetDesktopFolder(&sf))) if (SUCCEEDED (SHGetDesktopFolder(&sf)))
{ ret = sf->lpvtbl->fnParseDisplayName(sf,0, NULL, path, &pchEaten, ppidl, &attributes); { ret = sf->lpvtbl->fnParseDisplayName(sf,0, NULL, path, &pchEaten, ppidl, &attributes);
@ -285,7 +285,7 @@ HRESULT WINAPI SHILCreateFromPathAW (LPVOID path, LPITEMIDLIST * ppidl, DWORD at
*/ */
LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner,DWORD nFolder,DWORD x3) LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner,DWORD nFolder,DWORD x3)
{ LPITEMIDLIST ppidl; { LPITEMIDLIST ppidl;
WARN(shell,"(hwnd=0x%x,csidl=0x%lx,0x%lx):semi-stub.\n", WARN_(shell)("(hwnd=0x%x,csidl=0x%lx,0x%lx):semi-stub.\n",
hwndOwner,nFolder,x3); hwndOwner,nFolder,x3);
SHGetSpecialFolderLocation(hwndOwner, nFolder, &ppidl); SHGetSpecialFolderLocation(hwndOwner, nFolder, &ppidl);
@ -309,7 +309,7 @@ LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl)
if (newpidl) if (newpidl)
memcpy(newpidl,pidl,len); memcpy(newpidl,pidl,len);
TRACE(pidl,"pidl=%p newpidl=%p\n",pidl, newpidl); TRACE_(pidl)("pidl=%p newpidl=%p\n",pidl, newpidl);
pdump(pidl); pdump(pidl);
return newpidl; return newpidl;
@ -327,7 +327,7 @@ BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
LPITEMIDLIST pidltemp1 = pidl1; LPITEMIDLIST pidltemp1 = pidl1;
LPITEMIDLIST pidltemp2 = pidl2; LPITEMIDLIST pidltemp2 = pidl2;
TRACE(pidl,"pidl1=%p pidl2=%p\n",pidl1, pidl2); TRACE_(pidl)("pidl1=%p pidl2=%p\n",pidl1, pidl2);
/* explorer reads from registry directly (StreamMRU), /* explorer reads from registry directly (StreamMRU),
so we can only check here */ so we can only check here */
@ -358,7 +358,7 @@ BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
} while (pidltemp1->mkid.cb && pidltemp2->mkid.cb); } while (pidltemp1->mkid.cb && pidltemp2->mkid.cb);
} }
if (!pidltemp1 && !pidltemp2) if (!pidltemp1 && !pidltemp2)
{ TRACE(shell, "--- equal\n"); { TRACE_(shell)("--- equal\n");
return TRUE; return TRUE;
} }
@ -369,7 +369,7 @@ BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
* *
*/ */
DWORD WINAPI ILIsParent( DWORD x, DWORD y, DWORD z) DWORD WINAPI ILIsParent( DWORD x, DWORD y, DWORD z)
{ FIXME(pidl,"0x%08lx 0x%08lx 0x%08lx stub\n",x,y,z); { FIXME_(pidl)("0x%08lx 0x%08lx 0x%08lx stub\n",x,y,z);
return 0; return 0;
} }
@ -391,7 +391,7 @@ LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
LPITEMIDLIST pidltemp2 = pidl2; LPITEMIDLIST pidltemp2 = pidl2;
LPITEMIDLIST ret=NULL; LPITEMIDLIST ret=NULL;
TRACE(pidl,"pidl1=%p pidl2=%p\n",pidl1, pidl2); TRACE_(pidl)("pidl1=%p pidl2=%p\n",pidl1, pidl2);
/* explorer reads from registry directly (StreamMRU), /* explorer reads from registry directly (StreamMRU),
so we can only check here */ so we can only check here */
@ -402,7 +402,7 @@ LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
pdump (pidl2); pdump (pidl2);
if ( !pidl1 || !pidl1->mkid.cb) /* pidl 1 is desktop (root) */ if ( !pidl1 || !pidl1->mkid.cb) /* pidl 1 is desktop (root) */
{ TRACE(shell, "--- %p\n", pidl2); { TRACE_(shell)("--- %p\n", pidl2);
return pidl2; return pidl2;
} }
@ -433,7 +433,7 @@ LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
{ return NULL; /* complete equal or pidl 2 is shorter */ { return NULL; /* complete equal or pidl 2 is shorter */
} }
TRACE(shell, "--- %p\n", ret); TRACE_(shell)("--- %p\n", ret);
return ret; /* pidl 1 is shorter */ return ret; /* pidl 1 is shorter */
} }
@ -449,7 +449,7 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
{ DWORD len1,len2; { DWORD len1,len2;
LPITEMIDLIST pidlNew; LPITEMIDLIST pidlNew;
TRACE(pidl,"pidl=%p pidl=%p\n",pidl1,pidl2); TRACE_(pidl)("pidl=%p pidl=%p\n",pidl1,pidl2);
if(!pidl1 && !pidl2) if(!pidl1 && !pidl2)
{ return NULL; { return NULL;
@ -486,7 +486,7 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
* NOTES * NOTES
*/ */
LPITEMIDLIST WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, DWORD z) LPITEMIDLIST WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, DWORD z)
{ FIXME(pidl,"sf=%p pidl=%p 0x%04lx\n",lpsf,pidl,z); { FIXME_(pidl)("sf=%p pidl=%p 0x%04lx\n",lpsf,pidl,z);
pdump (pidl); pdump (pidl);
return 0; return 0;
} }
@ -497,7 +497,7 @@ LPITEMIDLIST WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, DWORD z)
* NOTES * NOTES
*/ */
LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl) LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl)
{ FIXME(pidl,"(pidl=%p)\n",pidl); { FIXME_(pidl)("(pidl=%p)\n",pidl);
pdump(pidl); pdump(pidl);
return 0; return 0;
} }
@ -526,7 +526,7 @@ DWORD WINAPI ILGetSize(LPITEMIDLIST pidl)
} }
len += 2; len += 2;
} }
TRACE(pidl,"pidl=%p size=%lu\n",pidl, len); TRACE_(pidl)("pidl=%p size=%lu\n",pidl, len);
return len; return len;
} }
/************************************************************************* /*************************************************************************
@ -545,7 +545,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
{ LPITEMIDLIST nextpidl; { LPITEMIDLIST nextpidl;
WORD len; WORD len;
TRACE(pidl,"(pidl=%p)\n",pidl); TRACE_(pidl)("(pidl=%p)\n",pidl);
if(pidl) if(pidl)
{ len = pidl->mkid.cb; { len = pidl->mkid.cb;
if (len) if (len)
@ -566,7 +566,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
*/ */
LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL bEnd) LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL bEnd)
{ LPITEMIDLIST idlRet; { LPITEMIDLIST idlRet;
WARN(pidl,"(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd); WARN_(pidl)("(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd);
pdump (pidl); pdump (pidl);
pdump (item); pdump (item);
@ -594,7 +594,7 @@ LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL bEnd)
* exported by ordinal * exported by ordinal
*/ */
DWORD WINAPI ILFree(LPITEMIDLIST pidl) DWORD WINAPI ILFree(LPITEMIDLIST pidl)
{ TRACE(pidl,"(pidl=0x%08lx)\n",(DWORD)pidl); { TRACE_(pidl)("(pidl=0x%08lx)\n",(DWORD)pidl);
if (!pidl) if (!pidl)
return FALSE; return FALSE;
@ -606,7 +606,7 @@ DWORD WINAPI ILFree(LPITEMIDLIST pidl)
* *
*/ */
DWORD WINAPI ILGlobalFree( LPITEMIDLIST pidl) DWORD WINAPI ILGlobalFree( LPITEMIDLIST pidl)
{ TRACE(pidl,"%p\n",pidl); { TRACE_(pidl)("%p\n",pidl);
if (!pidl) if (!pidl)
return FALSE; return FALSE;
@ -620,7 +620,7 @@ DWORD WINAPI ILGlobalFree( LPITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILCreateFromPathA (LPSTR path) LPITEMIDLIST WINAPI ILCreateFromPathA (LPSTR path)
{ LPITEMIDLIST pidlnew; { LPITEMIDLIST pidlnew;
TRACE(shell,"%s\n",path); TRACE_(shell)("%s\n",path);
if (SUCCEEDED (SHILCreateFromPathA (path, &pidlnew, 0))) if (SUCCEEDED (SHILCreateFromPathA (path, &pidlnew, 0)))
return pidlnew; return pidlnew;
return FALSE; return FALSE;
@ -628,7 +628,7 @@ LPITEMIDLIST WINAPI ILCreateFromPathA (LPSTR path)
LPITEMIDLIST WINAPI ILCreateFromPathW (LPWSTR path) LPITEMIDLIST WINAPI ILCreateFromPathW (LPWSTR path)
{ LPITEMIDLIST pidlnew; { LPITEMIDLIST pidlnew;
TRACE(shell,"%s\n",debugstr_w(path)); TRACE_(shell)("%s\n",debugstr_w(path));
if (SUCCEEDED (SHILCreateFromPathW (path, &pidlnew, 0))) if (SUCCEEDED (SHILCreateFromPathW (path, &pidlnew, 0)))
return pidlnew; return pidlnew;
@ -652,11 +652,11 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW (LPVOID lpszPath)
return 0; return 0;
if ( VERSION_OsIsUnicode()) if ( VERSION_OsIsUnicode())
{ TRACE(pidl,"(path=L%s)\n",debugstr_w((LPWSTR)lpszPath)); { TRACE_(pidl)("(path=L%s)\n",debugstr_w((LPWSTR)lpszPath));
WideCharToLocal(lpszTemp, lpszPath, MAX_PATH); WideCharToLocal(lpszTemp, lpszPath, MAX_PATH);
} }
else else
{ TRACE(pidl,"(path=%s)\n",(LPSTR)lpszPath); { TRACE_(pidl)("(path=%s)\n",(LPSTR)lpszPath);
strcpy(lpszTemp, lpszPath); strcpy(lpszTemp, lpszPath);
} }
@ -671,7 +671,7 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW (LPVOID lpszPath)
* *
*/ */
HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len) HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
{ TRACE(shell,"sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); { TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
if (! psf || !dest ) if (! psf || !dest )
return E_INVALIDARG; return E_INVALIDARG;
@ -697,10 +697,10 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
break; break;
case SHGDFIL_NETRESOURCE: case SHGDFIL_NETRESOURCE:
case SHGDFIL_DESCRIPTIONID: case SHGDFIL_DESCRIPTIONID:
FIXME(shell, "SHGDFIL %i stub\n", nFormat); FIXME_(shell)("SHGDFIL %i stub\n", nFormat);
break; break;
default: default:
ERR(shell,"Unknown SHGDFIL %i, please report\n", nFormat); ERR_(shell)("Unknown SHGDFIL %i, please report\n", nFormat);
} }
return E_INVALIDARG; return E_INVALIDARG;
} }
@ -709,7 +709,7 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
* *
*/ */
HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len) HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
{ FIXME(shell,"sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); { FIXME_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
return SHGetDataFromIDListA( psf, pidl, nFormat, dest, len); return SHGetDataFromIDListA( psf, pidl, nFormat, dest, len);
} }
@ -725,11 +725,11 @@ HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
* _ILCreateValue() * _ILCreateValue()
*/ */
LPITEMIDLIST WINAPI _ILCreateDesktop() LPITEMIDLIST WINAPI _ILCreateDesktop()
{ TRACE(pidl,"()\n"); { TRACE_(pidl)("()\n");
return _ILCreate(PT_DESKTOP, NULL, 0); return _ILCreate(PT_DESKTOP, NULL, 0);
} }
LPITEMIDLIST WINAPI _ILCreateMyComputer() LPITEMIDLIST WINAPI _ILCreateMyComputer()
{ TRACE(pidl,"()\n"); { TRACE_(pidl)("()\n");
return _ILCreate(PT_MYCOMP, &IID_MyComputer, sizeof(GUID)); return _ILCreate(PT_MYCOMP, &IID_MyComputer, sizeof(GUID));
} }
LPITEMIDLIST WINAPI _ILCreateDrive( LPCSTR lpszNew) LPITEMIDLIST WINAPI _ILCreateDrive( LPCSTR lpszNew)
@ -737,7 +737,7 @@ LPITEMIDLIST WINAPI _ILCreateDrive( LPCSTR lpszNew)
strncpy (sTemp,lpszNew,4); strncpy (sTemp,lpszNew,4);
sTemp[2]='\\'; sTemp[2]='\\';
sTemp[3]=0x00; sTemp[3]=0x00;
TRACE(pidl,"(%s)\n",sTemp); TRACE_(pidl)("(%s)\n",sTemp);
return _ILCreate(PT_DRIVE,(LPVOID)&sTemp[0],4); return _ILCreate(PT_DRIVE,(LPVOID)&sTemp[0],4);
} }
LPITEMIDLIST WINAPI _ILCreateFolder( LPCSTR lpszShortName, LPCSTR lpszName) LPITEMIDLIST WINAPI _ILCreateFolder( LPCSTR lpszShortName, LPCSTR lpszName)
@ -745,7 +745,7 @@ LPITEMIDLIST WINAPI _ILCreateFolder( LPCSTR lpszShortName, LPCSTR lpszName)
char * pbuff = buff; char * pbuff = buff;
ULONG len, len1; ULONG len, len1;
TRACE(pidl,"(%s, %s)\n",lpszShortName, lpszName); TRACE_(pidl)("(%s, %s)\n",lpszShortName, lpszName);
len = strlen (lpszName)+1; len = strlen (lpszName)+1;
memcpy (pbuff, lpszName, len); memcpy (pbuff, lpszName, len);
@ -766,7 +766,7 @@ LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR lpszShortName, LPCSTR lpszName)
char * pbuff = buff; char * pbuff = buff;
ULONG len, len1; ULONG len, len1;
TRACE(pidl,"(%s, %s)\n", lpszShortName, lpszName); TRACE_(pidl)("(%s, %s)\n", lpszShortName, lpszName);
len = strlen (lpszName)+1; len = strlen (lpszName)+1;
memcpy (pbuff, lpszName, len); memcpy (pbuff, lpszName, len);
@ -792,7 +792,7 @@ LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR lpszShortName, LPCSTR lpszName)
* strlen (lpszText) * strlen (lpszText)
*/ */
DWORD WINAPI _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize) DWORD WINAPI _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize)
{ TRACE(pidl,"(%p,%p,%u)\n",pidl,pOut,uSize); { TRACE_(pidl)("(%p,%p,%u)\n",pidl,pOut,uSize);
if(_ILIsMyComputer(pidl)) if(_ILIsMyComputer(pidl))
pidl = ILGetNext(pidl); pidl = ILGetNext(pidl);
@ -812,7 +812,7 @@ DWORD WINAPI _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize)
DWORD WINAPI _ILGetItemText(LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize) DWORD WINAPI _ILGetItemText(LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize)
{ DWORD ret = 0; { DWORD ret = 0;
TRACE(pidl,"(pidl=%p %p %d)\n",pidl,lpszText,uSize); TRACE_(pidl)("(pidl=%p %p %d)\n",pidl,lpszText,uSize);
if (_ILIsMyComputer(pidl)) if (_ILIsMyComputer(pidl))
{ ret = _ILGetData(PT_MYCOMP, pidl, (LPVOID)lpszText, uSize)-1; { ret = _ILGetData(PT_MYCOMP, pidl, (LPVOID)lpszText, uSize)-1;
} }
@ -825,7 +825,7 @@ DWORD WINAPI _ILGetItemText(LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize)
else if (_ILIsValue (pidl)) else if (_ILIsValue (pidl))
{ ret = _ILGetData(PT_VALUE, pidl, (LPVOID)lpszText, uSize)-1; { ret = _ILGetData(PT_VALUE, pidl, (LPVOID)lpszText, uSize)-1;
} }
TRACE(pidl,"(-- %s)\n",debugstr_a(lpszText)); TRACE_(pidl)("(-- %s)\n",debugstr_a(lpszText));
return ret; return ret;
} }
/************************************************************************** /**************************************************************************
@ -835,31 +835,31 @@ DWORD WINAPI _ILGetItemText(LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize)
* _ILIsValue() * _ILIsValue()
*/ */
BOOL WINAPI _ILIsDesktop(LPCITEMIDLIST pidl) BOOL WINAPI _ILIsDesktop(LPCITEMIDLIST pidl)
{ TRACE(pidl,"(%p)\n",pidl); { TRACE_(pidl)("(%p)\n",pidl);
return ( !pidl || (pidl && pidl->mkid.cb == 0x00) ); return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
} }
BOOL WINAPI _ILIsMyComputer(LPCITEMIDLIST pidl) BOOL WINAPI _ILIsMyComputer(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); { LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl); TRACE_(pidl)("(%p)\n",pidl);
return (pidl && lpPData && PT_MYCOMP == lpPData->type); return (pidl && lpPData && PT_MYCOMP == lpPData->type);
} }
BOOL WINAPI _ILIsDrive(LPCITEMIDLIST pidl) BOOL WINAPI _ILIsDrive(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); { LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl); TRACE_(pidl)("(%p)\n",pidl);
return (pidl && lpPData && (PT_DRIVE == lpPData->type || PT_DRIVE1 == lpPData->type)); return (pidl && lpPData && (PT_DRIVE == lpPData->type || PT_DRIVE1 == lpPData->type));
} }
BOOL WINAPI _ILIsFolder(LPCITEMIDLIST pidl) BOOL WINAPI _ILIsFolder(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); { LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl); TRACE_(pidl)("(%p)\n",pidl);
return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type)); return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type));
} }
BOOL WINAPI _ILIsValue(LPCITEMIDLIST pidl) BOOL WINAPI _ILIsValue(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); { LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl); TRACE_(pidl)("(%p)\n",pidl);
return (pidl && lpPData && PT_VALUE == lpPData->type); return (pidl && lpPData && PT_VALUE == lpPData->type);
} }
@ -878,14 +878,14 @@ DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST pidl,LPSTR lpszPath, DWORD dwSize)
DWORD dwCopied = 0; DWORD dwCopied = 0;
LPSTR pText; LPSTR pText;
TRACE(pidl,"(%p path=%p)\n",pidl, lpszPath); TRACE_(pidl)("(%p path=%p)\n",pidl, lpszPath);
if(!pidl) if(!pidl)
return 0; return 0;
if(_ILIsMyComputer(pidl)) if(_ILIsMyComputer(pidl))
{ pidlTemp = ILGetNext(pidl); { pidlTemp = ILGetNext(pidl);
TRACE(pidl,"-- skip My Computer\n"); TRACE_(pidl)("-- skip My Computer\n");
} }
else else
{ pidlTemp = (LPITEMIDLIST)pidl; { pidlTemp = (LPITEMIDLIST)pidl;
@ -925,7 +925,7 @@ DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST pidl,LPSTR lpszPath, DWORD dwSize)
} }
} }
TRACE(pidl,"-- (size=%lu path=%s)\n",dwCopied, debugstr_a(lpszPath)); TRACE_(pidl)("-- (size=%lu path=%s)\n",dwCopied, debugstr_a(lpszPath));
return dwCopied; return dwCopied;
} }
@ -938,7 +938,7 @@ DWORD WINAPI _ILGetValueText(LPCITEMIDLIST pidl, LPSTR lpszValue, DWORD dwSize)
{ LPITEMIDLIST pidlTemp=pidl; { LPITEMIDLIST pidlTemp=pidl;
CHAR szText[MAX_PATH]; CHAR szText[MAX_PATH];
TRACE(pidl,"(pidl=%p %p 0x%08lx)\n",pidl,lpszValue,dwSize); TRACE_(pidl)("(pidl=%p %p 0x%08lx)\n",pidl,lpszValue,dwSize);
if(!pidl) if(!pidl)
{ return 0; { return 0;
@ -960,7 +960,7 @@ DWORD WINAPI _ILGetValueText(LPCITEMIDLIST pidl, LPSTR lpszValue, DWORD dwSize)
strcpy(lpszValue, szText); strcpy(lpszValue, szText);
TRACE(pidl,"-- (pidl=%p %p=%s 0x%08lx)\n",pidl,lpszValue,lpszValue,dwSize); TRACE_(pidl)("-- (pidl=%p %p=%s 0x%08lx)\n",pidl,lpszValue,lpszValue,dwSize);
return strlen(lpszValue); return strlen(lpszValue);
} }
@ -976,7 +976,7 @@ DWORD WINAPI _ILGetPidlPath( LPCITEMIDLIST pidl, LPSTR lpszOut, DWORD dwOutSize)
{ int len = 0; { int len = 0;
LPSTR lpszTemp = lpszOut; LPSTR lpszTemp = lpszOut;
TRACE(pidl,"(%p,%lu)\n",lpszOut,dwOutSize); TRACE_(pidl)("(%p,%lu)\n",lpszOut,dwOutSize);
if(!lpszOut) if(!lpszOut)
{ return 0; { return 0;
@ -998,7 +998,7 @@ DWORD WINAPI _ILGetPidlPath( LPCITEMIDLIST pidl, LPSTR lpszOut, DWORD dwOutSize)
len--; len--;
} }
TRACE(pidl,"-- (%p=%s,%u)\n",lpszTemp,lpszTemp,len); TRACE_(pidl)("-- (%p=%s,%u)\n",lpszTemp,lpszTemp,len);
return len; return len;
} }
@ -1017,14 +1017,14 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
UINT16 uSize = 0; UINT16 uSize = 0;
LPSTR pszDest; LPSTR pszDest;
TRACE(pidl,"(0x%02x %p %i)\n",type,pIn,uInSize); TRACE_(pidl)("(0x%02x %p %i)\n",type,pIn,uInSize);
switch (type) switch (type)
{ case PT_DESKTOP: { case PT_DESKTOP:
uSize = 0; uSize = 0;
pidlOut = SHAlloc(uSize + 2); pidlOut = SHAlloc(uSize + 2);
pidlOut->mkid.cb = uSize; pidlOut->mkid.cb = uSize;
TRACE(pidl,"- create Desktop\n"); TRACE_(pidl)("- create Desktop\n");
break; break;
case PT_MYCOMP: case PT_MYCOMP:
@ -1034,7 +1034,7 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
pData =_ILGetDataPointer(pidlOut); pData =_ILGetDataPointer(pidlOut);
pData->type = type; pData->type = type;
memcpy(&(pData->u.mycomp.guid), pIn, uInSize); memcpy(&(pData->u.mycomp.guid), pIn, uInSize);
TRACE(pidl,"- create My Computer\n"); TRACE_(pidl)("- create My Computer\n");
break; break;
case PT_DRIVE: case PT_DRIVE:
@ -1045,7 +1045,7 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
pData->type = type; pData->type = type;
pszDest = _ILGetTextPointer(type, pData); pszDest = _ILGetTextPointer(type, pData);
memcpy(pszDest, pIn, uInSize); memcpy(pszDest, pIn, uInSize);
TRACE(pidl,"- create Drive: %s\n",debugstr_a(pszDest)); TRACE_(pidl)("- create Drive: %s\n",debugstr_a(pszDest));
break; break;
case PT_FOLDER: case PT_FOLDER:
@ -1057,7 +1057,7 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
pData->type = type; pData->type = type;
pszDest = _ILGetTextPointer(type, pData); pszDest = _ILGetTextPointer(type, pData);
memcpy(pszDest, pIn, uInSize); memcpy(pszDest, pIn, uInSize);
TRACE(pidl,"- create Value: %s\n",debugstr_a(pszDest)); TRACE_(pidl)("- create Value: %s\n",debugstr_a(pszDest));
break; break;
} }
@ -1065,7 +1065,7 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
if (pidlTemp) if (pidlTemp)
pidlTemp->mkid.cb = 0x00; pidlTemp->mkid.cb = 0x00;
TRACE(pidl,"-- (pidl=%p, size=%u)\n", pidlOut, uSize); TRACE_(pidl)("-- (pidl=%p, size=%u)\n", pidlOut, uSize);
return pidlOut; return pidlOut;
} }
/************************************************************************** /**************************************************************************
@ -1079,7 +1079,7 @@ DWORD WINAPI _ILGetData(PIDLTYPE type, LPCITEMIDLIST pidl, LPVOID pOut, UINT uOu
DWORD dwReturn=0; DWORD dwReturn=0;
LPSTR pszSrc; LPSTR pszSrc;
TRACE(pidl,"(%x %p %p %x)\n",type,pidl,pOut,uOutSize); TRACE_(pidl)("(%x %p %p %x)\n",type,pidl,pOut,uOutSize);
if( (!pidl) || (!pOut) || (uOutSize < 1)) if( (!pidl) || (!pOut) || (uOutSize < 1))
{ return 0; { return 0;
@ -1098,10 +1098,10 @@ DWORD WINAPI _ILGetData(PIDLTYPE type, LPCITEMIDLIST pidl, LPVOID pOut, UINT uOu
dwReturn = strlen((LPSTR)pOut)+1; dwReturn = strlen((LPSTR)pOut)+1;
} }
else else
{ ERR(pidl,"-- no data\n"); { ERR_(pidl)("-- no data\n");
} }
TRACE(pidl,"-- (%p=%s 0x%08lx)\n",pOut,(char*)pOut,dwReturn); TRACE_(pidl)("-- (%p=%s 0x%08lx)\n",pOut,(char*)pOut,dwReturn);
return dwReturn; return dwReturn;
} }
@ -1202,7 +1202,7 @@ BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{ char pTemp[MAX_PATH]; { char pTemp[MAX_PATH];
int i; int i;
TRACE(pidl,"pidl=%p\n",pidl); TRACE_(pidl)("pidl=%p\n",pidl);
if ( ! _ILGetValueText(pidl, pTemp, MAX_PATH)) if ( ! _ILGetValueText(pidl, pTemp, MAX_PATH))
{ return FALSE; { return FALSE;
@ -1214,7 +1214,7 @@ BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
return FALSE; return FALSE;
strncpy(pOut, &pTemp[i], uOutSize); strncpy(pOut, &pTemp[i], uOutSize);
TRACE(pidl,"%s\n",pOut); TRACE_(pidl)("%s\n",pOut);
return TRUE; return TRUE;
} }

View File

@ -14,7 +14,7 @@
#include "dlgs.h" #include "dlgs.h"
#include "win.h" #include "win.h"
#include "sysmetrics.h" #include "sysmetrics.h"
#include "debug.h" #include "debugtools.h"
#include "winreg.h" #include "winreg.h"
#include "authors.h" #include "authors.h"
#include "winversion.h" #include "winversion.h"
@ -35,7 +35,7 @@ DECLARE_DEBUG_CHANNEL(shell)
LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs) LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
{ LPWSTR *argv,s,t; { LPWSTR *argv,s,t;
int i; int i;
TRACE(shell,"\n"); TRACE_(shell)("\n");
/* to get writeable copy */ /* to get writeable copy */
cmdline = HEAP_strdupW( GetProcessHeap(), 0, cmdline); cmdline = HEAP_strdupW( GetProcessHeap(), 0, cmdline);
@ -88,7 +88,7 @@ LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
void WINAPI Control_RunDLL( HWND hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 ) void WINAPI Control_RunDLL( HWND hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 )
{ {
FIXME(shell, "(0x%08x, %p, %s, 0x%08lx): stub\n", hwnd, code, FIXME_(shell)("(0x%08x, %p, %s, 0x%08lx): stub\n", hwnd, code,
debugstr_a(cmd), arg4); debugstr_a(cmd), arg4);
} }
@ -104,18 +104,18 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
LPITEMIDLIST pPidlTemp = NULL; LPITEMIDLIST pPidlTemp = NULL;
DWORD ret=0, dwfa = dwFileAttributes; DWORD ret=0, dwfa = dwFileAttributes;
TRACE(shell,"(%s,0x%lx,%p,0x%x,0x%x)\n", TRACE_(shell)("(%s,0x%lx,%p,0x%x,0x%x)\n",
path,dwFileAttributes,psfi,sizeofpsfi,flags); path,dwFileAttributes,psfi,sizeofpsfi,flags);
/* translate the pidl to a path*/ /* translate the pidl to a path*/
if (flags & SHGFI_PIDL) if (flags & SHGFI_PIDL)
{ pPidlTemp = (LPCITEMIDLIST)path; { pPidlTemp = (LPCITEMIDLIST)path;
SHGetPathFromIDListA (pPidlTemp, szTemp); SHGetPathFromIDListA (pPidlTemp, szTemp);
TRACE(shell,"pidl=%p is %s\n", path, szTemp); TRACE_(shell)("pidl=%p is %s\n", path, szTemp);
} }
else else
{ strcpy(szTemp,path); { strcpy(szTemp,path);
TRACE(shell,"path=%s\n", szTemp); TRACE_(shell)("path=%s\n", szTemp);
} }
if (flags & SHGFI_ATTRIBUTES) if (flags & SHGFI_ATTRIBUTES)
@ -160,7 +160,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
psfi->dwAttributes |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER; psfi->dwAttributes |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
ret=TRUE; ret=TRUE;
} }
WARN(shell,"file attributes, semi-stub\n"); WARN_(shell)("file attributes, semi-stub\n");
} }
if (flags & SHGFI_DISPLAYNAME) if (flags & SHGFI_DISPLAYNAME)
@ -170,52 +170,52 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
else else
{ strcpy(psfi->szDisplayName,path); { strcpy(psfi->szDisplayName,path);
} }
TRACE(shell,"displayname=%s\n", psfi->szDisplayName); TRACE_(shell)("displayname=%s\n", psfi->szDisplayName);
ret=TRUE; ret=TRUE;
} }
if (flags & SHGFI_TYPENAME) if (flags & SHGFI_TYPENAME)
{ FIXME(shell,"get the file type, stub\n"); { FIXME_(shell)("get the file type, stub\n");
strcpy(psfi->szTypeName,"FIXME: Type"); strcpy(psfi->szTypeName,"FIXME: Type");
ret=TRUE; ret=TRUE;
} }
if (flags & SHGFI_ICONLOCATION) if (flags & SHGFI_ICONLOCATION)
{ FIXME(shell,"location of icon, stub\n"); { FIXME_(shell)("location of icon, stub\n");
strcpy(psfi->szDisplayName,""); strcpy(psfi->szDisplayName,"");
ret=TRUE; ret=TRUE;
} }
if (flags & SHGFI_EXETYPE) if (flags & SHGFI_EXETYPE)
FIXME(shell,"type of executable, stub\n"); FIXME_(shell)("type of executable, stub\n");
if (flags & SHGFI_LINKOVERLAY) if (flags & SHGFI_LINKOVERLAY)
FIXME(shell,"set icon to link, stub\n"); FIXME_(shell)("set icon to link, stub\n");
if (flags & SHGFI_OPENICON) if (flags & SHGFI_OPENICON)
FIXME(shell,"set to open icon, stub\n"); FIXME_(shell)("set to open icon, stub\n");
if (flags & SHGFI_SELECTED) if (flags & SHGFI_SELECTED)
FIXME(shell,"set icon to selected, stub\n"); FIXME_(shell)("set icon to selected, stub\n");
if (flags & SHGFI_SHELLICONSIZE) if (flags & SHGFI_SHELLICONSIZE)
FIXME(shell,"set icon to shell size, stub\n"); FIXME_(shell)("set icon to shell size, stub\n");
if (flags & SHGFI_USEFILEATTRIBUTES) if (flags & SHGFI_USEFILEATTRIBUTES)
FIXME(shell,"use the dwFileAttributes, stub\n"); FIXME_(shell)("use the dwFileAttributes, stub\n");
if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3)) if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3))
FIXME(shell,"unknown attribute!\n"); FIXME_(shell)("unknown attribute!\n");
if (flags & SHGFI_ICON) if (flags & SHGFI_ICON)
{ FIXME(shell,"icon handle\n"); { FIXME_(shell)("icon handle\n");
if (flags & SHGFI_SMALLICON) if (flags & SHGFI_SMALLICON)
{ TRACE(shell,"set to small icon\n"); { TRACE_(shell)("set to small icon\n");
psfi->hIcon=pImageList_GetIcon(ShellSmallIconList,32,ILD_NORMAL); psfi->hIcon=pImageList_GetIcon(ShellSmallIconList,32,ILD_NORMAL);
ret = (DWORD) ShellSmallIconList; ret = (DWORD) ShellSmallIconList;
} }
else else
{ TRACE(shell,"set to big icon\n"); { TRACE_(shell)("set to big icon\n");
psfi->hIcon=pImageList_GetIcon(ShellBigIconList,32,ILD_NORMAL); psfi->hIcon=pImageList_GetIcon(ShellBigIconList,32,ILD_NORMAL);
ret = (DWORD) ShellBigIconList; ret = (DWORD) ShellBigIconList;
} }
@ -230,14 +230,14 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
{ psfi->iIcon = SHMapPIDLToSystemImageListIndex (sf, pPidlTemp, 0); { psfi->iIcon = SHMapPIDLToSystemImageListIndex (sf, pPidlTemp, 0);
IShellFolder_Release(sf); IShellFolder_Release(sf);
} }
TRACE(shell,"-- SYSICONINDEX %i\n", psfi->iIcon); TRACE_(shell)("-- SYSICONINDEX %i\n", psfi->iIcon);
if (flags & SHGFI_SMALLICON) if (flags & SHGFI_SMALLICON)
{ TRACE(shell,"set to small icon\n"); { TRACE_(shell)("set to small icon\n");
ret = (DWORD) ShellSmallIconList; ret = (DWORD) ShellSmallIconList;
} }
else else
{ TRACE(shell,"set to big icon\n"); { TRACE_(shell)("set to big icon\n");
ret = (DWORD) ShellBigIconList; ret = (DWORD) ShellBigIconList;
} }
} }
@ -252,7 +252,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
SHFILEINFOW *psfi, UINT sizeofpsfi, SHFILEINFOW *psfi, UINT sizeofpsfi,
UINT flags ) UINT flags )
{ FIXME(shell,"(%s,0x%lx,%p,0x%x,0x%x)\n", { FIXME_(shell)("(%s,0x%lx,%p,0x%x,0x%x)\n",
debugstr_w(path),dwFileAttributes,psfi,sizeofpsfi,flags); debugstr_w(path),dwFileAttributes,psfi,sizeofpsfi,flags);
return 0; return 0;
} }
@ -263,7 +263,7 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
HICON WINAPI ExtractIconA( HINSTANCE hInstance, LPCSTR lpszExeFileName, HICON WINAPI ExtractIconA( HINSTANCE hInstance, LPCSTR lpszExeFileName,
UINT nIconIndex ) UINT nIconIndex )
{ HGLOBAL16 handle = InternalExtractIcon16(hInstance,lpszExeFileName,nIconIndex, 1); { HGLOBAL16 handle = InternalExtractIcon16(hInstance,lpszExeFileName,nIconIndex, 1);
TRACE(shell,"\n"); TRACE_(shell)("\n");
if( handle ) if( handle )
{ {
HICON16* ptr = (HICON16*)GlobalLock16(handle); HICON16* ptr = (HICON16*)GlobalLock16(handle);
@ -282,7 +282,7 @@ HICON WINAPI ExtractIconW( HINSTANCE hInstance, LPCWSTR lpszExeFileName,
UINT nIconIndex ) UINT nIconIndex )
{ LPSTR exefn; { LPSTR exefn;
HICON ret; HICON ret;
TRACE(shell,"\n"); TRACE_(shell)("\n");
exefn = HEAP_strdupWtoA(GetProcessHeap(),0,lpszExeFileName); exefn = HEAP_strdupWtoA(GetProcessHeap(),0,lpszExeFileName);
ret = ExtractIconA(hInstance,exefn,nIconIndex); ret = ExtractIconA(hInstance,exefn,nIconIndex);
@ -299,7 +299,7 @@ HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
{ HINSTANCE retval=31; /* default - 'No association was found' */ { HINSTANCE retval=31; /* default - 'No association was found' */
char old_dir[1024]; char old_dir[1024];
TRACE(shell, "File %s, Dir %s\n", TRACE_(shell)("File %s, Dir %s\n",
(lpFile != NULL?lpFile:"-"), (lpFile != NULL?lpFile:"-"),
(lpDirectory != NULL?lpDirectory:"-")); (lpDirectory != NULL?lpDirectory:"-"));
@ -318,7 +318,7 @@ HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
retval = SHELL_FindExecutable( lpFile, "open", lpResult ); retval = SHELL_FindExecutable( lpFile, "open", lpResult );
TRACE(shell, "returning %s\n", lpResult); TRACE_(shell)("returning %s\n", lpResult);
if (lpDirectory) if (lpDirectory)
SetCurrentDirectoryA( old_dir ); SetCurrentDirectoryA( old_dir );
return retval; return retval;
@ -330,7 +330,7 @@ HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory,
LPWSTR lpResult) LPWSTR lpResult)
{ {
FIXME(shell, "(%p,%p,%p): stub\n", lpFile, lpDirectory, lpResult); FIXME_(shell)("(%p,%p,%p): stub\n", lpFile, lpDirectory, lpResult);
return 31; /* default - 'No association was found' */ return 31; /* default - 'No association was found' */
} }
@ -365,7 +365,7 @@ static BOOL __get_dropline( HWND hWnd, LPRECT lprect )
*/ */
UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
{ {
FIXME(shell,"(0x%08lx,%p hwnd=0x%08x): stub\n", msg, data, data->hWnd); FIXME_(shell)("(0x%08lx,%p hwnd=0x%08x): stub\n", msg, data, data->hWnd);
switch (msg) switch (msg)
{ case ABM_GETSTATE: { case ABM_GETSTATE:
@ -410,7 +410,7 @@ LPSHELLFOLDER pdesktopfolder=NULL;
DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder)
{ HRESULT hres = E_OUTOFMEMORY; { HRESULT hres = E_OUTOFMEMORY;
LPCLASSFACTORY lpclf; LPCLASSFACTORY lpclf;
TRACE(shell,"%p->(%p)\n",shellfolder,*shellfolder); TRACE_(shell)("%p->(%p)\n",shellfolder,*shellfolder);
if (pdesktopfolder) if (pdesktopfolder)
{ hres = NOERROR; { hres = NOERROR;
@ -431,7 +431,7 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder)
{ *shellfolder=NULL; { *shellfolder=NULL;
} }
TRACE(shell,"-- %p->(%p)\n",shellfolder, *shellfolder); TRACE_(shell)("-- %p->(%p)\n",shellfolder, *shellfolder);
return hres; return hres;
} }
@ -467,13 +467,13 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
FT_SPECIAL= 0x00000003 FT_SPECIAL= 0x00000003
} tFolder; } tFolder;
TRACE(shell,"(%04x,0x%x,%p)\n", hwndOwner,nFolder,ppidl); TRACE_(shell)("(%04x,0x%x,%p)\n", hwndOwner,nFolder,ppidl);
strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\"); strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
res=RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp); res=RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp);
if (res) if (res)
{ ERR(shell,"Could not create key %s %08lx \n",buffer,res); { ERR_(shell)("Could not create key %s %08lx \n",buffer,res);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
@ -481,17 +481,17 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
switch (nFolder) switch (nFolder)
{ case CSIDL_BITBUCKET: { case CSIDL_BITBUCKET:
strcpy (buffer,"xxx"); /*not in the registry*/ strcpy (buffer,"xxx"); /*not in the registry*/
TRACE (shell,"looking for Recycler\n"); TRACE_(shell)("looking for Recycler\n");
tFolder=FT_UNKNOWN; tFolder=FT_UNKNOWN;
break; break;
case CSIDL_CONTROLS: case CSIDL_CONTROLS:
strcpy (buffer,"xxx"); /*virtual folder*/ strcpy (buffer,"xxx"); /*virtual folder*/
TRACE (shell,"looking for Control\n"); TRACE_(shell)("looking for Control\n");
tFolder=FT_UNKNOWN; tFolder=FT_UNKNOWN;
break; break;
case CSIDL_DESKTOP: case CSIDL_DESKTOP:
strcpy (buffer,"xxx"); /*virtual folder*/ strcpy (buffer,"xxx"); /*virtual folder*/
TRACE (shell,"looking for Desktop\n"); TRACE_(shell)("looking for Desktop\n");
tFolder=FT_DESKTOP; tFolder=FT_DESKTOP;
break; break;
case CSIDL_DESKTOPDIRECTORY: case CSIDL_DESKTOPDIRECTORY:
@ -500,7 +500,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
break; break;
case CSIDL_DRIVES: case CSIDL_DRIVES:
strcpy (buffer,"xxx"); /*virtual folder*/ strcpy (buffer,"xxx"); /*virtual folder*/
TRACE (shell,"looking for Drives\n"); TRACE_(shell)("looking for Drives\n");
tFolder=FT_SPECIAL; tFolder=FT_SPECIAL;
break; break;
case CSIDL_FONTS: case CSIDL_FONTS:
@ -514,7 +514,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
break; break;
case CSIDL_NETWORK: case CSIDL_NETWORK:
strcpy (buffer,"xxx"); /*virtual folder*/ strcpy (buffer,"xxx"); /*virtual folder*/
TRACE (shell,"looking for Network\n"); TRACE_(shell)("looking for Network\n");
tFolder=FT_UNKNOWN; tFolder=FT_UNKNOWN;
break; break;
case CSIDL_APPDATA: case CSIDL_APPDATA:
@ -560,12 +560,12 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
strcpy(buffer,"Cookies"); strcpy(buffer,"Cookies");
break; break;
default: default:
ERR (shell,"unknown CSIDL 0x%08x\n", nFolder); ERR_(shell)("unknown CSIDL 0x%08x\n", nFolder);
tFolder=FT_UNKNOWN; tFolder=FT_UNKNOWN;
break; break;
} }
TRACE(shell,"Key=%s\n",buffer); TRACE_(shell)("Key=%s\n",buffer);
type=REG_SZ; type=REG_SZ;
@ -641,11 +641,11 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
if (RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)npath,sizeof(npath)+1)) if (RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)npath,sizeof(npath)+1))
{ ERR(shell,"could not create value %s\n",buffer); { ERR_(shell)("could not create value %s\n",buffer);
RegCloseKey(key); RegCloseKey(key);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
TRACE(shell,"value %s=%s created\n",buffer,npath); TRACE_(shell)("value %s=%s created\n",buffer,npath);
dwLastError = GetLastError(); dwLastError = GetLastError();
CreateDirectoryA(npath,NULL); CreateDirectoryA(npath,NULL);
SetLastError (dwLastError); SetLastError (dwLastError);
@ -666,7 +666,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
RegCloseKey(key); RegCloseKey(key);
TRACE(shell,"Value=%s\n",tpath); TRACE_(shell)("Value=%s\n",tpath);
LocalToWideChar(lpszDisplayName, tpath, 256); LocalToWideChar(lpszDisplayName, tpath, 256);
if (SHGetDesktopFolder(&shellfolder)==S_OK) if (SHGetDesktopFolder(&shellfolder)==S_OK)
@ -674,7 +674,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
IShellFolder_Release(shellfolder); IShellFolder_Release(shellfolder);
} }
TRACE(shell, "-- (new pidl %p)\n",*ppidl); TRACE_(shell)("-- (new pidl %p)\n",*ppidl);
return NOERROR; return NOERROR;
} }
/************************************************************************* /*************************************************************************
@ -682,7 +682,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDL
* *
*/ */
DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
{ FIXME (exec, "(%lx, %lx, %lx, %lx) empty stub!\n", { FIXME_(exec)("(%lx, %lx, %lx, %lx) empty stub!\n",
dwArg1, dwArg2, dwArg3, dwArg4); dwArg1, dwArg2, dwArg3, dwArg4);
return 0; return 0;
@ -694,7 +694,7 @@ DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, D
*/ */
DWORD WINAPI SHLoadInProc (DWORD dwArg1) DWORD WINAPI SHLoadInProc (DWORD dwArg1)
{ FIXME (shell, "(%lx) empty stub!\n", dwArg1); { FIXME_(shell)("(%lx) empty stub!\n", dwArg1);
return 0; return 0;
} }
@ -704,7 +704,7 @@ DWORD WINAPI SHLoadInProc (DWORD dwArg1)
HINSTANCE WINAPI ShellExecuteA( HWND hWnd, LPCSTR lpOperation, HINSTANCE WINAPI ShellExecuteA( HWND hWnd, LPCSTR lpOperation,
LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpFile, LPCSTR lpParameters,
LPCSTR lpDirectory, INT iShowCmd ) LPCSTR lpDirectory, INT iShowCmd )
{ TRACE(shell,"\n"); { TRACE_(shell)("\n");
return ShellExecute16( hWnd, lpOperation, lpFile, lpParameters, return ShellExecute16( hWnd, lpOperation, lpFile, lpParameters,
lpDirectory, iShowCmd ); lpDirectory, iShowCmd );
} }
@ -724,7 +724,7 @@ ShellExecuteW(
LPCWSTR lpDirectory, LPCWSTR lpDirectory,
INT nShowCmd) { INT nShowCmd) {
FIXME(shell,": stub\n"); FIXME_(shell)(": stub\n");
return 0; return 0;
} }
@ -736,7 +736,7 @@ BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
{ HWND hWndCtl; { HWND hWndCtl;
char Template[512], AppTitle[512]; char Template[512], AppTitle[512];
TRACE(shell,"\n"); TRACE_(shell)("\n");
switch(msg) switch(msg)
{ case WM_INITDIALOG: { case WM_INITDIALOG:
@ -867,7 +867,7 @@ BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
{ ABOUT_INFO info; { ABOUT_INFO info;
HRSRC hRes; HRSRC hRes;
LPVOID template; LPVOID template;
TRACE(shell,"\n"); TRACE_(shell)("\n");
if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA))) if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA)))
return FALSE; return FALSE;
@ -893,7 +893,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
HRSRC hRes; HRSRC hRes;
LPVOID template; LPVOID template;
TRACE(shell,"\n"); TRACE_(shell)("\n");
if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA))) if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA)))
return FALSE; return FALSE;
@ -918,7 +918,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
* Any ideas on how this is to be implimented? * Any ideas on how this is to be implimented?
*/ */
BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATAA pnid ) BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATAA pnid )
{ TRACE(shell,"\n"); { TRACE_(shell)("\n");
return FALSE; return FALSE;
} }
@ -929,7 +929,7 @@ BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATAA pnid )
* Any ideas on how this is to be implimented? * Any ideas on how this is to be implimented?
*/ */
BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid )
{ TRACE(shell,"\n"); { TRACE_(shell)("\n");
return FALSE; return FALSE;
} }
@ -937,7 +937,7 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid )
* FreeIconList * FreeIconList
*/ */
void WINAPI FreeIconList( DWORD dw ) void WINAPI FreeIconList( DWORD dw )
{ FIXME(shell, "(%lx): stub\n",dw); { FIXME_(shell)("(%lx): stub\n",dw);
} }
/************************************************************************* /*************************************************************************
@ -963,7 +963,7 @@ DWORD WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath)
DWORD type,tpathlen=MAX_PATH,dwdisp; DWORD type,tpathlen=MAX_PATH,dwdisp;
HKEY key; HKEY key;
TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath); TRACE_(shell)("(pidl=%p,%p)\n",pidl,pszPath);
if (!pidl) if (!pidl)
{ strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\"); { strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
@ -990,7 +990,7 @@ DWORD WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath)
} }
strcpy(pszPath,lpName.u.cStr); strcpy(pszPath,lpName.u.cStr);
} }
TRACE(shell,"-- (%s)\n",pszPath); TRACE_(shell)("-- (%s)\n",pszPath);
return TRUE; return TRUE;
} }
@ -1000,12 +1000,12 @@ DWORD WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath)
DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath) DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath)
{ char sTemp[MAX_PATH]; { char sTemp[MAX_PATH];
TRACE (shell,"(pidl=%p)\n", pidl); TRACE_(shell)("(pidl=%p)\n", pidl);
SHGetPathFromIDListA (pidl, sTemp); SHGetPathFromIDListA (pidl, sTemp);
lstrcpyAtoW(pszPath, sTemp); lstrcpyAtoW(pszPath, sTemp);
TRACE(shell,"-- (%s)\n",debugstr_w(pszPath)); TRACE_(shell)("-- (%s)\n",debugstr_w(pszPath));
return TRUE; return TRUE;
} }
@ -1015,7 +1015,7 @@ DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath)
*/ */
BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPVOID pszPath) BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPVOID pszPath)
{ {
TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath); TRACE_(shell)("(pidl=%p,%p)\n",pidl,pszPath);
if (VERSION_OsIsUnicode()) if (VERSION_OsIsUnicode())
return SHGetPathFromIDListW(pidl,pszPath); return SHGetPathFromIDListW(pidl,pszPath);
@ -1041,7 +1041,7 @@ BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPVOID pszPath)
HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi) HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
{ {
if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
{ WARN (shell, "wrong DLLVERSIONINFO size from app"); { WARN_(shell)("wrong DLLVERSIONINFO size from app");
return E_INVALIDARG; return E_INVALIDARG;
} }
@ -1050,7 +1050,7 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
pdvi->dwBuildNumber = 3110; pdvi->dwBuildNumber = 3110;
pdvi->dwPlatformID = 1; pdvi->dwPlatformID = 1;
TRACE (shell, "%lu.%lu.%lu.%lu\n", TRACE_(shell)("%lu.%lu.%lu.%lu\n",
pdvi->dwMajorVersion, pdvi->dwMinorVersion, pdvi->dwMajorVersion, pdvi->dwMinorVersion,
pdvi->dwBuildNumber, pdvi->dwPlatformID); pdvi->dwBuildNumber, pdvi->dwPlatformID);
@ -1097,7 +1097,7 @@ HINSTANCE shell32_hInstance;
BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ HMODULE hUser32; { HMODULE hUser32;
TRACE(shell,"0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); TRACE_(shell)("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
shell32_hInstance = hinstDLL; shell32_hInstance = hinstDLL;
@ -1133,7 +1133,7 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
pCreateIconFromResourceEx=(void*)GetProcAddress(hUser32,"CreateIconFromResourceEx"); pCreateIconFromResourceEx=(void*)GetProcAddress(hUser32,"CreateIconFromResourceEx");
} }
else else
{ ERR(shell,"P A N I C SHELL32 loading failed\n"); { ERR_(shell)("P A N I C SHELL32 loading failed\n");
return FALSE; return FALSE;
} }
SIC_Initialize(); SIC_Initialize();
@ -1165,10 +1165,10 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* this one is here to check if AddRef/Release is balanced */ /* this one is here to check if AddRef/Release is balanced */
if (shell32_ObjCount) if (shell32_ObjCount)
{ WARN(shell,"leaving with %u objects left (memory leak)\n", shell32_ObjCount); { WARN_(shell)("leaving with %u objects left (memory leak)\n", shell32_ObjCount);
} }
} }
TRACE(shell, "refcount=%u objcount=%u \n", shell32_RefCount, shell32_ObjCount); TRACE_(shell)("refcount=%u objcount=%u \n", shell32_RefCount, shell32_ObjCount);
break; break;
} }

View File

@ -10,255 +10,255 @@
#include "winbase.h" #include "winbase.h"
#include "windef.h" #include "windef.h"
#include "tapi.h" #include "tapi.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(comm) DECLARE_DEBUG_CHANNEL(comm)
DECLARE_DEBUG_CHANNEL(tapi) DECLARE_DEBUG_CHANNEL(tapi)
DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME(tapi, "(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME_(tapi)("(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineAddProvider(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID) DWORD WINAPI lineAddProvider(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID)
{ {
FIXME(tapi, "(%s, %04x, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID); FIXME_(tapi)("(%s, %04x, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID);
return 1; return 1;
} }
DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall) DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall)
{ {
FIXME(tapi, "(%04x, %04x): stub.\n", hConfCall, hConsultCall); FIXME_(tapi)("(%04x, %04x): stub.\n", hConfCall, hConsultCall);
return 1; return 1;
} }
DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME(tapi, "(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME_(tapi)("(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineBlindTransfer(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode) DWORD WINAPI lineBlindTransfer(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
{ {
FIXME(tapi, "(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode); FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode);
return 1; return 1;
} }
DWORD WINAPI lineClose(HLINE hLine) DWORD WINAPI lineClose(HLINE hLine)
{ {
FIXME(tapi, "(%04x): stub.\n", hLine); FIXME_(tapi)("(%04x): stub.\n", hLine);
return 0; return 0;
} }
DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID) DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID)
{ {
FIXME(tapi, "(%04x, %p, %08lx, %08lx): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID); FIXME_(tapi)("(%04x, %p, %08lx, %08lx): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID);
return 1; return 1;
} }
DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode) DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode)
{ {
FIXME(tapi, "(%04x, %04x, %p, %08lx): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode); FIXME_(tapi)("(%04x, %04x, %p, %08lx): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode);
return 1; return 1;
} }
DWORD WINAPI lineConfigDialog(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass) DWORD WINAPI lineConfigDialog(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass)
{ {
FIXME(tapi, "(%08lx, %04x, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass); FIXME_(tapi)("(%08lx, %04x, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
return 0; return 0;
} }
DWORD WINAPI lineConfigDialogEdit(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut) DWORD WINAPI lineConfigDialogEdit(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut)
{ {
FIXME(tapi, "stub.\n"); FIXME_(tapi)("stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID) DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hwndOwner, dwPermanentProviderID); FIXME_(tapi)("(%04x, %08lx): stub.\n", hwndOwner, dwPermanentProviderID);
return 0; return 0;
} }
DWORD WINAPI lineDeallocateCall(HCALL hCall) DWORD WINAPI lineDeallocateCall(HCALL hCall)
{ {
FIXME(tapi, "(%04x): stub.\n", hCall); FIXME_(tapi)("(%04x): stub.\n", hCall);
return 0; return 0;
} }
DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize) DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize)
{ {
FIXME(tapi, "(%04x, %08lx, %04x, %p, %ld): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize); FIXME_(tapi)("(%04x, %08lx, %04x, %p, %ld): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize) DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize)
{ {
FIXME(tapi, "(%04x, %08lx, %p, %ld): stub.\n", hLine, dwFeature, lpParams, dwSize); FIXME_(tapi)("(%04x, %08lx, %p, %ld): stub.\n", hLine, dwFeature, lpParams, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineDial(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode) DWORD WINAPI lineDial(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
{ {
FIXME(tapi, "(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode); FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode);
return 1; return 1;
} }
DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME(tapi, "(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineForward(HLINE hLine, DWORD bAllAddress, DWORD dwAdressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineForward(HLINE hLine, DWORD bAllAddress, DWORD dwAdressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{ {
FIXME(tapi, "stub.\n"); FIXME_(tapi)("stub.\n");
return 1; return 1;
} }
DWORD WINAPI lineGatherDigits(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout) DWORD WINAPI lineGatherDigits(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout)
{ {
FIXME(tapi, "stub.\n"); FIXME_(tapi)("stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineGenerateDigits(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration) DWORD WINAPI lineGenerateDigits(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration)
{ {
FIXME(tapi, "(%04x, %08lx, %s, %ld): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration); FIXME_(tapi)("(%04x, %08lx, %s, %ld): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration);
return 0; return 0;
} }
DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones) DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones)
{ {
FIXME(tapi, "(%04x, %08lx, %ld, %ld, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones); FIXME_(tapi)("(%04x, %08lx, %ld, %ld, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones);
return 0; return 0;
} }
DWORD WINAPI lineGetAddressCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps) DWORD WINAPI lineGetAddressCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps); FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps);
return 0; return 0;
} }
DWORD WINAPI lineGetAddressID(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize) DWORD WINAPI lineGetAddressID(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize)
{ {
FIXME(tapi, "%04x, %p, %08lx, %s, %ld): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize); FIXME_(tapi)("%04x, %p, %08lx, %s, %ld): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize);
return 0; return 0;
} }
DWORD WINAPI lineGetAddressStatus(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus) DWORD WINAPI lineGetAddressStatus(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus)
{ {
FIXME(tapi, "(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpAddressStatus); FIXME_(tapi)("(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpAddressStatus);
return 0; return 0;
} }
DWORD WINAPI lineGetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority) DWORD WINAPI lineGetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority)
{ {
FIXME(tapi, "(%s, %08lx, %p, %08lx, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority); FIXME_(tapi)("(%s, %08lx, %p, %08lx, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority);
return 0; return 0;
} }
DWORD WINAPI lineGetCallInfo(HCALL hCall, LPLINECALLINFO lpCallInfo) DWORD WINAPI lineGetCallInfo(HCALL hCall, LPLINECALLINFO lpCallInfo)
{ {
FIXME(tapi, "(%04x, %p): stub.\n", hCall, lpCallInfo); FIXME_(tapi)("(%04x, %p): stub.\n", hCall, lpCallInfo);
return 0; return 0;
} }
DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus) DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus)
{ {
FIXME(tapi, "(%04x, %p): stub.\n", hCall, lpCallStatus); FIXME_(tapi)("(%04x, %p): stub.\n", hCall, lpCallStatus);
return 0; return 0;
} }
DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList) DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList)
{ {
FIXME(tapi, "(%04x, %p): stub.\n", hCall, lpCallList); FIXME_(tapi)("(%04x, %p): stub.\n", hCall, lpCallList);
return 0; return 0;
} }
DWORD WINAPI lineGetCountry(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList) DWORD WINAPI lineGetCountry(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList)
{ {
FIXME(tapi, "(%08lx, %08lx, %p): stub.\n", dwCountryID, dwAPIVersion, lpLineCountryList); FIXME_(tapi)("(%08lx, %08lx, %p): stub.\n", dwCountryID, dwAPIVersion, lpLineCountryList);
return 0; return 0;
} }
DWORD WINAPI lineGetDevCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps) DWORD WINAPI lineGetDevCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps); FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps);
return 0; return 0;
} }
DWORD WINAPI lineGetDevConfig(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass) DWORD WINAPI lineGetDevConfig(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass)
{ {
FIXME(tapi, "(%08lx, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass); FIXME_(tapi)("(%08lx, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass);
return 0; return 0;
} }
DWORD WINAPI lineGetID(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass) DWORD WINAPI lineGetID(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass)
{ {
FIXME(tapi, "(%04x, %08lx, %04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, hCall, dwSelect, lpDeviceID, lpszDeviceClass); FIXME_(tapi)("(%04x, %08lx, %04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, hCall, dwSelect, lpDeviceID, lpszDeviceClass);
return 0; return 0;
} }
DWORD WINAPI lineGetIcon(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon) DWORD WINAPI lineGetIcon(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon)
{ {
FIXME(tapi, "(%08lx, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon); FIXME_(tapi)("(%08lx, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
return 0; return 0;
} }
DWORD WINAPI lineGetLineDevStatus(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus) DWORD WINAPI lineGetLineDevStatus(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus)
{ {
FIXME(tapi, "(%04x, %p): stub.\n", hLine, lpLineDevStatus); FIXME_(tapi)("(%04x, %p): stub.\n", hLine, lpLineDevStatus);
return 0; return 0;
} }
DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList) DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList); FIXME_(tapi)("(%04x, %08lx, %08lx, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList);
return 0; return 0;
} }
DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings) DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings)
{ {
FIXME(tapi, "(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpdwNumRings); FIXME_(tapi)("(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpdwNumRings);
return 0; return 0;
} }
DWORD WINAPI lineGetProviderList(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList) DWORD WINAPI lineGetProviderList(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList)
{ {
FIXME(tapi, "(%08lx, %p): stub.\n", dwAPIVersion, lpProviderList); FIXME_(tapi)("(%08lx, %p): stub.\n", dwAPIVersion, lpProviderList);
return 0; return 0;
} }
DWORD WINAPI lineGetRequest(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer) DWORD WINAPI lineGetRequest(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer)
{ {
FIXME(tapi, "%04x, %08lx, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer); FIXME_(tapi)("%04x, %08lx, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer);
return 0; return 0;
} }
DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates) DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates)
{ {
FIXME(tapi, "(%04x, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates); FIXME_(tapi)("(%04x, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates);
return 0; return 0;
} }
DWORD WINAPI lineGetTranslateCaps(HLINEAPP hLineApp, DWORD dwAPIVersion, LPLINETRANSLATECAPS lpTranslateCaps) DWORD WINAPI lineGetTranslateCaps(HLINEAPP hLineApp, DWORD dwAPIVersion, LPLINETRANSLATECAPS lpTranslateCaps)
{ {
FIXME(tapi, "(%04x, %08lx, %p): stub.\n", hLineApp, dwAPIVersion, lpTranslateCaps); FIXME_(tapi)("(%04x, %08lx, %p): stub.\n", hLineApp, dwAPIVersion, lpTranslateCaps);
return 0; return 0;
} }
DWORD WINAPI lineHandoff(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode) DWORD WINAPI lineHandoff(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode)
{ {
FIXME(tapi, "(%04x, %s, %08lx): stub.\n", hCall, lpszFileName, dwMediaMode); FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpszFileName, dwMediaMode);
return 0; return 0;
} }
DWORD WINAPI lineHold(HCALL hCall) DWORD WINAPI lineHold(HCALL hCall)
{ {
FIXME(tapi, "(%04x): stub.\n", hCall); FIXME_(tapi)("(%04x): stub.\n", hCall);
return 1; return 1;
} }
@ -269,31 +269,31 @@ DWORD WINAPI lineInitialize(
LPCSTR lpszAppName, LPCSTR lpszAppName,
LPDWORD lpdwNumDevs) LPDWORD lpdwNumDevs)
{ {
FIXME(comm, "stub.\n"); FIXME_(comm)("stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineMakeCall(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress, DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineMakeCall(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress, DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams)
{ {
FIXME(tapi, "(%04x, %p, %s, %08lx, %p): stub.\n", hLine, lphCall, lpszDestAddress, dwCountryCode, lpCallParams); FIXME_(tapi)("(%04x, %p, %s, %08lx, %p): stub.\n", hLine, lphCall, lpszDestAddress, dwCountryCode, lpCallParams);
return 1; return 1;
} }
DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes) DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hCall, dwDigitModes); FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwDigitModes);
return 0; return 0;
} }
DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes) DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hCall, dwMediaModes); FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwMediaModes);
return 0; return 0;
} }
DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries) DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries)
{ {
FIXME(tapi, "(%04x, %p, %08lx): stub.\n", hCall, lpToneList, dwNumEntries); FIXME_(tapi)("(%04x, %p, %08lx): stub.\n", hCall, lpToneList, dwNumEntries);
return 0; return 0;
} }
@ -306,38 +306,38 @@ DWORD WINAPI lineNegotiateAPIVersion(
LPLINEEXTENSIONID lpExtensionID LPLINEEXTENSIONID lpExtensionID
) )
{ {
FIXME(comm, "stub.\n"); FIXME_(comm)("stub.\n");
*lpdwAPIVersion = dwAPIHighVersion; *lpdwAPIVersion = dwAPIHighVersion;
return 0; return 0;
} }
DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion) DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion)
{ {
FIXME(tapi, "stub.\n"); FIXME_(tapi)("stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineOpen(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineOpen(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams)
{ {
FIXME(tapi, "stub.\n"); FIXME_(tapi)("stub.\n");
return 0; return 0;
} }
DWORD WINAPI linePark(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress) DWORD WINAPI linePark(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress)
{ {
FIXME(tapi, "(%04x, %08lx, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress); FIXME_(tapi)("(%04x, %08lx, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress);
return 1; return 1;
} }
DWORD WINAPI linePickup(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID) DWORD WINAPI linePickup(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID)
{ {
FIXME(tapi, "(%04x, %08lx, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID); FIXME_(tapi)("(%04x, %08lx, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID);
return 1; return 1;
} }
DWORD WINAPI linePrepareAddToConference(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams) DWORD WINAPI linePrepareAddToConference(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{ {
FIXME(tapi, "(%04x, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams); FIXME_(tapi)("(%04x, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams);
return 1; return 1;
} }
@ -350,79 +350,79 @@ DWORD WINAPI lineRedirect(
LPCSTR lpszDestAddress, LPCSTR lpszDestAddress,
DWORD dwCountryCode) { DWORD dwCountryCode) {
FIXME(comm, ": stub.\n"); FIXME_(comm)(": stub.\n");
return 1; return 1;
} }
DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable) DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx, %08lx): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable); FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable);
return 1; return 1;
} }
DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall) DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall)
{ {
FIXME(tapi, "(%04x): stub.\n", hCall); FIXME_(tapi)("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineRemoveFromConference(HCALL hCall) DWORD WINAPI lineRemoveFromConference(HCALL hCall)
{ {
FIXME(tapi, "(%04x): stub.\n", hCall); FIXME_(tapi)("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner) DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner)
{ {
FIXME(tapi, "(%08lx, %04x): stub.\n", dwPermanentProviderID, hwndOwner); FIXME_(tapi)("(%08lx, %04x): stub.\n", dwPermanentProviderID, hwndOwner);
return 1; return 1;
} }
DWORD WINAPI lineSecureCall(HCALL hCall) DWORD WINAPI lineSecureCall(HCALL hCall)
{ {
FIXME(tapi, "(%04x): stub.\n", hCall); FIXME_(tapi)("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME(tapi, "(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineSetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority) DWORD WINAPI lineSetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority)
{ {
FIXME(tapi, "(%s, %08lx, %p, %08lx, %s, %08lx): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority); FIXME_(tapi)("(%s, %08lx, %p, %08lx, %s, %08lx): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority);
return 0; return 0;
} }
DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific) DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hCall, dwAppSpecific); FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwAppSpecific);
return 0; return 0;
} }
DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams) DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams); FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams);
return 1; return 1;
} }
DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege) DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hCall, dwCallPrivilege); FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwCallPrivilege);
return 0; return 0;
} }
DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation) DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hLineApp, dwLocation); FIXME_(tapi)("(%04x, %08lx): stub.\n", hLineApp, dwLocation);
return 0; return 0;
} }
DWORD WINAPI lineSetDevConfig(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass) DWORD WINAPI lineSetDevConfig(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass)
{ {
FIXME(tapi, "(%0lx, %p, %08lx, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass); FIXME_(tapi)("(%0lx, %p, %08lx, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass);
return 0; return 0;
} }
@ -440,90 +440,90 @@ DWORD dwToneNumEntries,
LPLINEMEDIACONTROLCALLSTATE const lpCallStateList, LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
DWORD dwCallStateNumEntries) DWORD dwCallStateNumEntries)
{ {
FIXME(tapi, ": stub.\n"); FIXME_(tapi)(": stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes) DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hCall, dwMediaModes); FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwMediaModes);
return 0; return 0;
} }
DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings) DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx): stub.\n", hLine, dwAddressID, dwNumRings); FIXME_(tapi)("(%04x, %08lx, %08lx): stub.\n", hLine, dwAddressID, dwNumRings);
return 0; return 0;
} }
DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates) DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx): stub.\n", hLine, dwLineStates, dwAddressStates); FIXME_(tapi)("(%04x, %08lx, %08lx): stub.\n", hLine, dwLineStates, dwAddressStates);
return 0; return 0;
} }
DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable) DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable)
{ {
FIXME(tapi, "(%04x, %08lx, %04x, %08lx, %08lx, %08lx, %08lx): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable); FIXME_(tapi)("(%04x, %08lx, %04x, %08lx, %08lx, %08lx, %08lx): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable);
return 1; return 1;
} }
DWORD WINAPI lineSetTollList(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption) DWORD WINAPI lineSetTollList(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption)
{ {
FIXME(tapi, "(%04x, %08lx, %s, %08lx): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption); FIXME_(tapi)("(%04x, %08lx, %s, %08lx): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption);
return 0; return 0;
} }
DWORD WINAPI lineSetupConference(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineSetupConference(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams)
{ {
FIXME(tapi, "(%04x, %04x, %p, %p, %08lx, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams); FIXME_(tapi)("(%04x, %04x, %p, %p, %08lx, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams);
return 1; return 1;
} }
DWORD WINAPI lineSetupTransfer(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineSetupTransfer(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{ {
FIXME(tapi, "(%04x, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams); FIXME_(tapi)("(%04x, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams);
return 1; return 1;
} }
DWORD WINAPI lineShutdown(HLINEAPP hLineApp) DWORD WINAPI lineShutdown(HLINEAPP hLineApp)
{ {
FIXME(tapi, "(%04x): stub.\n", hLineApp); FIXME_(tapi)("(%04x): stub.\n", hLineApp);
return 0; return 0;
} }
DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall) DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall)
{ {
FIXME(tapi, "(active: %04x, held: %04x): stub.\n", hActiveCall, hHeldCall); FIXME_(tapi)("(active: %04x, held: %04x): stub.\n", hActiveCall, hHeldCall);
return 1; return 1;
} }
DWORD WINAPI lineTranslateAddress(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput) DWORD WINAPI lineTranslateAddress(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx, %s, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput); FIXME_(tapi)("(%04x, %08lx, %08lx, %s, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput);
return 0; return 0;
} }
DWORD WINAPI lineTranslateDialog(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn) DWORD WINAPI lineTranslateDialog(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn)
{ {
FIXME(tapi, "(%04x, %08lx, %08lx, %04x, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn); FIXME_(tapi)("(%04x, %08lx, %08lx, %04x, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn);
return 0; return 0;
} }
DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID) DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID)
{ {
FIXME(tapi, "(%04x, %08lx): stub.\n", hLine, dwCompletionID); FIXME_(tapi)("(%04x, %08lx): stub.\n", hLine, dwCompletionID);
return 1; return 1;
} }
DWORD WINAPI lineUnHold(HCALL hCall) DWORD WINAPI lineUnHold(HCALL hCall)
{ {
FIXME(tapi, "(%04x): stub.\n", hCall); FIXME_(tapi)("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineUnpark(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress) DWORD WINAPI lineUnpark(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress)
{ {
FIXME(tapi, "(%04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress); FIXME_(tapi)("(%04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress);
return 1; return 1;
} }

View File

@ -23,7 +23,7 @@
#include "heap.h" #include "heap.h"
#include "msdos.h" #include "msdos.h"
#include "options.h" #include "options.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosfs) DECLARE_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
@ -48,7 +48,7 @@ static int DIR_GetPath( const char *keyname, const char *defval,
!FILE_Stat( full_name->long_name, &info ) || !FILE_Stat( full_name->long_name, &info ) ||
!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) !(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{ {
MSG("Invalid path '%s' for %s directory\n", path, keyname); MESSAGE("Invalid path '%s' for %s directory\n", path, keyname);
return 0; return 0;
} }
return 1; return 1;
@ -73,7 +73,7 @@ int DIR_Init(void)
cwd = path; cwd = path;
if ((drive = DRIVE_FindDriveRoot( &cwd )) == -1) if ((drive = DRIVE_FindDriveRoot( &cwd )) == -1)
{ {
MSG("Warning: could not find wine.conf [Drive x] entry " MESSAGE("Warning: could not find wine.conf [Drive x] entry "
"for current working directory %s; " "for current working directory %s; "
"starting in windows directory.\n", cwd ); "starting in windows directory.\n", cwd );
} }
@ -94,11 +94,11 @@ int DIR_Init(void)
{ {
if (errno==EACCES) if (errno==EACCES)
{ {
MSG("Warning: The Temporary Directory (as specified in your configuration file) is NOT writeable.\n"); MESSAGE("Warning: The Temporary Directory (as specified in your configuration file) is NOT writeable.\n");
PROFILE_UsageWineIni(); PROFILE_UsageWineIni();
} }
else else
MSG("Warning: Access to Temporary Directory failed (%s).\n", MESSAGE("Warning: Access to Temporary Directory failed (%s).\n",
strerror(errno)); strerror(errno));
} }
@ -120,14 +120,14 @@ int DIR_Init(void)
SetEnvironmentVariableA( "windir", DIR_Windows.short_name ); SetEnvironmentVariableA( "windir", DIR_Windows.short_name );
SetEnvironmentVariableA( "winsysdir", DIR_System.short_name ); SetEnvironmentVariableA( "winsysdir", DIR_System.short_name );
TRACE(dosfs, "WindowsDir = %s (%s)\n", TRACE_(dosfs)("WindowsDir = %s (%s)\n",
DIR_Windows.short_name, DIR_Windows.long_name ); DIR_Windows.short_name, DIR_Windows.long_name );
TRACE(dosfs, "SystemDir = %s (%s)\n", TRACE_(dosfs)("SystemDir = %s (%s)\n",
DIR_System.short_name, DIR_System.long_name ); DIR_System.short_name, DIR_System.long_name );
TRACE(dosfs, "TempDir = %s (%s)\n", TRACE_(dosfs)("TempDir = %s (%s)\n",
tmp_dir.short_name, tmp_dir.long_name ); tmp_dir.short_name, tmp_dir.long_name );
TRACE(dosfs, "Path = %s\n", path ); TRACE_(dosfs)("Path = %s\n", path );
TRACE(dosfs, "Cwd = %c:\\%s\n", TRACE_(dosfs)("Cwd = %c:\\%s\n",
'A' + drive, DRIVE_GetDosCwd( drive ) ); 'A' + drive, DRIVE_GetDosCwd( drive ) );
return 1; return 1;
@ -291,7 +291,7 @@ UINT WINAPI GetSystemDirectoryW( LPWSTR path, UINT count )
*/ */
BOOL16 WINAPI CreateDirectory16( LPCSTR path, LPVOID dummy ) BOOL16 WINAPI CreateDirectory16( LPCSTR path, LPVOID dummy )
{ {
TRACE(file,"(%s,%p)\n", path, dummy ); TRACE_(file)("(%s,%p)\n", path, dummy );
return (BOOL16)CreateDirectoryA( path, NULL ); return (BOOL16)CreateDirectoryA( path, NULL );
} }
@ -311,16 +311,16 @@ BOOL WINAPI CreateDirectoryA( LPCSTR path,
{ {
DOS_FULL_NAME full_name; DOS_FULL_NAME full_name;
TRACE(file, "(%s,%p)\n", path, lpsecattribs ); TRACE_(file)("(%s,%p)\n", path, lpsecattribs );
if (DOSFS_GetDevice( path )) if (DOSFS_GetDevice( path ))
{ {
TRACE(file, "cannot use device '%s'!\n",path); TRACE_(file)("cannot use device '%s'!\n",path);
SetLastError( ERROR_ACCESS_DENIED ); SetLastError( ERROR_ACCESS_DENIED );
return FALSE; return FALSE;
} }
if (!DOSFS_GetFullName( path, FALSE, &full_name )) return 0; if (!DOSFS_GetFullName( path, FALSE, &full_name )) return 0;
if (mkdir( full_name.long_name, 0777 ) == -1) { if (mkdir( full_name.long_name, 0777 ) == -1) {
WARN (file, "Errno %i trying to create directory %s.\n", errno, full_name.long_name); WARN_(file)("Errno %i trying to create directory %s.\n", errno, full_name.long_name);
/* the FILE_SetDosError() generated error codes don't match the /* the FILE_SetDosError() generated error codes don't match the
* CreateDirectory ones for some errnos */ * CreateDirectory ones for some errnos */
switch (errno) { switch (errno) {
@ -383,11 +383,11 @@ BOOL WINAPI RemoveDirectoryA( LPCSTR path )
{ {
DOS_FULL_NAME full_name; DOS_FULL_NAME full_name;
TRACE(file, "'%s'\n", path ); TRACE_(file)("'%s'\n", path );
if (DOSFS_GetDevice( path )) if (DOSFS_GetDevice( path ))
{ {
TRACE(file, "cannot remove device '%s'!\n", path); TRACE_(file)("cannot remove device '%s'!\n", path);
SetLastError( ERROR_FILE_NOT_FOUND ); SetLastError( ERROR_FILE_NOT_FOUND );
return FALSE; return FALSE;
} }
@ -645,7 +645,7 @@ DWORD WINAPI SearchPathA( LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen,
for (p = buffer; *p; p++) if (*p == '/') *p = '\\'; for (p = buffer; *p; p++) if (*p == '/') *p = '\\';
if (lastpart) *lastpart = strrchr( buffer, '\\' ) + 1; if (lastpart) *lastpart = strrchr( buffer, '\\' ) + 1;
} }
TRACE(dosfs, "Returning %d\n", strlen(res) + 3 ); TRACE_(dosfs)("Returning %d\n", strlen(res) + 3 );
return strlen(res) + 3; return strlen(res) + 3;
} }

View File

@ -31,7 +31,7 @@
#include "server.h" #include "server.h"
#include "process.h" #include "process.h"
#include "options.h" #include "options.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosfs) DECLARE_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
@ -525,13 +525,13 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
while (len > 1 && name[len-1] == '.') len--; while (len > 1 && name[len-1] == '.') len--;
if (long_len < len + 1) return FALSE; if (long_len < len + 1) return FALSE;
TRACE(dosfs, "%s,%s\n", path, name ); TRACE_(dosfs)("%s,%s\n", path, name );
if (!DOSFS_ToDosFCBFormat( name, dos_name )) dos_name[0] = '\0'; if (!DOSFS_ToDosFCBFormat( name, dos_name )) dos_name[0] = '\0';
if (!(dir = DOSFS_OpenDir( path ))) if (!(dir = DOSFS_OpenDir( path )))
{ {
WARN(dosfs, "(%s,%s): can't open dir: %s\n", WARN_(dosfs)("(%s,%s): can't open dir: %s\n",
path, name, strerror(errno) ); path, name, strerror(errno) );
return FALSE; return FALSE;
} }
@ -571,11 +571,11 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
else else
DOSFS_Hash( long_name, short_buf, FALSE, ignore_case ); DOSFS_Hash( long_name, short_buf, FALSE, ignore_case );
} }
TRACE(dosfs, "(%s,%s) -> %s (%s)\n", TRACE_(dosfs)("(%s,%s) -> %s (%s)\n",
path, name, long_name, short_buf ? short_buf : "***"); path, name, long_name, short_buf ? short_buf : "***");
} }
else else
WARN(dosfs, "'%s' not found in '%s'\n", name, path); WARN_(dosfs)("'%s' not found in '%s'\n", name, path);
DOSFS_CloseDir( dir ); DOSFS_CloseDir( dir );
return ret; return ret;
} }
@ -666,7 +666,7 @@ HFILE DOSFS_OpenDevice( const char *name, DWORD access )
to_dup = GetStdHandle( STD_OUTPUT_HANDLE ); to_dup = GetStdHandle( STD_OUTPUT_HANDLE );
break; break;
default: default:
FIXME(dosfs,"can't open CON read/write\n"); FIXME_(dosfs)("can't open CON read/write\n");
return HFILE_ERROR; return HFILE_ERROR;
break; break;
} }
@ -687,17 +687,17 @@ HFILE DOSFS_OpenDevice( const char *name, DWORD access )
if(devname[0]) if(devname[0])
{ {
TRACE(file,"DOSFS_OpenDevice %s is %s\n", TRACE_(file)("DOSFS_OpenDevice %s is %s\n",
DOSFS_Devices[i].name,devname); DOSFS_Devices[i].name,devname);
r = FILE_CreateFile( devname, access, r = FILE_CreateFile( devname, access,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, -1 ); OPEN_EXISTING, 0, -1 );
TRACE(file,"Create_File return %08X\n",r); TRACE_(file)("Create_File return %08X\n",r);
return r; return r;
} }
} }
FIXME(dosfs,"device open %s not supported (yet)\n",DOSFS_Devices[i].name); FIXME_(dosfs)("device open %s not supported (yet)\n",DOSFS_Devices[i].name);
return HFILE_ERROR; return HFILE_ERROR;
} }
} }
@ -725,7 +725,7 @@ static int DOSFS_GetPathDrive( const char **name )
{ {
if ((drive = DRIVE_FindDriveRoot( name )) == -1) if ((drive = DRIVE_FindDriveRoot( name )) == -1)
{ {
MSG("Warning: %s not accessible from a DOS drive\n", *name ); MESSAGE("Warning: %s not accessible from a DOS drive\n", *name );
/* Assume it really was a DOS name */ /* Assume it really was a DOS name */
drive = DRIVE_GetCurrentDrive(); drive = DRIVE_GetCurrentDrive();
} }
@ -757,7 +757,7 @@ BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
UINT flags; UINT flags;
char *p_l, *p_s, *root; char *p_l, *p_s, *root;
TRACE(dosfs, "%s (last=%d)\n", TRACE_(dosfs)("%s (last=%d)\n",
name, check_last ); name, check_last );
if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE; if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
@ -870,7 +870,7 @@ BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
} }
if (!full->long_name[0]) strcpy( full->long_name, "/" ); if (!full->long_name[0]) strcpy( full->long_name, "/" );
if (!full->short_name[2]) strcpy( full->short_name + 2, "\\" ); if (!full->short_name[2]) strcpy( full->short_name + 2, "\\" );
TRACE(dosfs, "returning %s = %s\n", TRACE_(dosfs)("returning %s = %s\n",
full->long_name, full->short_name ); full->long_name, full->short_name );
return TRUE; return TRUE;
} }
@ -1070,7 +1070,7 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
char *endchar = buffer + sizeof(buffer) - 2; char *endchar = buffer + sizeof(buffer) - 2;
*endchar = '\0'; *endchar = '\0';
TRACE(dosfs, "converting '%s'\n", name ); TRACE_(dosfs)("converting '%s'\n", name );
if (!name || !result || ((drive = DOSFS_GetPathDrive( &name )) == -1) ) if (!name || !result || ((drive = DOSFS_GetPathDrive( &name )) == -1) )
{ SetLastError( ERROR_INVALID_PARAMETER ); { SetLastError( ERROR_INVALID_PARAMETER );
@ -1141,7 +1141,7 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
else else
lstrcpynA( result, buffer, len ); lstrcpynA( result, buffer, len );
TRACE(dosfs, "returning '%s'\n", buffer ); TRACE_(dosfs)("returning '%s'\n", buffer );
/* If the lpBuffer buffer is too small, the return value is the /* If the lpBuffer buffer is too small, the return value is the
size of the buffer, in characters, required to hold the path. */ size of the buffer, in characters, required to hold the path. */
@ -1275,7 +1275,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry )
lstrcpynA( p, long_name, sizeof(buffer) - (int)(p - buffer) ); lstrcpynA( p, long_name, sizeof(buffer) - (int)(p - buffer) );
if (!FILE_Stat( buffer, &fileinfo )) if (!FILE_Stat( buffer, &fileinfo ))
{ {
WARN(dosfs, "can't stat %s\n", buffer); WARN_(dosfs)("can't stat %s\n", buffer);
continue; continue;
} }
if (fileinfo.dwFileAttributes & ~attr) continue; if (fileinfo.dwFileAttributes & ~attr) continue;
@ -1297,7 +1297,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry )
lstrcpynA( entry->cFileName, long_name, sizeof(entry->cFileName) ); lstrcpynA( entry->cFileName, long_name, sizeof(entry->cFileName) );
if (!(flags & DRIVE_CASE_PRESERVING)) CharLowerA( entry->cFileName ); if (!(flags & DRIVE_CASE_PRESERVING)) CharLowerA( entry->cFileName );
TRACE(dosfs, "returning %s (%s) %02lx %ld\n", TRACE_(dosfs)("returning %s (%s) %02lx %ld\n",
entry->cFileName, entry->cAlternateFileName, entry->cFileName, entry->cAlternateFileName,
entry->dwFileAttributes, entry->nFileSizeLow ); entry->dwFileAttributes, entry->nFileSizeLow );
return 1; return 1;
@ -1862,7 +1862,7 @@ DWORD WINAPI QueryDosDeviceA(LPCSTR devname,LPSTR target,DWORD bufsize)
LPSTR s; LPSTR s;
char buffer[200]; char buffer[200];
TRACE(dosfs,"(%s,...)\n",devname?devname:"<null>"); TRACE_(dosfs)("(%s,...)\n",devname?devname:"<null>");
if (!devname) { if (!devname) {
/* return known MSDOS devices */ /* return known MSDOS devices */
lstrcpyA(buffer,"CON COM1 COM2 LPT1 NUL "); lstrcpyA(buffer,"CON COM1 COM2 LPT1 NUL ");
@ -1935,7 +1935,7 @@ BOOL WINAPI SystemTimeToFileTime( const SYSTEMTIME *syst, LPFILETIME ft )
} }
BOOL WINAPI DefineDosDeviceA(DWORD flags,LPCSTR devname,LPCSTR targetpath) { BOOL WINAPI DefineDosDeviceA(DWORD flags,LPCSTR devname,LPCSTR targetpath) {
FIXME(dosfs,"(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath); FIXME_(dosfs)("(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }

View File

@ -42,7 +42,7 @@
#include "msdos.h" #include "msdos.h"
#include "options.h" #include "options.h"
#include "task.h" #include "task.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosfs) DECLARE_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
@ -110,7 +110,7 @@ static DRIVETYPE DRIVE_GetDriveType( const char *name )
{ {
if (!strcasecmp( buffer, DRIVE_Types[i] )) return (DRIVETYPE)i; if (!strcasecmp( buffer, DRIVE_Types[i] )) return (DRIVETYPE)i;
} }
MSG("%s: unknown type '%s', defaulting to 'hd'.\n", name, buffer ); MESSAGE("%s: unknown type '%s', defaulting to 'hd'.\n", name, buffer );
return TYPE_HD; return TYPE_HD;
} }
@ -124,7 +124,7 @@ static UINT DRIVE_GetFSFlags( const char *name, const char *value )
for (descr = DRIVE_Filesystems; descr->name; descr++) for (descr = DRIVE_Filesystems; descr->name; descr++)
if (!strcasecmp( value, descr->name )) return descr->flags; if (!strcasecmp( value, descr->name )) return descr->flags;
MSG("%s: unknown filesystem type '%s', defaulting to 'win95'.\n", MESSAGE("%s: unknown filesystem type '%s', defaulting to 'win95'.\n",
name, value ); name, value );
return DRIVE_CASE_PRESERVING; return DRIVE_CASE_PRESERVING;
} }
@ -154,12 +154,12 @@ int DRIVE_Init(void)
if (stat( path, &drive_stat_buffer )) if (stat( path, &drive_stat_buffer ))
{ {
MSG("Could not stat %s, ignoring drive %c:\n", path, 'A' + i ); MESSAGE("Could not stat %s, ignoring drive %c:\n", path, 'A' + i );
continue; continue;
} }
if (!S_ISDIR(drive_stat_buffer.st_mode)) if (!S_ISDIR(drive_stat_buffer.st_mode))
{ {
MSG("%s is not a directory, ignoring drive %c:\n", MESSAGE("%s is not a directory, ignoring drive %c:\n",
path, 'A' + i ); path, 'A' + i );
continue; continue;
} }
@ -203,17 +203,17 @@ int DRIVE_Init(void)
DRIVE_CurDrive = i; DRIVE_CurDrive = i;
count++; count++;
TRACE(dosfs, "%s: path=%s type=%s label='%s' serial=%08lx flags=%08x dev=%x ino=%x\n", TRACE_(dosfs)("%s: path=%s type=%s label='%s' serial=%08lx flags=%08x dev=%x ino=%x\n",
name, path, DRIVE_Types[drive->type], name, path, DRIVE_Types[drive->type],
drive->label, drive->serial, drive->flags, drive->label, drive->serial, drive->flags,
(int)drive->dev, (int)drive->ino ); (int)drive->dev, (int)drive->ino );
} }
else WARN(dosfs, "%s: not defined\n", name ); else WARN_(dosfs)("%s: not defined\n", name );
} }
if (!count) if (!count)
{ {
MSG("Warning: no valid DOS drive found, check your configuration file.\n" ); MESSAGE("Warning: no valid DOS drive found, check your configuration file.\n" );
/* Create a C drive pointing to Unix root dir */ /* Create a C drive pointing to Unix root dir */
DOSDrives[2].root = HEAP_strdupA( SystemHeap, 0, "/" ); DOSDrives[2].root = HEAP_strdupA( SystemHeap, 0, "/" );
DOSDrives[2].dos_cwd = HEAP_strdupA( SystemHeap, 0, "" ); DOSDrives[2].dos_cwd = HEAP_strdupA( SystemHeap, 0, "" );
@ -275,7 +275,7 @@ int DRIVE_SetCurrentDrive( int drive )
SetLastError( ERROR_INVALID_DRIVE ); SetLastError( ERROR_INVALID_DRIVE );
return 0; return 0;
} }
TRACE(dosfs, "%c:\n", 'A' + drive ); TRACE_(dosfs)("%c:\n", 'A' + drive );
DRIVE_CurDrive = drive; DRIVE_CurDrive = drive;
if (pTask) pTask->curdrive = drive | 0x80; if (pTask) pTask->curdrive = drive | 0x80;
return 1; return 1;
@ -335,7 +335,7 @@ int DRIVE_FindDriveRoot( const char **path )
*next = 0; *next = 0;
if (rootdrive != -1) if (rootdrive != -1)
TRACE(dosfs, "%s -> drive %c:, root='%s', name='%s'\n", TRACE_(dosfs)("%s -> drive %c:, root='%s', name='%s'\n",
buffer, 'A' + rootdrive, buffer, 'A' + rootdrive,
DOSDrives[rootdrive].root, *path ); DOSDrives[rootdrive].root, *path );
return rootdrive; return rootdrive;
@ -458,7 +458,7 @@ int DRIVE_Chdir( int drive, const char *path )
strcpy( buffer, "A:" ); strcpy( buffer, "A:" );
buffer[0] += drive; buffer[0] += drive;
TRACE(dosfs, "(%c:,%s)\n", buffer[0], path ); TRACE_(dosfs)("(%c:,%s)\n", buffer[0], path );
lstrcpynA( buffer + 2, path, sizeof(buffer) - 2 ); lstrcpynA( buffer + 2, path, sizeof(buffer) - 2 );
if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0; if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0;
@ -471,7 +471,7 @@ int DRIVE_Chdir( int drive, const char *path )
unix_cwd = full_name.long_name + strlen( DOSDrives[drive].root ); unix_cwd = full_name.long_name + strlen( DOSDrives[drive].root );
while (*unix_cwd == '/') unix_cwd++; while (*unix_cwd == '/') unix_cwd++;
TRACE(dosfs, "(%c:): unix_cwd=%s dos_cwd=%s\n", TRACE_(dosfs)("(%c:): unix_cwd=%s dos_cwd=%s\n",
'A' + drive, unix_cwd, full_name.short_name + 3 ); 'A' + drive, unix_cwd, full_name.short_name + 3 );
HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd ); HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd );
@ -544,7 +544,7 @@ int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive )
if ( new->root ) if ( new->root )
{ {
TRACE(dosfs, "Can\'t map drive %c to drive %c - " TRACE_(dosfs)("Can\'t map drive %c to drive %c - "
"drive %c already exists\n", "drive %c already exists\n",
'A' + existing_drive, 'A' + new_drive, 'A' + existing_drive, 'A' + new_drive,
'A' + new_drive ); 'A' + new_drive );
@ -564,7 +564,7 @@ int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive )
new->dev = old->dev; new->dev = old->dev;
new->ino = old->ino; new->ino = old->ino;
TRACE(dosfs, "Drive %c is now equal to drive %c\n", TRACE_(dosfs)("Drive %c is now equal to drive %c\n",
'A' + new_drive, 'A' + existing_drive ); 'A' + new_drive, 'A' + existing_drive );
return 1; return 1;
@ -661,7 +661,7 @@ static int DRIVE_GetFreeSpace( int drive, PULARGE_INTEGER size,
#endif #endif
{ {
FILE_SetDosError(); FILE_SetDosError();
WARN(dosfs, "cannot do statfs(%s)\n", DOSDrives[drive].root); WARN_(dosfs)("cannot do statfs(%s)\n", DOSDrives[drive].root);
return 0; return 0;
} }
@ -824,7 +824,7 @@ BOOL WINAPI GetDiskFreeSpaceExA( LPCSTR root,
{ {
if ((root[1]) && ((root[1] != ':') || (root[2] != '\\'))) if ((root[1]) && ((root[1] != ':') || (root[2] != '\\')))
{ {
WARN(dosfs, "invalid root '%s'\n", root ); WARN_(dosfs)("invalid root '%s'\n", root );
return FALSE; return FALSE;
} }
drive = toupper(root[0]) - 'A'; drive = toupper(root[0]) - 'A';
@ -872,7 +872,7 @@ BOOL WINAPI GetDiskFreeSpaceExW( LPCWSTR root, PULARGE_INTEGER avail,
UINT16 WINAPI GetDriveType16( UINT16 WINAPI GetDriveType16(
UINT16 drive /* [in] number (NOT letter) of drive */ UINT16 drive /* [in] number (NOT letter) of drive */
) { ) {
TRACE(dosfs, "(%c:)\n", 'A' + drive ); TRACE_(dosfs)("(%c:)\n", 'A' + drive );
switch(DRIVE_GetType(drive)) switch(DRIVE_GetType(drive))
{ {
case TYPE_FLOPPY: return DRIVE_REMOVABLE; case TYPE_FLOPPY: return DRIVE_REMOVABLE;
@ -917,14 +917,14 @@ UINT16 WINAPI GetDriveType16(
UINT WINAPI GetDriveTypeA(LPCSTR root /* String describing drive */) UINT WINAPI GetDriveTypeA(LPCSTR root /* String describing drive */)
{ {
int drive; int drive;
TRACE(dosfs, "(%s)\n", debugstr_a(root)); TRACE_(dosfs)("(%s)\n", debugstr_a(root));
if (NULL == root) drive = DRIVE_GetCurrentDrive(); if (NULL == root) drive = DRIVE_GetCurrentDrive();
else else
{ {
if ((root[1]) && (root[1] != ':')) if ((root[1]) && (root[1] != ':'))
{ {
WARN(dosfs, "invalid root '%s'\n", debugstr_a(root)); WARN_(dosfs)("invalid root '%s'\n", debugstr_a(root));
return DRIVE_DOESNOTEXIST; return DRIVE_DOESNOTEXIST;
} }
drive = toupper(root[0]) - 'A'; drive = toupper(root[0]) - 'A';
@ -1015,7 +1015,7 @@ BOOL WINAPI SetCurrentDirectoryA( LPCSTR dir )
int olddrive, drive = DRIVE_GetCurrentDrive(); int olddrive, drive = DRIVE_GetCurrentDrive();
if (!dir) { if (!dir) {
ERR(file,"(NULL)!\n"); ERR_(file)("(NULL)!\n");
return FALSE; return FALSE;
} }
if (dir[0] && (dir[1]==':')) if (dir[0] && (dir[1]==':'))
@ -1134,7 +1134,7 @@ BOOL WINAPI GetVolumeInformationA( LPCSTR root, LPSTR label,
{ {
if ((root[1]) && (root[1] != ':')) if ((root[1]) && (root[1] != ':'))
{ {
WARN(dosfs, "invalid root '%s'\n",root); WARN_(dosfs)("invalid root '%s'\n",root);
return FALSE; return FALSE;
} }
drive = toupper(root[0]) - 'A'; drive = toupper(root[0]) - 'A';
@ -1203,6 +1203,6 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label,
} }
BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname) { BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname) {
FIXME(dosfs,"(%s,%s),stub!\n",rootpath,volname); FIXME_(dosfs)("(%s,%s),stub!\n",rootpath,volname);
return TRUE; return TRUE;
} }

View File

@ -5,7 +5,7 @@
*/ */
#include "dc.h" #include "dc.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(bitblt) DECLARE_DEBUG_CHANNEL(bitblt)
DECLARE_DEBUG_CHANNEL(bitmap) DECLARE_DEBUG_CHANNEL(bitmap)
@ -21,7 +21,7 @@ BOOL16 WINAPI PatBlt16( HDC16 hdc, INT16 left, INT16 top,
DC * dc = DC_GetDCPtr( hdc ); DC * dc = DC_GetDCPtr( hdc );
if (!dc || !dc->funcs->pPatBlt) return FALSE; if (!dc || !dc->funcs->pPatBlt) return FALSE;
TRACE(bitblt, "%04x %d,%d %dx%d %06lx\n", TRACE_(bitblt)("%04x %d,%d %dx%d %06lx\n",
hdc, left, top, width, height, rop ); hdc, left, top, width, height, rop );
return dc->funcs->pPatBlt( dc, left, top, width, height, rop ); return dc->funcs->pPatBlt( dc, left, top, width, height, rop );
} }
@ -36,7 +36,7 @@ BOOL WINAPI PatBlt( HDC hdc, INT left, INT top,
DC * dc = DC_GetDCPtr( hdc ); DC * dc = DC_GetDCPtr( hdc );
if (!dc || !dc->funcs->pPatBlt) return FALSE; if (!dc || !dc->funcs->pPatBlt) return FALSE;
TRACE(bitblt, "%04x %d,%d %dx%d %06lx\n", TRACE_(bitblt)("%04x %d,%d %dx%d %06lx\n",
hdc, left, top, width, height, rop ); hdc, left, top, width, height, rop );
return dc->funcs->pPatBlt( dc, left, top, width, height, rop ); return dc->funcs->pPatBlt( dc, left, top, width, height, rop );
} }
@ -55,7 +55,7 @@ BOOL16 WINAPI BitBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst, INT16 width,
if (!dcDst->funcs->pBitBlt) return FALSE; if (!dcDst->funcs->pBitBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE(bitblt, "hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n", TRACE_(bitblt)("hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop); hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height, return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height,
@ -76,7 +76,7 @@ BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width,
if (!dcDst->funcs->pBitBlt) return FALSE; if (!dcDst->funcs->pBitBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE(bitblt, "hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n", TRACE_(bitblt)("hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop); hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height, return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height,
@ -98,7 +98,7 @@ BOOL16 WINAPI StretchBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst,
if (!dcDst->funcs->pStretchBlt) return FALSE; if (!dcDst->funcs->pStretchBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE(bitblt, "%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n", TRACE_(bitblt)("%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, widthSrc, heightSrc, hdcSrc, xSrc, ySrc, widthSrc, heightSrc,
dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst,
widthDst, heightDst, dcDst->w.bitsPerPixel, rop ); widthDst, heightDst, dcDst->w.bitsPerPixel, rop );
@ -122,7 +122,7 @@ BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst,
if (!dcDst->funcs->pStretchBlt) return FALSE; if (!dcDst->funcs->pStretchBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE(bitblt, "%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n", TRACE_(bitblt)("%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, widthSrc, heightSrc, hdcSrc, xSrc, ySrc, widthSrc, heightSrc,
dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst,
widthDst, heightDst, dcDst->w.bitsPerPixel, rop ); widthDst, heightDst, dcDst->w.bitsPerPixel, rop );
@ -158,7 +158,7 @@ BOOL WINAPI MaskBlt(HDC hdcDest, INT nXDest, INT nYDest,
INT nXSrc, INT nYSrc, HBITMAP hbmMask, INT nXSrc, INT nYSrc, HBITMAP hbmMask,
INT xMask, INT yMask, DWORD dwRop) INT xMask, INT yMask, DWORD dwRop)
{ {
FIXME(bitmap, "(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%ld): stub\n", FIXME_(bitmap)("(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%ld): stub\n",
hdcDest,nXDest,nYDest,nWidth,nHeight,hdcSource,nXSrc,nYSrc, hdcDest,nXDest,nYDest,nWidth,nHeight,hdcSource,nXSrc,nYSrc,
hbmMask,xMask,yMask,dwRop); hbmMask,xMask,yMask,dwRop);
return 1; return 1;
@ -172,7 +172,7 @@ BOOL WINAPI PlgBlt( HDC hdcDest, const POINT *lpPoint,
HDC hdcSrc, INT nXDest, INT nYDest, INT nWidth, HDC hdcSrc, INT nXDest, INT nYDest, INT nWidth,
INT nHeight, HBITMAP hbmMask, INT xMask, INT yMask) INT nHeight, HBITMAP hbmMask, INT xMask, INT yMask)
{ {
FIXME(gdi, "PlgBlt, stub\n"); FIXME_(gdi)("PlgBlt, stub\n");
return 1; return 1;
} }

View File

@ -7,7 +7,7 @@
#include <string.h> #include <string.h>
#include "gdi.h" #include "gdi.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(driver) DECLARE_DEBUG_CHANNEL(driver)
DECLARE_DEBUG_CHANNEL(gdi) DECLARE_DEBUG_CHANNEL(gdi)
@ -40,7 +40,7 @@ BOOL DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs )
/* No name -> it's the generic driver */ /* No name -> it's the generic driver */
if (genericDriver) if (genericDriver)
{ {
WARN(driver, " already a generic driver\n" ); WARN_(driver)(" already a generic driver\n" );
HeapFree( SystemHeap, 0, driver ); HeapFree( SystemHeap, 0, driver );
return FALSE; return FALSE;
} }
@ -107,7 +107,7 @@ BOOL DRIVER_UnregisterDriver( LPCSTR name )
INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd, INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd,
LPSTR lpModelName, LPSTR OldPort, LPSTR NewPort ) LPSTR lpModelName, LPSTR OldPort, LPSTR NewPort )
{ {
FIXME( gdi, "(%p, %04x, %s, %s, %s)\n", FIXME_(gdi)("(%p, %04x, %s, %s, %s)\n",
lpfnDevInstallProc, hWnd, lpModelName, OldPort, NewPort ); lpfnDevInstallProc, hWnd, lpModelName, OldPort, NewPort );
return -1; return -1;
} }
@ -132,7 +132,7 @@ INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd,
INT WINAPI GDI_CallExtDeviceModePropSheet16( HWND hWnd, LPCSTR lpszDevice, INT WINAPI GDI_CallExtDeviceModePropSheet16( HWND hWnd, LPCSTR lpszDevice,
LPCSTR lpszPort, LPVOID lpPropSheet ) LPCSTR lpszPort, LPVOID lpPropSheet )
{ {
FIXME( gdi, "(%04x, %s, %s, %p)\n", FIXME_(gdi)("(%04x, %s, %s, %p)\n",
hWnd, lpszDevice, lpszPort, lpPropSheet ); hWnd, lpszDevice, lpszPort, lpPropSheet );
return -1; return -1;
} }
@ -148,7 +148,7 @@ INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd,
LPSTR lpszPort, LPDEVMODE16 lpdmInput, LPSTR lpszPort, LPDEVMODE16 lpdmInput,
LPSTR lpszProfile, DWORD fwMode ) LPSTR lpszProfile, DWORD fwMode )
{ {
FIXME( gdi, "(%04x, %p, %s, %s, %p, %s, %ld)\n", FIXME_(gdi)("(%04x, %p, %s, %s, %p, %s, %ld)\n",
hwnd, lpdmOutput, lpszDevice, lpszPort, hwnd, lpdmOutput, lpszDevice, lpszPort,
lpdmInput, lpszProfile, fwMode ); lpdmInput, lpszProfile, fwMode );
return -1; return -1;
@ -163,7 +163,7 @@ INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd,
INT WINAPI GDI_CallAdvancedSetupDialog16( HWND hwnd, LPSTR lpszDevice, INT WINAPI GDI_CallAdvancedSetupDialog16( HWND hwnd, LPSTR lpszDevice,
LPDEVMODE16 devin, LPDEVMODE16 devout ) LPDEVMODE16 devin, LPDEVMODE16 devout )
{ {
FIXME( gdi, "(%04x, %s, %p, %p)\n", FIXME_(gdi)("(%04x, %s, %p, %p)\n",
hwnd, lpszDevice, devin, devout ); hwnd, lpszDevice, devin, devout );
return -1; return -1;
} }
@ -178,7 +178,7 @@ DWORD WINAPI GDI_CallDeviceCapabilities16( LPSTR lpszDevice, LPSTR lpszPort,
DWORD fwCapability, LPSTR lpszOutput, DWORD fwCapability, LPSTR lpszOutput,
LPDEVMODE16 lpdm ) LPDEVMODE16 lpdm )
{ {
FIXME( gdi, "(%s, %s, %ld, %p, %p)\n", FIXME_(gdi)("(%s, %s, %ld, %p, %p)\n",
lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm ); lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm );
return -1L; return -1L;
} }

View File

@ -10,10 +10,9 @@
#include "heap.h" #include "heap.h"
#include "ldt.h" #include "ldt.h"
#include "dc.h" #include "dc.h"
#include <debug.h> #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(driver) DEFAULT_DEBUG_CHANNEL(driver)
DECLARE_DEBUG_CHANNEL(gdi)
INT16 WINAPI Escape16( HDC16 hdc, INT16 nEscape, INT16 cbInput, INT16 WINAPI Escape16( HDC16 hdc, INT16 nEscape, INT16 cbInput,
@ -99,7 +98,7 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
switch(nEscape) { switch(nEscape) {
case QUERYESCSUPPORT: case QUERYESCSUPPORT:
if (ret) if (ret)
TRACE(driver,"target DC implements Escape %d\n",nEscape); TRACE("target DC implements Escape %d\n",nEscape);
SEGPTR_FREE(PTR_SEG_TO_LIN(segin)); SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
break; break;
case GETSCALINGFACTOR: case GETSCALINGFACTOR:
@ -159,7 +158,7 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
INT WINAPI ExtEscape( HDC hdc, INT nEscape, INT cbInput, INT WINAPI ExtEscape( HDC hdc, INT nEscape, INT cbInput,
LPCSTR lpszInData, INT cbOutput, LPSTR lpszOutData ) LPCSTR lpszInData, INT cbOutput, LPSTR lpszOutData )
{ {
FIXME(driver,"(0x%04x,0x%x,%d,%s,%d,%p):stub\n", FIXME("(0x%04x,0x%x,%d,%s,%d,%p):stub\n",
hdc,nEscape,cbInput,debugstr_a(lpszInData),cbOutput,lpszOutData); hdc,nEscape,cbInput,debugstr_a(lpszInData),cbOutput,lpszOutData);
return 0; return 0;
} }
@ -171,6 +170,6 @@ INT WINAPI ExtEscape( HDC hdc, INT nEscape, INT cbInput,
*/ */
INT WINAPI DrawEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData) INT WINAPI DrawEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData)
{ {
FIXME(gdi, "DrawEscape, stub\n"); FIXME("DrawEscape, stub\n");
return 0; return 0;
} }

View File

@ -11,7 +11,7 @@
#include "font.h" #include "font.h"
#include "metafiledrv.h" #include "metafiledrv.h"
#include "pen.h" #include "pen.h"
#include "debug.h" #include "debugtools.h"
#include "heap.h" #include "heap.h"
DECLARE_DEBUG_CHANNEL(gdi) DECLARE_DEBUG_CHANNEL(gdi)
@ -65,7 +65,7 @@ INT16 MFDRV_CreateBrushIndirect(DC *dc, HBRUSH hBrush )
GetObjectA(brushObj->logbrush.lbHatch, sizeof(bm), &bm); GetObjectA(brushObj->logbrush.lbHatch, sizeof(bm), &bm);
if(bm.bmBitsPixel != 1 || bm.bmPlanes != 1) { if(bm.bmBitsPixel != 1 || bm.bmPlanes != 1) {
FIXME(metafile, "Trying to store a colour pattern brush\n"); FIXME_(metafile)("Trying to store a colour pattern brush\n");
return FALSE; return FALSE;
} }
@ -121,7 +121,7 @@ INT16 MFDRV_CreateBrushIndirect(DC *dc, HBRUSH hBrush )
break; break;
} }
default: default:
FIXME(metafile, "Unkonwn brush style %x\n", FIXME_(metafile)("Unkonwn brush style %x\n",
brushObj->logbrush.lbStyle); brushObj->logbrush.lbStyle);
return -1; return -1;
} }
@ -239,7 +239,7 @@ HGDIOBJ MFDRV_SelectObject( DC *dc, HGDIOBJ handle )
HGDIOBJ ret = 0; HGDIOBJ ret = 0;
if (!ptr) return 0; if (!ptr) return 0;
TRACE(gdi, "hdc=%04x %04x\n", dc->hSelf, handle ); TRACE_(gdi)("hdc=%04x %04x\n", dc->hSelf, handle );
switch(ptr->wMagic) switch(ptr->wMagic)
{ {

View File

@ -14,7 +14,7 @@
#include "windef.h" #include "windef.h"
#include "bitmap.h" #include "bitmap.h"
#include "x11drv.h" #include "x11drv.h"
#include "debug.h" #include "debugtools.h"
#include "dc.h" #include "dc.h"
#include "color.h" #include "color.h"
#include "callback.h" #include "callback.h"
@ -64,7 +64,7 @@ int X11DRV_DIB_GetXImageWidthBytes( int width, int depth )
if( bitmapDepthTable[i] == depth ) if( bitmapDepthTable[i] == depth )
return (4 * ((width * ximageDepthTable[i] + 31)/32)); return (4 * ((width * ximageDepthTable[i] + 31)/32));
WARN(bitmap, "(%d): Unsupported depth\n", depth ); WARN_(bitmap)("(%d): Unsupported depth\n", depth );
return (4 * width); return (4 * width);
} }
@ -96,7 +96,7 @@ int *X11DRV_DIB_BuildColorMap( DC *dc, WORD coloruse, WORD depth,
if (colors > 256) if (colors > 256)
{ {
ERR(bitmap, "called with >256 colors!\n"); ERR_(bitmap)("called with >256 colors!\n");
return NULL; return NULL;
} }
@ -157,7 +157,7 @@ int X11DRV_DIB_MapColor( int *physMap, int nPhysMap, int phys )
if (physMap[color] == phys) if (physMap[color] == phys)
return color; return color;
WARN(bitmap, "Strange color %08x\n", phys); WARN_(bitmap)("Strange color %08x\n", phys);
return 0; return 0;
} }
@ -392,7 +392,7 @@ static void X11DRV_DIB_SetImageBits_RLE4( int lines, const BYTE *bits,
case 2: /* delta */ case 2: /* delta */
x += *bits++; x += *bits++;
if(x >= width) { if(x >= width) {
FIXME(x11drv, "x-delta is too large?\n"); FIXME_(x11drv)("x-delta is too large?\n");
return; return;
} }
lines -= *bits++; lines -= *bits++;
@ -627,7 +627,7 @@ static void X11DRV_DIB_SetImageBits_RLE8( int lines, const BYTE *bits,
line -= (*pIn++); line -= (*pIn++);
if (line == 0) if (line == 0)
{ {
TRACE(bitmap, "Delta to last line of bitmap " TRACE_(bitmap)("Delta to last line of bitmap "
"(wrongly?) causes loop exit\n"); "(wrongly?) causes loop exit\n");
} }
break; break;
@ -672,7 +672,7 @@ static void X11DRV_DIB_SetImageBits_RLE8( int lines, const BYTE *bits,
*/ */
if ( (*(pIn-2) != 0/*escape*/) || (*(pIn-1)!= RleEnd) ) if ( (*(pIn-2) != 0/*escape*/) || (*(pIn-1)!= RleEnd) )
{ {
TRACE(bitmap, "End-of-bitmap " TRACE_(bitmap)("End-of-bitmap "
"without (strictly) proper escape code. Last two " "without (strictly) proper escape code. Last two "
"bytes were: %02X %02X.\n", "bytes were: %02X %02X.\n",
(int)*(pIn-2), (int)*(pIn-2),
@ -1253,7 +1253,7 @@ int X11DRV_DIB_SetImageBits( const X11DRV_DIB_SETIMAGEBITS_DESCR *descr )
descr->xSrc, descr->dc, bmpImage); descr->xSrc, descr->dc, bmpImage);
break; break;
default: default:
WARN(bitmap, "(%d): Invalid depth\n", descr->infoBpp ); WARN_(bitmap)("(%d): Invalid depth\n", descr->infoBpp );
break; break;
} }
@ -1294,12 +1294,12 @@ int X11DRV_DIB_GetImageBits( const X11DRV_DIB_SETIMAGEBITS_DESCR *descr )
switch(descr->infoBpp) switch(descr->infoBpp)
{ {
case 1: case 1:
FIXME(bitmap, "Depth 1 not yet supported!\n"); FIXME_(bitmap)("Depth 1 not yet supported!\n");
break; break;
case 4: case 4:
if (descr->compression) if (descr->compression)
FIXME(bitmap, "Compression not yet supported!\n"); FIXME_(bitmap)("Compression not yet supported!\n");
else else
X11DRV_DIB_GetImageBits_4( descr->lines, X11DRV_DIB_GetImageBits_4( descr->lines,
(LPVOID)descr->bits, descr->infoWidth, (LPVOID)descr->bits, descr->infoWidth,
@ -1310,7 +1310,7 @@ int X11DRV_DIB_GetImageBits( const X11DRV_DIB_SETIMAGEBITS_DESCR *descr )
case 8: case 8:
if (descr->compression) if (descr->compression)
FIXME(bitmap, "Compression not yet supported!\n"); FIXME_(bitmap)("Compression not yet supported!\n");
else else
X11DRV_DIB_GetImageBits_8( descr->lines, (LPVOID)descr->bits, X11DRV_DIB_GetImageBits_8( descr->lines, (LPVOID)descr->bits,
descr->infoWidth, descr->width, descr->infoWidth, descr->width,
@ -1338,7 +1338,7 @@ int X11DRV_DIB_GetImageBits( const X11DRV_DIB_SETIMAGEBITS_DESCR *descr )
break; break;
default: default:
WARN(bitmap, "(%d): Invalid depth\n", descr->infoBpp ); WARN_(bitmap)("(%d): Invalid depth\n", descr->infoBpp );
break; break;
} }
@ -1523,7 +1523,7 @@ INT X11DRV_DIB_GetDIBits(
BYTE *bbits = (BYTE*)bits, *linestart; BYTE *bbits = (BYTE*)bits, *linestart;
int dstwidth, yend, xend = bmp->bitmap.bmWidth; int dstwidth, yend, xend = bmp->bitmap.bmWidth;
TRACE(bitmap, "%u scanlines of (%i,%i) -> (%i,%i) starting from %u\n", TRACE_(bitmap)("%u scanlines of (%i,%i) -> (%i,%i) starting from %u\n",
lines, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, lines, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
(int)info->bmiHeader.biWidth, (int)info->bmiHeader.biHeight, (int)info->bmiHeader.biWidth, (int)info->bmiHeader.biHeight,
startscan ); startscan );
@ -1648,7 +1648,7 @@ INT X11DRV_DIB_GetDIBits(
break; break;
default: /* ? bit bmp -> 4 bit DIB */ default: /* ? bit bmp -> 4 bit DIB */
FIXME(bitmap, "4 bit DIB %d bit bitmap\n", FIXME_(bitmap)("4 bit DIB %d bit bitmap\n",
bmp->bitmap.bmBitsPixel); bmp->bitmap.bmBitsPixel);
break; break;
} }
@ -1700,7 +1700,7 @@ INT X11DRV_DIB_GetDIBits(
break; break;
default: /* ? bit bmp -> 8 bit DIB */ default: /* ? bit bmp -> 8 bit DIB */
FIXME(bitmap, "8 bit DIB %d bit bitmap\n", FIXME_(bitmap)("8 bit DIB %d bit bitmap\n",
bmp->bitmap.bmBitsPixel); bmp->bitmap.bmBitsPixel);
break; break;
} }
@ -1754,7 +1754,7 @@ INT X11DRV_DIB_GetDIBits(
break; break;
default: /* ? bit bmp -> 16 bit DIB */ default: /* ? bit bmp -> 16 bit DIB */
FIXME(bitmap, "15/16 bit DIB %d bit bitmap\n", FIXME_(bitmap)("15/16 bit DIB %d bit bitmap\n",
bmp->bitmap.bmBitsPixel); bmp->bitmap.bmBitsPixel);
break; break;
} }
@ -1809,7 +1809,7 @@ INT X11DRV_DIB_GetDIBits(
break; break;
default: /* ? bit bmp -> 24 bit DIB */ default: /* ? bit bmp -> 24 bit DIB */
FIXME(bitmap, "24 bit DIB %d bit bitmap\n", FIXME_(bitmap)("24 bit DIB %d bit bitmap\n",
bmp->bitmap.bmBitsPixel); bmp->bitmap.bmBitsPixel);
break; break;
} }
@ -1867,7 +1867,7 @@ INT X11DRV_DIB_GetDIBits(
break; break;
default: /* ? bit bmp -> 32 bit DIB */ default: /* ? bit bmp -> 32 bit DIB */
FIXME(bitmap, "32 bit DIB %d bit bitmap\n", FIXME_(bitmap)("32 bit DIB %d bit bitmap\n",
bmp->bitmap.bmBitsPixel); bmp->bitmap.bmBitsPixel);
break; break;
} }
@ -1875,7 +1875,7 @@ INT X11DRV_DIB_GetDIBits(
default: /* ? bit DIB */ default: /* ? bit DIB */
FIXME(bitmap,"Unsupported DIB depth %d\n", FIXME_(bitmap)("Unsupported DIB depth %d\n",
info->bmiHeader.biBitCount); info->bmiHeader.biBitCount);
break; break;
} }
@ -1890,7 +1890,7 @@ INT X11DRV_DIB_GetDIBits(
info->bmiHeader.biBitCount ); info->bmiHeader.biBitCount );
if(bbits - (BYTE *)bits > info->bmiHeader.biSizeImage) if(bbits - (BYTE *)bits > info->bmiHeader.biSizeImage)
ERR(bitmap, "Buffer overrun. Please investigate.\n"); ERR_(bitmap)("Buffer overrun. Please investigate.\n");
info->bmiHeader.biCompression = 0; info->bmiHeader.biCompression = 0;
@ -1912,7 +1912,7 @@ static void X11DRV_DIB_DoProtectDIBSection( BITMAPOBJ *bmp, DWORD new_prot )
DWORD old_prot; DWORD old_prot;
VirtualProtect(dib->dsBm.bmBits, totalSize, new_prot, &old_prot); VirtualProtect(dib->dsBm.bmBits, totalSize, new_prot, &old_prot);
TRACE(bitmap, "Changed protection from %ld to %ld\n", TRACE_(bitmap)("Changed protection from %ld to %ld\n",
old_prot, new_prot); old_prot, new_prot);
} }
@ -1947,14 +1947,14 @@ static void X11DRV_DIB_DoUpdateDIBSection(BITMAPOBJ *bmp, BOOL toDIB)
if (toDIB) if (toDIB)
{ {
TRACE(bitmap, "Copying from Pixmap to DIB bits\n"); TRACE_(bitmap)("Copying from Pixmap to DIB bits\n");
EnterCriticalSection( &X11DRV_CritSection ); EnterCriticalSection( &X11DRV_CritSection );
CALL_LARGE_STACK( X11DRV_DIB_GetImageBits, &descr ); CALL_LARGE_STACK( X11DRV_DIB_GetImageBits, &descr );
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
} }
else else
{ {
TRACE(bitmap, "Copying from DIB bits to Pixmap\n"); TRACE_(bitmap)("Copying from DIB bits to Pixmap\n");
EnterCriticalSection( &X11DRV_CritSection ); EnterCriticalSection( &X11DRV_CritSection );
CALL_LARGE_STACK( X11DRV_DIB_SetImageBits, &descr ); CALL_LARGE_STACK( X11DRV_DIB_SetImageBits, &descr );
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
@ -1976,7 +1976,7 @@ static BOOL X11DRV_DIB_FaultHandler( LPVOID res, LPCVOID addr )
switch (((X11DRV_DIBSECTION *) bmp->dib)->status) switch (((X11DRV_DIBSECTION *) bmp->dib)->status)
{ {
case X11DRV_DIB_GdiMod: case X11DRV_DIB_GdiMod:
TRACE( bitmap, "called in status DIB_GdiMod\n" ); TRACE_(bitmap)("called in status DIB_GdiMod\n" );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
X11DRV_DIB_DoUpdateDIBSection( bmp, TRUE ); X11DRV_DIB_DoUpdateDIBSection( bmp, TRUE );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
@ -1985,19 +1985,19 @@ static BOOL X11DRV_DIB_FaultHandler( LPVOID res, LPCVOID addr )
break; break;
case X11DRV_DIB_InSync: case X11DRV_DIB_InSync:
TRACE( bitmap, "called in status X11DRV_DIB_InSync\n" ); TRACE_(bitmap)("called in status X11DRV_DIB_InSync\n" );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_AppMod; ((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_AppMod;
handled = TRUE; handled = TRUE;
break; break;
case X11DRV_DIB_AppMod: case X11DRV_DIB_AppMod:
FIXME( bitmap, "called in status X11DRV_DIB_AppMod: " FIXME_(bitmap)("called in status X11DRV_DIB_AppMod: "
"this can't happen!\n" ); "this can't happen!\n" );
break; break;
case X11DRV_DIB_NoHandler: case X11DRV_DIB_NoHandler:
FIXME( bitmap, "called in status DIB_NoHandler: " FIXME_(bitmap)("called in status DIB_NoHandler: "
"this can't happen!\n" ); "this can't happen!\n" );
break; break;
} }
@ -2039,17 +2039,17 @@ void X11DRV_DIB_UpdateDIBSection(DC *dc, BOOL toDIB)
break; break;
case X11DRV_DIB_GdiMod: case X11DRV_DIB_GdiMod:
TRACE( bitmap, "fromDIB called in status X11DRV_DIB_GdiMod\n" ); TRACE_(bitmap)("fromDIB called in status X11DRV_DIB_GdiMod\n" );
/* nothing to do */ /* nothing to do */
break; break;
case X11DRV_DIB_InSync: case X11DRV_DIB_InSync:
TRACE( bitmap, "fromDIB called in status X11DRV_DIB_InSync\n" ); TRACE_(bitmap)("fromDIB called in status X11DRV_DIB_InSync\n" );
/* nothing to do */ /* nothing to do */
break; break;
case X11DRV_DIB_AppMod: case X11DRV_DIB_AppMod:
TRACE( bitmap, "fromDIB called in status X11DRV_DIB_AppMod\n" ); TRACE_(bitmap)("fromDIB called in status X11DRV_DIB_AppMod\n" );
X11DRV_DIB_DoUpdateDIBSection( bmp, FALSE ); X11DRV_DIB_DoUpdateDIBSection( bmp, FALSE );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_InSync; ((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_InSync;
@ -2068,18 +2068,18 @@ void X11DRV_DIB_UpdateDIBSection(DC *dc, BOOL toDIB)
break; break;
case X11DRV_DIB_GdiMod: case X11DRV_DIB_GdiMod:
TRACE( bitmap, " toDIB called in status X11DRV_DIB_GdiMod\n" ); TRACE_(bitmap)(" toDIB called in status X11DRV_DIB_GdiMod\n" );
/* nothing to do */ /* nothing to do */
break; break;
case X11DRV_DIB_InSync: case X11DRV_DIB_InSync:
TRACE( bitmap, " toDIB called in status X11DRV_DIB_InSync\n" ); TRACE_(bitmap)(" toDIB called in status X11DRV_DIB_InSync\n" );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_NOACCESS ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_NOACCESS );
((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_GdiMod; ((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_GdiMod;
break; break;
case X11DRV_DIB_AppMod: case X11DRV_DIB_AppMod:
FIXME( bitmap, " toDIB called in status X11DRV_DIB_AppMod: " FIXME_(bitmap)(" toDIB called in status X11DRV_DIB_AppMod: "
"this can't happen!\n" ); "this can't happen!\n" );
break; break;
} }
@ -2147,7 +2147,7 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
INT effHeight, totalSize; INT effHeight, totalSize;
BITMAP bm; BITMAP bm;
TRACE(bitmap, "format (%ld,%ld), planes %d, bpp %d, size %ld, colors %ld (%s)\n", TRACE_(bitmap)("format (%ld,%ld), planes %d, bpp %d, size %ld, colors %ld (%s)\n",
bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount, bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount,
bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB"); bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB");
@ -2220,7 +2220,7 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
/* Clean up in case of errors */ /* Clean up in case of errors */
if (!res || !bmp || !dib || !bm.bmBits || (bm.bmBitsPixel <= 8 && !colorMap)) if (!res || !bmp || !dib || !bm.bmBits || (bm.bmBitsPixel <= 8 && !colorMap))
{ {
TRACE(bitmap, "got an error res=%08x, bmp=%p, dib=%p, bm.bmBits=%p\n", TRACE_(bitmap)("got an error res=%08x, bmp=%p, dib=%p, bm.bmBits=%p\n",
res, bmp, dib, bm.bmBits); res, bmp, dib, bm.bmBits);
if (bm.bmBits) if (bm.bmBits)
{ {

View File

@ -25,7 +25,7 @@ typedef unsigned long Pixel;
#include "callback.h" #include "callback.h"
#include "color.h" #include "color.h"
#include "cursoricon.h" #include "cursoricon.h"
#include "debug.h" #include "debugtools.h"
#include "gdi.h" #include "gdi.h"
#include "heap.h" #include "heap.h"
#include "local.h" #include "local.h"
@ -422,7 +422,7 @@ static BOOL OBM_CreateBitmaps( OBM_BITMAP_DESCR *descr )
} }
else return TRUE; else return TRUE;
#else /* defined(HAVE_LIBXXPM) */ #else /* defined(HAVE_LIBXXPM) */
FIXME(x11drv, FIXME_(x11drv)(
"Xpm support not in the binary, " "Xpm support not in the binary, "
"please install Xpm and recompile\n" "please install Xpm and recompile\n"
); );
@ -451,7 +451,7 @@ static HBITMAP16 OBM_LoadBitmap( WORD id )
if (!CALL_LARGE_STACK( OBM_CreateBitmaps, &descr )) if (!CALL_LARGE_STACK( OBM_CreateBitmaps, &descr ))
{ {
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
WARN(bitmap, "Error creating OEM bitmap %d\n", OBM_FIRST+id ); WARN_(bitmap)("Error creating OEM bitmap %d\n", OBM_FIRST+id );
return 0; return 0;
} }
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
@ -503,7 +503,7 @@ static HGLOBAL16 OBM_LoadCursorIcon( WORD id, BOOL fCursor )
if (!CALL_LARGE_STACK( OBM_CreateBitmaps, &descr )) if (!CALL_LARGE_STACK( OBM_CreateBitmaps, &descr ))
{ {
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
WARN(cursor, "Error creating OEM cursor/icon %d\n", id ); WARN_(cursor)("Error creating OEM cursor/icon %d\n", id );
return 0; return 0;
} }
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
@ -585,7 +585,7 @@ HANDLE X11DRV_LoadOEMResource(WORD resid, WORD type)
return OBM_LoadCursorIcon(resid, FALSE); return OBM_LoadCursorIcon(resid, FALSE);
default: default:
ERR(x11drv, "Unknown type\n"); ERR_(x11drv)("Unknown type\n");
} }
return 0; return 0;
} }

View File

@ -23,7 +23,7 @@
#include "flatthunk.h" #include "flatthunk.h"
#include "mouse.h" #include "mouse.h"
#include "keyboard.h" #include "keyboard.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
DECLARE_DEBUG_CHANNEL(system) DECLARE_DEBUG_CHANNEL(system)
@ -250,7 +250,7 @@ static void THUNK_Free( THUNK *thunk )
return; return;
} }
} }
ERR(thunk, "invalid thunk addr %p\n", thunk ); ERR_(thunk)("invalid thunk addr %p\n", thunk );
} }
@ -613,7 +613,7 @@ static BOOL WINAPI THUNK_WOWCallback16Ex(
LPDWORD args = (LPDWORD)xargs; LPDWORD args = (LPDWORD)xargs;
DWORD ret,i; DWORD ret,i;
TRACE(relay,"(%p,0x%08lx,%ld,%p,%p)\n", TRACE_(relay)("(%p,0x%08lx,%ld,%p,%p)\n",
proc,dwFlags,cbArgs,xargs,pdwret proc,dwFlags,cbArgs,xargs,pdwret
); );
if (dwFlags == WCB16_CDECL) { if (dwFlags == WCB16_CDECL) {
@ -683,7 +683,7 @@ static BOOL WINAPI THUNK_WOWCallback16Ex(
); );
break; break;
default: default:
ERR(thunk,"%ld arguments not supported.\n",cbArgs); ERR_(thunk)("%ld arguments not supported.\n",cbArgs);
if (dwFlags == WCB16_CDECL) if (dwFlags == WCB16_CDECL)
HeapFree(GetProcessHeap(),0,args); HeapFree(GetProcessHeap(),0,args);
return FALSE; return FALSE;
@ -831,7 +831,7 @@ static void THUNK_CallSystemTimerProc( FARPROC16 proc, WORD timer )
if ( _ConfirmWin16Lock() ) if ( _ConfirmWin16Lock() )
{ {
FIXME( system, "Skipping timer %d callback because timer signal " FIXME_(system)("Skipping timer %d callback because timer signal "
"arrived while we own the Win16Lock!\n", timer ); "arrived while we own the Win16Lock!\n", timer );
return; return;
} }
@ -928,19 +928,19 @@ UINT WINAPI ThunkConnect16(
{ {
directionSL = TRUE; directionSL = TRUE;
TRACE(thunk, "SL01 thunk %s (%lx) -> %s (%s), Reason: %ld\n", TRACE_(thunk)("SL01 thunk %s (%lx) -> %s (%s), Reason: %ld\n",
module16, (DWORD)TD, module32, thunkfun32, dwReason); module16, (DWORD)TD, module32, thunkfun32, dwReason);
} }
else if (!lstrncmpA(TD->magic, "LS01", 4)) else if (!lstrncmpA(TD->magic, "LS01", 4))
{ {
directionSL = FALSE; directionSL = FALSE;
TRACE(thunk, "LS01 thunk %s (%lx) <- %s (%s), Reason: %ld\n", TRACE_(thunk)("LS01 thunk %s (%lx) <- %s (%s), Reason: %ld\n",
module16, (DWORD)TD, module32, thunkfun32, dwReason); module16, (DWORD)TD, module32, thunkfun32, dwReason);
} }
else else
{ {
ERR(thunk, "Invalid magic %c%c%c%c\n", ERR_(thunk)("Invalid magic %c%c%c%c\n",
TD->magic[0], TD->magic[1], TD->magic[2], TD->magic[3]); TD->magic[0], TD->magic[1], TD->magic[2], TD->magic[3]);
return 0; return 0;
} }
@ -977,7 +977,7 @@ UINT WINAPI ThunkConnect16(
if (SL->flags2 & 0x80000000) if (SL->flags2 & 0x80000000)
{ {
TRACE(thunk, "Preloading 32-bit library\n"); TRACE_(thunk)("Preloading 32-bit library\n");
LoadLibraryA(module32); LoadLibraryA(module32);
} }
} }
@ -1059,11 +1059,11 @@ void WINAPI C16ThkSL01(CONTEXT *context)
if (!td) if (!td)
{ {
ERR(thunk, "ThunkConnect16 was not called!\n"); ERR_(thunk)("ThunkConnect16 was not called!\n");
return; return;
} }
TRACE(thunk, "Creating stub for ThunkDataSL %08lx\n", (DWORD)td); TRACE_(thunk)("Creating stub for ThunkDataSL %08lx\n", (DWORD)td);
/* We produce the following code: /* We produce the following code:
@ -1099,7 +1099,7 @@ void WINAPI C16ThkSL01(CONTEXT *context)
DWORD targetNr = CX_reg(context) / 4; DWORD targetNr = CX_reg(context) / 4;
struct SLTargetDB *tdb; struct SLTargetDB *tdb;
TRACE(thunk, "Process %08lx calling target %ld of ThunkDataSL %08lx\n", TRACE_(thunk)("Process %08lx calling target %ld of ThunkDataSL %08lx\n",
(DWORD)PROCESS_Current(), targetNr, (DWORD)td); (DWORD)PROCESS_Current(), targetNr, (DWORD)td);
for (tdb = td->targetDB; tdb; tdb = tdb->next) for (tdb = td->targetDB; tdb; tdb = tdb->next)
@ -1108,7 +1108,7 @@ void WINAPI C16ThkSL01(CONTEXT *context)
if (!tdb) if (!tdb)
{ {
TRACE(thunk, "Loading 32-bit library %s\n", td->pszDll32); TRACE_(thunk)("Loading 32-bit library %s\n", td->pszDll32);
LoadLibraryA(td->pszDll32); LoadLibraryA(td->pszDll32);
for (tdb = td->targetDB; tdb; tdb = tdb->next) for (tdb = td->targetDB; tdb; tdb = tdb->next)
@ -1120,7 +1120,7 @@ void WINAPI C16ThkSL01(CONTEXT *context)
{ {
EDX_reg(context) = tdb->targetTable[targetNr]; EDX_reg(context) = tdb->targetTable[targetNr];
TRACE(thunk, "Call target is %08lx\n", EDX_reg(context)); TRACE_(thunk)("Call target is %08lx\n", EDX_reg(context));
} }
else else
{ {
@ -1131,7 +1131,7 @@ void WINAPI C16ThkSL01(CONTEXT *context)
CS_reg(context) = stack[3]; CS_reg(context) = stack[3];
SP_reg(context) += td->apiDB[targetNr].nrArgBytes + 4; SP_reg(context) += td->apiDB[targetNr].nrArgBytes + 4;
ERR(thunk, "Process %08lx did not ThunkConnect32 %s to %s\n", ERR_(thunk)("Process %08lx did not ThunkConnect32 %s to %s\n",
(DWORD)PROCESS_Current(), td->pszDll32, td->pszDll16); (DWORD)PROCESS_Current(), td->pszDll32, td->pszDll16);
} }
} }
@ -1141,7 +1141,7 @@ DWORD WINAPI
WOW16Call(WORD x,WORD y,WORD z) { WOW16Call(WORD x,WORD y,WORD z) {
int i; int i;
DWORD calladdr; DWORD calladdr;
FIXME(thunk,"(0x%04x,0x%04x,%d),calling (",x,y,z); FIXME_(thunk)("(0x%04x,0x%04x,%d),calling (",x,y,z);
for (i=0;i<x/2;i++) { for (i=0;i<x/2;i++) {
WORD a = STACK16_POP(THREAD_Current(),2); WORD a = STACK16_POP(THREAD_Current(),2);

View File

@ -10,7 +10,7 @@
#ifdef CONFIG_IPC #ifdef CONFIG_IPC
#include <assert.h> #include <assert.h>
#include "debug.h" #include "debugtools.h"
#include "ldt.h" #include "ldt.h"
#include "shm_main_blk.h" #include "shm_main_blk.h"
#include "shm_fragment.h" #include "shm_fragment.h"
@ -60,18 +60,18 @@ static struct handle_info *locate_handle(HGLOBAL16 h, struct local_shm_map *map)
{ {
struct shm_block *block; struct shm_block *block;
TRACE(global,"shm: (0x%04x)\n", h); TRACE_(global)("shm: (0x%04x)\n", h);
if (SampleBit( &free_handles, DDE_MEM_IDX(h)) == 0) { if (SampleBit( &free_handles, DDE_MEM_IDX(h)) == 0) {
TRACE(global, "shm: return NULL\n"); TRACE_(global)("shm: return NULL\n");
return NULL; /* free!!! */ return NULL; /* free!!! */
} }
block= shm_locate_block(DDE_MEM_INFO(h).shmid, map); block= shm_locate_block(DDE_MEM_INFO(h).shmid, map);
if (block == NULL) { if (block == NULL) {
/* nothing found */ /* nothing found */
TRACE(global, "shm: return NULL\n"); TRACE_(global)("shm: return NULL\n");
return NULL; return NULL;
} }
@ -89,7 +89,7 @@ static HGLOBAL16 dde_alloc_handle()
if (bit_nr != -1) if (bit_nr != -1)
return DDE_MEM_HANDLE(bit_nr); return DDE_MEM_HANDLE(bit_nr);
TRACE(global,"dde_alloc_handle: no free DDE handle found\n"); TRACE_(global)("dde_alloc_handle: no free DDE handle found\n");
return 0; return 0;
} }
/********************************************************************** /**********************************************************************
@ -104,7 +104,7 @@ DDE_malloc(unsigned int flags, unsigned long size, SHMDATA *shmdata)
struct local_shm_map *curr; struct local_shm_map *curr;
HGLOBAL16 handle; HGLOBAL16 handle;
TRACE(global,"DDE_malloc flags %4X, size %ld\n", flags, size); TRACE_(global)("DDE_malloc flags %4X, size %ld\n", flags, size);
DDE_IPC_init(); /* make sure main shm block allocated */ DDE_IPC_init(); /* make sure main shm block allocated */
shm_write_wait(main_block->proc[curr_proc_idx].sem); shm_write_wait(main_block->proc[curr_proc_idx].sem);
@ -138,7 +138,7 @@ DDE_malloc(unsigned int flags, unsigned long size, SHMDATA *shmdata)
h_info= (struct handle_info *) h_info= (struct handle_info *)
shm_FragPtrAlloc(block, size+sizeof(struct handle_info)); shm_FragPtrAlloc(block, size+sizeof(struct handle_info));
if (h_info==NULL) { if (h_info==NULL) {
ERR(global,"BUG! unallocated fragment\n"); ERR_(global)("BUG! unallocated fragment\n");
shm_write_signal(main_block->proc[curr_proc_idx].sem); shm_write_signal(main_block->proc[curr_proc_idx].sem);
return 0; return 0;
} }
@ -153,13 +153,13 @@ DDE_malloc(unsigned int flags, unsigned long size, SHMDATA *shmdata)
handle= dde_alloc_handle(); handle= dde_alloc_handle();
if (handle) { if (handle) {
TRACE(global, "returning handle=0x%4x, ptr=0x%08lx\n", TRACE_(global)("returning handle=0x%4x, ptr=0x%08lx\n",
(int)handle, (long) HINFO2DATAPTR(h_info)); (int)handle, (long) HINFO2DATAPTR(h_info));
DDE_MEM_INFO(handle).rel= PTR2REL(block, h_info); DDE_MEM_INFO(handle).rel= PTR2REL(block, h_info);
DDE_MEM_INFO(handle).shmid= shmid; DDE_MEM_INFO(handle).shmid= shmid;
} }
else else
WARN(global, "failed\n"); WARN_(global)("failed\n");
shm_write_signal(main_block->proc[curr_proc_idx].sem); shm_write_signal(main_block->proc[curr_proc_idx].sem);
@ -173,7 +173,7 @@ HGLOBAL16 DDE_GlobalFree(HGLOBAL16 h)
int handle_index= h & 0x7fff; int handle_index= h & 0x7fff;
struct local_shm_map map; struct local_shm_map map;
TRACE(global,"(0x%04x)\n",h); TRACE_(global)("(0x%04x)\n",h);
if (h==0) if (h==0)
return 0; return 0;
@ -239,18 +239,18 @@ void *DDE_AttachHandle(HGLOBAL16 handle, SEGPTR *segptr)
if (segptr != NULL) if (segptr != NULL)
*segptr=0; *segptr=0;
TRACE(global,"(%04x)\n",handle); TRACE_(global)("(%04x)\n",handle);
h_info=locate_handle(handle, NULL); h_info=locate_handle(handle, NULL);
if (h_info == NULL) if (h_info == NULL)
return NULL; return NULL;
if ( !(h_info->flags & GMEM_DDESHARE) ) { if ( !(h_info->flags & GMEM_DDESHARE) ) {
ERR(global,"Corrupted memory handle info\n"); ERR_(global)("Corrupted memory handle info\n");
return NULL; return NULL;
} }
TRACE(global,"h_info=%06lx\n",(long)h_info); TRACE_(global)("h_info=%06lx\n",(long)h_info);
shmdata.handle= handle; shmdata.handle= handle;
shmdata.shmid= DDE_MEM_INFO(handle).shmid; shmdata.shmid= DDE_MEM_INFO(handle).shmid;
@ -267,7 +267,7 @@ void *DDE_AttachHandle(HGLOBAL16 handle, SEGPTR *segptr)
if (TRACE_ON(dde)) if (TRACE_ON(dde))
debug_last_handle_size= h_info->size; debug_last_handle_size= h_info->size;
TRACE(global,"DDE_AttachHandle returns ptr=0x%08lx\n", (long)ptr); TRACE_(global)("DDE_AttachHandle returns ptr=0x%08lx\n", (long)ptr);
return (LPSTR)ptr; return (LPSTR)ptr;

View File

@ -26,7 +26,7 @@
#include "dde_proc.h" #include "dde_proc.h"
#include "dde_mem.h" #include "dde_mem.h"
#include "dde.h" #include "dde.h"
#include "debug.h" #include "debugtools.h"
#include "xmalloc.h" #include "xmalloc.h"
DECLARE_DEBUG_CHANNEL(dde) DECLARE_DEBUG_CHANNEL(dde)
@ -126,7 +126,7 @@ void dde_proc_add(dde_proc procs)
{ {
dde_proc proc; dde_proc proc;
int proc_idx; int proc_idx;
TRACE(dde,"(..)\n"); TRACE_(dde)("(..)\n");
shm_write_wait(main_block->sem); shm_write_wait(main_block->sem);
/* find free proc_idx and allocate it */ /* find free proc_idx and allocate it */
@ -142,7 +142,7 @@ void dde_proc_add(dde_proc procs)
} }
else { else {
fflush(stdout); fflush(stdout);
WARN(dde,"Can't allocate process\n"); WARN_(dde)("Can't allocate process\n");
} }
shm_write_signal(main_block->sem); shm_write_signal(main_block->sem);
} }
@ -167,7 +167,7 @@ static BOOL get_ack()
size= msgrcv( main_block->proc[curr_proc_idx].msg , &ack_buff.dat, size= msgrcv( main_block->proc[curr_proc_idx].msg , &ack_buff.dat,
1, DDE_ACK, IPC_NOWAIT); 1, DDE_ACK, IPC_NOWAIT);
if (size>=0) { if (size>=0) {
TRACE(msg,"get_ack: received DDE_ACK message\n"); TRACE_(msg)("get_ack: received DDE_ACK message\n");
return TRUE; return TRUE;
} }
if (DDE_GetRemoteMessage()) { if (DDE_GetRemoteMessage()) {
@ -212,12 +212,12 @@ static BOOL DDE_DoOneMessage (int proc_idx, int size, struct msgbuf *msgbuf)
if (title) if (title)
print_dde_message(title, msg); print_dde_message(title, msg);
else else
WARN(dde, "Unknown message type=0x%lx\n", msgbuf->mtype); WARN_(dde)("Unknown message type=0x%lx\n", msgbuf->mtype);
} }
TRACE(msg, "to proc_idx=%d (pid=%d), queue=%u\n", TRACE_(msg)("to proc_idx=%d (pid=%d), queue=%u\n",
proc_idx, proc->pid, (unsigned)proc->msg); proc_idx, proc->pid, (unsigned)proc->msg);
if ( proc->msg != -1) { if ( proc->msg != -1) {
TRACE(msg, "doing...(type=%s)\n", msg_type[msgbuf->mtype]); TRACE_(msg)("doing...(type=%s)\n", msg_type[msgbuf->mtype]);
size=msgsnd (proc->msg, msgbuf, size, 0); size=msgsnd (proc->msg, msgbuf, size, 0);
if (size<0) { if (size<0) {
@ -226,7 +226,7 @@ static BOOL DDE_DoOneMessage (int proc_idx, int size, struct msgbuf *msgbuf)
} }
kill(proc->pid,SIGUSR2); /* tell the process there is a message */ kill(proc->pid,SIGUSR2); /* tell the process there is a message */
TRACE(msg, "Trying to get acknowledgment from msg queue=%d\n", TRACE_(msg)("Trying to get acknowledgment from msg queue=%d\n",
proc->msg); proc->msg);
Yield16(); /* force task switch, and */ Yield16(); /* force task switch, and */
/* acknowledgment sending */ /* acknowledgment sending */
@ -234,12 +234,12 @@ static BOOL DDE_DoOneMessage (int proc_idx, int size, struct msgbuf *msgbuf)
return TRUE; return TRUE;
} else { } else {
fflush(stdout); fflush(stdout);
WARN(dde,"get_ack: DDE_DoOneMessage: timeout\n"); WARN_(dde)("get_ack: DDE_DoOneMessage: timeout\n");
return FALSE; return FALSE;
} }
} }
else { else {
WARN(msg, "message not sent, target has no message queue\n"); WARN_(msg)("message not sent, target has no message queue\n");
return FALSE; return FALSE;
} }
} }
@ -281,7 +281,7 @@ static HWND16 HWND_Local2Remote(HWND16 orig)
return IDX_TO_HWND(dde_wnd_idx); return IDX_TO_HWND(dde_wnd_idx);
} }
WARN(dde, "Can't map any more windows to DDE windows\n"); WARN_(dde)("Can't map any more windows to DDE windows\n");
return 0; return 0;
} }
@ -310,11 +310,11 @@ static BOOL DDE_DoMessage( MSG16 *msg, int type )
if ( ! DDE_IsRemoteWindow(msg->hwnd) && msg->hwnd!= (HWND16)-1) if ( ! DDE_IsRemoteWindow(msg->hwnd) && msg->hwnd!= (HWND16)-1)
return FALSE; return FALSE;
TRACE(msg, "(hwnd=0x%x,msg=0x%x,..) - %s\n", TRACE_(msg)("(hwnd=0x%x,msg=0x%x,..) - %s\n",
(int)msg->hwnd,(int)msg->message,msg_type[type]); (int)msg->hwnd,(int)msg->message,msg_type[type]);
TRACE(msg, "(hwnd=0x%x,msg=0x%x,..) -- HWND_BROADCAST !\n", TRACE_(msg)("(hwnd=0x%x,msg=0x%x,..) -- HWND_BROADCAST !\n",
(int)msg->hwnd,(int)msg->message); (int)msg->hwnd,(int)msg->message);
remote_message=(void*)&msg_dat.dat.mtext; remote_message=(void*)&msg_dat.dat.mtext;
@ -358,7 +358,7 @@ void dde_proc_send_ack(HWND16 wnd, BOOL val) {
proc=DDE_WIN2PROC(wnd); proc=DDE_WIN2PROC(wnd);
msg=main_block->proc[proc].msg; msg=main_block->proc[proc].msg;
TRACE(msg,"sending ACK to wnd=%4x, proc=%d,msg=%d, pid=%d\n", TRACE_(msg)("sending ACK to wnd=%4x, proc=%d,msg=%d, pid=%d\n",
wnd,proc,msg,main_block->proc[proc].pid); wnd,proc,msg,main_block->proc[proc].pid);
msg_ack.mtext[0]=val; msg_ack.mtext[0]=val;
@ -385,7 +385,7 @@ int DDE_GetRemoteMessage()
if (nesting>10) { if (nesting>10) {
fflush(stdout); fflush(stdout);
ERR(msg, "suspecting infinite recursion, exiting"); ERR_(msg)("suspecting infinite recursion, exiting");
return 0; return 0;
} }
@ -397,7 +397,7 @@ int DDE_GetRemoteMessage()
if (size==DDE_MSG_SIZE) { /* is this a correct message (if any) ?*/ if (size==DDE_MSG_SIZE) { /* is this a correct message (if any) ?*/
was_sent=TRUE; was_sent=TRUE;
TRACE(msg, "DDE:receive sent message. msg=%04x wPar=%04x" TRACE_(msg)("DDE:receive sent message. msg=%04x wPar=%04x"
" lPar=%08lx\n", " lPar=%08lx\n",
remote_message->message, remote_message->wParam, remote_message->message, remote_message->wParam,
remote_message->lParam); remote_message->lParam);
@ -407,7 +407,7 @@ int DDE_GetRemoteMessage()
if (size==DDE_MSG_SIZE) { /* is this a correct message (if any) ?*/ if (size==DDE_MSG_SIZE) { /* is this a correct message (if any) ?*/
was_sent=FALSE; was_sent=FALSE;
TRACE(msg, "DDE:receive posted message. " TRACE_(msg)("DDE:receive posted message. "
"msg=%04x wPar=%04x lPar=%08lx\n", "msg=%04x wPar=%04x lPar=%08lx\n",
remote_message->message, remote_message->wParam, remote_message->message, remote_message->wParam,
remote_message->lParam); remote_message->lParam);
@ -435,7 +435,7 @@ int DDE_GetRemoteMessage()
HWND16 dde_window= DDE_WIN_INFO(remote_message->hwnd).wnd; HWND16 dde_window= DDE_WIN_INFO(remote_message->hwnd).wnd;
/* we should know exactly where to send the message (locally)*/ /* we should know exactly where to send the message (locally)*/
if (was_sent) { if (was_sent) {
TRACE(dde, "SendMessage(wnd=0x%04x, msg=0x%04x, wPar=0x%04x," TRACE_(dde)("SendMessage(wnd=0x%04x, msg=0x%04x, wPar=0x%04x,"
"lPar=0x%08x\n", dde_window, remote_message->message, "lPar=0x%08x\n", dde_window, remote_message->message,
remote_message->wParam, (int)remote_message->lParam); remote_message->wParam, (int)remote_message->lParam);
@ -515,7 +515,7 @@ void DDE_TestDDE(HWND16 hwnd)
in_test--; in_test--;
return; return;
} }
TRACE(msg,"(0x%04x)\n", hwnd); TRACE_(msg)("(0x%04x)\n", hwnd);
if (hwnd==0) if (hwnd==0)
hwnd=-1; hwnd=-1;
/* just send a message to see how things are going */ /* just send a message to see how things are going */
@ -622,7 +622,7 @@ static void print_dde_message(char *desc, MSG16 *msg)
dsprintf(dde," atom=0x%04x",hWord); dsprintf(dde," atom=0x%04x",hWord);
break; break;
} }
TRACE(dde,"%s\n", dbg_str(dde)); TRACE_(dde)("%s\n", dbg_str(dde));
} }
void dde_proc_done(dde_proc proc) void dde_proc_done(dde_proc proc)

View File

@ -30,7 +30,7 @@
#include "ldt.h" #include "ldt.h"
#include "dosexe.h" #include "dosexe.h"
#include "dosmod.h" #include "dosmod.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(int) DECLARE_DEBUG_CHANNEL(int)
DECLARE_DEBUG_CHANNEL(module) DECLARE_DEBUG_CHANNEL(module)
@ -140,19 +140,19 @@ static void DOSVM_SendQueuedEvent(PCONTEXT context, LPDOSTASK lpDosTask)
/* it's an IRQ, move it to "current" list */ /* it's an IRQ, move it to "current" list */
event->next = lpDosTask->current; event->next = lpDosTask->current;
lpDosTask->current = event; lpDosTask->current = event;
TRACE(int,"dispatching IRQ %d\n",event->irq); TRACE_(int)("dispatching IRQ %d\n",event->irq);
/* note that if DOSVM_SimulateInt calls an internal interrupt directly, /* note that if DOSVM_SimulateInt calls an internal interrupt directly,
* lpDosTask->current might be cleared (and event freed) in this very call! */ * lpDosTask->current might be cleared (and event freed) in this very call! */
DOSVM_SimulateInt((event->irq<8)?(event->irq+8):(event->irq-8+0x70),context,lpDosTask); DOSVM_SimulateInt((event->irq<8)?(event->irq+8):(event->irq-8+0x70),context,lpDosTask);
} else { } else {
/* callback event */ /* callback event */
TRACE(int,"dispatching callback event\n"); TRACE_(int)("dispatching callback event\n");
(*event->relay)(lpDosTask,context,event->data); (*event->relay)(lpDosTask,context,event->data);
free(event); free(event);
} }
} }
if (!SHOULD_PEND(lpDosTask->pending)) { if (!SHOULD_PEND(lpDosTask->pending)) {
TRACE(int,"clearing Pending flag\n"); TRACE_(int)("clearing Pending flag\n");
CLR_PEND(context); CLR_PEND(context);
} }
} }
@ -175,7 +175,7 @@ void DOSVM_QueueEvent( int irq, int priority, void (*relay)(LPDOSTASK,PCONTEXT,v
if (pModule && pModule->lpDosTask) { if (pModule && pModule->lpDosTask) {
event = malloc(sizeof(DOSEVENT)); event = malloc(sizeof(DOSEVENT));
if (!event) { if (!event) {
ERR(int,"out of memory allocating event entry\n"); ERR_(int)("out of memory allocating event entry\n");
return; return;
} }
event->irq = irq; event->priority = priority; event->irq = irq; event->priority = priority;
@ -194,11 +194,11 @@ void DOSVM_QueueEvent( int irq, int priority, void (*relay)(LPDOSTASK,PCONTEXT,v
/* get dosmod's attention to the new event, except for irq==0 where we already have it */ /* get dosmod's attention to the new event, except for irq==0 where we already have it */
if (irq && !pModule->lpDosTask->sig_sent) { if (irq && !pModule->lpDosTask->sig_sent) {
TRACE(int,"new event queued, signalling dosmod\n"); TRACE_(int)("new event queued, signalling dosmod\n");
kill(pModule->lpDosTask->task,SIGUSR2); kill(pModule->lpDosTask->task,SIGUSR2);
pModule->lpDosTask->sig_sent++; pModule->lpDosTask->sig_sent++;
} else { } else {
TRACE(int,"new event queued\n"); TRACE_(int)("new event queued\n");
} }
} }
} }
@ -245,18 +245,18 @@ static int DOSVM_Process( LPDOSTASK lpDosTask, int fn, int sig,
switch (VM86_TYPE(fn)) { switch (VM86_TYPE(fn)) {
case VM86_SIGNAL: case VM86_SIGNAL:
TRACE(int,"DOS module caught signal %d\n",sig); TRACE_(int)("DOS module caught signal %d\n",sig);
if ((sig==SIGALRM) || (sig==SIGUSR2)) { if ((sig==SIGALRM) || (sig==SIGUSR2)) {
if (sig==SIGALRM) { if (sig==SIGALRM) {
DOSVM_QueueEvent(0,DOS_PRIORITY_REALTIME,NULL,NULL); DOSVM_QueueEvent(0,DOS_PRIORITY_REALTIME,NULL,NULL);
} }
if (lpDosTask->pending) { if (lpDosTask->pending) {
TRACE(int,"setting Pending flag, interrupts are currently %s\n", TRACE_(int)("setting Pending flag, interrupts are currently %s\n",
IF_ENABLED(&context) ? "enabled" : "disabled"); IF_ENABLED(&context) ? "enabled" : "disabled");
SET_PEND(&context); SET_PEND(&context);
DOSVM_SendQueuedEvents(&context,lpDosTask); DOSVM_SendQueuedEvents(&context,lpDosTask);
} else { } else {
TRACE(int,"no events are pending, clearing Pending flag\n"); TRACE_(int)("no events are pending, clearing Pending flag\n");
CLR_PEND(&context); CLR_PEND(&context);
} }
if (sig==SIGUSR2) lpDosTask->sig_sent--; if (sig==SIGUSR2) lpDosTask->sig_sent--;
@ -284,7 +284,7 @@ static int DOSVM_Process( LPDOSTASK lpDosTask, int fn, int sig,
break; break;
case VM86_STI: case VM86_STI:
case VM86_PICRETURN: case VM86_PICRETURN:
TRACE(int,"DOS task enabled interrupts with events pending, sending events\n"); TRACE_(int)("DOS task enabled interrupts with events pending, sending events\n");
DOSVM_SendQueuedEvents(&context,lpDosTask); DOSVM_SendQueuedEvents(&context,lpDosTask);
break; break;
case VM86_TRAP: case VM86_TRAP:
@ -348,12 +348,12 @@ int DOSVM_Enter( PCONTEXT context )
GlobalUnlock16( GetCurrentTask() ); GlobalUnlock16( GetCurrentTask() );
if (!pModule) { if (!pModule) {
ERR(module,"No task is currently active!\n"); ERR_(module)("No task is currently active!\n");
return -1; return -1;
} }
if (!(lpDosTask=pModule->lpDosTask)) { if (!(lpDosTask=pModule->lpDosTask)) {
/* MZ_CreateProcess or MZ_AllocDPMITask should have been called first */ /* MZ_CreateProcess or MZ_AllocDPMITask should have been called first */
ERR(module,"dosmod has not been initialized!"); ERR_(module)("dosmod has not been initialized!");
return -1; return -1;
} }
@ -383,11 +383,11 @@ int DOSVM_Enter( PCONTEXT context )
errno = 0; errno = 0;
/* transmit VM86 structure to dosmod task */ /* transmit VM86 structure to dosmod task */
if (write(lpDosTask->write_pipe,&stat,sizeof(stat))!=sizeof(stat)) { if (write(lpDosTask->write_pipe,&stat,sizeof(stat))!=sizeof(stat)) {
ERR(module,"dosmod sync lost, errno=%d, fd=%d, pid=%d\n",errno,lpDosTask->write_pipe,getpid()); ERR_(module)("dosmod sync lost, errno=%d, fd=%d, pid=%d\n",errno,lpDosTask->write_pipe,getpid());
return -1; return -1;
} }
if (write(lpDosTask->write_pipe,&VM86,sizeof(VM86))!=sizeof(VM86)) { if (write(lpDosTask->write_pipe,&VM86,sizeof(VM86))!=sizeof(VM86)) {
ERR(module,"dosmod sync lost, errno=%d\n",errno); ERR_(module)("dosmod sync lost, errno=%d\n",errno);
return -1; return -1;
} }
do { do {
@ -406,37 +406,37 @@ int DOSVM_Enter( PCONTEXT context )
/* nothing yet, block while waiting for something to do */ /* nothing yet, block while waiting for something to do */
waitret=MsgWaitForMultipleObjects(1,&(lpDosTask->hReadPipe),FALSE,INFINITE,QS_ALLINPUT); waitret=MsgWaitForMultipleObjects(1,&(lpDosTask->hReadPipe),FALSE,INFINITE,QS_ALLINPUT);
if (waitret==(DWORD)-1) { if (waitret==(DWORD)-1) {
ERR(module,"dosvm wait error=%ld\n",GetLastError()); ERR_(module)("dosvm wait error=%ld\n",GetLastError());
} }
} while (waitret!=WAIT_OBJECT_0); } while (waitret!=WAIT_OBJECT_0);
/* read response */ /* read response */
while (1) { while (1) {
if ((len=read(lpDosTask->read_pipe,&stat,sizeof(stat)))==sizeof(stat)) break; if ((len=read(lpDosTask->read_pipe,&stat,sizeof(stat)))==sizeof(stat)) break;
if (((errno==EINTR)||(errno==EAGAIN))&&(len<=0)) { if (((errno==EINTR)||(errno==EAGAIN))&&(len<=0)) {
WARN(module,"rereading dosmod return code due to errno=%d, result=%d\n",errno,len); WARN_(module)("rereading dosmod return code due to errno=%d, result=%d\n",errno,len);
continue; continue;
} }
ERR(module,"dosmod sync lost reading return code, errno=%d, result=%d\n",errno,len); ERR_(module)("dosmod sync lost reading return code, errno=%d, result=%d\n",errno,len);
return -1; return -1;
} }
TRACE(module,"dosmod return code=%d\n",stat); TRACE_(module)("dosmod return code=%d\n",stat);
while (1) { while (1) {
if ((len=read(lpDosTask->read_pipe,&VM86,sizeof(VM86)))==sizeof(VM86)) break; if ((len=read(lpDosTask->read_pipe,&VM86,sizeof(VM86)))==sizeof(VM86)) break;
if (((errno==EINTR)||(errno==EAGAIN))&&(len<=0)) { if (((errno==EINTR)||(errno==EAGAIN))&&(len<=0)) {
WARN(module,"rereading dosmod VM86 structure due to errno=%d, result=%d\n",errno,len); WARN_(module)("rereading dosmod VM86 structure due to errno=%d, result=%d\n",errno,len);
continue; continue;
} }
ERR(module,"dosmod sync lost reading VM86 structure, errno=%d, result=%d\n",errno,len); ERR_(module)("dosmod sync lost reading VM86 structure, errno=%d, result=%d\n",errno,len);
return -1; return -1;
} }
if ((stat&0xff)==DOSMOD_SIGNAL) { if ((stat&0xff)==DOSMOD_SIGNAL) {
while (1) { while (1) {
if ((len=read(lpDosTask->read_pipe,&sig,sizeof(sig)))==sizeof(sig)) break; if ((len=read(lpDosTask->read_pipe,&sig,sizeof(sig)))==sizeof(sig)) break;
if (((errno==EINTR)||(errno==EAGAIN))&&(len<=0)) { if (((errno==EINTR)||(errno==EAGAIN))&&(len<=0)) {
WARN(module,"rereading dosmod signal due to errno=%d, result=%d\n",errno,len); WARN_(module)("rereading dosmod signal due to errno=%d, result=%d\n",errno,len);
continue; continue;
} }
ERR(module,"dosmod sync lost reading signal, errno=%d, result=%d\n",errno,len); ERR_(module)("dosmod sync lost reading signal, errno=%d, result=%d\n",errno,len);
return -1; return -1;
} while (0); } while (0);
} else sig=0; } else sig=0;
@ -462,7 +462,7 @@ void DOSVM_PIC_ioport_out( WORD port, BYTE val)
if ((port==0x20) && (val==0x20)) { if ((port==0x20) && (val==0x20)) {
if (pModule->lpDosTask->current) { if (pModule->lpDosTask->current) {
/* EOI (End Of Interrupt) */ /* EOI (End Of Interrupt) */
TRACE(int,"received EOI for current IRQ, clearing\n"); TRACE_(int)("received EOI for current IRQ, clearing\n");
event = pModule->lpDosTask->current; event = pModule->lpDosTask->current;
pModule->lpDosTask->current = event->next; pModule->lpDosTask->current = event->next;
if (event->relay) if (event->relay)
@ -473,15 +473,15 @@ void DOSVM_PIC_ioport_out( WORD port, BYTE val)
!pModule->lpDosTask->sig_sent) { !pModule->lpDosTask->sig_sent) {
/* another event is pending, which we should probably /* another event is pending, which we should probably
* be able to process now, so tell dosmod about it */ * be able to process now, so tell dosmod about it */
TRACE(int,"another event pending, signalling dosmod\n"); TRACE_(int)("another event pending, signalling dosmod\n");
kill(pModule->lpDosTask->task,SIGUSR2); kill(pModule->lpDosTask->task,SIGUSR2);
pModule->lpDosTask->sig_sent++; pModule->lpDosTask->sig_sent++;
} }
} else { } else {
WARN(int,"EOI without active IRQ\n"); WARN_(int)("EOI without active IRQ\n");
} }
} else { } else {
FIXME(int,"unrecognized PIC command %02x\n",val); FIXME_(int)("unrecognized PIC command %02x\n",val);
} }
} }
} }
@ -502,11 +502,11 @@ void DOSVM_SetTimer( unsigned ticks )
if (!tim.tv_usec) tim.tv_usec=1; if (!tim.tv_usec) tim.tv_usec=1;
if (write(pModule->lpDosTask->write_pipe,&stat,sizeof(stat))!=sizeof(stat)) { if (write(pModule->lpDosTask->write_pipe,&stat,sizeof(stat))!=sizeof(stat)) {
ERR(module,"dosmod sync lost, errno=%d\n",errno); ERR_(module)("dosmod sync lost, errno=%d\n",errno);
return; return;
} }
if (write(pModule->lpDosTask->write_pipe,&tim,sizeof(tim))!=sizeof(tim)) { if (write(pModule->lpDosTask->write_pipe,&tim,sizeof(tim))!=sizeof(tim)) {
ERR(module,"dosmod sync lost, errno=%d\n",errno); ERR_(module)("dosmod sync lost, errno=%d\n",errno);
return; return;
} }
/* there's no return */ /* there's no return */
@ -523,14 +523,14 @@ unsigned DOSVM_GetTimer( void )
GlobalUnlock16( GetCurrentTask() ); GlobalUnlock16( GetCurrentTask() );
if (pModule&&pModule->lpDosTask) { if (pModule&&pModule->lpDosTask) {
if (write(pModule->lpDosTask->write_pipe,&stat,sizeof(stat))!=sizeof(stat)) { if (write(pModule->lpDosTask->write_pipe,&stat,sizeof(stat))!=sizeof(stat)) {
ERR(module,"dosmod sync lost, errno=%d\n",errno); ERR_(module)("dosmod sync lost, errno=%d\n",errno);
return 0; return 0;
} }
/* read response */ /* read response */
while (1) { while (1) {
if (read(pModule->lpDosTask->read_pipe,&tim,sizeof(tim))==sizeof(tim)) break; if (read(pModule->lpDosTask->read_pipe,&tim,sizeof(tim))==sizeof(tim)) break;
if ((errno==EINTR)||(errno==EAGAIN)) continue; if ((errno==EINTR)||(errno==EAGAIN)) continue;
ERR(module,"dosmod sync lost, errno=%d\n",errno); ERR_(module)("dosmod sync lost, errno=%d\n",errno);
return 0; return 0;
} }
return ((unsigned long long)tim.tv_usec*1193180)/1000000; return ((unsigned long long)tim.tv_usec*1193180)/1000000;
@ -587,7 +587,7 @@ void* DOSVM_GetSystemData( int id )
int DOSVM_Enter( PCONTEXT context ) int DOSVM_Enter( PCONTEXT context )
{ {
ERR(module,"DOS realmode not supported on this architecture!\n"); ERR_(module)("DOS realmode not supported on this architecture!\n");
return -1; return -1;
} }

View File

@ -17,7 +17,7 @@
#include "heap.h" #include "heap.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "elfdll.h" #include "elfdll.h"
#include "debug.h" #include "debugtools.h"
#include "winerror.h" #include "winerror.h"
DECLARE_DEBUG_CHANNEL(elfdll) DECLARE_DEBUG_CHANNEL(elfdll)
@ -83,7 +83,7 @@ void *ELFDLL_dlopen(const char *libname, int flags)
if(len + namelen + 1 >= sizeof(buffer)) if(len + namelen + 1 >= sizeof(buffer))
{ {
ERR(elfdll, "Buffer overflow! Check EXTRA_LD_LIBRARY_PATH or increase buffer size.\n"); ERR_(elfdll)("Buffer overflow! Check EXTRA_LD_LIBRARY_PATH or increase buffer size.\n");
return NULL; return NULL;
} }
@ -96,7 +96,7 @@ void *ELFDLL_dlopen(const char *libname, int flags)
else else
strcpy(buffer + len, libname); strcpy(buffer + len, libname);
TRACE(elfdll, "Trying dlopen('%s', %d)\n", buffer, flags); TRACE_(elfdll)("Trying dlopen('%s', %d)\n", buffer, flags);
handle = dlopen(buffer, flags); handle = dlopen(buffer, flags);
if(handle) if(handle)
@ -206,7 +206,7 @@ static WINE_MODREF *ELFDLL_CreateModref(HMODULE hModule, LPCSTR path)
if(!(nt->FileHeader.Characteristics & IMAGE_FILE_DLL)) if(!(nt->FileHeader.Characteristics & IMAGE_FILE_DLL))
{ {
if(PROCESS_Current()->exe_modref) if(PROCESS_Current()->exe_modref)
FIXME(elfdll, "overwriting old exe_modref... arrgh\n"); FIXME_(elfdll)("overwriting old exe_modref... arrgh\n");
PROCESS_Current()->exe_modref = wm; PROCESS_Current()->exe_modref = wm;
} }
@ -226,7 +226,7 @@ static WINE_MODREF *ELFDLL_CreateModref(HMODULE hModule, LPCSTR path)
} }
} }
if(wm == PROCESS_Current()->exe_modref) if(wm == PROCESS_Current()->exe_modref)
ERR(elfdll, "Have to delete current exe_modref. Expect crash now\n"); ERR_(elfdll)("Have to delete current exe_modref. Expect crash now\n");
HeapFree(procheap, 0, wm->shortname); HeapFree(procheap, 0, wm->shortname);
HeapFree(procheap, 0, wm->longname); HeapFree(procheap, 0, wm->longname);
HeapFree(procheap, 0, wm->modname); HeapFree(procheap, 0, wm->modname);
@ -289,7 +289,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
dlhandle = ELFDLL_dlopen(soname, RTLD_LAZY); dlhandle = ELFDLL_dlopen(soname, RTLD_LAZY);
if(!dlhandle) if(!dlhandle)
{ {
WARN(elfdll, "Could not load %s (%s)\n", soname, dlerror()); WARN_(elfdll)("Could not load %s (%s)\n", soname, dlerror());
*err = ERROR_FILE_NOT_FOUND; *err = ERROR_FILE_NOT_FOUND;
return NULL; return NULL;
} }
@ -300,7 +300,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
image = (struct elfdll_image *)dlsym(dlhandle, soname); image = (struct elfdll_image *)dlsym(dlhandle, soname);
if(!image) if(!image)
{ {
ERR(elfdll, "Could not get elfdll image descriptor %s (%s)\n", soname, dlerror()); ERR_(elfdll)("Could not get elfdll image descriptor %s (%s)\n", soname, dlerror());
dlclose(dlhandle); dlclose(dlhandle);
*err = ERROR_BAD_FORMAT; *err = ERROR_BAD_FORMAT;
return NULL; return NULL;
@ -310,7 +310,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
hmod16 = ELFDLL_CreateNEModule(image->ne_module_start, image->ne_module_size); hmod16 = ELFDLL_CreateNEModule(image->ne_module_start, image->ne_module_size);
if(!hmod16) if(!hmod16)
{ {
ERR(elfdll, "Could not create win16 dummy module for %s\n", path); ERR_(elfdll)("Could not create win16 dummy module for %s\n", path);
dlclose(dlhandle); dlclose(dlhandle);
*err = ERROR_OUTOFMEMORY; *err = ERROR_OUTOFMEMORY;
return NULL; return NULL;
@ -321,7 +321,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
wm = ELFDLL_CreateModref(image->pe_module_start, path); wm = ELFDLL_CreateModref(image->pe_module_start, path);
if(!wm) if(!wm)
{ {
ERR(elfdll, "Could not create WINE_MODREF for %s\n", path); ERR_(elfdll)("Could not create WINE_MODREF for %s\n", path);
GLOBAL_FreeBlock((HGLOBAL16)hmod16); GLOBAL_FreeBlock((HGLOBAL16)hmod16);
dlclose(dlhandle); dlclose(dlhandle);
*err = ERROR_OUTOFMEMORY; *err = ERROR_OUTOFMEMORY;

View File

@ -27,7 +27,7 @@
#include "selectors.h" #include "selectors.h"
#include "stackframe.h" #include "stackframe.h"
#include "task.h" #include "task.h"
#include "debug.h" #include "debugtools.h"
#include "callback.h" #include "callback.h"
#include "loadorder.h" #include "loadorder.h"
#include "elfdll.h" #include "elfdll.h"
@ -48,7 +48,7 @@ WINE_MODREF *MODULE32_LookupHMODULE( HMODULE hmod )
return PROCESS_Current()->exe_modref; return PROCESS_Current()->exe_modref;
if (!HIWORD(hmod)) { if (!HIWORD(hmod)) {
ERR(module,"tried to lookup 0x%04x in win32 module handler!\n",hmod); ERR_(module)("tried to lookup 0x%04x in win32 module handler!\n",hmod);
return NULL; return NULL;
} }
for ( wm = PROCESS_Current()->modref_list; wm; wm=wm->next ) for ( wm = PROCESS_Current()->modref_list; wm; wm=wm->next )
@ -76,7 +76,7 @@ static BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved )
return TRUE; return TRUE;
TRACE( module, "(%s,%s,%p) - CALL\n", TRACE_(module)("(%s,%s,%p) - CALL\n",
wm->modname, typeName[type], lpReserved ); wm->modname, typeName[type], lpReserved );
/* Call the initialization routine */ /* Call the initialization routine */
@ -91,12 +91,12 @@ static BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved )
break; break;
default: default:
ERR( module, "wine_modref type %d not handled.\n", wm->type ); ERR_(module)("wine_modref type %d not handled.\n", wm->type );
retv = FALSE; retv = FALSE;
break; break;
} }
TRACE( module, "(%s,%s,%p) - RETURN %d\n", TRACE_(module)("(%s,%s,%p) - RETURN %d\n",
wm->modname, typeName[type], lpReserved, retv ); wm->modname, typeName[type], lpReserved, retv );
return retv; return retv;
@ -145,7 +145,7 @@ BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
|| ( wm->flags & WINE_MODREF_PROCESS_ATTACHED ) ) || ( wm->flags & WINE_MODREF_PROCESS_ATTACHED ) )
return retv; return retv;
TRACE( module, "(%s,%p) - START\n", TRACE_(module)("(%s,%p) - START\n",
wm->modname, lpReserved ); wm->modname, lpReserved );
/* Tag current MODREF to prevent recursive loop */ /* Tag current MODREF to prevent recursive loop */
@ -178,7 +178,7 @@ BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
/* Remove recursion flag */ /* Remove recursion flag */
wm->flags &= ~WINE_MODREF_MARKER; wm->flags &= ~WINE_MODREF_MARKER;
TRACE( module, "(%s,%p) - END\n", TRACE_(module)("(%s,%p) - END\n",
wm->modname, lpReserved ); wm->modname, lpReserved );
return retv; return retv;
@ -426,7 +426,7 @@ FARPROC16 MODULE_GetWndProcEntry16( LPCSTR name )
return (FARPROC16)PrintSetupDlgProc16; return (FARPROC16)PrintSetupDlgProc16;
if (!strcmp(name,"ReplaceTextDlgProc")) if (!strcmp(name,"ReplaceTextDlgProc"))
return (FARPROC16)ReplaceTextDlgProc16; return (FARPROC16)ReplaceTextDlgProc16;
FIXME(module,"No mapping for %s(), add one in library/miscstubs.c\n",name); FIXME_(module)("No mapping for %s(), add one in library/miscstubs.c\n",name);
assert( FALSE ); assert( FALSE );
return NULL; return NULL;
} }
@ -439,7 +439,7 @@ FARPROC16 MODULE_GetWndProcEntry16( LPCSTR name )
ordinal = NE_GetOrdinal( hModule, name ); ordinal = NE_GetOrdinal( hModule, name );
if (!(ret = NE_GetEntryPoint( hModule, ordinal ))) if (!(ret = NE_GetEntryPoint( hModule, ordinal )))
{ {
WARN( module, "%s not found\n", name ); WARN_(module)("%s not found\n", name );
assert( FALSE ); assert( FALSE );
} }
} }
@ -662,7 +662,7 @@ BOOL WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType )
HFILE hfile; HFILE hfile;
OFSTRUCT ofs; OFSTRUCT ofs;
TRACE( win32, "%s\n", lpApplicationName ); TRACE_(win32)("%s\n", lpApplicationName );
/* Sanity check. /* Sanity check.
*/ */
@ -693,7 +693,7 @@ BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType )
BOOL ret = FALSE; BOOL ret = FALSE;
LPSTR strNew = NULL; LPSTR strNew = NULL;
TRACE( win32, "%s\n", debugstr_w(lpApplicationName) ); TRACE_(win32)("%s\n", debugstr_w(lpApplicationName) );
/* Sanity check. /* Sanity check.
*/ */
@ -856,7 +856,7 @@ HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
hInstance = GetLastError(); hInstance = GetLastError();
if ( hInstance < 32 ) return hInstance; if ( hInstance < 32 ) return hInstance;
FIXME( module, "Strange error set by CreateProcess: %d\n", hInstance ); FIXME_(module)("Strange error set by CreateProcess: %d\n", hInstance );
return 11; return 11;
} }
@ -934,7 +934,7 @@ static void get_executable_name( LPCSTR line, LPSTR name, int namelen,
strcat(name, ".exe"); strcat(name, ".exe");
} }
TRACE(module, "checking if file exists '%s'\n", name); TRACE_(module)("checking if file exists '%s'\n", name);
if (GetFileAttributesA(name)!=-1) if (GetFileAttributesA(name)!=-1)
break; /* if file exists then all done */ break; /* if file exists then all done */
@ -947,7 +947,7 @@ static void get_executable_name( LPCSTR line, LPSTR name, int namelen,
} while (1); } while (1);
if (after) *after = pcmd; if (after) *after = pcmd;
TRACE(module, "selected as file name '%s'\n and cmdline as %s\n", TRACE_(module)("selected as file name '%s'\n and cmdline as %s\n",
name, debugstr_a(pcmd)); name, debugstr_a(pcmd));
} }
@ -1013,7 +1013,7 @@ static void make_executable_name( LPCSTR line, LPSTR name, int namelen,
strcat(name, ".exe"); strcat(name, ".exe");
} }
TRACE(module, "selected as file name '%s'\n", name ); TRACE_(module)("selected as file name '%s'\n", name );
} }
/********************************************************************** /**********************************************************************
@ -1055,64 +1055,64 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
/* Warn if unsupported features are used */ /* Warn if unsupported features are used */
if (dwCreationFlags & DEBUG_PROCESS) if (dwCreationFlags & DEBUG_PROCESS)
FIXME(module, "(%s,...): DEBUG_PROCESS ignored\n", name); FIXME_(module)("(%s,...): DEBUG_PROCESS ignored\n", name);
if (dwCreationFlags & DEBUG_ONLY_THIS_PROCESS) if (dwCreationFlags & DEBUG_ONLY_THIS_PROCESS)
FIXME(module, "(%s,...): DEBUG_ONLY_THIS_PROCESS ignored\n", name); FIXME_(module)("(%s,...): DEBUG_ONLY_THIS_PROCESS ignored\n", name);
if (dwCreationFlags & CREATE_SUSPENDED) if (dwCreationFlags & CREATE_SUSPENDED)
FIXME(module, "(%s,...): CREATE_SUSPENDED ignored\n", name); FIXME_(module)("(%s,...): CREATE_SUSPENDED ignored\n", name);
if (dwCreationFlags & DETACHED_PROCESS) if (dwCreationFlags & DETACHED_PROCESS)
FIXME(module, "(%s,...): DETACHED_PROCESS ignored\n", name); FIXME_(module)("(%s,...): DETACHED_PROCESS ignored\n", name);
if (dwCreationFlags & CREATE_NEW_CONSOLE) if (dwCreationFlags & CREATE_NEW_CONSOLE)
FIXME(module, "(%s,...): CREATE_NEW_CONSOLE ignored\n", name); FIXME_(module)("(%s,...): CREATE_NEW_CONSOLE ignored\n", name);
if (dwCreationFlags & NORMAL_PRIORITY_CLASS) if (dwCreationFlags & NORMAL_PRIORITY_CLASS)
FIXME(module, "(%s,...): NORMAL_PRIORITY_CLASS ignored\n", name); FIXME_(module)("(%s,...): NORMAL_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & IDLE_PRIORITY_CLASS) if (dwCreationFlags & IDLE_PRIORITY_CLASS)
FIXME(module, "(%s,...): IDLE_PRIORITY_CLASS ignored\n", name); FIXME_(module)("(%s,...): IDLE_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & HIGH_PRIORITY_CLASS) if (dwCreationFlags & HIGH_PRIORITY_CLASS)
FIXME(module, "(%s,...): HIGH_PRIORITY_CLASS ignored\n", name); FIXME_(module)("(%s,...): HIGH_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & REALTIME_PRIORITY_CLASS) if (dwCreationFlags & REALTIME_PRIORITY_CLASS)
FIXME(module, "(%s,...): REALTIME_PRIORITY_CLASS ignored\n", name); FIXME_(module)("(%s,...): REALTIME_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & CREATE_NEW_PROCESS_GROUP) if (dwCreationFlags & CREATE_NEW_PROCESS_GROUP)
FIXME(module, "(%s,...): CREATE_NEW_PROCESS_GROUP ignored\n", name); FIXME_(module)("(%s,...): CREATE_NEW_PROCESS_GROUP ignored\n", name);
if (dwCreationFlags & CREATE_UNICODE_ENVIRONMENT) if (dwCreationFlags & CREATE_UNICODE_ENVIRONMENT)
FIXME(module, "(%s,...): CREATE_UNICODE_ENVIRONMENT ignored\n", name); FIXME_(module)("(%s,...): CREATE_UNICODE_ENVIRONMENT ignored\n", name);
if (dwCreationFlags & CREATE_SEPARATE_WOW_VDM) if (dwCreationFlags & CREATE_SEPARATE_WOW_VDM)
FIXME(module, "(%s,...): CREATE_SEPARATE_WOW_VDM ignored\n", name); FIXME_(module)("(%s,...): CREATE_SEPARATE_WOW_VDM ignored\n", name);
if (dwCreationFlags & CREATE_SHARED_WOW_VDM) if (dwCreationFlags & CREATE_SHARED_WOW_VDM)
FIXME(module, "(%s,...): CREATE_SHARED_WOW_VDM ignored\n", name); FIXME_(module)("(%s,...): CREATE_SHARED_WOW_VDM ignored\n", name);
if (dwCreationFlags & CREATE_DEFAULT_ERROR_MODE) if (dwCreationFlags & CREATE_DEFAULT_ERROR_MODE)
FIXME(module, "(%s,...): CREATE_DEFAULT_ERROR_MODE ignored\n", name); FIXME_(module)("(%s,...): CREATE_DEFAULT_ERROR_MODE ignored\n", name);
if (dwCreationFlags & CREATE_NO_WINDOW) if (dwCreationFlags & CREATE_NO_WINDOW)
FIXME(module, "(%s,...): CREATE_NO_WINDOW ignored\n", name); FIXME_(module)("(%s,...): CREATE_NO_WINDOW ignored\n", name);
if (dwCreationFlags & PROFILE_USER) if (dwCreationFlags & PROFILE_USER)
FIXME(module, "(%s,...): PROFILE_USER ignored\n", name); FIXME_(module)("(%s,...): PROFILE_USER ignored\n", name);
if (dwCreationFlags & PROFILE_KERNEL) if (dwCreationFlags & PROFILE_KERNEL)
FIXME(module, "(%s,...): PROFILE_KERNEL ignored\n", name); FIXME_(module)("(%s,...): PROFILE_KERNEL ignored\n", name);
if (dwCreationFlags & PROFILE_SERVER) if (dwCreationFlags & PROFILE_SERVER)
FIXME(module, "(%s,...): PROFILE_SERVER ignored\n", name); FIXME_(module)("(%s,...): PROFILE_SERVER ignored\n", name);
if (lpCurrentDirectory) if (lpCurrentDirectory)
FIXME(module, "(%s,...): lpCurrentDirectory %s ignored\n", FIXME_(module)("(%s,...): lpCurrentDirectory %s ignored\n",
name, lpCurrentDirectory); name, lpCurrentDirectory);
if (lpStartupInfo->lpDesktop) if (lpStartupInfo->lpDesktop)
FIXME(module, "(%s,...): lpStartupInfo->lpDesktop %s ignored\n", FIXME_(module)("(%s,...): lpStartupInfo->lpDesktop %s ignored\n",
name, lpStartupInfo->lpDesktop); name, lpStartupInfo->lpDesktop);
if (lpStartupInfo->lpTitle) if (lpStartupInfo->lpTitle)
FIXME(module, "(%s,...): lpStartupInfo->lpTitle %s ignored\n", FIXME_(module)("(%s,...): lpStartupInfo->lpTitle %s ignored\n",
name, lpStartupInfo->lpTitle); name, lpStartupInfo->lpTitle);
if (lpStartupInfo->dwFlags & STARTF_USECOUNTCHARS) if (lpStartupInfo->dwFlags & STARTF_USECOUNTCHARS)
FIXME(module, "(%s,...): STARTF_USECOUNTCHARS (%ld,%ld) ignored\n", FIXME_(module)("(%s,...): STARTF_USECOUNTCHARS (%ld,%ld) ignored\n",
name, lpStartupInfo->dwXCountChars, lpStartupInfo->dwYCountChars); name, lpStartupInfo->dwXCountChars, lpStartupInfo->dwYCountChars);
if (lpStartupInfo->dwFlags & STARTF_USEFILLATTRIBUTE) if (lpStartupInfo->dwFlags & STARTF_USEFILLATTRIBUTE)
FIXME(module, "(%s,...): STARTF_USEFILLATTRIBUTE %lx ignored\n", FIXME_(module)("(%s,...): STARTF_USEFILLATTRIBUTE %lx ignored\n",
name, lpStartupInfo->dwFillAttribute); name, lpStartupInfo->dwFillAttribute);
if (lpStartupInfo->dwFlags & STARTF_RUNFULLSCREEN) if (lpStartupInfo->dwFlags & STARTF_RUNFULLSCREEN)
FIXME(module, "(%s,...): STARTF_RUNFULLSCREEN ignored\n", name); FIXME_(module)("(%s,...): STARTF_RUNFULLSCREEN ignored\n", name);
if (lpStartupInfo->dwFlags & STARTF_FORCEONFEEDBACK) if (lpStartupInfo->dwFlags & STARTF_FORCEONFEEDBACK)
FIXME(module, "(%s,...): STARTF_FORCEONFEEDBACK ignored\n", name); FIXME_(module)("(%s,...): STARTF_FORCEONFEEDBACK ignored\n", name);
if (lpStartupInfo->dwFlags & STARTF_FORCEOFFFEEDBACK) if (lpStartupInfo->dwFlags & STARTF_FORCEOFFFEEDBACK)
FIXME(module, "(%s,...): STARTF_FORCEOFFFEEDBACK ignored\n", name); FIXME_(module)("(%s,...): STARTF_FORCEOFFFEEDBACK ignored\n", name);
if (lpStartupInfo->dwFlags & STARTF_USEHOTKEY) if (lpStartupInfo->dwFlags & STARTF_USEHOTKEY)
FIXME(module, "(%s,...): STARTF_USEHOTKEY ignored\n", name); FIXME_(module)("(%s,...): STARTF_USEHOTKEY ignored\n", name);
/* When in WineLib, always fork new Unix process */ /* When in WineLib, always fork new Unix process */
@ -1179,7 +1179,7 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
case SCS_PIF_BINARY: case SCS_PIF_BINARY:
case SCS_POSIX_BINARY: case SCS_POSIX_BINARY:
case SCS_OS216_BINARY: case SCS_OS216_BINARY:
FIXME( module, "Unsupported executable type: %ld\n", type ); FIXME_(module)("Unsupported executable type: %ld\n", type );
/* fall through */ /* fall through */
default: default:
@ -1216,10 +1216,10 @@ BOOL WINAPI CreateProcessW( LPCWSTR lpApplicationName, LPWSTR lpCommandLine,
StartupInfoA.lpDesktop = HEAP_strdupWtoA (GetProcessHeap(),0,lpStartupInfo->lpDesktop); StartupInfoA.lpDesktop = HEAP_strdupWtoA (GetProcessHeap(),0,lpStartupInfo->lpDesktop);
StartupInfoA.lpTitle = HEAP_strdupWtoA (GetProcessHeap(),0,lpStartupInfo->lpTitle); StartupInfoA.lpTitle = HEAP_strdupWtoA (GetProcessHeap(),0,lpStartupInfo->lpTitle);
TRACE(win32, "(%s,%s,...)\n", debugstr_w(lpApplicationName), debugstr_w(lpCommandLine)); TRACE_(win32)("(%s,%s,...)\n", debugstr_w(lpApplicationName), debugstr_w(lpCommandLine));
if (lpStartupInfo->lpReserved) if (lpStartupInfo->lpReserved)
FIXME(win32,"StartupInfo.lpReserved is used, please report (%s)\n", debugstr_w(lpStartupInfo->lpReserved)); FIXME_(win32)("StartupInfo.lpReserved is used, please report (%s)\n", debugstr_w(lpStartupInfo->lpReserved));
ret = CreateProcessA( lpApplicationNameA, lpCommandLineA, ret = CreateProcessA( lpApplicationNameA, lpCommandLineA,
lpProcessAttributes, lpThreadAttributes, lpProcessAttributes, lpThreadAttributes,
@ -1278,7 +1278,7 @@ DWORD WINAPI GetModuleFileNameA(
else else
lstrcpynA( lpFileName, wm->shortname, size ); lstrcpynA( lpFileName, wm->shortname, size );
TRACE(module, "%s\n", lpFileName ); TRACE_(module)("%s\n", lpFileName );
return strlen(lpFileName); return strlen(lpFileName);
} }
@ -1304,7 +1304,7 @@ DWORD WINAPI GetModuleFileNameW( HMODULE hModule, LPWSTR lpFileName,
HMODULE WINAPI LoadLibraryEx32W16( LPCSTR libname, HANDLE16 hf, HMODULE WINAPI LoadLibraryEx32W16( LPCSTR libname, HANDLE16 hf,
DWORD flags ) DWORD flags )
{ {
TRACE(module,"(%s,%d,%08lx)\n",libname,hf,flags); TRACE_(module)("(%s,%d,%08lx)\n",libname,hf,flags);
return LoadLibraryExA(libname, hf,flags); return LoadLibraryExA(libname, hf,flags);
} }
@ -1327,7 +1327,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HFILE hfile, DWORD flags)
if(wm && !MODULE_DllProcessAttach(wm, NULL)) if(wm && !MODULE_DllProcessAttach(wm, NULL))
{ {
WARN(module, "Attach failed for module '%s', \n", libname); WARN_(module)("Attach failed for module '%s', \n", libname);
MODULE_FreeLibrary(wm); MODULE_FreeLibrary(wm);
SetLastError(ERROR_DLL_INIT_FAILED); SetLastError(ERROR_DLL_INIT_FAILED);
wm = NULL; wm = NULL;
@ -1363,7 +1363,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
{ {
if(!(pwm->flags & WINE_MODREF_MARKER)) if(!(pwm->flags & WINE_MODREF_MARKER))
pwm->refCount++; pwm->refCount++;
TRACE(module, "Already loaded module '%s' at 0x%08x, count=%d, \n", libname, pwm->module, pwm->refCount); TRACE_(module)("Already loaded module '%s' at 0x%08x, count=%d, \n", libname, pwm->module, pwm->refCount);
LeaveCriticalSection(&PROCESS_Current()->crit_section); LeaveCriticalSection(&PROCESS_Current()->crit_section);
return pwm; return pwm;
} }
@ -1375,27 +1375,27 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
switch(plo->loadorder[i]) switch(plo->loadorder[i])
{ {
case MODULE_LOADORDER_DLL: case MODULE_LOADORDER_DLL:
TRACE(module, "Trying native dll '%s'\n", libname); TRACE_(module)("Trying native dll '%s'\n", libname);
pwm = PE_LoadLibraryExA(libname, flags, &err); pwm = PE_LoadLibraryExA(libname, flags, &err);
break; break;
case MODULE_LOADORDER_ELFDLL: case MODULE_LOADORDER_ELFDLL:
TRACE(module, "Trying elfdll '%s'\n", libname); TRACE_(module)("Trying elfdll '%s'\n", libname);
pwm = ELFDLL_LoadLibraryExA(libname, flags, &err); pwm = ELFDLL_LoadLibraryExA(libname, flags, &err);
break; break;
case MODULE_LOADORDER_SO: case MODULE_LOADORDER_SO:
TRACE(module, "Trying so-library '%s'\n", libname); TRACE_(module)("Trying so-library '%s'\n", libname);
pwm = ELF_LoadLibraryExA(libname, flags, &err); pwm = ELF_LoadLibraryExA(libname, flags, &err);
break; break;
case MODULE_LOADORDER_BI: case MODULE_LOADORDER_BI:
TRACE(module, "Trying built-in '%s'\n", libname); TRACE_(module)("Trying built-in '%s'\n", libname);
pwm = BUILTIN32_LoadLibraryExA(libname, flags, &err); pwm = BUILTIN32_LoadLibraryExA(libname, flags, &err);
break; break;
default: default:
ERR(module, "Got invalid loadorder type %d (%s index %d)\n", plo->loadorder[i], plo->modulename, i); ERR_(module)("Got invalid loadorder type %d (%s index %d)\n", plo->loadorder[i], plo->modulename, i);
/* Fall through */ /* Fall through */
case MODULE_LOADORDER_INVALID: /* We ignore this as it is an empty entry */ case MODULE_LOADORDER_INVALID: /* We ignore this as it is an empty entry */
@ -1406,7 +1406,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
if(pwm) if(pwm)
{ {
/* Initialize DLL just loaded */ /* Initialize DLL just loaded */
TRACE(module, "Loaded module '%s' at 0x%08x, \n", libname, pwm->module); TRACE_(module)("Loaded module '%s' at 0x%08x, \n", libname, pwm->module);
/* Set the refCount here so that an attach failure will */ /* Set the refCount here so that an attach failure will */
/* decrement the dependencies through the MODULE_FreeLibrary call. */ /* decrement the dependencies through the MODULE_FreeLibrary call. */
@ -1420,7 +1420,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
break; break;
} }
ERR(module, "Failed to load module '%s'; error=0x%08lx, \n", libname, err); ERR_(module)("Failed to load module '%s'; error=0x%08lx, \n", libname, err);
SetLastError(err); SetLastError(err);
LeaveCriticalSection(&PROCESS_Current()->crit_section); LeaveCriticalSection(&PROCESS_Current()->crit_section);
return NULL; return NULL;
@ -1492,7 +1492,7 @@ static void MODULE_FlushModrefs(void)
case MODULE32_BI: BUILTIN32_UnloadLibrary(wm); break; case MODULE32_BI: BUILTIN32_UnloadLibrary(wm); break;
default: default:
ERR(module, "Invalid or unhandled MODREF type %d encountered (wm=%p)\n", wm->type, wm); ERR_(module)("Invalid or unhandled MODREF type %d encountered (wm=%p)\n", wm->type, wm);
} }
} }
} }
@ -1534,7 +1534,7 @@ static void MODULE_DecRefCount( WINE_MODREF *wm )
return; return;
--wm->refCount; --wm->refCount;
TRACE( module, "(%s) refCount: %d\n", wm->modname, wm->refCount ); TRACE_(module)("(%s) refCount: %d\n", wm->modname, wm->refCount );
if ( wm->refCount == 0 ) if ( wm->refCount == 0 )
{ {
@ -1555,7 +1555,7 @@ static void MODULE_DecRefCount( WINE_MODREF *wm )
*/ */
BOOL MODULE_FreeLibrary( WINE_MODREF *wm ) BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
{ {
TRACE( module, "(%s) - START\n", wm->modname ); TRACE_(module)("(%s) - START\n", wm->modname );
/* Recursively decrement reference counts */ /* Recursively decrement reference counts */
MODULE_DecRefCount( wm ); MODULE_DecRefCount( wm );
@ -1565,7 +1565,7 @@ BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
MODULE_FlushModrefs(); MODULE_FlushModrefs();
TRACE( module, "(%s) - END\n", wm->modname ); TRACE_(module)("(%s) - END\n", wm->modname );
return FALSE; return FALSE;
} }
@ -1613,27 +1613,27 @@ FARPROC16 WINAPI WIN32_GetProcAddress16( HMODULE hModule, LPCSTR name )
FARPROC16 ret; FARPROC16 ret;
if (!hModule) { if (!hModule) {
WARN(module,"hModule may not be 0!\n"); WARN_(module)("hModule may not be 0!\n");
return (FARPROC16)0; return (FARPROC16)0;
} }
if (HIWORD(hModule)) if (HIWORD(hModule))
{ {
WARN( module, "hModule is Win32 handle (%08x)\n", hModule ); WARN_(module)("hModule is Win32 handle (%08x)\n", hModule );
return (FARPROC16)0; return (FARPROC16)0;
} }
hModule = GetExePtr( hModule ); hModule = GetExePtr( hModule );
if (HIWORD(name)) { if (HIWORD(name)) {
ordinal = NE_GetOrdinal( hModule, name ); ordinal = NE_GetOrdinal( hModule, name );
TRACE(module, "%04x '%s'\n", TRACE_(module)("%04x '%s'\n",
hModule, name ); hModule, name );
} else { } else {
ordinal = LOWORD(name); ordinal = LOWORD(name);
TRACE(module, "%04x %04x\n", TRACE_(module)("%04x %04x\n",
hModule, ordinal ); hModule, ordinal );
} }
if (!ordinal) return (FARPROC16)0; if (!ordinal) return (FARPROC16)0;
ret = NE_GetEntryPoint( hModule, ordinal ); ret = NE_GetEntryPoint( hModule, ordinal );
TRACE(module,"returning %08x\n",(UINT)ret); TRACE_(module)("returning %08x\n",(UINT)ret);
return ret; return ret;
} }
@ -1651,20 +1651,20 @@ FARPROC16 WINAPI GetProcAddress16( HMODULE16 hModule, SEGPTR name )
if (HIWORD(name) != 0) if (HIWORD(name) != 0)
{ {
ordinal = NE_GetOrdinal( hModule, (LPSTR)PTR_SEG_TO_LIN(name) ); ordinal = NE_GetOrdinal( hModule, (LPSTR)PTR_SEG_TO_LIN(name) );
TRACE(module, "%04x '%s'\n", TRACE_(module)("%04x '%s'\n",
hModule, (LPSTR)PTR_SEG_TO_LIN(name) ); hModule, (LPSTR)PTR_SEG_TO_LIN(name) );
} }
else else
{ {
ordinal = LOWORD(name); ordinal = LOWORD(name);
TRACE(module, "%04x %04x\n", TRACE_(module)("%04x %04x\n",
hModule, ordinal ); hModule, ordinal );
} }
if (!ordinal) return (FARPROC16)0; if (!ordinal) return (FARPROC16)0;
ret = NE_GetEntryPoint( hModule, ordinal ); ret = NE_GetEntryPoint( hModule, ordinal );
TRACE(module, "returning %08x\n", (UINT)ret ); TRACE_(module)("returning %08x\n", (UINT)ret );
return ret; return ret;
} }
@ -1697,9 +1697,9 @@ FARPROC MODULE_GetProcAddress(
FARPROC retproc; FARPROC retproc;
if (HIWORD(function)) if (HIWORD(function))
TRACE(win32,"(%08lx,%s)\n",(DWORD)hModule,function); TRACE_(win32)("(%08lx,%s)\n",(DWORD)hModule,function);
else else
TRACE(win32,"(%08lx,%p)\n",(DWORD)hModule,function); TRACE_(win32)("(%08lx,%p)\n",(DWORD)hModule,function);
if (!wm) { if (!wm) {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return (FARPROC)0; return (FARPROC)0;
@ -1715,7 +1715,7 @@ FARPROC MODULE_GetProcAddress(
if (!retproc) SetLastError(ERROR_PROC_NOT_FOUND); if (!retproc) SetLastError(ERROR_PROC_NOT_FOUND);
return retproc; return retproc;
default: default:
ERR(module,"wine_modref type %d not handled.\n",wm->type); ERR_(module)("wine_modref type %d not handled.\n",wm->type);
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return (FARPROC)0; return (FARPROC)0;
} }

View File

@ -25,7 +25,7 @@
#include "file.h" #include "file.h"
#include "module.h" #include "module.h"
#include "stackframe.h" #include "stackframe.h"
#include "debug.h" #include "debugtools.h"
#include "xmalloc.h" #include "xmalloc.h"
DECLARE_DEBUG_CHANNEL(dll) DECLARE_DEBUG_CHANNEL(dll)
@ -85,7 +85,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
pModuleTable = NE_MODULE_TABLE( pModule ); pModuleTable = NE_MODULE_TABLE( pModule );
hf = NE_OpenFile( pModule ); hf = NE_OpenFile( pModule );
TRACE(module, "Loading segment %d, hSeg=%04x, flags=%04x\n", TRACE_(module)("Loading segment %d, hSeg=%04x, flags=%04x\n",
segnum, pSeg->hSeg, pSeg->flags ); segnum, pSeg->hSeg, pSeg->flags );
SetFilePointer( hf, pSeg->filepos << pModule->alignment, NULL, SEEK_SET ); SetFilePointer( hf, pSeg->filepos << pModule->alignment, NULL, SEEK_SET );
if (pSeg->size) size = pSeg->size; if (pSeg->size) size = pSeg->size;
@ -117,7 +117,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
stack16Top->bp = 0; stack16Top->bp = 0;
stack16Top->ip = 0; stack16Top->ip = 0;
stack16Top->cs = 0; stack16Top->cs = 0;
TRACE(dll,"CallLoadAppSegProc(hmodule=0x%04x,hf=0x%04x,segnum=%d\n", TRACE_(dll)("CallLoadAppSegProc(hmodule=0x%04x,hf=0x%04x,segnum=%d\n",
pModule->self,hf,segnum ); pModule->self,hf,segnum );
DuplicateHandle( GetCurrentProcess(), hf, GetCurrentProcess(), &hFile32, DuplicateHandle( GetCurrentProcess(), hf, GetCurrentProcess(), &hFile32,
0, FALSE, DUPLICATE_SAME_ACCESS ); 0, FALSE, DUPLICATE_SAME_ACCESS );
@ -125,7 +125,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
new_hSeg = Callbacks->CallLoadAppSegProc(selfloadheader->LoadAppSeg, new_hSeg = Callbacks->CallLoadAppSegProc(selfloadheader->LoadAppSeg,
pModule->self, hFile16, pModule->self, hFile16,
segnum ); segnum );
TRACE(dll,"Ret CallLoadAppSegProc: hSeg = 0x%04x\n",new_hSeg); TRACE_(dll)("Ret CallLoadAppSegProc: hSeg = 0x%04x\n",new_hSeg);
_lclose16( hFile16 ); _lclose16( hFile16 );
if (SEL(new_hSeg) != SEL(old_hSeg)) { if (SEL(new_hSeg) != SEL(old_hSeg)) {
/* Self loaders like creating their own selectors; /* Self loaders like creating their own selectors;
@ -137,7 +137,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
pSeg->minsize ? pSeg->minsize : 0x10000); pSeg->minsize ? pSeg->minsize : 0x10000);
FreeSelector16(SEL(new_hSeg)); FreeSelector16(SEL(new_hSeg));
pSeg->hSeg = old_hSeg; pSeg->hSeg = old_hSeg;
TRACE(module, "New hSeg allocated for dgroup segment:Old=%d,New=%d\n", TRACE_(module)("New hSeg allocated for dgroup segment:Old=%d,New=%d\n",
old_hSeg, new_hSeg); old_hSeg, new_hSeg);
} else { } else {
FreeSelector16(SEL(pSeg->hSeg)); FreeSelector16(SEL(pSeg->hSeg));
@ -180,11 +180,11 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
ReadFile(hf, &count, sizeof(count), &res, NULL); ReadFile(hf, &count, sizeof(count), &res, NULL);
if (!count) return TRUE; if (!count) return TRUE;
TRACE(fixup, "Fixups for %.*s, segment %d, hSeg %04x\n", TRACE_(fixup)("Fixups for %.*s, segment %d, hSeg %04x\n",
*((BYTE *)pModule + pModule->name_table), *((BYTE *)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1, (char *)pModule + pModule->name_table + 1,
segnum, pSeg->hSeg ); segnum, pSeg->hSeg );
TRACE(segment, "Fixups for %.*s, segment %d, hSeg %04x\n", TRACE_(segment)("Fixups for %.*s, segment %d, hSeg %04x\n",
*((BYTE *)pModule + pModule->name_table), *((BYTE *)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1, (char *)pModule + pModule->name_table + 1,
segnum, pSeg->hSeg ); segnum, pSeg->hSeg );
@ -193,7 +193,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
if (!ReadFile( hf, reloc_entries, count * sizeof(struct relocation_entry_s), &res, NULL) || if (!ReadFile( hf, reloc_entries, count * sizeof(struct relocation_entry_s), &res, NULL) ||
(res != count * sizeof(struct relocation_entry_s))) (res != count * sizeof(struct relocation_entry_s)))
{ {
WARN(fixup, "Unable to read relocation information\n" ); WARN_(fixup)("Unable to read relocation information\n" );
return FALSE; return FALSE;
} }
@ -222,14 +222,14 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
{ {
NE_MODULE *pTarget = NE_GetPtr( module ); NE_MODULE *pTarget = NE_GetPtr( module );
if (!pTarget) if (!pTarget)
WARN(module, "Module not found: %04x, reference %d of module %*.*s\n", WARN_(module)("Module not found: %04x, reference %d of module %*.*s\n",
module, rep->target1, module, rep->target1,
*((BYTE *)pModule + pModule->name_table), *((BYTE *)pModule + pModule->name_table),
*((BYTE *)pModule + pModule->name_table), *((BYTE *)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1 ); (char *)pModule + pModule->name_table + 1 );
else else
{ {
ERR(fixup, "No implementation for %.*s.%d, setting to 0xdeadbeef\n", ERR_(fixup)("No implementation for %.*s.%d, setting to 0xdeadbeef\n",
*((BYTE *)pTarget + pTarget->name_table), *((BYTE *)pTarget + pTarget->name_table),
(char *)pTarget + pTarget->name_table + 1, (char *)pTarget + pTarget->name_table + 1,
ordinal ); ordinal );
@ -239,7 +239,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
if (TRACE_ON(fixup)) if (TRACE_ON(fixup))
{ {
NE_MODULE *pTarget = NE_GetPtr( module ); NE_MODULE *pTarget = NE_GetPtr( module );
TRACE( fixup, "%d: %.*s.%d=%04x:%04x %s\n", i + 1, TRACE_(fixup)("%d: %.*s.%d=%04x:%04x %s\n", i + 1,
*((BYTE *)pTarget + pTarget->name_table), *((BYTE *)pTarget + pTarget->name_table),
(char *)pTarget + pTarget->name_table + 1, (char *)pTarget + pTarget->name_table + 1,
ordinal, HIWORD(address), LOWORD(address), ordinal, HIWORD(address), LOWORD(address),
@ -259,7 +259,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
if (ERR_ON(fixup) && !address) if (ERR_ON(fixup) && !address)
{ {
NE_MODULE *pTarget = NE_GetPtr( module ); NE_MODULE *pTarget = NE_GetPtr( module );
ERR(fixup, "No implementation for %.*s.%s, setting to 0xdeadbeef\n", ERR_(fixup)("No implementation for %.*s.%s, setting to 0xdeadbeef\n",
*((BYTE *)pTarget + pTarget->name_table), *((BYTE *)pTarget + pTarget->name_table),
(char *)pTarget + pTarget->name_table + 1, func_name ); (char *)pTarget + pTarget->name_table + 1, func_name );
} }
@ -267,7 +267,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
if (TRACE_ON(fixup)) if (TRACE_ON(fixup))
{ {
NE_MODULE *pTarget = NE_GetPtr( module ); NE_MODULE *pTarget = NE_GetPtr( module );
TRACE( fixup, "%d: %.*s.%s=%04x:%04x %s\n", i + 1, TRACE_(fixup)("%d: %.*s.%s=%04x:%04x %s\n", i + 1,
*((BYTE *)pTarget + pTarget->name_table), *((BYTE *)pTarget + pTarget->name_table),
(char *)pTarget + pTarget->name_table + 1, (char *)pTarget + pTarget->name_table + 1,
func_name, HIWORD(address), LOWORD(address), func_name, HIWORD(address), LOWORD(address),
@ -285,7 +285,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
address = (FARPROC16)PTR_SEG_OFF_TO_SEGPTR( SEL(pSegTable[rep->target1-1].hSeg), rep->target2 ); address = (FARPROC16)PTR_SEG_OFF_TO_SEGPTR( SEL(pSegTable[rep->target1-1].hSeg), rep->target2 );
} }
TRACE( fixup,"%d: %04x:%04x %s\n", TRACE_(fixup)("%d: %04x:%04x %s\n",
i + 1, HIWORD(address), LOWORD(address), i + 1, HIWORD(address), LOWORD(address),
NE_GetRelocAddrName( rep->address_type, additive ) ); NE_GetRelocAddrName( rep->address_type, additive ) );
break; break;
@ -299,7 +299,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
* successfully emulate the coprocessor if it doesn't * successfully emulate the coprocessor if it doesn't
* exist. * exist.
*/ */
TRACE( fixup, "%d: TYPE %d, OFFSET %04x, TARGET %04x %04x %s\n", TRACE_(fixup)("%d: TYPE %d, OFFSET %04x, TARGET %04x %04x %s\n",
i + 1, rep->relocation_type, rep->offset, i + 1, rep->relocation_type, rep->offset,
rep->target1, rep->target2, rep->target1, rep->target2,
NE_GetRelocAddrName( rep->address_type, additive ) ); NE_GetRelocAddrName( rep->address_type, additive ) );
@ -314,14 +314,14 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
{ {
char module[10]; char module[10];
GetModuleName16( pModule->self, module, sizeof(module) ); GetModuleName16( pModule->self, module, sizeof(module) );
ERR( fixup, "WARNING: module %s: unknown reloc addr type = 0x%02x. Please report.\n", ERR_(fixup)("WARNING: module %s: unknown reloc addr type = 0x%02x. Please report.\n",
module, rep->address_type ); module, rep->address_type );
} }
if (additive) if (additive)
{ {
sp = PTR_SEG_OFF_TO_LIN( SEL(pSeg->hSeg), offset ); sp = PTR_SEG_OFF_TO_LIN( SEL(pSeg->hSeg), offset );
TRACE( fixup," %04x:%04x\n", offset, *sp ); TRACE_(fixup)(" %04x:%04x\n", offset, *sp );
switch (rep->address_type & 0x7f) switch (rep->address_type & 0x7f)
{ {
case NE_RADDR_LOWBYTE: case NE_RADDR_LOWBYTE:
@ -337,7 +337,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
case NE_RADDR_SELECTOR: case NE_RADDR_SELECTOR:
/* Borland creates additive records with offset zero. Strange, but OK */ /* Borland creates additive records with offset zero. Strange, but OK */
if (*sp) if (*sp)
ERR(fixup,"Additive selector to %04x.Please report\n",*sp); ERR_(fixup)("Additive selector to %04x.Please report\n",*sp);
else else
*sp = HIWORD(address); *sp = HIWORD(address);
break; break;
@ -351,7 +351,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
{ {
sp = PTR_SEG_OFF_TO_LIN( SEL(pSeg->hSeg), offset ); sp = PTR_SEG_OFF_TO_LIN( SEL(pSeg->hSeg), offset );
next_offset = *sp; next_offset = *sp;
TRACE( fixup," %04x:%04x\n", offset, *sp ); TRACE_(fixup)(" %04x:%04x\n", offset, *sp );
switch (rep->address_type & 0x7f) switch (rep->address_type & 0x7f)
{ {
case NE_RADDR_LOWBYTE: case NE_RADDR_LOWBYTE:
@ -380,7 +380,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
return TRUE; return TRUE;
unknown: unknown:
WARN(fixup, "WARNING: %d: unknown ADDR TYPE %d, " WARN_(fixup)("WARNING: %d: unknown ADDR TYPE %d, "
"TYPE %d, OFFSET %04x, TARGET %04x %04x\n", "TYPE %d, OFFSET %04x, TARGET %04x %04x\n",
i + 1, rep->address_type, rep->relocation_type, i + 1, rep->address_type, rep->relocation_type,
rep->offset, rep->target1, rep->target2); rep->offset, rep->target1, rep->target2);
@ -409,7 +409,7 @@ BOOL NE_LoadAllSegments( NE_MODULE *pModule )
DWORD oldstack; DWORD oldstack;
WORD saved_hSeg = pSegTable[pModule->dgroup - 1].hSeg; WORD saved_hSeg = pSegTable[pModule->dgroup - 1].hSeg;
TRACE(module, "%.*s is a self-loading module!\n", TRACE_(module)("%.*s is a self-loading module!\n",
*((BYTE*)pModule + pModule->name_table), *((BYTE*)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1); (char *)pModule + pModule->name_table + 1);
if (!NE_LoadSegment( pModule, 1 )) return FALSE; if (!NE_LoadSegment( pModule, 1 )) return FALSE;
@ -436,10 +436,10 @@ BOOL NE_LoadAllSegments( NE_MODULE *pModule )
DuplicateHandle( GetCurrentProcess(), NE_OpenFile(pModule), DuplicateHandle( GetCurrentProcess(), NE_OpenFile(pModule),
GetCurrentProcess(), &hf, 0, FALSE, DUPLICATE_SAME_ACCESS ); GetCurrentProcess(), &hf, 0, FALSE, DUPLICATE_SAME_ACCESS );
hFile16 = FILE_AllocDosHandle( hf ); hFile16 = FILE_AllocDosHandle( hf );
TRACE(dll,"CallBootAppProc(hModule=0x%04x,hf=0x%04x)\n", TRACE_(dll)("CallBootAppProc(hModule=0x%04x,hf=0x%04x)\n",
pModule->self,hFile16); pModule->self,hFile16);
Callbacks->CallBootAppProc(selfloadheader->BootApp, pModule->self,hFile16); Callbacks->CallBootAppProc(selfloadheader->BootApp, pModule->self,hFile16);
TRACE(dll,"Return from CallBootAppProc\n"); TRACE_(dll)("Return from CallBootAppProc\n");
_lclose16(hf); _lclose16(hf);
/* some BootApp procs overwrite the segment handle of dgroup */ /* some BootApp procs overwrite the segment handle of dgroup */
pSegTable[pModule->dgroup - 1].hSeg = saved_hSeg; pSegTable[pModule->dgroup - 1].hSeg = saved_hSeg;
@ -470,7 +470,7 @@ void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
WORD dgroup, num_entries, sel = SEL(pSegTable[segnum-1].hSeg); WORD dgroup, num_entries, sel = SEL(pSegTable[segnum-1].hSeg);
BYTE *pSeg, *pFunc; BYTE *pSeg, *pFunc;
TRACE(module, "(%d);\n", segnum); TRACE_(module)("(%d);\n", segnum);
if (pSegTable[segnum-1].flags & NE_SEGFLAGS_DATA) if (pSegTable[segnum-1].flags & NE_SEGFLAGS_DATA)
{ {
@ -485,7 +485,7 @@ void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
bundle = (ET_BUNDLE *)((BYTE *)pModule+pModule->entry_table); bundle = (ET_BUNDLE *)((BYTE *)pModule+pModule->entry_table);
do { do {
TRACE(module, "num_entries: %d, bundle: %p, next: %04x, pSeg: %p\n", bundle->last - bundle->first, bundle, bundle->next, pSeg); TRACE_(module)("num_entries: %d, bundle: %p, next: %04x, pSeg: %p\n", bundle->last - bundle->first, bundle, bundle->next, pSeg);
if (!(num_entries = bundle->last - bundle->first)) if (!(num_entries = bundle->last - bundle->first))
return; return;
entry = (ET_ENTRY *)((BYTE *)bundle+6); entry = (ET_ENTRY *)((BYTE *)bundle+6);
@ -495,12 +495,12 @@ void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
if (entry->segnum == segnum) if (entry->segnum == segnum)
{ {
pFunc = ((BYTE *)pSeg+entry->offs); pFunc = ((BYTE *)pSeg+entry->offs);
TRACE(module, "pFunc: %p, *(DWORD *)pFunc: %08lx, num_entries: %d\n", pFunc, *(DWORD *)pFunc, num_entries); TRACE_(module)("pFunc: %p, *(DWORD *)pFunc: %08lx, num_entries: %d\n", pFunc, *(DWORD *)pFunc, num_entries);
if (*(pFunc+2) == 0x90) if (*(pFunc+2) == 0x90)
{ {
if (*(WORD *)pFunc == 0x581e) /* push ds, pop ax */ if (*(WORD *)pFunc == 0x581e) /* push ds, pop ax */
{ {
TRACE(module, "patch %04x:%04x -> mov ax, ds\n", sel, entry->offs); TRACE_(module)("patch %04x:%04x -> mov ax, ds\n", sel, entry->offs);
*(WORD *)pFunc = 0xd88c; /* mov ax, ds */ *(WORD *)pFunc = 0xd88c; /* mov ax, ds */
} }
@ -508,7 +508,7 @@ void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
{ {
if ((entry->flags & 2)) /* public data ? */ if ((entry->flags & 2)) /* public data ? */
{ {
TRACE(module, "patch %04x:%04x -> mov ax, dgroup [%04x]\n", sel, entry->offs, dgroup); TRACE_(module)("patch %04x:%04x -> mov ax, dgroup [%04x]\n", sel, entry->offs, dgroup);
*pFunc = 0xb8; /* mov ax, */ *pFunc = 0xb8; /* mov ax, */
*(WORD *)(pFunc+1) = dgroup; *(WORD *)(pFunc+1) = dgroup;
} }
@ -516,7 +516,7 @@ void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
if ((pModule->flags & NE_FFLAGS_MULTIPLEDATA) if ((pModule->flags & NE_FFLAGS_MULTIPLEDATA)
&& (entry->flags & 1)) /* exported ? */ && (entry->flags & 1)) /* exported ? */
{ {
TRACE(module, "patch %04x:%04x -> nop, nop\n", sel, entry->offs); TRACE_(module)("patch %04x:%04x -> nop, nop\n", sel, entry->offs);
*(WORD *)pFunc = 0x9090; /* nop, nop */ *(WORD *)pFunc = 0x9090; /* nop, nop */
} }
} }
@ -541,7 +541,7 @@ DWORD WINAPI PatchCodeHandle16(HANDLE16 hSeg)
NE_MODULE *pModule = NE_GetPtr(FarGetOwner16(sel)); NE_MODULE *pModule = NE_GetPtr(FarGetOwner16(sel));
SEGTABLEENTRY *pSegTable = NE_SEG_TABLE(pModule); SEGTABLEENTRY *pSegTable = NE_SEG_TABLE(pModule);
TRACE(module, "(%04x);\n", hSeg); TRACE_(module)("(%04x);\n", hSeg);
/* find the segment number of the module that belongs to hSeg */ /* find the segment number of the module that belongs to hSeg */
for (segnum = 1; segnum <= pModule->seg_count; segnum++) for (segnum = 1; segnum <= pModule->seg_count; segnum++)
@ -565,7 +565,7 @@ void NE_FixupPrologs( NE_MODULE *pModule )
{ {
WORD segnum; WORD segnum;
TRACE(module, "(%04x)\n", pModule->self ); TRACE_(module)("(%04x)\n", pModule->self );
if (pModule->flags & NE_FFLAGS_SELFLOAD) if (pModule->flags & NE_FFLAGS_SELFLOAD)
NE_FixupSegmentPrologs(pModule, 1); NE_FixupSegmentPrologs(pModule, 1);
@ -587,7 +587,7 @@ static VOID NE_GetDLLInitParams( NE_MODULE *pModule,
if (pModule->flags & NE_FFLAGS_MULTIPLEDATA || pModule->dgroup) if (pModule->flags & NE_FFLAGS_MULTIPLEDATA || pModule->dgroup)
{ {
/* Not SINGLEDATA */ /* Not SINGLEDATA */
ERR(dll, "Library is not marked SINGLEDATA\n"); ERR_(dll)("Library is not marked SINGLEDATA\n");
exit(1); exit(1);
} }
else /* DATA NONE DLL */ else /* DATA NONE DLL */
@ -662,7 +662,7 @@ static BOOL NE_InitDLL( TDB* pTask, NE_MODULE *pModule )
pModule->cs = 0; /* Don't initialize it twice */ pModule->cs = 0; /* Don't initialize it twice */
TRACE(dll, "Calling LibMain, cs:ip=%04lx:%04x ds=%04lx di=%04x cx=%04x\n", TRACE_(dll)("Calling LibMain, cs:ip=%04lx:%04x ds=%04lx di=%04x cx=%04x\n",
CS_reg(&context), IP_reg(&context), DS_reg(&context), CS_reg(&context), IP_reg(&context), DS_reg(&context),
DI_reg(&context), CX_reg(&context) ); DI_reg(&context), CX_reg(&context) );
Callbacks->CallRegisterShortProc( &context, 0 ); Callbacks->CallRegisterShortProc( &context, 0 );
@ -707,7 +707,7 @@ static void NE_CallDllEntryPoint( NE_MODULE *pModule, DWORD dwReason )
*(DWORD *)(stack - 14) = 0; /* dwReserved1 */ *(DWORD *)(stack - 14) = 0; /* dwReserved1 */
*(WORD *) (stack - 16) = 0; /* wReserved2 */ *(WORD *) (stack - 16) = 0; /* wReserved2 */
TRACE(dll, "Calling DllEntryPoint, cs:ip=%04lx:%04x\n", TRACE_(dll)("Calling DllEntryPoint, cs:ip=%04lx:%04x\n",
CS_reg(&context), IP_reg(&context)); CS_reg(&context), IP_reg(&context));
Callbacks->CallRegisterShortProc( &context, 16 ); Callbacks->CallRegisterShortProc( &context, 16 );

View File

@ -56,7 +56,7 @@
#include "global.h" #include "global.h"
#include "task.h" #include "task.h"
#include "snoop.h" #include "snoop.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(delayhlp) DECLARE_DEBUG_CHANNEL(delayhlp)
DECLARE_DEBUG_CHANNEL(fixup) DECLARE_DEBUG_CHANNEL(fixup)
@ -87,15 +87,15 @@ void dump_exports( HMODULE hModule )
IMAGE_EXPORT_DIRECTORY *pe_exports = (IMAGE_EXPORT_DIRECTORY*)RVA(rva_start); IMAGE_EXPORT_DIRECTORY *pe_exports = (IMAGE_EXPORT_DIRECTORY*)RVA(rva_start);
Module = (char*)RVA(pe_exports->Name); Module = (char*)RVA(pe_exports->Name);
TRACE(win32,"*******EXPORT DATA*******\n"); TRACE_(win32)("*******EXPORT DATA*******\n");
TRACE(win32,"Module name is %s, %ld functions, %ld names\n", TRACE_(win32)("Module name is %s, %ld functions, %ld names\n",
Module, pe_exports->NumberOfFunctions, pe_exports->NumberOfNames); Module, pe_exports->NumberOfFunctions, pe_exports->NumberOfNames);
ordinal=(u_short*) RVA(pe_exports->AddressOfNameOrdinals); ordinal=(u_short*) RVA(pe_exports->AddressOfNameOrdinals);
functions=function=(u_long*) RVA(pe_exports->AddressOfFunctions); functions=function=(u_long*) RVA(pe_exports->AddressOfFunctions);
name=(u_char**) RVA(pe_exports->AddressOfNames); name=(u_char**) RVA(pe_exports->AddressOfNames);
TRACE(win32," Ord RVA Addr Name\n" ); TRACE_(win32)(" Ord RVA Addr Name\n" );
for (i=0;i<pe_exports->NumberOfFunctions;i++, function++) for (i=0;i<pe_exports->NumberOfFunctions;i++, function++)
{ {
if (!*function) continue; /* No such function */ if (!*function) continue; /* No such function */
@ -110,7 +110,7 @@ void dump_exports( HMODULE hModule )
dsprintf(win32, " %s", (char*)RVA(name[j]) ); dsprintf(win32, " %s", (char*)RVA(name[j]) );
if ((*function >= rva_start) && (*function <= rva_end)) if ((*function >= rva_start) && (*function <= rva_end))
dsprintf(win32, " (forwarded -> %s)", (char *)RVA(*function)); dsprintf(win32, " (forwarded -> %s)", (char *)RVA(*function));
TRACE(win32,"%s\n", dbg_str(win32)); TRACE_(win32)("%s\n", dbg_str(win32));
} }
} }
} }
@ -139,15 +139,15 @@ FARPROC PE_FindExportedFunction(
char * forward; char * forward;
if (HIWORD(funcName)) if (HIWORD(funcName))
TRACE(win32,"(%s)\n",funcName); TRACE_(win32)("(%s)\n",funcName);
else else
TRACE(win32,"(%d)\n",(int)funcName); TRACE_(win32)("(%d)\n",(int)funcName);
if (!exports) { if (!exports) {
/* Not a fatal problem, some apps do /* Not a fatal problem, some apps do
* GetProcAddress(0,"RegisterPenApp") which triggers this * GetProcAddress(0,"RegisterPenApp") which triggers this
* case. * case.
*/ */
WARN(win32,"Module %08x(%s)/MODREF %p doesn't have a exports table.\n",wm->module,wm->modname,pem); WARN_(win32)("Module %08x(%s)/MODREF %p doesn't have a exports table.\n",wm->module,wm->modname,pem);
return NULL; return NULL;
} }
ordinal = (u_short*) RVA(exports->AddressOfNameOrdinals); ordinal = (u_short*) RVA(exports->AddressOfNameOrdinals);
@ -178,7 +178,7 @@ FARPROC PE_FindExportedFunction(
} else { } else {
int i; int i;
if (LOWORD(funcName)-exports->Base > exports->NumberOfFunctions) { if (LOWORD(funcName)-exports->Base > exports->NumberOfFunctions) {
TRACE(win32," ordinal %d out of range!\n", TRACE_(win32)(" ordinal %d out of range!\n",
LOWORD(funcName)); LOWORD(funcName));
return NULL; return NULL;
} }
@ -234,12 +234,12 @@ DWORD fixup_imports( WINE_MODREF *wm )
modname = "<unknown>"; modname = "<unknown>";
/* OK, now dump the import list */ /* OK, now dump the import list */
TRACE(win32, "Dumping imports list\n"); TRACE_(win32)("Dumping imports list\n");
/* first, count the number of imported non-internal modules */ /* first, count the number of imported non-internal modules */
pe_imp = pem->pe_import; pe_imp = pem->pe_import;
if (!pe_imp) if (!pe_imp)
ERR(win32, "no import directory????\n"); ERR_(win32)("no import directory????\n");
/* We assume that we have at least one import with !0 characteristics and /* We assume that we have at least one import with !0 characteristics and
* detect broken imports with all characteristsics 0 (notably Borland) and * detect broken imports with all characteristsics 0 (notably Borland) and
@ -283,7 +283,7 @@ DWORD fixup_imports( WINE_MODREF *wm )
wmImp = MODULE_LoadLibraryExA( buffer, 0, 0 ); wmImp = MODULE_LoadLibraryExA( buffer, 0, 0 );
} }
if (!wmImp) { if (!wmImp) {
ERR (module, "Module %s not found\n", name); ERR_(module)("Module %s not found\n", name);
return 1; return 1;
} }
wm->deps[i++] = wmImp; wm->deps[i++] = wmImp;
@ -291,7 +291,7 @@ DWORD fixup_imports( WINE_MODREF *wm )
/* FIXME: forwarder entries ... */ /* FIXME: forwarder entries ... */
if (pe_imp->u.OriginalFirstThunk != 0) { /* original MS style */ if (pe_imp->u.OriginalFirstThunk != 0) { /* original MS style */
TRACE(win32, "Microsoft style imports used\n"); TRACE_(win32)("Microsoft style imports used\n");
import_list =(PIMAGE_THUNK_DATA) RVA(pe_imp->u.OriginalFirstThunk); import_list =(PIMAGE_THUNK_DATA) RVA(pe_imp->u.OriginalFirstThunk);
thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk); thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk);
@ -299,23 +299,23 @@ DWORD fixup_imports( WINE_MODREF *wm )
if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal)) { if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal)) {
int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal); int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);
TRACE(win32, "--- Ordinal %s,%d\n", name, ordinal); TRACE_(win32)("--- Ordinal %s,%d\n", name, ordinal);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, (LPCSTR)ordinal, TRUE wmImp->module, (LPCSTR)ordinal, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR(win32,"No implementation for %s.%d, setting to 0xdeadbeef\n", ERR_(win32)("No implementation for %s.%d, setting to 0xdeadbeef\n",
name, ordinal); name, ordinal);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
} else { /* import by name */ } else { /* import by name */
pe_name = (PIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData); pe_name = (PIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData);
TRACE(win32, "--- %s %s.%d\n", pe_name->Name, name, pe_name->Hint); TRACE_(win32)("--- %s %s.%d\n", pe_name->Name, name, pe_name->Hint);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, pe_name->Name, TRUE wmImp->module, pe_name->Name, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR(win32,"No implementation for %s.%d(%s), setting to 0xdeadbeef\n", ERR_(win32)("No implementation for %s.%d(%s), setting to 0xdeadbeef\n",
name,pe_name->Hint,pe_name->Name); name,pe_name->Hint,pe_name->Name);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
@ -324,31 +324,31 @@ DWORD fixup_imports( WINE_MODREF *wm )
thunk_list++; thunk_list++;
} }
} else { /* Borland style */ } else { /* Borland style */
TRACE(win32, "Borland style imports used\n"); TRACE_(win32)("Borland style imports used\n");
thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk); thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk);
while (thunk_list->u1.Ordinal) { while (thunk_list->u1.Ordinal) {
if (IMAGE_SNAP_BY_ORDINAL(thunk_list->u1.Ordinal)) { if (IMAGE_SNAP_BY_ORDINAL(thunk_list->u1.Ordinal)) {
/* not sure about this branch, but it seems to work */ /* not sure about this branch, but it seems to work */
int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal); int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal);
TRACE(win32,"--- Ordinal %s.%d\n",name,ordinal); TRACE_(win32)("--- Ordinal %s.%d\n",name,ordinal);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, (LPCSTR) ordinal, TRUE wmImp->module, (LPCSTR) ordinal, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR(win32, "No implementation for %s.%d, setting to 0xdeadbeef\n", ERR_(win32)("No implementation for %s.%d, setting to 0xdeadbeef\n",
name,ordinal); name,ordinal);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
} else { } else {
pe_name=(PIMAGE_IMPORT_BY_NAME) RVA(thunk_list->u1.AddressOfData); pe_name=(PIMAGE_IMPORT_BY_NAME) RVA(thunk_list->u1.AddressOfData);
TRACE(win32,"--- %s %s.%d\n", TRACE_(win32)("--- %s %s.%d\n",
pe_name->Name,name,pe_name->Hint); pe_name->Name,name,pe_name->Hint);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, pe_name->Name, TRUE wmImp->module, pe_name->Name, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR(win32, "No implementation for %s.%d, setting to 0xdeadbeef\n", ERR_(win32)("No implementation for %s.%d, setting to 0xdeadbeef\n",
name, pe_name->Hint); name, pe_name->Hint);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
@ -365,11 +365,11 @@ static int calc_vma_size( HMODULE hModule )
int i,vma_size = 0; int i,vma_size = 0;
IMAGE_SECTION_HEADER *pe_seg = PE_SECTIONS(hModule); IMAGE_SECTION_HEADER *pe_seg = PE_SECTIONS(hModule);
TRACE(win32, "Dump of segment table\n"); TRACE_(win32)("Dump of segment table\n");
TRACE(win32, " Name VSz Vaddr SzRaw Fileadr *Reloc *Lineum #Reloc #Linum Char\n"); TRACE_(win32)(" Name VSz Vaddr SzRaw Fileadr *Reloc *Lineum #Reloc #Linum Char\n");
for (i = 0; i< PE_HEADER(hModule)->FileHeader.NumberOfSections; i++) for (i = 0; i< PE_HEADER(hModule)->FileHeader.NumberOfSections; i++)
{ {
TRACE(win32, "%8s: %4.4lx %8.8lx %8.8lx %8.8lx %8.8lx %8.8lx %4.4x %4.4x %8.8lx\n", TRACE_(win32)("%8s: %4.4lx %8.8lx %8.8lx %8.8lx %8.8lx %8.8lx %4.4x %4.4x %8.8lx\n",
pe_seg->Name, pe_seg->Name,
pe_seg->Misc.VirtualSize, pe_seg->Misc.VirtualSize,
pe_seg->VirtualAddress, pe_seg->VirtualAddress,
@ -401,14 +401,14 @@ static void do_relocations( unsigned int load_addr, IMAGE_BASE_RELOCATION *r )
char *page = (char*) RVA(r->VirtualAddress); char *page = (char*) RVA(r->VirtualAddress);
int count = (r->SizeOfBlock - 8)/2; int count = (r->SizeOfBlock - 8)/2;
int i; int i;
TRACE(fixup, "%x relocations for page %lx\n", TRACE_(fixup)("%x relocations for page %lx\n",
count, r->VirtualAddress); count, r->VirtualAddress);
/* patching in reverse order */ /* patching in reverse order */
for(i=0;i<count;i++) for(i=0;i<count;i++)
{ {
int offset = r->TypeOffset[i] & 0xFFF; int offset = r->TypeOffset[i] & 0xFFF;
int type = r->TypeOffset[i] >> 12; int type = r->TypeOffset[i] >> 12;
TRACE(fixup,"patching %x type %x\n", offset, type); TRACE_(fixup)("patching %x type %x\n", offset, type);
switch(type) switch(type)
{ {
case IMAGE_REL_BASED_ABSOLUTE: break; case IMAGE_REL_BASED_ABSOLUTE: break;
@ -429,13 +429,13 @@ static void do_relocations( unsigned int load_addr, IMAGE_BASE_RELOCATION *r )
#endif #endif
break; break;
case IMAGE_REL_BASED_HIGHADJ: case IMAGE_REL_BASED_HIGHADJ:
FIXME(win32, "Don't know what to do with IMAGE_REL_BASED_HIGHADJ\n"); FIXME_(win32)("Don't know what to do with IMAGE_REL_BASED_HIGHADJ\n");
break; break;
case IMAGE_REL_BASED_MIPS_JMPADDR: case IMAGE_REL_BASED_MIPS_JMPADDR:
FIXME(win32, "Is this a MIPS machine ???\n"); FIXME_(win32)("Is this a MIPS machine ???\n");
break; break;
default: default:
FIXME(win32, "Unknown fixup type\n"); FIXME_(win32)("Unknown fixup type\n");
break; break;
} }
} }
@ -478,14 +478,14 @@ HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName )
0, 0, NULL ); 0, 0, NULL );
if (!mapping) if (!mapping)
{ {
WARN( win32, "CreateFileMapping error %ld\n", GetLastError() ); WARN_(win32)("CreateFileMapping error %ld\n", GetLastError() );
return 0; return 0;
} }
hModule = (HMODULE)MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); hModule = (HMODULE)MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 );
CloseHandle( mapping ); CloseHandle( mapping );
if (!hModule) if (!hModule)
{ {
WARN( win32, "MapViewOfFile error %ld\n", GetLastError() ); WARN_(win32)("MapViewOfFile error %ld\n", GetLastError() );
return 0; return 0;
} }
nt = PE_HEADER( hModule ); nt = PE_HEADER( hModule );
@ -493,7 +493,7 @@ HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName )
/* Check signature */ /* Check signature */
if ( nt->Signature != IMAGE_NT_SIGNATURE ) if ( nt->Signature != IMAGE_NT_SIGNATURE )
{ {
WARN(win32, "image doesn't have PE signature, but 0x%08lx\n", WARN_(win32)("image doesn't have PE signature, but 0x%08lx\n",
nt->Signature ); nt->Signature );
goto error; goto error;
} }
@ -501,19 +501,19 @@ HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName )
/* Check architecture */ /* Check architecture */
if ( nt->FileHeader.Machine != IMAGE_FILE_MACHINE_I386 ) if ( nt->FileHeader.Machine != IMAGE_FILE_MACHINE_I386 )
{ {
MSG("Trying to load PE image for unsupported architecture ("); MESSAGE("Trying to load PE image for unsupported architecture (");
switch (nt->FileHeader.Machine) switch (nt->FileHeader.Machine)
{ {
case IMAGE_FILE_MACHINE_UNKNOWN: MSG("Unknown"); break; case IMAGE_FILE_MACHINE_UNKNOWN: MESSAGE("Unknown"); break;
case IMAGE_FILE_MACHINE_I860: MSG("I860"); break; case IMAGE_FILE_MACHINE_I860: MESSAGE("I860"); break;
case IMAGE_FILE_MACHINE_R3000: MSG("R3000"); break; case IMAGE_FILE_MACHINE_R3000: MESSAGE("R3000"); break;
case IMAGE_FILE_MACHINE_R4000: MSG("R4000"); break; case IMAGE_FILE_MACHINE_R4000: MESSAGE("R4000"); break;
case IMAGE_FILE_MACHINE_R10000: MSG("R10000"); break; case IMAGE_FILE_MACHINE_R10000: MESSAGE("R10000"); break;
case IMAGE_FILE_MACHINE_ALPHA: MSG("Alpha"); break; case IMAGE_FILE_MACHINE_ALPHA: MESSAGE("Alpha"); break;
case IMAGE_FILE_MACHINE_POWERPC: MSG("PowerPC"); break; case IMAGE_FILE_MACHINE_POWERPC: MESSAGE("PowerPC"); break;
default: MSG("Unknown-%04x", nt->FileHeader.Machine); break; default: MESSAGE("Unknown-%04x", nt->FileHeader.Machine); break;
} }
MSG(")\n"); MESSAGE(")\n");
goto error; goto error;
} }
@ -535,7 +535,7 @@ HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName )
/* Check file size */ /* Check file size */
if ( file_size && file_size < rawsize ) if ( file_size && file_size < rawsize )
{ {
ERR( win32, "PE module is too small (header: %d, filesize: %d), " ERR_(win32)("PE module is too small (header: %d, filesize: %d), "
"probably truncated download?\n", "probably truncated download?\n",
rawsize, file_size ); rawsize, file_size );
goto error; goto error;
@ -544,7 +544,7 @@ HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName )
/* Check entrypoint address */ /* Check entrypoint address */
aoep = nt->OptionalHeader.AddressOfEntryPoint; aoep = nt->OptionalHeader.AddressOfEntryPoint;
if (aoep && (aoep < lowest_va)) if (aoep && (aoep < lowest_va))
FIXME( win32, "WARNING: '%s' has an invalid entrypoint (0x%08lx) " FIXME_(win32)("WARNING: '%s' has an invalid entrypoint (0x%08lx) "
"below the first virtual address (0x%08x) " "below the first virtual address (0x%08x) "
"(possible Virus Infection or broken binary)!\n", "(possible Virus Infection or broken binary)!\n",
ofs->szPathName, aoep, lowest_va ); ofs->szPathName, aoep, lowest_va );
@ -565,7 +565,7 @@ HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName )
reloc = dir->VirtualAddress; reloc = dir->VirtualAddress;
else else
{ {
FIXME( win32, FIXME_(win32)(
"FATAL: Need to relocate %s, but no relocation records present (%s). Try to run that file directly !\n", "FATAL: Need to relocate %s, but no relocation records present (%s). Try to run that file directly !\n",
ofs->szPathName, ofs->szPathName,
(nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)? (nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?
@ -578,9 +578,9 @@ HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName )
PAGE_EXECUTE_READWRITE ); PAGE_EXECUTE_READWRITE );
} }
TRACE( win32, "Load addr is %lx (base %lx), range %x\n", TRACE_(win32)("Load addr is %lx (base %lx), range %x\n",
load_addr, nt->OptionalHeader.ImageBase, vma_size ); load_addr, nt->OptionalHeader.ImageBase, vma_size );
TRACE( segment, "Loading %s at %lx, range %x\n", TRACE_(segment)("Loading %s at %lx, range %x\n",
ofs->szPathName, load_addr, vma_size ); ofs->szPathName, load_addr, vma_size );
/* Store the NT header at the load addr */ /* Store the NT header at the load addr */
@ -676,38 +676,38 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule,
pe_resource = (PIMAGE_RESOURCE_DIRECTORY)RVA(dir->VirtualAddress); pe_resource = (PIMAGE_RESOURCE_DIRECTORY)RVA(dir->VirtualAddress);
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_EXCEPTION; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_EXCEPTION;
if (dir->Size) FIXME( win32, "Exception directory ignored\n" ); if (dir->Size) FIXME_(win32)("Exception directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_SECURITY; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_SECURITY;
if (dir->Size) FIXME( win32, "Security directory ignored\n" ); if (dir->Size) FIXME_(win32)("Security directory ignored\n" );
/* IMAGE_DIRECTORY_ENTRY_BASERELOC handled in PE_LoadImage */ /* IMAGE_DIRECTORY_ENTRY_BASERELOC handled in PE_LoadImage */
/* IMAGE_DIRECTORY_ENTRY_DEBUG handled by debugger */ /* IMAGE_DIRECTORY_ENTRY_DEBUG handled by debugger */
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DEBUG; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DEBUG;
if (dir->Size) TRACE( win32, "Debug directory ignored\n" ); if (dir->Size) TRACE_(win32)("Debug directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COPYRIGHT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COPYRIGHT;
if (dir->Size) FIXME( win32, "Copyright string ignored\n" ); if (dir->Size) FIXME_(win32)("Copyright string ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_GLOBALPTR; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_GLOBALPTR;
if (dir->Size) FIXME( win32, "Global Pointer (MIPS) ignored\n" ); if (dir->Size) FIXME_(win32)("Global Pointer (MIPS) ignored\n" );
/* IMAGE_DIRECTORY_ENTRY_TLS handled in PE_TlsInit */ /* IMAGE_DIRECTORY_ENTRY_TLS handled in PE_TlsInit */
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG;
if (dir->Size) FIXME (win32, "Load Configuration directory ignored\n" ); if (dir->Size) FIXME_(win32)("Load Configuration directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT;
if (dir->Size) TRACE( win32, "Bound Import directory ignored\n" ); if (dir->Size) TRACE_(win32)("Bound Import directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_IAT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_IAT;
if (dir->Size) TRACE( win32, "Import Address Table directory ignored\n" ); if (dir->Size) TRACE_(win32)("Import Address Table directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT;
if (dir->Size) if (dir->Size)
{ {
TRACE( win32, "Delayed import, stub calls LoadLibrary\n" ); TRACE_(win32)("Delayed import, stub calls LoadLibrary\n" );
/* /*
* Nothing to do here. * Nothing to do here.
*/ */
@ -719,23 +719,23 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule,
{ {
ImgDelayDescr *pe_delay = NULL; ImgDelayDescr *pe_delay = NULL;
pe_delay = (PImgDelayDescr)RVA(dir->VirtualAddress); pe_delay = (PImgDelayDescr)RVA(dir->VirtualAddress);
TRACE(delayhlp,"pe_delay->grAttrs = %08x\n", pe_delay->grAttrs); TRACE_(delayhlp)("pe_delay->grAttrs = %08x\n", pe_delay->grAttrs);
TRACE(delayhlp,"pe_delay->szName = %s\n", pe_delay->szName); TRACE_(delayhlp)("pe_delay->szName = %s\n", pe_delay->szName);
TRACE(delayhlp,"pe_delay->phmod = %08x\n", pe_delay->phmod); TRACE_(delayhlp)("pe_delay->phmod = %08x\n", pe_delay->phmod);
TRACE(delayhlp,"pe_delay->pIAT = %08x\n", pe_delay->pIAT); TRACE_(delayhlp)("pe_delay->pIAT = %08x\n", pe_delay->pIAT);
TRACE(delayhlp,"pe_delay->pINT = %08x\n", pe_delay->pINT); TRACE_(delayhlp)("pe_delay->pINT = %08x\n", pe_delay->pINT);
TRACE(delayhlp,"pe_delay->pBoundIAT = %08x\n", pe_delay->pBoundIAT); TRACE_(delayhlp)("pe_delay->pBoundIAT = %08x\n", pe_delay->pBoundIAT);
TRACE(delayhlp,"pe_delay->pUnloadIAT = %08x\n", pe_delay->pUnloadIAT); TRACE_(delayhlp)("pe_delay->pUnloadIAT = %08x\n", pe_delay->pUnloadIAT);
TRACE(delayhlp,"pe_delay->dwTimeStamp = %08x\n", pe_delay->dwTimeStamp); TRACE_(delayhlp)("pe_delay->dwTimeStamp = %08x\n", pe_delay->dwTimeStamp);
} }
#endif /* ImgDelayDescr */ #endif /* ImgDelayDescr */
} }
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR;
if (dir->Size) FIXME( win32, "Unknown directory 14 ignored\n" ); if (dir->Size) FIXME_(win32)("Unknown directory 14 ignored\n" );
dir = nt->OptionalHeader.DataDirectory+15; dir = nt->OptionalHeader.DataDirectory+15;
if (dir->Size) FIXME( win32, "Unknown directory 15 ignored\n" ); if (dir->Size) FIXME_(win32)("Unknown directory 15 ignored\n" );
/* Allocate and fill WINE_MODREF */ /* Allocate and fill WINE_MODREF */
@ -785,7 +785,7 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule,
if ( !(nt->FileHeader.Characteristics & IMAGE_FILE_DLL) ) if ( !(nt->FileHeader.Characteristics & IMAGE_FILE_DLL) )
{ {
if ( PROCESS_Current()->exe_modref ) if ( PROCESS_Current()->exe_modref )
FIXME( win32, "overwriting old exe_modref... arrgh\n" ); FIXME_(win32)("overwriting old exe_modref... arrgh\n" );
PROCESS_Current()->exe_modref = wm; PROCESS_Current()->exe_modref = wm;
} }
@ -881,7 +881,7 @@ WINE_MODREF *PE_LoadLibraryExA (LPCSTR name, DWORD flags, DWORD *err)
/* Create 32-bit MODREF */ /* Create 32-bit MODREF */
if ( !(wm = PE_CreateModule( hModule32, &ofs, flags, builtin )) ) if ( !(wm = PE_CreateModule( hModule32, &ofs, flags, builtin )) )
{ {
ERR(win32,"can't load %s\n",ofs.szPathName); ERR_(win32)("can't load %s\n",ofs.szPathName);
FreeLibrary16( hModule16 ); FreeLibrary16( hModule16 );
*err = ERROR_OUTOFMEMORY; *err = ERROR_OUTOFMEMORY;
return NULL; return NULL;
@ -960,7 +960,7 @@ BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line, LPCSTR env,
*/ */
int PE_UnloadImage( HMODULE hModule ) int PE_UnloadImage( HMODULE hModule )
{ {
FIXME(win32,"stub.\n"); FIXME_(win32)("stub.\n");
/* free resources, image, unmap */ /* free resources, image, unmap */
return 1; return 1;
} }
@ -980,7 +980,7 @@ BOOL PE_InitDLL( WINE_MODREF *wm, DWORD type, LPVOID lpReserved )
(PE_HEADER(wm->module)->OptionalHeader.AddressOfEntryPoint) (PE_HEADER(wm->module)->OptionalHeader.AddressOfEntryPoint)
) { ) {
DLLENTRYPROC entry = (void*)RVA_PTR( wm->module,OptionalHeader.AddressOfEntryPoint ); DLLENTRYPROC entry = (void*)RVA_PTR( wm->module,OptionalHeader.AddressOfEntryPoint );
TRACE(relay, "CallTo32(entryproc=%p,module=%08x,type=%ld,res=%p)\n", TRACE_(relay)("CallTo32(entryproc=%p,module=%08x,type=%ld,res=%p)\n",
entry, wm->module, type, lpReserved ); entry, wm->module, type, lpReserved );
retv = entry( wm->module, type, lpReserved ); retv = entry( wm->module, type, lpReserved );
@ -1031,7 +1031,7 @@ void PE_InitTls( void )
(PIMAGE_TLS_CALLBACK *)pdir->AddressOfCallBacks; (PIMAGE_TLS_CALLBACK *)pdir->AddressOfCallBacks;
if (*cbs) if (*cbs)
FIXME(win32, "TLS Callbacks aren't going to be called\n"); FIXME_(win32)("TLS Callbacks aren't going to be called\n");
} }
TlsSetValue( pem->tlsindex, mem ); TlsSetValue( pem->tlsindex, mem );

View File

@ -27,7 +27,7 @@
#include "process.h" #include "process.h"
#include "module.h" #include "module.h"
#include "file.h" #include "file.h"
#include "debug.h" #include "debugtools.h"
#include "libres.h" #include "libres.h"
#include "winerror.h" #include "winerror.h"
#include "debugstr.h" #include "debugstr.h"
@ -67,7 +67,7 @@ static HRSRC16 MapHRsrc32To16( NE_MODULE *pModule, HANDLE hRsrc32, WORD type )
if ( !(map = (HRSRC_MAP *)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, if ( !(map = (HRSRC_MAP *)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(HRSRC_MAP) ) ) ) sizeof(HRSRC_MAP) ) ) )
{ {
ERR( resource, "Cannot allocate HRSRC map\n" ); ERR_(resource)("Cannot allocate HRSRC map\n" );
return 0; return 0;
} }
pModule->hRsrcMap = (LPVOID)map; pModule->hRsrcMap = (LPVOID)map;
@ -86,7 +86,7 @@ static HRSRC16 MapHRsrc32To16( NE_MODULE *pModule, HANDLE hRsrc32, WORD type )
(map->nAlloc + HRSRC_MAP_BLOCKSIZE) (map->nAlloc + HRSRC_MAP_BLOCKSIZE)
* sizeof(HRSRC_ELEM) ) )) * sizeof(HRSRC_ELEM) ) ))
{ {
ERR( resource, "Cannot grow HRSRC map\n" ); ERR_(resource)("Cannot grow HRSRC map\n" );
return 0; return 0;
} }
map->elem = newElem; map->elem = newElem;
@ -138,7 +138,7 @@ static HRSRC RES_FindResource( HMODULE hModule, LPCSTR type,
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE( resource, "(%08x %s, %08x%s, %08x%s, %04x, %s, %s)\n", TRACE_(resource)("(%08x %s, %08x%s, %08x%s, %04x, %s, %s)\n",
hModule, NE_MODULE_NAME(pModule), hModule, NE_MODULE_NAME(pModule),
(UINT)type, HIWORD(type)? (bUnicode? debugstr_w((LPWSTR)type) : debugstr_a(type)) : "", (UINT)type, HIWORD(type)? (bUnicode? debugstr_w((LPWSTR)type) : debugstr_a(type)) : "",
(UINT)name, HIWORD(name)? (bUnicode? debugstr_w((LPWSTR)name) : debugstr_a(name)) : "", (UINT)name, HIWORD(name)? (bUnicode? debugstr_w((LPWSTR)name) : debugstr_a(name)) : "",
@ -173,7 +173,7 @@ static HRSRC RES_FindResource( HMODULE hModule, LPCSTR type,
break; break;
default: default:
ERR( resource, "unknown module type %d\n", wm->type ); ERR_(resource)("unknown module type %d\n", wm->type );
break; break;
} }
@ -229,7 +229,7 @@ static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE( resource, "(%08x %s, %08x, %s)\n", TRACE_(resource)("(%08x %s, %08x, %s)\n",
hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" ); hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" );
if ( !pModule || !hRsrc ) return 0; if ( !pModule || !hRsrc ) return 0;
@ -252,7 +252,7 @@ static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
break; break;
default: default:
ERR( resource, "unknown module type %d\n", wm->type ); ERR_(resource)("unknown module type %d\n", wm->type );
break; break;
} }
} }
@ -280,7 +280,7 @@ static HFILE RES_AccessResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE( resource, "(%08x %s, %08x, %s)\n", TRACE_(resource)("(%08x %s, %08x, %s)\n",
hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" ); hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" );
if ( !pModule || !hRsrc ) return HFILE_ERROR; if ( !pModule || !hRsrc ) return HFILE_ERROR;
@ -293,7 +293,7 @@ static HFILE RES_AccessResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
HRSRC hRsrc32 = HIWORD(hRsrc)? hRsrc : MapHRsrc16To32( pModule, hRsrc ); HRSRC hRsrc32 = HIWORD(hRsrc)? hRsrc : MapHRsrc16To32( pModule, hRsrc );
#endif #endif
FIXME( resource, "32-bit modules not yet supported.\n" ); FIXME_(resource)("32-bit modules not yet supported.\n" );
hFile = HFILE_ERROR; hFile = HFILE_ERROR;
/* If we need to return a 16-bit file handle, convert it */ /* If we need to return a 16-bit file handle, convert it */
@ -328,7 +328,7 @@ static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE( resource, "(%08x %s, %08x, %s)\n", TRACE_(resource)("(%08x %s, %08x, %s)\n",
hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" ); hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" );
if ( !pModule || !hRsrc ) return 0; if ( !pModule || !hRsrc ) return 0;
@ -351,7 +351,7 @@ static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
break; break;
default: default:
ERR( resource, "unknown module type %d\n", wm->type ); ERR_(resource)("unknown module type %d\n", wm->type );
break; break;
} }
@ -387,14 +387,14 @@ static LPVOID RES_LockResource( HGLOBAL handle, BOOL bRet16 )
{ {
LPVOID bits = NULL; LPVOID bits = NULL;
TRACE( resource, "(%08x, %s)\n", handle, bRet16? "NE" : "PE" ); TRACE_(resource)("(%08x, %s)\n", handle, bRet16? "NE" : "PE" );
if ( HIWORD( handle ) ) if ( HIWORD( handle ) )
{ {
/* 32-bit memory handle */ /* 32-bit memory handle */
if ( bRet16 ) if ( bRet16 )
FIXME( resource, "can't return SEGPTR to 32-bit resource %08x.\n", handle ); FIXME_(resource)("can't return SEGPTR to 32-bit resource %08x.\n", handle );
else else
bits = (LPVOID)handle; bits = (LPVOID)handle;
} }
@ -421,7 +421,7 @@ static BOOL RES_FreeResource( HGLOBAL handle )
{ {
HGLOBAL retv = handle; HGLOBAL retv = handle;
TRACE( resource, "(%08x)\n", handle ); TRACE_(resource)("(%08x)\n", handle );
if ( HIWORD( handle ) ) if ( HIWORD( handle ) )
{ {
@ -594,18 +594,18 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
HRSRC16 hRsrc; HRSRC16 hRsrc;
if (HIWORD(lpTableName)) if (HIWORD(lpTableName))
TRACE(accel, "%04x '%s'\n", TRACE_(accel)("%04x '%s'\n",
instance, (char *)PTR_SEG_TO_LIN( lpTableName ) ); instance, (char *)PTR_SEG_TO_LIN( lpTableName ) );
else else
TRACE(accel, "%04x %04x\n", TRACE_(accel)("%04x %04x\n",
instance, LOWORD(lpTableName) ); instance, LOWORD(lpTableName) );
if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATOR16 ))) { if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATOR16 ))) {
WARN(accel, "couldn't find accelerator table resource\n"); WARN_(accel)("couldn't find accelerator table resource\n");
return 0; return 0;
} }
TRACE(accel, "returning HACCEL 0x%x\n", hRsrc); TRACE_(accel)("returning HACCEL 0x%x\n", hRsrc);
return LoadResource16(instance,hRsrc); return LoadResource16(instance,hRsrc);
} }
@ -625,15 +625,15 @@ HACCEL WINAPI LoadAcceleratorsW(HINSTANCE instance,LPCWSTR lpTableName)
DWORD size; DWORD size;
if (HIWORD(lpTableName)) if (HIWORD(lpTableName))
TRACE(accel, "%p '%s'\n", TRACE_(accel)("%p '%s'\n",
(LPVOID)instance, (char *)( lpTableName ) ); (LPVOID)instance, (char *)( lpTableName ) );
else else
TRACE(accel, "%p 0x%04x\n", TRACE_(accel)("%p 0x%04x\n",
(LPVOID)instance, LOWORD(lpTableName) ); (LPVOID)instance, LOWORD(lpTableName) );
if (!(hRsrc = FindResourceW( instance, lpTableName, RT_ACCELERATORW ))) if (!(hRsrc = FindResourceW( instance, lpTableName, RT_ACCELERATORW )))
{ {
WARN(accel, "couldn't find accelerator table resource\n"); WARN_(accel)("couldn't find accelerator table resource\n");
} else { } else {
hMem = LoadResource( instance, hRsrc ); hMem = LoadResource( instance, hRsrc );
size = SizeofResource( instance, hRsrc ); size = SizeofResource( instance, hRsrc );
@ -653,7 +653,7 @@ HACCEL WINAPI LoadAcceleratorsW(HINSTANCE instance,LPCWSTR lpTableName)
accel16[i-1].fVirt |= 0x80; accel16[i-1].fVirt |= 0x80;
} }
} }
TRACE(accel, "returning HACCEL 0x%x\n", hRsrc); TRACE_(accel)("returning HACCEL 0x%x\n", hRsrc);
return hRetval; return hRetval;
} }
@ -693,7 +693,7 @@ INT WINAPI CopyAcceleratorTableW(HACCEL src, LPACCEL dst,
/* Do parameter checking to avoid the explosions and the screaming /* Do parameter checking to avoid the explosions and the screaming
as far as possible. */ as far as possible. */
if((dst && (entries < 1)) || (src == (HACCEL)NULL) || !accel) { if((dst && (entries < 1)) || (src == (HACCEL)NULL) || !accel) {
WARN(accel, "Application sent invalid parameters (%p %p %d).\n", WARN_(accel)("Application sent invalid parameters (%p %p %d).\n",
(LPVOID)src, (LPVOID)dst, entries); (LPVOID)src, (LPVOID)dst, entries);
return 0; return 0;
} }
@ -703,7 +703,7 @@ INT WINAPI CopyAcceleratorTableW(HACCEL src, LPACCEL dst,
i=0; i=0;
while(!done) { while(!done) {
/* Spit out some debugging information. */ /* Spit out some debugging information. */
TRACE(accel, "accel %d: type 0x%02x, event '%c', IDval 0x%04x.\n", TRACE_(accel)("accel %d: type 0x%02x, event '%c', IDval 0x%04x.\n",
i, accel[i].fVirt, accel[i].key, accel[i].cmd); i, accel[i].fVirt, accel[i].key, accel[i].cmd);
/* Copy data to the destination structure array (if dst == NULL, /* Copy data to the destination structure array (if dst == NULL,
@ -746,21 +746,21 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
/* Do parameter checking just in case someone's trying to be /* Do parameter checking just in case someone's trying to be
funny. */ funny. */
if(cEntries < 1) { if(cEntries < 1) {
WARN(accel, "Application sent invalid parameters (%p %d).\n", WARN_(accel)("Application sent invalid parameters (%p %d).\n",
lpaccel, cEntries); lpaccel, cEntries);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return (HACCEL)NULL; return (HACCEL)NULL;
} }
FIXME(accel, "should check that the accelerator descriptions are valid," FIXME_(accel)("should check that the accelerator descriptions are valid,"
" return NULL and SetLastError() if not.\n"); " return NULL and SetLastError() if not.\n");
/* Allocate memory and copy the table. */ /* Allocate memory and copy the table. */
hAccel = GlobalAlloc16(0,cEntries*sizeof(ACCEL16)); hAccel = GlobalAlloc16(0,cEntries*sizeof(ACCEL16));
TRACE(accel, "handle %x\n", hAccel); TRACE_(accel)("handle %x\n", hAccel);
if(!hAccel) { if(!hAccel) {
ERR(accel, "Out of memory.\n"); ERR_(accel)("Out of memory.\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return (HACCEL)NULL; return (HACCEL)NULL;
} }
@ -773,7 +773,7 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
/* Set the end-of-table terminator. */ /* Set the end-of-table terminator. */
accel[cEntries-1].fVirt |= 0x80; accel[cEntries-1].fVirt |= 0x80;
TRACE(accel, "Allocated accelerator handle %x\n", hAccel); TRACE_(accel)("Allocated accelerator handle %x\n", hAccel);
return hAccel; return hAccel;
} }
@ -792,7 +792,7 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
*/ */
BOOL WINAPI DestroyAcceleratorTable( HACCEL handle ) BOOL WINAPI DestroyAcceleratorTable( HACCEL handle )
{ {
FIXME(accel, "(0x%x): stub\n", handle); FIXME_(accel)("(0x%x): stub\n", handle);
/* FIXME: GlobalFree16(handle); */ /* FIXME: GlobalFree16(handle); */
return TRUE; return TRUE;
} }
@ -809,7 +809,7 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
int string_num; int string_num;
int i; int i;
TRACE(resource,"inst=%04x id=%04x buff=%08x len=%d\n", TRACE_(resource)("inst=%04x id=%04x buff=%08x len=%d\n",
instance, resource_id, (int) buffer, buflen); instance, resource_id, (int) buffer, buflen);
hrsrc = FindResource16( instance, (SEGPTR)((resource_id>>4)+1), RT_STRING16 ); hrsrc = FindResource16( instance, (SEGPTR)((resource_id>>4)+1), RT_STRING16 );
@ -822,7 +822,7 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
for (i = 0; i < string_num; i++) for (i = 0; i < string_num; i++)
p += *p + 1; p += *p + 1;
TRACE(resource, "strlen = %d\n", (int)*p ); TRACE_(resource)("strlen = %d\n", (int)*p );
i = MIN(buflen - 1, *p); i = MIN(buflen - 1, *p);
if (buffer == NULL) if (buffer == NULL)
@ -835,11 +835,11 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
buffer[0] = '\0'; buffer[0] = '\0';
return 0; return 0;
} }
WARN(resource,"Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1); WARN_(resource)("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
} }
FreeResource16( hmem ); FreeResource16( hmem );
TRACE(resource,"'%s' loaded !\n", buffer); TRACE_(resource)("'%s' loaded !\n", buffer);
return i; return i;
} }
@ -857,7 +857,7 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */ if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
resource_id = (UINT)(-((INT)resource_id)); resource_id = (UINT)(-((INT)resource_id));
TRACE(resource, "instance = %04x, id = %04x, buffer = %08x, " TRACE_(resource)("instance = %04x, id = %04x, buffer = %08x, "
"length = %d\n", instance, (int)resource_id, (int) buffer, buflen); "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
/* Use bits 4 - 19 (incremented by 1) as resourceid, mask out /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
@ -873,7 +873,7 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
for (i = 0; i < string_num; i++) for (i = 0; i < string_num; i++)
p += *p + 1; p += *p + 1;
TRACE(resource, "strlen = %d\n", (int)*p ); TRACE_(resource)("strlen = %d\n", (int)*p );
i = MIN(buflen - 1, *p); i = MIN(buflen - 1, *p);
if (buffer == NULL) if (buffer == NULL)
@ -887,11 +887,11 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
return 0; return 0;
} }
#if 0 #if 0
WARN(resource,"Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1); WARN_(resource)("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
#endif #endif
} }
TRACE(resource,"%s loaded !\n", debugstr_w(buffer)); TRACE_(resource)("%s loaded !\n", debugstr_w(buffer));
return i; return i;
} }
@ -955,7 +955,7 @@ INT WINAPI LoadMessageA( HMODULE instance, UINT id, WORD lang,
PMESSAGE_RESOURCE_ENTRY mre; PMESSAGE_RESOURCE_ENTRY mre;
int i,slen; int i,slen;
TRACE(resource, "instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen); TRACE_(resource)("instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen);
/*FIXME: I am not sure about the '1' ... But I've only seen those entries*/ /*FIXME: I am not sure about the '1' ... But I've only seen those entries*/
hrsrc = FindResourceExW(instance,RT_MESSAGELISTW,(LPWSTR)1,lang); hrsrc = FindResourceExW(instance,RT_MESSAGELISTW,(LPWSTR)1,lang);
@ -982,7 +982,7 @@ INT WINAPI LoadMessageA( HMODULE instance, UINT id, WORD lang,
mre = (PMESSAGE_RESOURCE_ENTRY)(((char*)mre)+(mre->Length)); mre = (PMESSAGE_RESOURCE_ENTRY)(((char*)mre)+(mre->Length));
} }
slen=mre->Length; slen=mre->Length;
TRACE(resource," - strlen=%d\n",slen); TRACE_(resource)(" - strlen=%d\n",slen);
i = MIN(buflen - 1, slen); i = MIN(buflen - 1, slen);
if (buffer == NULL) if (buffer == NULL)
return slen; /* different to LoadString */ return slen; /* different to LoadString */
@ -996,7 +996,7 @@ INT WINAPI LoadMessageA( HMODULE instance, UINT id, WORD lang,
} }
} }
if (buffer) if (buffer)
TRACE(resource,"'%s' copied !\n", buffer); TRACE_(resource)("'%s' copied !\n", buffer);
return i; return i;
} }

View File

@ -24,7 +24,7 @@
#include "module.h" #include "module.h"
#include "stackframe.h" #include "stackframe.h"
#include "toolhelp.h" #include "toolhelp.h"
#include "debug.h" #include "debugtools.h"
#include "callback.h" #include "callback.h"
DECLARE_DEBUG_CHANNEL(heap) DECLARE_DEBUG_CHANNEL(heap)
@ -133,7 +133,7 @@ static LOCALHEAPINFO *LOCAL_GetHeap( HANDLE16 ds )
{ {
LOCALHEAPINFO *pInfo; LOCALHEAPINFO *pInfo;
INSTANCEDATA *ptr = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN( ds, 0 ); INSTANCEDATA *ptr = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN( ds, 0 );
TRACE(local, "Heap at %p, %04x\n", ptr, (ptr != NULL ? ptr->heap : 0xFFFF)); TRACE_(local)("Heap at %p, %04x\n", ptr, (ptr != NULL ? ptr->heap : 0xFFFF));
if (!ptr || !ptr->heap) return NULL; if (!ptr || !ptr->heap) return NULL;
if (IsBadReadPtr16( (SEGPTR)MAKELONG(ptr->heap,ds), sizeof(LOCALHEAPINFO))) if (IsBadReadPtr16( (SEGPTR)MAKELONG(ptr->heap,ds), sizeof(LOCALHEAPINFO)))
return NULL; return NULL;
@ -171,7 +171,7 @@ static void LOCAL_MakeBlockFree( char *baseptr, WORD block )
next = pNext->next; next = pNext->next;
} }
TRACE(local, "Local_MakeBlockFree %04x, next %04x\n", block, next ); TRACE_(local)("Local_MakeBlockFree %04x, next %04x\n", block, next );
/* Insert the free block in the free-list */ /* Insert the free block in the free-list */
pArena->free_prev = pNext->free_prev; pArena->free_prev = pNext->free_prev;
@ -236,7 +236,7 @@ static void LOCAL_RemoveBlock( char *baseptr, WORD block )
/* Remove the block from the free-list */ /* Remove the block from the free-list */
TRACE(local, "Local_RemoveBlock\n"); TRACE_(local)("Local_RemoveBlock\n");
pArena = ARENA_PTR( baseptr, block ); pArena = ARENA_PTR( baseptr, block );
if ((pArena->prev & 3) == LOCAL_ARENA_FREE) if ((pArena->prev & 3) == LOCAL_ARENA_FREE)
LOCAL_RemoveFreeBlock( baseptr, block ); LOCAL_RemoveFreeBlock( baseptr, block );
@ -274,43 +274,43 @@ static void LOCAL_PrintHeap( HANDLE16 ds )
if (!pInfo) if (!pInfo)
{ {
DUMP( "Local Heap corrupted! ds=%04x\n", ds ); DPRINTF( "Local Heap corrupted! ds=%04x\n", ds );
return; return;
} }
DUMP( "Local Heap ds=%04x first=%04x last=%04x items=%d\n", DPRINTF( "Local Heap ds=%04x first=%04x last=%04x items=%d\n",
ds, pInfo->first, pInfo->last, pInfo->items ); ds, pInfo->first, pInfo->last, pInfo->items );
arena = pInfo->first; arena = pInfo->first;
for (;;) for (;;)
{ {
LOCALARENA *pArena = ARENA_PTR(ptr,arena); LOCALARENA *pArena = ARENA_PTR(ptr,arena);
DUMP( " %04x: prev=%04x next=%04x type=%d\n", arena, DPRINTF( " %04x: prev=%04x next=%04x type=%d\n", arena,
pArena->prev & ~3, pArena->next, pArena->prev & 3 ); pArena->prev & ~3, pArena->next, pArena->prev & 3 );
if (arena == pInfo->first) if (arena == pInfo->first)
{ {
DUMP( " size=%d free_prev=%04x free_next=%04x\n", DPRINTF( " size=%d free_prev=%04x free_next=%04x\n",
pArena->size, pArena->free_prev, pArena->free_next ); pArena->size, pArena->free_prev, pArena->free_next );
} }
if ((pArena->prev & 3) == LOCAL_ARENA_FREE) if ((pArena->prev & 3) == LOCAL_ARENA_FREE)
{ {
DUMP( " size=%d free_prev=%04x free_next=%04x\n", DPRINTF( " size=%d free_prev=%04x free_next=%04x\n",
pArena->size, pArena->free_prev, pArena->free_next ); pArena->size, pArena->free_prev, pArena->free_next );
if (pArena->next == arena) break; /* last one */ if (pArena->next == arena) break; /* last one */
if (ARENA_PTR(ptr,pArena->free_next)->free_prev != arena) if (ARENA_PTR(ptr,pArena->free_next)->free_prev != arena)
{ {
DUMP( "*** arena->free_next->free_prev != arena\n" ); DPRINTF( "*** arena->free_next->free_prev != arena\n" );
break; break;
} }
} }
if (pArena->next == arena) if (pArena->next == arena)
{ {
DUMP( "*** last block is not marked free\n" ); DPRINTF( "*** last block is not marked free\n" );
break; break;
} }
if ((ARENA_PTR(ptr,pArena->next)->prev & ~3) != arena) if ((ARENA_PTR(ptr,pArena->next)->prev & ~3) != arena)
{ {
DUMP( "*** arena->next->prev != arena (%04x, %04x)\n", DPRINTF( "*** arena->next->prev != arena (%04x, %04x)\n",
pArena->next, ARENA_PTR(ptr,pArena->next)->prev); pArena->next, ARENA_PTR(ptr,pArena->next)->prev);
break; break;
} }
arena = pArena->next; arena = pArena->next;
@ -335,7 +335,7 @@ BOOL16 WINAPI LocalInit16( HANDLE16 selector, WORD start, WORD end )
/* - large free block (FREE) */ /* - large free block (FREE) */
/* - last arena (FREE) */ /* - last arena (FREE) */
TRACE(local, "%04x %04x-%04x\n", selector, start, end); TRACE_(local)("%04x %04x-%04x\n", selector, start, end);
if (!selector) selector = CURRENT_DS; if (!selector) selector = CURRENT_DS;
if (TRACE_ON(heap)) if (TRACE_ON(heap))
@ -344,7 +344,7 @@ BOOL16 WINAPI LocalInit16( HANDLE16 selector, WORD start, WORD end )
/* cleared before use, so we can test for double initialization. */ /* cleared before use, so we can test for double initialization. */
if (LOCAL_GetHeap(selector)) if (LOCAL_GetHeap(selector))
{ {
ERR(local, "Heap %04x initialized twice.\n", selector); ERR_(local)("Heap %04x initialized twice.\n", selector);
LOCAL_PrintHeap(selector); LOCAL_PrintHeap(selector);
} }
} }
@ -364,7 +364,7 @@ BOOL16 WINAPI LocalInit16( HANDLE16 selector, WORD start, WORD end )
start = GlobalSize16( GlobalHandle16( selector ) ); start = GlobalSize16( GlobalHandle16( selector ) );
start -= end; start -= end;
end += start; end += start;
TRACE(local," new start %04x, minstart: %04x\n", start, pSeg->minsize + pModule->stack_size); TRACE_(local)(" new start %04x, minstart: %04x\n", start, pSeg->minsize + pModule->stack_size);
} }
} }
} }
@ -457,7 +457,7 @@ static BOOL16 LOCAL_GrowHeap( HANDLE16 ds )
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
pHeapInfo = LOCAL_GetHeap( ds ); pHeapInfo = LOCAL_GetHeap( ds );
if (pHeapInfo == NULL) { if (pHeapInfo == NULL) {
ERR(local, "Heap not found\n" ); ERR_(local)("Heap not found\n" );
return FALSE; return FALSE;
} }
end = GlobalSize16( hseg ); end = GlobalSize16( hseg );
@ -491,7 +491,7 @@ static BOOL16 LOCAL_GrowHeap( HANDLE16 ds )
pHeapInfo->items--; pHeapInfo->items--;
} }
TRACE(local, "Heap expanded\n" ); TRACE_(local)("Heap expanded\n" );
LOCAL_PrintHeap( ds ); LOCAL_PrintHeap( ds );
return TRUE; return TRUE;
} }
@ -506,14 +506,14 @@ static HLOCAL16 LOCAL_FreeArena( WORD ds, WORD arena )
LOCALHEAPINFO *pInfo; LOCALHEAPINFO *pInfo;
LOCALARENA *pArena, *pPrev, *pNext; LOCALARENA *pArena, *pPrev, *pNext;
TRACE(local, "%04x ds=%04x\n", arena, ds ); TRACE_(local)("%04x ds=%04x\n", arena, ds );
if (!(pInfo = LOCAL_GetHeap( ds ))) return arena; if (!(pInfo = LOCAL_GetHeap( ds ))) return arena;
pArena = ARENA_PTR( ptr, arena ); pArena = ARENA_PTR( ptr, arena );
if ((pArena->prev & 3) == LOCAL_ARENA_FREE) if ((pArena->prev & 3) == LOCAL_ARENA_FREE)
{ {
/* shouldn't happen */ /* shouldn't happen */
ERR(local, "Trying to free block %04x twice!\n", ERR_(local)("Trying to free block %04x twice!\n",
arena ); arena );
LOCAL_PrintHeap( ds ); LOCAL_PrintHeap( ds );
return arena; return arena;
@ -636,7 +636,7 @@ static WORD LOCAL_GetFreeSpace(WORD ds, WORD countdiscard)
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "Local heap not found\n" ); ERR_(local)("Local heap not found\n" );
LOCAL_PrintHeap(ds); LOCAL_PrintHeap(ds);
return 0; return 0;
} }
@ -671,19 +671,19 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "Local heap not found\n" ); ERR_(local)("Local heap not found\n" );
LOCAL_PrintHeap(ds); LOCAL_PrintHeap(ds);
return 0; return 0;
} }
TRACE(local, "ds = %04x, minfree = %04x, flags = %04x\n", TRACE_(local)("ds = %04x, minfree = %04x, flags = %04x\n",
ds, minfree, flags); ds, minfree, flags);
freespace = LOCAL_GetFreeSpace(ds, minfree ? 0 : 1); freespace = LOCAL_GetFreeSpace(ds, minfree ? 0 : 1);
if(freespace >= minfree || (flags & LMEM_NOCOMPACT)) if(freespace >= minfree || (flags & LMEM_NOCOMPACT))
{ {
TRACE(local, "Returning %04x.\n", freespace); TRACE_(local)("Returning %04x.\n", freespace);
return freespace; return freespace;
} }
TRACE(local, "Compacting heap %04x.\n", ds); TRACE_(local)("Compacting heap %04x.\n", ds);
table = pInfo->htable; table = pInfo->htable;
while(table) while(table)
{ {
@ -693,7 +693,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
if((pEntry->lock == 0) && (pEntry->flags != (LMEM_DISCARDED >> 8))) if((pEntry->lock == 0) && (pEntry->flags != (LMEM_DISCARDED >> 8)))
{ {
/* OK we can move this one if we want */ /* OK we can move this one if we want */
TRACE(local, "handle %04x (block %04x) can be moved.\n", TRACE_(local)("handle %04x (block %04x) can be moved.\n",
(WORD)((char *)pEntry - ptr), pEntry->addr); (WORD)((char *)pEntry - ptr), pEntry->addr);
movearena = ARENA_HEADER(pEntry->addr); movearena = ARENA_HEADER(pEntry->addr);
pMoveArena = ARENA_PTR(ptr, movearena); pMoveArena = ARENA_PTR(ptr, movearena);
@ -720,7 +720,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
} }
if (finalarena) /* Actually got somewhere to move */ if (finalarena) /* Actually got somewhere to move */
{ {
TRACE(local, "Moving it to %04x.\n", finalarena); TRACE_(local)("Moving it to %04x.\n", finalarena);
pFinalArena = ARENA_PTR(ptr, finalarena); pFinalArena = ARENA_PTR(ptr, finalarena);
size = pFinalArena->size; size = pFinalArena->size;
LOCAL_RemoveFreeBlock(ptr, finalarena); LOCAL_RemoveFreeBlock(ptr, finalarena);
@ -754,7 +754,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
freespace = LOCAL_GetFreeSpace(ds, minfree ? 0 : 1); freespace = LOCAL_GetFreeSpace(ds, minfree ? 0 : 1);
if(freespace >= minfree || (flags & LMEM_NODISCARD)) if(freespace >= minfree || (flags & LMEM_NODISCARD))
{ {
TRACE(local, "Returning %04x.\n", freespace); TRACE_(local)("Returning %04x.\n", freespace);
return freespace; return freespace;
} }
@ -767,7 +767,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
if(pEntry->addr && pEntry->lock == 0 && if(pEntry->addr && pEntry->lock == 0 &&
(pEntry->flags & (LMEM_DISCARDABLE >> 8))) (pEntry->flags & (LMEM_DISCARDABLE >> 8)))
{ {
TRACE(local, "Discarding handle %04x (block %04x).\n", TRACE_(local)("Discarding handle %04x (block %04x).\n",
(char *)pEntry - ptr, pEntry->addr); (char *)pEntry - ptr, pEntry->addr);
LOCAL_FreeArena(ds, ARENA_HEADER(pEntry->addr)); LOCAL_FreeArena(ds, ARENA_HEADER(pEntry->addr));
if (pInfo->notify) if (pInfo->notify)
@ -795,7 +795,7 @@ static HLOCAL16 LOCAL_FindFreeBlock( HANDLE16 ds, WORD size )
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "Local heap not found\n" ); ERR_(local)("Local heap not found\n" );
LOCAL_PrintHeap(ds); LOCAL_PrintHeap(ds);
return 0; return 0;
} }
@ -808,7 +808,7 @@ static HLOCAL16 LOCAL_FindFreeBlock( HANDLE16 ds, WORD size )
if (arena == pArena->free_next) break; if (arena == pArena->free_next) break;
if (pArena->size >= size) return arena; if (pArena->size >= size) return arena;
} }
TRACE(local, "not enough space\n" ); TRACE_(local)("not enough space\n" );
LOCAL_PrintHeap(ds); LOCAL_PrintHeap(ds);
return 0; return 0;
} }
@ -827,7 +827,7 @@ static HLOCAL16 LOCAL_GetBlock( HANDLE16 ds, WORD size, WORD flags )
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "Local heap not found\n"); ERR_(local)("Local heap not found\n");
LOCAL_PrintHeap(ds); LOCAL_PrintHeap(ds);
return 0; return 0;
} }
@ -862,13 +862,13 @@ notify_done:
} }
if (arena == 0) { if (arena == 0) {
if (ds == GDI_HeapSel) { if (ds == GDI_HeapSel) {
ERR(local, "not enough space in GDI local heap " ERR_(local)("not enough space in GDI local heap "
"(%04x) for %d bytes\n", ds, size ); "(%04x) for %d bytes\n", ds, size );
} else if (ds == USER_HeapSel) { } else if (ds == USER_HeapSel) {
ERR(local, "not enough space in USER local heap " ERR_(local)("not enough space in USER local heap "
"(%04x) for %d bytes\n", ds, size ); "(%04x) for %d bytes\n", ds, size );
} else { } else {
ERR(local, "not enough space in local heap " ERR_(local)("not enough space in local heap "
"%04x for %d bytes\n", ds, size ); "%04x for %d bytes\n", ds, size );
} }
#if 0 #if 0
@ -882,7 +882,7 @@ notify_done:
/* Make a block out of the free arena */ /* Make a block out of the free arena */
pArena = ARENA_PTR( ptr, arena ); pArena = ARENA_PTR( ptr, arena );
TRACE(local, "LOCAL_GetBlock size = %04x, arena %04x size %04x\n", TRACE_(local)("LOCAL_GetBlock size = %04x, arena %04x size %04x\n",
size, arena, pArena->size ); size, arena, pArena->size );
LOCAL_RemoveFreeBlock( ptr, arena ); LOCAL_RemoveFreeBlock( ptr, arena );
LOCAL_ShrinkArena( ds, arena, size ); LOCAL_ShrinkArena( ds, arena, size );
@ -904,10 +904,10 @@ static BOOL16 LOCAL_NewHTable( HANDLE16 ds )
HLOCAL16 handle; HLOCAL16 handle;
int i; int i;
TRACE(local, "Local_NewHTable\n" ); TRACE_(local)("Local_NewHTable\n" );
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "Local heap not found\n"); ERR_(local)("Local heap not found\n");
LOCAL_PrintHeap(ds); LOCAL_PrintHeap(ds);
return FALSE; return FALSE;
} }
@ -916,9 +916,9 @@ static BOOL16 LOCAL_NewHTable( HANDLE16 ds )
+ 2 * sizeof(WORD), LMEM_FIXED ))) + 2 * sizeof(WORD), LMEM_FIXED )))
return FALSE; return FALSE;
if (!(ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ))) if (!(ptr = PTR_SEG_OFF_TO_LIN( ds, 0 )))
ERR(local, "ptr == NULL after GetBlock.\n"); ERR_(local)("ptr == NULL after GetBlock.\n");
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
ERR(local,"pInfo == NULL after GetBlock.\n"); ERR_(local)("pInfo == NULL after GetBlock.\n");
/* Fill the entry table */ /* Fill the entry table */
@ -946,7 +946,7 @@ static HLOCAL16 LOCAL_GetNewHandleEntry( HANDLE16 ds )
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "Local heap not found\n"); ERR_(local)("Local heap not found\n");
LOCAL_PrintHeap(ds); LOCAL_PrintHeap(ds);
return 0; return 0;
} }
@ -976,7 +976,7 @@ static HLOCAL16 LOCAL_GetNewHandleEntry( HANDLE16 ds )
pEntry->lock = 0; pEntry->lock = 0;
pEntry->flags = 0; pEntry->flags = 0;
TRACE(local, "(%04x): %04x\n", TRACE_(local)("(%04x): %04x\n",
ds, ((char *)pEntry - ptr) ); ds, ((char *)pEntry - ptr) );
return (HLOCAL16)((char *)pEntry - ptr); return (HLOCAL16)((char *)pEntry - ptr);
} }
@ -1009,7 +1009,7 @@ static void LOCAL_FreeHandleEntry( HANDLE16 ds, HLOCAL16 handle )
} }
if (!*pTable) if (!*pTable)
{ {
ERR(local, "Invalid entry %04x\n", handle); ERR_(local)("Invalid entry %04x\n", handle);
LOCAL_PrintHeap( ds ); LOCAL_PrintHeap( ds );
return; return;
} }
@ -1028,7 +1028,7 @@ static void LOCAL_FreeHandleEntry( HANDLE16 ds, HLOCAL16 handle )
/* Remove the table from the linked list and free it */ /* Remove the table from the linked list and free it */
TRACE(local, "(%04x): freeing table %04x\n", TRACE_(local)("(%04x): freeing table %04x\n",
ds, table); ds, table);
*pTable = *(WORD *)pEntry; *pTable = *(WORD *)pEntry;
LOCAL_FreeArena( ds, ARENA_HEADER( table ) ); LOCAL_FreeArena( ds, ARENA_HEADER( table ) );
@ -1044,9 +1044,9 @@ HLOCAL16 LOCAL_Free( HANDLE16 ds, HLOCAL16 handle )
{ {
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
TRACE(local, "%04x ds=%04x\n", handle, ds ); TRACE_(local)("%04x ds=%04x\n", handle, ds );
if (!handle) { WARN(local, "Handle is 0.\n" ); return 0; } if (!handle) { WARN_(local)("Handle is 0.\n" ); return 0; }
if (HANDLE_FIXED( handle )) if (HANDLE_FIXED( handle ))
{ {
if (!LOCAL_FreeArena( ds, ARENA_HEADER( handle ) )) return 0; /* OK */ if (!LOCAL_FreeArena( ds, ARENA_HEADER( handle ) )) return 0; /* OK */
@ -1057,7 +1057,7 @@ HLOCAL16 LOCAL_Free( HANDLE16 ds, HLOCAL16 handle )
LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(ptr + handle); LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
if (pEntry->flags != (LMEM_DISCARDED >> 8)) if (pEntry->flags != (LMEM_DISCARDED >> 8))
{ {
TRACE(local, "real block at %04x\n", TRACE_(local)("real block at %04x\n",
pEntry->addr ); pEntry->addr );
if (LOCAL_FreeArena( ds, ARENA_HEADER(pEntry->addr) )) if (LOCAL_FreeArena( ds, ARENA_HEADER(pEntry->addr) ))
return handle; /* couldn't free it */ return handle; /* couldn't free it */
@ -1079,7 +1079,7 @@ HLOCAL16 LOCAL_Alloc( HANDLE16 ds, WORD flags, WORD size )
char *ptr; char *ptr;
HLOCAL16 handle; HLOCAL16 handle;
TRACE(local, "%04x %d ds=%04x\n", flags, size, ds ); TRACE_(local)("%04x %d ds=%04x\n", flags, size, ds );
if(size > 0 && size <= 4) size = 5; if(size > 0 && size <= 4) size = 5;
if (flags & LMEM_MOVEABLE) if (flags & LMEM_MOVEABLE)
@ -1096,7 +1096,7 @@ HLOCAL16 LOCAL_Alloc( HANDLE16 ds, WORD flags, WORD size )
hmem = 0; hmem = 0;
if (!(handle = LOCAL_GetNewHandleEntry( ds ))) if (!(handle = LOCAL_GetNewHandleEntry( ds )))
{ {
WARN(local, "Couldn't get handle.\n"); WARN_(local)("Couldn't get handle.\n");
if(hmem) if(hmem)
LOCAL_FreeArena( ds, ARENA_HEADER(hmem) ); LOCAL_FreeArena( ds, ARENA_HEADER(hmem) );
return 0; return 0;
@ -1146,7 +1146,7 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
((LOCALHANDLEENTRY *)(ptr + handle))->lock == 0xff) /* An unused handle */ ((LOCALHANDLEENTRY *)(ptr + handle))->lock == 0xff) /* An unused handle */
return 0; return 0;
TRACE(local, "%04x %d %04x ds=%04x\n", TRACE_(local)("%04x %d %04x ds=%04x\n",
handle, size, flags, ds ); handle, size, flags, ds );
if (!(pInfo = LOCAL_GetHeap( ds ))) return 0; if (!(pInfo = LOCAL_GetHeap( ds ))) return 0;
@ -1159,8 +1159,8 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
{ {
HLOCAL16 hl; HLOCAL16 hl;
if(pEntry->addr) if(pEntry->addr)
WARN(local,"Dicarded block has non-zero addr.\n"); WARN_(local)("Dicarded block has non-zero addr.\n");
TRACE(local, "ReAllocating discarded block\n"); TRACE_(local)("ReAllocating discarded block\n");
if(size <= 4) size = 5; if(size <= 4) size = 5;
if (!(hl = LOCAL_GetBlock( ds, size + sizeof(HLOCAL16), flags))) if (!(hl = LOCAL_GetBlock( ds, size + sizeof(HLOCAL16), flags)))
return 0; return 0;
@ -1174,12 +1174,12 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
} }
if (((blockhandle = pEntry->addr) & 3) != 2) if (((blockhandle = pEntry->addr) & 3) != 2)
{ {
ERR(local, "(%04x,%04x): invalid handle\n", ERR_(local)("(%04x,%04x): invalid handle\n",
ds, handle ); ds, handle );
return 0; return 0;
} }
if(*((HLOCAL16 *)(ptr + blockhandle) - 1) != handle) { if(*((HLOCAL16 *)(ptr + blockhandle) - 1) != handle) {
ERR(local, "Back ptr to handle is invalid\n"); ERR_(local)("Back ptr to handle is invalid\n");
return 0; return 0;
} }
} }
@ -1190,7 +1190,7 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
{ {
pEntry = (LOCALHANDLEENTRY *)(ptr + handle); pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
pEntry->flags = (flags & 0x0f00) >> 8; pEntry->flags = (flags & 0x0f00) >> 8;
TRACE(local, "Changing flags to %x.\n", pEntry->flags); TRACE_(local)("Changing flags to %x.\n", pEntry->flags);
} }
return handle; return handle;
} }
@ -1201,7 +1201,7 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
{ {
if (HANDLE_FIXED(handle)) if (HANDLE_FIXED(handle))
{ {
TRACE(local, "Freeing fixed block.\n"); TRACE_(local)("Freeing fixed block.\n");
return LOCAL_Free( ds, handle ); return LOCAL_Free( ds, handle );
} }
else /* Moveable block */ else /* Moveable block */
@ -1210,7 +1210,7 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
if (pEntry->lock == 0) if (pEntry->lock == 0)
{ {
/* discards moveable blocks */ /* discards moveable blocks */
TRACE(local,"Discarding block\n"); TRACE_(local)("Discarding block\n");
LOCAL_FreeArena(ds, ARENA_HEADER(pEntry->addr)); LOCAL_FreeArena(ds, ARENA_HEADER(pEntry->addr));
pEntry->addr = 0; pEntry->addr = 0;
pEntry->flags = (LMEM_DISCARDED >> 8); pEntry->flags = (LMEM_DISCARDED >> 8);
@ -1232,7 +1232,7 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
} }
arena = ARENA_HEADER( blockhandle ); arena = ARENA_HEADER( blockhandle );
TRACE(local, "arena is %04x\n", arena ); TRACE_(local)("arena is %04x\n", arena );
pArena = ARENA_PTR( ptr, arena ); pArena = ARENA_PTR( ptr, arena );
if(size <= 4) size = 5; if(size <= 4) size = 5;
@ -1243,9 +1243,9 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
if (nextarena <= pArena->next) if (nextarena <= pArena->next)
{ {
TRACE(local, "size reduction, making new free block\n"); TRACE_(local)("size reduction, making new free block\n");
LOCAL_ShrinkArena(ds, arena, nextarena - arena); LOCAL_ShrinkArena(ds, arena, nextarena - arena);
TRACE(local, "returning %04x\n", handle ); TRACE_(local)("returning %04x\n", handle );
return handle; return handle;
} }
@ -1255,9 +1255,9 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
if (((pNext->prev & 3) == LOCAL_ARENA_FREE) && if (((pNext->prev & 3) == LOCAL_ARENA_FREE) &&
(nextarena <= pNext->next)) (nextarena <= pNext->next))
{ {
TRACE(local, "size increase, making new free block\n"); TRACE_(local)("size increase, making new free block\n");
LOCAL_GrowArenaUpward(ds, arena, nextarena - arena); LOCAL_GrowArenaUpward(ds, arena, nextarena - arena);
TRACE(local, "returning %04x\n", handle ); TRACE_(local)("returning %04x\n", handle );
return handle; return handle;
} }
@ -1268,14 +1268,14 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
{ {
if (HANDLE_FIXED(handle)) if (HANDLE_FIXED(handle))
{ {
ERR(local, "Needed to move fixed block, but LMEM_MOVEABLE not specified.\n"); ERR_(local)("Needed to move fixed block, but LMEM_MOVEABLE not specified.\n");
return 0; return 0;
} }
else else
{ {
if(((LOCALHANDLEENTRY *)(ptr + handle))->lock != 0) if(((LOCALHANDLEENTRY *)(ptr + handle))->lock != 0)
{ {
ERR(local, "Needed to move locked block, but LMEM_MOVEABLE not specified.\n"); ERR_(local)("Needed to move locked block, but LMEM_MOVEABLE not specified.\n");
return 0; return 0;
} }
} }
@ -1299,7 +1299,7 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
{ {
if (!(hmem = LOCAL_GetBlock( ds, oldsize, flags ))) if (!(hmem = LOCAL_GetBlock( ds, oldsize, flags )))
{ {
ERR(local, "Can't restore saved block\n" ); ERR_(local)("Can't restore saved block\n" );
HeapFree( GetProcessHeap(), 0, buffer ); HeapFree( GetProcessHeap(), 0, buffer );
return 0; return 0;
} }
@ -1316,16 +1316,16 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
} }
if (HANDLE_MOVEABLE( handle )) if (HANDLE_MOVEABLE( handle ))
{ {
TRACE(local, "fixing handle\n"); TRACE_(local)("fixing handle\n");
pEntry = (LOCALHANDLEENTRY *)(ptr + handle); pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
pEntry->addr = hmem + sizeof(HLOCAL16); pEntry->addr = hmem + sizeof(HLOCAL16);
/* Back ptr should still be correct */ /* Back ptr should still be correct */
if(*(HLOCAL16 *)(ptr + hmem) != handle) if(*(HLOCAL16 *)(ptr + hmem) != handle)
ERR(local, "back ptr is invalid.\n"); ERR_(local)("back ptr is invalid.\n");
hmem = handle; hmem = handle;
} }
if (size == oldsize) hmem = 0; /* Realloc failed */ if (size == oldsize) hmem = 0; /* Realloc failed */
TRACE(local, "returning %04x\n", hmem ); TRACE_(local)("returning %04x\n", hmem );
return hmem; return hmem;
} }
@ -1344,7 +1344,7 @@ static HLOCAL16 LOCAL_InternalLock( LPSTR heap, HLOCAL16 handle )
if (pEntry->lock < 0xfe) pEntry->lock++; if (pEntry->lock < 0xfe) pEntry->lock++;
handle = pEntry->addr; handle = pEntry->addr;
} }
TRACE(local, "%04x returning %04x\n", TRACE_(local)("%04x returning %04x\n",
old_handle, handle ); old_handle, handle );
return handle; return handle;
} }
@ -1377,7 +1377,7 @@ BOOL16 LOCAL_Unlock( HANDLE16 ds, HLOCAL16 handle )
{ {
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
TRACE(local, "%04x\n", handle ); TRACE_(local)("%04x\n", handle );
if (HANDLE_MOVEABLE(handle)) if (HANDLE_MOVEABLE(handle))
{ {
LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(ptr + handle); LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
@ -1400,7 +1400,7 @@ WORD LOCAL_Size( HANDLE16 ds, HLOCAL16 handle )
char *ptr = PTR_SEG_OFF_TO_LIN( CURRENT_DS, 0 ); char *ptr = PTR_SEG_OFF_TO_LIN( CURRENT_DS, 0 );
LOCALARENA *pArena; LOCALARENA *pArena;
TRACE(local, "%04x ds=%04x\n", handle, ds ); TRACE_(local)("%04x ds=%04x\n", handle, ds );
if (HANDLE_MOVEABLE( handle )) handle = *(WORD *)(ptr + handle); if (HANDLE_MOVEABLE( handle )) handle = *(WORD *)(ptr + handle);
if (!handle) return 0; if (!handle) return 0;
@ -1421,13 +1421,13 @@ WORD LOCAL_Flags( HANDLE16 ds, HLOCAL16 handle )
if (HANDLE_MOVEABLE(handle)) if (HANDLE_MOVEABLE(handle))
{ {
LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(ptr + handle); LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
TRACE(local, "(%04x,%04x): returning %04x\n", TRACE_(local)("(%04x,%04x): returning %04x\n",
ds, handle, pEntry->lock | (pEntry->flags << 8) ); ds, handle, pEntry->lock | (pEntry->flags << 8) );
return pEntry->lock | (pEntry->flags << 8); return pEntry->lock | (pEntry->flags << 8);
} }
else else
{ {
TRACE(local, "(%04x,%04x): returning 0\n", TRACE_(local)("(%04x,%04x): returning 0\n",
ds, handle ); ds, handle );
return 0; return 0;
} }
@ -1461,7 +1461,7 @@ WORD LOCAL_CountFree( HANDLE16 ds )
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "(%04x): Local heap not found\n", ds ); ERR_(local)("(%04x): Local heap not found\n", ds );
LOCAL_PrintHeap( ds ); LOCAL_PrintHeap( ds );
return 0; return 0;
} }
@ -1476,7 +1476,7 @@ WORD LOCAL_CountFree( HANDLE16 ds )
if (arena == pArena->free_next) break; if (arena == pArena->free_next) break;
total += pArena->size; total += pArena->size;
} }
TRACE(local, "(%04x): returning %d\n", ds, total); TRACE_(local)("(%04x): returning %d\n", ds, total);
return total; return total;
} }
@ -1494,7 +1494,7 @@ HLOCAL16 LOCAL_Handle( HANDLE16 ds, WORD addr )
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "(%04x): Local heap not found\n", ds ); ERR_(local)("(%04x): Local heap not found\n", ds );
LOCAL_PrintHeap( ds ); LOCAL_PrintHeap( ds );
return 0; return 0;
} }
@ -1532,7 +1532,7 @@ void WINAPI WIN16_LocalAlloc( CONTEXT *context )
WORD *stack = PTR_SEG_OFF_TO_LIN(SS_reg(context), SP_reg(context)); WORD *stack = PTR_SEG_OFF_TO_LIN(SS_reg(context), SP_reg(context));
UINT16 flags = (UINT16)stack[3]; UINT16 flags = (UINT16)stack[3];
WORD size = (WORD)stack[2]; WORD size = (WORD)stack[2];
TRACE(local,"WIN16LocalAlloc: %04x %d \n", flags, size); TRACE_(local)("WIN16LocalAlloc: %04x %d \n", flags, size);
AX_reg(context) = CX_reg(context) = LOCAL_Alloc( DS_reg(context), flags, size ); AX_reg(context) = CX_reg(context) = LOCAL_Alloc( DS_reg(context), flags, size );
} }
@ -1607,7 +1607,7 @@ UINT16 WINAPI LocalFlags16( HLOCAL16 handle )
*/ */
UINT16 WINAPI LocalCompact16( UINT16 minfree ) UINT16 WINAPI LocalCompact16( UINT16 minfree )
{ {
TRACE(local, "%04x\n", minfree ); TRACE_(local)("%04x\n", minfree );
return LOCAL_Compact( CURRENT_DS, minfree, 0 ); return LOCAL_Compact( CURRENT_DS, minfree, 0 );
} }
@ -1638,12 +1638,12 @@ FARPROC16 WINAPI LocalNotify16( FARPROC16 func )
if (!(pInfo = LOCAL_GetHeap( ds ))) if (!(pInfo = LOCAL_GetHeap( ds )))
{ {
ERR(local, "(%04x): Local heap not found\n", ds ); ERR_(local)("(%04x): Local heap not found\n", ds );
LOCAL_PrintHeap( ds ); LOCAL_PrintHeap( ds );
return 0; return 0;
} }
TRACE(local, "(%04x): %08lx\n", ds, (DWORD)func ); TRACE_(local)("(%04x): %08lx\n", ds, (DWORD)func );
FIXME(local, "Half implemented\n"); FIXME_(local)("Half implemented\n");
oldNotify = pInfo->notify; oldNotify = pInfo->notify;
pInfo->notify = func; pInfo->notify = func;
return oldNotify; return oldNotify;
@ -1655,7 +1655,7 @@ FARPROC16 WINAPI LocalNotify16( FARPROC16 func )
*/ */
UINT16 WINAPI LocalShrink16( HGLOBAL16 handle, UINT16 newsize ) UINT16 WINAPI LocalShrink16( HGLOBAL16 handle, UINT16 newsize )
{ {
TRACE(local, "%04x %04x\n", handle, newsize ); TRACE_(local)("%04x %04x\n", handle, newsize );
return 0; return 0;
} }
@ -1689,7 +1689,7 @@ WORD WINAPI LocalCountFree16(void)
*/ */
WORD WINAPI LocalHeapSize16(void) WORD WINAPI LocalHeapSize16(void)
{ {
TRACE(local, "(void)\n" ); TRACE_(local)("(void)\n" );
return LOCAL_HeapSize( CURRENT_DS ); return LOCAL_HeapSize( CURRENT_DS );
} }
@ -1703,12 +1703,12 @@ WORD WINAPI LocalHandleDelta16( WORD delta )
if (!(pInfo = LOCAL_GetHeap( CURRENT_DS ))) if (!(pInfo = LOCAL_GetHeap( CURRENT_DS )))
{ {
ERR(local, "Local heap not found\n"); ERR_(local)("Local heap not found\n");
LOCAL_PrintHeap( CURRENT_DS ); LOCAL_PrintHeap( CURRENT_DS );
return 0; return 0;
} }
if (delta) pInfo->hdelta = delta; if (delta) pInfo->hdelta = delta;
TRACE(local, "returning %04x\n", pInfo->hdelta); TRACE_(local)("returning %04x\n", pInfo->hdelta);
return pInfo->hdelta; return pInfo->hdelta;
} }

View File

@ -18,7 +18,7 @@
#include "winerror.h" #include "winerror.h"
#include "drive.h" #include "drive.h"
#include "wnet.h" #include "wnet.h"
#include "debug.h" #include "debugtools.h"
#include "heap.h" #include "heap.h"
DECLARE_DEBUG_CHANNEL(mpr) DECLARE_DEBUG_CHANNEL(mpr)
@ -43,7 +43,7 @@ UINT16 WINAPI WNetAddConnection16(LPCSTR lpNetPath, LPCSTR lpPassWord,
UINT WINAPI WNetAddConnectionA(LPCSTR NetPath, LPCSTR PassWord, UINT WINAPI WNetAddConnectionA(LPCSTR NetPath, LPCSTR PassWord,
LPCSTR LocalName) LPCSTR LocalName)
{ {
FIXME(wnet, "('%s', %p, '%s'): stub\n", FIXME_(wnet)("('%s', %p, '%s'): stub\n",
NetPath, PassWord, LocalName); NetPath, PassWord, LocalName);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -54,7 +54,7 @@ UINT WINAPI WNetAddConnectionW(LPCWSTR NetPath,
LPCWSTR PassWord, LPCWSTR PassWord,
LPCWSTR LocalName) LPCWSTR LocalName)
{ {
FIXME(wnet, " stub!\n"); FIXME_(wnet)(" stub!\n");
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -69,7 +69,7 @@ WNetAddConnection2A(LPNETRESOURCEA netresource, /* [in] */
LPCSTR username, /* [in] */ LPCSTR username, /* [in] */
DWORD flags /* [in] */ ) DWORD flags /* [in] */ )
{ {
FIXME(wnet, "(%p,%s,%s,0x%08lx), stub!\n", netresource, FIXME_(wnet)("(%p,%s,%s,0x%08lx), stub!\n", netresource,
password, username, (unsigned long) flags); password, username, (unsigned long) flags);
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
@ -85,7 +85,7 @@ WNetAddConnection2W(LPNETRESOURCEW netresource, /* [in] */
LPCWSTR username, /* [in] */ LPCWSTR username, /* [in] */
DWORD flags /* [in] */ ) DWORD flags /* [in] */ )
{ {
FIXME(wnet, ", stub!\n"); FIXME_(wnet)(", stub!\n");
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -100,7 +100,7 @@ UINT WINAPI WNetAddConnection3A(HWND owner,
LPCSTR username, LPCSTR username,
DWORD flags) DWORD flags)
{ {
TRACE(wnet, "owner = 0x%x\n", owner); TRACE_(wnet)("owner = 0x%x\n", owner);
return WNetAddConnection2A(netresource, return WNetAddConnection2A(netresource,
password, username, flags); password, username, flags);
} }
@ -115,7 +115,7 @@ UINT WINAPI WNetAddConnection3W(HWND owner,
LPCWSTR password, LPCWSTR password,
DWORD flags) DWORD flags)
{ {
TRACE(wnet,"owner = 0x%x\n", owner); TRACE_(wnet)("owner = 0x%x\n", owner);
return WNetAddConnection2W(netresource, username, password, return WNetAddConnection2W(netresource, username, password,
flags); flags);
} }
@ -124,7 +124,7 @@ UINT WINAPI WNetAddConnection3W(HWND owner,
* WNetConnectionDialog1_32A [MPR.59] * WNetConnectionDialog1_32A [MPR.59]
*/ */
UINT WINAPI WNetConnectionDialog1A (LPCONNECTDLGSTRUCTA lpConnDlgStruct) UINT WINAPI WNetConnectionDialog1A (LPCONNECTDLGSTRUCTA lpConnDlgStruct)
{ FIXME(wnet,"%p stub\n", lpConnDlgStruct); { FIXME_(wnet)("%p stub\n", lpConnDlgStruct);
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return ERROR_NO_NETWORK; return ERROR_NO_NETWORK;
} }
@ -132,7 +132,7 @@ UINT WINAPI WNetConnectionDialog1A (LPCONNECTDLGSTRUCTA lpConnDlgStruct)
* WNetConnectionDialog1_32W [MPR.60] * WNetConnectionDialog1_32W [MPR.60]
*/ */
UINT WINAPI WNetConnectionDialog1W (LPCONNECTDLGSTRUCTW lpConnDlgStruct) UINT WINAPI WNetConnectionDialog1W (LPCONNECTDLGSTRUCTW lpConnDlgStruct)
{ FIXME(wnet,"%p stub\n", lpConnDlgStruct); { FIXME_(wnet)("%p stub\n", lpConnDlgStruct);
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return ERROR_NO_NETWORK; return ERROR_NO_NETWORK;
} }
@ -141,7 +141,7 @@ UINT WINAPI WNetConnectionDialog1W (LPCONNECTDLGSTRUCTW lpConnDlgStruct)
* WNetConnectionDialog_32 [MPR.61] * WNetConnectionDialog_32 [MPR.61]
*/ */
UINT WINAPI WNetConnectionDialog(HWND owner, DWORD flags ) UINT WINAPI WNetConnectionDialog(HWND owner, DWORD flags )
{ FIXME(wnet,"owner = 0x%x, flags=0x%lx stub\n", owner,flags); { FIXME_(wnet)("owner = 0x%x, flags=0x%lx stub\n", owner,flags);
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return ERROR_NO_NETWORK; return ERROR_NO_NETWORK;
@ -161,7 +161,7 @@ UINT WINAPI WNetEnumCachedPasswords(LPSTR sometext, DWORD count1,
*/ */
UINT16 WINAPI WNetCancelConnection16(LPCSTR lpName, BOOL16 bForce) UINT16 WINAPI WNetCancelConnection16(LPCSTR lpName, BOOL16 bForce)
{ {
FIXME(wnet, "('%s', %04X): stub\n", lpName, bForce); FIXME_(wnet)("('%s', %04X): stub\n", lpName, bForce);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -171,7 +171,7 @@ UINT16 WINAPI WNetCancelConnection16(LPCSTR lpName, BOOL16 bForce)
*/ */
int WINAPI WNetErrorText16(WORD nError,LPSTR lpszText,WORD cbText) int WINAPI WNetErrorText16(WORD nError,LPSTR lpszText,WORD cbText)
{ {
FIXME(wnet, "(%x,%p,%x): stub\n",nError,lpszText,cbText); FIXME_(wnet)("(%x,%p,%x): stub\n",nError,lpszText,cbText);
return FALSE; return FALSE;
} }
@ -180,7 +180,7 @@ int WINAPI WNetErrorText16(WORD nError,LPSTR lpszText,WORD cbText)
*/ */
int WINAPI WNetOpenJob16(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh) int WINAPI WNetOpenJob16(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh)
{ {
FIXME(wnet, "('%s','%s',%x,%p): stub\n", FIXME_(wnet)("('%s','%s',%x,%p): stub\n",
szQueue,szJobTitle,nCopies,pfh); szQueue,szJobTitle,nCopies,pfh);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -190,7 +190,7 @@ int WINAPI WNetOpenJob16(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh)
*/ */
int WINAPI WNetCloseJob16(WORD fh,LPWORD pidJob,LPSTR szQueue) int WINAPI WNetCloseJob16(WORD fh,LPWORD pidJob,LPSTR szQueue)
{ {
FIXME(wnet, "(%x,%p,'%s'): stub\n",fh,pidJob,szQueue); FIXME_(wnet)("(%x,%p,'%s'): stub\n",fh,pidJob,szQueue);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -199,7 +199,7 @@ int WINAPI WNetCloseJob16(WORD fh,LPWORD pidJob,LPSTR szQueue)
*/ */
int WINAPI WNetAbortJob16(LPSTR szQueue,WORD wJobId) int WINAPI WNetAbortJob16(LPSTR szQueue,WORD wJobId)
{ {
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId); FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -208,7 +208,7 @@ int WINAPI WNetAbortJob16(LPSTR szQueue,WORD wJobId)
*/ */
int WINAPI WNetHoldJob16(LPSTR szQueue,WORD wJobId) int WINAPI WNetHoldJob16(LPSTR szQueue,WORD wJobId)
{ {
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId); FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -217,7 +217,7 @@ int WINAPI WNetHoldJob16(LPSTR szQueue,WORD wJobId)
*/ */
int WINAPI WNetReleaseJob16(LPSTR szQueue,WORD wJobId) int WINAPI WNetReleaseJob16(LPSTR szQueue,WORD wJobId)
{ {
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId); FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -226,7 +226,7 @@ int WINAPI WNetReleaseJob16(LPSTR szQueue,WORD wJobId)
*/ */
int WINAPI WNetCancelJob16(LPSTR szQueue,WORD wJobId) int WINAPI WNetCancelJob16(LPSTR szQueue,WORD wJobId)
{ {
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId); FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -235,7 +235,7 @@ int WINAPI WNetCancelJob16(LPSTR szQueue,WORD wJobId)
*/ */
int WINAPI WNetSetJobCopies16(LPSTR szQueue,WORD wJobId,WORD nCopies) int WINAPI WNetSetJobCopies16(LPSTR szQueue,WORD wJobId,WORD nCopies)
{ {
FIXME(wnet, "('%s',%x,%x): stub\n",szQueue,wJobId,nCopies); FIXME_(wnet)("('%s',%x,%x): stub\n",szQueue,wJobId,nCopies);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -244,7 +244,7 @@ int WINAPI WNetSetJobCopies16(LPSTR szQueue,WORD wJobId,WORD nCopies)
*/ */
int WINAPI WNetWatchQueue16(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue) int WINAPI WNetWatchQueue16(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue)
{ {
FIXME(wnet, "(%04x,'%s','%s',%x): stub\n",hWnd,szLocal,szUser,nQueue); FIXME_(wnet)("(%04x,'%s','%s',%x): stub\n",hWnd,szLocal,szUser,nQueue);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -253,7 +253,7 @@ int WINAPI WNetWatchQueue16(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue)
*/ */
int WINAPI WNetUnwatchQueue16(LPSTR szQueue) int WINAPI WNetUnwatchQueue16(LPSTR szQueue)
{ {
FIXME(wnet, "('%s'): stub\n", szQueue); FIXME_(wnet)("('%s'): stub\n", szQueue);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -262,7 +262,7 @@ int WINAPI WNetUnwatchQueue16(LPSTR szQueue)
*/ */
int WINAPI WNetLockQueueData16(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct) int WINAPI WNetLockQueueData16(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct)
{ {
FIXME(wnet, "('%s','%s',%p): stub\n",szQueue,szUser,lplpQueueStruct); FIXME_(wnet)("('%s','%s',%p): stub\n",szQueue,szUser,lplpQueueStruct);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -271,7 +271,7 @@ int WINAPI WNetLockQueueData16(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct)
*/ */
int WINAPI WNetUnlockQueueData16(LPSTR szQueue) int WINAPI WNetUnlockQueueData16(LPSTR szQueue)
{ {
FIXME(wnet, "('%s'): stub\n",szQueue); FIXME_(wnet)("('%s'): stub\n",szQueue);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -290,7 +290,7 @@ int WINAPI WNetGetConnection16(LPCSTR lpLocalName,
{ {
const char *path; const char *path;
TRACE(wnet,"local %s\n",lpLocalName); TRACE_(wnet)("local %s\n",lpLocalName);
if (lpLocalName[1] == ':') if (lpLocalName[1] == ':')
{ {
int drive = toupper(lpLocalName[0]) - 'A'; int drive = toupper(lpLocalName[0]) - 'A';
@ -311,7 +311,7 @@ int WINAPI WNetGetConnection16(LPCSTR lpLocalName,
case TYPE_FLOPPY: case TYPE_FLOPPY:
case TYPE_HD: case TYPE_HD:
case TYPE_CDROM: case TYPE_CDROM:
TRACE(wnet,"file is local\n"); TRACE_(wnet)("file is local\n");
return WN_NOT_CONNECTED; return WN_NOT_CONNECTED;
default: default:
return WN_BAD_LOCALNAME; return WN_BAD_LOCALNAME;
@ -428,7 +428,7 @@ int WINAPI WNetGetCaps16(WORD capability)
*/ */
int WINAPI WNetDeviceMode16(HWND16 hWndOwner) int WINAPI WNetDeviceMode16(HWND16 hWndOwner)
{ {
FIXME(wnet, "(%04x): stub\n",hWndOwner); FIXME_(wnet)("(%04x): stub\n",hWndOwner);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -437,7 +437,7 @@ int WINAPI WNetDeviceMode16(HWND16 hWndOwner)
*/ */
int WINAPI WNetBrowseDialog16(HWND16 hParent,WORD nType,LPSTR szPath) int WINAPI WNetBrowseDialog16(HWND16 hParent,WORD nType,LPSTR szPath)
{ {
FIXME(wnet, "(%04x,%x,'%s'): stub\n",hParent,nType,szPath); FIXME_(wnet)("(%04x,%x,'%s'): stub\n",hParent,nType,szPath);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -446,7 +446,7 @@ int WINAPI WNetBrowseDialog16(HWND16 hParent,WORD nType,LPSTR szPath)
*/ */
UINT16 WINAPI WNetGetUser16(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize) UINT16 WINAPI WNetGetUser16(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
{ {
FIXME(wnet, "(%p, %p, %p): stub\n", lpLocalName, lpUserName, lpSize); FIXME_(wnet)("(%p, %p, %p): stub\n", lpLocalName, lpUserName, lpSize);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -458,7 +458,7 @@ DWORD WINAPI WNetGetUserA(LPCSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
{ {
struct passwd *pwd = getpwuid(getuid()); struct passwd *pwd = getpwuid(getuid());
FIXME(wnet, "(%s, %p, %p), mostly stub\n", lpLocalName, lpUserName, lpSize); FIXME_(wnet)("(%s, %p, %p), mostly stub\n", lpLocalName, lpUserName, lpSize);
if (pwd) { if (pwd) {
if (strlen(pwd->pw_name)+1>*lpSize) { if (strlen(pwd->pw_name)+1>*lpSize) {
*lpSize = strlen(pwd->pw_name)+1; *lpSize = strlen(pwd->pw_name)+1;
@ -480,7 +480,7 @@ DWORD WINAPI WNetGetUserA(LPCSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
*/ */
int WINAPI WNetGetError16(LPWORD nError) int WINAPI WNetGetError16(LPWORD nError)
{ {
FIXME(wnet, "(%p): stub\n",nError); FIXME_(wnet)("(%p): stub\n",nError);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -489,7 +489,7 @@ int WINAPI WNetGetError16(LPWORD nError)
*/ */
int WINAPI WNetGetErrorText16(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize) int WINAPI WNetGetErrorText16(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize)
{ {
FIXME(wnet, "(%x,%p,%p): stub\n",nError,lpBuffer,nBufferSize); FIXME_(wnet)("(%x,%p,%p): stub\n",nError,lpBuffer,nBufferSize);
return WN_NET_ERROR; return WN_NET_ERROR;
} }
@ -498,7 +498,7 @@ int WINAPI WNetGetErrorText16(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize)
*/ */
int WINAPI WNetRestoreConnection16(HWND16 hwndOwner,LPSTR lpszDevice) int WINAPI WNetRestoreConnection16(HWND16 hwndOwner,LPSTR lpszDevice)
{ {
FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszDevice); FIXME_(wnet)("(%04x,'%s'): stub\n",hwndOwner,lpszDevice);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -507,7 +507,7 @@ int WINAPI WNetRestoreConnection16(HWND16 hwndOwner,LPSTR lpszDevice)
*/ */
int WINAPI WNetWriteJob16(HANDLE16 hJob,void *lpData,LPWORD lpcbData) int WINAPI WNetWriteJob16(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
{ {
FIXME(wnet, "(%04x,%p,%p): stub\n",hJob,lpData,lpcbData); FIXME_(wnet)("(%04x,%p,%p): stub\n",hJob,lpData,lpcbData);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -516,7 +516,7 @@ int WINAPI WNetWriteJob16(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
*/ */
UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType) UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType)
{ {
FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType); FIXME_(wnet)("(%04x, %4X): stub\n", hWndParent, iType);
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -525,7 +525,7 @@ UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType)
*/ */
int WINAPI WNetDisconnectDialog16(HWND16 hwndOwner, WORD iType) int WINAPI WNetDisconnectDialog16(HWND16 hwndOwner, WORD iType)
{ {
FIXME(wnet, "(%04x,%x): stub\n",hwndOwner,iType); FIXME_(wnet)("(%04x,%x): stub\n",hwndOwner,iType);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -534,7 +534,7 @@ int WINAPI WNetDisconnectDialog16(HWND16 hwndOwner, WORD iType)
*/ */
UINT16 WINAPI WNetConnectionDialog16(HWND16 hWndParent, WORD iType) UINT16 WINAPI WNetConnectionDialog16(HWND16 hWndParent, WORD iType)
{ {
FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType); FIXME_(wnet)("(%04x, %4X): stub\n", hWndParent, iType);
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -545,7 +545,7 @@ UINT16 WINAPI WNetConnectionDialog16(HWND16 hWndParent, WORD iType)
*/ */
int WINAPI WNetViewQueueDialog16(HWND16 hwndOwner,LPSTR lpszQueue) int WINAPI WNetViewQueueDialog16(HWND16 hwndOwner,LPSTR lpszQueue)
{ {
FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszQueue); FIXME_(wnet)("(%04x,'%s'): stub\n",hwndOwner,lpszQueue);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -555,7 +555,7 @@ int WINAPI WNetViewQueueDialog16(HWND16 hwndOwner,LPSTR lpszQueue)
int WINAPI WNetPropertyDialog16(HWND16 hwndParent,WORD iButton, int WINAPI WNetPropertyDialog16(HWND16 hwndParent,WORD iButton,
WORD nPropSel,LPSTR lpszName,WORD nType) WORD nPropSel,LPSTR lpszName,WORD nType)
{ {
FIXME(wnet, "(%04x,%x,%x,'%s',%x): stub\n", FIXME_(wnet)("(%04x,%x,%x,'%s',%x): stub\n",
hwndParent,iButton,nPropSel,lpszName,nType); hwndParent,iButton,nPropSel,lpszName,nType);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -575,7 +575,7 @@ int WINAPI WNetGetDirectoryType16(LPSTR lpName, LPINT16 lpType)
if (type == DRIVE_DOESNOTEXIST) if (type == DRIVE_DOESNOTEXIST)
type = GetDriveTypeA(NULL); type = GetDriveTypeA(NULL);
*lpType = (type==DRIVE_REMOTE)?WNDT_NETWORK:WNDT_NORMAL; *lpType = (type==DRIVE_REMOTE)?WNDT_NETWORK:WNDT_NORMAL;
TRACE(wnet,"%s is %s\n",lpName,(*lpType==WNDT_NETWORK)? TRACE_(wnet)("%s is %s\n",lpName,(*lpType==WNDT_NETWORK)?
"WNDT_NETWORK":"WNDT_NORMAL"); "WNDT_NETWORK":"WNDT_NORMAL");
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -594,7 +594,7 @@ UINT WINAPI WNetGetDirectoryTypeA(LPSTR lpName,void *lpType)
*/ */
int WINAPI WNetDirectoryNotify16(HWND16 hwndOwner,LPSTR lpDir,WORD wOper) int WINAPI WNetDirectoryNotify16(HWND16 hwndOwner,LPSTR lpDir,WORD wOper)
{ {
FIXME(wnet, "(%04x,%s,%s): stub\n",hwndOwner, FIXME_(wnet)("(%04x,%s,%s): stub\n",hwndOwner,
lpDir,(wOper==WNDN_MKDIR)? lpDir,(wOper==WNDN_MKDIR)?
"WNDN_MKDIR":(wOper==WNDN_MVDIR)?"WNDN_MVDIR": "WNDN_MKDIR":(wOper==WNDN_MVDIR)?"WNDN_MVDIR":
(wOper==WNDN_RMDIR)?"WNDN_RMDIR":"unknown"); (wOper==WNDN_RMDIR)?"WNDN_RMDIR":"unknown");
@ -607,7 +607,7 @@ int WINAPI WNetDirectoryNotify16(HWND16 hwndOwner,LPSTR lpDir,WORD wOper)
int WINAPI WNetGetPropertyText16(WORD iButton, WORD nPropSel, LPSTR lpszName, int WINAPI WNetGetPropertyText16(WORD iButton, WORD nPropSel, LPSTR lpszName,
LPSTR lpszButtonName, WORD cbButtonName, WORD nType) LPSTR lpszButtonName, WORD cbButtonName, WORD nType)
{ {
FIXME(wnet, "(%04x,%04x,'%s','%s',%04x): stub\n", FIXME_(wnet)("(%04x,%04x,'%s','%s',%04x): stub\n",
iButton,nPropSel,lpszName,lpszButtonName, nType); iButton,nPropSel,lpszName,lpszButtonName, nType);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -618,7 +618,7 @@ int WINAPI WNetGetPropertyText16(WORD iButton, WORD nPropSel, LPSTR lpszName,
*/ */
UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum) UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum)
{ {
FIXME(wnet, "(%04x): stub\n", hEnum); FIXME_(wnet)("(%04x): stub\n", hEnum);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -628,7 +628,7 @@ UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum)
UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ, UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ,
DWORD *lpCount, LPVOID lpBuf) DWORD *lpCount, LPVOID lpBuf)
{ {
FIXME(wnet, "(%04x, %08lX, %p, %p): stub\n", FIXME_(wnet)("(%04x, %08lX, %p, %p): stub\n",
hEnum, cRequ, lpCount, lpBuf); hEnum, cRequ, lpCount, lpBuf);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -639,7 +639,7 @@ UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ,
UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType, UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType,
LPNETRESOURCE16 lpNet, HANDLE16 *lphEnum) LPNETRESOURCE16 lpNet, HANDLE16 *lphEnum)
{ {
FIXME(wnet, "(%08lX, %08lX, %p, %p): stub\n", FIXME_(wnet)("(%08lX, %08lX, %p, %p): stub\n",
dwScope, dwType, lpNet, lphEnum); dwScope, dwType, lpNet, lphEnum);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -650,7 +650,7 @@ UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType,
UINT WINAPI WNetOpenEnumA(DWORD dwScope, DWORD dwType, DWORD dwUsage, UINT WINAPI WNetOpenEnumA(DWORD dwScope, DWORD dwType, DWORD dwUsage,
LPNETRESOURCEA lpNet, HANDLE *lphEnum) LPNETRESOURCEA lpNet, HANDLE *lphEnum)
{ {
FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n", FIXME_(wnet)("(%08lX, %08lX, %08lX, %p, %p): stub\n",
dwScope, dwType, dwUsage, lpNet, lphEnum); dwScope, dwType, dwUsage, lpNet, lphEnum);
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
@ -662,7 +662,7 @@ UINT WINAPI WNetOpenEnumA(DWORD dwScope, DWORD dwType, DWORD dwUsage,
UINT WINAPI WNetOpenEnumW(DWORD dwScope, DWORD dwType, DWORD dwUsage, UINT WINAPI WNetOpenEnumW(DWORD dwScope, DWORD dwType, DWORD dwUsage,
LPNETRESOURCEA lpNet, HANDLE *lphEnum) LPNETRESOURCEA lpNet, HANDLE *lphEnum)
{ {
FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n", FIXME_(wnet)("(%08lX, %08lX, %08lX, %p, %p): stub\n",
dwScope, dwType, dwUsage, lpNet, lphEnum); dwScope, dwType, dwUsage, lpNet, lphEnum);
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
@ -676,7 +676,7 @@ DWORD WINAPI
WNetGetResourceInformationA( WNetGetResourceInformationA(
LPNETRESOURCEA netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr LPNETRESOURCEA netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr
) { ) {
FIXME(wnet,"(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr); FIXME_(wnet)("(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr);
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -696,7 +696,7 @@ DWORD WINAPI WNetCachePassword(
WORD cbPassword, /* [in] Size of password */ WORD cbPassword, /* [in] Size of password */
BYTE nType) /* [in] Type of password to cache */ BYTE nType) /* [in] Type of password to cache */
{ {
FIXME(mpr,"(%s,%d,%s,%d,%d): stub\n", pbResource,cbResource, FIXME_(mpr)("(%s,%d,%s,%d,%d): stub\n", pbResource,cbResource,
pbPassword,cbPassword,nType); pbPassword,cbPassword,nType);
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -718,7 +718,7 @@ DWORD WINAPI WNetGetCachedPassword(
LPWORD pcbPassword, /* [out] Receives size of password */ LPWORD pcbPassword, /* [out] Receives size of password */
BYTE nType) /* [in] Type of password to retrieve */ BYTE nType) /* [in] Type of password to retrieve */
{ {
FIXME(mpr,"(%s,%d,%p,%d,%d): stub\n", FIXME_(mpr)("(%s,%d,%p,%d,%d): stub\n",
pbResource,cbResource,pbPassword,*pcbPassword,nType); pbResource,cbResource,pbPassword,*pcbPassword,nType);
return WN_ACCESS_DENIED; return WN_ACCESS_DENIED;
} }
@ -737,7 +737,7 @@ DWORD WINAPI MultinetGetConnectionPerformanceA(
LPNETRESOURCEA lpNetResource, LPNETRESOURCEA lpNetResource,
LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
) { ) {
FIXME(mpr,"(%p,%p): stub\n",lpNetResource,lpNetConnectInfoStruct); FIXME_(mpr)("(%p,%p): stub\n",lpNetResource,lpNetConnectInfoStruct);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }
@ -748,7 +748,7 @@ DWORD WINAPI MultinetGetConnectionPerformanceA(
DWORD WINAPI _MPR_22(DWORD x) DWORD WINAPI _MPR_22(DWORD x)
{ {
FIXME(mpr,"(%lx): stub\n",x); FIXME_(mpr)("(%lx): stub\n",x);
return 0; return 0;
} }
@ -757,7 +757,7 @@ DWORD WINAPI _MPR_22(DWORD x)
*/ */
UINT WINAPI MultinetGetErrorTextA (DWORD x, DWORD y, DWORD z) UINT WINAPI MultinetGetErrorTextA (DWORD x, DWORD y, DWORD z)
{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z); { FIXME_(mpr)("(%lx,%lx,%lx): stub\n",x,y,z);
return 0; return 0;
} }
@ -765,7 +765,7 @@ UINT WINAPI MultinetGetErrorTextA (DWORD x, DWORD y, DWORD z)
* MultinetGetErrorTextW [MPR.29] * MultinetGetErrorTextW [MPR.29]
*/ */
UINT WINAPI MultinetGetErrorTextW (DWORD x, DWORD y, DWORD z) UINT WINAPI MultinetGetErrorTextW (DWORD x, DWORD y, DWORD z)
{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z); { FIXME_(mpr)("(%lx,%lx,%lx): stub\n",x,y,z);
return 0; return 0;
} }
@ -773,7 +773,7 @@ UINT WINAPI MultinetGetErrorTextW (DWORD x, DWORD y, DWORD z)
* NPSGetProviderHandle [MPR.33] * NPSGetProviderHandle [MPR.33]
*/ */
DWORD WINAPI NPSGetProviderHandleA(DWORD x) { DWORD WINAPI NPSGetProviderHandleA(DWORD x) {
FIXME(mpr,"(0x%08lx),stub!\n",x); FIXME_(mpr)("(0x%08lx),stub!\n",x);
return 0; return 0;
} }
@ -785,7 +785,7 @@ DWORD WINAPI WNetCancelConnection2A(
DWORD dwFlags, DWORD dwFlags,
BOOL fForce) { BOOL fForce) {
FIXME(wnet,": stub\n"); FIXME_(wnet)(": stub\n");
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -797,7 +797,7 @@ DWORD WINAPI WNetCancelConnection2W(
DWORD dwFlags, DWORD dwFlags,
BOOL fForce) { BOOL fForce) {
FIXME(wnet,": stub\n"); FIXME_(wnet)(": stub\n");
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -809,7 +809,7 @@ DWORD WINAPI WNetCancelConnectionA(
DWORD dwFlags, DWORD dwFlags,
BOOL fForce) { BOOL fForce) {
FIXME(wnet,": stub\n"); FIXME_(wnet)(": stub\n");
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -821,7 +821,7 @@ DWORD WINAPI WNetCancelConnectionW(
DWORD dwFlags, DWORD dwFlags,
BOOL fForce) { BOOL fForce) {
FIXME(wnet,": stub\n"); FIXME_(wnet)(": stub\n");
return WN_SUCCESS; return WN_SUCCESS;
} }
@ -833,7 +833,7 @@ DWORD WINAPI WNetGetUserW(
LPWSTR lpUserName, LPWSTR lpUserName,
LPDWORD lpnLength) { LPDWORD lpnLength) {
FIXME(wnet,": stub\n"); FIXME_(wnet)(": stub\n");
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
} }

View File

@ -13,7 +13,7 @@
#include "ldt.h" #include "ldt.h"
#include "winerror.h" #include "winerror.h"
#include "winreg.h" #include "winreg.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(gdi) DECLARE_DEBUG_CHANNEL(gdi)
DECLARE_DEBUG_CHANNEL(print) DECLARE_DEBUG_CHANNEL(print)
@ -32,16 +32,16 @@ static char Printers[] = "System\\CurrentControlSet\\Control\\Print\\Printers\\
INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc ) INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
{ {
INT16 retVal; INT16 retVal;
TRACE(print,"(%p)\n", lpdoc ); TRACE_(print)("(%p)\n", lpdoc );
TRACE(print,"%d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize, TRACE_(print)("%d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize,
lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName), lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName),
lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput)); lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput));
TRACE(print, "%d %s %s\n",lpdoc->cbSize, TRACE_(print)("%d %s %s\n",lpdoc->cbSize,
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName), (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput)); (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
retVal = Escape16(hdc, STARTDOC, retVal = Escape16(hdc, STARTDOC,
strlen((LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName)), lpdoc->lpszDocName, 0); strlen((LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName)), lpdoc->lpszDocName, 0);
TRACE(print,"Escape16 returned %d\n",retVal); TRACE_(print)("Escape16 returned %d\n",retVal);
return retVal; return retVal;
} }
@ -53,7 +53,7 @@ INT16 WINAPI EndPage16( HDC16 hdc )
{ {
INT16 retVal; INT16 retVal;
retVal = Escape16(hdc, NEWFRAME, 0, 0, 0); retVal = Escape16(hdc, NEWFRAME, 0, 0, 0);
TRACE(print,"Escape16 returned %d\n",retVal); TRACE_(print)("Escape16 returned %d\n",retVal);
return retVal; return retVal;
} }
@ -63,7 +63,7 @@ INT16 WINAPI EndPage16( HDC16 hdc )
*/ */
INT WINAPI StartDocA(HDC hdc ,const DOCINFOA* doc) INT WINAPI StartDocA(HDC hdc ,const DOCINFOA* doc)
{ {
FIXME(gdi,"stub\n"); FIXME_(gdi)("stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0; /* failure*/ return 0; /* failure*/
} }
@ -73,7 +73,7 @@ INT WINAPI StartDocA(HDC hdc ,const DOCINFOA* doc)
* *
*/ */
INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc) { INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc) {
FIXME(gdi,"stub\n"); FIXME_(gdi)("stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0; /* failure*/ return 0; /* failure*/
} }
@ -84,7 +84,7 @@ INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc) {
*/ */
INT WINAPI StartPage(HDC hdc) INT WINAPI StartPage(HDC hdc)
{ {
FIXME(gdi,"stub\n"); FIXME_(gdi)("stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0; /* failure*/ return 0; /* failure*/
} }
@ -95,7 +95,7 @@ INT WINAPI StartPage(HDC hdc)
*/ */
INT WINAPI EndPage(HDC hdc) INT WINAPI EndPage(HDC hdc)
{ {
FIXME(gdi,"stub\n"); FIXME_(gdi)("stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0; /* failure*/ return 0; /* failure*/
} }
@ -115,7 +115,7 @@ INT16 WINAPI EndDoc16(HDC16 hdc)
*/ */
INT WINAPI EndDoc(HDC hdc) INT WINAPI EndDoc(HDC hdc)
{ {
FIXME(gdi,"stub\n"); FIXME_(gdi)("stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0; /* failure*/ return 0; /* failure*/
} }
@ -133,7 +133,7 @@ INT16 WINAPI AbortDoc16(HDC16 hdc)
*/ */
INT WINAPI AbortDoc(HDC hdc) INT WINAPI AbortDoc(HDC hdc)
{ {
FIXME(gdi, "(%d): stub\n", hdc); FIXME_(gdi)("(%d): stub\n", hdc);
return 1; return 1;
} }
@ -186,14 +186,14 @@ DWORD WINAPI DrvGetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
DWORD dwType, PrinterAttr, cbPrinterAttr, SetData, size; DWORD dwType, PrinterAttr, cbPrinterAttr, SetData, size;
if (HIWORD(lpPrinter)) if (HIWORD(lpPrinter))
TRACE(print,"printer %s\n",lpPrinter); TRACE_(print)("printer %s\n",lpPrinter);
else else
TRACE(print,"printer %p\n",lpPrinter); TRACE_(print)("printer %p\n",lpPrinter);
if (HIWORD(lpProfile)) if (HIWORD(lpProfile))
TRACE(print,"profile %s\n",lpProfile); TRACE_(print)("profile %s\n",lpProfile);
else else
TRACE(print,"profile %p\n",lpProfile); TRACE_(print)("profile %p\n",lpProfile);
TRACE(print,"lpType %p\n",lpType); TRACE_(print)("lpType %p\n",lpType);
if ((!lpPrinter) || (!lpProfile) || (!lpNeeded)) if ((!lpPrinter) || (!lpProfile) || (!lpNeeded))
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
@ -279,14 +279,14 @@ DWORD WINAPI DrvSetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
DWORD res = 0; DWORD res = 0;
if (HIWORD(lpPrinter)) if (HIWORD(lpPrinter))
TRACE(print,"printer %s\n",lpPrinter); TRACE_(print)("printer %s\n",lpPrinter);
else else
TRACE(print,"printer %p\n",lpPrinter); TRACE_(print)("printer %p\n",lpPrinter);
if (HIWORD(lpProfile)) if (HIWORD(lpProfile))
TRACE(print,"profile %s\n",lpProfile); TRACE_(print)("profile %s\n",lpProfile);
else else
TRACE(print,"profile %p\n",lpProfile); TRACE_(print)("profile %p\n",lpProfile);
TRACE(print,"lpType %08lx\n",lpType); TRACE_(print)("lpType %08lx\n",lpType);
if ((!lpPrinter) || (!lpProfile) || if ((!lpPrinter) || (!lpProfile) ||
((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) && ((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
@ -334,7 +334,7 @@ DWORD WINAPI DrvSetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
INT WINAPI DeviceCapabilitiesA(LPCSTR printer,LPCSTR target,WORD z, INT WINAPI DeviceCapabilitiesA(LPCSTR printer,LPCSTR target,WORD z,
LPSTR a,LPDEVMODEA b) LPSTR a,LPDEVMODEA b)
{ {
FIXME(print,"(%s,%s,%d,%p,%p):stub.\n",printer,target,z,a,b); FIXME_(print)("(%s,%s,%d,%p,%p):stub.\n",printer,target,z,a,b);
return 1; return 1;
} }
@ -346,7 +346,7 @@ INT WINAPI DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort,
WORD fwCapability, LPWSTR pOutput, WORD fwCapability, LPWSTR pOutput,
const DEVMODEW *pDevMode) const DEVMODEW *pDevMode)
{ {
FIXME(print,"(%p,%p,%d,%p,%p): stub\n", FIXME_(print)("(%p,%p,%d,%p,%p): stub\n",
pDevice, pPort, fwCapability, pOutput, pDevMode); pDevice, pPort, fwCapability, pOutput, pDevMode);
return -1; return -1;
} }
@ -359,7 +359,7 @@ LONG WINAPI DocumentPropertiesA(HWND hWnd,HANDLE hPrinter,
LPSTR pDeviceName, LPDEVMODEA pDevModeOutput, LPSTR pDeviceName, LPDEVMODEA pDevModeOutput,
LPDEVMODEA pDevModeInput,DWORD fMode ) LPDEVMODEA pDevModeInput,DWORD fMode )
{ {
FIXME(print,"(%d,%d,%s,%p,%p,%ld):stub.\n", FIXME_(print)("(%d,%d,%s,%p,%p,%ld):stub.\n",
hWnd,hPrinter,pDeviceName,pDevModeOutput,pDevModeInput,fMode hWnd,hPrinter,pDeviceName,pDevModeOutput,pDevModeInput,fMode
); );
return 1; return 1;
@ -374,7 +374,7 @@ LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
LPDEVMODEW pDevModeOutput, LPDEVMODEW pDevModeOutput,
LPDEVMODEW pDevModeInput, DWORD fMode) LPDEVMODEW pDevModeInput, DWORD fMode)
{ {
FIXME(print,"(%d,%d,%s,%p,%p,%ld): stub\n", FIXME_(print)("(%d,%d,%s,%p,%p,%ld): stub\n",
hWnd,hPrinter,debugstr_w(pDeviceName),pDevModeOutput,pDevModeInput, hWnd,hPrinter,debugstr_w(pDeviceName),pDevModeOutput,pDevModeInput,
fMode); fMode);
return -1; return -1;
@ -388,7 +388,7 @@ LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter, BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter,
LPPRINTER_DEFAULTSA pDefault) LPPRINTER_DEFAULTSA pDefault)
{ {
FIXME(print,"(%s,%p,%p):stub\n",debugstr_a(lpPrinterName), phPrinter, FIXME_(print)("(%s,%p,%p):stub\n",debugstr_a(lpPrinterName), phPrinter,
pDefault); pDefault);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -401,7 +401,7 @@ BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter,
BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter, BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter,
LPPRINTER_DEFAULTSW pDefault) LPPRINTER_DEFAULTSW pDefault)
{ {
FIXME(print,"(%s,%p,%p):stub\n",debugstr_w(lpPrinterName), phPrinter, FIXME_(print)("(%s,%p,%p):stub\n",debugstr_w(lpPrinterName), phPrinter,
pDefault); pDefault);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -429,7 +429,7 @@ DWORD ENUMPRINTERS_GetDWORDFromRegistryA(
if (RegQueryValueExA(hPrinterSettings, KeyName, NULL, &DataType, if (RegQueryValueExA(hPrinterSettings, KeyName, NULL, &DataType,
Data, &DataSize)!=ERROR_SUCCESS) Data, &DataSize)!=ERROR_SUCCESS)
FIXME(print, "Query of register didn't succeed?"); FIXME_(print)("Query of register didn't succeed?");
if (DataType == REG_DWORD_LITTLE_ENDIAN) if (DataType == REG_DWORD_LITTLE_ENDIAN)
Result = Data[0] + (Data[1]<<8) + (Data[2]<<16) + (Data[3]<<24); Result = Data[0] + (Data[1]<<8) + (Data[2]<<16) + (Data[3]<<24);
if (DataType == REG_DWORD_BIG_ENDIAN) if (DataType == REG_DWORD_BIG_ENDIAN)
@ -482,7 +482,7 @@ BOOL ENUMPRINTERS_AddStringFromRegistryA(
} }
} }
else else
WARN(print,"Expected string setting, got something else from registry"); WARN_(print)("Expected string setting, got something else from registry");
if (Data) if (Data)
free(Data); free(Data);
@ -529,7 +529,7 @@ BOOL ENUMPRINTERS_AddInfo2A(
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, lpszPrinterSettings, 0, if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, lpszPrinterSettings, 0,
KEY_READ, &hPrinterSettings) != ERROR_SUCCESS) KEY_READ, &hPrinterSettings) != ERROR_SUCCESS)
{ {
WARN(print, "The registry did not contain my printer anymore?\n"); WARN_(print)("The registry did not contain my printer anymore?\n");
} }
else else
{ {
@ -652,7 +652,7 @@ BOOL ENUMPRINTERS_AddInfo4A(
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, lpszPrinterSettings, 0, if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, lpszPrinterSettings, 0,
KEY_READ, &hPrinterSettings) != ERROR_SUCCESS) KEY_READ, &hPrinterSettings) != ERROR_SUCCESS)
{ {
WARN(print, "The registry did not contain my printer anymore?\n"); WARN_(print)("The registry did not contain my printer anymore?\n");
} }
else else
{ {
@ -703,7 +703,7 @@ BOOL ENUMPRINTERS_AddInfo5A(
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, lpszPrinterSettings, 0, if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, lpszPrinterSettings, 0,
KEY_READ, &hPrinterSettings) != ERROR_SUCCESS) KEY_READ, &hPrinterSettings) != ERROR_SUCCESS)
{ {
WARN(print, "The registry did not contain my printer anymore?\n"); WARN_(print)("The registry did not contain my printer anymore?\n");
} }
else else
{ {
@ -804,7 +804,7 @@ BOOL WINAPI EnumPrintersA(
DWORD dwStructPrinterInfoSize; /* size of a Printer_Info_X structure */ DWORD dwStructPrinterInfoSize; /* size of a Printer_Info_X structure */
BOOL bCalcSpaceOnly=FALSE;/* if TRUE: don't store data, just calculate space*/ BOOL bCalcSpaceOnly=FALSE;/* if TRUE: don't store data, just calculate space*/
TRACE(print, "entered.\n"); TRACE_(print)("entered.\n");
/* test whether we're requested to really fill in. If so, /* test whether we're requested to really fill in. If so,
* zero out the data area, and initialise some returns to zero, * zero out the data area, and initialise some returns to zero,
@ -853,7 +853,7 @@ BOOL WINAPI EnumPrintersA(
/* Oh no! An empty list of printers! /* Oh no! An empty list of printers!
* (which is a valid configuration anyway) * (which is a valid configuration anyway)
*/ */
TRACE(print, "No entries in the Printers part of the registry\n"); TRACE_(print)("No entries in the Printers part of the registry\n");
} }
/* count the number of entries and check if it fits in the buffer /* count the number of entries and check if it fits in the buffer
@ -957,7 +957,7 @@ BOOL WINAPI EnumPrintersW(DWORD dwType, LPWSTR lpszName,
DWORD cbBuf, LPDWORD lpdwNeeded, DWORD cbBuf, LPDWORD lpdwNeeded,
LPDWORD lpdwReturned) LPDWORD lpdwReturned)
{ {
FIXME(print,"Nearly empty stub\n"); FIXME_(print)("Nearly empty stub\n");
*lpdwReturned=0; *lpdwReturned=0;
*lpdwNeeded = 0; *lpdwNeeded = 0;
return TRUE; return TRUE;
@ -969,7 +969,7 @@ BOOL WINAPI EnumPrintersW(DWORD dwType, LPWSTR lpszName,
*/ */
BOOL WINAPI AddMonitorA(LPCSTR pName, DWORD Level, LPBYTE pMonitors) BOOL WINAPI AddMonitorA(LPCSTR pName, DWORD Level, LPBYTE pMonitors)
{ {
FIXME(print, "(%s,%lx,%p):stub!\n", pName, Level, pMonitors); FIXME_(print)("(%s,%lx,%p):stub!\n", pName, Level, pMonitors);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -981,7 +981,7 @@ BOOL WINAPI AddMonitorA(LPCSTR pName, DWORD Level, LPBYTE pMonitors)
BOOL WINAPI BOOL WINAPI
DeletePrinterDriverA (LPSTR pName, LPSTR pEnvironment, LPSTR pDriverName) DeletePrinterDriverA (LPSTR pName, LPSTR pEnvironment, LPSTR pDriverName)
{ {
FIXME(print,"(%s,%s,%s):stub\n",debugstr_a(pName),debugstr_a(pEnvironment), FIXME_(print)("(%s,%s,%s):stub\n",debugstr_a(pName),debugstr_a(pEnvironment),
debugstr_a(pDriverName)); debugstr_a(pDriverName));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -995,7 +995,7 @@ DeletePrinterDriverA (LPSTR pName, LPSTR pEnvironment, LPSTR pDriverName)
BOOL WINAPI BOOL WINAPI
DeleteMonitorA (LPSTR pName, LPSTR pEnvironment, LPSTR pMonitorName) DeleteMonitorA (LPSTR pName, LPSTR pEnvironment, LPSTR pMonitorName)
{ {
FIXME(print,"(%s,%s,%s):stub\n",debugstr_a(pName),debugstr_a(pEnvironment), FIXME_(print)("(%s,%s,%s):stub\n",debugstr_a(pName),debugstr_a(pEnvironment),
debugstr_a(pMonitorName)); debugstr_a(pMonitorName));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -1009,7 +1009,7 @@ DeleteMonitorA (LPSTR pName, LPSTR pEnvironment, LPSTR pMonitorName)
BOOL WINAPI BOOL WINAPI
DeletePortA (LPSTR pName, HWND hWnd, LPSTR pPortName) DeletePortA (LPSTR pName, HWND hWnd, LPSTR pPortName)
{ {
FIXME(print,"(%s,0x%08x,%s):stub\n",debugstr_a(pName),hWnd, FIXME_(print)("(%s,0x%08x,%s):stub\n",debugstr_a(pName),hWnd,
debugstr_a(pPortName)); debugstr_a(pPortName));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -1025,7 +1025,7 @@ SetPrinterW(
LPBYTE pPrinter, LPBYTE pPrinter,
DWORD Command) { DWORD Command) {
FIXME(print,"():stub\n"); FIXME_(print)("():stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -1040,7 +1040,7 @@ WritePrinter(
DWORD cbBuf, DWORD cbBuf,
LPDWORD pcWritten) { LPDWORD pcWritten) {
FIXME(print,"():stub\n"); FIXME_(print)("():stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -1050,7 +1050,7 @@ WritePrinter(
*/ */
BOOL WINAPI AddFormA(HANDLE hPrinter, DWORD Level, LPBYTE pForm) BOOL WINAPI AddFormA(HANDLE hPrinter, DWORD Level, LPBYTE pForm)
{ {
FIXME(print, "(%d,%ld,%p): stub\n", hPrinter, Level, pForm); FIXME_(print)("(%d,%ld,%p): stub\n", hPrinter, Level, pForm);
return 1; return 1;
} }
@ -1059,7 +1059,7 @@ BOOL WINAPI AddFormA(HANDLE hPrinter, DWORD Level, LPBYTE pForm)
*/ */
BOOL WINAPI AddFormW(HANDLE hPrinter, DWORD Level, LPBYTE pForm) BOOL WINAPI AddFormW(HANDLE hPrinter, DWORD Level, LPBYTE pForm)
{ {
FIXME(print, "(%d,%ld,%p): stub\n", hPrinter, Level, pForm); FIXME_(print)("(%d,%ld,%p): stub\n", hPrinter, Level, pForm);
return 1; return 1;
} }
@ -1069,7 +1069,7 @@ BOOL WINAPI AddFormW(HANDLE hPrinter, DWORD Level, LPBYTE pForm)
BOOL WINAPI AddJobA(HANDLE hPrinter, DWORD Level, LPBYTE pData, BOOL WINAPI AddJobA(HANDLE hPrinter, DWORD Level, LPBYTE pData,
DWORD cbBuf, LPDWORD pcbNeeded) DWORD cbBuf, LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pData, cbBuf, FIXME_(print)("(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pData, cbBuf,
pcbNeeded); pcbNeeded);
return 1; return 1;
} }
@ -1080,7 +1080,7 @@ BOOL WINAPI AddJobA(HANDLE hPrinter, DWORD Level, LPBYTE pData,
BOOL WINAPI AddJobW(HANDLE hPrinter, DWORD Level, LPBYTE pData, DWORD cbBuf, BOOL WINAPI AddJobW(HANDLE hPrinter, DWORD Level, LPBYTE pData, DWORD cbBuf,
LPDWORD pcbNeeded) LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pData, cbBuf, FIXME_(print)("(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pData, cbBuf,
pcbNeeded); pcbNeeded);
return 1; return 1;
} }
@ -1090,7 +1090,7 @@ BOOL WINAPI AddJobW(HANDLE hPrinter, DWORD Level, LPBYTE pData, DWORD cbBuf,
*/ */
HANDLE WINAPI AddPrinterA(LPSTR pName, DWORD Level, LPBYTE pPrinter) HANDLE WINAPI AddPrinterA(LPSTR pName, DWORD Level, LPBYTE pPrinter)
{ {
FIXME(print, "(%s,%ld,%p): stub\n", pName, Level, pPrinter); FIXME_(print)("(%s,%ld,%p): stub\n", pName, Level, pPrinter);
return 0; return 0;
} }
@ -1099,7 +1099,7 @@ HANDLE WINAPI AddPrinterA(LPSTR pName, DWORD Level, LPBYTE pPrinter)
*/ */
HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter) HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter)
{ {
FIXME(print, "(%p,%ld,%p): stub\n", pName, Level, pPrinter); FIXME_(print)("(%p,%ld,%p): stub\n", pName, Level, pPrinter);
return 0; return 0;
} }
@ -1109,7 +1109,7 @@ HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter)
*/ */
BOOL WINAPI ClosePrinter(HANDLE hPrinter) BOOL WINAPI ClosePrinter(HANDLE hPrinter)
{ {
FIXME(print, "(%d): stub\n", hPrinter); FIXME_(print)("(%d): stub\n", hPrinter);
return 1; return 1;
} }
@ -1118,7 +1118,7 @@ BOOL WINAPI ClosePrinter(HANDLE hPrinter)
*/ */
BOOL WINAPI DeleteFormA(HANDLE hPrinter, LPSTR pFormName) BOOL WINAPI DeleteFormA(HANDLE hPrinter, LPSTR pFormName)
{ {
FIXME(print, "(%d,%s): stub\n", hPrinter, pFormName); FIXME_(print)("(%d,%s): stub\n", hPrinter, pFormName);
return 1; return 1;
} }
@ -1127,7 +1127,7 @@ BOOL WINAPI DeleteFormA(HANDLE hPrinter, LPSTR pFormName)
*/ */
BOOL WINAPI DeleteFormW(HANDLE hPrinter, LPWSTR pFormName) BOOL WINAPI DeleteFormW(HANDLE hPrinter, LPWSTR pFormName)
{ {
FIXME(print, "(%d,%s): stub\n", hPrinter, debugstr_w(pFormName)); FIXME_(print)("(%d,%s): stub\n", hPrinter, debugstr_w(pFormName));
return 1; return 1;
} }
@ -1136,7 +1136,7 @@ BOOL WINAPI DeleteFormW(HANDLE hPrinter, LPWSTR pFormName)
*/ */
BOOL WINAPI DeletePrinter(HANDLE hPrinter) BOOL WINAPI DeletePrinter(HANDLE hPrinter)
{ {
FIXME(print, "(%d): stub\n", hPrinter); FIXME_(print)("(%d): stub\n", hPrinter);
return 1; return 1;
} }
@ -1146,7 +1146,7 @@ BOOL WINAPI DeletePrinter(HANDLE hPrinter)
BOOL WINAPI SetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter, BOOL WINAPI SetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
DWORD Command) DWORD Command)
{ {
FIXME(print, "(%d,%ld,%p,%ld): stub\n",hPrinter,Level,pPrinter,Command); FIXME_(print)("(%d,%ld,%p,%ld): stub\n",hPrinter,Level,pPrinter,Command);
return FALSE; return FALSE;
} }
@ -1156,7 +1156,7 @@ BOOL WINAPI SetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
BOOL WINAPI SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, BOOL WINAPI SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level,
LPBYTE pJob, DWORD Command) LPBYTE pJob, DWORD Command)
{ {
FIXME(print, "(%d,%ld,%ld,%p,%ld): stub\n",hPrinter,JobId,Level,pJob, FIXME_(print)("(%d,%ld,%ld,%p,%ld): stub\n",hPrinter,JobId,Level,pJob,
Command); Command);
return FALSE; return FALSE;
} }
@ -1167,7 +1167,7 @@ BOOL WINAPI SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level,
BOOL WINAPI SetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level, BOOL WINAPI SetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level,
LPBYTE pJob, DWORD Command) LPBYTE pJob, DWORD Command)
{ {
FIXME(print, "(%d,%ld,%ld,%p,%ld): stub\n",hPrinter,JobId,Level,pJob, FIXME_(print)("(%d,%ld,%ld,%p,%ld): stub\n",hPrinter,JobId,Level,pJob,
Command); Command);
return FALSE; return FALSE;
} }
@ -1178,7 +1178,7 @@ BOOL WINAPI SetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level,
BOOL WINAPI GetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level, BOOL WINAPI GetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level,
LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded) LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,pFormName, FIXME_(print)("(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,pFormName,
Level,pForm,cbBuf,pcbNeeded); Level,pForm,cbBuf,pcbNeeded);
return FALSE; return FALSE;
} }
@ -1189,7 +1189,7 @@ BOOL WINAPI GetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level,
BOOL WINAPI GetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level, BOOL WINAPI GetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded) LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter, FIXME_(print)("(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,
debugstr_w(pFormName),Level,pForm,cbBuf,pcbNeeded); debugstr_w(pFormName),Level,pForm,cbBuf,pcbNeeded);
return FALSE; return FALSE;
} }
@ -1200,7 +1200,7 @@ BOOL WINAPI GetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
BOOL WINAPI SetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level, BOOL WINAPI SetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level,
LPBYTE pForm) LPBYTE pForm)
{ {
FIXME(print, "(%d,%s,%ld,%p): stub\n",hPrinter,pFormName,Level,pForm); FIXME_(print)("(%d,%s,%ld,%p): stub\n",hPrinter,pFormName,Level,pForm);
return FALSE; return FALSE;
} }
@ -1210,7 +1210,7 @@ BOOL WINAPI SetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level,
BOOL WINAPI SetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level, BOOL WINAPI SetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
LPBYTE pForm) LPBYTE pForm)
{ {
FIXME(print, "(%d,%p,%ld,%p): stub\n",hPrinter,pFormName,Level,pForm); FIXME_(print)("(%d,%p,%ld,%p): stub\n",hPrinter,pFormName,Level,pForm);
return FALSE; return FALSE;
} }
@ -1220,7 +1220,7 @@ BOOL WINAPI SetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
BOOL WINAPI ReadPrinter(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf, BOOL WINAPI ReadPrinter(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf,
LPDWORD pNoBytesRead) LPDWORD pNoBytesRead)
{ {
FIXME(print, "(%d,%p,%ld,%p): stub\n",hPrinter,pBuf,cbBuf,pNoBytesRead); FIXME_(print)("(%d,%p,%ld,%p): stub\n",hPrinter,pBuf,cbBuf,pNoBytesRead);
return FALSE; return FALSE;
} }
@ -1229,7 +1229,7 @@ BOOL WINAPI ReadPrinter(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf,
*/ */
BOOL WINAPI ResetPrinterA(HANDLE hPrinter, LPPRINTER_DEFAULTSA pDefault) BOOL WINAPI ResetPrinterA(HANDLE hPrinter, LPPRINTER_DEFAULTSA pDefault)
{ {
FIXME(print, "(%d, %p): stub\n", hPrinter, pDefault); FIXME_(print)("(%d, %p): stub\n", hPrinter, pDefault);
return FALSE; return FALSE;
} }
@ -1238,7 +1238,7 @@ BOOL WINAPI ResetPrinterA(HANDLE hPrinter, LPPRINTER_DEFAULTSA pDefault)
*/ */
BOOL WINAPI ResetPrinterW(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault) BOOL WINAPI ResetPrinterW(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault)
{ {
FIXME(print, "(%d, %p): stub\n", hPrinter, pDefault); FIXME_(print)("(%d, %p): stub\n", hPrinter, pDefault);
return FALSE; return FALSE;
} }
@ -1248,7 +1248,7 @@ BOOL WINAPI ResetPrinterW(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault)
BOOL WINAPI GetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter, BOOL WINAPI GetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
DWORD cbBuf, LPDWORD pcbNeeded) DWORD cbBuf, LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pPrinter, FIXME_(print)("(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pPrinter,
cbBuf, pcbNeeded); cbBuf, pcbNeeded);
return FALSE; return FALSE;
} }
@ -1259,7 +1259,7 @@ BOOL WINAPI GetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
BOOL WINAPI GetPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter, BOOL WINAPI GetPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
DWORD cbBuf, LPDWORD pcbNeeded) DWORD cbBuf, LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pPrinter, FIXME_(print)("(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pPrinter,
cbBuf, pcbNeeded); cbBuf, pcbNeeded);
return FALSE; return FALSE;
} }
@ -1271,7 +1271,7 @@ BOOL WINAPI GetPrinterDriverA(HANDLE hPrinter, LPSTR pEnvironment,
DWORD Level, LPBYTE pDriverInfo, DWORD Level, LPBYTE pDriverInfo,
DWORD cbBuf, LPDWORD pcbNeeded) DWORD cbBuf, LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,pEnvironment, FIXME_(print)("(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,pEnvironment,
Level,pDriverInfo,cbBuf, pcbNeeded); Level,pDriverInfo,cbBuf, pcbNeeded);
return FALSE; return FALSE;
} }
@ -1283,7 +1283,7 @@ BOOL WINAPI GetPrinterDriverW(HANDLE hPrinter, LPWSTR pEnvironment,
DWORD Level, LPBYTE pDriverInfo, DWORD Level, LPBYTE pDriverInfo,
DWORD cbBuf, LPDWORD pcbNeeded) DWORD cbBuf, LPDWORD pcbNeeded)
{ {
FIXME(print, "(%d,%p,%ld,%p,%ld,%p): stub\n",hPrinter,pEnvironment, FIXME_(print)("(%d,%p,%ld,%p,%ld,%p): stub\n",hPrinter,pEnvironment,
Level,pDriverInfo,cbBuf, pcbNeeded); Level,pDriverInfo,cbBuf, pcbNeeded);
return FALSE; return FALSE;
} }
@ -1293,7 +1293,7 @@ BOOL WINAPI GetPrinterDriverW(HANDLE hPrinter, LPWSTR pEnvironment,
BOOL WINAPI AddPrinterDriverA(LPSTR printerName,DWORD level, BOOL WINAPI AddPrinterDriverA(LPSTR printerName,DWORD level,
LPBYTE pDriverInfo) LPBYTE pDriverInfo)
{ {
FIXME(print, "(%s,%ld,%p): stub\n",printerName,level,pDriverInfo); FIXME_(print)("(%s,%ld,%p): stub\n",printerName,level,pDriverInfo);
return FALSE; return FALSE;
} }
/***************************************************************************** /*****************************************************************************
@ -1302,7 +1302,7 @@ BOOL WINAPI AddPrinterDriverA(LPSTR printerName,DWORD level,
BOOL WINAPI AddPrinterDriverW(LPWSTR printerName,DWORD level, BOOL WINAPI AddPrinterDriverW(LPWSTR printerName,DWORD level,
LPBYTE pDriverInfo) LPBYTE pDriverInfo)
{ {
FIXME(print, "(%s,%ld,%p): stub\n",debugstr_w(printerName), FIXME_(print)("(%s,%ld,%p): stub\n",debugstr_w(printerName),
level,pDriverInfo); level,pDriverInfo);
return FALSE; return FALSE;
} }
@ -1322,7 +1322,7 @@ BOOL WINAPI AddPrinterDriverW(LPWSTR printerName,DWORD level,
BOOL WINAPI PrinterProperties(HWND hWnd, /* handle to parent window */ BOOL WINAPI PrinterProperties(HWND hWnd, /* handle to parent window */
HANDLE hPrinter /* handle to printer object */ HANDLE hPrinter /* handle to printer object */
){ ){
FIXME(print, "(%d,%d): stub\n", hWnd, hPrinter); FIXME_(print)("(%d,%d): stub\n", hWnd, hPrinter);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }

View File

@ -37,7 +37,7 @@
#include "winerror.h" #include "winerror.h"
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debugtools.h"
#include "xmalloc.h" #include "xmalloc.h"
#include "options.h" #include "options.h"
#include "winreg.h" #include "winreg.h"
@ -161,7 +161,7 @@ LPWSTR strcvtA2W(LPCSTR src, int nchars)
static LPWSTR lmemcpynAtoW( LPWSTR dst, LPCSTR src, INT n ) static LPWSTR lmemcpynAtoW( LPWSTR dst, LPCSTR src, INT n )
{ LPWSTR p = dst; { LPWSTR p = dst;
TRACE(reg,"\"%s\" %i\n",src, n); TRACE_(reg)("\"%s\" %i\n",src, n);
while (n-- > 0) *p++ = (WCHAR)(unsigned char)*src++; while (n-- > 0) *p++ = (WCHAR)(unsigned char)*src++;
@ -170,7 +170,7 @@ static LPWSTR lmemcpynAtoW( LPWSTR dst, LPCSTR src, INT n )
static LPSTR lmemcpynWtoA( LPSTR dst, LPCWSTR src, INT n ) static LPSTR lmemcpynWtoA( LPSTR dst, LPCWSTR src, INT n )
{ LPSTR p = dst; { LPSTR p = dst;
TRACE(string,"L\"%s\" %i\n",debugstr_w(src), n); TRACE_(string)("L\"%s\" %i\n",debugstr_w(src), n);
while (n-- > 0) *p++ = (CHAR)*src++; while (n-- > 0) *p++ = (CHAR)*src++;
@ -186,14 +186,14 @@ static void debug_print_value (LPBYTE lpbData, LPKEYVALUE key)
case HEX_REG_EXPAND_SZ: case HEX_REG_EXPAND_SZ:
case HEX_REG_SZ: case HEX_REG_SZ:
case REG_SZ: case REG_SZ:
TRACE(reg," Value %s, Data(sz)=%s\n", TRACE_(reg)(" Value %s, Data(sz)=%s\n",
debugstr_w(key->name), debugstr_w(key->name),
debugstr_w((LPCWSTR)lpbData)); debugstr_w((LPCWSTR)lpbData));
break; break;
case HEX_REG_DWORD: case HEX_REG_DWORD:
case REG_DWORD: case REG_DWORD:
TRACE(reg," Value %s, Data(dword)=0x%08lx\n", TRACE_(reg)(" Value %s, Data(dword)=0x%08lx\n",
debugstr_w(key->name), debugstr_w(key->name),
(DWORD)*lpbData); (DWORD)*lpbData);
break; break;
@ -205,7 +205,7 @@ static void debug_print_value (LPBYTE lpbData, LPKEYVALUE key)
LPCWSTR ptr = (LPCWSTR)lpbData; LPCWSTR ptr = (LPCWSTR)lpbData;
for (i=0;ptr[0];i++) for (i=0;ptr[0];i++)
{ {
TRACE(reg, " Value %s, MULTI_SZ(%i=%s)\n", TRACE_(reg)(" Value %s, MULTI_SZ(%i=%s)\n",
debugstr_w(key->name), debugstr_w(key->name),
i, i,
debugstr_w(ptr)); debugstr_w(ptr));
@ -237,14 +237,14 @@ static void debug_print_value (LPBYTE lpbData, LPKEYVALUE key)
break; break;
} }
} }
TRACE(reg," Value %s, Data(raw)=(%s)\n", TRACE_(reg)(" Value %s, Data(raw)=(%s)\n",
debugstr_w(key->name), debugstr_w(key->name),
szTemp); szTemp);
} }
break; break;
default: default:
FIXME(reg, " Value %s, Unknown data type %ld\n", FIXME_(reg)(" Value %s, Unknown data type %ld\n",
debugstr_w(key->name), debugstr_w(key->name),
key->type); key->type);
} /* switch */ } /* switch */
@ -281,7 +281,7 @@ static void add_handle( HKEY hkey, LPKEYSTRUCT lpkey, REGSAM accessmask )
{ {
int i; int i;
TRACE(reg,"(0x%x,%p,0x%lx)\n",hkey,lpkey,accessmask); TRACE_(reg)("(0x%x,%p,0x%lx)\n",hkey,lpkey,accessmask);
/* Check for duplicates */ /* Check for duplicates */
for (i=0;i<nrofopenhandles;i++) { for (i=0;i<nrofopenhandles;i++) {
if (openhandles[i].lpkey==lpkey) { if (openhandles[i].lpkey==lpkey) {
@ -290,7 +290,7 @@ static void add_handle( HKEY hkey, LPKEYSTRUCT lpkey, REGSAM accessmask )
/*WARN(reg, "Adding key %p twice\n",lpkey);*/ /*WARN(reg, "Adding key %p twice\n",lpkey);*/
} }
if (openhandles[i].hkey==hkey) { if (openhandles[i].hkey==hkey) {
WARN(reg, "Adding handle %x twice\n",hkey); WARN_(reg)("Adding handle %x twice\n",hkey);
} }
} }
openhandles=xrealloc( openhandles, openhandles=xrealloc( openhandles,
@ -317,7 +317,7 @@ static LPKEYSTRUCT get_handle( HKEY hkey )
for (i=0; i<nrofopenhandles; i++) for (i=0; i<nrofopenhandles; i++)
if (openhandles[i].hkey == hkey) if (openhandles[i].hkey == hkey)
return openhandles[i].lpkey; return openhandles[i].lpkey;
WARN(reg, "Could not find handle 0x%x\n",hkey); WARN_(reg)("Could not find handle 0x%x\n",hkey);
return NULL; return NULL;
} }
@ -341,7 +341,7 @@ static DWORD remove_handle( HKEY hkey )
break; break;
if (i == nrofopenhandles) { if (i == nrofopenhandles) {
WARN(reg, "Could not find handle 0x%x\n",hkey); WARN_(reg)("Could not find handle 0x%x\n",hkey);
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
} }
@ -389,9 +389,7 @@ static LPKEYSTRUCT lookup_hkey( HKEY hkey )
"SOFTWARE\\Classes", "SOFTWARE\\Classes",
&cl_r_hkey) != ERROR_SUCCESS) &cl_r_hkey) != ERROR_SUCCESS)
{ {
ERR( ERR_(reg)("Could not create HKLM\\SOFTWARE\\Classes. This is impossible.\n");
reg,
"Could not create HKLM\\SOFTWARE\\Classes. This is impossible.\n");
exit(1); exit(1);
} }
@ -469,7 +467,7 @@ static void split_keypath( LPCWSTR wp, LPWSTR **wpv, int *wpc)
int i,j,len; int i,j,len;
LPWSTR ws; LPWSTR ws;
TRACE(reg,"(%s,%p,%p)\n",debugstr_w(wp),wpv,wpc); TRACE_(reg)("(%s,%p,%p)\n",debugstr_w(wp),wpv,wpc);
ws = HEAP_strdupW( SystemHeap, 0, wp ); ws = HEAP_strdupW( SystemHeap, 0, wp );
@ -514,7 +512,7 @@ static void REGISTRY_Init(void) {
HKEY hkey; HKEY hkey;
char buf[200]; char buf[200];
TRACE(reg,"(void)\n"); TRACE_(reg)("(void)\n");
RegCreateKey16(HKEY_DYN_DATA,"PerfStats\\StatData",&hkey); RegCreateKey16(HKEY_DYN_DATA,"PerfStats\\StatData",&hkey);
RegCloseKey(hkey); RegCloseKey(hkey);
@ -693,7 +691,7 @@ static BOOL _savereg( LPKEYSTRUCT lpkey, char *fn, int all )
F=fopen(fn,"w"); F=fopen(fn,"w");
if (F==NULL) { if (F==NULL) {
WARN(reg,"Couldn't open %s for writing: %s\n", WARN_(reg)("Couldn't open %s for writing: %s\n",
fn,strerror(errno) fn,strerror(errno)
); );
return FALSE; return FALSE;
@ -701,7 +699,7 @@ static BOOL _savereg( LPKEYSTRUCT lpkey, char *fn, int all )
if (!_savesubreg(F,lpkey,all)) { if (!_savesubreg(F,lpkey,all)) {
fclose(F); fclose(F);
unlink(fn); unlink(fn);
WARN(reg,"Failed to save keys, perhaps no more diskspace for %s?\n",fn); WARN_(reg)("Failed to save keys, perhaps no more diskspace for %s?\n",fn);
return FALSE; return FALSE;
} }
fclose(F); fclose(F);
@ -721,7 +719,7 @@ void SHELL_SaveRegistry( void )
int usedCfgUser = 0; int usedCfgUser = 0;
int usedCfgLM = 0; int usedCfgLM = 0;
TRACE(reg,"(void)\n"); TRACE_(reg)("(void)\n");
all=0; all=0;
if (RegOpenKey16(HKEY_CURRENT_USER,KEY_REGISTRY,&hkey)!=ERROR_SUCCESS) if (RegOpenKey16(HKEY_CURRENT_USER,KEY_REGISTRY,&hkey)!=ERROR_SUCCESS)
@ -749,7 +747,7 @@ void SHELL_SaveRegistry( void )
if (!(home = getenv( "HOME" ))) if (!(home = getenv( "HOME" )))
{ {
WARN(reg,"Failed to get homedirectory of UID %d.\n",getuid()); WARN_(reg)("Failed to get homedirectory of UID %d.\n",getuid());
return; return;
} }
/* /*
@ -1020,7 +1018,7 @@ static char* _wine_read_USTRING( char *buf, LPWSTR *str )
continue; continue;
} }
if (*s!='u') { if (*s!='u') {
WARN(reg,"Non unicode escape sequence \\%c found in |%s|\n",*s,buf); WARN_(reg)("Non unicode escape sequence \\%c found in |%s|\n",*s,buf);
*ws++='\\'; *ws++='\\';
*ws++=*s++; *ws++=*s++;
} else { } else {
@ -1030,7 +1028,7 @@ static char* _wine_read_USTRING( char *buf, LPWSTR *str )
s++; s++;
memcpy(xbuf,s,4);xbuf[4]='\0'; memcpy(xbuf,s,4);xbuf[4]='\0';
if (!sscanf(xbuf,"%x",&wc)) if (!sscanf(xbuf,"%x",&wc))
WARN(reg,"Strange escape sequence %s found in |%s|\n",xbuf,buf); WARN_(reg)("Strange escape sequence %s found in |%s|\n",xbuf,buf);
s+=4; s+=4;
*ws++ =(unsigned short)wc; *ws++ =(unsigned short)wc;
} }
@ -1065,7 +1063,7 @@ static int _wine_loadsubkey( FILE *F, LPKEYSTRUCT lpkey, int level, char **buf,
char *s; char *s;
LPWSTR name; LPWSTR name;
TRACE(reg,"(%p,%p,%d,%s,%d,%lx)\n", F, lpkey, level, debugstr_a(*buf), TRACE_(reg)("(%p,%p,%d,%s,%d,%lx)\n", F, lpkey, level, debugstr_a(*buf),
*buflen, optflag); *buflen, optflag);
lpkey->flags |= optflag; lpkey->flags |= optflag;
@ -1080,7 +1078,7 @@ static int _wine_loadsubkey( FILE *F, LPKEYSTRUCT lpkey, int level, char **buf,
} }
if (i>level) { if (i>level) {
if (lpxkey==NULL) { if (lpxkey==NULL) {
WARN(reg,"Got a subhierarchy without resp. key?\n"); WARN_(reg)("Got a subhierarchy without resp. key?\n");
return 0; return 0;
} }
_wine_loadsubkey(F,lpxkey,level+1,buf,buflen,optflag); _wine_loadsubkey(F,lpxkey,level+1,buf,buflen,optflag);
@ -1104,12 +1102,12 @@ static int _wine_loadsubkey( FILE *F, LPKEYSTRUCT lpkey, int level, char **buf,
int len,lastmodified,type; int len,lastmodified,type;
if (*s!='=') { if (*s!='=') {
WARN(reg,"Unexpected character: %c\n",*s); WARN_(reg)("Unexpected character: %c\n",*s);
break; break;
} }
s++; s++;
if (2!=sscanf(s,"%d,%d,",&type,&lastmodified)) { if (2!=sscanf(s,"%d,%d,",&type,&lastmodified)) {
WARN(reg,"Haven't understood possible value in |%s|, skipping.\n",*buf); WARN_(reg)("Haven't understood possible value in |%s|, skipping.\n",*buf);
break; break;
} }
/* skip the 2 , */ /* skip the 2 , */
@ -1172,7 +1170,7 @@ static int _wine_loadsubreg( FILE *F, LPKEYSTRUCT lpkey, DWORD optflag )
return 0; return 0;
} }
if (ver!=REGISTRY_SAVE_VERSION) { if (ver!=REGISTRY_SAVE_VERSION) {
TRACE(reg,"Old format (%d) registry found, ignoring it. (buf was %s).\n",ver,buf); TRACE_(reg)("Old format (%d) registry found, ignoring it. (buf was %s).\n",ver,buf);
free(buf); free(buf);
return 0; return 0;
} }
@ -1196,11 +1194,11 @@ static void _wine_loadreg( LPKEYSTRUCT lpkey, char *fn, DWORD optflag )
{ {
FILE *F; FILE *F;
TRACE(reg,"(%p,%s,%lx)\n",lpkey,debugstr_a(fn),optflag); TRACE_(reg)("(%p,%s,%lx)\n",lpkey,debugstr_a(fn),optflag);
F = fopen(fn,"rb"); F = fopen(fn,"rb");
if (F==NULL) { if (F==NULL) {
WARN(reg,"Couldn't open %s for reading: %s\n",fn,strerror(errno) ); WARN_(reg)("Couldn't open %s for reading: %s\n",fn,strerror(errno) );
return; return;
} }
if (!_wine_loadsubreg(F,lpkey,optflag)) { if (!_wine_loadsubreg(F,lpkey,optflag)) {
@ -1610,7 +1608,7 @@ static void _w95_loadreg( char* fn, LPKEYSTRUCT lpkey )
OFSTRUCT ofs; OFSTRUCT ofs;
BY_HANDLE_FILE_INFORMATION hfdinfo; BY_HANDLE_FILE_INFORMATION hfdinfo;
TRACE(reg,"Loading Win95 registry database '%s'\n",fn); TRACE_(reg)("Loading Win95 registry database '%s'\n",fn);
hfd=OpenFile(fn,&ofs,OF_READ); hfd=OpenFile(fn,&ofs,OF_READ);
if (hfd==HFILE_ERROR) if (hfd==HFILE_ERROR)
return; return;
@ -1618,7 +1616,7 @@ static void _w95_loadreg( char* fn, LPKEYSTRUCT lpkey )
if (4!=_lread(hfd,magic,4)) if (4!=_lread(hfd,magic,4))
return; return;
if (strcmp(magic,"CREG")) { if (strcmp(magic,"CREG")) {
WARN(reg,"%s is not a w95 registry.\n",fn); WARN_(reg)("%s is not a w95 registry.\n",fn);
return; return;
} }
if (4!=_lread(hfd,&version,4)) if (4!=_lread(hfd,&version,4))
@ -1630,7 +1628,7 @@ static void _w95_loadreg( char* fn, LPKEYSTRUCT lpkey )
if (4!=_lread(hfd,magic,4)) if (4!=_lread(hfd,magic,4))
return; return;
if (strcmp(magic,"RGKN")) { if (strcmp(magic,"RGKN")) {
WARN(reg, "second IFF header not RGKN, but %s\n", magic); WARN_(reg)("second IFF header not RGKN, but %s\n", magic);
return; return;
} }
@ -1796,7 +1794,7 @@ __w31_dumptree( unsigned short idx,
} }
} }
} else { } else {
TRACE(reg,"strange: no directory key name, idx=%04x\n", idx); TRACE_(reg)("strange: no directory key name, idx=%04x\n", idx);
} }
__w31_dumptree(dir->child_idx,txt,tab,head,xlpkey,lastmodified,level+1); __w31_dumptree(dir->child_idx,txt,tab,head,xlpkey,lastmodified,level+1);
idx=dir->sibling_idx; idx=dir->sibling_idx;
@ -1818,7 +1816,7 @@ void _w31_loadreg(void) {
time_t lastmodified; time_t lastmodified;
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg,"(void)\n"); TRACE_(reg)("(void)\n");
hf = OpenFile("reg.dat",&ofs,OF_READ); hf = OpenFile("reg.dat",&ofs,OF_READ);
if (hf==HFILE_ERROR) if (hf==HFILE_ERROR)
@ -1826,12 +1824,12 @@ void _w31_loadreg(void) {
/* read & dump header */ /* read & dump header */
if (sizeof(head)!=_lread(hf,&head,sizeof(head))) { if (sizeof(head)!=_lread(hf,&head,sizeof(head))) {
ERR(reg, "reg.dat is too short.\n"); ERR_(reg)("reg.dat is too short.\n");
_lclose(hf); _lclose(hf);
return; return;
} }
if (memcmp(head.cookie, "SHCC3.10", sizeof(head.cookie))!=0) { if (memcmp(head.cookie, "SHCC3.10", sizeof(head.cookie))!=0) {
ERR(reg, "reg.dat has bad signature.\n"); ERR_(reg)("reg.dat has bad signature.\n");
_lclose(hf); _lclose(hf);
return; return;
} }
@ -1840,7 +1838,7 @@ void _w31_loadreg(void) {
/* read and dump index table */ /* read and dump index table */
tab = xmalloc(len); tab = xmalloc(len);
if (len!=_lread(hf,tab,len)) { if (len!=_lread(hf,tab,len)) {
ERR(reg,"couldn't read %d bytes.\n",len); ERR_(reg)("couldn't read %d bytes.\n",len);
free(tab); free(tab);
_lclose(hf); _lclose(hf);
return; return;
@ -1849,14 +1847,14 @@ void _w31_loadreg(void) {
/* read text */ /* read text */
txt = xmalloc(head.textsize); txt = xmalloc(head.textsize);
if (-1==_llseek(hf,head.textoff,SEEK_SET)) { if (-1==_llseek(hf,head.textoff,SEEK_SET)) {
ERR(reg,"couldn't seek to textblock.\n"); ERR_(reg)("couldn't seek to textblock.\n");
free(tab); free(tab);
free(txt); free(txt);
_lclose(hf); _lclose(hf);
return; return;
} }
if (head.textsize!=_lread(hf,txt,head.textsize)) { if (head.textsize!=_lread(hf,txt,head.textsize)) {
ERR(reg,"textblock too short (%d instead of %ld).\n",len,head.textsize); ERR_(reg)("textblock too short (%d instead of %ld).\n",len,head.textsize);
free(tab); free(tab);
free(txt); free(txt);
_lclose(hf); _lclose(hf);
@ -1864,7 +1862,7 @@ void _w31_loadreg(void) {
} }
if (!GetFileInformationByHandle(hf,&hfinfo)) { if (!GetFileInformationByHandle(hf,&hfinfo)) {
ERR(reg,"GetFileInformationByHandle failed?.\n"); ERR_(reg)("GetFileInformationByHandle failed?.\n");
free(tab); free(tab);
free(txt); free(txt);
_lclose(hf); _lclose(hf);
@ -1889,7 +1887,7 @@ void SHELL_LoadRegistry( void )
LPKEYSTRUCT lpkey, HKCU, HKU, HKLM; LPKEYSTRUCT lpkey, HKCU, HKU, HKLM;
HKEY hkey; HKEY hkey;
TRACE(reg,"(void)\n"); TRACE_(reg)("(void)\n");
HKCU = lookup_hkey(HKEY_CURRENT_USER); HKCU = lookup_hkey(HKEY_CURRENT_USER);
HKU = lookup_hkey(HKEY_USERS); HKU = lookup_hkey(HKEY_USERS);
@ -1984,7 +1982,7 @@ void SHELL_LoadRegistry( void )
} }
else else
{ {
WARN(reg,"Failed to get homedirectory of UID %d.\n",getuid()); WARN_(reg)("Failed to get homedirectory of UID %d.\n",getuid());
} }
/* /*
@ -1994,7 +1992,7 @@ void SHELL_LoadRegistry( void )
RegCreateKey16(HKEY_USERS,".Default",&hkey); RegCreateKey16(HKEY_USERS,".Default",&hkey);
lpkey = lookup_hkey(hkey); lpkey = lookup_hkey(hkey);
if(!lpkey) if(!lpkey)
WARN(reg,"Could not create global user default key\n"); WARN_(reg)("Could not create global user default key\n");
else else
_copy_registry(lpkey, HKCU ); _copy_registry(lpkey, HKCU );
@ -2086,7 +2084,7 @@ DWORD WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR lpszSubKey, DWORD dwReserved,
LPWSTR *wps; LPWSTR *wps;
int wpc,i; int wpc,i;
TRACE(reg,"(0x%x,%s,%ld,%lx,%p)\n", hkey,debugstr_w(lpszSubKey),dwReserved, TRACE_(reg)("(0x%x,%s,%ld,%lx,%p)\n", hkey,debugstr_w(lpszSubKey),dwReserved,
samDesired,retkey); samDesired,retkey);
lpNextKey = lookup_hkey( hkey ); lpNextKey = lookup_hkey( hkey );
@ -2103,7 +2101,7 @@ DWORD WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR lpszSubKey, DWORD dwReserved,
} }
if (lpszSubKey[0] == '\\') { if (lpszSubKey[0] == '\\') {
WARN(reg,"Subkey %s must not begin with backslash.\n",debugstr_w(lpszSubKey)); WARN_(reg)("Subkey %s must not begin with backslash.\n",debugstr_w(lpszSubKey));
return ERROR_BAD_PATHNAME; return ERROR_BAD_PATHNAME;
} }
@ -2122,7 +2120,7 @@ DWORD WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR lpszSubKey, DWORD dwReserved,
} }
if (!lpxkey) { if (!lpxkey) {
TRACE(reg,"Could not find subkey %s\n",debugstr_w(wps[i])); TRACE_(reg)("Could not find subkey %s\n",debugstr_w(wps[i]));
FREE_KEY_PATH; FREE_KEY_PATH;
return ERROR_FILE_NOT_FOUND; return ERROR_FILE_NOT_FOUND;
} }
@ -2133,7 +2131,7 @@ DWORD WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR lpszSubKey, DWORD dwReserved,
currenthandle += 2; currenthandle += 2;
add_handle(currenthandle,lpxkey,samDesired); add_handle(currenthandle,lpxkey,samDesired);
*retkey = currenthandle; *retkey = currenthandle;
TRACE(reg," Returning %x\n", currenthandle); TRACE_(reg)(" Returning %x\n", currenthandle);
FREE_KEY_PATH; FREE_KEY_PATH;
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -2148,7 +2146,7 @@ DWORD WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR lpszSubKey, DWORD dwReserved,
LPWSTR lpszSubKeyW = strdupA2W(lpszSubKey); LPWSTR lpszSubKeyW = strdupA2W(lpszSubKey);
DWORD ret; DWORD ret;
TRACE(reg,"(%x,%s,%ld,%lx,%p)\n",hkey,debugstr_a(lpszSubKey),dwReserved, TRACE_(reg)("(%x,%s,%ld,%lx,%p)\n",hkey,debugstr_a(lpszSubKey),dwReserved,
samDesired,retkey); samDesired,retkey);
ret = RegOpenKeyExW( hkey, lpszSubKeyW, dwReserved, samDesired, retkey ); ret = RegOpenKeyExW( hkey, lpszSubKeyW, dwReserved, samDesired, retkey );
free(lpszSubKeyW); free(lpszSubKeyW);
@ -2170,7 +2168,7 @@ DWORD WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR lpszSubKey, DWORD dwReserved,
*/ */
DWORD WINAPI RegOpenKeyW( HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey ) DWORD WINAPI RegOpenKeyW( HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey )
{ {
TRACE(reg,"(%x,%s,%p)\n",hkey,debugstr_w(lpszSubKey),retkey); TRACE_(reg)("(%x,%s,%p)\n",hkey,debugstr_w(lpszSubKey),retkey);
return RegOpenKeyExW( hkey, lpszSubKey, 0, KEY_ALL_ACCESS, retkey ); return RegOpenKeyExW( hkey, lpszSubKey, 0, KEY_ALL_ACCESS, retkey );
} }
@ -2182,7 +2180,7 @@ DWORD WINAPI RegOpenKeyA( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
{ {
DWORD ret; DWORD ret;
LPWSTR lpszSubKeyW = strdupA2W(lpszSubKey); LPWSTR lpszSubKeyW = strdupA2W(lpszSubKey);
TRACE(reg,"(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey); TRACE_(reg)("(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey);
ret = RegOpenKeyW( hkey, lpszSubKeyW, retkey ); ret = RegOpenKeyW( hkey, lpszSubKeyW, retkey );
free(lpszSubKeyW); free(lpszSubKeyW);
return ret; return ret;
@ -2194,7 +2192,7 @@ DWORD WINAPI RegOpenKeyA( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
*/ */
DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey ) DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
{ {
TRACE(reg,"(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey); TRACE_(reg)("(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey);
return RegOpenKeyA( hkey, lpszSubKey, retkey ); return RegOpenKeyA( hkey, lpszSubKey, retkey );
} }
@ -2238,7 +2236,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR lpszSubKey,
LPWSTR *wps; LPWSTR *wps;
int wpc,i; int wpc,i;
TRACE(reg,"(%x,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n", hkey, TRACE_(reg)("(%x,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n", hkey,
debugstr_w(lpszSubKey), dwReserved, debugstr_w(lpszClass), debugstr_w(lpszSubKey), dwReserved, debugstr_w(lpszClass),
fdwOptions, samDesired, lpSecAttribs, retkey, lpDispos); fdwOptions, samDesired, lpSecAttribs, retkey, lpDispos);
@ -2267,13 +2265,13 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR lpszSubKey,
currenthandle += 2; currenthandle += 2;
add_handle(currenthandle,lpNextKey,samDesired); add_handle(currenthandle,lpNextKey,samDesired);
*retkey=currenthandle; *retkey=currenthandle;
TRACE(reg, "Returning %x\n", currenthandle); TRACE_(reg)("Returning %x\n", currenthandle);
lpNextKey->flags|=REG_OPTION_TAINTED; lpNextKey->flags|=REG_OPTION_TAINTED;
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
if (lpszSubKey[0] == '\\') { if (lpszSubKey[0] == '\\') {
WARN(reg,"Subkey %s must not begin with backslash.\n",debugstr_w(lpszSubKey)); WARN_(reg)("Subkey %s must not begin with backslash.\n",debugstr_w(lpszSubKey));
return ERROR_BAD_PATHNAME; return ERROR_BAD_PATHNAME;
} }
@ -2298,7 +2296,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR lpszSubKey,
add_handle(currenthandle,lpxkey,samDesired); add_handle(currenthandle,lpxkey,samDesired);
lpxkey->flags |= REG_OPTION_TAINTED; lpxkey->flags |= REG_OPTION_TAINTED;
*retkey = currenthandle; *retkey = currenthandle;
TRACE(reg, "Returning %x\n", currenthandle); TRACE_(reg)("Returning %x\n", currenthandle);
if (lpDispos) if (lpDispos)
*lpDispos = REG_OPENED_EXISTING_KEY; *lpDispos = REG_OPENED_EXISTING_KEY;
FREE_KEY_PATH; FREE_KEY_PATH;
@ -2316,11 +2314,11 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR lpszSubKey,
*lplpPrevKey=malloc(sizeof(KEYSTRUCT)); *lplpPrevKey=malloc(sizeof(KEYSTRUCT));
if (!*lplpPrevKey) { if (!*lplpPrevKey) {
FREE_KEY_PATH; FREE_KEY_PATH;
TRACE(reg, "Returning OUTOFMEMORY\n"); TRACE_(reg)("Returning OUTOFMEMORY\n");
return ERROR_OUTOFMEMORY; return ERROR_OUTOFMEMORY;
} }
memset(*lplpPrevKey,'\0',sizeof(KEYSTRUCT)); memset(*lplpPrevKey,'\0',sizeof(KEYSTRUCT));
TRACE(reg,"Adding %s\n", debugstr_w(wps[i])); TRACE_(reg)("Adding %s\n", debugstr_w(wps[i]));
(*lplpPrevKey)->keyname = strdupW(wps[i]); (*lplpPrevKey)->keyname = strdupW(wps[i]);
(*lplpPrevKey)->next = NULL; (*lplpPrevKey)->next = NULL;
(*lplpPrevKey)->nextsub = NULL; (*lplpPrevKey)->nextsub = NULL;
@ -2344,7 +2342,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR lpszSubKey,
else else
lpNextKey->class = NULL; lpNextKey->class = NULL;
*retkey = currenthandle; *retkey = currenthandle;
TRACE(reg, "Returning %x\n", currenthandle); TRACE_(reg)("Returning %x\n", currenthandle);
if (lpDispos) if (lpDispos)
*lpDispos = REG_CREATED_NEW_KEY; *lpDispos = REG_CREATED_NEW_KEY;
FREE_KEY_PATH; FREE_KEY_PATH;
@ -2364,7 +2362,7 @@ DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR lpszSubKey, DWORD dwReserved,
LPWSTR lpszSubKeyW, lpszClassW; LPWSTR lpszSubKeyW, lpszClassW;
DWORD ret; DWORD ret;
TRACE(reg,"(%x,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n",hkey,debugstr_a(lpszSubKey), TRACE_(reg)("(%x,%s,%ld,%s,%lx,%lx,%p,%p,%p)\n",hkey,debugstr_a(lpszSubKey),
dwReserved,debugstr_a(lpszClass),fdwOptions,samDesired,lpSecAttribs, dwReserved,debugstr_a(lpszClass),fdwOptions,samDesired,lpSecAttribs,
retkey,lpDispos); retkey,lpDispos);
@ -2390,7 +2388,7 @@ DWORD WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey )
DWORD junk; DWORD junk;
LPKEYSTRUCT lpNextKey; LPKEYSTRUCT lpNextKey;
TRACE(reg,"(%x,%s,%p)\n", hkey,debugstr_w(lpszSubKey),retkey); TRACE_(reg)("(%x,%s,%p)\n", hkey,debugstr_w(lpszSubKey),retkey);
/* This check is here because the return value is different than the /* This check is here because the return value is different than the
one from the Ex functions */ one from the Ex functions */
@ -2412,7 +2410,7 @@ DWORD WINAPI RegCreateKeyA( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
DWORD ret; DWORD ret;
LPWSTR lpszSubKeyW; LPWSTR lpszSubKeyW;
TRACE(reg,"(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey); TRACE_(reg)("(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey);
lpszSubKeyW = lpszSubKey?strdupA2W(lpszSubKey):NULL; lpszSubKeyW = lpszSubKey?strdupA2W(lpszSubKey):NULL;
ret = RegCreateKeyW( hkey, lpszSubKeyW, retkey ); ret = RegCreateKeyW( hkey, lpszSubKeyW, retkey );
if(lpszSubKeyW) free(lpszSubKeyW); if(lpszSubKeyW) free(lpszSubKeyW);
@ -2425,7 +2423,7 @@ DWORD WINAPI RegCreateKeyA( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
*/ */
DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey ) DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
{ {
TRACE(reg,"(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey); TRACE_(reg)("(%x,%s,%p)\n",hkey,debugstr_a(lpszSubKey),retkey);
return RegCreateKeyA( hkey, lpszSubKey, retkey ); return RegCreateKeyA( hkey, lpszSubKey, retkey );
} }
@ -2470,7 +2468,7 @@ DWORD WINAPI RegQueryValueExW( HKEY hkey, LPWSTR lpValueName,
int i; int i;
DWORD ret; DWORD ret;
TRACE(reg,"(0x%x,%s,%p,%p,%p,%p=%ld)\n", hkey, debugstr_w(lpValueName), TRACE_(reg)("(0x%x,%s,%p,%p,%p,%p=%ld)\n", hkey, debugstr_w(lpValueName),
lpdwReserved, lpdwType, lpbData, lpcbData, lpcbData?*lpcbData:0); lpdwReserved, lpdwType, lpbData, lpcbData, lpcbData?*lpcbData:0);
lpkey = lookup_hkey(hkey); lpkey = lookup_hkey(hkey);
@ -2499,7 +2497,7 @@ DWORD WINAPI RegQueryValueExW( HKEY hkey, LPWSTR lpValueName,
} }
if (i==lpkey->nrofvalues) if (i==lpkey->nrofvalues)
{ TRACE(reg," Key not found\n"); { TRACE_(reg)(" Key not found\n");
if (lpValueName==NULL) if (lpValueName==NULL)
{ /* Empty keyname not found */ { /* Empty keyname not found */
if (lpbData) if (lpbData)
@ -2508,7 +2506,7 @@ DWORD WINAPI RegQueryValueExW( HKEY hkey, LPWSTR lpValueName,
} }
if (lpdwType) if (lpdwType)
*lpdwType = REG_SZ; *lpdwType = REG_SZ;
TRACE(reg, " Returning an empty string\n"); TRACE_(reg)(" Returning an empty string\n");
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
return ERROR_FILE_NOT_FOUND; return ERROR_FILE_NOT_FOUND;
@ -2532,7 +2530,7 @@ DWORD WINAPI RegQueryValueExW( HKEY hkey, LPWSTR lpValueName,
debug_print_value ( lpbData, &lpkey->values[i]); debug_print_value ( lpbData, &lpkey->values[i]);
TRACE(reg," (ret=%lx, type=%lx, len=%ld)\n", ret, lpdwType?*lpdwType:0,lpcbData?*lpcbData:0); TRACE_(reg)(" (ret=%lx, type=%lx, len=%ld)\n", ret, lpdwType?*lpdwType:0,lpcbData?*lpcbData:0);
return ret; return ret;
} }
@ -2547,14 +2545,14 @@ DWORD WINAPI RegQueryValueW( HKEY hkey, LPCWSTR lpszSubKey, LPWSTR lpszData,
HKEY xhkey; HKEY xhkey;
DWORD ret,lpdwType; DWORD ret,lpdwType;
TRACE(reg,"(%x,%s,%p,%ld)\n",hkey,debugstr_w(lpszSubKey),lpszData, TRACE_(reg)("(%x,%s,%p,%ld)\n",hkey,debugstr_w(lpszSubKey),lpszData,
lpcbData?*lpcbData:0); lpcbData?*lpcbData:0);
/* Only open subkey, if we really do descend */ /* Only open subkey, if we really do descend */
if (lpszSubKey && *lpszSubKey) { if (lpszSubKey && *lpszSubKey) {
ret = RegOpenKeyW( hkey, lpszSubKey, &xhkey ); ret = RegOpenKeyW( hkey, lpszSubKey, &xhkey );
if (ret != ERROR_SUCCESS) { if (ret != ERROR_SUCCESS) {
WARN(reg, "Could not open %s\n", debugstr_w(lpszSubKey)); WARN_(reg)("Could not open %s\n", debugstr_w(lpszSubKey));
return ret; return ret;
} }
} else } else
@ -2585,7 +2583,7 @@ DWORD WINAPI RegQueryValueExA( HKEY hkey, LPSTR lpszValueName,
LPBYTE mybuf = NULL; LPBYTE mybuf = NULL;
DWORD ret, mytype, mylen = 0; DWORD ret, mytype, mylen = 0;
TRACE(reg,"(%x,%s,%p,%p,%p,%p=%ld)\n", hkey,debugstr_a(lpszValueName), TRACE_(reg)("(%x,%s,%p,%p,%p,%p=%ld)\n", hkey,debugstr_a(lpszValueName),
lpdwReserved,lpdwType,lpbData,lpcbData,lpcbData?*lpcbData:0); lpdwReserved,lpdwType,lpbData,lpcbData,lpcbData?*lpcbData:0);
if (!lpcbData && lpbData) /* buffer without size is illegal */ if (!lpcbData && lpbData) /* buffer without size is illegal */
@ -2628,7 +2626,7 @@ DWORD WINAPI RegQueryValueExA( HKEY hkey, LPSTR lpszValueName,
{ *lpdwType = mytype; { *lpdwType = mytype;
} }
TRACE(reg," (ret=%lx,type=%lx, len=%ld)\n", ret,mytype,lpcbData?*lpcbData:0); TRACE_(reg)(" (ret=%lx,type=%lx, len=%ld)\n", ret,mytype,lpcbData?*lpcbData:0);
if(mybuf) free(mybuf); if(mybuf) free(mybuf);
if(lpszValueNameW) free(lpszValueNameW); if(lpszValueNameW) free(lpszValueNameW);
@ -2643,7 +2641,7 @@ DWORD WINAPI RegQueryValueEx16( HKEY hkey, LPSTR lpszValueName,
LPDWORD lpdwReserved, LPDWORD lpdwType, LPDWORD lpdwReserved, LPDWORD lpdwType,
LPBYTE lpbData, LPDWORD lpcbData ) LPBYTE lpbData, LPDWORD lpcbData )
{ {
TRACE(reg,"(%x,%s,%p,%p,%p,%ld)\n",hkey,debugstr_a(lpszValueName), TRACE_(reg)("(%x,%s,%p,%p,%p,%ld)\n",hkey,debugstr_a(lpszValueName),
lpdwReserved,lpdwType,lpbData,lpcbData?*lpcbData:0); lpdwReserved,lpdwType,lpbData,lpcbData?*lpcbData:0);
return RegQueryValueExA( hkey, lpszValueName, lpdwReserved, lpdwType, return RegQueryValueExA( hkey, lpszValueName, lpdwReserved, lpdwType,
lpbData, lpcbData ); lpbData, lpcbData );
@ -2659,7 +2657,7 @@ DWORD WINAPI RegQueryValueA( HKEY hkey, LPCSTR lpszSubKey, LPSTR lpszData,
HKEY xhkey; HKEY xhkey;
DWORD ret, dwType; DWORD ret, dwType;
TRACE(reg,"(%x,%s,%p,%ld)\n",hkey,debugstr_a(lpszSubKey),lpszData, TRACE_(reg)("(%x,%s,%p,%ld)\n",hkey,debugstr_a(lpszSubKey),lpszData,
lpcbData?*lpcbData:0); lpcbData?*lpcbData:0);
if (lpszSubKey && *lpszSubKey) { if (lpszSubKey && *lpszSubKey) {
@ -2692,7 +2690,7 @@ DWORD WINAPI RegQueryValueA( HKEY hkey, LPCSTR lpszSubKey, LPSTR lpszData,
DWORD WINAPI RegQueryValue16( HKEY hkey, LPSTR lpszSubKey, LPSTR lpszData, DWORD WINAPI RegQueryValue16( HKEY hkey, LPSTR lpszSubKey, LPSTR lpszData,
LPDWORD lpcbData ) LPDWORD lpcbData )
{ {
TRACE(reg,"(%x,%s,%p,%ld)\n",hkey,debugstr_a(lpszSubKey),lpszData, TRACE_(reg)("(%x,%s,%p,%ld)\n",hkey,debugstr_a(lpszSubKey),lpszData,
lpcbData?*lpcbData:0); lpcbData?*lpcbData:0);
if (lpcbData) if (lpcbData)
@ -2736,7 +2734,7 @@ DWORD WINAPI RegSetValueExW( HKEY hkey, LPWSTR lpszValueName,
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
int i; int i;
TRACE(reg,"(%x,%s,%ld,%ld,%p,%ld)\n", hkey, debugstr_w(lpszValueName), TRACE_(reg)("(%x,%s,%ld,%ld,%p,%ld)\n", hkey, debugstr_w(lpszValueName),
dwReserved, dwType, lpbData, cbData); dwReserved, dwType, lpbData, cbData);
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
@ -2804,7 +2802,7 @@ DWORD WINAPI RegSetValueExA( HKEY hkey, LPSTR lpszValueName,
if (!lpbData) if (!lpbData)
return (ERROR_INVALID_PARAMETER); return (ERROR_INVALID_PARAMETER);
TRACE(reg,"(%x,%s,%ld,%ld,%p,%ld)\n",hkey,debugstr_a(lpszValueName), TRACE_(reg)("(%x,%s,%ld,%ld,%p,%ld)\n",hkey,debugstr_a(lpszValueName),
dwReserved,dwType,lpbData,cbData); dwReserved,dwType,lpbData,cbData);
if ((1<<dwType) & UNICONVMASK) if ((1<<dwType) & UNICONVMASK)
@ -2841,7 +2839,7 @@ DWORD WINAPI RegSetValueExA( HKEY hkey, LPSTR lpszValueName,
DWORD WINAPI RegSetValueEx16( HKEY hkey, LPSTR lpszValueName, DWORD dwReserved, DWORD WINAPI RegSetValueEx16( HKEY hkey, LPSTR lpszValueName, DWORD dwReserved,
DWORD dwType, LPBYTE lpbData, DWORD cbData ) DWORD dwType, LPBYTE lpbData, DWORD cbData )
{ {
TRACE(reg,"(%x,%s,%ld,%ld,%p,%ld)\n",hkey,debugstr_a(lpszValueName), TRACE_(reg)("(%x,%s,%ld,%ld,%p,%ld)\n",hkey,debugstr_a(lpszValueName),
dwReserved,dwType,lpbData,cbData); dwReserved,dwType,lpbData,cbData);
return RegSetValueExA( hkey, lpszValueName, dwReserved, dwType, lpbData, return RegSetValueExA( hkey, lpszValueName, dwReserved, dwType, lpbData,
cbData ); cbData );
@ -2857,7 +2855,7 @@ DWORD WINAPI RegSetValueW( HKEY hkey, LPCWSTR lpszSubKey, DWORD dwType,
HKEY xhkey; HKEY xhkey;
DWORD ret; DWORD ret;
TRACE(reg,"(%x,%s,%ld,%s,%ld)\n", TRACE_(reg)("(%x,%s,%ld,%s,%ld)\n",
hkey,debugstr_w(lpszSubKey),dwType,debugstr_w(lpszData),cbData hkey,debugstr_w(lpszSubKey),dwType,debugstr_w(lpszData),cbData
); );
if (lpszSubKey && *lpszSubKey) { if (lpszSubKey && *lpszSubKey) {
@ -2867,11 +2865,11 @@ DWORD WINAPI RegSetValueW( HKEY hkey, LPCWSTR lpszSubKey, DWORD dwType,
} else } else
xhkey=hkey; xhkey=hkey;
if (dwType!=REG_SZ) { if (dwType!=REG_SZ) {
TRACE(reg,"dwType=%ld - Changing to REG_SZ\n",dwType); TRACE_(reg)("dwType=%ld - Changing to REG_SZ\n",dwType);
dwType=REG_SZ; dwType=REG_SZ;
} }
if (cbData!=2*lstrlenW(lpszData)+2) { if (cbData!=2*lstrlenW(lpszData)+2) {
TRACE(reg,"Len=%ld != strlen(%s)+1=%d!\n", TRACE_(reg)("Len=%ld != strlen(%s)+1=%d!\n",
cbData,debugstr_w(lpszData),2*lstrlenW(lpszData)+2 cbData,debugstr_w(lpszData),2*lstrlenW(lpszData)+2
); );
cbData=2*lstrlenW(lpszData)+2; cbData=2*lstrlenW(lpszData)+2;
@ -2893,7 +2891,7 @@ DWORD WINAPI RegSetValueA( HKEY hkey, LPCSTR lpszSubKey, DWORD dwType,
DWORD ret; DWORD ret;
HKEY xhkey; HKEY xhkey;
TRACE(reg,"(%x,%s,%ld,%s,%ld)\n",hkey,lpszSubKey,dwType,lpszData,cbData); TRACE_(reg)("(%x,%s,%ld,%s,%ld)\n",hkey,lpszSubKey,dwType,lpszData,cbData);
if (lpszSubKey && *lpszSubKey) { if (lpszSubKey && *lpszSubKey) {
ret=RegCreateKey16(hkey,lpszSubKey,&xhkey); ret=RegCreateKey16(hkey,lpszSubKey,&xhkey);
if (ret!=ERROR_SUCCESS) if (ret!=ERROR_SUCCESS)
@ -2902,7 +2900,7 @@ DWORD WINAPI RegSetValueA( HKEY hkey, LPCSTR lpszSubKey, DWORD dwType,
xhkey=hkey; xhkey=hkey;
if (dwType!=REG_SZ) { if (dwType!=REG_SZ) {
TRACE(reg,"dwType=%ld!\n",dwType); TRACE_(reg)("dwType=%ld!\n",dwType);
dwType=REG_SZ; dwType=REG_SZ;
} }
if (cbData!=strlen(lpszData)+1) if (cbData!=strlen(lpszData)+1)
@ -2920,7 +2918,7 @@ DWORD WINAPI RegSetValueA( HKEY hkey, LPCSTR lpszSubKey, DWORD dwType,
DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR lpszSubKey, DWORD dwType, DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR lpszSubKey, DWORD dwType,
LPCSTR lpszData, DWORD cbData ) LPCSTR lpszData, DWORD cbData )
{ {
TRACE(reg,"(%x,%s,%ld,%s,%ld)\n",hkey,debugstr_a(lpszSubKey),dwType, TRACE_(reg)("(%x,%s,%ld,%s,%ld)\n",hkey,debugstr_a(lpszSubKey),dwType,
debugstr_a(lpszData),cbData); debugstr_a(lpszData),cbData);
return RegSetValueA(hkey,lpszSubKey,dwType,lpszData,cbData); return RegSetValueA(hkey,lpszSubKey,dwType,lpszData,cbData);
} }
@ -2955,7 +2953,7 @@ DWORD WINAPI RegEnumKeyExW( HKEY hkey, DWORD iSubkey, LPWSTR lpszName,
{ {
LPKEYSTRUCT lpkey,lpxkey; LPKEYSTRUCT lpkey,lpxkey;
TRACE(reg,"(%x,%ld,%p,%ld,%p,%p,%p,%p)\n",hkey,iSubkey,lpszName, TRACE_(reg)("(%x,%ld,%p,%ld,%p,%p,%p,%p)\n",hkey,iSubkey,lpszName,
*lpcchName,lpdwReserved,lpszClass,lpcchClass,ft); *lpcchName,lpdwReserved,lpszClass,lpcchClass,ft);
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
@ -2998,7 +2996,7 @@ DWORD WINAPI RegEnumKeyW( HKEY hkey, DWORD iSubkey, LPWSTR lpszName,
{ {
FILETIME ft; FILETIME ft;
TRACE(reg,"(%x,%ld,%p,%ld)\n",hkey,iSubkey,lpszName,lpcchName); TRACE_(reg)("(%x,%ld,%p,%ld)\n",hkey,iSubkey,lpszName,lpcchName);
return RegEnumKeyExW(hkey,iSubkey,lpszName,&lpcchName,NULL,NULL,NULL,&ft); return RegEnumKeyExW(hkey,iSubkey,lpszName,&lpcchName,NULL,NULL,NULL,&ft);
} }
@ -3015,7 +3013,7 @@ DWORD WINAPI RegEnumKeyExA( HKEY hkey, DWORD iSubkey, LPSTR lpszName,
LPWSTR lpszNameW,lpszClassW; LPWSTR lpszNameW,lpszClassW;
TRACE(reg,"(%x,%ld,%p,%ld,%p,%p,%p,%p)\n", TRACE_(reg)("(%x,%ld,%p,%ld,%p,%p,%p,%p)\n",
hkey,iSubkey,lpszName,*lpcchName,lpdwReserved,lpszClass,lpcchClass,ft hkey,iSubkey,lpszName,*lpcchName,lpdwReserved,lpszClass,lpcchClass,ft
); );
if (lpszName) { if (lpszName) {
@ -3066,7 +3064,7 @@ DWORD WINAPI RegEnumKeyA( HKEY hkey, DWORD iSubkey, LPSTR lpszName,
{ {
FILETIME ft; FILETIME ft;
TRACE(reg,"(%x,%ld,%p,%ld)\n",hkey,iSubkey,lpszName,lpcchName); TRACE_(reg)("(%x,%ld,%p,%ld)\n",hkey,iSubkey,lpszName,lpcchName);
return RegEnumKeyExA( hkey, iSubkey, lpszName, &lpcchName, NULL, NULL, return RegEnumKeyExA( hkey, iSubkey, lpszName, &lpcchName, NULL, NULL,
NULL, &ft ); NULL, &ft );
} }
@ -3078,7 +3076,7 @@ DWORD WINAPI RegEnumKeyA( HKEY hkey, DWORD iSubkey, LPSTR lpszName,
DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD iSubkey, LPSTR lpszName, DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD iSubkey, LPSTR lpszName,
DWORD lpcchName ) DWORD lpcchName )
{ {
TRACE(reg,"(%x,%ld,%p,%ld)\n",hkey,iSubkey,lpszName,lpcchName); TRACE_(reg)("(%x,%ld,%p,%ld)\n",hkey,iSubkey,lpszName,lpcchName);
return RegEnumKeyA( hkey, iSubkey, lpszName, lpcchName); return RegEnumKeyA( hkey, iSubkey, lpszName, lpcchName);
} }
@ -3115,7 +3113,7 @@ DWORD WINAPI RegEnumValueW( HKEY hkey, DWORD iValue, LPWSTR lpszValue,
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
LPKEYVALUE val; LPKEYVALUE val;
TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,debugstr_w(lpszValue), TRACE_(reg)("(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,debugstr_w(lpszValue),
lpcchValue,lpdReserved,lpdwType,lpbData,lpcbData); lpcchValue,lpdReserved,lpdwType,lpbData,lpcbData);
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
@ -3172,7 +3170,7 @@ DWORD WINAPI RegEnumValueA( HKEY hkey, DWORD iValue, LPSTR lpszValue,
DWORD ret,lpcbDataW; DWORD ret,lpcbDataW;
DWORD dwType; DWORD dwType;
TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,lpszValue,lpcchValue, TRACE_(reg)("(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,lpszValue,lpcchValue,
lpdReserved,lpdwType,lpbData,lpcbData); lpdReserved,lpdwType,lpbData,lpcbData);
lpszValueW = (LPWSTR)xmalloc(*lpcchValue*2); lpszValueW = (LPWSTR)xmalloc(*lpcchValue*2);
@ -3216,7 +3214,7 @@ DWORD WINAPI RegEnumValue16( HKEY hkey, DWORD iValue, LPSTR lpszValue,
LPDWORD lpdwType, LPBYTE lpbData, LPDWORD lpdwType, LPBYTE lpbData,
LPDWORD lpcbData ) LPDWORD lpcbData )
{ {
TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,lpszValue,lpcchValue, TRACE_(reg)("(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,lpszValue,lpcchValue,
lpdReserved,lpdwType,lpbData,lpcbData); lpdReserved,lpdwType,lpbData,lpcbData);
return RegEnumValueA( hkey, iValue, lpszValue, lpcchValue, lpdReserved, return RegEnumValueA( hkey, iValue, lpszValue, lpcchValue, lpdReserved,
lpdwType, lpbData, lpcbData ); lpdwType, lpbData, lpcbData );
@ -3236,7 +3234,7 @@ DWORD WINAPI RegEnumValue16( HKEY hkey, DWORD iValue, LPSTR lpszValue,
*/ */
DWORD WINAPI RegCloseKey( HKEY hkey ) DWORD WINAPI RegCloseKey( HKEY hkey )
{ {
TRACE(reg,"(%x)\n",hkey); TRACE_(reg)("(%x)\n",hkey);
/* The standard handles are allowed to succeed, even though they are not /* The standard handles are allowed to succeed, even though they are not
closed */ closed */
@ -3272,7 +3270,7 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPWSTR lpszSubKey )
LPWSTR *wps; LPWSTR *wps;
int wpc,i; int wpc,i;
TRACE(reg,"(%x,%s)\n",hkey,debugstr_w(lpszSubKey)); TRACE_(reg)("(%x,%s)\n",hkey,debugstr_w(lpszSubKey));
lpNextKey = lookup_hkey(hkey); lpNextKey = lookup_hkey(hkey);
if (!lpNextKey) if (!lpNextKey)
@ -3289,7 +3287,7 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPWSTR lpszSubKey )
while (i<wpc-1) { while (i<wpc-1) {
lpxkey=lpNextKey->nextsub; lpxkey=lpNextKey->nextsub;
while (lpxkey) { while (lpxkey) {
TRACE(reg, " Scanning [%s]\n", TRACE_(reg)(" Scanning [%s]\n",
debugstr_w(lpxkey->keyname)); debugstr_w(lpxkey->keyname));
if (!lstrcmpiW(wps[i],lpxkey->keyname)) if (!lstrcmpiW(wps[i],lpxkey->keyname))
break; break;
@ -3297,7 +3295,7 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPWSTR lpszSubKey )
} }
if (!lpxkey) { if (!lpxkey) {
FREE_KEY_PATH; FREE_KEY_PATH;
TRACE(reg, " Not found.\n"); TRACE_(reg)(" Not found.\n");
/* not found is success */ /* not found is success */
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -3307,7 +3305,7 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPWSTR lpszSubKey )
lpxkey = lpNextKey->nextsub; lpxkey = lpNextKey->nextsub;
lplpPrevKey = &(lpNextKey->nextsub); lplpPrevKey = &(lpNextKey->nextsub);
while (lpxkey) { while (lpxkey) {
TRACE(reg, " Scanning [%s]\n", TRACE_(reg)(" Scanning [%s]\n",
debugstr_w(lpxkey->keyname)); debugstr_w(lpxkey->keyname));
if (!lstrcmpiW(wps[i],lpxkey->keyname)) if (!lstrcmpiW(wps[i],lpxkey->keyname))
break; break;
@ -3317,13 +3315,13 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPWSTR lpszSubKey )
if (!lpxkey) { if (!lpxkey) {
FREE_KEY_PATH; FREE_KEY_PATH;
WARN(reg , " Not found.\n"); WARN_(reg)(" Not found.\n");
return ERROR_FILE_NOT_FOUND; return ERROR_FILE_NOT_FOUND;
} }
if (lpxkey->nextsub) { if (lpxkey->nextsub) {
FREE_KEY_PATH; FREE_KEY_PATH;
WARN(reg , " Not empty.\n"); WARN_(reg)(" Not empty.\n");
return ERROR_CANTWRITE; return ERROR_CANTWRITE;
} }
*lplpPrevKey = lpxkey->next; *lplpPrevKey = lpxkey->next;
@ -3334,7 +3332,7 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPWSTR lpszSubKey )
free(lpxkey->values); free(lpxkey->values);
free(lpxkey); free(lpxkey);
FREE_KEY_PATH; FREE_KEY_PATH;
TRACE(reg, " Done.\n"); TRACE_(reg)(" Done.\n");
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -3347,7 +3345,7 @@ DWORD WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR lpszSubKey )
LPWSTR lpszSubKeyW; LPWSTR lpszSubKeyW;
DWORD ret; DWORD ret;
TRACE(reg,"(%x,%s)\n",hkey,debugstr_a(lpszSubKey)); TRACE_(reg)("(%x,%s)\n",hkey,debugstr_a(lpszSubKey));
lpszSubKeyW = lpszSubKey?strdupA2W(lpszSubKey):NULL; lpszSubKeyW = lpszSubKey?strdupA2W(lpszSubKey):NULL;
ret = RegDeleteKeyW( hkey, lpszSubKeyW ); ret = RegDeleteKeyW( hkey, lpszSubKeyW );
if(lpszSubKeyW) free(lpszSubKeyW); if(lpszSubKeyW) free(lpszSubKeyW);
@ -3360,7 +3358,7 @@ DWORD WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR lpszSubKey )
*/ */
DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR lpszSubKey ) DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR lpszSubKey )
{ {
TRACE(reg,"(%x,%s)\n",hkey,debugstr_a(lpszSubKey)); TRACE_(reg)("(%x,%s)\n",hkey,debugstr_a(lpszSubKey));
return RegDeleteKeyA( hkey, lpszSubKey ); return RegDeleteKeyA( hkey, lpszSubKey );
} }
@ -3388,7 +3386,7 @@ DWORD WINAPI RegDeleteValueW( HKEY hkey, LPWSTR lpszValue )
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
LPKEYVALUE val; LPKEYVALUE val;
TRACE(reg,"(%x,%s)\n",hkey,debugstr_w(lpszValue)); TRACE_(reg)("(%x,%s)\n",hkey,debugstr_w(lpszValue));
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
if (!lpkey) if (!lpkey)
@ -3434,7 +3432,7 @@ DWORD WINAPI RegDeleteValueA( HKEY hkey, LPSTR lpszValue )
LPWSTR lpszValueW; LPWSTR lpszValueW;
DWORD ret; DWORD ret;
TRACE(reg, "(%x,%s)\n",hkey,debugstr_a(lpszValue)); TRACE_(reg)("(%x,%s)\n",hkey,debugstr_a(lpszValue));
lpszValueW = lpszValue?strdupA2W(lpszValue):NULL; lpszValueW = lpszValue?strdupA2W(lpszValue):NULL;
ret = RegDeleteValueW( hkey, lpszValueW ); ret = RegDeleteValueW( hkey, lpszValueW );
if(lpszValueW) free(lpszValueW); if(lpszValueW) free(lpszValueW);
@ -3447,7 +3445,7 @@ DWORD WINAPI RegDeleteValueA( HKEY hkey, LPSTR lpszValue )
*/ */
DWORD WINAPI RegDeleteValue16( HKEY hkey, LPSTR lpszValue ) DWORD WINAPI RegDeleteValue16( HKEY hkey, LPSTR lpszValue )
{ {
TRACE(reg,"(%x,%s)\n", hkey,debugstr_a(lpszValue)); TRACE_(reg)("(%x,%s)\n", hkey,debugstr_a(lpszValue));
return RegDeleteValueA( hkey, lpszValue ); return RegDeleteValueA( hkey, lpszValue );
} }
@ -3468,13 +3466,13 @@ DWORD WINAPI RegFlushKey( HKEY hkey )
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
BOOL ret; BOOL ret;
TRACE(reg, "(%x)\n", hkey); TRACE_(reg)("(%x)\n", hkey);
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
if (!lpkey) if (!lpkey)
return ERROR_BADKEY; return ERROR_BADKEY;
ERR(reg, "What is the correct filename?\n"); ERR_(reg)("What is the correct filename?\n");
ret = _savereg( lpkey, "foo.bar", TRUE); ret = _savereg( lpkey, "foo.bar", TRUE);
@ -3522,7 +3520,7 @@ DWORD WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR lpszClass,
int nrofkeys,maxsubkey,maxclass,maxvname,maxvdata; int nrofkeys,maxsubkey,maxclass,maxvname,maxvdata;
int i; int i;
TRACE(reg,"(%x,%p,...)\n",hkey,lpszClass); TRACE_(reg)("(%x,%p,...)\n",hkey,lpszClass);
lpkey = lookup_hkey(hkey); lpkey = lookup_hkey(hkey);
if (!lpkey) if (!lpkey)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
@ -3600,7 +3598,7 @@ DWORD WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR lpszClass, LPDWORD lpcchClass,
LPWSTR lpszClassW = NULL; LPWSTR lpszClassW = NULL;
DWORD ret; DWORD ret;
TRACE(reg,"(%x,%p,%p......)\n",hkey, lpszClass, lpcchClass); TRACE_(reg)("(%x,%p,%p......)\n",hkey, lpszClass, lpcchClass);
if (lpszClass) { if (lpszClass) {
if (lpcchClass) { if (lpcchClass) {
lpszClassW = (LPWSTR)xmalloc((*lpcchClass) * 2); lpszClassW = (LPWSTR)xmalloc((*lpcchClass) * 2);
@ -3646,14 +3644,14 @@ DWORD WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR lpszClass, LPDWORD lpcchClass,
LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey, LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
LPHKEY phkResult ) LPHKEY phkResult )
{ {
TRACE(reg,"(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult); TRACE_(reg)("(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult);
if (!lpMachineName || !*lpMachineName) { if (!lpMachineName || !*lpMachineName) {
/* Use the local machine name */ /* Use the local machine name */
return RegOpenKey16( hKey, "", phkResult ); return RegOpenKey16( hKey, "", phkResult );
} }
FIXME(reg,"Cannot connect to %s\n",debugstr_w(lpMachineName)); FIXME_(reg)("Cannot connect to %s\n",debugstr_w(lpMachineName));
return ERROR_BAD_NETPATH; return ERROR_BAD_NETPATH;
} }
@ -3692,7 +3690,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey,
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg,"(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor, TRACE_(reg)("(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor,
lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
@ -3704,7 +3702,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey,
if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR)) if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR))
return ERROR_INSUFFICIENT_BUFFER; return ERROR_INSUFFICIENT_BUFFER;
FIXME(reg, "(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation, FIXME_(reg)("(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation,
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -3722,7 +3720,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey,
LONG WINAPI RegLoadKeyW( HKEY hkey, LPCWSTR lpszSubKey, LPCWSTR lpszFile ) LONG WINAPI RegLoadKeyW( HKEY hkey, LPCWSTR lpszSubKey, LPCWSTR lpszFile )
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg,"(%x,%s,%s)\n",hkey,debugstr_w(lpszSubKey),debugstr_w(lpszFile)); TRACE_(reg)("(%x,%s,%s)\n",hkey,debugstr_w(lpszSubKey),debugstr_w(lpszFile));
/* Do this check before the hkey check */ /* Do this check before the hkey check */
if (!lpszSubKey || !*lpszSubKey || !lpszFile || !*lpszFile) if (!lpszSubKey || !*lpszSubKey || !lpszFile || !*lpszFile)
@ -3732,7 +3730,7 @@ LONG WINAPI RegLoadKeyW( HKEY hkey, LPCWSTR lpszSubKey, LPCWSTR lpszFile )
if (!lpkey) if (!lpkey)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
FIXME(reg,"(%x,%s,%s): stub\n",hkey,debugstr_w(lpszSubKey), FIXME_(reg)("(%x,%s,%s): stub\n",hkey,debugstr_w(lpszSubKey),
debugstr_w(lpszFile)); debugstr_w(lpszFile));
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -3769,14 +3767,14 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
BOOL fAsync ) BOOL fAsync )
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg,"(%x,%i,%ld,%x,%i)\n",hkey,fWatchSubTree,fdwNotifyFilter, TRACE_(reg)("(%x,%i,%ld,%x,%i)\n",hkey,fWatchSubTree,fdwNotifyFilter,
hEvent,fAsync); hEvent,fAsync);
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
if (!lpkey) if (!lpkey)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
FIXME(reg,"(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter, FIXME_(reg)("(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter,
hEvent,fAsync); hEvent,fAsync);
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -3792,7 +3790,7 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
*/ */
LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey ) LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey )
{ {
FIXME(reg,"(%x,%s): stub\n",hkey, debugstr_w(lpSubKey)); FIXME_(reg)("(%x,%s): stub\n",hkey, debugstr_w(lpSubKey));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -3823,7 +3821,7 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg,"(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc); TRACE_(reg)("(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc);
/* It seems to perform this check before the hkey check */ /* It seems to perform this check before the hkey check */
if ((SecurityInfo & OWNER_SECURITY_INFORMATION) || if ((SecurityInfo & OWNER_SECURITY_INFORMATION) ||
@ -3841,7 +3839,7 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
if (!lpkey) if (!lpkey)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
FIXME(reg,":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc); FIXME_(reg)(":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -3860,7 +3858,7 @@ LONG WINAPI RegSaveKeyW( HKEY hkey, LPCWSTR lpFile,
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg, "(%x,%s,%p)\n", hkey, debugstr_w(lpFile), sa); TRACE_(reg)("(%x,%s,%p)\n", hkey, debugstr_w(lpFile), sa);
/* It appears to do this check before the hkey check */ /* It appears to do this check before the hkey check */
if (!lpFile || !*lpFile) if (!lpFile || !*lpFile)
@ -3870,7 +3868,7 @@ LONG WINAPI RegSaveKeyW( HKEY hkey, LPCWSTR lpFile,
if (!lpkey) if (!lpkey)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
FIXME(reg, "(%x,%s,%p): stub\n", hkey, debugstr_w(lpFile), sa); FIXME_(reg)("(%x,%s,%p): stub\n", hkey, debugstr_w(lpFile), sa);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -3902,7 +3900,7 @@ LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg, "(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags); TRACE_(reg)("(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags);
/* It seems to do this check before the hkey check */ /* It seems to do this check before the hkey check */
if (!lpFile || !*lpFile) if (!lpFile || !*lpFile)
@ -3912,7 +3910,7 @@ LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
if (!lpkey) if (!lpkey)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
FIXME(reg,"(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags); FIXME_(reg)("(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags);
/* Check for file existence */ /* Check for file existence */
@ -3947,14 +3945,14 @@ LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
TRACE(reg,"(%x,%s,%s,%s)\n",hkey,debugstr_w(lpSubKey), TRACE_(reg)("(%x,%s,%s,%s)\n",hkey,debugstr_w(lpSubKey),
debugstr_w(lpNewFile),debugstr_w(lpOldFile)); debugstr_w(lpNewFile),debugstr_w(lpOldFile));
lpkey = lookup_hkey( hkey ); lpkey = lookup_hkey( hkey );
if (!lpkey) if (!lpkey)
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
FIXME(reg, "(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey), FIXME_(reg)("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
debugstr_w(lpNewFile),debugstr_w(lpOldFile)); debugstr_w(lpNewFile),debugstr_w(lpOldFile));
return ERROR_SUCCESS; return ERROR_SUCCESS;

View File

@ -22,7 +22,7 @@
#include "sysmetrics.h" #include "sysmetrics.h"
#include "shellapi.h" #include "shellapi.h"
#include "shlobj.h" #include "shlobj.h"
#include "debug.h" #include "debugtools.h"
#include "winreg.h" #include "winreg.h"
#include "imagelist.h" #include "imagelist.h"
@ -144,7 +144,7 @@ UINT WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile,
LPSTR lpCurrent; LPSTR lpCurrent;
UINT i; UINT i;
TRACE(shell,"(%08x, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength); TRACE_(shell)("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength);
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);
if(!lpDropFileStruct) if(!lpDropFileStruct)
@ -166,7 +166,7 @@ UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile,
LPWSTR lpwCurrent; LPWSTR lpwCurrent;
UINT i; UINT i;
TRACE(shell,"(%08x, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength); TRACE_(shell)("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength);
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);
if(!lpDropFileStruct) if(!lpDropFileStruct)
@ -190,7 +190,7 @@ UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile,
LPSTR lpCurrent; LPSTR lpCurrent;
WORD i; WORD i;
TRACE(shell,"(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength); TRACE_(shell)("(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength);
lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop);
if(!lpDropFileStruct) if(!lpDropFileStruct)
@ -210,7 +210,7 @@ UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile,
* DragFinish32 [SHELL32.80] * DragFinish32 [SHELL32.80]
*/ */
void WINAPI DragFinish(HDROP h) void WINAPI DragFinish(HDROP h)
{ TRACE(shell,"\n"); { TRACE_(shell)("\n");
GlobalFree((HGLOBAL)h); GlobalFree((HGLOBAL)h);
} }
@ -218,7 +218,7 @@ void WINAPI DragFinish(HDROP h)
* DragFinish16 [SHELL.12] * DragFinish16 [SHELL.12]
*/ */
void WINAPI DragFinish16(HDROP16 h) void WINAPI DragFinish16(HDROP16 h)
{ TRACE(shell,"\n"); { TRACE_(shell)("\n");
GlobalFree16((HGLOBAL16)h); GlobalFree16((HGLOBAL16)h);
} }
@ -230,7 +230,7 @@ BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p)
{ {
LPDROPFILESTRUCT lpDropFileStruct; LPDROPFILESTRUCT lpDropFileStruct;
BOOL bRet; BOOL bRet;
TRACE(shell,"\n"); TRACE_(shell)("\n");
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);
memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT)); memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT));
@ -247,7 +247,7 @@ BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p)
{ {
LPDROPFILESTRUCT16 lpDropFileStruct; LPDROPFILESTRUCT16 lpDropFileStruct;
BOOL16 bRet; BOOL16 bRet;
TRACE(shell,"\n"); TRACE_(shell)("\n");
lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop);
memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16)); memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16));
@ -277,19 +277,19 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
int i; /* random counter */ int i; /* random counter */
char xlpFile[256]; /* result of SearchPath */ char xlpFile[256]; /* result of SearchPath */
TRACE(shell, "%s\n", (lpFile != NULL?lpFile:"-") ); TRACE_(shell)("%s\n", (lpFile != NULL?lpFile:"-") );
lpResult[0]='\0'; /* Start off with an empty return string */ lpResult[0]='\0'; /* Start off with an empty return string */
/* trap NULL parameters on entry */ /* trap NULL parameters on entry */
if (( lpFile == NULL ) || ( lpResult == NULL ) || ( lpOperation == NULL )) if (( lpFile == NULL ) || ( lpResult == NULL ) || ( lpOperation == NULL ))
{ WARN(exec, "(lpFile=%s,lpResult=%s,lpOperation=%s): NULL parameter\n", { WARN_(exec)("(lpFile=%s,lpResult=%s,lpOperation=%s): NULL parameter\n",
lpFile, lpOperation, lpResult); lpFile, lpOperation, lpResult);
return 2; /* File not found. Close enough, I guess. */ return 2; /* File not found. Close enough, I guess. */
} }
if (SearchPathA( NULL, lpFile,".exe",sizeof(xlpFile),xlpFile,NULL)) if (SearchPathA( NULL, lpFile,".exe",sizeof(xlpFile),xlpFile,NULL))
{ TRACE(shell, "SearchPath32A returned non-zero\n"); { TRACE_(shell)("SearchPath32A returned non-zero\n");
lpFile = xlpFile; lpFile = xlpFile;
} }
@ -297,17 +297,17 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
extension = strrchr( xlpFile, '.' ); /* Assume last "." is the one; */ extension = strrchr( xlpFile, '.' ); /* Assume last "." is the one; */
/* File->Run in progman uses */ /* File->Run in progman uses */
/* .\FILE.EXE :( */ /* .\FILE.EXE :( */
TRACE(shell, "xlpFile=%s,extension=%s\n", xlpFile, extension); TRACE_(shell)("xlpFile=%s,extension=%s\n", xlpFile, extension);
if ((extension == NULL) || (extension == &xlpFile[strlen(xlpFile)])) if ((extension == NULL) || (extension == &xlpFile[strlen(xlpFile)]))
{ WARN(shell, "Returning 31 - No association\n"); { WARN_(shell)("Returning 31 - No association\n");
return 31; /* no association */ return 31; /* no association */
} }
/* Make local copy & lowercase it for reg & 'programs=' lookup */ /* Make local copy & lowercase it for reg & 'programs=' lookup */
lstrcpynA( tmpext, extension, 5 ); lstrcpynA( tmpext, extension, 5 );
CharLowerA( tmpext ); CharLowerA( tmpext );
TRACE(shell, "%s file\n", tmpext); TRACE_(shell)("%s file\n", tmpext);
/* Three places to check: */ /* Three places to check: */
/* 1. win.ini, [windows], programs (NB no leading '.') */ /* 1. win.ini, [windows], programs (NB no leading '.') */
@ -332,7 +332,7 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
strcpy(lpResult, xlpFile); strcpy(lpResult, xlpFile);
/* Need to perhaps check that the file has a path /* Need to perhaps check that the file has a path
* attached */ * attached */
TRACE(shell, "found %s\n", lpResult); TRACE_(shell)("found %s\n", lpResult);
return 33; return 33;
/* Greater than 32 to indicate success FIXME According to the /* Greater than 32 to indicate success FIXME According to the
@ -349,7 +349,7 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
&filetypelen ) == ERROR_SUCCESS ) &filetypelen ) == ERROR_SUCCESS )
{ {
filetype[filetypelen]='\0'; filetype[filetypelen]='\0';
TRACE(shell, "File type: %s\n", filetype); TRACE_(shell)("File type: %s\n", filetype);
/* Looking for ...buffer\shell\lpOperation\command */ /* Looking for ...buffer\shell\lpOperation\command */
strcat( filetype, "\\shell\\" ); strcat( filetype, "\\shell\\" );
@ -402,7 +402,7 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
} }
} }
TRACE(shell, "returning %s\n", lpResult); TRACE_(shell)("returning %s\n", lpResult);
return retval; return retval;
} }
@ -416,7 +416,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
char old_dir[1024]; char old_dir[1024];
char cmd[256]; char cmd[256];
TRACE(shell, "(%04x,'%s','%s','%s','%s',%x)\n", TRACE_(shell)("(%04x,'%s','%s','%s','%s',%x)\n",
hWnd, lpOperation ? lpOperation:"<null>", lpFile ? lpFile:"<null>", hWnd, lpOperation ? lpOperation:"<null>", lpFile ? lpFile:"<null>",
lpParameters ? lpParameters : "<null>", lpParameters ? lpParameters : "<null>",
lpDirectory ? lpDirectory : "<null>", iShowCmd); lpDirectory ? lpDirectory : "<null>", iShowCmd);
@ -438,7 +438,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
strcat(cmd,lpParameters); strcat(cmd,lpParameters);
} }
TRACE(shell,"starting %s\n",cmd); TRACE_(shell)("starting %s\n",cmd);
retval = WinExec( cmd, iShowCmd ); retval = WinExec( cmd, iShowCmd );
} }
if (lpDirectory) if (lpDirectory)
@ -480,7 +480,7 @@ static DWORD SHELL_GetResourceTable(HFILE hFile,LPBYTE *retptr)
char magic[4]; char magic[4];
int size; int size;
TRACE(shell,"\n"); TRACE_(shell)("\n");
*retptr = NULL; *retptr = NULL;
_llseek( hFile, 0, SEEK_SET ); _llseek( hFile, 0, SEEK_SET );
@ -539,7 +539,7 @@ static HGLOBAL16 SHELL_LoadResource(HINSTANCE16 hInst, HFILE hFile, NE_NAMEINFO*
{ BYTE* ptr; { BYTE* ptr;
HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, (DWORD)pNInfo->length << sizeShift); HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, (DWORD)pNInfo->length << sizeShift);
TRACE(shell,"\n"); TRACE_(shell)("\n");
if( (ptr = (BYTE*)GlobalLock16( handle )) ) if( (ptr = (BYTE*)GlobalLock16( handle )) )
{ _llseek( hFile, (DWORD)pNInfo->offset << sizeShift, SEEK_SET); { _llseek( hFile, (DWORD)pNInfo->offset << sizeShift, SEEK_SET);
@ -555,7 +555,7 @@ static HGLOBAL16 SHELL_LoadResource(HINSTANCE16 hInst, HFILE hFile, NE_NAMEINFO*
static HGLOBAL16 ICO_LoadIcon(HINSTANCE16 hInst, HFILE hFile, LPicoICONDIRENTRY lpiIDE) static HGLOBAL16 ICO_LoadIcon(HINSTANCE16 hInst, HFILE hFile, LPicoICONDIRENTRY lpiIDE)
{ BYTE* ptr; { BYTE* ptr;
HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, lpiIDE->dwBytesInRes); HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, lpiIDE->dwBytesInRes);
TRACE(shell,"\n"); TRACE_(shell)("\n");
if( (ptr = (BYTE*)GlobalLock16( handle )) ) if( (ptr = (BYTE*)GlobalLock16( handle )) )
{ _llseek( hFile, lpiIDE->dwImageOffset, SEEK_SET); { _llseek( hFile, lpiIDE->dwImageOffset, SEEK_SET);
_lread( hFile, (char*)ptr, lpiIDE->dwBytesInRes); _lread( hFile, (char*)ptr, lpiIDE->dwBytesInRes);
@ -574,7 +574,7 @@ static HGLOBAL16 ICO_GetIconDirectory(HINSTANCE16 hInst, HFILE hFile, LPicoICOND
LPicoICONDIR lpiID; LPicoICONDIR lpiID;
int i; int i;
TRACE(shell,"\n"); TRACE_(shell)("\n");
_llseek( hFile, 0, SEEK_SET ); _llseek( hFile, 0, SEEK_SET );
if( _lread(hFile,(char*)id,sizeof(id)) != sizeof(id) ) return 0; if( _lread(hFile,(char*)id,sizeof(id)) != sizeof(id) ) return 0;
@ -629,7 +629,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
LPBYTE peimage; LPBYTE peimage;
HANDLE fmapping; HANDLE fmapping;
TRACE(shell,"(%04x,file %s,start %d,extract %d\n", TRACE_(shell)("(%04x,file %s,start %d,extract %d\n",
hInstance, lpszExeFileName, nIconIndex, n); hInstance, lpszExeFileName, nIconIndex, n);
if( hFile == HFILE_ERROR || !n ) if( hFile == HFILE_ERROR || !n )
@ -659,12 +659,12 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
{ if( pTInfo->type_id == NE_RSCTYPE_GROUP_ICON ) /* find icon directory and icon repository */ { if( pTInfo->type_id == NE_RSCTYPE_GROUP_ICON ) /* find icon directory and icon repository */
{ iconDirCount = pTInfo->count; { iconDirCount = pTInfo->count;
pIconDir = ((NE_NAMEINFO*)(pTInfo + 1)); pIconDir = ((NE_NAMEINFO*)(pTInfo + 1));
TRACE(shell,"\tfound directory - %i icon families\n", iconDirCount); TRACE_(shell)("\tfound directory - %i icon families\n", iconDirCount);
} }
if( pTInfo->type_id == NE_RSCTYPE_ICON ) if( pTInfo->type_id == NE_RSCTYPE_ICON )
{ iconCount = pTInfo->count; { iconCount = pTInfo->count;
pIconStorage = ((NE_NAMEINFO*)(pTInfo + 1)); pIconStorage = ((NE_NAMEINFO*)(pTInfo + 1));
TRACE(shell,"\ttotal icons - %i\n", iconCount); TRACE_(shell)("\ttotal icons - %i\n", iconCount);
} }
pTInfo = (NE_TYPEINFO *)((char*)(pTInfo+1)+pTInfo->count*sizeof(NE_NAMEINFO)); pTInfo = (NE_TYPEINFO *)((char*)(pTInfo+1)+pTInfo->count*sizeof(NE_NAMEINFO));
} }
@ -731,13 +731,13 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
fmapping = CreateFileMappingA(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL); fmapping = CreateFileMappingA(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL);
if (fmapping == 0) if (fmapping == 0)
{ /* FIXME, INVALID_HANDLE_VALUE? */ { /* FIXME, INVALID_HANDLE_VALUE? */
WARN(shell,"failed to create filemap.\n"); WARN_(shell)("failed to create filemap.\n");
hRet = 0; hRet = 0;
goto end_2; /* failure */ goto end_2; /* failure */
} }
peimage = MapViewOfFile(fmapping,FILE_MAP_READ,0,0,0); peimage = MapViewOfFile(fmapping,FILE_MAP_READ,0,0,0);
if (!peimage) if (!peimage)
{ WARN(shell,"failed to mmap filemap.\n"); { WARN_(shell)("failed to mmap filemap.\n");
hRet = 0; hRet = 0;
goto end_2; /* failure */ goto end_2; /* failure */
} }
@ -763,14 +763,14 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
} }
if (!rootresdir) if (!rootresdir)
{ WARN(shell,"haven't found section for resource directory.\n"); { WARN_(shell)("haven't found section for resource directory.\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
icongroupresdir = GetResDirEntryW(rootresdir,RT_GROUP_ICONW, (DWORD)rootresdir,FALSE); icongroupresdir = GetResDirEntryW(rootresdir,RT_GROUP_ICONW, (DWORD)rootresdir,FALSE);
if (!icongroupresdir) if (!icongroupresdir)
{ WARN(shell,"No Icongroupresourcedirectory!\n"); { WARN_(shell)("No Icongroupresourcedirectory!\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
@ -782,7 +782,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
} }
if (nIconIndex >= iconDirCount) if (nIconIndex >= iconDirCount)
{ WARN(shell,"nIconIndex %d is larger than iconDirCount %d\n",nIconIndex,iconDirCount); { WARN_(shell)("nIconIndex %d is larger than iconDirCount %d\n",nIconIndex,iconDirCount);
GlobalFree16(hRet); GlobalFree16(hRet);
goto end_4; /* failure */ goto end_4; /* failure */
} }
@ -823,7 +823,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
} }
if (!igdata) if (!igdata)
{ WARN(shell,"no matching real address for icongroup!\n"); { WARN_(shell)("no matching real address for icongroup!\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
/* found */ /* found */
@ -835,7 +835,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
iconresdir=GetResDirEntryW(rootresdir,RT_ICONW,(DWORD)rootresdir,FALSE); iconresdir=GetResDirEntryW(rootresdir,RT_ICONW,(DWORD)rootresdir,FALSE);
if (!iconresdir) if (!iconresdir)
{ WARN(shell,"No Iconresourcedirectory!\n"); { WARN_(shell)("No Iconresourcedirectory!\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
@ -855,7 +855,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
idata = peimage+(idataent->OffsetToData-pe_sections[j].VirtualAddress+pe_sections[j].PointerToRawData); idata = peimage+(idataent->OffsetToData-pe_sections[j].VirtualAddress+pe_sections[j].PointerToRawData);
} }
if (!idata) if (!idata)
{ WARN(shell,"no matching real address found for icondata!\n"); { WARN_(shell)("no matching real address found for icondata!\n");
RetPtr[i]=0; RetPtr[i]=0;
continue; continue;
} }
@ -878,7 +878,7 @@ end_1: _lclose( hFile);
*/ */
HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName, HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName,
UINT16 nIconIndex ) UINT16 nIconIndex )
{ TRACE(shell,"\n"); { TRACE_(shell)("\n");
return ExtractIconA( hInstance, lpszExeFileName, nIconIndex ); return ExtractIconA( hInstance, lpszExeFileName, nIconIndex );
} }
@ -922,14 +922,14 @@ HICON16 WINAPI ExtractIconEx16(
* executable) and patch parameters if needed. * executable) and patch parameters if needed.
*/ */
HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon) HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon)
{ TRACE(shell,"\n"); { TRACE_(shell)("\n");
return ExtractAssociatedIcon16(hInst,lpIconPath,lpiIcon); return ExtractAssociatedIcon16(hInst,lpIconPath,lpiIcon);
} }
HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16 hInst, LPSTR lpIconPath, LPWORD lpiIcon) HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16 hInst, LPSTR lpIconPath, LPWORD lpiIcon)
{ HICON16 hIcon; { HICON16 hIcon;
TRACE(shell,"\n"); TRACE_(shell)("\n");
hIcon = ExtractIcon16(hInst, lpIconPath, *lpiIcon); hIcon = ExtractIcon16(hInst, lpIconPath, *lpiIcon);
@ -966,7 +966,7 @@ HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16 hInst, LPSTR lpIconPath, LPWO
LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry) LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry)
{ UINT16 l; { UINT16 l;
TRACE(shell,"\n"); TRACE_(shell)("\n");
l = strlen(entry); l = strlen(entry);
for( ; *lpEnv ; lpEnv+=strlen(lpEnv)+1 ) for( ; *lpEnv ; lpEnv+=strlen(lpEnv)+1 )
@ -983,7 +983,7 @@ LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry)
SEGPTR WINAPI FindEnvironmentString16(LPSTR str) SEGPTR WINAPI FindEnvironmentString16(LPSTR str)
{ SEGPTR spEnv; { SEGPTR spEnv;
LPSTR lpEnv,lpString; LPSTR lpEnv,lpString;
TRACE(shell,"\n"); TRACE_(shell)("\n");
spEnv = GetDOSEnvironment16(); spEnv = GetDOSEnvironment16();
@ -1010,7 +1010,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
CharToOemA(str,str); CharToOemA(str,str);
TRACE(shell,"accept %s\n", str); TRACE_(shell)("accept %s\n", str);
while( *lpstr && lpbstr - lpBuffer < length ) while( *lpstr && lpbstr - lpBuffer < length )
{ {
@ -1030,7 +1030,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
if( l > length - (lpbstr - lpBuffer) - 1 ) if( l > length - (lpbstr - lpBuffer) - 1 )
{ {
WARN(shell,"-- Env subst aborted - string too short\n"); WARN_(shell)("-- Env subst aborted - string too short\n");
*lpend = '%'; *lpend = '%';
break; break;
} }
@ -1058,7 +1058,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
else else
length = 0; length = 0;
TRACE(shell,"-- return %s\n", str); TRACE_(shell)("-- return %s\n", str);
OemToCharA(str,str); OemToCharA(str,str);
HeapFree( GetProcessHeap(), 0, lpBuffer); HeapFree( GetProcessHeap(), 0, lpBuffer);
@ -1075,7 +1075,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
*/ */
LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam) LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam)
{ {
TRACE(shell,"%i, %04x, %08x\n", code, wParam, TRACE_(shell)("%i, %04x, %08x\n", code, wParam,
(unsigned)lParam ); (unsigned)lParam );
if( SHELL_hHook && SHELL_hWnd ) if( SHELL_hHook && SHELL_hWnd )
{ {
@ -1095,7 +1095,7 @@ LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam)
* RegisterShellHook [SHELL.102] * RegisterShellHook [SHELL.102]
*/ */
BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction) BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
{ TRACE(shell,"%04x [%u]\n", hWnd, uAction ); { TRACE_(shell)("%04x [%u]\n", hWnd, uAction );
switch( uAction ) switch( uAction )
{ case 2: /* register hWnd as a shell window */ { case 2: /* register hWnd as a shell window */
@ -1108,7 +1108,7 @@ BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate ); uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate );
} }
else else
WARN(shell,"-- unable to install ShellHookProc()!\n"); WARN_(shell)("-- unable to install ShellHookProc()!\n");
} }
if( SHELL_hHook ) if( SHELL_hHook )
@ -1116,7 +1116,7 @@ BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
break; break;
default: default:
WARN(shell, "-- unknown code %i\n", uAction ); WARN_(shell)("-- unknown code %i\n", uAction );
/* just in case */ /* just in case */
SHELL_hWnd = 0; SHELL_hWnd = 0;
} }

View File

@ -12,7 +12,7 @@
#include "miscemu.h" #include "miscemu.h"
#include "sig_context.h" #include "sig_context.h"
#include "selectors.h" #include "selectors.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(int) DECLARE_DEBUG_CHANNEL(int)
DECLARE_DEBUG_CHANNEL(io) DECLARE_DEBUG_CHANNEL(io)
@ -555,39 +555,39 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
{ {
case 0x6c: case 0x6c:
*((BYTE *)data) = IO_inport( DX_sig(context), 1); *((BYTE *)data) = IO_inport( DX_sig(context), 1);
TRACE(io, "0x%x < %02x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x < %02x @ %04x:%04x\n", DX_sig(context),
*((BYTE *)data), CS_sig(context), IP_sig(context)); *((BYTE *)data), CS_sig(context), IP_sig(context));
break; break;
case 0x6d: case 0x6d:
if (long_op) if (long_op)
{ {
*((DWORD *)data) = IO_inport( DX_sig(context), 4); *((DWORD *)data) = IO_inport( DX_sig(context), 4);
TRACE(io, "0x%x < %08lx @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x < %08lx @ %04x:%04x\n", DX_sig(context),
*((DWORD *)data), CS_sig(context), IP_sig(context)); *((DWORD *)data), CS_sig(context), IP_sig(context));
} }
else else
{ {
*((WORD *)data) = IO_inport( DX_sig(context), 2); *((WORD *)data) = IO_inport( DX_sig(context), 2);
TRACE(io, "0x%x < %04x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x < %04x @ %04x:%04x\n", DX_sig(context),
*((WORD *)data), CS_sig(context), IP_sig(context)); *((WORD *)data), CS_sig(context), IP_sig(context));
} }
break; break;
case 0x6e: case 0x6e:
IO_outport( DX_sig(context), 1, *((BYTE *)data)); IO_outport( DX_sig(context), 1, *((BYTE *)data));
TRACE(io, "0x%x > %02x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x > %02x @ %04x:%04x\n", DX_sig(context),
*((BYTE *)data), CS_sig(context), IP_sig(context)); *((BYTE *)data), CS_sig(context), IP_sig(context));
break; break;
case 0x6f: case 0x6f:
if (long_op) if (long_op)
{ {
IO_outport( DX_sig(context), 4, *((DWORD *)data)); IO_outport( DX_sig(context), 4, *((DWORD *)data));
TRACE(io, "0x%x > %08lx @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x > %08lx @ %04x:%04x\n", DX_sig(context),
*((DWORD *)data), CS_sig(context), IP_sig(context)); *((DWORD *)data), CS_sig(context), IP_sig(context));
} }
else else
{ {
IO_outport( DX_sig(context), 2, *((WORD *)data)); IO_outport( DX_sig(context), 2, *((WORD *)data));
TRACE(io, "0x%x > %04x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x > %04x @ %04x:%04x\n", DX_sig(context),
*((WORD *)data), CS_sig(context), IP_sig(context)); *((WORD *)data), CS_sig(context), IP_sig(context));
} }
break; break;
@ -656,7 +656,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case 0xcd: /* int <XX> */ case 0xcd: /* int <XX> */
if (long_op) if (long_op)
{ {
ERR(int, "int xx from 32-bit code is not supported.\n"); ERR_(int)("int xx from 32-bit code is not supported.\n");
break; /* Unable to emulate it */ break; /* Unable to emulate it */
} }
else else
@ -695,7 +695,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case 0xe4: /* inb al,XX */ case 0xe4: /* inb al,XX */
AL_sig(context) = IO_inport( instr[1], 1 ); AL_sig(context) = IO_inport( instr[1], 1 );
TRACE(io, "0x%x < %02x @ %04x:%04x\n", instr[1], TRACE_(io)("0x%x < %02x @ %04x:%04x\n", instr[1],
AL_sig(context), CS_sig(context), IP_sig(context)); AL_sig(context), CS_sig(context), IP_sig(context));
EIP_sig(context) += prefixlen + 2; EIP_sig(context) += prefixlen + 2;
return TRUE; return TRUE;
@ -704,13 +704,13 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
if (long_op) if (long_op)
{ {
EAX_sig(context) = IO_inport( instr[1], 4 ); EAX_sig(context) = IO_inport( instr[1], 4 );
TRACE(io, "0x%x < %08lx @ %04x:%04x\n", instr[1], TRACE_(io)("0x%x < %08lx @ %04x:%04x\n", instr[1],
EAX_sig(context), CS_sig(context), IP_sig(context)); EAX_sig(context), CS_sig(context), IP_sig(context));
} }
else else
{ {
AX_sig(context) = IO_inport( instr[1], 2 ); AX_sig(context) = IO_inport( instr[1], 2 );
TRACE(io, "0x%x < %04x @ %04x:%04x\n", instr[1], TRACE_(io)("0x%x < %04x @ %04x:%04x\n", instr[1],
AX_sig(context), CS_sig(context), IP_sig(context)); AX_sig(context), CS_sig(context), IP_sig(context));
} }
EIP_sig(context) += prefixlen + 2; EIP_sig(context) += prefixlen + 2;
@ -718,7 +718,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case 0xe6: /* outb XX,al */ case 0xe6: /* outb XX,al */
IO_outport( instr[1], 1, AL_sig(context) ); IO_outport( instr[1], 1, AL_sig(context) );
TRACE(io, "0x%x > %02x @ %04x:%04x\n", instr[1], TRACE_(io)("0x%x > %02x @ %04x:%04x\n", instr[1],
AL_sig(context), CS_sig(context), IP_sig(context)); AL_sig(context), CS_sig(context), IP_sig(context));
EIP_sig(context) += prefixlen + 2; EIP_sig(context) += prefixlen + 2;
return TRUE; return TRUE;
@ -727,13 +727,13 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
if (long_op) if (long_op)
{ {
IO_outport( instr[1], 4, EAX_sig(context) ); IO_outport( instr[1], 4, EAX_sig(context) );
TRACE(io, "0x%x > %08lx @ %04x:%04x\n", instr[1], TRACE_(io)("0x%x > %08lx @ %04x:%04x\n", instr[1],
EAX_sig(context), CS_sig(context), IP_sig(context)); EAX_sig(context), CS_sig(context), IP_sig(context));
} }
else else
{ {
IO_outport( instr[1], 2, AX_sig(context) ); IO_outport( instr[1], 2, AX_sig(context) );
TRACE(io, "0x%x > %04x @ %04x:%04x\n", instr[1], TRACE_(io)("0x%x > %04x @ %04x:%04x\n", instr[1],
AX_sig(context), CS_sig(context), IP_sig(context)); AX_sig(context), CS_sig(context), IP_sig(context));
} }
EIP_sig(context) += prefixlen + 2; EIP_sig(context) += prefixlen + 2;
@ -741,7 +741,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case 0xec: /* inb al,dx */ case 0xec: /* inb al,dx */
AL_sig(context) = IO_inport( DX_sig(context), 1 ); AL_sig(context) = IO_inport( DX_sig(context), 1 );
TRACE(io, "0x%x < %02x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x < %02x @ %04x:%04x\n", DX_sig(context),
AL_sig(context), CS_sig(context), IP_sig(context)); AL_sig(context), CS_sig(context), IP_sig(context));
EIP_sig(context) += prefixlen + 1; EIP_sig(context) += prefixlen + 1;
return TRUE; return TRUE;
@ -750,13 +750,13 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
if (long_op) if (long_op)
{ {
EAX_sig(context) = IO_inport( DX_sig(context), 4 ); EAX_sig(context) = IO_inport( DX_sig(context), 4 );
TRACE(io, "0x%x < %08lx @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x < %08lx @ %04x:%04x\n", DX_sig(context),
EAX_sig(context), CS_sig(context), IP_sig(context)); EAX_sig(context), CS_sig(context), IP_sig(context));
} }
else else
{ {
AX_sig(context) = IO_inport( DX_sig(context), 2 ); AX_sig(context) = IO_inport( DX_sig(context), 2 );
TRACE(io, "0x%x < %04x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x < %04x @ %04x:%04x\n", DX_sig(context),
AX_sig(context), CS_sig(context), IP_sig(context)); AX_sig(context), CS_sig(context), IP_sig(context));
} }
EIP_sig(context) += prefixlen + 1; EIP_sig(context) += prefixlen + 1;
@ -764,7 +764,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case 0xee: /* outb dx,al */ case 0xee: /* outb dx,al */
IO_outport( DX_sig(context), 1, AL_sig(context) ); IO_outport( DX_sig(context), 1, AL_sig(context) );
TRACE(io, "0x%x > %02x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x > %02x @ %04x:%04x\n", DX_sig(context),
AL_sig(context), CS_sig(context), IP_sig(context)); AL_sig(context), CS_sig(context), IP_sig(context));
EIP_sig(context) += prefixlen + 1; EIP_sig(context) += prefixlen + 1;
return TRUE; return TRUE;
@ -773,13 +773,13 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
if (long_op) if (long_op)
{ {
IO_outport( DX_sig(context), 4, EAX_sig(context) ); IO_outport( DX_sig(context), 4, EAX_sig(context) );
TRACE(io, "0x%x > %08lx @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x > %08lx @ %04x:%04x\n", DX_sig(context),
EAX_sig(context), CS_sig(context), IP_sig(context)); EAX_sig(context), CS_sig(context), IP_sig(context));
} }
else else
{ {
IO_outport( DX_sig(context), 2, AX_sig(context) ); IO_outport( DX_sig(context), 2, AX_sig(context) );
TRACE(io, "0x%x > %04x @ %04x:%04x\n", DX_sig(context), TRACE_(io)("0x%x > %04x @ %04x:%04x\n", DX_sig(context),
AX_sig(context), CS_sig(context), IP_sig(context)); AX_sig(context), CS_sig(context), IP_sig(context));
} }
EIP_sig(context) += prefixlen + 1; EIP_sig(context) += prefixlen + 1;
@ -810,7 +810,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
return TRUE; return TRUE;
} }
MSG("Unexpected Windows program segfault" MESSAGE("Unexpected Windows program segfault"
" - opcode = %x\n", *instr); " - opcode = %x\n", *instr);
return FALSE; /* Unable to emulate it */ return FALSE; /* Unable to emulate it */
} }

View File

@ -16,7 +16,7 @@
#include "vga.h" #include "vga.h"
#include "module.h" #include "module.h"
#include "task.h" #include "task.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosmem) DECLARE_DEBUG_CHANNEL(dosmem)
DECLARE_DEBUG_CHANNEL(selector) DECLARE_DEBUG_CHANNEL(selector)
@ -394,7 +394,7 @@ BOOL DOSMEM_Init(HMODULE16 hModule)
PAGE_EXECUTE_READWRITE ); PAGE_EXECUTE_READWRITE );
if (!DOSMEM_dosmem) if (!DOSMEM_dosmem)
{ {
WARN(dosmem, "Could not allocate DOS memory.\n" ); WARN_(dosmem)("Could not allocate DOS memory.\n" );
return FALSE; return FALSE;
} }
DOSMEM_BiosDataSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0x400, DOSMEM_BiosDataSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0x400,
@ -456,7 +456,7 @@ LPVOID DOSMEM_GetBlock(HMODULE16 hModule, UINT size, UINT16* pseg)
#ifdef __DOSMEM_DEBUG__ #ifdef __DOSMEM_DEBUG__
if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG ) if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG )
{ {
WARN(dosmem,"MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev); WARN_(dosmem)("MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev);
return NULL; return NULL;
} }
prev = dm; prev = dm;
@ -638,7 +638,7 @@ UINT DOSMEM_Available(HMODULE16 hModule)
#ifdef __DOSMEM_DEBUG__ #ifdef __DOSMEM_DEBUG__
if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG ) if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG )
{ {
WARN(dosmem,"MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev); WARN_(dosmem)("MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev);
return NULL; return NULL;
} }
prev = dm; prev = dm;
@ -700,7 +700,7 @@ LPVOID DOSMEM_MapRealToLinear(DWORD x)
LPVOID lin; LPVOID lin;
lin=DOSMEM_MemoryBase(0)+(x&0xffff)+(((x&0xffff0000)>>16)*16); lin=DOSMEM_MemoryBase(0)+(x&0xffff)+(((x&0xffff0000)>>16)*16);
TRACE(selector,"(0x%08lx) returns 0x%p.\n", TRACE_(selector)("(0x%08lx) returns 0x%p.\n",
x,lin ); x,lin );
return lin; return lin;
} }
@ -719,7 +719,7 @@ WORD DOSMEM_AllocSelector(WORD realsel)
GMEM_FIXED,DOSMEM_dosmem+realsel*16,0x10000, GMEM_FIXED,DOSMEM_dosmem+realsel*16,0x10000,
hModule,FALSE,FALSE,FALSE,NULL hModule,FALSE,FALSE,FALSE,NULL
); );
TRACE(selector,"(0x%04x) returns 0x%04x.\n", TRACE_(selector)("(0x%04x) returns 0x%04x.\n",
realsel,sel realsel,sel
); );
return sel; return sel;

View File

@ -14,7 +14,7 @@
#include "multimedia.h" #include "multimedia.h"
#include "xmalloc.h" #include "xmalloc.h"
#include "options.h" #include "options.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(mci) DECLARE_DEBUG_CHANNEL(mci)
DECLARE_DEBUG_CHANNEL(midi) DECLARE_DEBUG_CHANNEL(midi)
@ -57,7 +57,7 @@ static int unixToWindowsDeviceType(int type)
case SYNTH_TYPE_SAMPLE: return MOD_SYNTH; case SYNTH_TYPE_SAMPLE: return MOD_SYNTH;
case SYNTH_TYPE_MIDI: return MOD_MIDIPORT; case SYNTH_TYPE_MIDI: return MOD_MIDIPORT;
default: default:
ERR(midi, "Cannot determine the type of this midi device. " ERR_(midi)("Cannot determine the type of this midi device. "
"Assuming FM Synth\n"); "Assuming FM Synth\n");
return MOD_FMSYNTH; return MOD_FMSYNTH;
} }
@ -81,13 +81,13 @@ static BOOL MULTIMEDIA_MidiInit(void)
struct midi_info minfo; struct midi_info minfo;
int fd; /* file descriptor for MIDI_SEQ */ int fd; /* file descriptor for MIDI_SEQ */
TRACE(midi, "Initializing the MIDI variables.\n"); TRACE_(midi)("Initializing the MIDI variables.\n");
/* try to open device */ /* try to open device */
/* FIXME: should use function midiOpenSeq() in midi.c */ /* FIXME: should use function midiOpenSeq() in midi.c */
fd = open(MIDI_SEQ, O_WRONLY); fd = open(MIDI_SEQ, O_WRONLY);
if (fd == -1) { if (fd == -1) {
TRACE(midi, "No sequencer found: unable to open `%s'.\n", MIDI_SEQ); TRACE_(midi)("No sequencer found: unable to open `%s'.\n", MIDI_SEQ);
return TRUE; return TRUE;
} }
@ -95,13 +95,13 @@ static BOOL MULTIMEDIA_MidiInit(void)
status = ioctl(fd, SNDCTL_SEQ_NRSYNTHS, &numsynthdevs); status = ioctl(fd, SNDCTL_SEQ_NRSYNTHS, &numsynthdevs);
if (status == -1) { if (status == -1) {
ERR(midi, "ioctl for nr synth failed.\n"); ERR_(midi)("ioctl for nr synth failed.\n");
close(fd); close(fd);
return TRUE; return TRUE;
} }
if (numsynthdevs > MAX_MIDIOUTDRV) { if (numsynthdevs > MAX_MIDIOUTDRV) {
ERR(midi, "MAX_MIDIOUTDRV (%d) was enough for the number of devices (%d). " ERR_(midi)("MAX_MIDIOUTDRV (%d) was enough for the number of devices (%d). "
"Some FM devices will not be available.\n",MAX_MIDIOUTDRV,numsynthdevs); "Some FM devices will not be available.\n",MAX_MIDIOUTDRV,numsynthdevs);
numsynthdevs = MAX_MIDIOUTDRV; numsynthdevs = MAX_MIDIOUTDRV;
} }
@ -112,7 +112,7 @@ static BOOL MULTIMEDIA_MidiInit(void)
sinfo.device = i; sinfo.device = i;
status = ioctl(fd, SNDCTL_SYNTH_INFO, &sinfo); status = ioctl(fd, SNDCTL_SYNTH_INFO, &sinfo);
if (status == -1) { if (status == -1) {
ERR(midi, "ioctl for synth info failed.\n"); ERR_(midi)("ioctl for synth info failed.\n");
close(fd); close(fd);
return TRUE; return TRUE;
} }
@ -151,32 +151,32 @@ static BOOL MULTIMEDIA_MidiInit(void)
midiOutDevices[i] = tmplpCaps; midiOutDevices[i] = tmplpCaps;
if (sinfo.capabilities & SYNTH_CAP_INPUT) { if (sinfo.capabilities & SYNTH_CAP_INPUT) {
FIXME(midi, "Synthetizer support MIDI in. Not supported yet (please report)\n"); FIXME_(midi)("Synthetizer support MIDI in. Not supported yet (please report)\n");
} }
TRACE(midi, "name='%s', techn=%d voices=%d notes=%d support=%ld\n", TRACE_(midi)("name='%s', techn=%d voices=%d notes=%d support=%ld\n",
tmplpCaps->szPname, tmplpCaps->wTechnology, tmplpCaps->szPname, tmplpCaps->wTechnology,
tmplpCaps->wVoices, tmplpCaps->wNotes, tmplpCaps->dwSupport); tmplpCaps->wVoices, tmplpCaps->wNotes, tmplpCaps->dwSupport);
TRACE(midi,"OSS info: synth subtype=%d capa=%Xh\n", TRACE_(midi)("OSS info: synth subtype=%d capa=%Xh\n",
sinfo.synth_subtype, sinfo.capabilities); sinfo.synth_subtype, sinfo.capabilities);
} }
/* find how many MIDI devices are there in the system */ /* find how many MIDI devices are there in the system */
status = ioctl(fd, SNDCTL_SEQ_NRMIDIS, &nummididevs); status = ioctl(fd, SNDCTL_SEQ_NRMIDIS, &nummididevs);
if (status == -1) { if (status == -1) {
ERR(midi, "ioctl on nr midi failed.\n"); ERR_(midi)("ioctl on nr midi failed.\n");
return TRUE; return TRUE;
} }
/* FIXME: the two restrictions below could be loosen in some cases */ /* FIXME: the two restrictions below could be loosen in some cases */
if (numsynthdevs + nummididevs > MAX_MIDIOUTDRV) { if (numsynthdevs + nummididevs > MAX_MIDIOUTDRV) {
ERR(midi, "MAX_MIDIOUTDRV was not enough for the number of devices. " ERR_(midi)("MAX_MIDIOUTDRV was not enough for the number of devices. "
"Some MIDI devices will not be available.\n"); "Some MIDI devices will not be available.\n");
nummididevs = MAX_MIDIOUTDRV - numsynthdevs; nummididevs = MAX_MIDIOUTDRV - numsynthdevs;
} }
if (nummididevs > MAX_MIDIINDRV) { if (nummididevs > MAX_MIDIINDRV) {
ERR(midi, "MAX_MIDIINDRV (%d) was not enough for the number of devices (%d). " ERR_(midi)("MAX_MIDIINDRV (%d) was not enough for the number of devices (%d). "
"Some MIDI devices will not be available.\n",MAX_MIDIINDRV,nummididevs); "Some MIDI devices will not be available.\n",MAX_MIDIINDRV,nummididevs);
nummididevs = MAX_MIDIINDRV; nummididevs = MAX_MIDIINDRV;
} }
@ -188,7 +188,7 @@ static BOOL MULTIMEDIA_MidiInit(void)
minfo.device = i; minfo.device = i;
status = ioctl(fd, SNDCTL_MIDI_INFO, &minfo); status = ioctl(fd, SNDCTL_MIDI_INFO, &minfo);
if (status == -1) { if (status == -1) {
ERR(midi, "ioctl on midi info failed.\n"); ERR_(midi)("ioctl on midi info failed.\n");
close(fd); close(fd);
return TRUE; return TRUE;
} }
@ -236,10 +236,10 @@ static BOOL MULTIMEDIA_MidiInit(void)
midiInDevices[i] = tmplpInCaps; midiInDevices[i] = tmplpInCaps;
TRACE(midi,"name='%s' techn=%d voices=%d notes=%d support=%ld\n", TRACE_(midi)("name='%s' techn=%d voices=%d notes=%d support=%ld\n",
tmplpOutCaps->szPname, tmplpOutCaps->wTechnology, tmplpOutCaps->wVoices, tmplpOutCaps->szPname, tmplpOutCaps->wTechnology, tmplpOutCaps->wVoices,
tmplpOutCaps->wNotes, tmplpOutCaps->dwSupport); tmplpOutCaps->wNotes, tmplpOutCaps->dwSupport);
TRACE(midi,"OSS info: midi dev-type=%d, capa=%d\n", TRACE_(midi)("OSS info: midi dev-type=%d, capa=%d\n",
minfo.dev_type, minfo.capabilities); minfo.dev_type, minfo.capabilities);
} }
@ -271,20 +271,20 @@ static BOOL MULTIMEDIA_MidiInit(void)
/* FIXME: should do also some registry diving here */ /* FIXME: should do also some registry diving here */
if (PROFILE_GetWineIniString("options", "mci", "", lpmciInstallNames, 2048) > 0) { if (PROFILE_GetWineIniString("options", "mci", "", lpmciInstallNames, 2048) > 0) {
TRACE(mci, "Wine => '%s' \n", ptr1); TRACE_(mci)("Wine => '%s' \n", ptr1);
while ((ptr2 = strchr(ptr1, ':')) != 0) { while ((ptr2 = strchr(ptr1, ':')) != 0) {
*ptr2++ = 0; *ptr2++ = 0;
TRACE(mci, "---> '%s' \n", ptr1); TRACE_(mci)("---> '%s' \n", ptr1);
mciInstalledCount++; mciInstalledCount++;
ptr1 = ptr2; ptr1 = ptr2;
} }
mciInstalledCount++; mciInstalledCount++;
TRACE(mci, "---> '%s' \n", ptr1); TRACE_(mci)("---> '%s' \n", ptr1);
ptr1 += strlen(ptr1) + 1; ptr1 += strlen(ptr1) + 1;
} else { } else {
GetPrivateProfileStringA("mci", NULL, "", lpmciInstallNames, 2048, "SYSTEM.INI"); GetPrivateProfileStringA("mci", NULL, "", lpmciInstallNames, 2048, "SYSTEM.INI");
while (strlen(ptr1) > 0) { while (strlen(ptr1) > 0) {
TRACE(mci, "---> '%s' \n", ptr1); TRACE_(mci)("---> '%s' \n", ptr1);
ptr1 += (strlen(ptr1) + 1); ptr1 += (strlen(ptr1) + 1);
mciInstalledCount++; mciInstalledCount++;
} }
@ -306,7 +306,7 @@ static bInitDone = FALSE;
*/ */
BOOL WINAPI WINMM_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) BOOL WINAPI WINMM_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ {
TRACE(mmsys, "0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); TRACE_(mmsys)("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
switch (fdwReason) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
@ -329,7 +329,7 @@ BOOL WINAPI WINMM_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
BOOL WINAPI MMSYSTEM_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) BOOL WINAPI MMSYSTEM_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ {
TRACE(mmsys, "0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); TRACE_(mmsys)("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
switch (fdwReason) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:

View File

@ -11,7 +11,7 @@
#include "user.h" #include "user.h"
#include "driver.h" #include "driver.h"
#include "xmalloc.h" #include "xmalloc.h"
#include "debug.h" #include "debugtools.h"
#include "digitalv.h" #include "digitalv.h"
#include "options.h" #include "options.h"
@ -91,7 +91,7 @@ static WINE_MCIAVI* AVI_mciGetOpenDev(UINT16 wDevID)
WINE_MCIAVI* wma = AVI_drvGetDrv(wDevID); WINE_MCIAVI* wma = AVI_drvGetDrv(wDevID);
if (wma == NULL || wma->nUseCount == 0) { if (wma == NULL || wma->nUseCount == 0) {
WARN(mciavi, "Invalid wDevID=%u\n", wDevID); WARN_(mciavi)("Invalid wDevID=%u\n", wDevID);
return 0; return 0;
} }
return wma; return wma;
@ -106,7 +106,7 @@ static DWORD AVI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSA lpP
{ {
WINE_MCIAVI* wma = AVI_drvGetDrv(wDevID); WINE_MCIAVI* wma = AVI_drvGetDrv(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : semi-stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : semi-stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -124,7 +124,7 @@ static DWORD AVI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSA lpP
wma->fShareable = dwFlags & MCI_OPEN_SHAREABLE; wma->fShareable = dwFlags & MCI_OPEN_SHAREABLE;
} }
if (dwFlags & MCI_OPEN_ELEMENT) { if (dwFlags & MCI_OPEN_ELEMENT) {
TRACE(mciavi,"MCI_OPEN_ELEMENT !\n"); TRACE_(mciavi)("MCI_OPEN_ELEMENT !\n");
/* return MCIERR_NO_ELEMENT_ALLOWED; */ /* return MCIERR_NO_ELEMENT_ALLOWED; */
} }
@ -150,7 +150,7 @@ static DWORD AVI_mciClose(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : semi-stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : semi-stub\n", wDevID, dwFlags, lpParms);
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -169,14 +169,14 @@ static DWORD AVI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
wma->wStatus = MCI_MODE_PLAY; wma->wStatus = MCI_MODE_PLAY;
if (lpParms && (dwFlags & MCI_NOTIFY)) { if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE(mciavi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mciavi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -190,7 +190,7 @@ static DWORD AVI_mciRecord(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_RECORD_PARMS
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -206,7 +206,7 @@ static DWORD AVI_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -222,7 +222,7 @@ static DWORD AVI_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -238,7 +238,7 @@ static DWORD AVI_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -254,7 +254,7 @@ static DWORD AVI_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -269,7 +269,7 @@ static DWORD AVI_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParm
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -277,25 +277,25 @@ static DWORD AVI_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParm
if (dwFlags & MCI_SET_TIME_FORMAT) { if (dwFlags & MCI_SET_TIME_FORMAT) {
switch (lpParms->dwTimeFormat) { switch (lpParms->dwTimeFormat) {
case MCI_FORMAT_MILLISECONDS: case MCI_FORMAT_MILLISECONDS:
TRACE(mciavi, "MCI_FORMAT_MILLISECONDS !\n"); TRACE_(mciavi)("MCI_FORMAT_MILLISECONDS !\n");
wma->dwTimeFormat = MCI_FORMAT_MILLISECONDS; wma->dwTimeFormat = MCI_FORMAT_MILLISECONDS;
break; break;
case MCI_FORMAT_FRAMES: case MCI_FORMAT_FRAMES:
TRACE(mciavi, "MCI_FORMAT_FRAMES !\n"); TRACE_(mciavi)("MCI_FORMAT_FRAMES !\n");
wma->dwTimeFormat = MCI_FORMAT_FRAMES; wma->dwTimeFormat = MCI_FORMAT_FRAMES;
break; break;
default: default:
WARN(mciavi, "Bad time format %lu!\n", lpParms->dwTimeFormat); WARN_(mciavi)("Bad time format %lu!\n", lpParms->dwTimeFormat);
return MCIERR_BAD_TIME_FORMAT; return MCIERR_BAD_TIME_FORMAT;
} }
} }
if (dwFlags & MCI_SET_DOOR_OPEN) { if (dwFlags & MCI_SET_DOOR_OPEN) {
TRACE(mciavi, "No support for door open !\n"); TRACE_(mciavi)("No support for door open !\n");
return MCIERR_UNSUPPORTED_FUNCTION; return MCIERR_UNSUPPORTED_FUNCTION;
} }
if (dwFlags & MCI_SET_DOOR_CLOSED) { if (dwFlags & MCI_SET_DOOR_CLOSED) {
TRACE(mciavi, "No support for door close !\n"); TRACE_(mciavi)("No support for door close !\n");
return MCIERR_UNSUPPORTED_FUNCTION; return MCIERR_UNSUPPORTED_FUNCTION;
} }
if (dwFlags & MCI_SET_ON) { if (dwFlags & MCI_SET_ON) {
@ -318,7 +318,7 @@ static DWORD AVI_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParm
if (dwFlags & MCI_DGV_SET_SEEK_EXACTLY) { if (dwFlags & MCI_DGV_SET_SEEK_EXACTLY) {
dsprintf(mciavi, " seek_exactly"); dsprintf(mciavi, " seek_exactly");
} }
TRACE(mciavi, "%s\n", dbg_str(mciavi)); TRACE_(mciavi)("%s\n", dbg_str(mciavi));
} }
if (dwFlags & MCI_SET_OFF) { if (dwFlags & MCI_SET_OFF) {
@ -340,7 +340,7 @@ static DWORD AVI_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParm
if (dwFlags & MCI_DGV_SET_SEEK_EXACTLY) { if (dwFlags & MCI_DGV_SET_SEEK_EXACTLY) {
dsprintf(mciavi, " seek_exactly"); dsprintf(mciavi, " seek_exactly");
} }
TRACE(mciavi, "%s\n", dbg_str(mciavi)); TRACE_(mciavi)("%s\n", dbg_str(mciavi));
} }
if (dwFlags & MCI_DGV_SET_FILEFORMAT) { if (dwFlags & MCI_DGV_SET_FILEFORMAT) {
LPSTR str = "save"; LPSTR str = "save";
@ -348,20 +348,20 @@ static DWORD AVI_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParm
str = "capture"; str = "capture";
switch (lpParms->dwFileFormat) { switch (lpParms->dwFileFormat) {
case MCI_DGV_FF_AVI: TRACE(mciavi, "Setting file format (%s) to 'AVI'\n", str); break; case MCI_DGV_FF_AVI: TRACE_(mciavi)("Setting file format (%s) to 'AVI'\n", str); break;
case MCI_DGV_FF_AVSS: TRACE(mciavi, "Setting file format (%s) to 'AVSS'\n", str); break; case MCI_DGV_FF_AVSS: TRACE_(mciavi)("Setting file format (%s) to 'AVSS'\n", str); break;
case MCI_DGV_FF_DIB: TRACE(mciavi, "Setting file format (%s) to 'DIB'\n", str); break; case MCI_DGV_FF_DIB: TRACE_(mciavi)("Setting file format (%s) to 'DIB'\n", str); break;
case MCI_DGV_FF_JFIF: TRACE(mciavi, "Setting file format (%s) to 'JFIF'\n", str); break; case MCI_DGV_FF_JFIF: TRACE_(mciavi)("Setting file format (%s) to 'JFIF'\n", str); break;
case MCI_DGV_FF_JPEG: TRACE(mciavi, "Setting file format (%s) to 'JPEG'\n", str); break; case MCI_DGV_FF_JPEG: TRACE_(mciavi)("Setting file format (%s) to 'JPEG'\n", str); break;
case MCI_DGV_FF_MPEG: TRACE(mciavi, "Setting file format (%s) to 'MPEG'\n", str); break; case MCI_DGV_FF_MPEG: TRACE_(mciavi)("Setting file format (%s) to 'MPEG'\n", str); break;
case MCI_DGV_FF_RDIB: TRACE(mciavi, "Setting file format (%s) to 'RLE DIB'\n", str); break; case MCI_DGV_FF_RDIB: TRACE_(mciavi)("Setting file format (%s) to 'RLE DIB'\n", str); break;
case MCI_DGV_FF_RJPEG: TRACE(mciavi, "Setting file format (%s) to 'RJPEG'\n", str); break; case MCI_DGV_FF_RJPEG: TRACE_(mciavi)("Setting file format (%s) to 'RJPEG'\n", str); break;
default: TRACE(mciavi, "Setting unknown file format (%s): %ld\n", str, lpParms->dwFileFormat); default: TRACE_(mciavi)("Setting unknown file format (%s): %ld\n", str, lpParms->dwFileFormat);
} }
} }
if (dwFlags & MCI_DGV_SET_SPEED) { if (dwFlags & MCI_DGV_SET_SPEED) {
TRACE(mciavi, "Setting speed to %ld\n", lpParms->dwSpeed); TRACE_(mciavi)("Setting speed to %ld\n", lpParms->dwSpeed);
} }
return 0; return 0;
@ -374,7 +374,7 @@ static DWORD AVI_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSA
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -383,7 +383,7 @@ static DWORD AVI_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSA
switch (lpParms->dwItem) { switch (lpParms->dwItem) {
case MCI_STATUS_CURRENT_TRACK: case MCI_STATUS_CURRENT_TRACK:
lpParms->dwReturn = 1; lpParms->dwReturn = 1;
TRACE(mciavi, "MCI_STATUS_CURRENT_TRACK => %lu\n", lpParms->dwReturn); TRACE_(mciavi)("MCI_STATUS_CURRENT_TRACK => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_LENGTH: case MCI_STATUS_LENGTH:
if (dwFlags & MCI_TRACK) { if (dwFlags & MCI_TRACK) {
@ -392,44 +392,44 @@ static DWORD AVI_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSA
} else { } else {
lpParms->dwReturn = 0x4321; lpParms->dwReturn = 0x4321;
} }
TRACE(mciavi, "MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn); TRACE_(mciavi)("MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_MODE: case MCI_STATUS_MODE:
lpParms->dwReturn = wma->wStatus; lpParms->dwReturn = wma->wStatus;
TRACE(mciavi, "MCI_STATUS_MODE => %lu\n", lpParms->dwReturn); TRACE_(mciavi)("MCI_STATUS_MODE => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_MEDIA_PRESENT: case MCI_STATUS_MEDIA_PRESENT:
TRACE(mciavi, "MCI_STATUS_MEDIA_PRESENT => TRUE\n"); TRACE_(mciavi)("MCI_STATUS_MEDIA_PRESENT => TRUE\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_STATUS_NUMBER_OF_TRACKS: case MCI_STATUS_NUMBER_OF_TRACKS:
lpParms->dwReturn = 3; lpParms->dwReturn = 3;
TRACE(mciavi, "MCI_STATUS_NUMBER_OF_TRACKS => %lu\n", lpParms->dwReturn); TRACE_(mciavi)("MCI_STATUS_NUMBER_OF_TRACKS => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_POSITION: case MCI_STATUS_POSITION:
/* FIXME: do I need to use MCI_TRACK ? */ /* FIXME: do I need to use MCI_TRACK ? */
lpParms->dwReturn = 0x0123; lpParms->dwReturn = 0x0123;
TRACE(mciavi, "MCI_STATUS_POSITION %s => %lu\n", TRACE_(mciavi)("MCI_STATUS_POSITION %s => %lu\n",
(dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn); (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn);
break; break;
case MCI_STATUS_READY: case MCI_STATUS_READY:
lpParms->dwReturn = (wma->wStatus != MCI_MODE_NOT_READY); lpParms->dwReturn = (wma->wStatus != MCI_MODE_NOT_READY);
TRACE(mciavi, "MCI_STATUS_READY = %lu\n", lpParms->dwReturn); TRACE_(mciavi)("MCI_STATUS_READY = %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_TIME_FORMAT: case MCI_STATUS_TIME_FORMAT:
lpParms->dwReturn = wma->dwTimeFormat; lpParms->dwReturn = wma->dwTimeFormat;
TRACE(mciavi, "MCI_STATUS_TIME_FORMAT => %lu\n", lpParms->dwReturn); TRACE_(mciavi)("MCI_STATUS_TIME_FORMAT => %lu\n", lpParms->dwReturn);
break; break;
default: default:
WARN(mciavi, "Unknowm command %08lX !\n", lpParms->dwItem); WARN_(mciavi)("Unknowm command %08lX !\n", lpParms->dwItem);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
} else { } else {
WARN(mciavi, "No Status-Item!\n"); WARN_(mciavi)("No Status-Item!\n");
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
if (dwFlags & MCI_NOTIFY) { if (dwFlags & MCI_NOTIFY) {
TRACE(mciavi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mciavi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -444,7 +444,7 @@ static DWORD AVI_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_P
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -452,47 +452,47 @@ static DWORD AVI_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_P
if (dwFlags & MCI_GETDEVCAPS_ITEM) { if (dwFlags & MCI_GETDEVCAPS_ITEM) {
switch (lpParms->dwItem) { switch (lpParms->dwItem) {
case MCI_GETDEVCAPS_DEVICE_TYPE: case MCI_GETDEVCAPS_DEVICE_TYPE:
TRACE(mciavi, "MCI_GETDEVCAPS_DEVICE_TYPE !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_DEVICE_TYPE !\n");
lpParms->dwReturn = MCI_DEVTYPE_DIGITAL_VIDEO; lpParms->dwReturn = MCI_DEVTYPE_DIGITAL_VIDEO;
break; break;
case MCI_GETDEVCAPS_HAS_AUDIO: case MCI_GETDEVCAPS_HAS_AUDIO:
TRACE(mciavi, "MCI_GETDEVCAPS_HAS_AUDIO !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_HAS_AUDIO !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_HAS_VIDEO: case MCI_GETDEVCAPS_HAS_VIDEO:
TRACE(mciavi, "MCI_GETDEVCAPS_HAS_VIDEO !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_HAS_VIDEO !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_USES_FILES: case MCI_GETDEVCAPS_USES_FILES:
TRACE(mciavi, "MCI_GETDEVCAPS_USES_FILES !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_USES_FILES !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_COMPOUND_DEVICE: case MCI_GETDEVCAPS_COMPOUND_DEVICE:
TRACE(mciavi, "MCI_GETDEVCAPS_COMPOUND_DEVICE !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_COMPOUND_DEVICE !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_CAN_EJECT: case MCI_GETDEVCAPS_CAN_EJECT:
TRACE(mciavi, "MCI_GETDEVCAPS_CAN_EJECT !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_CAN_EJECT !\n");
lpParms->dwReturn = FALSE; lpParms->dwReturn = FALSE;
break; break;
case MCI_GETDEVCAPS_CAN_PLAY: case MCI_GETDEVCAPS_CAN_PLAY:
TRACE(mciavi, "MCI_GETDEVCAPS_CAN_PLAY !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_CAN_PLAY !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_CAN_RECORD: case MCI_GETDEVCAPS_CAN_RECORD:
TRACE(mciavi, "MCI_GETDEVCAPS_CAN_RECORD !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_CAN_RECORD !\n");
lpParms->dwReturn = FALSE; lpParms->dwReturn = FALSE;
break; break;
case MCI_GETDEVCAPS_CAN_SAVE: case MCI_GETDEVCAPS_CAN_SAVE:
TRACE(mciavi, "MCI_GETDEVCAPS_CAN_SAVE !\n"); TRACE_(mciavi)("MCI_GETDEVCAPS_CAN_SAVE !\n");
lpParms->dwReturn = FALSE; lpParms->dwReturn = FALSE;
break; break;
default: default:
TRACE(mciavi, "Unknown capability (%08lx) !\n", lpParms->dwItem); TRACE_(mciavi)("Unknown capability (%08lx) !\n", lpParms->dwItem);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
} else { } else {
TRACE(mciavi, "No GetDevCaps-Item !\n"); TRACE_(mciavi)("No GetDevCaps-Item !\n");
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
return 0; return 0;
@ -507,14 +507,14 @@ static DWORD AVI_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSA lpP
LPSTR str = 0; LPSTR str = 0;
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04X, %08lX, %p) : stub;\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04X, %08lX, %p) : stub;\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL || lpParms->lpstrReturn == NULL) { if (lpParms == NULL || lpParms->lpstrReturn == NULL) {
ret = MCIERR_NULL_PARAMETER_BLOCK; ret = MCIERR_NULL_PARAMETER_BLOCK;
} else if (wma == NULL) { } else if (wma == NULL) {
ret = MCIERR_INVALID_DEVICE_ID; ret = MCIERR_INVALID_DEVICE_ID;
} else { } else {
TRACE(mciavi, "buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize); TRACE_(mciavi)("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
switch (dwFlags) { switch (dwFlags) {
case MCI_INFO_PRODUCT: case MCI_INFO_PRODUCT:
@ -531,7 +531,7 @@ static DWORD AVI_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSA lpP
break; break;
#endif #endif
default: default:
WARN(mciavi, "Don't know this info command (%lu)\n", dwFlags); WARN_(mciavi)("Don't know this info command (%lu)\n", dwFlags);
ret = MCIERR_UNRECOGNIZED_COMMAND; ret = MCIERR_UNRECOGNIZED_COMMAND;
} }
} }
@ -553,7 +553,7 @@ static DWORD AVI_mciPut(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParm
RECT rc; RECT rc;
dbg_decl_str(mciavi, 256); dbg_decl_str(mciavi, 256);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -594,19 +594,19 @@ static DWORD AVI_mciWindow(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSA
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
if (dwFlags & MCI_DGV_WINDOW_HWND) { if (dwFlags & MCI_DGV_WINDOW_HWND) {
TRACE(mciavi, "Setting hWnd to %08lx\n", (DWORD)lpParms->hWnd); TRACE_(mciavi)("Setting hWnd to %08lx\n", (DWORD)lpParms->hWnd);
} }
if (dwFlags & MCI_DGV_WINDOW_STATE) { if (dwFlags & MCI_DGV_WINDOW_STATE) {
TRACE(mciavi, "Setting nCmdShow to %d\n", lpParms->nCmdShow); TRACE_(mciavi)("Setting nCmdShow to %d\n", lpParms->nCmdShow);
} }
if (dwFlags & MCI_DGV_WINDOW_TEXT) { if (dwFlags & MCI_DGV_WINDOW_TEXT) {
TRACE(mciavi, "Setting caption to '%s'\n", lpParms->lpstrText); TRACE_(mciavi)("Setting caption to '%s'\n", lpParms->lpstrText);
} }
return 0; return 0;
@ -619,7 +619,7 @@ static DWORD AVI_mciLoad(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_LOAD_PARMSA lpP
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -634,7 +634,7 @@ static DWORD AVI_mciSave(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SAVE_PARMSA lpP
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -649,7 +649,7 @@ static DWORD AVI_mciFreeze(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lp
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -664,7 +664,7 @@ static DWORD AVI_mciRealize(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lp
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -679,7 +679,7 @@ static DWORD AVI_mciUnFreeze(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -694,7 +694,7 @@ static DWORD AVI_mciUpdate(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -709,7 +709,7 @@ static DWORD AVI_mciWhere(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpP
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -724,7 +724,7 @@ static DWORD AVI_mciStep(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_STEP_PARMS lpPa
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -739,7 +739,7 @@ static DWORD AVI_mciCopy(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_COPY_PARMS lpPa
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -754,7 +754,7 @@ static DWORD AVI_mciCut(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_CUT_PARMS lpParm
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -769,7 +769,7 @@ static DWORD AVI_mciDelete(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_DELETE_PARMS
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -784,7 +784,7 @@ static DWORD AVI_mciPaste(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_PASTE_PARMS lp
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -799,7 +799,7 @@ static DWORD AVI_mciCue(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_CUE_PARMS lpParm
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -814,7 +814,7 @@ static DWORD AVI_mciCapture(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_CAPTURE_PARM
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -829,7 +829,7 @@ static DWORD AVI_mciMonitor(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_MONITOR_PARM
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -844,7 +844,7 @@ static DWORD AVI_mciReserve(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_RESERVE_PARM
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -859,7 +859,7 @@ static DWORD AVI_mciSetAudio(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_PA
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -874,7 +874,7 @@ static DWORD AVI_mciSignal(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SIGNAL_PARMS
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -889,7 +889,7 @@ static DWORD AVI_mciSetVideo(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_SETVIDEO_PA
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -904,7 +904,7 @@ static DWORD AVI_mciQuality(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_QUALITY_PARM
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -919,7 +919,7 @@ static DWORD AVI_mciList(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_LIST_PARMSA lpP
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -934,7 +934,7 @@ static DWORD AVI_mciUndo(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -949,7 +949,7 @@ static DWORD AVI_mciConfigure(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -964,7 +964,7 @@ static DWORD AVI_mciRestore(UINT16 wDevID, DWORD dwFlags, LPMCI_DGV_RESTORE_PARM
{ {
WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = AVI_mciGetOpenDev(wDevID);
TRACE(mciavi, "(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms); TRACE_(mciavi)("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -1036,14 +1036,14 @@ LONG MCIAVI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
case MCI_SPIN: case MCI_SPIN:
case MCI_ESCAPE: case MCI_ESCAPE:
WARN(mciavi, "Unsupported command=%s\n", MCI_CommandToString(wMsg)); WARN_(mciavi)("Unsupported command=%s\n", MCI_CommandToString(wMsg));
break; break;
case MCI_OPEN: case MCI_OPEN:
case MCI_CLOSE: case MCI_CLOSE:
FIXME(mciavi, "Shouldn't receive a MCI_OPEN or CLOSE message\n"); FIXME_(mciavi)("Shouldn't receive a MCI_OPEN or CLOSE message\n");
break; break;
default: default:
TRACE(mciavi, "Sending msg=%s to default driver proc\n", MCI_CommandToString(wMsg)); TRACE_(mciavi)("Sending msg=%s to default driver proc\n", MCI_CommandToString(wMsg));
return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2); return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
} }
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;

View File

@ -26,7 +26,7 @@
#include "user.h" #include "user.h"
#include "driver.h" #include "driver.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(mcimidi) DECLARE_DEBUG_CHANNEL(mcimidi)
DECLARE_DEBUG_CHANNEL(midi) DECLARE_DEBUG_CHANNEL(midi)
@ -129,7 +129,7 @@ static WINE_MCIMIDI* MIDI_mciGetOpenDev(UINT16 wDevID)
WINE_MCIMIDI* wmm = MIDI_drvGetDrv(wDevID); WINE_MCIMIDI* wmm = MIDI_drvGetDrv(wDevID);
if (wmm == NULL || wmm->nUseCount == 0) { if (wmm == NULL || wmm->nUseCount == 0) {
WARN(mcimidi, "Invalid wDevID=%u\n", wDevID); WARN_(mcimidi)("Invalid wDevID=%u\n", wDevID);
return 0; return 0;
} }
return wmm; return wmm;
@ -144,7 +144,7 @@ static DWORD MIDI_mciReadByte(WINE_MCIMIDI* wmm, BYTE *lpbyt)
if (lpbyt == NULL || if (lpbyt == NULL ||
mmioRead(wmm->hFile, (HPSTR)lpbyt, (long)sizeof(BYTE)) != (long)sizeof(BYTE)) { mmioRead(wmm->hFile, (HPSTR)lpbyt, (long)sizeof(BYTE)) != (long)sizeof(BYTE)) {
WARN(mcimidi, "Error reading wmm=%p\n", wmm); WARN_(mcimidi)("Error reading wmm=%p\n", wmm);
ret = MCIERR_INVALID_FILE; ret = MCIERR_INVALID_FILE;
} }
@ -224,7 +224,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
DWORD tmp; DWORD tmp;
if (mmioSeek(wmm->hFile, mmt->dwIndex, SEEK_SET) != mmt->dwIndex) { if (mmioSeek(wmm->hFile, mmt->dwIndex, SEEK_SET) != mmt->dwIndex) {
WARN(mcimidi, "Can't seek at %08lX \n", mmt->dwIndex); WARN_(mcimidi)("Can't seek at %08lX \n", mmt->dwIndex);
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
evtLength = MIDI_mciReadVaryLen(wmm, &evtPulse) + 1; /* > 0 */ evtLength = MIDI_mciReadVaryLen(wmm, &evtPulse) + 1; /* > 0 */
@ -241,7 +241,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
evtLength += MIDI_mciReadVaryLen(wmm, &tmp); evtLength += MIDI_mciReadVaryLen(wmm, &tmp);
if (evtLength >= 0x10000u) { if (evtLength >= 0x10000u) {
/* this limitation shouldn't be a problem */ /* this limitation shouldn't be a problem */
WARN(mcimidi, "Ouch !! Implementation limitation to 64k bytes for a MIDI event is overflowed\n"); WARN_(mcimidi)("Ouch !! Implementation limitation to 64k bytes for a MIDI event is overflowed\n");
hw = 0xFFFF; hw = 0xFFFF;
} else { } else {
hw = LOWORD(evtLength); hw = LOWORD(evtLength);
@ -264,7 +264,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
case 4: case 5: case 4: case 5:
break; break;
case 7: case 7:
WARN(mcimidi, "Strange indeed b1=0x%02x\n", b1); WARN_(mcimidi)("Strange indeed b1=0x%02x\n", b1);
} }
break; break;
} }
@ -297,7 +297,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
} }
if (fourcc != mmioFOURCC('M', 'T', 'r', 'k')) { if (fourcc != mmioFOURCC('M', 'T', 'r', 'k')) {
WARN(mcimidi, "Can't synchronize on 'MTrk' !\n"); WARN_(mcimidi)("Can't synchronize on 'MTrk' !\n");
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
@ -317,7 +317,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
} }
mmt->dwLength = mmt->dwEventPulse; mmt->dwLength = mmt->dwEventPulse;
TRACE(mcimidi, "Track %u has %lu bytes and %lu pulses\n", mmt->wTrackNr, toberead, mmt->dwLength); TRACE_(mcimidi)("Track %u has %lu bytes and %lu pulses\n", mmt->wTrackNr, toberead, mmt->dwLength);
/* reset track data */ /* reset track data */
mmt->wStatus = 1; /* ok, playing */ mmt->wStatus = 1; /* ok, playing */
@ -325,7 +325,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
mmt->dwEventPulse = 0; mmt->dwEventPulse = 0;
if (mmioSeek(wmm->hFile, 0, SEEK_CUR) != mmt->dwLast) { if (mmioSeek(wmm->hFile, 0, SEEK_CUR) != mmt->dwLast) {
WARN(mcimidi, "Ouch, out of sync seek=%lu track=%lu\n", WARN_(mcimidi)("Ouch, out of sync seek=%lu track=%lu\n",
mmioSeek(wmm->hFile, 0, SEEK_CUR), mmt->dwLast); mmioSeek(wmm->hFile, 0, SEEK_CUR), mmt->dwLast);
/* position at end of this track, to be ready to read next track */ /* position at end of this track, to be ready to read next track */
mmioSeek(wmm->hFile, mmt->dwLast, SEEK_SET); mmioSeek(wmm->hFile, mmt->dwLast, SEEK_SET);
@ -343,10 +343,10 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
FOURCC fourcc; FOURCC fourcc;
WORD nt; WORD nt;
TRACE(mcimidi, "(%p, %08lX);\n", wmm, dwOffset); TRACE_(mcimidi)("(%p, %08lX);\n", wmm, dwOffset);
if (mmioSeek(wmm->hFile, dwOffset, SEEK_SET) != dwOffset) { if (mmioSeek(wmm->hFile, dwOffset, SEEK_SET) != dwOffset) {
WARN(mcimidi, "Can't seek at %08lX begin of 'MThd' \n", dwOffset); WARN_(mcimidi)("Can't seek at %08lX begin of 'MThd' \n", dwOffset);
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
if (mmioRead(wmm->hFile, (HPSTR)&fourcc, if (mmioRead(wmm->hFile, (HPSTR)&fourcc,
@ -354,7 +354,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
if (fourcc != mmioFOURCC('M', 'T', 'h', 'd')) { if (fourcc != mmioFOURCC('M', 'T', 'h', 'd')) {
WARN(mcimidi, "Can't synchronize on 'MThd' !\n"); WARN_(mcimidi)("Can't synchronize on 'MThd' !\n");
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
@ -367,7 +367,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
TRACE(mcimidi, "toberead=0x%08lX, wFormat=0x%04X nTracks=0x%04X nDivision=0x%04X\n", TRACE_(mcimidi)("toberead=0x%08lX, wFormat=0x%04X nTracks=0x%04X nDivision=0x%04X\n",
toberead, wmm->wFormat, wmm->nTracks, wmm->nDivision); toberead, wmm->wFormat, wmm->nTracks, wmm->nDivision);
/* MS doc says that the MIDI MCI time format must be put by default to the format /* MS doc says that the MIDI MCI time format must be put by default to the format
@ -380,7 +380,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
* I'm just wondering if this is widely used :-). So, if someone has one of * I'm just wondering if this is widely used :-). So, if someone has one of
* these files, I'd like to know about. * these files, I'd like to know about.
*/ */
FIXME(mcimidi, "Handling SMPTE time in MIDI files has not been tested\n" FIXME_(mcimidi)("Handling SMPTE time in MIDI files has not been tested\n"
"Please report to comp.emulators.ms-windows.wine with MIDI file !\n"); "Please report to comp.emulators.ms-windows.wine with MIDI file !\n");
switch (HIBYTE(wmm->nDivision)) { switch (HIBYTE(wmm->nDivision)) {
@ -389,7 +389,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
case 0xE3: wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30DROP; break; /* -29 */ /* is the MCI constant correct ? */ case 0xE3: wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30DROP; break; /* -29 */ /* is the MCI constant correct ? */
case 0xE2: wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30; break; /* -30 */ case 0xE2: wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30; break; /* -30 */
default: default:
WARN(mcimidi, "Unsupported number of frames %d\n", -(char)HIBYTE(wmm->nDivision)); WARN_(mcimidi)("Unsupported number of frames %d\n", -(char)HIBYTE(wmm->nDivision));
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
switch (LOBYTE(wmm->nDivision)) { switch (LOBYTE(wmm->nDivision)) {
@ -399,11 +399,11 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
case 80: /* SMPTE bit resolution */ case 80: /* SMPTE bit resolution */
case 100: case 100:
default: default:
WARN(mcimidi, "Unsupported number of sub-frames %d\n", LOBYTE(wmm->nDivision)); WARN_(mcimidi)("Unsupported number of sub-frames %d\n", LOBYTE(wmm->nDivision));
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
} else if (wmm->nDivision == 0) { } else if (wmm->nDivision == 0) {
WARN(mcimidi, "Number of division is 0, can't support that !!\n"); WARN_(mcimidi)("Number of division is 0, can't support that !!\n");
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} else { } else {
wmm->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS; wmm->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS;
@ -412,7 +412,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
switch (wmm->wFormat) { switch (wmm->wFormat) {
case 0: case 0:
if (wmm->nTracks != 1) { if (wmm->nTracks != 1) {
WARN(mcimidi, "Got type 0 file whose number of track is not 1. Setting it to 1\n"); WARN_(mcimidi)("Got type 0 file whose number of track is not 1. Setting it to 1\n");
wmm->nTracks = 1; wmm->nTracks = 1;
} }
break; break;
@ -420,14 +420,14 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
case 2: case 2:
break; break;
default: default:
WARN(mcimidi, "Handling MIDI files which format = %d is not (yet) supported\n" WARN_(mcimidi)("Handling MIDI files which format = %d is not (yet) supported\n"
"Please report with MIDI file !\n", wmm->wFormat); "Please report with MIDI file !\n", wmm->wFormat);
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
if (wmm->nTracks & 0x8000) { if (wmm->nTracks & 0x8000) {
/* this shouldn't be a problem... */ /* this shouldn't be a problem... */
WARN(mcimidi, "Ouch !! Implementation limitation to 32k tracks per MIDI file is overflowed\n"); WARN_(mcimidi)("Ouch !! Implementation limitation to 32k tracks per MIDI file is overflowed\n");
wmm->nTracks = 0x7FFF; wmm->nTracks = 0x7FFF;
} }
@ -437,14 +437,14 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
toberead -= 3 * sizeof(WORD); toberead -= 3 * sizeof(WORD);
if (toberead > 0) { if (toberead > 0) {
TRACE(mcimidi, "Size of MThd > 6, skipping %ld extra bytes\n", toberead); TRACE_(mcimidi)("Size of MThd > 6, skipping %ld extra bytes\n", toberead);
mmioSeek(wmm->hFile, toberead, SEEK_CUR); mmioSeek(wmm->hFile, toberead, SEEK_CUR);
} }
for (nt = 0; nt < wmm->nTracks; nt++) { for (nt = 0; nt < wmm->nTracks; nt++) {
wmm->tracks[nt].wTrackNr = nt; wmm->tracks[nt].wTrackNr = nt;
if (MIDI_mciReadMTrk(wmm, &wmm->tracks[nt]) != 0) { if (MIDI_mciReadMTrk(wmm, &wmm->tracks[nt]) != 0) {
WARN(mcimidi, "Can't read 'MTrk' header \n"); WARN_(mcimidi)("Can't read 'MTrk' header \n");
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
} }
@ -465,7 +465,7 @@ static DWORD MIDI_ConvertPulseToMS(WINE_MCIMIDI* wmm, DWORD pulse)
* may change during file playing * may change during file playing
*/ */
if (wmm->nDivision == 0) { if (wmm->nDivision == 0) {
FIXME(mcimidi, "Shouldn't happen. wmm->nDivision = 0\n"); FIXME_(mcimidi)("Shouldn't happen. wmm->nDivision = 0\n");
} else if (wmm->nDivision > 0x8000) { /* SMPTE, unchecked FIXME? */ } else if (wmm->nDivision > 0x8000) { /* SMPTE, unchecked FIXME? */
int nf = -(char)HIBYTE(wmm->nDivision); /* number of frames */ int nf = -(char)HIBYTE(wmm->nDivision); /* number of frames */
int nsf = LOBYTE(wmm->nDivision); /* number of sub-frames */ int nsf = LOBYTE(wmm->nDivision); /* number of sub-frames */
@ -514,7 +514,7 @@ static DWORD MIDI_ConvertTimeFormatToMS(WINE_MCIMIDI* wmm, DWORD val)
HIBYTE(LOWORD(val)) * TIME_MS_IN_ONE_MINUTE + LOBYTE(LOWORD(val)) * TIME_MS_IN_ONE_HOUR; HIBYTE(LOWORD(val)) * TIME_MS_IN_ONE_MINUTE + LOBYTE(LOWORD(val)) * TIME_MS_IN_ONE_HOUR;
break; break;
default: default:
WARN(mcimidi, "Bad time format %lu!\n", wmm->dwMciTimeFormat); WARN_(mcimidi)("Bad time format %lu!\n", wmm->dwMciTimeFormat);
} }
/* /*
TRACE(mcimidi, "val=%lu=0x%08lx [tf=%lu] => ret=%lu\n", val, val, wmm->dwMciTimeFormat, ret); TRACE(mcimidi, "val=%lu=0x%08lx [tf=%lu] => ret=%lu\n", val, val, wmm->dwMciTimeFormat, ret);
@ -554,7 +554,7 @@ static DWORD MIDI_ConvertMSToTimeFormat(WINE_MCIMIDI* wmm, DWORD _val)
f = (val * 3) / 100; val -= (f * 100) / 3; f = (val * 3) / 100; val -= (f * 100) / 3;
break; break;
default: default:
FIXME(mcimidi, "There must be some bad bad programmer\n"); FIXME_(mcimidi)("There must be some bad bad programmer\n");
f = 0; f = 0;
} }
/* val contains the number of ms which cannot make a complete frame */ /* val contains the number of ms which cannot make a complete frame */
@ -562,7 +562,7 @@ static DWORD MIDI_ConvertMSToTimeFormat(WINE_MCIMIDI* wmm, DWORD _val)
ret = (f << 24) | (s << 16) | (m << 8) | (h << 0); ret = (f << 24) | (s << 16) | (m << 8) | (h << 0);
break; break;
default: default:
WARN(mcimidi, "Bad time format %lu!\n", wmm->dwMciTimeFormat); WARN_(mcimidi)("Bad time format %lu!\n", wmm->dwMciTimeFormat);
} }
/* /*
TRACE(mcimidi, "val=%lu [tf=%lu] => ret=%lu=0x%08lx\n", _val, wmm->dwMciTimeFormat, ret, ret); TRACE(mcimidi, "val=%lu [tf=%lu] => ret=%lu=0x%08lx\n", _val, wmm->dwMciTimeFormat, ret, ret);
@ -599,7 +599,7 @@ static DWORD MIDI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParm
DWORD dwDeviceID; DWORD dwDeviceID;
WINE_MCIMIDI* wmm = MIDI_drvGetDrv(wDevID); WINE_MCIMIDI* wmm = MIDI_drvGetDrv(wDevID);
TRACE(mcimidi, "(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -618,7 +618,7 @@ static DWORD MIDI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParm
wmm->wMidiID = 0; wmm->wMidiID = 0;
dwDeviceID = lpParms->wDeviceID; dwDeviceID = lpParms->wDeviceID;
TRACE(mcimidi, "wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID); TRACE_(mcimidi)("wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID);
/* lpParms->wDeviceID = wDevID;*/ /* lpParms->wDeviceID = wDevID;*/
if (dwFlags & MCI_OPEN_ELEMENT) { if (dwFlags & MCI_OPEN_ELEMENT) {
@ -626,12 +626,12 @@ static DWORD MIDI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParm
lpstrElementName = lpParms->lpstrElementName; lpstrElementName = lpParms->lpstrElementName;
TRACE(mcimidi, "MCI_OPEN_ELEMENT '%s' !\n", lpstrElementName); TRACE_(mcimidi)("MCI_OPEN_ELEMENT '%s' !\n", lpstrElementName);
if (lpstrElementName && strlen(lpstrElementName) > 0) { if (lpstrElementName && strlen(lpstrElementName) > 0) {
wmm->hFile = mmioOpenA(lpstrElementName, NULL, wmm->hFile = mmioOpenA(lpstrElementName, NULL,
MMIO_ALLOCBUF | MMIO_READWRITE | MMIO_EXCLUSIVE); MMIO_ALLOCBUF | MMIO_READWRITE | MMIO_EXCLUSIVE);
if (wmm->hFile == 0) { if (wmm->hFile == 0) {
WARN(mcimidi, "Can't find file='%s' !\n", lpstrElementName); WARN_(mcimidi)("Can't find file='%s' !\n", lpstrElementName);
wmm->nUseCount--; wmm->nUseCount--;
return MCIERR_FILE_NOT_FOUND; return MCIERR_FILE_NOT_FOUND;
} }
@ -639,7 +639,7 @@ static DWORD MIDI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParm
wmm->hFile = 0; wmm->hFile = 0;
} }
} }
TRACE(mcimidi, "hFile=%u\n", wmm->hFile); TRACE_(mcimidi)("hFile=%u\n", wmm->hFile);
memcpy(&wmm->openParms, lpParms, sizeof(MCI_OPEN_PARMSA)); memcpy(&wmm->openParms, lpParms, sizeof(MCI_OPEN_PARMSA));
@ -658,25 +658,25 @@ static DWORD MIDI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParm
if (mmioDescend(wmm->hFile, &ckMainRIFF, NULL, 0) != 0) { if (mmioDescend(wmm->hFile, &ckMainRIFF, NULL, 0) != 0) {
dwRet = MCIERR_INVALID_FILE; dwRet = MCIERR_INVALID_FILE;
} else { } else {
TRACE(mcimidi,"ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX \n", TRACE_(mcimidi)("ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX \n",
(LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType, ckMainRIFF.cksize); (LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType, ckMainRIFF.cksize);
if (ckMainRIFF.ckid == FOURCC_RIFF && ckMainRIFF.fccType == mmioFOURCC('R', 'M', 'I', 'D')) { if (ckMainRIFF.ckid == FOURCC_RIFF && ckMainRIFF.fccType == mmioFOURCC('R', 'M', 'I', 'D')) {
mmckInfo.ckid = mmioFOURCC('d', 'a', 't', 'a'); mmckInfo.ckid = mmioFOURCC('d', 'a', 't', 'a');
if (mmioDescend(wmm->hFile, &mmckInfo, &ckMainRIFF, MMIO_FINDCHUNK) == 0) { if (mmioDescend(wmm->hFile, &mmckInfo, &ckMainRIFF, MMIO_FINDCHUNK) == 0) {
TRACE(mcimidi, "... is a 'RMID' file \n"); TRACE_(mcimidi)("... is a 'RMID' file \n");
dwOffset = mmckInfo.dwDataOffset; dwOffset = mmckInfo.dwDataOffset;
} else { } else {
dwRet = MCIERR_INVALID_FILE; dwRet = MCIERR_INVALID_FILE;
} }
} }
if (dwRet == 0 && MIDI_mciReadMThd(wmm, dwOffset) != 0) { if (dwRet == 0 && MIDI_mciReadMThd(wmm, dwOffset) != 0) {
WARN(mcimidi, "Can't read 'MThd' header \n"); WARN_(mcimidi)("Can't read 'MThd' header \n");
dwRet = MCIERR_INVALID_FILE; dwRet = MCIERR_INVALID_FILE;
} }
} }
} else { } else {
TRACE(mcimidi, "hFile==0, setting #tracks to 0; is this correct ?\n"); TRACE_(mcimidi)("hFile==0, setting #tracks to 0; is this correct ?\n");
wmm->nTracks = 0; wmm->nTracks = 0;
wmm->wFormat = 0; wmm->wFormat = 0;
wmm->nDivision = 1; wmm->nDivision = 1;
@ -704,15 +704,15 @@ static DWORD MIDI_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
wmm->dwStatus = MCI_MODE_STOP; wmm->dwStatus = MCI_MODE_STOP;
TRACE(mcimidi, "wmm->dwStatus=%d\n", wmm->dwStatus); TRACE_(mcimidi)("wmm->dwStatus=%d\n", wmm->dwStatus);
if (lpParms && (dwFlags & MCI_NOTIFY)) { if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -727,7 +727,7 @@ static DWORD MIDI_mciClose(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
DWORD dwRet; DWORD dwRet;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -741,7 +741,7 @@ static DWORD MIDI_mciClose(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
if (wmm->hFile != 0) { if (wmm->hFile != 0) {
mmioClose(wmm->hFile, 0); mmioClose(wmm->hFile, 0);
wmm->hFile = 0; wmm->hFile = 0;
TRACE(mcimidi, "hFile closed !\n"); TRACE_(mcimidi)("hFile closed !\n");
} }
USER_HEAP_FREE(wmm->hMidiHdr); USER_HEAP_FREE(wmm->hMidiHdr);
free(wmm->tracks); free(wmm->tracks);
@ -752,12 +752,12 @@ static DWORD MIDI_mciClose(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
if (dwRet != MMSYSERR_NOERROR) return MCIERR_INTERNAL; if (dwRet != MMSYSERR_NOERROR) return MCIERR_INTERNAL;
*/ */
} else { } else {
TRACE(mcimidi, "Shouldn't happen... nUseCount=%d\n", wmm->nUseCount); TRACE_(mcimidi)("Shouldn't happen... nUseCount=%d\n", wmm->nUseCount);
return MCIERR_INTERNAL; return MCIERR_INTERNAL;
} }
if (lpParms && (dwFlags & MCI_NOTIFY)) { if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -799,17 +799,17 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
DWORD hiPulse; DWORD hiPulse;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
if (wmm->hFile == 0) { if (wmm->hFile == 0) {
WARN(mcimidi, "Can't play: no file '%s' !\n", wmm->openParms.lpstrElementName); WARN_(mcimidi)("Can't play: no file '%s' !\n", wmm->openParms.lpstrElementName);
return MCIERR_FILE_NOT_FOUND; return MCIERR_FILE_NOT_FOUND;
} }
if (wmm->dwStatus != MCI_MODE_STOP) { if (wmm->dwStatus != MCI_MODE_STOP) {
WARN(mcimidi, "Can't play: device is not stopped !\n"); WARN_(mcimidi)("Can't play: device is not stopped !\n");
return MCIERR_INTERNAL; return MCIERR_INTERNAL;
} }
@ -830,7 +830,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
dwEndMS = 0xFFFFFFFFul; dwEndMS = 0xFFFFFFFFul;
} }
TRACE(mcimidi, "Playing from %lu to %lu\n", dwStartMS, dwEndMS); TRACE_(mcimidi)("Playing from %lu to %lu\n", dwStartMS, dwEndMS);
/* init tracks */ /* init tracks */
for (nt = 0; nt < wmm->nTracks; nt++) { for (nt = 0; nt < wmm->nTracks; nt++) {
@ -860,7 +860,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
doPlay = (wmm->dwPositionMS >= dwStartMS && wmm->dwPositionMS <= dwEndMS); doPlay = (wmm->dwPositionMS >= dwStartMS && wmm->dwPositionMS <= dwEndMS);
TRACE(mcimidi, "wmm->dwStatus=%d, doPlay=%s\n", wmm->dwStatus, doPlay ? "T" : "F"); TRACE_(mcimidi)("wmm->dwStatus=%d, doPlay=%s\n", wmm->dwStatus, doPlay ? "T" : "F");
if ((mmt = MIDI_mciFindNextEvent(wmm, &hiPulse)) == NULL) if ((mmt = MIDI_mciFindNextEvent(wmm, &hiPulse)) == NULL)
break; /* no more event on tracks */ break; /* no more event on tracks */
@ -871,7 +871,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
if (doPlay && !wmm->wStartedPlaying) { if (doPlay && !wmm->wStartedPlaying) {
wmm->dwStartTicks = GetTickCount() - MIDI_ConvertPulseToMS(wmm, wmm->dwPulse); wmm->dwStartTicks = GetTickCount() - MIDI_ConvertPulseToMS(wmm, wmm->dwPulse);
wmm->wStartedPlaying = TRUE; wmm->wStartedPlaying = TRUE;
TRACE(mcimidi, "Setting dwStartTicks to %lu\n", wmm->dwStartTicks); TRACE_(mcimidi)("Setting dwStartTicks to %lu\n", wmm->dwStartTicks);
} }
if (hiPulse > wmm->dwPulse) { if (hiPulse > wmm->dwPulse) {
@ -880,8 +880,8 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
DWORD togo = wmm->dwStartTicks + wmm->dwPositionMS; DWORD togo = wmm->dwStartTicks + wmm->dwPositionMS;
DWORD tc = GetTickCount(); DWORD tc = GetTickCount();
TRACE(mcimidi, "Pulses hi=0x%08lx <> cur=0x%08lx\n", hiPulse, wmm->dwPulse); TRACE_(mcimidi)("Pulses hi=0x%08lx <> cur=0x%08lx\n", hiPulse, wmm->dwPulse);
TRACE(mcimidi, "Wait until %lu => %lu ms\n", TRACE_(mcimidi)("Wait until %lu => %lu ms\n",
tc - wmm->dwStartTicks, togo - wmm->dwStartTicks); tc - wmm->dwStartTicks, togo - wmm->dwStartTicks);
if (tc < togo) if (tc < togo)
Sleep(togo - tc); Sleep(togo - tc);
@ -893,7 +893,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
case 0xF0: case 0xF0:
case 0xF7: /* sysex events */ case 0xF7: /* sysex events */
{ {
FIXME(mcimidi, "Not handling SysEx events (yet)\n"); FIXME_(mcimidi)("Not handling SysEx events (yet)\n");
} }
break; break;
case 0xFF: case 0xFF:
@ -905,7 +905,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
WORD twd; WORD twd;
MIDI_mciReadWord(wmm, &twd); /* == 0 */ MIDI_mciReadWord(wmm, &twd); /* == 0 */
TRACE(mcimidi, "Got sequence number %u\n", twd); TRACE_(mcimidi)("Got sequence number %u\n", twd);
} }
break; break;
case 0x01: /* any text */ case 0x01: /* any text */
@ -923,14 +923,14 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
WORD idx = HIBYTE(LOWORD(mmt->dwEventData)); WORD idx = HIBYTE(LOWORD(mmt->dwEventData));
if (len >= sizeof(buf)) { if (len >= sizeof(buf)) {
WARN(mcimidi, "Buffer for text is too small (%d bytes, when %u are needed)\n", sizeof(buf) - 1, len); WARN_(mcimidi)("Buffer for text is too small (%d bytes, when %u are needed)\n", sizeof(buf) - 1, len);
len = sizeof(buf) - 1; len = sizeof(buf) - 1;
} }
if (mmioRead(wmm->hFile, (HPSTR)buf, len) == len) { if (mmioRead(wmm->hFile, (HPSTR)buf, len) == len) {
buf[len] = 0; /* end string in case */ buf[len] = 0; /* end string in case */
TRACE(mcimidi, "%s => \"%s\"\n", (idx < 8 ) ? info[idx] : "", buf); TRACE_(mcimidi)("%s => \"%s\"\n", (idx < 8 ) ? info[idx] : "", buf);
} else { } else {
WARN(mcimidi, "Couldn't read data for %s\n", (idx < 8 ) ? info[idx] : ""); WARN_(mcimidi)("Couldn't read data for %s\n", (idx < 8 ) ? info[idx] : "");
} }
} }
break; break;
@ -940,7 +940,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
BYTE bt; BYTE bt;
MIDI_mciReadByte(wmm, &bt); /* == 0 */ MIDI_mciReadByte(wmm, &bt); /* == 0 */
FIXME(mcimidi, "NIY: MIDI channel=%u, track=%u\n", bt, mmt->wTrackNr); FIXME_(mcimidi)("NIY: MIDI channel=%u, track=%u\n", bt, mmt->wTrackNr);
} }
break; break;
case 0x21: case 0x21:
@ -949,7 +949,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
BYTE bt; BYTE bt;
MIDI_mciReadByte(wmm, &bt); /* == 0 */ MIDI_mciReadByte(wmm, &bt); /* == 0 */
FIXME(mcimidi, "NIY: MIDI port=%u, track=%u\n", bt, mmt->wTrackNr); FIXME_(mcimidi)("NIY: MIDI port=%u, track=%u\n", bt, mmt->wTrackNr);
} }
break; break;
case 0x2F: /* end of track */ case 0x2F: /* end of track */
@ -960,7 +960,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
* for format 1 MIDI files, this can only be present on track #0 * for format 1 MIDI files, this can only be present on track #0
*/ */
if (mmt->wTrackNr != 0 && wmm->wFormat == 1) { if (mmt->wTrackNr != 0 && wmm->wFormat == 1) {
WARN(mcimidi, "For format #1 MIDI files, tempo can only be changed on track #0 (%u)\n", mmt->wTrackNr); WARN_(mcimidi)("For format #1 MIDI files, tempo can only be changed on track #0 (%u)\n", mmt->wTrackNr);
} else { } else {
BYTE tbt; BYTE tbt;
DWORD value = 0; DWORD value = 0;
@ -968,15 +968,15 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
MIDI_mciReadByte(wmm, &tbt); value = ((DWORD)tbt) << 16; MIDI_mciReadByte(wmm, &tbt); value = ((DWORD)tbt) << 16;
MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 8; MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 8;
MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 0; MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 0;
TRACE(mcimidi, "Setting tempo to %ld (BPM=%ld)\n", wmm->dwTempo, (value) ? (60000000l / value) : 0); TRACE_(mcimidi)("Setting tempo to %ld (BPM=%ld)\n", wmm->dwTempo, (value) ? (60000000l / value) : 0);
wmm->dwTempo = value; wmm->dwTempo = value;
} }
break; break;
case 0x54: /* (hour) (min) (second) (frame) (fractional-frame) - SMPTE track start */ case 0x54: /* (hour) (min) (second) (frame) (fractional-frame) - SMPTE track start */
if (mmt->wTrackNr != 0 && wmm->wFormat == 1) { if (mmt->wTrackNr != 0 && wmm->wFormat == 1) {
WARN(mcimidi, "For format #1 MIDI files, SMPTE track start can only be expressed on track #0 (%u)\n", mmt->wTrackNr); WARN_(mcimidi)("For format #1 MIDI files, SMPTE track start can only be expressed on track #0 (%u)\n", mmt->wTrackNr);
} if (mmt->dwEventPulse != 0) { } if (mmt->dwEventPulse != 0) {
WARN(mcimidi, "SMPTE track start can only be expressed at start of track (%lu)\n", mmt->dwEventPulse); WARN_(mcimidi)("SMPTE track start can only be expressed at start of track (%lu)\n", mmt->dwEventPulse);
} else { } else {
BYTE h, m, s, f, ff; BYTE h, m, s, f, ff;
@ -985,7 +985,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
MIDI_mciReadByte(wmm, &s); MIDI_mciReadByte(wmm, &s);
MIDI_mciReadByte(wmm, &f); MIDI_mciReadByte(wmm, &f);
MIDI_mciReadByte(wmm, &ff); MIDI_mciReadByte(wmm, &ff);
FIXME(mcimidi, "NIY: SMPTE track start %u:%u:%u %u.%u\n", h, m, s, f, ff); FIXME_(mcimidi)("NIY: SMPTE track start %u:%u:%u %u.%u\n", h, m, s, f, ff);
} }
break; break;
case 0x58: /* file rythm */ case 0x58: /* file rythm */
@ -997,7 +997,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
MIDI_mciReadByte(wmm, &cpmc); /* number of MIDI clocks per metronome click */ MIDI_mciReadByte(wmm, &cpmc); /* number of MIDI clocks per metronome click */
MIDI_mciReadByte(wmm, &_32npqn); /* number of notated 32nd notes per MIDI quarter note */ MIDI_mciReadByte(wmm, &_32npqn); /* number of notated 32nd notes per MIDI quarter note */
TRACE(mcimidi, "%u/%u, clock per metronome click=%u, 32nd notes by 1/4 note=%u\n", num, 1 << den, cpmc, _32npqn); TRACE_(mcimidi)("%u/%u, clock per metronome click=%u, 32nd notes by 1/4 note=%u\n", num, 1 << den, cpmc, _32npqn);
} }
break; break;
case 0x59: /* key signature */ case 0x59: /* key signature */
@ -1007,14 +1007,14 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
MIDI_mciReadByte(wmm, &sf); MIDI_mciReadByte(wmm, &sf);
MIDI_mciReadByte(wmm, &mm); MIDI_mciReadByte(wmm, &mm);
if (sf >= 0x80) TRACE(mcimidi, "%d flats\n", -(char)sf); if (sf >= 0x80) TRACE_(mcimidi)("%d flats\n", -(char)sf);
else if (sf > 0) TRACE(mcimidi, "%d sharps\n", (char)sf); else if (sf > 0) TRACE_(mcimidi)("%d sharps\n", (char)sf);
else TRACE(mcimidi, "Key of C\n"); else TRACE_(mcimidi)("Key of C\n");
TRACE(mcimidi, "Mode: %s\n", (mm = 0) ? "major" : "minor"); TRACE_(mcimidi)("Mode: %s\n", (mm = 0) ? "major" : "minor");
} }
break; break;
default: default:
WARN(mcimidi, "Unknown MIDI meta event %02x. Skipping...\n", HIBYTE(LOWORD(mmt->dwEventData))); WARN_(mcimidi)("Unknown MIDI meta event %02x. Skipping...\n", HIBYTE(LOWORD(mmt->dwEventData)));
break; break;
} }
break; break;
@ -1061,7 +1061,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
wmm->dwPositionMS = 0; wmm->dwPositionMS = 0;
if (lpParms && (dwFlags & MCI_NOTIFY)) { if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -1078,23 +1078,23 @@ static DWORD MIDI_mciRecord(UINT16 wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpP
DWORD dwRet; DWORD dwRet;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == 0) return MCIERR_INVALID_DEVICE_ID; if (wmm == 0) return MCIERR_INVALID_DEVICE_ID;
if (wmm->hFile == 0) { if (wmm->hFile == 0) {
WARN(mcimidi, "Can't find file='%08lx' !\n", WARN_(mcimidi)("Can't find file='%08lx' !\n",
(DWORD)wmm->openParms.lpstrElementName); (DWORD)wmm->openParms.lpstrElementName);
return MCIERR_FILE_NOT_FOUND; return MCIERR_FILE_NOT_FOUND;
} }
start = 1; end = 99999; start = 1; end = 99999;
if (lpParms && (dwFlags & MCI_FROM)) { if (lpParms && (dwFlags & MCI_FROM)) {
start = lpParms->dwFrom; start = lpParms->dwFrom;
TRACE(mcimidi, "MCI_FROM=%d \n", start); TRACE_(mcimidi)("MCI_FROM=%d \n", start);
} }
if (lpParms && (dwFlags & MCI_TO)) { if (lpParms && (dwFlags & MCI_TO)) {
end = lpParms->dwTo; end = lpParms->dwTo;
TRACE(mcimidi, "MCI_TO=%d \n", end); TRACE_(mcimidi)("MCI_TO=%d \n", end);
} }
lpMidiHdr = USER_HEAP_LIN_ADDR(wmm->hMidiHdr); lpMidiHdr = USER_HEAP_LIN_ADDR(wmm->hMidiHdr);
lpMidiHdr->lpData = (LPSTR) malloc(1200); lpMidiHdr->lpData = (LPSTR) malloc(1200);
@ -1104,27 +1104,27 @@ static DWORD MIDI_mciRecord(UINT16 wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpP
lpMidiHdr->dwUser = 0L; lpMidiHdr->dwUser = 0L;
lpMidiHdr->dwFlags = 0L; lpMidiHdr->dwFlags = 0L;
dwRet = midMessage(wmm->wMidiID, MIDM_PREPARE, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR16)); dwRet = midMessage(wmm->wMidiID, MIDM_PREPARE, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR16));
TRACE(mcimidi, "After MIDM_PREPARE \n"); TRACE_(mcimidi)("After MIDM_PREPARE \n");
wmm->dwStatus = MCI_MODE_RECORD; wmm->dwStatus = MCI_MODE_RECORD;
while (wmm->dwStatus != MCI_MODE_STOP) { while (wmm->dwStatus != MCI_MODE_STOP) {
TRACE(mcimidi, "wmm->dwStatus=%p %d\n", TRACE_(mcimidi)("wmm->dwStatus=%p %d\n",
&wmm->dwStatus, wmm->dwStatus); &wmm->dwStatus, wmm->dwStatus);
lpMidiHdr->dwBytesRecorded = 0; lpMidiHdr->dwBytesRecorded = 0;
dwRet = midMessage(wmm->wMidiID, MIDM_START, 0, 0L, 0L); dwRet = midMessage(wmm->wMidiID, MIDM_START, 0, 0L, 0L);
TRACE(mcimidi, "After MIDM_START lpMidiHdr=%p dwBytesRecorded=%lu\n", TRACE_(mcimidi)("After MIDM_START lpMidiHdr=%p dwBytesRecorded=%lu\n",
lpMidiHdr, lpMidiHdr->dwBytesRecorded); lpMidiHdr, lpMidiHdr->dwBytesRecorded);
if (lpMidiHdr->dwBytesRecorded == 0) break; if (lpMidiHdr->dwBytesRecorded == 0) break;
} }
TRACE(mcimidi, "Before MIDM_UNPREPARE \n"); TRACE_(mcimidi)("Before MIDM_UNPREPARE \n");
dwRet = midMessage(wmm->wMidiID, MIDM_UNPREPARE, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR16)); dwRet = midMessage(wmm->wMidiID, MIDM_UNPREPARE, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR16));
TRACE(mcimidi, "After MIDM_UNPREPARE \n"); TRACE_(mcimidi)("After MIDM_UNPREPARE \n");
if (lpMidiHdr->lpData != NULL) { if (lpMidiHdr->lpData != NULL) {
free(lpMidiHdr->lpData); free(lpMidiHdr->lpData);
lpMidiHdr->lpData = NULL; lpMidiHdr->lpData = NULL;
} }
wmm->dwStatus = MCI_MODE_STOP; wmm->dwStatus = MCI_MODE_STOP;
if (lpParms && (dwFlags & MCI_NOTIFY)) { if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -1138,7 +1138,7 @@ static DWORD MIDI_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -1151,7 +1151,7 @@ static DWORD MIDI_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
wmm->dwStatus = MCI_MODE_PAUSE; wmm->dwStatus = MCI_MODE_PAUSE;
} }
if (lpParms && (dwFlags & MCI_NOTIFY)) { if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -1166,7 +1166,7 @@ static DWORD MIDI_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lp
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -1175,7 +1175,7 @@ static DWORD MIDI_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lp
wmm->dwStatus = MCI_MODE_PLAY; wmm->dwStatus = MCI_MODE_PLAY;
} }
if (lpParms && (dwFlags & MCI_NOTIFY)) { if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -1189,7 +1189,7 @@ static DWORD MIDI_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -1197,66 +1197,66 @@ static DWORD MIDI_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
if (dwFlags & MCI_SET_TIME_FORMAT) { if (dwFlags & MCI_SET_TIME_FORMAT) {
switch (lpParms->dwTimeFormat) { switch (lpParms->dwTimeFormat) {
case MCI_FORMAT_MILLISECONDS: case MCI_FORMAT_MILLISECONDS:
TRACE(mcimidi, "MCI_FORMAT_MILLISECONDS !\n"); TRACE_(mcimidi)("MCI_FORMAT_MILLISECONDS !\n");
wmm->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS; wmm->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS;
break; break;
case MCI_FORMAT_SMPTE_24: case MCI_FORMAT_SMPTE_24:
TRACE(mcimidi, "MCI_FORMAT_SMPTE_24 !\n"); TRACE_(mcimidi)("MCI_FORMAT_SMPTE_24 !\n");
wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_24; wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_24;
break; break;
case MCI_FORMAT_SMPTE_25: case MCI_FORMAT_SMPTE_25:
TRACE(mcimidi, "MCI_FORMAT_SMPTE_25 !\n"); TRACE_(mcimidi)("MCI_FORMAT_SMPTE_25 !\n");
wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_25; wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_25;
break; break;
case MCI_FORMAT_SMPTE_30: case MCI_FORMAT_SMPTE_30:
TRACE(mcimidi, "MCI_FORMAT_SMPTE_30 !\n"); TRACE_(mcimidi)("MCI_FORMAT_SMPTE_30 !\n");
wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30; wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30;
break; break;
default: default:
WARN(mcimidi, "Bad time format %lu!\n", lpParms->dwTimeFormat); WARN_(mcimidi)("Bad time format %lu!\n", lpParms->dwTimeFormat);
return MCIERR_BAD_TIME_FORMAT; return MCIERR_BAD_TIME_FORMAT;
} }
} }
if (dwFlags & MCI_SET_VIDEO) { if (dwFlags & MCI_SET_VIDEO) {
TRACE(mcimidi, "No support for video !\n"); TRACE_(mcimidi)("No support for video !\n");
return MCIERR_UNSUPPORTED_FUNCTION; return MCIERR_UNSUPPORTED_FUNCTION;
} }
if (dwFlags & MCI_SET_DOOR_OPEN) { if (dwFlags & MCI_SET_DOOR_OPEN) {
TRACE(mcimidi, "No support for door open !\n"); TRACE_(mcimidi)("No support for door open !\n");
return MCIERR_UNSUPPORTED_FUNCTION; return MCIERR_UNSUPPORTED_FUNCTION;
} }
if (dwFlags & MCI_SET_DOOR_CLOSED) { if (dwFlags & MCI_SET_DOOR_CLOSED) {
TRACE(mcimidi, "No support for door close !\n"); TRACE_(mcimidi)("No support for door close !\n");
return MCIERR_UNSUPPORTED_FUNCTION; return MCIERR_UNSUPPORTED_FUNCTION;
} }
if (dwFlags & MCI_SET_AUDIO) { if (dwFlags & MCI_SET_AUDIO) {
if (dwFlags & MCI_SET_ON) { if (dwFlags & MCI_SET_ON) {
TRACE(mcimidi, "MCI_SET_ON audio !\n"); TRACE_(mcimidi)("MCI_SET_ON audio !\n");
} else if (dwFlags & MCI_SET_OFF) { } else if (dwFlags & MCI_SET_OFF) {
TRACE(mcimidi, "MCI_SET_OFF audio !\n"); TRACE_(mcimidi)("MCI_SET_OFF audio !\n");
} else { } else {
WARN(mcimidi, "MCI_SET_AUDIO without SET_ON or SET_OFF\n"); WARN_(mcimidi)("MCI_SET_AUDIO without SET_ON or SET_OFF\n");
return MCIERR_BAD_INTEGER; return MCIERR_BAD_INTEGER;
} }
if (lpParms->dwAudio & MCI_SET_AUDIO_ALL) if (lpParms->dwAudio & MCI_SET_AUDIO_ALL)
TRACE(mcimidi, "MCI_SET_AUDIO_ALL !\n"); TRACE_(mcimidi)("MCI_SET_AUDIO_ALL !\n");
if (lpParms->dwAudio & MCI_SET_AUDIO_LEFT) if (lpParms->dwAudio & MCI_SET_AUDIO_LEFT)
TRACE(mcimidi, "MCI_SET_AUDIO_LEFT !\n"); TRACE_(mcimidi)("MCI_SET_AUDIO_LEFT !\n");
if (lpParms->dwAudio & MCI_SET_AUDIO_RIGHT) if (lpParms->dwAudio & MCI_SET_AUDIO_RIGHT)
TRACE(mcimidi, "MCI_SET_AUDIO_RIGHT !\n"); TRACE_(mcimidi)("MCI_SET_AUDIO_RIGHT !\n");
} }
if (dwFlags & MCI_SEQ_SET_MASTER) if (dwFlags & MCI_SEQ_SET_MASTER)
TRACE(mcimidi, "MCI_SEQ_SET_MASTER !\n"); TRACE_(mcimidi)("MCI_SEQ_SET_MASTER !\n");
if (dwFlags & MCI_SEQ_SET_SLAVE) if (dwFlags & MCI_SEQ_SET_SLAVE)
TRACE(mcimidi, "MCI_SEQ_SET_SLAVE !\n"); TRACE_(mcimidi)("MCI_SEQ_SET_SLAVE !\n");
if (dwFlags & MCI_SEQ_SET_OFFSET) if (dwFlags & MCI_SEQ_SET_OFFSET)
TRACE(mcimidi, "MCI_SEQ_SET_OFFSET !\n"); TRACE_(mcimidi)("MCI_SEQ_SET_OFFSET !\n");
if (dwFlags & MCI_SEQ_SET_PORT) if (dwFlags & MCI_SEQ_SET_PORT)
TRACE(mcimidi, "MCI_SEQ_SET_PORT !\n"); TRACE_(mcimidi)("MCI_SEQ_SET_PORT !\n");
if (dwFlags & MCI_SEQ_SET_TEMPO) if (dwFlags & MCI_SEQ_SET_TEMPO)
TRACE(mcimidi, "MCI_SEQ_SET_TEMPO !\n"); TRACE_(mcimidi)("MCI_SEQ_SET_TEMPO !\n");
return 0; return 0;
} }
@ -1267,7 +1267,7 @@ static DWORD MIDI_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpP
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -1277,7 +1277,7 @@ static DWORD MIDI_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpP
case MCI_STATUS_CURRENT_TRACK: case MCI_STATUS_CURRENT_TRACK:
/* FIXME in Format 2 */ /* FIXME in Format 2 */
lpParms->dwReturn = 1; lpParms->dwReturn = 1;
TRACE(mcimidi, "MCI_STATUS_CURRENT_TRACK => %lu\n", lpParms->dwReturn); TRACE_(mcimidi)("MCI_STATUS_CURRENT_TRACK => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_LENGTH: case MCI_STATUS_LENGTH:
if ((dwFlags & MCI_TRACK) && wmm->wFormat == 2) { if ((dwFlags & MCI_TRACK) && wmm->wFormat == 2) {
@ -1289,79 +1289,79 @@ static DWORD MIDI_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpP
lpParms->dwReturn = MIDI_GetMThdLengthMS(wmm); lpParms->dwReturn = MIDI_GetMThdLengthMS(wmm);
} }
lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn); lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn);
TRACE(mcimidi, "MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn); TRACE_(mcimidi)("MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_MODE: case MCI_STATUS_MODE:
lpParms->dwReturn = wmm->dwStatus; lpParms->dwReturn = wmm->dwStatus;
TRACE(mcimidi, "MCI_STATUS_MODE => %lu\n", lpParms->dwReturn); TRACE_(mcimidi)("MCI_STATUS_MODE => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_MEDIA_PRESENT: case MCI_STATUS_MEDIA_PRESENT:
TRACE(mcimidi, "MCI_STATUS_MEDIA_PRESENT => TRUE\n"); TRACE_(mcimidi)("MCI_STATUS_MEDIA_PRESENT => TRUE\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_STATUS_NUMBER_OF_TRACKS: case MCI_STATUS_NUMBER_OF_TRACKS:
lpParms->dwReturn = (wmm->wFormat == 2) ? wmm->nTracks : 1; lpParms->dwReturn = (wmm->wFormat == 2) ? wmm->nTracks : 1;
TRACE(mcimidi, "MCI_STATUS_NUMBER_OF_TRACKS => %lu\n", lpParms->dwReturn); TRACE_(mcimidi)("MCI_STATUS_NUMBER_OF_TRACKS => %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_POSITION: case MCI_STATUS_POSITION:
/* FIXME: do I need to use MCI_TRACK ? */ /* FIXME: do I need to use MCI_TRACK ? */
lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm,
(dwFlags & MCI_STATUS_START) ? 0 : wmm->dwPositionMS); (dwFlags & MCI_STATUS_START) ? 0 : wmm->dwPositionMS);
TRACE(mcimidi, "MCI_STATUS_POSITION %s => %lu\n", TRACE_(mcimidi)("MCI_STATUS_POSITION %s => %lu\n",
(dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn); (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn);
break; break;
case MCI_STATUS_READY: case MCI_STATUS_READY:
lpParms->dwReturn = (wmm->dwStatus != MCI_MODE_NOT_READY); lpParms->dwReturn = (wmm->dwStatus != MCI_MODE_NOT_READY);
TRACE(mcimidi, "MCI_STATUS_READY = %lu\n", lpParms->dwReturn); TRACE_(mcimidi)("MCI_STATUS_READY = %lu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_TIME_FORMAT: case MCI_STATUS_TIME_FORMAT:
lpParms->dwReturn = wmm->dwMciTimeFormat; lpParms->dwReturn = wmm->dwMciTimeFormat;
TRACE(mcimidi, "MCI_STATUS_TIME_FORMAT => %lu\n", lpParms->dwReturn); TRACE_(mcimidi)("MCI_STATUS_TIME_FORMAT => %lu\n", lpParms->dwReturn);
break; break;
case MCI_SEQ_STATUS_DIVTYPE: case MCI_SEQ_STATUS_DIVTYPE:
TRACE(mcimidi, "MCI_SEQ_STATUS_DIVTYPE !\n"); TRACE_(mcimidi)("MCI_SEQ_STATUS_DIVTYPE !\n");
if (wmm->nDivision > 0x8000) { if (wmm->nDivision > 0x8000) {
switch (wmm->nDivision) { switch (wmm->nDivision) {
case 0xE8: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_24; break; /* -24 */ case 0xE8: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_24; break; /* -24 */
case 0xE7: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_25; break; /* -25 */ case 0xE7: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_25; break; /* -25 */
case 0xE3: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_30DROP; break; /* -29 */ /* is the MCI constant correct ? */ case 0xE3: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_30DROP; break; /* -29 */ /* is the MCI constant correct ? */
case 0xE2: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_30; break; /* -30 */ case 0xE2: lpParms->dwReturn = MCI_SEQ_DIV_SMPTE_30; break; /* -30 */
default: FIXME(mcimidi, "There is a bad bad programmer\n"); default: FIXME_(mcimidi)("There is a bad bad programmer\n");
} }
} else { } else {
lpParms->dwReturn = MCI_SEQ_DIV_PPQN; lpParms->dwReturn = MCI_SEQ_DIV_PPQN;
} }
break; break;
case MCI_SEQ_STATUS_MASTER: case MCI_SEQ_STATUS_MASTER:
TRACE(mcimidi, "MCI_SEQ_STATUS_MASTER !\n"); TRACE_(mcimidi)("MCI_SEQ_STATUS_MASTER !\n");
lpParms->dwReturn = 0; lpParms->dwReturn = 0;
break; break;
case MCI_SEQ_STATUS_SLAVE: case MCI_SEQ_STATUS_SLAVE:
TRACE(mcimidi, "MCI_SEQ_STATUS_SLAVE !\n"); TRACE_(mcimidi)("MCI_SEQ_STATUS_SLAVE !\n");
lpParms->dwReturn = 0; lpParms->dwReturn = 0;
break; break;
case MCI_SEQ_STATUS_OFFSET: case MCI_SEQ_STATUS_OFFSET:
TRACE(mcimidi, "MCI_SEQ_STATUS_OFFSET !\n"); TRACE_(mcimidi)("MCI_SEQ_STATUS_OFFSET !\n");
lpParms->dwReturn = 0; lpParms->dwReturn = 0;
break; break;
case MCI_SEQ_STATUS_PORT: case MCI_SEQ_STATUS_PORT:
TRACE(mcimidi, "MCI_SEQ_STATUS_PORT !\n"); TRACE_(mcimidi)("MCI_SEQ_STATUS_PORT !\n");
lpParms->dwReturn = 0; lpParms->dwReturn = 0;
break; break;
case MCI_SEQ_STATUS_TEMPO: case MCI_SEQ_STATUS_TEMPO:
TRACE(mcimidi, "MCI_SEQ_STATUS_TEMPO !\n"); TRACE_(mcimidi)("MCI_SEQ_STATUS_TEMPO !\n");
lpParms->dwReturn = wmm->dwTempo; lpParms->dwReturn = wmm->dwTempo;
break; break;
default: default:
WARN(mcimidi, "Unknowm command %08lX !\n", lpParms->dwItem); WARN_(mcimidi)("Unknowm command %08lX !\n", lpParms->dwItem);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
} else { } else {
WARN(mcimidi, "No Status-Item!\n"); WARN_(mcimidi)("No Status-Item!\n");
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
if (dwFlags & MCI_NOTIFY) { if (dwFlags & MCI_NOTIFY) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -1376,7 +1376,7 @@ static DWORD MIDI_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
@ -1384,47 +1384,47 @@ static DWORD MIDI_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
if (dwFlags & MCI_GETDEVCAPS_ITEM) { if (dwFlags & MCI_GETDEVCAPS_ITEM) {
switch (lpParms->dwItem) { switch (lpParms->dwItem) {
case MCI_GETDEVCAPS_DEVICE_TYPE: case MCI_GETDEVCAPS_DEVICE_TYPE:
TRACE(mcimidi, "MCI_GETDEVCAPS_DEVICE_TYPE !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_DEVICE_TYPE !\n");
lpParms->dwReturn = MCI_DEVTYPE_SEQUENCER; lpParms->dwReturn = MCI_DEVTYPE_SEQUENCER;
break; break;
case MCI_GETDEVCAPS_HAS_AUDIO: case MCI_GETDEVCAPS_HAS_AUDIO:
TRACE(mcimidi, "MCI_GETDEVCAPS_HAS_AUDIO !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_HAS_AUDIO !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_HAS_VIDEO: case MCI_GETDEVCAPS_HAS_VIDEO:
TRACE(mcimidi, "MCI_GETDEVCAPS_HAS_VIDEO !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_HAS_VIDEO !\n");
lpParms->dwReturn = FALSE; lpParms->dwReturn = FALSE;
break; break;
case MCI_GETDEVCAPS_USES_FILES: case MCI_GETDEVCAPS_USES_FILES:
TRACE(mcimidi, "MCI_GETDEVCAPS_USES_FILES !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_USES_FILES !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_COMPOUND_DEVICE: case MCI_GETDEVCAPS_COMPOUND_DEVICE:
TRACE(mcimidi, "MCI_GETDEVCAPS_COMPOUND_DEVICE !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_COMPOUND_DEVICE !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_CAN_EJECT: case MCI_GETDEVCAPS_CAN_EJECT:
TRACE(mcimidi, "MCI_GETDEVCAPS_CAN_EJECT !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_CAN_EJECT !\n");
lpParms->dwReturn = FALSE; lpParms->dwReturn = FALSE;
break; break;
case MCI_GETDEVCAPS_CAN_PLAY: case MCI_GETDEVCAPS_CAN_PLAY:
TRACE(mcimidi, "MCI_GETDEVCAPS_CAN_PLAY !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_CAN_PLAY !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_CAN_RECORD: case MCI_GETDEVCAPS_CAN_RECORD:
TRACE(mcimidi, "MCI_GETDEVCAPS_CAN_RECORD !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_CAN_RECORD !\n");
lpParms->dwReturn = TRUE; lpParms->dwReturn = TRUE;
break; break;
case MCI_GETDEVCAPS_CAN_SAVE: case MCI_GETDEVCAPS_CAN_SAVE:
TRACE(mcimidi, "MCI_GETDEVCAPS_CAN_SAVE !\n"); TRACE_(mcimidi)("MCI_GETDEVCAPS_CAN_SAVE !\n");
lpParms->dwReturn = FALSE; lpParms->dwReturn = FALSE;
break; break;
default: default:
TRACE(mcimidi, "Unknown capability (%08lx) !\n", lpParms->dwItem); TRACE_(mcimidi)("Unknown capability (%08lx) !\n", lpParms->dwItem);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
} else { } else {
TRACE(mcimidi, "No GetDevCaps-Item !\n"); TRACE_(mcimidi)("No GetDevCaps-Item !\n");
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
return 0; return 0;
@ -1439,14 +1439,14 @@ static DWORD MIDI_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMSA lpParm
LPSTR str = 0; LPSTR str = 0;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL || lpParms->lpstrReturn == NULL) { if (lpParms == NULL || lpParms->lpstrReturn == NULL) {
ret = MCIERR_NULL_PARAMETER_BLOCK; ret = MCIERR_NULL_PARAMETER_BLOCK;
} else if (wmm == NULL) { } else if (wmm == NULL) {
ret = MCIERR_INVALID_DEVICE_ID; ret = MCIERR_INVALID_DEVICE_ID;
} else { } else {
TRACE(mcimidi, "buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize); TRACE_(mcimidi)("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
switch (dwFlags) { switch (dwFlags) {
case MCI_INFO_PRODUCT: case MCI_INFO_PRODUCT:
@ -1463,7 +1463,7 @@ static DWORD MIDI_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMSA lpParm
break; break;
#endif #endif
default: default:
WARN(mcimidi, "Don't know this info command (%lu)\n", dwFlags); WARN_(mcimidi)("Don't know this info command (%lu)\n", dwFlags);
ret = MCIERR_UNRECOGNIZED_COMMAND; ret = MCIERR_UNRECOGNIZED_COMMAND;
} }
} }
@ -1484,7 +1484,7 @@ static DWORD MIDI_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms
DWORD ret = 0; DWORD ret = 0;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE(mcimidi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE_(mcimidi)("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) { if (lpParms == NULL) {
ret = MCIERR_NULL_PARAMETER_BLOCK; ret = MCIERR_NULL_PARAMETER_BLOCK;
@ -1500,14 +1500,14 @@ static DWORD MIDI_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms
} else if (dwFlags & MCI_TO) { } else if (dwFlags & MCI_TO) {
wmm->dwPositionMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwTo); wmm->dwPositionMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwTo);
} else { } else {
WARN(mcimidi, "dwFlag doesn't tell where to seek to...\n"); WARN_(mcimidi)("dwFlag doesn't tell where to seek to...\n");
return MCIERR_MISSING_PARAMETER; return MCIERR_MISSING_PARAMETER;
} }
TRACE(mcimidi, "Seeking to position=%lu ms\n", wmm->dwPositionMS); TRACE_(mcimidi)("Seeking to position=%lu ms\n", wmm->dwPositionMS);
if (dwFlags & MCI_NOTIFY) { if (dwFlags & MCI_NOTIFY) {
TRACE(mcimidi, "MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE_(mcimidi)("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback), mciDriverNotify16((HWND16)LOWORD(lpParms->dwCallback),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL); wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
} }
@ -1580,14 +1580,14 @@ LONG MCIMIDI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
case MCI_CUT: case MCI_CUT:
case MCI_DELETE: case MCI_DELETE:
case MCI_PASTE: case MCI_PASTE:
WARN(mcimidi, "Unsupported command=%s\n", MCI_CommandToString(wMsg)); WARN_(mcimidi)("Unsupported command=%s\n", MCI_CommandToString(wMsg));
break; break;
case MCI_OPEN: case MCI_OPEN:
case MCI_CLOSE: case MCI_CLOSE:
FIXME(mcimidi, "Shouldn't receive a MCI_OPEN or CLOSE message\n"); FIXME_(mcimidi)("Shouldn't receive a MCI_OPEN or CLOSE message\n");
break; break;
default: default:
TRACE(mcimidi, "Sending msg=%s to default driver proc\n", MCI_CommandToString(wMsg)); TRACE_(mcimidi)("Sending msg=%s to default driver proc\n", MCI_CommandToString(wMsg));
return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2); return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
} }
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
#include "mmsystem.h" #include "mmsystem.h"
#include "xmalloc.h" #include "xmalloc.h"
#include "options.h" #include "options.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(mmsys) DECLARE_DEBUG_CHANNEL(mmsys)
DECLARE_DEBUG_CHANNEL(mmtime) DECLARE_DEBUG_CHANNEL(mmtime)
@ -60,10 +60,10 @@ static void TIME_TriggerCallBack(LPTIMERENTRY lpTimer, DWORD dwCurrent)
lpTimer->wCurTime = lpTimer->wDelay; lpTimer->wCurTime = lpTimer->wDelay;
if (lpTimer->lpFunc != (FARPROC16) NULL) { if (lpTimer->lpFunc != (FARPROC16) NULL) {
TRACE(mmtime, "before CallBack16 (%lu)!\n", dwCurrent); TRACE_(mmtime)("before CallBack16 (%lu)!\n", dwCurrent);
TRACE(mmtime, "lpFunc=%p wTimerID=%04X dwUser=%08lX !\n", TRACE_(mmtime)("lpFunc=%p wTimerID=%04X dwUser=%08lX !\n",
lpTimer->lpFunc, lpTimer->wTimerID, lpTimer->dwUser); lpTimer->lpFunc, lpTimer->wTimerID, lpTimer->dwUser);
TRACE(mmtime, "hInstance=%04X !\n", lpTimer->hInstance); TRACE_(mmtime)("hInstance=%04X !\n", lpTimer->hInstance);
/* - TimeProc callback that is called here is something strange, under Windows 3.1x it is called /* - TimeProc callback that is called here is something strange, under Windows 3.1x it is called
@ -87,10 +87,10 @@ static void TIME_TriggerCallBack(LPTIMERENTRY lpTimer, DWORD dwCurrent)
PulseEvent((HANDLE)lpTimer->lpFunc); PulseEvent((HANDLE)lpTimer->lpFunc);
break; break;
default: default:
FIXME(mmtime,"Unknown callback type 0x%04x for mmtime callback (%p),ignored.\n",lpTimer->wFlags,lpTimer->lpFunc); FIXME_(mmtime)("Unknown callback type 0x%04x for mmtime callback (%p),ignored.\n",lpTimer->wFlags,lpTimer->lpFunc);
break; break;
} }
TRACE(mmtime, "after CallBack16 !\n"); TRACE_(mmtime)("after CallBack16 !\n");
} }
if (lpTimer->wFlags & TIME_ONESHOT) if (lpTimer->wFlags & TIME_ONESHOT)
timeKillEvent(lpTimer->wTimerID); timeKillEvent(lpTimer->wTimerID);
@ -146,7 +146,7 @@ static void StartMMTime()
SetTimer( 0, 0, MMSYSTIME_MININTERVAL, TIME_MMSysTimeCallback ); SetTimer( 0, 0, MMSYSTIME_MININTERVAL, TIME_MMSysTimeCallback );
#ifdef USE_FAKE_MM_TIMERS #ifdef USE_FAKE_MM_TIMERS
bUseFakeTimers = PROFILE_GetWineIniBool("options", "MMFakeTimers", TRUE); bUseFakeTimers = PROFILE_GetWineIniBool("options", "MMFakeTimers", TRUE);
TRACE(mmtime, "FakeTimer=%c\n", bUseFakeTimers ? 'Y' : 'N'); TRACE_(mmtime)("FakeTimer=%c\n", bUseFakeTimers ? 'Y' : 'N');
if (bUseFakeTimers) if (bUseFakeTimers)
dwLastCBTick = GetTickCount(); dwLastCBTick = GetTickCount();
#endif #endif
@ -158,7 +158,7 @@ static void StartMMTime()
*/ */
MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize) MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
{ {
TRACE(mmsys, "(%p, %u);\n", lpTime, wSize); TRACE_(mmsys)("(%p, %u);\n", lpTime, wSize);
StartMMTime(); StartMMTime();
lpTime->wType = TIME_MS; lpTime->wType = TIME_MS;
lpTime->u.ms = mmSysTimeMS.u.ms; lpTime->u.ms = mmSysTimeMS.u.ms;
@ -170,7 +170,7 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
*/ */
MMRESULT16 WINAPI timeGetSystemTime16(LPMMTIME16 lpTime, UINT16 wSize) MMRESULT16 WINAPI timeGetSystemTime16(LPMMTIME16 lpTime, UINT16 wSize)
{ {
TRACE(mmsys, "(%p, %u);\n", lpTime, wSize); TRACE_(mmsys)("(%p, %u);\n", lpTime, wSize);
StartMMTime(); StartMMTime();
lpTime->wType = TIME_MS; lpTime->wType = TIME_MS;
lpTime->u.ms = mmSysTimeMS.u.ms; lpTime->u.ms = mmSysTimeMS.u.ms;
@ -185,7 +185,7 @@ static WORD timeSetEventInternal(UINT wDelay,UINT wResol,
LPTIMERENTRY lpNewTimer; LPTIMERENTRY lpNewTimer;
LPTIMERENTRY lpTimer = lpTimerList; LPTIMERENTRY lpTimer = lpTimerList;
TRACE(mmtime, "(%u, %u, %p, %08lX, %04X);\n", TRACE_(mmtime)("(%u, %u, %p, %08lX, %04X);\n",
wDelay, wResol, lpFunc, dwUser, wFlags); wDelay, wResol, lpFunc, dwUser, wFlags);
StartMMTime(); StartMMTime();
lpNewTimer = (LPTIMERENTRY)xmalloc(sizeof(TIMERENTRY)); lpNewTimer = (LPTIMERENTRY)xmalloc(sizeof(TIMERENTRY));
@ -205,8 +205,8 @@ static WORD timeSetEventInternal(UINT wDelay,UINT wResol,
lpNewTimer->lpFunc = lpFunc; lpNewTimer->lpFunc = lpFunc;
lpNewTimer->isWin32 = isWin32; lpNewTimer->isWin32 = isWin32;
lpNewTimer->hInstance = GetTaskDS16(); lpNewTimer->hInstance = GetTaskDS16();
TRACE(mmtime, "hInstance=%04X !\n", lpNewTimer->hInstance); TRACE_(mmtime)("hInstance=%04X !\n", lpNewTimer->hInstance);
TRACE(mmtime, "lpFunc=0x%08lx !\n", (DWORD)lpFunc ); TRACE_(mmtime)("lpFunc=0x%08lx !\n", (DWORD)lpFunc );
lpNewTimer->dwUser = dwUser; lpNewTimer->dwUser = dwUser;
lpNewTimer->wFlags = wFlags; lpNewTimer->wFlags = wFlags;
return lpNewTimer->wTimerID; return lpNewTimer->wTimerID;
@ -266,7 +266,7 @@ MMRESULT16 WINAPI timeKillEvent16(UINT16 wID)
*/ */
MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS lpCaps,UINT wSize) MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS lpCaps,UINT wSize)
{ {
TRACE(mmtime, "(%p, %u) !\n", lpCaps, wSize); TRACE_(mmtime)("(%p, %u) !\n", lpCaps, wSize);
StartMMTime(); StartMMTime();
lpCaps->wPeriodMin = MMSYSTIME_MININTERVAL; lpCaps->wPeriodMin = MMSYSTIME_MININTERVAL;
lpCaps->wPeriodMax = MMSYSTIME_MAXINTERVAL; lpCaps->wPeriodMax = MMSYSTIME_MAXINTERVAL;
@ -278,7 +278,7 @@ MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS lpCaps,UINT wSize)
*/ */
MMRESULT16 WINAPI timeGetDevCaps16(LPTIMECAPS16 lpCaps, UINT16 wSize) MMRESULT16 WINAPI timeGetDevCaps16(LPTIMECAPS16 lpCaps, UINT16 wSize)
{ {
TRACE(mmtime, "(%p, %u) !\n", lpCaps, wSize); TRACE_(mmtime)("(%p, %u) !\n", lpCaps, wSize);
StartMMTime(); StartMMTime();
lpCaps->wPeriodMin = MMSYSTIME_MININTERVAL; lpCaps->wPeriodMin = MMSYSTIME_MININTERVAL;
lpCaps->wPeriodMax = MMSYSTIME_MAXINTERVAL; lpCaps->wPeriodMax = MMSYSTIME_MAXINTERVAL;
@ -290,7 +290,7 @@ MMRESULT16 WINAPI timeGetDevCaps16(LPTIMECAPS16 lpCaps, UINT16 wSize)
*/ */
MMRESULT WINAPI timeBeginPeriod(UINT wPeriod) MMRESULT WINAPI timeBeginPeriod(UINT wPeriod)
{ {
TRACE(mmtime, "(%u) !\n", wPeriod); TRACE_(mmtime)("(%u) !\n", wPeriod);
StartMMTime(); StartMMTime();
if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
return TIMERR_NOCANDO; return TIMERR_NOCANDO;
@ -301,7 +301,7 @@ MMRESULT WINAPI timeBeginPeriod(UINT wPeriod)
*/ */
MMRESULT16 WINAPI timeBeginPeriod16(UINT16 wPeriod) MMRESULT16 WINAPI timeBeginPeriod16(UINT16 wPeriod)
{ {
TRACE(mmtime, "(%u) !\n", wPeriod); TRACE_(mmtime)("(%u) !\n", wPeriod);
StartMMTime(); StartMMTime();
if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
return TIMERR_NOCANDO; return TIMERR_NOCANDO;
@ -313,7 +313,7 @@ MMRESULT16 WINAPI timeBeginPeriod16(UINT16 wPeriod)
*/ */
MMRESULT WINAPI timeEndPeriod(UINT wPeriod) MMRESULT WINAPI timeEndPeriod(UINT wPeriod)
{ {
TRACE(mmtime, "(%u) !\n", wPeriod); TRACE_(mmtime)("(%u) !\n", wPeriod);
StartMMTime(); StartMMTime();
if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
return TIMERR_NOCANDO; return TIMERR_NOCANDO;
@ -325,7 +325,7 @@ MMRESULT WINAPI timeEndPeriod(UINT wPeriod)
*/ */
MMRESULT16 WINAPI timeEndPeriod16(UINT16 wPeriod) MMRESULT16 WINAPI timeEndPeriod16(UINT16 wPeriod)
{ {
TRACE(mmtime, "(%u) !\n", wPeriod); TRACE_(mmtime)("(%u) !\n", wPeriod);
if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
return TIMERR_NOCANDO; return TIMERR_NOCANDO;
return 0; return 0;
@ -346,7 +346,7 @@ DWORD WINAPI timeGetTime()
if (dwNewTick < dwLastCBTick) { if (dwNewTick < dwLastCBTick) {
ERR(mmtime, "dwNewTick(%lu) < dwLastCBTick(%lu)\n", dwNewTick, dwLastCBTick); ERR_(mmtime)("dwNewTick(%lu) < dwLastCBTick(%lu)\n", dwNewTick, dwLastCBTick);
} }
dwDelta = dwNewTick - dwLastCBTick; dwDelta = dwNewTick - dwLastCBTick;
if (dwDelta > MMSYSTIME_MININTERVAL) { if (dwDelta > MMSYSTIME_MININTERVAL) {

View File

@ -16,7 +16,7 @@
#include "global.h" #include "global.h"
#include "sysmetrics.h" #include "sysmetrics.h"
#include "cursoricon.h" #include "cursoricon.h"
#include "debug.h" #include "debugtools.h"
#include "monitor.h" #include "monitor.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
@ -55,7 +55,7 @@ INT BITMAP_GetWidthBytes( INT bmWidth, INT bpp )
return 2 * ((bmWidth+3) >> 2); return 2 * ((bmWidth+3) >> 2);
default: default:
WARN(bitmap,"Unknown depth %d, please report.\n", bpp ); WARN_(bitmap)("Unknown depth %d, please report.\n", bpp );
} }
return -1; return -1;
} }
@ -116,7 +116,7 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
/* Check parameters */ /* Check parameters */
if (!height || !width) return 0; if (!height || !width) return 0;
if (planes != 1) { if (planes != 1) {
FIXME(bitmap, "planes = %d\n", planes); FIXME_(bitmap)("planes = %d\n", planes);
return 0; return 0;
} }
if (height < 0) height = -height; if (height < 0) height = -height;
@ -126,7 +126,7 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
hbitmap = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC ); hbitmap = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC );
if (!hbitmap) return 0; if (!hbitmap) return 0;
TRACE(bitmap, "%dx%d, %d colors returning %08x\n", width, height, TRACE_(bitmap)("%dx%d, %d colors returning %08x\n", width, height,
1 << (planes*bpp), hbitmap); 1 << (planes*bpp), hbitmap);
bmp = (BITMAPOBJ *) GDI_HEAP_LOCK( hbitmap ); bmp = (BITMAPOBJ *) GDI_HEAP_LOCK( hbitmap );
@ -178,17 +178,17 @@ HBITMAP WINAPI CreateCompatibleBitmap( HDC hdc, INT width, INT height)
HBITMAP hbmpRet = 0; HBITMAP hbmpRet = 0;
DC *dc; DC *dc;
TRACE(bitmap, "(%04x,%d,%d) = \n", hdc, width, height ); TRACE_(bitmap)("(%04x,%d,%d) = \n", hdc, width, height );
if (!(dc = DC_GetDCPtr( hdc ))) return 0; if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if ((width >= 0x10000) || (height >= 0x10000)) { if ((width >= 0x10000) || (height >= 0x10000)) {
FIXME(bitmap,"got bad width %d or height %d, please look for reason\n", FIXME_(bitmap)("got bad width %d or height %d, please look for reason\n",
width, height ); width, height );
} else { } else {
hbmpRet = CreateBitmap( width, height, 1, dc->w.bitsPerPixel, NULL ); hbmpRet = CreateBitmap( width, height, 1, dc->w.bitsPerPixel, NULL );
if(dc->funcs->pCreateBitmap) if(dc->funcs->pCreateBitmap)
dc->funcs->pCreateBitmap( hbmpRet ); dc->funcs->pCreateBitmap( hbmpRet );
} }
TRACE(bitmap,"\t\t%04x\n", hbmpRet); TRACE_(bitmap)("\t\t%04x\n", hbmpRet);
GDI_HEAP_UNLOCK(hdc); GDI_HEAP_UNLOCK(hdc);
return hbmpRet; return hbmpRet;
} }
@ -246,7 +246,7 @@ LONG WINAPI GetBitmapBits(
if (!bmp) return 0; if (!bmp) return 0;
if (count < 0) { if (count < 0) {
WARN(bitmap, "(%ld): Negative number of bytes passed???\n", count ); WARN_(bitmap)("(%ld): Negative number of bytes passed???\n", count );
count = -count; count = -count;
} }
@ -256,31 +256,31 @@ LONG WINAPI GetBitmapBits(
count = height * bmp->bitmap.bmWidthBytes; count = height * bmp->bitmap.bmWidthBytes;
if (count == 0) if (count == 0)
{ {
WARN(bitmap, "Less then one entire line requested\n"); WARN_(bitmap)("Less then one entire line requested\n");
GDI_HEAP_UNLOCK( hbitmap ); GDI_HEAP_UNLOCK( hbitmap );
return 0; return 0;
} }
TRACE(bitmap, "(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n", TRACE_(bitmap)("(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n",
hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
1 << bmp->bitmap.bmBitsPixel, height ); 1 << bmp->bitmap.bmBitsPixel, height );
if(bmp->DDBitmap) { if(bmp->DDBitmap) {
TRACE(bitmap, "Calling device specific BitmapBits\n"); TRACE_(bitmap)("Calling device specific BitmapBits\n");
if(bmp->DDBitmap->funcs->pBitmapBits) if(bmp->DDBitmap->funcs->pBitmapBits)
ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, bits, count, ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, bits, count,
DDB_GET); DDB_GET);
else { else {
ERR(bitmap, "BitmapBits == NULL??\n"); ERR_(bitmap)("BitmapBits == NULL??\n");
ret = 0; ret = 0;
} }
} else { } else {
if(!bmp->bitmap.bmBits) { if(!bmp->bitmap.bmBits) {
WARN(bitmap, "Bitmap is empty\n"); WARN_(bitmap)("Bitmap is empty\n");
ret = 0; ret = 0;
} else { } else {
memcpy(bits, bmp->bitmap.bmBits, count); memcpy(bits, bmp->bitmap.bmBits, count);
@ -321,7 +321,7 @@ LONG WINAPI SetBitmapBits(
if (!bmp) return 0; if (!bmp) return 0;
if (count < 0) { if (count < 0) {
WARN(bitmap, "(%ld): Negative number of bytes passed???\n", count ); WARN_(bitmap)("(%ld): Negative number of bytes passed???\n", count );
count = -count; count = -count;
} }
@ -330,18 +330,18 @@ LONG WINAPI SetBitmapBits(
if (height > bmp->bitmap.bmHeight) height = bmp->bitmap.bmHeight; if (height > bmp->bitmap.bmHeight) height = bmp->bitmap.bmHeight;
count = height * bmp->bitmap.bmWidthBytes; count = height * bmp->bitmap.bmWidthBytes;
TRACE(bitmap, "(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n", TRACE_(bitmap)("(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n",
hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
1 << bmp->bitmap.bmBitsPixel, height ); 1 << bmp->bitmap.bmBitsPixel, height );
if(bmp->DDBitmap) { if(bmp->DDBitmap) {
TRACE(bitmap, "Calling device specific BitmapBits\n"); TRACE_(bitmap)("Calling device specific BitmapBits\n");
if(bmp->DDBitmap->funcs->pBitmapBits) if(bmp->DDBitmap->funcs->pBitmapBits)
ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, (void *) bits, ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, (void *) bits,
count, DDB_SET); count, DDB_SET);
else { else {
ERR(bitmap, "BitmapBits == NULL??\n"); ERR_(bitmap)("BitmapBits == NULL??\n");
ret = 0; ret = 0;
} }
@ -350,7 +350,7 @@ LONG WINAPI SetBitmapBits(
if(!bmp->bitmap.bmBits) /* Alloc enough for entire bitmap */ if(!bmp->bitmap.bmBits) /* Alloc enough for entire bitmap */
bmp->bitmap.bmBits = HeapAlloc( GetProcessHeap(), 0, count ); bmp->bitmap.bmBits = HeapAlloc( GetProcessHeap(), 0, count );
if(!bmp->bitmap.bmBits) { if(!bmp->bitmap.bmBits) {
WARN(bitmap, "Unable to allocate bit buffer\n"); WARN_(bitmap)("Unable to allocate bit buffer\n");
ret = 0; ret = 0;
} else { } else {
memcpy(bmp->bitmap.bmBits, bits, count); memcpy(bmp->bitmap.bmBits, bits, count);
@ -415,10 +415,10 @@ HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type,
INT desiredx, INT desiredy, UINT loadflags ) INT desiredx, INT desiredy, UINT loadflags )
{ {
if (HIWORD(name)) { if (HIWORD(name)) {
TRACE(resource,"(0x%04x,%p,%d,%d,%d,0x%08x)\n", TRACE_(resource)("(0x%04x,%p,%d,%d,%d,0x%08x)\n",
hinst,name,type,desiredx,desiredy,loadflags); hinst,name,type,desiredx,desiredy,loadflags);
} else { } else {
TRACE(resource,"(0x%04x,%p,%d,%d,%d,0x%08x)\n", TRACE_(resource)("(0x%04x,%p,%d,%d,%d,0x%08x)\n",
hinst,name,type,desiredx,desiredy,loadflags); hinst,name,type,desiredx,desiredy,loadflags);
} }
if (loadflags & LR_DEFAULTSIZE) { if (loadflags & LR_DEFAULTSIZE) {
@ -673,7 +673,7 @@ INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer )
} }
else else
{ {
FIXME(bitmap, "not implemented for DIBs: count %d\n", count); FIXME_(bitmap)("not implemented for DIBs: count %d\n", count);
return 0; return 0;
} }
} }

View File

@ -7,7 +7,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "dc.h" #include "dc.h"
#include "region.h" #include "region.h"
#include "debug.h" #include "debugtools.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
DECLARE_DEBUG_CHANNEL(clipping) DECLARE_DEBUG_CHANNEL(clipping)
@ -32,7 +32,7 @@ void CLIPPING_UpdateGCRegion( DC * dc )
if (!dc->w.hVisRgn) if (!dc->w.hVisRgn)
{ {
ERR(region, "hVisRgn is zero. Please report this.\n" ); ERR_(region)("hVisRgn is zero. Please report this.\n" );
exit(1); exit(1);
} }
@ -76,7 +76,7 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE( clipping, "%04x %04x %d\n", hdc, hrgn, fnMode ); TRACE_(clipping)("%04x %04x %d\n", hdc, hrgn, fnMode );
if (!hrgn) if (!hrgn)
{ {
@ -88,7 +88,7 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
} }
else else
{ {
FIXME(clipping, "Unimplemented: hrgn NULL in mode: %d\n", fnMode); FIXME_(clipping)("Unimplemented: hrgn NULL in mode: %d\n", fnMode);
return ERROR; return ERROR;
} }
} }
@ -124,7 +124,7 @@ INT16 WINAPI SelectVisRgn16( HDC16 hdc, HRGN16 hrgn )
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc || !hrgn) return ERROR; if (!dc || !hrgn) return ERROR;
TRACE(clipping, "%04x %04x\n", hdc, hrgn ); TRACE_(clipping)("%04x %04x\n", hdc, hrgn );
dc->w.flags &= ~DC_DIRTY; dc->w.flags &= ~DC_DIRTY;
@ -153,7 +153,7 @@ INT WINAPI OffsetClipRgn( HDC hdc, INT x, INT y )
DC *dc = DC_GetDCPtr( hdc ); DC *dc = DC_GetDCPtr( hdc );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE(clipping, "%04x %d,%d\n", hdc, x, y ); TRACE_(clipping)("%04x %d,%d\n", hdc, x, y );
if(dc->funcs->pOffsetClipRgn) if(dc->funcs->pOffsetClipRgn)
ret = dc->funcs->pOffsetClipRgn( dc, x, y ); ret = dc->funcs->pOffsetClipRgn( dc, x, y );
@ -174,7 +174,7 @@ INT16 WINAPI OffsetVisRgn16( HDC16 hdc, INT16 x, INT16 y )
INT16 retval; INT16 retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE(clipping, "%04x %d,%d\n", hdc, x, y ); TRACE_(clipping)("%04x %d,%d\n", hdc, x, y );
retval = OffsetRgn( dc->w.hVisRgn, x, y ); retval = OffsetRgn( dc->w.hVisRgn, x, y );
CLIPPING_UpdateGCRegion( dc ); CLIPPING_UpdateGCRegion( dc );
GDI_HEAP_UNLOCK( hdc ); GDI_HEAP_UNLOCK( hdc );
@ -214,7 +214,7 @@ INT CLIPPING_IntersectClipRect( DC * dc, INT left, INT top,
dc->w.hClipRgn = CreateRectRgn( 0, 0, 0, 0 ); dc->w.hClipRgn = CreateRectRgn( 0, 0, 0, 0 );
CombineRgn( dc->w.hClipRgn, dc->w.hVisRgn, 0, RGN_COPY ); CombineRgn( dc->w.hClipRgn, dc->w.hVisRgn, 0, RGN_COPY );
} }
else WARN(clipping,"No hClipRgn and flags are %x\n",flags); else WARN_(clipping)("No hClipRgn and flags are %x\n",flags);
} }
ret = CombineRgn( newRgn, dc->w.hClipRgn, newRgn, ret = CombineRgn( newRgn, dc->w.hClipRgn, newRgn,
@ -250,7 +250,7 @@ INT WINAPI ExcludeClipRect( HDC hdc, INT left, INT top,
DC *dc = DC_GetDCPtr( hdc ); DC *dc = DC_GetDCPtr( hdc );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE(clipping, "%04x %dx%d,%dx%d\n", TRACE_(clipping)("%04x %dx%d,%dx%d\n",
hdc, left, top, right, bottom ); hdc, left, top, right, bottom );
if(dc->funcs->pExcludeClipRect) if(dc->funcs->pExcludeClipRect)
@ -288,7 +288,7 @@ INT WINAPI IntersectClipRect( HDC hdc, INT left, INT top,
DC *dc = DC_GetDCPtr( hdc ); DC *dc = DC_GetDCPtr( hdc );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE(clipping, "%04x %dx%d,%dx%d\n", TRACE_(clipping)("%04x %dx%d,%dx%d\n",
hdc, left, top, right, bottom ); hdc, left, top, right, bottom );
if(dc->funcs->pIntersectClipRect) if(dc->funcs->pIntersectClipRect)
@ -364,7 +364,7 @@ INT16 WINAPI ExcludeVisRect16( HDC16 hdc, INT16 left, INT16 top,
top = YLPTODP( dc, top ); top = YLPTODP( dc, top );
bottom = YLPTODP( dc, bottom ); bottom = YLPTODP( dc, bottom );
TRACE(clipping, "%04x %dx%d,%dx%d\n", TRACE_(clipping)("%04x %dx%d,%dx%d\n",
hdc, left, top, right, bottom ); hdc, left, top, right, bottom );
return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, TRUE ); return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, TRUE );
@ -385,7 +385,7 @@ INT16 WINAPI IntersectVisRect16( HDC16 hdc, INT16 left, INT16 top,
top = YLPTODP( dc, top ); top = YLPTODP( dc, top );
bottom = YLPTODP( dc, bottom ); bottom = YLPTODP( dc, bottom );
TRACE(clipping, "%04x %dx%d,%dx%d\n", TRACE_(clipping)("%04x %dx%d,%dx%d\n",
hdc, left, top, right, bottom ); hdc, left, top, right, bottom );
return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, FALSE ); return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, FALSE );
@ -409,7 +409,7 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE(clipping, "%04x %d,%d\n", hdc, x, y ); TRACE_(clipping)("%04x %d,%d\n", hdc, x, y );
if (!dc->w.hGCClipRgn) return FALSE; if (!dc->w.hGCClipRgn) return FALSE;
if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc); if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc);
@ -428,7 +428,7 @@ BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect )
RECT16 tmpRect; RECT16 tmpRect;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return FALSE; if (!dc) return FALSE;
TRACE(clipping,"%04x %d,%dx%d,%d\n", TRACE_(clipping)("%04x %d,%dx%d,%d\n",
hdc, rect->left, rect->top, rect->right, rect->bottom ); hdc, rect->left, rect->top, rect->right, rect->bottom );
if (!dc->w.hGCClipRgn) return FALSE; if (!dc->w.hGCClipRgn) return FALSE;
/* copy rectangle to avoid overwriting by LPtoDP */ /* copy rectangle to avoid overwriting by LPtoDP */
@ -461,7 +461,7 @@ INT16 WINAPI GetClipBox16( HDC16 hdc, LPRECT16 rect )
ret = GetRgnBox16( dc->w.hGCClipRgn, rect ); ret = GetRgnBox16( dc->w.hGCClipRgn, rect );
OffsetRect16( rect, -dc->w.DCOrgX, -dc->w.DCOrgY ); OffsetRect16( rect, -dc->w.DCOrgX, -dc->w.DCOrgY );
DPtoLP16( hdc, (LPPOINT16)rect, 2 ); DPtoLP16( hdc, (LPPOINT16)rect, 2 );
TRACE(clipping, "%d,%d-%d,%d\n", TRACE_(clipping)("%d,%d-%d,%d\n",
rect->left,rect->top,rect->right,rect->bottom ); rect->left,rect->top,rect->right,rect->bottom );
return ret; return ret;
} }
@ -515,10 +515,10 @@ HRGN16 WINAPI SaveVisRgn16( HDC16 hdc )
RGNOBJ *obj, *copyObj; RGNOBJ *obj, *copyObj;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0; if (!dc) return 0;
TRACE(clipping, "%04x\n", hdc ); TRACE_(clipping)("%04x\n", hdc );
if (!dc->w.hVisRgn) if (!dc->w.hVisRgn)
{ {
ERR(region, "hVisRgn is zero. Please report this.\n" ); ERR_(region)("hVisRgn is zero. Please report this.\n" );
exit(1); exit(1);
} }
if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc); if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc);
@ -567,7 +567,7 @@ INT16 WINAPI RestoreVisRgn16( HDC16 hdc )
GDI_HEAP_UNLOCK( hdc ); GDI_HEAP_UNLOCK( hdc );
return ERROR; return ERROR;
} }
TRACE(clipping, "%04x\n", hdc ); TRACE_(clipping)("%04x\n", hdc );
if (!(obj = (RGNOBJ *) GDI_GetObjPtr( dc->w.hVisRgn, REGION_MAGIC ))) if (!(obj = (RGNOBJ *) GDI_GetObjPtr( dc->w.hVisRgn, REGION_MAGIC )))
{ {
GDI_HEAP_UNLOCK( hdc ); GDI_HEAP_UNLOCK( hdc );

View File

@ -43,7 +43,7 @@
#include "sysmetrics.h" #include "sysmetrics.h"
#include "global.h" #include "global.h"
#include "module.h" #include "module.h"
#include "debug.h" #include "debugtools.h"
#include "task.h" #include "task.h"
#include "user.h" #include "user.h"
#include "input.h" #include "input.h"
@ -199,7 +199,7 @@ static CURSORICONDIRENTRY *CURSORICON_FindBestIcon( CURSORICONDIR *dir, int widt
if (dir->idCount < 1) if (dir->idCount < 1)
{ {
WARN(icon, "Empty directory!\n" ); WARN_(icon)("Empty directory!\n" );
return NULL; return NULL;
} }
if (dir->idCount == 1) return &dir->idEntries[0]; /* No choice... */ if (dir->idCount == 1) return &dir->idEntries[0]; /* No choice... */
@ -306,7 +306,7 @@ static CURSORICONDIRENTRY *CURSORICON_FindBestCursor( CURSORICONDIR *dir,
if (dir->idCount < 1) if (dir->idCount < 1)
{ {
WARN(cursor, "Empty directory!\n" ); WARN_(cursor)("Empty directory!\n" );
return NULL; return NULL;
} }
if (dir->idCount == 1) return &dir->idEntries[0]; /* No choice... */ if (dir->idCount == 1) return &dir->idEntries[0]; /* No choice... */
@ -366,17 +366,17 @@ BOOL CURSORICON_SimulateLoadingFromResourceW( LPWSTR filename, BOOL fCursor,
*/ */
if ( *(LPDWORD)bits==0x46464952 ) /* "RIFF" */ if ( *(LPDWORD)bits==0x46464952 ) /* "RIFF" */
{ LPBYTE pos = (LPBYTE) bits; { LPBYTE pos = (LPBYTE) bits;
FIXME (cursor,"Animated icons not correctly implemented! %p \n", bits); FIXME_(cursor)("Animated icons not correctly implemented! %p \n", bits);
for (;;) for (;;)
{ if (*(LPDWORD)pos==0x6e6f6369) /* "icon" */ { if (*(LPDWORD)pos==0x6e6f6369) /* "icon" */
{ FIXME (cursor,"icon entry found! %p\n", bits); { FIXME_(cursor)("icon entry found! %p\n", bits);
pos+=4; pos+=4;
if ( !*(LPWORD) pos==0x2fe) /* iconsize */ if ( !*(LPWORD) pos==0x2fe) /* iconsize */
{ goto fail; { goto fail;
} }
bits+=2; bits+=2;
FIXME (cursor,"icon size ok %p \n", bits); FIXME_(cursor)("icon size ok %p \n", bits);
break; break;
} }
pos+=2; pos+=2;
@ -451,12 +451,12 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
BOOL DoStretch; BOOL DoStretch;
INT size; INT size;
TRACE(cursor,"%08x (%u bytes), ver %08x, %ix%i %s %s\n", TRACE_(cursor)("%08x (%u bytes), ver %08x, %ix%i %s %s\n",
(unsigned)bits, cbSize, (unsigned)dwVersion, width, height, (unsigned)bits, cbSize, (unsigned)dwVersion, width, height,
bIcon ? "icon" : "cursor", (loadflags & LR_MONOCHROME) ? "mono" : "" ); bIcon ? "icon" : "cursor", (loadflags & LR_MONOCHROME) ? "mono" : "" );
if (dwVersion == 0x00020000) if (dwVersion == 0x00020000)
{ {
FIXME(cursor,"\t2.xx resources are not supported\n"); FIXME_(cursor)("\t2.xx resources are not supported\n");
return 0; return 0;
} }
@ -481,7 +481,7 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
(bmi->bmiHeader.biSize != sizeof(BITMAPINFOHEADER) || (bmi->bmiHeader.biSize != sizeof(BITMAPINFOHEADER) ||
bmi->bmiHeader.biCompression != BI_RGB) ) bmi->bmiHeader.biCompression != BI_RGB) )
{ {
WARN(cursor,"\tinvalid resource bitmap header.\n"); WARN_(cursor)("\tinvalid resource bitmap header.\n");
return 0; return 0;
} }
@ -581,7 +581,7 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
if( !hXorBits || !hAndBits ) if( !hXorBits || !hAndBits )
{ {
WARN(cursor,"\tunable to create an icon bitmap.\n"); WARN_(cursor)("\tunable to create an icon bitmap.\n");
return 0; return 0;
} }
@ -832,7 +832,7 @@ HCURSOR16 CURSORICON_IconToCursor(HICON16 hIcon, BOOL bSemiTransparent)
CURSORICONINFO cI; CURSORICONINFO cI;
TRACE(icon, "[%04x] %ix%i %ibpp (bogus %ibps)\n", TRACE_(icon)("[%04x] %ix%i %ibpp (bogus %ibps)\n",
hIcon, pIcon->nWidth, pIcon->nHeight, pIcon->bBitsPerPixel, pIcon->nWidthBytes ); hIcon, pIcon->nWidth, pIcon->nHeight, pIcon->bBitsPerPixel, pIcon->nWidthBytes );
xor_width = BITMAP_GetWidthBytes( pIcon->nWidth, bpp ); xor_width = BITMAP_GetWidthBytes( pIcon->nWidth, bpp );
@ -922,7 +922,7 @@ HCURSOR16 WINAPI CreateCursor16( HINSTANCE16 hInstance,
{ {
CURSORICONINFO info; CURSORICONINFO info;
TRACE(cursor, "%dx%d spot=%d,%d xor=%p and=%p\n", TRACE_(cursor)("%dx%d spot=%d,%d xor=%p and=%p\n",
nWidth, nHeight, xHotSpot, yHotSpot, lpXORbits, lpANDbits); nWidth, nHeight, xHotSpot, yHotSpot, lpXORbits, lpANDbits);
info.ptHotSpot.x = xHotSpot; info.ptHotSpot.x = xHotSpot;
@ -947,7 +947,7 @@ HCURSOR WINAPI CreateCursor( HINSTANCE hInstance,
{ {
CURSORICONINFO info; CURSORICONINFO info;
TRACE(cursor, "%dx%d spot=%d,%d xor=%p and=%p\n", TRACE_(cursor)("%dx%d spot=%d,%d xor=%p and=%p\n",
nWidth, nHeight, xHotSpot, yHotSpot, lpXORbits, lpANDbits); nWidth, nHeight, xHotSpot, yHotSpot, lpXORbits, lpANDbits);
info.ptHotSpot.x = xHotSpot; info.ptHotSpot.x = xHotSpot;
@ -971,7 +971,7 @@ HICON16 WINAPI CreateIcon16( HINSTANCE16 hInstance, INT16 nWidth,
{ {
CURSORICONINFO info; CURSORICONINFO info;
TRACE(icon, "%dx%dx%d, xor=%p, and=%p\n", TRACE_(icon)("%dx%dx%d, xor=%p, and=%p\n",
nWidth, nHeight, bPlanes * bBitsPixel, lpXORbits, lpANDbits); nWidth, nHeight, bPlanes * bBitsPixel, lpXORbits, lpANDbits);
info.ptHotSpot.x = 0; info.ptHotSpot.x = 0;
@ -995,7 +995,7 @@ HICON WINAPI CreateIcon( HINSTANCE hInstance, INT nWidth,
{ {
CURSORICONINFO info; CURSORICONINFO info;
TRACE(icon, "%dx%dx%d, xor=%p, and=%p\n", TRACE_(icon)("%dx%dx%d, xor=%p, and=%p\n",
nWidth, nHeight, bPlanes * bBitsPixel, lpXORbits, lpANDbits); nWidth, nHeight, bPlanes * bBitsPixel, lpXORbits, lpANDbits);
info.ptHotSpot.x = 0; info.ptHotSpot.x = 0;
@ -1045,7 +1045,7 @@ HGLOBAL16 WINAPI CreateCursorIconIndirect16( HINSTANCE16 hInstance,
*/ */
HICON16 WINAPI CopyIcon16( HINSTANCE16 hInstance, HICON16 hIcon ) HICON16 WINAPI CopyIcon16( HINSTANCE16 hInstance, HICON16 hIcon )
{ {
TRACE(icon, "%04x %04x\n", hInstance, hIcon ); TRACE_(icon)("%04x %04x\n", hInstance, hIcon );
return CURSORICON_Copy( hInstance, hIcon ); return CURSORICON_Copy( hInstance, hIcon );
} }
@ -1057,7 +1057,7 @@ HICON WINAPI CopyIcon( HICON hIcon )
{ {
HTASK16 hTask = GetCurrentTask (); HTASK16 hTask = GetCurrentTask ();
TDB* pTask = (TDB *) GlobalLock16 (hTask); TDB* pTask = (TDB *) GlobalLock16 (hTask);
TRACE(icon, "%04x\n", hIcon ); TRACE_(icon)("%04x\n", hIcon );
return CURSORICON_Copy( pTask->hInstance, hIcon ); return CURSORICON_Copy( pTask->hInstance, hIcon );
} }
@ -1067,7 +1067,7 @@ HICON WINAPI CopyIcon( HICON hIcon )
*/ */
HCURSOR16 WINAPI CopyCursor16( HINSTANCE16 hInstance, HCURSOR16 hCursor ) HCURSOR16 WINAPI CopyCursor16( HINSTANCE16 hInstance, HCURSOR16 hCursor )
{ {
TRACE(cursor, "%04x %04x\n", hInstance, hCursor ); TRACE_(cursor)("%04x %04x\n", hInstance, hCursor );
return CURSORICON_Copy( hInstance, hCursor ); return CURSORICON_Copy( hInstance, hCursor );
} }
@ -1083,13 +1083,13 @@ WORD WINAPI CURSORICON_Destroy( HGLOBAL16 handle, UINT16 flags )
{ {
WORD retv; WORD retv;
TRACE( icon, "(%04x, %04x)\n", handle, flags ); TRACE_(icon)("(%04x, %04x)\n", handle, flags );
/* Check whether destroying active cursor */ /* Check whether destroying active cursor */
if ( hActiveCursor == handle ) if ( hActiveCursor == handle )
{ {
ERR( cursor, "Destroying active cursor!\n" ); ERR_(cursor)("Destroying active cursor!\n" );
SetCursor( 0 ); SetCursor( 0 );
} }
@ -1230,7 +1230,7 @@ HCURSOR WINAPI SetCursor(
HCURSOR hOldCursor; HCURSOR hOldCursor;
if (hCursor == hActiveCursor) return hActiveCursor; /* No change */ if (hCursor == hActiveCursor) return hActiveCursor; /* No change */
TRACE(cursor, "%04x\n", hCursor ); TRACE_(cursor)("%04x\n", hCursor );
hOldCursor = hActiveCursor; hOldCursor = hActiveCursor;
hActiveCursor = hCursor; hActiveCursor = hCursor;
/* Change the cursor shape only if it is visible */ /* Change the cursor shape only if it is visible */
@ -1276,7 +1276,7 @@ INT16 WINAPI ShowCursor16( BOOL16 bShow )
*/ */
INT WINAPI ShowCursor( BOOL bShow ) INT WINAPI ShowCursor( BOOL bShow )
{ {
TRACE(cursor, "%d, count=%d\n", TRACE_(cursor)("%d, count=%d\n",
bShow, CURSOR_ShowCount ); bShow, CURSOR_ShowCount );
if (bShow) if (bShow)
@ -1363,7 +1363,7 @@ BOOL16 WINAPI GetCursorPos16( POINT16 *pt )
else else
MouseButtonsStates[2] = FALSE; MouseButtonsStates[2] = FALSE;
} }
TRACE(cursor, "ret=%d,%d\n", pt->x, pt->y ); TRACE_(cursor)("ret=%d,%d\n", pt->x, pt->y );
return 1; return 1;
} }
@ -1435,7 +1435,7 @@ INT16 WINAPI LookupIconIdFromDirectoryEx16( LPBYTE xdir, BOOL16 bIcon,
if( entry ) retVal = entry->wResId; if( entry ) retVal = entry->wResId;
} }
else WARN(cursor, "invalid resource directory\n"); else WARN_(cursor)("invalid resource directory\n");
return retVal; return retVal;
} }
@ -1475,7 +1475,7 @@ WORD WINAPI GetIconID16( HGLOBAL16 hResource, DWORD resType )
{ {
LPBYTE lpDir = (LPBYTE)GlobalLock16(hResource); LPBYTE lpDir = (LPBYTE)GlobalLock16(hResource);
TRACE(cursor, "hRes=%04x, entries=%i\n", TRACE_(cursor)("hRes=%04x, entries=%i\n",
hResource, lpDir ? ((CURSORICONDIR*)lpDir)->idCount : 0); hResource, lpDir ? ((CURSORICONDIR*)lpDir)->idCount : 0);
switch(resType) switch(resType)
@ -1487,7 +1487,7 @@ WORD WINAPI GetIconID16( HGLOBAL16 hResource, DWORD resType )
return (WORD)LookupIconIdFromDirectoryEx16( lpDir, TRUE, return (WORD)LookupIconIdFromDirectoryEx16( lpDir, TRUE,
SYSMETRICS_CXICON, SYSMETRICS_CYICON, 0 ); SYSMETRICS_CXICON, SYSMETRICS_CYICON, 0 );
default: default:
WARN(cursor, "invalid res type %ld\n", resType ); WARN_(cursor)("invalid res type %ld\n", resType );
} }
return 0; return 0;
} }
@ -1499,7 +1499,7 @@ WORD WINAPI GetIconID16( HGLOBAL16 hResource, DWORD resType )
*/ */
HGLOBAL16 WINAPI LoadCursorIconHandler16( HGLOBAL16 hResource, HMODULE16 hModule, HRSRC16 hRsrc ) HGLOBAL16 WINAPI LoadCursorIconHandler16( HGLOBAL16 hResource, HMODULE16 hModule, HRSRC16 hRsrc )
{ {
FIXME(cursor,"(%04x,%04x,%04x): old 2.x resources are not supported!\n", FIXME_(cursor)("(%04x,%04x,%04x): old 2.x resources are not supported!\n",
hResource, hModule, hRsrc); hResource, hModule, hRsrc);
return (HGLOBAL16)0; return (HGLOBAL16)0;
} }
@ -1554,7 +1554,7 @@ HICON16 WINAPI LoadIconHandler16( HGLOBAL16 hResource, BOOL16 bNew )
{ {
LPBYTE bits = (LPBYTE)LockResource16( hResource ); LPBYTE bits = (LPBYTE)LockResource16( hResource );
TRACE(cursor,"hRes=%04x\n",hResource); TRACE_(cursor)("hRes=%04x\n",hResource);
return CURSORICON_CreateFromResource( 0, 0, bits, 0, TRUE, return CURSORICON_CreateFromResource( 0, 0, bits, 0, TRUE,
bNew ? 0x00030000 : 0x00020000, 0, 0, LR_DEFAULTCOLOR ); bNew ? 0x00030000 : 0x00020000, 0, 0, LR_DEFAULTCOLOR );
@ -1741,9 +1741,9 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
if (!ptr) return FALSE; if (!ptr) return FALSE;
if (istep) if (istep)
FIXME(icon, "Ignoring istep=%d\n", istep); FIXME_(icon)("Ignoring istep=%d\n", istep);
if (flags & DI_COMPAT) if (flags & DI_COMPAT)
FIXME(icon, "Ignoring flag DI_COMPAT\n"); FIXME_(icon)("Ignoring flag DI_COMPAT\n");
/* Calculate the size of the destination image. */ /* Calculate the size of the destination image. */
if (cxWidth == 0) if (cxWidth == 0)

View File

@ -12,7 +12,7 @@
#include "heap.h" #include "heap.h"
#include "metafile.h" #include "metafile.h"
#include "options.h" #include "options.h"
#include "debug.h" #include "debugtools.h"
#include "winerror.h" #include "winerror.h"
#include "dc.h" #include "dc.h"
@ -271,7 +271,7 @@ HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *font )
fontPtr = (FONTOBJ *) GDI_HEAP_LOCK( hFont ); fontPtr = (FONTOBJ *) GDI_HEAP_LOCK( hFont );
memcpy( &fontPtr->logfont, font, sizeof(LOGFONT16) ); memcpy( &fontPtr->logfont, font, sizeof(LOGFONT16) );
TRACE(font,"(%i %i %i %i) '%s' %s %s => %04x\n", TRACE_(font)("(%i %i %i %i) '%s' %s %s => %04x\n",
font->lfHeight, font->lfWidth, font->lfHeight, font->lfWidth,
font->lfEscapement, font->lfOrientation, font->lfEscapement, font->lfOrientation,
font->lfFaceName ? font->lfFaceName : "NULL", font->lfFaceName ? font->lfFaceName : "NULL",
@ -282,14 +282,14 @@ HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *font )
if (font->lfEscapement != font->lfOrientation) { if (font->lfEscapement != font->lfOrientation) {
/* this should really depend on whether GM_ADVANCED is set */ /* this should really depend on whether GM_ADVANCED is set */
fontPtr->logfont.lfOrientation = fontPtr->logfont.lfEscapement; fontPtr->logfont.lfOrientation = fontPtr->logfont.lfEscapement;
WARN(font, WARN_(font)(
"orientation angle %f set to escapement angle %f for new font %04x\n", "orientation angle %f set to escapement angle %f for new font %04x\n",
font->lfOrientation/10., font->lfEscapement/10., hFont); font->lfOrientation/10., font->lfEscapement/10., hFont);
} }
GDI_HEAP_UNLOCK( hFont ); GDI_HEAP_UNLOCK( hFont );
} }
} }
else WARN(font,"(NULL) => NULL\n"); else WARN_(font)("(NULL) => NULL\n");
return hFont; return hFont;
} }
@ -327,7 +327,7 @@ HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
{ {
LOGFONT16 logfont; LOGFONT16 logfont;
TRACE(font,"('%s',%d,%d)\n", TRACE_(font)("('%s',%d,%d)\n",
(name ? name : "(null)") , height, width); (name ? name : "(null)") , height, width);
logfont.lfHeight = height; logfont.lfHeight = height;
@ -825,7 +825,7 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
!dc->funcs->pGetTextExtentPoint( dc, str, count, size )) !dc->funcs->pGetTextExtentPoint( dc, str, count, size ))
return FALSE; return FALSE;
TRACE(font,"(%08x %s %d %p): returning %d,%d\n", TRACE_(font)("(%08x %s %d %p): returning %d,%d\n",
hdc, debugstr_an (str, count), count, hdc, debugstr_an (str, count), count,
size, size->cx, size->cy ); size, size->cx, size->cy );
return TRUE; return TRUE;
@ -860,7 +860,7 @@ BOOL WINAPI GetTextExtentPoint32W(
BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count, BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count,
LPSIZE size ) LPSIZE size )
{ {
TRACE(font, "not bug compatible.\n"); TRACE_(font)("not bug compatible.\n");
return GetTextExtentPoint32A( hdc, str, count, size ); return GetTextExtentPoint32A( hdc, str, count, size );
} }
@ -870,7 +870,7 @@ BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count,
BOOL WINAPI GetTextExtentPointW( HDC hdc, LPCWSTR str, INT count, BOOL WINAPI GetTextExtentPointW( HDC hdc, LPCWSTR str, INT count,
LPSIZE size ) LPSIZE size )
{ {
TRACE(font, "not bug compatible.\n"); TRACE_(font)("not bug compatible.\n");
return GetTextExtentPoint32W( hdc, str, count, size ); return GetTextExtentPoint32W( hdc, str, count, size );
} }
@ -910,7 +910,7 @@ BOOL WINAPI GetTextExtentExPointA( HDC hdc, LPCSTR str, INT count,
size->cx = extent; size->cx = extent;
*lpnFit = nFit; *lpnFit = nFit;
TRACE(font,"(%08x '%.*s' %d) returning %d %d %d\n", TRACE_(font)("(%08x '%.*s' %d) returning %d %d %d\n",
hdc,count,str,maxExt,nFit, size->cx,size->cy); hdc,count,str,maxExt,nFit, size->cx,size->cy);
return TRUE; return TRUE;
} }
@ -979,7 +979,7 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
metrics->tmMaxCharWidth = WDPTOLP(metrics->tmMaxCharWidth); metrics->tmMaxCharWidth = WDPTOLP(metrics->tmMaxCharWidth);
metrics->tmOverhang = WDPTOLP(metrics->tmOverhang); metrics->tmOverhang = WDPTOLP(metrics->tmOverhang);
TRACE(font, "text metrics:\n" TRACE_(font)("text metrics:\n"
" Weight = %03i\t FirstChar = %03i\t AveCharWidth = %i\n" " Weight = %03i\t FirstChar = %03i\t AveCharWidth = %i\n"
" Italic = % 3i\t LastChar = %03i\t\t MaxCharWidth = %i\n" " Italic = % 3i\t LastChar = %03i\t\t MaxCharWidth = %i\n"
" UnderLined = %01i\t DefaultChar = %03i\t Overhang = %i\n" " UnderLined = %01i\t DefaultChar = %03i\t Overhang = %i\n"
@ -1030,7 +1030,7 @@ UINT16 WINAPI GetOutlineTextMetrics16(
UINT16 cbData, /* [in] Size of metric data array */ UINT16 cbData, /* [in] Size of metric data array */
LPOUTLINETEXTMETRIC16 lpOTM) /* [out] Address of metric data array */ LPOUTLINETEXTMETRIC16 lpOTM) /* [out] Address of metric data array */
{ {
FIXME(font, "(%04x,%04x,%p): stub\n", hdc,cbData,lpOTM); FIXME_(font)("(%04x,%04x,%p): stub\n", hdc,cbData,lpOTM);
return 0; return 0;
} }
@ -1113,7 +1113,7 @@ UINT WINAPI GetOutlineTextMetricsW(
UINT cbData, /* [in] Size of metric data array */ UINT cbData, /* [in] Size of metric data array */
LPOUTLINETEXTMETRICW lpOTM) /* [out] Address of metric data array */ LPOUTLINETEXTMETRICW lpOTM) /* [out] Address of metric data array */
{ {
FIXME(font, "(%d,%d,%p): stub\n", hdc, cbData, lpOTM); FIXME_(font)("(%d,%d,%p): stub\n", hdc, cbData, lpOTM);
return 0; return 0;
} }
@ -1214,7 +1214,7 @@ DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
if(dc->funcs->pSetMapperFlags) if(dc->funcs->pSetMapperFlags)
ret = dc->funcs->pSetMapperFlags( dc, dwFlag ); ret = dc->funcs->pSetMapperFlags( dc, dwFlag );
else else
FIXME(font, "(0x%04x, 0x%08lx): stub - harmless\n", hDC, dwFlag); FIXME_(font)("(0x%04x, 0x%08lx): stub - harmless\n", hDC, dwFlag);
GDI_HEAP_UNLOCK( hDC ); GDI_HEAP_UNLOCK( hDC );
return ret; return ret;
} }
@ -1224,7 +1224,7 @@ DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
*/ */
BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio ) BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio )
{ {
FIXME(font, "(%04x, %p): -- Empty Stub !\n", FIXME_(font)("(%04x, %p): -- Empty Stub !\n",
hdc, pAspectRatio); hdc, pAspectRatio);
return FALSE; return FALSE;
} }
@ -1234,7 +1234,7 @@ BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio )
*/ */
BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, LPSIZE pAspectRatio ) BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, LPSIZE pAspectRatio )
{ {
FIXME(font, "(%04x, %p): -- Empty Stub !\n", FIXME_(font)("(%04x, %p): -- Empty Stub !\n",
hdc, pAspectRatio); hdc, pAspectRatio);
return FALSE; return FALSE;
} }
@ -1284,7 +1284,7 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
LPABC abc ) LPABC abc )
{ {
/* No TrueType fonts in Wine so far */ /* No TrueType fonts in Wine so far */
FIXME(font, "(%04x,%04x,%04x,%p): stub\n", hdc, firstChar, lastChar, abc); FIXME_(font)("(%04x,%04x,%04x,%p): stub\n", hdc, firstChar, lastChar, abc);
return FALSE; return FALSE;
} }
@ -1296,7 +1296,7 @@ DWORD WINAPI GetGlyphOutline16( HDC16 hdc, UINT16 uChar, UINT16 fuFormat,
LPGLYPHMETRICS16 lpgm, DWORD cbBuffer, LPGLYPHMETRICS16 lpgm, DWORD cbBuffer,
LPVOID lpBuffer, const MAT2 *lpmat2 ) LPVOID lpBuffer, const MAT2 *lpmat2 )
{ {
FIXME(font,"(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n", FIXME_(font)("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
return (DWORD)-1; /* failure */ return (DWORD)-1; /* failure */
} }
@ -1309,7 +1309,7 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
LPGLYPHMETRICS lpgm, DWORD cbBuffer, LPGLYPHMETRICS lpgm, DWORD cbBuffer,
LPVOID lpBuffer, const MAT2 *lpmat2 ) LPVOID lpBuffer, const MAT2 *lpmat2 )
{ {
FIXME(font,"(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n", FIXME_(font)("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
return (DWORD)-1; /* failure */ return (DWORD)-1; /* failure */
} }
@ -1321,7 +1321,7 @@ DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT uChar, UINT fuFormat,
LPGLYPHMETRICS lpgm, DWORD cbBuffer, LPGLYPHMETRICS lpgm, DWORD cbBuffer,
LPVOID lpBuffer, const MAT2 *lpmat2 ) LPVOID lpBuffer, const MAT2 *lpmat2 )
{ {
FIXME(font,"(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n", FIXME_(font)("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
return (DWORD)-1; /* failure */ return (DWORD)-1; /* failure */
} }
@ -1349,7 +1349,7 @@ BOOL WINAPI CreateScalableFontResourceA( DWORD fHidden,
* enumbered with EnumFonts/EnumFontFamilies * enumbered with EnumFonts/EnumFontFamilies
* lpszCurrentPath can be NULL * lpszCurrentPath can be NULL
*/ */
FIXME(font,"(%ld,%s,%s,%s): stub\n", FIXME_(font)("(%ld,%s,%s,%s): stub\n",
fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath ); fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath );
return FALSE; /* create failed */ return FALSE; /* create failed */
} }
@ -1362,7 +1362,7 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD fHidden,
LPCWSTR lpszFontFile, LPCWSTR lpszFontFile,
LPCWSTR lpszCurrentPath ) LPCWSTR lpszCurrentPath )
{ {
FIXME(font,"(%ld,%p,%p,%p): stub\n", FIXME_(font)("(%ld,%p,%p,%p): stub\n",
fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath ); fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath );
return FALSE; /* create failed */ return FALSE; /* create failed */
} }
@ -1397,7 +1397,7 @@ INT16 WINAPI GetKerningPairs16( HDC16 hDC, INT16 cPairs,
{ {
/* At this time kerning is ignored (set to 0) */ /* At this time kerning is ignored (set to 0) */
int i; int i;
FIXME(font,"(%x,%d,%p): almost empty stub!\n", FIXME_(font)("(%x,%d,%p): almost empty stub!\n",
hDC, cPairs, lpKerningPairs); hDC, cPairs, lpKerningPairs);
for (i = 0; i < cPairs; i++) for (i = 0; i < cPairs; i++)
lpKerningPairs[i].iKernAmount = 0; lpKerningPairs[i].iKernAmount = 0;
@ -1413,7 +1413,7 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
LPKERNINGPAIR lpKerningPairs ) LPKERNINGPAIR lpKerningPairs )
{ {
int i; int i;
FIXME(font,"(%x,%ld,%p): almost empty stub!\n", FIXME_(font)("(%x,%ld,%p): almost empty stub!\n",
hDC, cPairs, lpKerningPairs); hDC, cPairs, lpKerningPairs);
for (i = 0; i < cPairs; i++) for (i = 0; i < cPairs; i++)
lpKerningPairs[i].iKernAmount = 0; lpKerningPairs[i].iKernAmount = 0;
@ -1478,7 +1478,7 @@ BOOL WINAPI TranslateCharsetInfo(
*/ */
DWORD WINAPI GetFontLanguageInfo(HDC hdc) { DWORD WINAPI GetFontLanguageInfo(HDC hdc) {
/* return value 0 is correct for most cases anyway */ /* return value 0 is correct for most cases anyway */
FIXME(font,"(%x):stub!\n", hdc); FIXME_(font)("(%x):stub!\n", hdc);
return 0; return 0;
} }
@ -1487,7 +1487,7 @@ DWORD WINAPI GetFontLanguageInfo(HDC hdc) {
*/ */
DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) { DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
/* return value 0 is correct for most cases anyway */ /* return value 0 is correct for most cases anyway */
FIXME(font,"(%x):stub!\n",hdc); FIXME_(font)("(%x):stub!\n",hdc);
return 0; return 0;
} }
@ -1510,7 +1510,7 @@ DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset, DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset,
LPVOID buffer, DWORD length) LPVOID buffer, DWORD length)
{ {
FIXME(font, "(%x,%ld,%ld,%p,%ld): stub\n", FIXME_(font)("(%x,%ld,%ld,%p,%ld): stub\n",
hdc, table, offset, buffer, length); hdc, table, offset, buffer, length);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return GDI_ERROR; return GDI_ERROR;
@ -1525,7 +1525,7 @@ GetCharacterPlacementA(HDC hdc, LPCSTR lpString, INT uCount,
DWORD dwFlags) DWORD dwFlags)
{ {
/* return value 0 is correct for most cases anyway */ /* return value 0 is correct for most cases anyway */
FIXME(font,":stub!\n"); FIXME_(font)(":stub!\n");
return 0; return 0;
} }
@ -1538,7 +1538,7 @@ GetCharacterPlacementW(HDC hdc, LPCWSTR lpString, INT uCount,
DWORD dwFlags) DWORD dwFlags)
{ {
/* return value 0 is correct for most cases anyway */ /* return value 0 is correct for most cases anyway */
FIXME(font,":stub!\n"); FIXME_(font)(":stub!\n");
return 0; return 0;
} }
@ -1548,7 +1548,7 @@ GetCharacterPlacementW(HDC hdc, LPCWSTR lpString, INT uCount,
BOOL WINAPI GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar, BOOL WINAPI GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar,
LPABCFLOAT lpABCF) LPABCFLOAT lpABCF)
{ {
FIXME(gdi, "GetCharABCWidthsFloatA, stub\n"); FIXME_(gdi)("GetCharABCWidthsFloatA, stub\n");
return 0; return 0;
} }
@ -1558,7 +1558,7 @@ BOOL WINAPI GetCharABCWidthsFloatA(HDC hdc, UINT iFirstChar, UINT iLastChar,
BOOL WINAPI GetCharABCWidthsFloatW(HDC hdc, UINT iFirstChar, BOOL WINAPI GetCharABCWidthsFloatW(HDC hdc, UINT iFirstChar,
UINT iLastChar, LPABCFLOAT lpABCF) UINT iLastChar, LPABCFLOAT lpABCF)
{ {
FIXME(gdi, "GetCharABCWidthsFloatW, stub\n"); FIXME_(gdi)("GetCharABCWidthsFloatW, stub\n");
return 0; return 0;
} }
@ -1568,7 +1568,7 @@ BOOL WINAPI GetCharABCWidthsFloatW(HDC hdc, UINT iFirstChar,
BOOL WINAPI GetCharWidthFloatA(HDC hdc, UINT iFirstChar, BOOL WINAPI GetCharWidthFloatA(HDC hdc, UINT iFirstChar,
UINT iLastChar, PFLOAT pxBuffer) UINT iLastChar, PFLOAT pxBuffer)
{ {
FIXME(gdi, "GetCharWidthFloatA, stub\n"); FIXME_(gdi)("GetCharWidthFloatA, stub\n");
return 0; return 0;
} }
@ -1578,7 +1578,7 @@ BOOL WINAPI GetCharWidthFloatA(HDC hdc, UINT iFirstChar,
BOOL WINAPI GetCharWidthFloatW(HDC hdc, UINT iFirstChar, BOOL WINAPI GetCharWidthFloatW(HDC hdc, UINT iFirstChar,
UINT iLastChar, PFLOAT pxBuffer) UINT iLastChar, PFLOAT pxBuffer)
{ {
FIXME(gdi, "GetCharWidthFloatW, stub\n"); FIXME_(gdi)("GetCharWidthFloatW, stub\n");
return 0; return 0;
} }

View File

@ -14,7 +14,7 @@
#include "winnls.h" #include "winnls.h"
#include "winreg.h" #include "winreg.h"
#include "winerror.h" #include "winerror.h"
#include "debug.h" #include "debugtools.h"
#include "main.h" #include "main.h"
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
@ -686,7 +686,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
int found,i; int found,i;
int lang=0; int lang=0;
TRACE(ole,"(lcid=0x%lx,lctype=0x%lx,%p,%x)\n",lcid,LCType,buf,len); TRACE_(ole)("(lcid=0x%lx,lctype=0x%lx,%p,%x)\n",lcid,LCType,buf,len);
if (len && (! buf) ) { if (len && (! buf) ) {
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
@ -718,7 +718,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
i++; i++;
} }
if (!retString) { if (!retString) {
FIXME(ole,"Unkown LC type %lX\n",LCType); FIXME_(ole)("Unkown LC type %lX\n",LCType);
return 0; return 0;
} }
@ -748,7 +748,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
} }
if(!found) { if(!found) {
ERR(ole,"'%s' not supported for your language (%04X).\n", ERR_(ole)("'%s' not supported for your language (%04X).\n",
retString,(WORD)lcid); retString,(WORD)lcid);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
@ -796,7 +796,7 @@ INT WINAPI GetLocaleInfoW(LCID lcid,LCTYPE LCType,LPWSTR wbuf,INT len)
*/ */
BOOL16 WINAPI SetLocaleInfoA(DWORD lcid, DWORD lctype, LPCSTR data) BOOL16 WINAPI SetLocaleInfoA(DWORD lcid, DWORD lctype, LPCSTR data)
{ {
FIXME(ole,"(%ld,%ld,%s): stub\n",lcid,lctype,data); FIXME_(ole)("(%ld,%ld,%s): stub\n",lcid,lctype,data);
return TRUE; return TRUE;
} }
@ -820,7 +820,7 @@ BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum,
WCHAR buffer[200]; WCHAR buffer[200];
HKEY xhkey; HKEY xhkey;
TRACE(win32,"(%p,%08lx)\n",lpfnLocaleEnum,flags ); TRACE_(win32)("(%p,%08lx)\n",lpfnLocaleEnum,flags );
/* see if we can reuse the Win95 registry entries.... */ /* see if we can reuse the Win95 registry entries.... */
if (ERROR_SUCCESS==RegOpenKeyA(HKEY_LOCAL_MACHINE,"System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) { if (ERROR_SUCCESS==RegOpenKeyA(HKEY_LOCAL_MACHINE,"System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) {
i=0; i=0;
@ -862,7 +862,7 @@ BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpfnLocaleEnum,
CHAR buffer[200]; CHAR buffer[200];
HKEY xhkey; HKEY xhkey;
TRACE(win32,"(%p,%08lx)\n", TRACE_(win32)("(%p,%08lx)\n",
lpfnLocaleEnum,flags lpfnLocaleEnum,flags
); );
if (ERROR_SUCCESS==RegOpenKeyA(HKEY_LOCAL_MACHINE,"System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) { if (ERROR_SUCCESS==RegOpenKeyA(HKEY_LOCAL_MACHINE,"System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) {
@ -1475,7 +1475,7 @@ BOOL WINAPI GetStringTypeExA(LCID locale,DWORD dwInfoType,LPCSTR src,
return TRUE; return TRUE;
default: default:
ERR(ole,"Unknown dwInfoType:%ld\n",dwInfoType); ERR_(ole)("Unknown dwInfoType:%ld\n",dwInfoType);
return FALSE; return FALSE;
} }
} }
@ -1508,10 +1508,10 @@ BOOL WINAPI GetStringTypeExW(LCID locale,DWORD dwInfoType,LPCWSTR src,
switch (dwInfoType) { switch (dwInfoType) {
case CT_CTYPE2: case CT_CTYPE2:
FIXME(ole,"CT_CTYPE2 not supported.\n"); FIXME_(ole)("CT_CTYPE2 not supported.\n");
return FALSE; return FALSE;
case CT_CTYPE3: case CT_CTYPE3:
FIXME(ole,"CT_CTYPE3 not supported.\n"); FIXME_(ole)("CT_CTYPE3 not supported.\n");
return FALSE; return FALSE;
default:break; default:break;
} }
@ -2018,12 +2018,12 @@ INT WINAPI LCMapStringA(
{ {
int i; int i;
TRACE(string,"(0x%04lx,0x%08lx,%s,%d,%p,%d)\n", TRACE_(string)("(0x%04lx,0x%08lx,%s,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen); lcid,mapflags,srcstr,srclen,dststr,dstlen);
if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) ) if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) )
{ {
ERR(ole, "(src=%s,dest=%s): Invalid NULL string\n", srcstr, dststr); ERR_(ole)("(src=%s,dest=%s): Invalid NULL string\n", srcstr, dststr);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
@ -2040,7 +2040,7 @@ INT WINAPI LCMapStringA(
if (mapflags & ~LCMAPSTRINGA_SUPPORTED_FLAGS) if (mapflags & ~LCMAPSTRINGA_SUPPORTED_FLAGS)
{ {
FIXME(string,"(0x%04lx,0x%08lx,%p,%d,%p,%d): " FIXME_(string)("(0x%04lx,0x%08lx,%p,%d,%p,%d): "
"unimplemented flags: 0x%08lx\n", "unimplemented flags: 0x%08lx\n",
lcid, lcid,
mapflags, mapflags,
@ -2164,7 +2164,7 @@ INT WINAPI LCMapStringA(
/*FIXME the Pointercheck should not be nessesary */ /*FIXME the Pointercheck should not be nessesary */
if (IsBadWritePtr (dststr,room)) if (IsBadWritePtr (dststr,room))
{ ERR (string,"bad destination buffer (dststr) : %p,%d\n",dststr,dstlen); { ERR_(string)("bad destination buffer (dststr) : %p,%d\n",dststr,dstlen);
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0; return 0;
} }
@ -2253,12 +2253,12 @@ INT WINAPI LCMapStringW(
{ {
int i; int i;
TRACE(string,"(0x%04lx,0x%08lx,%p,%d,%p,%d)\n", TRACE_(string)("(0x%04lx,0x%08lx,%p,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen); lcid,mapflags,srcstr,srclen,dststr,dstlen);
if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) ) if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) )
{ {
ERR(ole, "(src=%p,dst=%p): Invalid NULL string\n", srcstr, dststr); ERR_(ole)("(src=%p,dst=%p): Invalid NULL string\n", srcstr, dststr);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
@ -2266,7 +2266,7 @@ INT WINAPI LCMapStringW(
srclen = lstrlenW(srcstr)+1; srclen = lstrlenW(srcstr)+1;
if (mapflags & LCMAP_SORTKEY) if (mapflags & LCMAP_SORTKEY)
{ {
FIXME(string,"(0x%04lx,0x%08lx,%p,%d,%p,%d): " FIXME_(string)("(0x%04lx,0x%08lx,%p,%d,%p,%d): "
"unimplemented flags: 0x%08lx\n", "unimplemented flags: 0x%08lx\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen,mapflags); lcid,mapflags,srcstr,srclen,dststr,dstlen,mapflags);
return 0; return 0;
@ -2335,18 +2335,18 @@ UINT WINAPI CompareStringA(
int len1,len2; int len1,len2;
int result; int result;
LPSTR sk1,sk2; LPSTR sk1,sk2;
TRACE(ole,"%s and %s\n", TRACE_(ole)("%s and %s\n",
debugstr_a (s1), debugstr_a (s2)); debugstr_a (s1), debugstr_a (s2));
if ( (s1==NULL) || (s2==NULL) ) if ( (s1==NULL) || (s2==NULL) )
{ {
ERR(ole, "(s1=%s,s2=%s): Invalid NULL string\n", s1, s2); ERR_(ole)("(s1=%s,s2=%s): Invalid NULL string\n", s1, s2);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
if(fdwStyle & NORM_IGNORESYMBOLS) if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME(ole, "IGNORESYMBOLS not supported\n"); FIXME_(ole)("IGNORESYMBOLS not supported\n");
mapstring_flags = LCMAP_SORTKEY | fdwStyle ; mapstring_flags = LCMAP_SORTKEY | fdwStyle ;
len1 = LCMapStringA(lcid,mapstring_flags,s1,l1,NULL,0); len1 = LCMapStringA(lcid,mapstring_flags,s1,l1,NULL,0);
@ -2360,7 +2360,7 @@ UINT WINAPI CompareStringA(
if ( (!LCMapStringA(lcid,mapstring_flags,s1,l1,sk1,len1)) if ( (!LCMapStringA(lcid,mapstring_flags,s1,l1,sk1,len1))
|| (!LCMapStringA(lcid,mapstring_flags,s2,l2,sk2,len2)) ) || (!LCMapStringA(lcid,mapstring_flags,s2,l2,sk2,len2)) )
{ {
ERR(ole,"Bug in LCmapString32A.\n"); ERR_(ole)("Bug in LCmapString32A.\n");
result = 0; result = 0;
} }
else else
@ -2391,9 +2391,9 @@ UINT WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle,
{ {
int len,ret; int len,ret;
if(fdwStyle & NORM_IGNORENONSPACE) if(fdwStyle & NORM_IGNORENONSPACE)
FIXME(ole,"IGNORENONSPACE not supprted\n"); FIXME_(ole)("IGNORENONSPACE not supprted\n");
if(fdwStyle & NORM_IGNORESYMBOLS) if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME(ole,"IGNORESYMBOLS not supported\n"); FIXME_(ole)("IGNORESYMBOLS not supported\n");
/* Is strcmp defaulting to string sort or to word sort?? */ /* Is strcmp defaulting to string sort or to word sort?? */
/* FIXME: Handle NORM_STRINGSORT */ /* FIXME: Handle NORM_STRINGSORT */
@ -2465,13 +2465,13 @@ static INT OLE_GetFormatA(LCID locale,
const char ** dgfmt = _dgfmt - 1; const char ** dgfmt = _dgfmt - 1;
/* report, for debugging */ /* report, for debugging */
TRACE(ole, "(0x%lx,0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt=%p \'%s\' , %p, len=%d)\n", TRACE_(ole)("(0x%lx,0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt=%p \'%s\' , %p, len=%d)\n",
locale, flags, tflags, locale, flags, tflags,
xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond, xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
_format, _format, date, datelen); _format, _format, date, datelen);
if(datelen == 0) { if(datelen == 0) {
FIXME(ole, "datelen = 0, returning 255\n"); FIXME_(ole)("datelen = 0, returning 255\n");
return 255; return 255;
} }
@ -2557,17 +2557,17 @@ static INT OLE_GetFormatA(LCID locale,
sprintf(buf, "%d", xtime->wYear); sprintf(buf, "%d", xtime->wYear);
} else if (count == 3) { } else if (count == 3) {
strcpy(buf, "yyy"); strcpy(buf, "yyy");
WARN(ole, "unknown format, c=%c, n=%d\n", type, count); WARN_(ole)("unknown format, c=%c, n=%d\n", type, count);
} else { } else {
sprintf(buf, dgfmt[count], xtime->wYear % 100); sprintf(buf, dgfmt[count], xtime->wYear % 100);
} }
} else if (type == 'g') { } else if (type == 'g') {
if (count == 2) { if (count == 2) {
FIXME(ole, "LOCALE_ICALENDARTYPE unimp.\n"); FIXME_(ole)("LOCALE_ICALENDARTYPE unimp.\n");
strcpy(buf, "AD"); strcpy(buf, "AD");
} else { } else {
strcpy(buf, "g"); strcpy(buf, "g");
WARN(ole, "unknown format, c=%c, n=%d\n", type, count); WARN_(ole)("unknown format, c=%c, n=%d\n", type, count);
} }
} else if (type == 'h') { } else if (type == 'h') {
/* gives us hours 1:00 -- 12:00 */ /* gives us hours 1:00 -- 12:00 */
@ -2606,7 +2606,7 @@ static INT OLE_GetFormatA(LCID locale,
strncat(date, buf, datelen - outpos); strncat(date, buf, datelen - outpos);
date[datelen - 1] = '\0'; date[datelen - 1] = '\0';
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
WARN(ole, "insufficient buffer\n"); WARN_(ole)("insufficient buffer\n");
return 0; return 0;
} }
@ -2650,7 +2650,7 @@ static INT OLE_GetFormatA(LCID locale,
if (outpos > datelen-1) outpos = datelen-1; if (outpos > datelen-1) outpos = datelen-1;
date[outpos] = '\0'; date[outpos] = '\0';
TRACE(ole, "OLE_GetFormatA returns string '%s', len %d\n", TRACE_(ole)("OLE_GetFormatA returns string '%s', len %d\n",
date, outpos); date, outpos);
return outpos; return outpos;
} }
@ -2678,14 +2678,14 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
argarr[2] = arg2; argarr[2] = arg2;
/* make a debug report */ /* make a debug report */
TRACE(ole, "args: 0x%lx, 0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt:%s (at %p), " TRACE_(ole)("args: 0x%lx, 0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt:%s (at %p), "
"%p with max len %d\n", "%p with max len %d\n",
locale, flags, tflags, locale, flags, tflags,
xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond, xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
debugstr_w(format), format, output, outlen); debugstr_w(format), format, output, outlen);
if(outlen == 0) { if(outlen == 0) {
FIXME(ole, "outlen = 0, returning 255\n"); FIXME_(ole)("outlen = 0, returning 255\n");
return 255; return 255;
} }
@ -2766,7 +2766,7 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
} }
} else if (type == 'g') { } else if (type == 'g') {
if (count == 2) { if (count == 2) {
FIXME(ole, "LOCALE_ICALENDARTYPE unimplemented\n"); FIXME_(ole)("LOCALE_ICALENDARTYPE unimplemented\n");
lstrcpynAtoW(buf, "AD", 5); lstrcpynAtoW(buf, "AD", 5);
} else { } else {
/* Win API sez we copy it verbatim */ /* Win API sez we copy it verbatim */
@ -2848,7 +2848,7 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
if (Overflow) { if (Overflow) {
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
WARN(ole, " buffer overflow\n"); WARN_(ole)(" buffer overflow\n");
}; };
/* final string terminator and sanity check */ /* final string terminator and sanity check */
@ -2856,7 +2856,7 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
if (outpos > outlen-1) outpos = outlen-1; if (outpos > outlen-1) outpos = outlen-1;
output[outpos] = '0'; output[outpos] = '0';
TRACE(ole, " returning %s\n", debugstr_w(output)); TRACE_(ole)(" returning %s\n", debugstr_w(output));
return (!Overflow) ? outlen : 0; return (!Overflow) ? outlen : 0;
@ -2897,7 +2897,7 @@ INT WINAPI GetDateFormatA(LCID locale,DWORD flags,
LCID thislocale; LCID thislocale;
INT ret; INT ret;
TRACE(ole,"(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", TRACE_(ole)("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",
locale,flags,xtime,format,date,datelen); locale,flags,xtime,format,date,datelen);
if (!locale) { if (!locale) {
@ -2934,7 +2934,7 @@ INT WINAPI GetDateFormatA(LCID locale,DWORD flags,
date, datelen); date, datelen);
TRACE(ole, TRACE_(ole)(
"GetDateFormat32A() returning %d, with data=%s\n", "GetDateFormat32A() returning %d, with data=%s\n",
ret, date); ret, date);
return ret; return ret;
@ -2955,7 +2955,7 @@ INT WINAPI GetDateFormatW(LCID locale,DWORD flags,
{ {
unsigned short datearr[] = {'1','9','9','4','-','1','-','1',0}; unsigned short datearr[] = {'1','9','9','4','-','1','-','1',0};
FIXME(ole, "STUB (should call OLE_GetFormatW)\n"); FIXME_(ole)("STUB (should call OLE_GetFormatW)\n");
lstrcpynW(date, datearr, datelen); lstrcpynW(date, datearr, datelen);
return ( datelen < 9) ? datelen : 9; return ( datelen < 9) ? datelen : 9;
@ -2968,7 +2968,7 @@ INT WINAPI GetDateFormatW(LCID locale,DWORD flags,
BOOL WINAPI EnumDateFormatsA( BOOL WINAPI EnumDateFormatsA(
DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags) DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME(ole, "Only US English supported\n"); FIXME_(ole)("Only US English supported\n");
if(!lpDateFmtEnumProc) if(!lpDateFmtEnumProc)
{ {
@ -2993,7 +2993,7 @@ BOOL WINAPI EnumDateFormatsA(
if(!(*lpDateFmtEnumProc)("dd MMMM, yyyy")) return TRUE; if(!(*lpDateFmtEnumProc)("dd MMMM, yyyy")) return TRUE;
return TRUE; return TRUE;
default: default:
FIXME(ole, "Unknown date format (%ld)\n", dwFlags); FIXME_(ole)("Unknown date format (%ld)\n", dwFlags);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return FALSE; return FALSE;
} }
@ -3005,7 +3005,7 @@ BOOL WINAPI EnumDateFormatsA(
BOOL WINAPI EnumDateFormatsW( BOOL WINAPI EnumDateFormatsW(
DATEFMT_ENUMPROCW lpDateFmtEnumProc, LCID Locale, DWORD dwFlags) DATEFMT_ENUMPROCW lpDateFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME(ole, "(%p, %ld, %ld): stub\n", lpDateFmtEnumProc, Locale, dwFlags); FIXME_(ole)("(%p, %ld, %ld): stub\n", lpDateFmtEnumProc, Locale, dwFlags);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -3016,7 +3016,7 @@ BOOL WINAPI EnumDateFormatsW(
BOOL WINAPI EnumTimeFormatsA( BOOL WINAPI EnumTimeFormatsA(
TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags) TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME(ole, "Only US English supported\n"); FIXME_(ole)("Only US English supported\n");
if(!lpTimeFmtEnumProc) if(!lpTimeFmtEnumProc)
{ {
@ -3026,7 +3026,7 @@ BOOL WINAPI EnumTimeFormatsA(
if(dwFlags) if(dwFlags)
{ {
FIXME(ole, "Unknown time format (%ld)\n", dwFlags); FIXME_(ole)("Unknown time format (%ld)\n", dwFlags);
} }
if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE; if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
@ -3043,7 +3043,7 @@ BOOL WINAPI EnumTimeFormatsA(
BOOL WINAPI EnumTimeFormatsW( BOOL WINAPI EnumTimeFormatsW(
TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags) TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME(ole, "(%p,%ld,%ld): stub\n", lpTimeFmtEnumProc, Locale, dwFlags); FIXME_(ole)("(%p,%ld,%ld): stub\n", lpTimeFmtEnumProc, Locale, dwFlags);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -3055,7 +3055,7 @@ INT WINAPI GetNumberFormatA(LCID locale, DWORD dwflags,
LPCSTR lpvalue, const NUMBERFMTA * lpFormat, LPCSTR lpvalue, const NUMBERFMTA * lpFormat,
LPSTR lpNumberStr, int cchNumber) LPSTR lpNumberStr, int cchNumber)
{ {
FIXME(file,"%s: stub, no reformating done\n",lpvalue); FIXME_(file)("%s: stub, no reformating done\n",lpvalue);
lstrcpynA( lpNumberStr, lpvalue, cchNumber ); lstrcpynA( lpNumberStr, lpvalue, cchNumber );
return cchNumber? lstrlenA( lpNumberStr ) : 0; return cchNumber? lstrlenA( lpNumberStr ) : 0;
@ -3067,7 +3067,7 @@ INT WINAPI GetNumberFormatW(LCID locale, DWORD dwflags,
LPCWSTR lpvalue, const NUMBERFMTW * lpFormat, LPCWSTR lpvalue, const NUMBERFMTW * lpFormat,
LPWSTR lpNumberStr, int cchNumber) LPWSTR lpNumberStr, int cchNumber)
{ {
FIXME(file,"%s: stub, no reformating done\n",debugstr_w(lpvalue)); FIXME_(file)("%s: stub, no reformating done\n",debugstr_w(lpvalue));
lstrcpynW( lpNumberStr, lpvalue, cchNumber ); lstrcpynW( lpNumberStr, lpvalue, cchNumber );
return cchNumber? lstrlenW( lpNumberStr ) : 0; return cchNumber? lstrlenW( lpNumberStr ) : 0;
@ -3125,12 +3125,12 @@ GetTimeFormatA(LCID locale, /* in */
DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */ DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */
INT ret; INT ret;
TRACE(ole,"GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,xtime,format,timestr,timelen); TRACE_(ole)("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,xtime,format,timestr,timelen);
thislocale = OLE2NLS_CheckLocale ( locale ); thislocale = OLE2NLS_CheckLocale ( locale );
if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT )) if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT ))
{ FIXME(ole,"TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n"); { FIXME_(ole)("TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n");
} }
flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/ flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/
@ -3178,13 +3178,13 @@ GetTimeFormatW(LCID locale, /* in */
DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */ DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */
INT ret; INT ret;
TRACE(ole,"GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags, TRACE_(ole)("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,
xtime,debugstr_w(format),timestr,timelen); xtime,debugstr_w(format),timestr,timelen);
thislocale = OLE2NLS_CheckLocale ( locale ); thislocale = OLE2NLS_CheckLocale ( locale );
if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT )) if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT ))
{ FIXME(ole,"TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n"); { FIXME_(ole)("TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n");
} }
flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/ flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/
@ -3219,6 +3219,6 @@ GetTimeFormatW(LCID locale, /* in */
BOOL WINAPI EnumCalendarInfoA( BOOL WINAPI EnumCalendarInfoA(
CALINFO_ENUMPROCA calinfoproc,LCID locale,CALID calendar,CALTYPE caltype CALINFO_ENUMPROCA calinfoproc,LCID locale,CALID calendar,CALTYPE caltype
) { ) {
FIXME(ole,"(%p,0x%04lx,0x%08lx,0x%08lx),stub!\n",calinfoproc,locale,calendar,caltype); FIXME_(ole)("(%p,0x%04lx,0x%08lx,0x%08lx),stub!\n",calinfoproc,locale,calendar,caltype);
return FALSE; return FALSE;
} }

View File

@ -21,7 +21,7 @@
#include "heap.h" #include "heap.h"
#include "module.h" #include "module.h"
#include "ldt.h" #include "ldt.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(ole) DECLARE_DEBUG_CHANNEL(ole)
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
@ -89,12 +89,12 @@ static BOOL
STORAGE_get_big_block(HFILE hf,int n,BYTE *block) { STORAGE_get_big_block(HFILE hf,int n,BYTE *block) {
assert(n>=-1); assert(n>=-1);
if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) { if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) {
WARN(ole," seek failed (%ld)\n",GetLastError()); WARN_(ole)(" seek failed (%ld)\n",GetLastError());
return FALSE; return FALSE;
} }
assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR)); assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR));
if (BIGSIZE!=_lread(hf,block,BIGSIZE)) { if (BIGSIZE!=_lread(hf,block,BIGSIZE)) {
WARN(ole,"(block size %d): read didn't read (%ld)\n",n,GetLastError()); WARN_(ole)("(block size %d): read didn't read (%ld)\n",n,GetLastError());
assert(0); assert(0);
return FALSE; return FALSE;
} }
@ -108,12 +108,12 @@ static BOOL
STORAGE_put_big_block(HFILE hf,int n,BYTE *block) { STORAGE_put_big_block(HFILE hf,int n,BYTE *block) {
assert(n>=-1); assert(n>=-1);
if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) { if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) {
WARN(ole," seek failed (%ld)\n",GetLastError()); WARN_(ole)(" seek failed (%ld)\n",GetLastError());
return FALSE; return FALSE;
} }
assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR)); assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR));
if (BIGSIZE!=_lwrite(hf,block,BIGSIZE)) { if (BIGSIZE!=_lwrite(hf,block,BIGSIZE)) {
WARN(ole," write failed (%ld)\n",GetLastError()); WARN_(ole)(" write failed (%ld)\n",GetLastError());
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -363,22 +363,22 @@ STORAGE_dump_pps_entry(struct storage_pps_entry *stde) {
lstrcpyWtoA(name,stde->pps_rawname); lstrcpyWtoA(name,stde->pps_rawname);
if (!stde->pps_sizeofname) if (!stde->pps_sizeofname)
return; return;
DUMP("name: %s\n",name); DPRINTF("name: %s\n",name);
DUMP("type: %d\n",stde->pps_type); DPRINTF("type: %d\n",stde->pps_type);
DUMP("prev pps: %ld\n",stde->pps_prev); DPRINTF("prev pps: %ld\n",stde->pps_prev);
DUMP("next pps: %ld\n",stde->pps_next); DPRINTF("next pps: %ld\n",stde->pps_next);
DUMP("dir pps: %ld\n",stde->pps_dir); DPRINTF("dir pps: %ld\n",stde->pps_dir);
DUMP("guid: %s\n",xguid); DPRINTF("guid: %s\n",xguid);
if (stde->pps_type !=2) { if (stde->pps_type !=2) {
time_t t; time_t t;
t = DOSFS_FileTimeToUnixTime(&(stde->pps_ft1),NULL); t = DOSFS_FileTimeToUnixTime(&(stde->pps_ft1),NULL);
DUMP("ts1: %s\n",ctime(&t)); DPRINTF("ts1: %s\n",ctime(&t));
t = DOSFS_FileTimeToUnixTime(&(stde->pps_ft2),NULL); t = DOSFS_FileTimeToUnixTime(&(stde->pps_ft2),NULL);
DUMP("ts2: %s\n",ctime(&t)); DPRINTF("ts2: %s\n",ctime(&t));
} }
DUMP("startblock: %ld\n",stde->pps_sb); DPRINTF("startblock: %ld\n",stde->pps_sb);
DUMP("size: %ld\n",stde->pps_size); DPRINTF("size: %ld\n",stde->pps_size);
} }
/****************************************************************************** /******************************************************************************
@ -690,7 +690,7 @@ HRESULT WINAPI IStream16_fnQueryInterface(
ICOM_THIS(IStream16Impl,iface); ICOM_THIS(IStream16Impl,iface);
char xrefiid[50]; char xrefiid[50];
WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); WINE_StringFromCLSID((LPCLSID)refiid,xrefiid);
TRACE(relay,"(%p)->(%s,%p)\n",This,xrefiid,obj); TRACE_(relay)("(%p)->(%s,%p)\n",This,xrefiid,obj);
if (!memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown))) { if (!memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown))) {
*obj = This; *obj = This;
return 0; return 0;
@ -732,7 +732,7 @@ HRESULT WINAPI IStream16_fnSeek(
IStream16* iface,LARGE_INTEGER offset,DWORD whence,ULARGE_INTEGER *newpos IStream16* iface,LARGE_INTEGER offset,DWORD whence,ULARGE_INTEGER *newpos
) { ) {
ICOM_THIS(IStream16Impl,iface); ICOM_THIS(IStream16Impl,iface);
TRACE(relay,"(%p)->([%ld.%ld],%ld,%p)\n",This,offset.HighPart,offset.LowPart,whence,newpos); TRACE_(relay)("(%p)->([%ld.%ld],%ld,%p)\n",This,offset.HighPart,offset.LowPart,whence,newpos);
switch (whence) { switch (whence) {
/* unix SEEK_xx should be the same as win95 ones */ /* unix SEEK_xx should be the same as win95 ones */
@ -780,7 +780,7 @@ HRESULT WINAPI IStream16_fnRead(
ULONG *bytesread=pcbRead,xxread; ULONG *bytesread=pcbRead,xxread;
int blocknr; int blocknr;
TRACE(relay,"(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbRead); TRACE_(relay)("(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbRead);
if (!pcbRead) bytesread=&xxread; if (!pcbRead) bytesread=&xxread;
*bytesread = 0; *bytesread = 0;
@ -793,7 +793,7 @@ HRESULT WINAPI IStream16_fnRead(
int cc; int cc;
if (!STORAGE_get_small_block(This->hf,blocknr,block)) { if (!STORAGE_get_small_block(This->hf,blocknr,block)) {
WARN(ole,"small block read failed!!!\n"); WARN_(ole)("small block read failed!!!\n");
return E_FAIL; return E_FAIL;
} }
cc = cb; cc = cb;
@ -813,7 +813,7 @@ HRESULT WINAPI IStream16_fnRead(
int cc; int cc;
if (!STORAGE_get_big_block(This->hf,blocknr,block)) { if (!STORAGE_get_big_block(This->hf,blocknr,block)) {
WARN(ole,"big block read failed!!!\n"); WARN_(ole)("big block read failed!!!\n");
return E_FAIL; return E_FAIL;
} }
cc = cb; cc = cb;
@ -845,7 +845,7 @@ HRESULT WINAPI IStream16_fnWrite(
if (!pcbWrite) byteswritten=&xxwritten; if (!pcbWrite) byteswritten=&xxwritten;
*byteswritten = 0; *byteswritten = 0;
TRACE(relay,"(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbWrite); TRACE_(relay)("(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbWrite);
/* do we need to junk some blocks? */ /* do we need to junk some blocks? */
newsize = This->offset.LowPart+cb; newsize = This->offset.LowPart+cb;
oldsize = This->stde.pps_size; oldsize = This->stde.pps_size;
@ -1175,7 +1175,7 @@ HRESULT WINAPI IStream_fnQueryInterface(
char xrefiid[50]; char xrefiid[50];
WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); WINE_StringFromCLSID((LPCLSID)refiid,xrefiid);
TRACE(relay,"(%p)->(%s,%p)\n",This,xrefiid,obj); TRACE_(relay)("(%p)->(%s,%p)\n",This,xrefiid,obj);
if (!memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown))) { if (!memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown))) {
*obj = This; *obj = This;
return 0; return 0;
@ -1231,7 +1231,7 @@ HRESULT WINAPI IStorage16_fnQueryInterface(
char xrefiid[50]; char xrefiid[50];
WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); WINE_StringFromCLSID((LPCLSID)refiid,xrefiid);
TRACE(relay,"(%p)->(%s,%p)\n",This,xrefiid,obj); TRACE_(relay)("(%p)->(%s,%p)\n",This,xrefiid,obj);
if (!memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown))) { if (!memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown))) {
*obj = This; *obj = This;
@ -1267,7 +1267,7 @@ HRESULT WINAPI IStorage16_fnStat(
LPSTORAGE16 iface,STATSTG16 *pstatstg, DWORD grfStatFlag LPSTORAGE16 iface,STATSTG16 *pstatstg, DWORD grfStatFlag
) { ) {
ICOM_THIS(IStorage16Impl,iface); ICOM_THIS(IStorage16Impl,iface);
TRACE(ole,"(%p)->(%p,0x%08lx)\n", TRACE_(ole)("(%p)->(%p,0x%08lx)\n",
This,pstatstg,grfStatFlag This,pstatstg,grfStatFlag
); );
pstatstg->pwcsName=(LPOLESTR16)SEGPTR_GET(SEGPTR_STRDUP_WtoA(This->stde.pps_rawname)); pstatstg->pwcsName=(LPOLESTR16)SEGPTR_GET(SEGPTR_STRDUP_WtoA(This->stde.pps_rawname));
@ -1291,7 +1291,7 @@ HRESULT WINAPI IStorage16_fnCommit(
LPSTORAGE16 iface,DWORD commitflags LPSTORAGE16 iface,DWORD commitflags
) { ) {
ICOM_THIS(IStorage16Impl,iface); ICOM_THIS(IStorage16Impl,iface);
FIXME(ole,"(%p)->(0x%08lx),STUB!\n", FIXME_(ole)("(%p)->(0x%08lx),STUB!\n",
This,commitflags This,commitflags
); );
return S_OK; return S_OK;
@ -1308,7 +1308,7 @@ HRESULT WINAPI IStorage16_fnCopyTo(LPSTORAGE16 iface,DWORD ciidExclude,const IID
WINE_StringFromCLSID(rgiidExclude,xguid); WINE_StringFromCLSID(rgiidExclude,xguid);
else else
strcpy(xguid,"<no guid>"); strcpy(xguid,"<no guid>");
FIXME(ole,"IStorage16(%p)->(0x%08lx,%s,%p,%p),stub!\n", FIXME_(ole)("IStorage16(%p)->(0x%08lx,%s,%p,%p),stub!\n",
This,ciidExclude,xguid,SNB16Exclude,pstgDest This,ciidExclude,xguid,SNB16Exclude,pstgDest
); );
return S_OK; return S_OK;
@ -1330,11 +1330,11 @@ HRESULT WINAPI IStorage16_fnCreateStorage(
READ_HEADER; READ_HEADER;
TRACE(ole,"(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n", TRACE_(ole)("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,grfMode,dwStgFormat,reserved2,ppstg This,pwcsName,grfMode,dwStgFormat,reserved2,ppstg
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME(ole,"We do not support transacted Compound Storage. Using direct mode.\n"); FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istorage16(ppstg); _create_istorage16(ppstg);
lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstg); lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstg);
lpstg->hf = This->hf; lpstg->hf = This->hf;
@ -1347,7 +1347,7 @@ HRESULT WINAPI IStorage16_fnCreateStorage(
stde.pps_dir = ppsent; stde.pps_dir = ppsent;
x = This->ppsent; x = This->ppsent;
} else { } else {
FIXME(ole," use prev chain too ?\n"); FIXME_(ole)(" use prev chain too ?\n");
x=stde.pps_dir; x=stde.pps_dir;
if (1!=STORAGE_get_pps_entry(lpstg->hf,x,&stde)) if (1!=STORAGE_get_pps_entry(lpstg->hf,x,&stde))
return E_FAIL; return E_FAIL;
@ -1386,11 +1386,11 @@ HRESULT WINAPI IStorage16_fnCreateStream(
int ppsent,x; int ppsent,x;
struct storage_pps_entry stde; struct storage_pps_entry stde;
TRACE(ole,"(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n", TRACE_(ole)("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,grfMode,reserved1,reserved2,ppstm This,pwcsName,grfMode,reserved1,reserved2,ppstm
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME(ole,"We do not support transacted Compound Storage. Using direct mode.\n"); FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istream16(ppstm); _create_istream16(ppstm);
lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm); lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm);
DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(), DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(),
@ -1439,11 +1439,11 @@ HRESULT WINAPI IStorage16_fnOpenStorage(
WCHAR name[33]; WCHAR name[33];
int newpps; int newpps;
TRACE(relay,"(%p)->(%s,%p,0x%08lx,%p,0x%08lx,%p)\n", TRACE_(relay)("(%p)->(%s,%p,0x%08lx,%p,0x%08lx,%p)\n",
This,pwcsName,pstgPrio,grfMode,snbExclude,reserved,ppstg This,pwcsName,pstgPrio,grfMode,snbExclude,reserved,ppstg
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME(ole,"We do not support transacted Compound Storage. Using direct mode.\n"); FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istorage16(ppstg); _create_istorage16(ppstg);
lpstg = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstg); lpstg = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstg);
DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(), DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(),
@ -1474,11 +1474,11 @@ HRESULT WINAPI IStorage16_fnOpenStream(
WCHAR name[33]; WCHAR name[33];
int newpps; int newpps;
TRACE(relay,"(%p)->(%s,%p,0x%08lx,0x%08lx,%p)\n", TRACE_(relay)("(%p)->(%s,%p,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,reserved1,grfMode,reserved2,ppstm This,pwcsName,reserved1,grfMode,reserved2,ppstm
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME(ole,"We do not support transacted Compound Storage. Using direct mode.\n"); FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istream16(ppstm); _create_istream16(ppstm);
lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm); lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm);
DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(), DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(),
@ -1574,7 +1574,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) {
*/ */
HRESULT WINAPI StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen) HRESULT WINAPI StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen)
{ {
FIXME(ole, "(not shown) stub!\n"); FIXME_(ole)("(not shown) stub!\n");
return S_OK; return S_OK;
} }
@ -1584,7 +1584,7 @@ HRESULT WINAPI StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPrio
*/ */
HRESULT WINAPI StgCreateDocfileOnILockBytes(ILockBytes *plkbyt,DWORD grfMode, DWORD reserved, IStorage** ppstgOpen) HRESULT WINAPI StgCreateDocfileOnILockBytes(ILockBytes *plkbyt,DWORD grfMode, DWORD reserved, IStorage** ppstgOpen)
{ {
FIXME(ole, "(not shown) stub!\n"); FIXME_(ole)("(not shown) stub!\n");
return S_OK; return S_OK;
} }
@ -1600,13 +1600,13 @@ HRESULT WINAPI StgCreateDocFile16(
IStorage16Impl* lpstg; IStorage16Impl* lpstg;
struct storage_pps_entry stde; struct storage_pps_entry stde;
TRACE(ole,"(%s,0x%08lx,0x%08lx,%p)\n", TRACE_(ole)("(%s,0x%08lx,0x%08lx,%p)\n",
pwcsName,grfMode,reserved,ppstgOpen pwcsName,grfMode,reserved,ppstgOpen
); );
_create_istorage16(ppstgOpen); _create_istorage16(ppstgOpen);
hf = CreateFileA(pwcsName,GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_NEW,0,0); hf = CreateFileA(pwcsName,GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_NEW,0,0);
if (hf==INVALID_HANDLE_VALUE) { if (hf==INVALID_HANDLE_VALUE) {
WARN(ole,"couldn't open file for storage:%ld\n",GetLastError()); WARN_(ole)("couldn't open file for storage:%ld\n",GetLastError());
return E_FAIL; return E_FAIL;
} }
lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen); lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen);
@ -1642,31 +1642,31 @@ HRESULT WINAPI StgIsStorageFile16(LPCOLESTR16 fn) {
OFSTRUCT ofs; OFSTRUCT ofs;
BYTE magic[24]; BYTE magic[24];
TRACE(ole,"(\'%s\')\n",fn); TRACE_(ole)("(\'%s\')\n",fn);
hf = OpenFile(fn,&ofs,OF_SHARE_DENY_NONE); hf = OpenFile(fn,&ofs,OF_SHARE_DENY_NONE);
if (hf==HFILE_ERROR) if (hf==HFILE_ERROR)
return STG_E_FILENOTFOUND; return STG_E_FILENOTFOUND;
if (24!=_lread(hf,magic,24)) { if (24!=_lread(hf,magic,24)) {
WARN(ole," too short\n"); WARN_(ole)(" too short\n");
_lclose(hf); _lclose(hf);
return S_FALSE; return S_FALSE;
} }
if (!memcmp(magic,STORAGE_magic,8)) { if (!memcmp(magic,STORAGE_magic,8)) {
WARN(ole," -> YES\n"); WARN_(ole)(" -> YES\n");
_lclose(hf); _lclose(hf);
return S_OK; return S_OK;
} }
if (!memcmp(magic,STORAGE_notmagic,8)) { if (!memcmp(magic,STORAGE_notmagic,8)) {
WARN(ole," -> NO\n"); WARN_(ole)(" -> NO\n");
_lclose(hf); _lclose(hf);
return S_FALSE; return S_FALSE;
} }
if (!memcmp(magic,STORAGE_oldmagic,8)) { if (!memcmp(magic,STORAGE_oldmagic,8)) {
WARN(ole," -> old format\n"); WARN_(ole)(" -> old format\n");
_lclose(hf); _lclose(hf);
return STG_E_OLDFORMAT; return STG_E_OLDFORMAT;
} }
WARN(ole," -> Invalid header.\n"); WARN_(ole)(" -> Invalid header.\n");
_lclose(hf); _lclose(hf);
return STG_E_INVALIDHEADER; return STG_E_INVALIDHEADER;
} }
@ -1697,13 +1697,13 @@ HRESULT WINAPI StgOpenStorage16(
IStorage16Impl* lpstg; IStorage16Impl* lpstg;
struct storage_pps_entry stde; struct storage_pps_entry stde;
TRACE(ole,"(%s,%p,0x%08lx,%p,%ld,%p)\n", TRACE_(ole)("(%s,%p,0x%08lx,%p,%ld,%p)\n",
pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstgOpen pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstgOpen
); );
_create_istorage16(ppstgOpen); _create_istorage16(ppstgOpen);
hf = CreateFileA(pwcsName,GENERIC_READ,0,NULL,0,0,0); hf = CreateFileA(pwcsName,GENERIC_READ,0,NULL,0,0,0);
if (hf==INVALID_HANDLE_VALUE) { if (hf==INVALID_HANDLE_VALUE) {
WARN(ole,"Couldn't open file for storage\n"); WARN_(ole)("Couldn't open file for storage\n");
return E_FAIL; return E_FAIL;
} }
lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen); lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen);

View File

@ -15,7 +15,7 @@
#include "main.h" #include "main.h"
#include "snoop.h" #include "snoop.h"
#include "winerror.h" #include "winerror.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
DECLARE_DEBUG_CHANNEL(win32) DECLARE_DEBUG_CHANNEL(win32)
@ -244,7 +244,7 @@ static HMODULE BUILTIN32_DoLoadImage( BUILTIN32_DLL *dll )
rtab = HeapAlloc(GetProcessHeap(), 0, dll->rsc->restabsize); rtab = HeapAlloc(GetProcessHeap(), 0, dll->rsc->restabsize);
if(!rtab) if(!rtab)
{ {
ERR(module, "Failed to get memory for resource directory\n"); ERR_(module)("Failed to get memory for resource directory\n");
VirtualFree(addr, size, MEM_RELEASE); VirtualFree(addr, size, MEM_RELEASE);
return 0; return 0;
} }
@ -374,7 +374,7 @@ HMODULE BUILTIN32_LoadImage( LPCSTR name, OFSTRUCT *ofs)
if(table->flags && BI32_INSTANTIATED) if(table->flags && BI32_INSTANTIATED)
{ {
ERR(module, "Attemp to instantiate built-in dll '%s' twice in the same address-space. Expect trouble!\n", ERR_(module)("Attemp to instantiate built-in dll '%s' twice in the same address-space. Expect trouble!\n",
table->descr->name); table->descr->name);
} }
@ -433,7 +433,7 @@ WINE_MODREF *BUILTIN32_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
/* Create 32-bit MODREF */ /* Create 32-bit MODREF */
if ( !(wm = PE_CreateModule( hModule32, &ofs, flags, TRUE )) ) if ( !(wm = PE_CreateModule( hModule32, &ofs, flags, TRUE )) )
{ {
ERR(win32,"can't load %s\n",ofs.szPathName); ERR_(win32)("can't load %s\n",ofs.szPathName);
FreeLibrary16( hModule16 ); /* FIXME: Should unload the builtin module */ FreeLibrary16( hModule16 ); /* FIXME: Should unload the builtin module */
*err = ERROR_OUTOFMEMORY; *err = ERROR_OUTOFMEMORY;
return NULL; return NULL;
@ -564,12 +564,12 @@ void BUILTIN32_Unimplemented( const BUILTIN32_DESCRIPTOR *descr, int ordinal )
if (descr->ordinals[i] + descr->base == ordinal) break; if (descr->ordinals[i] + descr->base == ordinal) break;
if (i < descr->nb_names) func_name = descr->names[i]; if (i < descr->nb_names) func_name = descr->names[i];
MSG( "No handler for Win32 routine %s.%d: %s", MESSAGE( "No handler for Win32 routine %s.%d: %s",
descr->name, ordinal, func_name ); descr->name, ordinal, func_name );
#ifdef __GNUC__ #ifdef __GNUC__
MSG( " (called from %p)", __builtin_return_address(1) ); MESSAGE( " (called from %p)", __builtin_return_address(1) );
#endif #endif
MSG( "\n" ); MESSAGE( "\n" );
ExitProcess(1); ExitProcess(1);
} }

View File

@ -8,11 +8,11 @@
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include "debug.h" #include "debugtools.h"
#include "winerror.h" #include "winerror.h"
#include "winbase.h" #include "winbase.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debugtools.h"
#include "thread.h" #include "thread.h"
DEFAULT_DEBUG_CHANNEL(win32) DEFAULT_DEBUG_CHANNEL(win32)
@ -40,7 +40,7 @@ void WINAPI DeleteCriticalSection( CRITICAL_SECTION *crit )
if (crit->LockSemaphore) if (crit->LockSemaphore)
{ {
if (crit->RecursionCount) /* Should not happen */ if (crit->RecursionCount) /* Should not happen */
MSG("Deleting owned critical section (%p)\n", crit ); ERR_(win32)("Deleting owned critical section (%p)\n", crit );
crit->LockCount = -1; crit->LockCount = -1;
crit->RecursionCount = 0; crit->RecursionCount = 0;
@ -61,7 +61,7 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
if (!crit->LockSemaphore) if (!crit->LockSemaphore)
{ {
FIXME(win32,"entering uninitialized section(%p)?\n",crit); FIXME_(win32)("entering uninitialized section(%p)?\n",crit);
InitializeCriticalSection(crit); InitializeCriticalSection(crit);
} }
if (InterlockedIncrement( &crit->LockCount )) if (InterlockedIncrement( &crit->LockCount ))
@ -75,7 +75,7 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() ) if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() )
{ {
FIXME( win32, "Crst %p belongs to process %ld, current is %ld!\n", FIXME_(win32)("Crst %p belongs to process %ld, current is %ld!\n",
crit, crit->Reserved, GetCurrentProcessId() ); crit, crit->Reserved, GetCurrentProcessId() );
return; return;
} }
@ -83,17 +83,17 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
res = WaitForSingleObject( crit->LockSemaphore, 5000L ); res = WaitForSingleObject( crit->LockSemaphore, 5000L );
if ( res == WAIT_TIMEOUT ) if ( res == WAIT_TIMEOUT )
{ {
ERR( win32, "Critical section %p wait timed out, retrying (60 sec)\n", crit ); ERR_(win32)("Critical section %p wait timed out, retrying (60 sec)\n", crit );
res = WaitForSingleObject( crit->LockSemaphore, 60000L ); res = WaitForSingleObject( crit->LockSemaphore, 60000L );
} }
if ( res == WAIT_TIMEOUT && TRACE_ON(relay) ) if ( res == WAIT_TIMEOUT && TRACE_ON(relay) )
{ {
ERR( win32, "Critical section %p wait timed out, retrying (5 min)\n", crit ); ERR_(win32)("Critical section %p wait timed out, retrying (5 min)\n", crit );
res = WaitForSingleObject( crit->LockSemaphore, 300000L ); res = WaitForSingleObject( crit->LockSemaphore, 300000L );
} }
if (res != STATUS_WAIT_0) if (res != STATUS_WAIT_0)
{ {
ERR(win32, "Critical section %p wait failed err=%lx\n", crit, res ); ERR_(win32)("Critical section %p wait failed err=%lx\n", crit, res );
/* FIXME: should raise an exception */ /* FIXME: should raise an exception */
} }
} }
@ -165,7 +165,7 @@ void WINAPI ReinitializeCriticalSection( CRITICAL_SECTION *crit )
else if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() ) else if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() )
{ {
FIXME( win32, "(%p) called for %08lx first, %08lx now: making global\n", FIXME_(win32)("(%p) called for %08lx first, %08lx now: making global\n",
crit, crit->Reserved, GetCurrentProcessId() ); crit, crit->Reserved, GetCurrentProcessId() );
MakeCriticalSectionGlobal( crit ); MakeCriticalSectionGlobal( crit );
@ -183,7 +183,7 @@ void WINAPI UninitializeCriticalSection( CRITICAL_SECTION *crit )
if ( crit->Reserved ) /* not global */ if ( crit->Reserved ) /* not global */
DeleteCriticalSection( crit ); DeleteCriticalSection( crit );
else else
FIXME( win32, "(%p) for %08lx: Crst is global, don't know whether to delete\n", FIXME_(win32)("(%p) for %08lx: Crst is global, don't know whether to delete\n",
crit, GetCurrentProcessId() ); crit, GetCurrentProcessId() );
} }
} }

View File

@ -37,7 +37,7 @@
#include "ldt.h" #include "ldt.h"
#include "process.h" #include "process.h"
#include "thread.h" #include "thread.h"
#include "debug.h" #include "debugtools.h"
#include "except.h" #include "except.h"
#include "stackframe.h" #include "stackframe.h"
@ -95,7 +95,7 @@ REGS_ENTRYPOINT(RtlUnwind)
(TEB_EXCEPTION_FRAME(context) != ((void *)0xffffffff)) && (TEB_EXCEPTION_FRAME(context) != ((void *)0xffffffff)) &&
(TEB_EXCEPTION_FRAME(context) != pEndFrame)) (TEB_EXCEPTION_FRAME(context) != pEndFrame))
{ {
TRACE(win32, "calling exception handler at 0x%x\n", TRACE_(win32)("calling exception handler at 0x%x\n",
(int)TEB_EXCEPTION_FRAME(context)->Handler ); (int)TEB_EXCEPTION_FRAME(context)->Handler );
dispatch=0; dispatch=0;
@ -103,7 +103,7 @@ REGS_ENTRYPOINT(RtlUnwind)
TEB_EXCEPTION_FRAME(context), TEB_EXCEPTION_FRAME(context),
context, &dispatch); context, &dispatch);
TRACE(win32,"exception handler returns 0x%x, dispatch=0x%x\n", TRACE_(win32)("exception handler returns 0x%x, dispatch=0x%x\n",
retval, (int) dispatch); retval, (int) dispatch);
if ( (retval == ExceptionCollidedUnwind) && if ( (retval == ExceptionCollidedUnwind) &&
@ -165,15 +165,15 @@ REGS_ENTRYPOINT(RaiseException)
while((pframe!=NULL)&&(pframe!=((void *)0xFFFFFFFF))) while((pframe!=NULL)&&(pframe!=((void *)0xFFFFFFFF)))
{ {
PEXCEPTION_FRAME prevframe; PEXCEPTION_FRAME prevframe;
TRACE(win32,"calling exception handler at 0x%x\n", TRACE_(win32)("calling exception handler at 0x%x\n",
(int) pframe->Handler); (int) pframe->Handler);
dispatch=0; dispatch=0;
TRACE(relay,"(except=%p,record=%p,frame=%p,context=%p,dispatch=%p)\n", TRACE_(relay)("(except=%p,record=%p,frame=%p,context=%p,dispatch=%p)\n",
pframe->Handler, &record, pframe, context, &dispatch ); pframe->Handler, &record, pframe, context, &dispatch );
prevframe = pframe->Prev; prevframe = pframe->Prev;
retval=pframe->Handler(&record,pframe,context,&dispatch); retval=pframe->Handler(&record,pframe,context,&dispatch);
TRACE(win32,"exception handler returns 0x%x, dispatch=0x%x\n", TRACE_(win32)("exception handler returns 0x%x, dispatch=0x%x\n",
retval, (int) dispatch); retval, (int) dispatch);
if(retval==ExceptionContinueExecution) if(retval==ExceptionContinueExecution)
@ -184,7 +184,7 @@ REGS_ENTRYPOINT(RaiseException)
if (retval!=ExceptionContinueExecution) if (retval!=ExceptionContinueExecution)
{ {
/* FIXME: what should we do here? */ /* FIXME: what should we do here? */
TRACE(win32,"no handler wanted to handle the exception, exiting\n"); TRACE_(win32)("no handler wanted to handle the exception, exiting\n");
ExitProcess(dwExceptionCode); /* what status should be used here ? */ ExitProcess(dwExceptionCode); /* what status should be used here ? */
} }
} }

View File

@ -23,7 +23,7 @@
#include "selectors.h" #include "selectors.h"
#include "task.h" #include "task.h"
#include "file.h" #include "file.h"
#include "debug.h" #include "debugtools.h"
#include "flatthunk.h" #include "flatthunk.h"
#include "syslevel.h" #include "syslevel.h"
#include "winerror.h" #include "winerror.h"
@ -99,7 +99,7 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
if ((hmod = LoadLibrary16(module)) <= 32) if ((hmod = LoadLibrary16(module)) <= 32)
{ {
ERR(thunk, "(%s, %s, %s): Unable to load '%s', error %d\n", ERR_(thunk)("(%s, %s, %s): Unable to load '%s', error %d\n",
module, func, module32, module, hmod); module, func, module32, module, hmod);
return 0; return 0;
} }
@ -107,14 +107,14 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
if ( !(ordinal = NE_GetOrdinal(hmod, func)) if ( !(ordinal = NE_GetOrdinal(hmod, func))
|| !(TD16 = PTR_SEG_TO_LIN(NE_GetEntryPointEx(hmod, ordinal, FALSE)))) || !(TD16 = PTR_SEG_TO_LIN(NE_GetEntryPointEx(hmod, ordinal, FALSE))))
{ {
ERR(thunk, "(%s, %s, %s): Unable to find '%s'\n", ERR_(thunk)("(%s, %s, %s): Unable to find '%s'\n",
module, func, module32, func); module, func, module32, func);
return 0; return 0;
} }
if (TD32 && memcmp(TD16->magic, TD32->magic, 4)) if (TD32 && memcmp(TD16->magic, TD32->magic, 4))
{ {
ERR(thunk, "(%s, %s, %s): Bad magic %c%c%c%c (should be %c%c%c%c)\n", ERR_(thunk)("(%s, %s, %s): Bad magic %c%c%c%c (should be %c%c%c%c)\n",
module, func, module32, module, func, module32,
TD16->magic[0], TD16->magic[1], TD16->magic[2], TD16->magic[3], TD16->magic[0], TD16->magic[1], TD16->magic[2], TD16->magic[3],
TD32->magic[0], TD32->magic[1], TD32->magic[2], TD32->magic[3]); TD32->magic[0], TD32->magic[1], TD32->magic[2], TD32->magic[3]);
@ -123,14 +123,14 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
if (TD32 && TD16->checksum != TD32->checksum) if (TD32 && TD16->checksum != TD32->checksum)
{ {
ERR(thunk, "(%s, %s, %s): Wrong checksum %08lx (should be %08lx)\n", ERR_(thunk)("(%s, %s, %s): Wrong checksum %08lx (should be %08lx)\n",
module, func, module32, TD16->checksum, TD32->checksum); module, func, module32, TD16->checksum, TD32->checksum);
return 0; return 0;
} }
if (!TD32 && checksum && checksum != *(LPDWORD)TD16) if (!TD32 && checksum && checksum != *(LPDWORD)TD16)
{ {
ERR(thunk, "(%s, %s, %s): Wrong checksum %08lx (should be %08lx)\n", ERR_(thunk)("(%s, %s, %s): Wrong checksum %08lx (should be %08lx)\n",
module, func, module32, *(LPDWORD)TD16, checksum); module, func, module32, *(LPDWORD)TD16, checksum);
return 0; return 0;
} }
@ -173,19 +173,19 @@ UINT WINAPI ThunkConnect32(
{ {
directionSL = TRUE; directionSL = TRUE;
TRACE(thunk, "SL01 thunk %s (%lx) <- %s (%s), Reason: %ld\n", TRACE_(thunk)("SL01 thunk %s (%lx) <- %s (%s), Reason: %ld\n",
module32, (DWORD)TD, module16, thunkfun16, dwReason); module32, (DWORD)TD, module16, thunkfun16, dwReason);
} }
else if (!lstrncmpA(TD->magic, "LS01", 4)) else if (!lstrncmpA(TD->magic, "LS01", 4))
{ {
directionSL = FALSE; directionSL = FALSE;
TRACE(thunk, "LS01 thunk %s (%lx) -> %s (%s), Reason: %ld\n", TRACE_(thunk)("LS01 thunk %s (%lx) -> %s (%s), Reason: %ld\n",
module32, (DWORD)TD, module16, thunkfun16, dwReason); module32, (DWORD)TD, module16, thunkfun16, dwReason);
} }
else else
{ {
ERR(thunk, "Invalid magic %c%c%c%c\n", ERR_(thunk)("Invalid magic %c%c%c%c\n",
TD->magic[0], TD->magic[1], TD->magic[2], TD->magic[3]); TD->magic[0], TD->magic[1], TD->magic[2], TD->magic[3]);
return 0; return 0;
} }
@ -206,7 +206,7 @@ UINT WINAPI ThunkConnect32(
if (SL16->fpData == NULL) if (SL16->fpData == NULL)
{ {
ERR(thunk, "ThunkConnect16 was not called!\n"); ERR_(thunk)("ThunkConnect16 was not called!\n");
return 0; return 0;
} }
@ -219,7 +219,7 @@ UINT WINAPI ThunkConnect32(
tdb->next = SL32->data->targetDB; /* FIXME: not thread-safe! */ tdb->next = SL32->data->targetDB; /* FIXME: not thread-safe! */
SL32->data->targetDB = tdb; SL32->data->targetDB = tdb;
TRACE(thunk, "Process %08lx allocated TargetDB entry for ThunkDataSL %08lx\n", TRACE_(thunk)("Process %08lx allocated TargetDB entry for ThunkDataSL %08lx\n",
(DWORD)PROCESS_Current(), (DWORD)SL32->data); (DWORD)PROCESS_Current(), (DWORD)SL32->data);
} }
else else
@ -467,9 +467,9 @@ DWORD WINAPI WOWCallback16(
DWORD arg /* [in] single DWORD argument to function */ DWORD arg /* [in] single DWORD argument to function */
) { ) {
DWORD ret; DWORD ret;
TRACE(thunk,"(%p,0x%08lx)...\n",fproc,arg); TRACE_(thunk)("(%p,0x%08lx)...\n",fproc,arg);
ret = Callbacks->CallWOWCallbackProc(fproc,arg); ret = Callbacks->CallWOWCallbackProc(fproc,arg);
TRACE(thunk,"... returns %ld\n",ret); TRACE_(thunk)("... returns %ld\n",ret);
return ret; return ret;
} }
@ -809,7 +809,7 @@ BOOL WINAPI SSInit16()
*/ */
BOOL WINAPI SSOnBigStack() BOOL WINAPI SSOnBigStack()
{ {
TRACE(thunk, "Yes, thunking is initialized\n"); TRACE_(thunk)("Yes, thunking is initialized\n");
return TRUE; return TRUE;
} }
@ -834,7 +834,7 @@ DWORD WINAPIV SSCall(
dbg_decl_str(thunk, 256); dbg_decl_str(thunk, 256);
for (i=0;i<nr/4;i++) for (i=0;i<nr/4;i++)
dsprintf(thunk,"0x%08lx,",args[i]); dsprintf(thunk,"0x%08lx,",args[i]);
TRACE(thunk,"(%ld,0x%08lx,%p,[%s])\n", TRACE_(thunk)("(%ld,0x%08lx,%p,[%s])\n",
nr,flags,fun,dbg_str(thunk)); nr,flags,fun,dbg_str(thunk));
} }
switch (nr) { switch (nr) {
@ -865,12 +865,12 @@ DWORD WINAPIV SSCall(
case 48: ret = fun(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11]); case 48: ret = fun(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11]);
break; break;
default: default:
WARN(thunk,"Unsupported nr of arguments, %ld\n",nr); WARN_(thunk)("Unsupported nr of arguments, %ld\n",nr);
ret = 0; ret = 0;
break; break;
} }
TRACE(thunk," returning %ld ...\n",ret); TRACE_(thunk)(" returning %ld ...\n",ret);
return ret; return ret;
} }
@ -948,7 +948,7 @@ void WINAPI
FreeSLCallback( FreeSLCallback(
DWORD x /* [in] 16 bit callback (segmented pointer?) */ DWORD x /* [in] 16 bit callback (segmented pointer?) */
) { ) {
FIXME(win32,"(0x%08lx): stub\n",x); FIXME_(win32)("(0x%08lx): stub\n",x);
} }
@ -989,7 +989,7 @@ BOOL16 WINAPI IsPeFormat16(
return FALSE; return FALSE;
} }
if (mzh.e_magic!=IMAGE_DOS_SIGNATURE) { if (mzh.e_magic!=IMAGE_DOS_SIGNATURE) {
WARN(dosmem,"File has not got dos signature!\n"); WARN_(dosmem)("File has not got dos signature!\n");
_lclose(hf); _lclose(hf);
return FALSE; return FALSE;
} }
@ -1014,7 +1014,7 @@ HANDLE WINAPI WOWHandle32(
WORD handle, /* [in] win16 handle */ WORD handle, /* [in] win16 handle */
WOW_HANDLE_TYPE type /* [in] handle type */ WOW_HANDLE_TYPE type /* [in] handle type */
) { ) {
TRACE(win32,"(0x%04x,%d)\n",handle,type); TRACE_(win32)("(0x%04x,%d)\n",handle,type);
return (HANDLE)handle; return (HANDLE)handle;
} }
@ -1058,7 +1058,7 @@ REGS_ENTRYPOINT(K32Thk1632Prolog)
char *stack32 = (char *)thdb->cur_stack - argSize; char *stack32 = (char *)thdb->cur_stack - argSize;
STACK16FRAME *frame16 = (STACK16FRAME *)stack16 - 1; STACK16FRAME *frame16 = (STACK16FRAME *)stack16 - 1;
TRACE(thunk, "before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n", TRACE_(thunk)("before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n",
EBP_reg(context), ESP_reg(context), thdb->cur_stack); EBP_reg(context), ESP_reg(context), thdb->cur_stack);
memset(frame16, '\0', sizeof(STACK16FRAME)); memset(frame16, '\0', sizeof(STACK16FRAME));
@ -1071,7 +1071,7 @@ REGS_ENTRYPOINT(K32Thk1632Prolog)
ESP_reg(context) = (DWORD)stack32; ESP_reg(context) = (DWORD)stack32;
EBP_reg(context) = ESP_reg(context) + argSize; EBP_reg(context) = ESP_reg(context) + argSize;
TRACE(thunk, "after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n", TRACE_(thunk)("after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n",
EBP_reg(context), ESP_reg(context), thdb->cur_stack); EBP_reg(context), ESP_reg(context), thdb->cur_stack);
} }
@ -1100,7 +1100,7 @@ REGS_ENTRYPOINT(K32Thk1632Epilog)
DWORD nArgsPopped = ESP_reg(context) - (DWORD)stack32; DWORD nArgsPopped = ESP_reg(context) - (DWORD)stack32;
TRACE(thunk, "before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n", TRACE_(thunk)("before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n",
EBP_reg(context), ESP_reg(context), thdb->cur_stack); EBP_reg(context), ESP_reg(context), thdb->cur_stack);
thdb->cur_stack = (DWORD)frame16->frame32; thdb->cur_stack = (DWORD)frame16->frame32;
@ -1108,7 +1108,7 @@ REGS_ENTRYPOINT(K32Thk1632Epilog)
ESP_reg(context) = (DWORD)stack16 + nArgsPopped; ESP_reg(context) = (DWORD)stack16 + nArgsPopped;
EBP_reg(context) = frame16->ebp; EBP_reg(context) = frame16->ebp;
TRACE(thunk, "after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n", TRACE_(thunk)("after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n",
EBP_reg(context), ESP_reg(context), thdb->cur_stack); EBP_reg(context), ESP_reg(context), thdb->cur_stack);
} }
} }
@ -1124,7 +1124,7 @@ BOOL WINAPI UpdateResourceA(
LPVOID lpData, LPVOID lpData,
DWORD cbData) { DWORD cbData) {
FIXME(win32, ": stub\n"); FIXME_(win32)(": stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -1140,7 +1140,7 @@ BOOL WINAPI UpdateResourceW(
LPVOID lpData, LPVOID lpData,
DWORD cbData) { DWORD cbData) {
FIXME(win32, ": stub\n"); FIXME_(win32)(": stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -1150,7 +1150,7 @@ BOOL WINAPI UpdateResourceW(
* WaitNamedPipe32A [KERNEL32.725] * WaitNamedPipe32A [KERNEL32.725]
*/ */
BOOL WINAPI WaitNamedPipeA (LPCSTR lpNamedPipeName, DWORD nTimeOut) BOOL WINAPI WaitNamedPipeA (LPCSTR lpNamedPipeName, DWORD nTimeOut)
{ FIXME (win32,"%s 0x%08lx\n",lpNamedPipeName,nTimeOut); { FIXME_(win32)("%s 0x%08lx\n",lpNamedPipeName,nTimeOut);
SetLastError(ERROR_PIPE_NOT_CONNECTED); SetLastError(ERROR_PIPE_NOT_CONNECTED);
return FALSE; return FALSE;
} }
@ -1158,7 +1158,7 @@ BOOL WINAPI WaitNamedPipeA (LPCSTR lpNamedPipeName, DWORD nTimeOut)
* WaitNamedPipe32W [KERNEL32.726] * WaitNamedPipe32W [KERNEL32.726]
*/ */
BOOL WINAPI WaitNamedPipeW (LPCWSTR lpNamedPipeName, DWORD nTimeOut) BOOL WINAPI WaitNamedPipeW (LPCWSTR lpNamedPipeName, DWORD nTimeOut)
{ FIXME (win32,"%s 0x%08lx\n",debugstr_w(lpNamedPipeName),nTimeOut); { FIXME_(win32)("%s 0x%08lx\n",debugstr_w(lpNamedPipeName),nTimeOut);
SetLastError(ERROR_PIPE_NOT_CONNECTED); SetLastError(ERROR_PIPE_NOT_CONNECTED);
return FALSE; return FALSE;
} }
@ -1177,7 +1177,7 @@ BOOL WINAPI WaitNamedPipeW (LPCWSTR lpNamedPipeName, DWORD nTimeOut)
*/ */
void WINAPI PK16FNF(LPSTR strPtr) void WINAPI PK16FNF(LPSTR strPtr)
{ {
FIXME(win32, "(%p): stub\n", strPtr); FIXME_(win32)("(%p): stub\n", strPtr);
/* fill in a fake filename that'll be easy to recognize */ /* fill in a fake filename that'll be easy to recognize */
lstrcpyA(strPtr, "WINESTUB.FIX"); lstrcpyA(strPtr, "WINESTUB.FIX");

View File

@ -13,7 +13,7 @@ at a later date. */
#include "windef.h" #include "windef.h"
#include "winerror.h" #include "winerror.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debugtools.h"
#include "debugstr.h" #include "debugstr.h"
DECLARE_DEBUG_CHANNEL(debug) DECLARE_DEBUG_CHANNEL(debug)
@ -47,7 +47,7 @@ BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER frequency)
* FlushInstructionCache (KERNEL32.261) * FlushInstructionCache (KERNEL32.261)
*/ */
BOOL WINAPI FlushInstructionCache(DWORD x,DWORD y,DWORD z) { BOOL WINAPI FlushInstructionCache(DWORD x,DWORD y,DWORD z) {
FIXME(debug,"(0x%08lx,0x%08lx,0x%08lx): stub\n",x,y,z); FIXME_(debug)("(0x%08lx,0x%08lx,0x%08lx): stub\n",x,y,z);
return TRUE; return TRUE;
} }
@ -60,7 +60,7 @@ HANDLE WINAPI CreateNamedPipeA (LPCSTR lpName, DWORD dwOpenMode,
DWORD nDefaultTimeOut, DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes) LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
FIXME (win32, "(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n", FIXME_(win32)("(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n",
debugstr_a(lpName), dwOpenMode, dwPipeMode, nMaxInstances, debugstr_a(lpName), dwOpenMode, dwPipeMode, nMaxInstances,
nOutBufferSize, nInBufferSize, nDefaultTimeOut, nOutBufferSize, nInBufferSize, nDefaultTimeOut,
lpSecurityAttributes); lpSecurityAttributes);
@ -82,7 +82,7 @@ HANDLE WINAPI CreateNamedPipeW (LPCWSTR lpName, DWORD dwOpenMode,
DWORD nDefaultTimeOut, DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes) LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
FIXME (win32, "(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n", FIXME_(win32)("(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n",
debugstr_w(lpName), dwOpenMode, dwPipeMode, nMaxInstances, debugstr_w(lpName), dwOpenMode, dwPipeMode, nMaxInstances,
nOutBufferSize, nInBufferSize, nDefaultTimeOut, nOutBufferSize, nInBufferSize, nDefaultTimeOut,
lpSecurityAttributes); lpSecurityAttributes);
@ -128,7 +128,7 @@ BOOL WINAPI SetSystemPowerState(BOOL suspend_or_hibernate,
HANDLE WINAPI CreateMailslotA( LPCSTR lpName, DWORD nMaxMessageSize, HANDLE WINAPI CreateMailslotA( LPCSTR lpName, DWORD nMaxMessageSize,
DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa) DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa)
{ {
FIXME(win32, "(%s,%ld,%ld,%p): stub\n", debugstr_a(lpName), FIXME_(win32)("(%s,%ld,%ld,%p): stub\n", debugstr_a(lpName),
nMaxMessageSize, lReadTimeout, sa); nMaxMessageSize, lReadTimeout, sa);
return 1; return 1;
} }
@ -150,7 +150,7 @@ HANDLE WINAPI CreateMailslotA( LPCSTR lpName, DWORD nMaxMessageSize,
HANDLE WINAPI CreateMailslotW( LPCWSTR lpName, DWORD nMaxMessageSize, HANDLE WINAPI CreateMailslotW( LPCWSTR lpName, DWORD nMaxMessageSize,
DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa ) DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa )
{ {
FIXME(win32, "(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName), FIXME_(win32)("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName),
nMaxMessageSize, lReadTimeout, sa); nMaxMessageSize, lReadTimeout, sa);
return 1; return 1;
} }
@ -174,7 +174,7 @@ BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
LPDWORD lpNextSize, LPDWORD lpMessageCount, LPDWORD lpNextSize, LPDWORD lpMessageCount,
LPDWORD lpReadTimeout ) LPDWORD lpReadTimeout )
{ {
FIXME(win32, "(%d): stub\n",hMailslot); FIXME_(win32)("(%d): stub\n",hMailslot);
*lpMaxMessageSize = (DWORD)NULL; *lpMaxMessageSize = (DWORD)NULL;
*lpNextSize = (DWORD)NULL; *lpNextSize = (DWORD)NULL;
*lpMessageCount = (DWORD)NULL; *lpMessageCount = (DWORD)NULL;
@ -193,7 +193,7 @@ DWORD WINAPI GetCompressedFileSizeA(
LPCSTR lpFileName, LPCSTR lpFileName,
LPDWORD lpFileSizeHigh) LPDWORD lpFileSizeHigh)
{ {
FIXME(win32, "(...): stub\n"); FIXME_(win32)("(...): stub\n");
return 0xffffffff; return 0xffffffff;
} }
@ -209,7 +209,7 @@ DWORD WINAPI GetCompressedFileSizeW(
LPCWSTR lpFileName, /* [in] Pointer to name of file */ LPCWSTR lpFileName, /* [in] Pointer to name of file */
LPDWORD lpFileSizeHigh) /* [out] Receives high-order doubleword of size */ LPDWORD lpFileSizeHigh) /* [out] Receives high-order doubleword of size */
{ {
FIXME(win32, "(%s,%p): stub\n",debugstr_w(lpFileName),lpFileSizeHigh); FIXME_(win32)("(%s,%p): stub\n",debugstr_w(lpFileName),lpFileSizeHigh);
return 0xffffffff; return 0xffffffff;
} }
@ -226,7 +226,7 @@ DWORD WINAPI GetCompressedFileSizeW(
*/ */
DWORD WINAPI GetProcessWindowStation(void) DWORD WINAPI GetProcessWindowStation(void)
{ {
FIXME(win32, "(void): stub\n"); FIXME_(win32)("(void): stub\n");
return 1; return 1;
} }
@ -246,7 +246,7 @@ DWORD WINAPI GetProcessWindowStation(void)
*/ */
DWORD WINAPI GetThreadDesktop( DWORD dwThreadId ) DWORD WINAPI GetThreadDesktop( DWORD dwThreadId )
{ {
FIXME(win32, "(%lx): stub\n",dwThreadId); FIXME_(win32)("(%lx): stub\n",dwThreadId);
return 1; return 1;
} }
@ -260,7 +260,7 @@ DWORD WINAPI GetThreadDesktop( DWORD dwThreadId )
*/ */
VOID WINAPI SetDebugErrorLevel( DWORD dwLevel ) VOID WINAPI SetDebugErrorLevel( DWORD dwLevel )
{ {
FIXME(win32, "(%ld): stub\n", dwLevel); FIXME_(win32)("(%ld): stub\n", dwLevel);
} }
@ -277,7 +277,7 @@ VOID WINAPI SetDebugErrorLevel( DWORD dwLevel )
BOOL WINAPI WaitForDebugEvent( LPDEBUG_EVENT lpDebugEvent, BOOL WINAPI WaitForDebugEvent( LPDEBUG_EVENT lpDebugEvent,
DWORD dwMilliseconds ) DWORD dwMilliseconds )
{ {
FIXME(win32, "(%p,%ld): stub\n", lpDebugEvent, dwMilliseconds); FIXME_(win32)("(%p,%ld): stub\n", lpDebugEvent, dwMilliseconds);
return FALSE; return FALSE;
} }
@ -304,13 +304,13 @@ BOOL WINAPI SetComputerNameA( LPCSTR lpComputerName )
*/ */
BOOL WINAPI SetComputerNameW( LPCWSTR lpComputerName ) BOOL WINAPI SetComputerNameW( LPCWSTR lpComputerName )
{ {
FIXME(win32, "(%s): stub\n", debugstr_w(lpComputerName)); FIXME_(win32)("(%s): stub\n", debugstr_w(lpComputerName));
return TRUE; return TRUE;
} }
BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE ports,DWORD bufsize,LPDWORD bufneeded,LPDWORD bufreturned) { BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE ports,DWORD bufsize,LPDWORD bufneeded,LPDWORD bufreturned) {
FIXME(win32,"(%s,%ld,%p,%ld,%p,%p), stub!\n",name,level,ports,bufsize,bufneeded,bufreturned); FIXME_(win32)("(%s,%ld,%p,%ld,%p,%p), stub!\n",name,level,ports,bufsize,bufneeded,bufreturned);
return FALSE; return FALSE;
} }
@ -319,7 +319,7 @@ BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE ports,DWORD bufsize,LPDWORD
* *
*/ */
BOOL WINAPI IsDebuggerPresent() { BOOL WINAPI IsDebuggerPresent() {
FIXME(win32," ... no debuggers yet, returning FALSE.\n"); FIXME_(win32)(" ... no debuggers yet, returning FALSE.\n");
return FALSE; return FALSE;
} }
@ -332,7 +332,7 @@ BOOL WINAPI IsDebuggerPresent() {
HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags, HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
BOOL fInherit, DWORD dwDesiredAccess ) BOOL fInherit, DWORD dwDesiredAccess )
{ {
FIXME(win32,"(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags, FIXME_(win32)("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags,
fInherit,dwDesiredAccess); fInherit,dwDesiredAccess);
return 1; return 1;
} }
@ -341,14 +341,14 @@ HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, int nIndex, BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, int nIndex,
LPVOID pvInfo, DWORD nLength ) LPVOID pvInfo, DWORD nLength )
{ {
FIXME(win32,"(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength); FIXME_(win32)("(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
return TRUE; return TRUE;
} }
BOOL WINAPI SetThreadDesktop( HANDLE hDesktop ) BOOL WINAPI SetThreadDesktop( HANDLE hDesktop )
{ {
FIXME(win32,"(%x): stub\n",hDesktop); FIXME_(win32)("(%x): stub\n",hDesktop);
return TRUE; return TRUE;
} }
@ -356,6 +356,6 @@ HANDLE WINAPI CreateIoCompletionPort(HANDLE hFileHandle,
HANDLE hExistingCompletionPort, DWORD dwCompletionKey, HANDLE hExistingCompletionPort, DWORD dwCompletionKey,
DWORD dwNumberOfConcurrentThreads) DWORD dwNumberOfConcurrentThreads)
{ {
FIXME(win32, "(%04x, %04x, %08lx, %08lx): stub.\n", hFileHandle, hExistingCompletionPort, dwCompletionKey, dwNumberOfConcurrentThreads); FIXME_(win32)("(%04x, %04x, %08lx, %08lx): stub.\n", hFileHandle, hExistingCompletionPort, dwCompletionKey, dwNumberOfConcurrentThreads);
return (HANDLE)NULL; return (HANDLE)NULL;
} }

View File

@ -15,7 +15,7 @@
#include "task.h" #include "task.h"
#include "callback.h" #include "callback.h"
#include "stackframe.h" #include "stackframe.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosmem) DECLARE_DEBUG_CHANNEL(dosmem)
DECLARE_DEBUG_CHANNEL(thread) DECLARE_DEBUG_CHANNEL(thread)
@ -36,7 +36,7 @@ BOOL WINAPI WOWGetDescriptor(SEGPTR segptr,LPLDT_ENTRY ldtent)
*/ */
DWORD WINAPI GetWin16DOSEnv() DWORD WINAPI GetWin16DOSEnv()
{ {
FIXME(dosmem,"stub, returning 0\n"); FIXME_(dosmem)("stub, returning 0\n");
return 0; return 0;
} }
@ -47,7 +47,7 @@ LPVOID WINAPI GetPK16SysVar(void)
{ {
static BYTE PK16SysVar[128]; static BYTE PK16SysVar[128];
FIXME(win32, "()\n"); FIXME_(win32)("()\n");
return PK16SysVar; return PK16SysVar;
} }
@ -57,7 +57,7 @@ LPVOID WINAPI GetPK16SysVar(void)
REGS_ENTRYPOINT(CommonUnimpStub) REGS_ENTRYPOINT(CommonUnimpStub)
{ {
if (EAX_reg(context)) if (EAX_reg(context))
MSG( "*** Unimplemented Win32 API: %s\n", (LPSTR)EAX_reg(context) ); MESSAGE( "*** Unimplemented Win32 API: %s\n", (LPSTR)EAX_reg(context) );
switch ((ECX_reg(context) >> 4) & 0x0f) switch ((ECX_reg(context) >> 4) & 0x0f)
{ {
@ -82,19 +82,19 @@ void WINAPI HouseCleanLogicallyDeadHandles(void)
BOOL WINAPI _KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x) { BOOL WINAPI _KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x) {
FIXME(thread,"(%d,%ld,0x%08lx): stub\n",threadid,exitcode,x); FIXME_(thread)("(%d,%ld,0x%08lx): stub\n",threadid,exitcode,x);
return TRUE; return TRUE;
} }
DWORD WINAPI _KERNEL32_99(DWORD x) { DWORD WINAPI _KERNEL32_99(DWORD x) {
FIXME(win32,"(0x%08lx): stub\n",x); FIXME_(win32)("(0x%08lx): stub\n",x);
return 1; return 1;
} }
/*********************************************************************** /***********************************************************************
* PrivateExtractIconExA [USER32.442] * PrivateExtractIconExA [USER32.442]
*/ */
HRESULT WINAPI PrivateExtractIconExA ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y ) HRESULT WINAPI PrivateExtractIconExA ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
{ FIXME(win,"0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y); { FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
return 0; return 0;
} }
@ -102,7 +102,7 @@ HRESULT WINAPI PrivateExtractIconExA ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD
* PrivateExtractIconExW [USER32.443] * PrivateExtractIconExW [USER32.443]
*/ */
HRESULT WINAPI PrivateExtractIconExW ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y ) HRESULT WINAPI PrivateExtractIconExW ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD y )
{ FIXME(win,"0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y); { FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,y);
return 0; return 0;
} }
@ -110,7 +110,7 @@ HRESULT WINAPI PrivateExtractIconExW ( DWORD u, DWORD v, DWORD w, DWORD x ,DWORD
* PrivateExtractIconsW [USER32.445] * PrivateExtractIconsW [USER32.445]
*/ */
HRESULT WINAPI PrivateExtractIconsW ( DWORD r, DWORD s, DWORD t, DWORD u, DWORD v, DWORD w, DWORD x, DWORD y ) HRESULT WINAPI PrivateExtractIconsW ( DWORD r, DWORD s, DWORD t, DWORD u, DWORD v, DWORD w, DWORD x, DWORD y )
{ FIXME(win,"0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",r,s,t,u,v,w,x,y ); { FIXME_(win)("0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",r,s,t,u,v,w,x,y );
return 0; return 0;
} }
@ -118,7 +118,7 @@ HRESULT WINAPI PrivateExtractIconsW ( DWORD r, DWORD s, DWORD t, DWORD u, DWORD
* RegisterShellHookWindow [USER32.459] * RegisterShellHookWindow [USER32.459]
*/ */
HRESULT WINAPI RegisterShellHookWindow ( DWORD u ) HRESULT WINAPI RegisterShellHookWindow ( DWORD u )
{ FIXME(win,"0x%08lx stub\n",u); { FIXME_(win)("0x%08lx stub\n",u);
return 0; return 0;
} }
@ -126,7 +126,7 @@ HRESULT WINAPI RegisterShellHookWindow ( DWORD u )
* DeregisterShellHookWindow [USER32.132] * DeregisterShellHookWindow [USER32.132]
*/ */
HRESULT WINAPI DeregisterShellHookWindow ( DWORD u ) HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
{ FIXME(win,"0x%08lx stub\n",u); { FIXME_(win)("0x%08lx stub\n",u);
return 0; return 0;
} }
@ -134,7 +134,7 @@ HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
* RegisterTaskList32 [USER23.436] * RegisterTaskList32 [USER23.436]
*/ */
DWORD WINAPI RegisterTaskList (DWORD x) DWORD WINAPI RegisterTaskList (DWORD x)
{ FIXME(win,"0x%08lx\n",x); { FIXME_(win)("0x%08lx\n",x);
return TRUE; return TRUE;
} }

View File

@ -25,7 +25,7 @@
#include "mouse.h" #include "mouse.h"
#include "message.h" #include "message.h"
#include "sysmetrics.h" #include "sysmetrics.h"
#include "debug.h" #include "debugtools.h"
#include "debugtools.h" #include "debugtools.h"
#include "struct32.h" #include "struct32.h"
#include "winerror.h" #include "winerror.h"
@ -138,8 +138,8 @@ void WINAPI keybd_event( BYTE bVk, BYTE bScan,
keylp.lp1.context = (InputKeyStateTable[VK_MENU] & 0x80) != 0; /* 1 if alt */ keylp.lp1.context = (InputKeyStateTable[VK_MENU] & 0x80) != 0; /* 1 if alt */
TRACE(key, " wParam=%04X, lParam=%08lX\n", bVk, keylp.lp2 ); TRACE_(key)(" wParam=%04X, lParam=%08lX\n", bVk, keylp.lp2 );
TRACE(key, " InputKeyState=%X\n", InputKeyStateTable[bVk] ); TRACE_(key)(" InputKeyState=%X\n", InputKeyStateTable[bVk] );
hardware_event( message, bVk, keylp.lp2, posX, posY, time, extra ); hardware_event( message, bVk, keylp.lp2, posX, posY, time, extra );
} }
@ -246,7 +246,7 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
BOOL16 WINAPI EnableHardwareInput16(BOOL16 bEnable) BOOL16 WINAPI EnableHardwareInput16(BOOL16 bEnable)
{ {
BOOL16 bOldState = InputEnabled; BOOL16 bOldState = InputEnabled;
FIXME(event,"(%d) - stub\n", bEnable); FIXME_(event)("(%d) - stub\n", bEnable);
InputEnabled = bEnable; InputEnabled = bEnable;
return bOldState; return bOldState;
} }
@ -289,7 +289,7 @@ HWND EVENT_Capture(HWND hwnd, INT16 ht)
/* Get the messageQ for the current thread */ /* Get the messageQ for the current thread */
if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() )))
{ {
WARN( win, "\tCurrent message queue not found. Exiting!\n" ); WARN_(win)("\tCurrent message queue not found. Exiting!\n" );
goto CLEANUP; goto CLEANUP;
} }
@ -306,7 +306,7 @@ HWND EVENT_Capture(HWND hwnd, INT16 ht)
wndPtr = WIN_FindWndPtr( hwnd ); wndPtr = WIN_FindWndPtr( hwnd );
if (wndPtr) if (wndPtr)
{ {
TRACE(win, "(0x%04x)\n", hwnd ); TRACE_(win)("(0x%04x)\n", hwnd );
captureWnd = hwnd; captureWnd = hwnd;
captureHT = ht; captureHT = ht;
} }
@ -321,7 +321,7 @@ HWND EVENT_Capture(HWND hwnd, INT16 ht)
pMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( wndPtr->hmemTaskQ ); pMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( wndPtr->hmemTaskQ );
if ( !pMsgQ ) if ( !pMsgQ )
{ {
WARN( win, "\tMessage queue not found. Exiting!\n" ); WARN_(win)("\tMessage queue not found. Exiting!\n" );
goto CLEANUP; goto CLEANUP;
} }
@ -402,7 +402,7 @@ HWND WINAPI GetCapture(void)
/* Get the messageQ for the current thread */ /* Get the messageQ for the current thread */
if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() )))
{ {
TRACE( win, "GetCapture32: Current message queue not found. Exiting!\n" ); TRACE_(win)("GetCapture32: Current message queue not found. Exiting!\n" );
return 0; return 0;
} }
@ -462,7 +462,7 @@ INT16 WINAPI GetKeyState(INT vkey)
*/ */
VOID WINAPI GetKeyboardState(LPBYTE lpKeyState) VOID WINAPI GetKeyboardState(LPBYTE lpKeyState)
{ {
TRACE(key, "(%p)\n", lpKeyState); TRACE_(key)("(%p)\n", lpKeyState);
if (lpKeyState != NULL) { if (lpKeyState != NULL) {
QueueKeyStateTable[VK_LBUTTON] = MouseButtonsStates[0] ? 0x80 : 0; QueueKeyStateTable[VK_LBUTTON] = MouseButtonsStates[0] ? 0x80 : 0;
QueueKeyStateTable[VK_MBUTTON] = MouseButtonsStates[1] ? 0x80 : 0; QueueKeyStateTable[VK_MBUTTON] = MouseButtonsStates[1] ? 0x80 : 0;
@ -476,7 +476,7 @@ VOID WINAPI GetKeyboardState(LPBYTE lpKeyState)
*/ */
VOID WINAPI SetKeyboardState(LPBYTE lpKeyState) VOID WINAPI SetKeyboardState(LPBYTE lpKeyState)
{ {
TRACE(key, "(%p)\n", lpKeyState); TRACE_(key)("(%p)\n", lpKeyState);
if (lpKeyState != NULL) { if (lpKeyState != NULL) {
memcpy(QueueKeyStateTable, lpKeyState, 256); memcpy(QueueKeyStateTable, lpKeyState, 256);
MouseButtonsStates[0] = (QueueKeyStateTable[VK_LBUTTON] != 0); MouseButtonsStates[0] = (QueueKeyStateTable[VK_LBUTTON] != 0);
@ -525,7 +525,7 @@ WORD WINAPI GetAsyncKeyState(INT nKey)
memset( AsyncMouseButtonsStates, 0, sizeof(AsyncMouseButtonsStates) ); memset( AsyncMouseButtonsStates, 0, sizeof(AsyncMouseButtonsStates) );
memset( AsyncKeyStateTable, 0, sizeof(AsyncKeyStateTable) ); memset( AsyncKeyStateTable, 0, sizeof(AsyncKeyStateTable) );
TRACE(key, "(%x) -> %x\n", nKey, retval); TRACE_(key)("(%x) -> %x\n", nKey, retval);
return retval; return retval;
} }
@ -552,14 +552,14 @@ static BOOL KBD_translate_accelerator(HWND hWnd,LPMSG msg,
if (msg->message == WM_CHAR) { if (msg->message == WM_CHAR) {
if ( !(fVirt & FALT) && !(fVirt & FVIRTKEY) ) if ( !(fVirt & FALT) && !(fVirt & FVIRTKEY) )
{ {
TRACE(accel,"found accel for WM_CHAR: ('%c')\n", TRACE_(accel)("found accel for WM_CHAR: ('%c')\n",
msg->wParam&0xff); msg->wParam&0xff);
sendmsg=TRUE; sendmsg=TRUE;
} }
} else { } else {
if(fVirt & FVIRTKEY) { if(fVirt & FVIRTKEY) {
INT mask = 0; INT mask = 0;
TRACE(accel,"found accel for virt_key %04x (scan %04x)\n", TRACE_(accel)("found accel for virt_key %04x (scan %04x)\n",
msg->wParam,0xff & HIWORD(msg->lParam)); msg->wParam,0xff & HIWORD(msg->lParam));
if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT; if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL; if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
@ -567,7 +567,7 @@ static BOOL KBD_translate_accelerator(HWND hWnd,LPMSG msg,
if(mask == (fVirt & (FSHIFT | FCONTROL | FALT))) if(mask == (fVirt & (FSHIFT | FCONTROL | FALT)))
sendmsg=TRUE; sendmsg=TRUE;
else else
TRACE(accel,", but incorrect SHIFT/CTRL/ALT-state\n"); TRACE_(accel)(", but incorrect SHIFT/CTRL/ALT-state\n");
} }
else else
{ {
@ -575,7 +575,7 @@ static BOOL KBD_translate_accelerator(HWND hWnd,LPMSG msg,
{ {
if ((fVirt & FALT) && (msg->lParam & 0x20000000)) if ((fVirt & FALT) && (msg->lParam & 0x20000000))
{ /* ^^ ALT pressed */ { /* ^^ ALT pressed */
TRACE(accel,"found accel for Alt-%c\n", msg->wParam&0xff); TRACE_(accel)("found accel for Alt-%c\n", msg->wParam&0xff);
sendmsg=TRUE; sendmsg=TRUE;
} }
} }
@ -634,7 +634,7 @@ static BOOL KBD_translate_accelerator(HWND hWnd,LPMSG msg,
} }
if ( mesg==WM_COMMAND || mesg==WM_SYSCOMMAND ) if ( mesg==WM_COMMAND || mesg==WM_SYSCOMMAND )
{ {
TRACE(accel,", sending %s, wParam=%0x\n", TRACE_(accel)(", sending %s, wParam=%0x\n",
mesg==WM_COMMAND ? "WM_COMMAND" : "WM_SYSCOMMAND", mesg==WM_COMMAND ? "WM_COMMAND" : "WM_SYSCOMMAND",
cmd); cmd);
SendMessageA(hWnd, mesg, cmd, 0x00010000L); SendMessageA(hWnd, mesg, cmd, 0x00010000L);
@ -650,9 +650,9 @@ static BOOL KBD_translate_accelerator(HWND hWnd,LPMSG msg,
* #5: it's a menu option, but window is iconic * #5: it's a menu option, but window is iconic
* #6: it's a menu option, but disabled * #6: it's a menu option, but disabled
*/ */
TRACE(accel,", but won't send WM_{SYS}COMMAND, reason is #%d\n",mesg); TRACE_(accel)(", but won't send WM_{SYS}COMMAND, reason is #%d\n",mesg);
if(mesg==0) if(mesg==0)
ERR(accel, " unknown reason - please report!"); ERR_(accel)(" unknown reason - please report!");
} }
return TRUE; return TRUE;
} }
@ -669,7 +669,7 @@ INT WINAPI TranslateAccelerator(HWND hWnd, HACCEL hAccel, LPMSG msg)
LPACCEL16 lpAccelTbl = (LPACCEL16)LockResource16(hAccel); LPACCEL16 lpAccelTbl = (LPACCEL16)LockResource16(hAccel);
int i; int i;
TRACE(accel,"hwnd=0x%x hacc=0x%x msg=0x%x wp=0x%x lp=0x%lx\n", hWnd, hAccel, msg->message, msg->wParam, msg->lParam); TRACE_(accel)("hwnd=0x%x hacc=0x%x msg=0x%x wp=0x%x lp=0x%lx\n", hWnd, hAccel, msg->message, msg->wParam, msg->lParam);
if (hAccel == 0 || msg == NULL || if (hAccel == 0 || msg == NULL ||
(msg->message != WM_KEYDOWN && (msg->message != WM_KEYDOWN &&
@ -677,12 +677,12 @@ INT WINAPI TranslateAccelerator(HWND hWnd, HACCEL hAccel, LPMSG msg)
msg->message != WM_SYSKEYDOWN && msg->message != WM_SYSKEYDOWN &&
msg->message != WM_SYSKEYUP && msg->message != WM_SYSKEYUP &&
msg->message != WM_CHAR)) { msg->message != WM_CHAR)) {
WARN(accel, "erraneous input parameters\n"); WARN_(accel)("erraneous input parameters\n");
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
TRACE(accel, "TranslateAccelerators hAccel=%04x, hWnd=%04x," TRACE_(accel)("TranslateAccelerators hAccel=%04x, hWnd=%04x,"
"msg->hwnd=%04x, msg->message=%04x\n", "msg->hwnd=%04x, msg->message=%04x\n",
hAccel,hWnd,msg->hwnd,msg->message); hAccel,hWnd,msg->hwnd,msg->message);
@ -693,7 +693,7 @@ INT WINAPI TranslateAccelerator(HWND hWnd, HACCEL hAccel, LPMSG msg)
lpAccelTbl[i].key,lpAccelTbl[i].cmd)) lpAccelTbl[i].key,lpAccelTbl[i].cmd))
return 1; return 1;
} while ((lpAccelTbl[i++].fVirt & 0x80) == 0); } while ((lpAccelTbl[i++].fVirt & 0x80) == 0);
WARN(accel, "couldn't translate accelerator key\n"); WARN_(accel)("couldn't translate accelerator key\n");
return 0; return 0;
} }
@ -712,12 +712,12 @@ INT16 WINAPI TranslateAccelerator16(HWND16 hWnd, HACCEL16 hAccel, LPMSG16 msg)
msg->message != WM_SYSKEYDOWN && msg->message != WM_SYSKEYDOWN &&
msg->message != WM_SYSKEYUP && msg->message != WM_SYSKEYUP &&
msg->message != WM_CHAR)) { msg->message != WM_CHAR)) {
WARN(accel, "erraneous input parameters\n"); WARN_(accel)("erraneous input parameters\n");
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
TRACE(accel, "TranslateAccelerators hAccel=%04x, hWnd=%04x,\ TRACE_(accel)("TranslateAccelerators hAccel=%04x, hWnd=%04x,\
msg->hwnd=%04x, msg->message=%04x\n", hAccel,hWnd,msg->hwnd,msg->message); msg->hwnd=%04x, msg->message=%04x\n", hAccel,hWnd,msg->hwnd,msg->message);
STRUCT32_MSG16to32(msg,&msg32); STRUCT32_MSG16to32(msg,&msg32);
@ -729,7 +729,7 @@ msg->hwnd=%04x, msg->message=%04x\n", hAccel,hWnd,msg->hwnd,msg->message);
lpAccelTbl[i].key,lpAccelTbl[i].cmd)) lpAccelTbl[i].key,lpAccelTbl[i].cmd))
return 1; return 1;
} while ((lpAccelTbl[i++].fVirt & 0x80) == 0); } while ((lpAccelTbl[i++].fVirt & 0x80) == 0);
WARN(accel, "couldn't translate accelerator key\n"); WARN_(accel)("couldn't translate accelerator key\n");
return 0; return 0;
} }
@ -798,7 +798,7 @@ UINT WINAPI MapVirtualKeyW(UINT code, UINT maptype)
UINT WINAPI MapVirtualKeyEx32A(UINT code, UINT maptype, HKL hkl) UINT WINAPI MapVirtualKeyEx32A(UINT code, UINT maptype, HKL hkl)
{ {
if (hkl) if (hkl)
FIXME(keyboard,"(%d,%d,0x%08lx), hkl unhandled!\n",code,maptype,(DWORD)hkl); FIXME_(keyboard)("(%d,%d,0x%08lx), hkl unhandled!\n",code,maptype,(DWORD)hkl);
return MapVirtualKey16(code,maptype); return MapVirtualKey16(code,maptype);
} }
@ -830,7 +830,7 @@ HKL WINAPI GetKeyboardLayout(DWORD dwLayout)
HKL layout; HKL layout;
layout = GetSystemDefaultLCID(); /* FIXME */ layout = GetSystemDefaultLCID(); /* FIXME */
layout |= (layout<<16); /* FIXME */ layout |= (layout<<16); /* FIXME */
TRACE(keyboard,"returning %08x\n",layout); TRACE_(keyboard)("returning %08x\n",layout);
return layout; return layout;
} }
@ -902,8 +902,8 @@ INT WINAPI ToAsciiEx( UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
*/ */
HKL WINAPI ActivateKeyboardLayout(HKL hLayout, UINT flags) HKL WINAPI ActivateKeyboardLayout(HKL hLayout, UINT flags)
{ {
TRACE(keyboard, "(%d, %d)\n", hLayout, flags); TRACE_(keyboard)("(%d, %d)\n", hLayout, flags);
ERR(keyboard,"Only default system keyboard layout supported. Call ignored.\n"); ERR_(keyboard)("Only default system keyboard layout supported. Call ignored.\n");
return 0; return 0;
} }
@ -920,7 +920,7 @@ HKL WINAPI ActivateKeyboardLayout(HKL hLayout, UINT flags)
*/ */
INT WINAPI GetKeyboardLayoutList(INT nBuff,HKL *layouts) INT WINAPI GetKeyboardLayoutList(INT nBuff,HKL *layouts)
{ {
TRACE(keyboard,"(%d,%p)\n",nBuff,layouts); TRACE_(keyboard)("(%d,%p)\n",nBuff,layouts);
if (!nBuff || !layouts) if (!nBuff || !layouts)
return 1; return 1;
if (layouts) if (layouts)
@ -933,7 +933,7 @@ INT WINAPI GetKeyboardLayoutList(INT nBuff,HKL *layouts)
* RegisterHotKey (USER32.433) * RegisterHotKey (USER32.433)
*/ */
BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) { BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) {
FIXME(keyboard,"(0x%08x,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk); FIXME_(keyboard)("(0x%08x,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk);
return TRUE; return TRUE;
} }
@ -941,7 +941,7 @@ BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) {
* UnregisterHotKey (USER32.565) * UnregisterHotKey (USER32.565)
*/ */
BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) { BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) {
FIXME(keyboard,"(0x%08x,%d): stub\n",hwnd,id); FIXME_(keyboard)("(0x%08x,%d): stub\n",hwnd,id);
return TRUE; return TRUE;
} }
@ -957,7 +957,7 @@ INT WINAPI ToUnicode(
int cchBuff, int cchBuff,
UINT wFlags) { UINT wFlags) {
FIXME(keyboard,": stub\n"); FIXME_(keyboard)(": stub\n");
return 0; return 0;
} }
@ -967,8 +967,8 @@ INT WINAPI ToUnicode(
*/ */
HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags) HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags)
{ {
TRACE(keyboard, "(%s, %d)\n", pwszKLID, Flags); TRACE_(keyboard)("(%s, %d)\n", pwszKLID, Flags);
ERR(keyboard,"Only default system keyboard layout supported. Call ignored.\n"); ERR_(keyboard)("Only default system keyboard layout supported. Call ignored.\n");
return 0; return 0;
} }

View File

@ -19,7 +19,7 @@
#include "heap.h" #include "heap.h"
#include "keyboard.h" #include "keyboard.h"
#include "message.h" #include "message.h"
#include "debug.h" #include "debugtools.h"
#include "debugtools.h" #include "debugtools.h"
#include "struct32.h" #include "struct32.h"
#include "winerror.h" #include "winerror.h"
@ -86,7 +86,7 @@ void KEYBOARD_SendEvent( BYTE bVk, BYTE bScan, DWORD dwFlags,
if ( !DefKeybEventProc ) return; if ( !DefKeybEventProc ) return;
TRACE( event, "(%d,%d,%04lX)\n", bVk, bScan, dwFlags ); TRACE_(event)("(%d,%d,%04lX)\n", bVk, bScan, dwFlags );
wke.magic = WINE_KEYBDEVENT_MAGIC; wke.magic = WINE_KEYBDEVENT_MAGIC;
wke.posX = posX; wke.posX = posX;
@ -105,7 +105,7 @@ void KEYBOARD_SendEvent( BYTE bVk, BYTE bScan, DWORD dwFlags,
*/ */
VOID WINAPI ScreenSwitchEnable16(WORD unused) VOID WINAPI ScreenSwitchEnable16(WORD unused)
{ {
FIXME(keyboard,"(%04x): stub\n",unused); FIXME_(keyboard)("(%04x): stub\n",unused);
} }
/********************************************************************** /**********************************************************************
@ -113,7 +113,7 @@ VOID WINAPI ScreenSwitchEnable16(WORD unused)
*/ */
DWORD WINAPI OemKeyScan(WORD wOemChar) DWORD WINAPI OemKeyScan(WORD wOemChar)
{ {
TRACE(keyboard,"*OemKeyScan (%d)\n",wOemChar); TRACE_(keyboard)("*OemKeyScan (%d)\n",wOemChar);
return wOemChar; return wOemChar;
} }
@ -146,7 +146,7 @@ WORD WINAPI VkKeyScan16(CHAR cChar)
*/ */
INT16 WINAPI GetKeyboardType16(INT16 nTypeFlag) INT16 WINAPI GetKeyboardType16(INT16 nTypeFlag)
{ {
TRACE(keyboard,"(%d)\n",nTypeFlag); TRACE_(keyboard)("(%d)\n",nTypeFlag);
switch(nTypeFlag) switch(nTypeFlag)
{ {
case 0: /* Keyboard type */ case 0: /* Keyboard type */
@ -159,7 +159,7 @@ INT16 WINAPI GetKeyboardType16(INT16 nTypeFlag)
return 12; /* We're doing an 101 for now, so return 12 F-keys */ return 12; /* We're doing an 101 for now, so return 12 F-keys */
break; break;
default: default:
WARN(keyboard, "Unknown type\n"); WARN_(keyboard)("Unknown type\n");
return 0; /* The book says 0 here, so 0 */ return 0; /* The book says 0 here, so 0 */
} }
} }
@ -179,7 +179,7 @@ UINT16 WINAPI MapVirtualKey16(UINT16 wCode, UINT16 wMapType)
*/ */
INT16 WINAPI GetKBCodePage16(void) INT16 WINAPI GetKBCodePage16(void)
{ {
TRACE(keyboard,"(void)\n"); TRACE_(keyboard)("(void)\n");
return 850; return 850;
} }

View File

@ -28,7 +28,7 @@
#include "thread.h" #include "thread.h"
#include "options.h" #include "options.h"
#include "struct32.h" #include "struct32.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(key) DECLARE_DEBUG_CHANNEL(key)
DECLARE_DEBUG_CHANNEL(msg) DECLARE_DEBUG_CHANNEL(msg)
@ -689,7 +689,7 @@ static LRESULT MSG_SendMessageInterThread( HQUEUE16 hDestQueue,
return 0; return 0;
} }
TRACE(sendmsg,"SM: %s [%04x] (%04x -> %04x)\n", TRACE_(sendmsg)("SM: %s [%04x] (%04x -> %04x)\n",
SPY_GetMsgName(msg), msg, queue->self, hDestQueue ); SPY_GetMsgName(msg), msg, queue->self, hDestQueue );
/* fill up SMSG structure */ /* fill up SMSG structure */
@ -736,7 +736,7 @@ static LRESULT MSG_SendMessageInterThread( HQUEUE16 hDestQueue,
{ {
got: got:
*pRes = smsg->lResult; *pRes = smsg->lResult;
TRACE(sendmsg,"smResult = %08x\n", (unsigned)*pRes ); TRACE_(sendmsg)("smResult = %08x\n", (unsigned)*pRes );
break; break;
} }
@ -779,7 +779,7 @@ got:
QUEUE_Unlock( queue ); QUEUE_Unlock( queue );
QUEUE_Unlock( destQ ); QUEUE_Unlock( destQ );
TRACE(sendmsg,"done!\n"); TRACE_(sendmsg)("done!\n");
return retVal; return retVal;
} }
@ -805,7 +805,7 @@ BOOL WINAPI ReplyMessage( LRESULT result )
if (!(queue = (MESSAGEQUEUE*)QUEUE_Lock( GetFastQueue16() ))) if (!(queue = (MESSAGEQUEUE*)QUEUE_Lock( GetFastQueue16() )))
return FALSE; return FALSE;
TRACE(sendmsg,"ReplyMessage, queue %04x\n", queue->self); TRACE_(sendmsg)("ReplyMessage, queue %04x\n", queue->self);
if ( !(smsg = queue->smWaiting) if ( !(smsg = queue->smWaiting)
@ -816,7 +816,7 @@ BOOL WINAPI ReplyMessage( LRESULT result )
{ {
/* This is the first reply, so pass result to sender */ /* This is the first reply, so pass result to sender */
TRACE( sendmsg,"\trpm: smResult = %08lx\n", (long) result ); TRACE_(sendmsg)("\trpm: smResult = %08lx\n", (long) result );
EnterCriticalSection(&senderQ->cSection); EnterCriticalSection(&senderQ->cSection);
@ -858,7 +858,7 @@ BOOL WINAPI ReplyMessage( LRESULT result )
an early reply or a timeout */ an early reply or a timeout */
if ( smsg->flags & SMSG_RECEIVER_CLEANS ) if ( smsg->flags & SMSG_RECEIVER_CLEANS )
{ {
TRACE( sendmsg,"Receiver cleans up!\n" ); TRACE_(sendmsg)("Receiver cleans up!\n" );
HeapFree( SystemHeap, 0, smsg ); HeapFree( SystemHeap, 0, smsg );
} }
@ -1215,7 +1215,7 @@ BOOL WINAPI PeekMessageW(
{ {
BOOL bRet = PeekMessageA(lpmsg,hwnd,min,max,wRemoveMsg); BOOL bRet = PeekMessageA(lpmsg,hwnd,min,max,wRemoveMsg);
if (bRet) if (bRet)
FIXME(sendmsg, "(%s) unicode<->ascii\n", SPY_GetMsgName(lpmsg->message)); FIXME_(sendmsg)("(%s) unicode<->ascii\n", SPY_GetMsgName(lpmsg->message));
return bRet; return bRet;
} }
@ -1232,7 +1232,7 @@ BOOL16 WINAPI GetMessage16( SEGPTR msg, HWND16 hwnd, UINT16 first, UINT16 last)
STRUCT32_MSG32to16( &msg32, lpmsg ); STRUCT32_MSG32to16( &msg32, lpmsg );
TRACE(msg,"message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message, TRACE_(msg)("message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message,
hwnd, first, last ); hwnd, first, last );
return ret; return ret;
@ -1278,7 +1278,7 @@ BOOL WINAPI GetMessageA(MSG* lpmsg,HWND hwnd,UINT min,UINT max)
{ {
MSG_PeekMessage( lpmsg, hwnd, min, max, PM_REMOVE, FALSE ); MSG_PeekMessage( lpmsg, hwnd, min, max, PM_REMOVE, FALSE );
TRACE(msg,"message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message, TRACE_(msg)("message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message,
hwnd, min, max ); hwnd, min, max );
HOOK_CallHooksA( WH_GETMESSAGE, HC_ACTION, 0, (LPARAM)lpmsg ); HOOK_CallHooksA( WH_GETMESSAGE, HC_ACTION, 0, (LPARAM)lpmsg );
@ -1322,7 +1322,7 @@ BOOL WINAPI GetMessageW(
{ {
BOOL bRet = GetMessageA(lpmsg, hwnd, min, max); BOOL bRet = GetMessageA(lpmsg, hwnd, min, max);
if (bRet) if (bRet)
FIXME(sendmsg, "(%s) unicode<->ascii\n", SPY_GetMsgName(lpmsg->message)); FIXME_(sendmsg)("(%s) unicode<->ascii\n", SPY_GetMsgName(lpmsg->message));
return bRet; return bRet;
} }
@ -1364,19 +1364,19 @@ BOOL WINAPI PostMessageA( HWND hwnd, UINT message, WPARAM wParam,
if (hwnd == HWND_BROADCAST) if (hwnd == HWND_BROADCAST)
{ {
WND *pDesktop = WIN_GetDesktop(); WND *pDesktop = WIN_GetDesktop();
TRACE(msg,"HWND_BROADCAST !\n"); TRACE_(msg)("HWND_BROADCAST !\n");
for (wndPtr=WIN_LockWndPtr(pDesktop->child); wndPtr; WIN_UpdateWndPtr(&wndPtr,wndPtr->next)) for (wndPtr=WIN_LockWndPtr(pDesktop->child); wndPtr; WIN_UpdateWndPtr(&wndPtr,wndPtr->next))
{ {
if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION)
{ {
TRACE(msg,"BROADCAST Message to hWnd=%04x m=%04X w=%04X l=%08lX !\n", TRACE_(msg)("BROADCAST Message to hWnd=%04x m=%04X w=%04X l=%08lX !\n",
wndPtr->hwndSelf, message, wParam, lParam); wndPtr->hwndSelf, message, wParam, lParam);
PostMessageA( wndPtr->hwndSelf, message, wParam, lParam ); PostMessageA( wndPtr->hwndSelf, message, wParam, lParam );
} }
} }
WIN_ReleaseDesktop(); WIN_ReleaseDesktop();
TRACE(msg,"End of HWND_BROADCAST !\n"); TRACE_(msg)("End of HWND_BROADCAST !\n");
return TRUE; return TRUE;
} }
@ -1400,7 +1400,7 @@ END:
BOOL WINAPI PostMessageW( HWND hwnd, UINT message, WPARAM wParam, BOOL WINAPI PostMessageW( HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam ) LPARAM lParam )
{ {
FIXME(sendmsg, "(%s) unicode<->ascii\n", SPY_GetMsgName(message)); FIXME_(sendmsg)("(%s) unicode<->ascii\n", SPY_GetMsgName(message));
return PostMessageA( hwnd, message, wParam, lParam ); return PostMessageA( hwnd, message, wParam, lParam );
} }
@ -1474,14 +1474,14 @@ LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam,
} }
WIN_ReleaseDesktop(); WIN_ReleaseDesktop();
TRACE(msg,"HWND_BROADCAST !\n"); TRACE_(msg)("HWND_BROADCAST !\n");
for (ppWnd = list; *ppWnd; ppWnd++) for (ppWnd = list; *ppWnd; ppWnd++)
{ {
WIN_UpdateWndPtr(&wndPtr,*ppWnd); WIN_UpdateWndPtr(&wndPtr,*ppWnd);
if (!IsWindow(wndPtr->hwndSelf)) continue; if (!IsWindow(wndPtr->hwndSelf)) continue;
if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION)
{ {
TRACE(msg,"BROADCAST Message to hWnd=%04x m=%04X w=%04lX l=%08lX !\n", TRACE_(msg)("BROADCAST Message to hWnd=%04x m=%04X w=%04lX l=%08lX !\n",
wndPtr->hwndSelf, msg, (DWORD)wParam, lParam); wndPtr->hwndSelf, msg, (DWORD)wParam, lParam);
MSG_SendMessage( wndPtr->hwndSelf, msg, wParam, lParam, MSG_SendMessage( wndPtr->hwndSelf, msg, wParam, lParam,
timeout, flags, pRes); timeout, flags, pRes);
@ -1489,7 +1489,7 @@ LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam,
} }
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
WIN_ReleaseWinArray(list); WIN_ReleaseWinArray(list);
TRACE(msg,"End of HWND_BROADCAST !\n"); TRACE_(msg)("End of HWND_BROADCAST !\n");
return 1; return 1;
} }
@ -1522,7 +1522,7 @@ LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam,
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) if (!(wndPtr = WIN_FindWndPtr( hwnd )))
{ {
WARN(msg, "invalid hwnd %04x\n", hwnd ); WARN_(msg)("invalid hwnd %04x\n", hwnd );
return 0; return 0;
} }
if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ)) if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ))
@ -1621,7 +1621,7 @@ BOOL WINAPI PostThreadMessageA(DWORD idThread , UINT message,
BOOL WINAPI PostThreadMessageW(DWORD idThread , UINT message, BOOL WINAPI PostThreadMessageW(DWORD idThread , UINT message,
WPARAM wParam, LPARAM lParam ) WPARAM wParam, LPARAM lParam )
{ {
FIXME(sendmsg, "(%s) unicode<->ascii\n",SPY_GetMsgName(message)); FIXME_(sendmsg)("(%s) unicode<->ascii\n",SPY_GetMsgName(message));
return PostThreadMessageA(idThread, message, wParam, lParam); return PostThreadMessageA(idThread, message, wParam, lParam);
} }
@ -1984,15 +1984,15 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd,
BYTE wp[2]; BYTE wp[2];
if (message != WM_MOUSEMOVE && message != WM_TIMER) if (message != WM_MOUSEMOVE && message != WM_TIMER)
TRACE(msg, "(%s, %04X, %08lX)\n", TRACE_(msg)("(%s, %04X, %08lX)\n",
SPY_GetMsgName(message), wParam, lParam ); SPY_GetMsgName(message), wParam, lParam );
if(message >= WM_KEYFIRST && message <= WM_KEYLAST) if(message >= WM_KEYFIRST && message <= WM_KEYLAST)
TRACE(key, "(%s, %04X, %08lX)\n", TRACE_(key)("(%s, %04X, %08lX)\n",
SPY_GetMsgName(message), wParam, lParam ); SPY_GetMsgName(message), wParam, lParam );
if ((message != WM_KEYDOWN) && (message != WM_SYSKEYDOWN)) return FALSE; if ((message != WM_KEYDOWN) && (message != WM_SYSKEYDOWN)) return FALSE;
TRACE(key, "Translating key %04X, scancode %04X\n", TRACE_(key)("Translating key %04X, scancode %04X\n",
wParam, HIWORD(lParam) ); wParam, HIWORD(lParam) );
/* FIXME : should handle ToAscii yielding 2 */ /* FIXME : should handle ToAscii yielding 2 */
@ -2023,14 +2023,14 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd,
} }
dead_char = 0; dead_char = 0;
} }
TRACE(key, "1 -> PostMessage(%s)\n", SPY_GetMsgName(message)); TRACE_(key)("1 -> PostMessage(%s)\n", SPY_GetMsgName(message));
PostMessage16( hwnd, message, wp[0], lParam ); PostMessage16( hwnd, message, wp[0], lParam );
return TRUE; return TRUE;
case -1 : case -1 :
message = (message == WM_KEYDOWN) ? WM_DEADCHAR : WM_SYSDEADCHAR; message = (message == WM_KEYDOWN) ? WM_DEADCHAR : WM_SYSDEADCHAR;
dead_char = wp[0]; dead_char = wp[0];
TRACE(key, "-1 -> PostMessage(%s)\n", TRACE_(key)("-1 -> PostMessage(%s)\n",
SPY_GetMsgName(message)); SPY_GetMsgName(message));
PostMessage16( hwnd, message, wp[0], lParam ); PostMessage16( hwnd, message, wp[0], lParam );
return TRUE; return TRUE;
@ -2116,7 +2116,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
if (painting && wndPtr && if (painting && wndPtr &&
(wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
{ {
ERR(msg, "BeginPaint not called on WM_PAINT for hwnd %04x!\n", ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
msg->hwnd); msg->hwnd);
wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
/* Validate the update region to avoid infinite WM_PAINT loop */ /* Validate the update region to avoid infinite WM_PAINT loop */
@ -2194,7 +2194,7 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
if (painting && wndPtr && if (painting && wndPtr &&
(wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
{ {
ERR(msg, "BeginPaint not called on WM_PAINT for hwnd %04x!\n", ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
msg->hwnd); msg->hwnd);
wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
/* Validate the update region to avoid infinite WM_PAINT loop */ /* Validate the update region to avoid infinite WM_PAINT loop */
@ -2268,7 +2268,7 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
if (painting && wndPtr && if (painting && wndPtr &&
(wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
{ {
ERR(msg, "BeginPaint not called on WM_PAINT for hwnd %04x!\n", ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
msg->hwnd); msg->hwnd);
wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
/* Validate the update region to avoid infinite WM_PAINT loop */ /* Validate the update region to avoid infinite WM_PAINT loop */
@ -2285,7 +2285,7 @@ END:
*/ */
WORD WINAPI RegisterWindowMessage16( SEGPTR str ) WORD WINAPI RegisterWindowMessage16( SEGPTR str )
{ {
TRACE(msg, "%08lx\n", (DWORD)str ); TRACE_(msg)("%08lx\n", (DWORD)str );
return GlobalAddAtom16( str ); return GlobalAddAtom16( str );
} }
@ -2295,7 +2295,7 @@ WORD WINAPI RegisterWindowMessage16( SEGPTR str )
*/ */
WORD WINAPI RegisterWindowMessageA( LPCSTR str ) WORD WINAPI RegisterWindowMessageA( LPCSTR str )
{ {
TRACE(msg, "%s\n", str ); TRACE_(msg)("%s\n", str );
return GlobalAddAtomA( str ); return GlobalAddAtomA( str );
} }
@ -2305,7 +2305,7 @@ WORD WINAPI RegisterWindowMessageA( LPCSTR str )
*/ */
WORD WINAPI RegisterWindowMessageW( LPCWSTR str ) WORD WINAPI RegisterWindowMessageW( LPCWSTR str )
{ {
TRACE(msg, "%p\n", str ); TRACE_(msg)("%p\n", str );
return GlobalAddAtomW( str ); return GlobalAddAtomW( str );
} }
@ -2371,7 +2371,7 @@ LONG WINAPI BroadcastSystemMessage(
DWORD dwFlags,LPDWORD recipients,UINT uMessage,WPARAM wParam, DWORD dwFlags,LPDWORD recipients,UINT uMessage,WPARAM wParam,
LPARAM lParam LPARAM lParam
) { ) {
FIXME(sendmsg,"(%08lx,%08lx,%08x,%08x,%08lx): stub!\n", FIXME_(sendmsg)("(%08lx,%08lx,%08x,%08x,%08lx): stub!\n",
dwFlags,*recipients,uMessage,wParam,lParam dwFlags,*recipients,uMessage,wParam,lParam
); );
return 0; return 0;
@ -2386,7 +2386,7 @@ LONG WINAPI BroadcastSystemMessage(
*/ */
BOOL WINAPI SendNotifyMessageA(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) BOOL WINAPI SendNotifyMessageA(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{ BOOL ret = TRUE; { BOOL ret = TRUE;
FIXME(msg,"(%04x,%08x,%08x,%08lx) not complete\n", FIXME_(msg)("(%04x,%08x,%08x,%08lx) not complete\n",
hwnd, msg, wParam, lParam); hwnd, msg, wParam, lParam);
if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL)) if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL))
@ -2407,7 +2407,7 @@ BOOL WINAPI SendNotifyMessageA(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
*/ */
BOOL WINAPI SendNotifyMessageW(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) BOOL WINAPI SendNotifyMessageW(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{ BOOL ret = TRUE; { BOOL ret = TRUE;
FIXME(msg,"(%04x,%08x,%08x,%08lx) not complete\n", FIXME_(msg)("(%04x,%08x,%08x,%08lx) not complete\n",
hwnd, msg, wParam, lParam); hwnd, msg, wParam, lParam);
if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL)) if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL))
@ -2429,11 +2429,11 @@ BOOL WINAPI SendMessageCallbackA(
HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam, HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,
FARPROC lpResultCallBack,DWORD dwData) FARPROC lpResultCallBack,DWORD dwData)
{ {
FIXME(msg,"(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n", FIXME_(msg)("(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n",
hWnd,Msg,wParam,lParam,lpResultCallBack,dwData); hWnd,Msg,wParam,lParam,lpResultCallBack,dwData);
if ( hWnd == HWND_BROADCAST) if ( hWnd == HWND_BROADCAST)
{ PostMessageA( hWnd, Msg, wParam, lParam); { PostMessageA( hWnd, Msg, wParam, lParam);
FIXME(msg,"Broadcast: Callback will not be called!\n"); FIXME_(msg)("Broadcast: Callback will not be called!\n");
return TRUE; return TRUE;
} }
(lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam )); (lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam ));
@ -2449,11 +2449,11 @@ BOOL WINAPI SendMessageCallbackW(
HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam, HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,
FARPROC lpResultCallBack,DWORD dwData) FARPROC lpResultCallBack,DWORD dwData)
{ {
FIXME(msg,"(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n", FIXME_(msg)("(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n",
hWnd,Msg,wParam,lParam,lpResultCallBack,dwData); hWnd,Msg,wParam,lParam,lpResultCallBack,dwData);
if ( hWnd == HWND_BROADCAST) if ( hWnd == HWND_BROADCAST)
{ PostMessageW( hWnd, Msg, wParam, lParam); { PostMessageW( hWnd, Msg, wParam, lParam);
FIXME(msg,"Broadcast: Callback will not be called!\n"); FIXME_(msg)("Broadcast: Callback will not be called!\n");
return TRUE; return TRUE;
} }
(lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam )); (lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam ));

View File

@ -22,7 +22,7 @@
#include "queue.h" #include "queue.h"
#include "selectors.h" #include "selectors.h"
#include "tweak.h" #include "tweak.h"
#include "debug.h" #include "debugtools.h"
#include "options.h" #include "options.h"
#include "shellapi.h" #include "shellapi.h"
#include "cache.h" #include "cache.h"
@ -81,7 +81,7 @@ static void NC_AdjustRect( LPRECT16 rect, DWORD style, BOOL menu,
DWORD exStyle ) DWORD exStyle )
{ {
if (TWEAK_WineLook > WIN31_LOOK) if (TWEAK_WineLook > WIN31_LOOK)
ERR(nonclient, "Called in Win95 mode. Aiee! Please report this.\n" ); ERR_(nonclient)("Called in Win95 mode. Aiee! Please report this.\n" );
if(style & WS_ICONIC) return; if(style & WS_ICONIC) return;
/* Decide if the window will be managed (see CreateWindowEx) */ /* Decide if the window will be managed (see CreateWindowEx) */
@ -311,7 +311,7 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
{ {
RECT rc = *rect; RECT rc = *rect;
TRACE (nonclient, "(%08x,%08x,%p,%08x,%08x,\"%s\",%08x)\n", TRACE_(nonclient)("(%08x,%08x,%p,%08x,%08x,\"%s\",%08x)\n",
hwnd, hdc, rect, hFont, hIcon, str, uFlags); hwnd, hdc, rect, hFont, hIcon, str, uFlags);
/* drawing background */ /* drawing background */
@ -403,7 +403,7 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
/* drawing focus ??? */ /* drawing focus ??? */
if (uFlags & 0x2000) if (uFlags & 0x2000)
FIXME (nonclient, "undocumented flag (0x2000)!\n"); FIXME_(nonclient)("undocumented flag (0x2000)!\n");
return 0; return 0;
} }
@ -463,7 +463,7 @@ BOOL16 WINAPI AdjustWindowRectEx16( LPRECT16 rect, DWORD style,
WS_EX_STATICEDGE | WS_EX_TOOLWINDOW); WS_EX_STATICEDGE | WS_EX_TOOLWINDOW);
if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME; if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME;
TRACE(nonclient, "(%d,%d)-(%d,%d) %08lx %d %08lx\n", TRACE_(nonclient)("(%d,%d)-(%d,%d) %08lx %d %08lx\n",
rect->left, rect->top, rect->right, rect->bottom, rect->left, rect->top, rect->right, rect->bottom,
style, menu, exStyle ); style, menu, exStyle );
@ -519,7 +519,7 @@ LONG NC_HandleNCCalcSize( WND *pWnd, RECT *winRect )
winRect->bottom -= tmpRect.bottom; winRect->bottom -= tmpRect.bottom;
if (HAS_MENU(pWnd)) { if (HAS_MENU(pWnd)) {
TRACE(nonclient, "Calling " TRACE_(nonclient)("Calling "
"GetMenuBarHeight with HWND 0x%x, width %d, " "GetMenuBarHeight with HWND 0x%x, width %d, "
"at (%d, %d).\n", pWnd->hwndSelf, "at (%d, %d).\n", pWnd->hwndSelf,
winRect->right - winRect->left, winRect->right - winRect->left,
@ -636,7 +636,7 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt )
{ {
RECT16 rect; RECT16 rect;
TRACE(nonclient, "hwnd=%04x pt=%d,%d\n", TRACE_(nonclient)("hwnd=%04x pt=%d,%d\n",
wndPtr->hwndSelf, pt.x, pt.y ); wndPtr->hwndSelf, pt.x, pt.y );
GetWindowRect16 (wndPtr->hwndSelf, &rect ); GetWindowRect16 (wndPtr->hwndSelf, &rect );
@ -772,7 +772,7 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
{ {
RECT16 rect; RECT16 rect;
TRACE(nonclient, "hwnd=%04x pt=%d,%d\n", TRACE_(nonclient)("hwnd=%04x pt=%d,%d\n",
wndPtr->hwndSelf, pt.x, pt.y ); wndPtr->hwndSelf, pt.x, pt.y );
GetWindowRect16 (wndPtr->hwndSelf, &rect ); GetWindowRect16 (wndPtr->hwndSelf, &rect );
@ -1211,7 +1211,7 @@ static void NC_DrawFrame( HDC hdc, RECT *rect, BOOL dlgFrame,
INT width, height; INT width, height;
if (TWEAK_WineLook != WIN31_LOOK) if (TWEAK_WineLook != WIN31_LOOK)
ERR (nonclient, "Called in Win95 mode. Aiee! Please report this.\n" ); ERR_(nonclient)("Called in Win95 mode. Aiee! Please report this.\n" );
if (dlgFrame) if (dlgFrame)
{ {
@ -1565,7 +1565,7 @@ void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint )
active = wndPtr->flags & WIN_NCACTIVATED; active = wndPtr->flags & WIN_NCACTIVATED;
TRACE(nonclient, "%04x %d\n", hwnd, active ); TRACE_(nonclient)("%04x %d\n", hwnd, active );
if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW |
((clip > 1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN): 0) ))) return; ((clip > 1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN): 0) ))) return;
@ -1679,7 +1679,7 @@ void NC_DoNCPaint95(
active = wndPtr->flags & WIN_NCACTIVATED; active = wndPtr->flags & WIN_NCACTIVATED;
TRACE(nonclient, "%04x %d\n", hwnd, active ); TRACE_(nonclient)("%04x %d\n", hwnd, active );
/* MSDN docs are pretty idiotic here, they say app CAN use clipRgn in the call to /* MSDN docs are pretty idiotic here, they say app CAN use clipRgn in the call to
* GetDCEx implying that it is allowed not to use it either. However, the suggested * GetDCEx implying that it is allowed not to use it either. However, the suggested
@ -1748,14 +1748,14 @@ void NC_DoNCPaint95(
RECT r = rect; RECT r = rect;
r.bottom = rect.top + sysMetrics[SM_CYMENU]; r.bottom = rect.top + sysMetrics[SM_CYMENU];
TRACE(nonclient, "Calling DrawMenuBar with " TRACE_(nonclient)("Calling DrawMenuBar with "
"rect (%d, %d)-(%d, %d)\n", r.left, r.top, "rect (%d, %d)-(%d, %d)\n", r.left, r.top,
r.right, r.bottom); r.right, r.bottom);
rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1; rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1;
} }
TRACE(nonclient, "After MenuBar, rect is (%d, %d)-(%d, %d).\n", TRACE_(nonclient)("After MenuBar, rect is (%d, %d)-(%d, %d).\n",
rect.left, rect.top, rect.right, rect.bottom ); rect.left, rect.top, rect.right, rect.bottom );
if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE) if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE)
@ -2529,7 +2529,7 @@ LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt )
POINT pt32; POINT pt32;
UINT16 uCommand = wParam & 0xFFF0; UINT16 uCommand = wParam & 0xFFF0;
TRACE(nonclient, "Handling WM_SYSCOMMAND %x %d,%d\n", TRACE_(nonclient)("Handling WM_SYSCOMMAND %x %d,%d\n",
wParam, pt.x, pt.y ); wParam, pt.x, pt.y );
if (wndPtr->dwStyle & WS_CHILD && uCommand != SC_KEYMENU ) if (wndPtr->dwStyle & WS_CHILD && uCommand != SC_KEYMENU )
@ -2582,14 +2582,14 @@ LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt )
ShellAboutA(hwnd,"Wine", WINE_RELEASE_INFO, 0); ShellAboutA(hwnd,"Wine", WINE_RELEASE_INFO, 0);
else else
if (wParam == SC_PUTMARK) if (wParam == SC_PUTMARK)
TRACE(shell,"Mark requested by user\n"); TRACE_(shell)("Mark requested by user\n");
break; break;
case SC_HOTKEY: case SC_HOTKEY:
case SC_ARRANGE: case SC_ARRANGE:
case SC_NEXTWINDOW: case SC_NEXTWINDOW:
case SC_PREVWINDOW: case SC_PREVWINDOW:
FIXME (nonclient, "unimplemented!\n"); FIXME_(nonclient)("unimplemented!\n");
break; break;
} }
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);

View File

@ -11,7 +11,7 @@
#include "queue.h" #include "queue.h"
#include "dce.h" #include "dce.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debugtools.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
DECLARE_DEBUG_CHANNEL(nonclient) DECLARE_DEBUG_CHANNEL(nonclient)
@ -37,7 +37,7 @@ HRGN WIN_UpdateNCRgn(WND* wnd, BOOL bUpdate, BOOL bForceEntire )
{ {
HRGN hClip = 0; HRGN hClip = 0;
TRACE(nonclient,"hwnd %04x, hrgnUpdate %04x, ncf %i\n", TRACE_(nonclient)("hwnd %04x, hrgnUpdate %04x, ncf %i\n",
wnd->hwndSelf, wnd->hrgnUpdate, (wnd->flags & WIN_NEEDS_NCPAINT)!=0 ); wnd->hwndSelf, wnd->hrgnUpdate, (wnd->flags & WIN_NEEDS_NCPAINT)!=0 );
/* desktop window doesn't have nonclient area */ /* desktop window doesn't have nonclient area */
@ -62,7 +62,7 @@ HRGN WIN_UpdateNCRgn(WND* wnd, BOOL bUpdate, BOOL bForceEntire )
GETCLIENTRECTW( wnd, r ); GETCLIENTRECTW( wnd, r );
TRACE(nonclient, "\tclient box (%i,%i-%i,%i)\n", r.left, r.top, r.right, r.bottom ); TRACE_(nonclient)("\tclient box (%i,%i-%i,%i)\n", r.left, r.top, r.right, r.bottom );
if( wnd->hrgnUpdate > 1 ) if( wnd->hrgnUpdate > 1 )
{ {
@ -137,7 +137,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
HideCaret( hwnd ); HideCaret( hwnd );
TRACE(win,"hrgnUpdate = %04x, \n", hrgnUpdate); TRACE_(win)("hrgnUpdate = %04x, \n", hrgnUpdate);
if (wndPtr->class->style & CS_PARENTDC) if (wndPtr->class->style & CS_PARENTDC)
{ {
@ -157,18 +157,18 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
(bIcon ? DCX_WINDOW : 0) ); (bIcon ? DCX_WINDOW : 0) );
} }
TRACE(win,"hdc = %04x\n", lps->hdc); TRACE_(win)("hdc = %04x\n", lps->hdc);
if (!lps->hdc) if (!lps->hdc)
{ {
WARN(win, "GetDCEx() failed in BeginPaint(), hwnd=%04x\n", hwnd); WARN_(win)("GetDCEx() failed in BeginPaint(), hwnd=%04x\n", hwnd);
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
return 0; return 0;
} }
GetClipBox16( lps->hdc, &lps->rcPaint ); GetClipBox16( lps->hdc, &lps->rcPaint );
TRACE(win,"box = (%i,%i - %i,%i)\n", lps->rcPaint.left, lps->rcPaint.top, TRACE_(win)("box = (%i,%i - %i,%i)\n", lps->rcPaint.left, lps->rcPaint.top,
lps->rcPaint.right, lps->rcPaint.bottom ); lps->rcPaint.right, lps->rcPaint.bottom );
if (wndPtr->flags & WIN_NEEDS_ERASEBKGND) if (wndPtr->flags & WIN_NEEDS_ERASEBKGND)
@ -332,7 +332,7 @@ BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate,
bIcon = (wndPtr->dwStyle & WS_MINIMIZE && wndPtr->class->hIcon); bIcon = (wndPtr->dwStyle & WS_MINIMIZE && wndPtr->class->hIcon);
if (rectUpdate) if (rectUpdate)
{ {
TRACE(win, "%04x (%04x) %d,%d-%d,%d %04x flags=%04x, exflags=%04x\n", TRACE_(win)("%04x (%04x) %d,%d-%d,%d %04x flags=%04x, exflags=%04x\n",
hwnd, wndPtr->hrgnUpdate, rectUpdate->left, rectUpdate->top, hwnd, wndPtr->hrgnUpdate, rectUpdate->left, rectUpdate->top,
rectUpdate->right, rectUpdate->bottom, hrgnUpdate, flags, ex ); rectUpdate->right, rectUpdate->bottom, hrgnUpdate, flags, ex );
} }
@ -340,7 +340,7 @@ BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate,
{ {
if( hrgnUpdate ) GetRgnBox( hrgnUpdate, &r ); if( hrgnUpdate ) GetRgnBox( hrgnUpdate, &r );
else SetRectEmpty( &r ); else SetRectEmpty( &r );
TRACE(win, "%04x (%04x) NULL %04x box (%i,%i-%i,%i) flags=%04x, exflags=%04x\n", TRACE_(win)("%04x (%04x) NULL %04x box (%i,%i-%i,%i) flags=%04x, exflags=%04x\n",
hwnd, wndPtr->hrgnUpdate, hrgnUpdate, r.left, r.top, r.right, r.bottom, flags, ex); hwnd, wndPtr->hrgnUpdate, hrgnUpdate, r.left, r.top, r.right, r.bottom, flags, ex);
} }

View File

@ -18,7 +18,7 @@
#include "thread.h" #include "thread.h"
#include "process.h" #include "process.h"
#include <assert.h> #include <assert.h>
#include "debug.h" #include "debugtools.h"
#include "spy.h" #include "spy.h"
DECLARE_DEBUG_CHANNEL(msg) DECLARE_DEBUG_CHANNEL(msg)
@ -57,7 +57,7 @@ PERQUEUEDATA * PERQDATA_CreateInstance( )
BOOL16 bIsWin16 = 0; BOOL16 bIsWin16 = 0;
TRACE(msg,"()\n"); TRACE_(msg)("()\n");
/* Share a single instance of perQData for all 16 bit tasks */ /* Share a single instance of perQData for all 16 bit tasks */
if ( ( bIsWin16 = THREAD_IsWin16( THREAD_Current() ) ) ) if ( ( bIsWin16 = THREAD_IsWin16( THREAD_Current() ) ) )
@ -102,7 +102,7 @@ PERQUEUEDATA * PERQDATA_CreateInstance( )
ULONG PERQDATA_Addref( PERQUEUEDATA *pQData ) ULONG PERQDATA_Addref( PERQUEUEDATA *pQData )
{ {
assert(pQData != 0 ); assert(pQData != 0 );
TRACE(msg,"(): current refcount %lu ...\n", pQData->ulRefCount); TRACE_(msg)("(): current refcount %lu ...\n", pQData->ulRefCount);
EnterCriticalSection( &pQData->cSection ); EnterCriticalSection( &pQData->cSection );
++pQData->ulRefCount; ++pQData->ulRefCount;
@ -122,7 +122,7 @@ ULONG PERQDATA_Addref( PERQUEUEDATA *pQData )
ULONG PERQDATA_Release( PERQUEUEDATA *pQData ) ULONG PERQDATA_Release( PERQUEUEDATA *pQData )
{ {
assert(pQData != 0 ); assert(pQData != 0 );
TRACE(msg,"(): current refcount %lu ...\n", TRACE_(msg)("(): current refcount %lu ...\n",
(LONG)pQData->ulRefCount ); (LONG)pQData->ulRefCount );
EnterCriticalSection( &pQData->cSection ); EnterCriticalSection( &pQData->cSection );
@ -131,7 +131,7 @@ ULONG PERQDATA_Release( PERQUEUEDATA *pQData )
LeaveCriticalSection( &pQData->cSection ); LeaveCriticalSection( &pQData->cSection );
DeleteCriticalSection( &pQData->cSection ); DeleteCriticalSection( &pQData->cSection );
TRACE(msg,"(): deleting PERQUEUEDATA instance ...\n" ); TRACE_(msg)("(): deleting PERQUEUEDATA instance ...\n" );
/* Deleting our global 16 bit perQData? */ /* Deleting our global 16 bit perQData? */
if ( pQData == pQDataWin16 ) if ( pQData == pQDataWin16 )
@ -356,11 +356,11 @@ void QUEUE_DumpQueue( HQUEUE16 hQueue )
if (!(pq = (MESSAGEQUEUE*) QUEUE_Lock( hQueue )) ) if (!(pq = (MESSAGEQUEUE*) QUEUE_Lock( hQueue )) )
{ {
WARN(msg, "%04x is not a queue handle\n", hQueue ); WARN_(msg)("%04x is not a queue handle\n", hQueue );
return; return;
} }
DUMP( "next: %12.4x Intertask SendMessage:\n" DPRINTF( "next: %12.4x Intertask SendMessage:\n"
"thread: %10p ----------------------\n" "thread: %10p ----------------------\n"
"firstMsg: %8p smWaiting: %10p\n" "firstMsg: %8p smWaiting: %10p\n"
"lastMsg: %8p smPending: %10p\n" "lastMsg: %8p smPending: %10p\n"
@ -390,23 +390,23 @@ void QUEUE_WalkQueues(void)
char module[10]; char module[10];
HQUEUE16 hQueue = hFirstQueue; HQUEUE16 hQueue = hFirstQueue;
DUMP( "Queue Msgs Thread Task Module\n" ); DPRINTF( "Queue Msgs Thread Task Module\n" );
while (hQueue) while (hQueue)
{ {
MESSAGEQUEUE *queue = (MESSAGEQUEUE *)QUEUE_Lock( hQueue ); MESSAGEQUEUE *queue = (MESSAGEQUEUE *)QUEUE_Lock( hQueue );
if (!queue) if (!queue)
{ {
WARN( msg, "Bad queue handle %04x\n", hQueue ); WARN_(msg)("Bad queue handle %04x\n", hQueue );
return; return;
} }
if (!GetModuleName16( queue->thdb->process->task, module, sizeof(module ))) if (!GetModuleName16( queue->thdb->process->task, module, sizeof(module )))
strcpy( module, "???" ); strcpy( module, "???" );
DUMP( "%04x %4d %p %04x %s\n", hQueue,queue->msgCount, DPRINTF( "%04x %4d %p %04x %s\n", hQueue,queue->msgCount,
queue->thdb, queue->thdb->process->task, module ); queue->thdb, queue->thdb->process->task, module );
hQueue = queue->next; hQueue = queue->next;
QUEUE_Unlock( queue ); QUEUE_Unlock( queue );
} }
DUMP( "\n" ); DPRINTF( "\n" );
} }
@ -439,7 +439,7 @@ static HQUEUE16 QUEUE_CreateMsgQueue( BOOL16 bCreatePerQData )
MESSAGEQUEUE * msgQueue; MESSAGEQUEUE * msgQueue;
TDB *pTask = (TDB *)GlobalLock16( GetCurrentTask() ); TDB *pTask = (TDB *)GlobalLock16( GetCurrentTask() );
TRACE(msg,"(): Creating message queue...\n"); TRACE_(msg)("(): Creating message queue...\n");
if (!(hQueue = GlobalAlloc16( GMEM_FIXED | GMEM_ZEROINIT, if (!(hQueue = GlobalAlloc16( GMEM_FIXED | GMEM_ZEROINIT,
sizeof(MESSAGEQUEUE) ))) sizeof(MESSAGEQUEUE) )))
@ -464,7 +464,7 @@ static HQUEUE16 QUEUE_CreateMsgQueue( BOOL16 bCreatePerQData )
if (msgQueue->hEvent == 0) if (msgQueue->hEvent == 0)
{ {
WARN(msg, "CreateEvent32A is not able to create an event object"); WARN_(msg)("CreateEvent32A is not able to create an event object");
return 0; return 0;
} }
msgQueue->hEvent = ConvertToGlobalHandle( msgQueue->hEvent ); msgQueue->hEvent = ConvertToGlobalHandle( msgQueue->hEvent );
@ -533,11 +533,11 @@ BOOL QUEUE_DeleteMsgQueue( HQUEUE16 hQueue )
MESSAGEQUEUE * msgQueue = (MESSAGEQUEUE*)QUEUE_Lock(hQueue); MESSAGEQUEUE * msgQueue = (MESSAGEQUEUE*)QUEUE_Lock(hQueue);
HQUEUE16 *pPrev; HQUEUE16 *pPrev;
TRACE(msg,"(): Deleting message queue %04x\n", hQueue); TRACE_(msg)("(): Deleting message queue %04x\n", hQueue);
if (!hQueue || !msgQueue) if (!hQueue || !msgQueue)
{ {
WARN(msg, "invalid argument.\n"); WARN_(msg)("invalid argument.\n");
return 0; return 0;
} }
@ -568,7 +568,7 @@ BOOL QUEUE_DeleteMsgQueue( HQUEUE16 hQueue )
if ( !msgQ || (msgQ->magic != QUEUE_MAGIC) ) if ( !msgQ || (msgQ->magic != QUEUE_MAGIC) )
{ {
/* HQUEUE link list is corrupted, try to exit gracefully */ /* HQUEUE link list is corrupted, try to exit gracefully */
WARN( msg, "HQUEUE link list corrupted!\n"); WARN_(msg)("HQUEUE link list corrupted!\n");
pPrev = 0; pPrev = 0;
break; break;
} }
@ -620,7 +620,7 @@ MESSAGEQUEUE *QUEUE_GetSysQueue(void)
*/ */
void QUEUE_SetWakeBit( MESSAGEQUEUE *queue, WORD bit ) void QUEUE_SetWakeBit( MESSAGEQUEUE *queue, WORD bit )
{ {
TRACE(msg,"queue = %04x (wm=%04x), bit = %04x\n", TRACE_(msg)("queue = %04x (wm=%04x), bit = %04x\n",
queue->self, queue->wakeMask, bit ); queue->self, queue->wakeMask, bit );
if (bit & QS_MOUSE) pMouseQueue = queue; if (bit & QS_MOUSE) pMouseQueue = queue;
@ -666,7 +666,7 @@ int QUEUE_WaitBits( WORD bits, DWORD timeout )
MESSAGEQUEUE *queue; MESSAGEQUEUE *queue;
DWORD curTime = 0; DWORD curTime = 0;
TRACE(msg,"q %04x waiting for %04x\n", GetFastQueue16(), bits); TRACE_(msg)("q %04x waiting for %04x\n", GetFastQueue16(), bits);
if ( THREAD_IsWin16( THREAD_Current() ) && (timeout != INFINITE) ) if ( THREAD_IsWin16( THREAD_Current() ) && (timeout != INFINITE) )
curTime = GetTickCount(); curTime = GetTickCount();
@ -697,7 +697,7 @@ int QUEUE_WaitBits( WORD bits, DWORD timeout )
continue; continue;
} }
TRACE(msg,"%04x) wakeMask is %04x, waiting\n", queue->self, queue->wakeMask); TRACE_(msg)("%04x) wakeMask is %04x, waiting\n", queue->self, queue->wakeMask);
if ( !THREAD_IsWin16( THREAD_Current() ) ) if ( !THREAD_IsWin16( THREAD_Current() ) )
{ {
@ -732,7 +732,7 @@ int QUEUE_WaitBits( WORD bits, DWORD timeout )
*/ */
BOOL QUEUE_AddSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg ) BOOL QUEUE_AddSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg )
{ {
TRACE(sendmsg,"queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list, TRACE_(sendmsg)("queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list,
smsg, SPY_GetMsgName(smsg->msg)); smsg, SPY_GetMsgName(smsg->msg));
switch (list) switch (list)
@ -770,7 +770,7 @@ BOOL QUEUE_AddSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg )
} }
default: default:
WARN(sendmsg, "Invalid list: %d", list); WARN_(sendmsg)("Invalid list: %d", list);
break; break;
} }
@ -798,13 +798,13 @@ SMSG *QUEUE_RemoveSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg )
if (!smsg) if (!smsg)
smsg = queue->smProcessing; smsg = queue->smProcessing;
TRACE(sendmsg,"queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list, TRACE_(sendmsg)("queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list,
smsg, SPY_GetMsgName(smsg->msg)); smsg, SPY_GetMsgName(smsg->msg));
/* In fact SM_PROCESSING_LIST is a stack, and smsg /* In fact SM_PROCESSING_LIST is a stack, and smsg
should be always at the top of the list */ should be always at the top of the list */
if ( (smsg != queue->smProcessing) || !queue->smProcessing ) if ( (smsg != queue->smProcessing) || !queue->smProcessing )
{ {
ERR( sendmsg, "smsg not at the top of Processing list, smsg=0x%p queue=0x%p", smsg, queue); ERR_(sendmsg)("smsg not at the top of Processing list, smsg=0x%p queue=0x%p", smsg, queue);
return 0; return 0;
} }
else else
@ -822,13 +822,13 @@ SMSG *QUEUE_RemoveSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg )
if (!smsg) if (!smsg)
smsg = queue->smWaiting; smsg = queue->smWaiting;
TRACE(sendmsg,"queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list, TRACE_(sendmsg)("queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list,
smsg, SPY_GetMsgName(smsg->msg)); smsg, SPY_GetMsgName(smsg->msg));
/* In fact SM_WAITING_LIST is a stack, and smsg /* In fact SM_WAITING_LIST is a stack, and smsg
should be always at the top of the list */ should be always at the top of the list */
if ( (smsg != queue->smWaiting) || !queue->smWaiting ) if ( (smsg != queue->smWaiting) || !queue->smWaiting )
{ {
ERR( sendmsg, "smsg not at the top of Waiting list, smsg=0x%p queue=0x%p", smsg, queue); ERR_(sendmsg)("smsg not at the top of Waiting list, smsg=0x%p queue=0x%p", smsg, queue);
return 0; return 0;
} }
else else
@ -847,12 +847,12 @@ SMSG *QUEUE_RemoveSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg )
smsg = queue->smPending; smsg = queue->smPending;
else else
{ {
ERR( sendmsg, "should always remove the top one in Pending list, smsg=0x%p queue=0x%p", smsg, queue); ERR_(sendmsg)("should always remove the top one in Pending list, smsg=0x%p queue=0x%p", smsg, queue);
LeaveCriticalSection( &queue->cSection ); LeaveCriticalSection( &queue->cSection );
return 0; return 0;
} }
TRACE(sendmsg,"queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list, TRACE_(sendmsg)("queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list,
smsg, SPY_GetMsgName(smsg->msg)); smsg, SPY_GetMsgName(smsg->msg));
queue->smPending = smsg->nextPending; queue->smPending = smsg->nextPending;
@ -866,7 +866,7 @@ SMSG *QUEUE_RemoveSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg )
return smsg; return smsg;
default: default:
WARN(sendmsg, "Invalid list: %d", list); WARN_(sendmsg)("Invalid list: %d", list);
break; break;
} }
@ -885,11 +885,11 @@ void QUEUE_ReceiveMessage( MESSAGEQUEUE *queue )
SMSG *smsg; SMSG *smsg;
MESSAGEQUEUE *senderQ; MESSAGEQUEUE *senderQ;
TRACE(sendmsg, "queue %04x\n", queue->self ); TRACE_(sendmsg)("queue %04x\n", queue->self );
if ( !(queue->wakeBits & QS_SENDMESSAGE) && queue->smPending ) if ( !(queue->wakeBits & QS_SENDMESSAGE) && queue->smPending )
{ {
TRACE(sendmsg,"\trcm: nothing to do\n"); TRACE_(sendmsg)("\trcm: nothing to do\n");
return; return;
} }
@ -897,7 +897,7 @@ void QUEUE_ReceiveMessage( MESSAGEQUEUE *queue )
smsg = QUEUE_RemoveSMSG(queue, SM_PENDING_LIST, 0); smsg = QUEUE_RemoveSMSG(queue, SM_PENDING_LIST, 0);
QUEUE_AddSMSG(queue, SM_WAITING_LIST, smsg); QUEUE_AddSMSG(queue, SM_WAITING_LIST, smsg);
TRACE(sendmsg,"RM: %s [%04x] (%04x -> %04x)\n", TRACE_(sendmsg)("RM: %s [%04x] (%04x -> %04x)\n",
SPY_GetMsgName(smsg->msg), smsg->msg, smsg->hSrcQueue, smsg->hDstQueue ); SPY_GetMsgName(smsg->msg), smsg->msg, smsg->hSrcQueue, smsg->hDstQueue );
if (IsWindow( smsg->hWnd )) if (IsWindow( smsg->hWnd ))
@ -916,7 +916,7 @@ void QUEUE_ReceiveMessage( MESSAGEQUEUE *queue )
/* call the right version of CallWindowProcXX */ /* call the right version of CallWindowProcXX */
if (smsg->flags & SMSG_WIN32) if (smsg->flags & SMSG_WIN32)
{ {
TRACE(sendmsg, "\trcm: msg is Win32\n" ); TRACE_(sendmsg)("\trcm: msg is Win32\n" );
if (smsg->flags & SMSG_UNICODE) if (smsg->flags & SMSG_UNICODE)
result = CallWindowProcW( wndPtr->winproc, result = CallWindowProcW( wndPtr->winproc,
smsg->hWnd, smsg->msg, smsg->hWnd, smsg->msg,
@ -935,9 +935,9 @@ void QUEUE_ReceiveMessage( MESSAGEQUEUE *queue )
queue->GetMessageExtraInfoVal = extraInfo; /* Restore extra info */ queue->GetMessageExtraInfoVal = extraInfo; /* Restore extra info */
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
TRACE(sendmsg,"result = %08x\n", (unsigned)result ); TRACE_(sendmsg)("result = %08x\n", (unsigned)result );
} }
else WARN(sendmsg, "\trcm: bad hWnd\n"); else WARN_(sendmsg)("\trcm: bad hWnd\n");
/* set SMSG_SENDING_REPLY flag to tell ReplyMessage16, it's not /* set SMSG_SENDING_REPLY flag to tell ReplyMessage16, it's not
@ -945,7 +945,7 @@ void QUEUE_ReceiveMessage( MESSAGEQUEUE *queue )
smsg->flags |= SMSG_SENDING_REPLY; smsg->flags |= SMSG_SENDING_REPLY;
ReplyMessage( result ); ReplyMessage( result );
TRACE( sendmsg,"done! \n" ); TRACE_(sendmsg)("done! \n" );
} }
@ -1129,7 +1129,7 @@ static void QUEUE_WakeSomeone( UINT message )
} }
if( !queue ) if( !queue )
{ {
WARN(msg, "couldn't find queue\n"); WARN_(msg)("couldn't find queue\n");
return; return;
} }
} }
@ -1404,7 +1404,7 @@ HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags )
/* Create thread message queue */ /* Create thread message queue */
if( !(hQueue = QUEUE_CreateMsgQueue( TRUE ))) if( !(hQueue = QUEUE_CreateMsgQueue( TRUE )))
{ {
WARN(msg, "failed!\n"); WARN_(msg)("failed!\n");
return FALSE; return FALSE;
} }
@ -1472,7 +1472,7 @@ BOOL16 WINAPI GetInputState16(void)
*/ */
DWORD WINAPI WaitForInputIdle (HANDLE hProcess, DWORD dwTimeOut) DWORD WINAPI WaitForInputIdle (HANDLE hProcess, DWORD dwTimeOut)
{ {
FIXME (msg, "(hProcess=%d, dwTimeOut=%ld): stub\n", hProcess, dwTimeOut); FIXME_(msg)("(hProcess=%d, dwTimeOut=%ld): stub\n", hProcess, dwTimeOut);
return WAIT_TIMEOUT; return WAIT_TIMEOUT;
} }

View File

@ -28,7 +28,7 @@
#include "class.h" #include "class.h"
#include "desktop.h" #include "desktop.h"
#include "process.h" #include "process.h"
#include "debug.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(hook) DECLARE_DEBUG_CHANNEL(hook)
DECLARE_DEBUG_CHANNEL(local) DECLARE_DEBUG_CHANNEL(local)
@ -206,7 +206,7 @@ void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode,
UINT16 uExitFn, HINSTANCE16 hInstance, UINT16 uExitFn, HINSTANCE16 hInstance,
HQUEUE16 hQueue ) HQUEUE16 hQueue )
{ {
FIXME( win, "Win 3.1 USER signal %04x\n", uCode ); FIXME_(win)("Win 3.1 USER signal %04x\n", uCode );
} }
/*********************************************************************** /***********************************************************************
@ -260,7 +260,7 @@ WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
break; break;
default: default:
FIXME( win, "(%04x, %08lx, %04lx, %04x)\n", FIXME_(win)("(%04x, %08lx, %04lx, %04x)\n",
uCode, dwThreadOrProcessID, dwFlags, hModule ); uCode, dwThreadOrProcessID, dwFlags, hModule );
break; break;
} }
@ -286,7 +286,7 @@ BOOL16 WINAPI ExitWindows16( DWORD dwReturnCode, UINT16 wReserved )
*/ */
BOOL16 WINAPI ExitWindowsExec16( LPCSTR lpszExe, LPCSTR lpszParams ) BOOL16 WINAPI ExitWindowsExec16( LPCSTR lpszExe, LPCSTR lpszParams )
{ {
TRACE(system, "Should run the following in DOS-mode: \"%s %s\"\n", TRACE_(system)("Should run the following in DOS-mode: \"%s %s\"\n",
lpszExe, lpszParams); lpszExe, lpszParams);
return ExitWindowsEx( EWX_LOGOFF, 0xffffffff ); return ExitWindowsEx( EWX_LOGOFF, 0xffffffff );
} }
@ -340,9 +340,9 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
*/ */
LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags ) LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags )
{ {
FIXME(system, ": stub\n"); FIXME_(system)(": stub\n");
if (devmode==NULL) if (devmode==NULL)
FIXME(system," devmode=NULL (return to default mode)\n"); FIXME_(system)(" devmode=NULL (return to default mode)\n");
else if ( (devmode->dmBitsPerPel != DESKTOP_GetScreenDepth()) else if ( (devmode->dmBitsPerPel != DESKTOP_GetScreenDepth())
|| (devmode->dmPelsHeight != DESKTOP_GetScreenHeight()) || (devmode->dmPelsHeight != DESKTOP_GetScreenHeight())
|| (devmode->dmPelsWidth != DESKTOP_GetScreenWidth()) ) || (devmode->dmPelsWidth != DESKTOP_GetScreenWidth()) )
@ -350,12 +350,12 @@ LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags )
{ {
if (devmode->dmFields & DM_BITSPERPEL) if (devmode->dmFields & DM_BITSPERPEL)
FIXME(system," bpp=%ld\n",devmode->dmBitsPerPel); FIXME_(system)(" bpp=%ld\n",devmode->dmBitsPerPel);
if (devmode->dmFields & DM_PELSWIDTH) if (devmode->dmFields & DM_PELSWIDTH)
FIXME(system," width=%ld\n",devmode->dmPelsWidth); FIXME_(system)(" width=%ld\n",devmode->dmPelsWidth);
if (devmode->dmFields & DM_PELSHEIGHT) if (devmode->dmFields & DM_PELSHEIGHT)
FIXME(system," height=%ld\n",devmode->dmPelsHeight); FIXME_(system)(" height=%ld\n",devmode->dmPelsHeight);
FIXME(system," (Putting X in this mode beforehand might help)\n"); FIXME_(system)(" (Putting X in this mode beforehand might help)\n");
/* we don't, but the program ... does not need to know */ /* we don't, but the program ... does not need to know */
return DISP_CHANGE_SUCCESSFUL; return DISP_CHANGE_SUCCESSFUL;
} }
@ -382,7 +382,7 @@ BOOL WINAPI EnumDisplaySettingsA(
} modes[NRMODES]={{512,384},{640,400},{640,480},{800,600},{1024,768}}; } modes[NRMODES]={{512,384},{640,400},{640,480},{800,600},{1024,768}};
int depths[4] = {8,16,24,32}; int depths[4] = {8,16,24,32};
TRACE(system,"(%s,%ld,%p)\n",name,n,devmode); TRACE_(system)("(%s,%ld,%p)\n",name,n,devmode);
if (n==0) { if (n==0) {
devmode->dmBitsPerPel = DESKTOP_GetScreenDepth(); devmode->dmBitsPerPel = DESKTOP_GetScreenDepth();
devmode->dmPelsHeight = DESKTOP_GetScreenHeight(); devmode->dmPelsHeight = DESKTOP_GetScreenHeight();
@ -423,7 +423,7 @@ BOOL WINAPI EnumDisplaySettingsW(LPCWSTR name,DWORD n,LPDEVMODEW devmode) {
*/ */
FARPROC16 WINAPI SetEventHook16(FARPROC16 lpfnEventHook) FARPROC16 WINAPI SetEventHook16(FARPROC16 lpfnEventHook)
{ {
FIXME(hook, "(lpfnEventHook=%08x): stub\n", (UINT)lpfnEventHook); FIXME_(hook)("(lpfnEventHook=%08x): stub\n", (UINT)lpfnEventHook);
return NULL; return NULL;
} }
@ -443,10 +443,10 @@ DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wPa
case USUD_LOCALHEAP: case USUD_LOCALHEAP:
return USER_HeapSel; return USER_HeapSel;
case USUD_FIRSTCLASS: case USUD_FIRSTCLASS:
FIXME(local, "return a pointer to the first window class.\n"); FIXME_(local)("return a pointer to the first window class.\n");
return (DWORD)-1; return (DWORD)-1;
default: default:
WARN(local, "wReqType %04x (unknown)", wReqType); WARN_(local)("wReqType %04x (unknown)", wReqType);
return (DWORD)-1; return (DWORD)-1;
} }
} }
@ -455,7 +455,7 @@ DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wPa
* RegisterLogonProcess (USER32.434) * RegisterLogonProcess (USER32.434)
*/ */
DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) { DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) {
FIXME(win32,"(%d,%d),stub!\n",hprocess,x); FIXME_(win32)("(%d,%d),stub!\n",hprocess,x);
return 1; return 1;
} }
@ -466,7 +466,7 @@ HWINSTA WINAPI CreateWindowStationW(
LPWSTR winstation,DWORD res1,DWORD desiredaccess, LPWSTR winstation,DWORD res1,DWORD desiredaccess,
LPSECURITY_ATTRIBUTES lpsa LPSECURITY_ATTRIBUTES lpsa
) { ) {
FIXME(win32,"(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation), FIXME_(win32)("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation),
res1,desiredaccess,lpsa res1,desiredaccess,lpsa
); );
return 0xdeadcafe; return 0xdeadcafe;
@ -476,7 +476,7 @@ HWINSTA WINAPI CreateWindowStationW(
* SetProcessWindowStation (USER32.496) * SetProcessWindowStation (USER32.496)
*/ */
BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) { BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) {
FIXME(win32,"(%d),stub!\n",hWinSta); FIXME_(win32)("(%d),stub!\n",hWinSta);
return TRUE; return TRUE;
} }
@ -488,7 +488,7 @@ BOOL WINAPI SetUserObjectSecurity(
/*LPSECURITY_INFORMATION*/LPVOID pSIRequested, /*LPSECURITY_INFORMATION*/LPVOID pSIRequested,
PSECURITY_DESCRIPTOR pSID PSECURITY_DESCRIPTOR pSID
) { ) {
FIXME(win32,"(0x%08x,%p,%p),stub!\n",hObj,pSIRequested,pSID); FIXME_(win32)("(0x%08x,%p,%p),stub!\n",hObj,pSIRequested,pSID);
return TRUE; return TRUE;
} }
@ -499,7 +499,7 @@ HDESK WINAPI CreateDesktopW(
LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode, LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode,
DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
) { ) {
FIXME(win32,"(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", FIXME_(win32)("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode, debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode,
dwFlags,dwDesiredAccess,lpsa dwFlags,dwDesiredAccess,lpsa
); );
@ -508,12 +508,12 @@ HDESK WINAPI CreateDesktopW(
BOOL WINAPI CloseWindowStation(HWINSTA hWinSta) BOOL WINAPI CloseWindowStation(HWINSTA hWinSta)
{ {
FIXME(win32, "(0x%08x)\n", hWinSta); FIXME_(win32)("(0x%08x)\n", hWinSta);
return TRUE; return TRUE;
} }
BOOL WINAPI CloseDesktop(HDESK hDesk) BOOL WINAPI CloseDesktop(HDESK hDesk)
{ {
FIXME(win32, "(0x%08x)\n", hDesk); FIXME_(win32)("(0x%08x)\n", hDesk);
return TRUE; return TRUE;
} }
@ -521,7 +521,7 @@ BOOL WINAPI CloseDesktop(HDESK hDesk)
* SetWindowStationUser (USER32.521) * SetWindowStationUser (USER32.521)
*/ */
DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) { DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) {
FIXME(win32,"(0x%08lx,0x%08lx),stub!\n",x1,x2); FIXME_(win32)("(0x%08lx,0x%08lx),stub!\n",x1,x2);
return 1; return 1;
} }
@ -529,7 +529,7 @@ DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) {
* SetLogonNotifyWindow (USER32.486) * SetLogonNotifyWindow (USER32.486)
*/ */
DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) { DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) {
FIXME(win32,"(0x%x,%04x),stub!\n",hwinsta,hwnd); FIXME_(win32)("(0x%x,%04x),stub!\n",hwinsta,hwnd);
return 1; return 1;
} }
@ -544,14 +544,14 @@ VOID WINAPI LoadLocalFonts(VOID) {
* GetUserObjectInformation32A (USER32.299) * GetUserObjectInformation32A (USER32.299)
*/ */
BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
{ FIXME(win32,"(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); { FIXME_(win32)("(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
return TRUE; return TRUE;
} }
/*********************************************************************** /***********************************************************************
* GetUserObjectInformation32W (USER32.300) * GetUserObjectInformation32W (USER32.300)
*/ */
BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
{ FIXME(win32,"(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); { FIXME_(win32)("(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
return TRUE; return TRUE;
} }
/*********************************************************************** /***********************************************************************
@ -559,7 +559,7 @@ BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, int nIndex, LPVOID pvInfo, D
*/ */
BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, SECURITY_INFORMATION * pSIRequested, BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, SECURITY_INFORMATION * pSIRequested,
PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded) PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded)
{ FIXME(win32,"(0x%x %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded); { FIXME_(win32)("(0x%x %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded);
return TRUE; return TRUE;
} }
@ -567,7 +567,7 @@ BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, SECURITY_INFORMATION * pSIRequest
* SetSystemCursor (USER32.507) * SetSystemCursor (USER32.507)
*/ */
BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id) BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id)
{ FIXME(win32,"(%08x,%08lx),stub!\n", hcur, id); { FIXME_(win32)("(%08x,%08lx),stub!\n", hcur, id);
return TRUE; return TRUE;
} }
@ -576,5 +576,5 @@ BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id)
*/ */
void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved) void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
{ {
FIXME(win32, "(%08lx, %08lx)\n", flags, reserved); FIXME_(win32)("(%08lx, %08lx)\n", flags, reserved);
} }

View File

@ -28,7 +28,7 @@
#include "task.h" #include "task.h"
#include "thread.h" #include "thread.h"
#include "process.h" #include "process.h"
#include "debug.h" #include "debugtools.h"
#include "winerror.h" #include "winerror.h"
#include "mdi.h" #include "mdi.h"
#include "local.h" #include "local.h"
@ -137,7 +137,7 @@ WND * WIN_FindWndPtr( HWND hwnd )
if (ptr->dwMagic != WND_MAGIC) goto error; if (ptr->dwMagic != WND_MAGIC) goto error;
if (ptr->hwndSelf != hwnd) if (ptr->hwndSelf != hwnd)
{ {
ERR( win, "Can't happen: hwnd %04x self pointer is %04x\n",hwnd, ptr->hwndSelf ); ERR_(win)("Can't happen: hwnd %04x self pointer is %04x\n",hwnd, ptr->hwndSelf );
goto error; goto error;
} }
/* returns a locked pointer */ /* returns a locked pointer */
@ -195,7 +195,7 @@ void WIN_ReleaseWndPtr(WND *wndPtr)
else if(wndPtr->irefCount < 0) else if(wndPtr->irefCount < 0)
{ {
/* This else if is useful to monitor the WIN_ReleaseWndPtr function */ /* This else if is useful to monitor the WIN_ReleaseWndPtr function */
TRACE(win,"forgot a Lock on %p somewhere\n",wndPtr); TRACE_(win)("forgot a Lock on %p somewhere\n",wndPtr);
} }
/*unlock all WND structures for thread safeness*/ /*unlock all WND structures for thread safeness*/
WIN_UnlockWnds(); WIN_UnlockWnds();
@ -229,15 +229,15 @@ void WIN_DumpWindow( HWND hwnd )
if (!(ptr = WIN_FindWndPtr( hwnd ))) if (!(ptr = WIN_FindWndPtr( hwnd )))
{ {
WARN( win, "%04x is not a window handle\n", hwnd ); WARN_(win)("%04x is not a window handle\n", hwnd );
return; return;
} }
if (!GetClassNameA( hwnd, className, sizeof(className ) )) if (!GetClassNameA( hwnd, className, sizeof(className ) ))
strcpy( className, "#NULL#" ); strcpy( className, "#NULL#" );
TRACE( win, "Window %04x (%p):\n", hwnd, ptr ); TRACE_(win)("Window %04x (%p):\n", hwnd, ptr );
DUMP( "next=%p child=%p parent=%p owner=%p class=%p '%s'\n" DPRINTF( "next=%p child=%p parent=%p owner=%p class=%p '%s'\n"
"inst=%04x taskQ=%04x updRgn=%04x active=%04x dce=%p idmenu=%08x\n" "inst=%04x taskQ=%04x updRgn=%04x active=%04x dce=%p idmenu=%08x\n"
"style=%08lx exstyle=%08lx wndproc=%08x text='%s'\n" "style=%08lx exstyle=%08lx wndproc=%08x text='%s'\n"
"client=%d,%d-%d,%d window=%d,%d-%d,%d" "client=%d,%d-%d,%d window=%d,%d-%d,%d"
@ -254,12 +254,12 @@ void WIN_DumpWindow( HWND hwnd )
if (ptr->class->cbWndExtra) if (ptr->class->cbWndExtra)
{ {
DUMP( "extra bytes:" ); DPRINTF( "extra bytes:" );
for (i = 0; i < ptr->class->cbWndExtra; i++) for (i = 0; i < ptr->class->cbWndExtra; i++)
DUMP( " %02x", *((BYTE*)ptr->wExtra+i) ); DPRINTF( " %02x", *((BYTE*)ptr->wExtra+i) );
DUMP( "\n" ); DPRINTF( "\n" );
} }
DUMP( "\n" ); DPRINTF( "\n" );
WIN_ReleaseWndPtr(ptr); WIN_ReleaseWndPtr(ptr);
} }
@ -278,22 +278,22 @@ void WIN_WalkWindows( HWND hwnd, int indent )
if (!ptr) if (!ptr)
{ {
WARN( win, "Invalid window handle %04x\n", hwnd ); WARN_(win)("Invalid window handle %04x\n", hwnd );
return; return;
} }
if (!indent) /* first time around */ if (!indent) /* first time around */
DUMP( "%-16.16s %-8.8s %-6.6s %-17.17s %-8.8s %s\n", DPRINTF( "%-16.16s %-8.8s %-6.6s %-17.17s %-8.8s %s\n",
"hwnd", " wndPtr", "queue", "Class Name", " Style", " WndProc" "hwnd", " wndPtr", "queue", "Class Name", " Style", " WndProc"
" Text"); " Text");
while (ptr) while (ptr)
{ {
DUMP( "%*s%04x%*s", indent, "", ptr->hwndSelf, 13-indent,""); DPRINTF( "%*s%04x%*s", indent, "", ptr->hwndSelf, 13-indent,"");
GlobalGetAtomName16(ptr->class->atomName,className,sizeof(className)); GlobalGetAtomName16(ptr->class->atomName,className,sizeof(className));
DUMP( "%08lx %-6.4x %-17.17s %08x %08x %.14s\n", DPRINTF( "%08lx %-6.4x %-17.17s %08x %08x %.14s\n",
(DWORD)ptr, ptr->hmemTaskQ, className, (DWORD)ptr, ptr->hmemTaskQ, className,
(UINT)ptr->dwStyle, (UINT)ptr->winproc, (UINT)ptr->dwStyle, (UINT)ptr->winproc,
ptr->text?ptr->text:"<null>"); ptr->text?ptr->text:"<null>");
@ -396,7 +396,7 @@ HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE16 hQueue )
{ {
if (!(pWnd->dwStyle & WS_VISIBLE)) if (!(pWnd->dwStyle & WS_VISIBLE))
{ {
TRACE(win, "skipping window %04x\n", TRACE_(win)("skipping window %04x\n",
pWnd->hwndSelf ); pWnd->hwndSelf );
} }
else if ((pWnd->hmemTaskQ == hQueue) && else if ((pWnd->hmemTaskQ == hQueue) &&
@ -430,7 +430,7 @@ HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE16 hQueue )
hwndRet = pWnd->hwndSelf; hwndRet = pWnd->hwndSelf;
WIN_ReleaseWndPtr(pWnd); WIN_ReleaseWndPtr(pWnd);
} }
TRACE(win,"found %04x\n",hwndRet); TRACE_(win)("found %04x\n",hwndRet);
return hwndRet; return hwndRet;
} }
@ -446,7 +446,7 @@ static WND* WIN_DestroyWindow( WND* wndPtr )
HWND hwnd = wndPtr->hwndSelf; HWND hwnd = wndPtr->hwndSelf;
WND *pWnd; WND *pWnd;
TRACE(win, "%04x\n", wndPtr->hwndSelf ); TRACE_(win)("%04x\n", wndPtr->hwndSelf );
#ifdef CONFIG_IPC #ifdef CONFIG_IPC
if (main_block) if (main_block)
@ -602,7 +602,7 @@ BOOL WIN_CreateDesktopWindow(void)
HWND hwndDesktop; HWND hwndDesktop;
DESKTOP *pDesktop; DESKTOP *pDesktop;
TRACE(win,"Creating desktop window\n"); TRACE_(win)("Creating desktop window\n");
/* Initialisation of the critical section for thread safeness */ /* Initialisation of the critical section for thread safeness */
@ -683,7 +683,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
LRESULT (CALLBACK *localSend32)(HWND, UINT, WPARAM, LPARAM); LRESULT (CALLBACK *localSend32)(HWND, UINT, WPARAM, LPARAM);
char buffer[256]; char buffer[256];
TRACE(win, "%s %s %08lx %08lx %d,%d %dx%d %04x %04x %08x %p\n", TRACE_(win)("%s %s %08lx %08lx %d,%d %dx%d %04x %04x %08x %p\n",
unicode ? debugres_w((LPWSTR)cs->lpszName) : debugres_a(cs->lpszName), unicode ? debugres_w((LPWSTR)cs->lpszName) : debugres_a(cs->lpszName),
unicode ? debugres_w((LPWSTR)cs->lpszClass) : debugres_a(cs->lpszClass), unicode ? debugres_w((LPWSTR)cs->lpszClass) : debugres_a(cs->lpszClass),
cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy, cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy,
@ -696,11 +696,11 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* Make sure parent is valid */ /* Make sure parent is valid */
if (!IsWindow( cs->hwndParent )) if (!IsWindow( cs->hwndParent ))
{ {
WARN( win, "Bad parent %04x\n", cs->hwndParent ); WARN_(win)("Bad parent %04x\n", cs->hwndParent );
return 0; return 0;
} }
} else if ((cs->style & WS_CHILD) && !(cs->style & WS_POPUP)) { } else if ((cs->style & WS_CHILD) && !(cs->style & WS_POPUP)) {
WARN( win, "No parent for child window\n" ); WARN_(win)("No parent for child window\n" );
return 0; /* WS_CHILD needs a parent, but WS_POPUP doesn't */ return 0; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
} }
@ -708,7 +708,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if (!(classPtr = CLASS_FindClassByAtom( classAtom, win32?cs->hInstance:GetExePtr(cs->hInstance) ))) if (!(classPtr = CLASS_FindClassByAtom( classAtom, win32?cs->hInstance:GetExePtr(cs->hInstance) )))
{ {
GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) ); GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) );
WARN( win, "Bad class '%s'\n", buffer ); WARN_(win)("Bad class '%s'\n", buffer );
return 0; return 0;
} }
@ -763,7 +763,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if (!(hwnd = USER_HEAP_ALLOC( sizeof(*wndPtr) + classPtr->cbWndExtra if (!(hwnd = USER_HEAP_ALLOC( sizeof(*wndPtr) + classPtr->cbWndExtra
- sizeof(wndPtr->wExtra) ))) - sizeof(wndPtr->wExtra) )))
{ {
TRACE(win, "out of memory\n" ); TRACE_(win)("out of memory\n" );
return 0; return 0;
} }
@ -836,7 +836,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
: HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc); : HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc);
if (ret) if (ret)
{ {
TRACE(win, "CBT-hook returned 0\n"); TRACE_(win)("CBT-hook returned 0\n");
wndPtr->pDriver->pFinalize(wndPtr); wndPtr->pDriver->pFinalize(wndPtr);
USER_HEAP_FREE( hwnd ); USER_HEAP_FREE( hwnd );
retvalue = 0; retvalue = 0;
@ -956,7 +956,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* send it anyway */ /* send it anyway */
if (((wndPtr->rectClient.right-wndPtr->rectClient.left) <0) if (((wndPtr->rectClient.right-wndPtr->rectClient.left) <0)
||((wndPtr->rectClient.bottom-wndPtr->rectClient.top)<0)) ||((wndPtr->rectClient.bottom-wndPtr->rectClient.top)<0))
WARN(win,"sending bogus WM_SIZE message 0x%08lx\n", WARN_(win)("sending bogus WM_SIZE message 0x%08lx\n",
MAKELONG(wndPtr->rectClient.right-wndPtr->rectClient.left, MAKELONG(wndPtr->rectClient.right-wndPtr->rectClient.left,
wndPtr->rectClient.bottom-wndPtr->rectClient.top)); wndPtr->rectClient.bottom-wndPtr->rectClient.top));
SendMessageA( hwnd, WM_SIZE, SIZE_RESTORED, SendMessageA( hwnd, WM_SIZE, SIZE_RESTORED,
@ -1002,7 +1002,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if (!(wndPtr->dwStyle & WS_CHILD) && !wndPtr->owner) if (!(wndPtr->dwStyle & WS_CHILD) && !wndPtr->owner)
HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 ); HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 );
TRACE(win, "created window %04x\n", hwnd); TRACE_(win)("created window %04x\n", hwnd);
retvalue = hwnd; retvalue = hwnd;
goto end; goto end;
} }
@ -1011,7 +1011,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* Abort window creation */ /* Abort window creation */
WARN(win, "aborted by WM_xxCREATE!\n"); WARN_(win)("aborted by WM_xxCREATE!\n");
WIN_ReleaseWndPtr(WIN_DestroyWindow( wndPtr )); WIN_ReleaseWndPtr(WIN_DestroyWindow( wndPtr ));
retvalue = 0; retvalue = 0;
end: end:
@ -1141,11 +1141,11 @@ HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className,
if (HIWORD(className)) if (HIWORD(className))
{ {
LPSTR cn = HEAP_strdupWtoA( GetProcessHeap(), 0, className ); LPSTR cn = HEAP_strdupWtoA( GetProcessHeap(), 0, className );
WARN( win, "Bad class name '%s'\n",cn); WARN_(win)("Bad class name '%s'\n",cn);
HeapFree( GetProcessHeap(), 0, cn ); HeapFree( GetProcessHeap(), 0, cn );
} }
else else
WARN( win, "Bad class name %p\n", className ); WARN_(win)("Bad class name %p\n", className );
return 0; return 0;
} }
@ -1268,7 +1268,7 @@ static void WIN_SendDestroyMsg( WND* pWnd )
WIN_CheckFocus(pWnd); WIN_CheckFocus(pWnd);
} }
else else
WARN(win, "\tdestroyed itself while in WM_DESTROY!\n"); WARN_(win)("\tdestroyed itself while in WM_DESTROY!\n");
} }
@ -1289,7 +1289,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
WND * wndPtr; WND * wndPtr;
BOOL retvalue; BOOL retvalue;
TRACE(win, "(%04x)\n", hwnd); TRACE_(win)("(%04x)\n", hwnd);
/* Initialization */ /* Initialization */
@ -1561,7 +1561,7 @@ HWND16 WINAPI FindWindowEx16( HWND16 parent, HWND16 child,
{ {
ATOM atom = 0; ATOM atom = 0;
TRACE(win, "%04x %04x '%s' '%s'\n", parent, TRACE_(win)("%04x %04x '%s' '%s'\n", parent,
child, HIWORD(className)?(char *)PTR_SEG_TO_LIN(className):"", child, HIWORD(className)?(char *)PTR_SEG_TO_LIN(className):"",
title ? title : ""); title ? title : "");
@ -1709,7 +1709,7 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
WND *wndPtr; WND *wndPtr;
BOOL retvalue; BOOL retvalue;
TRACE(win,"EnableWindow32: ( %x, %d )\n", hwnd, enable); TRACE_(win)("EnableWindow32: ( %x, %d )\n", hwnd, enable);
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE; if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE;
if (enable && (wndPtr->dwStyle & WS_DISABLED)) if (enable && (wndPtr->dwStyle & WS_DISABLED))
@ -1814,7 +1814,7 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
{ {
if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra) if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra)
{ {
WARN( win, "Invalid offset %d\n", offset ); WARN_(win)("Invalid offset %d\n", offset );
retvalue = 0; retvalue = 0;
goto end; goto end;
} }
@ -1825,7 +1825,7 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
{ {
case GWW_ID: case GWW_ID:
if (HIWORD(wndPtr->wIDmenu)) if (HIWORD(wndPtr->wIDmenu))
WARN( win,"GWW_ID: discards high bits of 0x%08x!\n", WARN_(win)("GWW_ID: discards high bits of 0x%08x!\n",
wndPtr->wIDmenu); wndPtr->wIDmenu);
retvalue = (WORD)wndPtr->wIDmenu; retvalue = (WORD)wndPtr->wIDmenu;
goto end; goto end;
@ -1834,12 +1834,12 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
goto end; goto end;
case GWW_HINSTANCE: case GWW_HINSTANCE:
if (HIWORD(wndPtr->hInstance)) if (HIWORD(wndPtr->hInstance))
WARN(win,"GWW_HINSTANCE: discards high bits of 0x%08x!\n", WARN_(win)("GWW_HINSTANCE: discards high bits of 0x%08x!\n",
wndPtr->hInstance); wndPtr->hInstance);
retvalue = (WORD)wndPtr->hInstance; retvalue = (WORD)wndPtr->hInstance;
goto end; goto end;
default: default:
WARN( win, "Invalid offset %d\n", offset ); WARN_(win)("Invalid offset %d\n", offset );
retvalue = 0; retvalue = 0;
goto end; goto end;
} }
@ -1884,7 +1884,7 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
{ {
if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra) if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra)
{ {
WARN( win, "Invalid offset %d\n", offset ); WARN_(win)("Invalid offset %d\n", offset );
retval = 0; retval = 0;
goto end; goto end;
} }
@ -1897,7 +1897,7 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
case GWW_HWNDPARENT: retval = SetParent( hwnd, newval ); case GWW_HWNDPARENT: retval = SetParent( hwnd, newval );
goto end; goto end;
default: default:
WARN( win, "Invalid offset %d\n", offset ); WARN_(win)("Invalid offset %d\n", offset );
retval = 0; retval = 0;
goto end; goto end;
} }
@ -1923,7 +1923,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
{ {
if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra) if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra)
{ {
WARN( win, "Invalid offset %d\n", offset ); WARN_(win)("Invalid offset %d\n", offset );
retvalue = 0; retvalue = 0;
goto end; goto end;
} }
@ -1954,7 +1954,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
case GWL_HINSTANCE: retvalue = wndPtr->hInstance; case GWL_HINSTANCE: retvalue = wndPtr->hInstance;
goto end; goto end;
default: default:
WARN( win, "Unknown offset %d\n", offset ); WARN_(win)("Unknown offset %d\n", offset );
} }
retvalue = 0; retvalue = 0;
end: end:
@ -1981,7 +1981,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
WND * wndPtr = WIN_FindWndPtr( hwnd ); WND * wndPtr = WIN_FindWndPtr( hwnd );
STYLESTRUCT style; STYLESTRUCT style;
TRACE(win,"%x=%p %x %lx %x\n",hwnd, wndPtr, offset, newval, type); TRACE_(win)("%x=%p %x %lx %x\n",hwnd, wndPtr, offset, newval, type);
if (!wndPtr) if (!wndPtr)
{ {
@ -1994,7 +1994,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
{ {
if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra) if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra)
{ {
WARN( win, "Invalid offset %d\n", offset ); WARN_(win)("Invalid offset %d\n", offset );
/* Is this the right error? */ /* Is this the right error? */
SetLastError( ERROR_OUTOFMEMORY ); SetLastError( ERROR_OUTOFMEMORY );
@ -2053,7 +2053,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
goto end; goto end;
default: default:
WARN( win, "Invalid offset %d\n", offset ); WARN_(win)("Invalid offset %d\n", offset );
/* Don't think this is right error but it should do */ /* Don't think this is right error but it should do */
SetLastError( ERROR_OUTOFMEMORY ); SetLastError( ERROR_OUTOFMEMORY );
@ -2221,7 +2221,7 @@ INT WINAPI GetWindowTextA( HWND hwnd, LPSTR lpString, INT nMaxCount )
*/ */
INT WINAPI InternalGetWindowText(HWND hwnd,LPWSTR lpString,INT nMaxCount ) INT WINAPI InternalGetWindowText(HWND hwnd,LPWSTR lpString,INT nMaxCount )
{ {
FIXME(win,"(0x%08x,%p,0x%x),stub!\n",hwnd,lpString,nMaxCount); FIXME_(win)("(0x%08x,%p,0x%x),stub!\n",hwnd,lpString,nMaxCount);
return GetWindowTextW(hwnd,lpString,nMaxCount); return GetWindowTextW(hwnd,lpString,nMaxCount);
} }
@ -2981,7 +2981,7 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert )
{ {
WND *wndPtr = WIN_FindWndPtr(hWnd); WND *wndPtr = WIN_FindWndPtr(hWnd);
TRACE(win,"%04x\n", hWnd); TRACE_(win)("%04x\n", hWnd);
if (!wndPtr) return FALSE; if (!wndPtr) return FALSE;
@ -3026,7 +3026,7 @@ HWND16 WINAPI SetSysModalWindow16( HWND16 hWnd )
{ {
HWND hWndOldModal = hwndSysModal; HWND hWndOldModal = hwndSysModal;
hwndSysModal = hWnd; hwndSysModal = hWnd;
FIXME(win, "EMPTY STUB !! SetSysModalWindow(%04x) !\n", hWnd); FIXME_(win)("EMPTY STUB !! SetSysModalWindow(%04x) !\n", hWnd);
return hWndOldModal; return hWndOldModal;
} }
@ -3120,7 +3120,7 @@ BOOL16 DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo, BOOL bNoSend )
if(ptrWnd) if(ptrWnd)
{ {
TRACE(msg,"hwnd = %04x, %d %d - %d %d\n", TRACE_(msg)("hwnd = %04x, %d %d - %d %d\n",
ptrWnd->hwndSelf, ptrWnd->rectWindow.left, ptrWnd->rectWindow.top, ptrWnd->hwndSelf, ptrWnd->rectWindow.left, ptrWnd->rectWindow.top,
ptrWnd->rectWindow.right, ptrWnd->rectWindow.bottom ); ptrWnd->rectWindow.right, ptrWnd->rectWindow.bottom );
if( !(ptrWnd->dwStyle & WS_DISABLED) ) if( !(ptrWnd->dwStyle & WS_DISABLED) )
@ -3272,7 +3272,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
lpDragInfo->pt = msg.pt; lpDragInfo->pt = msg.pt;
/* update DRAGINFO struct */ /* update DRAGINFO struct */
TRACE(msg,"lpDI->hScope = %04x\n",lpDragInfo->hScope); TRACE_(msg)("lpDI->hScope = %04x\n",lpDragInfo->hScope);
if( DRAG_QueryUpdate(hwndScope, spDragInfo, FALSE) > 0 ) if( DRAG_QueryUpdate(hwndScope, spDragInfo, FALSE) > 0 )
hCurrentCursor = hCursor; hCurrentCursor = hCursor;

View File

@ -13,7 +13,7 @@
#include "struct32.h" #include "struct32.h"
#include "win.h" #include "win.h"
#include "winproc.h" #include "winproc.h"
#include "debug.h" #include "debugtools.h"
#include "spy.h" #include "spy.h"
#include "commctrl.h" #include "commctrl.h"
#include "task.h" #include "task.h"
@ -107,7 +107,7 @@ BOOL WINPROC_Init(void)
WinProcHeap = HeapCreate( HEAP_WINE_SEGPTR | HEAP_WINE_CODESEG, 0, 0 ); WinProcHeap = HeapCreate( HEAP_WINE_SEGPTR | HEAP_WINE_CODESEG, 0, 0 );
if (!WinProcHeap) if (!WinProcHeap)
{ {
WARN(relay, "Unable to create winproc heap\n" ); WARN_(relay)("Unable to create winproc heap\n" );
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -125,7 +125,7 @@ static LRESULT WINPROC_CallWndProc( WNDPROC proc, HWND hwnd, UINT msg,
LRESULT retvalue; LRESULT retvalue;
int iWndsLocks; int iWndsLocks;
TRACE(relay, "(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n", TRACE_(relay)("(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n",
proc, hwnd, SPY_GetMsgName(msg), wParam, lParam ); proc, hwnd, SPY_GetMsgName(msg), wParam, lParam );
/* To avoid any deadlocks, all the locks on the windows structures /* To avoid any deadlocks, all the locks on the windows structures
must be suspended before the control is passed to the application */ must be suspended before the control is passed to the application */
@ -240,7 +240,7 @@ static WINDOWPROC *WINPROC_AllocWinProc( WNDPROC16 func, WINDOWPROCTYPE type,
proc->user = user; proc->user = user;
} }
proc->next = NULL; proc->next = NULL;
TRACE(win, "(%08x,%d): returning %08x\n", TRACE_(win)("(%08x,%d): returning %08x\n",
(UINT)func, type, (UINT)proc ); (UINT)func, type, (UINT)proc );
return proc; return proc;
} }
@ -359,7 +359,7 @@ BOOL WINPROC_SetProc( HWINDOWPROC *pFirst, WNDPROC16 func,
/* Add the win proc at the head of the list */ /* Add the win proc at the head of the list */
TRACE(win, "(%08x,%08x,%d): res=%08x\n", TRACE_(win)("(%08x,%08x,%d): res=%08x\n",
(UINT)*pFirst, (UINT)func, type, (UINT)proc ); (UINT)*pFirst, (UINT)func, type, (UINT)proc );
proc->next = *(WINDOWPROC **)pFirst; proc->next = *(WINDOWPROC **)pFirst;
*(WINDOWPROC **)pFirst = proc; *(WINDOWPROC **)pFirst = proc;
@ -378,7 +378,7 @@ void WINPROC_FreeProc( HWINDOWPROC proc, WINDOWPROCUSER user )
{ {
WINDOWPROC *next = ((WINDOWPROC *)proc)->next; WINDOWPROC *next = ((WINDOWPROC *)proc)->next;
if (((WINDOWPROC *)proc)->user != user) break; if (((WINDOWPROC *)proc)->user != user) break;
TRACE(win, "freeing %08x\n", (UINT)proc); TRACE_(win)("freeing %08x\n", (UINT)proc);
HeapFree( WinProcHeap, 0, proc ); HeapFree( WinProcHeap, 0, proc );
proc = next; proc = next;
} }
@ -550,7 +550,7 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPARAM *plparam
case WM_PAINTCLIPBOARD: case WM_PAINTCLIPBOARD:
case WM_SIZECLIPBOARD: case WM_SIZECLIPBOARD:
case EM_SETPASSWORDCHAR: case EM_SETPASSWORDCHAR:
FIXME(msg, "message %s (0x%x) needs translation, please report\n", SPY_GetMsgName(msg), msg ); FIXME_(msg)("message %s (0x%x) needs translation, please report\n", SPY_GetMsgName(msg), msg );
return -1; return -1;
default: /* No translation needed */ default: /* No translation needed */
return 0; return 0;
@ -771,7 +771,7 @@ INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPARAM *plparam
case WM_PAINTCLIPBOARD: case WM_PAINTCLIPBOARD:
case WM_SIZECLIPBOARD: case WM_SIZECLIPBOARD:
case EM_SETPASSWORDCHAR: case EM_SETPASSWORDCHAR:
FIXME(msg, "message %s (%04x) needs translation, please report\n",SPY_GetMsgName(msg),msg ); FIXME_(msg)("message %s (%04x) needs translation, please report\n",SPY_GetMsgName(msg),msg );
return -1; return -1;
default: /* No translation needed */ default: /* No translation needed */
return 0; return 0;
@ -1123,7 +1123,7 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
case WM_PAINTCLIPBOARD: case WM_PAINTCLIPBOARD:
case WM_SIZECLIPBOARD: case WM_SIZECLIPBOARD:
case WM_WININICHANGE: case WM_WININICHANGE:
FIXME( msg, "message %04x needs translation\n",msg16 ); FIXME_(msg)("message %04x needs translation\n",msg16 );
return -1; return -1;
default: /* No translation needed */ default: /* No translation needed */
@ -1815,7 +1815,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case WM_PAINTCLIPBOARD: case WM_PAINTCLIPBOARD:
case WM_SIZECLIPBOARD: case WM_SIZECLIPBOARD:
case WM_WININICHANGE: case WM_WININICHANGE:
FIXME( msg, "message %04x needs translation\n", msg32 ); FIXME_(msg)("message %04x needs translation\n", msg32 );
return -1; return -1;
default: /* No translation needed */ default: /* No translation needed */
return 0; return 0;
@ -2252,7 +2252,7 @@ LRESULT WINAPI CallWindowProc16( WNDPROC16 func, HWND16 hwnd, UINT16 msg,
return WINPROC_CallProc16To32W( hwnd, msg, wParam, lParam, return WINPROC_CallProc16To32W( hwnd, msg, wParam, lParam,
proc->thunk.t_from16.proc ); proc->thunk.t_from16.proc );
default: default:
WARN( relay, "Invalid proc %p\n", proc ); WARN_(relay)("Invalid proc %p\n", proc );
return 0; return 0;
} }
} }
@ -2313,7 +2313,7 @@ LRESULT WINAPI CallWindowProcA(
return WINPROC_CallProc32ATo32W( proc->thunk.t_from16.proc, return WINPROC_CallProc32ATo32W( proc->thunk.t_from16.proc,
hwnd, msg, wParam, lParam ); hwnd, msg, wParam, lParam );
default: default:
WARN( relay, "Invalid proc %p\n", proc ); WARN_(relay)("Invalid proc %p\n", proc );
return 0; return 0;
} }
} }
@ -2349,7 +2349,7 @@ LRESULT WINAPI CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg,
return WINPROC_CallWndProc( proc->thunk.t_from16.proc, return WINPROC_CallWndProc( proc->thunk.t_from16.proc,
hwnd, msg, wParam, lParam ); hwnd, msg, wParam, lParam );
default: default:
WARN( relay, "Invalid proc %p\n", proc ); WARN_(relay)("Invalid proc %p\n", proc );
return 0; return 0;
} }
} }

View File

@ -22,7 +22,7 @@
#include "clipboard.h" #include "clipboard.h"
#include "dce.h" #include "dce.h"
#include "dde_proc.h" #include "dde_proc.h"
#include "debug.h" #include "debugtools.h"
#include "drive.h" #include "drive.h"
#include "heap.h" #include "heap.h"
#include "keyboard.h" #include "keyboard.h"
@ -361,7 +361,7 @@ static void EVENT_ProcessEvent( XEvent *event )
switch (event->type) switch (event->type)
{ {
case SelectionNotify: /* all of these should be caught by XCheckTypedWindowEvent() */ case SelectionNotify: /* all of these should be caught by XCheckTypedWindowEvent() */
FIXME(event,"Got SelectionNotify - must not happen!\n"); FIXME_(event)("Got SelectionNotify - must not happen!\n");
/* fall through */ /* fall through */
/* We get all these because of StructureNotifyMask. /* We get all these because of StructureNotifyMask.
@ -401,10 +401,10 @@ static void EVENT_ProcessEvent( XEvent *event )
if ( !pWnd && event->xany.window != X11DRV_GetXRootWindow() ) if ( !pWnd && event->xany.window != X11DRV_GetXRootWindow() )
ERR( event, "Got event %s for unknown Window %08lx\n", ERR_(event)("Got event %s for unknown Window %08lx\n",
event_names[event->type], event->xany.window ); event_names[event->type], event->xany.window );
else else
TRACE( event, "Got event %s for hwnd %04x\n", TRACE_(event)("Got event %s for hwnd %04x\n",
event_names[event->type], hWnd ); event_names[event->type], hWnd );
WIN_ReleaseWndPtr(pWnd); WIN_ReleaseWndPtr(pWnd);
@ -497,7 +497,7 @@ static void EVENT_ProcessEvent( XEvent *event )
break; break;
default: default:
WARN(event, "Unprocessed event %s for hwnd %04x\n", WARN_(event)("Unprocessed event %s for hwnd %04x\n",
event_names[event->type], hWnd ); event_names[event->type], hWnd );
break; break;
} }
@ -557,7 +557,7 @@ static Window __get_top_decoration( Window w, Window ancestor )
TSXQueryTree( display, w, &root, &parent, &children, &total ); TSXQueryTree( display, w, &root, &parent, &children, &total );
if( children ) TSXFree( children ); if( children ) TSXFree( children );
} while( parent && parent != ancestor ); } while( parent && parent != ancestor );
TRACE(event, "\t%08x -> %08x\n", (unsigned)prev, (unsigned)w ); TRACE_(event)("\t%08x -> %08x\n", (unsigned)prev, (unsigned)w );
return ( parent ) ? w : 0 ; return ( parent ) ? w : 0 ;
} }
@ -983,7 +983,7 @@ static void EVENT_ConfigureNotify( HWND hWnd, XConfigureEvent *event )
*/ */
EVENT_GetGeometry( event->window, &x, &y, &width, &height ); EVENT_GetGeometry( event->window, &x, &y, &width, &height );
TRACE(win, "%04x adjusted to (%i,%i)-(%i,%i)\n", pWnd->hwndSelf, TRACE_(win)("%04x adjusted to (%i,%i)-(%i,%i)\n", pWnd->hwndSelf,
x, y, x + width, y + height ); x, y, x + width, y + height );
/* Fill WINDOWPOS struct */ /* Fill WINDOWPOS struct */
@ -1124,7 +1124,7 @@ static void EVENT_SelectionRequest( HWND hWnd, XSelectionRequestEvent *event )
} }
if( rprop == None) if( rprop == None)
TRACE(event,"Request for %s ignored\n", TSXGetAtomName(display,event->target)); TRACE_(event)("Request for %s ignored\n", TSXGetAtomName(display,event->target));
/* reply to sender */ /* reply to sender */
@ -1314,8 +1314,8 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
AnyPropertyType, &u.atom_aux, &u.i, AnyPropertyType, &u.atom_aux, &u.i,
&data_length, &aux_long, &p_data); &data_length, &aux_long, &p_data);
if (aux_long) if (aux_long)
WARN(event,"property too large, truncated!\n"); WARN_(event)("property too large, truncated!\n");
TRACE(event,"urls=%s\n", p_data); TRACE_(event)("urls=%s\n", p_data);
if( !aux_long && p_data) { /* don't bother if > 64K */ if( !aux_long && p_data) { /* don't bother if > 64K */
/* calculate length */ /* calculate length */
@ -1388,13 +1388,13 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
if (strncmp(p,"file:",5) == 0 ) { if (strncmp(p,"file:",5) == 0 ) {
INT len = GetShortPathNameA( p+5, p_drop, 65535 ); INT len = GetShortPathNameA( p+5, p_drop, 65535 );
if (len) { if (len) {
TRACE(event, "drop file %s as %s\n", p+5, p_drop); TRACE_(event)("drop file %s as %s\n", p+5, p_drop);
p_drop += len+1; p_drop += len+1;
} else { } else {
WARN(event, "can't convert file %s to dos name \n", p+5); WARN_(event)("can't convert file %s to dos name \n", p+5);
} }
} else { } else {
WARN(event, "unknown mime type %s\n", p); WARN_(event)("unknown mime type %s\n", p);
} }
if (next) { if (next) {
*next = '\n'; *next = '\n';
@ -1463,12 +1463,12 @@ static void EVENT_ClientMessage( HWND hWnd, XClientMessageEvent *event )
dndSelection, 0, 65535, FALSE, dndSelection, 0, 65535, FALSE,
AnyPropertyType, &u.atom, &u.i, AnyPropertyType, &u.atom, &u.i,
&u.l, &u.l, &p_data); &u.l, &u.l, &p_data);
TRACE(event, "message_type=%ld, data=%ld,%ld,%ld,%ld,%ld, msg=%s\n", TRACE_(event)("message_type=%ld, data=%ld,%ld,%ld,%ld,%ld, msg=%s\n",
event->message_type, event->data.l[0], event->data.l[1], event->message_type, event->data.l[0], event->data.l[1],
event->data.l[2], event->data.l[3], event->data.l[4], event->data.l[2], event->data.l[3], event->data.l[4],
p_data); p_data);
#endif #endif
TRACE(event, "unrecognized ClientMessage\n" ); TRACE_(event)("unrecognized ClientMessage\n" );
} }
} }
} }
@ -1540,7 +1540,7 @@ void X11DRV_EVENT_WakeUp(void)
/* wake-up EVENT_WaitNetEvent function, a 32 bit thread post an event /* wake-up EVENT_WaitNetEvent function, a 32 bit thread post an event
for a 16 bit task */ for a 16 bit task */
if (write (__wakeup_pipe[1], "A", 1) != 1) if (write (__wakeup_pipe[1], "A", 1) != 1)
ERR(event, "unable to write in wakeup_pipe\n"); ERR_(event)("unable to write in wakeup_pipe\n");
} }

View File

@ -21,7 +21,7 @@
#include "ts_xutil.h" #include "ts_xutil.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "debug.h" #include "debugtools.h"
#include "keyboard.h" #include "keyboard.h"
#include "message.h" #include "message.h"
#include "windef.h" #include "windef.h"
@ -359,7 +359,7 @@ void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x, INT ev
don't treat it. It's from the same key press. Then the state goes to ON. don't treat it. It's from the same key press. Then the state goes to ON.
And from there, a 'release' event will switch off the toggle key. */ And from there, a 'release' event will switch off the toggle key. */
*State=FALSE; *State=FALSE;
TRACE(keyboard,"INTERM : don\'t treat release of toggle key. InputKeyStateTable[%#x] = %#x\n",vkey,pKeyStateTable[vkey]); TRACE_(keyboard)("INTERM : don\'t treat release of toggle key. InputKeyStateTable[%#x] = %#x\n",vkey,pKeyStateTable[vkey]);
} else } else
{ {
down = (vkey==VK_NUMLOCK ? KEYEVENTF_EXTENDEDKEY : 0); down = (vkey==VK_NUMLOCK ? KEYEVENTF_EXTENDEDKEY : 0);
@ -368,7 +368,7 @@ void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x, INT ev
{ {
if (Evtype!=KeyPress) if (Evtype!=KeyPress)
{ {
TRACE(keyboard,"ON + KeyRelease => generating DOWN and UP messages.\n"); TRACE_(keyboard)("ON + KeyRelease => generating DOWN and UP messages.\n");
KEYBOARD_SendEvent( vkey, scan, down, KEYBOARD_SendEvent( vkey, scan, down,
event_x, event_y, event_time ); event_x, event_y, event_time );
KEYBOARD_SendEvent( vkey, scan, up, KEYBOARD_SendEvent( vkey, scan, up,
@ -380,7 +380,7 @@ void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x, INT ev
else /* it was OFF */ else /* it was OFF */
if (Evtype==KeyPress) if (Evtype==KeyPress)
{ {
TRACE(keyboard,"OFF + Keypress => generating DOWN and UP messages.\n"); TRACE_(keyboard)("OFF + Keypress => generating DOWN and UP messages.\n");
KEYBOARD_SendEvent( vkey, scan, down, KEYBOARD_SendEvent( vkey, scan, down,
event_x, event_y, event_time ); event_x, event_y, event_time );
KEYBOARD_SendEvent( vkey, scan, up, KEYBOARD_SendEvent( vkey, scan, up,
@ -402,14 +402,14 @@ void KEYBOARD_UpdateOneState ( int vkey, int state )
/* Do something if internal table state != X state for keycode */ /* Do something if internal table state != X state for keycode */
if (((pKeyStateTable[vkey] & 0x80)!=0) != state) if (((pKeyStateTable[vkey] & 0x80)!=0) != state)
{ {
TRACE(keyboard,"Adjusting state for vkey %#.2x. State before %#.2x \n", TRACE_(keyboard)("Adjusting state for vkey %#.2x. State before %#.2x \n",
vkey, pKeyStateTable[vkey]); vkey, pKeyStateTable[vkey]);
/* Fake key being pressed inside wine */ /* Fake key being pressed inside wine */
KEYBOARD_SendEvent( vkey, 0, state? 0 : KEYEVENTF_KEYUP, KEYBOARD_SendEvent( vkey, 0, state? 0 : KEYEVENTF_KEYUP,
0, 0, GetTickCount() ); 0, 0, GetTickCount() );
TRACE(keyboard,"State after %#.2x \n",pKeyStateTable[vkey]); TRACE_(keyboard)("State after %#.2x \n",pKeyStateTable[vkey]);
} }
} }
@ -431,9 +431,9 @@ void X11DRV_KEYBOARD_UpdateState ( void )
char keys_return[32]; char keys_return[32];
TRACE(keyboard,"called\n"); TRACE_(keyboard)("called\n");
if (!TSXQueryKeymap(display, keys_return)) { if (!TSXQueryKeymap(display, keys_return)) {
ERR(keyboard,"Error getting keymap !"); ERR_(keyboard)("Error getting keymap !");
return; return;
} }
@ -470,10 +470,10 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
ascii_chars = TSXLookupString(event, Str, 1, &keysym, &cs); ascii_chars = TSXLookupString(event, Str, 1, &keysym, &cs);
TRACE(key, "EVENT_key : state = %X\n", event->state); TRACE_(key)("EVENT_key : state = %X\n", event->state);
if (keysym == XK_Mode_switch) if (keysym == XK_Mode_switch)
{ {
TRACE(key, "Alt Gr key event received\n"); TRACE_(key)("Alt Gr key event received\n");
event->keycode = kcControl; /* Simulate Control */ event->keycode = kcControl; /* Simulate Control */
X11DRV_KEYBOARD_HandleEvent( pWnd, event ); X11DRV_KEYBOARD_HandleEvent( pWnd, event );
@ -491,7 +491,7 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
ksname = TSXKeysymToString(keysym); ksname = TSXKeysymToString(keysym);
if (!ksname) if (!ksname)
ksname = "No Name"; ksname = "No Name";
TRACE(key, "%s : keysym=%lX (%s), ascii chars=%u / %X / '%s'\n", TRACE_(key)("%s : keysym=%lX (%s), ascii chars=%u / %X / '%s'\n",
(event->type == KeyPress) ? "KeyPress" : "KeyRelease", (event->type == KeyPress) ? "KeyPress" : "KeyRelease",
keysym, ksname, ascii_chars, Str[0] & 0xff, Str); keysym, ksname, ascii_chars, Str[0] & 0xff, Str);
} }
@ -499,7 +499,7 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
vkey = EVENT_event_to_vkey(event); vkey = EVENT_event_to_vkey(event);
if (force_extended) vkey |= 0x100; if (force_extended) vkey |= 0x100;
TRACE(key, "keycode 0x%x converted to vkey 0x%x\n", TRACE_(key)("keycode 0x%x converted to vkey 0x%x\n",
event->keycode, vkey); event->keycode, vkey);
if (vkey) if (vkey)
@ -511,16 +511,16 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
event_time ); event_time );
break; break;
case VK_CAPITAL: case VK_CAPITAL:
TRACE(keyboard,"Caps Lock event. (type %d). State before : %#.2x\n",event->type,pKeyStateTable[vkey]); TRACE_(keyboard)("Caps Lock event. (type %d). State before : %#.2x\n",event->type,pKeyStateTable[vkey]);
KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, event->type, event_x, event_y, KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, event->type, event_x, event_y,
event_time ); event_time );
TRACE(keyboard,"State after : %#.2x\n",pKeyStateTable[vkey]); TRACE_(keyboard)("State after : %#.2x\n",pKeyStateTable[vkey]);
break; break;
default: default:
/* Adjust the NUMLOCK state if it has been changed outside wine */ /* Adjust the NUMLOCK state if it has been changed outside wine */
if (!(pKeyStateTable[VK_NUMLOCK] & 0x01) != !(event->state & NumLockMask)) if (!(pKeyStateTable[VK_NUMLOCK] & 0x01) != !(event->state & NumLockMask))
{ {
TRACE(keyboard,"Adjusting NumLock state. \n"); TRACE_(keyboard)("Adjusting NumLock state. \n");
KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyPress, event_x, event_y, KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyPress, event_x, event_y,
event_time ); event_time );
KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyRelease, event_x, event_y, KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyRelease, event_x, event_y,
@ -529,7 +529,7 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
/* Adjust the CAPSLOCK state if it has been changed outside wine */ /* Adjust the CAPSLOCK state if it has been changed outside wine */
if (!(pKeyStateTable[VK_CAPITAL] & 0x01) != !(event->state & LockMask)) if (!(pKeyStateTable[VK_CAPITAL] & 0x01) != !(event->state & LockMask))
{ {
TRACE(keyboard,"Adjusting Caps Lock state.\n"); TRACE_(keyboard)("Adjusting Caps Lock state.\n");
KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyPress, event_x, event_y, KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyPress, event_x, event_y,
event_time ); event_time );
KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyRelease, event_x, event_y, KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyRelease, event_x, event_y,
@ -540,7 +540,7 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
CapsState = FALSE; CapsState = FALSE;
bScan = keyc2scan[event->keycode] & 0xFF; bScan = keyc2scan[event->keycode] & 0xFF;
TRACE(key, "bScan = 0x%02x.\n", bScan); TRACE_(key)("bScan = 0x%02x.\n", bScan);
dwFlags = 0; dwFlags = 0;
if ( event->type == KeyRelease ) dwFlags |= KEYEVENTF_KEYUP; if ( event->type == KeyRelease ) dwFlags |= KEYEVENTF_KEYUP;
@ -574,11 +574,11 @@ X11DRV_KEYBOARD_DetectLayout (void)
syms = keysyms_per_keycode; syms = keysyms_per_keycode;
if (syms > 4) { if (syms > 4) {
WARN (keyboard, "%d keysyms per keycode not supported, set to 4", syms); WARN_(keyboard)("%d keysyms per keycode not supported, set to 4", syms);
syms = 4; syms = 4;
} }
for (current = 0; main_key_tab[current].lang; current++) { for (current = 0; main_key_tab[current].lang; current++) {
TRACE (keyboard, "Attempting to match against layout %04x\n", TRACE_(keyboard)("Attempting to match against layout %04x\n",
main_key_tab[current].lang); main_key_tab[current].lang);
match = 0; match = 0;
mismatch = 0; mismatch = 0;
@ -622,14 +622,14 @@ X11DRV_KEYBOARD_DetectLayout (void)
if (key > pkey) seq++; if (key > pkey) seq++;
pkey = key; pkey = key;
} else { } else {
TRACE (key, "mismatch for keycode %d, character %c\n", keyc, TRACE_(key)("mismatch for keycode %d, character %c\n", keyc,
ckey[0]); ckey[0]);
mismatch++; mismatch++;
score -= syms; score -= syms;
} }
} }
} }
TRACE (keyboard, "matches=%d, mismatches=%d, score=%d\n", TRACE_(keyboard)("matches=%d, mismatches=%d, score=%d\n",
match, mismatch, score); match, mismatch, score);
if ((score > max_score) || if ((score > max_score) ||
((score == max_score) && (seq > max_seq))) { ((score == max_score) && (seq > max_seq))) {
@ -642,7 +642,7 @@ X11DRV_KEYBOARD_DetectLayout (void)
} }
/* we're done, report results if necessary */ /* we're done, report results if necessary */
if (!ismatch) { if (!ismatch) {
FIXME (keyboard, FIXME_(keyboard)(
"Your keyboard layout was not found!\n" "Your keyboard layout was not found!\n"
"Instead using closest match (%04x) for scancode mapping.\n" "Instead using closest match (%04x) for scancode mapping.\n"
"Please define your layout in windows/x11drv/keyboard.c and submit them\n" "Please define your layout in windows/x11drv/keyboard.c and submit them\n"
@ -650,7 +650,7 @@ X11DRV_KEYBOARD_DetectLayout (void)
"See documentation/keyboard for more information.\n", "See documentation/keyboard for more information.\n",
main_key_tab[kbd_layout].lang); main_key_tab[kbd_layout].lang);
} }
TRACE (keyboard, "detected layout is %04x\n", main_key_tab[kbd_layout].lang); TRACE_(keyboard)("detected layout is %04x\n", main_key_tab[kbd_layout].lang);
} }
/********************************************************************** /**********************************************************************
@ -689,12 +689,12 @@ void X11DRV_KEYBOARD_Init(void)
if (TSXKeycodeToKeysym(display, *kcp, k) == XK_Mode_switch) if (TSXKeycodeToKeysym(display, *kcp, k) == XK_Mode_switch)
{ {
AltGrMask = 1 << i; AltGrMask = 1 << i;
TRACE(key, "AltGrMask is %x\n", AltGrMask); TRACE_(key)("AltGrMask is %x\n", AltGrMask);
} }
else if (TSXKeycodeToKeysym(display, *kcp, k) == XK_Num_Lock) else if (TSXKeycodeToKeysym(display, *kcp, k) == XK_Num_Lock)
{ {
NumLockMask = 1 << i; NumLockMask = 1 << i;
TRACE(key, "NumLockMask is %x\n", NumLockMask); TRACE_(key)("NumLockMask is %x\n", NumLockMask);
} }
} }
} }
@ -815,7 +815,7 @@ void X11DRV_KEYBOARD_Init(void)
{ {
case 0xc1 : OEMvkey=0xdb; break; case 0xc1 : OEMvkey=0xdb; break;
case 0xe5 : OEMvkey=0xe9; break; case 0xe5 : OEMvkey=0xe9; break;
case 0xf6 : OEMvkey=0xf5; WARN(keyboard,"No more OEM vkey available!\n"); case 0xf6 : OEMvkey=0xf5; WARN_(keyboard)("No more OEM vkey available!\n");
} }
vkey = OEMvkey; vkey = OEMvkey;
@ -824,7 +824,7 @@ void X11DRV_KEYBOARD_Init(void)
{ {
dbg_decl_str(keyboard, 1024); dbg_decl_str(keyboard, 1024);
TRACE(keyboard, "OEM specific virtual key %X assigned " TRACE_(keyboard)("OEM specific virtual key %X assigned "
"to keycode %X:\n", OEMvkey, e2.keycode); "to keycode %X:\n", OEMvkey, e2.keycode);
for (i = 0; i < keysyms_per_keycode; i += 1) for (i = 0; i < keysyms_per_keycode; i += 1)
{ {
@ -836,7 +836,7 @@ void X11DRV_KEYBOARD_Init(void)
ksname = "NoSymbol"; ksname = "NoSymbol";
dsprintf(keyboard, "%lX (%s) ", keysym, ksname); dsprintf(keyboard, "%lX (%s) ", keysym, ksname);
} }
TRACE(keyboard, "(%s)\n", dbg_str(keyboard)); TRACE_(keyboard)("(%s)\n", dbg_str(keyboard));
} }
} }
} }
@ -854,7 +854,7 @@ void X11DRV_KEYBOARD_Init(void)
/* should make sure the scancode is unassigned here, but >=0x60 currently always is */ /* should make sure the scancode is unassigned here, but >=0x60 currently always is */
TRACE(key,"assigning scancode %02x to unidentified keycode %02x (%s)\n",scan,keyc,ksname); TRACE_(key)("assigning scancode %02x to unidentified keycode %02x (%s)\n",scan,keyc,ksname);
keyc2scan[keyc]=scan++; keyc2scan[keyc]=scan++;
} }
@ -887,7 +887,7 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
keycode = TSXKeysymToKeycode(display, keysym | 0xFE00); keycode = TSXKeysymToKeycode(display, keysym | 0xFE00);
} }
TRACE(keyboard,"VkKeyScan '%c'(%#lx, %lu): got keycode %#.2x\n", TRACE_(keyboard)("VkKeyScan '%c'(%#lx, %lu): got keycode %#.2x\n",
cChar,keysym,keysym,keycode); cChar,keysym,keysym,keycode);
if (keycode) if (keycode)
@ -896,12 +896,12 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
if (TSXKeycodeToKeysym(display,keycode,i)==keysym) index=i; if (TSXKeycodeToKeysym(display,keycode,i)==keysym) index=i;
switch (index) { switch (index) {
case -1 : case -1 :
WARN(keyboard,"Keysym %lx not found while parsing the keycode table\n",keysym); break; WARN_(keyboard)("Keysym %lx not found while parsing the keycode table\n",keysym); break;
case 0 : break; case 0 : break;
case 1 : highbyte = 0x0100; break; case 1 : highbyte = 0x0100; break;
case 2 : highbyte = 0x0600; break; case 2 : highbyte = 0x0600; break;
case 3 : highbyte = 0x0700; break; case 3 : highbyte = 0x0700; break;
default : ERR(keyboard,"index %d found by XKeycodeToKeysym. please report! \n",index); default : ERR_(keyboard)("index %d found by XKeycodeToKeysym. please report! \n",index);
} }
/* /*
index : 0 adds 0x0000 index : 0 adds 0x0000
@ -911,7 +911,7 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
index : 3 adds 0x0700 (ctrl+alt+shift) index : 3 adds 0x0700 (ctrl+alt+shift)
*/ */
} }
TRACE(keyboard," ... returning %#.2x\n", keyc2vkey[keycode]+highbyte); TRACE_(keyboard)(" ... returning %#.2x\n", keyc2vkey[keycode]+highbyte);
return keyc2vkey[keycode]+highbyte; /* keycode -> (keyc2vkey) vkey */ return keyc2vkey[keycode]+highbyte; /* keycode -> (keyc2vkey) vkey */
} }
@ -920,9 +920,9 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
*/ */
UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType) UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
{ {
#define returnMVK(value) { TRACE(keyboard,"returning 0x%x.\n",value); return value; } #define returnMVK(value) { TRACE_(keyboard)("returning 0x%x.\n",value); return value; }
TRACE(keyboard,"MapVirtualKey wCode=0x%x wMapType=%d ... \n", TRACE_(keyboard)("MapVirtualKey wCode=0x%x wMapType=%d ... \n",
wCode,wMapType); wCode,wMapType);
switch(wMapType) { switch(wMapType) {
case 0: { /* vkey-code to scan-code */ case 0: { /* vkey-code to scan-code */
@ -931,7 +931,7 @@ UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
for (keyc=min_keycode; keyc<=max_keycode; keyc++) for (keyc=min_keycode; keyc<=max_keycode; keyc++)
if ((keyc2vkey[keyc] & 0xFF) == wCode) if ((keyc2vkey[keyc] & 0xFF) == wCode)
returnMVK (keyc2scan[keyc] & 0xFF); returnMVK (keyc2scan[keyc] & 0xFF);
TRACE(keyboard,"returning no scan-code.\n"); TRACE_(keyboard)("returning no scan-code.\n");
return 0; } return 0; }
case 1: { /* scan-code to vkey-code */ case 1: { /* scan-code to vkey-code */
@ -940,7 +940,7 @@ UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
for (keyc=min_keycode; keyc<=max_keycode; keyc++) for (keyc=min_keycode; keyc<=max_keycode; keyc++)
if ((keyc2scan[keyc] & 0xFF) == (wCode & 0xFF)) if ((keyc2scan[keyc] & 0xFF) == (wCode & 0xFF))
returnMVK (keyc2vkey[keyc] & 0xFF); returnMVK (keyc2vkey[keyc] & 0xFF);
TRACE(keyboard,"returning no vkey-code.\n"); TRACE_(keyboard)("returning no vkey-code.\n");
return 0; } return 0; }
case 2: { /* vkey-code to unshifted ANSI code */ case 2: { /* vkey-code to unshifted ANSI code */
@ -976,25 +976,25 @@ UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
if (!e.keycode) if (!e.keycode)
{ {
WARN(keyboard,"Unknown virtual key %X !!! \n", wCode); WARN_(keyboard)("Unknown virtual key %X !!! \n", wCode);
return 0; /* whatever */ return 0; /* whatever */
} }
TRACE(keyboard,"Found keycode %d (0x%2X)\n",e.keycode,e.keycode); TRACE_(keyboard)("Found keycode %d (0x%2X)\n",e.keycode,e.keycode);
if (TSXLookupString(&e, s, 2, &keysym, NULL)) if (TSXLookupString(&e, s, 2, &keysym, NULL))
returnMVK (*s); returnMVK (*s);
TRACE(keyboard,"returning no ANSI.\n"); TRACE_(keyboard)("returning no ANSI.\n");
return 0; return 0;
} }
case 3: /* **NT only** scan-code to vkey-code but distinguish between */ case 3: /* **NT only** scan-code to vkey-code but distinguish between */
/* left and right */ /* left and right */
FIXME(keyboard, " stub for NT\n"); FIXME_(keyboard)(" stub for NT\n");
return 0; return 0;
default: /* reserved */ default: /* reserved */
WARN(keyboard, "Unknown wMapType %d !\n", WARN_(keyboard)("Unknown wMapType %d !\n",
wMapType); wMapType);
return 0; return 0;
} }
@ -1035,7 +1035,7 @@ INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
} }
ansi = X11DRV_KEYBOARD_MapVirtualKey(vkey, 2); ansi = X11DRV_KEYBOARD_MapVirtualKey(vkey, 2);
TRACE(keyboard, "scan 0x%04x, vkey 0x%04x, ANSI 0x%04x\n", TRACE_(keyboard)("scan 0x%04x, vkey 0x%04x, ANSI 0x%04x\n",
scanCode, vkey, ansi); scanCode, vkey, ansi);
if ( ((vkey >= 0x30) && (vkey <= 0x39)) || if ( ((vkey >= 0x30) && (vkey <= 0x39)) ||
@ -1053,7 +1053,7 @@ INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
/* use vkey values to construct names */ /* use vkey values to construct names */
FIXME(keyboard,"(%08lx,%p,%d): unsupported key\n",lParam,lpBuffer,nSize); FIXME_(keyboard)("(%08lx,%p,%d): unsupported key\n",lParam,lpBuffer,nSize);
if (lpBuffer && nSize) if (lpBuffer && nSize)
*lpBuffer = 0; *lpBuffer = 0;
@ -1134,7 +1134,7 @@ static char KEYBOARD_MapDeadKeysym(KeySym keysym)
return 's'; return 's';
*/ */
} }
TRACE(keyboard,"no character for dead keysym 0x%08lx\n",keysym); TRACE_(keyboard)("no character for dead keysym 0x%08lx\n",keysym);
return 0; return 0;
} }
@ -1169,12 +1169,12 @@ INT16 X11DRV_KEYBOARD_ToAscii(
if (scanCode==0) { if (scanCode==0) {
/* This happens when doing Alt+letter : a fake 'down arrow' key press /* This happens when doing Alt+letter : a fake 'down arrow' key press
event is generated by windows. Just ignore it. */ event is generated by windows. Just ignore it. */
TRACE(keyboard,"scanCode=0, doing nothing\n"); TRACE_(keyboard)("scanCode=0, doing nothing\n");
return 0; return 0;
} }
if (scanCode & 0x8000) if (scanCode & 0x8000)
{ {
TRACE( keyboard, "Key UP, doing nothing\n" ); TRACE_(keyboard)("Key UP, doing nothing\n" );
return 0; return 0;
} }
e.display = display; e.display = display;
@ -1193,7 +1193,7 @@ INT16 X11DRV_KEYBOARD_ToAscii(
} }
if (lpKeyState[VK_NUMLOCK] & 0x01) if (lpKeyState[VK_NUMLOCK] & 0x01)
e.state |= NumLockMask; e.state |= NumLockMask;
TRACE(key, "(%04X, %04X) : faked state = %X\n", TRACE_(key)("(%04X, %04X) : faked state = %X\n",
virtKey, scanCode, e.state); virtKey, scanCode, e.state);
/* We exit on the first keycode found, to speed up the thing. */ /* We exit on the first keycode found, to speed up the thing. */
for (keyc=min_keycode; (keyc<=max_keycode) && (!e.keycode) ; keyc++) for (keyc=min_keycode; (keyc<=max_keycode) && (!e.keycode) ; keyc++)
@ -1216,10 +1216,10 @@ INT16 X11DRV_KEYBOARD_ToAscii(
if (!e.keycode) if (!e.keycode)
{ {
WARN(keyboard,"Unknown virtual key %X !!! \n",virtKey); WARN_(keyboard)("Unknown virtual key %X !!! \n",virtKey);
return virtKey; /* whatever */ return virtKey; /* whatever */
} }
else TRACE(keyboard,"Found keycode %d (0x%2X)\n",e.keycode,e.keycode); else TRACE_(keyboard)("Found keycode %d (0x%2X)\n",e.keycode,e.keycode);
ret = TSXLookupString(&e, (LPVOID)lpChar, 2, &keysym, &cs); ret = TSXLookupString(&e, (LPVOID)lpChar, 2, &keysym, &cs);
if (ret == 0) if (ret == 0)
@ -1242,9 +1242,9 @@ INT16 X11DRV_KEYBOARD_ToAscii(
ksname = "No Name"; ksname = "No Name";
if ((keysym >> 8) != 0xff) if ((keysym >> 8) != 0xff)
{ {
ERR(keyboard, "Please report: no char for keysym %04lX (%s) :\n", ERR_(keyboard)("Please report: no char for keysym %04lX (%s) :\n",
keysym, ksname); keysym, ksname);
ERR(keyboard, "(virtKey=%X,scanCode=%X,keycode=%X,state=%X)\n", ERR_(keyboard)("(virtKey=%X,scanCode=%X,keycode=%X,state=%X)\n",
virtKey, scanCode, e.keycode, e.state); virtKey, scanCode, e.keycode, e.state);
} }
} }
@ -1261,7 +1261,7 @@ INT16 X11DRV_KEYBOARD_ToAscii(
} }
} }
TRACE(key, "ToAscii about to return %d with char %x\n", TRACE_(key)("ToAscii about to return %d with char %x\n",
ret, *(char*)lpChar); ret, *(char*)lpChar);
return ret; return ret;
} }