From 20cd9356a825b8042ec606fc4c9a20213604ebd9 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Tue, 12 Sep 2000 23:40:40 +0000 Subject: [PATCH] - fixes debugger output - get rid of wrong comments - fix comments - .spec spelling fix - improve warning message --- controls/button.c | 6 +++--- debugger/break.c | 14 ++++++++------ debugger/winedbg.c | 3 +++ dlls/comctl32/commctrl.c | 2 +- dlls/comctl32/tab.c | 10 +++------- dlls/ddraw/ddraw/x11.c | 2 +- dlls/gdi/gdi.spec | 2 +- files/file.c | 26 +++++++++++++------------- misc/main.c | 2 +- scheduler/process.c | 2 +- windows/message.c | 2 +- 11 files changed, 36 insertions(+), 35 deletions(-) diff --git a/controls/button.c b/controls/button.c index 0a14594a6ea..88fd9741a4e 100644 --- a/controls/button.c +++ b/controls/button.c @@ -241,7 +241,7 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg, !(SendMessageA(hWnd, BM_GETCHECK, 0, 0) & BST_CHECKED)) { /* The notification is sent when the button (BS_AUTORADIOBUTTON) - is unckecked and the focus was not given by a mouse click. */ + is unchecked and the focus was not given by a mouse click. */ if (style == BS_AUTORADIOBUTTON) SendMessageA( hWnd, BM_SETCHECK, BUTTON_CHECKED, 0 ); SendMessageA( GetParent(hWnd), WM_COMMAND, @@ -437,7 +437,7 @@ static void BUTTON_DrawPushButton( rc.right++, rc.bottom++; DrawEdge( hDC, &rc, EDGE_RAISED, BF_RECT ); - /* To place de bitmap correctly */ + /* To place the bitmap correctly */ xBorderOffset += GetSystemMetrics(SM_CXEDGE); yBorderOffset += GetSystemMetrics(SM_CYEDGE); @@ -549,7 +549,7 @@ static void BUTTON_DrawPushButton( xOffset = (((rc.right - rc.left) - 2*xBorderOffset) - imageWidth ) / 2; yOffset = (((rc.bottom - rc.top) - 2*yBorderOffset) - imageHeight) / 2; - /* If the image is too big for the button then create a region*/ + /* If the image is too big for the button then create a region */ if(xOffset < 0 || yOffset < 0) { HRGN hBitmapRgn = 0; diff --git a/debugger/break.c b/debugger/break.c index b3a07ba7982..e2ffe81469c 100644 --- a/debugger/break.c +++ b/debugger/break.c @@ -466,13 +466,15 @@ void DEBUG_AddWatchpoint( const DBG_VALUE *_value, BOOL is_write ) DEBUG_Printf(DBG_CHN_MESG, "Bad address. Watchpoint not set\n"); breakpoints[num].refcount = 0; } + else + { + breakpoints[num].u.w.rw = (is_write) ? TRUE : FALSE; + breakpoints[reg].u.w.reg = reg; - breakpoints[num].u.w.rw = (is_write) ? TRUE : FALSE; - breakpoints[reg].u.w.reg = reg; - - DEBUG_Printf( DBG_CHN_MESG, "Watchpoint %d at ", num ); - DEBUG_PrintAddress( &breakpoints[num].addr, breakpoints[num].is32 ? 32:16, TRUE ); - DEBUG_Printf( DBG_CHN_MESG, "\n" ); + DEBUG_Printf( DBG_CHN_MESG, "Watchpoint %d at ", num ); + DEBUG_PrintAddress( &breakpoints[num].addr, breakpoints[num].is32 ? 32:16, TRUE ); + DEBUG_Printf( DBG_CHN_MESG, "\n" ); + } } /*********************************************************************** diff --git a/debugger/winedbg.c b/debugger/winedbg.c index 8825b7041e4..1b78279008c 100644 --- a/debugger/winedbg.c +++ b/debugger/winedbg.c @@ -427,7 +427,10 @@ static BOOL DEBUG_HandleException(EXCEPTION_RECORD *rec, BOOL first_chance, BOOL DEBUG_Printf(DBG_CHN_MESG, "critical section %08lx wait failed", rec->ExceptionInformation[0]); if (!DBG_IVAR(BreakOnCritSectTimeOut)) + { + DEBUG_Printf(DBG_CHN_MESG, "\n"); return TRUE; + } break; default: DEBUG_Printf(DBG_CHN_MESG, "%08lx", rec->ExceptionCode); diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index ea3f7a4c19c..52a183deb81 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -180,7 +180,7 @@ COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) * This is the correct documentation: * * uMsg: - * MenuHelp() does NOT handle WM_COMMAND messages! It only handes + * MenuHelp() does NOT handle WM_COMMAND messages! It only handles * WM_MENUSELECT messages. * * lpwIDs: diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index c029cb82a08..ebb64347f61 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -692,7 +692,7 @@ TAB_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) /****************************************************************************** * TAB_AdjustRect * - * Calculates the tab control's display area given the windows rectangle or + * Calculates the tab control's display area given the window rectangle or * the window rectangle given the requested display rectangle. */ static LRESULT TAB_AdjustRect( @@ -825,10 +825,6 @@ static void TAB_SetupScrolling( */ if (infoPtr->hwndUpDown==0) { - /* - * I use a scrollbar since it seems to be more stable than the Updown - * control. - */ infoPtr->hwndUpDown = CreateWindowA("msctls_updown32", "", WS_VISIBLE | WS_CHILD | UDS_HORZ, @@ -2156,7 +2152,7 @@ TAB_Size (HWND hwnd, WPARAM wParam, LPARAM lParam) SetWindowPos (hwnd, 0, parent_rect.left, parent_rect.top, cx, cy, uPosFlags | SWP_NOZORDER); } else { - FIXME (tab,"WM_SIZE flag %x %lx not handled\n", wParam, lParam); + FIXME("WM_SIZE flag %x %lx not handled\n", wParam, lParam); } */ /* @@ -2204,7 +2200,7 @@ TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) TRACE("Created tab control, hwnd [%04x]\n", hwnd); /* The tab control always has the WS_CLIPSIBLINGS style. Even - if you don't specify in CreateWindow. This is necesary in + if you don't specify it in CreateWindow. This is necessary in order for paint to work correctly. This follows windows behaviour. */ dwStyle = GetWindowLongA(hwnd, GWL_STYLE); SetWindowLongA(hwnd, GWL_STYLE, dwStyle|WS_CLIPSIBLINGS); diff --git a/dlls/ddraw/ddraw/x11.c b/dlls/ddraw/ddraw/x11.c index 21bbb008f4e..5eb11a35698 100644 --- a/dlls/ddraw/ddraw/x11.c +++ b/dlls/ddraw/ddraw/x11.c @@ -748,7 +748,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_EnumDisplayModes( } } if (j == nvisuals) - WARN("Did not find visual corresponding the the pixmap format !\n"); + WARN("Did not find visual corresponding to the pixmap format !\n"); } } i++; diff --git a/dlls/gdi/gdi.spec b/dlls/gdi/gdi.spec index b5a119bcc47..0e802773962 100644 --- a/dlls/gdi/gdi.spec +++ b/dlls/gdi/gdi.spec @@ -430,6 +430,6 @@ owner gdi32 821 stub ICMDeleteTransform 822 stub ICMTranslateRGB 823 stub ICMTranslateRGBs -824 stub ICMCheckCOlorsInGamut +824 stub ICMCheckColorsInGamut 1000 pascal16 SetLayout(word long) SetLayout16 1001 stub GetLayout diff --git a/files/file.c b/files/file.c index 38cd03b904f..18750944850 100644 --- a/files/file.c +++ b/files/file.c @@ -5,7 +5,7 @@ * Copyright 1996 Alexandre Julliard * * TODO: - * Fix the CopyFileEx methods to implement the "extented" functionality. + * Fix the CopyFileEx methods to implement the "extended" functionality. * Right now, they simply call the CopyFile method. */ @@ -151,7 +151,7 @@ static BOOL FILE_ShareDeny( int mode, int oldmode) { case OF_SHARE_COMPAT: if (sharemode == OF_SHARE_COMPAT) return FALSE; - if (openmode == OF_READ) goto test_ro_err05 ; + if (openmode == OF_READ) goto test_ro_err05; goto fail_error05; case OF_SHARE_EXCLUSIVE: if (sharemode == OF_SHARE_COMPAT) goto fail_int24; @@ -165,13 +165,13 @@ static BOOL FILE_ShareDeny( int mode, int oldmode) switch (sharemode) { case OF_SHARE_COMPAT: - if (oldopenmode == OF_READ) goto test_ro_int24 ; + if (oldopenmode == OF_READ) goto test_ro_int24; goto fail_int24; - case OF_SHARE_DENY_NONE : + case OF_SHARE_DENY_NONE: return FALSE; - case OF_SHARE_DENY_WRITE : + case OF_SHARE_DENY_WRITE: if (oldopenmode == OF_READ) return FALSE; - case OF_SHARE_DENY_READ : + case OF_SHARE_DENY_READ: if (oldopenmode == OF_WRITE) return FALSE; case OF_SHARE_EXCLUSIVE: default: @@ -188,11 +188,11 @@ static BOOL FILE_ShareDeny( int mode, int oldmode) { case OF_SHARE_COMPAT: goto fail_int24; - case OF_SHARE_DENY_NONE : + case OF_SHARE_DENY_NONE: return FALSE; - case OF_SHARE_DENY_WRITE : + case OF_SHARE_DENY_WRITE: if (oldopenmode == OF_READ) return FALSE; - case OF_SHARE_DENY_READ : + case OF_SHARE_DENY_READ: if (oldopenmode == OF_WRITE) return FALSE; case OF_SHARE_EXCLUSIVE: default: @@ -204,11 +204,11 @@ static BOOL FILE_ShareDeny( int mode, int oldmode) { case OF_SHARE_COMPAT: goto fail_int24; - case OF_SHARE_DENY_NONE : + case OF_SHARE_DENY_NONE: return FALSE; - case OF_SHARE_DENY_WRITE : + case OF_SHARE_DENY_WRITE: if (oldopenmode == OF_READ) return FALSE; - case OF_SHARE_DENY_READ : + case OF_SHARE_DENY_READ: if (oldopenmode == OF_WRITE) return FALSE; case OF_SHARE_EXCLUSIVE: default: @@ -1007,7 +1007,7 @@ success: /* We get here if the open was successful */ return hFileRet; not_found: /* We get here if the file does not exist */ - WARN("'%s' not found\n", name ); + WARN("'%s' not found or sharing violation\n", name ); SetLastError( ERROR_FILE_NOT_FOUND ); /* fall through */ diff --git a/misc/main.c b/misc/main.c index 799529c0bd3..64588e0662e 100644 --- a/misc/main.c +++ b/misc/main.c @@ -180,7 +180,7 @@ void MAIN_ParseDebugOptions( const char *arg ) /*********************************************************************** * MAIN_WineInit * - * Wine initialisation and command-line parsing + * Wine initialisation */ void MAIN_WineInit(void) { diff --git a/scheduler/process.c b/scheduler/process.c index feaadcd6ab4..019756cedbf 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -40,7 +40,7 @@ PDB current_process; static char **main_exe_argv; static char main_exe_name[MAX_PATH]; -static HFILE main_exe_file = -1; +static HFILE main_exe_file = INVALID_HANDLE_VALUE; /*********************************************************************** diff --git a/windows/message.c b/windows/message.c index 765ee5867f9..7b57766ad39 100644 --- a/windows/message.c +++ b/windows/message.c @@ -90,7 +90,7 @@ static void MSG_SendParentNotify(WND* wndPtr, WORD event, WORD idChild, LPARAM l /*********************************************************************** * MSG_TranslateMouseMsg * - * Translate an mouse hardware event into a real mouse message. + * Translate a mouse hardware event into a real mouse message. * * Returns: *