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
June 2006
----- 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
19 participants
595 discussions
Start a n
N
ew thread
[amunger] 22141: Sync setupapi to trunk. Revisions: 21888-21889, 22086-22087, 22091, 22101, 22103, 22109, 22118
by amunger@svn.reactos.org
Author: amunger Date: Thu Jun 1 07:07:44 2006 New Revision: 22141 URL:
http://svn.reactos.ru/svn/reactos?rev=22141&view=rev
Log: Sync setupapi to trunk. Revisions: 21888-21889, 22086-22087, 22091, 22101, 22103, 22109, 22118 Removed: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Makefile.in branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/devinst16.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupx.spec branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupx16.h branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupx_main.c Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Bg.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Cs.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Da.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/De.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/En.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Eo.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Es.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Fi.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Fr.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Hu.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/It.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Ja.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Ko.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Nl.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/No.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Pl.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Pt.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Ru.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Sv.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Tr.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/cfgmgr.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/devinst.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/dirid.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/diskspace.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/infparse.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/install.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/misc.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/parser.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/query.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/queue.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/rpc.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/rpc_private.h branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.rc branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.spec branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi_private.h branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupcab.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/stringtable.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/stubs.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/virtcopy.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Bg.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Cs.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Da.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/De.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/En.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Eo.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Es.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Fi.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Fr.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Hu.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/It.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Ja.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Ko.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Removed: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Makefile.in URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Nl.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/No.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Pl.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Pt.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Ru.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Sv.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/Tr.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/cfgmgr.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Removed: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/devinst16.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/dirid.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/diskspace.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/infparse.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/install.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/misc.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/parser.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/query.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/queue.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/rpc.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/rpc_private.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.spec URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi_private.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupcab.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Removed: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupx.spec URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Removed: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupx16.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Removed: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupx_main.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/stringtable.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/stubs.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/virtcopy.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
18 years, 6 months
1
0
0
0
[amunger] 22140: Sync newdev to trunk. Revisions: 22049-22051, 22074, 22076, 22092-22094, 22102, 22116-22117, 22125, 22127-22128
by amunger@svn.reactos.org
Author: amunger Date: Thu Jun 1 06:57:47 2006 New Revision: 22140 URL:
http://svn.reactos.ru/svn/reactos?rev=22140&view=rev
Log: Sync newdev to trunk. Revisions: 22049-22051, 22074, 22076, 22092-22094, 22102, 22116-22117, 22125, 22127-22128 Added: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Fr.rc - copied, changed from r22127, trunk/reactos/dll/win32/newdev/Fr.rc branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev_private.h - copied, changed from r22094, trunk/reactos/dll/win32/newdev/newdev_private.h branches/ros-branch-0_3_0/reactos/dll/win32/newdev/wizard.c - copied, changed from r22051, trunk/reactos/dll/win32/newdev/wizard.c branches/ros-branch-0_3_0/reactos/include/newdev.h - copied unchanged from r22094, trunk/reactos/include/newdev.h Removed: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.h Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/De.rc branches/ros-branch-0_3_0/reactos/dll/win32/newdev/En.rc branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Es.rc branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Hu.rc branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Ru.rc branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rbuild branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rc branches/ros-branch-0_3_0/reactos/dll/win32/newdev/resource.h branches/ros-branch-0_3_0/reactos/dll/win32/newdev/stubs.c Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/De.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/De.rc (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/De.rc Thu Jun 1 06:57:47 2006 @@ -32,6 +32,18 @@ BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 END +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 +END + IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareinstallation" @@ -58,6 +70,14 @@ LTEXT "UNKNOWN DEVICE",IDC_DEVICE,51,20,169,16 END +IDD_INSTALLDRV DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Hardwareinstallation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,51,20,169,16 +END + IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/En.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/En.rc (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/En.rc Thu Jun 1 06:57:47 2006 @@ -32,6 +32,18 @@ BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 END +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 +END + IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Device installation" @@ -58,6 +70,14 @@ LTEXT "UNKNOWN DEVICE",IDC_DEVICE,51,20,169,16 END +IDD_INSTALLDRV DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,51,20,169,16 +END + IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Es.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Es.rc (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Es.rc Thu Jun 1 06:57:47 2006 @@ -32,6 +32,18 @@ BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 END +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 +END + IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalación de Dispositivos" @@ -58,6 +70,14 @@ LTEXT "DISPOSITIVO DESCONOCIDO",IDC_DEVICE,51,20,169,16 END +IDD_INSTALLDRV DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "DISPOSITIVO DESCONOCIDO",IDC_DEVICE,51,20,169,16 +END + IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU Copied: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Fr.rc (from r22127, trunk/reactos/dll/win32/newdev/Fr.rc) URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- trunk/reactos/dll/win32/newdev/Fr.rc (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Fr.rc Thu Jun 1 06:57:47 2006 @@ -1,4 +1,4 @@ -LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Hu.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Hu.rc (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Hu.rc Thu Jun 1 06:57:47 2006 @@ -8,11 +8,14 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "welcome??",IDC_WELCOMETITLE,115,8,195,24 - LTEXT "A telepítõ a következõ hardverhez telepít fel eszközmeghatjtót:",IDC_STATIC,115,40,195,16 + LTEXT "A telepítõ a következõ hardverhez telepít fel eszközmeghatjtót:", + IDC_STATIC,120,40,195,16 LTEXT "Kattints a Tovább gombra a folytatáshoz.",IDC_STATIC,115,169,195,17 LTEXT "Ismeretlen eszköz!",IDC_DEVICE,129,55,164,11 - CONTROL "Automatikus telepítés",IDC_RADIO_AUTO,"Button",BS_AUTORADIOBUTTON,115,112,178,13 - CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_MANUAL,"Button",BS_AUTORADIOBUTTON,115,133,164,14 + CONTROL "Automatikus telepítés",IDC_RADIO_AUTO,"Button", + BS_AUTORADIOBUTTON,120,112,178,13 + CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_MANUAL, + "Button",BS_AUTORADIOBUTTON,120,133,164,14 END IDD_NODRIVER DIALOG DISCARDABLE 0, 0, 317, 193 @@ -22,9 +25,24 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "A telepítés sikertelen.",IDC_FINISHTITLE,115,8,195,24 - LTEXT "Az eszközmeghajtó nem található.",IDC_STATIC,115,40,195,19 - LTEXT "Kattints a Vissza gombra, és az Eszközmeghajtó kiválasztása gombra, ha tudod, hol van az eszközmeghajtó.",IDC_STATIC,113,98,181,24 - CONTROL "Ne mutasd ezt többször",IDC_DONOTSHOWDLG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,170,180,11 + LTEXT "Az eszközmeghajtó nem található.", + IDC_STATIC,120,40,195,19 + LTEXT "Kattints a Vissza gombra, és az Eszközmeghajtó kiválasztása gombra, ha tudod, hol van az eszközmeghajtó.", + IDC_STATIC,120,98,181,24 + CONTROL "Ne mutasd ezt többször",IDC_DONOTSHOWDLG,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 +END + +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 @@ -32,15 +50,28 @@ CAPTION "Hardver telepítõ" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Keresés ezeken a helyeken",IDC_RADIO_SEARCHHERE,"Button",BS_AUTORADIOBUTTON,27,11,239,13 - CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_CHOOSE,"Button",BS_AUTORADIOBUTTON,27,98,171,12 - CONTROL "Keresés cserélhetõ lemezeken",IDC_CHECK_MEDIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9 - CONTROL "A következõ útvonalon keressen",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,47,54,162,10 + CONTROL "Keresés ezeken a helyeken",IDC_RADIO_SEARCHHERE,"Button", + BS_AUTORADIOBUTTON,27,11,239,13 + CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_CHOOSE,"Button", + BS_AUTORADIOBUTTON,27,98,171,12 + CONTROL "Keresés cserélhetõ lemezeken",IDC_CHECK_MEDIA,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9 + CONTROL "A következõ útvonalon keressen",IDC_CHECK_PATH,"Button", + WS_TABSTOP,47,54,162,10 PUSHBUTTON "Böngészés",IDC_BROWSE,248,69,45,14 - COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL + COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | + WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL END IDD_SEARCHDRV DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Hardver telepítõ" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Ismeretlen eszköz!",IDC_DEVICE,51,20,169,16 +END + +IDD_INSTALLDRV DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardver telepítõ" FONT 8, "MS Shell Dlg" @@ -54,9 +85,11 @@ CAPTION "Hardver telepítõ" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "A telepítés sikeresen befejezõdött",IDC_FINISHTITLE,115,8,195,11 - LTEXT "A telepítõ feltelepítette az eszközmeghajtókat a következõ eszközhöz:",IDC_STATIC,115,32,195,19 - LTEXT "A kilépéshez kattints a Befejezés gombra.",IDC_STATIC,115,174,179,11 + LTEXT "A telepítés sikeresen befejezõdött",IDC_FINISHTITLE,120,8,195,11 + LTEXT "A telepítõ feltelepítette az eszközmeghajtókat a következõ eszközhöz:", + IDC_STATIC,120,32,195,19 + LTEXT "A kilépéshez kattints a Befejezés gombra.",IDC_STATIC,120,174, + 179,11 LTEXT "Ismeretlen eszköz!",IDC_DEVICE,148,53,147,12 END Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Ru.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Ru.rc (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/Ru.rc Thu Jun 1 06:57:47 2006 @@ -32,6 +32,18 @@ BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 END +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 +END + IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Óñòàíîâêà îáîðóäîâàíèÿ" @@ -58,6 +70,14 @@ LTEXT "Íåèçâåñòíîå óñòðîéñòâî",IDC_DEVICE,51,20,169,16 END +IDD_INSTALLDRV DIALOG DISCARDABLE 0, 0, 317, 143 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Óñòàíîâêà îáîðóäîâàíèÿ" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Íåèçâåñòíîå óñòðîéñòâî",IDC_DEVICE,51,20,169,16 +END + IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c Thu Jun 1 06:57:47 2006 @@ -20,147 +20,12 @@ */ #define YDEBUG -#include "newdev.h" +#include "newdev_private.h" WINE_DEFAULT_DEBUG_CHANNEL(newdev); -static BOOL SearchDriver ( PDEVINSTDATA DevInstData, LPCTSTR Path ); -static BOOL InstallDriver ( PDEVINSTDATA DevInstData ); -static DWORD WINAPI FindDriverProc( LPVOID lpParam ); -static BOOL FindDriver ( PDEVINSTDATA DevInstData, LPCWSTR InfFile ); - -static DEVINSTDATA DevInstData; +/* Global variables */ HINSTANCE hDllInstance; -HANDLE hThread; - -static BOOL -CanDisableDevice( - IN DEVINST DevInst, - IN HMACHINE hMachine, - OUT BOOL *CanDisable) -{ -#if 0 - /* hpoussin, Dec 2005. I've disabled this code because - * ntoskrnl never sets the DN_DISABLEABLE flag. - */ - CONFIGRET cr; - ULONG Status, ProblemNumber; - BOOL Ret = FALSE; - - cr = CM_Get_DevNode_Status_Ex( - &Status, - &ProblemNumber, - DevInst, - 0, - hMachine); - if (cr == CR_SUCCESS) - { - *CanDisable = ((Status & DN_DISABLEABLE) != 0); - Ret = TRUE; - } - - return Ret; -#else - *CanDisable = TRUE; - return TRUE; -#endif -} - - -static BOOL -IsDeviceStarted( - IN DEVINST DevInst, - IN HMACHINE hMachine, - OUT BOOL *IsEnabled) -{ - CONFIGRET cr; - ULONG Status, ProblemNumber; - BOOL Ret = FALSE; - - cr = CM_Get_DevNode_Status_Ex( - &Status, - &ProblemNumber, - DevInst, - 0, - hMachine); - if (cr == CR_SUCCESS) - { - *IsEnabled = ((Status & DN_STARTED) != 0); - Ret = TRUE; - } - - return Ret; -} - - -static BOOL -StartDevice( - IN HDEVINFO DeviceInfoSet, - IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, - IN BOOL bEnable, - IN DWORD HardwareProfile OPTIONAL, - OUT BOOL *bNeedReboot OPTIONAL) -{ - SP_PROPCHANGE_PARAMS pcp; - SP_DEVINSTALL_PARAMS dp; - DWORD LastErr; - BOOL Ret = FALSE; - - pcp.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER); - pcp.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE; - pcp.HwProfile = HardwareProfile; - - if (bEnable) - { - /* try to enable the device on the global profile */ - pcp.StateChange = DICS_ENABLE; - pcp.Scope = DICS_FLAG_GLOBAL; - - /* ignore errors */ - LastErr = GetLastError(); - if (SetupDiSetClassInstallParams( - DeviceInfoSet, - DevInfoData, - &pcp.ClassInstallHeader, - sizeof(SP_PROPCHANGE_PARAMS))) - { - SetupDiCallClassInstaller( - DIF_PROPERTYCHANGE, - DeviceInfoSet, - DevInfoData); - } - SetLastError(LastErr); - } - - /* try config-specific */ - pcp.StateChange = (bEnable ? DICS_ENABLE : DICS_DISABLE); - pcp.Scope = DICS_FLAG_CONFIGSPECIFIC; - - if (SetupDiSetClassInstallParams( - DeviceInfoSet, - DevInfoData, - &pcp.ClassInstallHeader, - sizeof(SP_PROPCHANGE_PARAMS)) && - SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, - DeviceInfoSet, - DevInfoData)) - { - dp.cbSize = sizeof(SP_DEVINSTALL_PARAMS); - if (SetupDiGetDeviceInstallParams( - DeviceInfoSet, - DevInfoData, - &dp)) - { - if (bNeedReboot != NULL) - { - *bNeedReboot = ((dp.Flags & (DI_NEEDRESTART | DI_NEEDREBOOT)) != 0); - } - - Ret = TRUE; - } - } - return Ret; -} /* * @implemented @@ -189,12 +54,12 @@ /* FIXME: InstallFlags bRebootRequired ignored! */ /* Check flags */ - /* FIXME: if (InstallFlags & ~(INSTALLFLAG_FORCE | INSTALLFLAG_READONLY | INSTALLFLAG_NONINTERACTIVE)) + if (InstallFlags & ~(INSTALLFLAG_FORCE | INSTALLFLAG_READONLY | INSTALLFLAG_NONINTERACTIVE)) { DPRINT("Unknown flags: 0x%08lx\n", InstallFlags & ~(INSTALLFLAG_FORCE | INSTALLFLAG_READONLY | INSTALLFLAG_NONINTERACTIVE)); SetLastError(ERROR_INVALID_FLAGS); goto cleanup; - }*/ + } /* Enumerate all devices of the system */ DevInstData.hDevInfo = SetupDiGetClassDevsW(NULL, NULL, hwndParent, DIGCF_ALLCLASSES | DIGCF_PRESENT); @@ -293,17 +158,17 @@ TRACE("Trying to update the driver of %S\n", Buffer); /* Search driver in the specified .inf file */ - if (!FindDriver(&DevInstData, FullInfPath)) - { - TRACE("FindDriver() failed with error 0x%lx\n", GetLastError()); + if (!SearchDriver(&DevInstData, NULL, FullInfPath)) + { + TRACE("SearchDriver() failed with error 0x%lx\n", GetLastError()); continue; } /* FIXME: HACK! We shouldn't check of ERROR_PRIVILEGE_NOT_HELD */ - //if (!InstallDriver(&DevInstData)) - if (!InstallDriver(&DevInstData) && GetLastError() != ERROR_PRIVILEGE_NOT_HELD) - { - TRACE("InstallDriver() failed with error 0x%lx\n", GetLastError()); + //if (!InstallCurrentDriver(&DevInstData)) + if (!InstallCurrentDriver(&DevInstData) && GetLastError() != ERROR_PRIVILEGE_NOT_HELD) + { + TRACE("InstallCurrentDriver() failed with error 0x%lx\n", GetLastError()); continue; } @@ -375,552 +240,12 @@ return Result; } - -static HFONT -CreateTitleFont(VOID) -{ - NONCLIENTMETRICS ncm; - LOGFONT LogFont; - HDC hdc; - INT FontSize; - HFONT hFont; - - ncm.cbSize = sizeof(NONCLIENTMETRICS); - SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); - - LogFont = ncm.lfMessageFont; - LogFont.lfWeight = FW_BOLD; - _tcscpy(LogFont.lfFaceName, _T("MS Shell Dlg")); - - hdc = GetDC(NULL); - FontSize = 12; - LogFont.lfHeight = 0 - GetDeviceCaps (hdc, LOGPIXELSY) * FontSize / 72; - hFont = CreateFontIndirect(&LogFont); - ReleaseDC(NULL, hdc); - - return hFont; -} - -static VOID -CenterWindow( - IN HWND hWnd) -{ - HWND hWndParent; - RECT rcParent; - RECT rcWindow; - - hWndParent = GetParent(hWnd); - if (hWndParent == NULL) - hWndParent = GetDesktopWindow(); - - GetWindowRect(hWndParent, &rcParent); - GetWindowRect(hWnd, &rcWindow); - - SetWindowPos( - hWnd, - HWND_TOP, - ((rcParent.right - rcParent.left) - (rcWindow.right - rcWindow.left)) / 2, - ((rcParent.bottom - rcParent.top) - (rcWindow.bottom - rcWindow.top)) / 2, - 0, - 0, - SWP_NOSIZE); -} - -static INT_PTR CALLBACK -WelcomeDlgProc( - IN HWND hwndDlg, - IN UINT uMsg, - IN WPARAM wParam, - IN LPARAM lParam) -{ - - PDEVINSTDATA DevInstData; - - /* Retrieve pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - HWND hwndControl; - DWORD dwStyle; - - /* Get pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; - SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); - - hwndControl = GetParent(hwndDlg); - - /* Center the wizard window */ - CenterWindow (hwndControl); - - /* Hide the system menu */ - dwStyle = GetWindowLong(hwndControl, GWL_STYLE); - SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU); - - /* Set title font */ - SendDlgItemMessage( - hwndDlg, - IDC_WELCOMETITLE, - WM_SETFONT, - (WPARAM)DevInstData->hTitleFont, - (LPARAM)TRUE); - - SendDlgItemMessage( - hwndDlg, - IDC_DEVICE, - WM_SETTEXT, - 0, - (LPARAM) DevInstData->buffer); - - SendDlgItemMessage( - hwndDlg, - IDC_RADIO_AUTO, - BM_SETCHECK, - (WPARAM) TRUE, - (LPARAM) 0); - break; - } - - case WM_NOTIFY: - { - LPNMHDR lpnm = (LPNMHDR)lParam; - - switch (lpnm->code) - { - case PSN_SETACTIVE: - /* Enable the Next button */ - PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT); - break; - - case PSN_WIZNEXT: - /* Handle a Next button click, if necessary */ - if (SendDlgItemMessage(hwndDlg, IDC_RADIO_AUTO, BM_GETCHECK, (WPARAM) 0, (LPARAM) 0) == BST_CHECKED) - PropSheet_SetCurSel(GetParent(hwndDlg), 0, IDD_SEARCHDRV); - break; - - default: - break; - } - break; - } - - default: - break; - } - - return FALSE; -} - -static INT_PTR CALLBACK -CHSourceDlgProc( - IN HWND hwndDlg, - IN UINT uMsg, - IN WPARAM wParam, - IN LPARAM lParam) -{ - PDEVINSTDATA DevInstData; - - /* Retrieve pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - HWND hwndControl; - DWORD dwStyle; - - /* Get pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; - SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); - - hwndControl = GetParent(hwndDlg); - - /* Center the wizard window */ - CenterWindow (hwndControl); - - /* Hide the system menu */ - dwStyle = GetWindowLong(hwndControl, GWL_STYLE); - SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU); - - SendDlgItemMessage( - hwndDlg, - IDC_RADIO_SEARCHHERE, - BM_SETCHECK, - (WPARAM) TRUE, - (LPARAM) 0); - - break; - } - - case WM_NOTIFY: - { - LPNMHDR lpnm = (LPNMHDR)lParam; - - switch (lpnm->code) - { - case PSN_SETACTIVE: - /* Enable the Next and Back buttons */ - PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK); - break; - - case PSN_WIZNEXT: - /* Handle a Next button click, if necessary */ - PropSheet_SetCurSel(GetParent(hwndDlg), 0, 4); - break; - - default: - break; - } - break; - } - - default: - break; - } - - return FALSE; -} - -static INT_PTR CALLBACK -SearchDrvDlgProc( - IN HWND hwndDlg, - IN UINT uMsg, - IN WPARAM wParam, - IN LPARAM lParam) -{ - PDEVINSTDATA DevInstData; - DWORD dwThreadId; - - /* Retrieve pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - HWND hwndControl; - DWORD dwStyle; - - /* Get pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; - SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); - - DevInstData->hDialog = hwndDlg; - hwndControl = GetParent(hwndDlg); - - /* Center the wizard window */ - CenterWindow (hwndControl); - - SendDlgItemMessage( - hwndDlg, - IDC_DEVICE, - WM_SETTEXT, - 0, - (LPARAM) DevInstData->buffer); - - /* Hide the system menu */ - dwStyle = GetWindowLong(hwndControl, GWL_STYLE); - SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU); - break; - } - - case WM_SEARCH_FINISHED: - { - CloseHandle(hThread); - hThread = 0; - if (wParam == 0) - PropSheet_SetCurSel(GetParent(hwndDlg), 0, IDD_NODRIVER); - else - PropSheet_SetCurSel(GetParent(hwndDlg), 0, IDD_FINISHPAGE); - break; - } - - case WM_NOTIFY: - { - LPNMHDR lpnm = (LPNMHDR)lParam; - - switch (lpnm->code) - { - case PSN_SETACTIVE: - PropSheet_SetWizButtons(GetParent(hwndDlg), !PSWIZB_NEXT | !PSWIZB_BACK); - hThread = CreateThread( NULL, 0, FindDriverProc, DevInstData, 0, &dwThreadId); - break; - - case PSN_KILLACTIVE: - if (hThread != 0) - { - SetWindowLong ( hwndDlg, DWL_MSGRESULT, TRUE); - return TRUE; - } - break; - - case PSN_WIZNEXT: - /* Handle a Next button click, if necessary */ - break; - - default: - break; - } - break; - } - - default: - break; - } - - return FALSE; -} - -static DWORD WINAPI -FindDriverProc( - IN LPVOID lpParam) -{ - TCHAR drive[] = {'?',':',0}; - size_t nType; - DWORD dwDrives; - PDEVINSTDATA DevInstData; - DWORD config_flags; - UINT i = 1; - - DevInstData = (PDEVINSTDATA)lpParam; - - dwDrives = GetLogicalDrives(); - for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++) - { - if (dwDrives & i) - { - nType = GetDriveType( drive ); - if (nType == DRIVE_CDROM) - { - /* search for inf file */ - if (SearchDriver ( DevInstData, drive )) - { - /* if we found a valid driver inf... */ - if (FindDriver ( DevInstData, NULL )) - { - InstallDriver ( DevInstData ); - PostMessage(DevInstData->hDialog, WM_SEARCH_FINISHED, 1, 0); - return 0; - } - } - } - } - i <<= 1; - } - - /* update device configuration */ - if (SetupDiGetDeviceRegistryProperty( - DevInstData->hDevInfo, - &DevInstData->devInfoData, - SPDRP_CONFIGFLAGS, - NULL, - (BYTE *)&config_flags, - sizeof(config_flags), - NULL)) - { - config_flags |= CONFIGFLAG_FAILEDINSTALL; - SetupDiSetDeviceRegistryProperty( - DevInstData->hDevInfo, - &DevInstData->devInfoData, - SPDRP_CONFIGFLAGS, - (BYTE *)&config_flags, sizeof(config_flags) ); - } - - PostMessage(DevInstData->hDialog, WM_SEARCH_FINISHED, 0, 0); - return 0; -} - -static INT_PTR CALLBACK -FinishDlgProc( - IN HWND hwndDlg, - IN UINT uMsg, - IN WPARAM wParam, - IN LPARAM lParam) -{ - - PDEVINSTDATA DevInstData; - - /* Retrieve pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - HWND hwndControl; - - /* Get pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; - SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); - - hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); - ShowWindow (hwndControl, SW_HIDE); - EnableWindow (hwndControl, FALSE); - - SendDlgItemMessage( - hwndDlg, - IDC_DEVICE, - WM_SETTEXT, - 0, - (LPARAM) DevInstData->drvInfoData.Description); - - /* Set title font */ - SendDlgItemMessage( - hwndDlg, - IDC_FINISHTITLE, - WM_SETFONT, - (WPARAM)DevInstData->hTitleFont, - (LPARAM)TRUE); - break; - } - - case WM_NOTIFY: - { - LPNMHDR lpnm = (LPNMHDR)lParam; - - switch (lpnm->code) - { - case PSN_SETACTIVE: - /* Enable the correct buttons on for the active page */ - PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH); - break; - - case PSN_WIZBACK: - /* Handle a Back button click, if necessary */ - break; - - case PSN_WIZFINISH: - /* Handle a Finish button click, if necessary */ - break; - - default: - break; - } - break; - } - - default: - break; - } - - return FALSE; -} - -static INT_PTR CALLBACK -InstFailDlgProc( - IN HWND hwndDlg, - IN UINT uMsg, - IN WPARAM wParam, - IN LPARAM lParam) -{ - - PDEVINSTDATA DevInstData; - - /* Get pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - HWND hwndControl; - BOOL DisableableDevice = FALSE; - - DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; - SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); - - hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); - ShowWindow (hwndControl, SW_HIDE); - EnableWindow (hwndControl, FALSE); - - /* Set title font */ - SendDlgItemMessage( - hwndDlg, - IDC_FINISHTITLE, - WM_SETFONT, - (WPARAM)DevInstData->hTitleFont, - (LPARAM)TRUE); - - /* disable the "do not show this dialog anymore" checkbox - if the device cannot be disabled */ - CanDisableDevice( - DevInstData->devInfoData.DevInst, - NULL, - &DisableableDevice); - EnableWindow( - GetDlgItem(hwndDlg, IDC_DONOTSHOWDLG), - DisableableDevice); - break; - } - - case WM_NOTIFY: - { - LPNMHDR lpnm = (LPNMHDR)lParam; - - switch (lpnm->code) - { - case PSN_SETACTIVE: - /* Enable the correct buttons on for the active page */ - PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_FINISH); - break; - - case PSN_WIZBACK: - PropSheet_SetCurSel(GetParent(hwndDlg), 0, IDD_WELCOMEPAGE); - /* Handle a Back button click, if necessary */ - break; - - case PSN_WIZFINISH: - { - BOOL DisableableDevice = FALSE; - BOOL IsStarted = FALSE; - - if (CanDisableDevice(DevInstData->devInfoData.DevInst, - NULL, - &DisableableDevice) && - DisableableDevice && - IsDeviceStarted( - DevInstData->devInfoData.DevInst, - NULL, - &IsStarted) && - !IsStarted && - SendDlgItemMessage( - hwndDlg, - IDC_DONOTSHOWDLG, - BM_GETCHECK, - (WPARAM) 0, (LPARAM) 0) == BST_CHECKED) - { - /* disable the device */ - StartDevice( - DevInstData->hDevInfo, - &DevInstData->devInfoData, - FALSE, - 0, - NULL); - } - break; - } - - default: - break; - } - break; - } - - default: - break; - } - - return FALSE; -} - - -static BOOL -FindDriver( +/* Directory and InfFile MUST NOT be specified simultaneously */ +BOOL +SearchDriver( IN PDEVINSTDATA DevInstData, - IN LPCWSTR InfFile OPTIONAL) + IN LPCTSTR Directory OPTIONAL, + IN LPCTSTR InfFile OPTIONAL) { SP_DEVINSTALL_PARAMS DevInstallParams = {0,}; BOOL ret; @@ -936,16 +261,30 @@ if (InfFile) { DevInstallParams.Flags |= DI_ENUMSINGLEINF; - wcscpy(DevInstallParams.DriverPath, InfFile); - } - - if (!SetupDiSetDeviceInstallParams(DevInstData->hDevInfo, &DevInstData->devInfoData, &DevInstallParams)) + _tcsncpy(DevInstallParams.DriverPath, InfFile, MAX_PATH); + } + else if (Directory) + { + DevInstallParams.Flags &= ~DI_ENUMSINGLEINF; + _tcsncpy(DevInstallParams.DriverPath, Directory, MAX_PATH); + } + else + *DevInstallParams.DriverPath = _T('\0'); + + ret = SetupDiSetDeviceInstallParams( + DevInstData->hDevInfo, + &DevInstData->devInfoData, + &DevInstallParams); + if (!ret) { TRACE("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError()); return FALSE; } - ret = SetupDiBuildDriverInfoList(DevInstData->hDevInfo, &DevInstData->devInfoData, SPDIT_COMPATDRIVER); + ret = SetupDiBuildDriverInfoList( + DevInstData->hDevInfo, + &DevInstData->devInfoData, + SPDIT_COMPATDRIVER); if (!ret) { TRACE("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError()); @@ -966,11 +305,9 @@ TRACE("SetupDiEnumDriverInfo() failed with error 0x%lx\n", GetLastError()); return FALSE; } - TRACE("Installing driver %S: %S\n", DevInstData->drvInfoData.MfgName, DevInstData->drvInfoData.Description); return TRUE; } - static BOOL IsDots(IN LPCTSTR str) @@ -997,21 +334,20 @@ return _T(""); } -static BOOL -SearchDriver( +BOOL +SearchDriverRecursive( IN PDEVINSTDATA DevInstData, IN LPCTSTR Path) { WIN32_FIND_DATA wfd; - SP_DEVINSTALL_PARAMS DevInstallParams; TCHAR DirPath[MAX_PATH]; TCHAR FileName[MAX_PATH]; TCHAR FullPath[MAX_PATH]; TCHAR LastDirPath[MAX_PATH] = _T(""); TCHAR PathWithPattern[MAX_PATH]; BOOL ok = TRUE; - BOOL ret; - HANDLE hFindFile; + BOOL retval = FALSE; + HANDLE hFindFile = INVALID_HANDLE_VALUE; _tcscpy(DirPath, Path); @@ -1021,19 +357,25 @@ _tcscpy(PathWithPattern, DirPath); _tcscat(PathWithPattern, _T("\\*")); - for (hFindFile = FindFirstFile(PathWithPattern, &wfd); ((hFindFile != INVALID_HANDLE_VALUE) && ok); ok = FindNextFile(hFindFile, &wfd)) + for (hFindFile = FindFirstFile(PathWithPattern, &wfd); + ok && hFindFile != INVALID_HANDLE_VALUE; + ok = FindNextFile(hFindFile, &wfd)) { _tcscpy(FileName, wfd.cFileName); if (IsDots(FileName)) continue; - if((wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) - { + if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + /* Recursive search */ _tcscpy(FullPath, DirPath); _tcscat(FullPath, FileName); - if(SearchDriver(DevInstData, FullPath)) - break; + if (SearchDriverRecursive(DevInstData, FullPath)) + { + retval = TRUE; + /* We continue the search for a better driver */ + } } else { @@ -1042,29 +384,15 @@ if ((_tcscmp(pszExtension, _T(".inf")) == 0) && (_tcscmp(LastDirPath, DirPath) != 0)) { _tcscpy(LastDirPath, DirPath); - ZeroMemory (&DevInstallParams, sizeof(SP_DEVINSTALL_PARAMS)); - DevInstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS); - - ret = SetupDiGetDeviceInstallParams( - DevInstData->hDevInfo, - &DevInstData->devInfoData, - &DevInstallParams); - - if (_tcsclen(DirPath) <= MAX_PATH) + + if (_tcsclen(DirPath) > MAX_PATH) + /* Path is too long to be searched */ + continue; + + if (SearchDriver(DevInstData, DirPath, NULL)) { - memcpy(DevInstallParams.DriverPath, DirPath, (_tcsclen(DirPath) + 1) * sizeof(TCHAR)); - } - - ret = SetupDiSetDeviceInstallParams( - DevInstData->hDevInfo, - &DevInstData->devInfoData, - &DevInstallParams); - - if ( FindDriver ( DevInstData, NULL ) ) - { - if (hFindFile != INVALID_HANDLE_VALUE) - FindClose(hFindFile); - return TRUE; + retval = TRUE; + /* We continue the search for a better driver */ } } @@ -1073,17 +401,17 @@ if (hFindFile != INVALID_HANDLE_VALUE) FindClose(hFindFile); - - return FALSE; -} - -static BOOL -InstallDriver( + return retval; +} + +BOOL +InstallCurrentDriver( IN PDEVINSTDATA DevInstData) { - BOOL ret; + TRACE("Installing driver %S: %S\n", DevInstData->drvInfoData.MfgName, DevInstData->drvInfoData.Description); + ret = SetupDiCallClassInstaller( DIF_SELECTBESTCOMPATDRV, DevInstData->hDevInfo, @@ -1185,27 +513,6 @@ } return TRUE; -} - -static VOID -CleanUp(VOID) -{ - - if (DevInstData.devInfoData.cbSize != 0) - { - if (!SetupDiDestroyDriverInfoList(DevInstData.hDevInfo, &DevInstData.devInfoData, SPDIT_COMPATDRIVER)) - TRACE("SetupDiDestroyDriverInfoList() failed with error 0x%lx\n", GetLastError()); - } - - if (DevInstData.hDevInfo != INVALID_HANDLE_VALUE) - { - if (!SetupDiDestroyDeviceInfoList(DevInstData.hDevInfo)) - TRACE("SetupDiDestroyDeviceInfoList() failed with error 0x%lx\n", GetLastError()); - } - - if (DevInstData.buffer) - HeapFree(GetProcessHeap(), 0, DevInstData.buffer); - } /* @@ -1218,12 +525,10 @@ IN LPCWSTR InstanceId, IN INT Show) { - - PROPSHEETHEADER psh; - HPROPSHEETPAGE ahpsp[5]; - PROPSHEETPAGE psp; + PDEVINSTDATA DevInstData = NULL; BOOL ret; DWORD config_flags; + BOOL retval = FALSE; if (!IsUserAdmin()) { @@ -1231,46 +536,53 @@ ExitProcess(ERROR_ACCESS_DENIED); } + DevInstData = HeapAlloc(GetProcessHeap(), 0, sizeof(DEVINSTDATA)); + if (!DevInstData) + { + TRACE("HeapAlloc() failed\n"); + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + /* Clear devinst data */ - ZeroMemory(&DevInstData, sizeof(DEVINSTDATA)); - DevInstData.devInfoData.cbSize = 0; /* Tell if the devInfoData is valid */ - - DevInstData.hDevInfo = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); - if (DevInstData.hDevInfo == INVALID_HANDLE_VALUE) + ZeroMemory(DevInstData, sizeof(DEVINSTDATA)); + DevInstData->devInfoData.cbSize = 0; /* Tell if the devInfoData is valid */ + + /* Fill devinst data */ + DevInstData->hDevInfo = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); + if (DevInstData->hDevInfo == INVALID_HANDLE_VALUE) { TRACE("SetupDiCreateDeviceInfoListExW() failed with error 0x%lx\n", GetLastError()); - CleanUp(); - return FALSE; - } - - DevInstData.devInfoData.cbSize = sizeof(SP_DEVINFO_DATA); + goto cleanup; + } + + DevInstData->devInfoData.cbSize = sizeof(SP_DEVINFO_DATA); ret = SetupDiOpenDeviceInfoW( - DevInstData.hDevInfo, + DevInstData->hDevInfo, InstanceId, NULL, 0, /* Open flags */ - &DevInstData.devInfoData); + &DevInstData->devInfoData); if (!ret) { TRACE("SetupDiOpenDeviceInfoW() failed with error 0x%lx (InstanceId %S)\n", GetLastError(), InstanceId); - DevInstData.devInfoData.cbSize = 0; - CleanUp(); - return FALSE; + DevInstData->devInfoData.cbSize = 0; + goto cleanup; } SetLastError(ERROR_GEN_FAILURE); ret = SetupDiGetDeviceRegistryProperty( - DevInstData.hDevInfo, - &DevInstData.devInfoData, + DevInstData->hDevInfo, + &DevInstData->devInfoData, SPDRP_DEVICEDESC, - &DevInstData.regDataType, + &DevInstData->regDataType, NULL, 0, - &DevInstData.requiredSize); - - if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER && DevInstData.regDataType == REG_SZ) - { - DevInstData.buffer = HeapAlloc(GetProcessHeap(), 0, DevInstData.requiredSize); - if (!DevInstData.buffer) + &DevInstData->requiredSize); + + if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER && DevInstData->regDataType == REG_SZ) + { + DevInstData->buffer = HeapAlloc(GetProcessHeap(), 0, DevInstData->requiredSize); + if (!DevInstData->buffer) { TRACE("HeapAlloc() failed\n"); SetLastError(ERROR_NOT_ENOUGH_MEMORY); @@ -1278,24 +590,23 @@ else { ret = SetupDiGetDeviceRegistryProperty( - DevInstData.hDevInfo, - &DevInstData.devInfoData, + DevInstData->hDevInfo, + &DevInstData->devInfoData, SPDRP_DEVICEDESC, - &DevInstData.regDataType, - DevInstData.buffer, DevInstData.requiredSize, - &DevInstData.requiredSize); + &DevInstData->regDataType, + DevInstData->buffer, DevInstData->requiredSize, + &DevInstData->requiredSize); } } if (!ret) { TRACE("SetupDiGetDeviceRegistryProperty() failed with error 0x%lx (InstanceId %S)\n", GetLastError(), InstanceId); - CleanUp(); - return FALSE; + goto cleanup; } if (SetupDiGetDeviceRegistryProperty( - DevInstData.hDevInfo, - &DevInstData.devInfoData, + DevInstData->hDevInfo, + &DevInstData->devInfoData, SPDRP_CONFIGFLAGS, NULL, (BYTE *)&config_flags, @@ -1304,77 +615,48 @@ { if (config_flags & CONFIGFLAG_FAILEDINSTALL) { - CleanUp(); - return TRUE; - } - } - - TRACE("Installing %S (%S)\n", DevInstData.buffer, InstanceId); - - if ((!FindDriver(&DevInstData, NULL)) && (Show != SW_HIDE)) - { - - /* Create the Welcome page */ - ZeroMemory (&psp, sizeof(PROPSHEETPAGE)); - psp.dwSize = sizeof(PROPSHEETPAGE); - psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; - psp.hInstance = hDllInstance; - psp.lParam = (LPARAM)&DevInstData; - psp.pfnDlgProc = WelcomeDlgProc; - psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE); - ahpsp[IDD_WELCOMEPAGE] = CreatePropertySheetPage(&psp); - - /* Create the Select Source page */ - psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; - psp.pfnDlgProc = CHSourceDlgProc; - psp.pszTemplate = MAKEINTRESOURCE(IDD_CHSOURCE); - ahpsp[IDD_CHSOURCE] = CreatePropertySheetPage(&psp); - - /* Create the Search driver page */ - psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; - psp.pfnDlgProc = SearchDrvDlgProc; - psp.pszTemplate = MAKEINTRESOURCE(IDD_SEARCHDRV); - ahpsp[IDD_SEARCHDRV] = CreatePropertySheetPage(&psp); - - /* Create the Finish page */ - psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; - psp.pfnDlgProc = FinishDlgProc; - psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE); - ahpsp[IDD_FINISHPAGE] = CreatePropertySheetPage(&psp); - - /* Create the Install failed page */ - psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; - psp.pfnDlgProc = InstFailDlgProc; - psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER); - ahpsp[IDD_NODRIVER] = CreatePropertySheetPage(&psp); - - /* Create the property sheet */ - psh.dwSize = sizeof(PROPSHEETHEADER); - psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER; - psh.hInstance = hDllInstance; - psh.hwndParent = NULL; - psh.nPages = 5; - psh.nStartPage = 0; - psh.phpage = ahpsp; - psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK); - psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER); - - /* Create title font */ - DevInstData.hTitleFont = CreateTitleFont(); - - /* Display the wizard */ - PropertySheet(&psh); - - DeleteObject(DevInstData.hTitleFont); - - } - else - { - InstallDriver ( &DevInstData ); - } - - CleanUp(); - return TRUE; + /* The device is disabled */ + retval = TRUE; + goto cleanup; + } + } + + TRACE("Installing %S (%S)\n", DevInstData->buffer, InstanceId); + + /* Search driver in default location */ + if (SearchDriver(DevInstData, NULL, NULL)) + { + /* Driver found ; install it */ + retval = InstallCurrentDriver(DevInstData); + goto cleanup; + } + else if (Show == SW_HIDE) + { + /* We can't show the wizard. Fail the install */ + goto cleanup; + } + + /* Prepare the wizard, and display it */ + retval = DisplayWizard(DevInstData, hWndParent, IDD_WELCOMEPAGE); + +cleanup: + if (DevInstData) + { + if (DevInstData->devInfoData.cbSize != 0) + { + if (!SetupDiDestroyDriverInfoList(DevInstData->hDevInfo, &DevInstData->devInfoData, SPDIT_COMPATDRIVER)) + TRACE("SetupDiDestroyDriverInfoList() failed with error 0x%lx\n", GetLastError()); + } + if (DevInstData->hDevInfo != INVALID_HANDLE_VALUE) + { + if (!SetupDiDestroyDeviceInfoList(DevInstData->hDevInfo)) + TRACE("SetupDiDestroyDeviceInfoList() failed with error 0x%lx\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, DevInstData->buffer); + HeapFree(GetProcessHeap(), 0, DevInstData); + } + + return retval; } /* Removed: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.h (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.h (removed) @@ -1,25 +1,0 @@ -#include <windows.h> -#include <commctrl.h> -#include <regstr.h> -#include <setupapi.h> -#include <cfgmgr32.h> -#include <tchar.h> -#include <wine/debug.h> - -#include <stdio.h> - -#include "resource.h" - -typedef struct _DEVINSTDATA -{ - HFONT hTitleFont; - PBYTE buffer; - DWORD requiredSize; - DWORD regDataType; - HWND hDialog; - HDEVINFO hDevInfo; - SP_DEVINFO_DATA devInfoData; - SP_DRVINFO_DATA drvInfoData; -} DEVINSTDATA, *PDEVINSTDATA; - -#define WM_SEARCH_FINISHED (WM_USER + 10) Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rbuild URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rbuild (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rbuild Thu Jun 1 06:57:47 2006 @@ -7,6 +7,7 @@ <define name="_WIN32_WINNT">0x0501</define> <file>newdev.c</file> <file>stubs.c</file> + <file>wizard.c</file> <file>newdev.rc</file> <file>newdev.spec</file> <library>wine</library> Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rc URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rc (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.rc Thu Jun 1 06:57:47 2006 @@ -11,3 +11,4 @@ #include "De.rc" #include "Hu.rc" #include "Ru.rc" +#include "Fr.rc" Copied: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev_private.h (from r22094, trunk/reactos/dll/win32/newdev/newdev_private.h) URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- trunk/reactos/dll/win32/newdev/newdev_private.h (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev_private.h Thu Jun 1 06:57:47 2006 @@ -8,6 +8,7 @@ #include <regstr.h> #include <setupapi.h> #include <cfgmgr32.h> +#include <shlobj.h> #include <tchar.h> #include <wine/debug.h> Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/resource.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/resource.h (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/resource.h Thu Jun 1 06:57:47 2006 @@ -1,10 +1,10 @@ #ifndef RESOURCE_H #define RESOURCE_H -#define IDB_WATERMARK 100 -#define IDB_HEADER 101 +#define IDB_WATERMARK 100 +#define IDB_HEADER 101 -#define IDC_STATIC -1 +#define IDC_STATIC -1 #define IDC_DEVICE 2000 #define IDC_RADIO_AUTO 2001 @@ -14,15 +14,17 @@ #define IDC_RADIO_CHOOSE 2005 #define IDC_CHECK_MEDIA 2006 #define IDC_CHECK_PATH 2007 -#define IDC_WELCOMETITLE 2008 +#define IDC_WELCOMETITLE 2008 #define IDC_BROWSE 2009 #define IDC_COMBO_PATH 2010 #define IDC_FINISHTITLE 2011 -#define IDD_WELCOMEPAGE 0 +#define IDD_WELCOMEPAGE 0 #define IDD_CHSOURCE 1 #define IDD_SEARCHDRV 2 -#define IDD_FINISHPAGE 3 +#define IDD_INSTALLDRV 3 #define IDD_NODRIVER 4 +#define IDD_INSTALLFAILED 5 +#define IDD_FINISHPAGE 6 #endif /* RESOURCE_H */ Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/stubs.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/stubs.c (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/stubs.c Thu Jun 1 06:57:47 2006 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "newdev.h" +#include "newdev_private.h" WINE_DEFAULT_DEBUG_CHANNEL(newdev); Copied: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/wizard.c (from r22051, trunk/reactos/dll/win32/newdev/wizard.c) URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- trunk/reactos/dll/win32/newdev/wizard.c (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/wizard.c Thu Jun 1 06:57:47 2006 @@ -18,8 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define YDEBUG -#include "newdev.h" +#include "newdev_private.h" WINE_DEFAULT_DEBUG_CHANNEL(newdev); @@ -335,6 +334,19 @@ return 0; } +static DWORD WINAPI +InstallDriverProc( + IN LPVOID lpParam) +{ + PDEVINSTDATA DevInstData; + BOOL res; + + DevInstData = (PDEVINSTDATA)lpParam; + res = InstallCurrentDriver(DevInstData); + PostMessage(DevInstData->hDialog, WM_INSTALL_FINISHED, res ? 0 : 1, 0); + return 0; +} + static VOID PopulateCustomPathCombo( IN HWND hwndCombo) @@ -346,7 +358,7 @@ LPCTSTR Path; LONG rc; - ComboBox_ResetContent(hwndCombo); + (void)ComboBox_ResetContent(hwndCombo); /* RegGetValue would have been better... */ rc = RegOpenKeyEx( @@ -372,6 +384,7 @@ TRACE("RegQueryValueEx() failed with error 0x%lx\n", rc); goto cleanup; } + /* Allocate enough space to add 2 NULL chars at the end of the string */ Buffer = HeapAlloc(GetProcessHeap(), 0, dwPathLength + 2 * sizeof(TCHAR)); if (!Buffer) @@ -394,9 +407,12 @@ Buffer[dwPathLength] = Buffer[dwPathLength + 1] = '\0'; /* Populate combo box */ - for (Path = Buffer; *Path; Path += _tcslen(Path)) - ComboBox_AddString(hwndCombo, Path); - ComboBox_SetCurSel(hwndCombo, 0); + for (Path = Buffer; *Path; Path += _tcslen(Path) + 1) + { + (void)ComboBox_AddString(hwndCombo, Path); + if (Path == Buffer) + (void)ComboBox_SetCurSel(hwndCombo, 0); + } cleanup: if (hKey != NULL) @@ -408,7 +424,110 @@ SaveCustomPath( IN HWND hwndCombo) { - FIXME("Stub."); + LPTSTR CustomPath = NULL; + DWORD CustomPathLength; + LPTSTR Buffer = NULL; + LPTSTR pBuffer; /* Pointer into Buffer */ + int ItemsCount, Length; + DWORD i; + DWORD TotalLength = 0; + BOOL UseCustomPath = TRUE; + HKEY hKey = NULL; + LONG rc; + + /* Get custom path */ + Length = ComboBox_GetTextLength(hwndCombo) + 1; + CustomPath = HeapAlloc(GetProcessHeap(), 0, Length * sizeof(TCHAR)); + if (!CustomPath) + { + TRACE("HeapAlloc() failed\n"); + goto cleanup; + } + CustomPathLength = ComboBox_GetText(hwndCombo, CustomPath, Length) + 1; + + /* Calculate length of the buffer */ + ItemsCount = ComboBox_GetCount(hwndCombo); + if (ItemsCount == CB_ERR) + { + TRACE("ComboBox_GetCount() failed\n"); + goto cleanup; + } + for (i = 0; i < ItemsCount; i++) + { + Length = ComboBox_GetLBTextLen(hwndCombo, i); + if (Length == CB_ERR) + { + TRACE("ComboBox_GetLBTextLen() failed\n"); + goto cleanup; + } + TotalLength += Length + 1; + } + TotalLength++; /* Final NULL char */ + + /* Allocate buffer */ + Buffer = HeapAlloc(GetProcessHeap(), 0, (CustomPathLength + TotalLength + 1) * sizeof(TCHAR)); + if (!Buffer) + { + TRACE("HeapAlloc() failed\n"); + goto cleanup; + } + + /* Fill the buffer */ + pBuffer = &Buffer[CustomPathLength]; + for (i = 0; i < ItemsCount; i++) + { + Length = ComboBox_GetLBText(hwndCombo, i, pBuffer); + if (Length == CB_ERR) + { + TRACE("ComboBox_GetLBText() failed\n"); + goto cleanup; + } + else if (UseCustomPath && _tcsicmp(CustomPath, pBuffer) == 0) + UseCustomPath = FALSE; + pBuffer += 1 + Length; + } + *pBuffer = '\0'; /* Add final NULL char */ + + if (!UseCustomPath) + { + /* Nothing to save to registry */ + goto cleanup; + } + + TotalLength += CustomPathLength; + _tcscpy(Buffer, CustomPath); + + /* Save the buffer */ + /* RegSetKeyValue would have been better... */ + rc = RegOpenKeyEx( + HKEY_LOCAL_MACHINE, + REGSTR_PATH_SETUP REGSTR_KEY_SETUP, + 0, + KEY_SET_VALUE, + &hKey); + if (rc != ERROR_SUCCESS) + { + TRACE("RegOpenKeyEx() failed with error 0x%lx\n", rc); + goto cleanup; + } + rc = RegSetValueEx( + hKey, + _T("Installation Sources"), + 0, + REG_MULTI_SZ, + (const BYTE*)Buffer, + TotalLength * sizeof(TCHAR)); + if (rc != ERROR_SUCCESS) + { + TRACE("RegSetValueEx() failed with error 0x%lx\n", rc); + goto cleanup; + } + +cleanup: + if (hKey != NULL) + RegCloseKey(hKey); + HeapFree(GetProcessHeap(), 0, CustomPath); + HeapFree(GetProcessHeap(), 0, Buffer); } static INT_PTR CALLBACK @@ -501,7 +620,7 @@ IncludePath(HWND Dlg, BOOL Enabled) { EnableWindow(GetDlgItem(Dlg, IDC_COMBO_PATH), Enabled); - EnableWindow(GetDlgItem(Dlg, IDC_BROWSE), /*FIXME: Enabled*/ FALSE); + EnableWindow(GetDlgItem(Dlg, IDC_BROWSE), Enabled); } static void @@ -578,9 +697,35 @@ return TRUE; case IDC_BROWSE: - /* FIXME: set the IDC_COMBO_PATH text */ - FIXME("Should display browse folder dialog\n"); - return FALSE; + { + BROWSEINFO bi = { 0, }; + LPITEMIDLIST pidl; + + bi.hwndOwner = hwndDlg; + bi.ulFlags = BIF_RETURNONLYFSDIRS; + pidl = SHBrowseForFolder(&bi); + if (pidl) + { + TCHAR Directory[MAX_PATH]; + IMalloc* malloc; + + if (SHGetPathFromIDList(pidl, Directory)) + { + /* Set the IDC_COMBO_PATH text */ + ComboBox_SetText(GetDlgItem(hwndDlg, IDC_COMBO_PATH), Directory); + } + + /* Free memory, if possible */ + if (SUCCEEDED(SHGetMalloc(&malloc))) + { + FIXME("Memory leak!\n"); + //malloc->Free(pidl); + //malloc->Release(); + } + return TRUE; + } + break; + } } break; } @@ -606,7 +751,7 @@ if (PrepareFoldersToScan(DevInstData, hwndDlg)) PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_SEARCHDRV); else - /* FIXME: unknown error */; + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED); } else /* FIXME */; @@ -675,11 +820,7 @@ if (wParam == 0) PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_NODRIVER); else - { - /* FIXME: Shouldn't belong here... */ - InstallCurrentDriver(DevInstData); - PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_FINISHPAGE); - } + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLDRV); break; } @@ -726,6 +867,86 @@ IN WPARAM wParam, IN LPARAM lParam) { + PDEVINSTDATA DevInstData; + DWORD dwThreadId; + + /* Retrieve pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); + + switch (uMsg) + { + case WM_INITDIALOG: + { + HWND hwndControl; + DWORD dwStyle; + + /* Get pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; + SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); + + DevInstData->hDialog = hwndDlg; + hwndControl = GetParent(hwndDlg); + + /* Center the wizard window */ + CenterWindow(hwndControl); + + SendDlgItemMessage( + hwndDlg, + IDC_DEVICE, + WM_SETTEXT, + 0, + (LPARAM)DevInstData->drvInfoData.Description); + + /* Hide the system menu */ + dwStyle = GetWindowLong(hwndControl, GWL_STYLE); + SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU); + break; + } + + case WM_INSTALL_FINISHED: + { + CloseHandle(hThread); + hThread = 0; + if (wParam == 0) + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_FINISHPAGE); + else + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED); + break; + } + + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch (lpnm->code) + { + case PSN_SETACTIVE: + PropSheet_SetWizButtons(GetParent(hwndDlg), !PSWIZB_NEXT | !PSWIZB_BACK); + hThread = CreateThread(NULL, 0, InstallDriverProc, DevInstData, 0, &dwThreadId); + break; + + case PSN_KILLACTIVE: + if (hThread != 0) + { + SetWindowLong(hwndDlg, DWL_MSGRESULT, TRUE); + return TRUE; + } + break; + + case PSN_WIZNEXT: + /* Handle a Next button click, if necessary */ + break; + + default: + break; + } + break; + } + + default: + break; + } + return FALSE; } @@ -737,23 +958,23 @@ IN LPARAM lParam) { PDEVINSTDATA DevInstData; + HWND hwndControl; /* Get pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); switch (uMsg) { case WM_INITDIALOG: { - HWND hwndControl; BOOL DisableableDevice = FALSE; DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); - ShowWindow (hwndControl, SW_HIDE); - EnableWindow (hwndControl, FALSE); + ShowWindow(hwndControl, SW_HIDE); + EnableWindow(hwndControl, FALSE); /* Set title font */ SendDlgItemMessage( @@ -788,7 +1009,10 @@ case PSN_WIZBACK: /* Handle a Back button click, if necessary */ - PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_WELCOMEPAGE); + hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); + ShowWindow(hwndControl, SW_SHOW); + EnableWindow(hwndControl, TRUE); + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_CHSOURCE); return TRUE; case PSN_WIZFINISH: @@ -836,6 +1060,81 @@ } static INT_PTR CALLBACK +InstallFailedDlgProc( + IN HWND hwndDlg, + IN UINT uMsg, + IN WPARAM wParam, + IN LPARAM lParam) +{ + PDEVINSTDATA DevInstData; + + /* Retrieve pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); + + switch (uMsg) + { + case WM_INITDIALOG: + { + HWND hwndControl; + + /* Get pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; + SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); + + hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); + ShowWindow(hwndControl, SW_HIDE); + EnableWindow(hwndControl, FALSE); + + SendDlgItemMessage( + hwndDlg, + IDC_DEVICE, + WM_SETTEXT, + 0, + (LPARAM)DevInstData->drvInfoData.Description); + + /* Set title font */ + SendDlgItemMessage( + hwndDlg, + IDC_FINISHTITLE, + WM_SETFONT, + (WPARAM)DevInstData->hTitleFont, + (LPARAM)TRUE); + break; + } + + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch (lpnm->code) + { + case PSN_SETACTIVE: + /* Enable the correct buttons on for the active page */ + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH); + break; + + case PSN_WIZBACK: + /* Handle a Back button click, if necessary */ + break; + + case PSN_WIZFINISH: + /* Handle a Finish button click, if necessary */ + break; + + default: + break; + } + break; + } + + default: + break; + } + + return FALSE; +} + +static INT_PTR CALLBACK FinishDlgProc( IN HWND hwndDlg, IN UINT uMsg, @@ -845,7 +1144,7 @@ PDEVINSTDATA DevInstData; /* Retrieve pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); switch (uMsg) { @@ -858,8 +1157,8 @@ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); - ShowWindow (hwndControl, SW_HIDE); - EnableWindow (hwndControl, FALSE); + ShowWindow(hwndControl, SW_HIDE); + EnableWindow(hwndControl, FALSE); SendDlgItemMessage( hwndDlg, @@ -973,11 +1272,17 @@ psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLDRV); ahpsp[IDD_INSTALLDRV] = CreatePropertySheetPage(&psp); - /* Create the Install failed page */ + /* Create the No driver page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; psp.pfnDlgProc = NoDriverDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER); ahpsp[IDD_NODRIVER] = CreatePropertySheetPage(&psp); + + /* Create the Install failed page */ + psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; + psp.pfnDlgProc = InstallFailedDlgProc; + psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFAILED); + ahpsp[IDD_INSTALLFAILED] = CreatePropertySheetPage(&psp); /* Create the Finish page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; @@ -990,7 +1295,7 @@ psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER; psh.hInstance = hDllInstance; psh.hwndParent = hwndParent; - psh.nPages = 7; + psh.nPages = IDD_FINISHPAGE + 1; psh.nStartPage = startPage; psh.phpage = ahpsp; psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
18 years, 6 months
1
0
0
0
[amunger] 22139: Merged win32k fixes from trunk, per GreatLord. Revisions: 21995, 22010, 22014
by amunger@svn.reactos.org
Author: amunger Date: Thu Jun 1 06:09:11 2006 New Revision: 22139 URL:
http://svn.reactos.ru/svn/reactos?rev=22139&view=rev
Log: Merged win32k fixes from trunk, per GreatLord. Revisions: 21995, 22010, 22014 Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib16bpp.c branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib32bpp.c branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/eng/xlate.c branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dibobj.c Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib16bpp.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib16bpp.c (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib16bpp.c Thu Jun 1 06:09:11 2006 @@ -687,8 +687,9 @@ sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_4BPP_GetPixel(SourceSurf, sx, sy); + color = XLATEOBJ_iXlate(ColorTranslation, color); - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; DestBits = (PULONG)((ULONG_PTR)DestBits + 2); } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); @@ -713,8 +714,8 @@ sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_8BPP_GetPixel(SourceSurf, sx, sy); - - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + color = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; DestBits = (PULONG)((ULONG_PTR)DestBits + 2); } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); @@ -740,8 +741,9 @@ sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_24BPP_GetPixel(SourceSurf, sx, sy); + color = XLATEOBJ_iXlate(ColorTranslation, color); - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; DestBits = (PULONG)((ULONG_PTR)DestBits + 2); } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); @@ -766,8 +768,9 @@ sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_32BPP_GetPixel(SourceSurf, sx, sy); + color = XLATEOBJ_iXlate(ColorTranslation, color); - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; DestBits = (PULONG)((ULONG_PTR)DestBits + 2); } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib32bpp.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib32bpp.c (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/dib/dib32bpp.c Thu Jun 1 06:09:11 2006 @@ -609,7 +609,8 @@ { sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_4BPP_GetPixel(SourceSurf, sx, sy); - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + color = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); @@ -633,7 +634,8 @@ { sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_8BPP_GetPixel(SourceSurf, sx, sy); - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + color = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); } @@ -656,7 +658,8 @@ { sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_16BPP_GetPixel(SourceSurf, sx, sy); - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + color = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); } @@ -679,7 +682,8 @@ { sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left; color = DIB_24BPP_GetPixel(SourceSurf, sx, sy); - *DestBits = XLATEOBJ_iXlate(ColorTranslation, color); + color = XLATEOBJ_iXlate(ColorTranslation, color); + *DestBits = color; } DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta); } Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/eng/xlate.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/eng/xlate.c (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/eng/xlate.c Thu Jun 1 06:09:11 2006 @@ -275,10 +275,15 @@ */ end: + if (PaletteDest != NULL) + if (PaletteDest != PaletteSource) + if (DestPalGDI != NULL) + PALETTE_UnlockPalette(DestPalGDI); + + if (PaletteSource != NULL) PALETTE_UnlockPalette(SourcePalGDI); - if (PaletteDest != NULL && PaletteDest != PaletteSource) - PALETTE_UnlockPalette(DestPalGDI); + return XlateObj; } Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dibobj.c (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dibobj.c Thu Jun 1 06:09:11 2006 @@ -758,17 +758,41 @@ { PDC Dc; HBITMAP Bmp; - - Dc = DC_LockDc(hDc); - if (NULL == Dc) - { - SetLastWin32Error(ERROR_INVALID_HANDLE); - return NULL; - } - - Bmp = IntCreateDIBitmap(Dc, Header, Init, Bits, Data, ColorUse); - - DC_UnlockDc(Dc); + + + if (NULL == hDc) + { + hDc = IntGdiCreateDC(NULL, NULL, NULL, NULL,FALSE); + if (hDc == NULL) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return NULL; + } + Dc = DC_LockDc(hDc); + if (Dc == NULL) + { + NtGdiDeleteObjectApp(hDc); + SetLastWin32Error(ERROR_INVALID_HANDLE); + return NULL; + } + + Bmp = IntCreateDIBitmap(Dc, Header, Init, Bits, Data, ColorUse); + DC_UnlockDc(Dc); + NtGdiDeleteObjectApp(hDc); + } + else + { + Dc = DC_LockDc(hDc); + if (Dc == NULL) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return NULL; + } + Bmp = IntCreateDIBitmap(Dc, Header, Init, Bits, Data, ColorUse); + DC_UnlockDc(Dc); + } + + return Bmp; }
18 years, 6 months
1
0
0
0
[amunger] 22138: Merged rtl fixes from trunk, per GreatLord. Revisions: 22081-22085
by amunger@svn.reactos.org
Author: amunger Date: Thu Jun 1 05:57:31 2006 New Revision: 22138 URL:
http://svn.reactos.ru/svn/reactos?rev=22138&view=rev
Log: Merged rtl fixes from trunk, per GreatLord. Revisions: 22081-22085 Modified: branches/ros-branch-0_3_0/reactos/lib/rtl/sprintf.c branches/ros-branch-0_3_0/reactos/lib/rtl/swprintf.c Modified: branches/ros-branch-0_3_0/reactos/lib/rtl/sprintf.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/rtl…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/rtl/sprintf.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/rtl/sprintf.c Thu Jun 1 05:57:31 2006 @@ -26,6 +26,42 @@ #define LEFT 16 /* left justified */ #define SPECIAL 32 /* 0x */ #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ + +typedef struct { + unsigned int mantissal:32; + unsigned int mantissah:20; + unsigned int exponent:11; + unsigned int sign:1; +} double_t; + +static +__inline +int +_isinf(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah == 0 && x.x->mantissal == 0 )); +} + +static +__inline +int +_isnan(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah != 0 || x.x->mantissal != 0 )); +} static @@ -144,6 +180,109 @@ return buf; } +static char * +numberf(char * buf, char * end, double num, int base, int size, int precision, int type) +{ + char c,sign,tmp[66]; + const char *digits; + const char *small_digits = "0123456789abcdefghijklmnopqrstuvwxyz"; + const char *large_digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + int i; + long long x; + + /* FIXME + the float version of number is direcly copy of number + */ + + digits = (type & LARGE) ? large_digits : small_digits; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return 0; + c = (type & ZEROPAD) ? '0' : ' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = '-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + if (type & SPECIAL) { + if (base == 16) + size -= 2; + else if (base == 8) + size--; + } + i = 0; + if (num == 0) + tmp[i++] = '0'; + else while (num != 0) + { + x = num; + tmp[i++] = digits[do_div(&x,base)]; + num=x; + } + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) { + while(size-->0) { + if (buf <= end) + *buf = ' '; + ++buf; + } + } + if (sign) { + if (buf <= end) + *buf = sign; + ++buf; + } + if (type & SPECIAL) { + if (base==8) { + if (buf <= end) + *buf = '0'; + ++buf; + } else if (base==16) { + if (buf <= end) + *buf = '0'; + ++buf; + if (buf <= end) + *buf = digits[33]; + ++buf; + } + } + if (!(type & LEFT)) { + while (size-- > 0) { + if (buf <= end) + *buf = c; + ++buf; + } + } + while (i < precision--) { + if (buf <= end) + *buf = '0'; + ++buf; + } + while (i-- > 0) { + if (buf <= end) + *buf = tmp[i]; + ++buf; + } + while (size-- > 0) { + if (buf <= end) + *buf = ' '; + ++buf; + } + return buf; +} + static char* string(char* buf, char* end, const char* s, int len, int field_width, int precision, int flags) { @@ -241,6 +380,8 @@ { int len; unsigned long long num; + double _double; + int base; char *str, *end; const char *s; @@ -253,10 +394,12 @@ number of chars for from string */ int qualifier; /* 'h', 'l', 'L', 'I' or 'w' for integer fields */ + /* clear the string buffer with zero so we do not need NULL terment it at end */ + str = buf; end = buf + cnt - 1; if (end < buf - 1) { - end = ((void *) -1); + end = ((char *) -1); cnt = end - buf + 1; } @@ -439,6 +582,49 @@ *ip = (str - buf); } continue; + + /* float number formats - set up the flags and "break" */ + case 'e': + case 'E': + case 'f': + case 'g': + case 'G': + _double = (double)va_arg(args, double); + if ( _isnan(_double) ) { + s = "Nan"; + len = 3; + while ( len > 0 ) { + if (str <= end) + *str = *s++; + ++str; + len --; + } + } else if ( _isinf(_double) < 0 ) { + s = "-Inf"; + len = 4; + while ( len > 0 ) { + if (str <= end) + *str = *s++; + ++str; + len --; + } + } else if ( _isinf(_double) > 0 ) { + s = "+Inf"; + len = 4; + while ( len > 0 ) { + if (str <= end) + *str = *s++; + ++str; + len --; + } + } else { + if ( precision == -1 ) + precision = 6; + str = numberf(str, end, (int)_double, base, field_width, precision, flags); + } + + continue; + /* integer number formats - set up the flags and "break" */ case 'o': @@ -501,8 +687,20 @@ if (str <= end) *str = '\0'; else if (cnt > 0) + { /* don't write out a null byte if the buf size is zero */ - *end = '\0'; + //*end = '\0'; + if (str-buf >cnt ) + { + *end = '\0'; + } + else + { + end++; + *end = '\0'; + } + + } return str-buf; } Modified: branches/ros-branch-0_3_0/reactos/lib/rtl/swprintf.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/rtl…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/rtl/swprintf.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/rtl/swprintf.c Thu Jun 1 05:57:31 2006 @@ -26,6 +26,42 @@ #define LEFT 16 /* left justified */ #define SPECIAL 32 /* 0x */ #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ + +typedef struct { + unsigned int mantissal:32; + unsigned int mantissah:20; + unsigned int exponent:11; + unsigned int sign:1; +} double_t; + +static +__inline +int +_isinf(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah == 0 && x.x->mantissal == 0 )); +} + +static +__inline +int +_isnan(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah != 0 || x.x->mantissal != 0 )); +} static @@ -144,6 +180,110 @@ return buf; } +static wchar_t * +numberf(wchar_t * buf, wchar_t * end, double num, int base, int size, int precision, int type) +{ + wchar_t c, sign, tmp[66]; + const wchar_t *digits; + const wchar_t *small_digits = L"0123456789abcdefghijklmnopqrstuvwxyz"; + const wchar_t *large_digits = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + int i; + long long x; + + /* FIXME + the float version of number is direcly copy of number + */ + + + digits = (type & LARGE) ? large_digits : small_digits; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return 0; + c = (type & ZEROPAD) ? L'0' : L' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = L'-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = L'+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + if (type & SPECIAL) { + if (base == 16) + size -= 2; + else if (base == 8) + size--; + } + i = 0; + if (num == 0) + tmp[i++] = L'0'; + else while (num != 0) + { + x = num; + tmp[i++] = digits[do_div(&x,base)]; + num = x; + } + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) { + while(size-->0) { + if (buf <= end) + *buf = L' '; + ++buf; + } + } + if (sign) { + if (buf <= end) + *buf = sign; + ++buf; + } + if (type & SPECIAL) { + if (base==8) { + if (buf <= end) + *buf = L'0'; + ++buf; + } else if (base==16) { + if (buf <= end) + *buf = L'0'; + ++buf; + if (buf <= end) + *buf = digits[33]; + ++buf; + } + } + if (!(type & LEFT)) { + while (size-- > 0) { + if (buf <= end) + *buf = c; + ++buf; + } + } + while (i < precision--) { + if (buf <= end) + *buf = L'0'; + ++buf; + } + while (i-- > 0) { + if (buf <= end) + *buf = tmp[i]; + ++buf; + } + while (size-- > 0) { + if (buf <= end) + *buf = L' '; + ++buf; + } + return buf; +} + static wchar_t* string(wchar_t* buf, wchar_t* end, const char* s, int len, int field_width, int precision, int flags) { @@ -245,6 +385,8 @@ wchar_t * str, * end; const char *s; const wchar_t *sw; + const wchar_t *ss; + double _double; int flags; /* flags to number() */ @@ -256,7 +398,7 @@ str = buf; end = buf + cnt - 1; if (end < buf - 1) { - end = ((void *) -1); + end = ((wchar_t *) -1); cnt = end - buf + 1; } @@ -439,6 +581,50 @@ *ip = (str - buf); } continue; + /* float number formats - set up the flags and "break" */ + case 'e': + case 'E': + case 'f': + case 'g': + case 'G': + _double = (double)va_arg(args, double); + + if ( _isnan(_double) ) { + ss = L"Nan"; + len = 3; + while ( len > 0 ) { + if (str <= end) + *str = *ss++; + ++str; + len --; + } + } else if ( _isinf(_double) < 0 ) { + ss = L"-Inf"; + len = 4; + while ( len > 0 ) { + if (str <= end) + *str = *ss++; + ++str; + len --; + } + } else if ( _isinf(_double) > 0 ) { + ss = L"+Inf"; + len = 4; + while ( len > 0 ) { + if (str <= end) + *str = *ss++; + ++str; + len --; + } + } else { + if ( precision == -1 ) + precision = 6; + str = numberf(str, end, _double, base, field_width, precision, flags); + } + + continue; + + /* integer number formats - set up the flags and "break" */ case L'o': @@ -500,9 +686,21 @@ } if (str <= end) *str = L'\0'; - else if (cnt > 0) + else if (cnt > 0) + { /* don't write out a null byte if the buf size is zero */ - *end = L'\0'; + //*end = '\0'; + if (str-buf >cnt ) + { + *end = L'\0'; + } + else + { + end++; + *end = L'\0'; + } + + } return str-buf; }
18 years, 6 months
1
0
0
0
[amunger] 22137: Merged crt and string fixes from trunk, per GreatLord. Revisions: 21936, 21937*, 21939-21941, 21963-21965, 21967, 21969-21970, 21973-21974, 21976, 21987, 22011-22013, 22019-22023, 22027, 22060-22062, 22069-22073, 22075, 22079, 22105. Fixes the calc bug and supposedly some other things. ; 0) *partial
by amunger@svn.reactos.org
Author: amunger Date: Thu Jun 1 05:03:05 2006 New Revision: 22137 URL:
http://svn.reactos.ru/svn/reactos?rev=22137&view=rev
Log: Merged crt and string fixes from trunk, per GreatLord. Revisions: 21936, 21937*, 21939-21941, 21963-21965, 21967, 21969-21970, 21973-21974, 21976, 21987, 22011-22013, 22019-22023, 22027, 22060-22062, 22069-22073, 22075, 22079, 22105. Fixes the calc bug and supposedly some other things. ;0) *partial Added: branches/ros-branch-0_3_0/reactos/lib/crt/math/s_modf.c Modified: branches/ros-branch-0_3_0/reactos/lib/crt/README.txt (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/cgets.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/cprintf.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/cputs.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/getch.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/getche.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/kbhit.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/putch.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/conio/ungetch.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/crt.rbuild branches/ros-branch-0_3_0/reactos/lib/crt/io/open.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/acos.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/adjust.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/asin.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/atan.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/atan2.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/cabs.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/ceil.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/cos.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/cosh.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/exp.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/fabs.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/floor.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/fmod.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/frexp.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/huge_val.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/hypot.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/j0_y0.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/j1_y1.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/jn_yn.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/ldexp.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/log.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/log10.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/math.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/modf.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/pow.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/sin.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/sinh.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/sqrt.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/stubs.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/tan.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/math/tanh.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/misc/environ.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/precomp.h (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdio/fgetws.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/fcvt.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/fcvtbuf.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itoa.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itow.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/putenv.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/swab.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wfulpath.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/witoa.c (contents, props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wmakpath.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wputenv.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wsenv.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wsplitp.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wtoi.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wtoi64.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wtol.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wine/cpp.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wine/cppexcept.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wine/heap.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wine/scanf.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wine/scanf.h (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wine/thread.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wine/undname.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcscoll.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcscspn.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsdup.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsicmp.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcslwr.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsnicmp.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcspbrk.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsrev.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsset.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsspn.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsstr.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcstok.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsupr.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsxfrm.c (props changed) branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wlasttok.c (props changed) branches/ros-branch-0_3_0/reactos/lib/string/itoa.c branches/ros-branch-0_3_0/reactos/lib/string/itow.c branches/ros-branch-0_3_0/reactos/lib/string/wtoi.c branches/ros-branch-0_3_0/reactos/lib/string/wtol.c Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/README.txt ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/cgets.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/conio/cprintf.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/conio/cprintf.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/conio/cprintf.c Thu Jun 1 05:03:05 2006 @@ -1,27 +1,36 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel + * COPYRIGHT: Winehq + * PROJECT: wine * FILE: msvcrt/conio/cprintf.c * PURPOSE: C Runtime - * PROGRAMMER: Eric Kohl (Imported from DJGPP) + * PROGRAMMER: Magnus Olsen (Imported from wine cvs 2006-05-23) */ #include <precomp.h> /* - * @unimplemented + * @implemented */ int _cprintf(const char *fmt, ...) { - int cnt; - char buf[ 2048 ]; /* this is buggy, because buffer might be too small. */ - va_list ap; - - va_start(ap, fmt); - cnt = vsprintf(buf, fmt, ap); - va_end(ap); - - _cputs(buf); - return cnt; + char buf[2048], *mem = buf; + int written, resize = sizeof(buf), retval; + va_list valist; + + while ((written = _vsnprintf( mem, resize, fmt, valist )) == -1 || + written > resize) + { + resize = (written == -1 ? resize * 2 : written + 1); + if (mem != buf) + free (mem); + if (!(mem = (char *)malloc(resize))) + return EOF; + va_start( valist, fmt ); + } + va_end(valist); + retval = _cputs( mem ); + if (mem != buf) + free (mem); + return retval; } Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/cprintf.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/cputs.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/conio/getch.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/conio/getch.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/conio/getch.c Thu Jun 1 05:03:05 2006 @@ -53,17 +53,3 @@ return c; } -#if 0 -/* - * @unimplemented - */ -int _getche(void) -{ - int c; - - c = _getch(); - _putch(c); - - return c; -} -#endif Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/getch.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/getche.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/kbhit.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/putch.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/conio/ungetch.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/crt.rbuild URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/crt.rbuild (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/crt.rbuild Thu Jun 1 05:03:05 2006 @@ -119,7 +119,8 @@ <file>jn_yn.c</file> <file>ldexp.c</file> <file>log10.c</file> - <file>modf.c</file> + <file>modf.c</file> + <file>s_modf.c</file> <file>pow.c</file> <file>sinh.c</file> <file>stubs.c</file> Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/io/open.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/acos.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/adjust.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/asin.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/atan.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/atan2.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/cabs.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/ceil.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/cos.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/cosh.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/exp.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/fabs.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/floor.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/fmod.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/frexp.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/huge_val.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/hypot.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/j0_y0.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/j1_y1.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/jn_yn.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/ldexp.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/log.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/log10.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/math.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/math/modf.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/math/modf.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/math/modf.c Thu Jun 1 05:03:05 2006 @@ -14,74 +14,6 @@ //static const double one = 1.0; -double modf(double __x, double *__i) -{ - union - { - double* __x; - double_t* x; - } x; - union - { - double* __i; - double_t* iptr; - } iptr; - - int j0; - unsigned int i; - - x.__x = &__x; - iptr.__i = __i; - - - j0 = x.x->exponent - 0x3ff; /* exponent of x */ - if(j0<20) { /* integer part in high x */ - if(j0<0) { /* |x|<1 */ - *__i = 0.0; - iptr.iptr->sign = x.x->sign; - return __x; - } else { - - if ( x.x->mantissah == 0 && x.x->mantissal == 0 ) { - *__i = __x; - return 0.0; - } - - i = (0x000fffff)>>j0; - iptr.iptr->sign = x.x->sign; - iptr.iptr->exponent = x.x->exponent; - iptr.iptr->mantissah = x.x->mantissah&(~i); - iptr.iptr->mantissal = 0; - if ( __x == *__i ) { - __x = 0.0; - x.x->sign = iptr.iptr->sign; - return __x; - } - return __x - *__i; - } - } else if (j0>51) { /* no fraction part */ - *__i = __x; - if ( _isnan(__x) || _isinf(__x) ) - return __x; - - __x = 0.0; - x.x->sign = iptr.iptr->sign; - return __x; - } else { /* fraction part in low x */ - - i = ((unsigned)(0xffffffff))>>(j0-20); - iptr.iptr->sign = x.x->sign; - iptr.iptr->exponent = x.x->exponent; - iptr.iptr->mantissah = x.x->mantissah; - iptr.iptr->mantissal = x.x->mantissal&(~i); - if ( __x == *__i ) { - __x = 0.0; - x.x->sign = iptr.iptr->sign; - return __x; - } - return __x - *__i; - } -} long double modfl(long double __x, long double *__i) Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/modf.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/pow.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Added: branches/ros-branch-0_3_0/reactos/lib/crt/math/s_modf.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/math/s_modf.c (added) +++ branches/ros-branch-0_3_0/reactos/lib/crt/math/s_modf.c Thu Jun 1 05:03:05 2006 @@ -1,0 +1,194 @@ + + +/* @(#)s_modf.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* +FUNCTION + <<modf>>, <<modff>>---split fractional and integer parts + +INDEX + modf +INDEX + modff + +ANSI_SYNOPSIS + #include <math.h> + double modf(double <[val]>, double *<[ipart]>); + float modff(float <[val]>, float *<[ipart]>); + +TRAD_SYNOPSIS + #include <math.h> + double modf(<[val]>, <[ipart]>) + double <[val]>; + double *<[ipart]>; + + float modff(<[val]>, <[ipart]>) + float <[val]>; + float *<[ipart]>; + +DESCRIPTION + <<modf>> splits the double <[val]> apart into an integer part + and a fractional part, returning the fractional part and + storing the integer part in <<*<[ipart]>>>. No rounding + whatsoever is done; the sum of the integer and fractional + parts is guaranteed to be exactly equal to <[val]>. That + is, if . <[realpart]> = modf(<[val]>, &<[intpart]>); then + `<<<[realpart]>+<[intpart]>>>' is the same as <[val]>. + <<modff>> is identical, save that it takes and returns + <<float>> rather than <<double>> values. + +RETURNS + The fractional part is returned. Each result has the same + sign as the supplied argument <[val]>. + +PORTABILITY + <<modf>> is ANSI C. <<modff>> is an extension. + +QUICKREF + modf ansi pure + modff - pure + +*/ + +/* + * modf(double x, double *iptr) + * return fraction part of x, and return x's integral part in *iptr. + * Method: + * Bit twiddling. + * + * Exception: + * No exception. + */ + + +static const double one = 1.0; + +#define __int32_t long +#define __uint32_t unsigned long +#define __IEEE_LITTLE_ENDIAN + +#ifdef __IEEE_BIG_ENDIAN + +typedef union +{ + struct + { + __uint32_t msw; + __uint32_t lsw; + } parts; + double value; +} ieee_double_shape_type; + +#endif + +#ifdef __IEEE_LITTLE_ENDIAN + +typedef union +{ + struct + { + __uint32_t lsw; + __uint32_t msw; + } parts; + double value; +} ieee_double_shape_type; + +#endif + + +/* Get two 32 bit ints from a double. */ + +#define EXTRACT_WORDS(ix0,ix1,d) \ +do { \ + ieee_double_shape_type ew_u; \ + ew_u.value = (d); \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ +} while (0) + +/* Get the more significant 32 bit int from a double. */ + +#define GET_HIGH_WORD(i,d) \ +do { \ + ieee_double_shape_type gh_u; \ + gh_u.value = (d); \ + (i) = gh_u.parts.msw; \ +} while (0) + +/* Get the less significant 32 bit int from a double. */ + +#define GET_LOW_WORD(i,d) \ +do { \ + ieee_double_shape_type gl_u; \ + gl_u.value = (d); \ + (i) = gl_u.parts.lsw; \ +} while (0) + +/* Set a double from two 32 bit ints. */ + +#define INSERT_WORDS(d,ix0,ix1) \ +do { \ + ieee_double_shape_type iw_u; \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ +} while (0) + + + + +double modf(double x, double *iptr) +{ + __int32_t i0,i1,j_0; + __uint32_t i; + EXTRACT_WORDS(i0,i1,x); + j_0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */ + if(j_0<20) { /* integer part in high x */ + if(j_0<0) { /* |x|<1 */ + INSERT_WORDS(*iptr,i0&0x80000000U,0); /* *iptr = +-0 */ + return x; + } else { + i = (0x000fffff)>>j_0; + if(((i0&i)|i1)==0) { /* x is integral */ + __uint32_t high; + *iptr = x; + GET_HIGH_WORD(high,x); + INSERT_WORDS(x,high&0x80000000U,0); /* return +-0 */ + return x; + } else { + INSERT_WORDS(*iptr,i0&(~i),0); + return x - *iptr; + } + } + } else if (j_0>51) { /* no fraction part */ + __uint32_t high; + *iptr = x*one; + GET_HIGH_WORD(high,x); + INSERT_WORDS(x,high&0x80000000U,0); /* return +-0 */ + return x; + } else { /* fraction part in low x */ + i = ((__uint32_t)(0xffffffffU))>>(j_0-20); + if((i1&i)==0) { /* x is integral */ + __uint32_t high; + *iptr = x; + GET_HIGH_WORD(high,x); + INSERT_WORDS(x,high&0x80000000U,0); /* return +-0 */ + return x; + } else { + INSERT_WORDS(*iptr,i0,i1&(~i)); + return x - *iptr; + } + } +} + +//#endif /* _DOUBLE_IS_32BITS */ Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/sin.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/sinh.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/sqrt.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/stubs.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/tan.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/math/tanh.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/misc/environ.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/precomp.h ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/stdio/fgetws.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/stdio/fgetws.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/stdio/fgetws.c Thu Jun 1 05:03:05 2006 @@ -32,23 +32,19 @@ wchar_t* fgetws(wchar_t* s, int n, FILE* f) { - wchar_t c = 0; - wchar_t* cs; + + int c=0; + wchar_t *cs; cs = s; - //while (--n > 0 && (c = getwc(f)) != WEOF) { - while (n > 0) { - c = getwc(f); - if (c == WEOF) - break; - n--; + while (--n>0 && (c = getwc(f)) != WEOF) + { *cs++ = c; if (c == L'\n') break; } - if (c == WEOF && cs == s) { + if (c == WEOF && cs == s) return NULL; - } *cs++ = L'\0'; return s; } Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdio/fgetws.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/fcvt.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/fcvtbuf.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/fcvtbuf.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/fcvtbuf.c Thu Jun 1 05:03:05 2006 @@ -1,61 +1,127 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <float.h> +#include <math.h> #include <malloc.h> // #include <msvcrt/locale.h> -void __ecvround (char *, char *, const char *, int *); -char *ecvtbuf (double, int, int *, int *, char *); +// replace fjgpp fcvtbuf from project
http://www.jbox.dk/sanos/source/lib/fcvt.c.html
+// with small modification's to match ReactOS arch -char * -fcvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf) +// Floating point to string conversion routines +// +// Copyright (C) 2002 Michael Ringgaard. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the project nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// + + +//#include <math.h> +#define CVTBUFSIZE 2 * DBL_MAX_10_EXP + 10 +static char *cvt(double arg, int ndigits, int *decpt, int *sign, char *buf, int eflag) { - static char INFINITY[] = "Infinity"; - char decimal = '.' /* localeconv()->decimal_point[0] */; - int digits = ndigits >= 0 ? ndigits : 0; - char *cvtbuf = (char *)_alloca (2*DBL_MAX_10_EXP + 16); - char *s = cvtbuf; - char *dot; + int r2; + double fi, fj; + char *p, *p1; - sprintf (cvtbuf, "%-+#.*f", DBL_MAX_10_EXP + digits + 1, value); + if (ndigits < 0) ndigits = 0; + if (ndigits >= CVTBUFSIZE - 1) ndigits = CVTBUFSIZE - 2; + r2 = 0; + *sign = 0; + p = &buf[0]; + if (arg < 0) + { + *sign = 1; + arg = -arg; + } + arg = modf(arg, &fi); + p1 = &buf[CVTBUFSIZE]; - /* The sign. */ - if (*s++ == '-') - *sign = 1; - else - *sign = 0; + if (fi != 0) + { + p1 = &buf[CVTBUFSIZE]; + while (fi != 0) + { + fj = modf(fi / 10, &fi); + *--p1 = (int)((fj + .03) * 10) + '0'; + r2++; + } + while (p1 < &buf[CVTBUFSIZE]) *p++ = *p1++; + } + else if (arg > 0) + { + while ((fj = arg * 10) < 1) + { + arg = fj; + r2--; + } + } + p1 = &buf[ndigits]; + if (eflag == 0) p1 += r2; + *decpt = r2; + if (p1 < &buf[0]) + { + buf[0] = '\0'; + return buf; + } + while (p <= p1 && p < &buf[CVTBUFSIZE]) + { + arg *= 10; + arg = modf(arg, &fj); + *p++ = (int) fj + '0'; + } + if (p1 >= &buf[CVTBUFSIZE]) + { + buf[CVTBUFSIZE - 1] = '\0'; + return buf; + } + p = p1; + *p1 += 5; + while (*p1 > '9') + { + *p1 = '0'; + if (p1 > buf) + ++*--p1; + else + { + *p1 = '1'; + (*decpt)++; + if (eflag == 0) + { + if (p > buf) *p = '0'; + p++; + } + } + } + *p = '\0'; + return buf; +} - /* Where's the decimal point? */ - dot = strchr (s, decimal); - *decpt = dot ? dot - s : (int)strlen (s); - - /* SunOS docs says if NDIGITS is 8 or more, produce "Infinity" - instead of "Inf". */ - if (strncmp (s, "Inf", 3) == 0) - { - memcpy (buf, INFINITY, ndigits >= 8 ? 9 : 3); - if (ndigits < 8) - buf[3] = '\0'; - return buf; - } - else if (ndigits < 0) - return ecvtbuf (value, *decpt + ndigits, decpt, sign, buf); - else if (*s == '0' && value != 0.0) - return ecvtbuf (value, ndigits, decpt, sign, buf); - else - { - memcpy (buf, s, *decpt); - if (s[*decpt] == decimal) - { - memcpy (buf + *decpt, s + *decpt + 1, ndigits); - buf[*decpt + ndigits] = '\0'; - } - else - buf[*decpt] = '\0'; - __ecvround (buf, buf + *decpt + ndigits - 1, - s + *decpt + ndigits + 1, decpt); - return buf; - } +char *fcvtbuf(double arg, int ndigits, int *decpt, int *sign, char *buf) +{ + return cvt(arg, ndigits, decpt, sign, buf, 0); } Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/fcvtbuf.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itoa.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itoa.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itoa.c Thu Jun 1 05:03:05 2006 @@ -104,37 +104,32 @@ /* * @implemented + * copy it from wine 0.9.0 with small modifcations do check for NULL */ -char* _ultoa(unsigned long value, char* string, int radix) +char* ultoa(unsigned long value, char* string, int radix) { - char tmp[33]; - char* tp = tmp; - long i; - unsigned long v = value; - char* sp; + char buffer[33]; + char *pos; + int digit; + + pos = &buffer[32]; + *pos = '\0'; - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } + if (string == NULL) + { + return NULL; + } + + do { + digit = value % radix; + value = value / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (value != 0L); - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char*)malloc((tp-tmp)+1); - sp = string; - - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + memcpy(string, pos, &buffer[32] - pos + 1); + return string; } Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itoa.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itow.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itow.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itow.c Thu Jun 1 05:03:05 2006 @@ -16,138 +16,81 @@ /* * @implemented + * from wine cvs 2006-05-21 */ wchar_t* _itow(int value, wchar_t* string, int radix) { - wchar_t tmp [33]; - wchar_t * tp = tmp; - int i; - unsigned int v; - int sign; - wchar_t * sp; + return _ltow(value, string, radix); +} - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } +/* + * @implemented + * from wine cvs 2006-05-21 + */ +wchar_t* _ltow(long value, wchar_t* string, int radix) +{ + unsigned long val; + int negative; + WCHAR buffer[33]; + PWCHAR pos; + WCHAR digit; - sign = ((radix == 10) && (value < 0)); - if (sign) { - v = -value; + if (value < 0 && radix == 10) { + negative = 1; + val = -value; } else { - v = (unsigned) value; - } - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) { - *tp++ = i+ (wchar_t) '0'; - } else { - *tp++ = i + (wchar_t) 'a' - 10; - } - } + negative = 0; + val = value; + } /* if */ - if (string == 0) { - string = (wchar_t*) malloc((tp-tmp) + (sign + 1) * sizeof(wchar_t)); - } - sp = string; + pos = &buffer[32]; + *pos = '\0'; - if (sign) { - *sp++ = (wchar_t) '-'; - } - while (tp > tmp) { - *sp++ = *--tp; - } - *sp = (wchar_t) 0; + do { + digit = val % radix; + val = val / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (val != 0L); + + if (negative) { + *--pos = '-'; + } /* if */ + + if (str != NULL) { + memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR)); + } /* if */ return string; } /* * @implemented - */ -wchar_t* _ltow(long value, wchar_t* string, int radix) -{ - wchar_t tmp [33]; - wchar_t* tp = tmp; - long int i; - unsigned long int v; - int sign; - wchar_t* sp; - - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - - sign = ((radix == 10) && (value < 0)); - if (sign) { - v = -value; - } else { - v = (unsigned long) value; - } - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) { - *tp++ = i + (wchar_t) '0'; - } else { - *tp++ = i + (wchar_t) 'a' - 10; - } - } - - if (string == 0) { - string = (wchar_t*) malloc((tp - tmp) + (sign + 1) * sizeof(wchar_t)); - } - sp = string; - - if (sign) { - *sp++ = (wchar_t) '-'; - } - while (tp > tmp) { - *sp++ = *--tp; - } - *sp = (wchar_t) 0; - return string; -} - -/* - * @unimplemented + * from wine cvs 2006-05-21 */ wchar_t* _ultow(unsigned long value, wchar_t* string, int radix) { - wchar_t tmp [33]; - wchar_t* tp = tmp; - long int i; - unsigned long int v = value; - wchar_t* sp; + WCHAR buffer[33]; + PWCHAR pos; + WCHAR digit; - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) { - *tp++ = i + (wchar_t) '0'; - } else { - *tp++ = i + (wchar_t) 'a' - 10; - } - } + pos = &buffer[32]; + *pos = '\0'; - if (string == 0) { -#ifdef _MSVCRT_LIB_ // TODO: check on difference? - string = (wchar_t*)malloc(((tp-tmp)+1)*sizeof(wchar_t)); -#else // TODO: FIXME: review which is correct - string = (wchar_t*)malloc((tp - tmp) + sizeof(wchar_t)); -#endif /*_MSVCRT_LIB_*/ - } - sp = string; + do { + digit = value % radix; + value = value / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (value != 0L); - while (tp > tmp) { - *sp++ = *--tp; - } - *sp = (wchar_t) 0; + if (string != NULL) { + memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR)); + } /* if */ return string; } Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/itow.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/putenv.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/swab.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/swab.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/swab.c Thu Jun 1 05:03:05 2006 @@ -12,17 +12,23 @@ /* * @implemented + * + * copy this swab from wine cvs 2006-05-24 */ -void _swab (const char* caFrom, char* caTo, size_t sizeToCopy) +void _swab (const char * src, char * dst, size_t sizeToCopy + ) + { - if (sizeToCopy > 1) + if (sizeToCopy > 1) { - sizeToCopy = sizeToCopy >> 1; + sizeToCopy = (unsigned)sizeToCopy >> 1; while (sizeToCopy--) { - *caTo++ = caFrom[1]; - *caTo++ = *caFrom++; - caFrom++; + char s0 = src[0]; + char s1 = src[1]; + *dst++ = s1; + *dst++ = s0; + src = src + 2; } } } Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/swab.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wfulpath.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/witoa.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/crt…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/witoa.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/witoa.c Thu Jun 1 05:03:05 2006 @@ -7,88 +7,75 @@ * UPDATE HISTORY: * 1995: Created * 1998: Added ltoa Boudewijn Dekker + * 2006 : replace all api in this file to wine cvs 2006-05-21 */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* */ #include <precomp.h> /* * @implemented + * copy _i64toa from wine cvs 2006 month 05 day 21 */ char* _i64toa(__int64 value, char* string, int radix) { - char tmp[65]; - char *tp = tmp; - int i; - unsigned v; - int sign; - char *sp; + ULONGLONG val; + int negative; + char buffer[65]; + char *pos; + int digit; - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } + if (value < 0 && radix == 10) { + negative = 1; + val = -value; + } else { + negative = 0; + val = value; + } /* if */ - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } + pos = &buffer[64]; + *pos = '\0'; - if (string == 0) - string = (char *)malloc((tp-tmp)+sign+1); - sp = string; + do { + digit = val % radix; + val = val / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (val != 0L); - if (sign) - *sp++ = '-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + if (negative) { + *--pos = '-'; + } /* if */ + + memcpy(string, pos, &buffer[64] - pos + 1); + return string; } + /* * @implemented */ char* _ui64toa(unsigned __int64 value, char* string, int radix) { - char tmp[65]; - char *tp = tmp; - long i; - unsigned long v = value; - char *sp; + char buffer[65]; + char *pos; + int digit; - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } + pos = &buffer[64]; + *pos = '\0'; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } + do { + digit = value % radix; + value = value / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (value != 0L); - if (string == 0) - string = (char *)malloc((tp-tmp)+1); - sp = string; - - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + memcpy(string, pos, &buffer[64] - pos + 1); + return string; } Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/witoa.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wmakpath.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wputenv.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wsenv.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wsplitp.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wtoi.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wtoi64.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/stdlib/wtol.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wine/cpp.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wine/cppexcept.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wine/heap.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wine/scanf.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wine/scanf.h ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wine/thread.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wine/undname.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcscoll.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcscspn.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsdup.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsicmp.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcslwr.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsnicmp.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcspbrk.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsrev.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsset.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsspn.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsstr.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcstok.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsupr.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wcsxfrm.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: branches/ros-branch-0_3_0/reactos/lib/crt/wstring/wlasttok.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: branches/ros-branch-0_3_0/reactos/lib/string/itoa.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/str…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/string/itoa.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/string/itoa.c Thu Jun 1 05:03:05 2006 @@ -1,82 +1,76 @@ #include <string.h> #include <stdlib.h> +#include <windows.h> /* * @implemented + * copy _i64toa from wine cvs 2006 month 05 day 21 */ char * _i64toa(__int64 value, char *string, int radix) { - char tmp[65]; - char *tp = tmp; - __int64 i; - unsigned __int64 v; - __int64 sign; - char *sp; + ULONGLONG val; + int negative; + char buffer[65]; + char *pos; + int digit; - if (radix > 36 || radix <= 1) - { - return 0; - } + if (value < 0 && radix == 10) { + negative = 1; + val = -value; + } else { + negative = 0; + val = value; + } /* if */ - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned __int64)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } + pos = &buffer[64]; + *pos = '\0'; - sp = string; - if (sign) - *sp++ = '-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + do { + digit = val % radix; + val = val / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (val != 0L); + + if (negative) { + *--pos = '-'; + } /* if */ + + memcpy(string, pos, &buffer[64] - pos + 1); + return string; } /* * @implemented + * copy _i64toa from wine cvs 2006 month 05 day 21 */ char * _ui64toa(unsigned __int64 value, char *string, int radix) { - char tmp[65]; - char *tp = tmp; - __int64 i; - unsigned __int64 v; - char *sp; + char buffer[65]; + char *pos; + int digit; - if (radix > 36 || radix <= 1) - { - return 0; - } + pos = &buffer[64]; + *pos = '\0'; - v = (unsigned __int64)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } + do { + digit = value % radix; + value = value / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (value != 0L); - sp = string; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + memcpy(string, pos, &buffer[64] - pos + 1); + return string; } @@ -133,35 +127,35 @@ /* - * @implemented + * @implemented + * copy it from wine 0.9.0 with small modifcations do check for NULL */ char * _ultoa(unsigned long value, char *string, int radix) { - char tmp[33]; - char *tp = tmp; - long i; - unsigned long v = value; - char *sp; + char buffer[33]; + char *pos; + int digit; + + pos = &buffer[32]; + *pos = '\0'; - if (radix > 36 || radix <= 1) - { - return 0; - } + if (string == NULL) + { + return NULL; + } + + do { + digit = value % radix; + value = value / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (value != 0L); - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - sp = string; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + memcpy(string, pos, &buffer[32] - pos + 1); + + return string; } Modified: branches/ros-branch-0_3_0/reactos/lib/string/itow.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/str…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/string/itow.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/string/itow.c Thu Jun 1 05:03:05 2006 @@ -1,45 +1,48 @@ #include <string.h> +#include <windows.h> /* * @implemented + * from wine cvs 2006-05-21 */ wchar_t * _i64tow(__int64 value, wchar_t *string, int radix) { - wchar_t tmp[65]; - wchar_t *tp = tmp; - __int64 i; - unsigned __int64 v; - __int64 sign; - wchar_t *sp; + ULONGLONG val; + int negative; + WCHAR buffer[65]; + PWCHAR pos; + WCHAR digit; - if (radix > 36 || radix <= 1) - { - return 0; - } + if (value < 0 && radix == 10) { + negative = 1; + val = -value; + } else { + negative = 0; + val = value; + } /* if */ - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned __int64)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } + pos = &buffer[64]; + *pos = '\0'; - sp = string; - if (sign) - *sp++ = L'-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + do { + digit = val % radix; + val = val / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (val != 0L); + + if (negative) { + *--pos = '-'; + } /* if */ + + if (string != NULL) { + memcpy(string, pos, (&buffer[64] - pos + 1) * sizeof(WCHAR)); + } /* if */ + return string; } @@ -49,152 +52,112 @@ wchar_t * _ui64tow(unsigned __int64 value, wchar_t *string, int radix) { - wchar_t tmp[65]; - wchar_t *tp = tmp; - __int64 i; - unsigned __int64 v; - wchar_t *sp; + WCHAR buffer[65]; + PWCHAR pos; + WCHAR digit; - if (radix > 36 || radix <= 1) - { - return 0; - } + pos = &buffer[64]; + *pos = '\0'; - v = (unsigned __int64)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } + do { + digit = value % radix; + value = value / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (value != 0L); - sp = string; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + if (string != NULL) { + memcpy(string, pos, (&buffer[64] - pos + 1) * sizeof(WCHAR)); + } /* if */ + return string; } /* * @implemented + * from wine cvs 2006-05-21 */ wchar_t * _itow(int value, wchar_t *string, int radix) { - wchar_t tmp[33]; - wchar_t *tp = tmp; - int i; - unsigned v; - int sign; - wchar_t *sp; - - if (radix > 36 || radix <= 1) - { - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } - - sp = string; - if (sign) - *sp++ = L'-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + return _ltow(value, string, radix); } /* * @implemented + * from wine cvs 2006-05-21 */ wchar_t * _ltow(long value, wchar_t *string, int radix) { - wchar_t tmp[33]; - wchar_t *tp = tmp; - long i; - unsigned long v; - int sign; - wchar_t *sp; + unsigned long val; + int negative; + WCHAR buffer[33]; + PWCHAR pos; + WCHAR digit; - if (radix > 36 || radix <= 1) - { - return 0; - } + if (value < 0 && radix == 10) { + negative = 1; + val = -value; + } else { + negative = 0; + val = value; + } /* if */ - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned long)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } + pos = &buffer[32]; + *pos = '\0'; - sp = string; - if (sign) - *sp++ = L'-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + do { + digit = val % radix; + val = val / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (val != 0L); + + if (negative) { + *--pos = '-'; + } /* if */ + + if (string != NULL) { + memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR)); + } /* if */ + return string; } /* * @implemented + * from wine cvs 2006-05-21 */ wchar_t * _ultow(unsigned long value, wchar_t *string, int radix) { - wchar_t tmp[33]; - wchar_t *tp = tmp; - long i; - unsigned long v = value; - wchar_t *sp; + WCHAR buffer[33]; + PWCHAR pos; + WCHAR digit; - if (radix > 36 || radix <= 1) - { - return 0; - } + pos = &buffer[32]; + *pos = '\0'; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } + do { + digit = value % radix; + value = value / radix; + if (digit < 10) { + *--pos = '0' + digit; + } else { + *--pos = 'a' + digit - 10; + } /* if */ + } while (value != 0L); - sp = string; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; + if (string != NULL) { + memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR)); + } /* if */ + return string; } Modified: branches/ros-branch-0_3_0/reactos/lib/string/wtoi.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/str…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/string/wtoi.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/string/wtoi.c Thu Jun 1 05:03:05 2006 @@ -3,9 +3,10 @@ /* * @implemented + * copy _i64toa from wine cvs 2006 month 05 day 21 */ int _wtoi(const wchar_t *str) { - return (int)wcstol(str, 0, 10); + return _wtol(str); } Modified: branches/ros-branch-0_3_0/reactos/lib/string/wtol.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/str…
============================================================================== --- branches/ros-branch-0_3_0/reactos/lib/string/wtol.c (original) +++ branches/ros-branch-0_3_0/reactos/lib/string/wtol.c Thu Jun 1 05:03:05 2006 @@ -1,5 +1,6 @@ #include <string.h> #include <stdlib.h> +#include <windows.h> /* * @implemented @@ -7,5 +8,26 @@ long _wtol(const wchar_t *str) { - return wcstol(str, 0, 10); + ULONG RunningTotal = 0; + char bMinus = 0; + + while (iswctype(*str, _SPACE) ) { + str++; + } /* while */ + + if (*str == L'+') { + str++; + } else if (*str == L'-') { + bMinus = 1; + str++; + } /* if */ + + while (*str >= L'0' && *str <= L'9') { + RunningTotal = RunningTotal * 10 + *str - L'0'; + str++; + } /* while */ + + return bMinus ? -RunningTotal : RunningTotal; } + +
18 years, 6 months
1
0
0
0
← Newer
1
...
57
58
59
60
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
Results per page:
10
25
50
100
200