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
2025
January
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
January 2009
----- 2025 -----
January 2025
----- 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
30 participants
755 discussions
Start a n
N
ew thread
[dgoette] 38952: * fix request of translatable entries * replace security acl filter with security area filter, now you can request for special rights instead of an acl list * use the last used version number, and not only the last stable one to calculate a new version number * protect entries of other languages from being deleted by language maintainers of different languages * fix moving to archiv / delete revisions behavior * group list of translators by language / language maintainer now get
by dgoette@svn.reactos.org
Author: dgoette Date: Mon Jan 19 13:01:51 2009 New Revision: 38952 URL:
http://svn.reactos.org/svn/reactos?rev=38952&view=rev
Log: * fix request of translatable entries * replace security acl filter with security area filter, now you can request for special rights instead of an acl list * use the last used version number, and not only the last stable one to calculate a new version number * protect entries of other languages from being deleted by language maintainers of different languages * fix moving to archiv / delete revisions behavior * group list of translators by language / language maintainer now get a list of all translators in their language, even if they have no edits made * show compare dialog correct again * compare function could have compared the wrong entries, if the entry was en english one, now the correct entry is compared and, correct versions are shown in the dropdown * entry history: display only the users language history if the user has only access to one language * don't let language maintainer search users by language * remove language maintainers ability to change the language of an user to his own language * fix adding user to group * fix problem, when draft was deleted: the user couldn't see any following draft of the same entry Modified:
branches/danny-web/reactos.org/htdocs/roscms/config.php
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php
branches/danny-web/reactos.org/htdocs/roscms/js/cms_user.js
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php
branches/danny-web/reactos.org/htdocs/roscms/lib/CMSWebsiteSaveEntry.class.…
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/Data.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/Editor_Website.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_User.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_XML.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/Generate.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_User.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Website.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/Tag.class.php
Modified:
branches/danny-web/reactos.org/htdocs/roscms/config.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/config.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/config.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -45,13 +45,14 @@ // RosCMS Table Names -define('ROSCMST_ACCESS' , 'roscms_access'); define('ROSCMST_AREA' , 'roscms_area'); define('ROSCMST_USERS' , 'roscms_accounts'); define('ROSCMST_FORBIDDEN' , 'roscms_accounts_forbidden'); define('ROSCMST_SESSIONS' , 'roscms_accounts_sessions'); define('ROSCMST_COUNTRIES' , 'roscms_countries'); define('ROSCMST_ENTRIES' , 'roscms_entries'); +define('ROSCMST_ACCESS' , 'roscms_entries_access'); +define('ROSCMST_RIGHTS' , 'roscms_entries_areas'); define('ROSCMST_REVISIONS' , 'roscms_entries_revisions'); define('ROSCMST_STEXT' , 'roscms_entries_stext'); define('ROSCMST_TAGS' , 'roscms_entries_tags'); @@ -62,11 +63,9 @@ define('ROSCMST_LANGUAGES' , 'roscms_languages'); define('ROSCMST_SUBSYS' , 'roscms_rel_accounts_subsys'); define('ROSCMST_MEMBERSHIPS', 'roscms_rel_groups_accounts'); -define('ROSCMST_ENTRY_AREA' , 'roscms_rel_groups_acl'); define('ROSCMST_AREA_ACCESS', 'roscms_rel_groups_area'); define('ROSCMST_DEPENCIES' , 'roscms_rel_revisions_depencies'); -define('ROSCMST_ACL' , 'roscms_rel_rights_access'); -define('ROSCMST_RIGHTS' , 'roscms_rights'); +define('ROSCMST_ACL' , 'roscms_rel_acl'); define('ROSCMST_TIMEZONES' , 'roscms_timezones'); Modified:
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -20,11 +20,11 @@ // Database: -define('DB_HOST', "localhost"); -define('DB_USER', "lev-db"); -define('DB_PASS', "DangerGround"); -define('DB_NAME', "roscms"); +$db_host = 'localhost'; +$db_user = 'user'; +$db_pass = 'pass'; +$db_name = 'roscms'; - +// vars are unset in DBConnection class ?> Modified:
branches/danny-web/reactos.org/htdocs/roscms/js/cms_user.js
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/js/cms_user.js
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/js/cms_user.js
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -16,9 +16,9 @@ if (document.getElementById('searchopt2').checked) soptckd = 'fullname'; if (document.getElementById('searchopt3').checked) soptckd = 'email'; if (document.getElementById('searchopt4').checked) soptckd = 'website'; - if (document.getElementById('searchopt5').checked) soptckd = 'language'; + if (document.getElementById('searchopt5') && document.getElementById('searchopt5').checked) soptckd = 'language'; - makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=list&d_val='+encodeURIComponent(document.getElementById('textfield').value)+'&d_val2='+encodeURIComponent(soptckd)); + makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=list&phrase='+encodeURIComponent(document.getElementById('textfield').value)+'&option='+encodeURIComponent(soptckd)); } } @@ -31,7 +31,7 @@ */ function getUserDetails( user_id ) { - makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=detail&d_val='+encodeURIComponent(user_id)); + makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=detail&user='+encodeURIComponent(user_id)); } @@ -44,7 +44,7 @@ */ function addMembership( user_id, group_id ) { - makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=addmembership&d_val='+encodeURIComponent(user_id)+'&d_val2='+encodeURIComponent(group_id)); + makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=addmembership&user='+encodeURIComponent(user_id)+'&group='+encodeURIComponent(group_id)); } @@ -60,7 +60,7 @@ var uf_check = confirm("Be careful! \n\nDo you want to delete this membership?"); if (uf_check == true) { - makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=delmembership&d_val='+encodeURIComponent(user_id)+'&d_val2='+encodeURIComponent(member_id)); + makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=delmembership&user='+encodeURIComponent(user_id)+'&group='+encodeURIComponent(member_id)); } } @@ -77,7 +77,7 @@ var uf_check = confirm("Do you want to continue?"); if (uf_check == true) { - makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=updateusrlang&d_val='+encodeURIComponent(user_id)+'&d_val2='+encodeURIComponent(language)); + makeRequest('?page=data_out&d_f=user&d_u=usrtbl&d_fl=updateusrlang&user='+encodeURIComponent(user_id)+'&lang='+encodeURIComponent(language)); } } Modified:
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -1028,6 +1028,9 @@ // care about visibility-status if (document.getElementById('sfv'+i).id && document.getElementById('sfv'+i).className == "filthidden") { filtstring2 += '_0'; + } + else { + filtstring2 += '_1'; } filtstring2 += '|'; @@ -1962,14 +1965,15 @@ case 'diff': case 'diff2': - document.getElementById('editzone').innerHTML = '<div id="frmdiff">'+ http_request.responseText + '</div>'; + document.getElementById('frmdiff').innerHTML = http_request.responseText; loadEditor('diffentry'); document.getElementById('frmeditdiff').innerHTML = WDiffShortenOutput(WDiffString(document.getElementById('frmeditdiff1').innerHTML, document.getElementById('frmeditdiff2').innerHTML)); break; case 'changetags': reloadEntryTableWithOffset(0); - alertbox('Action performed'); + if (http_request.responseText == '') alertbox('Action performed'); + else alertbox("Error while requested action:\n"+http_request.responseText); break; case 'changetags2': @@ -2194,32 +2198,32 @@ break; case '2': - filtstring2 = 'k_is_new_0|c_is_type_0|l_is_'+getLang()+'_0|o_desc_datetime'; + filtstring2 = 'k_is_new_0|c_is_type_0|l_is_'+getLang()+'_0|i_is_read_0|o_desc_datetime_0'; loadEntryTable('new'); break; case '3': - filtstring2 = 'y_is_page_0|k_is_stable_0|l_is_'+getLang()+'_0|o_asc_name'; + filtstring2 = 'y_is_page_0|k_is_stable_0|l_is_'+getLang()+'_0|i_is_read_0|o_asc_name_0'; loadEntryTable('page'); break; case '13': - filtstring2 = 'y_is_dynamic_0|k_is_stable_0|l_is_'+getLang()+'_0|o_asc_name'; + filtstring2 = 'y_is_dynamic_0|k_is_stable_0|l_is_'+getLang()+'_0|i_is_read_0|o_asc_name_0'; loadEntryTable('dynamic'); break; case '4': - filtstring2 = 'y_is_content_0|k_is_stable_0|l_is_'+getLang()+'_0|o_asc_name'; + filtstring2 = 'y_is_content_0|k_is_stable_0|l_is_'+getLang()+'_0|i_is_read_0|o_asc_name_0'; loadEntryTable('content'); break; case '5': - filtstring2 = 'y_is_template_0|k_is_stable_0|l_is_'+getLang()+'_0|o_asc_name'; + filtstring2 = 'y_is_template_0|k_is_stable_0|l_is_'+getLang()+'_0|i_is_read_0|o_asc_name_0'; loadEntryTable('template'); break; case '6': - filtstring2 = 'y_is_script_0|k_is_stable_0|l_is_'+getLang()+'_0|o_asc_name'; + filtstring2 = 'y_is_script_0|k_is_stable_0|l_is_'+getLang()+'_0|i_is_read_0|o_asc_name_0'; loadEntryTable('script'); break; @@ -2231,33 +2235,33 @@ else { translang = getLang(); } - filtstring2 = 'y_is_content_0|k_is_stable_0|i_is_default_0|c_is_user_0|l_is_'+roscms_standard_language+'_0|r_is_'+translang+'|o_desc_date'; + filtstring2 = 'y_is_content_0|k_is_stable_0|i_is_translate_0|c_is_user_0|l_is_'+roscms_standard_language+'_0|r_is_'+translang+'_0|o_desc_datetime_0'; loadEntryTable('translate'); break; case '8': default: - filtstring2 = 'c_is_type_0|l_is_'+getLang()+'|o_desc_datetime'; + filtstring2 = 'c_is_type_0|l_is_'+getLang()+'_0|i_is_read_0|o_desc_datetime_0'; loadEntryTable('all'); break; case '9': - filtstring2 = 's_is_true_0|c_is_type_0|l_is_'+getLang()+'_0|o_desc_datetime'; + filtstring2 = 's_is_true_0|c_is_type_0|l_is_'+getLang()+'_0|i_is_read_0|o_desc_datetime_0'; loadEntryTable('starred'); break; case '10': - filtstring2 = 'k_is_draft_0|u_is_'+roscms_intern_login_check_username+'_0|c_is_type_0|o_desc_datetime'; + filtstring2 = 'k_is_draft_0|u_is_'+roscms_intern_login_check_username+'_0|c_is_type_0|i_is_read_0|o_desc_datetime_0'; loadEntryTable('draft'); break; case '11': - filtstring2 = 'u_is_'+roscms_intern_login_check_username+'_0|c_is_type_0|o_desc_datetime'; + filtstring2 = 'u_is_'+roscms_intern_login_check_username+'_0|c_is_type_0|i_is_read_0|o_desc_datetime_0'; loadEntryTable('my'); break; case '12': - filtstring2 = 'k_is_archive_0|c_is_version_0|c_is_type_0|l_is_'+getLang()+'_0|o_asc_name|o_desc_ver'; + filtstring2 = 'k_is_archive_0|c_is_version_0|c_is_type_0|l_is_'+getLang()+'_0|o_asc_name_0|i_is_read_0|o_desc_ver_0'; roscms_archive = true; /* activate archive mode*/ loadEntryTable('archive'); break; @@ -2690,7 +2694,6 @@ var filtpopstr2 = filtpopstr.split('|'); for (var i=0; i < filtpopstr2.length; i++) { - lstfilterstr2 = ''; lstfilterstr2 = filtpopstr2[i].split('_'); if (lstfilterstr2[3] == 0) { Modified:
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -167,10 +167,10 @@ filtentryselstrs2 = '<select id="sfc'+filterid+'"><?php // ACL -$stmt=&DBConnection::getInstance()->prepare("SELECT id, name FROM ".ROSCMST_ACCESS." ORDER BY name ASC"); +$stmt=&DBConnection::getInstance()->prepare("SELECT id, name, name_short FROM ".ROSCMST_RIGHTS." ORDER BY name ASC"); $stmt->execute(); while($ACL=$stmt->fetch(PDO::FETCH_ASSOC)) { - echo '<option value="'. $ACL['id'] .'">'. $ACL['name'] .'</option>'; + echo '<option value="'. $ACL['name_short'] .'">'. $ACL['name'] .'</option>'; } ?></select>'; Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/CMSWebsiteSaveEntry.class.…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/CMSWebsiteSaveEntry.class.…
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/CMSWebsiteSaveEntry.class.…
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -51,7 +51,6 @@ */ private function save( ) { - $thisuser = &ThisUser::getInstance(); $type = (isset($_GET['d_val3']) ? $_GET['d_val3'] : ''); @@ -59,7 +58,7 @@ // detect if theres already a autosave-draft saved, and get rev_id if ($type == 'draft') { // draft - $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND user_id = :user_id AND lang_id = :lang ORDER BY id DESC LIMIT 1"); + $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND user_id = :user_id AND lang_id = :lang AND archive IS FALSE ORDER BY id DESC LIMIT 1"); $stmt->bindParam('data_id',$_GET['d_id'],PDO::PARAM_INT); $stmt->bindParam('user_id',$thisuser->id(),PDO::PARAM_INT); $stmt->bindParam('lang',$_GET['d_r_lang'],PDO::PARAM_INT); @@ -106,7 +105,7 @@ if ($type == 'submit') { Tag::update(Tag::getIdByUser($rev_id, 'status', -1),'new'); } - else if ($type == 'draft') { + else { Tag::update(Tag::getIdByUser($rev_id, 'status', -1),'draft'); } } Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -28,11 +28,18 @@ { public function __construct() { + global $db_host, $db_host, $db_user, $db_pass; include_once(ROSCMS_PATH.'connect.db.php'); try { - parent::__construct('mysql:dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS); - + parent::__construct('mysql:dbname='.$db_name.';host='.$db_host, $db_user, $db_pass); + + // unset loaded db config + unset($GLOBALS['db_name']); + unset($GLOBALS['db_host']); + unset($GLOBALS['db_user']); + unset($GLOBALS['db_pass']); + $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $this->setAttribute(PDO::ATTR_STATEMENT_CLASS,array('DBStatement', array($this))); } Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/Data.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/Data.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/Data.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -653,20 +653,23 @@ if ($revision['version'] == 0) { - $stmt=&DBConnection::getInstance()->prepare("SELECT id, data_id, version, lang_id FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version > 0 AND lang_id = :lang AND archive IS FALSE ORDER BY version DESC, id DESC LIMIT 1"); + // get next rev num + $stmt=&DBConnection::getInstance()->prepare("SELECT version FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version > 0 AND lang_id = :lang ORDER BY version DESC, id DESC LIMIT 1"); + $stmt->bindParam('data_id',$revision['data_id'],PDO::PARAM_INT); + $stmt->bindParam('lang',$revision['lang_id'],PDO::PARAM_INT); + $stmt->execute(); + $version_num = $stmt->fetchColumn()+1; + + // get latest stable entry + $stmt=&DBConnection::getInstance()->prepare("SELECT id, data_id, lang_id FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version > 0 AND lang_id = :lang AND archive IS FALSE ORDER BY version DESC, id DESC LIMIT 1"); $stmt->bindParam('data_id',$revision['data_id'],PDO::PARAM_INT); $stmt->bindParam('lang',$revision['lang_id'],PDO::PARAM_INT); $stmt->execute(); $stable_revision = $stmt->fetchOnce(PDO::FETCH_ASSOC); - // setup a new version number - $version_num = 1; // no stable entry exist, so skip move-process if ($stable_revision !== false) { - - // stable entry exist, so increase the version number - $version_num = $stable_revision['version'] + 1; // delete old tags $stmt=&DBConnection::getInstance()->prepare("DELETE FROM ".ROSCMST_TAGS." WHERE rev_id = :rev_id"); @@ -744,17 +747,27 @@ // delete entry case 'xe': - if ($thisuser->hasAccess('del_entry') || $revision['user_id'] == $thisuser->id()) { - - // copy to Archive if no admin - if (!$thisuser->hasAccess('del_wo_archiv')) { - Data::copy($revision['id'], 0, $lang_id); + if ($thisuser->hasAccess('more_lang') || $revision['lang_id'] == RosUser::getLanguage($thisuser->id(),true)) { + if ($thisuser->hasAccess('del_entry') || $revision['user_id'] == $thisuser->id() && $revision['version']==0) { + + // copy to Archive if no admin + if ($revision['version']) { + Data::deleteRevision($revision['id']); + } + elseif (!$thisuser->hasAccess('del_wo_archiv')) { + Data::toArchive($revision['id']); + } + else { + //Data::deleteFile($revision['id']); + Data::deleteRevision($revision['id']); + } } - //Data::deleteFile($revision['id']); - Data::deleteRevision($revision['id']); + else { + echo 'Not enough rights for delete process.'; + } } else { - echo 'Not enough rights for delete process.'; + echo 'You have no rights to delete entries from other languages'; } break; @@ -778,11 +791,11 @@ * @return bool * @access public */ - public static function toArchive($rev_id ) + public static function toArchive( $rev_id ) { // remove depencies DataDepencies::removeRevision($rev_id); - + // move into archive $stmt=&DBConnection::getInstance()->prepare("UPDATE ".ROSCMST_REVISIONS." SET archive = TRUE WHERE id=:rev_id"); $stmt->bindParam('rev_id',$rev_id,PDO::PARAM_INT); Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/Editor_Website.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/Editor_Website.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/Editor_Website.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -1,8 +1,8 @@ <?php /* RosCMS - ReactOS Content Management System - Copyright (C) 2007 Klemens Friedl <frik85(a)reactos.org> - 2008 Danny Götte <dangerground(a)web.de> + Copyright (C) 2007 Klemens Friedl <frik85(a)reactos.org> + 2008-2009 Danny Götte <dangerground(a)web.de> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -342,18 +342,13 @@ <input name="editautosavemode" type="hidden" value="false" />'); } - $stmt=&DBConnection::getInstance()->prepare("SELECT name, type FROM ".ROSCMST_ENTRIES." WHERE id = :data_id LIMIT 1"); + $stmt=&DBConnection::getInstance()->prepare("SELECT COUNT(id) FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version > 0 AND lang_id = :lang ORDER BY datetime DESC"); $stmt->bindParam('data_id',$this->data_id,PDO::PARAM_INT); - $stmt->execute(); - $data = $stmt->fetchOnce(); - - $stmt=&DBConnection::getInstance()->prepare("SELECT COUNT(*) FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON d.id = r.data_id WHERE d.name = :name AND r.version > 0 AND r.lang_id = :lang ORDER BY r.id DESC"); - $stmt->bindParam('name',$data['name'],PDO::PARAM_STR); $stmt->bindParam('lang',Language::getStandardId(),PDO::PARAM_INT); $stmt->execute(); $revisions_count = $stmt->fetchColumn(); - if ($revisions_count <= 1) { + if ($revisions_count == 0) { $stmt=&DBConnection::getInstance()->prepare("SELECT name FROM ".ROSCMST_LANGUAGES." WHERE id=:lang_id"); $stmt->bindParam('lang_id',Language::getStandardId(),PDO::PARAM_INT); $stmt->execute(); @@ -366,27 +361,27 @@ else { if (isset($_GET['d_arch']) && $_GET['d_arch']) { - $stmt=&DBConnection::getInstance()->prepare("SELECT r.id FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON d.id = r.data_id WHERE d.name = :name AND r.version > 0 AND r.lang_id = :lang AND r.archive IS TRUE ORDER BY r.id DESC LIMIT 2"); - $stmt->bindParam('name',$data['name'],PDO::PARAM_STR); + $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version > 0 AND lang_id = :lang AND archive IS TRUE ORDER BY datetime DESC LIMIT 2"); + $stmt->bindParam('data_id',$this->data_id,PDO::PARAM_INT); $stmt->bindParam('lang',Language::getStandardId(),PDO::PARAM_INT); $stmt->execute(); $diff2 = $stmt->fetch(); - $diff2 = 'ar'.$diff2['id']; + $diff2 = $diff2['id']; $diff1 = $stmt->fetchOnce(); - $diff1 = 'ar'.$diff1['id']; + $diff1 = $diff1['id']; } else { - $stmt=&DBConnection::getInstance()->prepare("SELECT r.id FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON d.id = r.data_id WHERE d.name = :name AND r.version > 0 AND r.lang_id = :lang AND r.archive IS FALSE ORDER BY r.id DESC LIMIT 1"); - $stmt->bindParam('name',$data['name'],PDO::PARAM_STR); + $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version > 0 AND lang_id = :lang AND archive IS FALSE ORDER BY datetime DESC LIMIT 1"); + $stmt->bindParam('data_id',$this->data_id,PDO::PARAM_INT); $stmt->bindParam('lang',Language::getStandardId(),PDO::PARAM_INT); $stmt->execute(); $diff2 = $stmt->fetchColumn(); - $stmt=&DBConnection::getInstance()->prepare("SELECT r.id FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON d.id = r.data_id WHERE d.name = :name AND r.version > 0 AND r.lang_id = :lang AND r.archive IS TRUE ORDER BY r.id DESC LIMIT 1"); - $stmt->bindParam('name',$data['name'],PDO::PARAM_STR); + $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM ".ROSCMST_REVISIONS." WHERE data_id = :data_id AND version > 0 AND lang_id = :lang AND archive IS TRUE ORDER BY datetime DESC LIMIT 1"); + $stmt->bindParam('data_id',$this->data_id,PDO::PARAM_INT); $stmt->bindParam('lang',Language::getStandardId(),PDO::PARAM_INT); $stmt->execute(); - $diff1 = 'ar'.$stmt->fetchColumn(); + $diff1 = $stmt->fetchColumn(); } echo_strip(' @@ -779,7 +774,12 @@ echo '<h3>Versions History</h3>'; // get a perfect mixed entry set - $dataset = $this->helperHistory(Tag::getValueByUser($this->rev_id, 'number', -1)); + if (ThisUser::getInstance()->hasAccess('more_lang')) { + $dataset = $this->helperHistory(); + } + else { + $dataset = $this->helperHistory(RosUser::getLanguage(ThisUser::getInstance()->id(),true)); + } $last_language = null; foreach ($dataset as $revision) { @@ -1053,16 +1053,16 @@ $last_lang = null; foreach($dataset as $revision) { - if ($revision['rev_language'] != $last_lang) { + if ($revision['lang_id'] != $last_lang) { if ($last_lang !== null) { echo '</optgroup>'; } - echo '<optgroup label="'.$revision['lang_name'].'">'; - $last_lang = $revision['rev_language']; - } - - echo '<option value="'.($revision['archive'] ? 'ar' : '').$revision['rev_id'].'"'.(($revision['rev_id'] == $selected_rev) ? ' selected="selected"' : '').'>'.$revision['data_name'].' ('.$revision['rev_date'].') - v. '.$revision['rev_version'].'; '.$revision['user_name'].'</option>'; + echo '<optgroup label="'.$revision['language'].'">'; + $last_lang = $revision['lang_id']; + } + + echo '<option value="'.$revision['id'].'"'.(($revision['id'] == $selected_rev) ? ' selected="selected"' : '').'>'.$revision['name'].' ('.$revision['date'].') - v. '.$revision['version'].'; '.$revision['user_name'].'</option>'; } echo '</optgroup>'; } @@ -1075,62 +1075,25 @@ */ private function showDifference( $rev_id1, $rev_id2 ) { - // get archive mode for entry 1 - if (substr($rev_id1, 0, 2) == 'ar') { - $h1_a = '_a'; - $h1_a2 = 'a'; - $rev_id1 = substr($rev_id1, 2); - } - else { - $h1_a = ''; - $h1_a2 = ''; - } - - // get archive mode for entry 2 - if (substr($rev_id2, 0, 2) == 'ar') { - $h2_a = '_a'; - $h2_a2 = 'a'; - $rev_id2 = substr($rev_id2, 2); - } - else { - $h2_a = ''; - $h2_a2 = ''; - } - // @TODO: add short text and optional long text additional entries // diff source 1 - $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name, d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id = d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN ".ROSCMST_LANGUAGES." l ON r.lang_id = l.id WHERE r.id = :rev_id LIMIT 1"); + $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name, d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name, t.content FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id = d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN ".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_TEXT." t ON t.rev_id=r.id WHERE r.id = :rev_id AND t.name='content' LIMIT 1"); $stmt->bindParam('rev_id',$rev_id1,PDO::PARAM_INT); $stmt->execute(); $revision1 = $stmt->fetchOnce(); - $stmt=&DBConnection::getInstance()->prepare("SELECT content FROM ".ROSCMST_TEXT." WHERE rev_id = :rev_id AND name = 'content' ORDER BY name ASC"); - $stmt->bindParam('rev_id',$rev_id1,PDO::PARAM_INT); - $stmt->execute(); - $text1 = $stmt->fetchColumn(); - // diff source 2 - $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name, d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id = d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN ".ROSCMST_LANGUAGES." l ON r.lang_id = l.id WHERE r.id = :rev_id LIMIT 1"); + $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name, d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name, t.content FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id = d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN ".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_TEXT." t ON t.rev_id=r.id WHERE r.id = :rev_id AND t.name='content' LIMIT 1"); $stmt->bindParam('rev_id',$rev_id2,PDO::PARAM_INT); $stmt->execute(); $revision2 = $stmt->fetchOnce(); - $stmt=&DBConnection::getInstance()->prepare("SELECT content FROM ".ROSCMST_TEXT." WHERE rev_id = :rev_id AND name = 'content' ORDER BY name ASC"); - $stmt->bindParam('rev_id',$rev_id2,PDO::PARAM_INT); - $stmt->execute(); - $text2 = $stmt->fetchColumn(); - // get data id from any stable revision - $this->data_id = $revision2['data_id']; - if ($h2_a2 != '') { - $this->data_id = $revision1['data_id']; - } + $this->data_id = $revision1['data_id']; echo_strip(' <div style="display: block; border-bottom: 1px solid #bbb; border-right: 1px solid #bbb; background: white none repeat scroll 0%;"> - <div style="margin:10px;"> - <br /> - <span>Compare</span>'); + <div style="margin:10px;">'); if ($rev_id1 == $rev_id2) { echo '<p>Please select two different entries to display the differences!</p>'; @@ -1144,18 +1107,18 @@ <tr> <td style="text-align:center;"> <select name="cbmdiff1" id="cbmdiff1" onchange="'."getDiffEntries(this.value, document.getElementById('cbmdiff2').value)".'">'); + $this->selectRevision($rev_id1); // history - $this->selectRevision($rev_id1); echo_strip(' </select> </td> <td style="width:50px;text-align:center;"> - <input type="submit" name="switchdiff" id="switchdiff" value="switch" onclick="'."getDiffEntries(document.getElementById('cbmdiff2').value, document.getElementById('cbmdiff1').value)".'" /> + <button name="switchdiff" id="switchdiff" onclick="'."getDiffEntries(document.getElementById('cbmdiff2').value, document.getElementById('cbmdiff1').value)".'">switch</button> </td> <td style="text-align:center;"> <select name="cbmdiff2" id="cbmdiff2" onchange="'."getDiffEntries(document.getElementById('cbmdiff1').value, this.value)".'">'); + $this->selectRevision($rev_id2); // history - $this->selectRevision($rev_id2); echo_strip(' </select> </td> @@ -1179,15 +1142,15 @@ <li>Language: '.$revision2['language'].'</li> <li>User: '.$revision2['user_name'].'</li>'); if (ThisUser::getInstance()->hasAccess('entry_details')) { - echo '<li>ID: '.$revision2['id'].'</li>'; + echo '<li>Rev-ID: '.$revision2['id'].'</li>'; } echo_strip(' </ul> </td> </tr> </table> - <div><pre id="frmeditdiff1" style="display: none;">');echo $text1;echo_strip('</pre></div> - <div><pre id="frmeditdiff2" style="display: none;">');echo $text2;echo_strip('</pre></div> + <div id="frmeditdiff1" style="display: none;">');echo $revision1['content'];echo_strip('</div> + <div id="frmeditdiff2" style="display: none;">');echo $revision2['content'];echo_strip('</div> <div style="display: block;border-bottom: 1px solid #bbb; border-right: 1px solid #bbb; border-top: 1px solid #e3e3e3; border-left: 1px solid #e3e3e3; background: #F2F2F2;"> <pre style="margin:10px; font-size:9px; font-family:Arial, Helvetica, sans-serif;" id="frmeditdiff"> </pre> </div> @@ -1202,18 +1165,26 @@ * @param mixed data_normal should be already in right order * @access private */ - private function helperHistory( ) + private function helperHistory( $lang_id = null ) { // check stable entries $stmt=&DBConnection::getInstance()->prepare("SELECT name, type FROM ".ROSCMST_ENTRIES." WHERE id = :data_id LIMIT 1"); $stmt->bindParam('data_id',$this->data_id,PDO::PARAM_INT); $stmt->execute(); - $data = $stmt->fetchOnce(); - - // select active entries - $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name, r.id, l.name AS language, r.version, r.datetime, u.name AS user_name FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id = d.id JOIN ".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_USERS." u ON u.id = r.user_id WHERE d.name = :name AND d.type = :type AND r.version > 0 ORDER BY l.name ASC, r.datetime DESC"); - $stmt->bindParam('name',$data['data_name'],PDO::PARAM_STR); - $stmt->bindParam('type',$data['data_type'],PDO::PARAM_STR); + $data = $stmt->fetchOnce(PDO::FETCH_ASSOC); + + // select all related entries + if ($lang_id === null) { + $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name, r.id, r.lang_id, l.name AS language, r.version, DATE(r.datetime) as date, r.datetime, u.name AS user_name, r.archive FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id = d.id JOIN ".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_USERS." u ON u.id = r.user_id WHERE d.name = :name AND d.type = :type AND r.version > 0 ORDER BY l.name ASC, r.datetime DESC"); + } + + // select only one language + else { + $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name, r.id, r.lang_id, l.name AS language, r.version, DATE(r.datetime) as date, r.datetime, u.name AS user_name, r.archive FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id = d.id JOIN ".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_USERS." u ON u.id = r.user_id WHERE d.name = :name AND d.type = :type AND r.version > 0 AND r.lang_id=:lang_id ORDER BY l.name ASC, r.datetime DESC"); + $stmt->bindParam('lang_id',$lang_id,PDO::PARAM_INT); + } + $stmt->bindParam('name',$data['name'],PDO::PARAM_STR); + $stmt->bindParam('type',$data['type'],PDO::PARAM_STR); $stmt->execute(); return $stmt->fetchAll(PDO::FETCH_ASSOC); } // end of member function helperHistory Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_User.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_User.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_User.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -52,13 +52,7 @@ public function search( ) { $thisuser = &ThisUser::getInstance(); - $display = ''; // list / user details - $user_id = $_GET['d_val']; - $search_string = $_GET['d_val']; - $group_id = @$_GET['d_val2']; - $new_lang = @$_GET['d_val2']; - $search_type = @$_GET['d_Val2']; if (!$thisuser->hasAccess('user')) { return; @@ -79,27 +73,28 @@ } if (isset($_GET['d_fl'])) { - // do some actions switch ($_GET['d_fl']) { case 'addmembership': // check if user is already member, so we don't add him twice // also check that you don't give accounts a higher seclevel - $stmt=&DBConnection::getInstance()->prepare("SELECT 1 FROM ".ROSCMST_MEMBERSHIPS." m JOIN ".ROSCMST_GROUPS." g ON m.group_id = g.id WHERE m.user_id = :user_id AND m.group_id = :group_id LIMIT 1"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); - $stmt->bindParam('group_id',$group_id,PDO::PARAM_STR); + $stmt=&DBConnection::getInstance()->prepare("SELECT DISTINCT g.security_level FROM ".ROSCMST_GROUPS." g JOIN ".ROSCMST_MEMBERSHIPS." m ON m.group_id=g.id WHERE g.id = :group_id AND m.user_id != :user_id LIMIT 1"); + $stmt->bindParam('group_id',$_GET['group'],PDO::PARAM_INT); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); $stmt->execute(); - if ($stmt->fetchColumn() === false) { + $level = $stmt->fetchColumn(); + + if ($level !== false && $thisuser->hasAccess('addlvl'.$level.'group')) { // insert new membership $stmt=&DBConnection::getInstance()->prepare("INSERT INTO ".ROSCMST_MEMBERSHIPS." ( user_id , group_id ) VALUES ( :user_id, :group_id )"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); - $stmt->bindParam('group_id',$group_id,PDO::PARAM_INT); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); + $stmt->bindParam('group_id',$_GET['group'],PDO::PARAM_INT); $stmt->execute(); if ($user_lang !== false) { - Log::writeLangMedium('add user account membership: user-id='.$user_id.', group-id='.$group_id.' done by '.$thisuser->id().' {data_user_out}', $user_lang); + Log::writeLangMedium('add user account membership: user-id='.$_GET['user'].', group-id='.$_GET['group'].' done by '.$thisuser->id().' {data_user_out}', $user_lang); } - Log::writeMedium('add user account membership: user-id='.$user_id.', group-id='.$group_id.' done by '.$thisuser->id().' {data_user_out}'); + Log::writeMedium('add user account membership: user-id='.$_GET['user'].', group-id='.$_GET['group'].' done by '.$thisuser->id().' {data_user_out}'); } // preselect displayed content $display = 'detail'; @@ -107,13 +102,13 @@ case 'delmembership': $stmt=&DBConnection::getInstance()->prepare("DELETE FROM ".ROSCMST_MEMBERSHIPS." WHERE user_id = :user_id AND group_id = :group_id LIMIT 1"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); - $stmt->bindParam('group_id',$group_id,PDO::PARAM_INT); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); + $stmt->bindParam('group_id',$_GET['group'],PDO::PARAM_INT); $stmt->execute(); if ($user_lang !== false) { - Log::writeLangMedium('delete user account membership: user-id='.$user_id.', group-id='.$group_id.' done by '.$thisuser->id().' {data_user_out}', $user_lang); - } - Log::writeMedium('delete user account membership: user-id='.$user_id.', group-id='.$group_id.' done by '.$thisuser->id().' {data_user_out}'); + Log::writeLangMedium('delete user account membership: user-id='.$_GET['user'].', group-id='.$_GET['group'].' done by '.$thisuser->id().' {data_user_out}', $user_lang); + } + Log::writeMedium('delete user account membership: user-id='.$_GET['user'].', group-id='.$_GET['group'].' done by '.$thisuser->id().' {data_user_out}'); // preselect displayed content $display = 'detail'; break; @@ -122,7 +117,7 @@ // only with admin rights if ($thisuser->hasAccess('disableaccount')) { $stmt=&DBConnection::getInstance()->prepare("UPDATE ".ROSCMST_USERS." SET disabled = TRUE WHERE id = :user_id"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); $stmt->execute(); } // preselect displayed content @@ -134,7 +129,7 @@ if ($thisuser->hasAccess('disableaccount')) { // enable account only, if he has already activated his account $stmt=&DBConnection::getInstance()->prepare("UPDATE ".ROSCMST_USERS." SET disabled = FALSE WHERE activation = '' AND id = :user_id"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); $stmt->execute(); } // preselect displayed content @@ -143,13 +138,13 @@ case 'upateusrlang': $stmt=&DBConnection::getInstance()->prepare("UPDATE ".ROSCMST_USERS." SET lang_id = :lang WHERE id = :user_id"); - $stmt->bindParam('lang',$group_id); - $stmt->bindParam('user_id',$user_id); + $stmt->bindParam('lang',$_GET['lang']); + $stmt->bindParam('user_id',$_GET['user']); $stmt->execute(); if ($user_lang) { - Log::writeLangMedium('change user account language: user-id='.$user_id.', lang-id='.$group_id.' done by '.$thisuser->id().' {data_user_out}', $user_lang); - } - Log::writeMedium('change user account language: user-id='.$user_id.', lang-id='.$group_id.' done by '.$thisuser->id().' {data_user_out}'); + Log::writeLangMedium('change user account language: user-id='.$_GET['user'].', lang-id='.$_GET['lang'].' done by '.$thisuser->id().' {data_user_out}', $user_lang); + } + Log::writeMedium('change user account language: user-id='.$_GET['user'].', lang-id='.$_GET['lang'].' done by '.$thisuser->id().' {data_user_out}'); // preselect displayed content $display = 'detail'; break; @@ -162,13 +157,13 @@ // list / details if($display == 'list') { - if (isset($_GET['d_val']) &&strlen($_GET['d_val']) > 2) { + if (isset($_GET['phrase']) && strlen($_GET['phrase']) > 2) { echo_strip(' <fieldset> <legend>Results</legend> <ul>'); - switch ($search_type) { + switch ($_GET['option']) { case 'fullname': $sql_search = "u.fullname"; break; @@ -179,8 +174,10 @@ $sql_search = "u.homepage"; break; case 'language': - $sql_search = "l.name"; - break; + if ($thisuser->hasAccess('more_lang')) { + $sql_search = "l.name"; + break; + } case 'accountname': default: $sql_search = "u.name"; @@ -191,13 +188,13 @@ $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.fullname, l.name AS language FROM ".ROSCMST_USERS." u JOIN ".ROSCMST_LANGUAGES." l ON u.lang_id=l.id WHERE ". $sql_search ." LIKE :value ORDER BY u.name ASC LIMIT 25"); } else { - $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.fullname, l.name AS language FROM ".ROSCMST_USERS." u JOIN ".ROSCMST_LANGUAGES." l ON u.lang_id=l.id WHERE ". $sql_search ." LIKE :value AND u.lang_id=:user_lang ORDER BY u.name ASC LIMIT 25"); + $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.fullname, l.name AS language FROM ".ROSCMST_USERS." u JOIN ".ROSCMST_LANGUAGES." l ON u.lang_id=l.id WHERE ". $sql_search ." LIKE :value AND l.id=:user_lang ORDER BY u.name ASC LIMIT 25"); $stmt->bindValue('user_lang',$user_lang,PDO::PARAM_INT); } - $stmt->bindValue('value','%'.$search_string.'%',PDO::PARAM_INT); + $stmt->bindValue('value','%'.$_GET['phrase'].'%',PDO::PARAM_INT); $stmt->execute(); $users = $stmt->fetchAll(PDO::FETCH_ASSOC); - foreach ( $users as $user) { + foreach ($users as $user) { echo_strip(' <li> <a href="'."javascript:getUserDetails('".$user['id']."')".'">'.$user['name'].'</a> @@ -219,7 +216,7 @@ elseif ($display == 'detail') { $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.modified, u.logins, u.created, u.fullname, u.email, l.name AS language, u.disabled FROM ".ROSCMST_USERS." u JOIN ".ROSCMST_LANGUAGES." l ON l.id=u.lang_id WHERE u.id = :user_id LIMIT 1"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); $stmt->execute(); $user = $stmt->fetchOnce(); @@ -245,7 +242,7 @@ <ul>'); $stmt=&DBConnection::getInstance()->prepare("SELECT g.name, m.group_id FROM ".ROSCMST_GROUPS." g JOIN ".ROSCMST_MEMBERSHIPS." m ON g.id=m.group_id WHERE m.user_id = :user_id ORDER BY g.name ASC"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); $stmt->execute(); while ($membership = $stmt->fetch(PDO::FETCH_ASSOC)) { @@ -253,7 +250,7 @@ if ($thisuser->hasAccess('delmembership')) { echo_strip(' - <span class="frmeditbutton" onclick="'."delMembership(".$user_id.", '".$membership['group_id']."')".'"> + <span class="frmeditbutton" onclick="'."delMembership(".$_GET['user'].", '".$membership['group_id']."')".'"> <img src="images/remove.gif" alt="" style="width:11px; height:11px; border:0px;" /> Delete </span>'); @@ -264,18 +261,18 @@ if ($thisuser->hasAccess('addmembership')) { echo '<select id="cbmmemb" name="cbmmemb">'; - $stmt=&DBConnection::getInstance()->prepare("SELECT g.id, g.name FROM ".ROSCMST_MEMBERSHIPS." m JOIN ".ROSCMST_GROUPS." g ON g.id!=m.group_id WHERE m.user_id != :user-id ORDER BY g.name ASC"); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); + $stmt=&DBConnection::getInstance()->prepare("SELECT id, name, security_level FROM ".ROSCMST_GROUPS." WHERE id NOT IN(SELECT group_id FROM ".ROSCMST_MEMBERSHIPS." WHERE user_id=:user_id) ORDER BY name ASC"); + $stmt->bindParam('user_id',$_GET['user'],PDO::PARAM_INT); $stmt->execute(); while ($group = $stmt->fetch(PDO::FETCH_ASSOC)) { // only super admin can give super admin rights - if ($group['usrgroup_name'] != 'sadmin' || $thisuser->hasAccess('addLvl')) { + if ($thisuser->hasAccess('addlvl'.$group['security_level'].'group')) { echo '<option value="'.$group['id'].'">'.$group['name'].'</option>'; } } echo_strip('</select> - <input type="button" name="addmemb" id="addmemb" value="Add Membership" onclick="'."getUserDetails(".$user_id.", document.getElementById('cbmmemb').value)".'" /> + <button name="addmemb" id="addmemb" onclick="'."addMembership(".$_GET['user'].", document.getElementById('cbmmemb').value)".'">Add Membership</button> <br /> <br /> <select id="cbmusrlang" name="cbmusrlang">'); @@ -285,20 +282,13 @@ echo '<option value="'.$lang['id'].'">'.$lang['name'].'</option>'; } echo_strip('</select> - <input type="button" name="addusrlang" id="addusrlang" value="Update User language" onclick="'."updateUserLang(".$user_id.", document.getElementById('cbmusrlang').value)".'" /><br />'); + <input type="button" name="addusrlang" id="addusrlang" value="Update User language" onclick="'."updateUserLang(".$_GET['user'].", document.getElementById('cbmusrlang').value)".'" /><br />'); } elseif ($thisuser->hasAccess('addtransl')) { - echo_strip('<input type="button" name="addmemb" id="addmemb" value="Make this User a Translator" onclick="'."getUserDetails(".$user_id.", 'translator')".'" /> - <br /> - <br />'); - $stmt=&DBConnection::getInstance()->prepare("SELECT l.id, l.name FROM ".ROSCMST_USERS." u JOIN ".ROSCMST_LANGUAGES." l ON l.id=u.lang_id WHERE id = :user_id LIMIT 1"); - $stmt->bindParam('user_id',$thisuser->id(),PDO::PARAM_INT); + $stmt=&DBConnection::getInstance()->prepare("SELECT id FROm ".ROSCMST_GROUPS." WHERE name_short='translator'"); $stmt->execute(); - $lang = $stmt->fetchColumn(); - - if ($lang !== false) { - echo '<input type="button" name="addusrlang" id="addusrlang" value="Switch User language to \''.$lang['name'].'\'" onclick="'."updateUserLang(".$user_id.", '".$lang['id'].")".'" /><br />'; - } + + echo '<input type="button" name="addmemb" id="addmemb" value="Make this User a Translator" onclick="'."addMembership(".$_GET['user'].", '".$stmt->fetchColumn()."')".'" />'; } echo '</fieldset><br />'; Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_XML.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_XML.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_XML.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -157,7 +157,7 @@ $stmt_acl=&DBConnection::getInstance()->prepare("SELECT name FROM ".ROSCMST_ACCESS." WHERE id = :access_id LIMIT 1"); // make the order command ready for usage - if ($this->sql_order == '') { + if ($this->sql_order == null) { $this->sql_order = " ORDER BY r.id DESC"; } else { @@ -591,7 +591,7 @@ // security (ACL) case 'i': - $this->sql_where .= "d.access_id".($type_b=='is' ? '=':'!=').DBConnection::getInstance()->quote($type_c,PDO::PARAM_STR); + $this->sql_where .= "d.access_id ".($type_b=='is' ?'':"NOT ")."IN (".Data::hasAccessAsList($type_c).")"; break; // metadata Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/Generate.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/Generate.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/Generate.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -18,10 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -function getTagValueG($data_id, $rev_id, $user, $name) { - return Tag::getValue($rev_id, $name, $user); -} + /** * class Generate @@ -60,10 +57,6 @@ $this->output_type = $output_type; $this->begin = date('Y-m-d H:i:s'); - //@DEPRACTED - mysql_connect(DB_HOST, DB_USER, DB_PASS); - mysql_select_db(DB_NAME); - // try to force unlimited script runtime @set_time_limit(300); } @@ -191,7 +184,7 @@ $content = str_replace('[#'.$this->short[$depency['type']].'_'.$depency['name'].']', $this->getCached(array(null, $this->short[$depency['type']].'_'.$depency['name'])), $content); } // eval - else {echo '[#inc_'.$depency['name'].']'; + else { $content = str_replace('[#inc_'.$depency['name'].']', $this->evalTemplate(array(null,$depency['name'])), $content); } } @@ -689,7 +682,7 @@ $roscms_lang_id = $this->lang_id; // execute code and return the output - eval($revision['content']); + eval('?>'.$revision['content']); $content = ob_get_contents(); ob_end_clean(); } Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_User.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_User.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_User.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -62,14 +62,6 @@ <h2>User</h2> <p style="font-weight: bold;">User Account Management Interface</p> <br />'); - - if ($thisuser->hasAccess('more_lang')) { - $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.fullname, l.name AS language, COUNT(r.id) as editcounter FROM ".ROSCMST_REVISIONS." r JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN ".ROSCMST_LANGUAGES." l ON u.lang_id=l.id WHERE r.version > 0 GROUP BY u.name ORDER BY editcounter DESC, u.name"); - } - else { - $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.fullname, l.name AS language, COUNT(r.id) as editcounter FROM ".ROSCMST_REVISIONS." r JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN ".ROSCMST_LANGUAGES." l ON u.lang_id=l.id WHERE r.version > 0 AND r.lang_id = :lang GROUP BY u.name ORDER BY editcounter DESC, u.name"); - $stmt->bindParam('lang',Language::getStandardId(),PDO::PARAM_INT); - } echo_strip(' <div> @@ -85,12 +77,30 @@ <div id="userarea"></div> <br /> <br /> - <h4>Translators</h4> - <ul>'); + <h4>Translators</h4>'); + // get list of translators + if ($thisuser->hasAccess('more_lang')) { + $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.fullname, l.name AS language, COUNT(r.id) as editcounter FROM ".ROSCMST_REVISIONS." r JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN ".ROSCMST_LANGUAGES." l ON u.lang_id=l.id WHERE r.version > 0 GROUP BY u.id ORDER BY l.level DESC, l.name ASC, editcounter DESC, u.name ASC"); + } + // get list only for one language + else { + $stmt=&DBConnection::getInstance()->prepare("SELECT u.id, u.name, u.fullname, l.name AS language, (SELECT COUNT(id) FROM ".ROSCMST_REVISIONS." WHERE user_id = u.id AND version > 0) as editcounter FROM ".ROSCMST_USERS." u JOIN ".ROSCMST_LANGUAGES." l ON u.lang_id=l.id JOIN ".ROSCMST_MEMBERSHIPS." m ON m.user_id=u.id JOIN ".ROSCMST_GROUPS." g ON g.id=m.group_id WHERE g.name_short='translator' AND u.lang_id = :lang ORDER BY editcounter DESC, u.name ASC"); + $stmt->bindParam('lang',ROSUser::getLanguage($thisuser->id(),true),PDO::PARAM_INT); + } + + // output list of translators $stmt->execute(); + $oldlang = null; while ($translator = $stmt->fetch(PDO::FETCH_ASSOC)) { - echo '<li>'.$translator['name'].' ('.$translator['fullname'].'; '.$translator['language'].') '.$translator['editcounter'].' stable edits</li>'; + if ($oldlang != $translator['language']) { + if ($oldlang !== null) { + echo '</ul>'; + } + echo '<h5>'.$translator['language'].'</h5><ul>'; + } + $oldlang = $translator['language']; + echo '<li>'.$translator['name'].' ('.$translator['fullname'].') '.$translator['editcounter'].' stable edits</li>'; } echo_strip(' Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Website.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Website.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Website.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -310,6 +310,7 @@ <div id="frmedithead" style="padding-bottom: 10px;"> </div> <div style="width:100%;"> <div id="editzone"> </div> + <div id="frmdiff"></div> </div> </div> </div> Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/Tag.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/roscms/lib/Tag.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/Tag.class.php
[iso-8859-1] Mon Jan 19 13:01:51 2009 @@ -163,10 +163,11 @@ public static function update( $tag_id, $new_value ) { // tag already exists ? - $stmt=&DBConnection::getInstance()->prepare("SELECT 1 FROM ".ROSCMST_TAGS." WHERE tag_id = :tag_id AND user_id IN(-1, 0, :user_id) LIMIT 1"); + $stmt=&DBConnection::getInstance()->prepare("SELECT 1 FROM ".ROSCMST_TAGS." WHERE id = :tag_id AND user_id IN(-1, 0, :user_id) LIMIT 1"); $stmt->bindParam('tag_id',$tag_id,PDO::PARAM_INT); $stmt->bindParam('user_id',ThisUser::getInstance()->id(),PDO::PARAM_INT); - if ($stmt->fetchColumn() || ThisUser::getInstance()->hasAccess('updatetag')) { + $stmt->execute(); + if ($stmt->fetchColumn()) { // update value $stmt=&DBConnection::getInstance()->prepare("UPDATE ".ROSCMST_TAGS." SET value = :new_value WHERE id=:tag_id");
15 years, 11 months
1
0
0
0
[tkreuzer] 38951: Remove double brackets, I missed. Add a DPRINT1 if kernel is not loaded.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Jan 19 12:50:19 2009 New Revision: 38951 URL:
http://svn.reactos.org/svn/reactos?rev=38951&view=rev
Log: Remove double brackets, I missed. Add a DPRINT1 if kernel is not loaded. Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/drivemap.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/linuxboot.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/conversion.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/peloader.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/winldr.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlregistry.c Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -288,11 +288,11 @@ } StallExecutionProcessor(10); } - DPRINTM((DPRINT_DISK, "status=0x%x\n", Status)); - DPRINTM((DPRINT_DISK, "waited %d usecs for busy to clear\n", RetryCount * 10)); + DPRINTM(DPRINT_DISK, "status=0x%x\n", Status); + DPRINTM(DPRINT_DISK, "waited %d usecs for busy to clear\n", RetryCount * 10); if (RetryCount >= IDE_MAX_BUSY_RETRIES) { - DPRINTM((DPRINT_DISK, "Drive is BUSY for too long\n")); + DPRINTM(DPRINT_DISK, "Drive is BUSY for too long\n"); return FALSE; } @@ -307,22 +307,22 @@ /* Issue command to drive */ if (DrvHead & IDE_DH_LBA) { - DPRINTM((DPRINT_DISK, "READ:DRV=%d:LBA=1:BLK=%d:SC=0x%x:CM=0x%x\n", + DPRINTM(DPRINT_DISK, "READ:DRV=%d:LBA=1:BLK=%d:SC=0x%x:CM=0x%x\n", DrvHead & IDE_DH_DRV1 ? 1 : 0, ((DrvHead & 0x0f) << 24) + (CylinderHigh << 16) + (CylinderLow << 8) + SectorNum, SectorCnt, - Command)); + Command); } else { - DPRINTM((DPRINT_DISK, "READ:DRV=%d:LBA=0:CH=0x%x:CL=0x%x:HD=0x%x:SN=0x%x:SC=0x%x:CM=0x%x\n", + DPRINTM(DPRINT_DISK, "READ:DRV=%d:LBA=0:CH=0x%x:CL=0x%x:HD=0x%x:SN=0x%x:SC=0x%x:CM=0x%x\n", DrvHead & IDE_DH_DRV1 ? 1 : 0, CylinderHigh, CylinderLow, DrvHead & 0x0f, SectorNum, SectorCnt, - Command)); + Command); } /* Setup command parameters */ @@ -411,7 +411,7 @@ { if (SectorCount >= SectorCnt) { - DPRINTM((DPRINT_DISK, "Buffer size exceeded!\n")); + DPRINTM(DPRINT_DISK, "Buffer size exceeded!\n"); Junk = TRUE; } break; @@ -420,8 +420,8 @@ { if (SectorCount > SectorCnt) { - DPRINTM((DPRINT_DISK, "Read %lu sectors of junk!\n", - SectorCount - SectorCnt)); + DPRINTM(DPRINT_DISK, "Read %lu sectors of junk!\n", + SectorCount - SectorCnt); } IDEWriteDriveControl(ControlPort, 0); StallExecutionProcessor(50); @@ -443,13 +443,13 @@ if (DriveNumber < 0x80 || 2 <= (DriveNumber & 0x0f)) { /* Xbox has only 1 IDE controller and no floppy */ - DPRINTM((DPRINT_DISK, "Invalid drive number\n")); + DPRINTM(DPRINT_DISK, "Invalid drive number\n"); return FALSE; } if (UINT64_C(0) != ((SectorNumber + SectorCount) & UINT64_C(0xfffffffff0000000))) { - DPRINTM((DPRINT_DISK, "48bit LBA required but not implemented\n")); + DPRINTM(DPRINT_DISK, "48bit LBA required but not implemented\n"); return FALSE; } @@ -522,7 +522,7 @@ (Atapi ? IDE_CMD_IDENT_ATAPI_DRV : IDE_CMD_IDENT_ATA_DRV), (PUCHAR) &DrvParms)) { - DPRINTM((DPRINT_DISK, "XboxDiskPolledRead() failed\n")); + DPRINTM(DPRINT_DISK, "XboxDiskPolledRead() failed\n"); return FALSE; } @@ -537,7 +537,7 @@ } else { - DPRINTM((DPRINT_DISK, "BytesPerSector %d\n", DrvParms.BytesPerSector)); + DPRINTM(DPRINT_DISK, "BytesPerSector %d\n", DrvParms.BytesPerSector); if (DrvParms.BytesPerSector == 0) { Geometry->BytesPerSector = 512; @@ -554,10 +554,10 @@ } } } - DPRINTM((DPRINT_DISK, "Cylinders %d\n", Geometry->Cylinders)); - DPRINTM((DPRINT_DISK, "Heads %d\n", Geometry->Heads)); - DPRINTM((DPRINT_DISK, "Sectors %d\n", Geometry->Sectors)); - DPRINTM((DPRINT_DISK, "BytesPerSector %d\n", Geometry->BytesPerSector)); + DPRINTM(DPRINT_DISK, "Cylinders %d\n", Geometry->Cylinders); + DPRINTM(DPRINT_DISK, "Heads %d\n", Geometry->Heads); + DPRINTM(DPRINT_DISK, "Sectors %d\n", Geometry->Sectors); + DPRINTM(DPRINT_DISK, "BytesPerSector %d\n", Geometry->BytesPerSector); return TRUE; } Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -45,8 +45,8 @@ PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { - DPRINTM((DPRINT_HWDETECT, - "Failed to allocate a full resource descriptor\n")); + DPRINTM(DPRINT_HWDETECT, + "Failed to allocate a full resource descriptor\n"); return; } @@ -76,17 +76,17 @@ } else { - DPRINTM((DPRINT_HWDETECT, "Reading disk geometry failed\n")); + DPRINTM(DPRINT_HWDETECT, "Reading disk geometry failed\n"); MmHeapFree(PartialResourceList); return; } - DPRINTM((DPRINT_HWDETECT, + DPRINTM(DPRINT_HWDETECT, "Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n", DriveNumber, DiskGeometry->NumberOfCylinders, DiskGeometry->NumberOfHeads, DiskGeometry->SectorsPerTrack, - DiskGeometry->BytesPerSector)); + DiskGeometry->BytesPerSector); FldrSetConfigurationData(DiskKey, PartialResourceList, Size); MmHeapFree(PartialResourceList); @@ -108,7 +108,7 @@ /* Read the MBR */ if (!MachDiskReadLogicalSectors(DriveNumber, 0ULL, 1, (PVOID)DISKREADBUFFER)) { - DPRINTM((DPRINT_HWDETECT, "Reading MBR failed\n")); + DPRINTM(DPRINT_HWDETECT, "Reading MBR failed\n"); return; } @@ -116,7 +116,7 @@ Mbr = (PMASTER_BOOT_RECORD)DISKREADBUFFER; Signature = Mbr->Signature; - DPRINTM((DPRINT_HWDETECT, "Signature: %x\n", Signature)); + DPRINTM(DPRINT_HWDETECT, "Signature: %x\n", Signature); /* Calculate the MBR checksum */ Checksum = 0; @@ -125,7 +125,7 @@ Checksum += Buffer[i]; } Checksum = ~Checksum + 1; - DPRINTM((DPRINT_HWDETECT, "Checksum: %x\n", Checksum)); + DPRINTM(DPRINT_HWDETECT, "Checksum: %x\n", Checksum); /* Fill out the ARC disk block */ reactos_arc_disk_info[reactos_disk_count].Signature = Signature; @@ -157,7 +157,7 @@ Identifier[17] = '-'; Identifier[18] = 'A'; Identifier[19] = 0; - DPRINTM((DPRINT_HWDETECT, "Identifier: %s\n", Identifier)); + DPRINTM(DPRINT_HWDETECT, "Identifier: %s\n", Identifier); /* Set identifier */ FldrSetIdentifier(DiskKey, Identifier); @@ -195,16 +195,16 @@ } if (! Changed) { - DPRINTM((DPRINT_HWDETECT, "BIOS reports success for disk %d but data didn't change\n", - (int)DiskCount)); + DPRINTM(DPRINT_HWDETECT, "BIOS reports success for disk %d but data didn't change\n", + (int)DiskCount); break; } DiskCount++; memset((PVOID) DISKREADBUFFER, 0xcd, 512); } DiskReportError(TRUE); - DPRINTM((DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n", - (int)DiskCount, (DiskCount == 1) ? "": "s")); + DPRINTM(DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n", + (int)DiskCount, (DiskCount == 1) ? "": "s"); FldrCreateComponentKey(BusKey, L"DiskController", @@ -212,7 +212,7 @@ ControllerClass, DiskController, &ControllerKey); - DPRINTM((DPRINT_HWDETECT, "Created key: DiskController\\0\n")); + DPRINTM(DPRINT_HWDETECT, "Created key: DiskController\\0\n"); /* Set 'ComponentInformation' value */ FldrSetComponentInformation(ControllerKey, @@ -228,8 +228,8 @@ PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { - DPRINTM((DPRINT_HWDETECT, - "Failed to allocate resource descriptor\n")); + DPRINTM(DPRINT_HWDETECT, + "Failed to allocate resource descriptor\n"); return; } @@ -256,13 +256,13 @@ Int13Drives[i].MaxHeads = Geometry.Heads - 1; Int13Drives[i].NumberDrives = DiskCount; - DPRINTM((DPRINT_HWDETECT, + DPRINTM(DPRINT_HWDETECT, "Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n", 0x80 + i, Geometry.Cylinders - 1, Geometry.Heads -1, Geometry.Sectors, - Geometry.BytesPerSector)); + Geometry.BytesPerSector); } } @@ -326,8 +326,8 @@ PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { - DPRINTM((DPRINT_HWDETECT, - "Failed to allocate resource descriptor\n")); + DPRINTM(DPRINT_HWDETECT, + "Failed to allocate resource descriptor\n"); return; } @@ -355,7 +355,7 @@ PCONFIGURATION_COMPONENT_DATA SystemKey; ULONG BusNumber = 0; - DPRINTM((DPRINT_HWDETECT, "DetectHardware()\n")); + DPRINTM(DPRINT_HWDETECT, "DetectHardware()\n"); /* Create the 'System' key */ FldrCreateSystemKey(&SystemKey); @@ -369,7 +369,7 @@ /* TODO: Build actual xbox's hardware configuration tree */ DetectIsaBios(SystemKey, &BusNumber); - DPRINTM((DPRINT_HWDETECT, "DetectHardware() Done\n")); + DPRINTM(DPRINT_HWDETECT, "DetectHardware() Done\n"); return SystemKey; } Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/drivemap.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/drivemap.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/drivemap.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -96,19 +96,19 @@ DriveMapList.DriveMap[(DriveMapList.DriveMapCount * 2)+1] = DriveMapGetBiosDriveNumber(Drive2); DriveMapList.DriveMapCount++; - DPRINTM((DPRINT_WARNING, "Mapping BIOS drive 0x%x to drive 0x%x\n", DriveMapGetBiosDriveNumber(Drive1), DriveMapGetBiosDriveNumber(Drive2))); + DPRINTM(DPRINT_WARNING, "Mapping BIOS drive 0x%x to drive 0x%x\n", DriveMapGetBiosDriveNumber(Drive1), DriveMapGetBiosDriveNumber(Drive2)); } } } if (DriveMapList.DriveMapCount) { - DPRINTM((DPRINT_WARNING, "Installing Int13 drive map for %d drives.\n", DriveMapList.DriveMapCount)); + DPRINTM(DPRINT_WARNING, "Installing Int13 drive map for %d drives.\n", DriveMapList.DriveMapCount); DriveMapInstallInt13Handler(&DriveMapList); } else { - DPRINTM((DPRINT_WARNING, "Removing any previously installed Int13 drive map.\n")); + DPRINTM(DPRINT_WARNING, "Removing any previously installed Int13 drive map.\n"); DriveMapRemoveInt13Handler(); } } Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/linuxboot.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -286,14 +286,14 @@ DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512); - DPRINTM((DPRINT_LINUX, "SetupSectors: %d\n", LinuxBootSector->SetupSectors)); - DPRINTM((DPRINT_LINUX, "RootFlags: 0x%x\n", LinuxBootSector->RootFlags)); - DPRINTM((DPRINT_LINUX, "SystemSize: 0x%x\n", LinuxBootSector->SystemSize)); - DPRINTM((DPRINT_LINUX, "SwapDevice: 0x%x\n", LinuxBootSector->SwapDevice)); - DPRINTM((DPRINT_LINUX, "RamSize: 0x%x\n", LinuxBootSector->RamSize)); - DPRINTM((DPRINT_LINUX, "VideoMode: 0x%x\n", LinuxBootSector->VideoMode)); - DPRINTM((DPRINT_LINUX, "RootDevice: 0x%x\n", LinuxBootSector->RootDevice)); - DPRINTM((DPRINT_LINUX, "BootFlag: 0x%x\n", LinuxBootSector->BootFlag)); + DPRINTM(DPRINT_LINUX, "SetupSectors: %d\n", LinuxBootSector->SetupSectors); + DPRINTM(DPRINT_LINUX, "RootFlags: 0x%x\n", LinuxBootSector->RootFlags); + DPRINTM(DPRINT_LINUX, "SystemSize: 0x%x\n", LinuxBootSector->SystemSize); + DPRINTM(DPRINT_LINUX, "SwapDevice: 0x%x\n", LinuxBootSector->SwapDevice); + DPRINTM(DPRINT_LINUX, "RamSize: 0x%x\n", LinuxBootSector->RamSize); + DPRINTM(DPRINT_LINUX, "VideoMode: 0x%x\n", LinuxBootSector->VideoMode); + DPRINTM(DPRINT_LINUX, "RootDevice: 0x%x\n", LinuxBootSector->RootDevice); + DPRINTM(DPRINT_LINUX, "BootFlag: 0x%x\n", LinuxBootSector->BootFlag); return TRUE; } @@ -345,21 +345,21 @@ DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize); - DPRINTM((DPRINT_LINUX, "SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature)); - DPRINTM((DPRINT_LINUX, "Version: 0x%x\n", LinuxSetupSector->Version)); - DPRINTM((DPRINT_LINUX, "RealModeSwitch: 0x%x\n", LinuxSetupSector->RealModeSwitch)); - DPRINTM((DPRINT_LINUX, "SetupSeg: 0x%x\n", LinuxSetupSector->SetupSeg)); - DPRINTM((DPRINT_LINUX, "StartSystemSeg: 0x%x\n", LinuxSetupSector->StartSystemSeg)); - DPRINTM((DPRINT_LINUX, "KernelVersion: 0x%x\n", LinuxSetupSector->KernelVersion)); - DPRINTM((DPRINT_LINUX, "TypeOfLoader: 0x%x\n", LinuxSetupSector->TypeOfLoader)); - DPRINTM((DPRINT_LINUX, "LoadFlags: 0x%x\n", LinuxSetupSector->LoadFlags)); - DPRINTM((DPRINT_LINUX, "SetupMoveSize: 0x%x\n", LinuxSetupSector->SetupMoveSize)); - DPRINTM((DPRINT_LINUX, "Code32Start: 0x%x\n", LinuxSetupSector->Code32Start)); - DPRINTM((DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress)); - DPRINTM((DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize)); - DPRINTM((DPRINT_LINUX, "BootSectKludgeOffset: 0x%x\n", LinuxSetupSector->BootSectKludgeOffset)); - DPRINTM((DPRINT_LINUX, "BootSectKludgeSegment: 0x%x\n", LinuxSetupSector->BootSectKludgeSegment)); - DPRINTM((DPRINT_LINUX, "HeapEnd: 0x%x\n", LinuxSetupSector->HeapEnd)); + DPRINTM(DPRINT_LINUX, "SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature); + DPRINTM(DPRINT_LINUX, "Version: 0x%x\n", LinuxSetupSector->Version); + DPRINTM(DPRINT_LINUX, "RealModeSwitch: 0x%x\n", LinuxSetupSector->RealModeSwitch); + DPRINTM(DPRINT_LINUX, "SetupSeg: 0x%x\n", LinuxSetupSector->SetupSeg); + DPRINTM(DPRINT_LINUX, "StartSystemSeg: 0x%x\n", LinuxSetupSector->StartSystemSeg); + DPRINTM(DPRINT_LINUX, "KernelVersion: 0x%x\n", LinuxSetupSector->KernelVersion); + DPRINTM(DPRINT_LINUX, "TypeOfLoader: 0x%x\n", LinuxSetupSector->TypeOfLoader); + DPRINTM(DPRINT_LINUX, "LoadFlags: 0x%x\n", LinuxSetupSector->LoadFlags); + DPRINTM(DPRINT_LINUX, "SetupMoveSize: 0x%x\n", LinuxSetupSector->SetupMoveSize); + DPRINTM(DPRINT_LINUX, "Code32Start: 0x%x\n", LinuxSetupSector->Code32Start); + DPRINTM(DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress); + DPRINTM(DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize); + DPRINTM(DPRINT_LINUX, "BootSectKludgeOffset: 0x%x\n", LinuxSetupSector->BootSectKludgeOffset); + DPRINTM(DPRINT_LINUX, "BootSectKludgeSegment: 0x%x\n", LinuxSetupSector->BootSectKludgeSegment); + DPRINTM(DPRINT_LINUX, "HeapEnd: 0x%x\n", LinuxSetupSector->HeapEnd); return TRUE; } @@ -466,12 +466,12 @@ LinuxSetupSector->RamdiskAddress = (ULONG)LinuxInitrdLoadAddress; LinuxSetupSector->RamdiskSize = LinuxInitrdSize; - DPRINTM((DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress)); - DPRINTM((DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize)); + DPRINTM(DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress); + DPRINTM(DPRINT_LINUX, "RamdiskSize: 0x%x\n", LinuxSetupSector->RamdiskSize); if (LinuxSetupSector->Version >= 0x0203) { - DPRINTM((DPRINT_LINUX, "InitrdAddressMax: 0x%x\n", LinuxSetupSector->InitrdAddressMax)); + DPRINTM(DPRINT_LINUX, "InitrdAddressMax: 0x%x\n", LinuxSetupSector->InitrdAddressMax); } // Read in the ramdisk Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -185,7 +185,11 @@ /* Load the kernel */ LoadBase = FrLdrLoadImage(FileName, 5, 1); - if (!LoadBase) return; + if (!LoadBase) + { + DPRINT1("Loading the kernel failed!\n"); + return; + } /* Get the NT header, kernel base and kernel entry */ NtHeader = RtlImageNtHeader(LoadBase); Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/conversion.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/conversion.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/conversion.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -70,7 +70,7 @@ PCONFIGURATION_COMPONENT_DATA Child; PCONFIGURATION_COMPONENT_DATA Sibling; - DPRINTM((DPRINT_WINDOWS, "ConvertConfigToVA(Start 0x%X)\n", Start)); + DPRINTM(DPRINT_WINDOWS, "ConvertConfigToVA(Start 0x%X)\n", Start); Child = Start; while (Child != NULL) @@ -90,8 +90,8 @@ if (Child->ComponentEntry.Identifier) Child->ComponentEntry.Identifier = PaToVa(Child->ComponentEntry.Identifier); - DPRINTM((DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Child, - Child->ComponentEntry.Class, Child->ComponentEntry.Type, VaToPa(Child->ComponentEntry.Identifier), Child->Parent)); + DPRINTM(DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Child, + Child->ComponentEntry.Class, Child->ComponentEntry.Type, VaToPa(Child->ComponentEntry.Identifier), Child->Parent); // Go through siblings list Sibling = VaToPa(Child->Sibling); @@ -112,8 +112,8 @@ if (Sibling->ComponentEntry.Identifier) Sibling->ComponentEntry.Identifier = PaToVa(Sibling->ComponentEntry.Identifier); - DPRINTM((DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Sibling, - Sibling->ComponentEntry.Class, Sibling->ComponentEntry.Type, VaToPa(Sibling->ComponentEntry.Identifier), Sibling->Parent)); + DPRINTM(DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Sibling, + Sibling->ComponentEntry.Class, Sibling->ComponentEntry.Type, VaToPa(Sibling->ComponentEntry.Identifier), Sibling->Parent); // Recurse into the Child tree if (VaToPa(Sibling->Child) != NULL) Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/peloader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -56,8 +56,8 @@ PLDR_DATA_TABLE_ENTRY DataTableEntry; LIST_ENTRY *ModuleEntry; - DPRINTM((DPRINT_WINDOWS, "WinLdrCheckForLoadedDll: DllName %X, LoadedEntry: %X\n", - DllName, LoadedEntry)); + DPRINTM(DPRINT_WINDOWS, "WinLdrCheckForLoadedDll: DllName %X, LoadedEntry: %X\n", + DllName, LoadedEntry); /* Just go through each entry in the LoadOrderList and compare loaded module's name with a given name */ @@ -69,8 +69,8 @@ LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); - DPRINTM((DPRINT_WINDOWS, "WinLdrCheckForLoadedDll: DTE %p, EP %p\n", - DataTableEntry, DataTableEntry->EntryPoint)); + DPRINTM(DPRINT_WINDOWS, "WinLdrCheckForLoadedDll: DTE %p, EP %p\n", + DataTableEntry, DataTableEntry->EntryPoint); /* Compare names */ if (WinLdrpCompareDllName(DllName, &DataTableEntry->BaseDllName)) @@ -79,7 +79,7 @@ to the caller and increase load count for it */ *LoadedEntry = DataTableEntry; DataTableEntry->LoadCount++; - DPRINTM((DPRINT_WINDOWS, "WinLdrCheckForLoadedDll: LoadedEntry %X\n", DataTableEntry)); + DPRINTM(DPRINT_WINDOWS, "WinLdrCheckForLoadedDll: LoadedEntry %X\n", DataTableEntry); return TRUE; } @@ -111,8 +111,8 @@ BaseName.Buffer = VaToPa(ScanDTE->BaseDllName.Buffer); BaseName.MaximumLength = ScanDTE->BaseDllName.MaximumLength; BaseName.Length = ScanDTE->BaseDllName.Length; - DPRINTM((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %wZ ImportTable = 0x%X\n", - &BaseName, ImportTable)); + DPRINTM(DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %wZ ImportTable = 0x%X\n", + &BaseName, ImportTable); } /* If image doesn't have any import directory - just return success */ @@ -124,7 +124,7 @@ { /* Get pointer to the name */ ImportName = (PCH)VaToPa(RVA(ScanDTE->DllBase, ImportTable->Name)); - DPRINTM((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): Looking at %s\n", ImportName)); + DPRINTM(DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): Looking at %s\n", ImportName); /* In case we get a reference to ourselves - just skip it */ if (WinLdrpCompareDllName(ImportName, &ScanDTE->BaseDllName)) @@ -140,7 +140,7 @@ if (!Status) { - DPRINTM((DPRINT_WINDOWS, "WinLdrpLoadAndScanReferencedDll() failed\n")); + DPRINTM(DPRINT_WINDOWS, "WinLdrpLoadAndScanReferencedDll() failed\n"); return Status; } } @@ -154,7 +154,7 @@ if (!Status) { - DPRINTM((DPRINT_WINDOWS, "WinLdrpScanImportAddressTable() failed\n")); + DPRINTM(DPRINT_WINDOWS, "WinLdrpScanImportAddressTable() failed\n"); return Status; } } @@ -337,7 +337,7 @@ /* This is the real image base - in form of a virtual address */ VirtualBase = PaToVa(PhysicalBase); - DPRINTM((DPRINT_WINDOWS, "Base PA: 0x%X, VA: 0x%X\n", PhysicalBase, VirtualBase)); + DPRINTM(DPRINT_WINDOWS, "Base PA: 0x%X, VA: 0x%X\n", PhysicalBase, VirtualBase); /* Set to 0 position and fully load the file image */ FsSetFilePointer(FileHandle, 0); @@ -390,14 +390,14 @@ /* Seek to the correct position */ FsSetFilePointer(FileHandle, SectionHeader->PointerToRawData); - DPRINTM((DPRINT_WINDOWS, "SH->VA: 0x%X\n", SectionHeader->VirtualAddress)); + DPRINTM(DPRINT_WINDOWS, "SH->VA: 0x%X\n", SectionHeader->VirtualAddress); /* Read this section from the file, size = SizeOfRawData */ Status = FsReadFile(FileHandle, SizeOfRawData, &BytesRead, (PUCHAR)PhysicalBase + SectionHeader->VirtualAddress); if (!Status && (BytesRead == 0)) { - DPRINTM((DPRINT_WINDOWS, "WinLdrLoadImage(): Error reading section from file!\n")); + DPRINTM(DPRINT_WINDOWS, "WinLdrLoadImage(): Error reading section from file!\n"); break; } } @@ -405,7 +405,7 @@ /* Size of data is less than the virtual size - fill up the remainder with zeroes */ if (SizeOfRawData < VirtualSize) { - DPRINTM((DPRINT_WINDOWS, "WinLdrLoadImage(): SORD %d < VS %d\n", SizeOfRawData, VirtualSize)); + DPRINTM(DPRINT_WINDOWS, "WinLdrLoadImage(): SORD %d < VS %d\n", SizeOfRawData, VirtualSize); RtlZeroMemory((PVOID)(SectionHeader->VirtualAddress + (ULONG)PhysicalBase + SizeOfRawData), VirtualSize - SizeOfRawData); } @@ -423,8 +423,8 @@ /* Relocate the image, if it needs it */ if (NtHeaders->OptionalHeader.ImageBase != (ULONG)VirtualBase) { - DPRINTM((DPRINT_WINDOWS, "Relocating %p -> %p\n", - NtHeaders->OptionalHeader.ImageBase, VirtualBase)); + DPRINTM(DPRINT_WINDOWS, "Relocating %p -> %p\n", + NtHeaders->OptionalHeader.ImageBase, VirtualBase); Status = (BOOLEAN)LdrRelocateImageWithBias(PhysicalBase, (ULONG_PTR)VirtualBase - (ULONG_PTR)PhysicalBase, "FreeLdr", @@ -453,7 +453,7 @@ UnicodeNamePA.Length = UnicodeName->Length; UnicodeNamePA.MaximumLength = UnicodeName->MaximumLength; UnicodeNamePA.Buffer = VaToPa(UnicodeName->Buffer); - DPRINTM((DPRINT_WINDOWS, "WinLdrpCompareDllName: %s and %wZ, Length = %d " + DPRINTM(DPRINT_WINDOWS, "WinLdrpCompareDllName: %s and %wZ, Length = %d " "UN->Length %d\n", DllName, &UnicodeNamePA, Length, UnicodeName->Length)); if ((Length * sizeof(WCHAR)) > UnicodeName->Length) @@ -500,13 +500,13 @@ LONG High, Low, Middle, Result; ULONG Hint; - //DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName(): DllBase 0x%X, ImageBase 0x%X, ThunkData 0x%X, ExportDirectory 0x%X, ExportSize %d, ProcessForwards 0x%X\n", - // DllBase, ImageBase, ThunkData, ExportDirectory, ExportSize, ProcessForwards)); + //DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName(): DllBase 0x%X, ImageBase 0x%X, ThunkData 0x%X, ExportDirectory 0x%X, ExportSize %d, ProcessForwards 0x%X\n", + // DllBase, ImageBase, ThunkData, ExportDirectory, ExportSize, ProcessForwards); /* Check passed DllBase param */ if(DllBase == NULL) { - DPRINTM((DPRINT_WINDOWS, "WARNING: DllBase == NULL!\n")); + DPRINTM(DPRINT_WINDOWS, "WARNING: DllBase == NULL!\n"); return FALSE; } @@ -518,7 +518,7 @@ { /* Yes, calculate the ordinal */ Ordinal = (ULONG)(IMAGE_ORDINAL(ThunkData->u1.Ordinal) - (UINT32)ExportDirectory->Base); - //DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName(): Ordinal %d\n", Ordinal)); + //DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName(): Ordinal %d\n", Ordinal); } else { @@ -526,22 +526,22 @@ if (!ProcessForwards) { /* AddressOfData in thunk entry will become a virtual address (from relative) */ - //DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName(): ThunkData->u1.AOD was %p\n", ThunkData->u1.AddressOfData)); + //DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName(): ThunkData->u1.AOD was %p\n", ThunkData->u1.AddressOfData); ThunkData->u1.AddressOfData = (ULONG)RVA(ImageBase, ThunkData->u1.AddressOfData); - //DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName(): ThunkData->u1.AOD became %p\n", ThunkData->u1.AddressOfData)); + //DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName(): ThunkData->u1.AOD became %p\n", ThunkData->u1.AddressOfData); } /* Get pointers to Name and Ordinal tables (RVA -> VA) */ NameTable = (PULONG)VaToPa(RVA(DllBase, ExportDirectory->AddressOfNames)); OrdinalTable = (PUSHORT)VaToPa(RVA(DllBase, ExportDirectory->AddressOfNameOrdinals)); - //DPRINTM((DPRINT_WINDOWS, "NameTable 0x%X, OrdinalTable 0x%X, ED->AddressOfNames 0x%X, ED->AOFO 0x%X\n", - // NameTable, OrdinalTable, ExportDirectory->AddressOfNames, ExportDirectory->AddressOfNameOrdinals)); + //DPRINTM(DPRINT_WINDOWS, "NameTable 0x%X, OrdinalTable 0x%X, ED->AddressOfNames 0x%X, ED->AOFO 0x%X\n", + // NameTable, OrdinalTable, ExportDirectory->AddressOfNames, ExportDirectory->AddressOfNameOrdinals); /* Get the hint, convert it to a physical pointer */ Hint = ((PIMAGE_IMPORT_BY_NAME)VaToPa((PVOID)ThunkData->u1.AddressOfData))->Hint; - //DPRINTM((DPRINT_WINDOWS, "HintIndex %d\n", Hint)); + //DPRINTM(DPRINT_WINDOWS, "HintIndex %d\n", Hint); /* If Hint is less than total number of entries in the export directory, and import name == export name, then we can just get it from the OrdinalTable */ @@ -554,14 +554,14 @@ ) { Ordinal = OrdinalTable[Hint]; - //DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName(): Ordinal %d\n", Ordinal)); + //DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName(): Ordinal %d\n", Ordinal); } else { /* It's not the easy way, we have to lookup import name in the name table. Let's use a binary search for this task. */ - //DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName() looking up the import name using binary search...\n")); + //DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName() looking up the import name using binary search...\n"); /* Low boundary is set to 0, and high boundary to the maximum index */ Low = 0; @@ -577,13 +577,13 @@ Result = strcmp(VaToPa(&((PIMAGE_IMPORT_BY_NAME)VaToPa((PVOID)ThunkData->u1.AddressOfData))->Name[0]), (PCHAR)VaToPa(RVA(DllBase, NameTable[Middle]))); - /*DPRINTM((DPRINT_WINDOWS, "Binary search: comparing Import '__', Export '%s'\n",*/ + /*DPRINTM(DPRINT_WINDOWS, "Binary search: comparing Import '__', Export '%s'\n",*/ /*VaToPa(&((PIMAGE_IMPORT_BY_NAME)VaToPa(ThunkData->u1.AddressOfData))->Name[0]),*/ - /*(PCHAR)VaToPa(RVA(DllBase, NameTable[Middle]))));*/ - - /*DPRINTM((DPRINT_WINDOWS, "TE->u1.AOD %p, fulladdr %p\n", + /*(PCHAR)VaToPa(RVA(DllBase, NameTable[Middle])));*/ + + /*DPRINTM(DPRINT_WINDOWS, "TE->u1.AOD %p, fulladdr %p\n", ThunkData->u1.AddressOfData, - ((PIMAGE_IMPORT_BY_NAME)VaToPa(ThunkData->u1.AddressOfData))->Name ));*/ + ((PIMAGE_IMPORT_BY_NAME)VaToPa(ThunkData->u1.AddressOfData))->Name );*/ /* Depending on result of strcmp, perform different actions */ @@ -608,21 +608,21 @@ if (High < Low) { //Print(L"Error in binary search\n"); - DPRINTM((DPRINT_WINDOWS, "Error in binary search!\n")); + DPRINTM(DPRINT_WINDOWS, "Error in binary search!\n"); return FALSE; } /* Everything allright, get the ordinal */ Ordinal = OrdinalTable[Middle]; - //DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName() found Ordinal %d\n", Ordinal)); + //DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName() found Ordinal %d\n", Ordinal); } } /* Check ordinal number for validity! */ if (Ordinal >= ExportDirectory->NumberOfFunctions) { - DPRINTM((DPRINT_WINDOWS, "Ordinal number is invalid!\n")); + DPRINTM(DPRINT_WINDOWS, "Ordinal number is invalid!\n"); return FALSE; } @@ -647,12 +647,12 @@ /* Strip out its extension */ *strchr(ForwardDllName,'.') = '\0'; - DPRINTM((DPRINT_WINDOWS, "WinLdrpBindImportName(): ForwardDllName %s\n", ForwardDllName)); + DPRINTM(DPRINT_WINDOWS, "WinLdrpBindImportName(): ForwardDllName %s\n", ForwardDllName); if (!WinLdrCheckForLoadedDll(WinLdrBlock, ForwardDllName, &DataTableEntry)) { /* We can't continue if DLL couldn't be loaded, so bomb out with an error */ //Print(L"Error loading DLL!\n"); - DPRINTM((DPRINT_WINDOWS, "Error loading DLL!\n")); + DPRINTM(DPRINT_WINDOWS, "Error loading DLL!\n"); return FALSE; } @@ -728,7 +728,7 @@ strcpy(FullDllName, DirectoryPath); strcat(FullDllName, ImportName); - DPRINTM((DPRINT_WINDOWS, "Loading referenced DLL: %s\n", FullDllName)); + DPRINTM(DPRINT_WINDOWS, "Loading referenced DLL: %s\n", FullDllName); //Print(L"Loading referenced DLL: %s\n", FullDllName); /* Load the image */ @@ -736,7 +736,7 @@ if (!Status) { - DPRINTM((DPRINT_WINDOWS, "WinLdrLoadImage() failed\n")); + DPRINTM(DPRINT_WINDOWS, "WinLdrLoadImage() failed\n"); return Status; } @@ -749,21 +749,21 @@ if (!Status) { - DPRINTM((DPRINT_WINDOWS, - "WinLdrAllocateDataTableEntry() failed with Status=0x%X\n", Status)); + DPRINTM(DPRINT_WINDOWS, + "WinLdrAllocateDataTableEntry() failed with Status=0x%X\n", Status); return Status; } /* Scan its dependencies too */ - DPRINTM((DPRINT_WINDOWS, + DPRINTM(DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable() calling ourselves for %S\n", - VaToPa((*DataTableEntry)->BaseDllName.Buffer))); + VaToPa((*DataTableEntry)->BaseDllName.Buffer)); Status = WinLdrScanImportDescriptorTable(WinLdrBlock, DirectoryPath, *DataTableEntry); if (!Status) { - DPRINTM((DPRINT_WINDOWS, - "WinLdrScanImportDescriptorTable() failed with Status=0x%X\n", Status)); + DPRINTM(DPRINT_WINDOWS, + "WinLdrScanImportDescriptorTable() failed with Status=0x%X\n", Status); return Status; } @@ -780,8 +780,8 @@ BOOLEAN Status; ULONG ExportSize; - DPRINTM((DPRINT_WINDOWS, "WinLdrpScanImportAddressTable(): DllBase 0x%X, " - "ImageBase 0x%X, ThunkData 0x%X\n", DllBase, ImageBase, ThunkData)); + DPRINTM(DPRINT_WINDOWS, "WinLdrpScanImportAddressTable(): DllBase 0x%X, " + "ImageBase 0x%X, ThunkData 0x%X\n", DllBase, ImageBase, ThunkData); /* Obtain the export table from the DLL's base */ if (DllBase == NULL) @@ -798,7 +798,7 @@ &ExportSize); } - DPRINTM((DPRINT_WINDOWS, "WinLdrpScanImportAddressTable(): ExportDirectory 0x%X\n", ExportDirectory)); + DPRINTM(DPRINT_WINDOWS, "WinLdrpScanImportAddressTable(): ExportDirectory 0x%X\n", ExportDirectory); /* If pointer to Export Directory is */ if (ExportDirectory == NULL) Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -101,9 +101,9 @@ strcpy(SystemRoot, &SystemPath[PathSeparator]); strcat(SystemRoot, "\\"); - DPRINTM((DPRINT_WINDOWS, "ArcBoot: %s\n", ArcBoot)); - DPRINTM((DPRINT_WINDOWS, "SystemRoot: %s\n", SystemRoot)); - DPRINTM((DPRINT_WINDOWS, "Options: %s\n", Options)); + DPRINTM(DPRINT_WINDOWS, "ArcBoot: %s\n", ArcBoot); + DPRINTM(DPRINT_WINDOWS, "SystemRoot: %s\n", SystemRoot); + DPRINTM(DPRINT_WINDOWS, "Options: %s\n", Options); /* Fill Arc BootDevice */ LoaderBlock->ArcBootDeviceName = MmHeapAlloc(strlen(ArcBoot)+1); @@ -278,7 +278,7 @@ *(DriverNamePos+1) = 0; } - DPRINTM((DPRINT_WINDOWS, "DriverPath: %s, DllName: %s, LPB %p\n", DriverPath, DllName, LoaderBlock)); + DPRINTM(DPRINT_WINDOWS, "DriverPath: %s, DllName: %s, LPB %p\n", DriverPath, DllName, LoaderBlock); // Check if driver is already loaded @@ -299,7 +299,7 @@ Status = WinLdrAllocateDataTableEntry(LoaderBlock, DllName, DllName, DriverBase, DriverDTE); if (!Status) { - DPRINTM((DPRINT_WINDOWS, "WinLdrAllocateDataTableEntry() failed\n")); + DPRINTM(DPRINT_WINDOWS, "WinLdrAllocateDataTableEntry() failed\n"); return FALSE; } @@ -311,8 +311,8 @@ Status = WinLdrScanImportDescriptorTable(LoaderBlock, FullPath, *DriverDTE); if (!Status) { - DPRINTM((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable() failed for %s\n", - FullPath)); + DPRINTM(DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable() failed for %s\n", + FullPath); return FALSE; } @@ -334,8 +334,8 @@ { BootDriver = CONTAINING_RECORD(NextBd, BOOT_DRIVER_LIST_ENTRY, Link); - DPRINTM((DPRINT_WINDOWS, "BootDriver %wZ DTE %08X RegPath: %wZ\n", &BootDriver->FilePath, - BootDriver->LdrEntry, &BootDriver->RegistryPath)); + DPRINTM(DPRINT_WINDOWS, "BootDriver %wZ DTE %08X RegPath: %wZ\n", &BootDriver->FilePath, + BootDriver->LdrEntry, &BootDriver->RegistryPath); // Paths are relative (FIXME: Are they always relative?) @@ -375,7 +375,7 @@ //sprintf(ProgressString, "Loading %s...", FileName); //UiDrawProgressBarCenter(1, 100, ProgressString); - DPRINTM((DPRINT_WINDOWS, "Loading module %s\n", ModuleName)); + DPRINTM(DPRINT_WINDOWS, "Loading module %s\n", ModuleName); *Size = 0; /* Open the image file */ @@ -407,7 +407,7 @@ return NULL; } - DPRINTM((DPRINT_WINDOWS, "Loaded %s at 0x%x with size 0x%x\n", ModuleName, PhysicalBase, FileSize)); + DPRINTM(DPRINT_WINDOWS, "Loaded %s at 0x%x with size 0x%x\n", ModuleName, PhysicalBase, FileSize); /* We are done with the file - close it */ FsCloseFile(FileHandle); @@ -489,7 +489,7 @@ BootPath[strlen(BootPath)] != '\\') strcat(BootPath, "\\"); - DPRINTM((DPRINT_WINDOWS,"SystemRoot: '%s'\n", BootPath)); + DPRINTM(DPRINT_WINDOWS,"SystemRoot: '%s'\n", BootPath); /* Allocate and minimalistic-initialize LPB */ AllocateAndInitLPB(&LoaderBlock); @@ -502,13 +502,13 @@ strcpy(FileName, BootPath); strcat(FileName, "SYSTEM32\\NTOSKRNL.EXE"); Status = WinLdrLoadImage(FileName, LoaderSystemCode, &NtosBase); - DPRINTM((DPRINT_WINDOWS, "Ntos loaded with status %d at %p\n", Status, NtosBase)); + DPRINTM(DPRINT_WINDOWS, "Ntos loaded with status %d at %p\n", Status, NtosBase); /* Load HAL */ strcpy(FileName, BootPath); strcat(FileName, "SYSTEM32\\HAL.DLL"); Status = WinLdrLoadImage(FileName, LoaderHalCode, &HalBase); - DPRINTM((DPRINT_WINDOWS, "HAL loaded with status %d at %p\n", Status, HalBase)); + DPRINTM(DPRINT_WINDOWS, "HAL loaded with status %d at %p\n", Status, HalBase); /* Load kernel-debugger support dll */ if (OperatingSystemVersion > _WIN32_WINNT_WIN2K) @@ -516,7 +516,7 @@ strcpy(FileName, BootPath); strcat(FileName, "SYSTEM32\\KDCOM.DLL"); Status = WinLdrLoadImage(FileName, LoaderBootDriver, &KdComBase); - DPRINTM((DPRINT_WINDOWS, "KdCom loaded with status %d at %p\n", Status, KdComBase)); + DPRINTM(DPRINT_WINDOWS, "KdCom loaded with status %d at %p\n", Status, KdComBase); } /* Allocate data table entries for above-loaded modules */ @@ -540,11 +540,11 @@ /* Load Hive, and then NLS data, OEM font, and prepare boot drivers list */ Status = WinLdrLoadAndScanSystemHive(LoaderBlock, BootPath); - DPRINTM((DPRINT_WINDOWS, "SYSTEM hive loaded and scanned with status %d\n", Status)); + DPRINTM(DPRINT_WINDOWS, "SYSTEM hive loaded and scanned with status %d\n", Status); /* Load boot drivers */ Status = WinLdrLoadBootDrivers(LoaderBlock, BootPath); - DPRINTM((DPRINT_WINDOWS, "Boot drivers loaded with status %d\n", Status)); + DPRINTM(DPRINT_WINDOWS, "Boot drivers loaded with status %d\n", Status); /* Alloc PCR, TSS, do magic things with the GDT/IDT */ WinLdrSetupForNt(LoaderBlock, &GdtIdt, &PcrBasePage, &TssBasePage); @@ -571,8 +571,8 @@ /* Save final value of LoaderPagesSpanned */ LoaderBlock->Extension->LoaderPagesSpanned = LoaderPagesSpanned; - DPRINTM((DPRINT_WINDOWS, "Hello from paged mode, KiSystemStartup %p, LoaderBlockVA %p!\n", - KiSystemStartup, LoaderBlockVA)); + DPRINTM(DPRINT_WINDOWS, "Hello from paged mode, KiSystemStartup %p, LoaderBlockVA %p!\n", + KiSystemStartup, LoaderBlockVA); WinLdrpDumpMemoryDescriptors(LoaderBlockVA); WinLdrpDumpBootDriver(LoaderBlockVA); @@ -603,8 +603,8 @@ { MemoryDescriptor = CONTAINING_RECORD(NextMd, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry); - DPRINTM((DPRINT_WINDOWS, "BP %08X PC %04X MT %d\n", MemoryDescriptor->BasePage, - MemoryDescriptor->PageCount, MemoryDescriptor->MemoryType)); + DPRINTM(DPRINT_WINDOWS, "BP %08X PC %04X MT %d\n", MemoryDescriptor->BasePage, + MemoryDescriptor->PageCount, MemoryDescriptor->MemoryType); NextMd = MemoryDescriptor->ListEntry.Flink; } @@ -622,8 +622,8 @@ { BootDriver = CONTAINING_RECORD(NextBd, BOOT_DRIVER_LIST_ENTRY, Link); - DPRINTM((DPRINT_WINDOWS, "BootDriver %wZ DTE %08X RegPath: %wZ\n", &BootDriver->FilePath, - BootDriver->LdrEntry, &BootDriver->RegistryPath)); + DPRINTM(DPRINT_WINDOWS, "BootDriver %wZ DTE %08X RegPath: %wZ\n", &BootDriver->FilePath, + BootDriver->LdrEntry, &BootDriver->RegistryPath); NextBd = BootDriver->Link.Flink; } @@ -641,8 +641,8 @@ { ArcDisk = CONTAINING_RECORD(NextBd, ARC_DISK_SIGNATURE, ListEntry); - DPRINTM((DPRINT_WINDOWS, "ArcDisk %s checksum: 0x%X, signature: 0x%X\n", - ArcDisk->ArcName, ArcDisk->CheckSum, ArcDisk->Signature)); + DPRINTM(DPRINT_WINDOWS, "ArcDisk %s checksum: 0x%X, signature: 0x%X\n", + ArcDisk->ArcName, ArcDisk->CheckSum, ArcDisk->Signature); NextBd = ArcDisk->ListEntry.Flink; } Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -126,7 +126,7 @@ // and windows doesn't expect ALL memory mapped... NumPageTables = (GetSystemMemorySize() >> MM_PAGE_SHIFT) >> 10; - DPRINTM((DPRINT_WINDOWS, "NumPageTables = %d\n", NumPageTables)); + DPRINTM(DPRINT_WINDOWS, "NumPageTables = %d\n", NumPageTables); // Allocate memory block for all these things: // PDE, HAL mapping page table, physical mapping, kernel mapping @@ -145,7 +145,7 @@ if (Buffer + (TotalSize - NumPageTables*MM_PAGE_SIZE) != PhysicalPageTablesBuffer) { - DPRINTM((DPRINT_WINDOWS, "There was a problem allocating two adjacent blocks of memory!")); + DPRINTM(DPRINT_WINDOWS, "There was a problem allocating two adjacent blocks of memory!"); } if (Buffer == NULL || PhysicalPageTablesBuffer == NULL) @@ -198,7 +198,7 @@ if (Entry+(KSEG0_BASE >> 22) > 1023) { - DPRINTM((DPRINT_WINDOWS, "WARNING! Entry: %X > 1023\n", Entry+(KSEG0_BASE >> 22))); + DPRINTM(DPRINT_WINDOWS, "WARNING! Entry: %X > 1023\n", Entry+(KSEG0_BASE >> 22)); } // Kernel-mode mapping @@ -368,8 +368,8 @@ Mad[MadCount].MemoryType != LoaderFirmwarePermanent && Mad[MadCount].MemoryType != LoaderFree) { - DPRINTM((DPRINT_WINDOWS, "Setting page %x %x to Temporary from %d\n", - BasePage, PageCount, Mad[MadCount].MemoryType)); + DPRINTM(DPRINT_WINDOWS, "Setting page %x %x to Temporary from %d\n", + BasePage, PageCount, Mad[MadCount].MemoryType); Mad[MadCount].MemoryType = LoaderFirmwareTemporary; } @@ -394,7 +394,7 @@ Status = MempSetupPaging(BasePage, PageCount); if (!Status) { - DPRINTM((DPRINT_WINDOWS, "Error during MempSetupPaging\n")); + DPRINTM(DPRINT_WINDOWS, "Error during MempSetupPaging\n"); return; } } @@ -429,8 +429,8 @@ asm("mov _APICAddress, edx"); asm(".att_syntax\n"); - DPRINTM((DPRINT_WINDOWS, "Local APIC detected at address 0x%x\n", - APICAddress)); + DPRINTM(DPRINT_WINDOWS, "Local APIC detected at address 0x%x\n", + APICAddress); /* Map it */ HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].PageFrameNumber @@ -503,13 +503,13 @@ MemoryMapStartPage = (ULONG_PTR)MemoryMap >> MM_PAGE_SHIFT; MemoryMapSizeInPages = NoEntries * sizeof(PAGE_LOOKUP_TABLE_ITEM); - DPRINTM((DPRINT_WINDOWS, "Got memory map with %d entries\n", NoEntries)); + DPRINTM(DPRINT_WINDOWS, "Got memory map with %d entries\n", NoEntries); // Always contigiously map low 1Mb of memory Status = MempSetupPaging(0, 0x100); if (!Status) { - DPRINTM((DPRINT_WINDOWS, "Error during MempSetupPaging of low 1Mb\n")); + DPRINTM(DPRINT_WINDOWS, "Error during MempSetupPaging of low 1Mb\n"); return FALSE; } @@ -572,7 +572,7 @@ } #endif - DPRINTM((DPRINT_WINDOWS, "MadCount: %d\n", MadCount)); + DPRINTM(DPRINT_WINDOWS, "MadCount: %d\n", MadCount); WinLdrpDumpMemoryDescriptors(LoaderBlock); //FIXME: Delete! @@ -585,7 +585,7 @@ }*/ //VideoDisplayString(L"Hello from VGA, going into the kernel\n"); - DPRINTM((DPRINT_WINDOWS, "HalPageTable: 0x%X\n", HalPageTable)); + DPRINTM(DPRINT_WINDOWS, "HalPageTable: 0x%X\n", HalPageTable); // Page Tables have been setup, make special handling for PCR and TSS // (which is done in BlSetupFotNt in usual ntldr) @@ -602,7 +602,7 @@ // Map VGA memory //VideoMemoryBase = MmMapIoSpace(0xb8000, 4000, MmNonCached); - //DPRINTM((DPRINT_WINDOWS, "VideoMemoryBase: 0x%X\n", VideoMemoryBase)); + //DPRINTM(DPRINT_WINDOWS, "VideoMemoryBase: 0x%X\n", VideoMemoryBase); Tss = (PKTSS)(KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT)); @@ -611,7 +611,7 @@ // Fill the memory descriptor list and //PrepareMemoryDescriptorList(); - DPRINTM((DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n")); + DPRINTM(DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n"); List_PaToVa(&LoaderBlock->MemoryDescriptorListHead); #ifdef DBG @@ -619,18 +619,18 @@ ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000; int j; - DPRINTM((DPRINT_WINDOWS, "\nPDE\n")); + DPRINTM(DPRINT_WINDOWS, "\nPDE\n"); for (i=0; i<128; i++) { - DPRINTM((DPRINT_WINDOWS, "0x%04X | ", i*8)); + DPRINTM(DPRINT_WINDOWS, "0x%04X | ", i*8); for (j=0; j<8; j++) { - DPRINTM((DPRINT_WINDOWS, "0x%08X ", PDE_Addr[i*8+j])); + DPRINTM(DPRINT_WINDOWS, "0x%08X ", PDE_Addr[i*8+j]); } - DPRINTM((DPRINT_WINDOWS, "\n")); + DPRINTM(DPRINT_WINDOWS, "\n"); } } #endif @@ -670,8 +670,8 @@ PLIST_ENTRY PreviousEntry, NextEntry; PMEMORY_ALLOCATION_DESCRIPTOR PreviousDescriptor = NULL, NextDescriptor = NULL; - DPRINTM((DPRINT_WINDOWS, "BP=0x%X PC=0x%X %s\n", NewDescriptor->BasePage, - NewDescriptor->PageCount, MemTypeDesc[NewDescriptor->MemoryType])); + DPRINTM(DPRINT_WINDOWS, "BP=0x%X PC=0x%X %s\n", NewDescriptor->BasePage, + NewDescriptor->PageCount, MemTypeDesc[NewDescriptor->MemoryType]); /* Find a place where to insert the new descriptor to */ PreviousEntry = ListHead; @@ -735,8 +735,8 @@ ULONG Ldt = 0; //ULONG i; - DPRINTM((DPRINT_WINDOWS, "GDtIdt %p, Pcr %p, Tss 0x%08X\n", - GdtIdt, Pcr, Tss)); + DPRINTM(DPRINT_WINDOWS, "GDtIdt %p, Pcr %p, Tss 0x%08X\n", + GdtIdt, Pcr, Tss); // Kernel expects the PCR to be zero-filled on startup // FIXME: Why zero it here when we can zero it right after allocation? Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlregistry.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] Mon Jan 19 12:50:19 2009 @@ -158,13 +158,13 @@ return FALSE; } - DPRINTM((DPRINT_WINDOWS, "NLS data %s %s %s\n", AnsiName, OemName, LangName)); + DPRINTM(DPRINT_WINDOWS, "NLS data %s %s %s\n", AnsiName, OemName, LangName); // Load NLS data strcpy(SearchPath, DirectoryPath); strcat(SearchPath, "SYSTEM32\\"); Status = WinLdrLoadNLSData(LoaderBlock, SearchPath, AnsiName, OemName, LangName); - DPRINTM((DPRINT_WINDOWS, "NLS data loaded with status %d\n", Status)); + DPRINTM(DPRINT_WINDOWS, "NLS data loaded with status %d\n", Status); /* TODO: Load OEM HAL font */ @@ -295,7 +295,7 @@ goto Failure; AnsiFileSize = FsGetFileSize(AnsiFileHandle); - DPRINTM((DPRINT_WINDOWS, "AnsiFileSize: %d\n", AnsiFileSize)); + DPRINTM(DPRINT_WINDOWS, "AnsiFileSize: %d\n", AnsiFileSize); FsCloseFile(AnsiFileHandle); /* Open OEM file and store its length */ @@ -316,7 +316,7 @@ OemFileSize = FsGetFileSize(OemFileHandle); FsCloseFile(OemFileHandle); } - DPRINTM((DPRINT_WINDOWS, "OemFileSize: %d\n", OemFileSize)); + DPRINTM(DPRINT_WINDOWS, "OemFileSize: %d\n", OemFileSize); /* And finally open the language codepage file and store its length */ //Print(L"Loading %s...\n", Filename); @@ -329,7 +329,7 @@ LanguageFileSize = FsGetFileSize(LanguageFileHandle); FsCloseFile(LanguageFileHandle); - DPRINTM((DPRINT_WINDOWS, "LanguageFileSize: %d\n", LanguageFileSize)); + DPRINTM(DPRINT_WINDOWS, "LanguageFileSize: %d\n", LanguageFileSize); /* Sum up all three length, having in mind that every one of them must start at a page boundary => thus round up each file to a page */ @@ -455,7 +455,7 @@ &hGroupKey); if (rc != ERROR_SUCCESS) { - DPRINTM((DPRINT_REACTOS, "Failed to open the 'ServiceGroupOrder' key (rc %d)\n", (int)rc)); + DPRINTM(DPRINT_REACTOS, "Failed to open the 'ServiceGroupOrder' key (rc %d)\n", (int)rc); return; } @@ -465,7 +465,7 @@ &hOrderKey); if (rc != ERROR_SUCCESS) { - DPRINTM((DPRINT_REACTOS, "Failed to open the 'GroupOrderList' key (rc %d)\n", (int)rc)); + DPRINTM(DPRINT_REACTOS, "Failed to open the 'GroupOrderList' key (rc %d)\n", (int)rc); return; } @@ -475,7 +475,7 @@ &hServiceKey); if (rc != ERROR_SUCCESS) { - DPRINTM((DPRINT_REACTOS, "Failed to open the 'Services' key (rc %d)\n", (int)rc)); + DPRINTM(DPRINT_REACTOS, "Failed to open the 'Services' key (rc %d)\n", (int)rc); return; } @@ -483,17 +483,17 @@ BufferSize = 4096; GroupNameBuffer = MmHeapAlloc(BufferSize); rc = RegQueryValue(hGroupKey, L"List", NULL, (PUCHAR)GroupNameBuffer, &BufferSize); - DPRINTM((DPRINT_REACTOS, "RegQueryValue(): rc %d\n", (int)rc)); + DPRINTM(DPRINT_REACTOS, "RegQueryValue(): rc %d\n", (int)rc); if (rc != ERROR_SUCCESS) return; - DPRINTM((DPRINT_REACTOS, "BufferSize: %d \n", (int)BufferSize)); - DPRINTM((DPRINT_REACTOS, "GroupNameBuffer: '%S' \n", GroupNameBuffer)); + DPRINTM(DPRINT_REACTOS, "BufferSize: %d \n", (int)BufferSize); + DPRINTM(DPRINT_REACTOS, "GroupNameBuffer: '%S' \n", GroupNameBuffer); /* Loop through each group */ GroupName = GroupNameBuffer; while (*GroupName) { - DPRINTM((DPRINT_WINDOWS, "Driver group: '%S'\n", GroupName)); + DPRINTM(DPRINT_WINDOWS, "Driver group: '%S'\n", GroupName); /* Query the Order */ BufferSize = sizeof(OrderList); @@ -510,7 +510,7 @@ /* Get the Driver's Name */ ValueSize = sizeof(ServiceName); rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); - //DPRINTM((DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc)); + //DPRINTM(DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc); /* Makre sure it's valid, and check if we're done */ if (rc == ERROR_NO_MORE_ITEMS) @@ -520,7 +520,7 @@ MmHeapFree(GroupNameBuffer); return; } - //DPRINTM((DPRINT_REACTOS, "Service %d: '%S'\n", (int)Index, ServiceName)); + //DPRINTM(DPRINT_REACTOS, "Service %d: '%S'\n", (int)Index, ServiceName); /* open driver Key */ rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); @@ -530,18 +530,18 @@ ValueSize = sizeof(ULONG); rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; - //DPRINTM((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); + //DPRINTM(DPRINT_REACTOS, " Start: %x \n", (int)StartValue); /* Read the Tag */ ValueSize = sizeof(ULONG); rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; - //DPRINTM((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); + //DPRINTM(DPRINT_REACTOS, " Tag: %x \n", (int)TagValue); /* Read the driver's group */ DriverGroupSize = sizeof(DriverGroup); rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - //DPRINTM((DPRINT_REACTOS, " Group: '%S' \n", DriverGroup)); + //DPRINTM(DPRINT_REACTOS, " Group: '%S' \n", DriverGroup); /* Make sure it should be started */ if ((StartValue == 0) && @@ -554,17 +554,17 @@ /* Write the whole path if it suceeded, else prepare to fail */ if (rc != ERROR_SUCCESS) { - DPRINTM((DPRINT_REACTOS, " ImagePath: not found\n")); + DPRINTM(DPRINT_REACTOS, " ImagePath: not found\n"); TempImagePath[0] = 0; sprintf(ImagePath, "%s\\system32\\drivers\\%S.sys", DirectoryPath, ServiceName); } else if (TempImagePath[0] != L'\\') { sprintf(ImagePath, "%s%S", DirectoryPath, TempImagePath); } else { sprintf(ImagePath, "%S", TempImagePath); - DPRINTM((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); + DPRINTM(DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath); } - DPRINTM((DPRINT_WINDOWS, " Adding boot driver: '%s'\n", ImagePath)); + DPRINTM(DPRINT_WINDOWS, " Adding boot driver: '%s'\n", ImagePath); Status = WinLdrAddDriverToList(&LoaderBlock->BootDriverListHead, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\", @@ -572,11 +572,11 @@ ServiceName); if (!Status) - DPRINTM((DPRINT_WINDOWS, " Failed to add boot driver\n")); + DPRINTM(DPRINT_WINDOWS, " Failed to add boot driver\n"); } else { - //DPRINTM((DPRINT_WINDOWS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current Tag %d, current group '%S')\n", - // ServiceName, StartValue, TagValue, DriverGroup, OrderList[TagIndex], GroupName)); + //DPRINTM(DPRINT_WINDOWS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current Tag %d, current group '%S')\n", + // ServiceName, StartValue, TagValue, DriverGroup, OrderList[TagIndex], GroupName); } } @@ -591,7 +591,7 @@ ValueSize = sizeof(ServiceName); rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); - //DPRINTM((DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc)); + //DPRINTM(DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc); if (rc == ERROR_NO_MORE_ITEMS) break; if (rc != ERROR_SUCCESS) @@ -599,7 +599,7 @@ MmHeapFree(GroupNameBuffer); return; } - //DPRINTM((DPRINT_REACTOS, "Service %d: '%S'\n", (int)Index, ServiceName)); + //DPRINTM(DPRINT_REACTOS, "Service %d: '%S'\n", (int)Index, ServiceName); /* open driver Key */ rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); @@ -609,18 +609,18 @@ ValueSize = sizeof(ULONG); rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; - //DPRINTM((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); + //DPRINTM(DPRINT_REACTOS, " Start: %x \n", (int)StartValue); /* Read the Tag */ ValueSize = sizeof(ULONG); rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; - //DPRINTM((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); + //DPRINTM(DPRINT_REACTOS, " Tag: %x \n", (int)TagValue); /* Read the driver's group */ DriverGroupSize = sizeof(DriverGroup); rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - //DPRINTM((DPRINT_REACTOS, " Group: '%S' \n", DriverGroup)); + //DPRINTM(DPRINT_REACTOS, " Group: '%S' \n", DriverGroup); for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) { if (TagValue == OrderList[TagIndex]) break; @@ -633,16 +633,16 @@ ValueSize = sizeof(TempImagePath); rc = RegQueryValue(hDriverKey, L"ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); if (rc != ERROR_SUCCESS) { - DPRINTM((DPRINT_REACTOS, " ImagePath: not found\n")); + DPRINTM(DPRINT_REACTOS, " ImagePath: not found\n"); TempImagePath[0] = 0; sprintf(ImagePath, "%ssystem32\\drivers\\%S.sys", DirectoryPath, ServiceName); } else if (TempImagePath[0] != L'\\') { sprintf(ImagePath, "%s%S", DirectoryPath, TempImagePath); } else { sprintf(ImagePath, "%S", TempImagePath); - DPRINTM((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); + DPRINTM(DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath); } - DPRINTM((DPRINT_WINDOWS, " Adding boot driver: '%s'\n", ImagePath)); + DPRINTM(DPRINT_WINDOWS, " Adding boot driver: '%s'\n", ImagePath); Status = WinLdrAddDriverToList(&LoaderBlock->BootDriverListHead, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\", @@ -650,11 +650,11 @@ ServiceName); if (!Status) - DPRINTM((DPRINT_WINDOWS, " Failed to add boot driver\n")); + DPRINTM(DPRINT_WINDOWS, " Failed to add boot driver\n"); } else { - //DPRINTM((DPRINT_WINDOWS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current group '%S')\n", - // ServiceName, StartValue, TagValue, DriverGroup, GroupName)); + //DPRINTM(DPRINT_WINDOWS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current group '%S')\n", + // ServiceName, StartValue, TagValue, DriverGroup, GroupName); } }
15 years, 11 months
1
0
0
0
[tkreuzer] 38950: Fix return value of FrLdrReadAndMapImage when image is already loaded.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Jan 19 12:45:26 2009 New Revision: 38950 URL:
http://svn.reactos.org/svn/reactos?rev=38950&view=rev
Log: Fix return value of FrLdrReadAndMapImage when image is already loaded. Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/imageldr.c Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/imageldr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/imageldr.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/imageldr.c [iso-8859-1] Mon Jan 19 12:45:26 2009 @@ -445,13 +445,15 @@ PIMAGE_NT_HEADERS NtHeader; PIMAGE_SECTION_HEADER Section; NTSTATUS Status = STATUS_SUCCESS; + PLOADER_MODULE pModule; /* Try to see, maybe it's loaded already */ - if (LdrGetModuleObject(Name) != NULL) - { - /* It's loaded, return NULL. It would be wise to return - correct LoadBase, but it seems to be ignored almost everywhere */ - return NULL; + if ((pModule = LdrGetModuleObject(Name)) != NULL) + { + /* It's loaded, return LoadBase */ + ImageBase = (PVOID)pModule->ModStart; + LoadBase = RVA(ImageBase, -KSEG0_BASE); + return LoadBase; } /* Set the virtual (image) and physical (load) addresses */
15 years, 11 months
1
0
0
0
[dchapyshev] 38949: - Update some icons (shell32) - Add defines for icons (shell32) - Add icon for .reg files (regedit) - Some fixes for hivecls_arm.inf and hivecls_i386.inf
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Mon Jan 19 12:36:03 2009 New Revision: 38949 URL:
http://svn.reactos.org/svn/reactos?rev=38949&view=rev
Log: - Update some icons (shell32) - Add defines for icons (shell32) - Add icon for .reg files (regedit) - Some fixes for hivecls_arm.inf and hivecls_i386.inf Added: trunk/reactos/base/applications/regedit/res/regfile.ico (with props) Modified: trunk/reactos/base/applications/regedit/regedit.rc trunk/reactos/base/applications/regedit/resource.h trunk/reactos/boot/bootdata/hivecls_arm.inf trunk/reactos/boot/bootdata/hivecls_i386.inf trunk/reactos/dll/win32/shell32/res/icons/151.ico trunk/reactos/dll/win32/shell32/res/icons/152.ico trunk/reactos/dll/win32/shell32/res/icons/154.ico trunk/reactos/dll/win32/shell32/res/icons/2.ico trunk/reactos/dll/win32/shell32/shresdef.h Modified: trunk/reactos/base/applications/regedit/regedit.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/regedit.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/regedit.rc [iso-8859-1] Mon Jan 19 12:36:03 2009 @@ -37,3 +37,4 @@ IDI_STRING ICON DISCARDABLE res/string.ico IDI_BIN ICON DISCARDABLE res/bin.ico IDI_REGEDIT ICON DISCARDABLE res/regedit.ico +IDI_REGFILE ICON DISCARDABLE res/regfile.ico Added: trunk/reactos/base/applications/regedit/res/regfile.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/applications/regedit/res/regfile.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: trunk/reactos/base/applications/regedit/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/resource.h [iso-8859-1] Mon Jan 19 12:36:03 2009 @@ -31,6 +31,7 @@ #define IDS_LIST_COLUMN_LAST 93 #define IDS_APP_TITLE 103 #define IDI_REGEDIT 100 +#define IDI_REGFILE 101 #define IDI_SMALL 108 #define IDC_REGEDIT 109 #define IDC_REGEDIT_FRAME 110 Modified: trunk/reactos/boot/bootdata/hivecls_arm.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivecls_arm.…
============================================================================== --- trunk/reactos/boot/bootdata/hivecls_arm.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivecls_arm.inf [iso-8859-1] Mon Jan 19 12:36:03 2009 @@ -41,7 +41,7 @@ HKCR,".386","",0x00000000,"vxdfile" HKCR,".vxd","",0x00000000,"vxdfile" HKCR,"vxdfile","",0x00000000,"Virtual Device Driver" -HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157" +HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-156" ; Animated Cursors HKCR,".ani","",0x00000000,"anifile" @@ -94,6 +94,7 @@ HKCR,".drv","",0x00000000,"drvfile" HKCR,"drvfile","",0x00000000,"Device Driver" HKCR,"drvfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-164" +HKCR,"drvfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154" ; Applicatons HKCR,".exe","",0x00000000,"exefile" Modified: trunk/reactos/boot/bootdata/hivecls_i386.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivecls_i386…
============================================================================== --- trunk/reactos/boot/bootdata/hivecls_i386.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivecls_i386.inf [iso-8859-1] Mon Jan 19 12:36:03 2009 @@ -41,7 +41,7 @@ HKCR,".386","",0x00000000,"vxdfile" HKCR,".vxd","",0x00000000,"vxdfile" HKCR,"vxdfile","",0x00000000,"Virtual Device Driver" -HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157" +HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-156" ; Animated Cursors HKCR,".ani","",0x00000000,"anifile" @@ -94,6 +94,7 @@ HKCR,".drv","",0x00000000,"drvfile" HKCR,"drvfile","",0x00000000,"Device Driver" HKCR,"drvfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-164" +HKCR,"drvfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154" ; Applicatons HKCR,".exe","",0x00000000,"exefile" Modified: trunk/reactos/dll/win32/shell32/res/icons/151.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/shell32/res/icons/152.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/shell32/res/icons/154.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/shell32/res/icons/2.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/shell32/shresdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
============================================================================== --- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Mon Jan 19 12:36:03 2009 @@ -207,6 +207,7 @@ #define IDS_PICK_ICON_FILTER 0x4125 #define IDI_SHELL_DOCUMENT 1 +#define IDI_SHELL_RICH_TEXT 2 #define IDI_SHELL_FOLDER 4 #define IDI_SHELL_FOLDER_OPEN 5 #define IDI_SHELL_5_12_FLOPPY 6 @@ -237,7 +238,15 @@ #define IDI_SHELL_FONTS_FOLDER 39 #define IDI_SHELL_OPEN_WITH 135 #define IDI_SHELL_TRASH_FILE 142 +#define IDI_SHELL_INF_FILE 151 +#define IDI_SHELL_TEXT_FILE 152 +#define IDI_SHELL_BAT_FILE 153 +#define IDI_SHELL_SYSTEM_FILE 154 +#define IDI_SHELL_FONT_FILE 155 +#define IDI_SHELL_TT_FONT_FILE 156 +#define IDI_SHELL_RUN2 160 #define IDI_SHELL_CONFIRM_DELETE 161 +#define IDI_SHELL_MUSIC_FILE 225 #define IDI_SHELL_MY_DOCUMENTS 235 #define IDI_SHELL_CONTROL_PANEL1 330 #define IDI_SHELL_ADMINTOOLS 328
15 years, 11 months
1
0
0
0
[sginsberg] 38948: - Remove unnecessary allowwarnings="true"
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Jan 19 12:08:28 2009 New Revision: 38948 URL:
http://svn.reactos.org/svn/reactos?rev=38948&view=rev
Log: - Remove unnecessary allowwarnings="true" Modified: trunk/reactos/base/applications/calc/calc.rbuild trunk/reactos/base/applications/cmdutils/hostname/hostname.rbuild trunk/reactos/base/applications/cmdutils/xcopy/xcopy.rbuild trunk/reactos/base/applications/games/solitaire/solitaire.rbuild trunk/reactos/base/applications/mstsc/mstsc.rbuild trunk/reactos/base/applications/network/ipconfig/ipconfig.rbuild trunk/reactos/base/applications/network/netstat/netstat.rbuild trunk/reactos/base/applications/regedit/regedit.rbuild trunk/reactos/base/setup/usetup/usetup.rbuild trunk/reactos/base/shell/explorer/explorer.rbuild trunk/reactos/base/system/format/format.rbuild trunk/reactos/base/system/msiexec/msiexec.rbuild trunk/reactos/dll/cpl/appwiz-new/appwiz.rbuild trunk/reactos/dll/directx/ddraw/ddraw.rbuild trunk/reactos/dll/directx/dinput/dinput.rbuild trunk/reactos/dll/directx/dplayx/dplayx.rbuild trunk/reactos/dll/directx/dsound/dsound.rbuild trunk/reactos/dll/directx/dxdiagn/dxdiagn.rbuild trunk/reactos/dll/directx/ksproxy/ksproxy.rbuild trunk/reactos/dll/directx/ksuser/ksuser.rbuild trunk/reactos/dll/directx/msdmo/msdmo.rbuild trunk/reactos/dll/directx/qedit/qedit.rbuild trunk/reactos/dll/directx/wine/d3d8/d3d8.rbuild trunk/reactos/dll/directx/wine/d3d9/d3d9.rbuild trunk/reactos/dll/keyboard/kbda1/kbda1.rbuild trunk/reactos/dll/keyboard/kbda2/kbda2.rbuild trunk/reactos/dll/keyboard/kbda3/kbda3.rbuild trunk/reactos/dll/keyboard/kbdal/kbdal.rbuild trunk/reactos/dll/keyboard/kbdarme/kbdarme.rbuild trunk/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild trunk/reactos/dll/keyboard/kbdaze/kbdaze.rbuild trunk/reactos/dll/keyboard/kbdazel/kbdazel.rbuild trunk/reactos/dll/keyboard/kbdbe/kbdbe.rbuild trunk/reactos/dll/keyboard/kbdbga/kbdbga.rbuild trunk/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild trunk/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild trunk/reactos/dll/keyboard/kbdblr/kbdblr.rbuild trunk/reactos/dll/keyboard/kbdbr/kbdbr.rbuild trunk/reactos/dll/keyboard/kbdbur/kbdbur.rbuild trunk/reactos/dll/keyboard/kbdcan/kbdcan.rbuild trunk/reactos/dll/keyboard/kbdcr/kbdcr.rbuild trunk/reactos/dll/keyboard/kbdcz/kbdcz.rbuild trunk/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild trunk/reactos/dll/keyboard/kbdda/kbdda.rbuild trunk/reactos/dll/keyboard/kbddv/kbddv.rbuild trunk/reactos/dll/keyboard/kbdes/kbdes.rbuild trunk/reactos/dll/keyboard/kbdest/kbdest.rbuild trunk/reactos/dll/keyboard/kbdfc/kbdfc.rbuild trunk/reactos/dll/keyboard/kbdfi/kbdfi.rbuild trunk/reactos/dll/keyboard/kbdfr/kbdfr.rbuild trunk/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild trunk/reactos/dll/keyboard/kbdgr/kbdgr.rbuild trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild trunk/reactos/dll/keyboard/kbdhe/kbdhe.rbuild trunk/reactos/dll/keyboard/kbdheb/kbdheb.rbuild trunk/reactos/dll/keyboard/kbdhu/kbdhu.rbuild trunk/reactos/dll/keyboard/kbdic/kbdic.rbuild trunk/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild trunk/reactos/dll/keyboard/kbdinben/kbdinben.rbuild trunk/reactos/dll/keyboard/kbdindev/kbdindev.rbuild trunk/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild trunk/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild trunk/reactos/dll/keyboard/kbdir/kbdir.rbuild trunk/reactos/dll/keyboard/kbdit/kbdit.rbuild trunk/reactos/dll/keyboard/kbdja/kbdja.rbuild trunk/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild trunk/reactos/dll/keyboard/kbdko/kbdko.rbuild trunk/reactos/dll/keyboard/kbdla/kbdla.rbuild trunk/reactos/dll/keyboard/kbdlt/kbdlt.rbuild trunk/reactos/dll/keyboard/kbdlv/kbdlv.rbuild trunk/reactos/dll/keyboard/kbdmac/kbdmac.rbuild trunk/reactos/dll/keyboard/kbdne/kbdne.rbuild trunk/reactos/dll/keyboard/kbdno/kbdno.rbuild trunk/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild trunk/reactos/dll/keyboard/kbdpo/kbdpo.rbuild trunk/reactos/dll/keyboard/kbdro/kbdro.rbuild trunk/reactos/dll/keyboard/kbdru/kbdru.rbuild trunk/reactos/dll/keyboard/kbdru1/kbdru1.rbuild trunk/reactos/dll/keyboard/kbdsg/kbdsg.rbuild trunk/reactos/dll/keyboard/kbdsk/kbdsk.rbuild trunk/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild trunk/reactos/dll/keyboard/kbdsw/kbdsw.rbuild trunk/reactos/dll/keyboard/kbdtat/kbdtat.rbuild trunk/reactos/dll/keyboard/kbdth0/kbdth0.rbuild trunk/reactos/dll/keyboard/kbdth1/kbdth1.rbuild trunk/reactos/dll/keyboard/kbdth2/kbdth2.rbuild trunk/reactos/dll/keyboard/kbdth3/kbdth3.rbuild trunk/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild trunk/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild trunk/reactos/dll/keyboard/kbduk/kbduk.rbuild trunk/reactos/dll/keyboard/kbdur/kbdur.rbuild trunk/reactos/dll/keyboard/kbdurs/kbdurs.rbuild trunk/reactos/dll/keyboard/kbdus/kbdus.rbuild trunk/reactos/dll/keyboard/kbdusa/kbdusa.rbuild trunk/reactos/dll/keyboard/kbdusl/kbdusl.rbuild trunk/reactos/dll/keyboard/kbdusr/kbdusr.rbuild trunk/reactos/dll/keyboard/kbdusx/kbdusx.rbuild trunk/reactos/dll/keyboard/kbduzb/kbduzb.rbuild trunk/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild trunk/reactos/dll/keyboard/kbdycc/kbdycc.rbuild trunk/reactos/dll/keyboard/kbdycl/kbdycl.rbuild trunk/reactos/drivers/bus/acpi/acpi.rbuild trunk/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.rbuild trunk/reactos/drivers/multimedia/audio/sndblst/sndblst.rbuild trunk/reactos/drivers/usb/usbstor/usbstor.rbuild trunk/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild trunk/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rbuild trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.rbuild trunk/reactos/hal/halx86/halxbox.rbuild trunk/reactos/subsystems/win32/win32k/win32k.rbuild trunk/reactos/tools/widl/widl.rbuild trunk/reactos/tools/wpp/wpp.rbuild trunk/reactos/tools/wrc/wrc.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/calc/calc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/cal…
Modified: trunk/reactos/base/applications/cmdutils/hostname/hostname.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
Modified: trunk/reactos/base/applications/cmdutils/xcopy/xcopy.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
Modified: trunk/reactos/base/applications/games/solitaire/solitaire.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/mstsc/mstsc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ms…
Modified: trunk/reactos/base/applications/network/ipconfig/ipconfig.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
Modified: trunk/reactos/base/applications/network/netstat/netstat.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
Modified: trunk/reactos/base/applications/regedit/regedit.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
Modified: trunk/reactos/base/setup/usetup/usetup.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.r…
Modified: trunk/reactos/base/shell/explorer/explorer.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explor…
Modified: trunk/reactos/base/system/format/format.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/format.…
Modified: trunk/reactos/base/system/msiexec/msiexec.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/msiexec/msiexe…
Modified: trunk/reactos/dll/cpl/appwiz-new/appwiz.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/appwiz-new/appwiz.…
Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rb…
Modified: trunk/reactos/dll/directx/dinput/dinput.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/dinput.…
Modified: trunk/reactos/dll/directx/dplayx/dplayx.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dplayx/dplayx.…
Modified: trunk/reactos/dll/directx/dsound/dsound.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dsound/dsound.…
Modified: trunk/reactos/dll/directx/dxdiagn/dxdiagn.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dxdiagn/dxdiag…
Modified: trunk/reactos/dll/directx/ksproxy/ksproxy.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/ksprox…
Modified: trunk/reactos/dll/directx/ksuser/ksuser.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksuser/ksuser.…
Modified: trunk/reactos/dll/directx/msdmo/msdmo.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdmo/msdmo.rb…
Modified: trunk/reactos/dll/directx/qedit/qedit.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/qedit.rb…
Modified: trunk/reactos/dll/directx/wine/d3d8/d3d8.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3d8/d3d8…
Modified: trunk/reactos/dll/directx/wine/d3d9/d3d9.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3d9/d3d9…
Modified: trunk/reactos/dll/keyboard/kbda1/kbda1.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbda1/kbda1.r…
Modified: trunk/reactos/dll/keyboard/kbda2/kbda2.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbda2/kbda2.r…
Modified: trunk/reactos/dll/keyboard/kbda3/kbda3.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbda3/kbda3.r…
Modified: trunk/reactos/dll/keyboard/kbdal/kbdal.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdal/kbdal.r…
Modified: trunk/reactos/dll/keyboard/kbdarme/kbdarme.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdarme/kbdar…
Modified: trunk/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdarmw/kbdar…
Modified: trunk/reactos/dll/keyboard/kbdaze/kbdaze.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdaze/kbdaze…
Modified: trunk/reactos/dll/keyboard/kbdazel/kbdazel.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdazel/kbdaz…
Modified: trunk/reactos/dll/keyboard/kbdbe/kbdbe.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbe/kbdbe.r…
Modified: trunk/reactos/dll/keyboard/kbdbga/kbdbga.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbga/kbdbga…
Modified: trunk/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbgm/kbdbgm…
Modified: trunk/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbgt/kbdbgt…
Modified: trunk/reactos/dll/keyboard/kbdblr/kbdblr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdblr/kbdblr…
Modified: trunk/reactos/dll/keyboard/kbdbr/kbdbr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbr/kbdbr.r…
Modified: trunk/reactos/dll/keyboard/kbdbur/kbdbur.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdbur/kbdbur…
Modified: trunk/reactos/dll/keyboard/kbdcan/kbdcan.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcan/kbdcan…
Modified: trunk/reactos/dll/keyboard/kbdcr/kbdcr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcr/kbdcr.r…
Modified: trunk/reactos/dll/keyboard/kbdcz/kbdcz.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcz/kbdcz.r…
Modified: trunk/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdcz1/kbdcz1…
Modified: trunk/reactos/dll/keyboard/kbdda/kbdda.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdda/kbdda.r…
Modified: trunk/reactos/dll/keyboard/kbddv/kbddv.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbddv/kbddv.r…
Modified: trunk/reactos/dll/keyboard/kbdes/kbdes.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdes/kbdes.r…
Modified: trunk/reactos/dll/keyboard/kbdest/kbdest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdest/kbdest…
Modified: trunk/reactos/dll/keyboard/kbdfc/kbdfc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdfc/kbdfc.r…
Modified: trunk/reactos/dll/keyboard/kbdfi/kbdfi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdfi/kbdfi.r…
Modified: trunk/reactos/dll/keyboard/kbdfr/kbdfr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdfr/kbdfr.r…
Modified: trunk/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgeo/kbdgeo…
Modified: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgerg/kbdge…
Modified: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgneo/kbdgn…
Modified: trunk/reactos/dll/keyboard/kbdgr/kbdgr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgr/kbdgr.r…
Modified: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgrist/kbdg…
Modified: trunk/reactos/dll/keyboard/kbdhe/kbdhe.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdhe/kbdhe.r…
Modified: trunk/reactos/dll/keyboard/kbdheb/kbdheb.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdheb/kbdheb…
Modified: trunk/reactos/dll/keyboard/kbdhu/kbdhu.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdhu/kbdhu.r…
Modified: trunk/reactos/dll/keyboard/kbdic/kbdic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdic/kbdic.r…
Modified: trunk/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinasa/kbdi…
Modified: trunk/reactos/dll/keyboard/kbdinben/kbdinben.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinben/kbdi…
Modified: trunk/reactos/dll/keyboard/kbdindev/kbdindev.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdindev/kbdi…
Modified: trunk/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinguj/kbdi…
Modified: trunk/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdinmal/kbdi…
Modified: trunk/reactos/dll/keyboard/kbdir/kbdir.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdir/kbdir.r…
Modified: trunk/reactos/dll/keyboard/kbdit/kbdit.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdit/kbdit.r…
Modified: trunk/reactos/dll/keyboard/kbdja/kbdja.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdja/kbdja.r…
Modified: trunk/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdkaz/kbdkaz…
Modified: trunk/reactos/dll/keyboard/kbdko/kbdko.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdko/kbdko.r…
Modified: trunk/reactos/dll/keyboard/kbdla/kbdla.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdla/kbdla.r…
Modified: trunk/reactos/dll/keyboard/kbdlt/kbdlt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdlt/kbdlt.r…
Modified: trunk/reactos/dll/keyboard/kbdlv/kbdlv.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdlv/kbdlv.r…
Modified: trunk/reactos/dll/keyboard/kbdmac/kbdmac.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdmac/kbdmac…
Modified: trunk/reactos/dll/keyboard/kbdne/kbdne.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdne/kbdne.r…
Modified: trunk/reactos/dll/keyboard/kbdno/kbdno.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdno/kbdno.r…
Modified: trunk/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdpl1/kbdpl1…
Modified: trunk/reactos/dll/keyboard/kbdpo/kbdpo.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdpo/kbdpo.r…
Modified: trunk/reactos/dll/keyboard/kbdro/kbdro.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdro/kbdro.r…
Modified: trunk/reactos/dll/keyboard/kbdru/kbdru.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdru/kbdru.r…
Modified: trunk/reactos/dll/keyboard/kbdru1/kbdru1.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdru1/kbdru1…
Modified: trunk/reactos/dll/keyboard/kbdsg/kbdsg.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsg/kbdsg.r…
Modified: trunk/reactos/dll/keyboard/kbdsk/kbdsk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsk/kbdsk.r…
Modified: trunk/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsk1/kbdsk1…
Modified: trunk/reactos/dll/keyboard/kbdsw/kbdsw.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdsw/kbdsw.r…
Modified: trunk/reactos/dll/keyboard/kbdtat/kbdtat.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdtat/kbdtat…
Modified: trunk/reactos/dll/keyboard/kbdth0/kbdth0.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth0/kbdth0…
Modified: trunk/reactos/dll/keyboard/kbdth1/kbdth1.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth1/kbdth1…
Modified: trunk/reactos/dll/keyboard/kbdth2/kbdth2.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth2/kbdth2…
Modified: trunk/reactos/dll/keyboard/kbdth3/kbdth3.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdth3/kbdth3…
Modified: trunk/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdtuf/kbdtuf…
Modified: trunk/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdtuq/kbdtuq…
Modified: trunk/reactos/dll/keyboard/kbduk/kbduk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbduk/kbduk.r…
Modified: trunk/reactos/dll/keyboard/kbdur/kbdur.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdur/kbdur.r…
Modified: trunk/reactos/dll/keyboard/kbdurs/kbdurs.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdurs/kbdurs…
Modified: trunk/reactos/dll/keyboard/kbdus/kbdus.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdus/kbdus.r…
Modified: trunk/reactos/dll/keyboard/kbdusa/kbdusa.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusa/kbdusa…
Modified: trunk/reactos/dll/keyboard/kbdusl/kbdusl.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusl/kbdusl…
Modified: trunk/reactos/dll/keyboard/kbdusr/kbdusr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusr/kbdusr…
Modified: trunk/reactos/dll/keyboard/kbdusx/kbdusx.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusx/kbdusx…
Modified: trunk/reactos/dll/keyboard/kbduzb/kbduzb.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbduzb/kbduzb…
Modified: trunk/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdvntc/kbdvn…
Modified: trunk/reactos/dll/keyboard/kbdycc/kbdycc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdycc/kbdycc…
Modified: trunk/reactos/dll/keyboard/kbdycl/kbdycl.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdycl/kbdycl…
Modified: trunk/reactos/drivers/bus/acpi/acpi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpi.rbui…
Modified: trunk/reactos/drivers/multimedia/audio/sb16_nt4/sb16_nt4.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/multimedia/audio/s…
Modified: trunk/reactos/drivers/multimedia/audio/sndblst/sndblst.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/multimedia/audio/s…
Modified: trunk/reactos/drivers/usb/usbstor/usbstor.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/usbsto…
Modified: trunk/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/…
Modified: trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drm/drmk…
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
Modified: trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
Modified: trunk/reactos/hal/halx86/halxbox.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/halxbox.rbuild?…
Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
Modified: trunk/reactos/tools/widl/widl.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl.rbuild?rev…
Modified: trunk/reactos/tools/wpp/wpp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wpp/wpp.rbuild?rev=3…
Modified: trunk/reactos/tools/wrc/wrc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wrc/wrc.rbuild?rev=3…
15 years, 11 months
1
0
0
0
[tkreuzer] 38947: Fix rsym a bit, so that it properly calculates the section start. Now reactos boots again.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Jan 19 12:05:27 2009 New Revision: 38947 URL:
http://svn.reactos.org/svn/reactos?rev=38947&view=rev
Log: Fix rsym a bit, so that it properly calculates the section start. Now reactos boots again. Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] Mon Jan 19 12:05:27 2009 @@ -723,7 +723,7 @@ { DWORD OldChecksum, Checksum; ULONG Alignment, CurrentPos; - int i; + int i, j; /* Check if MZ header exists */ File->DosHeader = (PIMAGE_DOS_HEADER)File->FilePtr; @@ -786,8 +786,6 @@ File->NewSectionHeaders = malloc((File->AllSections+2) * sizeof(IMAGE_SECTION_HEADER)); File->UsedSections = 0; File->eh_frame.idx = -1; - CurrentPos = File->SectionHeaders[0].PointerToRawData; -// CurrentPos = ROUND_UP(File->HeaderSize, Alignment); /* Allocate array of chars, specifiying wheter to copy the section */ File->UseSection = malloc(File->AllSections); @@ -814,25 +812,36 @@ File->eh_frame.idx = i; File->eh_frame.p = File->FilePtr + File->eh_frame.psh->PointerToRawData; } - + + /* Increase number of used sections */ if (File->UseSection[i]) - { - /* Copy section header */ - File->NewSectionHeaders[File->UsedSections] = - File->SectionHeaders[i]; - /* Fix Offset into File */ - File->NewSectionHeaders[File->UsedSections].PointerToRawData = - File->SectionHeaders[i].PointerToRawData ? CurrentPos : 0; - CurrentPos += File->NewSectionHeaders[File->UsedSections].SizeOfRawData; - - /* Increase number of used sections */ File->UsedSections++; - } + } /* This is the actual size of the new section headers */ File->NewSectionHeaderSize = (File->UsedSections+2) * sizeof(IMAGE_SECTION_HEADER); + + /* Calculate the position to start writing the sections to */ + CurrentPos = File->HeaderSize + File->NewSectionHeaderSize; + CurrentPos = ROUND_UP(CurrentPos, Alignment); + + /* Create new section headers */ + for (i = 0, j = 0; i < File->AllSections; i++) + { + if (File->UseSection[i]) + { + /* Copy section header */ + File->NewSectionHeaders[j] = + File->SectionHeaders[i]; + /* Fix Offset into File */ + File->NewSectionHeaders[j].PointerToRawData = + File->SectionHeaders[i].PointerToRawData ? CurrentPos : 0; + CurrentPos += File->NewSectionHeaders[j].SizeOfRawData; + j++; + } + } if (File->eh_frame.idx == -1) {
15 years, 11 months
1
0
0
0
[jmorlan] 38946: cmd_rmdir: Implement ability to remove multiple directories with one command.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Mon Jan 19 11:29:21 2009 New Revision: 38946 URL:
http://svn.reactos.org/svn/reactos?rev=38946&view=rev
Log: cmd_rmdir: Implement ability to remove multiple directories with one command. Modified: trunk/reactos/base/shell/cmd/internal.c Modified: trunk/reactos/base/shell/cmd/internal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/internal.c?…
============================================================================== --- trunk/reactos/base/shell/cmd/internal.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/internal.c [iso-8859-1] Mon Jan 19 11:29:21 2009 @@ -542,16 +542,15 @@ } INT cmd_rmdir (LPTSTR param) { - TCHAR dir[MAX_PATH]; /* pointer to the directory to change to */ TCHAR ch; INT args; - LPTSTR *arg = NULL; + INT dirCount; + LPTSTR *arg; INT i; BOOL RD_SUB = FALSE; BOOL RD_QUIET = FALSE; - HANDLE hFile; - WIN32_FIND_DATA f; INT res; + INT nError = 0; TCHAR szFullPath[MAX_PATH]; if (!_tcsncmp (param, _T("/?"), 2)) @@ -560,19 +559,8 @@ return 0; } - nErrorLevel = 0; - arg = split (param, &args, FALSE); - - if (args == 0) - { - /* only command given */ - error_req_param_missing (); - freep (arg); - return 1; - } - - dir[0] = 0; + dirCount = 0; /* check for options anywhere in command line */ for (i = 0; i < args; i++) @@ -596,76 +584,61 @@ } else { - /* get the folder name */ - _tcscpy(dir,arg[i]); - } - } - - if (dir[0] == _T('\0')) + dirCount++; + } + } + + if (dirCount == 0) { /* No folder to remove */ - ConErrResPuts(STRING_ERROR_REQ_PARAM_MISSING); + error_req_param_missing(); freep(arg); return 1; } - GetFullPathName(dir,MAX_PATH,szFullPath,NULL); - - /* remove trailing \ if any, but ONLY if dir is not the root dir */ - if (_tcslen (szFullPath) >= 2 && szFullPath[_tcslen (szFullPath) - 1] == _T('\\')) - szFullPath[_tcslen(szFullPath) - 1] = _T('\0'); - - if(RD_SUB) - { - /* ask if they want to delete evrything in the folder */ - if (!RD_QUIET) - { - res = FilePromptYNA (STRING_DEL_HELP2); - if ((res == PROMPT_NO) || (res == PROMPT_BREAK)) + for (i = 0; i < args; i++) + { + if (*arg[i] == _T('/')) + continue; + + if (RD_SUB) + { + /* ask if they want to delete evrything in the folder */ + if (!RD_QUIET) { - freep(arg); - nErrorLevel = 1; - return 1; + res = FilePromptYNA (STRING_DEL_HELP2); + if (res == PROMPT_NO || res == PROMPT_BREAK) + { + nError = 1; + continue; + } + if (res == PROMPT_ALL) + RD_QUIET = TRUE; } - } - - } - else - { - /* check for files in the folder */ - _tcscat(szFullPath,_T("\\*")); - - hFile = FindFirstFile(szFullPath, &f); - if (hFile != INVALID_HANDLE_VALUE) - { - do - { - if (!_tcscmp(f.cFileName,_T(".")) || - !_tcscmp(f.cFileName,_T(".."))) - continue; - ConOutResPuts(STRING_RMDIR_HELP2); - freep(arg); - FindClose (hFile); - nErrorLevel = 1; - return 1; - } while (FindNextFile (hFile, &f)); - FindClose (hFile); - } - /* reovme the \\* */ - szFullPath[_tcslen(szFullPath) - 2] = _T('\0'); - } - - if (!DeleteFolder(szFullPath)) - { - /* Couldnt delete the folder, clean up and print out the error */ - ErrorMessage (GetLastError(), _T("RD")); - freep (arg); - nErrorLevel = 1; - return 1; + /* get the folder name */ + GetFullPathName(arg[i],MAX_PATH,szFullPath,NULL); + + /* remove trailing \ if any, but ONLY if dir is not the root dir */ + if (_tcslen (szFullPath) >= 2 && szFullPath[_tcslen (szFullPath) - 1] == _T('\\')) + szFullPath[_tcslen(szFullPath) - 1] = _T('\0'); + + res = DeleteFolder(szFullPath); + } + else + { + res = RemoveDirectory(arg[i]); + } + + if (!res) + { + /* Couldn't delete the folder, print out the error */ + nError = GetLastError(); + ErrorMessage(nError, _T("RD")); + } } freep (arg); - return 0; + return nError; } #endif
15 years, 11 months
1
0
0
0
[tkreuzer] 38945: Improve GetSetConsoleInputExeNameAW, removing the excessive SEH use. Fixes 1 kernel32 console winetest.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Jan 19 11:08:47 2009 New Revision: 38945 URL:
http://svn.reactos.org/svn/reactos?rev=38945&view=rev
Log: Improve GetSetConsoleInputExeNameAW, removing the excessive SEH use. Fixes 1 kernel32 console winetest. Modified: trunk/reactos/dll/win32/kernel32/misc/console.c Modified: trunk/reactos/dll/win32/kernel32/misc/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/console.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/console.c [iso-8859-1] Mon Jan 19 11:08:47 2009 @@ -29,7 +29,8 @@ static PHANDLER_ROUTINE* CtrlHandlers = NULL; static ULONG NrCtrlHandlers = 0; -static WCHAR InputExeName[MAX_PATH + 1] = L""; +#define INPUTEXENAME_BUFLEN 256 +static WCHAR InputExeName[INPUTEXENAME_BUFLEN] = L""; /* Default Console Control Handler *******************************************/ @@ -3755,187 +3756,172 @@ } -/*-------------------------------------------------------------- - * SetConsoleInputExeNameW - * - * @implemented +/****************************************************************************** + * \name SetConsoleInputExeNameW + * \brief Sets the console input file name from a unicode string. + * \param lpInputExeName Pointer to a unicode string with the name. + * \return TRUE if successful, FALSE if unsuccsedful. + * \remarks If lpInputExeName is 0 or the string length is 0 or greater than 255, + * the function fails and sets last error to ERROR_INVALID_PARAMETER. */ BOOL WINAPI SetConsoleInputExeNameW(LPCWSTR lpInputExeName) { - NTSTATUS Status = STATUS_SUCCESS; - int lenName = lstrlenW(lpInputExeName); - - if(lenName < 1 || - lenName > (int)(sizeof(InputExeName) / sizeof(InputExeName[0])) - 1) - { - /* Fail if string is empty or too long */ - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - RtlEnterCriticalSection(&ConsoleLock); - _SEH2_TRY - { + int lenName; + + if (!lpInputExeName + || (lenName = lstrlenW(lpInputExeName)) == 0 + || lenName > INPUTEXENAME_BUFLEN - 1) + { + /* Fail if string is empty or too long */ + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + RtlEnterCriticalSection(&ConsoleLock); _SEH2_TRY { - RtlCopyMemory(InputExeName, lpInputExeName, lenName * sizeof(WCHAR)); - InputExeName[lenName] = L'\0'; + RtlCopyMemory(InputExeName, lpInputExeName, lenName * sizeof(WCHAR)); + InputExeName[lenName] = L'\0'; } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + _SEH2_FINALLY { - Status = _SEH2_GetExceptionCode(); + RtlLeaveCriticalSection(&ConsoleLock); } _SEH2_END; - } - _SEH2_FINALLY - { - RtlLeaveCriticalSection(&ConsoleLock); - } - _SEH2_END; - - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return FALSE; - } - - return TRUE; -} - - -/*-------------------------------------------------------------- - * SetConsoleInputExeNameA - * - * @implemented + + return TRUE; +} + + +/****************************************************************************** + * \name SetConsoleInputExeNameA + * \brief Sets the console input file name from an ansi string. + * \param lpInputExeName Pointer to an ansi string with the name. + * \return TRUE if successful, FALSE if unsuccsedful. + * \remarks If lpInputExeName is 0 or the string length is 0 or greater than 255, + * the function fails and sets last error to ERROR_INVALID_PARAMETER. */ BOOL WINAPI SetConsoleInputExeNameA(LPCSTR lpInputExeName) { - ANSI_STRING InputExeNameA; - UNICODE_STRING InputExeNameU; - NTSTATUS Status; - BOOL Ret; - - RtlInitAnsiString(&InputExeNameA, lpInputExeName); - - if(InputExeNameA.Length < sizeof(InputExeNameA.Buffer[0]) || - InputExeNameA.Length >= (sizeof(InputExeName) / sizeof(InputExeName[0])) - 1) - { - /* Fail if string is empty or too long */ - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - Status = RtlAnsiStringToUnicodeString(&InputExeNameU, &InputExeNameA, TRUE); - if(NT_SUCCESS(Status)) - { - Ret = SetConsoleInputExeNameW(InputExeNameU.Buffer); - RtlFreeUnicodeString(&InputExeNameU); - } - else - { - SetLastErrorByStatus(Status); - Ret = FALSE; - } - - return Ret; -} - - -/*-------------------------------------------------------------- - * GetConsoleInputExeNameW - * - * @implemented + WCHAR Buffer[INPUTEXENAME_BUFLEN]; + ANSI_STRING InputExeNameA; + UNICODE_STRING InputExeNameU; + NTSTATUS Status; + BOOL Ret; + + RtlInitAnsiString(&InputExeNameA, lpInputExeName); + + if(InputExeNameA.Length == 0 || + InputExeNameA.Length > INPUTEXENAME_BUFLEN - 1) + { + /* Fail if string is empty or too long */ + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + InputExeNameU.Buffer = Buffer; + InputExeNameU.MaximumLength = sizeof(Buffer); + InputExeNameU.Length = 0; + Status = RtlAnsiStringToUnicodeString(&InputExeNameU, &InputExeNameA, FALSE); + if(NT_SUCCESS(Status)) + { + Ret = SetConsoleInputExeNameW(InputExeNameU.Buffer); + } + else + { + SetLastErrorByStatus(Status); + Ret = FALSE; + } + + return Ret; +} + + +/****************************************************************************** + * \name GetConsoleInputExeNameW + * \brief Retrieves the console input file name as unicode string. + * \param nBufferLength Length of the buffer in WCHARs. + * Specify 0 to recieve the needed buffer length. + * \param lpBuffer Pointer to a buffer that recieves the string. + * \return Needed buffer size if \p nBufferLength is 0. + * Otherwise 1 if successful, 2 if buffer is too small. + * \remarks Sets last error value to ERROR_BUFFER_OVERFLOW if the buffer + * is not big enough. */ DWORD WINAPI GetConsoleInputExeNameW(DWORD nBufferLength, LPWSTR lpBuffer) { - NTSTATUS Status = STATUS_SUCCESS; - int lenName = 0; - - RtlEnterCriticalSection(&ConsoleLock); - _SEH2_TRY - { + int lenName = lstrlenW(InputExeName); + + if (nBufferLength == 0) + { + /* Buffer size is requested, return it */ + return lenName + 1; + } + + if(lenName + 1 > nBufferLength) + { + /* Buffer is not large enough! */ + SetLastError(ERROR_BUFFER_OVERFLOW); + return 2; + } + + RtlEnterCriticalSection(&ConsoleLock); _SEH2_TRY { - lenName = lstrlenW(InputExeName); - if(lenName >= (int)nBufferLength) - { - /* buffer is not large enough, return the required size */ - SetLastError(ERROR_BUFFER_OVERFLOW); - lenName += 1; - } - RtlCopyMemory(lpBuffer, InputExeName, (lenName + 1) * sizeof(WCHAR)); + RtlCopyMemory(lpBuffer, InputExeName, lenName * sizeof(WCHAR)); + lpBuffer[lenName] = '\0'; } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + _SEH2_FINALLY { - Status = _SEH2_GetExceptionCode(); + RtlLeaveCriticalSection(&ConsoleLock); } _SEH2_END; - } - _SEH2_FINALLY - { - RtlLeaveCriticalSection(&ConsoleLock); - } - _SEH2_END; - - if (!NT_SUCCESS(Status)) - { - SetLastError(ERROR_BUFFER_OVERFLOW); - return lenName + 1; - } - - return lenName; -} - - -/*-------------------------------------------------------------- - * GetConsoleInputExeNameA - * - * @implemented + + /* Success, return 1 */ + return 1; +} + + +/****************************************************************************** + * \name GetConsoleInputExeNameA + * \brief Retrieves the console input file name as ansi string. + * \param nBufferLength Length of the buffer in CHARs. + * \param lpBuffer Pointer to a buffer that recieves the string. + * \return 1 if successful, 2 if buffer is too small. + * \remarks Sets last error value to ERROR_BUFFER_OVERFLOW if the buffer + * is not big enough. The buffer recieves as much characters as fit. */ DWORD WINAPI GetConsoleInputExeNameA(DWORD nBufferLength, LPSTR lpBuffer) { - WCHAR *Buffer; - DWORD Ret; - - if(nBufferLength > 0) - { - Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, nBufferLength * sizeof(WCHAR)); - if(Buffer == NULL) + WCHAR Buffer[INPUTEXENAME_BUFLEN]; + DWORD Ret; + UNICODE_STRING BufferU; + ANSI_STRING BufferA; + + /* Get the unicode name */ + Ret = GetConsoleInputExeNameW(sizeof(Buffer) / sizeof(Buffer[0]), Buffer); + + /* Initialize strings for conversion */ + RtlInitUnicodeString(&BufferU, Buffer); + BufferA.Length = 0; + BufferA.MaximumLength = nBufferLength; + BufferA.Buffer = lpBuffer; + + /* Convert unicode name to ansi, copying as much chars as fit */ + RtlUnicodeStringToAnsiString(&BufferA, &BufferU, FALSE); + + /* Error handling */ + if(nBufferLength <= BufferU.Length / sizeof(WCHAR)) { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return 0; + SetLastError(ERROR_BUFFER_OVERFLOW); + return 2; } - } - else - { - Buffer = NULL; - } - - Ret = GetConsoleInputExeNameW(nBufferLength, Buffer); - if(nBufferLength > 0) - { - if(Ret > 0) - { - UNICODE_STRING BufferU; - ANSI_STRING BufferA; - - RtlInitUnicodeString(&BufferU, Buffer); - - BufferA.Length = 0; - BufferA.MaximumLength = (USHORT)nBufferLength; - BufferA.Buffer = lpBuffer; - - RtlUnicodeStringToAnsiString(&BufferA, &BufferU, FALSE); - } - - RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); - } - - return Ret; + + return Ret; }
15 years, 11 months
1
0
0
0
[cwittich] 38944: sync wintrust_winetest to wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Jan 19 11:04:46 2009 New Revision: 38944 URL:
http://svn.reactos.org/svn/reactos?rev=38944&view=rev
Log: sync wintrust_winetest to wine 1.1.13 Modified: trunk/rostests/winetests/wintrust/asn.c trunk/rostests/winetests/wintrust/crypt.c Modified: trunk/rostests/winetests/wintrust/asn.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/asn.c?…
============================================================================== --- trunk/rostests/winetests/wintrust/asn.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wintrust/asn.c [iso-8859-1] Mon Jan 19 11:04:46 2009 @@ -221,7 +221,7 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, emptyURLSPCLink, sizeof(emptyURLSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL, - (BYTE *)&buf, &size); + &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -233,7 +233,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, urlSPCLink, sizeof(urlSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL, - (BYTE *)&buf, &size); + &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -245,7 +245,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, fileSPCLink, sizeof(fileSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL, - (BYTE *)&buf, &size); + &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -257,7 +257,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, emptyMonikerSPCLink, sizeof(emptyMonikerSPCLink), CRYPT_DECODE_ALLOC_FLAG, - NULL, (BYTE *)&buf, &size); + NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -274,7 +274,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, monikerSPCLink, sizeof(monikerSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL, - (BYTE *)&buf, &size); + &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -295,7 +295,7 @@ SetLastError(0xdeadbeef); ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, badMonikerSPCLink, sizeof(badMonikerSPCLink), CRYPT_DECODE_ALLOC_FLAG, - NULL, (BYTE *)&buf, &size); + NULL, &buf, &size); ok(!ret && (GetLastError() == CRYPT_E_BAD_ENCODE || GetLastError() == OSS_DATA_ERROR /* Win9x */), @@ -436,7 +436,7 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT, emptySequence, sizeof(emptySequence), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -448,7 +448,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT, onlyFlagsPEImage, sizeof(onlyFlagsPEImage), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -463,7 +463,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT, onlyEmptyFilePEImage, sizeof(onlyEmptyFilePEImage), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -483,7 +483,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT, flagsAndEmptyFilePEImage, sizeof(flagsAndEmptyFilePEImage), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -506,7 +506,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT, flagsAndFilePEImage, sizeof(flagsAndFilePEImage), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -572,7 +572,7 @@ } info.pwszSubjGuid = foo; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT, - (LPBYTE)&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -584,7 +584,7 @@ } info.pwszSubjGuid = guidStr; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT, - (LPBYTE)&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -611,7 +611,7 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT, emptyCatMemberInfo, sizeof(emptyCatMemberInfo), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -624,7 +624,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT, catMemberInfoWithSillyGuid, sizeof(catMemberInfoWithSillyGuid), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -637,7 +637,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT, catMemberInfoWithGuid, sizeof(catMemberInfoWithGuid), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -671,7 +671,7 @@ memset(&value, 0, sizeof(value)); ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, - (LPBYTE)&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -682,7 +682,7 @@ } value.pwszTag = foo; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, - (LPBYTE)&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -694,7 +694,7 @@ value.pwszTag = NULL; value.fdwFlags = 0xf00dd00d; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, - (LPBYTE)&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -707,7 +707,7 @@ value.Value.cbData = sizeof(aVal); value.Value.pbData = aVal; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, - (LPBYTE)&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -727,7 +727,7 @@ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, emptyCatNameValue, sizeof(emptyCatNameValue), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -741,7 +741,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, catNameValueWithTag, sizeof(catNameValueWithTag), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -756,7 +756,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, catNameValueWithFlags, sizeof(catNameValueWithFlags), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -770,7 +770,7 @@ } ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT, catNameValueWithValue, sizeof(catNameValueWithValue), - CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -809,7 +809,7 @@ memset(&info, 0, sizeof(info)); ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, - (LPBYTE)&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -819,7 +819,7 @@ } info.pwszProgramName = progName; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, - (LPBYTE)&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -834,13 +834,13 @@ info.pMoreInfo = &moreInfo; SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, - (LPBYTE)&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(!ret && GetLastError() == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", GetLastError()); moreInfo.dwLinkChoice = SPC_URL_LINK_CHOICE; moreInfo.pwszUrl = winehq; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, - (LPBYTE)&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -853,7 +853,7 @@ info.pMoreInfo = NULL; info.pPublisherInfo = &moreInfo; ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT, - (LPBYTE)&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); + &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { Modified: trunk/rostests/winetests/wintrust/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/crypt.…
============================================================================== --- trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] Mon Jan 19 11:04:46 2009 @@ -29,6 +29,8 @@ static char selfname[MAX_PATH]; static CHAR CURR_DIR[MAX_PATH]; +static CHAR catroot[MAX_PATH]; +static CHAR catroot2[MAX_PATH]; /* * Minimalistic catalog file. To reconstruct, save text below as winetest.cdf, @@ -48,7 +50,7 @@ hashme=.\winetest.cdf */ -const BYTE test_catalog[] = { +static const BYTE test_catalog[] = { 0x30, 0x82, 0x01, 0xbc, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x01, 0xad, 0x30, 0x82, 0x01, 0xa9, 0x02, 0x01, 0x01, 0x31, 0x00, 0x30, 0x82, 0x01, 0x9e, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x0a, 0x01, 0xa0, 0x82, 0x01, 0x8f, 0x30, @@ -85,6 +87,11 @@ static HCATINFO (WINAPI * pCryptCATAdminAddCatalog)(HCATADMIN, PWSTR, PWSTR, DWORD); static BOOL (WINAPI * pCryptCATAdminRemoveCatalog)(HCATADMIN, LPCWSTR, DWORD); static BOOL (WINAPI * pCryptCATAdminReleaseCatalogContext)(HCATADMIN, HCATINFO, DWORD); +static HANDLE (WINAPI * pCryptCATOpen)(LPWSTR, DWORD, HCRYPTPROV, DWORD, DWORD); +static BOOL (WINAPI * pCryptCATCatalogInfoFromContext)(HCATINFO, CATALOG_INFO *, DWORD); +static CRYPTCATMEMBER * (WINAPI * pCryptCATEnumerateMember)(HANDLE, CRYPTCATMEMBER *); +static CRYPTCATATTRIBUTE * (WINAPI * pCryptCATEnumerateAttr)(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *); +static BOOL (WINAPI * pCryptCATClose)(HANDLE); static void InitFunctionPtrs(void) { @@ -102,6 +109,11 @@ WINTRUST_GET_PROC(CryptCATAdminAddCatalog) WINTRUST_GET_PROC(CryptCATAdminRemoveCatalog) WINTRUST_GET_PROC(CryptCATAdminReleaseCatalogContext) + WINTRUST_GET_PROC(CryptCATOpen) + WINTRUST_GET_PROC(CryptCATCatalogInfoFromContext) + WINTRUST_GET_PROC(CryptCATEnumerateMember) + WINTRUST_GET_PROC(CryptCATEnumerateAttr) + WINTRUST_GET_PROC(CryptCATClose) #undef WINTRUST_GET_PROC } @@ -113,7 +125,7 @@ BOOL ret; HCATADMIN hca; static GUID unknown = { 0xC689AABA, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; /* WINTRUST.DLL */ - CHAR windir[MAX_PATH], catroot[MAX_PATH], catroot2[MAX_PATH], dummydir[MAX_PATH]; + CHAR dummydir[MAX_PATH]; DWORD attrs; /* When CryptCATAdminAcquireContext is successful it will create @@ -197,12 +209,6 @@ ret = pCryptCATAdminAcquireContext(&hca, &dummy, 0); ok(ret, "Expected success\n"); ok(hca != NULL, "Expected a context handle, got NULL\n"); - - GetWindowsDirectoryA(windir, MAX_PATH); - lstrcpyA(catroot, windir); - lstrcatA(catroot, "\\system32\\CatRoot"); - lstrcpyA(catroot2, windir); - lstrcatA(catroot2, "\\system32\\CatRoot2"); attrs = GetFileAttributes(catroot); ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected the CatRoot directory to exist\n"); @@ -344,13 +350,18 @@ static void test_CryptCATAdminAddRemoveCatalog(void) { static WCHAR basenameW[] = {'w','i','n','e','t','e','s','t','.','c','a','t',0}; + static CHAR basename[] = "winetest.cat"; HCATADMIN hcatadmin; HCATINFO hcatinfo; + CATALOG_INFO info; WCHAR tmpfileW[MAX_PATH]; char tmpfile[MAX_PATH]; + char catfile[MAX_PATH], catfilepath[MAX_PATH], *p; + WCHAR catfileW[MAX_PATH]; HANDLE file; DWORD error, written; BOOL ret; + DWORD attrs; if (!pCryptCATAdminRemoveCatalog) { @@ -408,28 +419,132 @@ WriteFile(file, test_catalog, sizeof(test_catalog), &written, NULL); CloseHandle(file); + /* Unique name will be created */ hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, NULL, 0); todo_wine ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError()); + info.cbStruct = sizeof(info); + info.wszCatalogFile[0] = 0; + ret = pCryptCATCatalogInfoFromContext(hcatinfo, &info, 0); + todo_wine + { + ok(ret, "CryptCATCatalogInfoFromContext failed %u\n", GetLastError()); + ok(info.wszCatalogFile[0] != 0, "Expected a filename\n"); + } + WideCharToMultiByte(CP_ACP, 0, info.wszCatalogFile, -1, catfile, MAX_PATH, 0, 0); + if ((p = strrchr(catfile, '\\'))) p++; + memset(catfileW, 0, sizeof(catfileW)); + MultiByteToWideChar(0, 0, p, -1, catfileW, MAX_PATH); + + /* winetest.cat will be created */ hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, basenameW, 0); ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError()); + lstrcpyA(catfilepath, catroot); + lstrcatA(catfilepath, "\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}\\winetest.cat"); + attrs = GetFileAttributes(catfilepath); + ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected %s to exist\n", catfilepath); + + info.cbStruct = sizeof(info); + info.wszCatalogFile[0] = 0; + ret = pCryptCATCatalogInfoFromContext(hcatinfo, &info, 0); + ok(ret, "CryptCATCatalogInfoFromContext failed %u\n", GetLastError()); + ok(info.wszCatalogFile[0] != 0, "Expected a filename\n"); + WideCharToMultiByte(CP_ACP, 0, info.wszCatalogFile, -1, catfile, MAX_PATH, 0, 0); + if ((p = strrchr(catfile, '\\'))) p++; + ok(!lstrcmpA(basename, p), "Expected %s, got %s\n", basename, p); + ret = pCryptCATAdminReleaseCatalogContext(hcatadmin, hcatinfo, 0); ok(ret, "CryptCATAdminReleaseCatalogContext failed %u\n", GetLastError()); - ret = pCryptCATAdminRemoveCatalog(hcatadmin, tmpfileW, 0); + /* Remove the catalog file with the unique name */ + ret = pCryptCATAdminRemoveCatalog(hcatadmin, catfileW, 0); ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError()); + + /* Remove the winetest.cat catalog file, first with the full path. This should not succeed + * according to MSDN */ + ret = pCryptCATAdminRemoveCatalog(hcatadmin, info.wszCatalogFile, 0); + ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError()); + /* The call succeeded with the full path but the file is not removed */ + attrs = GetFileAttributes(catfilepath); + ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected %s to exist\n", catfilepath); + /* Given only the filename the file is removed */ + ret = pCryptCATAdminRemoveCatalog(hcatadmin, basenameW, 0); + ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError()); + attrs = GetFileAttributes(catfilepath); + ok(attrs == INVALID_FILE_ATTRIBUTES, "Expected %s to be removed\n", catfilepath); ret = pCryptCATAdminReleaseContext(hcatadmin, 0); ok(ret, "CryptCATAdminReleaseContext failed %u\n", GetLastError()); DeleteFileA(tmpfile); +} + +static void test_catalog_properties(void) +{ + static const WCHAR hashmeW[] = {'h','a','s','h','m','e',0}; + static const GUID subject = {0xde351a42,0x8e59,0x11d0,{0x8c,0x47,0x00,0xc0,0x4f,0xc2,0x95,0xee}}; + + HANDLE hcat; + CRYPTCATMEMBER *m; + CRYPTCATATTRIBUTE *attr; + char catalog[MAX_PATH]; + WCHAR catalogW[MAX_PATH]; + DWORD written; + HANDLE file; + BOOL ret; + + if (!GetTempFileNameA(CURR_DIR, "cat", 0, catalog)) return; + file = CreateFileA(catalog, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError()); + WriteFile(file, test_catalog, sizeof(test_catalog), &written, NULL); + CloseHandle(file); + + hcat = pCryptCATOpen(NULL, 0, 0, 0, 0); + ok(hcat == INVALID_HANDLE_VALUE, "CryptCATOpen succeeded\n"); + + MultiByteToWideChar(CP_ACP, 0, catalog, -1, catalogW, MAX_PATH); + + hcat = pCryptCATOpen(catalogW, 0, 0, 0, 0); + ok(hcat != INVALID_HANDLE_VALUE, "CryptCATOpen failed %u\n", GetLastError()); + + m = pCryptCATEnumerateMember(NULL, NULL); + ok(m == NULL, "CryptCATEnumerateMember succeeded\n"); + + m = pCryptCATEnumerateMember(hcat, NULL); + ok(m != NULL, "CryptCATEnumerateMember failed %u\n", GetLastError()); + + ok(m->cbStruct == sizeof(CRYPTCATMEMBER), "unexpected size %u\n", m->cbStruct); + todo_wine ok(!lstrcmpW(m->pwszReferenceTag, hashmeW), "unexpected tag\n"); + ok(!memcmp(&m->gSubjectType, &subject, sizeof(subject)), "guid differs\n"); + ok(!m->fdwMemberFlags, "got %x expected 0\n", m->fdwMemberFlags); + ok(m->dwCertVersion == 0x200, "got %x expected 0x200\n", m->dwCertVersion); + ok(!m->dwReserved, "got %x expected 0\n", m->dwReserved); + ok(m->hReserved == NULL, "got %p expected NULL\n", m->hReserved); + + attr = pCryptCATEnumerateAttr(NULL, NULL, NULL); + ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); + + attr = pCryptCATEnumerateAttr(hcat, NULL, NULL); + ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); + + attr = pCryptCATEnumerateAttr(hcat, m, NULL); + ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); + + m = pCryptCATEnumerateMember(hcat, m); + ok(m == NULL, "CryptCATEnumerateMember succeeded\n"); + + ret = pCryptCATClose(hcat); + ok(ret, "CryptCATClose failed\n"); + + DeleteFileA(catalog); } START_TEST(crypt) { int myARGC; char** myARGV; + char windir[MAX_PATH]; InitFunctionPtrs(); @@ -439,6 +554,12 @@ return; } + GetWindowsDirectoryA(windir, MAX_PATH); + lstrcpyA(catroot, windir); + lstrcatA(catroot, "\\system32\\CatRoot"); + lstrcpyA(catroot2, windir); + lstrcatA(catroot2, "\\system32\\CatRoot2"); + myARGC = winetest_get_mainargs(&myARGV); strcpy(selfname, myARGV[0]); @@ -447,4 +568,5 @@ test_context(); test_calchash(); test_CryptCATAdminAddRemoveCatalog(); + test_catalog_properties(); }
15 years, 11 months
1
0
0
0
[cwittich] 38943: sync crypt32_winetest with wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Jan 19 10:47:57 2009 New Revision: 38943 URL:
http://svn.reactos.org/svn/reactos?rev=38943&view=rev
Log: sync crypt32_winetest with wine 1.1.13 Modified: trunk/rostests/winetests/crypt32/cert.c trunk/rostests/winetests/crypt32/encode.c trunk/rostests/winetests/crypt32/object.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/crypt32/cert.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/cert.c?…
Modified: trunk/rostests/winetests/crypt32/encode.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/encode.…
Modified: trunk/rostests/winetests/crypt32/object.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/object.…
15 years, 11 months
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
76
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Results per page:
10
25
50
100
200