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
October 2011
----- 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
18 participants
369 discussions
Start a n
N
ew thread
[akhaldi] 53920: [ROSAPPS/SCREENSAVERS] * Add a new Starfield screensaver. By Carlo Bramini (carlo DOT bramix AT libero DOT it). * Adapted the build system files to get it to compile with current t...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Oct 1 21:28:47 2011 New Revision: 53920 URL:
http://svn.reactos.org/svn/reactos?rev=53920&view=rev
Log: [ROSAPPS/SCREENSAVERS] * Add a new Starfield screensaver. By Carlo Bramini (carlo DOT bramix AT libero DOT it). * Adapted the build system files to get it to compile with current trunk. See issue #6270 for more details. Added: trunk/rosapps/applications/screensavers/ssstars/ (with props) trunk/rosapps/applications/screensavers/ssstars/CMakeLists.txt (with props) trunk/rosapps/applications/screensavers/ssstars/lang/ (with props) trunk/rosapps/applications/screensavers/ssstars/lang/en-US.rc (with props) trunk/rosapps/applications/screensavers/ssstars/lang/it-IT.rc (with props) trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc (with props) trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc (with props) trunk/rosapps/applications/screensavers/ssstars/makefile (with props) trunk/rosapps/applications/screensavers/ssstars/res/ (with props) trunk/rosapps/applications/screensavers/ssstars/res/cosmicfractal.bmp (with props) trunk/rosapps/applications/screensavers/ssstars/res/icon_stars.ico (with props) trunk/rosapps/applications/screensavers/ssstars/res/star.bmp (with props) trunk/rosapps/applications/screensavers/ssstars/resource.h (with props) trunk/rosapps/applications/screensavers/ssstars/resource.rc (with props) trunk/rosapps/applications/screensavers/ssstars/settings.c (with props) trunk/rosapps/applications/screensavers/ssstars/settings.h (with props) trunk/rosapps/applications/screensavers/ssstars/ssstars.c (with props) trunk/rosapps/applications/screensavers/ssstars/ssstars.rbuild (with props) Propchange: trunk/rosapps/applications/screensavers/ssstars/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Sat Oct 1 21:28:47 2011 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rosapps/applications/screensavers/ssstars/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rosapps/applications/screensavers/ssstars/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/rosapps/applications/screensavers/ssstars/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/CMakeLists.txt (added) +++ trunk/rosapps/applications/screensavers/ssstars/CMakeLists.txt [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,15 @@ + +set_rc_compiler() + +add_executable(ssstars + ssstars.c + settings.c + resource.rc) + +set_module_type(ssstars win32gui UNICODE) +set_target_properties(ssstars PROPERTIES SUFFIX ".scr") + +target_link_libraries(ssstars scrnsave) +add_importlibs(ssstars user32 gdi32 opengl32 glu32 advapi32 comctl32 shell32 msvcrt kernel32) + +add_cd_file(TARGET ssstars DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/screensavers/ssstars/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rosapps/applications/screensavers/ssstars/lang/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Sat Oct 1 21:28:47 2011 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rosapps/applications/screensavers/ssstars/lang/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rosapps/applications/screensavers/ssstars/lang/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/rosapps/applications/screensavers/ssstars/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/lang/en-US.rc (added) +++ trunk/rosapps/applications/screensavers/ssstars/lang/en-US.rc [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,52 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +// Dialog + +DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 292, 282 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Settings" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Options",IDC_STATIC,16,100,260,76 + RTEXT "Number of stars:",IDC_STATIC,24,116,68,12, + SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_NUM_OF_STARS,"msctls_trackbar32", + TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,96,116,140,12 + CTEXT "Static",IDC_TEXT_NUM_OF_STARS,240,116,24,12, + SS_CENTERIMAGE,WS_EX_STATICEDGE + RTEXT "Speed:",IDC_STATIC,24,137,68,12,SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_SPEED,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,96,137,140,12 + CTEXT "Static",IDC_TEXT_SPEED,240,137,24,12,SS_CENTERIMAGE, + WS_EX_STATICEDGE + RTEXT "Rotation:",IDC_STATIC,24,156,68,12,SS_CENTERIMAGE + COMBOBOX IDC_COMBO_ROTATION,100,156,80,60,CBS_DROPDOWNLIST | + WS_TABSTOP + CONTROL "",IDC_IMAGE_COSMOS,"Static",SS_BITMAP | SS_CENTERIMAGE, + 4,4,284,92 + GROUPBOX "Advanced",IDC_STATIC,16,180,260,72 + CONTROL "Enable background blending",IDC_CHECK_DOBLENDING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,196,110,10 + CONTROL "Enable accurate perspective correction", + IDC_CHECK_PERSPECTIVE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,24,208,142,10 + CONTROL "Enable texture filtering",IDC_CHECK_FILTERING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,220,90,10 + CONTROL "Enable smooth shading",IDC_CHECK_SHADING,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,24,232,100,10 + PUSHBUTTON "OK",IDOK,60,260,52,16 + PUSHBUTTON "Cancel",IDCANCEL,120,260,52,16 + PUSHBUTTON "About",IDC_BUTTON_ABOUT,179,260,52,16 +END + +// String Tables + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Starfield" + IDS_ROTATION_NONE "None" + IDS_ROTATION_LINEAR "Linear" + IDS_ROTATION_PERIODIC "Periodic" + IDS_LICENSE "Starfield is free software released under GNU GPL license." + IDS_AUTHOR "Written by Carlo Bramini" +END Propchange: trunk/rosapps/applications/screensavers/ssstars/lang/en-US.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/lang/it-IT.rc (added) +++ trunk/rosapps/applications/screensavers/ssstars/lang/it-IT.rc [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,52 @@ +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +// Dialog + +DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 292, 282 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Impostazioni" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Opzioni",IDC_STATIC,16,100,260,76 + RTEXT "Numero di stelle:",IDC_STATIC,24,116,68,12, + SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_NUM_OF_STARS,"msctls_trackbar32", + TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,96,116,140,12 + CTEXT "Static",IDC_TEXT_NUM_OF_STARS,240,116,24,12, + SS_CENTERIMAGE,WS_EX_STATICEDGE + RTEXT "Velocità:",IDC_STATIC,24,137,68,12,SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_SPEED,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,96,137,140,12 + CTEXT "Static",IDC_TEXT_SPEED,240,137,24,12,SS_CENTERIMAGE, + WS_EX_STATICEDGE + RTEXT "Rotazione:",IDC_STATIC,24,156,68,12,SS_CENTERIMAGE + COMBOBOX IDC_COMBO_ROTATION,100,156,80,60,CBS_DROPDOWNLIST | + WS_TABSTOP + CONTROL "",IDC_IMAGE_COSMOS,"Static",SS_BITMAP | SS_CENTERIMAGE, + 4,4,284,92 + GROUPBOX "Avanzate",IDC_STATIC,16,180,260,72 + CONTROL "Attiva blending sullo sfondo",IDC_CHECK_DOBLENDING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,196,102,10 + CONTROL "Attiva correzione prospettica accurata", + IDC_CHECK_PERSPECTIVE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,24,208,135,10 + CONTROL "Attiva filtraggio delle texture",IDC_CHECK_FILTERING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,220,110,10 + CONTROL "Attiva illuminazione accurata",IDC_CHECK_SHADING,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,24,232,110,10 + PUSHBUTTON "OK",IDOK,60,260,52,16 + PUSHBUTTON "Annulla",IDCANCEL,120,260,52,16 + PUSHBUTTON "Info",IDC_BUTTON_ABOUT,179,260,52,16 +END + +// String Tables + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Campo stellare" + IDS_ROTATION_NONE "Nessuna" + IDS_ROTATION_LINEAR "Lineare" + IDS_ROTATION_PERIODIC "Periodica" + IDS_LICENSE "Campo stellare e` software libero rilasciato sotto licenza GNU GPL." + IDS_AUTHOR "Scritto da Carlo Bramini" +END Propchange: trunk/rosapps/applications/screensavers/ssstars/lang/it-IT.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc (added) +++ trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,52 @@ +LANGUAGE LANG_POLISH, SUBLANG_NEUTRAL + +// Dialog + +DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 292, 282 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Ustawienia" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Opcje",IDC_STATIC,16,100,260,76 + RTEXT "Liczba gwiazd:",IDC_STATIC,24,116,68,12, + SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_NUM_OF_STARS,"msctls_trackbar32", + TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,96,116,140,12 + CTEXT "Static",IDC_TEXT_NUM_OF_STARS,240,116,24,12, + SS_CENTERIMAGE,WS_EX_STATICEDGE + RTEXT "SzybkoÅÄ:",IDC_STATIC,24,137,68,12,SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_SPEED,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,96,137,140,12 + CTEXT "Static",IDC_TEXT_SPEED,240,137,24,12,SS_CENTERIMAGE, + WS_EX_STATICEDGE + RTEXT "Obroty:",IDC_STATIC,24,156,68,12,SS_CENTERIMAGE + COMBOBOX IDC_COMBO_ROTATION,100,156,80,60,CBS_DROPDOWNLIST | + WS_TABSTOP + CONTROL "",IDC_IMAGE_COSMOS,"Static",SS_BITMAP | SS_CENTERIMAGE, + 4,4,284,92 + GROUPBOX "Advanced",IDC_STATIC,16,180,260,72 + CONTROL "Enable background blending",IDC_CHECK_DOBLENDING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,196,110,10 + CONTROL "Enable accurate perspective correction", + IDC_CHECK_PERSPECTIVE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,24,208,142,10 + CONTROL "Enable texture filtering",IDC_CHECK_FILTERING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,220,90,10 + CONTROL "Enable smooth shading",IDC_CHECK_SHADING,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,24,232,100,10 + PUSHBUTTON "OK",IDOK,60,260,52,16 + PUSHBUTTON "Anuluj",IDCANCEL,120,260,52,16 + PUSHBUTTON "O wygaszaczu",IDC_BUTTON_ABOUT,179,260,52,16 +END + +// String Tables + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Gwiezdne pole" + IDS_ROTATION_NONE "brak" + IDS_ROTATION_LINEAR "Liniowo" + IDS_ROTATION_PERIODIC "Okresowo" + IDS_LICENSE "Gwiezdne pole to darmowe oprogramowanie wydane na licencji GNU GPL." + IDS_AUTHOR "Napisane przez Carlo Bramini" +END Propchange: trunk/rosapps/applications/screensavers/ssstars/lang/pl-PL.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc (added) +++ trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,52 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_NEUTRAL + +// Dialog + +DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 292, 282 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Ïàðàìåòðû çàñòàâêè" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Íàñòðîéêè",IDC_STATIC,16,100,260,76 + RTEXT "Êîëè÷åñòâî çâ¸çä:",IDC_STATIC,24,116,68,12, + SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_NUM_OF_STARS,"msctls_trackbar32", + TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,96,116,140,12 + CTEXT "Static",IDC_TEXT_NUM_OF_STARS,240,116,24,12, + SS_CENTERIMAGE,WS_EX_STATICEDGE + RTEXT "Ñêîðîñòü:",IDC_STATIC,24,137,68,12,SS_CENTERIMAGE + CONTROL "Slider1",IDC_SLIDER_SPEED,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,96,137,140,12 + CTEXT "Static",IDC_TEXT_SPEED,240,137,24,12,SS_CENTERIMAGE, + WS_EX_STATICEDGE + RTEXT "Âðàùåíèå:",IDC_STATIC,24,156,68,12,SS_CENTERIMAGE + COMBOBOX IDC_COMBO_ROTATION,100,156,80,60,CBS_DROPDOWNLIST | + WS_TABSTOP + CONTROL "",IDC_IMAGE_COSMOS,"Static",SS_BITMAP | SS_CENTERIMAGE, + 4,4,284,92 + GROUPBOX "Advanced",IDC_STATIC,16,180,260,72 + CONTROL "Enable background blending",IDC_CHECK_DOBLENDING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,196,110,10 + CONTROL "Enable accurate perspective correction", + IDC_CHECK_PERSPECTIVE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,24,208,142,10 + CONTROL "Enable texture filtering",IDC_CHECK_FILTERING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,220,90,10 + CONTROL "Enable smooth shading",IDC_CHECK_SHADING,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,24,232,100,10 + PUSHBUTTON "OK",IDOK,60,260,52,16 + PUSHBUTTON "Îòìåíà",IDCANCEL,120,260,52,16 + PUSHBUTTON "Î ïðîãðàììå",IDC_BUTTON_ABOUT,179,260,52,16 +END + +// String Tables + +STRINGTABLE DISCARDABLE +BEGIN + IDS_DESCRIPTION "Çâ¸çäíîå ïîëå" + IDS_ROTATION_NONE "Îòñóòñòâóåò" + IDS_ROTATION_LINEAR "Ëèíåéíîå" + IDS_ROTATION_PERIODIC "Ïåðèîäè÷åñêîå" + IDS_LICENSE "Çâ¸çäíîå ïîëå - ýòî ñâîáîäíîå ÏÎ, ðàñïðîñòðàíÿåìîå ïîä ëèöåíçèåé GNU GPL." + IDS_AUTHOR "Çàñòàâêó ñîçäàë Carlo Bramini" +END Propchange: trunk/rosapps/applications/screensavers/ssstars/lang/ru-RU.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/makefile URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/makefile (added) +++ trunk/rosapps/applications/screensavers/ssstars/makefile [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,79 @@ +# Makefile for Starfield screensaver +# +# syntax: +# make <platform> <unicode> +# +# parameters: +# <platform> +# x68_64=1 : compile for x86_64 +# undefined: use default tools (typically IA_32) +# <unicode> +# unicode=1: compile as UNICODE application +# undefined: compile as ASCII application + +# Makefile for Starfield screensaver + +# Default tools +TOOL_PREFIX= + +ifdef x86-64 +TOOL_PREFIX=x86_64-pc-mingw32- +endif + +CPP = $(TOOL_PREFIX)g++.exe +CC = $(TOOL_PREFIX)gcc.exe +WINDRES = $(TOOL_PREFIX)windres.exe + +# Define some variables +INCLUDE = +DEBUG = -Wall +OPTIMIZE = -O2 -fomit-frame-pointer + +ifdef x86-64 +# nothing here +else +OPTIMIZE+= -mpreferred-stack-boundary=2 +endif + +# Strip, typical mingw flag, help library +LIBS = -lopengl32 -lglu32 -lscrnsave -lcomctl32 -s -mwindows + +# Base files +FILES = stars settings + +# Check the UNICODE support +ifeq ($(unicode), 1) +UNICODE=u +DEFS += -DUNICODE -D_UNICODE +else +UNICODE=a +endif + +CFLAGS = $(DEFS) $(INCLUDE) $(DEBUG) $(OPTIMIZE) + +DIR_OBJECTS = obj/$(TOOL_PREFIX)$(UNICODE)/ + +# target file name +TARGET = $(DIR_OBJECTS)ssstars.scr + +OBJS= $(addprefix $(DIR_OBJECTS), $(addsuffix .o, $(FILES))) +RES = $(DIR_OBJECTS)resource.res + +.PHONY: all all-before all-after clean clean-custom + +all: all-before $(TARGET) all-after + +clean: clean-custom + $(RM) $(OBJ) $(TARGET) + +$(TARGET): $(OBJS) $(RES) + $(CC) $^ -o $@ $(LIBS) + +$(DIR_OBJECTS)%.o: %.c $(DIR_OBJECTS) + $(CC) -c $< -o $@ $(CFLAGS) + +$(RES): resource.rc + $(WINDRES) -i $< --input-format=rc -o $@ -O coff + +$(DIR_OBJECTS): + -mkdir $@ Propchange: trunk/rosapps/applications/screensavers/ssstars/makefile ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rosapps/applications/screensavers/ssstars/res/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Sat Oct 1 21:28:47 2011 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rosapps/applications/screensavers/ssstars/res/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rosapps/applications/screensavers/ssstars/res/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/rosapps/applications/screensavers/ssstars/res/cosmicfractal.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== Binary file - no diff available. Propchange: trunk/rosapps/applications/screensavers/ssstars/res/cosmicfractal.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/rosapps/applications/screensavers/ssstars/res/icon_stars.ico URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== Binary file - no diff available. Propchange: trunk/rosapps/applications/screensavers/ssstars/res/icon_stars.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/rosapps/applications/screensavers/ssstars/res/star.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== Binary file - no diff available. Propchange: trunk/rosapps/applications/screensavers/ssstars/res/star.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/rosapps/applications/screensavers/ssstars/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/resource.h (added) +++ trunk/rosapps/applications/screensavers/ssstars/resource.h [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,25 @@ +#define IDS_DESCRIPTION 1 +#define IDS_ROTATION_NONE 2 +#define IDS_ROTATION_LINEAR 3 +#define IDS_ROTATION_PERIODIC 4 + +#define IDS_LICENSE 5 +#define IDS_AUTHOR 6 + +#define IDI_STARFIELD 101 + +#define IDB_COSMOS 102 +#define IDB_STAR 103 + +#define IDC_SLIDER_NUM_OF_STARS 1000 +#define IDC_SLIDER_SPEED 1001 +#define IDC_TEXT_NUM_OF_STARS 1002 +#define IDC_TEXT_SPEED 1003 +#define IDC_COMBO_ROTATION 1004 +#define IDC_IMAGE_COSMOS 1005 +#define IDC_BUTTON_ABOUT 1006 + +#define IDC_CHECK_DOBLENDING 1007 +#define IDC_CHECK_PERSPECTIVE 1008 +#define IDC_CHECK_FILTERING 1009 +#define IDC_CHECK_SHADING 1010 Propchange: trunk/rosapps/applications/screensavers/ssstars/resource.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/resource.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/resource.rc (added) +++ trunk/rosapps/applications/screensavers/ssstars/resource.rc [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,55 @@ +/* + * ReactOS Starfield (global resource file) + * + * Copyright 2011, Carlo Bramini + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <windows.h> +#include <scrnsave.h> + +#include "resource.h" + +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif + +#ifndef DS_SHELLFONT +#define DS_SHELLFONT DS_SETFONT|DS_FIXEDSYS +#endif + +// Common resources + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +// Icons +IDI_STARFIELD ICON DISCARDABLE "res/icon_stars.ico" + +// Bitmap + +IDB_COSMOS BITMAP DISCARDABLE "res/cosmicfractal.bmp" +IDB_STAR BITMAP DISCARDABLE "res/star.bmp" + + +// Language resources +#include "lang/en-US.rc" +#include "lang/it-IT.rc" +#include "lang/ru-RU.rc" + +// UTF-8 +#pragma code_page(65001) + +#include "lang/pl-PL.rc" Propchange: trunk/rosapps/applications/screensavers/ssstars/resource.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/settings.c (added) +++ trunk/rosapps/applications/screensavers/ssstars/settings.c [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,335 @@ +/* + * Star field screensaver + * + * Copyright 2011 Carlo Bramini + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <tchar.h> +#include <commctrl.h> +#include <shellapi.h> + +#include "resource.h" +#include "settings.h" + +#define SIZEOF(_v) (sizeof(_v) / sizeof(*_v)) + +// Options for the starfield +SSSTARS Settings; + +// Factory default settings. +static const SSSTARS FactoryDefaults = { + MAX_STARS, + 20, + ROTATION_PERIODIC, + + TRUE, + TRUE, + TRUE, + TRUE +}; + +static const DWORD RotoStrings[] = { + IDS_ROTATION_NONE, + IDS_ROTATION_LINEAR, + IDS_ROTATION_PERIODIC +}; + +static DWORD QueryDWORD(HKEY hKey, LPCTSTR pszValueName, DWORD Default) +{ + DWORD dwData, dwType, cbData; + LONG lRes; + + dwType = REG_DWORD; + cbData = sizeof(DWORD); + + lRes = RegQueryValueEx( + hKey, + pszValueName, + NULL, + &dwType, + (LPBYTE)&dwData, + &cbData); + + if (lRes != ERROR_SUCCESS || dwType != REG_DWORD) + return Default; + + return dwData; +} + +static void SaveDWORD(HKEY hKey, LPCTSTR pszValueName, DWORD dwValue) +{ + RegSetValueEx(hKey, pszValueName, 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(dwValue)); +} + + +void LoadSettings(void) +{ + HKEY hKey; + LONG lRes; + + Settings = FactoryDefaults; + + lRes = RegCreateKeyEx( + HKEY_CURRENT_USER, + _T("Software\\Microsoft\\ScreenSavers\\Ssstars"), + 0, + _T(""), + 0, + KEY_READ, + NULL, + &hKey, + NULL); + + if (lRes != ERROR_SUCCESS) + return; + + Settings.uiNumStars = QueryDWORD(hKey, _T("NumberOfStars"), Settings.uiNumStars); + Settings.uiSpeed = QueryDWORD(hKey, _T("Speed"), Settings.uiSpeed); + Settings.uiRotation = QueryDWORD(hKey, _T("TypeOfRotation"), Settings.uiRotation); + + Settings.bDoBlending = QueryDWORD(hKey, _T("DoBlending"), Settings.bDoBlending); + Settings.bFinePerspective = QueryDWORD(hKey, _T("FinePerspective"), Settings.bFinePerspective); + Settings.bEnableFiltering = QueryDWORD(hKey, _T("EnableFiltering"), Settings.bEnableFiltering); + Settings.bSmoothShading = QueryDWORD(hKey, _T("SmoothShading"), Settings.bSmoothShading); + + // Check the number of stars to be in range + if (Settings.uiNumStars < MIN_STARS) + Settings.uiNumStars = MIN_STARS; + else + if (Settings.uiNumStars > MAX_STARS) + Settings.uiNumStars = MAX_STARS; + + // Check the speed to be in range + if (Settings.uiSpeed < MIN_SPEED) + Settings.uiSpeed = MIN_SPEED; + else + if (Settings.uiSpeed > MAX_SPEED) + Settings.uiSpeed = MAX_SPEED; + + // Check type of rotation to be in range + if (Settings.uiRotation != ROTATION_NONE && + Settings.uiRotation != ROTATION_LINEAR && + Settings.uiRotation != ROTATION_PERIODIC) + Settings.uiRotation = ROTATION_PERIODIC; + + RegCloseKey(hKey); +} + +void SaveSettings(void) +{ + HKEY hKey; + LONG lRes; + + lRes = RegCreateKeyEx( + HKEY_CURRENT_USER, + _T("Software\\Microsoft\\ScreenSavers\\Ssstars"), + 0, + _T(""), + 0, + KEY_WRITE, + NULL, + &hKey, + NULL); + + if (lRes != ERROR_SUCCESS) + return; + + SaveDWORD(hKey, _T("NumberOfStars"), Settings.uiNumStars); + SaveDWORD(hKey, _T("Speed"), Settings.uiSpeed); + SaveDWORD(hKey, _T("TypeOfRotation"), Settings.uiRotation); + + SaveDWORD(hKey, _T("DoBlending"), Settings.bDoBlending); + SaveDWORD(hKey, _T("FinePerspective"), Settings.bFinePerspective); + SaveDWORD(hKey, _T("EnableFiltering"), Settings.bEnableFiltering); + SaveDWORD(hKey, _T("SmoothShading"), Settings.bSmoothShading); + + RegCloseKey(hKey); +} + +static void SetupControls(HWND hWnd) +{ + TCHAR Strings[256]; + HINSTANCE hInstance; + UINT x, gap; + LOGFONT lf; + HFONT hFont; + HBITMAP hCosmos; + HDC hDC, hMemDC; + HGDIOBJ hOldBmp, hOldFnt; + SIZE sizeReactOS; + SIZE sizeStarfield; + BITMAP bm; + + hInstance = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); + + SendDlgItemMessage(hWnd, IDC_SLIDER_NUM_OF_STARS, TBM_SETRANGE, FALSE, MAKELPARAM(MIN_STARS, MAX_STARS)); + + SendDlgItemMessage(hWnd, IDC_SLIDER_SPEED, TBM_SETRANGE, FALSE, MAKELPARAM(1, 100)); + + for (x = 0; x < ROTATION_ITEMS; x++) + { + LoadString(hInstance, RotoStrings[x], Strings, sizeof(Strings)/sizeof(TCHAR)); + SendDlgItemMessage(hWnd, IDC_COMBO_ROTATION, CB_ADDSTRING, 0, (LPARAM)Strings); + } + + hCosmos = LoadImage(hInstance, MAKEINTRESOURCE(IDB_COSMOS), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_DEFAULTSIZE); + + hDC = GetDC(hWnd); + hMemDC = CreateCompatibleDC(hDC); + + // Create the font for the title + ZeroMemory(&lf, sizeof(lf)); + + lf.lfWeight = FW_THIN; + lf.lfCharSet = ANSI_CHARSET; + lf.lfQuality = PROOF_QUALITY; + lf.lfHeight = 36; + _tcscpy(lf.lfFaceName, _T("Tahoma")); + + hFont = CreateFontIndirect(&lf); + + hOldBmp = SelectObject(hMemDC, hCosmos); + hOldFnt = SelectObject(hMemDC, hFont); + + SetBkMode(hMemDC, TRANSPARENT); + SetTextColor(hMemDC, RGB(0xFF, 0xFF, 0xFF)); + + x = LoadString(hInstance, IDS_DESCRIPTION, Strings, sizeof(Strings)/sizeof(TCHAR)); + + GetTextExtentPoint32(hMemDC, _T("ReactOS"), 7, &sizeReactOS); + GetTextExtentPoint32(hMemDC, Strings, x, &sizeStarfield); + + GetObject(hCosmos, sizeof(BITMAP), &bm); + + gap = bm.bmHeight - sizeReactOS.cy - sizeStarfield.cy; + + TextOut(hMemDC, 16, gap * 2 / 5, _T("ReactOS"), 7); + TextOut(hMemDC, 16, gap * 3 / 5 + sizeReactOS.cy, Strings, x); + + SelectObject(hMemDC, hOldBmp); + SelectObject(hMemDC, hOldFnt); + + DeleteObject(hFont); + + DeleteDC(hMemDC); + ReleaseDC(hWnd, hDC); + + SendDlgItemMessage(hWnd, IDC_IMAGE_COSMOS, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hCosmos); +} + +static void ApplySettings(HWND hWnd) +{ + SendDlgItemMessage(hWnd, IDC_SLIDER_NUM_OF_STARS, TBM_SETPOS, TRUE, Settings.uiNumStars); + SetDlgItemInt(hWnd, IDC_TEXT_NUM_OF_STARS, Settings.uiNumStars, FALSE); + + SendDlgItemMessage(hWnd, IDC_SLIDER_SPEED, TBM_SETPOS, TRUE, Settings.uiSpeed); + SetDlgItemInt(hWnd, IDC_TEXT_SPEED, Settings.uiSpeed, FALSE); + + SendDlgItemMessage(hWnd, IDC_COMBO_ROTATION, CB_SETCURSEL, (WPARAM)Settings.uiRotation, 0); + + SendDlgItemMessage(hWnd, IDC_CHECK_DOBLENDING, BM_SETCHECK, (WPARAM)Settings.bDoBlending, 0); + SendDlgItemMessage(hWnd, IDC_CHECK_PERSPECTIVE, BM_SETCHECK, (WPARAM)Settings.bFinePerspective, 0); + SendDlgItemMessage(hWnd, IDC_CHECK_FILTERING, BM_SETCHECK, (WPARAM)Settings.bEnableFiltering, 0); + SendDlgItemMessage(hWnd, IDC_CHECK_SHADING, BM_SETCHECK, (WPARAM)Settings.bSmoothShading, 0); +} + +static void ReadSettings(HWND hWnd) +{ + Settings.uiNumStars = SendDlgItemMessage(hWnd, IDC_SLIDER_NUM_OF_STARS, TBM_GETPOS, 0, 0); + SetDlgItemInt(hWnd, IDC_TEXT_NUM_OF_STARS, Settings.uiNumStars, FALSE); + + Settings.uiSpeed = SendDlgItemMessage(hWnd, IDC_SLIDER_SPEED, TBM_GETPOS, 0, 0); + SetDlgItemInt(hWnd, IDC_TEXT_SPEED, Settings.uiSpeed, FALSE); + + Settings.uiRotation = SendDlgItemMessage(hWnd, IDC_COMBO_ROTATION, CB_GETCURSEL, 0, 0); + + Settings.bDoBlending = SendDlgItemMessage(hWnd, IDC_CHECK_DOBLENDING, BM_GETCHECK, 0, 0); + Settings.bFinePerspective = SendDlgItemMessage(hWnd, IDC_CHECK_PERSPECTIVE, BM_GETCHECK, 0, 0); + Settings.bEnableFiltering = SendDlgItemMessage(hWnd, IDC_CHECK_FILTERING, BM_GETCHECK, 0, 0); + Settings.bSmoothShading = SendDlgItemMessage(hWnd, IDC_CHECK_SHADING, BM_GETCHECK, 0, 0); +} + +static BOOL OnCommandAbout(HWND hWnd) +{ + HINSTANCE hInstance; + HICON hIcon; + TCHAR szAppName[256]; + TCHAR szAuthor[256]; + TCHAR szLicense[1024]; + + hInstance = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); + + hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_STARFIELD)); + + LoadString(hInstance, IDS_DESCRIPTION, szAppName, SIZEOF(szAppName)); + LoadString(hInstance, IDS_AUTHOR, szAuthor, SIZEOF(szAuthor)); + LoadString(hInstance, IDS_LICENSE, szLicense, SIZEOF(szLicense)); + + _tcscat(szAppName, _T("#")); + _tcscat(szAppName, szAuthor); + + ShellAbout(hWnd, szAppName, szLicense, hIcon); + + return TRUE; +} + +// +// Dialogbox procedure for Configuration window +// +BOOL CALLBACK ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) { + case WM_INITDIALOG: + LoadSettings(); + SetupControls(hDlg); + ApplySettings(hDlg); + return TRUE; + + case WM_COMMAND: + switch (LOWORD( wParam )) { + + case IDOK: + // Write configuration + SaveSettings(); + + // Fall down... + case IDCANCEL: + EndDialog( hDlg, LOWORD( wParam )); + return TRUE; + + case IDC_BUTTON_ABOUT: + return OnCommandAbout(hDlg); + } + + case WM_HSCROLL: + ReadSettings(hDlg); + return TRUE; + + } + + return FALSE; +} + +BOOL WINAPI RegisterDialogClasses(HANDLE hInst) +{ + InitCommonControls(); + + return TRUE; +} + Propchange: trunk/rosapps/applications/screensavers/ssstars/settings.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/settings.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/settings.h (added) +++ trunk/rosapps/applications/screensavers/ssstars/settings.h [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,50 @@ +/* + * Star field screensaver + * + * Copyright 2011 Carlo Bramini + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __SETTINGS_H__ +#define __SETTINGS_H__ + +#define ROTATION_NONE 0 +#define ROTATION_LINEAR 1 +#define ROTATION_PERIODIC 2 +#define ROTATION_ITEMS 3 + +#define MIN_STARS 10 +#define MAX_STARS 500 + +#define MIN_SPEED 1 +#define MAX_SPEED 100 + +typedef struct { + DWORD uiNumStars; + DWORD uiSpeed; + DWORD uiRotation; + DWORD bDoBlending; + DWORD bFinePerspective; + DWORD bEnableFiltering; + DWORD bSmoothShading; +} SSSTARS; + +extern SSSTARS Settings; + +void LoadSettings(void); +void SaveSettings(void); + +#endif Propchange: trunk/rosapps/applications/screensavers/ssstars/settings.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/ssstars.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/ssstars.c (added) +++ trunk/rosapps/applications/screensavers/ssstars/ssstars.c [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,636 @@ +/* + * Star field screensaver + * + * Copyright 2011 Carlo Bramini + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <tchar.h> +#include <scrnsave.h> + +#include <stdlib.h> +#include <time.h> +#include <math.h> + +#include <gl/gl.h> +#include <gl/glu.h> + +#include "resource.h" +#include "settings.h" + +#define FAR_PLANE -80.0f +#define NEAR_PLANE 3.0f +#define GAP 0.0f +#define FIELD_WIDTH 50.f +#define FIELD_HEIGHT 45.f +#define FIELD_DEPTH (NEAR_PLANE - FAR_PLANE + GAP) + +#define STAR_RED 0.f +#define STAR_GREEN 0.f +#define STAR_BLUE 0.10f +#define STAR_TAIL 0.9f + +typedef struct { + float x1; + float y1; + float x2; + float y2; + float z; +} VERTEX; + +static VERTEX Vertex[MAX_STARS]; +static HGLRC hRC; // Permanent Rendering Context +static HDC hDC; // Private GDI Device Context +static float fAngle; +static GLuint glStarTex; + +// Light position +static GLfloat g_light_position[4] = { + 0.0f, 0.0f, 3.0f, 1.0f +}; + +static PIXELFORMATDESCRIPTOR pfd= // Pixel Format Descriptor +{ + sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor + 1, // Version Number (?) + PFD_DRAW_TO_WINDOW | // Format Must Support Window + PFD_SUPPORT_OPENGL | // Format Must Support OpenGL + PFD_DOUBLEBUFFER, // Must Support Double Buffering + PFD_TYPE_RGBA, // Request An RGBA Format + 16, // Select A 16Bit Color Depth + 0, 0, 0, 0, 0, 0, // Color Bits Ignored (?) + 0, // No Alpha Buffer + 0, // Shift Bit Ignored (?) + 0, // No Accumulation Buffer + 0, 0, 0, 0, // Accumulation Bits Ignored (?) + 16, // 16Bit Z-Buffer (Depth Buffer) + 0, // No Stencil Buffer + 0, // No Auxiliary Buffer (?) + PFD_MAIN_PLANE, // Main Drawing Layer + 0, // Reserved (?) + 0, 0, 0 // Layer Masks Ignored (?) +}; + +static HBITMAP CreateStarBitmap(HWND hWnd, HDC hDC) +{ + BITMAPINFO bi; + LPBYTE lpBits; + LPBYTE *lppBits; + HBITMAP hTextBmp, hFileBmp; + HDC hTextDC, hFileDC; + HGDIOBJ hOldText, hOldFile; + UINT i; + DWORD *Ptr32; + BITMAP bm; + HINSTANCE hInstance; + + // Get instance for loading the texture + hInstance = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); + + // Load the texture + hFileBmp = (HBITMAP) + LoadImage( + hInstance, + MAKEINTRESOURCE(IDB_STAR), + IMAGE_BITMAP, + 0, 0, + LR_CREATEDIBSECTION | LR_DEFAULTSIZE + ); + + // Get texture specs + GetObject(hFileBmp, sizeof(BITMAP), &bm); + + // Allocate new 32 bit texture + ZeroMemory(&bi, sizeof(bi)); + + bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bi.bmiHeader.biWidth = bm.bmWidth; + bi.bmiHeader.biHeight = -bm.bmHeight; + bi.bmiHeader.biPlanes = 1; + bi.bmiHeader.biBitCount = 32; + bi.bmiHeader.biCompression = BI_RGB; + + // Makes GCC happy ;-| + lppBits = &lpBits; + + hTextBmp = CreateDIBSection(hDC, + (BITMAPINFO*)&bi, + DIB_RGB_COLORS, + (void**)lppBits, + NULL, + 0); + + // Save new texture specs +// GetObject(hTextBmp, sizeof(BITMAP), &bmStarTex); +// bmStarTex.bmBits = lpBits; + + // Copy 24 bit texture in 32 texture + hTextDC = CreateCompatibleDC(hDC); + hFileDC = CreateCompatibleDC(hDC); + + hOldText = SelectObject(hTextDC, hTextBmp); + hOldFile = SelectObject(hFileDC, hFileBmp); + + BitBlt(hTextDC, 0, 0, bm.bmWidth, bm.bmHeight, hFileDC, 0, 0, SRCCOPY); + + SelectObject(hTextDC, hOldText); + SelectObject(hFileDC, hOldFile); + + DeleteDC(hTextDC); + DeleteDC(hFileDC); + + // Delete 24 bit texture + DeleteObject(hFileBmp); + + GetObject(hTextBmp, sizeof(BITMAP), &bm); + + // Apply ALPHA channel to new texture + for (Ptr32=(DWORD *)lpBits, i=0; i < (UINT)(bm.bmWidth * bm.bmHeight); i++) + { + DWORD Color = Ptr32[i] & 0x00FFFFFF; + DWORD Alpha = Color & 0xFF; + + Color |= Alpha << 24; + + Ptr32[i] = Color; + } + + return hTextBmp; +} + +static void InitGL(HBITMAP hStarTex) +{ + BITMAP bm; + unsigned int i; + float xp, yp, zp; + + // set the GL clear color - use when the color buffer is cleared + glClearColor(STAR_RED, STAR_GREEN, STAR_BLUE, STAR_TAIL); + + if (Settings.bSmoothShading) + // set the shading model to 'smooth' + glShadeModel( GL_SMOOTH ); + else + // set the shading model to 'flat' + glShadeModel( GL_FLAT ); + + // set GL to render front of polygons + glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); + // enable depth test + glDisable( GL_DEPTH_TEST ); + + // enable lighting + glEnable( GL_LIGHTING ); + // enable lighting for front + glLightModeli( GL_FRONT, GL_TRUE ); + // material have diffuse and ambient lighting + glColorMaterial( GL_FRONT, GL_AMBIENT_AND_DIFFUSE ); + // enable color + glEnable( GL_COLOR_MATERIAL ); + // enable light 0 + glEnable( GL_LIGHT0 ); + + // set light attenuation + glLightf( GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0.01f); //0.01f ); + glLightf( GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.01f); //0.2f ); + glLightf( GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0.005f); //0.001f ); + + // clear the color buffer once + glClear( GL_COLOR_BUFFER_BIT ); + + // randomly generate + srand( time( NULL ) ); + + // Initialize *ALL* stars vertexes (not just programmed ones). + for (i = 0; i < MAX_STARS; i++) + { + xp = ( (float) rand() / RAND_MAX - .5f ) * FIELD_WIDTH; + yp = ( (float) rand() / RAND_MAX - .5f ) * FIELD_HEIGHT; + zp = ( (float) rand() / RAND_MAX ) * FIELD_DEPTH + FAR_PLANE; + + Vertex[i].x1 = -1.f + xp; + Vertex[i].y1 = -1.f + yp; + Vertex[i].x2 = 1.f + xp; + Vertex[i].y2 = 1.f + yp; + Vertex[i].z = zp; + } + + glGenTextures(1, &glStarTex); // Create One Texture + + // Create Linear Filtered Texture + glBindTexture(GL_TEXTURE_2D, glStarTex); + + if (Settings.bEnableFiltering) + { + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); + } else { + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + } + + // Get Texture properties + GetObject(hStarTex, sizeof(BITMAP), &bm); + + // Create texture as a mipmap +#if 0 + glTexImage2D(GL_TEXTURE_2D, 0, 4, bm.bmWidth, bm.bmHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, bm.bmBits); +#else + gluBuild2DMipmaps(GL_TEXTURE_2D, 4, bm.bmWidth, bm.bmHeight, GL_RGBA, GL_UNSIGNED_BYTE, bm.bmBits); +#endif + + // Disable Texture Mapping (background smoothing) + glDisable(GL_TEXTURE_2D); + + if (Settings.bFinePerspective) + // Really Fast Perspective Calculations + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); + else + // Really Nice Perspective Calculations + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); + + // enable blending + glEnable( GL_BLEND ); +} + +static void +render(void) +{ + unsigned int i; + float fSpin; + float fSpeed; + float xp, yp; + + // Initialize current speed + fSpeed = (float)Settings.uiSpeed / 100.f; + + glEnable(GL_TEXTURE_2D); // Enable Texture Mapping + + glBlendFunc(GL_SRC_ALPHA,GL_ONE); // Set The Blending Function For Translucency + + switch (Settings.uiRotation) { + case ROTATION_LINEAR: + fAngle += fSpeed; + glRotatef( fAngle, 0.0f, 0.0f, 1.0f ); + break; + + case ROTATION_PERIODIC: + fAngle += fSpeed / 75.f; + fSpin = (float)(50. * cos(fAngle)); + glRotatef( fSpin, 0.0f, 0.0f, 1.0f ); + break; + } + + glColor3ub(255, 255, 255); + + glBegin(GL_QUADS); // Begin Drawing The Textured Quad + + // Draw the stars + for (i = 0; i < Settings.uiNumStars; i++) + { + glTexCoord2f(0.0f, 0.0f); glVertex3f(Vertex[i].x1, Vertex[i].y1, Vertex[i].z); + glTexCoord2f(1.0f, 0.0f); glVertex3f(Vertex[i].x2, Vertex[i].y1, Vertex[i].z); + glTexCoord2f(1.0f, 1.0f); glVertex3f(Vertex[i].x2, Vertex[i].y2, Vertex[i].z); + glTexCoord2f(0.0f, 1.0f); glVertex3f(Vertex[i].x1, Vertex[i].y2, Vertex[i].z); + + // increment z + Vertex[i].z += fSpeed; + + // check to see if passed view + if( Vertex[i].z > NEAR_PLANE + GAP || + Vertex[i].z < FAR_PLANE ) + { + xp = ( (float) rand() / RAND_MAX - .5f ) * FIELD_WIDTH; + yp = ( (float) rand() / RAND_MAX - .5f ) * FIELD_HEIGHT; + + Vertex[i].x1 = -1.f + xp; + Vertex[i].y1 = -1.f + yp; + Vertex[i].x2 = 1.f + xp; + Vertex[i].y2 = 1.f + yp; + Vertex[i].z = FAR_PLANE; + } + } + + glEnd(); // Done Drawing The Textured Quad + + glDisable(GL_TEXTURE_2D); // Enable Texture Mapping +} + +static LRESULT CALLBACK +OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) +{ + GLuint PixelFormat; + HBITMAP hStarTex; + + LoadSettings(); + + // Gets A Device Context For The Window + hDC = GetDC(hWnd); + + // Finds The Closest Match To The Pixel Format We Set Above + PixelFormat = ChoosePixelFormat(hDC, &pfd); + + // No Matching Pixel Format? + if (!PixelFormat) + { + MessageBox(0, _T("Can't Find A Suitable PixelFormat."), _T("Error"),MB_OK | MB_ICONERROR); + + // This Sends A 'Message' Telling The Program To Quit + PostQuitMessage(0); + return 0; + } + + // Can We Set The Pixel Mode? + if (!SetPixelFormat(hDC, PixelFormat, &pfd)) + { + MessageBox(0, _TEXT("Can't Set The PixelFormat."), _T("Error"), MB_OK | MB_ICONERROR); + + // This Sends A 'Message' Telling The Program To Quit + PostQuitMessage(0); + return 0; + } + + // Grab A Rendering Context + hRC = wglCreateContext(hDC); + + // Did We Get One? + if (!hRC) + { + MessageBox(0, _T("Can't Create A GL Rendering Context."), _T("Error"), MB_OK | MB_ICONERROR); + + // This Sends A 'Message' Telling The Program To Quit + PostQuitMessage(0); + return 0; + } + + // Can We Make The RC Active? + if (!wglMakeCurrent(hDC, hRC)) + { + MessageBox(0, _T("Can't Activate GLRC."), _TEXT("Error"), MB_OK | MB_ICONERROR); + + // This Sends A 'Message' Telling The Program To Quit + PostQuitMessage(0); + return 0; + } + + // Load star texture + hStarTex = CreateStarBitmap(hWnd, hDC); + + // Initialize The GL Screen Using Screen Info + InitGL(hStarTex); + + // Delete GDI object for texture + DeleteObject(hStarTex); + + // Update screen every 10ms + SetTimer(hWnd, 1, 10, NULL); + + // Initialize spinning angle + fAngle = 0.f; + + return 0L; +} + +static LRESULT CALLBACK +OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam) +{ + // Delete update timer + KillTimer(hWnd, 1); + + // Disable Fullscreen Mode + ChangeDisplaySettings(NULL, 0); + + // Make The DC Current + wglMakeCurrent(hDC, NULL); + + // Kill The RC + wglDeleteContext(hRC); + + // Free The DC + ReleaseDC(hWnd, hDC); + +#ifdef _DEBUG_SSTARS + PostQuitMessage(0); +#endif + + return 0L; +} + +static LRESULT CALLBACK +OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) +{ + if (Settings.bDoBlending) + { + glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + + // disable lighting + glDisable( GL_LIGHTING ); + + // blend in a polygon + glColor4f(STAR_RED, STAR_GREEN, STAR_BLUE, STAR_TAIL); + + // Restore both model view and projection to identity + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + + // Blur the background + glBegin( GL_QUADS ); + glVertex3f( -1.0f, -1.0f, -1.0f ); + glVertex3f( -1.0f, 1.0f, -1.0f ); + glVertex3f( 1.0f, 1.0f, -1.0f ); + glVertex3f( 1.0f, -1.0f, -1.0f ); + glEnd(); + + // Recover previous matrix + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + + // enable lighting + glEnable( GL_LIGHTING ); + } else { + glClear(GL_COLOR_BUFFER_BIT); + } + + // save the current matrix state, so transformation will + // not persist across displayFunc calls, since we + // will do a glPopMatrix() at the end of this function + glPushMatrix(); + + // render the scene + render(); + + // restore the matrix state + glPopMatrix(); + + // flush the buffer + glFlush(); + + // swap the double buffer + SwapBuffers(hDC); + + // Clear redraw event + ValidateRect(hWnd, NULL); + + return 0L; +} + +static LRESULT CALLBACK +OnSize(HWND hWnd, WPARAM wParam, LPARAM lParam) +{ + GLsizei w = LOWORD(lParam); + GLsizei h = HIWORD(lParam); + + // map the view port to the entire client area + glViewport(0, 0, w, h); + + // set the matrix mode to projection matrix + glMatrixMode(GL_PROJECTION); + + // load the identity matrix + glLoadIdentity(); + + // set the perspective matrix + gluPerspective( 64.0, (GLdouble) w / (GLdouble)h, .1, 300.0 ); + + // set the matrix mode to the modelview matrix + glMatrixMode(GL_MODELVIEW); + + // load the identity matrix into the modelview matrix + glLoadIdentity(); + + // set the 'camera' + gluLookAt( 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 2.0, 3.0 ); + + // set the position of the light + glLightfv( GL_LIGHT0, GL_POSITION, g_light_position ); + + return 0L; +} + +LRESULT CALLBACK +ScreenSaverProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) { + case WM_CREATE: + return OnCreate(hWnd, wParam, lParam); + + case WM_TIMER: + InvalidateRect(hWnd, NULL, FALSE); + return 0L; + + case WM_DESTROY: + return OnDestroy(hWnd, wParam, lParam); + + case WM_PAINT: + return OnPaint(hWnd, wParam, lParam); + + case WM_SIZE: // Resizing The Screen + return OnSize(hWnd, wParam, lParam); + } + +#ifdef _DEBUG_SSTARS + return DefWindowProc(hWnd, uMsg, wParam, lParam); +#else + return DefScreenSaverProc(hWnd, uMsg, wParam, lParam); +#endif +} + +#ifdef _DEBUG_SSTARS + +ATOM InitApp(HINSTANCE hInstance, LPCTSTR szClassName) +{ + WNDCLASS wc; + + ZeroMemory(&wc, sizeof(wc)); + + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = ScreenSaverProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); + wc.lpszMenuName = NULL; + wc.lpszClassName = szClassName; + + return RegisterClass(&wc); +} + +HWND InitInstance(HINSTANCE hInstance, int nCmdShow) +{ + HWND hWnd; + TCHAR szClass[] = _T("CLASS"); + TCHAR szTitle[] = _T("TITLE"); + + InitApp(hInstance, szClass); + + hWnd = CreateWindow( + szClass, + szTitle, + WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, + CW_USEDEFAULT, + 192*3, //CW_USEDEFAULT, + 108*3, //CW_USEDEFAULT, + NULL, + NULL, + hInstance, + NULL); + + if (hWnd) + { + ShowWindow(hWnd, nCmdShow); + UpdateWindow(hWnd); + } + + return hWnd; +} + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) +{ + MSG msg; + HWND hWnd; + HWND hDlg; + + RegisterDialogClasses(hInstance); + + hWnd = InitInstance(hInstance, nShowCmd); + + hDlg = CreateDialog(hInstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE), NULL, ScreenSaverConfigureDialog); + ShowWindow(hDlg, SW_SHOW); + UpdateWindow(hDlg); + + for (;;) + { + if (GetMessage(&msg, NULL, 0, 0) <= 0) + break; + + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + return 0; +} +#endif Propchange: trunk/rosapps/applications/screensavers/ssstars/ssstars.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/screensavers/ssstars/ssstars.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/ssstars/ssstars.rbuild (added) +++ trunk/rosapps/applications/screensavers/ssstars/ssstars.rbuild [iso-8859-1] Sat Oct 1 21:28:47 2011 @@ -1,0 +1,19 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> +<module name="ssstars" type="win32scr" installbase="system32" installname="ssstars.scr" unicode="yes"> + <library>scrnsave</library> + <library>chkstk</library> + <library>user32</library> + <library>gdi32</library> + <library>opengl32</library> + <library>glu32</library> + <library>advapi32</library> + <library>comctl32</library> + <library>shell32</library> + + <file>ssstars.c</file> + <file>settings.c</file> + <file>resource.rc</file> + + <metadata description="Starfield screensaver" /> +</module> Propchange: trunk/rosapps/applications/screensavers/ssstars/ssstars.rbuild ------------------------------------------------------------------------------ svn:eol-style = native
13 years, 2 months
1
0
0
0
[akhaldi] 53919: [ADVAPI32] * Sync CryptEnumProvidersW. Fixes some HKEY leaks. See issue #6237 for more details.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Oct 1 21:02:14 2011 New Revision: 53919 URL:
http://svn.reactos.org/svn/reactos?rev=53919&view=rev
Log: [ADVAPI32] * Sync CryptEnumProvidersW. Fixes some HKEY leaks. See issue #6237 for more details. Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/crypt/c…
============================================================================== --- trunk/reactos/dll/win32/advapi32/crypt/crypt.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/crypt/crypt.c [iso-8859-1] Sat Oct 1 21:02:14 2011 @@ -1104,6 +1104,7 @@ 'P','r','o','v','i','d','e','r',0 }; static const WCHAR typeW[] = {'T','y','p','e',0}; + BOOL ret; TRACE("(%d, %p, %d, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags, pdwProvType, pszProvName, pcbProvName); @@ -1125,6 +1126,7 @@ return FALSE; } + ret = TRUE; if (!pszProvName) { DWORD numkeys; @@ -1136,6 +1138,7 @@ if (!(provNameW = CRYPT_Alloc(*pcbProvName * sizeof(WCHAR)))) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); + RegCloseKey(hKey); return FALSE; } @@ -1147,7 +1150,7 @@ if (dwIndex >= numkeys) { SetLastError(ERROR_NO_MORE_ITEMS); - return FALSE; + ret = FALSE; } } else { DWORD size = sizeof(DWORD); @@ -1158,16 +1161,22 @@ if (result) { SetLastError(result); + RegCloseKey(hKey); return FALSE; } if (RegOpenKeyW(hKey, pszProvName, &subkey)) + { + RegCloseKey(hKey); return FALSE; + } + if (RegQueryValueExW(subkey, typeW, NULL, NULL, (BYTE*)pdwProvType, &size)) - return FALSE; + ret = FALSE; + RegCloseKey(subkey); } RegCloseKey(hKey); - return TRUE; + return ret; } /******************************************************************************
13 years, 2 months
1
0
0
0
[akhaldi] 53918: [HEADERS/CRT] * We don't need this guard anymore.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Oct 1 20:23:05 2011 New Revision: 53918 URL:
http://svn.reactos.org/svn/reactos?rev=53918&view=rev
Log: [HEADERS/CRT] * We don't need this guard anymore. Modified: trunk/reactos/include/crt/_mingw.h Modified: trunk/reactos/include/crt/_mingw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/_mingw.h?rev=5…
============================================================================== --- trunk/reactos/include/crt/_mingw.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/_mingw.h [iso-8859-1] Sat Oct 1 20:23:05 2011 @@ -163,12 +163,10 @@ //#endif #ifdef __GNUC__ -#ifndef __clang__ #define __int8 char #define __int16 short #define __int32 int #define __int64 long long -#endif #ifdef _WIN64 typedef int __int128 __attribute__ ((mode (TI))); # endif
13 years, 2 months
1
0
0
0
[akhaldi] 53917: [HEADERS/CRT] * Properly check for clang.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Oct 1 20:14:15 2011 New Revision: 53917 URL:
http://svn.reactos.org/svn/reactos?rev=53917&view=rev
Log: [HEADERS/CRT] * Properly check for clang. Modified: trunk/reactos/include/crt/stdlib.h Modified: trunk/reactos/include/crt/stdlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdlib.h?rev=5…
============================================================================== --- trunk/reactos/include/crt/stdlib.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/stdlib.h [iso-8859-1] Sat Oct 1 20:14:15 2011 @@ -278,7 +278,7 @@ void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *)); #endif -#if !defined(__GNUC__) && !defined(__clang) +#if !defined(__GNUC__) && !defined(__clang__) unsigned short __cdecl _byteswap_ushort(unsigned short _Short); unsigned long __cdecl _byteswap_ulong (unsigned long _Long); #if _INTEGRAL_MAX_BITS >= 64 @@ -414,7 +414,7 @@ void __cdecl perror(const char *_ErrMsg); #endif _CRTIMP int __cdecl _putenv(const char *_EnvString); -#if !defined(__GNUC__) && !defined(__clang) +#if !defined(__GNUC__) && !defined(__clang__) unsigned int __cdecl _rotl(unsigned int _Val,int _Shift); #if _INTEGRAL_MAX_BITS >= 64 __MINGW_EXTENSION unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
13 years, 2 months
1
0
0
0
[cgutman] 53916: [NTOSKRNL] - Print a message if something goes wrong during the loading process
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Oct 1 17:54:42 2011 New Revision: 53916 URL:
http://svn.reactos.org/svn/reactos?rev=53916&view=rev
Log: [NTOSKRNL] - Print a message if something goes wrong during the loading process Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] Sat Oct 1 17:54:42 2011 @@ -150,6 +150,7 @@ if (!NT_SUCCESS(Status)) { /* Detach and return */ + DPRINT1("MmMapViewOfSection failed with status 0x%x\n", Status); KeUnstackDetachProcess(&ApcState); return Status; } @@ -1185,6 +1186,8 @@ *MissingDriver = DllName.Buffer; *(PULONG)MissingDriver |= 1; *MissingApi = NULL; + + DPRINT1("Failed to load dependency: %wZ\n", &DllName); } } else @@ -1208,6 +1211,7 @@ { /* We failed, unload the image */ MmUnloadSystemImage(DllEntry); + DPRINT1("MmCallDllInitialize failed with status 0x%x\n", Status); while (TRUE); Loaded = FALSE; } @@ -2443,7 +2447,11 @@ PAGE_EXECUTE, SEC_IMAGE, ImageHandle); - if (!NT_SUCCESS(Status)) return Status; + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwCreateSection failed with status 0x%x\n", Status); + return Status; + } /* Make sure we're in the system process */ KeStackAttachProcess(&PsInitialSystemProcess->Pcb, &ApcState); @@ -2462,6 +2470,7 @@ if (!NT_SUCCESS(Status)) { /* We failed, close the handle and return */ + DPRINT1("ZwMapViewOfSection failed with status 0x%x\n", Status); KeUnstackDetachProcess(&ApcState); ZwClose(SectionHandle); return Status; @@ -2703,7 +2712,11 @@ &IoStatusBlock, FILE_SHARE_READ | FILE_SHARE_DELETE, 0); - if (!NT_SUCCESS(Status)) goto Quickie; + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwOpenFile failed with status 0x%x\n", Status); + goto Quickie; + } /* Validate it */ Status = MmCheckSystemImage(FileHandle, FALSE); @@ -2742,7 +2755,11 @@ PAGE_EXECUTE, SEC_IMAGE, FileHandle); - if (!NT_SUCCESS(Status)) goto Quickie; + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwCreateSection failed with status 0x%x\n", Status); + goto Quickie; + } /* Now get the section pointer */ Status = ObReferenceObjectByHandle(SectionHandle, @@ -2801,7 +2818,11 @@ } /* Check for failure of the load earlier */ - if (!NT_SUCCESS(Status)) goto Quickie; + if (!NT_SUCCESS(Status)) + { + DPRINT1("MiLoadImageSection failed with status 0x%x\n", Status); + goto Quickie; + } /* Relocate the driver */ Status = LdrRelocateImageWithBias(ModuleLoadBase, @@ -2810,8 +2831,11 @@ STATUS_SUCCESS, STATUS_CONFLICTING_ADDRESSES, STATUS_INVALID_IMAGE_FORMAT); - if (!NT_SUCCESS(Status)) goto Quickie; - + if (!NT_SUCCESS(Status)) + { + DPRINT1("LdrRelocateImageWithBias failed with status 0x%x\n", Status); + goto Quickie; + } /* Get the NT Header */ NtHeader = RtlImageNtHeader(ModuleLoadBase); @@ -2900,6 +2924,8 @@ &LoadedImports); if (!NT_SUCCESS(Status)) { + DPRINT1("MiResolveImageReferences failed with status 0x%x\n", Status); + /* Fail */ MiProcessLoaderEntry(LdrEntry, FALSE);
13 years, 2 months
1
0
0
0
[tkreuzer] 53915: [FREELDR] Replace the fake export table with the real export table of freeldr, when loading ntbootdd.sys
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Oct 1 12:50:33 2011 New Revision: 53915 URL:
http://svn.reactos.org/svn/reactos?rev=53915&view=rev
Log: [FREELDR] Replace the fake export table with the real export table of freeldr, when loading ntbootdd.sys Modified: trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c Modified: trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] Sat Oct 1 12:50:33 2011 @@ -1557,68 +1557,11 @@ WRITE_REGISTER_USHORT(Register, Value); } +extern char __ImageBase; + ULONG LoadBootDeviceDriver(VOID) { - struct - { - CHAR* Name; - PVOID Function; - } ExportTable[] = - { - { "ScsiDebugPrint", ScsiDebugPrint }, - { "ScsiPortCompleteRequest", ScsiPortCompleteRequest }, - { "ScsiPortConvertPhysicalAddressToUlong", ScsiPortConvertPhysicalAddressToUlong }, - { "ScsiPortConvertUlongToPhysicalAddress", ScsiPortConvertUlongToPhysicalAddress }, - { "ScsiPortFlushDma", ScsiPortFlushDma }, - { "ScsiPortFreeDeviceBase", ScsiPortFreeDeviceBase }, - { "ScsiPortGetBusData", ScsiPortGetBusData }, - { "ScsiPortGetDeviceBase", ScsiPortGetDeviceBase }, - { "ScsiPortGetLogicalUnit", ScsiPortGetLogicalUnit }, - { "ScsiPortGetPhysicalAddress", ScsiPortGetPhysicalAddress }, - { "ScsiPortGetSrb", ScsiPortGetSrb }, - { "ScsiPortGetUncachedExtension", ScsiPortGetUncachedExtension }, - { "ScsiPortGetVirtualAddress", ScsiPortGetVirtualAddress }, - { "ScsiPortInitialize", ScsiPortInitialize }, - { "ScsiPortIoMapTransfer", ScsiPortIoMapTransfer }, - { "ScsiPortLogError", ScsiPortLogError }, - { "ScsiPortMoveMemory", ScsiPortMoveMemory }, - { "ScsiPortNotification", ScsiPortNotification }, - { "ScsiPortReadPortBufferUchar", ScsiPortReadPortBufferUchar }, - { "ScsiPortReadPortBufferUlong", ScsiPortReadPortBufferUlong }, - { "ScsiPortReadPortBufferUshort", ScsiPortReadPortBufferUshort }, - { "ScsiPortReadPortUchar", ScsiPortReadPortUchar }, - { "ScsiPortReadPortUlong", ScsiPortReadPortUlong }, - { "ScsiPortReadPortUshort", ScsiPortReadPortUshort }, - { "ScsiPortReadRegisterBufferUchar", ScsiPortReadRegisterBufferUchar }, - { "ScsiPortReadRegisterBufferUlong", ScsiPortReadRegisterBufferUlong }, - { "ScsiPortReadRegisterBufferUshort", ScsiPortReadRegisterBufferUshort }, - { "ScsiPortReadRegisterUchar", ScsiPortReadRegisterUchar }, - { "ScsiPortReadRegisterUlong", ScsiPortReadRegisterUlong }, - { "ScsiPortReadRegisterUshort", ScsiPortReadRegisterUshort }, - { "ScsiPortSetBusDataByOffset", ScsiPortSetBusDataByOffset }, - { "ScsiPortStallExecution", ScsiPortStallExecution }, - { "ScsiPortValidateRange", ScsiPortValidateRange }, - { "ScsiPortWritePortBufferUchar", ScsiPortWritePortBufferUchar }, - { "ScsiPortWritePortBufferUlong", ScsiPortWritePortBufferUlong }, - { "ScsiPortWritePortBufferUshort", ScsiPortWritePortBufferUshort }, - { "ScsiPortWritePortUchar", ScsiPortWritePortUchar }, - { "ScsiPortWritePortUlong", ScsiPortWritePortUlong }, - { "ScsiPortWritePortUshort", ScsiPortWritePortUshort }, - { "ScsiPortWriteRegisterBufferUchar", ScsiPortWriteRegisterBufferUchar }, - { "ScsiPortWriteRegisterBufferUlong", ScsiPortWriteRegisterBufferUlong }, - { "ScsiPortWriteRegisterBufferUshort", ScsiPortWriteRegisterBufferUshort }, - { "ScsiPortWriteRegisterUchar", ScsiPortWriteRegisterUchar }, - { "ScsiPortWriteRegisterUlong", ScsiPortWriteRegisterUlong }, - { "ScsiPortWriteRegisterUshort", ScsiPortWriteRegisterUshort }, - }; - IMAGE_DOS_HEADER ImageDosHeader; - IMAGE_NT_HEADERS ImageNtHeaders; - IMAGE_EXPORT_DIRECTORY ImageExportDirectory; - CHAR* TableName[sizeof(ExportTable) / sizeof(ExportTable[0])]; - USHORT OrdinalTable[sizeof(ExportTable) / sizeof(ExportTable[0])]; - ULONG FunctionTable[sizeof(ExportTable) / sizeof(ExportTable[0])]; - PIMAGE_NT_HEADERS NtHeaders; LOADER_PARAMETER_BLOCK LoaderBlock; PIMAGE_IMPORT_DESCRIPTOR ImportTable; @@ -1627,37 +1570,11 @@ CHAR NtBootDdPath[MAX_PATH]; PVOID ImageBase; ULONG (NTAPI *EntryPoint)(IN PVOID DriverObject, IN PVOID RegistryPath); - USHORT i; BOOLEAN Status; /* Some initialization of our temporary loader block */ RtlZeroMemory(&LoaderBlock, sizeof(LOADER_PARAMETER_BLOCK)); InitializeListHead(&LoaderBlock.LoadOrderListHead); - - /* Create our fake executable header for freeldr.sys */ - RtlZeroMemory(&ImageDosHeader, sizeof(IMAGE_DOS_HEADER)); - RtlZeroMemory(&ImageNtHeaders, sizeof(IMAGE_NT_HEADERS)); - RtlZeroMemory(&ImageExportDirectory, sizeof(IMAGE_EXPORT_DIRECTORY)); - ImageDosHeader.e_magic = SWAPW(IMAGE_DOS_SIGNATURE); - ImageDosHeader.e_lfanew = SWAPD((ULONG_PTR)&ImageNtHeaders - (ULONG_PTR)&ImageDosHeader); - ImageNtHeaders.Signature = IMAGE_NT_SIGNATURE; - ImageNtHeaders.OptionalHeader.NumberOfRvaAndSizes = SWAPD(IMAGE_DIRECTORY_ENTRY_EXPORT + 1); - ImageNtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress = - SWAPW((ULONG_PTR)&ImageExportDirectory - (ULONG_PTR)&ImageDosHeader); - ImageNtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size = 1; - ImageExportDirectory.NumberOfNames = sizeof(ExportTable) / sizeof(ExportTable[0]); - ImageExportDirectory.AddressOfNames = (ULONG_PTR)TableName - (ULONG_PTR)&ImageDosHeader; - ImageExportDirectory.AddressOfNameOrdinals = (ULONG_PTR)OrdinalTable - (ULONG_PTR)&ImageDosHeader; - ImageExportDirectory.NumberOfFunctions = sizeof(ExportTable) / sizeof(ExportTable[0]); - ImageExportDirectory.AddressOfFunctions = (ULONG_PTR)FunctionTable - (ULONG_PTR)&ImageDosHeader; - - /* Fill freeldr.sys export table */ - for (i = 0; i < sizeof(ExportTable) / sizeof(ExportTable[0]); i++) - { - TableName[i] = PaToVa((PVOID)((ULONG_PTR)ExportTable[i].Name - (ULONG_PTR)&ImageDosHeader)); - OrdinalTable[i] = i; - FunctionTable[i] = (ULONG)((ULONG_PTR)ExportTable[i].Function - (ULONG_PTR)&ImageDosHeader); - } /* Create full ntbootdd.sys path */ MachDiskGetBootPath(NtBootDdPath, sizeof(NtBootDdPath)); @@ -1677,9 +1594,10 @@ if (!Status) return EIO; - /* Add freeldr.sys to list of loaded executables, it repaces scsiport.sys */ + /* Add the PE part of freeldr.sys to the list of loaded executables, it + contains Scsiport* exports, imported by ntbootdd.sys */ Status = WinLdrAllocateDataTableEntry(&LoaderBlock, "scsiport.sys", - "FREELDR.SYS", &ImageDosHeader, &FreeldrDTE); + "FREELDR.SYS", &__ImageBase, &FreeldrDTE); if (!Status) { RemoveEntryList(&BootDdDTE->InLoadOrderLinks);
13 years, 2 months
1
0
0
0
[tkreuzer] 53914: [FREELDR] use a dll instead of an exe for the freeldr_pe and setupldr_pe targets and add a spec file to export scsiport stuff. This is the first step in cleaning up the scsiport i...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Oct 1 12:14:45 2011 New Revision: 53914 URL:
http://svn.reactos.org/svn/reactos?rev=53914&view=rev
Log: [FREELDR] use a dll instead of an exe for the freeldr_pe and setupldr_pe targets and add a spec file to export scsiport stuff. This is the first step in cleaning up the scsiport import hack in freeldr Added: trunk/reactos/boot/freeldr/freeldr/freeldr.spec (with props) Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk trunk/reactos/cmake/CMakeMacros.cmake Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sat Oct 1 12:14:45 2011 @@ -1,3 +1,5 @@ + +spec2def(freeldr.sys freeldr.spec) if(ARCH MATCHES i386) CreateBootSectorTarget2(frldr16 @@ -126,6 +128,7 @@ arch/i386/hardware.c arch/i386/hwacpi.c arch/i386/hwapm.c + arch/i386/hwdisk.c arch/i386/hwpci.c arch/i386/i386rtl.c arch/i386/i386disk.c @@ -155,8 +158,12 @@ rtl/bget.c rtl/libsupp.c) -add_executable(freeldr_pe ${FREELDR_BASE_SOURCE}) -add_executable(freeldr_pe_dbg EXCLUDE_FROM_ALL ${FREELDR_BASE_SOURCE}) +if (NOT MSVC) + list(APPEND FREELDR_BASE_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.def) +endif() + +add_library(freeldr_pe SHARED ${FREELDR_BASE_SOURCE}) +add_library(freeldr_pe_dbg SHARED EXCLUDE_FROM_ALL ${FREELDR_BASE_SOURCE}) if(NOT MSVC) set_target_properties(freeldr_pe PROPERTIES LINK_FLAGS "-Wl,--strip-all,--exclude-all-symbols,--file-alignment,0x1000,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lnk") @@ -202,7 +209,7 @@ concatenate_files( ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin - ${CMAKE_CURRENT_BINARY_DIR}/freeldr_pe.exe + freeldr_pe ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys) add_custom_target(freeldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys) @@ -218,8 +225,8 @@ list(APPEND SETUPLDR_SOURCE windows/setupldr.c) endif() -add_executable(setupldr_pe ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE}) -add_executable(setupldr_pe_dbg EXCLUDE_FROM_ALL ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE}) +add_library(setupldr_pe SHARED ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE}) +add_library(setupldr_pe_dbg SHARED EXCLUDE_FROM_ALL ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE}) if(NOT MSVC) set_target_properties(setupldr_pe PROPERTIES LINK_FLAGS "-Wl,--strip-all,--exclude-all-symbols,--file-alignment,0x1000,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lnk" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") @@ -263,7 +270,7 @@ concatenate_files( ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin - ${CMAKE_CURRENT_BINARY_DIR}/setupldr_pe.exe + setupldr_pe ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys) add_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys) Added: trunk/reactos/boot/freeldr/freeldr/freeldr.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/freeldr.spec (added) +++ trunk/reactos/boot/freeldr/freeldr/freeldr.spec [iso-8859-1] Sat Oct 1 12:14:45 2011 @@ -1,0 +1,46 @@ +@ cdecl ScsiDebugPrint() +@ stdcall ScsiPortCompleteRequest(ptr long long long long) +@ stdcall ScsiPortConvertPhysicalAddressToUlong(long long) +@ stdcall -arch=i386 ScsiPortConvertUlongToPhysicalAddress(long) +@ stdcall -arch=x86_64 ScsiPortConvertUlongToPhysicalAddress(long) +@ stdcall ScsiPortFlushDma(ptr) +@ stdcall ScsiPortFreeDeviceBase(ptr ptr) +@ stdcall ScsiPortGetBusData(ptr long long long ptr long) +@ stdcall ScsiPortGetDeviceBase(ptr long long long long long long) +@ stdcall ScsiPortGetLogicalUnit(ptr long long long) +@ stdcall ScsiPortGetPhysicalAddress(ptr ptr ptr long) +@ stdcall ScsiPortGetSrb(ptr long long long long) +@ stdcall ScsiPortGetUncachedExtension(ptr ptr long) +@ stdcall ScsiPortGetVirtualAddress(ptr long long) +@ stdcall ScsiPortInitialize(ptr ptr ptr ptr) +@ stdcall ScsiPortIoMapTransfer(ptr ptr long long) +@ stdcall ScsiPortLogError(ptr ptr long long long long long) +@ stdcall ScsiPortMoveMemory(ptr ptr long) +@ cdecl ScsiPortNotification() +@ stdcall ScsiPortReadPortBufferUchar(ptr ptr long) +@ stdcall ScsiPortReadPortBufferUshort(ptr ptr long) +@ stdcall ScsiPortReadPortBufferUlong(ptr ptr long) +@ stdcall ScsiPortReadPortUchar(ptr) +@ stdcall ScsiPortReadPortUshort(ptr) +@ stdcall ScsiPortReadPortUlong(ptr) +@ stdcall ScsiPortReadRegisterBufferUchar(ptr ptr long) +@ stdcall ScsiPortReadRegisterBufferUshort(ptr ptr long) +@ stdcall ScsiPortReadRegisterBufferUlong(ptr ptr long) +@ stdcall ScsiPortReadRegisterUchar(ptr) +@ stdcall ScsiPortReadRegisterUshort(ptr) +@ stdcall ScsiPortReadRegisterUlong(ptr) +@ stdcall ScsiPortSetBusDataByOffset(ptr long long long ptr long long) +@ stdcall ScsiPortStallExecution(long) +@ stdcall ScsiPortValidateRange(ptr long long long long long long) +@ stdcall ScsiPortWritePortBufferUchar(ptr ptr long) +@ stdcall ScsiPortWritePortBufferUshort(ptr ptr long) +@ stdcall ScsiPortWritePortBufferUlong(ptr ptr long) +@ stdcall ScsiPortWritePortUchar(ptr long) +@ stdcall ScsiPortWritePortUshort(ptr long) +@ stdcall ScsiPortWritePortUlong(ptr long) +@ stdcall ScsiPortWriteRegisterBufferUchar(ptr ptr long) +@ stdcall ScsiPortWriteRegisterBufferUshort(ptr ptr long) +@ stdcall ScsiPortWriteRegisterBufferUlong(ptr ptr long) +@ stdcall ScsiPortWriteRegisterUchar(ptr long) +@ stdcall ScsiPortWriteRegisterUshort(ptr long) +@ stdcall ScsiPortWriteRegisterUlong(ptr long) Propchange: trunk/reactos/boot/freeldr/freeldr/freeldr.spec ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/freeldr_i386.lnk [iso-8859-1] Sat Oct 1 12:14:45 2011 @@ -8,6 +8,11 @@ *(SORT(.data*)) *(.rdata) *(SORT(.rdata*)) + } + + .edata BLOCK(__file_alignment__) : + { + *(.edata) } .bss : Modified: trunk/reactos/cmake/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
============================================================================== --- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Sat Oct 1 12:14:45 2011 @@ -207,7 +207,9 @@ string(REPLACE "/" "\\" ${_native_path} "${_cmake_path}") endmacro() - function(concatenate_files _file1 _file2 _output) + # yeah the parameter mess sucks, but thats what works... + function(concatenate_files _file1 _target2 _output) + get_target_property(_file2 ${_target2} LOCATION) to_win_path("${_file1}" _real_file1) to_win_path("${_file2}" _real_file2) to_win_path("${_output}" _real_output) @@ -215,15 +217,16 @@ OUTPUT ${_output} COMMAND cmd.exe /C "copy /Y /B ${_real_file1} + ${_real_file2} ${_real_output} > nul" DEPENDS ${_file1} - DEPENDS ${_file2}) + DEPENDS ${_target2}) endfunction() else() - macro(concatenate_files _file1 _file2 _output) + macro(concatenate_files _file1 _target2 _output) + get_target_property(_file2 ${_target2} LOCATION) add_custom_command( OUTPUT ${_output} COMMAND cat ${_file1} ${_file2} > ${_output} DEPENDS ${_file1} - DEPENDS ${_file2}) + DEPENDS ${_target2}) endmacro() endif() @@ -242,7 +245,7 @@ function(set_module_type MODULE TYPE) cmake_parse_arguments(__module "UNICODE" "IMAGEBASE" "ENTRYPOINT" ${ARGN}) - + if(__module_UNPARSED_ARGUMENTS) message(STATUS "set_module_type : unparsed arguments ${__module_UNPARSED_ARGUMENTS}, module : ${MODULE}") endif() @@ -258,16 +261,16 @@ elseif(NOT ((${TYPE} STREQUAL win32dll) OR (${TYPE} STREQUAL win32ocx) OR (${TYPE} STREQUAL cpl))) message(FATAL_ERROR "Unknown type ${TYPE} for module ${MODULE}") endif() - + if(DEFINED __subsystem) set_subsystem(${MODULE} ${__subsystem}) endif() - + #set unicode definitions if(__module_UNICODE) add_target_compile_definitions(${MODULE} UNICODE _UNICODE) endif() - + # set entry point if(__module_ENTRYPOINT OR (__module_ENTRYPOINT STREQUAL "0")) list(GET __module_ENTRYPOINT 0 __entrypoint) @@ -298,7 +301,7 @@ set(__entrypoint DllMain) set(__entrystack 12) endif() - + if(DEFINED __entrypoint) if(DEFINED __entrystack) set_entrypoint(${MODULE} ${__entrypoint} ${__entrystack}) @@ -306,7 +309,7 @@ set_entrypoint(${MODULE} ${__entrypoint}) endif() endif() - + #set base address if(__module_IMAGEBASE) set_image_base(${MODULE} __module_IMAGEBASE) @@ -319,21 +322,21 @@ elseif(${TYPE} STREQUAL kernelmodedriver) set_image_base(${MODULE} 0x00010000) endif() - - # Now do some stuff which is specific to each type + + # Now do some stuff which is specific to each type if(${TYPE} STREQUAL kernelmodedriver) add_dependencies(${MODULE} bugcodes) set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys") endif() - + if(${TYPE} STREQUAL win32ocx) set_target_properties(${MODULE} PROPERTIES SUFFIX ".ocx") endif() - + if(${TYPE} STREQUAL cpl) set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl") endif() - + # do compiler specific stuff set_module_type_toolchain(${MODULE} ${TYPE}) endfunction()
13 years, 2 months
1
0
0
0
[cgutman] 53913: [ACPI] - Implement AcpiOsGetPhysicalAddress - Make sure that AcpiOsGetThreadId returns a non-zero value
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Oct 1 07:19:57 2011 New Revision: 53913 URL:
http://svn.reactos.org/svn/reactos?rev=53913&view=rev
Log: [ACPI] - Implement AcpiOsGetPhysicalAddress - Make sure that AcpiOsGetThreadId returns a non-zero value Modified: trunk/reactos/drivers/bus/acpi/osl.c Modified: trunk/reactos/drivers/bus/acpi/osl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/osl.c?rev…
============================================================================== --- trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] Sat Oct 1 07:19:57 2011 @@ -124,7 +124,18 @@ void *LogicalAddress, ACPI_PHYSICAL_ADDRESS *PhysicalAddress) { - ASSERT(FALSE); + PHYSICAL_ADDRESS PhysAddr; + + if (!LogicalAddress || !PhysicalAddress) + { + DPRINT1("Bad parameter\n"); + return AE_BAD_PARAMETER; + } + + PhysAddr = MmGetPhysicalAddress(LogicalAddress); + + *PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)PhysAddr.QuadPart; + return AE_OK; } @@ -190,7 +201,8 @@ ACPI_THREAD_ID AcpiOsGetThreadId (void) { - return (ULONG)PsGetCurrentThreadId(); + /* Thread ID must be non-zero */ + return (ULONG)PsGetCurrentThreadId() + 1; } ACPI_STATUS
13 years, 2 months
1
0
0
0
[cgutman] 53912: [NTOSKRNL] - Add more debugging during driver loading (not enabled by default)
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Oct 1 04:56:14 2011 New Revision: 53912 URL:
http://svn.reactos.org/svn/reactos?rev=53912&view=rev
Log: [NTOSKRNL] - Add more debugging during driver loading (not enabled by default) Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Sat Oct 1 04:56:14 2011 @@ -239,6 +239,8 @@ { UNICODE_STRING InputImagePath; + DPRINT("Normalizing image path '%wZ' for service '%wZ'\n", ImagePath, ServiceName); + RtlCopyMemory( &InputImagePath, ImagePath, @@ -272,6 +274,8 @@ /* Free caller's string */ ExFreePoolWithTag(InputImagePath.Buffer, TAG_RTLREGISTRY); } + + DPRINT("Normalized image path is '%wZ' for service '%wZ'\n", ImagePath, ServiceName); return STATUS_SUCCESS; } @@ -394,7 +398,7 @@ } else { - DPRINT("Loading module\n"); + DPRINT("Loading module from %wZ\n", &ServiceImagePath); Status = MmLoadSystemImage(&ServiceImagePath, NULL, NULL, 0, (PVOID)ModuleObject, &BaseAddress); if (NT_SUCCESS(Status)) { @@ -1897,6 +1901,7 @@ * Load the driver module */ + DPRINT("Loading module from %wZ\n", &ImagePath); Status = MmLoadSystemImage(&ImagePath, NULL, NULL, 0, (PVOID)&ModuleObject, &BaseAddress); if (!NT_SUCCESS(Status) && Status != STATUS_IMAGE_ALREADY_LOADED)
13 years, 2 months
1
0
0
0
← Newer
1
...
34
35
36
37
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
Results per page:
10
25
50
100
200