ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
654 discussions
Start a n
N
ew thread
[gschneider] 42364: Use ALL_X macros in fstat, fixes one msvcrt file winetest
by gschneider@svn.reactos.org
Author: gschneider Date: Mon Aug 3 18:57:20 2009 New Revision: 42364 URL:
http://svn.reactos.org/svn/reactos?rev=42364&view=rev
Log: Use ALL_X macros in fstat, fixes one msvcrt file winetest Modified: trunk/reactos/lib/sdk/crt/stdio/stat64.c Modified: trunk/reactos/lib/sdk/crt/stdio/stat64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/stat64.c…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdio/stat64.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/stdio/stat64.c [iso-8859-1] Mon Aug 3 18:57:20 2009 @@ -128,9 +128,9 @@ _dosmaperr(ERROR_INVALID_PARAMETER); return -1; } - buf->st_mode = _S_IFREG | _S_IREAD; + buf->st_mode = _S_IFREG | ALL_S_IREAD; if (!(hfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) - buf->st_mode |= _S_IWRITE; + buf->st_mode |= ALL_S_IWRITE; buf->st_size = ((__int64)hfi.nFileSizeHigh << 32) + hfi.nFileSizeLow; RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastAccessTime, &dw); buf->st_atime = dw;
15 years, 4 months
1
0
0
0
[gschneider] 42363: - Fix mbslwr: increment pointer in both cases (prevents infinite loops) - Check for null character pointers, apply somewhat readable formatting - Add some useful header information See issue #4755 for more details.
by gschneider@svn.reactos.org
Author: gschneider Date: Mon Aug 3 18:15:40 2009 New Revision: 42363 URL:
http://svn.reactos.org/svn/reactos?rev=42363&view=rev
Log: - Fix mbslwr: increment pointer in both cases (prevents infinite loops) - Check for null character pointers, apply somewhat readable formatting - Add some useful header information See issue #4755 for more details. Modified: trunk/reactos/lib/sdk/crt/mbstring/mbslwr.c Modified: trunk/reactos/lib/sdk/crt/mbstring/mbslwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/mbslw…
============================================================================== --- trunk/reactos/lib/sdk/crt/mbstring/mbslwr.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mbstring/mbslwr.c [iso-8859-1] Mon Aug 3 18:15:40 2009 @@ -1,12 +1,10 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries - * FILE: lib/sdk/crt/mbstring/ismbpun.c - * PURPOSE: - * PROGRAMER: - * UPDATE HISTORY: - * 05/30/08: Samuel Serapion adapted from PROJECT C Library - * + * FILE: lib/sdk/crt/mbstring/mbslwr.c + * PURPOSE: Multibyte lowercase functions + * PROGRAMER: Eric Kohl + * Samuel Serapion, adapted from PROJECT C Library */ #include <precomp.h> @@ -33,14 +31,24 @@ */ unsigned char * _mbslwr(unsigned char *x) { - unsigned char *y=x; + unsigned char *y=x; - while (*y) { - if (!_ismbblead(*y)) { + if (x == NULL) + { + return NULL; + } + + while (*y) + { + if (!_ismbblead(*y)) + { *y = tolower(*y); - } else { - *y=_mbctolower(*(unsigned short *)y); - y++; + y++; + } + else + { + *y = _mbctolower(*(unsigned short *)y); + y++; } } return x;
15 years, 4 months
1
0
0
0
[sginsberg] 42362: - strmini.h: Include windef.h so CDECL gets defined for msvc version of DEFINE_GUIDEX in ks.h - Fix misc msvc issues in paint, setup, mmsys and mmebuddy - Simplify the way kernel32 is built, reverting the "test" from 14241
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Aug 3 15:46:37 2009 New Revision: 42362 URL:
http://svn.reactos.org/svn/reactos?rev=42362&view=rev
Log: - strmini.h: Include windef.h so CDECL gets defined for msvc version of DEFINE_GUIDEX in ks.h - Fix misc msvc issues in paint, setup, mmsys and mmebuddy - Simplify the way kernel32 is built, reverting the "test" from 14241 Modified: trunk/reactos/base/applications/paint/drawing.c trunk/reactos/base/applications/paint/winproc.c trunk/reactos/base/setup/reactos/reactos.c trunk/reactos/dll/cpl/mmsys/volume.c trunk/reactos/dll/win32/kernel32/kernel32.rbuild trunk/reactos/include/ddk/strmini.h trunk/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c trunk/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c trunk/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c trunk/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c trunk/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c trunk/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c Modified: trunk/reactos/base/applications/paint/drawing.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/dr…
============================================================================== --- trunk/reactos/base/applications/paint/drawing.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/drawing.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -81,12 +81,13 @@ void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, int color, int thickness) { + HPEN oldPen; POINT fourPoints[4]; fourPoints[0] = p1; fourPoints[1] = p2; fourPoints[2] = p3; fourPoints[3] = p4; - HPEN oldPen = SelectObject(hdc, CreatePen(PS_SOLID, thickness, color)); + oldPen = SelectObject(hdc, CreatePen(PS_SOLID, thickness, color)); PolyBezier(hdc, fourPoints, 4); DeleteObject(SelectObject(hdc, oldPen)); } Modified: trunk/reactos/base/applications/paint/winproc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/wi…
============================================================================== --- trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -313,8 +313,9 @@ if (hwnd==hwndMiniature) { long mclient[4]; + HDC hdc; GetClientRect(hwndMiniature, (LPRECT)&mclient); - HDC hdc = GetDC(hwndMiniature); + hdc = GetDC(hwndMiniature); BitBlt(hdc, -min(imgXRes*GetScrollPos(hScrollbox, SB_HORZ)/10000, imgXRes-mclient[2]), -min(imgYRes*GetScrollPos(hScrollbox, SB_VERT)/10000, imgYRes-mclient[3]), imgXRes, imgYRes, hDrawingDC, 0, 0, SRCCOPY); ReleaseDC(hwndMiniature, hdc); Modified: trunk/reactos/base/setup/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos…
============================================================================== --- trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -364,8 +364,9 @@ if (tindex != CB_ERR) { + WORD LangID; SetupData.SelectedLangId = SendMessage(hList, CB_GETITEMDATA, (WPARAM) tindex, (LPARAM) 0); - WORD LangID = _tcstol(SetupData.pLanguages[SetupData.SelectedLangId].LangId, NULL, 16); + LangID = _tcstol(SetupData.pLanguages[SetupData.SelectedLangId].LangId, NULL, 16); SetThreadLocale(MAKELCID(LangID, SORT_DEFAULT)); // FIXME: need to reload all resource to force // the new language setting Modified: trunk/reactos/dll/cpl/mmsys/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/mmsys/volume.c?rev…
============================================================================== --- trunk/reactos/dll/cpl/mmsys/volume.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/mmsys/volume.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -292,9 +292,9 @@ LPARAM lParam) { static IMGINFO ImgInfo; + PGLOBAL_DATA pGlobalData; UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(wParam); - PGLOBAL_DATA pGlobalData; pGlobalData = (PGLOBAL_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER); Modified: trunk/reactos/dll/win32/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -1,154 +1,144 @@ <?xml version="1.0"?> <!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd"> -<group> - <module name="kernel32_base" type="objectlibrary" crt="dll"> - <include base="kernel32_base">.</include> - <include base="kernel32_base">include</include> - <include base="ReactOS">include/reactos/subsys</include> - <define name="_KERNEL32_" /> - <redefine name="_WIN32_WINNT">0x0600</redefine> - <define name="__NO_CTYPE_INLINES" /> - <define name="NTDDI_VERSION">0x05020100</define> - <dependency>errcodes</dependency> - <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
- <pch>k32.h</pch> - --> - <group compilerset="gcc"> - <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7
--> - <compilerflag>-fno-unit-at-a-time</compilerflag> - <compilerflag compiler="cxx">-fno-exceptions</compilerflag> - <compilerflag compiler="cxx">-fno-rtti</compilerflag> - </group> - <directory name="debug"> - <file>debugger.c</file> - <file>output.c</file> - </directory> - <directory name="except"> - <file>except.c</file> - </directory> - <directory name="file"> - <file>backup.c</file> - <file>bintype.c</file> - <file>cnotify.c</file> - <file>copy.c</file> - <file>create.c</file> - <file>curdir.c</file> - <file>delete.c</file> - <file>deviceio.c</file> - <file>dir.c</file> - <file>dosdev.c</file> - <file>file.c</file> - <file>find.c</file> - <file>hardlink.c</file> - <file>iocompl.c</file> - <file>lfile.c</file> - <file>lock.c</file> - <file>mailslot.c</file> - <file>move.c</file> - <file>npipe.c</file> - <file>pipe.c</file> - <file>rw.c</file> - <file>tape.c</file> - <file>volume.c</file> - </directory> - <directory name="mem"> - <file>global.c</file> - <file>heap.c</file> - <file>isbad.c</file> - <file>local.c</file> - <file>procmem.c</file> - <file>resnotify.c</file> - <file>section.c</file> - <file>virtual.c</file> - </directory> - <directory name="misc"> - <file>actctx.c</file> - <file>atom.c</file> - <file>chartype.c</file> - <file>collation.c</file> - <file>casemap.c</file> - <file>comm.c</file> - <file>commdcb.c</file> - <file>computername.c</file> - <file>console.c</file> - <file>dllmain.c</file> - <file>env.c</file> - <file>error.c</file> - <file>errormsg.c</file> - <file>fold.c</file> - <file>handle.c</file> - <file>lang.c</file> - <file>ldr.c</file> - <file>lzexpand.c</file> - <file>muldiv.c</file> - <file>nls.c</file> - <file>perfcnt.c</file> - <file>power.c</file> - <file>recovery.c</file> - <file>res.c</file> - <file>sortkey.c</file> - <file>stubs.c</file> - <file>sysinfo.c</file> - <file>time.c</file> - <file>timerqueue.c</file> - <file>toolhelp.c</file> - <file>version.c</file> - </directory> - <directory name="process"> - <file>cmdline.c</file> - <file>procsup.c</file> - <file>job.c</file> - <file>proc.c</file> - <file>session.c</file> - </directory> - <directory name="string"> - <file>lstring.c</file> - </directory> - <directory name="synch"> - <file>condvar.c</file> - <file>critical.c</file> - <file>event.c</file> - <file>mutex.c</file> - <file>sem.c</file> - <file>timer.c</file> - <file>wait.c</file> - </directory> - <directory name="thread"> - <file>fiber.c</file> - <file>fls.c</file> - <file>thread.c</file> - <file>tls.c</file> - </directory> - <directory name="misc"> - <file>lcformat.c</file> - <file>profile.c</file> - <file>utils.c</file> - </directory> - <directory name="thread"> - <if property="ARCH" value="i386"> - <directory name="i386"> - <file>fiber.S</file> - <file>thread.S</file> - </directory> - </if> - </directory> - - <directory name="misc"> - <file>icustubs.cpp</file> - </directory> - <library>normalize</library> - </module> - <module name="kernel32" type="win32dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll" crt="dll"> - <importlibrary definition="kernel32.pspec" /> - <include base="kernel32">.</include> - <include base="kernel32" root="intermediate">.</include> - <include base="kernel32">include</include> - <library>kernel32_base</library> - <library>wine</library> - <library>pseh</library> - - <file>kernel32.rc</file> - - <library>ntdll</library> - </module> -</group> +<module name="kernel32" type="win32dll" crt="dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll"> + <importlibrary definition="kernel32.pspec" /> + <include base="kernel32">.</include> + <include base="kernel32" root="intermediate">.</include> + <include base="kernel32">include</include> + <include base="ReactOS">include/reactos/subsys</include> + <library>wine</library> + <library>pseh</library> + <library>normalize</library> + <library>ntdll</library> + <define name="_KERNEL32_" /> + <redefine name="_WIN32_WINNT">0x0600</redefine> + <define name="__NO_CTYPE_INLINES" /> + <define name="NTDDI_VERSION">0x05020100</define> + <dependency>errcodes</dependency> + <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
+ <pch>k32.h</pch> + --> + <group compilerset="gcc"> + <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7
--> + <compilerflag>-fno-unit-at-a-time</compilerflag> + <compilerflag compiler="cxx">-fno-exceptions</compilerflag> + <compilerflag compiler="cxx">-fno-rtti</compilerflag> + </group> + <directory name="debug"> + <file>debugger.c</file> + <file>output.c</file> + </directory> + <directory name="except"> + <file>except.c</file> + </directory> + <directory name="file"> + <file>backup.c</file> + <file>bintype.c</file> + <file>cnotify.c</file> + <file>copy.c</file> + <file>create.c</file> + <file>curdir.c</file> + <file>delete.c</file> + <file>deviceio.c</file> + <file>dir.c</file> + <file>dosdev.c</file> + <file>file.c</file> + <file>find.c</file> + <file>hardlink.c</file> + <file>iocompl.c</file> + <file>lfile.c</file> + <file>lock.c</file> + <file>mailslot.c</file> + <file>move.c</file> + <file>npipe.c</file> + <file>pipe.c</file> + <file>rw.c</file> + <file>tape.c</file> + <file>volume.c</file> + </directory> + <directory name="mem"> + <file>global.c</file> + <file>heap.c</file> + <file>isbad.c</file> + <file>local.c</file> + <file>procmem.c</file> + <file>resnotify.c</file> + <file>section.c</file> + <file>virtual.c</file> + </directory> + <directory name="misc"> + <file>actctx.c</file> + <file>atom.c</file> + <file>chartype.c</file> + <file>collation.c</file> + <file>casemap.c</file> + <file>comm.c</file> + <file>commdcb.c</file> + <file>computername.c</file> + <file>console.c</file> + <file>dllmain.c</file> + <file>env.c</file> + <file>error.c</file> + <file>errormsg.c</file> + <file>fold.c</file> + <file>handle.c</file> + <file>lang.c</file> + <file>ldr.c</file> + <file>lzexpand.c</file> + <file>muldiv.c</file> + <file>nls.c</file> + <file>perfcnt.c</file> + <file>power.c</file> + <file>recovery.c</file> + <file>res.c</file> + <file>sortkey.c</file> + <file>stubs.c</file> + <file>sysinfo.c</file> + <file>time.c</file> + <file>timerqueue.c</file> + <file>toolhelp.c</file> + <file>version.c</file> + </directory> + <directory name="process"> + <file>cmdline.c</file> + <file>procsup.c</file> + <file>job.c</file> + <file>proc.c</file> + <file>session.c</file> + </directory> + <directory name="string"> + <file>lstring.c</file> + </directory> + <directory name="synch"> + <file>condvar.c</file> + <file>critical.c</file> + <file>event.c</file> + <file>mutex.c</file> + <file>sem.c</file> + <file>timer.c</file> + <file>wait.c</file> + </directory> + <directory name="thread"> + <file>fiber.c</file> + <file>fls.c</file> + <file>thread.c</file> + <file>tls.c</file> + </directory> + <directory name="misc"> + <file>lcformat.c</file> + <file>profile.c</file> + <file>utils.c</file> + </directory> + <directory name="thread"> + <if property="ARCH" value="i386"> + <directory name="i386"> + <file>fiber.S</file> + <file>thread.S</file> + </directory> + </if> + </directory> + <directory name="misc"> + <file>icustubs.cpp</file> + </directory> + <file>kernel32.rc</file> +</module> Modified: trunk/reactos/include/ddk/strmini.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/strmini.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/strmini.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/strmini.h [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -2,6 +2,7 @@ #define _STREAM_H #include <ntddk.h> +#include <windef.h> #include <ks.h> #define STREAMAPI __stdcall Modified: trunk/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -21,7 +21,8 @@ /* Standard MME driver entry-point for messages relating to auxiliary devices. */ -APIENTRY DWORD +DWORD +APIENTRY auxMessage( DWORD DeviceId, DWORD Message, Modified: trunk/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -21,7 +21,8 @@ /* Standard MME driver entry-point for messages relating to MIDI input. */ -APIENTRY DWORD +DWORD +APIENTRY midMessage( DWORD DeviceId, DWORD Message, Modified: trunk/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -21,7 +21,8 @@ /* Standard MME driver entry-point for messages relating to MIDI output. */ -APIENTRY DWORD +DWORD +APIENTRY modMessage( DWORD DeviceId, DWORD Message, Modified: trunk/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -21,7 +21,8 @@ /* Standard MME driver entry-point for messages relating to mixers. */ -APIENTRY DWORD +DWORD +APIENTRY mxdMessage( DWORD DeviceId, DWORD Message, Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/wave/header.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -224,10 +224,10 @@ PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID Parameter) { + PWAVEHDR WaveHeader = (PWAVEHDR) Parameter; + VALIDATE_MMSYS_PARAMETER( SoundDeviceInstance ); VALIDATE_MMSYS_PARAMETER( Parameter ); - - PWAVEHDR WaveHeader = (PWAVEHDR) Parameter; /* Initialise */ WaveHeader->lpNext = NULL; Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -22,7 +22,8 @@ Standard MME driver entry-point for messages relating to wave audio input. */ -APIENTRY DWORD +DWORD +APIENTRY widMessage( DWORD DeviceId, DWORD Message, Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c [iso-8859-1] Mon Aug 3 15:46:37 2009 @@ -31,7 +31,8 @@ Standard MME driver entry-point for messages relating to wave audio output. */ -APIENTRY DWORD +DWORD +APIENTRY wodMessage( DWORD DeviceId, DWORD Message,
15 years, 4 months
1
0
0
0
[khornicek] 42361: - clip text
by khornicek@svn.reactos.org
Author: khornicek Date: Mon Aug 3 15:31:19 2009 New Revision: 42361 URL:
http://svn.reactos.org/svn/reactos?rev=42361&view=rev
Log: - clip text Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] Mon Aug 3 15:31:19 2009 @@ -59,7 +59,7 @@ rcBounds.left = xspan; rcBounds.top = y; rcBounds.right = xspan+lenspan; rcBounds.bottom = y+1; GreLineTo(&physDev->pBitmap->SurfObj, - NULL, + physDev->CombinedClip, &pTextBrush->BrushObj, xspan, y,
15 years, 4 months
1
0
0
0
[cgutman] 42360: - Revert r42358 due to what seems to be issues handling cleanup IRPs
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 3 09:07:21 2009 New Revision: 42360 URL:
http://svn.reactos.org/svn/reactos?rev=42360&view=rev
Log: - Revert r42358 due to what seems to be issues handling cleanup IRPs Modified: trunk/reactos/drivers/network/afd/afd/bind.c trunk/reactos/drivers/network/afd/afd/connect.c trunk/reactos/drivers/network/afd/afd/main.c trunk/reactos/drivers/network/afd/afd/tdi.c Modified: trunk/reactos/drivers/network/afd/afd/bind.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] Mon Aug 3 09:07:21 2009 @@ -32,6 +32,11 @@ FCB->LocalAddress, &FCB->AddressFile.Handle, &FCB->AddressFile.Object ); + + if (NT_SUCCESS(Status)) + { + ObReferenceObject(FCB->AddressFile.Object); + } AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); Modified: trunk/reactos/drivers/network/afd/afd/connect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] Mon Aug 3 09:07:21 2009 @@ -29,6 +29,11 @@ FCB->Connection.Object ); } + if (NT_SUCCESS(Status)) + { + ObReferenceObject(FCB->Connection.Object); + } + return Status; } Modified: trunk/reactos/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Mon Aug 3 09:07:21 2009 @@ -96,8 +96,6 @@ FCB->DeviceExt = DeviceExt; FCB->Recv.Size = DEFAULT_RECEIVE_WINDOW_SIZE; FCB->Send.Size = DEFAULT_SEND_WINDOW_SIZE; - FCB->AddressFile.Handle = INVALID_HANDLE_VALUE; - FCB->Connection.Handle = INVALID_HANDLE_VALUE; KeInitializeSpinLock( &FCB->SpinLock ); ExInitializeFastMutex( &FCB->Mutex ); @@ -224,20 +222,14 @@ FCB->RemoteAddress = NULL; } if( FCB->Connection.Object ) { + ZwClose(FCB->Connection.Handle); ObDereferenceObject(FCB->Connection.Object); FCB->Connection.Object = NULL; } if( FCB->AddressFile.Object ) { + ZwClose(FCB->AddressFile.Handle); ObDereferenceObject(FCB->AddressFile.Object); FCB->AddressFile.Object = NULL; - } - if( FCB->AddressFile.Handle != INVALID_HANDLE_VALUE ) { - ZwClose(FCB->AddressFile.Handle); - FCB->AddressFile.Handle = INVALID_HANDLE_VALUE; - } - if( FCB->Connection.Handle != INVALID_HANDLE_VALUE ) { - ZwClose(FCB->Connection.Handle); - FCB->Connection.Handle = INVALID_HANDLE_VALUE; } SocketStateUnlock( FCB ); Modified: trunk/reactos/drivers/network/afd/afd/tdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Mon Aug 3 09:07:21 2009 @@ -146,12 +146,13 @@ } if (!NT_SUCCESS(Status)) { - *Handle = INVALID_HANDLE_VALUE; + *Handle = NULL; *Object = NULL; } return Status; } + NTSTATUS TdiOpenAddressFile( PUNICODE_STRING DeviceName,
15 years, 4 months
1
0
0
0
[cgutman] 42359: - Fix a typo
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 3 08:57:21 2009 New Revision: 42359 URL:
http://svn.reactos.org/svn/reactos?rev=42359&view=rev
Log: - Fix a typo Modified: trunk/reactos/drivers/network/dd/pcnet/pcnet.c Modified: trunk/reactos/drivers/network/dd/pcnet/pcnet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/dd/pcnet/p…
============================================================================== --- trunk/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] Mon Aug 3 08:57:21 2009 @@ -1283,7 +1283,7 @@ { ULONG Data; - NdisRawWritePortUshort(Adapter->PortOffset + RAP, BCR4); + NdisRawWritePortUshort(Adapter->PortOffset + RAP, BCR6); NdisRawReadPortUshort(Adapter->PortOffset + BDP, &Data); return Data & BCR6_LEDOUT ? 100 : 10;
15 years, 4 months
1
0
0
0
[cgutman] 42358: - Check if the handle is valid before closing it - Remove (unused) TdiCloseDevice - Don't reference the Connection/Address File object twice (it is already referenced in TdiOpenDevice)
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 3 05:41:34 2009 New Revision: 42358 URL:
http://svn.reactos.org/svn/reactos?rev=42358&view=rev
Log: - Check if the handle is valid before closing it - Remove (unused) TdiCloseDevice - Don't reference the Connection/Address File object twice (it is already referenced in TdiOpenDevice) Modified: trunk/reactos/drivers/network/afd/afd/bind.c trunk/reactos/drivers/network/afd/afd/connect.c trunk/reactos/drivers/network/afd/afd/main.c trunk/reactos/drivers/network/afd/afd/tdi.c Modified: trunk/reactos/drivers/network/afd/afd/bind.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] Mon Aug 3 05:41:34 2009 @@ -32,11 +32,6 @@ FCB->LocalAddress, &FCB->AddressFile.Handle, &FCB->AddressFile.Object ); - - if (NT_SUCCESS(Status)) - { - ObReferenceObject(FCB->AddressFile.Object); - } AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); Modified: trunk/reactos/drivers/network/afd/afd/connect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] Mon Aug 3 05:41:34 2009 @@ -29,11 +29,6 @@ FCB->Connection.Object ); } - if (NT_SUCCESS(Status)) - { - ObReferenceObject(FCB->Connection.Object); - } - return Status; } Modified: trunk/reactos/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Mon Aug 3 05:41:34 2009 @@ -96,6 +96,8 @@ FCB->DeviceExt = DeviceExt; FCB->Recv.Size = DEFAULT_RECEIVE_WINDOW_SIZE; FCB->Send.Size = DEFAULT_SEND_WINDOW_SIZE; + FCB->AddressFile.Handle = INVALID_HANDLE_VALUE; + FCB->Connection.Handle = INVALID_HANDLE_VALUE; KeInitializeSpinLock( &FCB->SpinLock ); ExInitializeFastMutex( &FCB->Mutex ); @@ -222,14 +224,20 @@ FCB->RemoteAddress = NULL; } if( FCB->Connection.Object ) { - ZwClose(FCB->Connection.Handle); ObDereferenceObject(FCB->Connection.Object); FCB->Connection.Object = NULL; } if( FCB->AddressFile.Object ) { - ZwClose(FCB->AddressFile.Handle); ObDereferenceObject(FCB->AddressFile.Object); FCB->AddressFile.Object = NULL; + } + if( FCB->AddressFile.Handle != INVALID_HANDLE_VALUE ) { + ZwClose(FCB->AddressFile.Handle); + FCB->AddressFile.Handle = INVALID_HANDLE_VALUE; + } + if( FCB->Connection.Handle != INVALID_HANDLE_VALUE ) { + ZwClose(FCB->Connection.Handle); + FCB->Connection.Handle = INVALID_HANDLE_VALUE; } SocketStateUnlock( FCB ); Modified: trunk/reactos/drivers/network/afd/afd/tdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Mon Aug 3 05:41:34 2009 @@ -146,30 +146,12 @@ } if (!NT_SUCCESS(Status)) { - *Handle = NULL; + *Handle = INVALID_HANDLE_VALUE; *Object = NULL; } return Status; } - - -NTSTATUS TdiCloseDevice( - HANDLE Handle, - PFILE_OBJECT FileObject) -{ - AFD_DbgPrint(MAX_TRACE, ("Called. Handle (0x%X) FileObject (0x%X)\n", - Handle, FileObject)); - - if (Handle) - ZwClose(Handle); - - if (FileObject) - ObDereferenceObject(FileObject); - - return STATUS_SUCCESS; -} - NTSTATUS TdiOpenAddressFile( PUNICODE_STRING DeviceName,
15 years, 4 months
1
0
0
0
[tkreuzer] 42357: More gdi xlate tests.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Aug 3 04:27:08 2009 New Revision: 42357 URL:
http://svn.reactos.org/svn/reactos?rev=42357&view=rev
Log: More gdi xlate tests. Modified: trunk/rostests/regtests/gdi/xlate.c Modified: trunk/rostests/regtests/gdi/xlate.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/regtests/gdi/xlate.c?rev=…
============================================================================== --- trunk/rostests/regtests/gdi/xlate.c [iso-8859-1] (original) +++ trunk/rostests/regtests/gdi/xlate.c [iso-8859-1] Mon Aug 3 04:27:08 2009 @@ -2,6 +2,21 @@ #include <stdio.h> #include <windows.h> #include <wine/test.h> + +enum +{ + BMF_1BPP = 0, + BMF_4BPP = 1, + BMF_8BPP = 2, + BMF_16BPP_555 = 3, + BMF_16BPP_565 = 4, + BMF_24BPP_RGB = 5, + BMF_24BPP_BGR = 6, + BMF_32BPP_RGB = 7, + BMF_32BPP_BGR = 8 +}; + +ULONG bpp[] = {1, 4, 8, 15, 16, 24, 24, 32, 32}; static BYTE ajBits1[] = {0xAA, 0xAA, 0xAA, 0xAA, 0,0,0,0}; static BYTE ajBits8[] = {0x00, 0xFF, 0x80, 0xCC, 0,0,0,0}; @@ -14,7 +29,7 @@ static HBITMAP hbmp24bpp_a, hbmp24bpp_b; static HBITMAP hbmp32bpp_a, hbmp32bpp_b; static HDC hdcSrc, hdcDst; -static ULONG dstbpp; +static ULONG iDcFormat; ULONG GetRealColorDepth() @@ -39,28 +54,45 @@ bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); GetDIBits(hdc, hbmp, 0, 1, NULL, pbmi, DIB_RGB_COLORS); + /* Call again to fill in the bitfields */ + GetDIBits(hdc, hbmp, 0, 1, NULL, pbmi, DIB_RGB_COLORS); + /* Get the basic color depth */ ulColorDepth = bmi.bmiHeader.biBitCount; - /* Special case 16 bpp */ - if (ulColorDepth == 16) - { - /* Call again to fill in the bitfields */ - GetDIBits(hdc, hbmp, 0, 1, NULL, pbmi, DIB_RGB_COLORS); - - /* Check the red mask */ - if (bmi.aulMasks[0] == 0x7c00) - ulColorDepth = 15; + DeleteObject(hbmp); + + switch (ulColorDepth) + { + case 1: + return BMF_1BPP; + case 4: + return BMF_4BPP; + case 8: + return BMF_8BPP; + case 16: + /* Check the red mask */ + if (bmi.aulMasks[0] == 0x7c00) + return BMF_16BPP_555; + else + return BMF_16BPP_565; + case 24: + return BMF_4BPP; + case 32: + if (bmi.bmiHeader.biCompression == BI_BITFIELDS && + bmi.aulMasks[0] == 0xff) + return BMF_32BPP_RGB; + else + return BMF_32BPP_BGR; } /* Cleanup and return */ - DeleteObject(hbmp); - return ulColorDepth; + return BMF_32BPP_RGB; } static ULONG -GetClosestColor(ULONG bpp, COLORREF crColor) +iXlateFromRGB(ULONG iFormat, COLORREF crColor) { ULONG ulRed, ulGreen, ulBlue; @@ -68,38 +100,109 @@ ulGreen = GetGValue(crColor); ulBlue = GetBValue(crColor); - switch (bpp) - { - case 1: + switch (iFormat) + { + case BMF_1BPP: return crColor ? 0xffffff : 0; - case 8: - case 15: - ulRed &= 0xF8; - ulGreen &= 0xF8; - ulBlue &= 0xF8; - printf("ulRed = %lx\n", ulRed); + + case BMF_4BPP: + case BMF_8BPP: + case BMF_16BPP_555: + ulRed = (ulRed & 0xF8) >> 3; + ulGreen = (ulGreen & 0xF8) >> 3; + ulBlue = (ulBlue & 0xF8) >> 3; + return ulRed << 10 | ulGreen << 5 | ulBlue; + + case BMF_16BPP_565: + ulRed = (ulRed & 0xF8) >> 3; + ulGreen = (ulGreen & 0xFC) >> 2; + ulBlue = (ulBlue & 0xF8) >> 3; + return ulRed << 11 | ulGreen << 5 | ulBlue; + + case BMF_24BPP_RGB: + case BMF_32BPP_RGB: + return crColor; + + case BMF_24BPP_BGR: + case BMF_32BPP_BGR: + return RGB(ulBlue, ulGreen, ulRed); + } + return 0; +} + +static +COLORREF +iXlateToRGB(ULONG iFormat, ULONG ulColor) +{ + ULONG ulRed, ulGreen, ulBlue; + + switch (iFormat) + { + case BMF_1BPP: + return ulColor ? 0xffffff : 0; + + case BMF_4BPP: + case BMF_8BPP: + case BMF_16BPP_555: + ulRed = (ulColor & 0x7C00) >> 7; ulRed |= ulRed >> 5; + ulGreen = (ulColor & 0x3E0) >> 2; ulGreen |= ulGreen >> 5; - ulBlue |= ulBlue >> 5; - printf("ulRed = %lx\n", ulRed); - return RGB(ulRed, ulGreen, ulBlue); - - case 16: - ulRed &= 0xF8; - ulGreen &= 0xFC; - ulBlue &= 0xF8; - ulRed |= ulRed >> 5; - ulGreen |= ulGreen >> 6; + ulBlue = (ulColor & 0x1F) << 3; ulBlue |= ulBlue >> 5; return RGB(ulRed, ulGreen, ulBlue); - case 24: - case 32: - return crColor; + case BMF_16BPP_565: + ulRed = (ulColor & 0xF800) >> 8; + ulRed |= ulRed >> 5; + ulGreen = (ulColor & 0x7E0) >> 3; + ulGreen |= ulGreen >> 6; + ulBlue = (ulColor & 0x1F) << 3; + ulBlue |= ulBlue >> 5; + return RGB(ulRed, ulGreen, ulBlue); + + case BMF_24BPP_RGB: + case BMF_32BPP_RGB: + return ulColor; + + case BMF_24BPP_BGR: + case BMF_32BPP_BGR: + ulRed = GetRValue(ulColor); + ulGreen = GetGValue(ulColor); + ulBlue = GetBValue(ulColor); + return RGB(ulBlue, ulGreen, ulRed); } return 0; } +static +ULONG +GetClosestColor(ULONG iFormat, COLORREF crColor) +{ + return iXlateToRGB(iFormat, iXlateFromRGB(iFormat, crColor)); +} + +ULONG +GetDIBPixel(ULONG iFormat, PVOID pvBits, ULONG x) +{ + switch (iFormat) + { + case BMF_1BPP: + // + case BMF_16BPP_555: + case BMF_16BPP_565: + return *(WORD*)((PCHAR)pvBits + x * sizeof(WORD)); + + case BMF_24BPP_RGB: + case BMF_24BPP_BGR: + return (*(DWORD*)((PCHAR)pvBits + x * 3)) & 0xffffff; + + case BMF_32BPP_RGB: + case BMF_32BPP_BGR: + return *(DWORD*)((PCHAR)pvBits + x * sizeof(DWORD)); + } + return 0; +} static void @@ -108,7 +211,7 @@ hdcSrc = CreateCompatibleDC(0); hdcDst = CreateCompatibleDC(0); - dstbpp = GetRealColorDepth(); + iDcFormat = GetRealColorDepth(); hbmp1bpp_a = CreateBitmap(4, 2, 1, 1, ajBits1); ok(hbmp1bpp_a != 0, "CreateBitmap failed\n"); @@ -144,12 +247,12 @@ } void -Test_SrcMono1(UINT cBits, HBITMAP hbmpDst) -{ - ULONG c, expected; +Test_SrcMono1(ULONG iBmpFormat, HBITMAP hbmpDst, PVOID pvBits) +{ + COLORREF c, expected; + ULONG cBits = bpp[iBmpFormat]; HBRUSH hbr; RECT rect; - ULONG dstbpp = GetDeviceCaps(hdcDst, BITSPIXEL); struct { BITMAPINFOHEADER bmiHeader; @@ -167,40 +270,76 @@ SetBkColor(hdcDst, 0xffffff); /* Do a bitblt operation */ - ok(BitBlt(hdcDst, 0, 0, 2, 2, hdcSrc, 0, 0, SRCCOPY), "%dbpp: BitBlt failed", cBits); - - /* Check resulting colors */ + ok(BitBlt(hdcDst, 0, 0, 2, 2, hdcSrc, 0, 0, SRCCOPY), "(%ld): BitBlt failed", iBmpFormat); + + /* Test background color */ c = GetPixel(hdcDst, 0, 0); - ok(c == RGB(255, 255, 255), "%dbpp: wrong color, expected 0, got %lx\n", cBits, c); + expected = 0xffffff; + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + /* Test foreground color */ c = GetPixel(hdcDst, 1, 0); - ok(c == RGB(0, 0, 0), "%dbpp: wrong color, expected ffffff, got %lx\n", cBits, c); + expected = 0x000000; + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + if (pvBits) + { + c = GetDIBPixel(iBmpFormat, pvBits, 0); + expected = iXlateFromRGB(iBmpFormat, GetBkColor(hdcSrc)); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + c = GetDIBPixel(iBmpFormat, pvBits, 1); + expected = iXlateFromRGB(iBmpFormat, GetTextColor(hdcSrc)); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + } /* Set different dc fore and back colors */ SetTextColor(hdcSrc, 0xf00f0f); SetBkColor(hdcSrc, 0xf0ff0f); - SetTextColor(hdcDst, 0xffFFff); - SetBkColor(hdcDst, 0x000000); + SetTextColor(hdcDst, 0xefFee5); + SetBkColor(hdcDst, 0x100121); /* Make sure this alone didn't affect the resulting colors */ c = GetPixel(hdcDst, 0, 0); - ok(c == RGB(255, 255, 255), "%dbpp: wrong color, expected 0, got %lx\n", cBits, c); + ok(c == 0xffffff, "(%ld): wrong color, expected 0, got %lx\n", iBmpFormat, c); c = GetPixel(hdcDst, 1, 0); - ok(c == RGB(0, 0, 0), "%dbpp: wrong color, expected ffffff, got %lx\n", cBits, c); + ok(c == 0x000000, "(%ld): wrong color, expected ffffff, got %lx\n", iBmpFormat, c); /* Repeat the bitblt operation */ - ok(BitBlt(hdcDst, 0, 0, 2, 2, hdcSrc, 0, 0, SRCCOPY), "%dbpp: BitBlt failed", cBits); - - /* Finally test effect of the fore / cack color on the operation */ + ok(BitBlt(hdcDst, 0, 0, 2, 2, hdcSrc, 0, 0, SRCCOPY), "(%ld): BitBlt failed", iBmpFormat); + + /* Test background color */ c = GetPixel(hdcDst, 0, 0); - expected = cBits >= dstbpp ? GetBkColor(hdcDst) : 0xffffff; - ok(c == expected, "%dbpp: wrong color, expected %lx, got %lx\n", cBits, expected, c); + if (pvBits) + expected = GetClosestColor(iBmpFormat, GetBkColor(hdcDst)); + else + expected = cBits >= bpp[iDcFormat] ? GetClosestColor(iDcFormat, GetBkColor(hdcDst)) : 0xffffff; + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + /* Test foreground color */ c = GetPixel(hdcDst, 1, 0); - expected = cBits >= dstbpp ? GetTextColor(hdcDst) : 0; - ok(c == expected, "%dbpp: wrong color, expected %lx, got %lx\n", cBits, expected, c); + if (pvBits) + expected = GetClosestColor(iBmpFormat, GetTextColor(hdcDst)); + else + expected = cBits >= bpp[iDcFormat] ? GetClosestColor(iDcFormat, GetTextColor(hdcDst)) : 0; + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + if (pvBits) + { + c = GetDIBPixel(iBmpFormat, pvBits, 0); + expected = iXlateFromRGB(iBmpFormat, GetBkColor(hdcDst)); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + c = GetDIBPixel(iBmpFormat, pvBits, 1); + expected = iXlateFromRGB(iBmpFormat, GetTextColor(hdcDst)); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + } + +/* Hatch brush ****************************************************************/ /* Set dc fore and back colors */ SetTextColor(hdcDst, 0x102030); - SetBkColor(hdcDst, 0xeeccee); + SetBkColor(hdcDst, 0xeeccdd); SetBkMode(hdcDst, OPAQUE); /* Create a hatch brush */ @@ -213,17 +352,36 @@ /* Test the fore color of the hatch brush */ c = GetPixel(hdcDst, 0, 0); - expected = cBits >= dstbpp ? 0x123456 : 0; - expected = GetClosestColor(dstbpp, expected); - ok(c == expected, "%dbpp: wrong color, expected %lx, got %lx\n", cBits, expected, c); + expected = cBits >= bpp[iDcFormat] ? 0x123456 : 0; + if (pvBits) + expected = GetClosestColor(iBmpFormat, 0x123456); + else + expected = GetClosestColor(iDcFormat, expected); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); /* Test the back color of the hatch brush */ c = GetPixel(hdcDst, 1, 0); - expected = cBits >= dstbpp ? GetBkColor(hdcDst) : 0xffffff; - expected = GetClosestColor(dstbpp, expected); - ok(c == expected, "%dbpp: wrong color, expected %lx, got %lx\n", cBits, expected, c); + expected = cBits >= bpp[iDcFormat] ? GetBkColor(hdcDst) : 0xffffff; + if (pvBits) + expected = GetClosestColor(iBmpFormat, GetBkColor(hdcDst)); + else + expected = GetClosestColor(iDcFormat, expected); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + if (pvBits) + { + c = GetDIBPixel(iBmpFormat, pvBits, 0); + expected = iXlateFromRGB(iBmpFormat, 0x123456); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + c = GetDIBPixel(iBmpFormat, pvBits, 1); + expected = iXlateFromRGB(iBmpFormat, GetBkColor(hdcDst)); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + } DeleteObject(hbr); + +/* DIB brush ******************************************************************/ bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = 8; @@ -246,36 +404,121 @@ rect.bottom = rect.right = 4; ok(FillRect(hdcDst, &rect, hbr),"FillRect failed\n"); - /* Test the fore and back color of the dib brush */ - c = GetPixel(hdcDst, 0, 1); - expected = cBits >= dstbpp ? bmi.bmiColors[1] : 0; - expected = GetClosestColor(dstbpp, expected); - ok(c == expected, "%dbpp: wrong color, expected %lx, got %lx\n", cBits, expected, c); - + /* Test color 1 of the dib brush */ + c = GetPixel(hdcDst, 0, 0); + expected = cBits >= bpp[iDcFormat] ? bmi.bmiColors[1] : 0; + if (pvBits) + expected = GetClosestColor(iBmpFormat, bmi.bmiColors[1]); + else + expected = GetClosestColor(iDcFormat, expected); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + /* Test color 0 of the dib brush */ c = GetPixel(hdcDst, 1, 0); - expected = cBits >= dstbpp ? bmi.bmiColors[0] : 0xffffff; - expected = GetClosestColor(dstbpp, expected); - ok(c == expected, "%dbpp: wrong color, expected %lx, got %lx\n", cBits, expected, c); + expected = cBits >= bpp[iDcFormat] ? bmi.bmiColors[0] : 0xffffff; + if (pvBits) + expected = GetClosestColor(iBmpFormat, bmi.bmiColors[0]); + else + expected = GetClosestColor(iDcFormat, expected); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + if (pvBits) + { + c = GetDIBPixel(iBmpFormat, pvBits, 0); + expected = iXlateFromRGB(iBmpFormat, bmi.bmiColors[1]); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + + c = GetDIBPixel(iBmpFormat, pvBits, 1); + expected = iXlateFromRGB(iBmpFormat, bmi.bmiColors[0]); + ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); + } DeleteObject(hbr); - -} - +} void Test_SrcMono() { + HBITMAP hbmp; + struct + { + BITMAPINFOHEADER bmiHeader; + ULONG bmiColors[3]; + } bmi; + PVOID pvBits; + ULONG c, expected; + + SelectObject(hdcSrc, hbmp1bpp_a); + + Test_SrcMono1(BMF_1BPP, hbmp1bpp_b, 0); + Test_SrcMono1(BMF_8BPP, hbmp8bpp_b, 0); + Test_SrcMono1(BMF_16BPP_565, hbmp16bpp_b, 0); + Test_SrcMono1(BMF_24BPP_RGB, hbmp24bpp_b, 0); + Test_SrcMono1(BMF_32BPP_RGB, hbmp32bpp_b, 0); + + bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi.bmiHeader.biWidth = 2; + bmi.bmiHeader.biHeight = -2; + bmi.bmiHeader.biPlanes = 1; + bmi.bmiHeader.biBitCount = 16; + bmi.bmiHeader.biCompression = BI_RGB; + bmi.bmiHeader.biSizeImage = 0; + bmi.bmiHeader.biXPelsPerMeter = 1; + bmi.bmiHeader.biYPelsPerMeter = 1; + bmi.bmiHeader.biClrUsed = 0; + bmi.bmiHeader.biClrImportant = 0; + hbmp = CreateDIBSection(hdcDst, (LPBITMAPINFO)&bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); + ok(hbmp != 0, "CreateDIBSection failed\n"); + memset(pvBits, 0x55555555, 8 * 8 * 2); + + SelectObject(hdcDst, hbmp); + + c = GetPixel(hdcDst, 0, 0); + expected = iXlateToRGB(BMF_16BPP_555, 0x5555); + ok(c == expected, "expected %lx, got %lx\n", expected, c); + + expected = 0x123456; + SetPixel(hdcDst, 0, 0, expected); + expected = iXlateFromRGB(BMF_16BPP_555, expected); + c = *(volatile WORD*)pvBits; + ok(c == expected, "expected %lx, got %lx\n", expected, c); + + Test_SrcMono1(BMF_16BPP_555, hbmp, pvBits); - Test_SrcMono1(1, hbmp1bpp_b); - Test_SrcMono1(8, hbmp8bpp_b); - Test_SrcMono1(16, hbmp16bpp_b); - Test_SrcMono1(24, hbmp24bpp_b); - Test_SrcMono1(32, hbmp32bpp_b); - - -} + DeleteObject(hbmp); + + /* Create a 565 DIB section */ + bmi.bmiHeader.biCompression = BI_BITFIELDS; + bmi.bmiHeader.biClrUsed = 3; + bmi.bmiHeader.biClrImportant = 3; + bmi.bmiColors[0] = 0xF800; + bmi.bmiColors[1] = 0x7E0; + bmi.bmiColors[2] = 0x1F; + hbmp = CreateDIBSection(hdcDst, (LPBITMAPINFO)&bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); + ok(hbmp != 0, "CreateDIBSection failed\n"); + SelectObject(hdcDst, hbmp); + + Test_SrcMono1(BMF_16BPP_565, hbmp, pvBits); + + DeleteObject(hbmp); + + /* Create a 32 bpp DIB section */ + bmi.bmiHeader.biBitCount = 32; + bmi.bmiHeader.biCompression = BI_RGB; + bmi.bmiHeader.biClrUsed = 0; + bmi.bmiHeader.biClrImportant = 0; + hbmp = CreateDIBSection(hdcDst, (LPBITMAPINFO)&bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); + ok(hbmp != 0, "CreateDIBSection failed\n"); + SelectObject(hdcDst, hbmp); + + Test_SrcMono1(BMF_32BPP_BGR, hbmp, pvBits); + + DeleteObject(hbmp); + +} + START_TEST(xlate) { @@ -283,3 +526,6 @@ Test_SrcMono(); } + +// trunk: 41 failures +
15 years, 4 months
1
0
0
0
[cgutman] 42356: - Keep waiting for a reply if we get one that is not ours or invalid - Make sure the packet we got is from our target otherwise discard it
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 3 04:15:17 2009 New Revision: 42356 URL:
http://svn.reactos.org/svn/reactos?rev=42356&view=rev
Log: - Keep waiting for a reply if we get one that is not ours or invalid - Make sure the packet we got is from our target otherwise discard it Modified: trunk/reactos/base/applications/network/ping/ping.c Modified: trunk/reactos/base/applications/network/ping/ping.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] Mon Aug 3 04:15:17 2009 @@ -437,6 +437,14 @@ return FALSE; } + if (from->sin_addr.s_addr != Target.sin_addr.s_addr) + { +#ifndef NDEBUG + printf("Bad source address (%s should be %s)\n", inet_ntoa(from->sin_addr), inet_ntoa(Target.sin_addr)); +#endif /* !NDEBUG */ + return FALSE; + } + QueryTime(&LargeTime); RelativeTime.QuadPart = (LargeTime.QuadPart - Icmp->Timestamp.QuadPart); @@ -543,44 +551,40 @@ Timeval.tv_sec = Timeout / 1000; Timeval.tv_usec = Timeout % 1000; - Status = select(0, &Fds, NULL, NULL, &Timeval); - if ((Status != SOCKET_ERROR) && (Status != 0)) - { - Length = sizeof(From); - Status = recvfrom(IcmpSock, Buffer, Size, 0, &From, &Length); + do { + Status = select(0, &Fds, NULL, NULL, &Timeval); + if ((Status != SOCKET_ERROR) && (Status != 0)) + { + Length = sizeof(From); + Status = recvfrom(IcmpSock, Buffer, Size, 0, &From, &Length); #ifndef NDEBUG - printf("Received packet\n"); - DisplayBuffer(Buffer, Status); - printf("\n"); + printf("Received packet\n"); + DisplayBuffer(Buffer, Status); + printf("\n"); #endif /* !NDEBUG */ - } - else - LostCount++; - if (Status == SOCKET_ERROR) - { - if (WSAGetLastError() != WSAETIMEDOUT) - { - printf("Could not receive data (%d).\n", WSAGetLastError()); + } + else + LostCount++; + if (Status == SOCKET_ERROR) + { + if (WSAGetLastError() != WSAETIMEDOUT) + { + printf("Could not receive data (%d).\n", WSAGetLastError()); + GlobalFree(Buffer); + return FALSE; + } + Status = 0; + } + + if (Status == 0) + { + printf("Request timed out.\n"); GlobalFree(Buffer); - return FALSE; - } - Status = 0; - } - - if (Status == 0) - { - printf("Request timed out.\n"); - GlobalFree(Buffer); - return TRUE; - } - - if (!DecodeResponse(Buffer, Status, (PSOCKADDR_IN)&From)) - { - /* FIXME: Wait again as it could be another ICMP message type */ - printf("Request timed out (incomplete datagram received).\n"); - LostCount++; - } + return TRUE; + } + + } while (!DecodeResponse(Buffer, Status, (PSOCKADDR_IN)&From)); GlobalFree(Buffer); return TRUE;
15 years, 4 months
1
0
0
0
[cgutman] 42355: - Don't hold the spin lock when calling the request completion handler
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 3 02:23:55 2009 New Revision: 42355 URL:
http://svn.reactos.org/svn/reactos?rev=42355&view=rev
Log: - Don't hold the spin lock when calling the request completion handler Modified: trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c Modified: trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/d…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] Mon Aug 3 02:23:55 2009 @@ -136,11 +136,15 @@ &SrcAddress->Address.IPv4Address, sizeof(SrcAddress->Address.IPv4Address) ); + TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql); + /* Complete the receive request */ if (Current->BufferSize < DataSize) Current->Complete(Current->Context, STATUS_BUFFER_OVERFLOW, Current->BufferSize); else Current->Complete(Current->Context, STATUS_SUCCESS, DataSize); + + TcpipAcquireSpinLock(&AddrFile->Lock, &OldIrql); } }
15 years, 4 months
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
66
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Results per page:
10
25
50
100
200