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
November 2008
----- 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
28 participants
657 discussions
Start a n
N
ew thread
[dgoette] 37482: * fix more html issues * now adding entries is possible again * catch an additional error
by dgoette@svn.reactos.org
Author: dgoette Date: Thu Nov 20 07:14:38 2008 New Revision: 37482 URL:
http://svn.reactos.org/svn/reactos?rev=37482&view=rev
Log: * fix more html issues * now adding entries is possible again * catch an additional error Modified:
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_QuickInfo.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Website.class.php
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] Thu Nov 20 07:14:38 2008 @@ -25,12 +25,6 @@ */ class Data { - - /** Aggregations: */ - - /** Compositions: */ - - /*** Attributes: ***/ /** @@ -535,9 +529,13 @@ * @return bool * @access public */ - public static function add( $data_name, $data_type, $lang, $show_output = false, $entry_status = 'draft', $layout_template = '', $dynamic_content = false) + public static function add( $show_output = false, $dynamic_content = false, $entry_status = 'draft', $layout_template = '') { global $roscms_intern_account_id; + + $data_name = @htmlspecialchars($_GET['d_name']); + $data_type = @$_GET['d_type']; + $lang = @$_GET['d_r_lang']; $stmt=DBConnection::getInstance()->prepare("SELECT data_id FROM data_ WHERE data_name = :name AND data_type = :type LIMIT 1"); $stmt->bindParam('name',$data_name,PDO::PARAM_STR); 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] Thu Nov 20 07:14:38 2008 @@ -50,8 +50,8 @@ global $roscms_security_level; global $RosCMS_GET_d_value, $RosCMS_GET_d_value2, $RosCMS_GET_d_value3, $RosCMS_GET_d_value4; global $RosCMS_GET_d_id, $RosCMS_GET_d_r_id; - global $RosCMS_GET_d_name, $RosCMS_GET_d_type, $RosCMS_GET_d_r_lang; - + global $RosCMS_GET_d_r_lang; + switch ($action) { // create entry - show interface @@ -78,18 +78,18 @@ // single entry - save entry case 'newentry2': - Data::add($RosCMS_GET_d_name, $RosCMS_GET_d_type, $RosCMS_GET_d_r_lang, true, 'draft', '', false); + Data::add(true, false); break; // dynamic entry - save entry case 'newentry4': - Data::add($RosCMS_GET_d_name, $RosCMS_GET_d_type, $RosCMS_GET_d_r_lang, true, 'draft', '', true); + Data::add(true, true); break; // page & content - save entry case 'newentry3': - Data::add($RosCMS_GET_d_name, $RosCMS_GET_d_type, $RosCMS_GET_d_r_lang, false, 'stable', htmlspecialchars(@$_GET['d_template']), false); - Data::add($RosCMS_GET_d_name, $RosCMS_GET_d_type, $RosCMS_GET_d_r_lang, true); + Data::add(false, false, 'stable', htmlspecialchars(@$_GET['d_template'])); + Data::add(true); break; // show Metadata details @@ -225,8 +225,10 @@ $stmt->bindParam('date',date('Y-m-d'),PDO::PARAM_STR); $stmt->execute(); $translation = $stmt->fetchOnce(); - - $this->show( $translation['data_id'], $translation['rev_id'], $translation['rev_language'] ); + + $this->data_id = $translation['data_id']; + $this->rev_id = $translation['rev_id']; + $this->show(); } else { die('Translation not successful, due entry-copy problem. If this happens more than once or twice please contact the website admin.'); @@ -244,13 +246,8 @@ * * @access private */ - protected function show( $lang = null) - { - global $roscms_standard_language; - - // if no value is given, try to omnit GET vars - if ($lang === null) $lang = (isset($_GET['d_r_lang']) ? $_GET['d_r_lang'] : $roscms_standard_language); - + protected function show( ) + { $this->showEntryData(); $this->showEntryDetails(self::METADATA); echo '</div></div>'; // close elements opened in showEntryData @@ -421,7 +418,7 @@ * * @access protected */ - protected function showAddEntry($tmode = self::SINGLE) + public function showAddEntry($tmode = self::SINGLE) { echo_strip(' <div id="frmadd" style="border-bottom: 1px solid #bbb; border-right: 1px solid #bbb; background: #FFFFFF none repeat scroll 0%;"> @@ -436,7 +433,7 @@ else { echo '<span class="detailmenu" onclick="'."changecreateinterface('single')".'">Single Entry</span>'; } - echo " | "; + echo ' | '; // is dynamic if ($tmode == self::DYNAMIC) { @@ -445,7 +442,7 @@ else { echo '<span class="detailmenu" onclick="'."changecreateinterface('dynamic')".'">Dynamic Entry</span>'; } - echo " | "; + echo ' | '; // is page & content if ($tmode == self::TEMPLATE) { Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_QuickInfo.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_QuickInfo.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/Export_QuickInfo.class.php
[iso-8859-1] Thu Nov 20 07:14:38 2008 @@ -32,8 +32,7 @@ // check if everything was given, we need to get the quick info if (!isset($_GET['d_id']) || !isset($_GET['d_r_id'])) { - echo 'No entry was found.'; - return; + die('No entry was found.'); } $this->getInfo(); } @@ -58,6 +57,11 @@ $stmt->bindParam('rev_id',$_GET['d_r_id'],PDO::PARAM_INT); $stmt->execute(); $revision = $stmt->fetchOnce(PDO::FETCH_ASSOC); + + // abort if no entry was found + if ($revision === false) { + die('No entry was found.'); + } // helper vars $t_s = '<span style="color:#FF6600;">'; // tag start Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS.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.class.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS.class.php
[iso-8859-1] Thu Nov 20 07:14:38 2008 @@ -163,9 +163,9 @@ break; case 'website': - echo_strip('Quick Links: <a href="'.$roscms_intern_page_link.'data&branch=welcome#web_news_langgroup">Translation Group News</a> - | <a href="'.$roscms_intern_webserver_pages.'?page=tutorial_roscms" target="_blank">Text- & Video-Tutorials</a> - | <a href="'.$roscms_intern_webserver_pages.'/forum/viewforum.php?f=18" target="_blank">Website Forum</a>'); + echo_strip('Quick Links: <a href="'.$roscms_intern_page_link.'data&branch=welcome#web_news_langgroup">Translation Group News</a> + | <a href="'.$roscms_intern_webserver_pages.'?page=tutorial_roscms">Text- & Video-Tutorials</a> + | <a href="'.$roscms_intern_webserver_pages.'/forum/viewforum.php?f=18">Website Forum</a>'); break; case 'user': 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] Thu Nov 20 07:14:38 2008 @@ -345,8 +345,8 @@ </div> </div> <br /> - <p><strong>Table Legend</strong></p> <table id="legend" cellspacing="5"> + <caption style="font-weight:bold;text-align:left;">Table Legend</caption> <tr> <td class="lbox" style="background-color:#ddd"> </td> <td style="width:205px" rowspan="2"> @@ -372,7 +372,7 @@ <td class="lbox" style="background-color:#FFE4C1"> </td> <td>Draft</td> <td class="lbox" style="background-color:#FAA5A5"> </td> - <td>Translation outdated</td> + <td>Translation outdated</td> </tr> <tr> <td class="lbox" style="background-color:#ffffcc"> </td>
16 years, 1 month
1
0
0
0
[greatlrd] 37481: Cleanup lite for the dump functions for dumping internal value in ddraw.dll and add some new dumping function have been add.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Thu Nov 20 06:25:27 2008 New Revision: 37481 URL:
http://svn.reactos.org/svn/reactos?rev=37481&view=rev
Log: Cleanup lite for the dump functions for dumping internal value in ddraw.dll and add some new dumping function have been add. Modified: branches/reactx/rostests/apitests/ddrawapi/testlist.c branches/reactx/rostests/apitests/ddrawapi/tests/Test_DirectDrawCreateEx.c Modified: branches/reactx/rostests/apitests/ddrawapi/testlist.c URL:
http://svn.reactos.org/svn/reactos/branches/reactx/rostests/apitests/ddrawa…
============================================================================== --- branches/reactx/rostests/apitests/ddrawapi/testlist.c [iso-8859-1] (original) +++ branches/reactx/rostests/apitests/ddrawapi/testlist.c [iso-8859-1] Thu Nov 20 06:25:27 2008 @@ -5,10 +5,25 @@ #define MIX_BOTH_CAPS(a,b) ( (a + b - (a & b)) ) +/* Simple position the dump output bit better */ +#define MY_MAX_SPACE_LEN 70 + +#define MY_POS1_SPACE_LEN 30 +#define MY_POS2_SPACE_LEN 0 +char space_buffer[MY_MAX_SPACE_LEN+1]; + +#define MY_DUMP_STR(buffer,mStr,str,lpStr) sprintf(buffer,"%s%s%s%s%s", mStr,&space_buffer[ MY_POS1_SPACE_LEN + strlen(mStr) ], str,lpStr, &space_buffer[ MY_POS2_SPACE_LEN + (strlen(lpStr) + strlen(str)) ]); + +/* DirectDraw dump*/ void dump_DDRAWI_DIRECTDRAW_INT(char *str, LPDDRAWI_DIRECTDRAW_INT lpDraw_int, DWORD offset); void dump_DDRAWI_DIRECTDRAW_LCL(char *str, LPDDRAWI_DIRECTDRAW_LCL lpDraw_lcl, DWORD offset); void dump_DDRAWI_DIRECTDRAW_GBL(char *str, LPDDRAWI_DIRECTDRAW_GBL lpDraw_gbl, DWORD offset); - +void dump_DDRAWI_DDRAWSURFACE_LCL(char *str, LPDDRAWI_DDRAWSURFACE_LCL lpDdrawSurface, DWORD offset); + +/* DirectDraw Surface dump*/ +void dump_DDRAWI_DDRAWSURFACE_INT(char *str, LPDDRAWI_DDRAWSURFACE_INT lpDdrawSurface, DWORD offset); + +/* DirectDraw misc dump*/ void dump_DDCORECAPS(char *str, LPDDCORECAPS lpDdcorecaps, DWORD offset); void dump_VIDMEMINFO(char *str, LPVIDMEMINFO lpVidmeminfo, DWORD offset); void dump_DBLNODE(char *str, LPDBLNODE lpDblnode, DWORD offset); @@ -47,10 +62,21 @@ if (lpDraw_int == NULL) return ; - printf("%08lx LPVOID %slpVtbl : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, lpVtbl)+offset, str, lpDraw_int->lpVtbl); - printf("%08lx DWORD %s->lpLcl : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, lpLcl) + offset, str, lpDraw_int->lpLcl ); - printf("%08lx DWORD %s->lpLink : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, lpLink) + offset, str, lpDraw_int->lpLink ); - printf("%08lx DWORD %s->dwIntRefCnt : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, dwIntRefCnt) + offset, str, lpDraw_int->dwIntRefCnt ); + RtlFillMemory(space_buffer,MY_MAX_SPACE_LEN,32); + space_buffer[MY_MAX_SPACE_LEN] = 0; + + + MY_DUMP_STR(buffer,"LPVOID\0",str,"lpVtbl\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, lpVtbl)+offset, buffer, lpDraw_int->lpVtbl); + + MY_DUMP_STR(buffer,"DWORD\0",str,"lpLcl\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, lpLcl) + offset, buffer, lpDraw_int->lpLcl ); + + MY_DUMP_STR(buffer,"DWORD\0",str,"lpLink\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, lpLink) + offset, buffer, lpDraw_int->lpLink ); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwIntRefCnt\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_INT, dwIntRefCnt) + offset, buffer, lpDraw_int->dwIntRefCnt ); printf("\n"); sprintf(buffer,"%slpLcl->",str); @@ -67,36 +93,96 @@ if (lpDraw_lcl == NULL) return ; - printf("%08lx DWORD %slpDDMore : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpDDMore)+offset, str, lpDraw_lcl->lpDDMore); - printf("%08lx LPDDRAWI_DIRECTDRAW_GBL %slpGbl : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpGbl)+offset, str, lpDraw_lcl->lpGbl); - printf("%08lx DWORD %sdwUnused0 : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwUnused0)+offset, str, lpDraw_lcl->dwUnused0); - printf("%08lx DWORD %sdwLocalFlags : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwLocalFlags)+offset, str, lpDraw_lcl->dwLocalFlags); - printf("%08lx DWORD %sdwLocalRefCnt : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwLocalRefCnt)+offset, str, lpDraw_lcl->dwLocalRefCnt); - printf("%08lx DWORD %sdwProcessId : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwProcessId)+offset, str, lpDraw_lcl->dwProcessId); - printf("%08lx PVOID %spUnkOuter : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, pUnkOuter)+offset, str, lpDraw_lcl->pUnkOuter); - printf("%08lx DWORD %sdwObsolete1 : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwObsolete1)+offset, str, lpDraw_lcl->dwObsolete1); - printf("%08lx ULONG_PTR %shWnd : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hWnd)+offset, str, (PVOID)lpDraw_lcl->hWnd); - printf("%08lx ULONG_PTR %shDC : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hDC)+offset, str, (PVOID) lpDraw_lcl->hDC); - printf("%08lx DWORD %sdwErrorMode : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwErrorMode)+offset, str, lpDraw_lcl->dwErrorMode); - printf("%08lx LPDDRAWI_DDRAWSURFACE_INT %slpPrimary : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpPrimary)+offset, str, lpDraw_lcl->lpPrimary); - printf("%08lx LPDDRAWI_DDRAWSURFACE_INT %slpCB : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpCB)+offset, str, lpDraw_lcl->lpCB); - printf("%08lx DWORD %sdwPreferredMode : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwPreferredMode)+offset, str, lpDraw_lcl->dwPreferredMode); - printf("%08lx HINSTANCE %shD3DInstance : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hD3DInstance)+offset, str, lpDraw_lcl->hD3DInstance); - printf("%08lx PVOID %spD3DIUnknown : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, pD3DIUnknown)+offset, str, (PVOID) lpDraw_lcl->pD3DIUnknown); - printf("%08lx LPDDHAL_CALLBACKS %slpDDCB : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpDDCB)+offset, str, lpDraw_lcl->lpDDCB); - printf("%08lx ULONG_PTR %shDDVxd : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hDDVxd)+offset, str, (PVOID) lpDraw_lcl->hDDVxd); - printf("%08lx DWORD %sdwAppHackFlags : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwAppHackFlags)+offset, str, lpDraw_lcl->dwAppHackFlags); - printf("%08lx ULONG_PTR %shFocusWnd : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hFocusWnd)+offset, str, (PVOID) lpDraw_lcl->hFocusWnd); - printf("%08lx DWORD %sdwHotTracking : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwHotTracking)+offset, str, lpDraw_lcl->dwHotTracking); - printf("%08lx DWORD %sdwIMEState : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwIMEState)+offset, str, lpDraw_lcl->dwIMEState); - printf("%08lx ULONG_PTR %shWndPopup : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hWndPopup)+offset, str, (PVOID) lpDraw_lcl->hWndPopup); - printf("%08lx ULONG_PTR %shDD : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hDD)+offset, str, (PVOID) lpDraw_lcl->hDD); - printf("%08lx ULONG_PTR %shGammaCalibrator : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hGammaCalibrator)+offset, str, (PVOID) lpDraw_lcl->hGammaCalibrator); - printf("%08lx LPDDGAMMACALIBRATORPROC %slpGammaCalibrator : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpGammaCalibrator)+offset, str, lpDraw_lcl->lpGammaCalibrator); + MY_DUMP_STR(buffer,"DWORD\0",str,"lpDDMore\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpDDMore)+offset, buffer, lpDraw_lcl->lpDDMore); + + MY_DUMP_STR(buffer,"LPDDRAWI_DIRECTDRAW_GBL\0",str,"lpGbl\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpGbl)+offset, buffer, lpDraw_lcl->lpGbl); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused0\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwUnused0)+offset, buffer, lpDraw_lcl->dwUnused0); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwLocalFlags\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwLocalFlags)+offset, buffer, lpDraw_lcl->dwLocalFlags); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwLocalRefCnt\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwLocalRefCnt)+offset, buffer, lpDraw_lcl->dwLocalRefCnt); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwProcessId\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwProcessId)+offset, buffer, lpDraw_lcl->dwProcessId); + + MY_DUMP_STR(buffer,"PVOID\0",str,"pUnkOuter\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, pUnkOuter)+offset, buffer, lpDraw_lcl->pUnkOuter); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwObsolete1\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwObsolete1)+offset, buffer, lpDraw_lcl->dwObsolete1); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hWnd\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hWnd)+offset, buffer, (PVOID)lpDraw_lcl->hWnd); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hDC\0"); + printf("%08lx %shDC: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hDC)+offset, str, (PVOID) lpDraw_lcl->hDC); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwErrorMode\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwErrorMode)+offset, buffer, lpDraw_lcl->dwErrorMode); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_INT\0",str,"lpPrimary\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpPrimary)+offset, buffer, lpDraw_lcl->lpPrimary); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_INT\0",str,"lpCB\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpCB)+offset, buffer, lpDraw_lcl->lpCB); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwPreferredMode\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwPreferredMode)+offset, buffer, lpDraw_lcl->dwPreferredMode); + + + + + MY_DUMP_STR(buffer,"HINSTANCE\0",str,"hD3DInstance\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hD3DInstance)+offset, buffer, lpDraw_lcl->hD3DInstance); + + MY_DUMP_STR(buffer,"PVOID\0",str,"pD3DIUnknown\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, pD3DIUnknown)+offset, buffer, (PVOID) lpDraw_lcl->pD3DIUnknown); + + MY_DUMP_STR(buffer,"LPDDHAL_CALLBACKS\0",str,"lpDDCB\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpDDCB)+offset, buffer, lpDraw_lcl->lpDDCB); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hDDVxd\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hDDVxd)+offset, buffer, (PVOID) lpDraw_lcl->hDDVxd); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAppHackFlags\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwAppHackFlags)+offset, buffer, lpDraw_lcl->dwAppHackFlags); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hFocusWnd\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hFocusWnd)+offset, buffer, (PVOID) lpDraw_lcl->hFocusWnd); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwHotTracking\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwHotTracking)+offset, buffer, lpDraw_lcl->dwHotTracking); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwIMEState\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, dwIMEState)+offset, buffer, lpDraw_lcl->dwIMEState); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hWndPopu\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hWndPopup)+offset, buffer, (PVOID) lpDraw_lcl->hWndPopup); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hDD\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hDD)+offset, buffer, (PVOID) lpDraw_lcl->hDD); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hGammaCalibrator\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, hGammaCalibrator)+offset, buffer, (PVOID) lpDraw_lcl->hGammaCalibrator); + + MY_DUMP_STR(buffer,"LPDDGAMMACALIBRATORPROC\0",str,"lpGammaCalibrator\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_LCL, lpGammaCalibrator)+offset, buffer, lpDraw_lcl->lpGammaCalibrator); + + printf("\n"); sprintf(buffer,"%slpGbl->",str); dump_DDRAWI_DIRECTDRAW_GBL(buffer, lpDraw_lcl->lpGbl, 0); + sprintf(buffer,"%slpPrimary->",str); + dump_DDRAWI_DDRAWSURFACE_INT(buffer, lpDraw_lcl->lpPrimary, 0); + sprintf(buffer,"%slpCB->",str); + dump_DDRAWI_DDRAWSURFACE_INT(buffer, lpDraw_lcl->lpCB, 0); } void dump_DDRAWI_DIRECTDRAW_GBL(char * str, LPDDRAWI_DIRECTDRAW_GBL lpDraw_gbl, DWORD offset) @@ -105,108 +191,283 @@ if (lpDraw_gbl == NULL) return ; - printf("%08lx DWORD %sdwRefCnt : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwRefCnt) + offset, str, lpDraw_gbl->dwRefCnt); - printf("%08lx DWORD %sdwFlags : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwFlags) + offset, str, lpDraw_gbl->dwFlags); - printf("%08lx FLATPTR %sfpPrimaryOrig : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, fpPrimaryOrig) + offset, str, (LPVOID)lpDraw_gbl->fpPrimaryOrig); + MY_DUMP_STR(buffer,"DWORD\0",str,"dwRefCnt\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwRefCnt) + offset, buffer, lpDraw_gbl->dwRefCnt); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwFlags\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwFlags) + offset, buffer, lpDraw_gbl->dwFlags); + + MY_DUMP_STR(buffer,"FLATPTR\0",str,"fpPrimaryOrig\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, fpPrimaryOrig) + offset, buffer, (LPVOID)lpDraw_gbl->fpPrimaryOrig); sprintf(buffer,"%sddCaps.",str); dump_DDCORECAPS(buffer, &lpDraw_gbl->ddCaps, FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, ddCaps) + offset ); - printf("%08lx DWORD %sdwInternal1 : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwInternal1) + offset, str, lpDraw_gbl->dwInternal1); - printf("%08lx DWORD %sdwUnused1[0] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[0]) + offset, str, lpDraw_gbl->dwUnused1[0]); - printf("%08lx DWORD %sdwUnused1[1] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[1]) + offset, str, lpDraw_gbl->dwUnused1[1]); - printf("%08lx DWORD %sdwUnused1[2] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[2]) + offset, str, lpDraw_gbl->dwUnused1[2]); - printf("%08lx DWORD %sdwUnused1[3] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[3]) + offset, str, lpDraw_gbl->dwUnused1[3]); - printf("%08lx DWORD %sdwUnused1[4] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[4]) + offset, str, lpDraw_gbl->dwUnused1[4]); - printf("%08lx DWORD %sdwUnused1[5] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[5]) + offset, str, lpDraw_gbl->dwUnused1[5]); - printf("%08lx DWORD %sdwUnused1[6] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[6]) + offset, str, lpDraw_gbl->dwUnused1[6]); - printf("%08lx DWORD %sdwUnused1[7] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[7]) + offset, str, lpDraw_gbl->dwUnused1[7]); - printf("%08lx DWORD %sdwUnused1[8] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[8]) + offset, str, lpDraw_gbl->dwUnused1[8]); - printf("%08lx LPDDHAL_CALLBACKS %slpDDCBtmp : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpDDCBtmp) + offset, str, lpDraw_gbl->lpDDCBtmp); - printf("%08lx LPDDRAWI_DDRAWSURFACE_INT %sdsList : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dsList) + offset, str, lpDraw_gbl->dsList); - printf("%08lx LPDDRAWI_DDRAWPALETTE_INT %spalList : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, palList) + offset, str, lpDraw_gbl->palList); - printf("%08lx LPDDRAWI_DDRAWCLIPPER_INT %sclipperList : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, clipperList) + offset, str, lpDraw_gbl->clipperList); - printf("%08lx LPDDRAWI_DIRECTDRAW_GBL %slp16DD : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lp16DD) + offset, str, lpDraw_gbl->lp16DD); - printf("%08lx DWORD %sdwMaxOverlays : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwMaxOverlays) + offset, str, lpDraw_gbl->dwMaxOverlays); - printf("%08lx DWORD %sdwCurrOverlays : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwCurrOverlays) + offset, str, lpDraw_gbl->dwCurrOverlays); - printf("%08lx DWORD %sdwMonitorFrequency : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwMonitorFrequency) + offset, str, lpDraw_gbl->dwMonitorFrequency); + MY_DUMP_STR(buffer,"DWORD\0",str,"dwInternal1\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwInternal1) + offset, buffer, lpDraw_gbl->dwInternal1); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[0]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[0]) + offset, buffer, lpDraw_gbl->dwUnused1[0]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[1]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[1]) + offset, buffer, lpDraw_gbl->dwUnused1[1]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[2]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[2]) + offset, buffer, lpDraw_gbl->dwUnused1[2]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[3]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[3]) + offset, buffer, lpDraw_gbl->dwUnused1[3]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[4]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[4]) + offset, buffer, lpDraw_gbl->dwUnused1[4]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[5]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[5]) + offset, buffer, lpDraw_gbl->dwUnused1[5]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[6]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[6]) + offset, buffer, lpDraw_gbl->dwUnused1[6]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[7]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[7]) + offset, buffer, lpDraw_gbl->dwUnused1[7]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused1[8]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused1[8]) + offset, buffer, lpDraw_gbl->dwUnused1[8]); + + MY_DUMP_STR(buffer,"LPDDHAL_CALLBACKS\0",str,"lpDDCBtmp[8]\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpDDCBtmp) + offset, buffer, lpDraw_gbl->lpDDCBtmp); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_INT\0",str,"dsList\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dsList) + offset, buffer, lpDraw_gbl->dsList); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWPALETTE_INT\0",str,"palList\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, palList) + offset, buffer, lpDraw_gbl->palList); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWCLIPPER_INT\0",str,"clipperList\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, clipperList) + offset, buffer, lpDraw_gbl->clipperList); + + MY_DUMP_STR(buffer,"LPDDRAWI_DIRECTDRAW_GBL\0",str,"lp16DD\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lp16DD) + offset, buffer, lpDraw_gbl->lp16DD); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMaxOverlays\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwMaxOverlays) + offset, buffer, lpDraw_gbl->dwMaxOverlays); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwCurrOverlays\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwCurrOverlays) + offset, buffer, lpDraw_gbl->dwCurrOverlays); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMonitorFrequency\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwMonitorFrequency) + offset, buffer, lpDraw_gbl->dwMonitorFrequency); sprintf(buffer,"%sddHELCaps.",str); dump_DDCORECAPS(buffer, &lpDraw_gbl->ddHELCaps, FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, ddHELCaps) + offset ); - printf("%08lx DWORD %sdwUnused2[0] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[0]) + offset, str, lpDraw_gbl->dwUnused2[0]); - printf("%08lx DWORD %sdwUnused2[1] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[1]) + offset, str, lpDraw_gbl->dwUnused2[1]); - printf("%08lx DWORD %sdwUnused2[2] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[2]) + offset, str, lpDraw_gbl->dwUnused2[2]); - printf("%08lx DWORD %sdwUnused2[3] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[3]) + offset, str, lpDraw_gbl->dwUnused2[3]); - printf("%08lx DWORD %sdwUnused2[4] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[4]) + offset, str, lpDraw_gbl->dwUnused2[4]); - printf("%08lx DWORD %sdwUnused2[5] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[5]) + offset, str, lpDraw_gbl->dwUnused2[5]); - printf("%08lx DWORD %sdwUnused2[6] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[6]) + offset, str, lpDraw_gbl->dwUnused2[6]); - printf("%08lx DWORD %sdwUnused2[7] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[7]) + offset, str, lpDraw_gbl->dwUnused2[7]); - printf("%08lx DWORD %sdwUnused2[8] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[8]) + offset, str, lpDraw_gbl->dwUnused2[8]); - printf("%08lx DWORD %sdwUnused2[9] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[9]) + offset, str, lpDraw_gbl->dwUnused2[9]); - printf("%08lx DWORD %sdwUnused2[10] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[10]) + offset, str, lpDraw_gbl->dwUnused2[10]); - printf("%08lx DWORD %sdwUnused2[11] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[11]) + offset, str, lpDraw_gbl->dwUnused2[11]); - printf("%08lx DWORD %sdwUnused2[12] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[12]) + offset, str, lpDraw_gbl->dwUnused2[12]); - printf("%08lx DWORD %sdwUnused2[13] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[13]) + offset, str, lpDraw_gbl->dwUnused2[13]); - printf("%08lx DWORD %sdwUnused2[14] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[14]) + offset, str, lpDraw_gbl->dwUnused2[14]); - printf("%08lx DWORD %sdwUnused2[15] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[15]) + offset, str, lpDraw_gbl->dwUnused2[15]); - printf("%08lx DWORD %sdwUnused2[16] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[16]) + offset, str, lpDraw_gbl->dwUnused2[16]); - printf("%08lx DWORD %sdwUnused2[17] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[17]) + offset, str, lpDraw_gbl->dwUnused2[17]); - printf("%08lx DWORD %sdwUnused2[18] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[18]) + offset, str, lpDraw_gbl->dwUnused2[18]); - printf("%08lx DWORD %sdwUnused2[19] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[19]) + offset, str, lpDraw_gbl->dwUnused2[19]); - printf("%08lx DWORD %sdwUnused2[20] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[20]) + offset, str, lpDraw_gbl->dwUnused2[20]); - printf("%08lx DWORD %sdwUnused2[21] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[21]) + offset, str, lpDraw_gbl->dwUnused2[21]); - printf("%08lx DWORD %sdwUnused2[22] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[22]) + offset, str, lpDraw_gbl->dwUnused2[22]); - printf("%08lx DWORD %sdwUnused2[23] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[23]) + offset, str, lpDraw_gbl->dwUnused2[23]); - printf("%08lx DWORD %sdwUnused2[24] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[24]) + offset, str, lpDraw_gbl->dwUnused2[24]); - printf("%08lx DWORD %sdwUnused2[25] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[25]) + offset, str, lpDraw_gbl->dwUnused2[25]); - printf("%08lx DWORD %sdwUnused2[26] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[26]) + offset, str, lpDraw_gbl->dwUnused2[26]); - printf("%08lx DWORD %sdwUnused2[27] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[27]) + offset, str, lpDraw_gbl->dwUnused2[27]); - printf("%08lx DWORD %sdwUnused2[28] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[28]) + offset, str, lpDraw_gbl->dwUnused2[28]); - printf("%08lx DWORD %sdwUnused2[29] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[29]) + offset, str, lpDraw_gbl->dwUnused2[29]); - printf("%08lx DWORD %sdwUnused2[30] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[30]) + offset, str, lpDraw_gbl->dwUnused2[30]); - printf("%08lx DWORD %sdwUnused2[31] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[31]) + offset, str, lpDraw_gbl->dwUnused2[31]); - printf("%08lx DWORD %sdwUnused2[32] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[32]) + offset, str, lpDraw_gbl->dwUnused2[32]); - printf("%08lx DWORD %sdwUnused2[33] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[33]) + offset, str, lpDraw_gbl->dwUnused2[33]); - printf("%08lx DWORD %sdwUnused2[34] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[34]) + offset, str, lpDraw_gbl->dwUnused2[34]); - printf("%08lx DWORD %sdwUnused2[35] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[35]) + offset, str, lpDraw_gbl->dwUnused2[35]); - printf("%08lx DWORD %sdwUnused2[36] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[36]) + offset, str, lpDraw_gbl->dwUnused2[36]); - printf("%08lx DWORD %sdwUnused2[37] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[37]) + offset, str, lpDraw_gbl->dwUnused2[37]); - printf("%08lx DWORD %sdwUnused2[38] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[38]) + offset, str, lpDraw_gbl->dwUnused2[38]); - printf("%08lx DWORD %sdwUnused2[39] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[39]) + offset, str, lpDraw_gbl->dwUnused2[39]); - printf("%08lx DWORD %sdwUnused2[40] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[40]) + offset, str, lpDraw_gbl->dwUnused2[40]); - printf("%08lx DWORD %sdwUnused2[41] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[41]) + offset, str, lpDraw_gbl->dwUnused2[41]); - printf("%08lx DWORD %sdwUnused2[42] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[42]) + offset, str, lpDraw_gbl->dwUnused2[42]); - printf("%08lx DWORD %sdwUnused2[43] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[43]) + offset, str, lpDraw_gbl->dwUnused2[43]); - printf("%08lx DWORD %sdwUnused2[44] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[44]) + offset, str, lpDraw_gbl->dwUnused2[44]); - printf("%08lx DWORD %sdwUnused2[45] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[45]) + offset, str, lpDraw_gbl->dwUnused2[45]); - printf("%08lx DWORD %sdwUnused2[46] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[46]) + offset, str, lpDraw_gbl->dwUnused2[46]); - printf("%08lx DWORD %sdwUnused2[47] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[47]) + offset, str, lpDraw_gbl->dwUnused2[47]); - printf("%08lx DWORD %sdwUnused2[48] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[48]) + offset, str, lpDraw_gbl->dwUnused2[48]); - printf("%08lx DWORD %sdwUnused2[49] : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[49]) + offset, str, lpDraw_gbl->dwUnused2[49]); + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x00]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[0]) + offset, buffer, lpDraw_gbl->dwUnused2[0]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x01]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[1]) + offset, buffer, lpDraw_gbl->dwUnused2[1]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x02]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[2]) + offset, buffer, lpDraw_gbl->dwUnused2[2]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x03]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[3]) + offset, buffer, lpDraw_gbl->dwUnused2[3]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x04]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[4]) + offset, buffer, lpDraw_gbl->dwUnused2[4]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x05]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[5]) + offset, buffer, lpDraw_gbl->dwUnused2[5]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x06]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[6]) + offset, buffer, lpDraw_gbl->dwUnused2[6]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x07]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[7]) + offset, buffer, lpDraw_gbl->dwUnused2[7]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x08]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[8]) + offset, buffer, lpDraw_gbl->dwUnused2[8]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x09]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[9]) + offset, buffer, lpDraw_gbl->dwUnused2[9]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x0A]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[10]) + offset, buffer, lpDraw_gbl->dwUnused2[10]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x0B]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[11]) + offset, buffer, lpDraw_gbl->dwUnused2[11]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x0C]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[12]) + offset, buffer, lpDraw_gbl->dwUnused2[12]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x0D]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[13]) + offset, buffer, lpDraw_gbl->dwUnused2[13]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x0E]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[14]) + offset, buffer, lpDraw_gbl->dwUnused2[14]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x0F]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[15]) + offset, buffer, lpDraw_gbl->dwUnused2[15]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x10]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[16]) + offset, buffer, lpDraw_gbl->dwUnused2[16]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x11]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[17]) + offset, buffer, lpDraw_gbl->dwUnused2[17]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x12]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[18]) + offset, buffer, lpDraw_gbl->dwUnused2[18]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x13]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[19]) + offset, buffer, lpDraw_gbl->dwUnused2[19]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x14]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[20]) + offset, buffer, lpDraw_gbl->dwUnused2[20]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x15]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[21]) + offset, buffer, lpDraw_gbl->dwUnused2[21]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x16]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[22]) + offset, buffer, lpDraw_gbl->dwUnused2[22]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x17]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[23]) + offset, buffer, lpDraw_gbl->dwUnused2[23]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x18]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[24]) + offset, buffer, lpDraw_gbl->dwUnused2[24]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x19]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[25]) + offset, buffer, lpDraw_gbl->dwUnused2[25]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x1A]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[26]) + offset, buffer, lpDraw_gbl->dwUnused2[26]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x1B]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[27]) + offset, buffer, lpDraw_gbl->dwUnused2[27]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x1C]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[28]) + offset, buffer, lpDraw_gbl->dwUnused2[28]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x1D]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[29]) + offset, buffer, lpDraw_gbl->dwUnused2[29]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x1E]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[30]) + offset, buffer, lpDraw_gbl->dwUnused2[30]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x1F]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[31]) + offset, buffer, lpDraw_gbl->dwUnused2[31]); + + + + + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x20]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[32]) + offset, buffer, lpDraw_gbl->dwUnused2[32]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x21]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[33]) + offset, buffer, lpDraw_gbl->dwUnused2[33]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x22]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[34]) + offset, buffer, lpDraw_gbl->dwUnused2[34]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x23]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[35]) + offset, buffer, lpDraw_gbl->dwUnused2[35]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x24]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[36]) + offset, buffer, lpDraw_gbl->dwUnused2[36]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x25]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[37]) + offset, buffer, lpDraw_gbl->dwUnused2[37]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x26]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[38]) + offset, buffer, lpDraw_gbl->dwUnused2[38]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x27]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[39]) + offset, buffer, lpDraw_gbl->dwUnused2[39]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x28]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[40]) + offset, buffer, lpDraw_gbl->dwUnused2[40]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x29]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[41]) + offset, buffer, lpDraw_gbl->dwUnused2[41]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x2A]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[42]) + offset, buffer, lpDraw_gbl->dwUnused2[42]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x2B]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[43]) + offset, buffer, lpDraw_gbl->dwUnused2[43]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x2C]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[44]) + offset, buffer, lpDraw_gbl->dwUnused2[44]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x2D]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[45]) + offset, buffer, lpDraw_gbl->dwUnused2[45]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x2E]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[46]) + offset, buffer, lpDraw_gbl->dwUnused2[46]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x2F]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[47]) + offset, buffer, lpDraw_gbl->dwUnused2[47]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x30]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[46]) + offset, buffer, lpDraw_gbl->dwUnused2[48]); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwUnused2[0x31]\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwUnused2[47]) + offset, buffer, lpDraw_gbl->dwUnused2[49]); + + //printf("%08lx DDCOLORKEY lpGbl->ddckCKDestOverlay : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, ddckCKDestOverlay) + offset, str, lpDraw_gbl->ddckCKDestOverlay); //printf("%08lx DDCOLORKEY lpGbl->ddckCKSrcOverlay : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, ddckCKSrcOverlay) + offset, str, lpDraw_gbl->ddckCKSrcOverlay); sprintf(buffer,"%svmiData.",str); dump_VIDMEMINFO(buffer, &lpDraw_gbl->vmiData, FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, vmiData) + offset); - printf("%08lx LPVOID %slpDriverHandle : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpDriverHandle) + offset, str, lpDraw_gbl->lpDriverHandle); - printf("%08lx LPDDRAWI_DIRECTDRAW_LCL %slpExclusiveOwner : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpExclusiveOwner) + offset, str, lpDraw_gbl->lpExclusiveOwner); - printf("%08lx DWORD %sdwModeIndex : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwModeIndex) + offset, str, lpDraw_gbl->dwModeIndex); - printf("%08lx DWORD %sdwModeIndexOrig : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwModeIndexOrig) + offset, str, lpDraw_gbl->dwModeIndexOrig); - printf("%08lx DWORD %sdwNumFourCC : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwNumFourCC) + offset, str, lpDraw_gbl->dwNumFourCC); - printf("%08lx LPDWORD %slpdwFourCC : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpdwFourCC) + offset, str, lpDraw_gbl->lpdwFourCC); - printf("%08lx DWORD %sdwNumModes : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwNumModes) + offset, str, lpDraw_gbl->dwNumModes); - printf("%08lx LPDDHALMODEI %slpModeInfo : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpModeInfo) + offset, str, lpDraw_gbl->lpModeInfo); + MY_DUMP_STR(buffer,"LPVOID\0",str,"lpDriverHandle\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpDriverHandle) + offset, buffer, lpDraw_gbl->lpDriverHandle); + + MY_DUMP_STR(buffer,"LPDDRAWI_DIRECTDRAW_LCL\0",str,"lpExclusiveOwner\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpExclusiveOwner) + offset, buffer, lpDraw_gbl->lpExclusiveOwner); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwModeIndex\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwModeIndex) + offset, buffer, lpDraw_gbl->dwModeIndex); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwModeIndexOrig\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwModeIndexOrig) + offset, buffer, lpDraw_gbl->dwModeIndexOrig); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwNumFourCC\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwNumFourCC) + offset, buffer, lpDraw_gbl->dwNumFourCC); + + + MY_DUMP_STR(buffer,"LPDWORD\0",str,"lpdwFourCC\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpdwFourCC) + offset, buffer, lpDraw_gbl->lpdwFourCC); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwNumModes\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwNumModes) + offset, buffer, lpDraw_gbl->dwNumModes); + + MY_DUMP_STR(buffer,"LPDDHALMODEINFO\0",str,"lpModeInfo\0"); + printf("%08lx %s: 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, lpModeInfo) + offset, buffer, lpDraw_gbl->lpModeInfo); //printf("%08lx PROCESS_LIST lpGbl->plProcessList : 0x%p \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, plProcessList) + offset, str, lpDraw_gbl->plProcessList); - printf("%08lx DWORD %sdwSurfaceLockCount : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwSurfaceLockCount) + offset, str, lpDraw_gbl->dwSurfaceLockCount); - printf("%08lx DWORD %sdwAliasedLockCnt : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwAliasedLockCnt) + offset, str, lpDraw_gbl->dwAliasedLockCnt); - printf("%08lx DWORD %sdwReserved3 : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwReserved3) + offset, str, lpDraw_gbl->dwReserved3); - printf("%08lx ULONG_PTR %shDD : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, hDD) + offset, str, lpDraw_gbl->hDD); - printf("%08lx char %scObsolete : %s \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, cObsolete[0]) + offset, str, lpDraw_gbl->cObsolete); - printf("%08lx DWORD %sdwReserved1 : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwReserved1)+ offset, str, lpDraw_gbl->dwReserved1); - printf("%08lx DWORD %sdwReserved2 : 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwReserved2)+ offset, str, lpDraw_gbl->dwReserved2); + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSurfaceLockCount\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwSurfaceLockCount) + offset, buffer, lpDraw_gbl->dwSurfaceLockCount); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAliasedLockCnt\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwAliasedLockCnt) + offset, buffer, lpDraw_gbl->dwAliasedLockCnt); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwReserved3\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwReserved3) + offset, buffer, lpDraw_gbl->dwReserved3); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hDD\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, hDD) + offset, buffer, lpDraw_gbl->hDD); + + MY_DUMP_STR(buffer,"char\0",str,"cObsolete\0"); + printf("%08lx %s: %s \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, cObsolete[0]) + offset, buffer, lpDraw_gbl->cObsolete); + + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwReserved1\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwReserved1)+ offset, buffer, lpDraw_gbl->dwReserved1); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwReserved2\0"); + printf("%08lx %s: 0x%08lx \n", FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dwReserved2)+ offset, buffer, lpDraw_gbl->dwReserved2); sprintf(buffer,"%sdbnOverlayRoot.",str); dump_DBLNODE(buffer, &lpDraw_gbl->dbnOverlayRoot, FIELD_OFFSET(DDRAWI_DIRECTDRAW_GBL, dbnOverlayRoot)+ offset); @@ -266,122 +527,345 @@ void dump_DBLNODE(char *str, LPDBLNODE lpDblnode, DWORD offset) { - + char buffer[2048]; if (lpDblnode == NULL) return ; - printf("%08lx struct _DBLNODE * %snext : 0x%p\n", FIELD_OFFSET(DBLNODE, next)+offset, str, lpDblnode->next); - printf("%08lx struct _DBLNODE * %sprev : 0x%p\n", FIELD_OFFSET(DBLNODE, prev)+offset, str, lpDblnode->prev); - printf("%08lx struct LPDDRAWI_DDRAWSURFACE_LCL %sobject : 0x%p\n", FIELD_OFFSET(DBLNODE, object)+offset, str, lpDblnode->object); - printf("%08lx struct LPDDRAWI_DDRAWSURFACE_INT %sobject_int : 0x%p\n", FIELD_OFFSET(DBLNODE, object_int)+offset, str, lpDblnode->object_int); + MY_DUMP_STR(buffer,"struct _DBLNODE *\0",str,"next\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DBLNODE, next)+offset, buffer, lpDblnode->next); + + MY_DUMP_STR(buffer,"struct _DBLNODE *\0",str,"prev\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DBLNODE, prev)+offset, buffer, lpDblnode->prev); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_LCL\0",str,"object\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DBLNODE, object)+offset, buffer, lpDblnode->object); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_INT\0",str,"object_int\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DBLNODE, object_int)+offset, buffer, lpDblnode->object_int); + + printf("\n"); + sprintf(buffer,"%sobject_int->",str); + dump_DDRAWI_DDRAWSURFACE_INT(buffer, lpDblnode->object_int, 0); } void dump_DDCORECAPS(char *str, LPDDCORECAPS lpDdcorecaps, DWORD offset) { - + char buffer[2048]; if (lpDdcorecaps == NULL) return ; int c; - printf("%08lx DWORD %sdwSize : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSize)+offset, str, lpDdcorecaps->dwSize); - printf("%08lx DWORD %sdwCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCaps)+offset, str, lpDdcorecaps->dwCaps); - printf("%08lx DWORD %sdwCaps2 : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCaps2)+offset, str, lpDdcorecaps->dwCaps2); - printf("%08lx DWORD %sdwCKeyCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCKeyCaps)+offset, str, lpDdcorecaps->dwCKeyCaps); - printf("%08lx DWORD %sdwFXCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwFXCaps)+offset, str, lpDdcorecaps->dwFXCaps); - printf("%08lx DWORD %sdwFXAlphaCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwFXAlphaCaps)+offset, str, lpDdcorecaps->dwFXAlphaCaps); - printf("%08lx DWORD %sdwPalCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwPalCaps)+offset, str, lpDdcorecaps->dwPalCaps); - printf("%08lx DWORD %sdwSVCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVCaps)+offset, str, lpDdcorecaps->dwSVCaps); - printf("%08lx DWORD %sdwAlphaBltConstBitDepths : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaBltConstBitDepths)+offset, str, lpDdcorecaps->dwAlphaBltConstBitDepths); - printf("%08lx DWORD %sdwAlphaBltPixelBitDepths : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaBltPixelBitDepths)+offset, str, lpDdcorecaps->dwAlphaBltPixelBitDepths); - printf("%08lx DWORD %sdwAlphaBltSurfaceBitDepths : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaBltSurfaceBitDepths)+offset, str, lpDdcorecaps->dwAlphaBltSurfaceBitDepths); - printf("%08lx DWORD %sdwAlphaOverlayConstBitDepths : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaOverlayConstBitDepths)+offset, str, lpDdcorecaps->dwAlphaOverlayConstBitDepths); - printf("%08lx DWORD %sdwAlphaOverlayPixelBitDepths : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaOverlayPixelBitDepths)+offset, str, lpDdcorecaps->dwAlphaOverlayPixelBitDepths); - printf("%08lx DWORD %sdwAlphaOverlaySurfaceBitDepths : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaOverlaySurfaceBitDepths)+offset, str, lpDdcorecaps->dwAlphaOverlaySurfaceBitDepths); - printf("%08lx DWORD %sdwZBufferBitDepths : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwZBufferBitDepths)+offset, str, lpDdcorecaps->dwZBufferBitDepths); - printf("%08lx DWORD %sdwVidMemTotal : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVidMemTotal)+offset, str, lpDdcorecaps->dwVidMemTotal); - printf("%08lx DWORD %sdwVidMemFree : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVidMemFree)+offset, str, lpDdcorecaps->dwVidMemFree); - printf("%08lx DWORD %sdwMaxVisibleOverlays : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxVisibleOverlays)+offset, str, lpDdcorecaps->dwMaxVisibleOverlays); - printf("%08lx DWORD %sdwCurrVisibleOverlays : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCurrVisibleOverlays)+offset, str, lpDdcorecaps->dwCurrVisibleOverlays); - printf("%08lx DWORD %sdwNumFourCCCodes : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwNumFourCCCodes)+offset, str, lpDdcorecaps->dwNumFourCCCodes); - printf("%08lx DWORD %sdwAlignBoundarySrc : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignBoundarySrc)+offset, str, lpDdcorecaps->dwAlignBoundarySrc); - printf("%08lx DWORD %sdwAlignSizeSrc : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignSizeSrc)+offset, str, lpDdcorecaps->dwAlignSizeSrc); - printf("%08lx DWORD %sdwAlignBoundaryDest : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignBoundaryDest)+offset, str, lpDdcorecaps->dwAlignBoundaryDest); - printf("%08lx DWORD %sdwAlignSizeDest : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignSizeDest)+offset, str, lpDdcorecaps->dwAlignSizeDest); - printf("%08lx DWORD %sdwAlignStrideAlign : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignStrideAlign)+offset, str, lpDdcorecaps->dwAlignStrideAlign); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSize\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSize)+offset, buffer, lpDdcorecaps->dwSize); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCaps)+offset, buffer, lpDdcorecaps->dwCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwCaps2\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCaps2)+offset, buffer, lpDdcorecaps->dwCaps2); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwCKeyCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCKeyCaps)+offset, buffer, lpDdcorecaps->dwCKeyCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwFXCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwFXCaps)+offset, buffer, lpDdcorecaps->dwFXCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwFXAlphaCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwFXAlphaCaps)+offset, buffer, lpDdcorecaps->dwFXAlphaCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwPalCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwPalCaps)+offset, buffer, lpDdcorecaps->dwPalCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSVCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVCaps)+offset, buffer, lpDdcorecaps->dwSVCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlphaBltConstBitDepths\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaBltConstBitDepths)+offset, buffer, lpDdcorecaps->dwAlphaBltConstBitDepths); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlphaBltPixelBitDepths\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaBltPixelBitDepths)+offset, buffer, lpDdcorecaps->dwAlphaBltPixelBitDepths); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlphaBltSurfaceBitDepths\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaBltSurfaceBitDepths)+offset, buffer, lpDdcorecaps->dwAlphaBltSurfaceBitDepths); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlphaOverlayConstBitDepths\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaOverlayConstBitDepths)+offset, buffer, lpDdcorecaps->dwAlphaOverlayConstBitDepths); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlphaOverlayPixelBitDepths\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaOverlayPixelBitDepths)+offset, buffer, lpDdcorecaps->dwAlphaOverlayPixelBitDepths); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlphaOverlaySurfaceBitDepths\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlphaOverlaySurfaceBitDepths)+offset, buffer, lpDdcorecaps->dwAlphaOverlaySurfaceBitDepths); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwZBufferBitDepths\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwZBufferBitDepths)+offset, buffer, lpDdcorecaps->dwZBufferBitDepths); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwVidMemTotal\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVidMemTotal)+offset, buffer, lpDdcorecaps->dwVidMemTotal); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwVidMemFree\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVidMemFree)+offset, buffer, lpDdcorecaps->dwVidMemFree); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMaxVisibleOverlays\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxVisibleOverlays)+offset, buffer, lpDdcorecaps->dwMaxVisibleOverlays); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwCurrVisibleOverlays\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCurrVisibleOverlays)+offset, buffer, lpDdcorecaps->dwCurrVisibleOverlays); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwNumFourCCCodes\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwNumFourCCCodes)+offset, buffer, lpDdcorecaps->dwNumFourCCCodes); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlignBoundarySrc\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignBoundarySrc)+offset, buffer, lpDdcorecaps->dwAlignBoundarySrc); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlignSizeSrc\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignSizeSrc)+offset, buffer, lpDdcorecaps->dwAlignSizeSrc); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlignBoundaryDest\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignBoundaryDest)+offset, buffer, lpDdcorecaps->dwAlignBoundaryDest); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlignSizeDest\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignSizeDest)+offset, buffer, lpDdcorecaps->dwAlignSizeDest); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlignStrideAlign\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwAlignStrideAlign)+offset, buffer, lpDdcorecaps->dwAlignStrideAlign); for (c=0;c<DD_ROP_SPACE;c++) { printf("%08lx DWORD %sdwRops[0x%02x] : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwRops[c])+offset, str, c, lpDdcorecaps->dwRops[c]); } - printf("%08lx DWORD %sddsCaps.dwCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, ddsCaps)+offset, str, lpDdcorecaps->ddsCaps.dwCaps); - printf("%08lx DWORD %sdwMinOverlayStretch : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMinOverlayStretch)+offset, str, lpDdcorecaps->dwMinOverlayStretch); - printf("%08lx DWORD %sdwMaxOverlayStretch : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxOverlayStretch)+offset, str, lpDdcorecaps->dwMaxOverlayStretch); - printf("%08lx DWORD %sdwMinLiveVideoStretch : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMinLiveVideoStretch)+offset, str, lpDdcorecaps->dwMinLiveVideoStretch); - printf("%08lx DWORD %sdwMaxLiveVideoStretch : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxLiveVideoStretch)+offset, str, lpDdcorecaps->dwMaxLiveVideoStretch); - printf("%08lx DWORD %sdwMinHwCodecStretch : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMinHwCodecStretch)+offset, str, lpDdcorecaps->dwMinHwCodecStretch); - printf("%08lx DWORD %sdwMaxHwCodecStretch : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxHwCodecStretch)+offset, str, lpDdcorecaps->dwMaxHwCodecStretch); - printf("%08lx DWORD %sdwReserved1 : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwReserved1)+offset, str, lpDdcorecaps->dwReserved1); - printf("%08lx DWORD %sdwReserved2 : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwReserved2)+offset, str, lpDdcorecaps->dwReserved2); - printf("%08lx DWORD %sdwReserved3 : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwReserved3)+offset, str, lpDdcorecaps->dwReserved3); - printf("%08lx DWORD %sdwSVBCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVBCaps)+offset, str, lpDdcorecaps->dwSVBCaps); - printf("%08lx DWORD %sdwSVBCKeyCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVBCKeyCaps)+offset, str, lpDdcorecaps->dwSVBCKeyCaps); - printf("%08lx DWORD %sdwSVBFXCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVBFXCaps)+offset, str, lpDdcorecaps->dwSVBFXCaps); + MY_DUMP_STR(buffer,"DWORD\0",str,"ddsCaps.dwCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, ddsCaps)+offset, buffer, lpDdcorecaps->ddsCaps.dwCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMinOverlayStretch\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMinOverlayStretch)+offset, buffer, lpDdcorecaps->dwMinOverlayStretch); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMaxOverlayStretch\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxOverlayStretch)+offset, buffer, lpDdcorecaps->dwMaxOverlayStretch); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMinLiveVideoStretch\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMinLiveVideoStretch)+offset, buffer, lpDdcorecaps->dwMinLiveVideoStretch); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMaxLiveVideoStretch\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxLiveVideoStretch)+offset, buffer, lpDdcorecaps->dwMaxLiveVideoStretch); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMinHwCodecStretch\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMinHwCodecStretch)+offset, buffer, lpDdcorecaps->dwMinHwCodecStretch); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMaxHwCodecStretch\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxHwCodecStretch)+offset, buffer, lpDdcorecaps->dwMaxHwCodecStretch); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwReserved1\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwReserved1)+offset, buffer, lpDdcorecaps->dwReserved1); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwReserved2\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwReserved2)+offset, buffer, lpDdcorecaps->dwReserved2); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwReserved3\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwReserved3)+offset, buffer, lpDdcorecaps->dwReserved3); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSVBCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVBCaps)+offset, buffer, lpDdcorecaps->dwSVBCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSVBCKeyCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVBCKeyCaps)+offset, buffer, lpDdcorecaps->dwSVBCKeyCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSVBFXCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVBFXCaps)+offset, buffer, lpDdcorecaps->dwSVBFXCaps); for (c=0;c<DD_ROP_SPACE;c++) { printf("%08lx DWORD %sdwSVBRops[0x%02x] : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSVBRops[c])+offset, str, c, lpDdcorecaps->dwSVBRops[c]); } - printf("%08lx DWORD %sdwVSBCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVSBCaps)+offset, str, lpDdcorecaps->dwVSBCaps); - printf("%08lx DWORD %sdwVSBCKeyCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVSBCKeyCaps)+offset, str, lpDdcorecaps->dwVSBCKeyCaps); - printf("%08lx DWORD %sdwVSBFXCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVSBFXCaps)+offset, str, lpDdcorecaps->dwVSBFXCaps); + MY_DUMP_STR(buffer,"DWORD\0",str,"dwVSBCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVSBCaps)+offset, buffer, lpDdcorecaps->dwVSBCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwVSBCKeyCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVSBCKeyCaps)+offset, buffer, lpDdcorecaps->dwVSBCKeyCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwVSBFXCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVSBFXCaps)+offset, buffer, lpDdcorecaps->dwVSBFXCaps); for (c=0;c<DD_ROP_SPACE;c++) { printf("%08lx DWORD %sdwVSBRops[0x%02x] : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwVSBRops[c])+offset, str, c, lpDdcorecaps->dwVSBRops[c]); } - printf("%08lx DWORD %sdwSSBCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSSBCaps)+offset, str, lpDdcorecaps->dwSSBCaps); - printf("%08lx DWORD %sdwSSBCKeyCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSSBCKeyCaps)+offset, str, lpDdcorecaps->dwSSBCKeyCaps); - printf("%08lx DWORD %sdwSSBFXCaps : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSSBFXCaps)+offset, str, lpDdcorecaps->dwSSBFXCaps); + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSSBCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSSBCaps)+offset, buffer, lpDdcorecaps->dwSSBCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSSBCKeyCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSSBCKeyCaps)+offset, buffer, lpDdcorecaps->dwSSBCKeyCaps); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSSBFXCaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSSBFXCaps)+offset, buffer, lpDdcorecaps->dwSSBFXCaps); for (c=0;c<DD_ROP_SPACE;c++) { printf("%08lx DWORD %sdwSSBRops[0x%02x] : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwSSBRops[c])+offset, str, c, lpDdcorecaps->dwSSBRops[c]); } - printf("%08lx DWORD %sdwMaxVideoPorts : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxVideoPorts)+offset, str, lpDdcorecaps->dwMaxVideoPorts); - printf("%08lx DWORD %sdwCurrVideoPorts : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCurrVideoPorts)+offset, str, lpDdcorecaps->dwCurrVideoPorts); - printf("%08lx DWORD %sdwSVBCaps2 : 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwZBufferBitDepths)+offset, str, lpDdcorecaps->dwSVBCaps2); + MY_DUMP_STR(buffer,"DWORD\0",str,"dwMaxVideoPorts\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwMaxVideoPorts)+offset, buffer, lpDdcorecaps->dwMaxVideoPorts); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwCurrVideoPorts\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwCurrVideoPorts)+offset, buffer, lpDdcorecaps->dwCurrVideoPorts); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwSVBCaps2\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDCORECAPS, dwZBufferBitDepths)+offset, buffer, lpDdcorecaps->dwSVBCaps2); } void dump_VIDMEMINFO(char *str, LPVIDMEMINFO lpVidmeminfo, DWORD offset) { - + char buffer[2048]; if (lpVidmeminfo == NULL) return ; - printf("%08lx FLATPTR %sfpPrimary : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, fpPrimary)+offset, str, lpVidmeminfo->fpPrimary); - printf("%08lx DWORD %sdwFlags : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwFlags)+offset, str, lpVidmeminfo->dwFlags); - printf("%08lx DWORD %sdwDisplayWidth : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, fpPrimary)+offset, str, lpVidmeminfo->dwDisplayWidth); - printf("%08lx DWORD %sdwDisplayHeight : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwDisplayHeight)+offset, str, lpVidmeminfo->dwDisplayHeight); - printf("%08lx LONG %slDisplayPitch : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, lDisplayPitch)+offset, str, lpVidmeminfo->lDisplayPitch); + MY_DUMP_STR(buffer,"FLATPTR\0",str,"fpPrimary\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, fpPrimary)+offset, buffer, lpVidmeminfo->fpPrimary); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwFlags\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwFlags)+offset, buffer, lpVidmeminfo->dwFlags); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwDisplayWidth\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, fpPrimary)+offset, buffer, lpVidmeminfo->dwDisplayWidth); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwDisplayHeight\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwDisplayHeight)+offset, buffer, lpVidmeminfo->dwDisplayHeight); + + MY_DUMP_STR(buffer,"LONG\0",str,"lDisplayPitch\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, lDisplayPitch)+offset, buffer, lpVidmeminfo->lDisplayPitch); //printf("%08lx DDPIXELFORMAT %sddpfDisplay : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, ddpfDisplay)+offset, str, lpVidmeminfo->ddpfDisplay); - printf("%08lx DWORD %sdwOffscreenAlign : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwOffscreenAlign)+offset, str, lpVidmeminfo->dwOffscreenAlign); - printf("%08lx DWORD %sdwOverlayAlign : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwOverlayAlign)+offset, str, lpVidmeminfo->dwOverlayAlign); - printf("%08lx DWORD %sdwTextureAlign : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwTextureAlign)+offset, str, lpVidmeminfo->dwTextureAlign); - printf("%08lx DWORD %sdwZBufferAlign : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwZBufferAlign)+offset, str, lpVidmeminfo->dwZBufferAlign); - printf("%08lx DWORD %sdwAlphaAlign : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwDisplayWidth)+offset, str, lpVidmeminfo->dwAlphaAlign); - printf("%08lx DWORD %sdwNumHeaps : 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwNumHeaps)+offset, str, lpVidmeminfo->dwNumHeaps); - printf("%08lx LPVIDMEM %spvmList : 0x%p\n", FIELD_OFFSET(VIDMEMINFO, pvmList)+offset, str, lpVidmeminfo->pvmList); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwOffscreenAlign\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwOffscreenAlign)+offset, buffer, lpVidmeminfo->dwOffscreenAlign); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwOverlayAlign\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwOverlayAlign)+offset, buffer, lpVidmeminfo->dwOverlayAlign); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwTextureAlign\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwTextureAlign)+offset, buffer, lpVidmeminfo->dwTextureAlign); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwZBufferAlign\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwZBufferAlign)+offset, buffer, lpVidmeminfo->dwZBufferAlign); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwAlphaAlign\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwDisplayWidth)+offset, buffer, lpVidmeminfo->dwAlphaAlign); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwNumHeaps\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(VIDMEMINFO, dwNumHeaps)+offset, buffer, lpVidmeminfo->dwNumHeaps); + + MY_DUMP_STR(buffer,"LPVIDMEM\0",str,"pvmList\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(VIDMEMINFO, pvmList)+offset, buffer, lpVidmeminfo->pvmList); } - - - +/* Surface dump */ + +void dump_DDRAWI_DDRAWSURFACE_INT(char *str, LPDDRAWI_DDRAWSURFACE_INT lpDdrawSurface, DWORD offset) +{ + char buffer[2048]; + if (lpDdrawSurface == NULL) + return ; + + MY_DUMP_STR(buffer,"LPVOID\0",str,"lpVtbl\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_INT, lpVtbl)+offset, buffer, lpDdrawSurface->lpVtbl); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_LCL\0",str,"lpLcl\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_INT, lpLcl)+offset, buffer, lpDdrawSurface->lpLcl); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_INT\0",str,"lpLink\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_INT, lpLink)+offset, str, lpDdrawSurface->lpLink); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwIntRefCnt\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_INT, dwIntRefCnt)+offset, str, lpDdrawSurface->dwIntRefCnt); + + printf("\n"); + sprintf(buffer,"%slpLcl->",str); + dump_DDRAWI_DDRAWSURFACE_LCL(buffer, lpDdrawSurface->lpLcl, 0); + + sprintf(buffer,"%slpLcl->lpLink",str); + dump_DDRAWI_DDRAWSURFACE_INT(buffer, lpDdrawSurface->lpLink, 0); +} + +void dump_DDRAWI_DDRAWSURFACE_LCL(char *str, LPDDRAWI_DDRAWSURFACE_LCL lpDdrawSurface, DWORD offset) +{ + + char buffer[2048]; + if (lpDdrawSurface == NULL) + return ; + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_MORE\0",str,"lpSurfMore\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lpSurfMore)+offset, buffer, lpDdrawSurface->lpSurfMore); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_GBL\0",str,"lpGbl\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lpGbl)+offset, buffer, lpDdrawSurface->lpGbl); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hDDSurface\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, hDDSurface)+offset, buffer, lpDdrawSurface->hDDSurface); + + MY_DUMP_STR(buffer,"LPATTACHLIST\0",str,"lpAttachList\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lpAttachList)+offset, buffer, lpDdrawSurface->lpAttachList); + + MY_DUMP_STR(buffer,"LPATTACHLIST\0",str,"lpAttachListFrom\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lpAttachListFrom)+offset, buffer, lpDdrawSurface->lpAttachListFrom); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwLocalRefCnt\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dwLocalRefCnt)+offset, buffer, lpDdrawSurface->dwLocalRefCnt); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwProcessId\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dwProcessId)+offset, buffer, lpDdrawSurface->dwProcessId); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwFlags\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dwFlags)+offset, buffer, lpDdrawSurface->dwFlags); + //printf("%08lx DDSCAPS %sddsCaps : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, ddsCaps)+offset, str, lpDdrawSurface->ddsCaps); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWPALETTE_INT\0",str,"lpDDPalette\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lpDDPalette)+offset, buffer, lpDdrawSurface->lpDDPalette); + /* note slpDDClipper have union to LPDDRAWI_DDRAWCLIPPER_INT, we need figout how to detect which are set */ + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWCLIPPER_LCL\0",str,"lpDDClipper\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lpDDClipper)+offset, buffer, lpDdrawSurface->lpDDClipper); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwModeCreatedIn\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dwModeCreatedIn)+offset, buffer, lpDdrawSurface->dwModeCreatedIn); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwBackBufferCount\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dwBackBufferCount)+offset, buffer, lpDdrawSurface->dwBackBufferCount); + + // printf("%08lx DDCOLORKEY %sddckCKDestBlt : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, ddckCKDestBlt)+offset, str, lpDdrawSurface->ddckCKDestBlt); + // printf("%08lx DDCOLORKEY %sddckCKSrcBlt : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, ddckCKSrcBlt)+offset, str, lpDdrawSurface->ddckCKSrcBlt); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"hDC\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, hDC)+offset, buffer, lpDdrawSurface->hDC); + + MY_DUMP_STR(buffer,"ULONG_PTR\0",str,"dwReserved1\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dwReserved1)+offset, buffer, lpDdrawSurface->dwReserved1); + + + //printf("%08lx DDCOLORKEY %sddckCKSrcOverlay : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, ddckCKSrcOverlay)+offset, str, lpDdrawSurface->ddckCKSrcOverlay); + //printf("%08lx DDCOLORKEY %sddckCKDestOverlay : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, ddckCKDestOverlay)+offset, str, lpDdrawSurface->ddckCKDestOverlay); + + MY_DUMP_STR(buffer,"LPDDRAWI_DDRAWSURFACE_INT\0",str,"lpSurfaceOverlaying\0"); + printf("%08lx %s: 0x%p\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lpSurfaceOverlaying)+offset, buffer, lpDdrawSurface->lpSurfaceOverlaying); + + // printf("%08lx DBLNODE %sdbnOverlayNode : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dbnOverlayNode)+offset, str, lpDdrawSurface->dbnOverlayNode); + //printf("%08lx RECT %srcOverlaySrc : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, rcOverlaySrc)+offset, str, lpDdrawSurface->rcOverlaySrc); + // printf("%08lx RECT %srcOverlayDest : 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, rcOverlayDest)+offset, str, lpDdrawSurface->rcOverlayDest); + + MY_DUMP_STR(buffer,"DWORD\0",str,"dwClrXparent\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, dwClrXparent)+offset, buffer, lpDdrawSurface->dwClrXparent); + + MY_DUMP_STR(buffer,"LONG\0",str,"lOverlayX\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lOverlayX)+offset, buffer, lpDdrawSurface->lOverlayX); + + MY_DUMP_STR(buffer,"LONG\0",str,"lOverlayY\0"); + printf("%08lx %s: 0x%08lx\n", FIELD_OFFSET(DDRAWI_DDRAWSURFACE_LCL, lOverlayY)+offset, buffer, lpDdrawSurface->lOverlayY); +} Modified: branches/reactx/rostests/apitests/ddrawapi/tests/Test_DirectDrawCreateEx.c URL:
http://svn.reactos.org/svn/reactos/branches/reactx/rostests/apitests/ddrawa…
============================================================================== --- branches/reactx/rostests/apitests/ddrawapi/tests/Test_DirectDrawCreateEx.c [iso-8859-1] (original) +++ branches/reactx/rostests/apitests/ddrawapi/tests/Test_DirectDrawCreateEx.c [iso-8859-1] Thu Nov 20 06:25:27 2008 @@ -451,7 +451,7 @@ #if DUMP_ON if (pIntDirectDraw7 != NULL) { - dump_DDRAWI_DIRECTDRAW_INT("PDraw->", pIntDirectDraw7, 0); + dump_DDRAWI_DIRECTDRAW_INT("PDraw->\0", pIntDirectDraw7, 0); } #endif
16 years, 1 month
1
0
0
0
[mkupfer] 37480: - start with German translation (not finished yet) - prepare setup to change setup language at runtime - fix resource files
by mkupfer@svn.reactos.org
Author: mkupfer Date: Thu Nov 20 04:21:17 2008 New Revision: 37480 URL:
http://svn.reactos.org/svn/reactos?rev=37480&view=rev
Log: - start with German translation (not finished yet) - prepare setup to change setup language at runtime - fix resource files Modified: trunk/reactos/base/setup/reactos/lang/de-DE.rc trunk/reactos/base/setup/reactos/lang/en-US.rc trunk/reactos/base/setup/reactos/reactos.c Modified: trunk/reactos/base/setup/reactos/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/de…
============================================================================== --- trunk/reactos/base/setup/reactos/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/lang/de-DE.rc [iso-8859-1] Thu Nov 20 04:21:17 2008 @@ -18,11 +18,11 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99 - CONTROL "Setup language:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 + CONTROL "Installationssprache:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142 - CONTROL "Keyboard or input method:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 + CONTROL "Tastatur oder Eingabemethode:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81 - LTEXT "Click Next to select the setup type.", IDC_STATIC, 10, 180 ,297, 10 + LTEXT "Klicken Sie auf Weiter um zum Setuptyp zu gelangen.", IDC_STATIC, 10, 180 ,297, 10 END IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 @@ -30,10 +30,10 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Type of setup", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 - CONTROL "Install ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 - CONTROL "Repair or update an installed ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 - LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10 + CONTROL "Setuptyp", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "Installiere ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 + CONTROL "Repariere oder aktualisiere ein installiertes ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 + LTEXT "Klicken Sie auf Weiter um die Geräte einzustellen.", IDC_STATIC, 10, 180 ,297, 10 END IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 @@ -41,14 +41,14 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Device settings", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "Geräteeinstellungen", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 LTEXT "Computer:", IDC_STATIC, 20,15, 80, 10 - CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 150, 80 - LTEXT "Display:", IDC_STATIC, 20,35, 80, 10 - CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 150, 80 - LTEXT "Keyboard:", IDC_STATIC, 20,55, 80, 10 - CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 150, 80 - LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 + CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 180, 80 + LTEXT "Anzeige:", IDC_STATIC, 20,35, 80, 10 + CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 180, 80 + LTEXT "Tastatur:", IDC_STATIC, 20,55, 80, 10 + CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 180, 80 + LTEXT "Klicken Sie auf Weiter um Installationsort zu konfigurieren.", IDC_STATIC, 10, 180 ,277, 20 END IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 @@ -56,29 +56,29 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Partition for ReactOS installation", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 + CONTROL "Partition für die ReactOS-Installation", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL - PUSHBUTTON "&Create", IDC_PARTCREATE, 20,155,50,15 - PUSHBUTTON "&Delete", IDC_PARTDELETE, 76,155,50,15 - PUSHBUTTON "D&river", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED - PUSHBUTTON "&Advanced Options...", IDC_PARTMOREOPTS, 218,155,80,15 - LTEXT "Click Next to start the installation process.", IDC_STATIC, 10, 180 ,277, 20 + PUSHBUTTON "&Erstellen", IDC_PARTCREATE, 20,155,50,15 + PUSHBUTTON "&Löschen", IDC_PARTDELETE, 76,155,50,15 + PUSHBUTTON "&Treiber", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED + PUSHBUTTON "E&rweiterte Optionen...", IDC_PARTMOREOPTS, 218,155,80,15 + LTEXT "Klicken Sie auf Weiter um die Zusammenfassung zu überprüfen.", IDC_STATIC, 10, 180 ,277, 20 END IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 105 STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME -CAPTION "Advanced Partition Settings" +CAPTION "Erweiterte Partitionseinstellungen" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Installation folder", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 + CONTROL "Installationsverzeichnis", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 EDITTEXT IDC_PATH, 10,11,278,13, WS_VISIBLE - CONTROL "Boot loader installation", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,41 + CONTROL "Bootloader-Installation", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,41 - CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 - CONTROL "No installation of bootloader", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11 + CONTROL "Installiere Bootloader auf Festplatte (MBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 + CONTROL "Keine Bootloader-Installation", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11 PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE - PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "&Abbrechen", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 @@ -110,19 +110,19 @@ STRINGTABLE BEGIN - IDS_LANGTITLE "Language Selection" - IDS_LANGSUBTITLE "Choose language for setup and final system." - IDS_TYPETITLE "Welcome to ReactOS Setup" - IDS_TYPESUBTITLE "Choose setup type." - IDS_DEVICETITLE "Setup the basic devices" - IDS_DEVICESUBTITLE "Set the settings of display and keyboard." + IDS_LANGTITLE "Sprachauswahl" + IDS_LANGSUBTITLE "Wählen Sie eine Sprache für das Setup und das Endsystem aus." + IDS_TYPETITLE "Willkommen zum ReactOS Setup" + IDS_TYPESUBTITLE "Wählen Sie einen Setuptyp." + IDS_DEVICETITLE "Einstellen der Basisgeräte" + IDS_DEVICESUBTITLE "Einstellungen der Anzeigegeräte und der Tastatur." IDS_DRIVETITLE "Setup the installation partition and system folder" IDS_DRIVESUBTITLE "Prepare installation partition, system folder and boot loader." IDS_PROCESSTITLE "Prepare partition, copy files and setup system" IDS_PROCESSSUBTITLE "Create and format partition, copy files, install and setup boot loader" IDS_RESTARTTITLE "First stage of setup finished" IDS_RESTARTSUBTITLE "The first stage of setup has been completed, restart to continue with second stage" - IDS_ABORTSETUP "ReactOS is not completely installed on your computer. If you quit Setup now, you will need to run Setup again to install Reactos. Really quit?" - IDS_ABORTSETUP2 "Abort installation?" + IDS_ABORTSETUP "ReactOS ist nicht vollständig auf Ihrem Computer installiert. Wenn Sie das Setup verlassen, dann müssen Sie das Setup nochmal ausführen, um ReactOS zu installieren. Wirklich beenden?" + IDS_ABORTSETUP2 "Installation abbrechen?" END /* EOF */ Modified: trunk/reactos/base/setup/reactos/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/en…
============================================================================== --- trunk/reactos/base/setup/reactos/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/lang/en-US.rc [iso-8859-1] Thu Nov 20 04:21:17 2008 @@ -43,11 +43,11 @@ BEGIN CONTROL "Device settings", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 LTEXT "Computer:", IDC_STATIC, 20,15, 80, 10 - CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 150, 80 + CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 180, 80 LTEXT "Display:", IDC_STATIC, 20,35, 80, 10 - CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 150, 80 + CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 180, 80 LTEXT "Keyboard:", IDC_STATIC, 20,55, 80, 10 - CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 150, 80 + CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 180, 80 LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 END @@ -60,9 +60,9 @@ LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL PUSHBUTTON "&Create", IDC_PARTCREATE, 20,155,50,15 PUSHBUTTON "&Delete", IDC_PARTDELETE, 76,155,50,15 - PUSHBUTTON "D&river", IDC_DEVICEDRIVER, 162,155,50,15 - PUSHBUTTON "&Advanced Options...", IDC_PARTMOREOPTS, 218,155,80,15, WS_DISABLED - LTEXT "Click Next to start the installation process.", IDC_STATIC, 10, 180 ,277, 20 + PUSHBUTTON "D&river", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED + PUSHBUTTON "&Advanced Options...", IDC_PARTMOREOPTS, 218,155,80,15 + LTEXT "Click Next to check the summary.", IDC_STATIC, 10, 180 ,277, 20 END IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 @@ -103,6 +103,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "Installation summary", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Click Next to start the installation process.", IDC_STATIC, 10, 180 ,277, 20 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 Modified: trunk/reactos/base/setup/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos…
============================================================================== --- trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] Thu Nov 20 04:21:17 2008 @@ -344,6 +344,10 @@ if (tindex != CB_ERR) { SetupData.SelectedLangId = SendMessage(hList,CB_GETITEMDATA, (WPARAM)tindex, (LPARAM)0); + WORD LangID=strtol(SetupData.pLanguages[SetupData.SelectedLangId].LangId,NULL,16); + SetThreadLocale(MAKELCID(LangID,SORT_DEFAULT)); + // FIXME: need to reload all resource to force + // the new language setting } hList =GetDlgItem(hwndDlg, IDC_KEYLAYOUT); tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0); @@ -909,6 +913,7 @@ // get default for keyboard and language SetupData.DefaultKBLayout = -1; SetupData.DefaultLang = -1; + // TODO: get defaults from underlaying running system if (SetupFindFirstLine(hTxtsetupSif, _T("NLS"),_T("DefaultLayout"),&InfContext)) { SetupGetStringField(&InfContext, 1, tmp, sizeof(tmp) / sizeof(TCHAR), &LineLength); @@ -1078,7 +1083,6 @@ psp.pfnDlgProc = LangSelDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_LANGSELPAGE); ahpsp[nPages++] = CreatePropertySheetPage(&psp); - // Change language with "SetThreadLocale(langid)" /* Create install type selection page */ psp.dwSize = sizeof(PROPSHEETPAGE);
16 years, 1 month
1
0
0
0
[cgutman] 37479: - Queue a work item for each packet instead of looping all packets currently on the work list - Round trip ping time to the loopback adapter is now about 1 ms
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Nov 19 18:08:26 2008 New Revision: 37479 URL:
http://svn.reactos.org/svn/reactos?rev=37479&view=rev
Log: - Queue a work item for each packet instead of looping all packets currently on the work list - Round trip ping time to the loopback adapter is now about 1 ms Modified: branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c Modified: branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c [iso-8859-1] Wed Nov 19 18:08:26 2008 @@ -22,7 +22,6 @@ KSPIN_LOCK LoopWorkLock; LIST_ENTRY LoopWorkList; WORK_QUEUE_ITEM LoopWorkItem; -BOOLEAN LoopReceiveWorkerBusy = FALSE; VOID STDCALL LoopReceiveWorker( PVOID Context ) { PLIST_ENTRY ListEntry; @@ -35,46 +34,43 @@ TI_DbgPrint(DEBUG_DATALINK, ("Called.\n")); - while( (ListEntry = - ExInterlockedRemoveHeadList( &LoopWorkList, &LoopWorkLock )) ) { - WorkItem = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry); - - TI_DbgPrint(DEBUG_DATALINK, ("WorkItem: %x\n", WorkItem)); - - Packet = WorkItem->Packet; - Adapter = WorkItem->Adapter; - BytesTransferred = WorkItem->BytesTransferred; - - ExFreePool( WorkItem ); - - IPPacket.NdisPacket = Packet; - - TI_DbgPrint(DEBUG_DATALINK, ("Packet %x Adapter %x Trans %x\n", - Packet, Adapter, BytesTransferred)); - - NdisGetFirstBufferFromPacket(Packet, - &NdisBuffer, - &IPPacket.Header, - &IPPacket.ContigSize, - &IPPacket.TotalSize); - - IPPacket.ContigSize = IPPacket.TotalSize = BytesTransferred; - /* Determine which upper layer protocol that should receive - this packet and pass it to the correct receive handler */ - - TI_DbgPrint(MID_TRACE, - ("ContigSize: %d, TotalSize: %d, BytesTransferred: %d\n", - IPPacket.ContigSize, IPPacket.TotalSize, - BytesTransferred)); - - IPPacket.Position = 0; - - IPReceive(Loopback, &IPPacket); - - FreeNdisPacket( Packet ); - } + ListEntry = ExInterlockedRemoveHeadList( &LoopWorkList, &LoopWorkLock ); + WorkItem = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry); + + TI_DbgPrint(DEBUG_DATALINK, ("WorkItem: %x\n", WorkItem)); + + Packet = WorkItem->Packet; + Adapter = WorkItem->Adapter; + BytesTransferred = WorkItem->BytesTransferred; + + ExFreePool( WorkItem ); + + IPPacket.NdisPacket = Packet; + + TI_DbgPrint(DEBUG_DATALINK, ("Packet %x Adapter %x Trans %x\n", + Packet, Adapter, BytesTransferred)); + + NdisGetFirstBufferFromPacket(Packet, + &NdisBuffer, + &IPPacket.Header, + &IPPacket.ContigSize, + &IPPacket.TotalSize); + + IPPacket.ContigSize = IPPacket.TotalSize = BytesTransferred; + /* Determine which upper layer protocol that should receive + this packet and pass it to the correct receive handler */ + + TI_DbgPrint(MID_TRACE, + ("ContigSize: %d, TotalSize: %d, BytesTransferred: %d\n", + IPPacket.ContigSize, IPPacket.TotalSize, + BytesTransferred)); + + IPPacket.Position = 0; + + IPReceive(Loopback, &IPPacket); + + FreeNdisPacket( Packet ); TI_DbgPrint(DEBUG_DATALINK, ("Leaving\n")); - LoopReceiveWorkerBusy = FALSE; } VOID LoopSubmitReceiveWork( @@ -84,34 +80,19 @@ UINT BytesTransferred) { PLAN_WQ_ITEM WQItem; PLAN_ADAPTER Adapter = (PLAN_ADAPTER)BindingContext; - KIRQL OldIrql; - - TcpipAcquireSpinLock( &LoopWorkLock, &OldIrql ); WQItem = ExAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) ); - if( !WQItem ) { - TcpipReleaseSpinLock( &LoopWorkLock, OldIrql ); - return; - } + if( !WQItem ) return; WQItem->Packet = Packet; WQItem->Adapter = Adapter; WQItem->BytesTransferred = BytesTransferred; - InsertTailList( &LoopWorkList, &WQItem->ListEntry ); + ExInterlockedInsertTailList( &LoopWorkList, &WQItem->ListEntry, &LoopWorkLock ); TI_DbgPrint(DEBUG_DATALINK, ("Packet %x Adapter %x BytesTrans %x\n", Packet, Adapter, BytesTransferred)); - if( !LoopReceiveWorkerBusy ) { - LoopReceiveWorkerBusy = TRUE; - ExQueueWorkItem( &LoopWorkItem, CriticalWorkQueue ); - TI_DbgPrint(DEBUG_DATALINK, - ("Work item inserted %x %x\n", &LoopWorkItem, WQItem)); - } else { - TI_DbgPrint(DEBUG_DATALINK, - ("LOOP WORKER BUSY %x %x\n", &LoopWorkItem, WQItem)); - } - TcpipReleaseSpinLock( &LoopWorkLock, OldIrql ); + ExQueueWorkItem( &LoopWorkItem, CriticalWorkQueue ); } VOID LoopTransmit(
16 years, 1 month
1
0
0
0
[cgutman] 37478: - Acquire the AddrFile lock before removing an irp from the queue
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Nov 19 17:55:57 2008 New Revision: 37478 URL:
http://svn.reactos.org/svn/reactos?rev=37478&view=rev
Log: - Acquire the AddrFile lock before removing an irp from the queue Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/datagram/datagram.c Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/datagram/datagram.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] Wed Nov 19 17:55:57 2008 @@ -16,9 +16,12 @@ { PLIST_ENTRY ListEntry; PDATAGRAM_RECEIVE_REQUEST ReceiveRequest; + KIRQL OldIrql; TI_DbgPrint(MAX_TRACE, ("Called (Cancel IRP %08x for file %08x).\n", Irp, AddrFile)); + + KeAcquireSpinLock(&AddrFile->Lock, &OldIrql); for( ListEntry = AddrFile->ReceiveQueue.Flink; ListEntry != &AddrFile->ReceiveQueue; @@ -36,6 +39,8 @@ break; } } + + KeReleaseSpinLock(&AddrFile->Lock, OldIrql); TI_DbgPrint(MAX_TRACE, ("Done.\n")); }
16 years, 1 month
1
0
0
0
[ekohl] 37477: Revert 37476 because it breaks the build bot.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Nov 19 17:22:44 2008 New Revision: 37477 URL:
http://svn.reactos.org/svn/reactos?rev=37477&view=rev
Log: Revert 37476 because it breaks the build bot. Modified: trunk/reactos/tools/widl/parser.tab.c trunk/reactos/tools/widl/parser.tab.h trunk/reactos/tools/widl/parser.y trunk/reactos/tools/widl/typelib.c trunk/reactos/tools/widl/widltypes.h Modified: trunk/reactos/tools/widl/parser.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.tab.c?re…
============================================================================== --- trunk/reactos/tools/widl/parser.tab.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/parser.tab.c [iso-8859-1] Wed Nov 19 17:22:44 2008 @@ -529,8 +529,6 @@ static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); const char *get_attr_display_name(enum attr_type type); static void add_explicit_handle_if_necessary(func_t *func); -static type_t *find_type_helper(const char *name, int t); -static void check_def(const type_t *t); static statement_t *make_statement(enum statement_type type); static statement_t *make_statement_type_decl(type_t *type); @@ -569,7 +567,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 179 "parser.y" +#line 177 "parser.y" typedef union YYSTYPE { attr_t *attr; attr_list_t *attr_list; @@ -599,7 +597,7 @@ enum storage_class stgclass; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 603 "parser.tab.c" +#line 601 "parser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -611,7 +609,7 @@ /* Line 219 of yacc.c. */ -#line 615 "parser.tab.c" +#line 613 "parser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -966,37 +964,37 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 351, 351, 360, 361, 362, 363, 367, 372, 375, - 376, 379, 380, 381, 382, 383, 388, 389, 390, 391, - 394, 395, 398, 399, 403, 404, 410, 413, 414, 420, - 421, 429, 431, 439, 446, 450, 452, 459, 467, 468, - 471, 474, 475, 476, 480, 487, 495, 496, 499, 500, - 504, 510, 511, 512, 515, 516, 519, 520, 521, 522, - 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, - 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, - 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, - 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, - 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, - 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 591, 592, 596, 597, 602, - 603, 604, 605, 608, 609, 612, 616, 622, 623, 624, - 627, 631, 640, 644, 649, 658, 659, 672, 673, 676, - 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, - 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, - 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, - 707, 708, 709, 710, 711, 712, 713, 714, 715, 718, - 719, 722, 728, 734, 735, 738, 743, 750, 751, 754, - 755, 759, 760, 763, 771, 780, 786, 792, 793, 796, - 797, 798, 801, 803, 806, 807, 808, 809, 810, 826, - 827, 828, 829, 830, 831, 832, 835, 836, 839, 840, - 841, 842, 843, 844, 845, 848, 849, 857, 867, 874, - 875, 879, 882, 883, 886, 900, 901, 904, 905, 908, - 918, 928, 929, 932, 933, 936, 949, 963, 976, 980, - 981, 984, 985, 988, 993, 1001, 1002, 1003, 1007, 1011, - 1014, 1015, 1018, 1019, 1023, 1024, 1028, 1029, 1030, 1034, - 1036, 1037, 1041, 1042, 1043, 1044, 1051, 1052, 1056, 1057, - 1061, 1062, 1063, 1066, 1078, 1079, 1080, 1081, 1082, 1083, - 1084, 1085, 1086, 1087, 1090, 1096, 1103, 1121, 1122 + 0, 349, 349, 358, 359, 360, 361, 365, 370, 373, + 374, 377, 378, 379, 380, 381, 386, 387, 388, 389, + 392, 393, 396, 397, 401, 402, 408, 411, 412, 418, + 419, 427, 429, 437, 444, 448, 450, 457, 465, 466, + 469, 472, 473, 474, 478, 485, 493, 494, 497, 498, + 502, 508, 509, 510, 513, 514, 517, 518, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, + 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, + 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, + 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, + 584, 585, 586, 587, 588, 589, 590, 594, 595, 600, + 601, 602, 603, 606, 607, 610, 614, 620, 621, 622, + 625, 629, 638, 642, 647, 656, 657, 670, 671, 674, + 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, + 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, + 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 716, + 717, 720, 726, 732, 733, 736, 741, 748, 749, 752, + 753, 757, 758, 761, 769, 778, 784, 790, 791, 794, + 795, 796, 799, 801, 804, 805, 806, 807, 808, 824, + 825, 826, 827, 828, 829, 830, 833, 834, 837, 838, + 839, 840, 841, 842, 843, 846, 847, 853, 862, 869, + 870, 874, 877, 878, 881, 895, 896, 899, 900, 903, + 913, 923, 924, 927, 928, 931, 944, 958, 971, 975, + 976, 979, 980, 983, 988, 996, 997, 998, 1002, 1006, + 1009, 1010, 1013, 1014, 1018, 1019, 1023, 1024, 1025, 1029, + 1031, 1032, 1036, 1037, 1038, 1039, 1046, 1047, 1051, 1052, + 1056, 1057, 1058, 1061, 1072, 1073, 1074, 1075, 1076, 1077, + 1078, 1079, 1080, 1081, 1084, 1090, 1096, 1113, 1114 }; #endif @@ -2452,7 +2450,7 @@ switch (yyn) { case 2: -#line 351 "parser.y" +#line 349 "parser.y" { fix_incomplete(); check_all_user_types((yyvsp[0].stmt_list)); write_proxies((yyvsp[0].stmt_list)); @@ -2463,22 +2461,22 @@ break; case 3: +#line 358 "parser.y" + { (yyval.stmt_list) = NULL; ;} + break; + + case 4: +#line 359 "parser.y" + { (yyval.stmt_list) = (yyvsp[-1].stmt_list); ;} + break; + + case 5: #line 360 "parser.y" - { (yyval.stmt_list) = NULL; ;} - break; - - case 4: + { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); ;} + break; + + case 6: #line 361 "parser.y" - { (yyval.stmt_list) = (yyvsp[-1].stmt_list); ;} - break; - - case 5: -#line 362 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); ;} - break; - - case 6: -#line 363 "parser.y" { (yyval.stmt_list) = (yyvsp[-2].stmt_list); reg_type((yyvsp[-1].type), (yyvsp[-1].type)->name, 0); if (!parse_only && do_header) write_coclass_forward((yyvsp[-1].type)); @@ -2486,7 +2484,7 @@ break; case 7: -#line 367 "parser.y" +#line 365 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); add_typelib_entry((yyvsp[0].type)); reg_type((yyvsp[0].type), (yyvsp[0].type)->name, 0); @@ -2495,44 +2493,44 @@ break; case 8: -#line 372 "parser.y" +#line 370 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_module((yyvsp[0].type))); add_typelib_entry((yyvsp[0].type)); ;} break; case 9: -#line 375 "parser.y" +#line 373 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_library((yyvsp[0].typelib))); ;} break; case 10: -#line 376 "parser.y" +#line 374 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); ;} break; case 11: +#line 377 "parser.y" + { (yyval.stmt_list) = NULL; ;} + break; + + case 12: +#line 378 "parser.y" + { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_reference((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} + break; + + case 13: #line 379 "parser.y" - { (yyval.stmt_list) = NULL; ;} - break; - - case 12: + { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} + break; + + case 14: #line 380 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_reference((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} - break; - - case 13: + { (yyval.stmt_list) = (yyvsp[-2].stmt_list); reg_type((yyvsp[-1].type), (yyvsp[-1].type)->name, 0); if (!parse_only && do_header) write_coclass_forward((yyvsp[-1].type)); ;} + break; + + case 15: #line 381 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} - break; - - case 14: -#line 382 "parser.y" - { (yyval.stmt_list) = (yyvsp[-2].stmt_list); reg_type((yyvsp[-1].type), (yyvsp[-1].type)->name, 0); if (!parse_only && do_header) write_coclass_forward((yyvsp[-1].type)); ;} - break; - - case 15: -#line 383 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); reg_type((yyvsp[0].type), (yyvsp[0].type)->name, 0); @@ -2541,42 +2539,42 @@ break; case 16: +#line 386 "parser.y" + { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_module((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} + break; + + case 17: +#line 387 "parser.y" + { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); ;} + break; + + case 18: #line 388 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_module((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} - break; - - case 17: + { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_importlib((yyvsp[0].str))); ;} + break; + + case 19: #line 389 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); ;} - break; - - case 18: -#line 390 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_importlib((yyvsp[0].str))); ;} - break; - - case 19: -#line 391 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_library((yyvsp[0].typelib))); ;} break; case 20: -#line 394 "parser.y" +#line 392 "parser.y" { (yyval.func_list) = NULL; ;} break; case 21: -#line 395 "parser.y" +#line 393 "parser.y" { (yyval.func_list) = append_func_from_statement( (yyvsp[-1].func_list), (yyvsp[0].statement) ); ;} break; case 24: -#line 403 "parser.y" +#line 401 "parser.y" { (yyval.statement) = make_statement_cppquote((yyvsp[0].str)); ;} break; case 25: -#line 404 "parser.y" +#line 402 "parser.y" { (yyval.statement) = make_statement_type_decl((yyvsp[-1].type)); if (!parse_only && do_header) { write_type_def_or_decl(header, (yyvsp[-1].type), FALSE, NULL); @@ -2586,19 +2584,19 @@ break; case 26: -#line 410 "parser.y" +#line 408 "parser.y" { (yyval.statement) = make_statement_declaration((yyvsp[-1].var)); if (!parse_only && do_header) write_declaration((yyvsp[-1].var), is_in_interface); ;} break; case 27: -#line 413 "parser.y" +#line 411 "parser.y" { (yyval.statement) = make_statement_import((yyvsp[0].str)); ;} break; case 28: -#line 414 "parser.y" +#line 412 "parser.y" { (yyval.statement) = make_statement_type_decl((yyvsp[-1].type)); if (!parse_only && do_header) { write_type_def_or_decl(header, (yyvsp[-1].type), FALSE, NULL); @@ -2608,12 +2606,12 @@ break; case 29: -#line 420 "parser.y" +#line 418 "parser.y" { (yyval.statement) = (yyvsp[-1].statement); ;} break; case 30: -#line 421 "parser.y" +#line 419 "parser.y" { (yyval.statement) = make_statement_type_decl((yyvsp[-1].type)); if (!parse_only && do_header) { write_type_def_or_decl(header, (yyvsp[-1].type), FALSE, NULL); @@ -2623,12 +2621,12 @@ break; case 31: +#line 427 "parser.y" + { (yyval.str) = (yyvsp[-1].str); if (!parse_only && do_header) fprintf(header, "%s\n", (yyvsp[-1].str)); ;} + break; + + case 32: #line 429 "parser.y" - { (yyval.str) = (yyvsp[-1].str); if (!parse_only && do_header) fprintf(header, "%s\n", (yyvsp[-1].str)); ;} - break; - - case 32: -#line 431 "parser.y" { assert(yychar == YYEMPTY); (yyval.import) = xmalloc(sizeof(struct _import_t)); (yyval.import)->name = (yyvsp[-1].str); @@ -2638,7 +2636,7 @@ break; case 33: -#line 439 "parser.y" +#line 437 "parser.y" { (yyval.str) = (yyvsp[-2].import)->name; if ((yyvsp[-2].import)->import_performed) pop_import(); free((yyvsp[-2].import)); @@ -2647,17 +2645,17 @@ break; case 34: -#line 447 "parser.y" +#line 445 "parser.y" { (yyval.str) = (yyvsp[-2].str); if(!parse_only) add_importlib((yyvsp[-2].str)); ;} break; case 35: +#line 448 "parser.y" + { (yyval.str) = (yyvsp[0].str); ;} + break; + + case 36: #line 450 "parser.y" - { (yyval.str) = (yyvsp[0].str); ;} - break; - - case 36: -#line 452 "parser.y" { (yyval.typelib) = make_library((yyvsp[-1].str), check_library_attrs((yyvsp[-1].str), (yyvsp[-2].attr_list))); if (!parse_only) start_typelib((yyval.typelib)); if (!parse_only && do_header) write_library((yyval.typelib)); @@ -2667,7 +2665,7 @@ break; case 37: -#line 460 "parser.y" +#line 458 "parser.y" { (yyval.typelib) = (yyvsp[-3].typelib); (yyval.typelib)->stmts = (yyvsp[-2].stmt_list); if (!parse_only) end_typelib(); @@ -2676,27 +2674,27 @@ break; case 38: -#line 467 "parser.y" +#line 465 "parser.y" { (yyval.var_list) = NULL; ;} break; case 40: -#line 471 "parser.y" +#line 469 "parser.y" { (yyval.var_list) = NULL; ;} break; case 41: -#line 474 "parser.y" +#line 472 "parser.y" { check_arg((yyvsp[0].var)); (yyval.var_list) = append_var( NULL, (yyvsp[0].var) ); ;} break; case 42: -#line 475 "parser.y" +#line 473 "parser.y" { check_arg((yyvsp[0].var)); (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[0].var)); ;} break; case 44: -#line 480 "parser.y" +#line 478 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; (yyval.var)->attrs = (yyvsp[-2].attr_list); if ((yyvsp[-1].declspec)->stgclass != STG_NONE && (yyvsp[-1].declspec)->stgclass != STG_REGISTER) @@ -2707,7 +2705,7 @@ break; case 45: -#line 487 "parser.y" +#line 485 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; if ((yyvsp[-1].declspec)->stgclass != STG_NONE && (yyvsp[-1].declspec)->stgclass != STG_REGISTER) error_loc("invalid storage class for function parameter\n"); @@ -2717,22 +2715,22 @@ break; case 46: -#line 495 "parser.y" +#line 493 "parser.y" { (yyval.expr) = (yyvsp[-1].expr); ;} break; case 47: -#line 496 "parser.y" +#line 494 "parser.y" { (yyval.expr) = make_expr(EXPR_VOID); ;} break; case 48: -#line 499 "parser.y" +#line 497 "parser.y" { (yyval.attr_list) = NULL; ;} break; case 50: -#line 504 "parser.y" +#line 502 "parser.y" { (yyval.attr_list) = (yyvsp[-1].attr_list); if (!(yyval.attr_list)) error_loc("empty attribute lists unsupported\n"); @@ -2740,426 +2738,426 @@ break; case 51: +#line 508 "parser.y" + { (yyval.attr_list) = append_attr( NULL, (yyvsp[0].attr) ); ;} + break; + + case 52: +#line 509 "parser.y" + { (yyval.attr_list) = append_attr( (yyvsp[-2].attr_list), (yyvsp[0].attr) ); ;} + break; + + case 53: #line 510 "parser.y" - { (yyval.attr_list) = append_attr( NULL, (yyvsp[0].attr) ); ;} - break; - - case 52: -#line 511 "parser.y" - { (yyval.attr_list) = append_attr( (yyvsp[-2].attr_list), (yyvsp[0].attr) ); ;} - break; - - case 53: -#line 512 "parser.y" { (yyval.attr_list) = append_attr( (yyvsp[-3].attr_list), (yyvsp[0].attr) ); ;} break; case 54: -#line 515 "parser.y" +#line 513 "parser.y" { (yyval.str_list) = append_str( NULL, (yyvsp[0].str) ); ;} break; case 55: -#line 516 "parser.y" +#line 514 "parser.y" { (yyval.str_list) = append_str( (yyvsp[-2].str_list), (yyvsp[0].str) ); ;} break; case 56: +#line 517 "parser.y" + { (yyval.attr) = NULL; ;} + break; + + case 57: +#line 518 "parser.y" + { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); ;} + break; + + case 58: #line 519 "parser.y" - { (yyval.attr) = NULL; ;} - break; - - case 57: + { (yyval.attr) = make_attr(ATTR_APPOBJECT); ;} + break; + + case 59: #line 520 "parser.y" - { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); ;} - break; - - case 58: + { (yyval.attr) = make_attr(ATTR_ASYNC); ;} + break; + + case 60: #line 521 "parser.y" - { (yyval.attr) = make_attr(ATTR_APPOBJECT); ;} - break; - - case 59: + { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); ;} + break; + + case 61: #line 522 "parser.y" - { (yyval.attr) = make_attr(ATTR_ASYNC); ;} - break; - - case 60: + { (yyval.attr) = make_attr(ATTR_BINDABLE); ;} + break; + + case 62: #line 523 "parser.y" - { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); ;} - break; - - case 61: + { (yyval.attr) = make_attr(ATTR_BROADCAST); ;} + break; + + case 63: #line 524 "parser.y" - { (yyval.attr) = make_attr(ATTR_BINDABLE); ;} - break; - - case 62: + { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[-1].var)); ;} + break; + + case 64: #line 525 "parser.y" - { (yyval.attr) = make_attr(ATTR_BROADCAST); ;} - break; - - case 63: + { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[-1].expr_list)); ;} + break; + + case 65: #line 526 "parser.y" - { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[-1].var)); ;} - break; - - case 64: + { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); ;} + break; + + case 66: #line 527 "parser.y" - { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[-1].expr_list)); ;} - break; - - case 65: + { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ ;} + break; + + case 67: #line 528 "parser.y" - { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); ;} - break; - - case 66: + { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ ;} + break; + + case 68: #line 529 "parser.y" - { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ ;} - break; - - case 67: + { (yyval.attr) = make_attr(ATTR_CONTROL); ;} + break; + + case 69: #line 530 "parser.y" - { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ ;} - break; - - case 68: + { (yyval.attr) = make_attr(ATTR_DEFAULT); ;} + break; + + case 70: #line 531 "parser.y" - { (yyval.attr) = make_attr(ATTR_CONTROL); ;} - break; - - case 69: + { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); ;} + break; + + case 71: #line 532 "parser.y" - { (yyval.attr) = make_attr(ATTR_DEFAULT); ;} - break; - - case 70: + { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[-1].expr)); ;} + break; + + case 72: #line 533 "parser.y" - { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); ;} - break; - - case 71: + { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); ;} + break; + + case 73: #line 534 "parser.y" - { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[-1].expr)); ;} - break; - - case 72: + { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); ;} + break; + + case 74: #line 535 "parser.y" - { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); ;} - break; - - case 73: + { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[-1].str)); ;} + break; + + case 75: #line 536 "parser.y" - { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); ;} - break; - - case 74: + { (yyval.attr) = make_attr(ATTR_DUAL); ;} + break; + + case 76: #line 537 "parser.y" - { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[-1].str)); ;} - break; - - case 75: + { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[-1].str_list)); ;} + break; + + case 77: #line 538 "parser.y" - { (yyval.attr) = make_attr(ATTR_DUAL); ;} - break; - - case 76: + { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[-1].expr)); ;} + break; + + case 78: #line 539 "parser.y" - { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[-1].str_list)); ;} - break; - - case 77: + { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); ;} + break; + + case 79: #line 540 "parser.y" - { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[-1].expr)); ;} - break; - - case 78: + { (yyval.attr) = make_attr(ATTR_HANDLE); ;} + break; + + case 80: #line 541 "parser.y" - { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); ;} - break; - - case 79: + { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[-1].expr)); ;} + break; + + case 81: #line 542 "parser.y" - { (yyval.attr) = make_attr(ATTR_HANDLE); ;} - break; - - case 80: + { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[-1].str)); ;} + break; + + case 82: #line 543 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[-1].expr)); ;} - break; - - case 81: + { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[-1].str)); ;} + break; + + case 83: #line 544 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[-1].str)); ;} - break; - - case 82: + { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[-1].expr)); ;} + break; + + case 84: #line 545 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[-1].str)); ;} - break; - - case 83: + { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[-1].str)); ;} + break; + + case 85: #line 546 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[-1].expr)); ;} - break; - - case 84: + { (yyval.attr) = make_attr(ATTR_HIDDEN); ;} + break; + + case 86: #line 547 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[-1].str)); ;} - break; - - case 85: + { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[-1].expr)); ;} + break; + + case 87: #line 548 "parser.y" - { (yyval.attr) = make_attr(ATTR_HIDDEN); ;} - break; - - case 86: + { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); ;} + break; + + case 88: #line 549 "parser.y" - { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[-1].expr)); ;} - break; - - case 87: + { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[-1].expr)); ;} + break; + + case 89: #line 550 "parser.y" - { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); ;} - break; - - case 88: + { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); ;} + break; + + case 90: #line 551 "parser.y" - { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[-1].expr)); ;} - break; - - case 89: + { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[-1].str)); ;} + break; + + case 91: #line 552 "parser.y" - { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); ;} - break; - - case 90: + { (yyval.attr) = make_attr(ATTR_IN); ;} + break; + + case 92: #line 553 "parser.y" - { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[-1].str)); ;} - break; - - case 91: + { (yyval.attr) = make_attr(ATTR_INPUTSYNC); ;} + break; + + case 93: #line 554 "parser.y" - { (yyval.attr) = make_attr(ATTR_IN); ;} - break; - - case 92: + { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[-1].expr_list)); ;} + break; + + case 94: #line 555 "parser.y" - { (yyval.attr) = make_attr(ATTR_INPUTSYNC); ;} - break; - - case 93: + { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[-1].expr)); ;} + break; + + case 95: #line 556 "parser.y" - { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[-1].expr_list)); ;} - break; - - case 94: + { (yyval.attr) = make_attr(ATTR_LOCAL); ;} + break; + + case 96: #line 557 "parser.y" - { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[-1].expr)); ;} - break; - - case 95: + { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); ;} + break; + + case 97: #line 558 "parser.y" - { (yyval.attr) = make_attr(ATTR_LOCAL); ;} - break; - - case 96: + { (yyval.attr) = make_attr(ATTR_NONCREATABLE); ;} + break; + + case 98: #line 559 "parser.y" - { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); ;} - break; - - case 97: + { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); ;} + break; + + case 99: #line 560 "parser.y" - { (yyval.attr) = make_attr(ATTR_NONCREATABLE); ;} - break; - - case 98: + { (yyval.attr) = make_attr(ATTR_OBJECT); ;} + break; + + case 100: #line 561 "parser.y" - { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); ;} - break; - - case 99: + { (yyval.attr) = make_attr(ATTR_ODL); ;} + break; + + case 101: #line 562 "parser.y" - { (yyval.attr) = make_attr(ATTR_OBJECT); ;} - break; - - case 100: + { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); ;} + break; + + case 102: #line 563 "parser.y" - { (yyval.attr) = make_attr(ATTR_ODL); ;} - break; - - case 101: + { (yyval.attr) = make_attr(ATTR_OPTIONAL); ;} + break; + + case 103: #line 564 "parser.y" - { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); ;} - break; - - case 102: + { (yyval.attr) = make_attr(ATTR_OUT); ;} + break; + + case 104: #line 565 "parser.y" - { (yyval.attr) = make_attr(ATTR_OPTIONAL); ;} - break; - - case 103: + { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[-1].num)); ;} + break; + + case 105: #line 566 "parser.y" - { (yyval.attr) = make_attr(ATTR_OUT); ;} - break; - - case 104: + { (yyval.attr) = make_attr(ATTR_PROPGET); ;} + break; + + case 106: #line 567 "parser.y" - { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[-1].num)); ;} - break; - - case 105: + { (yyval.attr) = make_attr(ATTR_PROPPUT); ;} + break; + + case 107: #line 568 "parser.y" - { (yyval.attr) = make_attr(ATTR_PROPGET); ;} - break; - - case 106: + { (yyval.attr) = make_attr(ATTR_PROPPUTREF); ;} + break; + + case 108: #line 569 "parser.y" - { (yyval.attr) = make_attr(ATTR_PROPPUT); ;} - break; - - case 107: -#line 570 "parser.y" - { (yyval.attr) = make_attr(ATTR_PROPPUTREF); ;} - break; - - case 108: + { (yyval.attr) = make_attr(ATTR_PUBLIC); ;} + break; + + case 109: #line 571 "parser.y" - { (yyval.attr) = make_attr(ATTR_PUBLIC); ;} - break; - - case 109: -#line 573 "parser.y" { expr_list_t *list = append_expr( NULL, (yyvsp[-3].expr) ); list = append_expr( list, (yyvsp[-1].expr) ); (yyval.attr) = make_attrp(ATTR_RANGE, list); ;} break; case 110: +#line 574 "parser.y" + { (yyval.attr) = make_attr(ATTR_READONLY); ;} + break; + + case 111: +#line 575 "parser.y" + { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); ;} + break; + + case 112: #line 576 "parser.y" - { (yyval.attr) = make_attr(ATTR_READONLY); ;} - break; - - case 111: + { (yyval.attr) = make_attr(ATTR_RESTRICTED); ;} + break; + + case 113: #line 577 "parser.y" - { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); ;} - break; - - case 112: + { (yyval.attr) = make_attr(ATTR_RETVAL); ;} + break; + + case 114: #line 578 "parser.y" - { (yyval.attr) = make_attr(ATTR_RESTRICTED); ;} - break; - - case 113: + { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[-1].expr_list)); ;} + break; + + case 115: #line 579 "parser.y" - { (yyval.attr) = make_attr(ATTR_RETVAL); ;} - break; - - case 114: + { (yyval.attr) = make_attr(ATTR_SOURCE); ;} + break; + + case 116: #line 580 "parser.y" - { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[-1].expr_list)); ;} - break; - - case 115: + { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); ;} + break; + + case 117: #line 581 "parser.y" - { (yyval.attr) = make_attr(ATTR_SOURCE); ;} - break; - - case 116: + { (yyval.attr) = make_attr(ATTR_STRING); ;} + break; + + case 118: #line 582 "parser.y" - { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); ;} - break; - - case 117: + { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[-1].expr)); ;} + break; + + case 119: #line 583 "parser.y" - { (yyval.attr) = make_attr(ATTR_STRING); ;} - break; - - case 118: + { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[-1].type)); ;} + break; + + case 120: #line 584 "parser.y" - { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[-1].expr)); ;} - break; - - case 119: + { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[-1].type)); ;} + break; + + case 121: #line 585 "parser.y" - { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[-1].type)); ;} - break; - - case 120: + { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[-1].uuid)); ;} + break; + + case 122: #line 586 "parser.y" - { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[-1].type)); ;} - break; - - case 121: + { (yyval.attr) = make_attr(ATTR_V1ENUM); ;} + break; + + case 123: #line 587 "parser.y" - { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[-1].uuid)); ;} - break; - - case 122: + { (yyval.attr) = make_attr(ATTR_VARARG); ;} + break; + + case 124: #line 588 "parser.y" - { (yyval.attr) = make_attr(ATTR_V1ENUM); ;} - break; - - case 123: + { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[-1].num)); ;} + break; + + case 125: #line 589 "parser.y" - { (yyval.attr) = make_attr(ATTR_VARARG); ;} - break; - - case 124: + { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[-1].type)); ;} + break; + + case 126: #line 590 "parser.y" - { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[-1].num)); ;} - break; - - case 125: -#line 591 "parser.y" - { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[-1].type)); ;} - break; - - case 126: -#line 592 "parser.y" { (yyval.attr) = make_attrv(ATTR_POINTERTYPE, (yyvsp[0].num)); ;} break; case 128: -#line 597 "parser.y" +#line 595 "parser.y" { if (!is_valid_uuid((yyvsp[0].str))) error_loc("invalid UUID: %s\n", (yyvsp[0].str)); (yyval.uuid) = parse_uuid((yyvsp[0].str)); ;} break; case 129: +#line 600 "parser.y" + { (yyval.str) = (yyvsp[0].str); ;} + break; + + case 130: +#line 601 "parser.y" + { (yyval.str) = (yyvsp[0].str); ;} + break; + + case 131: #line 602 "parser.y" { (yyval.str) = (yyvsp[0].str); ;} break; - case 130: + case 132: #line 603 "parser.y" { (yyval.str) = (yyvsp[0].str); ;} break; - case 131: -#line 604 "parser.y" - { (yyval.str) = (yyvsp[0].str); ;} - break; - - case 132: -#line 605 "parser.y" - { (yyval.str) = (yyvsp[0].str); ;} - break; - case 133: -#line 608 "parser.y" +#line 606 "parser.y" { (yyval.var_list) = NULL; ;} break; case 134: -#line 609 "parser.y" +#line 607 "parser.y" { (yyval.var_list) = append_var( (yyvsp[-1].var_list), (yyvsp[0].var) ); ;} break; case 135: -#line 612 "parser.y" +#line 610 "parser.y" { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, (yyvsp[-2].expr) )); (yyval.var) = (yyvsp[0].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); @@ -3167,7 +3165,7 @@ break; case 136: -#line 616 "parser.y" +#line 614 "parser.y" { attr_t *a = make_attr(ATTR_DEFAULT); (yyval.var) = (yyvsp[0].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); @@ -3175,17 +3173,17 @@ break; case 137: -#line 622 "parser.y" +#line 620 "parser.y" { (yyval.var_list) = NULL; ;} break; case 138: -#line 623 "parser.y" +#line 621 "parser.y" { (yyval.var_list) = (yyvsp[-1].var_list); ;} break; case 140: -#line 627 "parser.y" +#line 625 "parser.y" { if (!(yyvsp[0].var)->eval) (yyvsp[0].var)->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */); (yyval.var_list) = append_var( NULL, (yyvsp[0].var) ); @@ -3193,7 +3191,7 @@ break; case 141: -#line 631 "parser.y" +#line 629 "parser.y" { if (!(yyvsp[0].var)->eval) { var_t *last = LIST_ENTRY( list_tail((yyval.var_list)), var_t, entry ); @@ -3204,7 +3202,7 @@ break; case 142: -#line 640 "parser.y" +#line 638 "parser.y" { (yyval.var) = reg_const((yyvsp[-2].var)); (yyval.var)->eval = (yyvsp[0].expr); (yyval.var)->type = make_int(0); @@ -3212,14 +3210,14 @@ break; case 143: -#line 644 "parser.y" +#line 642 "parser.y" { (yyval.var) = reg_const((yyvsp[0].var)); (yyval.var)->type = make_int(0); ;} break; case 144: -#line 649 "parser.y" +#line 647 "parser.y" { (yyval.type) = get_typev(RPC_FC_ENUM16, (yyvsp[-3].var), tsENUM); (yyval.type)->kind = TKIND_ENUM; (yyval.type)->fields_or_args = (yyvsp[-1].var_list); @@ -3230,232 +3228,232 @@ break; case 145: -#line 658 "parser.y" +#line 656 "parser.y" { (yyval.expr_list) = append_expr( NULL, (yyvsp[0].expr) ); ;} break; case 146: -#line 659 "parser.y" +#line 657 "parser.y" { (yyval.expr_list) = append_expr( (yyvsp[-2].expr_list), (yyvsp[0].expr) ); ;} break; case 147: -#line 672 "parser.y" +#line 670 "parser.y" { (yyval.expr) = make_expr(EXPR_VOID); ;} break; case 149: +#line 674 "parser.y" + { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[0].num)); ;} + break; + + case 150: +#line 675 "parser.y" + { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[0].num)); ;} + break; + + case 151: #line 676 "parser.y" - { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[0].num)); ;} - break; - - case 150: + { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[0].dbl)); ;} + break; + + case 152: #line 677 "parser.y" - { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[0].num)); ;} - break; - - case 151: + { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); ;} + break; + + case 153: #line 678 "parser.y" - { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[0].dbl)); ;} - break; - - case 152: + { (yyval.expr) = make_exprl(EXPR_NUM, 0); ;} + break; + + case 154: #line 679 "parser.y" - { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); ;} - break; - - case 153: + { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); ;} + break; + + case 155: #line 680 "parser.y" - { (yyval.expr) = make_exprl(EXPR_NUM, 0); ;} - break; - - case 154: + { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[0].str)); ;} + break; + + case 156: #line 681 "parser.y" - { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); ;} - break; - - case 155: + { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[0].str)); ;} + break; + + case 157: #line 682 "parser.y" - { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[0].str)); ;} - break; - - case 156: + { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str)); ;} + break; + + case 158: #line 683 "parser.y" - { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[0].str)); ;} - break; - - case 157: + { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 159: #line 684 "parser.y" - { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str)); ;} - break; - - case 158: + { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 160: #line 685 "parser.y" - { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 159: + { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 161: #line 686 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 160: + { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 162: #line 687 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 161: + { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 163: #line 688 "parser.y" - { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 162: + { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 164: #line 689 "parser.y" - { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 163: + { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 165: #line 690 "parser.y" - { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 164: + { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 166: #line 691 "parser.y" - { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 165: + { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 167: #line 692 "parser.y" - { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 166: + { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 168: #line 693 "parser.y" - { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 167: + { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 169: #line 694 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 168: + { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 170: #line 695 "parser.y" - { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 169: + { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 171: #line 696 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 170: + { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 172: #line 697 "parser.y" - { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 171: + { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 173: #line 698 "parser.y" - { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 172: + { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 174: #line 699 "parser.y" - { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 173: + { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 175: #line 700 "parser.y" - { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 174: + { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 176: #line 701 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 175: + { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} + break; + + case 177: #line 702 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 176: + { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[0].expr)); ;} + break; + + case 178: #line 703 "parser.y" - { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} - break; - - case 177: + { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[0].expr)); ;} + break; + + case 179: #line 704 "parser.y" - { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[0].expr)); ;} - break; - - case 178: + { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[0].expr)); ;} + break; + + case 180: #line 705 "parser.y" - { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[0].expr)); ;} - break; - - case 179: + { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[0].expr)); ;} + break; + + case 181: #line 706 "parser.y" - { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[0].expr)); ;} - break; - - case 180: + { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[0].expr)); ;} + break; + + case 182: #line 707 "parser.y" - { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[0].expr)); ;} - break; - - case 181: + { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[0].expr)); ;} + break; + + case 183: #line 708 "parser.y" - { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[0].expr)); ;} - break; - - case 182: + { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[-2].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); ;} + break; + + case 184: #line 709 "parser.y" - { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[0].expr)); ;} - break; - - case 183: + { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[-2].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); ;} + break; + + case 185: #line 710 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[-2].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); ;} - break; - - case 184: + { (yyval.expr) = make_exprt(EXPR_CAST, (yyvsp[-2].type), (yyvsp[0].expr)); ;} + break; + + case 186: #line 711 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[-2].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); ;} - break; - - case 185: + { (yyval.expr) = make_exprt(EXPR_SIZEOF, (yyvsp[-1].type), NULL); ;} + break; + + case 187: #line 712 "parser.y" - { (yyval.expr) = make_exprt(EXPR_CAST, (yyvsp[-2].type), (yyvsp[0].expr)); ;} - break; - - case 186: + { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[-3].expr), (yyvsp[-1].expr)); ;} + break; + + case 188: #line 713 "parser.y" - { (yyval.expr) = make_exprt(EXPR_SIZEOF, (yyvsp[-1].type), NULL); ;} - break; - - case 187: -#line 714 "parser.y" - { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[-3].expr), (yyvsp[-1].expr)); ;} - break; - - case 188: -#line 715 "parser.y" { (yyval.expr) = (yyvsp[-1].expr); ;} break; case 189: -#line 718 "parser.y" +#line 716 "parser.y" { (yyval.expr_list) = append_expr( NULL, (yyvsp[0].expr) ); ;} break; case 190: -#line 719 "parser.y" +#line 717 "parser.y" { (yyval.expr_list) = append_expr( (yyvsp[-2].expr_list), (yyvsp[0].expr) ); ;} break; case 191: -#line 722 "parser.y" +#line 720 "parser.y" { (yyval.expr) = (yyvsp[0].expr); if (!(yyval.expr)->is_const) error_loc("expression is not an integer constant\n"); @@ -3463,7 +3461,7 @@ break; case 192: -#line 728 "parser.y" +#line 726 "parser.y" { (yyval.expr) = (yyvsp[0].expr); if (!(yyval.expr)->is_const && (yyval.expr)->type != EXPR_STRLIT && (yyval.expr)->type != EXPR_WSTRLIT) error_loc("expression is not constant\n"); @@ -3471,17 +3469,17 @@ break; case 193: -#line 734 "parser.y" +#line 732 "parser.y" { (yyval.var_list) = NULL; ;} break; case 194: -#line 735 "parser.y" +#line 733 "parser.y" { (yyval.var_list) = append_var_list((yyvsp[-1].var_list), (yyvsp[0].var_list)); ;} break; case 195: -#line 739 "parser.y" +#line 737 "parser.y" { const char *first = LIST_ENTRY(list_head((yyvsp[-1].declarator_list)), declarator_t, entry)->var->name; check_field_attrs(first, (yyvsp[-3].attr_list)); (yyval.var_list) = set_var_types((yyvsp[-3].attr_list), (yyvsp[-2].declspec), (yyvsp[-1].declarator_list)); @@ -3489,7 +3487,7 @@ break; case 196: -#line 743 "parser.y" +#line 741 "parser.y" { var_t *v = make_var(NULL); v->type = (yyvsp[-1].type); v->attrs = (yyvsp[-2].attr_list); (yyval.var_list) = append_var(NULL, v); @@ -3497,37 +3495,37 @@ break; case 197: -#line 750 "parser.y" +#line 748 "parser.y" { (yyval.var) = (yyvsp[-1].var); ;} break; case 198: -#line 751 "parser.y" +#line 749 "parser.y" { (yyval.var) = make_var(NULL); (yyval.var)->attrs = (yyvsp[-1].attr_list); ;} break; case 199: -#line 754 "parser.y" +#line 752 "parser.y" { (yyval.var_list) = NULL; ;} break; case 200: -#line 755 "parser.y" +#line 753 "parser.y" { (yyval.var_list) = append_var( (yyvsp[-1].var_list), (yyvsp[0].var) ); ;} break; case 201: -#line 759 "parser.y" +#line 757 "parser.y" { (yyval.var) = (yyvsp[-1].var); ;} break; case 202: -#line 760 "parser.y" +#line 758 "parser.y" { (yyval.var) = NULL; ;} break; case 203: -#line 763 "parser.y" +#line 761 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; (yyval.var)->attrs = check_field_attrs((yyval.var)->name, (yyvsp[-2].attr_list)); set_type((yyval.var), (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); @@ -3536,7 +3534,7 @@ break; case 204: -#line 771 "parser.y" +#line 769 "parser.y" { var_t *v = (yyvsp[0].declarator)->var; v->attrs = check_function_attrs(v->name, (yyvsp[-2].attr_list)); set_type(v, (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); @@ -3546,7 +3544,7 @@ break; case 205: -#line 781 "parser.y" +#line 779 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; (yyval.var)->attrs = (yyvsp[-2].attr_list); set_type((yyval.var), (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); @@ -3555,7 +3553,7 @@ break; case 206: -#line 786 "parser.y" +#line 784 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; set_type((yyval.var), (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); free((yyvsp[0].declarator)); @@ -3563,52 +3561,52 @@ break; case 207: -#line 792 "parser.y" +#line 790 "parser.y" { (yyval.var) = NULL; ;} break; case 209: +#line 794 "parser.y" + { (yyval.var) = NULL; ;} + break; + + case 210: +#line 795 "parser.y" + { (yyval.var) = make_var((yyvsp[0].str)); ;} + break; + + case 211: #line 796 "parser.y" - { (yyval.var) = NULL; ;} - break; - - case 210: -#line 797 "parser.y" { (yyval.var) = make_var((yyvsp[0].str)); ;} break; - case 211: -#line 798 "parser.y" + case 212: +#line 799 "parser.y" { (yyval.var) = make_var((yyvsp[0].str)); ;} break; - case 212: + case 213: #line 801 "parser.y" { (yyval.var) = make_var((yyvsp[0].str)); ;} break; - case 213: -#line 803 "parser.y" - { (yyval.var) = make_var((yyvsp[0].str)); ;} - break; - case 214: -#line 806 "parser.y" +#line 804 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; case 215: +#line 805 "parser.y" + { (yyval.type) = make_builtin((yyvsp[0].str)); ;} + break; + + case 217: #line 807 "parser.y" - { (yyval.type) = make_builtin((yyvsp[0].str)); ;} - break; - - case 217: -#line 809 "parser.y" { (yyval.type) = (yyvsp[0].type); (yyval.type)->sign = 1; ;} break; case 218: -#line 810 "parser.y" +#line 808 "parser.y" { (yyval.type) = (yyvsp[0].type); (yyval.type)->sign = -1; switch ((yyval.type)->type) { case RPC_FC_CHAR: break; @@ -3628,94 +3626,91 @@ break; case 219: +#line 824 "parser.y" + { (yyval.type) = make_int(-1); ;} + break; + + case 220: +#line 825 "parser.y" + { (yyval.type) = make_builtin((yyvsp[0].str)); ;} + break; + + case 221: #line 826 "parser.y" - { (yyval.type) = make_int(-1); ;} - break; - - case 220: + { (yyval.type) = duptype(find_type("float", 0), 1); ;} + break; + + case 222: #line 827 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 221: + case 223: #line 828 "parser.y" - { (yyval.type) = duptype(find_type("float", 0), 1); ;} - break; - - case 222: + { (yyval.type) = make_builtin((yyvsp[0].str)); ;} + break; + + case 224: #line 829 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 223: + case 225: #line 830 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 224: -#line 831 "parser.y" + case 228: +#line 837 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 225: -#line 832 "parser.y" - { (yyval.type) = make_builtin((yyvsp[0].str)); ;} - break; - - case 228: + case 229: +#line 838 "parser.y" + { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} + break; + + case 230: #line 839 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 229: + case 231: #line 840 "parser.y" { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} break; - case 230: + case 232: #line 841 "parser.y" + { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} + break; + + case 233: +#line 842 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 231: -#line 842 "parser.y" - { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} - break; - - case 232: + case 234: #line 843 "parser.y" - { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} - break; - - case 233: -#line 844 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 234: -#line 845 "parser.y" - { (yyval.type) = make_builtin((yyvsp[0].str)); ;} - break; - case 235: -#line 848 "parser.y" +#line 846 "parser.y" { (yyval.type) = make_class((yyvsp[0].str)); ;} break; case 236: -#line 849 "parser.y" +#line 847 "parser.y" { (yyval.type) = find_type((yyvsp[0].str), 0); - if ((yyval.type)->kind != TKIND_COCLASS) - error_loc("%s was not declared a coclass at %s:%d\n", - (yyvsp[0].str), (yyval.type)->loc_info.input_name, - (yyval.type)->loc_info.line_number); + if ((yyval.type)->defined) error_loc("multiple definition error\n"); + if ((yyval.type)->kind != TKIND_COCLASS) error_loc("%s was not declared a coclass\n", (yyvsp[0].str)); ;} break; case 237: -#line 857 "parser.y" +#line 853 "parser.y" { (yyval.type) = (yyvsp[0].type); - check_def((yyval.type)); (yyval.type)->attrs = check_coclass_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)); if (!parse_only && do_header) write_coclass((yyval.type)); @@ -3725,7 +3720,7 @@ break; case 238: -#line 868 "parser.y" +#line 863 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->ifaces = (yyvsp[-2].ifref_list); (yyval.type)->defined = TRUE; @@ -3733,37 +3728,37 @@ break; case 239: +#line 869 "parser.y" + { (yyval.ifref_list) = NULL; ;} + break; + + case 240: +#line 870 "parser.y" + { (yyval.ifref_list) = append_ifref( (yyvsp[-1].ifref_list), (yyvsp[0].ifref) ); ;} + break; + + case 241: #line 874 "parser.y" - { (yyval.ifref_list) = NULL; ;} - break; - - case 240: -#line 875 "parser.y" - { (yyval.ifref_list) = append_ifref( (yyvsp[-1].ifref_list), (yyvsp[0].ifref) ); ;} - break; - - case 241: -#line 879 "parser.y" { (yyval.ifref) = make_ifref((yyvsp[0].type)); (yyval.ifref)->attrs = (yyvsp[-1].attr_list); ;} break; case 242: -#line 882 "parser.y" +#line 877 "parser.y" { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_DISPATCH; ;} break; case 243: -#line 883 "parser.y" +#line 878 "parser.y" { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_DISPATCH; ;} break; case 244: -#line 886 "parser.y" +#line 881 "parser.y" { attr_t *attrs; is_in_interface = TRUE; is_object_interface = TRUE; (yyval.type) = (yyvsp[0].type); - check_def((yyval.type)); + if ((yyval.type)->defined) error_loc("multiple definition error\n"); attrs = make_attr(ATTR_DISPINTERFACE); (yyval.type)->attrs = append_attr( check_dispiface_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)), attrs ); (yyval.type)->ref = find_type("IDispatch", 0); @@ -3774,27 +3769,27 @@ break; case 245: +#line 895 "parser.y" + { (yyval.var_list) = NULL; ;} + break; + + case 246: +#line 896 "parser.y" + { (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[-1].var) ); ;} + break; + + case 247: +#line 899 "parser.y" + { (yyval.func_list) = NULL; ;} + break; + + case 248: #line 900 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 246: -#line 901 "parser.y" - { (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[-1].var) ); ;} - break; - - case 247: -#line 904 "parser.y" - { (yyval.func_list) = NULL; ;} - break; - - case 248: -#line 905 "parser.y" { (yyval.func_list) = append_func( (yyvsp[-2].func_list), (yyvsp[-1].func) ); ;} break; case 249: -#line 911 "parser.y" +#line 906 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->fields_or_args = (yyvsp[-2].var_list); (yyval.type)->funcs = (yyvsp[-1].func_list); @@ -3805,7 +3800,7 @@ break; case 250: -#line 919 "parser.y" +#line 914 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->fields_or_args = (yyvsp[-2].type)->fields_or_args; (yyval.type)->funcs = (yyvsp[-2].type)->funcs; @@ -3816,34 +3811,34 @@ break; case 251: +#line 923 "parser.y" + { (yyval.type) = NULL; ;} + break; + + case 252: +#line 924 "parser.y" + { (yyval.type) = find_type2((yyvsp[0].str), 0); ;} + break; + + case 253: +#line 927 "parser.y" + { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_INTERFACE; ;} + break; + + case 254: #line 928 "parser.y" - { (yyval.type) = NULL; ;} - break; - - case 252: -#line 929 "parser.y" - { (yyval.type) = find_type2((yyvsp[0].str), 0); ;} - break; - - case 253: -#line 932 "parser.y" { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_INTERFACE; ;} break; - case 254: -#line 933 "parser.y" - { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_INTERFACE; ;} - break; - case 255: -#line 936 "parser.y" +#line 931 "parser.y" { (yyval.ifinfo).interface = (yyvsp[0].type); (yyval.ifinfo).old_pointer_default = pointer_default; if (is_attr((yyvsp[-1].attr_list), ATTR_POINTERDEFAULT)) pointer_default = get_attrv((yyvsp[-1].attr_list), ATTR_POINTERDEFAULT); is_object_interface = is_object((yyvsp[-1].attr_list)); is_in_interface = TRUE; - check_def((yyvsp[0].type)); + if ((yyvsp[0].type)->defined) error_loc("multiple definition error\n"); (yyvsp[0].type)->attrs = check_iface_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)); (yyvsp[0].type)->defined = TRUE; if (!parse_only && do_header) write_forward((yyvsp[0].type)); @@ -3851,7 +3846,7 @@ break; case 256: -#line 950 "parser.y" +#line 945 "parser.y" { (yyval.type) = (yyvsp[-5].ifinfo).interface; (yyval.type)->ref = (yyvsp[-4].type); (yyval.type)->funcs = (yyvsp[-2].func_list); @@ -3866,7 +3861,7 @@ break; case 257: -#line 965 "parser.y" +#line 960 "parser.y" { (yyval.type) = (yyvsp[-7].ifinfo).interface; (yyval.type)->ref = find_type2((yyvsp[-5].str), 0); if (!(yyval.type)->ref) error_loc("base class '%s' not found in import\n", (yyvsp[-5].str)); @@ -3881,39 +3876,39 @@ break; case 258: +#line 971 "parser.y" + { (yyval.type) = (yyvsp[-1].type); ;} + break; + + case 259: +#line 975 "parser.y" + { (yyval.type) = (yyvsp[-1].type); if (!parse_only && do_header) write_forward((yyval.type)); ;} + break; + + case 260: #line 976 "parser.y" - { (yyval.type) = (yyvsp[-1].type); ;} - break; - - case 259: + { (yyval.type) = (yyvsp[-1].type); if (!parse_only && do_header) write_forward((yyval.type)); ;} + break; + + case 261: +#line 979 "parser.y" + { (yyval.type) = make_type(0, NULL); (yyval.type)->name = (yyvsp[0].str); (yyval.type)->kind = TKIND_MODULE; ;} + break; + + case 262: #line 980 "parser.y" - { (yyval.type) = (yyvsp[-1].type); if (!parse_only && do_header) write_forward((yyval.type)); ;} - break; - - case 260: -#line 981 "parser.y" - { (yyval.type) = (yyvsp[-1].type); if (!parse_only && do_header) write_forward((yyval.type)); ;} - break; - - case 261: -#line 984 "parser.y" { (yyval.type) = make_type(0, NULL); (yyval.type)->name = (yyvsp[0].str); (yyval.type)->kind = TKIND_MODULE; ;} break; - case 262: -#line 985 "parser.y" - { (yyval.type) = make_type(0, NULL); (yyval.type)->name = (yyvsp[0].str); (yyval.type)->kind = TKIND_MODULE; ;} - break; - case 263: -#line 988 "parser.y" +#line 983 "parser.y" { (yyval.type) = (yyvsp[0].type); (yyval.type)->attrs = check_module_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)); ;} break; case 264: -#line 994 "parser.y" +#line 989 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->funcs = (yyvsp[-2].func_list); /* FIXME: if (!parse_only && do_header) write_module($$); */ @@ -3921,97 +3916,97 @@ break; case 265: -#line 1001 "parser.y" +#line 996 "parser.y" { (yyval.stgclass) = STG_EXTERN; ;} break; case 266: +#line 997 "parser.y" + { (yyval.stgclass) = STG_STATIC; ;} + break; + + case 267: +#line 998 "parser.y" + { (yyval.stgclass) = STG_REGISTER; ;} + break; + + case 268: #line 1002 "parser.y" - { (yyval.stgclass) = STG_STATIC; ;} - break; - - case 267: -#line 1003 "parser.y" - { (yyval.stgclass) = STG_REGISTER; ;} - break; - - case 268: -#line 1007 "parser.y" { (yyval.attr) = make_attr(ATTR_INLINE); ;} break; case 269: -#line 1011 "parser.y" +#line 1006 "parser.y" { (yyval.attr) = make_attr(ATTR_CONST); ;} break; case 270: -#line 1014 "parser.y" +#line 1009 "parser.y" { (yyval.attr_list) = NULL; ;} break; case 271: +#line 1010 "parser.y" + { (yyval.attr_list) = append_attr((yyvsp[-1].attr_list), (yyvsp[0].attr)); ;} + break; + + case 272: +#line 1013 "parser.y" + { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[0].declspec), NULL, NULL, STG_NONE); ;} + break; + + case 273: #line 1015 "parser.y" - { (yyval.attr_list) = append_attr((yyvsp[-1].attr_list), (yyvsp[0].attr)); ;} - break; - - case 272: + { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[-2].declspec), (yyvsp[0].declspec), NULL, STG_NONE); ;} + break; + + case 274: #line 1018 "parser.y" - { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[0].declspec), NULL, NULL, STG_NONE); ;} - break; - - case 273: -#line 1020 "parser.y" - { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[-2].declspec), (yyvsp[0].declspec), NULL, STG_NONE); ;} - break; - - case 274: + { (yyval.declspec) = NULL; ;} + break; + + case 276: #line 1023 "parser.y" - { (yyval.declspec) = NULL; ;} - break; - - case 276: -#line 1028 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, (yyvsp[-1].attr), STG_NONE); ;} break; case 277: -#line 1029 "parser.y" +#line 1024 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, (yyvsp[-1].attr), STG_NONE); ;} break; case 278: +#line 1025 "parser.y" + { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, NULL, (yyvsp[-1].stgclass)); ;} + break; + + case 279: #line 1030 "parser.y" - { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, NULL, (yyvsp[-1].stgclass)); ;} - break; - - case 279: -#line 1035 "parser.y" { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, make_pointer_type(NULL, (yyvsp[-1].attr_list))); ;} break; case 280: +#line 1031 "parser.y" + { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); ;} + break; + + case 282: #line 1036 "parser.y" - { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); ;} - break; - - case 282: -#line 1041 "parser.y" { (yyval.declarator) = make_declarator((yyvsp[0].var)); ;} break; case 283: -#line 1042 "parser.y" +#line 1037 "parser.y" { (yyval.declarator) = (yyvsp[-1].declarator); ;} break; case 284: -#line 1043 "parser.y" +#line 1038 "parser.y" { (yyval.declarator) = (yyvsp[-1].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[0].expr)); ;} break; case 285: -#line 1044 "parser.y" +#line 1039 "parser.y" { (yyval.declarator) = (yyvsp[-3].declarator); (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, make_func_type((yyvsp[-1].var_list))); (yyval.declarator)->type = NULL; @@ -4019,45 +4014,44 @@ break; case 286: +#line 1046 "parser.y" + { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[0].declarator) ); ;} + break; + + case 287: +#line 1047 "parser.y" + { (yyval.declarator_list) = append_declarator( (yyvsp[-2].declarator_list), (yyvsp[0].declarator) ); ;} + break; + + case 288: #line 1051 "parser.y" - { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[0].declarator) ); ;} - break; - - case 287: + { (yyval.declarator) = (yyvsp[0].declarator); ;} + break; + + case 289: #line 1052 "parser.y" - { (yyval.declarator_list) = append_declarator( (yyvsp[-2].declarator_list), (yyvsp[0].declarator) ); ;} - break; - - case 288: + { (yyval.declarator) = (yyvsp[-2].declarator); (yyvsp[-2].declarator)->var->eval = (yyvsp[0].expr); ;} + break; + + case 290: #line 1056 "parser.y" - { (yyval.declarator) = (yyvsp[0].declarator); ;} - break; - - case 289: + { (yyval.num) = RPC_FC_RP; ;} + break; + + case 291: #line 1057 "parser.y" - { (yyval.declarator) = (yyvsp[-2].declarator); (yyvsp[-2].declarator)->var->eval = (yyvsp[0].expr); ;} - break; - - case 290: + { (yyval.num) = RPC_FC_UP; ;} + break; + + case 292: +#line 1058 "parser.y" + { (yyval.num) = RPC_FC_FP; ;} + break; + + case 293: #line 1061 "parser.y" - { (yyval.num) = RPC_FC_RP; ;} - break; - - case 291: -#line 1062 "parser.y" - { (yyval.num) = RPC_FC_UP; ;} - break; - - case 292: -#line 1063 "parser.y" - { (yyval.num) = RPC_FC_FP; ;} - break; - - case 293: -#line 1066 "parser.y" { (yyval.type) = get_typev(RPC_FC_STRUCT, (yyvsp[-3].var), tsSTRUCT); /* overwrite RPC_FC_STRUCT with a more exact type */ - check_def((yyval.type)); (yyval.type)->type = get_struct_type( (yyvsp[-1].var_list) ); (yyval.type)->kind = TKIND_RECORD; (yyval.type)->fields_or_args = (yyvsp[-1].var_list); @@ -4068,66 +4062,65 @@ break; case 294: +#line 1072 "parser.y" + { (yyval.type) = duptype(find_type("void", 0), 1); ;} + break; + + case 295: +#line 1073 "parser.y" + { (yyval.type) = find_type((yyvsp[0].str), 0); ;} + break; + + case 296: +#line 1074 "parser.y" + { (yyval.type) = (yyvsp[0].type); ;} + break; + + case 297: +#line 1075 "parser.y" + { (yyval.type) = (yyvsp[0].type); ;} + break; + + case 298: +#line 1076 "parser.y" + { (yyval.type) = find_type2((yyvsp[0].str), tsENUM); ;} + break; + + case 299: +#line 1077 "parser.y" + { (yyval.type) = (yyvsp[0].type); ;} + break; + + case 300: #line 1078 "parser.y" - { (yyval.type) = duptype(find_type("void", 0), 1); ;} - break; - - case 295: + { (yyval.type) = get_type(RPC_FC_STRUCT, (yyvsp[0].str), tsSTRUCT); ;} + break; + + case 301: #line 1079 "parser.y" - { (yyval.type) = find_type((yyvsp[0].str), 0); ;} - break; - - case 296: + { (yyval.type) = (yyvsp[0].type); ;} + break; + + case 302: #line 1080 "parser.y" - { (yyval.type) = (yyvsp[0].type); ;} - break; - - case 297: + { (yyval.type) = find_type2((yyvsp[0].str), tsUNION); ;} + break; + + case 303: #line 1081 "parser.y" - { (yyval.type) = (yyvsp[0].type); ;} - break; - - case 298: -#line 1082 "parser.y" - { (yyval.type) = find_type2((yyvsp[0].str), tsENUM); ;} - break; - - case 299: -#line 1083 "parser.y" - { (yyval.type) = (yyvsp[0].type); ;} - break; - - case 300: -#line 1084 "parser.y" - { (yyval.type) = get_type(RPC_FC_STRUCT, (yyvsp[0].str), tsSTRUCT); ;} - break; - - case 301: + { (yyval.type) = make_safearray((yyvsp[-1].type)); ;} + break; + + case 304: #line 1085 "parser.y" - { (yyval.type) = (yyvsp[0].type); ;} - break; - - case 302: -#line 1086 "parser.y" - { (yyval.type) = find_type2((yyvsp[0].str), tsUNION); ;} - break; - - case 303: -#line 1087 "parser.y" - { (yyval.type) = make_safearray((yyvsp[-1].type)); ;} - break; - - case 304: -#line 1091 "parser.y" { reg_typedefs((yyvsp[-1].declspec), (yyvsp[0].declarator_list), check_typedef_attrs((yyvsp[-2].attr_list))); (yyval.statement) = process_typedefs((yyvsp[0].declarator_list)); ;} break; case 305: -#line 1097 "parser.y" +#line 1091 "parser.y" { (yyval.type) = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, (yyvsp[-3].var), tsUNION); - check_def((yyval.type)); (yyval.type)->kind = TKIND_UNION; (yyval.type)->fields_or_args = (yyvsp[-1].var_list); (yyval.type)->defined = TRUE; @@ -4135,10 +4128,9 @@ break; case 306: -#line 1105 "parser.y" +#line 1098 "parser.y" { var_t *u = (yyvsp[-3].var); (yyval.type) = get_typev(RPC_FC_ENCAPSULATED_UNION, (yyvsp[-8].var), tsUNION); - check_def((yyval.type)); (yyval.type)->kind = TKIND_UNION; if (!u) u = make_var( xstrdup("tagged_union") ); u->type = make_type(RPC_FC_NON_ENCAPSULATED_UNION, NULL); @@ -4152,12 +4144,12 @@ break; case 307: -#line 1121 "parser.y" +#line 1113 "parser.y" { (yyval.num) = MAKEVERSION((yyvsp[0].num), 0); ;} break; case 308: -#line 1122 "parser.y" +#line 1114 "parser.y" { (yyval.num) = MAKEVERSION((yyvsp[-2].num), (yyvsp[0].num)); ;} break; @@ -4166,7 +4158,7 @@ } /* Line 1126 of yacc.c. */ -#line 4170 "parser.tab.c" +#line 4162 "parser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -4434,7 +4426,7 @@ } -#line 1125 "parser.y" +#line 1117 "parser.y" static void decl_builtin(const char *name, unsigned char type) @@ -4711,7 +4703,6 @@ t->tfswrite = FALSE; t->checked = FALSE; t->typelib_idx = -1; - init_loc_info(&t->loc_info); return t; } @@ -5023,7 +5014,9 @@ v->attrs = NULL; v->eval = NULL; v->stgclass = STG_NONE; - init_loc_info(&v->loc_info); + v->loc_info.input_name = input_name ? input_name : "stdin"; + v->loc_info.line_number = line_number; + v->loc_info.near_text = parser_text; return v; } @@ -5213,12 +5206,6 @@ if (name->name) { type_t *cur; - - cur = find_type_helper(name->name, 0); - if (cur) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - cur->name, cur->loc_info.input_name, - cur->loc_info.line_number); /* set the attributes to allow set_type to do some checks on them */ name->attrs = attrs; @@ -6223,17 +6210,3 @@ return list; } -void init_loc_info(loc_info_t *i) -{ - i->input_name = input_name ? input_name : "stdin"; - i->line_number = line_number; - i->near_text = parser_text; -} - -static void check_def(const type_t *t) -{ - if (t->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - t->name, t->loc_info.input_name, t->loc_info.line_number); -} - Modified: trunk/reactos/tools/widl/parser.tab.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.tab.h?re…
============================================================================== --- trunk/reactos/tools/widl/parser.tab.h [iso-8859-1] (original) +++ trunk/reactos/tools/widl/parser.tab.h [iso-8859-1] Wed Nov 19 17:22:44 2008 @@ -335,7 +335,7 @@ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 179 "parser.y" +#line 177 "parser.y" typedef union YYSTYPE { attr_t *attr; attr_list_t *attr_list; Modified: trunk/reactos/tools/widl/parser.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.y?rev=37…
============================================================================== --- trunk/reactos/tools/widl/parser.y [iso-8859-1] (original) +++ trunk/reactos/tools/widl/parser.y [iso-8859-1] Wed Nov 19 17:22:44 2008 @@ -156,8 +156,6 @@ static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); const char *get_attr_display_name(enum attr_type type); static void add_explicit_handle_if_necessary(func_t *func); -static type_t *find_type_helper(const char *name, int t); -static void check_def(const type_t *t); static statement_t *make_statement(enum statement_type type); static statement_t *make_statement_type_decl(type_t *type); @@ -847,15 +845,12 @@ coclass: tCOCLASS aIDENTIFIER { $$ = make_class($2); } | tCOCLASS aKNOWNTYPE { $$ = find_type($2, 0); - if ($$->kind != TKIND_COCLASS) - error_loc("%s was not declared a coclass at %s:%d\n", - $2, $$->loc_info.input_name, - $$->loc_info.line_number); + if ($$->defined) error_loc("multiple definition error\n"); + if ($$->kind != TKIND_COCLASS) error_loc("%s was not declared a coclass\n", $2); } ; coclasshdr: attributes coclass { $$ = $2; - check_def($$); $$->attrs = check_coclass_attrs($2->name, $1); if (!parse_only && do_header) write_coclass($$); @@ -887,7 +882,7 @@ is_in_interface = TRUE; is_object_interface = TRUE; $$ = $2; - check_def($$); + if ($$->defined) error_loc("multiple definition error\n"); attrs = make_attr(ATTR_DISPINTERFACE); $$->attrs = append_attr( check_dispiface_attrs($2->name, $1), attrs ); $$->ref = find_type("IDispatch", 0); @@ -939,7 +934,7 @@ pointer_default = get_attrv($1, ATTR_POINTERDEFAULT); is_object_interface = is_object($1); is_in_interface = TRUE; - check_def($2); + if ($2->defined) error_loc("multiple definition error\n"); $2->attrs = check_iface_attrs($2->name, $1); $2->defined = TRUE; if (!parse_only && do_header) write_forward($2); @@ -1065,7 +1060,6 @@ structdef: tSTRUCT t_ident '{' fields '}' { $$ = get_typev(RPC_FC_STRUCT, $2, tsSTRUCT); /* overwrite RPC_FC_STRUCT with a more exact type */ - check_def($$); $$->type = get_struct_type( $4 ); $$->kind = TKIND_RECORD; $$->fields_or_args = $4; @@ -1095,7 +1089,6 @@ uniondef: tUNION t_ident '{' ne_union_fields '}' { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); - check_def($$); $$->kind = TKIND_UNION; $$->fields_or_args = $4; $$->defined = TRUE; @@ -1104,7 +1097,6 @@ tSWITCH '(' s_field ')' m_ident '{' cases '}' { var_t *u = $7; $$ = get_typev(RPC_FC_ENCAPSULATED_UNION, $2, tsUNION); - check_def($$); $$->kind = TKIND_UNION; if (!u) u = make_var( xstrdup("tagged_union") ); u->type = make_type(RPC_FC_NON_ENCAPSULATED_UNION, NULL); @@ -1398,7 +1390,6 @@ t->tfswrite = FALSE; t->checked = FALSE; t->typelib_idx = -1; - init_loc_info(&t->loc_info); return t; } @@ -1710,7 +1701,9 @@ v->attrs = NULL; v->eval = NULL; v->stgclass = STG_NONE; - init_loc_info(&v->loc_info); + v->loc_info.input_name = input_name ? input_name : "stdin"; + v->loc_info.line_number = line_number; + v->loc_info.near_text = parser_text; return v; } @@ -1900,12 +1893,6 @@ if (name->name) { type_t *cur; - - cur = find_type_helper(name->name, 0); - if (cur) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - cur->name, cur->loc_info.input_name, - cur->loc_info.line_number); /* set the attributes to allow set_type to do some checks on them */ name->attrs = attrs; @@ -2909,17 +2896,3 @@ } return list; } - -void init_loc_info(loc_info_t *i) -{ - i->input_name = input_name ? input_name : "stdin"; - i->line_number = line_number; - i->near_text = parser_text; -} - -static void check_def(const type_t *t) -{ - if (t->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - t->name, t->loc_info.input_name, t->loc_info.line_number); -} Modified: trunk/reactos/tools/widl/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/typelib.c?rev=3…
============================================================================== --- trunk/reactos/tools/widl/typelib.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/typelib.c [iso-8859-1] Wed Nov 19 17:22:44 2008 @@ -69,7 +69,6 @@ a->kind = TKIND_ALIAS; a->attrs = NULL; a->declarray = FALSE; - init_loc_info(&a->loc_info); return a; } Modified: trunk/reactos/tools/widl/widltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widltypes.h?rev…
============================================================================== --- trunk/reactos/tools/widl/widltypes.h [iso-8859-1] (original) +++ trunk/reactos/tools/widl/widltypes.h [iso-8859-1] Wed Nov 19 17:22:44 2008 @@ -283,7 +283,6 @@ unsigned int typestring_offset; unsigned int ptrdesc; /* used for complex structs */ int typelib_idx; - loc_info_t loc_info; unsigned int declarray : 1; /* if declared as an array */ unsigned int ignore : 1; unsigned int defined : 1; @@ -420,8 +419,6 @@ type_t *find_type(const char *name, int t); type_t *make_type(unsigned char type, type_t *ref); -void init_loc_info(loc_info_t *); - static inline type_t *get_func_return_type(const func_t *func) { return func->def->type->ref;
16 years, 1 month
1
0
0
0
[ekohl] 37476: Sync to wine-1.1.1 (Patch 4 of 10): ATTENTION: You MUST run "clean" before building ReactOS, otherwise WIDL will crash when it is run. - Dan Hipschman <dsh@linux.ucla.edu> Tue, 1 Jul 2008 widl: Implement type redefinition checks. This allows widl to catch type redefinitions and report an error, like MIDL. However, this does a better job than MIDL since it also reports the location of the originial definition, like GCC.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Nov 19 17:13:05 2008 New Revision: 37476 URL:
http://svn.reactos.org/svn/reactos?rev=37476&view=rev
Log: Sync to wine-1.1.1 (Patch 4 of 10): ATTENTION: You MUST run "clean" before building ReactOS, otherwise WIDL will crash when it is run. - Dan Hipschman <dsh(a)linux.ucla.edu> Tue, 1 Jul 2008 widl: Implement type redefinition checks. This allows widl to catch type redefinitions and report an error, like MIDL. However, this does a better job than MIDL since it also reports the location of the originial definition, like GCC. Modified: trunk/reactos/tools/widl/parser.tab.c trunk/reactos/tools/widl/parser.tab.h trunk/reactos/tools/widl/parser.y trunk/reactos/tools/widl/typelib.c trunk/reactos/tools/widl/widltypes.h Modified: trunk/reactos/tools/widl/parser.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.tab.c?re…
============================================================================== --- trunk/reactos/tools/widl/parser.tab.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/parser.tab.c [iso-8859-1] Wed Nov 19 17:13:05 2008 @@ -529,6 +529,8 @@ static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); const char *get_attr_display_name(enum attr_type type); static void add_explicit_handle_if_necessary(func_t *func); +static type_t *find_type_helper(const char *name, int t); +static void check_def(const type_t *t); static statement_t *make_statement(enum statement_type type); static statement_t *make_statement_type_decl(type_t *type); @@ -567,7 +569,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 177 "parser.y" +#line 179 "parser.y" typedef union YYSTYPE { attr_t *attr; attr_list_t *attr_list; @@ -597,7 +599,7 @@ enum storage_class stgclass; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 601 "parser.tab.c" +#line 603 "parser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -609,7 +611,7 @@ /* Line 219 of yacc.c. */ -#line 613 "parser.tab.c" +#line 615 "parser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -964,37 +966,37 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 349, 349, 358, 359, 360, 361, 365, 370, 373, - 374, 377, 378, 379, 380, 381, 386, 387, 388, 389, - 392, 393, 396, 397, 401, 402, 408, 411, 412, 418, - 419, 427, 429, 437, 444, 448, 450, 457, 465, 466, - 469, 472, 473, 474, 478, 485, 493, 494, 497, 498, - 502, 508, 509, 510, 513, 514, 517, 518, 519, 520, - 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, - 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, - 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, - 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, - 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, - 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, - 584, 585, 586, 587, 588, 589, 590, 594, 595, 600, - 601, 602, 603, 606, 607, 610, 614, 620, 621, 622, - 625, 629, 638, 642, 647, 656, 657, 670, 671, 674, - 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, - 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, - 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, - 705, 706, 707, 708, 709, 710, 711, 712, 713, 716, - 717, 720, 726, 732, 733, 736, 741, 748, 749, 752, - 753, 757, 758, 761, 769, 778, 784, 790, 791, 794, - 795, 796, 799, 801, 804, 805, 806, 807, 808, 824, - 825, 826, 827, 828, 829, 830, 833, 834, 837, 838, - 839, 840, 841, 842, 843, 846, 847, 853, 862, 869, - 870, 874, 877, 878, 881, 895, 896, 899, 900, 903, - 913, 923, 924, 927, 928, 931, 944, 958, 971, 975, - 976, 979, 980, 983, 988, 996, 997, 998, 1002, 1006, - 1009, 1010, 1013, 1014, 1018, 1019, 1023, 1024, 1025, 1029, - 1031, 1032, 1036, 1037, 1038, 1039, 1046, 1047, 1051, 1052, - 1056, 1057, 1058, 1061, 1072, 1073, 1074, 1075, 1076, 1077, - 1078, 1079, 1080, 1081, 1084, 1090, 1096, 1113, 1114 + 0, 351, 351, 360, 361, 362, 363, 367, 372, 375, + 376, 379, 380, 381, 382, 383, 388, 389, 390, 391, + 394, 395, 398, 399, 403, 404, 410, 413, 414, 420, + 421, 429, 431, 439, 446, 450, 452, 459, 467, 468, + 471, 474, 475, 476, 480, 487, 495, 496, 499, 500, + 504, 510, 511, 512, 515, 516, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, + 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, + 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, + 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, + 586, 587, 588, 589, 590, 591, 592, 596, 597, 602, + 603, 604, 605, 608, 609, 612, 616, 622, 623, 624, + 627, 631, 640, 644, 649, 658, 659, 672, 673, 676, + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, + 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, + 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, + 707, 708, 709, 710, 711, 712, 713, 714, 715, 718, + 719, 722, 728, 734, 735, 738, 743, 750, 751, 754, + 755, 759, 760, 763, 771, 780, 786, 792, 793, 796, + 797, 798, 801, 803, 806, 807, 808, 809, 810, 826, + 827, 828, 829, 830, 831, 832, 835, 836, 839, 840, + 841, 842, 843, 844, 845, 848, 849, 857, 867, 874, + 875, 879, 882, 883, 886, 900, 901, 904, 905, 908, + 918, 928, 929, 932, 933, 936, 949, 963, 976, 980, + 981, 984, 985, 988, 993, 1001, 1002, 1003, 1007, 1011, + 1014, 1015, 1018, 1019, 1023, 1024, 1028, 1029, 1030, 1034, + 1036, 1037, 1041, 1042, 1043, 1044, 1051, 1052, 1056, 1057, + 1061, 1062, 1063, 1066, 1078, 1079, 1080, 1081, 1082, 1083, + 1084, 1085, 1086, 1087, 1090, 1096, 1103, 1121, 1122 }; #endif @@ -2450,7 +2452,7 @@ switch (yyn) { case 2: -#line 349 "parser.y" +#line 351 "parser.y" { fix_incomplete(); check_all_user_types((yyvsp[0].stmt_list)); write_proxies((yyvsp[0].stmt_list)); @@ -2461,22 +2463,22 @@ break; case 3: -#line 358 "parser.y" +#line 360 "parser.y" { (yyval.stmt_list) = NULL; ;} break; case 4: -#line 359 "parser.y" +#line 361 "parser.y" { (yyval.stmt_list) = (yyvsp[-1].stmt_list); ;} break; case 5: -#line 360 "parser.y" +#line 362 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); ;} break; case 6: -#line 361 "parser.y" +#line 363 "parser.y" { (yyval.stmt_list) = (yyvsp[-2].stmt_list); reg_type((yyvsp[-1].type), (yyvsp[-1].type)->name, 0); if (!parse_only && do_header) write_coclass_forward((yyvsp[-1].type)); @@ -2484,7 +2486,7 @@ break; case 7: -#line 365 "parser.y" +#line 367 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); add_typelib_entry((yyvsp[0].type)); reg_type((yyvsp[0].type), (yyvsp[0].type)->name, 0); @@ -2493,44 +2495,44 @@ break; case 8: -#line 370 "parser.y" +#line 372 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_module((yyvsp[0].type))); add_typelib_entry((yyvsp[0].type)); ;} break; case 9: -#line 373 "parser.y" +#line 375 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_library((yyvsp[0].typelib))); ;} break; case 10: -#line 374 "parser.y" +#line 376 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); ;} break; case 11: -#line 377 "parser.y" +#line 379 "parser.y" { (yyval.stmt_list) = NULL; ;} break; case 12: -#line 378 "parser.y" +#line 380 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_reference((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} break; case 13: -#line 379 "parser.y" +#line 381 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} break; case 14: -#line 380 "parser.y" +#line 382 "parser.y" { (yyval.stmt_list) = (yyvsp[-2].stmt_list); reg_type((yyvsp[-1].type), (yyvsp[-1].type)->name, 0); if (!parse_only && do_header) write_coclass_forward((yyvsp[-1].type)); ;} break; case 15: -#line 381 "parser.y" +#line 383 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); reg_type((yyvsp[0].type), (yyvsp[0].type)->name, 0); @@ -2539,42 +2541,42 @@ break; case 16: -#line 386 "parser.y" +#line 388 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_module((yyvsp[0].type))); if (!parse_only) add_typelib_entry((yyvsp[0].type)); ;} break; case 17: -#line 387 "parser.y" +#line 389 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); ;} break; case 18: -#line 388 "parser.y" +#line 390 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_importlib((yyvsp[0].str))); ;} break; case 19: -#line 389 "parser.y" +#line 391 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_library((yyvsp[0].typelib))); ;} break; case 20: -#line 392 "parser.y" +#line 394 "parser.y" { (yyval.func_list) = NULL; ;} break; case 21: -#line 393 "parser.y" +#line 395 "parser.y" { (yyval.func_list) = append_func_from_statement( (yyvsp[-1].func_list), (yyvsp[0].statement) ); ;} break; case 24: -#line 401 "parser.y" +#line 403 "parser.y" { (yyval.statement) = make_statement_cppquote((yyvsp[0].str)); ;} break; case 25: -#line 402 "parser.y" +#line 404 "parser.y" { (yyval.statement) = make_statement_type_decl((yyvsp[-1].type)); if (!parse_only && do_header) { write_type_def_or_decl(header, (yyvsp[-1].type), FALSE, NULL); @@ -2584,19 +2586,19 @@ break; case 26: -#line 408 "parser.y" +#line 410 "parser.y" { (yyval.statement) = make_statement_declaration((yyvsp[-1].var)); if (!parse_only && do_header) write_declaration((yyvsp[-1].var), is_in_interface); ;} break; case 27: -#line 411 "parser.y" +#line 413 "parser.y" { (yyval.statement) = make_statement_import((yyvsp[0].str)); ;} break; case 28: -#line 412 "parser.y" +#line 414 "parser.y" { (yyval.statement) = make_statement_type_decl((yyvsp[-1].type)); if (!parse_only && do_header) { write_type_def_or_decl(header, (yyvsp[-1].type), FALSE, NULL); @@ -2606,12 +2608,12 @@ break; case 29: -#line 418 "parser.y" +#line 420 "parser.y" { (yyval.statement) = (yyvsp[-1].statement); ;} break; case 30: -#line 419 "parser.y" +#line 421 "parser.y" { (yyval.statement) = make_statement_type_decl((yyvsp[-1].type)); if (!parse_only && do_header) { write_type_def_or_decl(header, (yyvsp[-1].type), FALSE, NULL); @@ -2621,12 +2623,12 @@ break; case 31: -#line 427 "parser.y" +#line 429 "parser.y" { (yyval.str) = (yyvsp[-1].str); if (!parse_only && do_header) fprintf(header, "%s\n", (yyvsp[-1].str)); ;} break; case 32: -#line 429 "parser.y" +#line 431 "parser.y" { assert(yychar == YYEMPTY); (yyval.import) = xmalloc(sizeof(struct _import_t)); (yyval.import)->name = (yyvsp[-1].str); @@ -2636,7 +2638,7 @@ break; case 33: -#line 437 "parser.y" +#line 439 "parser.y" { (yyval.str) = (yyvsp[-2].import)->name; if ((yyvsp[-2].import)->import_performed) pop_import(); free((yyvsp[-2].import)); @@ -2645,17 +2647,17 @@ break; case 34: -#line 445 "parser.y" +#line 447 "parser.y" { (yyval.str) = (yyvsp[-2].str); if(!parse_only) add_importlib((yyvsp[-2].str)); ;} break; case 35: -#line 448 "parser.y" +#line 450 "parser.y" { (yyval.str) = (yyvsp[0].str); ;} break; case 36: -#line 450 "parser.y" +#line 452 "parser.y" { (yyval.typelib) = make_library((yyvsp[-1].str), check_library_attrs((yyvsp[-1].str), (yyvsp[-2].attr_list))); if (!parse_only) start_typelib((yyval.typelib)); if (!parse_only && do_header) write_library((yyval.typelib)); @@ -2665,7 +2667,7 @@ break; case 37: -#line 458 "parser.y" +#line 460 "parser.y" { (yyval.typelib) = (yyvsp[-3].typelib); (yyval.typelib)->stmts = (yyvsp[-2].stmt_list); if (!parse_only) end_typelib(); @@ -2674,27 +2676,27 @@ break; case 38: -#line 465 "parser.y" +#line 467 "parser.y" { (yyval.var_list) = NULL; ;} break; case 40: -#line 469 "parser.y" +#line 471 "parser.y" { (yyval.var_list) = NULL; ;} break; case 41: -#line 472 "parser.y" +#line 474 "parser.y" { check_arg((yyvsp[0].var)); (yyval.var_list) = append_var( NULL, (yyvsp[0].var) ); ;} break; case 42: -#line 473 "parser.y" +#line 475 "parser.y" { check_arg((yyvsp[0].var)); (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[0].var)); ;} break; case 44: -#line 478 "parser.y" +#line 480 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; (yyval.var)->attrs = (yyvsp[-2].attr_list); if ((yyvsp[-1].declspec)->stgclass != STG_NONE && (yyvsp[-1].declspec)->stgclass != STG_REGISTER) @@ -2705,7 +2707,7 @@ break; case 45: -#line 485 "parser.y" +#line 487 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; if ((yyvsp[-1].declspec)->stgclass != STG_NONE && (yyvsp[-1].declspec)->stgclass != STG_REGISTER) error_loc("invalid storage class for function parameter\n"); @@ -2715,22 +2717,22 @@ break; case 46: -#line 493 "parser.y" +#line 495 "parser.y" { (yyval.expr) = (yyvsp[-1].expr); ;} break; case 47: -#line 494 "parser.y" +#line 496 "parser.y" { (yyval.expr) = make_expr(EXPR_VOID); ;} break; case 48: -#line 497 "parser.y" +#line 499 "parser.y" { (yyval.attr_list) = NULL; ;} break; case 50: -#line 502 "parser.y" +#line 504 "parser.y" { (yyval.attr_list) = (yyvsp[-1].attr_list); if (!(yyval.attr_list)) error_loc("empty attribute lists unsupported\n"); @@ -2738,426 +2740,426 @@ break; case 51: -#line 508 "parser.y" +#line 510 "parser.y" { (yyval.attr_list) = append_attr( NULL, (yyvsp[0].attr) ); ;} break; case 52: -#line 509 "parser.y" +#line 511 "parser.y" { (yyval.attr_list) = append_attr( (yyvsp[-2].attr_list), (yyvsp[0].attr) ); ;} break; case 53: -#line 510 "parser.y" +#line 512 "parser.y" { (yyval.attr_list) = append_attr( (yyvsp[-3].attr_list), (yyvsp[0].attr) ); ;} break; case 54: -#line 513 "parser.y" +#line 515 "parser.y" { (yyval.str_list) = append_str( NULL, (yyvsp[0].str) ); ;} break; case 55: -#line 514 "parser.y" +#line 516 "parser.y" { (yyval.str_list) = append_str( (yyvsp[-2].str_list), (yyvsp[0].str) ); ;} break; case 56: -#line 517 "parser.y" +#line 519 "parser.y" { (yyval.attr) = NULL; ;} break; case 57: -#line 518 "parser.y" +#line 520 "parser.y" { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); ;} break; case 58: -#line 519 "parser.y" +#line 521 "parser.y" { (yyval.attr) = make_attr(ATTR_APPOBJECT); ;} break; case 59: -#line 520 "parser.y" +#line 522 "parser.y" { (yyval.attr) = make_attr(ATTR_ASYNC); ;} break; case 60: -#line 521 "parser.y" +#line 523 "parser.y" { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); ;} break; case 61: -#line 522 "parser.y" +#line 524 "parser.y" { (yyval.attr) = make_attr(ATTR_BINDABLE); ;} break; case 62: -#line 523 "parser.y" +#line 525 "parser.y" { (yyval.attr) = make_attr(ATTR_BROADCAST); ;} break; case 63: -#line 524 "parser.y" +#line 526 "parser.y" { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[-1].var)); ;} break; case 64: -#line 525 "parser.y" +#line 527 "parser.y" { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[-1].expr_list)); ;} break; case 65: -#line 526 "parser.y" +#line 528 "parser.y" { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); ;} break; case 66: -#line 527 "parser.y" +#line 529 "parser.y" { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ ;} break; case 67: -#line 528 "parser.y" +#line 530 "parser.y" { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ ;} break; case 68: -#line 529 "parser.y" +#line 531 "parser.y" { (yyval.attr) = make_attr(ATTR_CONTROL); ;} break; case 69: -#line 530 "parser.y" +#line 532 "parser.y" { (yyval.attr) = make_attr(ATTR_DEFAULT); ;} break; case 70: -#line 531 "parser.y" +#line 533 "parser.y" { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); ;} break; case 71: -#line 532 "parser.y" +#line 534 "parser.y" { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[-1].expr)); ;} break; case 72: -#line 533 "parser.y" +#line 535 "parser.y" { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); ;} break; case 73: -#line 534 "parser.y" +#line 536 "parser.y" { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); ;} break; case 74: -#line 535 "parser.y" +#line 537 "parser.y" { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[-1].str)); ;} break; case 75: -#line 536 "parser.y" +#line 538 "parser.y" { (yyval.attr) = make_attr(ATTR_DUAL); ;} break; case 76: -#line 537 "parser.y" +#line 539 "parser.y" { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[-1].str_list)); ;} break; case 77: -#line 538 "parser.y" +#line 540 "parser.y" { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[-1].expr)); ;} break; case 78: -#line 539 "parser.y" +#line 541 "parser.y" { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); ;} break; case 79: -#line 540 "parser.y" +#line 542 "parser.y" { (yyval.attr) = make_attr(ATTR_HANDLE); ;} break; case 80: -#line 541 "parser.y" +#line 543 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[-1].expr)); ;} break; case 81: -#line 542 "parser.y" +#line 544 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[-1].str)); ;} break; case 82: -#line 543 "parser.y" +#line 545 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[-1].str)); ;} break; case 83: -#line 544 "parser.y" +#line 546 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[-1].expr)); ;} break; case 84: -#line 545 "parser.y" +#line 547 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[-1].str)); ;} break; case 85: -#line 546 "parser.y" +#line 548 "parser.y" { (yyval.attr) = make_attr(ATTR_HIDDEN); ;} break; case 86: -#line 547 "parser.y" +#line 549 "parser.y" { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[-1].expr)); ;} break; case 87: -#line 548 "parser.y" +#line 550 "parser.y" { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); ;} break; case 88: -#line 549 "parser.y" +#line 551 "parser.y" { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[-1].expr)); ;} break; case 89: -#line 550 "parser.y" +#line 552 "parser.y" { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); ;} break; case 90: -#line 551 "parser.y" +#line 553 "parser.y" { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[-1].str)); ;} break; case 91: -#line 552 "parser.y" +#line 554 "parser.y" { (yyval.attr) = make_attr(ATTR_IN); ;} break; case 92: -#line 553 "parser.y" +#line 555 "parser.y" { (yyval.attr) = make_attr(ATTR_INPUTSYNC); ;} break; case 93: -#line 554 "parser.y" +#line 556 "parser.y" { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[-1].expr_list)); ;} break; case 94: -#line 555 "parser.y" +#line 557 "parser.y" { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[-1].expr)); ;} break; case 95: -#line 556 "parser.y" +#line 558 "parser.y" { (yyval.attr) = make_attr(ATTR_LOCAL); ;} break; case 96: -#line 557 "parser.y" +#line 559 "parser.y" { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); ;} break; case 97: -#line 558 "parser.y" +#line 560 "parser.y" { (yyval.attr) = make_attr(ATTR_NONCREATABLE); ;} break; case 98: -#line 559 "parser.y" +#line 561 "parser.y" { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); ;} break; case 99: -#line 560 "parser.y" +#line 562 "parser.y" { (yyval.attr) = make_attr(ATTR_OBJECT); ;} break; case 100: -#line 561 "parser.y" +#line 563 "parser.y" { (yyval.attr) = make_attr(ATTR_ODL); ;} break; case 101: -#line 562 "parser.y" +#line 564 "parser.y" { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); ;} break; case 102: -#line 563 "parser.y" +#line 565 "parser.y" { (yyval.attr) = make_attr(ATTR_OPTIONAL); ;} break; case 103: -#line 564 "parser.y" +#line 566 "parser.y" { (yyval.attr) = make_attr(ATTR_OUT); ;} break; case 104: -#line 565 "parser.y" +#line 567 "parser.y" { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[-1].num)); ;} break; case 105: -#line 566 "parser.y" +#line 568 "parser.y" { (yyval.attr) = make_attr(ATTR_PROPGET); ;} break; case 106: -#line 567 "parser.y" +#line 569 "parser.y" { (yyval.attr) = make_attr(ATTR_PROPPUT); ;} break; case 107: -#line 568 "parser.y" +#line 570 "parser.y" { (yyval.attr) = make_attr(ATTR_PROPPUTREF); ;} break; case 108: -#line 569 "parser.y" +#line 571 "parser.y" { (yyval.attr) = make_attr(ATTR_PUBLIC); ;} break; case 109: -#line 571 "parser.y" +#line 573 "parser.y" { expr_list_t *list = append_expr( NULL, (yyvsp[-3].expr) ); list = append_expr( list, (yyvsp[-1].expr) ); (yyval.attr) = make_attrp(ATTR_RANGE, list); ;} break; case 110: -#line 574 "parser.y" +#line 576 "parser.y" { (yyval.attr) = make_attr(ATTR_READONLY); ;} break; case 111: -#line 575 "parser.y" +#line 577 "parser.y" { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); ;} break; case 112: -#line 576 "parser.y" +#line 578 "parser.y" { (yyval.attr) = make_attr(ATTR_RESTRICTED); ;} break; case 113: -#line 577 "parser.y" +#line 579 "parser.y" { (yyval.attr) = make_attr(ATTR_RETVAL); ;} break; case 114: -#line 578 "parser.y" +#line 580 "parser.y" { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[-1].expr_list)); ;} break; case 115: -#line 579 "parser.y" +#line 581 "parser.y" { (yyval.attr) = make_attr(ATTR_SOURCE); ;} break; case 116: -#line 580 "parser.y" +#line 582 "parser.y" { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); ;} break; case 117: -#line 581 "parser.y" +#line 583 "parser.y" { (yyval.attr) = make_attr(ATTR_STRING); ;} break; case 118: -#line 582 "parser.y" +#line 584 "parser.y" { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[-1].expr)); ;} break; case 119: -#line 583 "parser.y" +#line 585 "parser.y" { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[-1].type)); ;} break; case 120: -#line 584 "parser.y" +#line 586 "parser.y" { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[-1].type)); ;} break; case 121: -#line 585 "parser.y" +#line 587 "parser.y" { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[-1].uuid)); ;} break; case 122: -#line 586 "parser.y" +#line 588 "parser.y" { (yyval.attr) = make_attr(ATTR_V1ENUM); ;} break; case 123: -#line 587 "parser.y" +#line 589 "parser.y" { (yyval.attr) = make_attr(ATTR_VARARG); ;} break; case 124: -#line 588 "parser.y" +#line 590 "parser.y" { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[-1].num)); ;} break; case 125: -#line 589 "parser.y" +#line 591 "parser.y" { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[-1].type)); ;} break; case 126: -#line 590 "parser.y" +#line 592 "parser.y" { (yyval.attr) = make_attrv(ATTR_POINTERTYPE, (yyvsp[0].num)); ;} break; case 128: -#line 595 "parser.y" +#line 597 "parser.y" { if (!is_valid_uuid((yyvsp[0].str))) error_loc("invalid UUID: %s\n", (yyvsp[0].str)); (yyval.uuid) = parse_uuid((yyvsp[0].str)); ;} break; case 129: -#line 600 "parser.y" - { (yyval.str) = (yyvsp[0].str); ;} - break; - - case 130: -#line 601 "parser.y" - { (yyval.str) = (yyvsp[0].str); ;} - break; - - case 131: #line 602 "parser.y" { (yyval.str) = (yyvsp[0].str); ;} break; - case 132: + case 130: #line 603 "parser.y" { (yyval.str) = (yyvsp[0].str); ;} break; + case 131: +#line 604 "parser.y" + { (yyval.str) = (yyvsp[0].str); ;} + break; + + case 132: +#line 605 "parser.y" + { (yyval.str) = (yyvsp[0].str); ;} + break; + case 133: -#line 606 "parser.y" +#line 608 "parser.y" { (yyval.var_list) = NULL; ;} break; case 134: -#line 607 "parser.y" +#line 609 "parser.y" { (yyval.var_list) = append_var( (yyvsp[-1].var_list), (yyvsp[0].var) ); ;} break; case 135: -#line 610 "parser.y" +#line 612 "parser.y" { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, (yyvsp[-2].expr) )); (yyval.var) = (yyvsp[0].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); @@ -3165,7 +3167,7 @@ break; case 136: -#line 614 "parser.y" +#line 616 "parser.y" { attr_t *a = make_attr(ATTR_DEFAULT); (yyval.var) = (yyvsp[0].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); @@ -3173,17 +3175,17 @@ break; case 137: -#line 620 "parser.y" +#line 622 "parser.y" { (yyval.var_list) = NULL; ;} break; case 138: -#line 621 "parser.y" +#line 623 "parser.y" { (yyval.var_list) = (yyvsp[-1].var_list); ;} break; case 140: -#line 625 "parser.y" +#line 627 "parser.y" { if (!(yyvsp[0].var)->eval) (yyvsp[0].var)->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */); (yyval.var_list) = append_var( NULL, (yyvsp[0].var) ); @@ -3191,7 +3193,7 @@ break; case 141: -#line 629 "parser.y" +#line 631 "parser.y" { if (!(yyvsp[0].var)->eval) { var_t *last = LIST_ENTRY( list_tail((yyval.var_list)), var_t, entry ); @@ -3202,7 +3204,7 @@ break; case 142: -#line 638 "parser.y" +#line 640 "parser.y" { (yyval.var) = reg_const((yyvsp[-2].var)); (yyval.var)->eval = (yyvsp[0].expr); (yyval.var)->type = make_int(0); @@ -3210,14 +3212,14 @@ break; case 143: -#line 642 "parser.y" +#line 644 "parser.y" { (yyval.var) = reg_const((yyvsp[0].var)); (yyval.var)->type = make_int(0); ;} break; case 144: -#line 647 "parser.y" +#line 649 "parser.y" { (yyval.type) = get_typev(RPC_FC_ENUM16, (yyvsp[-3].var), tsENUM); (yyval.type)->kind = TKIND_ENUM; (yyval.type)->fields_or_args = (yyvsp[-1].var_list); @@ -3228,232 +3230,232 @@ break; case 145: -#line 656 "parser.y" +#line 658 "parser.y" { (yyval.expr_list) = append_expr( NULL, (yyvsp[0].expr) ); ;} break; case 146: -#line 657 "parser.y" +#line 659 "parser.y" { (yyval.expr_list) = append_expr( (yyvsp[-2].expr_list), (yyvsp[0].expr) ); ;} break; case 147: -#line 670 "parser.y" +#line 672 "parser.y" { (yyval.expr) = make_expr(EXPR_VOID); ;} break; case 149: -#line 674 "parser.y" +#line 676 "parser.y" { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[0].num)); ;} break; case 150: -#line 675 "parser.y" +#line 677 "parser.y" { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[0].num)); ;} break; case 151: -#line 676 "parser.y" +#line 678 "parser.y" { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[0].dbl)); ;} break; case 152: -#line 677 "parser.y" +#line 679 "parser.y" { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); ;} break; case 153: -#line 678 "parser.y" +#line 680 "parser.y" { (yyval.expr) = make_exprl(EXPR_NUM, 0); ;} break; case 154: -#line 679 "parser.y" +#line 681 "parser.y" { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); ;} break; case 155: -#line 680 "parser.y" +#line 682 "parser.y" { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[0].str)); ;} break; case 156: -#line 681 "parser.y" +#line 683 "parser.y" { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[0].str)); ;} break; case 157: -#line 682 "parser.y" +#line 684 "parser.y" { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str)); ;} break; case 158: -#line 683 "parser.y" +#line 685 "parser.y" { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 159: -#line 684 "parser.y" +#line 686 "parser.y" { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 160: -#line 685 "parser.y" +#line 687 "parser.y" { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 161: -#line 686 "parser.y" +#line 688 "parser.y" { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 162: -#line 687 "parser.y" +#line 689 "parser.y" { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 163: -#line 688 "parser.y" +#line 690 "parser.y" { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 164: -#line 689 "parser.y" +#line 691 "parser.y" { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 165: -#line 690 "parser.y" +#line 692 "parser.y" { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 166: -#line 691 "parser.y" +#line 693 "parser.y" { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 167: -#line 692 "parser.y" +#line 694 "parser.y" { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 168: -#line 693 "parser.y" +#line 695 "parser.y" { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 169: -#line 694 "parser.y" +#line 696 "parser.y" { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 170: -#line 695 "parser.y" +#line 697 "parser.y" { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 171: -#line 696 "parser.y" +#line 698 "parser.y" { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 172: -#line 697 "parser.y" +#line 699 "parser.y" { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 173: -#line 698 "parser.y" +#line 700 "parser.y" { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 174: -#line 699 "parser.y" +#line 701 "parser.y" { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 175: -#line 700 "parser.y" +#line 702 "parser.y" { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 176: -#line 701 "parser.y" +#line 703 "parser.y" { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; case 177: -#line 702 "parser.y" +#line 704 "parser.y" { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[0].expr)); ;} break; case 178: -#line 703 "parser.y" +#line 705 "parser.y" { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[0].expr)); ;} break; case 179: -#line 704 "parser.y" +#line 706 "parser.y" { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[0].expr)); ;} break; case 180: -#line 705 "parser.y" +#line 707 "parser.y" { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[0].expr)); ;} break; case 181: -#line 706 "parser.y" +#line 708 "parser.y" { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[0].expr)); ;} break; case 182: -#line 707 "parser.y" +#line 709 "parser.y" { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[0].expr)); ;} break; case 183: -#line 708 "parser.y" +#line 710 "parser.y" { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[-2].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); ;} break; case 184: -#line 709 "parser.y" +#line 711 "parser.y" { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[-2].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); ;} break; case 185: -#line 710 "parser.y" +#line 712 "parser.y" { (yyval.expr) = make_exprt(EXPR_CAST, (yyvsp[-2].type), (yyvsp[0].expr)); ;} break; case 186: -#line 711 "parser.y" +#line 713 "parser.y" { (yyval.expr) = make_exprt(EXPR_SIZEOF, (yyvsp[-1].type), NULL); ;} break; case 187: -#line 712 "parser.y" +#line 714 "parser.y" { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[-3].expr), (yyvsp[-1].expr)); ;} break; case 188: -#line 713 "parser.y" +#line 715 "parser.y" { (yyval.expr) = (yyvsp[-1].expr); ;} break; case 189: -#line 716 "parser.y" +#line 718 "parser.y" { (yyval.expr_list) = append_expr( NULL, (yyvsp[0].expr) ); ;} break; case 190: -#line 717 "parser.y" +#line 719 "parser.y" { (yyval.expr_list) = append_expr( (yyvsp[-2].expr_list), (yyvsp[0].expr) ); ;} break; case 191: -#line 720 "parser.y" +#line 722 "parser.y" { (yyval.expr) = (yyvsp[0].expr); if (!(yyval.expr)->is_const) error_loc("expression is not an integer constant\n"); @@ -3461,7 +3463,7 @@ break; case 192: -#line 726 "parser.y" +#line 728 "parser.y" { (yyval.expr) = (yyvsp[0].expr); if (!(yyval.expr)->is_const && (yyval.expr)->type != EXPR_STRLIT && (yyval.expr)->type != EXPR_WSTRLIT) error_loc("expression is not constant\n"); @@ -3469,17 +3471,17 @@ break; case 193: -#line 732 "parser.y" +#line 734 "parser.y" { (yyval.var_list) = NULL; ;} break; case 194: -#line 733 "parser.y" +#line 735 "parser.y" { (yyval.var_list) = append_var_list((yyvsp[-1].var_list), (yyvsp[0].var_list)); ;} break; case 195: -#line 737 "parser.y" +#line 739 "parser.y" { const char *first = LIST_ENTRY(list_head((yyvsp[-1].declarator_list)), declarator_t, entry)->var->name; check_field_attrs(first, (yyvsp[-3].attr_list)); (yyval.var_list) = set_var_types((yyvsp[-3].attr_list), (yyvsp[-2].declspec), (yyvsp[-1].declarator_list)); @@ -3487,7 +3489,7 @@ break; case 196: -#line 741 "parser.y" +#line 743 "parser.y" { var_t *v = make_var(NULL); v->type = (yyvsp[-1].type); v->attrs = (yyvsp[-2].attr_list); (yyval.var_list) = append_var(NULL, v); @@ -3495,37 +3497,37 @@ break; case 197: -#line 748 "parser.y" +#line 750 "parser.y" { (yyval.var) = (yyvsp[-1].var); ;} break; case 198: -#line 749 "parser.y" +#line 751 "parser.y" { (yyval.var) = make_var(NULL); (yyval.var)->attrs = (yyvsp[-1].attr_list); ;} break; case 199: -#line 752 "parser.y" +#line 754 "parser.y" { (yyval.var_list) = NULL; ;} break; case 200: -#line 753 "parser.y" +#line 755 "parser.y" { (yyval.var_list) = append_var( (yyvsp[-1].var_list), (yyvsp[0].var) ); ;} break; case 201: -#line 757 "parser.y" +#line 759 "parser.y" { (yyval.var) = (yyvsp[-1].var); ;} break; case 202: -#line 758 "parser.y" +#line 760 "parser.y" { (yyval.var) = NULL; ;} break; case 203: -#line 761 "parser.y" +#line 763 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; (yyval.var)->attrs = check_field_attrs((yyval.var)->name, (yyvsp[-2].attr_list)); set_type((yyval.var), (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); @@ -3534,7 +3536,7 @@ break; case 204: -#line 769 "parser.y" +#line 771 "parser.y" { var_t *v = (yyvsp[0].declarator)->var; v->attrs = check_function_attrs(v->name, (yyvsp[-2].attr_list)); set_type(v, (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); @@ -3544,7 +3546,7 @@ break; case 205: -#line 779 "parser.y" +#line 781 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; (yyval.var)->attrs = (yyvsp[-2].attr_list); set_type((yyval.var), (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); @@ -3553,7 +3555,7 @@ break; case 206: -#line 784 "parser.y" +#line 786 "parser.y" { (yyval.var) = (yyvsp[0].declarator)->var; set_type((yyval.var), (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE); free((yyvsp[0].declarator)); @@ -3561,52 +3563,52 @@ break; case 207: -#line 790 "parser.y" +#line 792 "parser.y" { (yyval.var) = NULL; ;} break; case 209: -#line 794 "parser.y" +#line 796 "parser.y" { (yyval.var) = NULL; ;} break; case 210: -#line 795 "parser.y" +#line 797 "parser.y" { (yyval.var) = make_var((yyvsp[0].str)); ;} break; case 211: -#line 796 "parser.y" +#line 798 "parser.y" { (yyval.var) = make_var((yyvsp[0].str)); ;} break; case 212: -#line 799 "parser.y" - { (yyval.var) = make_var((yyvsp[0].str)); ;} - break; - - case 213: #line 801 "parser.y" { (yyval.var) = make_var((yyvsp[0].str)); ;} break; + case 213: +#line 803 "parser.y" + { (yyval.var) = make_var((yyvsp[0].str)); ;} + break; + case 214: -#line 804 "parser.y" +#line 806 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; case 215: -#line 805 "parser.y" +#line 807 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; case 217: -#line 807 "parser.y" +#line 809 "parser.y" { (yyval.type) = (yyvsp[0].type); (yyval.type)->sign = 1; ;} break; case 218: -#line 808 "parser.y" +#line 810 "parser.y" { (yyval.type) = (yyvsp[0].type); (yyval.type)->sign = -1; switch ((yyval.type)->type) { case RPC_FC_CHAR: break; @@ -3626,91 +3628,94 @@ break; case 219: -#line 824 "parser.y" +#line 826 "parser.y" { (yyval.type) = make_int(-1); ;} break; case 220: -#line 825 "parser.y" - { (yyval.type) = make_builtin((yyvsp[0].str)); ;} - break; - - case 221: -#line 826 "parser.y" - { (yyval.type) = duptype(find_type("float", 0), 1); ;} - break; - - case 222: #line 827 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 223: + case 221: #line 828 "parser.y" - { (yyval.type) = make_builtin((yyvsp[0].str)); ;} - break; - - case 224: + { (yyval.type) = duptype(find_type("float", 0), 1); ;} + break; + + case 222: #line 829 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 225: + case 223: #line 830 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; + case 224: +#line 831 "parser.y" + { (yyval.type) = make_builtin((yyvsp[0].str)); ;} + break; + + case 225: +#line 832 "parser.y" + { (yyval.type) = make_builtin((yyvsp[0].str)); ;} + break; + case 228: -#line 837 "parser.y" - { (yyval.type) = make_builtin((yyvsp[0].str)); ;} - break; - - case 229: -#line 838 "parser.y" - { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} - break; - - case 230: #line 839 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; - case 231: + case 229: #line 840 "parser.y" { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} break; + case 230: +#line 841 "parser.y" + { (yyval.type) = make_builtin((yyvsp[0].str)); ;} + break; + + case 231: +#line 842 "parser.y" + { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} + break; + case 232: -#line 841 "parser.y" +#line 843 "parser.y" { (yyval.type) = make_builtin((yyvsp[-1].str)); ;} break; case 233: -#line 842 "parser.y" +#line 844 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; case 234: -#line 843 "parser.y" +#line 845 "parser.y" { (yyval.type) = make_builtin((yyvsp[0].str)); ;} break; case 235: -#line 846 "parser.y" +#line 848 "parser.y" { (yyval.type) = make_class((yyvsp[0].str)); ;} break; case 236: -#line 847 "parser.y" +#line 849 "parser.y" { (yyval.type) = find_type((yyvsp[0].str), 0); - if ((yyval.type)->defined) error_loc("multiple definition error\n"); - if ((yyval.type)->kind != TKIND_COCLASS) error_loc("%s was not declared a coclass\n", (yyvsp[0].str)); + if ((yyval.type)->kind != TKIND_COCLASS) + error_loc("%s was not declared a coclass at %s:%d\n", + (yyvsp[0].str), (yyval.type)->loc_info.input_name, + (yyval.type)->loc_info.line_number); ;} break; case 237: -#line 853 "parser.y" +#line 857 "parser.y" { (yyval.type) = (yyvsp[0].type); + check_def((yyval.type)); (yyval.type)->attrs = check_coclass_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)); if (!parse_only && do_header) write_coclass((yyval.type)); @@ -3720,7 +3725,7 @@ break; case 238: -#line 863 "parser.y" +#line 868 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->ifaces = (yyvsp[-2].ifref_list); (yyval.type)->defined = TRUE; @@ -3728,37 +3733,37 @@ break; case 239: -#line 869 "parser.y" +#line 874 "parser.y" { (yyval.ifref_list) = NULL; ;} break; case 240: -#line 870 "parser.y" +#line 875 "parser.y" { (yyval.ifref_list) = append_ifref( (yyvsp[-1].ifref_list), (yyvsp[0].ifref) ); ;} break; case 241: -#line 874 "parser.y" +#line 879 "parser.y" { (yyval.ifref) = make_ifref((yyvsp[0].type)); (yyval.ifref)->attrs = (yyvsp[-1].attr_list); ;} break; case 242: -#line 877 "parser.y" +#line 882 "parser.y" { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_DISPATCH; ;} break; case 243: -#line 878 "parser.y" +#line 883 "parser.y" { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_DISPATCH; ;} break; case 244: -#line 881 "parser.y" +#line 886 "parser.y" { attr_t *attrs; is_in_interface = TRUE; is_object_interface = TRUE; (yyval.type) = (yyvsp[0].type); - if ((yyval.type)->defined) error_loc("multiple definition error\n"); + check_def((yyval.type)); attrs = make_attr(ATTR_DISPINTERFACE); (yyval.type)->attrs = append_attr( check_dispiface_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)), attrs ); (yyval.type)->ref = find_type("IDispatch", 0); @@ -3769,27 +3774,27 @@ break; case 245: -#line 895 "parser.y" +#line 900 "parser.y" { (yyval.var_list) = NULL; ;} break; case 246: -#line 896 "parser.y" +#line 901 "parser.y" { (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[-1].var) ); ;} break; case 247: -#line 899 "parser.y" +#line 904 "parser.y" { (yyval.func_list) = NULL; ;} break; case 248: -#line 900 "parser.y" +#line 905 "parser.y" { (yyval.func_list) = append_func( (yyvsp[-2].func_list), (yyvsp[-1].func) ); ;} break; case 249: -#line 906 "parser.y" +#line 911 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->fields_or_args = (yyvsp[-2].var_list); (yyval.type)->funcs = (yyvsp[-1].func_list); @@ -3800,7 +3805,7 @@ break; case 250: -#line 914 "parser.y" +#line 919 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->fields_or_args = (yyvsp[-2].type)->fields_or_args; (yyval.type)->funcs = (yyvsp[-2].type)->funcs; @@ -3811,34 +3816,34 @@ break; case 251: -#line 923 "parser.y" +#line 928 "parser.y" { (yyval.type) = NULL; ;} break; case 252: -#line 924 "parser.y" +#line 929 "parser.y" { (yyval.type) = find_type2((yyvsp[0].str), 0); ;} break; case 253: -#line 927 "parser.y" +#line 932 "parser.y" { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_INTERFACE; ;} break; case 254: -#line 928 "parser.y" +#line 933 "parser.y" { (yyval.type) = get_type(RPC_FC_IP, (yyvsp[0].str), 0); (yyval.type)->kind = TKIND_INTERFACE; ;} break; case 255: -#line 931 "parser.y" +#line 936 "parser.y" { (yyval.ifinfo).interface = (yyvsp[0].type); (yyval.ifinfo).old_pointer_default = pointer_default; if (is_attr((yyvsp[-1].attr_list), ATTR_POINTERDEFAULT)) pointer_default = get_attrv((yyvsp[-1].attr_list), ATTR_POINTERDEFAULT); is_object_interface = is_object((yyvsp[-1].attr_list)); is_in_interface = TRUE; - if ((yyvsp[0].type)->defined) error_loc("multiple definition error\n"); + check_def((yyvsp[0].type)); (yyvsp[0].type)->attrs = check_iface_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)); (yyvsp[0].type)->defined = TRUE; if (!parse_only && do_header) write_forward((yyvsp[0].type)); @@ -3846,7 +3851,7 @@ break; case 256: -#line 945 "parser.y" +#line 950 "parser.y" { (yyval.type) = (yyvsp[-5].ifinfo).interface; (yyval.type)->ref = (yyvsp[-4].type); (yyval.type)->funcs = (yyvsp[-2].func_list); @@ -3861,7 +3866,7 @@ break; case 257: -#line 960 "parser.y" +#line 965 "parser.y" { (yyval.type) = (yyvsp[-7].ifinfo).interface; (yyval.type)->ref = find_type2((yyvsp[-5].str), 0); if (!(yyval.type)->ref) error_loc("base class '%s' not found in import\n", (yyvsp[-5].str)); @@ -3876,39 +3881,39 @@ break; case 258: -#line 971 "parser.y" +#line 976 "parser.y" { (yyval.type) = (yyvsp[-1].type); ;} break; case 259: -#line 975 "parser.y" +#line 980 "parser.y" { (yyval.type) = (yyvsp[-1].type); if (!parse_only && do_header) write_forward((yyval.type)); ;} break; case 260: -#line 976 "parser.y" +#line 981 "parser.y" { (yyval.type) = (yyvsp[-1].type); if (!parse_only && do_header) write_forward((yyval.type)); ;} break; case 261: -#line 979 "parser.y" +#line 984 "parser.y" { (yyval.type) = make_type(0, NULL); (yyval.type)->name = (yyvsp[0].str); (yyval.type)->kind = TKIND_MODULE; ;} break; case 262: -#line 980 "parser.y" +#line 985 "parser.y" { (yyval.type) = make_type(0, NULL); (yyval.type)->name = (yyvsp[0].str); (yyval.type)->kind = TKIND_MODULE; ;} break; case 263: -#line 983 "parser.y" +#line 988 "parser.y" { (yyval.type) = (yyvsp[0].type); (yyval.type)->attrs = check_module_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)); ;} break; case 264: -#line 989 "parser.y" +#line 994 "parser.y" { (yyval.type) = (yyvsp[-4].type); (yyval.type)->funcs = (yyvsp[-2].func_list); /* FIXME: if (!parse_only && do_header) write_module($$); */ @@ -3916,97 +3921,97 @@ break; case 265: -#line 996 "parser.y" +#line 1001 "parser.y" { (yyval.stgclass) = STG_EXTERN; ;} break; case 266: -#line 997 "parser.y" +#line 1002 "parser.y" { (yyval.stgclass) = STG_STATIC; ;} break; case 267: -#line 998 "parser.y" +#line 1003 "parser.y" { (yyval.stgclass) = STG_REGISTER; ;} break; case 268: -#line 1002 "parser.y" +#line 1007 "parser.y" { (yyval.attr) = make_attr(ATTR_INLINE); ;} break; case 269: -#line 1006 "parser.y" +#line 1011 "parser.y" { (yyval.attr) = make_attr(ATTR_CONST); ;} break; case 270: -#line 1009 "parser.y" +#line 1014 "parser.y" { (yyval.attr_list) = NULL; ;} break; case 271: -#line 1010 "parser.y" +#line 1015 "parser.y" { (yyval.attr_list) = append_attr((yyvsp[-1].attr_list), (yyvsp[0].attr)); ;} break; case 272: -#line 1013 "parser.y" +#line 1018 "parser.y" { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[0].declspec), NULL, NULL, STG_NONE); ;} break; case 273: -#line 1015 "parser.y" +#line 1020 "parser.y" { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[-2].declspec), (yyvsp[0].declspec), NULL, STG_NONE); ;} break; case 274: -#line 1018 "parser.y" +#line 1023 "parser.y" { (yyval.declspec) = NULL; ;} break; case 276: -#line 1023 "parser.y" +#line 1028 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, (yyvsp[-1].attr), STG_NONE); ;} break; case 277: -#line 1024 "parser.y" +#line 1029 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, (yyvsp[-1].attr), STG_NONE); ;} break; case 278: -#line 1025 "parser.y" +#line 1030 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, NULL, (yyvsp[-1].stgclass)); ;} break; case 279: -#line 1030 "parser.y" +#line 1035 "parser.y" { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, make_pointer_type(NULL, (yyvsp[-1].attr_list))); ;} break; case 280: -#line 1031 "parser.y" +#line 1036 "parser.y" { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); ;} break; case 282: -#line 1036 "parser.y" +#line 1041 "parser.y" { (yyval.declarator) = make_declarator((yyvsp[0].var)); ;} break; case 283: -#line 1037 "parser.y" +#line 1042 "parser.y" { (yyval.declarator) = (yyvsp[-1].declarator); ;} break; case 284: -#line 1038 "parser.y" +#line 1043 "parser.y" { (yyval.declarator) = (yyvsp[-1].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[0].expr)); ;} break; case 285: -#line 1039 "parser.y" +#line 1044 "parser.y" { (yyval.declarator) = (yyvsp[-3].declarator); (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, make_func_type((yyvsp[-1].var_list))); (yyval.declarator)->type = NULL; @@ -4014,44 +4019,45 @@ break; case 286: -#line 1046 "parser.y" +#line 1051 "parser.y" { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[0].declarator) ); ;} break; case 287: -#line 1047 "parser.y" +#line 1052 "parser.y" { (yyval.declarator_list) = append_declarator( (yyvsp[-2].declarator_list), (yyvsp[0].declarator) ); ;} break; case 288: -#line 1051 "parser.y" +#line 1056 "parser.y" { (yyval.declarator) = (yyvsp[0].declarator); ;} break; case 289: -#line 1052 "parser.y" +#line 1057 "parser.y" { (yyval.declarator) = (yyvsp[-2].declarator); (yyvsp[-2].declarator)->var->eval = (yyvsp[0].expr); ;} break; case 290: -#line 1056 "parser.y" +#line 1061 "parser.y" { (yyval.num) = RPC_FC_RP; ;} break; case 291: -#line 1057 "parser.y" +#line 1062 "parser.y" { (yyval.num) = RPC_FC_UP; ;} break; case 292: -#line 1058 "parser.y" +#line 1063 "parser.y" { (yyval.num) = RPC_FC_FP; ;} break; case 293: -#line 1061 "parser.y" +#line 1066 "parser.y" { (yyval.type) = get_typev(RPC_FC_STRUCT, (yyvsp[-3].var), tsSTRUCT); /* overwrite RPC_FC_STRUCT with a more exact type */ + check_def((yyval.type)); (yyval.type)->type = get_struct_type( (yyvsp[-1].var_list) ); (yyval.type)->kind = TKIND_RECORD; (yyval.type)->fields_or_args = (yyvsp[-1].var_list); @@ -4062,65 +4068,66 @@ break; case 294: -#line 1072 "parser.y" +#line 1078 "parser.y" { (yyval.type) = duptype(find_type("void", 0), 1); ;} break; case 295: -#line 1073 "parser.y" +#line 1079 "parser.y" { (yyval.type) = find_type((yyvsp[0].str), 0); ;} break; case 296: -#line 1074 "parser.y" +#line 1080 "parser.y" { (yyval.type) = (yyvsp[0].type); ;} break; case 297: -#line 1075 "parser.y" +#line 1081 "parser.y" { (yyval.type) = (yyvsp[0].type); ;} break; case 298: -#line 1076 "parser.y" +#line 1082 "parser.y" { (yyval.type) = find_type2((yyvsp[0].str), tsENUM); ;} break; case 299: -#line 1077 "parser.y" +#line 1083 "parser.y" { (yyval.type) = (yyvsp[0].type); ;} break; case 300: -#line 1078 "parser.y" +#line 1084 "parser.y" { (yyval.type) = get_type(RPC_FC_STRUCT, (yyvsp[0].str), tsSTRUCT); ;} break; case 301: -#line 1079 "parser.y" +#line 1085 "parser.y" { (yyval.type) = (yyvsp[0].type); ;} break; case 302: -#line 1080 "parser.y" +#line 1086 "parser.y" { (yyval.type) = find_type2((yyvsp[0].str), tsUNION); ;} break; case 303: -#line 1081 "parser.y" +#line 1087 "parser.y" { (yyval.type) = make_safearray((yyvsp[-1].type)); ;} break; case 304: -#line 1085 "parser.y" +#line 1091 "parser.y" { reg_typedefs((yyvsp[-1].declspec), (yyvsp[0].declarator_list), check_typedef_attrs((yyvsp[-2].attr_list))); (yyval.statement) = process_typedefs((yyvsp[0].declarator_list)); ;} break; case 305: -#line 1091 "parser.y" +#line 1097 "parser.y" { (yyval.type) = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, (yyvsp[-3].var), tsUNION); + check_def((yyval.type)); (yyval.type)->kind = TKIND_UNION; (yyval.type)->fields_or_args = (yyvsp[-1].var_list); (yyval.type)->defined = TRUE; @@ -4128,9 +4135,10 @@ break; case 306: -#line 1098 "parser.y" +#line 1105 "parser.y" { var_t *u = (yyvsp[-3].var); (yyval.type) = get_typev(RPC_FC_ENCAPSULATED_UNION, (yyvsp[-8].var), tsUNION); + check_def((yyval.type)); (yyval.type)->kind = TKIND_UNION; if (!u) u = make_var( xstrdup("tagged_union") ); u->type = make_type(RPC_FC_NON_ENCAPSULATED_UNION, NULL); @@ -4144,12 +4152,12 @@ break; case 307: -#line 1113 "parser.y" +#line 1121 "parser.y" { (yyval.num) = MAKEVERSION((yyvsp[0].num), 0); ;} break; case 308: -#line 1114 "parser.y" +#line 1122 "parser.y" { (yyval.num) = MAKEVERSION((yyvsp[-2].num), (yyvsp[0].num)); ;} break; @@ -4158,7 +4166,7 @@ } /* Line 1126 of yacc.c. */ -#line 4162 "parser.tab.c" +#line 4170 "parser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -4426,7 +4434,7 @@ } -#line 1117 "parser.y" +#line 1125 "parser.y" static void decl_builtin(const char *name, unsigned char type) @@ -4703,6 +4711,7 @@ t->tfswrite = FALSE; t->checked = FALSE; t->typelib_idx = -1; + init_loc_info(&t->loc_info); return t; } @@ -5014,9 +5023,7 @@ v->attrs = NULL; v->eval = NULL; v->stgclass = STG_NONE; - v->loc_info.input_name = input_name ? input_name : "stdin"; - v->loc_info.line_number = line_number; - v->loc_info.near_text = parser_text; + init_loc_info(&v->loc_info); return v; } @@ -5206,6 +5213,12 @@ if (name->name) { type_t *cur; + + cur = find_type_helper(name->name, 0); + if (cur) + error_loc("%s: redefinition error; original definition was at %s:%d\n", + cur->name, cur->loc_info.input_name, + cur->loc_info.line_number); /* set the attributes to allow set_type to do some checks on them */ name->attrs = attrs; @@ -6210,3 +6223,17 @@ return list; } +void init_loc_info(loc_info_t *i) +{ + i->input_name = input_name ? input_name : "stdin"; + i->line_number = line_number; + i->near_text = parser_text; +} + +static void check_def(const type_t *t) +{ + if (t->defined) + error_loc("%s: redefinition error; original definition was at %s:%d\n", + t->name, t->loc_info.input_name, t->loc_info.line_number); +} + Modified: trunk/reactos/tools/widl/parser.tab.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.tab.h?re…
============================================================================== --- trunk/reactos/tools/widl/parser.tab.h [iso-8859-1] (original) +++ trunk/reactos/tools/widl/parser.tab.h [iso-8859-1] Wed Nov 19 17:13:05 2008 @@ -335,7 +335,7 @@ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 177 "parser.y" +#line 179 "parser.y" typedef union YYSTYPE { attr_t *attr; attr_list_t *attr_list; Modified: trunk/reactos/tools/widl/parser.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.y?rev=37…
============================================================================== --- trunk/reactos/tools/widl/parser.y [iso-8859-1] (original) +++ trunk/reactos/tools/widl/parser.y [iso-8859-1] Wed Nov 19 17:13:05 2008 @@ -156,6 +156,8 @@ static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); const char *get_attr_display_name(enum attr_type type); static void add_explicit_handle_if_necessary(func_t *func); +static type_t *find_type_helper(const char *name, int t); +static void check_def(const type_t *t); static statement_t *make_statement(enum statement_type type); static statement_t *make_statement_type_decl(type_t *type); @@ -845,12 +847,15 @@ coclass: tCOCLASS aIDENTIFIER { $$ = make_class($2); } | tCOCLASS aKNOWNTYPE { $$ = find_type($2, 0); - if ($$->defined) error_loc("multiple definition error\n"); - if ($$->kind != TKIND_COCLASS) error_loc("%s was not declared a coclass\n", $2); + if ($$->kind != TKIND_COCLASS) + error_loc("%s was not declared a coclass at %s:%d\n", + $2, $$->loc_info.input_name, + $$->loc_info.line_number); } ; coclasshdr: attributes coclass { $$ = $2; + check_def($$); $$->attrs = check_coclass_attrs($2->name, $1); if (!parse_only && do_header) write_coclass($$); @@ -882,7 +887,7 @@ is_in_interface = TRUE; is_object_interface = TRUE; $$ = $2; - if ($$->defined) error_loc("multiple definition error\n"); + check_def($$); attrs = make_attr(ATTR_DISPINTERFACE); $$->attrs = append_attr( check_dispiface_attrs($2->name, $1), attrs ); $$->ref = find_type("IDispatch", 0); @@ -934,7 +939,7 @@ pointer_default = get_attrv($1, ATTR_POINTERDEFAULT); is_object_interface = is_object($1); is_in_interface = TRUE; - if ($2->defined) error_loc("multiple definition error\n"); + check_def($2); $2->attrs = check_iface_attrs($2->name, $1); $2->defined = TRUE; if (!parse_only && do_header) write_forward($2); @@ -1060,6 +1065,7 @@ structdef: tSTRUCT t_ident '{' fields '}' { $$ = get_typev(RPC_FC_STRUCT, $2, tsSTRUCT); /* overwrite RPC_FC_STRUCT with a more exact type */ + check_def($$); $$->type = get_struct_type( $4 ); $$->kind = TKIND_RECORD; $$->fields_or_args = $4; @@ -1089,6 +1095,7 @@ uniondef: tUNION t_ident '{' ne_union_fields '}' { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); + check_def($$); $$->kind = TKIND_UNION; $$->fields_or_args = $4; $$->defined = TRUE; @@ -1097,6 +1104,7 @@ tSWITCH '(' s_field ')' m_ident '{' cases '}' { var_t *u = $7; $$ = get_typev(RPC_FC_ENCAPSULATED_UNION, $2, tsUNION); + check_def($$); $$->kind = TKIND_UNION; if (!u) u = make_var( xstrdup("tagged_union") ); u->type = make_type(RPC_FC_NON_ENCAPSULATED_UNION, NULL); @@ -1390,6 +1398,7 @@ t->tfswrite = FALSE; t->checked = FALSE; t->typelib_idx = -1; + init_loc_info(&t->loc_info); return t; } @@ -1701,9 +1710,7 @@ v->attrs = NULL; v->eval = NULL; v->stgclass = STG_NONE; - v->loc_info.input_name = input_name ? input_name : "stdin"; - v->loc_info.line_number = line_number; - v->loc_info.near_text = parser_text; + init_loc_info(&v->loc_info); return v; } @@ -1893,6 +1900,12 @@ if (name->name) { type_t *cur; + + cur = find_type_helper(name->name, 0); + if (cur) + error_loc("%s: redefinition error; original definition was at %s:%d\n", + cur->name, cur->loc_info.input_name, + cur->loc_info.line_number); /* set the attributes to allow set_type to do some checks on them */ name->attrs = attrs; @@ -2896,3 +2909,17 @@ } return list; } + +void init_loc_info(loc_info_t *i) +{ + i->input_name = input_name ? input_name : "stdin"; + i->line_number = line_number; + i->near_text = parser_text; +} + +static void check_def(const type_t *t) +{ + if (t->defined) + error_loc("%s: redefinition error; original definition was at %s:%d\n", + t->name, t->loc_info.input_name, t->loc_info.line_number); +} Modified: trunk/reactos/tools/widl/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/typelib.c?rev=3…
============================================================================== --- trunk/reactos/tools/widl/typelib.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/typelib.c [iso-8859-1] Wed Nov 19 17:13:05 2008 @@ -69,6 +69,7 @@ a->kind = TKIND_ALIAS; a->attrs = NULL; a->declarray = FALSE; + init_loc_info(&a->loc_info); return a; } Modified: trunk/reactos/tools/widl/widltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widltypes.h?rev…
============================================================================== --- trunk/reactos/tools/widl/widltypes.h [iso-8859-1] (original) +++ trunk/reactos/tools/widl/widltypes.h [iso-8859-1] Wed Nov 19 17:13:05 2008 @@ -283,6 +283,7 @@ unsigned int typestring_offset; unsigned int ptrdesc; /* used for complex structs */ int typelib_idx; + loc_info_t loc_info; unsigned int declarray : 1; /* if declared as an array */ unsigned int ignore : 1; unsigned int defined : 1; @@ -419,6 +420,8 @@ type_t *find_type(const char *name, int t); type_t *make_type(unsigned char type, type_t *ref); +void init_loc_info(loc_info_t *); + static inline type_t *get_func_return_type(const func_t *func) { return func->def->type->ref;
16 years, 1 month
1
0
0
0
[tkreuzer] 37475: EPROCESS.Session should be a HANDLE.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Nov 19 16:28:26 2008 New Revision: 37475 URL:
http://svn.reactos.org/svn/reactos?rev=37475&view=rev
Log: EPROCESS.Session should be a HANDLE. Modified: branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h Modified: branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h [iso-8859-1] Wed Nov 19 16:28:26 2008 @@ -1265,7 +1265,7 @@ HARDWARE_PTE PageDirectoryPte; ULONGLONG Filler; }; - ULONG Session; + HANDLE Session; CHAR ImageFileName[16]; LIST_ENTRY JobLinks; PVOID LockedPagesList;
16 years, 1 month
1
0
0
0
[tkreuzer] 37474: make use of the new macros in ke/trap.S
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Nov 19 16:03:29 2008 New Revision: 37474 URL:
http://svn.reactos.org/svn/reactos?rev=37474&view=rev
Log: make use of the new macros in ke/trap.S Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Wed Nov 19 16:03:29 2008 @@ -9,13 +9,15 @@ /* INCLUDES ******************************************************************/ //#include <asm.h> -//#include <internal/amd64/asmmacro.S> -.intel_syntax noprefix -.code64 +#include <ndk/amd64/asmmacro.S> /* GLOBALS *******************************************************************/ .data + +.global _MsgUnimplemented +_MsgUnimplemented: +.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n" _MsgPageFault: .ascii "Page fault 0x%x at %p!\n\0" @@ -34,157 +36,275 @@ .text .code64 -.global _KiDivideErrorFault -_KiDivideErrorFault: - /* Push pseudo error code */ - push 0 - - -.global _KiDebugTrapOrFault -_KiDebugTrapOrFault: - /* Push pseudo error code */ - push 0 - -.global _KiNmiInterrupt -_KiNmiInterrupt: - /* Push pseudo error code */ - push 0 - -jmp $ - -.global _KiBreakpointTrap -_KiBreakpointTrap: - /* Push pseudo error code */ - push 0 +.proc KiDivideErrorFault + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiDivideErrorFault + + jmp $ +.endproc + +.proc KiDebugTrapOrFault + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiDebugTrapOrFault + + jmp $ +.endproc + +.proc KiNmiInterrupt + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiNmiInterrupt + + jmp $ +.endproc + +.proc KiBreakpointTrap + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 push rax + .pushreg rax push rcx + .pushreg rcx push rdx - sub rsp, 0x10 - movabs rcx, offset _MsgBreakpointTrap + .allocstack 0x10 + .endprolog + + lea rcx, _MsgBreakpointTrap[rip] mov rdx, [rsp + 0x10 + 24 + 8] - movabs rax, offset _FrLdrDbgPrint + lea rax, _FrLdrDbgPrint[rip] call [rax] + + /* Return */ add rsp, 0x10 - pop rdx pop rcx pop rax add rsp, 8 iretq - -.global _KiOverflowTrap -_KiOverflowTrap: - /* Push pseudo error code */ - push 0 - -.global _KiBoundFault -_KiBoundFault: - /* Push pseudo error code */ - push 0 - -.global _KiInvalidOpcodeFault -_KiInvalidOpcodeFault: - /* Push pseudo error code */ - push 0 - -.global _KiNpxNotAvailableFault -_KiNpxNotAvailableFault: - /* Push pseudo error code */ - push 0 - -.global _KiDoubleFaultAbort -_KiDoubleFaultAbort: - /* Push pseudo error code */ - push 0 - -.global _KiNpxSegmentOverrunAbort -_KiNpxSegmentOverrunAbort: - /* Push pseudo error code */ - push 0 - -.global _KiInvalidTssFault -_KiInvalidTssFault: - /* We have an error code */ - - -.global _KiSegmentNotPresentFault -_KiSegmentNotPresentFault: - /* We have an error code */ - - -.global _KiStackFault -_KiStackFault: - /* We have an error code */ - -jmp $ - - -.global _KiGeneralProtectionFault -_KiGeneralProtectionFault: +.endproc + +.proc KiOverflowTrap + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiOverflowTrap + jmp $ +.endproc + +.proc KiBoundFault + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 8 + + sub rsp, 0x20 + .allocstack 0x20 + + mov [rsp + 8], rbx + .savereg rbx, 8 + + UNIMPLEMENTED KiBoundFault + + jmp $ +.endproc + +.proc KiInvalidOpcodeFault + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiInvalidOpcodeFault + + jmp $ +.endproc + +.proc KiNpxNotAvailableFault + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiNpxNotAvailableFault + + jmp $ +.endproc + +.proc KiDoubleFaultAbort + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiDoubleFaultAbort + + jmp $ +.endproc + +.proc KiNpxSegmentOverrunAbort + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiNpxSegmentOverrunAbort + + jmp $ +.endproc + +.proc KiInvalidTssFault + .pushframe 1 + /* We have an error code */ + + UNIMPLEMENTED KiInvalidTssFault + + jmp $ +.endproc + + +.proc KiSegmentNotPresentFault + .pushframe 1 + /* We have an error code */ + + UNIMPLEMENTED KiSegmentNotPresentFault + + jmp $ +.endproc + +.proc KiStackFault + .pushframe 1 + /* We have an error code */ + + UNIMPLEMENTED KiStackFault + + jmp $ +.endproc + + +.proc KiGeneralProtectionFault + .pushframe 1 /* We have an error code */ mov rdx, 0 mov dx, ss - movabs rcx, offset _MsgGeneralProtFault - movabs rax, offset _FrLdrDbgPrint + lea rcx, _MsgGeneralProtFault[rip] + lea rax, _FrLdrDbgPrint[rip] call [rax] - jmp $ - - -.global _KiPageFault -_KiPageFault: - /* We have an error code */ - movabs rcx, offset _MsgPageFault + + jmp $ +.endproc + + +.proc KiPageFault + .pushframe 1 + /* We have an error code */ + + lea rcx, _MsgPageFault[rip] mov rdx, [rsp] mov r8, [rsp+8] mov r9, rsp - movabs rax, offset _FrLdrDbgPrint + lea rax, _FrLdrDbgPrint[rip] call [rax] - jmp $ - - -.global _KiFloatingErrorFault -_KiFloatingErrorFault: - /* Push pseudo error code */ - push 0 - -.global _KiAlignmentFault -_KiAlignmentFault: - /* We have an error code */ - -.global _KiMcheckAbort -_KiMcheckAbort: - /* Push pseudo error code */ - push 0 - -.global _KiXmmException -_KiXmmException: - /* Push pseudo error code */ - push 0 - -.global _KiApcInterrupt -_KiApcInterrupt: - - -.global _KiRaiseAssertion -_KiRaiseAssertion: -jmp $ - -.global _KiDebugServiceTrap -_KiDebugServiceTrap: - /* Push pseudo error code */ - push 0 + + jmp $ +.endproc + + +.proc KiFloatingErrorFault + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x8 + + UNIMPLEMENTED KiFloatingErrorFault + + jmp $ +.endproc + +.proc KiAlignmentFault + .pushframe 1 + /* We have an error code */ + + UNIMPLEMENTED KiAlignmentFault + + jmp $ +.endproc + +.proc KiMcheckAbort + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x08 + + UNIMPLEMENTED KiMcheckAbort + + jmp $ +.endproc + +.proc KiXmmException + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x08 + + UNIMPLEMENTED KiXmmException + + jmp $ +.endproc + +.proc KiApcInterrupt + .pushframe 1 + + UNIMPLEMENTED KiApcInterrupt + + jmp $ +.endproc + +.proc KiRaiseAssertion + .pushframe 1 + + UNIMPLEMENTED KiRaiseAssertion + + jmp $ +.endproc + +.proc KiDebugServiceTrap + .pushframe 0 + /* Push pseudo error code */ + push 0 + .allocstack 0x08 push rax + .pushreg rax push rcx + .pushreg rcx push rdx + .pushreg rdx push r8 + .pushreg r8 push r9 + .pushreg r9 /* Create stack space for parameters */ sub rsp, 0x18 + .allocstack 0x18 /* just forward first 3 parameters */ call _KdpServiceDispatcher @@ -203,20 +323,32 @@ add rsp, 8 iretq - - -.global _KiDpcInterrupt -_KiDpcInterrupt: - - -.global _KiIpiInterrupt -_KiIpiInterrupt: -jmp $ - - -.global _KiUnexpectedInterrupt -_KiUnexpectedInterrupt: - movabs rcx, offset _MsgUnexpectedInterrupt - movabs rax, offset _FrLdrDbgPrint +.endproc + + +.proc KiDpcInterrupt + .pushframe 1 + jmp $ +.endproc + + +.proc KiIpiInterrupt + .pushframe 1 + jmp $ +.endproc + + +.proc KiUnexpectedInterrupt + .pushframe 0 + push 0 + .allocstack 0x8 + + lea rcx, _MsgUnexpectedInterrupt[rip] + lea rax, _FrLdrDbgPrint[rip] call [rax] - jmp $ + + jmp $ +.endproc + + +
16 years, 1 month
1
0
0
0
[tkreuzer] 37473: Implement RtlCompareMemory is assembly, not used yet.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Nov 19 15:54:37 2008 New Revision: 37473 URL:
http://svn.reactos.org/svn/reactos?rev=37473&view=rev
Log: Implement RtlCompareMemory is assembly, not used yet. Added: branches/ros-amd64-bringup/reactos/lib/rtl/amd64/rtlmem.S (with props) Added: branches/ros-amd64-bringup/reactos/lib/rtl/amd64/rtlmem.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/r…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/rtl/amd64/rtlmem.S (added) +++ branches/ros-amd64-bringup/reactos/lib/rtl/amd64/rtlmem.S [iso-8859-1] Wed Nov 19 15:54:37 2008 @@ -1,0 +1,78 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Run-Time Library + * PURPOSE: Memory functions for amd64 + * FILE: lib/rtl/i386/rtlswap.S + * PROGRAMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/amd64/asmmacro.S> + +/* FUNCTIONS *****************************************************************/ +.intel_syntax noprefix + +/* SIZE_T + * RtlCompareMemory( + * IN CONST VOID *Source1, <rcx> + * IN CONST VOID *Source2, <rdx> + * IN SIZE_T Length <r8> + * ); + */ +.proc RtlCompareMemory + + /* Save registers */ + push rsi + .pushreg rsi + push rdi + .pushreg rdi + + /* Setup registers for compare */ + mov rsi, rcx + mov rdi, rdx + + /* Clear direction flag */ + cli + + /* Get number of qwords */ + mov rcx, r8 + shr rcx, 3 + jz 2f + + /* Compare qwords */ + repe cmpsq + jnz 4f + +2: /* Compare rest */ + mov rcx, r8 + and rcx, 7 + jz 3f + + repe cmpsb + jnz 5f + +3: /* All equal */ + /* Return the full count */ + mov rax, rcx + jmp 6f + +4: /* Not equal after comparing qwords */ + /* Compare the last qword */ + sub rsi, 8 + sub rdi, 8 + mov rcx, 8 + repe cmpsb + +5: /* Not equal after comparing bytes */ + /* Return difference */ + sub rdi, rdx + dec rdi + mov rax, rdi + +6: /* Cleanup and return */ + pop rdi + pop rsi + ret +.endproc + Propchange: branches/ros-amd64-bringup/reactos/lib/rtl/amd64/rtlmem.S ------------------------------------------------------------------------------ svn:eol-style = native
16 years, 1 month
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
66
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Results per page:
10
25
50
100
200