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
December 2008
----- 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
31 participants
710 discussions
Start a n
N
ew thread
[dreimer] 37956: Some more clean up and code reduction.
by dreimer@svn.reactos.org
Author: dreimer Date: Tue Dec 9 02:39:06 2008 New Revision: 37956 URL:
http://svn.reactos.org/svn/reactos?rev=37956&view=rev
Log: Some more clean up and code reduction. Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1 trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd trunk/tools/RosBE/RosBE-Windows/Root/options.cmd trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd trunk/tools/RosBE/RosBE-Windows/Root/update.cmd Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1 URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1 [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -51,49 +51,20 @@ if ($_ROSBE_USECCACHE -ne $null) { if ($_ROSBE_USECCACHE -eq 1) { $ENV:CCACHE_DIR = "$APPDATA\RosBE\.ccache" - $ENV:HOST_CC = "ccache gcc" - $ENV:HOST_CPP = "ccache g++" - - # - #Target defaults to host(i386) - # - - $ENV:TARGET_CC = "ccache gcc" - $ENV:TARGET_CPP = "ccache g++" - if ($ENV:ROS_ARCH -eq "arm") { - $ENV:TARGET_CC = "ccache arm-pc-mingw32-gcc" - $ENV:TARGET_CPP = "ccache arm-pc-mingw32-g++" - } - if ($ENV:ROS_ARCH -eq "amd64") { - $ENV:TARGET_CC = "ccache x86_64-pc-mingw32-gcc" - $ENV:TARGET_CPP = "ccache x86_64-pc-mingw32-g++" - } - if ($ENV:ROS_ARCH -eq "ppc") { - $ENV:TARGET_CC = "ccache ppc-pc-mingw32-gcc" - $ENV:TARGET_CPP = "ccache ppc-pc-mingw32-g++" - } - } else { - $ENV:HOST_CC = "gcc" - $ENV:HOST_CPP = "g++" - - # - #Target defaults to host(i386) - # - - $ENV:TARGET_CC = "gcc" - $ENV:TARGET_CPP = "g++" - if ($ENV:ROS_ARCH -eq "arm") { - $ENV:TARGET_CC = "arm-pc-mingw32-gcc" - $ENV:TARGET_CPP = "arm-pc-mingw32-g++" - } - if ($ENV:ROS_ARCH -eq "amd64") { - $ENV:TARGET_CC = "x86_64-pc-mingw32-gcc" - $ENV:TARGET_CPP = "x86_64-pc-mingw32-g++" - } - if ($ENV:ROS_ARCH -eq "ppc") { - $ENV:TARGET_CC = "ppc-pc-mingw32-gcc" - $ENV:TARGET_CPP = "ppc-pc-mingw32-g++" - } + $_ROSBE_CCACHE = "ccache " + } + $ENV:HOST_CC = "$_ROSBE_CCACHE" + "gcc" + $ENV:HOST_CPP = "$_ROSBE_CCACHE" + "g++" + + # + #Target defaults to host(i386) + # + + $ENV:TARGET_CC = "$_ROSBE_CCACHE" + "gcc" + $ENV:TARGET_CPP = "$_ROSBE_CCACHE" + "g++" + if ($ENV:ROS_ARCH -ne $null) { + $ENV:TARGET_CC = "$_ROSBE_CCACHE" + "$ROS_ARCH-pc-mingw32-gcc" + $ENV:TARGET_CPP = "$_ROSBE_CCACHE" + "$ROS_ARCH-pc-mingw32-g++" } } @@ -103,7 +74,7 @@ # if ($_ROSBE_OBJPATH -ne $null) { if (Test-Path "$_ROSBE_OBJPATH") { - "ERROR: The path specified doesn't seem to exist." + "ERROR: The Object-Path specified doesn't seem to exist." exit } else { $ENV:ROS_INTERMEDIATE = "$_ROSBE_OBJPATH" @@ -111,7 +82,7 @@ } if ($_ROSBE_OUTPATH -ne $null) { if (Test-Path "$_ROSBE_OUTPATH") { - "ERROR: The path specified doesn't seem to exist." + "ERROR: The Output-Path specified doesn't seem to exist." exit } else { $ENV:ROS_OUTPUT = "$_ROSBE_OUTPATH" @@ -240,3 +211,4 @@ $TIMENAME = $null $CPUCOUNT = $null $sw = $null +$_ROSBE_CCACHE = $null Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -27,67 +27,26 @@ # Check if we have something to clean, if so, clean it. # - if ($ENV:ROS_ARCH -eq "arm") { - if (Test-Path ".\obj-arm") { - "Cleaning ReactOS ARM source directory..." + if ($ENV:ROS_ARCH -ne $null) { + if (Test-Path ".\obj-$ENV:ROS_ARCH") { + "Cleaning ReactOS $ENV:ROS_ARCH source directory..." # # Remove directories/makefile.auto created by the build. # - if (Test-Path ".\obj-arm") { - $null = (Remove-Item ".\obj-arm" -recurse -force) + if (Test-Path ".\obj-$ENV:ROS_ARCH") { + $null = (Remove-Item ".\obj-$ENV:ROS_ARCH" -recurse -force) } - if (Test-Path ".\output-arm") { - $null = (Remove-Item ".\output-arm" -recurse -force) + if (Test-Path ".\output-$ENV:ROS_ARCH") { + $null = (Remove-Item ".\output-$ENV:ROS_ARCH" -recurse -force) } - if (Test-Path ".\makefile-arm.auto") { - $null = (Remove-Item ".\makefile-arm.auto" -force) + if (Test-Path ".\makefile-$ENV:ROS_ARCH.auto") { + $null = (Remove-Item ".\makefile-$ENV:ROS_ARCH.auto" -force) } - "Done cleaning ReactOS ARM source directory." + "Done cleaning ReactOS $ENV:ROS_ARCH source directory." } else { - "ERROR: There is no compiler output to clean." + "ERROR: There is no $ENV:ROS_ARCH compiler output to clean." } - } - elseif ($ENV:ROS_ARCH -eq "ppc") { - if (Test-Path ".\obj-ppc") { - "Cleaning ReactOS PPC source directory..." - # - # Remove directories/makefile.auto created by the build. - # - if (Test-Path ".\obj-ppc") { - $null = (Remove-Item ".\obj-ppc" -recurse -force) - } - if (Test-Path ".\output-ppc") { - $null = (Remove-Item ".\output-ppc" -recurse -force) - } - if (Test-Path ".\makefile-ppc.auto") { - $null = (Remove-Item ".\makefile-ppc.auto" -force) - } - "Done cleaning ReactOS PPC source directory." - } else { - "ERROR: There is no compiler output to clean." - } - } - elseif ($ENV:ROS_ARCH -eq "amd64") { - if (Test-Path ".\obj-amd64") { - "Cleaning ReactOS x86_64 source directory..." - # - # Remove directories/makefile.auto created by the build. - # - if (Test-Path ".\obj-amd64") { - $null = (Remove-Item ".\obj-amd64" -recurse -force) - } - if (Test-Path ".\output-amd64") { - $null = (Remove-Item ".\output-amd64" -recurse -force) - } - if (Test-Path ".\makefile-amd64.auto") { - $null = (Remove-Item ".\makefile-amd64.auto" -force) - } - "Done cleaning ReactOS x86_64 source directory." - } else { - "ERROR: There is no compiler output to clean." - } - } - elseif ($ENV:ROS_ARCH -eq $null) { + } else { if (Test-Path ".\obj-i386") { "Cleaning ReactOS i386 source directory..." # @@ -104,7 +63,7 @@ } "Done cleaning ReactOS i386 source directory." } else { - "ERROR: There is no compiler output to clean." + "ERROR: There is no i386 compiler output to clean." } } if (Test-Path "reactos") { Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -75,7 +75,6 @@ "" $YESNO = Read-Host "(yes), (no)" - if ($YESNO -ne "yes") {settitle} # Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -110,7 +110,7 @@ & yasm --version | select-string "yasm 0" } else { if ($_ROSBE_MODE -eq "RosBE") { - "ERROR: NASM or YASM is required to build ReactOS, none found in the current MinGW/GCC." + "ERROR: NASM or YASM is required to build ReactOS, none was found in the current MinGW/GCC." } } } @@ -118,7 +118,7 @@ & bison '--version' | select-string "GNU Bison" } else { if ($_ROSBE_MODE -eq "RosBE") { - "WARNING: Bison will soon be required to build ReactOS, none found in the current MinGW/GCC." + "WARNING: Bison will soon be required to build ReactOS, none was found in the current MinGW/GCC." } } if (Test-Path "$_ROSBE_HOST_MINGWPATH\bin\flex.exe") { @@ -126,7 +126,7 @@ "flex $fver" } else { if ($_ROSBE_MODE -eq "RosBE") { - "WARNING: Flex will soon be required to build ReactOS, none found in the current MinGW/GCC." + "WARNING: Flex will soon be required to build ReactOS, none was found in the current MinGW/GCC." } } & mingw32-make -v | & find "GNU Make" Modified: trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Bui…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -36,68 +36,43 @@ :: :: Check if strip, no Debug Symbols or ccache are being used and set the appropriate options. :: -if .%_ROSBE_NOSTRIP%. == .1. ( +if "%_ROSBE_NOSTRIP%" == "1" ( set ROS_BUILDNOSTRIP=yes ) else ( set ROS_BUILDNOSTRIP=no ) -if .%_ROSBE_STRIP%. == .1. ( +if "%_ROSBE_STRIP%" == "1" ( set ROS_LEAN_AND_MEAN=yes ) else ( set ROS_LEAN_AND_MEAN=no ) :: Small Security Check to prevent useless apps. -if .%ROS_LEAN_AND_MEAN%. == .yes. ( - if .%ROS_BUILDNOSTRIP%. == .yes. ( +if "%ROS_LEAN_AND_MEAN%" == "yes" ( + if "%ROS_BUILDNOSTRIP%" == "yes" ( cls echo Selecting Stripping and removing Debug Symbols together will most likely cause useless apps. Please deselect one of them. goto :EOC ) ) -if .%_ROSBE_USECCACHE%. == .1. ( +if "%_ROSBE_USECCACHE%" == "1" ( set CCACHE_DIR=%APPDATA%\RosBE\.ccache - set HOST_CC=ccache gcc - set HOST_CPP=ccache g++ - - REM Target defaults to host(i386) - - set TARGET_CC=ccache gcc - set TARGET_CPP=ccache g++ - if .%ROS_ARCH%. == .arm. ( - set TARGET_CC=ccache arm-pc-mingw32-gcc - set TARGET_CPP=ccache arm-pc-mingw32-g++ - ) - if .%ROS_ARCH%. == .amd64. ( - set TARGET_CC=ccache x86_64-pc-mingw32-gcc - set TARGET_CPP=ccache x86_64-pc-mingw32-g++ - ) - if .%ROS_ARCH%. == .ppc. ( - set TARGET_CC=ccache ppc-pc-mingw32-gcc - set TARGET_CPP=ccache ppc-pc-mingw32-g++ - ) -) else ( - set HOST_CC=gcc - set HOST_CPP=g++ - - REM Target defaults to host(i386) - - set TARGET_CC=gcc - set TARGET_CPP=g++ - if .%ROS_ARCH%. == .arm. ( - set TARGET_CC=arm-pc-mingw32-gcc - set TARGET_CPP=arm-pc-mingw32-g++ - ) - if .%ROS_ARCH%. == .amd64. ( - set TARGET_CC=x86_64-pc-mingw32-gcc - set TARGET_CPP=x86_64-pc-mingw32-g++ - ) - if .%ROS_ARCH%. == .ppc. ( - set TARGET_CC=ppc-pc-mingw32-gcc - set TARGET_CPP=ppc-pc-mingw32-g++ - ) + set _ROSBE_CCACHE=ccache +) + +:: Target defaults to host(i386) + +set HOST_CC=%_ROSBE_CCACHE%gcc +set HOST_CPP=%_ROSBE_CCACHE%g++ + +set TARGET_CC=%_ROSBE_CCACHE%gcc +set TARGET_CPP=%_ROSBE_CCACHE%g++ + +if not "%ROS_ARCH%" == "" ( + set TARGET_CC=%_ROSBE_CCACHE%%ROS_ARCH%-pc-mingw32-gcc + set TARGET_CPP=%_ROSBE_CCACHE%%ROS_ARCH%-pc-mingw32-g++ ) :: @@ -106,7 +81,7 @@ :: if defined _ROSBE_OBJPATH ( if not exist "%_ROSBE_OBJPATH%\." ( - echo ERROR: The path specified doesn't seem to exist. + echo ERROR: The Object-Path specified doesn't seem to exist. goto :EOC ) else ( set ROS_INTERMEDIATE=%_ROSBE_OBJPATH% @@ -114,7 +89,7 @@ ) if defined _ROSBE_OUTPATH ( if not exist "%_ROSBE_OUTPATH%\." ( - echo ERROR: The path specified doesn't seem to exist. + echo ERROR: The Output-Path specified doesn't seem to exist. goto :EOC ) else ( set ROS_OUTPUT=%_ROSBE_OUTPATH% @@ -228,5 +203,4 @@ set ROS_TEMPORARY= set CPUCOUNT= set CCACHE_DIR= -set ROSA_DEL= -set ROSB_DEL= +set _ROSBE_CCACHE= Modified: trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Cle…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -54,57 +54,21 @@ :DEL -if .%ROS_ARCH%. == .arm. ( - if exist "obj-arm\." ( - echo Cleaning ReactOS ARM source directory... - if exist "obj-arm\." ( - rd /s /q "obj-arm" 1> NUL 2> NUL +if not "%ROS_ARCH%" == "" ( + if exist "obj-%ROS_ARCH%\." ( + echo Cleaning ReactOS %ROS_ARCH% source directory... + if exist "obj-%ROS_ARCH%\." ( + rd /s /q "obj-%ROS_ARCH%" 1> NUL 2> NUL ) - if exist "output-arm\." ( - rd /s /q "output-arm" 1> NUL 2> NUL + if exist "output-%ROS_ARCH%\." ( + rd /s /q "output-%ROS_ARCH%" 1> NUL 2> NUL ) - if exist "makefile-arm.auto" ( - del "makefile-arm.auto" 1> NUL 2> NUL + if exist "makefile-%ROS_ARCH%.auto" ( + del "makefile-%ROS_ARCH%.auto" 1> NUL 2> NUL ) - echo Done cleaning ReactOS ARM source directory. + echo Done cleaning ReactOS %ROS_ARCH% source directory. ) else ( - echo ERROR: There is no compiler output to clean. - ) - goto :ROS -) -if .%ROS_ARCH%. == .ppc. ( - if exist "obj-ppc\." ( - echo Cleaning ReactOS PPC source directory... - if exist "obj-ppc\." ( - rd /s /q "obj-ppc" 1> NUL 2> NUL - ) - if exist "output-ppc\." ( - rd /s /q "output-ppc" 1> NUL 2> NUL - ) - if exist "makefile-ppc.auto" ( - del "makefile-ppc.auto" 1> NUL 2> NUL - ) - echo Done cleaning ReactOS PPC source directory. - ) else ( - echo ERROR: There is no compiler output to clean. - ) - goto :ROS -) -if .%ROS_ARCH%. == .amd64. ( - if exist "obj-amd64\." ( - echo Cleaning ReactOS X86_64 source directory... - if exist "obj-amd64\." ( - rd /s /q "obj-amd64" 1> NUL 2> NUL - ) - if exist "output-amd64\." ( - rd /s /q "output-amd64" 1> NUL 2> NUL - ) - if exist "makefile-amd64.auto" ( - del "makefile-amd64.auto" 1> NUL 2> NUL - ) - echo Done cleaning ReactOS X86_64 source directory. - ) else ( - echo ERROR: There is no compiler output to clean. + echo ERROR: There is no %ROS_ARCH% compiler output to clean. ) goto :ROS ) @@ -122,7 +86,7 @@ ) echo Done cleaning ReactOS i386 source directory. ) else ( - echo ERROR: There is no compiler output to clean. + echo ERROR: There is no i386 compiler output to clean. ) :ROS Modified: trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Con…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -22,7 +22,6 @@ echo Continue? set /p YESNO="(yes), (no)" if /i "%YESNO%"=="yes" goto :CONT - if /i "%YESNO%"=="no" goto :NOK goto :NOK :CONT @@ -46,7 +45,7 @@ echo Continue? set /p YESNO="(yes), (no)" if /i "%YESNO%"=="yes" goto :CONT2 - if /i "%YESNO%"=="no" goto :NOK + goto :NOK :CONT2 del "%_ROSBE_BASEDIR%\*.rbuild" @@ -78,9 +77,7 @@ echo. set /p YESNO="(yes), (no)" - if /i "%YESNO%"=="yes" goto :OK -if /i "%YESNO%"=="no" goto :NOK goto :NOK :OK @@ -101,7 +98,6 @@ echo. set /p YESNO="(yes), (no)" if /i "%YESNO%"=="yes" del "%APPDATA%\RosBE\*.rbuild" | del "config.rbuild" | copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild" | goto :OK - if /i "%YESNO%"=="no" goto :NOK endlocal goto :NOK ) Modified: trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/cha…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -53,7 +53,6 @@ call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd" goto :EOC - :: :: If Parameters were set, parse them, if not, ask the user to add them. :: Modified: trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/chd…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -25,7 +25,7 @@ call :INTERACTIVE ) if "%_2%" == "" ( - call :INTERACTIVE + call :INTERACTIVE2 ) if exist "%_ROSBE_BASEDIR%\%_1%\." ( @@ -66,6 +66,9 @@ echo ERROR: You must enter a MinGW/GCC directory. goto :EOC ) + +:INTERACTIVE2 + set /p _2="Please specify, if this will be the Target or Host GCC: " if "%_2%" == "" ( echo ERROR: You must enter "target" or "host". Modified: trunk/tools/RosBE/RosBE-Windows/Root/options.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/opt…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/options.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/options.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -18,9 +18,7 @@ :: Run options.exe :: if exist "%_ROSBE_BASEDIR%\Tools\options.exe" ( - pushd "%_ROSBE_BASEDIR%" call "%_ROSBE_BASEDIR%\Tools\options.exe" - popd "%_ROSBE_BASEDIR%" if exist "%APPDATA%\RosBE\rosbe-options.cmd" ( call "%APPDATA%\RosBE\rosbe-options.cmd" ) Modified: trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/ros…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -33,17 +33,17 @@ goto :main ) -if .%_ROSBE_ARCH%. == .1. ( +if "%_ROSBE_ARCH%" == "1" ( set ROS_ARCH=arm set ROS_PREFIX=arm-pc-mingw32 set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\arm ) -if .%_ROSBE_ARCH%. == .2. ( +if "%_ROSBE_ARCH%" == "2" ( set ROS_ARCH=ppc set ROS_PREFIX=ppc-pc-mingw32 set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\ppc ) -if .%_ROSBE_ARCH%. == .3. ( +if "%_ROSBE_ARCH%" == "3" ( set ROS_ARCH=amd64 set ROS_PREFIX=x86_64-pc-mingw32 set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\x86_64 @@ -101,9 +101,9 @@ :: :: Display the current version of GCC, NASM, ld and make. :: -if not .%ROS_ARCH%. == .. ( +if not "%ROS_ARCH%" == "" ( "%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%-gcc" -v 2>&1 | find "gcc version" - if .%ROS_PREFIX%. == .. ( + if "%ROS_PREFIX%" == "" ( echo gcc target^: %_ROSBE_GCCTARGET% ) else ( echo gcc target^: %ROS_PREFIX:~0,-11% @@ -111,7 +111,7 @@ "%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%-ld" -v ) else ( gcc -v 2>&1 | find "gcc version" - if .%ROS_PREFIX%. == .. ( + if "%ROS_PREFIX%" == "" ( echo gcc target^: %_ROSBE_GCCTARGET% ) else ( echo gcc target^: %ROS_PREFIX:~0,-11% @@ -126,7 +126,7 @@ yasm --version | find "yasm 0" ) else ( if "%_ROSBE_MODE%" == "RosBE" ( - echo ERROR: NASM or YASM is required to build ReactOS, none found in the current MinGW/GCC. + echo ERROR: NASM or YASM is required to build ReactOS, none was found in the current MinGW/GCC. ) ) ) @@ -134,14 +134,14 @@ bison --version | find "GNU Bison" ) else ( if "%_ROSBE_MODE%" == "RosBE" ( - echo WARNING: Bison will soon be required to build ReactOS, none found in the current MinGW/GCC. + echo WARNING: Bison will soon be required to build ReactOS, none was found in the current MinGW/GCC. ) ) if exist "%_ROSBE_HOST_MINGWPATH%\bin\flex.exe" ( flex --version ) else ( if "%_ROSBE_MODE%" == "RosBE" ( - echo WARNING: Flex will soon be required to build ReactOS, none found in the current MinGW/GCC. + echo WARNING: Flex will soon be required to build ReactOS, none was found in the current MinGW/GCC. ) ) mingw32-make -v | find "GNU Make" Modified: trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/sSV…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -90,14 +90,14 @@ ) if %OFFSVN% equ %ONSVN% ( echo Your tree is up to date. - goto :EOC + goto :EOF ) :UP2 set /p UP="Please enter 'yes' or 'no': " if /i "%UP%"=="yes" "%_ROSBE_BASEDIR%\ssvn" update -if /i "%UP%"=="no" goto :EOC +if /i "%UP%"=="no" goto :EOF :EOC Modified: trunk/tools/RosBE/RosBE-Windows/Root/update.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/upd…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] Tue Dec 9 02:39:06 2008 @@ -123,7 +123,8 @@ call :STATUS set /a _ROSBE_STATCOUNT+=1 call :STATUS - goto :UPDFIN + call :UPDFIN + goto :EOC ) if not "%1" == "" ( echo Unknown parameter specified. Try 'help update'. @@ -166,7 +167,7 @@ ) else ( echo RosBE is up to Date. ) -goto :EOC +goto :EOF :UPDCHECK
16 years
1
0
0
0
[cwittich] 37954: sync CreateWellKnownSid with wine
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 9 01:09:25 2008 New Revision: 37954 URL:
http://svn.reactos.org/svn/reactos?rev=37954&view=rev
Log: sync CreateWellKnownSid with wine Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/sid…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] Tue Dec 9 01:09:25 2008 @@ -97,6 +97,39 @@ { {'R','U'}, WinBuiltinPreWindows2000CompatibleAccessSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_PREW2KCOMPACCESS } } }, { {'R','D'}, WinBuiltinRemoteDesktopUsersSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS } } }, { {'N','O'}, WinBuiltinNetworkConfigurationOperatorsSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS } } }, + { {0,0}, WinNTLMAuthenticationSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_PACKAGE_BASE_RID, SECURITY_PACKAGE_NTLM_RID } } }, + { {0,0}, WinDigestAuthenticationSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_PACKAGE_BASE_RID, SECURITY_PACKAGE_DIGEST_RID } } }, + { {0,0}, WinSChannelAuthenticationSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_PACKAGE_BASE_RID, SECURITY_PACKAGE_SCHANNEL_RID } } }, + { {0,0}, WinThisOrganizationSid, { SID_REVISION, 1, { SECURITY_NT_AUTHORITY }, { SECURITY_THIS_ORGANIZATION_RID } } }, + { {0,0}, WinOtherOrganizationSid, { SID_REVISION, 1, { SECURITY_NT_AUTHORITY }, { SECURITY_OTHER_ORGANIZATION_RID } } }, + { {0,0}, WinBuiltinIncomingForestTrustBuildersSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS } } }, + { {0,0}, WinBuiltinPerfMonitoringUsersSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_MONITORING_USERS } } }, + { {0,0}, WinBuiltinPerfLoggingUsersSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_LOGGING_USERS } } }, + { {0,0}, WinBuiltinAuthorizationAccessSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS } } }, + { {0,0}, WinBuiltinTerminalServerLicenseServersSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS } } }, + { {0,0}, WinBuiltinDCOMUsersSid, { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_DCOM_USERS } } }, +}; + +typedef struct WELLKNOWNRID +{ + WELL_KNOWN_SID_TYPE Type; + DWORD Rid; +} WELLKNOWNRID; + +static const WELLKNOWNRID WellKnownRids[] = { + { WinAccountAdministratorSid, DOMAIN_USER_RID_ADMIN }, + { WinAccountGuestSid, DOMAIN_USER_RID_GUEST }, + { WinAccountKrbtgtSid, DOMAIN_USER_RID_KRBTGT }, + { WinAccountDomainAdminsSid, DOMAIN_GROUP_RID_ADMINS }, + { WinAccountDomainUsersSid, DOMAIN_GROUP_RID_USERS }, + { WinAccountDomainGuestsSid, DOMAIN_GROUP_RID_GUESTS }, + { WinAccountComputersSid, DOMAIN_GROUP_RID_COMPUTERS }, + { WinAccountControllersSid, DOMAIN_GROUP_RID_CONTROLLERS }, + { WinAccountCertAdminsSid, DOMAIN_GROUP_RID_CERT_ADMINS }, + { WinAccountSchemaAdminsSid, DOMAIN_GROUP_RID_SCHEMA_ADMINS }, + { WinAccountEnterpriseAdminsSid, DOMAIN_GROUP_RID_ENTERPRISE_ADMINS }, + { WinAccountPolicyAdminsSid, DOMAIN_GROUP_RID_POLICY_ADMINS }, + { WinAccountRasAndIasServersSid, DOMAIN_ALIAS_RID_RAS_SERVERS }, }; static const SID sidWorld = { SID_REVISION, 1, { SECURITY_WORLD_SID_AUTHORITY} , { SECURITY_WORLD_RID } }; @@ -1533,27 +1566,16 @@ unsigned int i; TRACE("(%d, %s, %p, %p)\n", WellKnownSidType, debugstr_sid(DomainSid), pSid, cbSid); - if (DomainSid != NULL) - { - FIXME("Only local computer supported!\n"); - SetLastError(ERROR_INVALID_PARAMETER); /* FIXME */ - return FALSE; - } - - if (cbSid == NULL || pSid == NULL) - { + if (cbSid == NULL || pSid == NULL || (DomainSid && !IsValidSid(DomainSid))) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++) - { - if (WellKnownSids[i].Type == WellKnownSidType) - { + for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++) { + if (WellKnownSids[i].Type == WellKnownSidType) { DWORD length = GetSidLengthRequired(WellKnownSids[i].Sid.SubAuthorityCount); - if (*cbSid < length) - { + if (*cbSid < length) { SetLastError(ERROR_INSUFFICIENT_BUFFER); return FALSE; } @@ -1563,6 +1585,30 @@ return TRUE; } } + + if (DomainSid == NULL || *GetSidSubAuthorityCount(DomainSid) == SID_MAX_SUB_AUTHORITIES) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + for (i = 0; i < sizeof(WellKnownRids)/sizeof(WellKnownRids[0]); i++) + if (WellKnownRids[i].Type == WellKnownSidType) { + UCHAR domain_subauth = *GetSidSubAuthorityCount(DomainSid); + DWORD domain_sid_length = GetSidLengthRequired(domain_subauth); + DWORD output_sid_length = GetSidLengthRequired(domain_subauth + 1); + + if (*cbSid < output_sid_length) { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return FALSE; + } + + CopyMemory(pSid, DomainSid, domain_sid_length); + (*GetSidSubAuthorityCount(pSid))++; + (*GetSidSubAuthority(pSid, domain_subauth)) = WellKnownRids[i].Rid; + *cbSid = output_sid_length; + return TRUE; + } SetLastError(ERROR_INVALID_PARAMETER); return FALSE;
16 years
1
0
0
0
[jimtabor] 37953: - Fixed build.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Dec 9 00:05:29 2008 New Revision: 37953 URL:
http://svn.reactos.org/svn/reactos?rev=37953&view=rev
Log: - Fixed build. Modified: trunk/reactos/include/reactos/wine/winnls.h Modified: trunk/reactos/include/reactos/wine/winnls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winnl…
============================================================================== --- trunk/reactos/include/reactos/wine/winnls.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/winnls.h [iso-8859-1] Tue Dec 9 00:05:29 2008 @@ -19,6 +19,8 @@ #ifndef __WINE_WINNLS_H #define __WINE_WINNLS_H +#include_next <winnls.h> + #define CP_UNIXCP CP_ACP
16 years
1
0
0
0
[jimtabor] 37951: - New patch by hto: Suspicious code in User32.dll, see bug 3935.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Dec 8 19:40:37 2008 New Revision: 37951 URL:
http://svn.reactos.org/svn/reactos?rev=37951&view=rev
Log: - New patch by hto: Suspicious code in User32.dll, see bug 3935. Modified: trunk/reactos/dll/win32/user32/windows/dialog.c Modified: trunk/reactos/dll/win32/user32/windows/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Mon Dec 8 19:40:37 2008 @@ -2035,7 +2035,7 @@ LPSTR lpString, int nMaxCount) { - if (lpString && (lpString > 0)) lpString[0] = '\0'; + if (lpString && (nMaxCount > 0)) lpString[0] = '\0'; return (UINT)SendDlgItemMessageA( hDlg, nIDDlgItem, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); } @@ -2051,7 +2051,7 @@ LPWSTR lpString, int nMaxCount) { - if (lpString && (lpString > 0)) lpString[0] = '\0'; + if (lpString && (nMaxCount > 0)) lpString[0] = '\0'; return (UINT)SendDlgItemMessageW( hDlg, nIDDlgItem, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); }
16 years
1
0
0
0
[janderwald] 37950: - implement IServiceGroup interface - implement PcNewServiceGroup
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Dec 8 17:30:16 2008 New Revision: 37950 URL:
http://svn.reactos.org/svn/reactos?rev=37950&view=rev
Log: - implement IServiceGroup interface - implement PcNewServiceGroup Added: trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c (with props) Removed: trunk/reactos/drivers/wdm/audio/backpln/portcls/MiniportWavePci.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c Removed: trunk/reactos/drivers/wdm/audio/backpln/portcls/MiniportWavePci.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/MiniportWavePci.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/MiniportWavePci.cpp (removed) @@ -1,1 +1,0 @@ - Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] Mon Dec 8 17:30:16 2008 @@ -21,6 +21,7 @@ <file>undoc.c</file> <file>resource.c</file> <file>registry.c</file> + <file>service_group.c</file> <file>port.c</file> <file>port_dmus.c</file> <file>port_midi.c</file> Added: trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c (added) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c [iso-8859-1] Mon Dec 8 17:30:16 2008 @@ -1,0 +1,270 @@ +#include "private.h" + +typedef struct +{ + LIST_ENTRY Entry; + IN PSERVICESINK pServiceSink; +}GROUP_ENTRY, *PGROUP_ENTRY; + +typedef struct +{ + IServiceGroupVtbl *lpVtbl; + + LONG ref; + LIST_ENTRY ServiceSinkHead; + + BOOL Initialized; + BOOL TimerActive; + KTIMER Timer; + KEVENT DpcEvent; + KDPC Dpc; + +}IServiceGroupImpl; + +const GUID IID_IServiceGroup; +const GUID IID_IServiceSink; + +//--------------------------------------------------------------- +// IUnknown methods +// + + +NTSTATUS +STDMETHODCALLTYPE +IServiceGroup_fnQueryInterface( + IServiceGroup* iface, + IN REFIID refiid, + OUT PVOID* Output) +{ + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + if (IsEqualGUIDAligned(refiid, &IID_IServiceGroup) || + IsEqualGUIDAligned(refiid, &IID_IServiceSink)) + { + *Output = &This->lpVtbl; + InterlockedIncrement(&This->ref); + return STATUS_SUCCESS; + } + return STATUS_UNSUCCESSFUL; +} + +ULONG +STDMETHODCALLTYPE +IServiceGroup_fnAddRef( + IServiceGroup* iface) +{ + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + return InterlockedIncrement(&This->ref); +} + +ULONG +STDMETHODCALLTYPE +IServiceGroup_fnRelease( + IServiceGroup* iface) +{ + PLIST_ENTRY CurEntry; + PGROUP_ENTRY Entry; + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + InterlockedDecrement(&This->ref); + + if (This->ref == 0) + { + while(!IsListEmpty(&This->ServiceSinkHead)) + { + CurEntry = RemoveHeadList(&This->ServiceSinkHead); + Entry = CONTAINING_RECORD(CurEntry, GROUP_ENTRY, Entry); + Entry->pServiceSink->lpVtbl->Release(Entry->pServiceSink); + ExFreePoolWithTag(Entry, TAG_PORTCLASS); + } + KeWaitForSingleObject(&This->DpcEvent, Executive, KernelMode, FALSE, NULL); + KeCancelTimer(&This->Timer); + ExFreePoolWithTag(This, TAG_PORTCLASS); + return 0; + } + /* Return new reference count */ + return This->ref; +} + + + +//--------------------------------------------------------------- +// IServiceSink methods +// + +VOID +NTAPI +IServiceGroup_fnRequestService( + IN IServiceGroup * iface) +{ + PLIST_ENTRY CurEntry; + PGROUP_ENTRY Entry; + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + CurEntry = This->ServiceSinkHead.Flink; + while (CurEntry != &This->ServiceSinkHead) + { + Entry = CONTAINING_RECORD(CurEntry, GROUP_ENTRY, Entry); + Entry->pServiceSink->lpVtbl->RequestService(Entry->pServiceSink); + CurEntry = CurEntry->Flink; + } +} + +//--------------------------------------------------------------- +// IServiceGroup methods +// + +NTSTATUS +NTAPI +IServiceGroup_fnAddMember( + IN IServiceGroup * iface, + IN PSERVICESINK pServiceSink) +{ + PGROUP_ENTRY Entry; + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + Entry = ExAllocatePoolWithTag(NonPagedPool, sizeof(GROUP_ENTRY), TAG_PORTCLASS); + if (!Entry) + return STATUS_INSUFFICIENT_RESOURCES; + + Entry->pServiceSink = pServiceSink; + pServiceSink->lpVtbl->AddRef(pServiceSink); + + //FIXME + //check if Dpc is active + InsertTailList(&This->ServiceSinkHead, &Entry->Entry); + + return STATUS_SUCCESS; +} + +VOID +NTAPI +IServiceGroup_fnRemoveMember( + IN IServiceGroup * iface, + IN PSERVICESINK pServiceSink) +{ + PLIST_ENTRY CurEntry; + PGROUP_ENTRY Entry; + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + //FIXME + //check if Dpc is active + // + + CurEntry = This->ServiceSinkHead.Flink; + while (CurEntry != &This->ServiceSinkHead) + { + Entry = CONTAINING_RECORD(CurEntry, GROUP_ENTRY, Entry); + if (Entry->pServiceSink == pServiceSink) + { + RemoveEntryList(&Entry->Entry); + pServiceSink->lpVtbl->Release(pServiceSink); + ExFreePoolWithTag(Entry, TAG_PORTCLASS); + return; + } + CurEntry = CurEntry->Flink; + } + +} + +VOID +NTAPI +IServiceGroupDpc( + IN struct _KDPC *Dpc, + IN PVOID DeferredContext, + IN PVOID SystemArgument1, + IN PVOID SystemArgument2 + ) +{ + IServiceGroupImpl * This = (IServiceGroupImpl*)DeferredContext; + IServiceGroup_fnRequestService((IServiceGroup*)DeferredContext); + KeSetEvent(&This->DpcEvent, 0, FALSE); +} + + +VOID +NTAPI +IServiceGroup_fnSupportDelayedService( + IN IServiceGroup * iface) +{ + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + if (!This->Initialized) + { + KeInitializeEvent(&This->DpcEvent, NotificationEvent, FALSE); + KeInitializeTimerEx(&This->Timer, NotificationTimer); + KeInitializeDpc(&This->Dpc, IServiceGroupDpc, (PVOID)This); + This->Initialized = TRUE; + } +} + +VOID +NTAPI +IServiceGroup_fnRequestDelayedService( + IN IServiceGroup * iface, + IN ULONGLONG ullDelay) +{ + LARGE_INTEGER DueTime; + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + DueTime.QuadPart = ullDelay; + + if (This->Initialized) + { + KeSetTimer(&This->Timer, DueTime, &This->Dpc); + KeClearEvent(&This->DpcEvent); + } +} + +VOID +NTAPI +IServiceGroup_fnCancelDelayedService( + IN IServiceGroup * iface) +{ + IServiceGroupImpl * This = (IServiceGroupImpl*)iface; + + if (This->Initialized) + { + KeCancelTimer(&This->Timer); + } +} + +static IServiceGroupVtbl vt_IServiceGroup = +{ + /* IUnknown methods */ + IServiceGroup_fnQueryInterface, + IServiceGroup_fnAddRef, + IServiceGroup_fnRelease, + IServiceGroup_fnRequestService, + IServiceGroup_fnAddMember, + IServiceGroup_fnRemoveMember, + IServiceGroup_fnSupportDelayedService, + IServiceGroup_fnRequestDelayedService, + IServiceGroup_fnCancelDelayedService +}; + +/* + * @unimplemented + */ +NTSTATUS NTAPI +PcNewServiceGroup( + OUT PSERVICEGROUP* OutServiceGroup, + IN PUNKNOWN OuterUnknown OPTIONAL) +{ + IServiceGroupImpl * This; + + This = ExAllocatePoolWithTag(NonPagedPool, sizeof(IServiceGroupImpl), TAG_PORTCLASS); + if (!This) + return STATUS_INSUFFICIENT_RESOURCES; + + This->lpVtbl = &vt_IServiceGroup; + This->ref = 1; + InitializeListHead(&This->ServiceSinkHead); + This->Initialized = FALSE; + *OutServiceGroup = (PSERVICEGROUP)&This->lpVtbl; + + return STATUS_UNSUCCESSFUL; +} + + + Propchange: trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c [iso-8859-1] Mon Dec 8 17:30:16 2008 @@ -27,19 +27,6 @@ UNIMPLEMENTED; return STATUS_UNSUCCESSFUL; } - -/* - * @unimplemented - */ -NTSTATUS NTAPI -PcNewServiceGroup( - OUT PSERVICEGROUP* OutServiceGroup, - IN PUNKNOWN OuterUnknown OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - /* =============================================================== Power Management
16 years
1
0
0
0
[tkreuzer] 37949: partly implement x64 versions of _setjmp, _setjmpex and longjmp
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 8 16:51:29 2008 New Revision: 37949 URL:
http://svn.reactos.org/svn/reactos?rev=37949&view=rev
Log: partly implement x64 versions of _setjmp, _setjmpex and longjmp Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/ (with props) branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s (with props) Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] Mon Dec 8 16:51:29 2008 @@ -282,6 +282,11 @@ <directory name="setjmp"> <if property="ARCH" value="i386"> <directory name="i386"> + <file>setjmp.s</file> + </directory> + </if> + <if property="ARCH" value="amd64"> + <directory name="amd64"> <file>setjmp.s</file> </directory> </if> Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Mon Dec 8 16:51:29 2008 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s (added) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s [iso-8859-1] Mon Dec 8 16:51:29 2008 @@ -1,0 +1,157 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of _setjmp/longjmp + * FILE: lib/sdk/crt/setjmp/amd64/setjmp.s + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/amd64/asm.h> +#include <ndk/amd64/asmmacro.S> + +.intel_syntax noprefix + +#define JUMP_BUFFER_Frame 0x00 +#define JUMP_BUFFER_Rbx 0x08 +#define JUMP_BUFFER_Rsp 0x10 +#define JUMP_BUFFER_Rbp 0x18 +#define JUMP_BUFFER_Rsi 0x20 +#define JUMP_BUFFER_Rdi 0x28 +#define JUMP_BUFFER_R12 0x30 +#define JUMP_BUFFER_R13 0x38 +#define JUMP_BUFFER_R14 0x40 +#define JUMP_BUFFER_R15 0x48 +#define JUMP_BUFFER_Rip 0x50 +#define JUMP_BUFFER_Spare 0x58 +#define JUMP_BUFFER_Xmm6 0x60 +#define JUMP_BUFFER_Xmm7 0x70 +#define JUMP_BUFFER_Xmm8 0x80 +#define JUMP_BUFFER_Xmm9 0x90 +#define JUMP_BUFFER_Xmm10 0xa0 +#define JUMP_BUFFER_Xmm11 0xb0 +#define JUMP_BUFFER_Xmm12 0xc0 +#define JUMP_BUFFER_Xmm13 0xd0 +#define JUMP_BUFFER_Xmm14 0xe0 +#define JUMP_BUFFER_Xmm15 0xf0 + + +/* FUNCTIONS ******************************************************************/ + +/* + * int _setjmp(jmp_buf env); + * + * Parameters: <rcx> - jmp_buf env + * Returns: 0 + * Notes: Sets up the jmp_buf + */ +.proc _setjmp + /* Load rsp as it was before the call into rax */ + lea rax, [rsp + 8] + /* Load return address into r8 */ + mov r8, [rsp] + mov qword ptr [rcx + JUMP_BUFFER_Frame], 0 + mov [rcx + JUMP_BUFFER_Rbx], rbx + mov [rcx + JUMP_BUFFER_Rbp], rbp + mov [rcx + JUMP_BUFFER_Rsi], rsi + mov [rcx + JUMP_BUFFER_Rdi], rdi + mov [rcx + JUMP_BUFFER_R12], r12 + mov [rcx + JUMP_BUFFER_R13], r13 + mov [rcx + JUMP_BUFFER_R14], r14 + mov [rcx + JUMP_BUFFER_R15], r15 + mov [rcx + JUMP_BUFFER_Rsp], rax + mov [rcx + JUMP_BUFFER_Rip], r8 + movdqa [rcx + JUMP_BUFFER_Xmm6], xmm6 + movdqa [rcx + JUMP_BUFFER_Xmm7], xmm7 + movdqa [rcx + JUMP_BUFFER_Xmm8], xmm8 + movdqa [rcx + JUMP_BUFFER_Xmm9], xmm9 + movdqa [rcx + JUMP_BUFFER_Xmm10], xmm10 + movdqa [rcx + JUMP_BUFFER_Xmm11], xmm11 + movdqa [rcx + JUMP_BUFFER_Xmm12], xmm12 + movdqa [rcx + JUMP_BUFFER_Xmm13], xmm13 + movdqa [rcx + JUMP_BUFFER_Xmm14], xmm14 + movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15 + xor rax, rax + ret +.endproc + +/* + * int _setjmpex(jmp_buf _Buf,void *_Ctx); + * + * Parameters: <rcx> - jmp_buf env + * <rdx> - frame + * Returns: 0 + * Notes: Sets up the jmp_buf + */ +.proc _setjmpex + /* Load rsp as it was before the call into rax */ + lea rax, [rsp + 8] + /* Load return address into r8 */ + mov r8, [rsp] + mov [rcx + JUMP_BUFFER_Frame], rdx + mov [rcx + JUMP_BUFFER_Rbx], rbx + mov [rcx + JUMP_BUFFER_Rbp], rbp + mov [rcx + JUMP_BUFFER_Rsi], rsi + mov [rcx + JUMP_BUFFER_Rdi], rdi + mov [rcx + JUMP_BUFFER_R12], r12 + mov [rcx + JUMP_BUFFER_R13], r13 + mov [rcx + JUMP_BUFFER_R14], r14 + mov [rcx + JUMP_BUFFER_R15], r15 + mov [rcx + JUMP_BUFFER_Rsp], rax + mov [rcx + JUMP_BUFFER_Rip], r8 + movdqa [rcx + JUMP_BUFFER_Xmm6], xmm6 + movdqa [rcx + JUMP_BUFFER_Xmm7], xmm7 + movdqa [rcx + JUMP_BUFFER_Xmm8], xmm8 + movdqa [rcx + JUMP_BUFFER_Xmm9], xmm9 + movdqa [rcx + JUMP_BUFFER_Xmm10], xmm10 + movdqa [rcx + JUMP_BUFFER_Xmm11], xmm11 + movdqa [rcx + JUMP_BUFFER_Xmm12], xmm12 + movdqa [rcx + JUMP_BUFFER_Xmm13], xmm13 + movdqa [rcx + JUMP_BUFFER_Xmm14], xmm14 + movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15 + xor rax, rax + ret +.endproc + + +/* + * void longjmp(jmp_buf env, int value); + * + * Parameters: <rcx> - jmp_buf setup by _setjmp + * <rdx> - int value to return + * Returns: Doesn't return + * Notes: Non-local goto + */ +.proc longjmp + + // FIXME: handle frame + + mov rbx, [rcx + JUMP_BUFFER_Rbx] + mov rbp, [rcx + JUMP_BUFFER_Rbp] + mov rsi, [rcx + JUMP_BUFFER_Rsi] + mov rdi, [rcx + JUMP_BUFFER_Rdi] + mov r12, [rcx + JUMP_BUFFER_R12] + mov r13, [rcx + JUMP_BUFFER_R13] + mov r14, [rcx + JUMP_BUFFER_R14] + mov r15, [rcx + JUMP_BUFFER_R15] + mov rsp, [rcx + JUMP_BUFFER_Rsp] + mov r8, [rcx + JUMP_BUFFER_Rip] + movdqa xmm6, [rcx + JUMP_BUFFER_Xmm6] + movdqa xmm7, [rcx + JUMP_BUFFER_Xmm7] + movdqa xmm8, [rcx + JUMP_BUFFER_Xmm8] + movdqa xmm9, [rcx + JUMP_BUFFER_Xmm9] + movdqa xmm10, [rcx + JUMP_BUFFER_Xmm10] + movdqa xmm11, [rcx + JUMP_BUFFER_Xmm11] + movdqa xmm12, [rcx + JUMP_BUFFER_Xmm12] + movdqa xmm13, [rcx + JUMP_BUFFER_Xmm13] + movdqa xmm14, [rcx + JUMP_BUFFER_Xmm14] + movdqa xmm15, [rcx + JUMP_BUFFER_Xmm15] + + /* return param2 or 1 if it was 0 */ + mov rax, rdx + test rax, rax + jnz 2f + inc rax +2: jmp r8 +.endproc Propchange: branches/ros-amd64-bringup/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s ------------------------------------------------------------------------------ svn:eol-style = native
16 years
1
0
0
0
[tkreuzer] 37948: undef _ftime before implementing it
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 8 16:31:27 2008 New Revision: 37948 URL:
http://svn.reactos.org/svn/reactos?rev=37948&view=rev
Log: undef _ftime before implementing it Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ftime.c Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ftime.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ftime.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ftime.c [iso-8859-1] Mon Dec 8 16:31:27 2008 @@ -17,6 +17,7 @@ /* * @implemented */ +#undef _ftime void _ftime( struct _timeb *tm ) { int ret = 0;
16 years
1
0
0
0
[cfinck] 37947: Revert r37916 and add some correct tests for WC_NO_BEST_FIT_CHARS, which pass under Windows XP SP3. They show that our implementation still has some bugs here and there.
by cfinck@svn.reactos.org
Author: cfinck Date: Mon Dec 8 16:18:50 2008 New Revision: 37947 URL:
http://svn.reactos.org/svn/reactos?rev=37947&view=rev
Log: Revert r37916 and add some correct tests for WC_NO_BEST_FIT_CHARS, which pass under Windows XP SP3. They show that our implementation still has some bugs here and there. Modified: trunk/rostests/tests/wcstombs-tests/wcstombs-tests.c Modified: trunk/rostests/tests/wcstombs-tests/wcstombs-tests.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/wcstombs-tests/wcst…
============================================================================== --- trunk/rostests/tests/wcstombs-tests/wcstombs-tests.c [iso-8859-1] (original) +++ trunk/rostests/tests/wcstombs-tests/wcstombs-tests.c [iso-8859-1] Mon Dec 8 16:18:50 2008 @@ -79,7 +79,7 @@ OK(ret == 1, "ret is %d", ret); OK(mbc == 0, "mbc is %d", mbc); - /* msvcr80.dll changes mbc in the following call back to 0, msvcrt.dll from WinXP SP2 leaves it untouched */ + /* msvcr80.dll and later versions of CRT change mbc in the following call back to 0, msvcrt.dll from WinXP SP2 leaves it untouched */ mbc = 84; ret = wctomb(&mbc, dbwcs[0]); OK(ret == -1, "ret is %d", ret); @@ -193,46 +193,64 @@ void Win32_Tests(LPBOOL bUsedDefaultChar) { - /*int i;*/ - SetLastError(0xdeadbeef); puts("Win32-Tests"); puts("-----------"); - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); OK(ret == 1, "ret is %d", ret); OK(mbc == -28, "mbc is %d", mbc); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); OK(ret == 1, "ret is %d", ret); OK(mbc == 63, "mbc is %d", mbc); if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - ret = WideCharToMultiByte(1251, WC_NO_BEST_FIT_CHARS, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1251, 0, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); OK(ret == 1, "ret is %d", ret); OK(mbc == -16, "mbc is %d", mbc); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + ret = WideCharToMultiByte(1251, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); + OK(ret == 1, "ret is %d", ret); + OK(mbc == 97, "mbc is %d", mbc); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + + /* The behaviour for this character is different when WC_NO_BEST_FIT_CHARS is used */ ret = WideCharToMultiByte(1251, WC_NO_BEST_FIT_CHARS, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); OK(ret == 1, "ret is %d", ret); - OK(mbc == 97, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(mbc == 63, "mbc is %d", mbc); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + + ret = WideCharToMultiByte(1252, 0, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + OK(ret == 3, "ret is %d", ret); + OK(!strcmp(mbs, "??"), "mbs is %s", mbs); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + ZeroMemory(mbs, 5); + + ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + OK(ret == 3, "ret is %d", ret); + OK(!strcmp(mbs, "??"), "mbs is %s", mbs); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); /* This call triggers the last Win32 error */ - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, wcs, -1, &mbc, 1, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, wcs, -1, &mbc, 1, NULL, bUsedDefaultChar); OK(ret == 0, "ret is %d", ret); OK(mbc == 84, "mbc is %d", mbc); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %lu", GetLastError()); SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, wcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, wcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); OK(ret == 5, "ret is %d", ret); OK(!strcmp(mbs, "Th?i"), "mbs is %s", mbs); if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); @@ -241,7 +259,7 @@ /* WideCharToMultiByte mustn't add any null character automatically. So in this case, we should get the same string again, even if we only copied the first three bytes. */ - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); OK(ret == 3, "ret is %d", ret); OK(!strcmp(mbs, "Th?i"), "mbs is %s", mbs); if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); @@ -249,71 +267,86 @@ ZeroMemory(mbs, 5); /* Now this shouldn't be the case like above as we zeroed the complete string buffer. */ - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); OK(ret == 3, "ret is %d", ret); OK(!strcmp(mbs, "Th?"), "mbs is %s", mbs); if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + /* Chinese codepage tests + Swapping the WC_NO_BEST_FIT_CHARS and 0 tests causes bUsedDefaultChar to be set to TRUE in the following test, which quits with ERROR_INSUFFICIENT_BUFFER. + But as it isn't documented whether all other variables are undefined if ERROR_INSUFFICIENT_BUFFER is set, we skip this behaviour. */ + ret = WideCharToMultiByte(950, WC_NO_BEST_FIT_CHARS, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); + OK(ret == 1, "ret is %d", ret); + OK(mbc == 63, "mbc is %d", mbc); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + + ret = WideCharToMultiByte(950, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); + OK(ret == 1, "ret is %d", ret); + OK(mbc == 97, "mbc is %d", mbc); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + /* Double-byte tests */ - ret = WideCharToMultiByte(950, WC_NO_BEST_FIT_CHARS, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(950, 0, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); OK(ret == 5, "ret is %d", ret); OK(!strcmp(mbs, "µH©Ò"), "mbs is %s", mbs); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - ret = WideCharToMultiByte(950, WC_NO_BEST_FIT_CHARS, dbwcs, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 0, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar == FALSE"); + ret = WideCharToMultiByte(950, 0, dbwcs, 1, &mbc, 1, NULL, bUsedDefaultChar); + OK(ret == 0, "ret is %d", ret); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %lu", GetLastError()); SetLastError(0xdeadbeef); ZeroMemory(mbs, 5); - ret = WideCharToMultiByte(950, WC_NO_BEST_FIT_CHARS, dbwcs, 1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(950, 0, dbwcs, 1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); OK(ret == 2, "ret is %d", ret); OK(!strcmp(mbs, "µH"), "mbs is %s", mbs); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); /* Length-only tests */ - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, &wc2, 1, NULL, 0, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, wcs, -1, NULL, 0, NULL, bUsedDefaultChar); - OK(ret == 5, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(950, WC_NO_BEST_FIT_CHARS, dbwcs, 1, NULL, 0, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, &wc2, 1, NULL, 0, NULL, bUsedDefaultChar); + OK(ret == 1, "ret is %d", ret); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + + ret = WideCharToMultiByte(1252, 0, wcs, -1, NULL, 0, NULL, bUsedDefaultChar); + OK(ret == 5, "ret is %d", ret); + if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); + OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); + + ret = WideCharToMultiByte(950, 0, dbwcs, 1, NULL, 0, NULL, bUsedDefaultChar); OK(ret == 2, "ret is %d", ret); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - ret = WideCharToMultiByte(950, WC_NO_BEST_FIT_CHARS, dbwcs, -1, NULL, 0, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(950, 0, dbwcs, -1, NULL, 0, NULL, bUsedDefaultChar); OK(ret == 5, "ret is %d", ret); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); /* Abnormal uses of WideCharToMultiByte */ - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, NULL, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, NULL, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar); OK(ret == 0, "ret is %d", ret); if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); OK(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() is %lu", GetLastError()); SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(0, WC_NO_BEST_FIT_CHARS, dbwcs, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(0, 0, dbwcs, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar); OK(ret == 5, "ret is %d", ret); OK(!strcmp(mbs, "??"), "mbs is %s", mbs); if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, wcs, -1, (LPSTR)wcs, 5, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, wcs, -1, (LPSTR)wcs, 5, NULL, bUsedDefaultChar); OK(ret == 0, "ret is %d", ret); OK(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() is %lu", GetLastError()); SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, wcs, -1, mbs, -1, NULL, bUsedDefaultChar); + ret = WideCharToMultiByte(1252, 0, wcs, -1, mbs, -1, NULL, bUsedDefaultChar); OK(ret == 0, "ret is %d", ret); OK(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() is %lu", GetLastError()); SetLastError(0xdeadbeef);
16 years
1
0
0
0
[janderwald] 37946: - Partly implement PcRegisterIoTimeout, PcUnregisterIoTimeout
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Dec 8 15:42:44 2008 New Revision: 37946 URL:
http://svn.reactos.org/svn/reactos?rev=37946&view=rev
Log: - Partly implement PcRegisterIoTimeout, PcUnregisterIoTimeout Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c [iso-8859-1] Mon Dec 8 15:42:44 2008 @@ -30,3 +30,46 @@ return (CurrentTime.QuadPart - Since); } +/* + * @unimplemented + */ +NTSTATUS NTAPI +PcRegisterIoTimeout( + IN PDEVICE_OBJECT pDeviceObject, + IN PIO_TIMER_ROUTINE pTimerRoutine, + IN PVOID pContext) +{ + NTSTATUS Status; + + + /* FIXME + * check if timer is already used + */ + + Status = IoInitializeTimer(pDeviceObject, pTimerRoutine, pContext); + if (!NT_SUCCESS(Status)) + { + DPRINT("IoInitializeTimer failed with %x\n", Status); + return Status; + } + + IoStartTimer(pDeviceObject); + return STATUS_SUCCESS; +} + +/* + * @unimplemented + */ +NTSTATUS NTAPI +PcUnregisterIoTimeout( + IN PDEVICE_OBJECT pDeviceObject, + IN PIO_TIMER_ROUTINE pTimerRoutine, + IN PVOID pContext) +{ + /* FIXME + * check if timer is already used + */ + + IoStopTimer(pDeviceObject); + return STATUS_SUCCESS; +} Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/stubs.c [iso-8859-1] Mon Dec 8 15:42:44 2008 @@ -86,38 +86,6 @@ return STATUS_UNSUCCESSFUL; } - -/* =============================================================== - I/O Timeouts -*/ - -/* - * @unimplemented - */ -NTSTATUS NTAPI -PcRegisterIoTimeout( - IN PDEVICE_OBJECT pDeviceObject, - IN PIO_TIMER_ROUTINE pTimerRoutine, - IN PVOID pContext) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS NTAPI -PcUnregisterIoTimeout( - IN PDEVICE_OBJECT pDeviceObject, - IN PIO_TIMER_ROUTINE pTimerRoutine, - IN PVOID pContext) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - - /* =============================================================== Physical Connections */
16 years
1
0
0
0
[janderwald] 37945: - Implement IResourceList_AddEntryFromParent - Implement PcNewResourceSublist
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Dec 8 14:18:02 2008 New Revision: 37945 URL:
http://svn.reactos.org/svn/reactos?rev=37945&view=rev
Log: - Implement IResourceList_AddEntryFromParent - Implement PcNewResourceSublist Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c [iso-8859-1] Mon Dec 8 14:18:02 2008 @@ -225,6 +225,27 @@ IN CM_RESOURCE_TYPE Type, IN ULONG Index) { + PCM_PARTIAL_RESOURCE_DESCRIPTOR Translated; + PCM_RESOURCE_LIST NewTranslatedResources; + ULONG NewTranslatedSize; + IResourceListImpl * This = (IResourceListImpl*)iface; + + Translated = Parent->lpVtbl->FindTranslatedEntry(Parent, Type, Index); + if (!Translated) + return STATUS_INVALID_PARAMETER; + + NewTranslatedSize = sizeof(CM_RESOURCE_LIST) + This->TranslatedResourceList[0].List->PartialResourceList.Count * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); + NewTranslatedResources = ExAllocatePoolWithTag(This->PoolType, NewTranslatedSize, TAG_PORTCLASS); + if (!NewTranslatedResources) + return STATUS_INSUFFICIENT_RESOURCES; + + RtlCopyMemory(NewTranslatedResources, This->TranslatedResourceList, sizeof(CM_RESOURCE_LIST) + (This->TranslatedResourceList[0].List->PartialResourceList.Count-1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); + RtlCopyMemory(&NewTranslatedResources->List[0].PartialResourceList.PartialDescriptors[This->TranslatedResourceList[0].List->PartialResourceList.Count], Translated, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); + + ExFreePoolWithTag(This->TranslatedResourceList, TAG_PORTCLASS); + This->TranslatedResourceList = NewTranslatedResources; + NewTranslatedResources->List[0].PartialResourceList.Count++; + return STATUS_SUCCESS; } @@ -281,7 +302,7 @@ IN PCM_RESOURCE_LIST TranslatedResources, IN PCM_RESOURCE_LIST UntranslatedResources) { - IResourceListImpl* NewList = NULL; + IResourceListImpl* NewList; /* TODO: Validate parameters */ @@ -317,5 +338,53 @@ IN PRESOURCELIST ParentList, IN ULONG MaximumEntries) { - return STATUS_UNSUCCESSFUL; -} + IResourceListImpl* NewList, *Parent; + + if (!OuterUnknown || !ParentList || !MaximumEntries) + return STATUS_INVALID_PARAMETER; + + Parent = (IResourceListImpl*)ParentList; + + + if (!Parent->TranslatedResourceList->List->PartialResourceList.Count || + !Parent->UntranslatedResourceList->List->PartialResourceList.Count) + { + /* parent list can't be empty */ + return STATUS_INVALID_PARAMETER; + } + + NewList = ExAllocatePoolWithTag(PoolType, sizeof(IResourceListImpl), TAG_PORTCLASS); + if (!NewList) + return STATUS_INSUFFICIENT_RESOURCES; + + NewList->TranslatedResourceList = ExAllocatePoolWithTag(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); + if (!NewList->TranslatedResourceList) + { + ExFreePoolWithTag(NewList, TAG_PORTCLASS); + return STATUS_INSUFFICIENT_RESOURCES; + } + + NewList->UntranslatedResourceList = ExAllocatePoolWithTag(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); + if (!NewList->UntranslatedResourceList) + { + ExFreePoolWithTag(NewList->TranslatedResourceList, TAG_PORTCLASS); + ExFreePoolWithTag(NewList, TAG_PORTCLASS); + return STATUS_INSUFFICIENT_RESOURCES; + } + + RtlCopyMemory(NewList->TranslatedResourceList, Parent->TranslatedResourceList, sizeof(CM_RESOURCE_LIST)); + RtlCopyMemory(NewList->UntranslatedResourceList, Parent->UntranslatedResourceList, sizeof(CM_RESOURCE_LIST)); + + /* mark list as empty */ + NewList->TranslatedResourceList->List->PartialResourceList.Count = 0; + NewList->UntranslatedResourceList->List->PartialResourceList.Count = 0; + + NewList->lpVtbl = (IResourceListVtbl*)&vt_ResourceListVtbl; + NewList->ref = 1; + NewList->OuterUnknown = OuterUnknown; + NewList->PoolType = PoolType; + + *OutResourceList = (IResourceList*)&NewList->lpVtbl; + + return STATUS_SUCCESS; +}
16 years
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
71
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
67
68
69
70
71
Results per page:
10
25
50
100
200