Commit 06c275a6 authored by Alexandre Julliard's avatar Alexandre Julliard

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

script written by Patrik Stridvall).
parent 50b3d7b3
...@@ -14,7 +14,7 @@ ...@@ -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,13 +106,13 @@ void LISTBOX_Dump( WND *wnd ) ...@@ -106,13 +106,13 @@ 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 ) ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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 ) ...@@ -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, ...@@ -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) ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -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 ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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 ...@@ -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, ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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) ...@@ -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;
} }
...@@ -18,7 +18,7 @@ ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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);
} }
......
...@@ -23,7 +23,7 @@ ...@@ -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, ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 ) ...@@ -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, ...@@ -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 ) ...@@ -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, ...@@ -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;
} }
......
...@@ -31,7 +31,7 @@ ...@@ -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, ...@@ -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, ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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 ) ...@@ -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 ) ...@@ -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) ...@@ -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 ) ...@@ -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;
} }
...@@ -42,7 +42,7 @@ ...@@ -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 ) ...@@ -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 ) ...@@ -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) ...@@ -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) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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( ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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;
} }
...@@ -5,7 +5,7 @@ ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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;
} }
...@@ -7,7 +7,7 @@ ...@@ -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 ) ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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;
} }
......
...@@ -10,10 +10,9 @@ ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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;
} }
...@@ -11,7 +11,7 @@ ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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)
{ {
......
...@@ -25,7 +25,7 @@ typedef unsigned long Pixel; ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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) ...@@ -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;
} }
......
...@@ -23,7 +23,7 @@ ...@@ -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 ) ...@@ -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( ...@@ -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( ...@@ -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 ) ...@@ -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( ...@@ -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( ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 ...@@ -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);
......
...@@ -10,7 +10,7 @@ ...@@ -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) ...@@ -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() ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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;
......
...@@ -26,7 +26,7 @@ ...@@ -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) ...@@ -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) ...@@ -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() ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 ) ...@@ -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) { ...@@ -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() ...@@ -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() ...@@ -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() ...@@ -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() ...@@ -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) ...@@ -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) ...@@ -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)
......
...@@ -30,7 +30,7 @@ ...@@ -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) ...@@ -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 ...@@ -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 ...@@ -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, ...@@ -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, ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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) ...@@ -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) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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;
} }
......
...@@ -17,7 +17,7 @@ ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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;
......
...@@ -12,7 +12,7 @@ ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 */
} }
...@@ -16,7 +16,7 @@ ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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;
......
...@@ -14,7 +14,7 @@ ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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; ...@@ -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) ...@@ -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:
......
...@@ -15,7 +15,7 @@ ...@@ -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) ...@@ -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) ...@@ -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() ...@@ -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() ...@@ -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) ...@@ -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, ...@@ -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, ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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() ...@@ -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) {
......
...@@ -16,7 +16,7 @@ ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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) ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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, ...@@ -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 ) ...@@ -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;
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 );
......
...@@ -43,7 +43,7 @@ ...@@ -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 ...@@ -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, ...@@ -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, ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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( ...@@ -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 ) ...@@ -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 ) ...@@ -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, ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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, ...@@ -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)
......
...@@ -15,7 +15,7 @@ ...@@ -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 ) ...@@ -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) ...@@ -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) ...@@ -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 ) ...@@ -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);
} }
...@@ -8,11 +8,11 @@ ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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() );
} }
} }
......
...@@ -37,7 +37,7 @@ ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 ? */
} }
} }
......
...@@ -23,7 +23,7 @@ ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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() ...@@ -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( ...@@ -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( ...@@ -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 ...@@ -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( ...@@ -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( ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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) ...@@ -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) ...@@ -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");
......
...@@ -13,7 +13,7 @@ at a later date. */ ...@@ -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) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ...@@ -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() { ...@@ -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, ...@@ -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, ...@@ -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;
} }
...@@ -15,7 +15,7 @@ ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ) ...@@ -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 ) ...@@ -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;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment