strip whitespace from end of lines Modified: trunk/reactos/lib/user32/controls/controls.h Modified: trunk/reactos/lib/user32/controls/edit.c Modified: trunk/reactos/lib/user32/controls/regcontrol.c Modified: trunk/reactos/lib/user32/controls/scrollbar.c Modified: trunk/reactos/lib/user32/include/draw.h Modified: trunk/reactos/lib/user32/misc/desktop.c Modified: trunk/reactos/lib/user32/misc/display.c Modified: trunk/reactos/lib/user32/misc/dllmain.c Modified: trunk/reactos/lib/user32/misc/exit.c Modified: trunk/reactos/lib/user32/misc/exticon.c Modified: trunk/reactos/lib/user32/misc/object.c Modified: trunk/reactos/lib/user32/misc/resources.c Modified: trunk/reactos/lib/user32/misc/strpool.c Modified: trunk/reactos/lib/user32/misc/stubs.c Modified: trunk/reactos/lib/user32/misc/timer.c Modified: trunk/reactos/lib/user32/misc/winhelp.c Modified: trunk/reactos/lib/user32/misc/winsta.c Modified: trunk/reactos/lib/user32/misc/wsprintf.c Modified: trunk/reactos/lib/user32/windows/accel.c Modified: trunk/reactos/lib/user32/windows/bitmap.c Modified: trunk/reactos/lib/user32/windows/caret.c Modified: trunk/reactos/lib/user32/windows/class.c Modified: trunk/reactos/lib/user32/windows/clipboard.c Modified: trunk/reactos/lib/user32/windows/cursor.c Modified: trunk/reactos/lib/user32/windows/defwnd.c Modified: trunk/reactos/lib/user32/windows/dialog.c Modified: trunk/reactos/lib/user32/windows/draw.c Modified: trunk/reactos/lib/user32/windows/icon.c Modified: trunk/reactos/lib/user32/windows/input.c Modified: trunk/reactos/lib/user32/windows/mdi.c Modified: trunk/reactos/lib/user32/windows/menu.c Modified: trunk/reactos/lib/user32/windows/message.c Modified: trunk/reactos/lib/user32/windows/messagebox.c Modified: trunk/reactos/lib/user32/windows/nonclient.c Modified: trunk/reactos/lib/user32/windows/paint.c Modified: trunk/reactos/lib/user32/windows/prop.c Modified: trunk/reactos/lib/user32/windows/rect.c Modified: trunk/reactos/lib/user32/windows/window.c Modified: trunk/reactos/lib/user32/windows/winpos.c _____
Modified: trunk/reactos/lib/user32/controls/controls.h --- trunk/reactos/lib/user32/controls/controls.h 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/controls/controls.h 2005-05-09 01:42:07 UTC (rev 15167) @@ -6,9 +6,9 @@
#ifndef MAKEINTATOMA #define MAKEINTATOMA(atom) ((LPCSTR)((ULONG_PTR)((WORD)(atom)))) #endif -#ifndef WM_ISACTIVEICON +#ifndef WM_ISACTIVEICON #define WM_ISACTIVEICON 0x0035 -#endif +#endif
#ifndef __USE_W32API #if defined(STRICT) _____
Modified: trunk/reactos/lib/user32/controls/edit.c --- trunk/reactos/lib/user32/controls/edit.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/controls/edit.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -824,7 +824,7 @@
case WM_GETDLGCODE: result = DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS; - + if (es->style & ES_MULTILINE) { result |= DLGC_WANTALLKEYS; @@ -3799,7 +3799,7 @@ /*If Edit control style is ES_NUMBER allow users to key in only numeric values*/ if( (es->style & ES_NUMBER) && !( c >= '0' && c <= '9') ) break; - + if (!(es->style & ES_READONLY) && (c >= ' ') && (c != 127)) { WCHAR str[2]; str[0] = c; @@ -4593,7 +4593,7 @@ * If WS_BORDER without WS_EX_CLIENTEDGE is specified we shouldn't have * a nonclient area and we should handle painting the border ourselves. * - * When making modifications please ensure that the code still works + * When making modifications please ensure that the code still works * for edit controls created directly with style 0x50800000, exStyle 0 * (which should have a single pixel border) */ _____
Modified: trunk/reactos/lib/user32/controls/regcontrol.c --- trunk/reactos/lib/user32/controls/regcontrol.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/controls/regcontrol.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -19,7 +19,7 @@
WNDCLASSEXW wc; UNICODE_STRING ClassName; UNICODE_STRING MenuName; - + wc.cbSize = sizeof(WNDCLASSEXW); wc.lpszClassName = Descr->name; wc.lpfnWndProc = Descr->procW; _____
Modified: trunk/reactos/lib/user32/controls/scrollbar.c --- trunk/reactos/lib/user32/controls/scrollbar.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/controls/scrollbar.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -52,7 +52,7 @@
#define SCROLL_FIRST_DELAY 200 /* Delay (in ms) before first repetition when holding the button down */ #define SCROLL_REPEAT_DELAY 50 /* Delay (in ms) between scroll repetitions */ - + #define SCROLL_TIMER 0 /* Scroll timer id */
/* Minimum size of the rectangle between the arrows */ @@ -157,7 +157,7 @@ SelectObject(hDC, hSaveBrush); return; } - + ThumbTop -= ScrollBarInfo->dxyLineButton;
if (ScrollBarInfo->dxyLineButton) @@ -312,7 +312,7 @@
STATIC BOOL FASTCALL IntGetScrollBarInfo(HWND Wnd, INT Bar, PSCROLLBARINFO ScrollBarInfo) -{ +{ ScrollBarInfo->cbSize = sizeof(SCROLLBARINFO);
return NtUserGetScrollBarInfo(Wnd, IntScrollGetObjectId(Bar), ScrollBarInfo); @@ -349,7 +349,7 @@ { return; } - + if (IsRectEmpty(&Info.rcScrollBar)) { return; @@ -419,7 +419,7 @@ ThumbSize = ScrollBarInfo->xyThumbBottom - ThumbPos; ArrowSize = ScrollBarInfo->dxyLineButton;
- if (Vertical) + if (Vertical) { if (Pt.y < ScrollBarInfo->rcScrollBar.top + ArrowSize) { @@ -1069,7 +1069,7 @@ LPCREATESTRUCTW lpCreate /* [in] The style and place of the scroll bar */) { SCROLLINFO Info; - + Info.cbSize = sizeof(SCROLLINFO); Info.fMask = SIF_RANGE | SIF_PAGE | SIF_POS; Info.nMin = 0; @@ -1098,7 +1098,7 @@ } else if (0 != (lpCreate->style & SBS_SIZEBOXBOTTOMRIGHTALIGN)) { - MoveWindow(Wnd, lpCreate->x + lpCreate->cx - GetSystemMetrics(SM_CXVSCROLL) - 1, + MoveWindow(Wnd, lpCreate->x + lpCreate->cx - GetSystemMetrics(SM_CXVSCROLL) - 1, lpCreate->y + lpCreate->cy - GetSystemMetrics(SM_CYHSCROLL) - 1, GetSystemMetrics(SM_CXVSCROLL) + 1, GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE); @@ -1140,7 +1140,7 @@ IntScrollGetScrollPos(HWND Wnd, INT Bar) { SCROLLINFO ScrollInfo; - + ScrollInfo.cbSize = sizeof(SCROLLINFO); ScrollInfo.fMask = SIF_POS; if (! NtUserGetScrollInfo(Wnd, Bar, &ScrollInfo)) @@ -1156,13 +1156,13 @@ { BOOL Result; SCROLLINFO ScrollInfo; - + if (NULL == MinPos || NULL == MaxPos) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - + ScrollInfo.cbSize = sizeof(SCROLLINFO); ScrollInfo.fMask = SIF_RANGE; Result = NtUserGetScrollInfo(Wnd, Bar, &ScrollInfo); @@ -1171,7 +1171,7 @@ *MinPos = ScrollInfo.nMin; *MaxPos = ScrollInfo.nMax; } - + return Result; }
@@ -1194,7 +1194,7 @@ if (SB_CTL != SBType) { NtUserGetWindowRect(Wnd, &WindowRect); - + Pt.x -= WindowRect.left; Pt.y -= WindowRect.top;
@@ -1551,10 +1551,10 @@ { INT Result = 0; SCROLLINFO ScrollInfo; - + ScrollInfo.cbSize = sizeof(SCROLLINFO); ScrollInfo.fMask = SIF_POS; - + /* * Call NtUserGetScrollInfo() to get the previous position that * we will later return. @@ -1569,7 +1569,7 @@ NtUserSetScrollInfo(hWnd, nBar, &ScrollInfo, bRedraw); } } - + return Result; }
_____
Modified: trunk/reactos/lib/user32/include/draw.h --- trunk/reactos/lib/user32/include/draw.h 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/include/draw.h 2005-05-09 01:42:07 UTC (rev 15167) @@ -1 +1 @@
-HPEN STDCALL GetSysColorPen (int nIndex);; +HPEN STDCALL GetSysColorPen (int nIndex); _____
Modified: trunk/reactos/lib/user32/misc/desktop.c --- trunk/reactos/lib/user32/misc/desktop.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/desktop.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -110,7 +110,7 @@
return TRUE; } #endif - + /* FIXME - Read the registry key for now, but what happens if the wallpaper was changed without SPIF_UPDATEINIFILE?! */ if(RegOpenKeyExW(HKEY_CURRENT_USER, @@ -138,7 +138,7 @@ HBITMAP hNewWallpaper; BOOL Ret; LPSTR lpWallpaper = (LPSTR)pvParam; - + if(lpWallpaper != NULL && *lpWallpaper != '\0') { hNewWallpaper = LoadImageA(0, lpWallpaper, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); @@ -152,7 +152,7 @@ hNewWallpaper = NULL; lpWallpaper = NULL; } - + /* Set the wallpaper bitmap */ if(!NtUserSystemParametersInfo(SPI_SETDESKWALLPAPER, 0, &hNewWallpaper, fWinIni & SPIF_SENDCHANGE)) { @@ -161,7 +161,7 @@ return FALSE; } /* Do not use the bitmap handle anymore, it doesn't belong to our process anymore! */ - + Ret = TRUE; if(fWinIni & SPIF_UPDATEINIFILE) { @@ -317,12 +317,12 @@ HDESK hDesktop; DEVMODEW DevmodeW;
- if (lpszDesktop != NULL) + if (lpszDesktop != NULL) { RtlInitAnsiString(&DesktopNameA, (LPSTR)lpszDesktop); RtlAnsiStringToUnicodeString(&DesktopNameU, &DesktopNameA, TRUE); - } - else + } + else { RtlInitUnicodeString(&DesktopNameU, NULL); } _____
Modified: trunk/reactos/lib/user32/misc/display.c --- trunk/reactos/lib/user32/misc/display.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/display.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -49,7 +49,7 @@
BOOL rc; UNICODE_STRING Device; DISPLAY_DEVICEW DisplayDeviceW; - + if ( !RtlCreateUnicodeStringFromAsciiz ( &Device, (PCSZ)lpDevice ) ) { SetLastError ( ERROR_OUTOFMEMORY ); @@ -62,7 +62,7 @@ iDevNum, &DisplayDeviceW, dwFlags ); - + /* Copy result from DisplayDeviceW to lpDisplayDevice */ lpDisplayDevice->StateFlags = DisplayDeviceW.StateFlags; WideCharToMultiByte(CP_ACP,0, _____
Modified: trunk/reactos/lib/user32/misc/dllmain.c --- trunk/reactos/lib/user32/misc/dllmain.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/dllmain.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -36,7 +36,7 @@
{ PUSER32_THREAD_DATA ThreadData;
- ThreadData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + ThreadData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(USER32_THREAD_DATA)); TlsSetValue(User32TlsIndex, ThreadData); } _____
Modified: trunk/reactos/lib/user32/misc/exit.c --- trunk/reactos/lib/user32/misc/exit.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/exit.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -43,10 +43,10 @@
* Execution continues in WinLogon, which calls ExitWindowsEx() again to * terminate COM processes in the interactive user's session. * - WinLogon stops impersonating the interactive user (whos processes are - * all dead by now). and enters log-out state + * all dead by now). and enters log-out state * - If the ExitWindowsEx() request was for a logoff, WinLogon sends a SAS * event (to display the "press ctrl+alt+del") to the GINA. WinLogon then - * waits for the GINA to send a SAS event to login. + * waits for the GINA to send a SAS event to login. * - If the ExitWindowsEx() request was for shutdown/restart, WinLogon calls * ExitWindowsEx() again in the system process context. * - CSRSS goes through the motions of sending WM_QUERYENDSESSION/WM_ENDSESSION _____
Modified: trunk/reactos/lib/user32/misc/exticon.c --- trunk/reactos/lib/user32/misc/exticon.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/exticon.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -333,9 +333,9 @@
NE_NAMEINFO *pIconStorage = NULL; NE_NAMEINFO *pIconDir = NULL; LPicoICONDIR lpiID = NULL; - + TRACE("-- OS2/icon Signature (0x%08lx)\n", sig); - + if (pData == (BYTE*)-1) { pCIDir = ICO_GetIconDirectory(peimage, &lpiID, &uSize); /* check for .ICO file */ @@ -361,7 +361,7 @@ } pTInfo = (NE_TYPEINFO *)((char*)(pTInfo+1)+pTInfo->count*sizeof(NE_NAMEINFO)); } - + if ((pIconStorage && pIconDir) || lpiID) /* load resources and create icons */ { if (nIcons == 0) @@ -375,7 +375,7 @@ UINT16 i, icon; if (nIcons > iconDirCount - nIconIndex) nIcons = iconDirCount - nIconIndex; - + for (i = 0; i < nIcons; i++) { /* .ICO files have only one icon directory */ @@ -385,7 +385,7 @@ } if (lpiID && pCIDir) /* *.ico file, deallocate heap pointer*/ HeapFree(GetProcessHeap(), 0, pCIDir); - + for (icon = 0; icon < nIcons; icon++) { pCIDir = NULL; @@ -395,7 +395,7 @@ for (i = 0; i < iconCount; i++) if (pIconStorage[i].id == ((int)pIconId[icon] | 0x8000) ) pCIDir = USER32_LoadResource(peimage, pIconStorage + i, *(WORD*)pData, &uSize); - + if (pCIDir) RetPtr[icon] = (HICON)CreateIconFromResourceEx(pCIDir, uSize, TRUE, 0x00030000, (icon & 1) ? cx2 : cx1, (icon & 1) ? cy2 : cy1, flags); @@ -410,7 +410,7 @@
/* exe/dll */ else if( sig == IMAGE_NT_SIGNATURE ) -#endif +#endif if( sig == IMAGE_NT_SIGNATURE ) { LPBYTE idata,igdata; _____
Modified: trunk/reactos/lib/user32/misc/object.c --- trunk/reactos/lib/user32/misc/object.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/object.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -93,15 +93,15 @@
LPDWORD lpnLengthNeeded) { LPWSTR buffer; - BOOL ret = TRUE; - + BOOL ret = TRUE; + DPRINT("GetUserObjectInformationA(%x %d %x %d %x)\n", hObj, nIndex, pvInfo, nLength, lpnLengthNeeded); - + if (nIndex != UOI_NAME && nIndex != UOI_TYPE) return GetUserObjectInformationW(hObj, nIndex, pvInfo, nLength, lpnLengthNeeded);
- /* allocate unicode buffer */ + /* allocate unicode buffer */ buffer = HeapAlloc(GetProcessHeap(), 0, nLength*2); if (buffer == NULL) { @@ -124,7 +124,7 @@ } }
- /* free resources */ + /* free resources */ HeapFree(GetProcessHeap(), 0, buffer); return ret; } _____
Modified: trunk/reactos/lib/user32/misc/resources.c --- trunk/reactos/lib/user32/misc/resources.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/resources.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -127,7 +127,7 @@
strBuf.Buffer = lpBuffer;
nErrCode = RtlUnicodeStringToAnsiString(&strBuf, &wstrResStr, FALSE); - + if(!NT_SUCCESS(nErrCode)) { /* failure */ @@ -198,10 +198,10 @@
/* copy the string */ memcpy(lpBuffer, wstrResStr.Buffer, nStringLen * sizeof(WCHAR)); - + /* null-terminate it */ lpBuffer[nStringLen] = 0; - + /* success */ return nStringLen; } _____
Modified: trunk/reactos/lib/user32/misc/strpool.c --- trunk/reactos/lib/user32/misc/strpool.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/strpool.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -62,7 +62,7 @@
HEAP_strcpyAtoW ( LPWSTR lpszW, LPCSTR lpszA, DWORD len ) { NTSTATUS Status = - RtlMultiByteToUnicodeN ( lpszW, len*sizeof(WCHAR), NULL, (LPSTR)lpszA, len ); + RtlMultiByteToUnicodeN ( lpszW, len*sizeof(WCHAR), NULL, (LPSTR)lpszA, len ); lpszW[len] = L'\0'; return Status; } _____
Modified: trunk/reactos/lib/user32/misc/stubs.c --- trunk/reactos/lib/user32/misc/stubs.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/stubs.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -177,7 +177,7 @@
BOOL fForce) { SendMessageW(hWnd, WM_CLOSE, 0, 0); - + if (IsWindow(hWnd)) { if (fForce) @@ -185,7 +185,7 @@ else return FALSE; } - + return TRUE; }
@@ -515,7 +515,7 @@ /* * @unimplemented */ -BOOL +BOOL STDCALL AlignRects(LPRECT rect, DWORD b, DWORD c, DWORD d) { @@ -752,7 +752,7 @@ /* * @unimplemented */ -LRESULT +LRESULT STDCALL SendIMEMessageExW(HWND hwnd,LPARAM lparam) { @@ -763,7 +763,7 @@ /* * @unimplemented */ -LRESULT +LRESULT STDCALL SendIMEMessageExA(HWND hwnd, LPARAM lparam) { _____
Modified: trunk/reactos/lib/user32/misc/timer.c --- trunk/reactos/lib/user32/misc/timer.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/timer.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -43,7 +43,7 @@
HWND hWnd, UINT_PTR IDEvent) { - return NtUserKillSystemTimer(hWnd, IDEvent); + return NtUserKillSystemTimer(hWnd, IDEvent); }
@@ -56,7 +56,7 @@ HWND hWnd, UINT_PTR IDEvent) { - return NtUserKillTimer(hWnd, IDEvent); + return NtUserKillTimer(hWnd, IDEvent); }
_____
Modified: trunk/reactos/lib/user32/misc/winhelp.c --- trunk/reactos/lib/user32/misc/winhelp.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/winhelp.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -71,7 +71,7 @@
if (WinExec("winhlp32.exe -x", SW_SHOWNORMAL) < 32) { //ERR("can't start winhlp32.exe -x ?\n"); return FALSE; - } + } if (!(hDest = FindWindowA("MS_WINHELP", NULL))) { //FIXME("did not find MS_WINHELP (FindWindow() failed, maybe global window handling still unimplemented)\n"); return FALSE; _____
Modified: trunk/reactos/lib/user32/misc/winsta.c --- trunk/reactos/lib/user32/misc/winsta.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/winsta.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -35,14 +35,14 @@
ANSI_STRING WindowStationNameA; UNICODE_STRING WindowStationNameU; HWINSTA hWinSta; - - if (lpwinsta != NULL) + + if (lpwinsta != NULL) { RtlInitAnsiString(&WindowStationNameA, lpwinsta); - RtlAnsiStringToUnicodeString(&WindowStationNameU, &WindowStationNameA, + RtlAnsiStringToUnicodeString(&WindowStationNameU, &WindowStationNameA, TRUE); - } - else + } + else { RtlInitUnicodeString(&WindowStationNameU, NULL); } @@ -53,7 +53,7 @@ lpsa);
RtlFreeUnicodeString(&WindowStationNameU); - + return hWinSta; }
@@ -68,9 +68,9 @@ LPSECURITY_ATTRIBUTES lpsa) { UNICODE_STRING WindowStationName; - + RtlInitUnicodeString(&WindowStationName, lpwinsta); - + return NtUserCreateWindowStation(&WindowStationName, dwDesiredAccess, lpsa, 0, 0, 0); @@ -294,22 +294,22 @@ ANSI_STRING WindowStationNameA; UNICODE_STRING WindowStationNameU; HWINSTA hWinSta; - - if (lpszWinSta != NULL) + + if (lpszWinSta != NULL) { RtlInitAnsiString(&WindowStationNameA, lpszWinSta); - RtlAnsiStringToUnicodeString(&WindowStationNameU, &WindowStationNameA, + RtlAnsiStringToUnicodeString(&WindowStationNameU, &WindowStationNameA, TRUE); - } - else + } + else { RtlInitUnicodeString(&WindowStationNameU, NULL); } - + hWinSta = OpenWindowStationW(WindowStationNameU.Buffer, fInherit, dwDesiredAccess); - + RtlFreeUnicodeString(&WindowStationNameU);
return hWinSta; _____
Modified: trunk/reactos/lib/user32/misc/wsprintf.c --- trunk/reactos/lib/user32/misc/wsprintf.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/misc/wsprintf.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -26,7 +26,7 @@
* PROJECT: ReactOS User32 * PURPOSE: [w]sprintf functions * FILE: lib/user32/wsprintf.c - * PROGRAMER: Steven Edwards + * PROGRAMER: Steven Edwards * REVISION HISTORY: 2003/07/13 Merged from wine user/wsprintf.c * NOTES: Adapted from Wine */ _____
Modified: trunk/reactos/lib/user32/windows/accel.c --- trunk/reactos/lib/user32/windows/accel.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/windows/accel.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -59,7 +59,7 @@
return a pointer to the list link that points to the desired entry */ U32_ACCEL_CACHE_ENTRY ** ppEntry = &U32AccelCache; - + for(; *ppEntry; ppEntry = &((*ppEntry)->Next)) if((*ppEntry)->Object == Object || (*ppEntry)->Data == Data) break;
@@ -145,7 +145,7 @@
/* free the buffer */ LocalFree(pAccTableData); - + /* failure */ if(hAccTable == NULL) goto l_Leave;
@@ -229,7 +229,7 @@ { return U32LoadAccelerators ( - hInstance, + hInstance, FindResourceExW(hInstance, MAKEINTRESOURCEW(RT_ACCELERATOR), lpTableName, 0) ); } @@ -296,9 +296,9 @@ ) { int i; - + cAccelEntries = CopyAcceleratorTableW(hAccelSrc, lpAccelDst, cAccelEntries); - + if (lpAccelDst == NULL) return cAccelEntries;
for(i = 0; i < cAccelEntries; ++ i) @@ -310,11 +310,11 @@ NULL, (PWCHAR)&lpAccelDst[i].key, sizeof(lpAccelDst[i].key) - ); - + ); + if(!NT_SUCCESS(nErrCode)) lpAccelDst[i].key = 0; } - + return cAccelEntries; }
_____
Modified: trunk/reactos/lib/user32/windows/bitmap.c --- trunk/reactos/lib/user32/windows/bitmap.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/windows/bitmap.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -57,7 +57,7 @@
UNICODE_STRING NameString;
if (HIWORD(lpszName)) - { + { RtlCreateUnicodeStringFromAsciiz(&NameString, (LPSTR)lpszName); lpszWName = NameString.Buffer; Handle = LoadImageW(hinst, lpszWName, uType, cxDesired, @@ -93,7 +93,7 @@ INT id; ICONIMAGE *ResIcon; UINT ColorBits; - + if (!(fuLoad & LR_LOADFROMFILE)) { if (hinst == NULL) @@ -105,7 +105,7 @@ { return NULL; } - + if (fuLoad & LR_SHARED) { /* FIXME - pass size! */ @@ -151,7 +151,7 @@ 32, 32, fuLoad & (LR_DEFAULTCOLOR | LR_MONOCHROME)); if (hIcon && 0 != (fuLoad & LR_SHARED)) { - NtUserSetCursorIconData((HICON)hIcon, NULL, NULL, hinst, (HRSRC)hfRes, + NtUserSetCursorIconData((HICON)hIcon, NULL, NULL, hinst, (HRSRC)hfRes, (HRSRC)NULL); }
@@ -162,7 +162,7 @@ { DbgPrint("FIXME: need LR_SHARED support loading cursor images from files\n"); } - + hFile = CreateFileW(lpszName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (hFile == NULL) @@ -185,7 +185,7 @@ return NULL; }
- /* + /* * Get a handle to the screen dc, the icon we create is going to be * compatable with it. */ @@ -219,7 +219,7 @@ return(NULL); }
- SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, dirEntry->dwBytesInRes); + SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, dirEntry->dwBytesInRes); memcpy(SafeIconImage, ((PBYTE)IconDIR) + dirEntry->dwImageOffset, dirEntry->dwBytesInRes);
/* at this point we have a copy of the icon image to play with */ @@ -241,7 +241,7 @@ } HeaderSize = sizeof(BITMAPINFOHEADER) + ColorCount * sizeof(RGBQUAD); } - + /* make data point to the start of the XOR image data */ Data = (PBYTE)SafeIconImage + HeaderSize;
@@ -271,7 +271,7 @@ GRPCURSORICONDIR* IconResDir; INT id; ICONIMAGE *ResIcon; - + if (!(fuLoad & LR_LOADFROMFILE)) { if (hinst == NULL) @@ -283,7 +283,7 @@ { return(NULL); } - + if (fuLoad & LR_SHARED) { hIcon = NtUserFindExistingCursorIcon(hinst, (HRSRC)hfRes, width, height); @@ -326,7 +326,7 @@ width, height, fuLoad & (LR_DEFAULTCOLOR | LR_MONOCHROME)); if (hIcon && 0 != (fuLoad & LR_SHARED)) { - NtUserSetCursorIconData((HICON)hIcon, NULL, NULL, hinst, (HRSRC)hfRes, + NtUserSetCursorIconData((HICON)hIcon, NULL, NULL, hinst, (HRSRC)hfRes, (HRSRC)NULL); } return hIcon; @@ -334,7 +334,7 @@ else { /* - * FIXME: This code is incorrect and is likely to crash in many cases. + * FIXME: This code is incorrect and is likely to crash in many cases. * In the file the cursor/icon directory records are stored like * CURSORICONFILEDIR, but we treat them like CURSORICONDIR. In Wine * this is solved by creating a fake cursor/icon directory in memory @@ -345,7 +345,7 @@ { DbgPrint("FIXME: need LR_SHARED support for loading icon images from files\n"); } - + hFile = CreateFileW(lpszName, GENERIC_READ, FILE_SHARE_READ, @@ -396,7 +396,7 @@ return(NULL); }
- SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, dirEntry->dwBytesInRes); + SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, dirEntry->dwBytesInRes);
memcpy(SafeIconImage, ((PBYTE)IconDIR) + dirEntry->dwImageOffset, dirEntry->dwBytesInRes);
@@ -423,7 +423,7 @@ } HeaderSize = sizeof(BITMAPINFOHEADER) + ColorCount * sizeof(RGBQUAD); } - + //make data point to the start of the XOR image data Data = (PBYTE)SafeIconImage + HeaderSize;
@@ -503,7 +503,7 @@ NULL); CloseHandle(hFile); if (hSection == NULL) - { + { return(NULL); } BitmapInfo = MapViewOfFile(hSection, @@ -567,7 +567,7 @@ { DIBSECTION Dib;
- hBitmap = CreateDIBSection(hScreenDc, PrivateInfo, DIB_RGB_COLORS, NULL, + hBitmap = CreateDIBSection(hScreenDc, PrivateInfo, DIB_RGB_COLORS, NULL, 0, 0); GetObjectA(hBitmap, sizeof(DIBSECTION), &Dib); SetDIBits(hScreenDc, hBitmap, 0, Dib.dsBm.bmHeight, Data, BitmapInfo, @@ -595,7 +595,7 @@ int cxDesired, int cyDesired, UINT fuLoad) -{ +{ if (fuLoad & LR_DEFAULTSIZE) { if (uType == IMAGE_ICON) @@ -692,7 +692,7 @@ } return res; } - case IMAGE_ICON: + case IMAGE_ICON: { static BOOL IconMsgDisplayed = FALSE; /* FIXME: support loading the image as shared from an instance */ @@ -702,7 +702,7 @@ } return CopyIcon(hnd); } - case IMAGE_CURSOR: + case IMAGE_CURSOR: { static BOOL IconMsgDisplayed = FALSE; /* FIXME: support loading the image as shared from an instance */ _____
Modified: trunk/reactos/lib/user32/windows/caret.c --- trunk/reactos/lib/user32/windows/caret.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/windows/caret.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -36,7 +36,7 @@
void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo) { HDC hDC, hComp; - + hDC = GetDC(hWnd); if(hDC) { _____
Modified: trunk/reactos/lib/user32/windows/class.c --- trunk/reactos/lib/user32/windows/class.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/windows/class.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -56,7 +56,7 @@
else { Status = HEAP_strdupAtoW(&str, (LPCSTR)lpszClass, NULL); - + if (! NT_SUCCESS(Status)) { SetLastError(RtlNtStatusToDosError(Status)); @@ -278,7 +278,7 @@ int result; LPWSTR ClassNameW; NTSTATUS Status; - + if(!lpClassName) return 0;
@@ -436,7 +436,7 @@ /* Yes, this is correct. We should modify the passed structure. */ if (lpwcx->hInstance == NULL) ((WNDCLASSEXA*)lpwcx)->hInstance = GetModuleHandleW(NULL); - + RtlCopyMemory(&WndClass, lpwcx, sizeof(WNDCLASSEXW));
if (IS_ATOM(lpwcx->lpszMenuName) || lpwcx->lpszMenuName == 0) @@ -728,7 +728,7 @@ LPWSTR ClassName; NTSTATUS Status; BOOL Result; - + if(!IS_ATOM(lpClassName)) { Status = HEAP_strdupAtoW(&ClassName, lpClassName, NULL); @@ -740,12 +740,12 @@ } else ClassName = (LPWSTR)lpClassName; - + Result = (BOOL)NtUserUnregisterClass((LPCWSTR)ClassName, hInstance, 0); - - if(ClassName && !IS_ATOM(lpClassName)) + + if(ClassName && !IS_ATOM(lpClassName)) HEAP_free(ClassName); - + return Result; }
_____
Modified: trunk/reactos/lib/user32/windows/clipboard.c --- trunk/reactos/lib/user32/windows/clipboard.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/windows/clipboard.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -114,7 +114,7 @@
HEAP_strcpyWtoA(lpszFormatName, lpBuffer, Length); HEAP_free(lpBuffer); DPRINT("GetClipboardFormatNameA(%x): returning %s\n", format, lpszFormatName); - + return Length; }
@@ -126,7 +126,7 @@ { UNICODE_STRING FormatName; ULONG Ret; - + FormatName.Length = 0; FormatName.MaximumLength = cchMaxCount * sizeof(WCHAR); FormatName.Buffer = (PWSTR)lpszFormatName; _____
Modified: trunk/reactos/lib/user32/windows/cursor.c --- trunk/reactos/lib/user32/windows/cursor.c 2005-05-09 01:41:26 UTC (rev 15166) +++ trunk/reactos/lib/user32/windows/cursor.c 2005-05-09 01:42:07 UTC (rev 15167) @@ -44,7 +44,7 @@
{ BOOL *DefaultCursor = (BOOL*)Arguments; LRESULT Result = TRUE; - + if(*DefaultCursor) { /* set default cursor */ @@ -56,7 +56,7 @@ SetCursor(0); SetCursor(LoadCursorW(0, (LPCWSTR)IDC_ARROW)); } - + return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS)); }
@@ -70,7 +70,7 @@ CopyCursor(HCURSOR pcur) { ICONINFO IconInfo; - + if(NtUserGetCursorIconInfo((HANDLE)pcur, &IconInfo)) { return (HCURSOR)NtUserCreateCursorIconHandle(&IconInfo, FALSE); @@ -124,10 +124,10 @@ IconInfo.hbmMask = CreateDIBitmap(hScreenDc, &bwBIH->bmiHeader, 0, NULL, bwBIH, DIB_RGB_COLORS); if (IconInfo.hbmMask) - { - SetDIBits(hScreenDc, IconInfo.hbmMask, 0, nHeight, + { + SetDIBits(hScreenDc, IconInfo.hbmMask, 0, nHeight, pvXORPlane, bwBIH, DIB_RGB_COLORS); - SetDIBits(hScreenDc, IconInfo.hbmMask, nHeight, nHeight, + SetDIBits(hScreenDc, IconInfo.hbmMask, nHeight, nHeight, pvANDPlane, bwBIH, DIB_RGB_COLORS); } else @@ -141,7 +141,7 @@ IconInfo.xHotspot = xHotSpot; IconInfo.yHotspot = yHotSpot; IconInfo.hbmColor = 0; - + return (HCURSOR)NtUserCreateCursorIconHandle(&IconInfo, FALSE); }
[truncated at 1000 lines; 3276 more skipped]