ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2018
----- 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
37 participants
372 discussions
Start a n
N
ew thread
01/01: [WBEMPROX_WINETEST] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71b8c8c1e26b05ce6e9b4…
commit 71b8c8c1e26b05ce6e9b48e2c83bd7816ce8d434 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:48:13 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:48:13 2018 +0100 [WBEMPROX_WINETEST] Sync with Wine 3.0. CORE-14225 --- modules/rostests/winetests/wbemprox/query.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/wbemprox/query.c b/modules/rostests/winetests/wbemprox/query.c index 8ff98036bd..79b09c0966 100644 --- a/modules/rostests/winetests/wbemprox/query.c +++ b/modules/rostests/winetests/wbemprox/query.c @@ -106,8 +106,14 @@ static void test_select( IWbemServices *services ) {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', 'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',' ','w','h','e','r','e',' ', 'a','v','a','i','l','a','b','i','l','i','t','y',' ','=',' ','\'','3','\'',0}; + static const WCHAR query12[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S', + ' ','W','H','E','R','E',' ','N','A','M','E',' ','<','>',' ','N','U','L','L', 0}; + static const WCHAR query13[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S', + ' ','W','H','E','R','E',' ','N','U','L','L',' ','=',' ','N','A','M','E', 0}; static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10, - query11 }; + query11, query12, query13 }; HRESULT hr; IEnumWbemClassObject *result; BSTR wql = SysAllocString( wqlW ); @@ -1012,6 +1018,7 @@ static void test_SystemSecurity( IWbemServices *services ) win_skip( "__SystemSecurity not available\n" ); return; } + IWbemClassObject_Release( reg ); sid_size = sizeof(sid_admin_buffer); ret = CreateWellKnownSid( WinBuiltinAdministratorsSid, NULL, sid_admin, &sid_size ); @@ -1297,6 +1304,7 @@ static void test_PhysicalMemory( IWbemServices *services ) VariantClear( &val ); IWbemClassObject_Release( obj ); + IEnumWbemClassObject_Release( result ); SysFreeString( query ); SysFreeString( wql ); }
6 years, 11 months
1
0
0
0
01/01: [WBEMPROX] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7e99651d65d8c33404119…
commit 7e99651d65d8c33404119d0916d5072813449a8f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:47:34 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:47:34 2018 +0100 [WBEMPROX] Sync with Wine 3.0. CORE-14225 --- dll/win32/wbemprox/builtin.c | 134 +++------------- dll/win32/wbemprox/wql.tab.c | 356 ++++++++++++++++++++++++------------------- dll/win32/wbemprox/wql.y | 36 +++-- media/doc/README.WINE | 2 +- 4 files changed, 241 insertions(+), 287 deletions(-) diff --git a/dll/win32/wbemprox/builtin.c b/dll/win32/wbemprox/builtin.c index bf92d3c35e..d32b72f9fb 100644 --- a/dll/win32/wbemprox/builtin.c +++ b/dll/win32/wbemprox/builtin.c @@ -136,10 +136,6 @@ static const WCHAR prop_codesetW[] = {'C','o','d','e','S','e','t',0}; static const WCHAR prop_commandlineW[] = {'C','o','m','m','a','n','d','L','i','n','e',0}; -#ifndef __REACTOS__ -static const WCHAR prop_configmanagererrorcodeW[] = - {'C','o','n','f','i','g','M','a','n','a','g','e','r','E','r','r','o','r','C','o','d','e',0}; -#endif static const WCHAR prop_countrycodeW[] = {'C','o','u','n','t','r','y','C','o','d','e',0}; static const WCHAR prop_cpustatusW[] = @@ -192,10 +188,6 @@ static const WCHAR prop_domainroleW[] = {'D','o','m','a','i','n','R','o','l','e',0}; static const WCHAR prop_driveW[] = {'D','r','i','v','e',0}; -#ifndef __REACTOS__ -static const WCHAR prop_driverdateW[] = - {'D','r','i','v','e','r','D','a','t','e',0}; -#endif static const WCHAR prop_drivernameW[] = {'D','r','i','v','e','r','N','a','m','e',0}; #ifndef __REACTOS__ @@ -212,8 +204,6 @@ static const WCHAR prop_flavorW[] = {'F','l','a','v','o','r',0}; static const WCHAR prop_freespaceW[] = {'F','r','e','e','S','p','a','c','e',0}; -static const WCHAR prop_freephysicalmemoryW[] = - {'F','r','e','e','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; static const WCHAR prop_handleW[] = {'H','a','n','d','l','e',0}; static const WCHAR prop_horizontalresolutionW[] = @@ -228,10 +218,6 @@ static const WCHAR prop_indexW[] = {'I','n','d','e','x',0}; static const WCHAR prop_installdateW[] = {'I','n','s','t','a','l','l','D','a','t','e',0}; -#ifndef __REACTOS__ -static const WCHAR prop_installeddisplaydriversW[]= - {'I','n','s','t','a','l','l','e','d','D','i','s','p','l','a','y','D','r','i','v','e','r','s',0}; -#endif static const WCHAR prop_interfaceindexW[] = {'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0}; static const WCHAR prop_interfacetypeW[] = @@ -250,8 +236,6 @@ static const WCHAR prop_localdatetimeW[] = {'L','o','c','a','l','D','a','t','e','T','i','m','e',0}; static const WCHAR prop_localeW[] = {'L','o','c','a','l','e',0}; -static const WCHAR prop_locationW[] = - {'L','o','c','a','t','i','o','n',0}; static const WCHAR prop_lockpresentW[] = {'L','o','c','k','P','r','e','s','e','n','t',0}; static const WCHAR prop_macaddressW[] = @@ -298,8 +282,6 @@ static const WCHAR prop_pixelsperxlogicalinchW[] = {'P','i','x','e','l','s','P','e','r','X','L','o','g','i','c','a','l','I','n','c','h',0}; static const WCHAR prop_pnpdeviceidW[] = {'P','N','P','D','e','v','i','c','e','I','D',0}; -static const WCHAR prop_portnameW[] = - {'P','o','r','t','N','a','m','e',0}; static const WCHAR prop_pprocessidW[] = {'P','a','r','e','n','t','P','r','o','c','e','s','s','I','D',0}; static const WCHAR prop_primaryW[] = @@ -344,10 +326,6 @@ static const WCHAR prop_startingoffsetW[] = {'S','t','a','r','t','i','n','g','O','f','f','s','e','t',0}; static const WCHAR prop_stateW[] = {'S','t','a','t','e',0}; -#ifndef __REACTOS__ -static const WCHAR prop_statusW[] = - {'S','t','a','t','u','s',0}; -#endif static const WCHAR prop_statusinfoW[] = {'S','t','a','t','u','s','I','n','f','o',0}; static const WCHAR prop_strvalueW[] = @@ -380,8 +358,6 @@ static const WCHAR prop_varianttypeW[] = {'V','a','r','i','a','n','t','T','y','p','e',0}; static const WCHAR prop_versionW[] = {'V','e','r','s','i','o','n',0}; -static const WCHAR prop_vendorW[] = - {'V','e','n','d','o','r',0}; #ifndef __REACTOS__ static const WCHAR prop_videoarchitectureW[] = {'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0}; @@ -445,8 +421,7 @@ static const struct column col_compsys[] = static const struct column col_compsysproduct[] = { { prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY }, - { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_vendorW, CIM_STRING }, + { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC } }; static const struct column col_datafile[] = { @@ -554,7 +529,6 @@ static const struct column col_os[] = { prop_systemdirectoryW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_totalvirtualmemorysizeW, CIM_UINT64 }, { prop_totalvisiblememorysizeW, CIM_UINT64 }, - { prop_freephysicalmemoryW, CIM_UINT64 }, { prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC } }; static const struct column col_param[] = @@ -584,10 +558,7 @@ static const struct column col_printer[] = { prop_horizontalresolutionW, CIM_UINT32 }, { prop_localW, CIM_BOOLEAN }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_networkW, CIM_BOOLEAN }, - { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, - { prop_portnameW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_locationW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_networkW, CIM_BOOLEAN } }; static const struct column col_process[] = { @@ -689,28 +660,24 @@ static const struct column col_systemsecurity[] = #ifndef __REACTOS__ static const struct column col_videocontroller[] = { - { prop_adapterdactypeW, CIM_STRING }, - { prop_adapterramW, CIM_UINT32, VT_I4 }, - { prop_availabilityW, CIM_UINT16 }, - { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_configmanagererrorcodeW, CIM_UINT32, VT_I4 }, - { prop_currentbitsperpixelW, CIM_UINT32, VT_I4 }, - { prop_currenthorizontalresW, CIM_UINT32, VT_I4 }, - { prop_currentrefreshrateW, CIM_UINT32, VT_I4 }, - { prop_currentscanmodeW, CIM_UINT16, VT_I4 }, - { prop_currentverticalresW, CIM_UINT32, VT_I4 }, - { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_deviceidW, CIM_STRING|COL_FLAG_KEY }, - { prop_driverdateW, CIM_DATETIME }, - { prop_driverversionW, CIM_STRING }, - { prop_installeddisplaydriversW,CIM_STRING }, - { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_statusW, CIM_STRING }, - { prop_videoarchitectureW, CIM_UINT16, VT_I4 }, - { prop_videomemorytypeW, CIM_UINT16, VT_I4 }, - { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_adapterdactypeW, CIM_STRING }, + { prop_adapterramW, CIM_UINT32, VT_I4 }, + { prop_availabilityW, CIM_UINT16 }, + { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_currentbitsperpixelW, CIM_UINT32, VT_I4 }, + { prop_currenthorizontalresW, CIM_UINT32, VT_I4 }, + { prop_currentrefreshrateW, CIM_UINT32, VT_I4 }, + { prop_currentscanmodeW, CIM_UINT16, VT_I4 }, + { prop_currentverticalresW, CIM_UINT32, VT_I4 }, + { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_deviceidW, CIM_STRING|COL_FLAG_KEY }, + { prop_driverversionW, CIM_STRING }, + { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_videoarchitectureW, CIM_UINT16, VT_I4 }, + { prop_videomemorytypeW, CIM_UINT16, VT_I4 }, + { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC } }; #endif @@ -758,8 +725,6 @@ static const WCHAR compsysproduct_identifyingnumberW[] = static const WCHAR compsysproduct_uuidW[] = {'d','e','a','d','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-', 'd','e','a','d','d','e','a','d','d','e','a','d',0}; -static const WCHAR compsysproduct_vendorW[] = - {'W','i','n','e',0}; static const WCHAR diskdrive_interfacetypeW[] = {'I','D','E',0}; static const WCHAR diskdrive_manufacturerW[] = @@ -801,12 +766,8 @@ static const WCHAR videocontroller_dactypeW[] = {'I','n','t','e','g','r','a','t','e','d',' ','R','A','M','D','A','C',0}; static const WCHAR videocontroller_deviceidW[] = {'V','i','d','e','o','C','o','n','t','r','o','l','l','e','r','1',0}; -static const WCHAR videocontroller_driverDateW[] = - {'2','0','1','7','0','1','0','1','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0}; static const WCHAR videocontroller_driverversionW[] = {'1','.','0',0}; -static const WCHAR videocontroller_statusW[] = - {'O','K',0}; #endif #include "pshpack1.h" @@ -856,7 +817,6 @@ struct record_computersystemproduct { const WCHAR *identifyingnumber; const WCHAR *uuid; - const WCHAR *vendor; }; struct record_datafile { @@ -964,7 +924,6 @@ struct record_operatingsystem const WCHAR *systemdirectory; UINT64 totalvirtualmemorysize; UINT64 totalvisiblememorysize; - UINT64 freephysicalmemory; const WCHAR *version; }; struct record_param @@ -995,9 +954,6 @@ struct record_printer int local; const WCHAR *name; int network; - const WCHAR *device_id; - const WCHAR *portname; - const WCHAR *location; }; struct record_process { @@ -1101,7 +1057,6 @@ struct record_videocontroller UINT32 adapter_ram; UINT16 availability; const WCHAR *caption; - UINT32 config_errorcode; UINT32 current_bitsperpixel; UINT32 current_horizontalres; UINT32 current_refreshrate; @@ -1109,12 +1064,9 @@ struct record_videocontroller UINT32 current_verticalres; const WCHAR *description; const WCHAR *device_id; - const WCHAR *driverdate; const WCHAR *driverversion; - const WCHAR *installeddriver; const WCHAR *name; const WCHAR *pnpdevice_id; - const WCHAR *status; UINT16 videoarchitecture; UINT16 videomemorytype; const WCHAR *videomodedescription; @@ -1338,15 +1290,6 @@ static UINT64 get_total_physical_memory(void) return status.ullTotalPhys; } -static UINT64 get_available_physical_memory(void) -{ - MEMORYSTATUSEX status; - - status.dwLength = sizeof(status); - if (!GlobalMemoryStatusEx( &status )) return 1024 * 1024 * 1024; - return status.ullAvailPhys; -} - static WCHAR *get_computername(void) { WCHAR *ret; @@ -1461,7 +1404,6 @@ static enum fill_status fill_compsysproduct( struct table *table, const struct e rec = (struct record_computersystemproduct *)table->data; rec->identifyingnumber = compsysproduct_identifyingnumberW; rec->uuid = get_compsysproduct_uuid(); - rec->vendor = compsysproduct_vendorW; if (!match_row( table, row, cond, &status )) free_row_values( table, row ); else row++; @@ -2114,7 +2056,7 @@ static enum fill_status fill_ip4routetable( struct table *table, const struct ex heap_free( forwards ); return FILL_STATUS_FAILED; } - if (!resize_table( table, forwards->dwNumEntries, sizeof(*rec) )) + if (!resize_table( table, max(forwards->dwNumEntries, 1), sizeof(*rec) )) { heap_free( forwards ); return FILL_STATUS_FAILED; @@ -2474,12 +2416,10 @@ static enum fill_status fill_physicalmemory( struct table *table, const struct e static enum fill_status fill_printer( struct table *table, const struct expr *cond ) { - static const WCHAR fmtW[] = {'P','r','i','n','t','e','r','%','d',0}; struct record_printer *rec; enum fill_status status = FILL_STATUS_UNFILTERED; PRINTER_INFO_2W *info; DWORD i, offset = 0, count = 0, size = 0, num_rows = 0; - WCHAR id[20]; EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &size, &count ); if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) return FILL_STATUS_FAILED; @@ -2505,10 +2445,6 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co rec->local = -1; rec->name = heap_strdupW( info[i].pPrinterName ); rec->network = 0; - sprintfW( id, fmtW, i ); - rec->device_id = heap_strdupW( id ); - rec->portname = heap_strdupW( info[i].pPortName ); - rec->location = heap_strdupW( info[i].pLocation ); if (!match_row( table, i, cond, &status )) { free_row_values( table, i ); @@ -2937,7 +2873,6 @@ static enum fill_status fill_os( struct table *table, const struct expr *cond ) rec->systemdirectory = get_systemdirectory(); rec->totalvirtualmemorysize = get_total_physical_memory() / 1024; rec->totalvisiblememorysize = rec->totalvirtualmemorysize; - rec->freephysicalmemory = get_available_physical_memory() / 1024; rec->version = get_osversion( &ver ); if (!match_row( table, row, cond, &status )) free_row_values( table, row ); else row++; @@ -3225,29 +3160,6 @@ static WCHAR *get_pnpdeviceid( DXGI_ADAPTER_DESC *desc ) return ret; } -#define HW_VENDOR_AMD 0x1002 -#define HW_VENDOR_NVIDIA 0x10de -#define HW_VENDOR_VMWARE 0x15ad -#define HW_VENDOR_INTEL 0x8086 - -static const WCHAR* get_video_driver(UINT vendorid) -{ - static const WCHAR driver_amdW[] = {'a','t','i','c','f','x','3','2','.','d','l','l',0}; - static const WCHAR driver_intelW[] = {'i','g','d','u','m','d','i','m','3','2','.','d','l','l',0}; - static const WCHAR driver_nvidiaW[] = {'n','v','d','3','d','u','m','.','d','l','l',0}; - static const WCHAR driver_wineW[] = {'w','i','n','e','.','d','l','l',0}; - - /* FIXME: wined3d has a better table, but we can not access this information through dxgi */ - - if (vendorid == HW_VENDOR_AMD) - return driver_amdW; - else if (vendorid == HW_VENDOR_NVIDIA) - return driver_nvidiaW; - else if (vendorid == HW_VENDOR_INTEL) - return driver_intelW; - return driver_wineW; -} - static enum fill_status fill_videocontroller( struct table *table, const struct expr *cond ) { static const WCHAR fmtW[] = {'%','u',' ','x',' ','%','u',' ','x',' ','%','I','6','4','u',' ','c','o','l','o','r','s',0}; @@ -3282,7 +3194,6 @@ done: rec->adapter_dactype = videocontroller_dactypeW; rec->adapter_ram = vidmem; rec->availability = 3; /* Running or Full Power */ - rec->config_errorcode = 0; /* no error */ rec->caption = heap_strdupW( name ); rec->current_bitsperpixel = get_bits_per_pixel( &hres, &vres ); rec->current_horizontalres = hres; @@ -3291,12 +3202,9 @@ done: rec->current_verticalres = vres; rec->description = heap_strdupW( name ); rec->device_id = videocontroller_deviceidW; - rec->driverdate = videocontroller_driverDateW; rec->driverversion = videocontroller_driverversionW; - rec->installeddriver = get_video_driver( desc.VendorId ); rec->name = heap_strdupW( name ); rec->pnpdevice_id = get_pnpdeviceid( &desc ); - rec->status = videocontroller_statusW; rec->videoarchitecture = 2; /* Unknown */ rec->videomemorytype = 2; /* Unknown */ wsprintfW( mode, fmtW, hres, vres, (UINT64)1 << rec->current_bitsperpixel ); diff --git a/dll/win32/wbemprox/wql.tab.c b/dll/win32/wbemprox/wql.tab.c index 91b7ac46bf..4eaadd0818 100644 --- a/dll/win32/wbemprox/wql.tab.c +++ b/dll/win32/wbemprox/wql.tab.c @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0. */ /* Bison implementation for Yacc-like parsers in C @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -243,13 +243,13 @@ static int wql_lex( void *val, struct parser *parser ); result = current_view -#line 259 "wql.tab.c" /* yacc.c:339 */ +#line 247 "wql.tab.c" /* yacc.c:339 */ -# ifndef YY_NULLPTR +# ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# define YY_NULL nullptr # else -# define YY_NULLPTR 0 +# define YY_NULL 0 # endif # endif @@ -261,7 +261,10 @@ static int wql_lex( void *val, struct parser *parser ); # define YYERROR_VERBOSE 1 #endif - +/* In a future release of Bison, this section will be replaced + by #include "wql.tab.h". */ +#ifndef YY_WQL_E_REACTOSSYNC3_0_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED +# define YY_WQL_E_REACTOSSYNC3_0_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -312,7 +315,7 @@ extern int wql_debug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 194 "wql.y" /* yacc.c:355 */ +#line 182 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:355 */ struct string str; WCHAR *string; @@ -321,7 +324,7 @@ union YYSTYPE struct expr *expr; int integer; -#line 337 "wql.tab.c" /* yacc.c:355 */ +#line 328 "wql.tab.c" /* yacc.c:355 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -331,11 +334,11 @@ union YYSTYPE int wql_parse (struct parser *ctx); - +#endif /* !YY_WQL_E_REACTOSSYNC3_0_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ -#line 351 "wql.tab.c" /* yacc.c:358 */ +#line 342 "wql.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -392,30 +395,11 @@ typedef short int yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if (! defined __GNUC__ || __GNUC__ < 2 \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) +# define __attribute__(Spec) /* empty */ # endif #endif @@ -577,16 +561,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 9 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 68 +#define YYLAST 85 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 32 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 10 /* YYNRULES -- Number of rules. */ -#define YYNRULES 36 +#define YYNRULES 40 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 67 +#define YYNSTATES 74 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -635,10 +619,11 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 221, 221, 233, 245, 260, 261, 265, 272, 278, - 287, 296, 303, 309, 315, 321, 327, 333, 339, 345, - 351, 357, 363, 369, 375, 381, 387, 393, 399, 405, - 411, 420, 429, 438, 444, 450, 456 + 0, 209, 209, 221, 233, 248, 249, 253, 260, 266, + 275, 284, 291, 297, 303, 309, 315, 321, 327, 333, + 339, 345, 351, 357, 363, 369, 375, 381, 387, 393, + 399, 405, 411, 417, 423, 432, 441, 450, 456, 462, + 468 }; #endif @@ -653,7 +638,7 @@ static const char *const yytname[] = "TK_ILLEGAL", "TK_BY", "TK_STRING", "TK_ID", "TK_OR", "TK_AND", "TK_NOT", "TK_EQ", "TK_NE", "TK_LT", "TK_GT", "TK_LE", "TK_GE", "TK_LIKE", "$accept", "select", "proplist", "prop", "id", "number", "expr", - "string_val", "prop_val", "const_val", YY_NULLPTR + "string_val", "prop_val", "const_val", YY_NULL }; #endif @@ -669,10 +654,10 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -18 +#define YYPACT_NINF -23 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-18))) + (!!((Yystate) == (-23))) #define YYTABLE_NINF -1 @@ -683,13 +668,14 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int8 yypact[] = { - 7, 3, 12, -5, -18, -18, 24, 29, 35, -18, - -18, -5, 4, -5, 21, -18, -18, 17, 17, -18, - -18, -18, -18, 17, -18, -18, 11, -8, 25, 22, - -18, 17, 17, 16, -9, -9, -9, -9, -9, -9, - 23, -5, -5, -5, -5, -5, -5, -18, 45, -18, - -18, 37, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18 + -2, 10, 34, 14, -23, -23, 29, 48, 46, -23, + -23, 14, 11, 14, 42, -23, -23, 28, 28, -16, + -23, -23, -23, -23, 28, -23, -23, 22, -8, -22, + 33, 14, 14, -23, 28, 28, 27, 50, 54, 59, + 59, 59, 59, 39, 14, 14, 14, 14, 14, 14, + -23, -23, -23, 52, -23, -23, 58, -23, -23, -23, + -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, + -23, -23, -23, -23 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -698,24 +684,25 @@ static const yytype_int8 yypact[] = static const yytype_uint8 yydefact[] = { 0, 0, 0, 0, 7, 10, 0, 5, 9, 1, - 2, 0, 0, 0, 3, 6, 8, 0, 0, 36, - 35, 11, 34, 0, 32, 33, 4, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 12, 14, 13, - 29, 0, 16, 21, 18, 17, 19, 20, 31, 28, - 22, 27, 24, 23, 25, 26, 30 + 2, 0, 0, 0, 3, 6, 8, 0, 0, 0, + 40, 39, 11, 38, 0, 36, 37, 4, 0, 0, + 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 32, 34, 14, 13, 29, 0, 31, 16, 33, + 21, 18, 17, 19, 20, 35, 28, 22, 27, 24, + 23, 25, 26, 30 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -18, -18, 34, 1, 36, -18, -17, -18, 15, 28 + -23, -23, 64, 1, 47, -23, 12, -23, -20, 43 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 2, 6, 24, 8, 25, 26, 59, 27, 28 + -1, 2, 6, 25, 8, 26, 27, 66, 28, 29 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -723,24 +710,28 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 33, 29, 7, 19, 20, 21, 30, 3, 4, 4, - 1, 22, 9, 7, 48, 49, 5, 34, 35, 36, - 37, 38, 39, 40, 5, 5, 18, 50, 11, 19, - 20, 21, 47, 31, 32, 12, 17, 22, 5, 10, - 51, 23, 13, 58, 31, 32, 15, 14, 66, 16, - 41, 42, 43, 44, 45, 46, 60, 61, 62, 63, - 64, 65, 52, 53, 54, 55, 56, 57, 32 + 36, 1, 7, 44, 45, 46, 47, 48, 49, 31, + 32, 51, 52, 7, 3, 4, 4, 37, 38, 39, + 40, 41, 42, 43, 67, 68, 69, 70, 71, 72, + 30, 5, 5, 11, 9, 5, 33, 18, 55, 19, + 20, 21, 22, 50, 34, 35, 53, 54, 23, 5, + 10, 56, 24, 13, 12, 34, 35, 17, 14, 65, + 16, 57, 20, 21, 22, 59, 20, 21, 22, 73, + 23, 20, 21, 22, 23, 35, 15, 0, 0, 23, + 58, 60, 61, 62, 63, 64 }; -static const yytype_uint8 yycheck[] = +static const yytype_int8 yycheck[] = { - 8, 18, 1, 12, 13, 14, 23, 4, 5, 5, - 3, 20, 0, 12, 31, 32, 21, 25, 26, 27, - 28, 29, 30, 31, 21, 21, 9, 11, 4, 12, - 13, 14, 10, 22, 23, 6, 15, 20, 21, 3, - 24, 24, 7, 20, 22, 23, 12, 11, 11, 13, - 25, 26, 27, 28, 29, 30, 41, 42, 43, 44, - 45, 46, 34, 35, 36, 37, 38, 39, 23 + 8, 3, 1, 25, 26, 27, 28, 29, 30, 25, + 26, 31, 32, 12, 4, 5, 5, 25, 26, 27, + 28, 29, 30, 31, 44, 45, 46, 47, 48, 49, + 18, 21, 21, 4, 0, 21, 24, 9, 11, 11, + 12, 13, 14, 10, 22, 23, 34, 35, 20, 21, + 3, 24, 24, 7, 6, 22, 23, 15, 11, 20, + 13, 11, 12, 13, 14, 11, 12, 13, 14, 11, + 20, 12, 13, 14, 20, 23, 12, -1, -1, 20, + 37, 38, 39, 40, 41, 42 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -748,12 +739,13 @@ static const yytype_uint8 yycheck[] = static const yytype_uint8 yystos[] = { 0, 3, 33, 4, 5, 21, 34, 35, 36, 0, - 36, 4, 6, 7, 36, 34, 36, 15, 9, 12, - 13, 14, 20, 24, 35, 37, 38, 40, 41, 38, - 38, 22, 23, 8, 25, 26, 27, 28, 29, 30, - 31, 25, 26, 27, 28, 29, 30, 10, 38, 38, - 11, 24, 41, 41, 41, 41, 41, 41, 20, 39, - 40, 40, 40, 40, 40, 40, 11 + 36, 4, 6, 7, 36, 34, 36, 15, 9, 11, + 12, 13, 14, 20, 24, 35, 37, 38, 40, 41, + 38, 25, 26, 38, 22, 23, 8, 25, 26, 27, + 28, 29, 30, 31, 25, 26, 27, 28, 29, 30, + 10, 40, 40, 38, 38, 11, 24, 11, 41, 11, + 41, 41, 41, 41, 41, 20, 39, 40, 40, 40, + 40, 40, 40, 11 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -762,7 +754,8 @@ static const yytype_uint8 yyr1[] = 0, 32, 33, 33, 33, 34, 34, 34, 35, 35, 36, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 39, 40, 41, 41, 41, 41 + 38, 38, 38, 38, 38, 39, 40, 41, 41, 41, + 41 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -771,7 +764,8 @@ static const yytype_uint8 yyr2[] = 0, 2, 3, 4, 6, 1, 3, 1, 3, 1, 1, 1, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 1, 1, 1, 1, 1, 1 + 4, 3, 3, 3, 3, 1, 1, 1, 1, 1, + 1 }; @@ -1056,11 +1050,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; + const char *yyformat = YY_NULL; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1117,7 +1111,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1454,7 +1448,7 @@ yyreduce: switch (yyn) { case 2: -#line 222 "wql.y" /* yacc.c:1646 */ +#line 210 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { HRESULT hr; struct parser *parser = ctx; @@ -1466,11 +1460,11 @@ yyreduce: PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); } -#line 1482 "wql.tab.c" /* yacc.c:1646 */ +#line 1464 "wql.tab.c" /* yacc.c:1646 */ break; case 3: -#line 234 "wql.y" /* yacc.c:1646 */ +#line 222 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { HRESULT hr; struct parser *parser = ctx; @@ -1482,11 +1476,11 @@ yyreduce: PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); } -#line 1498 "wql.tab.c" /* yacc.c:1646 */ +#line 1480 "wql.tab.c" /* yacc.c:1646 */ break; case 4: -#line 246 "wql.y" /* yacc.c:1646 */ +#line 234 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { HRESULT hr; struct parser *parser = ctx; @@ -1498,315 +1492,355 @@ yyreduce: PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); } -#line 1514 "wql.tab.c" /* yacc.c:1646 */ +#line 1496 "wql.tab.c" /* yacc.c:1646 */ break; case 6: -#line 262 "wql.y" /* yacc.c:1646 */ +#line 250 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyvsp[-2].proplist)->next = (yyvsp[0].proplist); } -#line 1522 "wql.tab.c" /* yacc.c:1646 */ +#line 1504 "wql.tab.c" /* yacc.c:1646 */ break; case 7: -#line 266 "wql.y" /* yacc.c:1646 */ +#line 254 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.proplist) = NULL; } -#line 1530 "wql.tab.c" /* yacc.c:1646 */ +#line 1512 "wql.tab.c" /* yacc.c:1646 */ break; case 8: -#line 273 "wql.y" /* yacc.c:1646 */ +#line 261 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.proplist) = alloc_property( ctx, (yyvsp[-2].string), (yyvsp[0].string) ); if (!(yyval.proplist)) YYABORT; } -#line 1540 "wql.tab.c" /* yacc.c:1646 */ +#line 1522 "wql.tab.c" /* yacc.c:1646 */ break; case 9: -#line 279 "wql.y" /* yacc.c:1646 */ +#line 267 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.proplist) = alloc_property( ctx, NULL, (yyvsp[0].string) ); if (!(yyval.proplist)) YYABORT; } -#line 1550 "wql.tab.c" /* yacc.c:1646 */ +#line 1532 "wql.tab.c" /* yacc.c:1646 */ break; case 10: -#line 288 "wql.y" /* yacc.c:1646 */ +#line 276 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.string) = get_string( ctx, &(yyvsp[0].str) ); if (!(yyval.string)) YYABORT; } -#line 1560 "wql.tab.c" /* yacc.c:1646 */ +#line 1542 "wql.tab.c" /* yacc.c:1646 */ break; case 11: -#line 297 "wql.y" /* yacc.c:1646 */ +#line 285 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.integer) = get_int( ctx ); } -#line 1568 "wql.tab.c" /* yacc.c:1646 */ +#line 1550 "wql.tab.c" /* yacc.c:1646 */ break; case 12: -#line 304 "wql.y" /* yacc.c:1646 */ +#line 292 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); if (!(yyval.expr)) YYABORT; } -#line 1578 "wql.tab.c" /* yacc.c:1646 */ +#line 1560 "wql.tab.c" /* yacc.c:1646 */ break; case 13: -#line 310 "wql.y" /* yacc.c:1646 */ +#line 298 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_AND, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1588 "wql.tab.c" /* yacc.c:1646 */ +#line 1570 "wql.tab.c" /* yacc.c:1646 */ break; case 14: -#line 316 "wql.y" /* yacc.c:1646 */ +#line 304 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_OR, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1598 "wql.tab.c" /* yacc.c:1646 */ +#line 1580 "wql.tab.c" /* yacc.c:1646 */ break; case 15: -#line 322 "wql.y" /* yacc.c:1646 */ +#line 310 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_NOT ); if (!(yyval.expr)) YYABORT; } -#line 1608 "wql.tab.c" /* yacc.c:1646 */ +#line 1590 "wql.tab.c" /* yacc.c:1646 */ break; case 16: -#line 328 "wql.y" /* yacc.c:1646 */ +#line 316 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_EQ, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1618 "wql.tab.c" /* yacc.c:1646 */ +#line 1600 "wql.tab.c" /* yacc.c:1646 */ break; case 17: -#line 334 "wql.y" /* yacc.c:1646 */ +#line 322 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GT, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1628 "wql.tab.c" /* yacc.c:1646 */ +#line 1610 "wql.tab.c" /* yacc.c:1646 */ break; case 18: -#line 340 "wql.y" /* yacc.c:1646 */ +#line 328 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LT, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1638 "wql.tab.c" /* yacc.c:1646 */ +#line 1620 "wql.tab.c" /* yacc.c:1646 */ break; case 19: -#line 346 "wql.y" /* yacc.c:1646 */ +#line 334 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LE, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1648 "wql.tab.c" /* yacc.c:1646 */ +#line 1630 "wql.tab.c" /* yacc.c:1646 */ break; case 20: -#line 352 "wql.y" /* yacc.c:1646 */ +#line 340 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GE, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1658 "wql.tab.c" /* yacc.c:1646 */ +#line 1640 "wql.tab.c" /* yacc.c:1646 */ break; case 21: -#line 358 "wql.y" /* yacc.c:1646 */ +#line 346 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_NE, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1668 "wql.tab.c" /* yacc.c:1646 */ +#line 1650 "wql.tab.c" /* yacc.c:1646 */ break; case 22: -#line 364 "wql.y" /* yacc.c:1646 */ +#line 352 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_EQ, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1678 "wql.tab.c" /* yacc.c:1646 */ +#line 1660 "wql.tab.c" /* yacc.c:1646 */ break; case 23: -#line 370 "wql.y" /* yacc.c:1646 */ +#line 358 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GT, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1688 "wql.tab.c" /* yacc.c:1646 */ +#line 1670 "wql.tab.c" /* yacc.c:1646 */ break; case 24: -#line 376 "wql.y" /* yacc.c:1646 */ +#line 364 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LT, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1698 "wql.tab.c" /* yacc.c:1646 */ +#line 1680 "wql.tab.c" /* yacc.c:1646 */ break; case 25: -#line 382 "wql.y" /* yacc.c:1646 */ +#line 370 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LE, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1708 "wql.tab.c" /* yacc.c:1646 */ +#line 1690 "wql.tab.c" /* yacc.c:1646 */ break; case 26: -#line 388 "wql.y" /* yacc.c:1646 */ +#line 376 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GE, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1718 "wql.tab.c" /* yacc.c:1646 */ +#line 1700 "wql.tab.c" /* yacc.c:1646 */ break; case 27: -#line 394 "wql.y" /* yacc.c:1646 */ +#line 382 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_NE, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1728 "wql.tab.c" /* yacc.c:1646 */ +#line 1710 "wql.tab.c" /* yacc.c:1646 */ break; case 28: -#line 400 "wql.y" /* yacc.c:1646 */ +#line 388 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LIKE, (yyvsp[0].expr) ); if (!(yyval.expr)) YYABORT; } -#line 1738 "wql.tab.c" /* yacc.c:1646 */ +#line 1720 "wql.tab.c" /* yacc.c:1646 */ break; case 29: -#line 406 "wql.y" /* yacc.c:1646 */ +#line 394 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_ISNULL ); if (!(yyval.expr)) YYABORT; } -#line 1748 "wql.tab.c" /* yacc.c:1646 */ +#line 1730 "wql.tab.c" /* yacc.c:1646 */ break; case 30: -#line 412 "wql.y" /* yacc.c:1646 */ +#line 400 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_unary( ctx, (yyvsp[-3].expr), OP_NOTNULL ); if (!(yyval.expr)) YYABORT; } -#line 1758 "wql.tab.c" /* yacc.c:1646 */ +#line 1740 "wql.tab.c" /* yacc.c:1646 */ break; case 31: -#line 421 "wql.y" /* yacc.c:1646 */ +#line 406 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); + (yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_ISNULL ); if (!(yyval.expr)) YYABORT; } -#line 1768 "wql.tab.c" /* yacc.c:1646 */ +#line 1750 "wql.tab.c" /* yacc.c:1646 */ break; case 32: -#line 430 "wql.y" /* yacc.c:1646 */ +#line 412 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_propval( ctx, (yyvsp[0].proplist) ); + (yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_ISNULL ); if (!(yyval.expr)) YYABORT; } -#line 1778 "wql.tab.c" /* yacc.c:1646 */ +#line 1760 "wql.tab.c" /* yacc.c:1646 */ break; case 33: -#line 439 "wql.y" /* yacc.c:1646 */ +#line 418 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_ival( ctx, (yyvsp[0].integer) ); + (yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_NOTNULL ); if (!(yyval.expr)) YYABORT; } -#line 1788 "wql.tab.c" /* yacc.c:1646 */ +#line 1770 "wql.tab.c" /* yacc.c:1646 */ break; case 34: -#line 445 "wql.y" /* yacc.c:1646 */ +#line 424 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); + (yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_NOTNULL ); if (!(yyval.expr)) YYABORT; } -#line 1798 "wql.tab.c" /* yacc.c:1646 */ +#line 1780 "wql.tab.c" /* yacc.c:1646 */ break; case 35: -#line 451 "wql.y" /* yacc.c:1646 */ +#line 433 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_bval( ctx, -1 ); + (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); if (!(yyval.expr)) YYABORT; } -#line 1808 "wql.tab.c" /* yacc.c:1646 */ +#line 1790 "wql.tab.c" /* yacc.c:1646 */ break; case 36: -#line 457 "wql.y" /* yacc.c:1646 */ +#line 442 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ + { + (yyval.expr) = expr_propval( ctx, (yyvsp[0].proplist) ); + if (!(yyval.expr)) + YYABORT; + } +#line 1800 "wql.tab.c" /* yacc.c:1646 */ + break; + + case 37: +#line 451 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ + { + (yyval.expr) = expr_ival( ctx, (yyvsp[0].integer) ); + if (!(yyval.expr)) + YYABORT; + } +#line 1810 "wql.tab.c" /* yacc.c:1646 */ + break; + + case 38: +#line 457 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ + { + (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); + if (!(yyval.expr)) + YYABORT; + } +#line 1820 "wql.tab.c" /* yacc.c:1646 */ + break; + + case 39: +#line 463 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ + { + (yyval.expr) = expr_bval( ctx, -1 ); + if (!(yyval.expr)) + YYABORT; + } +#line 1830 "wql.tab.c" /* yacc.c:1646 */ + break; + + case 40: +#line 469 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_bval( ctx, 0 ); if (!(yyval.expr)) YYABORT; } -#line 1818 "wql.tab.c" /* yacc.c:1646 */ +#line 1840 "wql.tab.c" /* yacc.c:1646 */ break; -#line 1822 "wql.tab.c" /* yacc.c:1646 */ +#line 1844 "wql.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2034,7 +2068,7 @@ yyreturn: #endif return yyresult; } -#line 464 "wql.y" /* yacc.c:1906 */ +#line 476 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1906 */ HRESULT parse_query( const WCHAR *str, struct view **view, struct list *mem ) diff --git a/dll/win32/wbemprox/wql.y b/dll/win32/wbemprox/wql.y index 98b0378677..beba2de08a 100644 --- a/dll/win32/wbemprox/wql.y +++ b/dll/win32/wbemprox/wql.y @@ -18,20 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wbemcli.h" #include "wbemprox_private.h" -#include "wine/list.h" -#include "wine/debug.h" -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(wbemprox); - struct parser { const WCHAR *cmd; @@ -414,6 +402,30 @@ expr: if (!$$) YYABORT; } + | prop_val TK_EQ TK_NULL + { + $$ = expr_unary( ctx, $1, OP_ISNULL ); + if (!$$) + YYABORT; + } + | TK_NULL TK_EQ prop_val + { + $$ = expr_unary( ctx, $3, OP_ISNULL ); + if (!$$) + YYABORT; + } + | prop_val TK_NE TK_NULL + { + $$ = expr_unary( ctx, $1, OP_NOTNULL ); + if (!$$) + YYABORT; + } + | TK_NULL TK_NE prop_val + { + $$ = expr_unary( ctx, $3, OP_NOTNULL ); + if (!$$) + YYABORT; + } ; string_val: diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 84c078affb..b94e76dc58 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -195,7 +195,7 @@ reactos/dll/win32/vbscript # Synced to Wine-3.0 reactos/dll/win32/version # Synced to Wine-3.0 reactos/dll/win32/vssapi # Synced to WineStaging-2.9 reactos/dll/win32/wbemdisp # Synced to Wine-3.0 -reactos/dll/win32/wbemprox # Synced to WineStaging-2.16 +reactos/dll/win32/wbemprox # Synced to Wine-3.0 reactos/dll/win32/windowscodecs # Synced to WineStaging-2.16 reactos/dll/win32/windowscodecsext # Synced to WineStaging-2.9 reactos/dll/win32/winemp3.acm # Synced to WineStaging-2.16
6 years, 11 months
1
0
0
0
01/01: [WBEMDISP] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b99f0b4922a455db7f535…
commit b99f0b4922a455db7f535dc658150383d48d33a0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:45:23 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:45:23 2018 +0100 [WBEMDISP] Sync with Wine 3.0. CORE-14225 --- dll/win32/wbemdisp/locator.c | 249 +------------------------------------------ media/doc/README.WINE | 2 +- 2 files changed, 6 insertions(+), 245 deletions(-) diff --git a/dll/win32/wbemdisp/locator.c b/dll/win32/wbemdisp/locator.c index 1fb5ee44dc..951e4648d0 100644 --- a/dll/win32/wbemdisp/locator.c +++ b/dll/win32/wbemdisp/locator.c @@ -21,7 +21,6 @@ #include <wbemcli.h> static HRESULT EnumVARIANT_create( IEnumWbemClassObject *, IEnumVARIANT ** ); -static HRESULT ISWbemSecurity_create( ISWbemSecurity ** ); enum type_id { @@ -31,7 +30,6 @@ enum type_id ISWbemProperty_tid, ISWbemPropertySet_tid, ISWbemServices_tid, - ISWbemSecurity_tid, last_tid }; @@ -45,8 +43,7 @@ static REFIID wbemdisp_tid_id[] = &IID_ISWbemObjectSet, &IID_ISWbemProperty, &IID_ISWbemPropertySet, - &IID_ISWbemServices, - &IID_ISWbemSecurity + &IID_ISWbemServices }; static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret ) @@ -1859,12 +1856,8 @@ static HRESULT WINAPI services_get_Security_( ISWbemServices *iface, ISWbemSecurity **objWbemSecurity ) { - TRACE( "%p, %p\n", iface, objWbemSecurity ); - - if (!objWbemSecurity) - return E_INVALIDARG; - - return ISWbemSecurity_create( objWbemSecurity ); + FIXME( "\n" ); + return E_NOTIMPL; } static const ISWbemServicesVtbl services_vtbl = @@ -2118,12 +2111,8 @@ static HRESULT WINAPI locator_get_Security_( ISWbemLocator *iface, ISWbemSecurity **objWbemSecurity ) { - TRACE( "%p, %p\n", iface, objWbemSecurity ); - - if (!objWbemSecurity) - return E_INVALIDARG; - - return ISWbemSecurity_create( objWbemSecurity ); + FIXME( "%p, %p\n", iface, objWbemSecurity ); + return E_NOTIMPL; } static const ISWbemLocatorVtbl locator_vtbl = @@ -2154,231 +2143,3 @@ HRESULT SWbemLocator_create( void **obj ) TRACE( "returning iface %p\n", *obj ); return S_OK; } - -struct security -{ - ISWbemSecurity ISWbemSecurity_iface; - LONG refs; - WbemImpersonationLevelEnum implevel; - WbemAuthenticationLevelEnum authlevel; -}; - -static inline struct security *impl_from_ISWbemSecurity( ISWbemSecurity *iface ) -{ - return CONTAINING_RECORD( iface, struct security, ISWbemSecurity_iface ); -} - -static ULONG WINAPI security_AddRef( - ISWbemSecurity *iface ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - return InterlockedIncrement( &security->refs ); -} - -static ULONG WINAPI security_Release( - ISWbemSecurity *iface ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - LONG refs = InterlockedDecrement( &security->refs ); - if (!refs) - { - TRACE( "destroying %p\n", security ); - heap_free( security ); - } - return refs; -} - -static HRESULT WINAPI security_QueryInterface( - ISWbemSecurity *iface, - REFIID riid, - void **ppvObject ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - TRACE( "%p, %s, %p\n", security, debugstr_guid( riid ), ppvObject ); - - if (IsEqualGUID( riid, &IID_ISWbemSecurity ) || - IsEqualGUID( riid, &IID_IDispatch ) || - IsEqualGUID( riid, &IID_IUnknown )) - { - *ppvObject = iface; - } - else - { - FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); - return E_NOINTERFACE; - } - ISWbemSecurity_AddRef( iface ); - return S_OK; -} - -static HRESULT WINAPI security_GetTypeInfoCount( - ISWbemSecurity *iface, - UINT *count ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - TRACE( "%p, %p\n", security, count ); - - *count = 1; - return S_OK; -} - -static HRESULT WINAPI security_GetTypeInfo( - ISWbemSecurity *iface, - UINT index, - LCID lcid, - ITypeInfo **info ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - TRACE( "%p, %u, %u, %p\n", security, index, lcid, info ); - - return get_typeinfo( ISWbemSecurity_tid, info ); -} - -static HRESULT WINAPI security_GetIDsOfNames( - ISWbemSecurity *iface, - REFIID riid, - LPOLESTR *names, - UINT count, - LCID lcid, - DISPID *dispid ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - ITypeInfo *typeinfo; - HRESULT hr; - - TRACE( "%p, %s, %p, %u, %u, %p\n", security, debugstr_guid(riid), names, count, lcid, dispid ); - - if (!names || !count || !dispid) return E_INVALIDARG; - - hr = get_typeinfo( ISWbemSecurity_tid, &typeinfo ); - if (SUCCEEDED(hr)) - { - hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid ); - ITypeInfo_Release( typeinfo ); - } - return hr; -} - -static HRESULT WINAPI security_Invoke( - ISWbemSecurity *iface, - DISPID member, - REFIID riid, - LCID lcid, - WORD flags, - DISPPARAMS *params, - VARIANT *result, - EXCEPINFO *excep_info, - UINT *arg_err ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - ITypeInfo *typeinfo; - HRESULT hr; - - TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", security, member, debugstr_guid(riid), - lcid, flags, params, result, excep_info, arg_err ); - - hr = get_typeinfo( ISWbemSecurity_tid, &typeinfo ); - if (SUCCEEDED(hr)) - { - hr = ITypeInfo_Invoke( typeinfo, &security->ISWbemSecurity_iface, member, flags, - params, result, excep_info, arg_err ); - ITypeInfo_Release( typeinfo ); - } - return hr; -} - -static HRESULT WINAPI security_get_ImpersonationLevel_( - ISWbemSecurity *iface, - WbemImpersonationLevelEnum *impersonation_level ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - FIXME( "%p, %p: stub\n", security, impersonation_level ); - - if (!impersonation_level) - return E_INVALIDARG; - - *impersonation_level = security->implevel; - return S_OK; -} - -static HRESULT WINAPI security_put_ImpersonationLevel_( - ISWbemSecurity *iface, - WbemImpersonationLevelEnum impersonation_level ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - FIXME( "%p, %d: stub\n", security, impersonation_level ); - - security->implevel = impersonation_level; - return S_OK; -} - -static HRESULT WINAPI security_get_AuthenticationLevel_( - ISWbemSecurity *iface, - WbemAuthenticationLevelEnum *authentication_level ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - FIXME( "%p, %p: stub\n", security, authentication_level ); - - if (!authentication_level) - return E_INVALIDARG; - - *authentication_level = security->authlevel; - return S_OK; -} - -static HRESULT WINAPI security_put_AuthenticationLevel_( - ISWbemSecurity *iface, - WbemAuthenticationLevelEnum authentication_level ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - FIXME( "%p, %d: stub\n", security, authentication_level ); - - security->authlevel = authentication_level; - return S_OK; -} - -static HRESULT WINAPI security_get_Privileges_( - ISWbemSecurity *iface, - ISWbemPrivilegeSet **privilege_set ) -{ - struct security *security = impl_from_ISWbemSecurity( iface ); - FIXME( "%p, %p: stub\n", security, privilege_set ); - - if (!privilege_set) - return E_INVALIDARG; - - return E_NOTIMPL; -} - -static const ISWbemSecurityVtbl security_vtbl = -{ - security_QueryInterface, - security_AddRef, - security_Release, - security_GetTypeInfoCount, - security_GetTypeInfo, - security_GetIDsOfNames, - security_Invoke, - security_get_ImpersonationLevel_, - security_put_ImpersonationLevel_, - security_get_AuthenticationLevel_, - security_put_AuthenticationLevel_, - security_get_Privileges_ -}; - -static HRESULT ISWbemSecurity_create( ISWbemSecurity **obj ) -{ - struct security *security; - - TRACE( "%p\n", obj ); - - if (!(security = heap_alloc( sizeof(*security) ))) return E_OUTOFMEMORY; - security->ISWbemSecurity_iface.lpVtbl = &security_vtbl; - security->refs = 1; - security->implevel = wbemImpersonationLevelAnonymous; - security->authlevel = wbemAuthenticationLevelDefault; - - *obj = &security->ISWbemSecurity_iface; - TRACE( "returning iface %p\n", *obj ); - return S_OK; -} diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 0652176980..84c078affb 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -194,7 +194,7 @@ reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to Wine-3.0 reactos/dll/win32/version # Synced to Wine-3.0 reactos/dll/win32/vssapi # Synced to WineStaging-2.9 -reactos/dll/win32/wbemdisp # Synced to WineStaging-2.16 +reactos/dll/win32/wbemdisp # Synced to Wine-3.0 reactos/dll/win32/wbemprox # Synced to WineStaging-2.16 reactos/dll/win32/windowscodecs # Synced to WineStaging-2.16 reactos/dll/win32/windowscodecsext # Synced to WineStaging-2.9
6 years, 11 months
1
0
0
0
01/01: [VERSION_WINETEST] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=41c4d894f3ead50892928…
commit 41c4d894f3ead50892928fe98b35756937370a30 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:43:01 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:43:01 2018 +0100 [VERSION_WINETEST] Sync with Wine 3.0. CORE-14225 --- modules/rostests/winetests/version/info.c | 127 ---------------------- modules/rostests/winetests/version/install.c | 151 ++------------------------- 2 files changed, 6 insertions(+), 272 deletions(-) diff --git a/modules/rostests/winetests/version/info.c b/modules/rostests/winetests/version/info.c index 2b5ba42e68..b99a335d81 100644 --- a/modules/rostests/winetests/version/info.c +++ b/modules/rostests/winetests/version/info.c @@ -578,132 +578,6 @@ static void test_VerQueryValueA(void) HeapFree(GetProcessHeap(), 0, ver); } -static void test_VerQueryValue_InvalidLength(void) -{ - /* this buffer is created with the reactos resource compiler from this resource: -#include "winver.h" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,0,0,0 -PRODUCTVERSION 1,0,0,0 -FILEFLAGSMASK 63 -FILEFLAGS 0 -FILEOS VOS_UNKNOWN -FILETYPE VFT_APP -FILESUBTYPE VFT2_UNKNOWN -{ - BLOCK "StringFileInfo" - { - } -} -*/ - char preparedbuffer[] = { - /* VS_VERSION_INFO_STRUCT32 */ - 0x80, 0x00, /* wLength */ - 0x34, 0x00, /* wValueLength */ - 0x00, 0x00, /* wType */ - /* L"VS_VERSION_INFO" + DWORD alignment */ - 0x56, 0x00, 0x53, 0x00, 0x5f, 0x00, 0x56, 0x00, 0x45, 0x00, 0x52, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4f, - 0x00, 0x4e, 0x00, 0x5f, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x46, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, - - /* VS_FIXEDFILEINFO */ - 0xbd, 0x04, 0xef, 0xfe, /* dwSignature */ - 0x00, 0x00, 0x01, 0x00, /* dwStrucVersion */ - 0x00, 0x00, 0x01, 0x00, /* dwFileVersionMS */ - 0x00, 0x00, 0x00, 0x00, /* dwFileVersionLS */ - 0x00, 0x00, 0x01, 0x00, /* dwProductVersionMS */ - 0x00, 0x00, 0x00, 0x00, /* dwProductVersionLS */ - 0x3f, 0x00, 0x00, 0x00, /* dwFileFlagsMask */ - 0x00, 0x00, 0x00, 0x00, /* dwFileFlags */ - 0x00, 0x00, 0x00, 0x00, /* dwFileOS */ - 0x01, 0x00, 0x00, 0x00, /* dwFileType */ - 0x00, 0x00, 0x00, 0x00, /* dwFileSubtype */ - 0x00, 0x00, 0x00, 0x00, /* dwFileDateMS */ - 0x00, 0x00, 0x00, 0x00, /* dwFileDateLS */ - - /* first child: */ - 0x24, 0x00, /* wLength */ - 0x00, 0x00, /* wValueLength */ - 0x01, 0x00, /* wType */ - /* L"StringFileInfo" + DWORD alignment */ - 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x46, 0x00, 0x69, 0x00, - 0x6c, 0x00, 0x65, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x00, 0x00, - /* "FE2X" */ - 0x46, 0x45, 0x32, 0x58, - - /* Extra bytes allocated for W->A conversions. */ - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, 0x0d, 0xf0, 0xad, 0xba, - }; - char *p; - UINT len, ret; - WCHAR FileDescriptionW[] = { '\\', '\\', 'S', 't', 'r', 'i', 'n', 'g', 'F', 'i', 'l', 'e', 'I', 'n', 'f', 'o', 0 }; - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValueA(preparedbuffer, "StringFileInfo", (LPVOID *)&p, &len); - ok(ret, "VerQueryValueA error %u\n", GetLastError()); - todo_wine - ok(len == 0, "VerQueryValueA returned %u, expected 0\n", len); - todo_wine - ok(p == preparedbuffer + 0x7e, "p was %p, expected %p\n", p, preparedbuffer + 0x7e); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValueA(preparedbuffer, "\\StringFileInfo", (LPVOID *)&p, &len); - ok(ret, "VerQueryValueA error %u\n", GetLastError()); - todo_wine - ok(len == 0, "VerQueryValueA returned %u, expected 0\n", len); - todo_wine - ok(p == preparedbuffer + 0x7e, "p was %p, expected %p\n", p, preparedbuffer + 0x7e); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValueA(preparedbuffer, "\\\\StringFileInfo", (LPVOID *)&p, &len); - ok(ret, "VerQueryValueA error %u\n", GetLastError()); - todo_wine - ok(len == 0, "VerQueryValueA returned %u, expected 0\n", len); - todo_wine - ok(p == preparedbuffer + 0x7e, "p was %p, expected %p\n", p, preparedbuffer + 0x7e); - - /* also test the W versions. */ - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValueW(preparedbuffer, FileDescriptionW + 2, (LPVOID *)&p, &len); - ok(ret, "VerQueryValueW error %u\n", GetLastError()); - ok(len == 0, "VerQueryValueW returned %u, expected 0\n", len); - todo_wine - ok(p == preparedbuffer + 0x7e, "p was %p, expected %p\n", p, preparedbuffer + 0x7e); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValueW(preparedbuffer, FileDescriptionW + 1, (LPVOID *)&p, &len); - ok(ret, "VerQueryValueW error %u\n", GetLastError()); - ok(len == 0, "VerQueryValueW returned %u, expected 0\n", len); - todo_wine - ok(p == preparedbuffer + 0x7e, "p was %p, expected %p\n", p, preparedbuffer + 0x7e); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValueW(preparedbuffer, FileDescriptionW, (LPVOID *)&p, &len); - ok(ret, "VerQueryValueW error %u\n", GetLastError()); - ok(len == 0, "VerQueryValueW returned %u, expected 0\n", len); - todo_wine - ok(p == preparedbuffer + 0x7e, "p was %p, expected %p\n", p, preparedbuffer + 0x7e); -} - static void test_extra_block(void) { WORD extra_block[] = { @@ -864,7 +738,6 @@ START_TEST(info) test_info(); test_32bit_win(); test_VerQueryValueA(); - test_VerQueryValue_InvalidLength(); test_extra_block(); test_GetFileVersionInfoEx(); } diff --git a/modules/rostests/winetests/version/install.c b/modules/rostests/winetests/version/install.c index b06125ff50..9b84dce492 100644 --- a/modules/rostests/winetests/version/install.c +++ b/modules/rostests/winetests/version/install.c @@ -24,13 +24,11 @@ #include "winbase.h" #include "winerror.h" #include "winver.h" -#include "shlobj.h" static void test_find_file(void) { DWORD ret; UINT dwCur, dwOut ; - char tmp[MAX_PATH]; char appdir[MAX_PATH]; char curdir[MAX_PATH]; char filename[MAX_PATH]; @@ -117,11 +115,10 @@ static void test_find_file(void) } } } - if(!GetSystemDirectoryA(windir, MAX_PATH) || - !SHGetSpecialFolderPathA(0, appdir, CSIDL_PROGRAM_FILES, FALSE) || - !GetTempPathA(MAX_PATH, tmp) || - !GetTempFileNameA(tmp, "tes", 0, filename)) - ok(0, "GetSystemDirectoryA, SHGetSpecialFolderPathA, GetTempPathA or GetTempFileNameA failed\n"); + if(!GetModuleFileNameA(NULL, filename, MAX_PATH) || + !GetSystemDirectoryA(windir, MAX_PATH) || + !GetTempPathA(MAX_PATH, appdir)) + trace("GetModuleFileNameA, GetSystemDirectoryA or GetTempPathA failed\n"); else { char *p = strrchr(filename, '\\'); if(p) { @@ -153,7 +150,7 @@ static void test_find_file(void) memset(outBuf, 0, MAX_PATH); memset(curdir, 0, MAX_PATH); ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); + todo_wine ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); ok(dwOut == 1 + strlen(windir), "Wrong length of buffer for current location: " "got %d(%s) expected %d\n", dwOut, outBuf, lstrlenA(windir)+1); @@ -162,145 +159,9 @@ static void test_find_file(void) memset(outBuf, 0, MAX_PATH); memset(curdir, 0, MAX_PATH); ret = VerFindFileA(0, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); + todo_wine ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); ok(dwOut == 1 + strlen(appdir), "Wrong length of buffer for current location: " "got %d(%s) expected %d\n", dwOut, outBuf, lstrlenA(appdir)+1); - - /* search for filename */ - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, filename, NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, filename, NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - /* search for regedit */ - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "regedit", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "regedit", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "regedit", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - /* search for regedit.exe */ - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "regedit.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "regedit.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "regedit.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "regedit.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - /* nonexistent filename */ - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "doesnotexist.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "doesnotexist.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(!ret, "Wrong return value got %x expected 0\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "doesnotexist.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(0, "doesnotexist.exe", NULL, "C:\\random_path_does_not_exist", curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, empty, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - ret = VerFindFileA(VFFF_ISSHAREDFILE, "doesnotexist.exe", NULL, "C:\\random_path_does_not_exist", curdir, &dwCur, outBuf, &dwOut); - ok(ret & VFF_CURNEDEST, "Wrong return value got %x expected VFF_CURNEDEST set\n", ret); - - DeleteFileA(filename); } }
6 years, 11 months
1
0
0
0
01/01: [VERSION] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9e01104f701841a7fa739…
commit 9e01104f701841a7fa7399b022a32244e8c2a423 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:41:59 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:41:59 2018 +0100 [VERSION] Sync with Wine 3.0. CORE-14225 --- dll/win32/version/version.c | 52 +++++++++++++++++---------------------------- media/doc/README.WINE | 2 +- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/dll/win32/version/version.c b/dll/win32/version/version.c index e85bbe475c..13436cad16 100644 --- a/dll/win32/version/version.c +++ b/dll/win32/version/version.c @@ -705,12 +705,7 @@ DWORD WINAPI GetFileVersionInfoSizeExW( DWORD flags, LPCWSTR filename, LPDWORD h return (len * 2) + 4; default: - if (lzfd == HFILE_ERROR) - SetLastError(ofs.nErrCode); - else if (GetVersion() & 0x80000000) - SetLastError(ERROR_FILE_NOT_FOUND); - else - SetLastError(ERROR_RESOURCE_DATA_NOT_FOUND); + SetLastError( lzfd == HFILE_ERROR ? ofs.nErrCode : ERROR_RESOURCE_DATA_NOT_FOUND ); return 0; } } @@ -1015,6 +1010,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, BOOL ret, isText; INT len; LPWSTR lpSubBlockW; + UINT value_len; len = MultiByteToWideChar(CP_ACP, 0, lpSubBlock, -1, NULL, 0); lpSubBlockW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); @@ -1024,7 +1020,8 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, MultiByteToWideChar(CP_ACP, 0, lpSubBlock, -1, lpSubBlockW, len); - ret = VersionInfo32_QueryValue(pBlock, lpSubBlockW, lplpBuffer, puLen, &isText); + ret = VersionInfo32_QueryValue(pBlock, lpSubBlockW, lplpBuffer, &value_len, &isText); + if (puLen) *puLen = value_len; HeapFree(GetProcessHeap(), 0, lpSubBlockW); @@ -1035,8 +1032,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, */ LPSTR lpBufferA = (LPSTR)pBlock + info->wLength + 4; DWORD pos = (LPCSTR)*lplpBuffer - (LPCSTR)pBlock; - - len = WideCharToMultiByte(CP_ACP, 0, *lplpBuffer, -1, + len = WideCharToMultiByte(CP_ACP, 0, *lplpBuffer, value_len, lpBufferA + pos, info->wLength - pos, NULL, NULL); *lplpBuffer = lpBufferA + pos; if (puLen) *puLen = len; @@ -1128,22 +1124,16 @@ static int testFileExistenceA( char const * path, char const * file, BOOL excl ) fileinfo.cBytes = sizeof(OFSTRUCT); - if (path) - { - strcpy(filename, path); - filenamelen = strlen(filename); + strcpy(filename, path); + filenamelen = strlen(filename); - /* Add a trailing \ if necessary */ - if(filenamelen) - { - if(filename[filenamelen - 1] != '\\') - strcat(filename, "\\"); - } - else /* specify the current directory */ - strcpy(filename, ".\\"); + /* Add a trailing \ if necessary */ + if(filenamelen) { + if(filename[filenamelen - 1] != '\\') + strcat(filename, "\\"); } - else - filename[0] = 0; + else /* specify the current directory */ + strcpy(filename, ".\\"); /* Create the full pathname */ strcat(filename, file); @@ -1233,10 +1223,10 @@ DWORD WINAPI VerFindFileA( { if(testFileExistenceA(destDir, lpszFilename, FALSE)) curDir = destDir; else if(lpszAppDir && testFileExistenceA(lpszAppDir, lpszFilename, FALSE)) + { curDir = lpszAppDir; - - if(!testFileExistenceA(systemDir, lpszFilename, FALSE)) retval |= VFF_CURNEDEST; + } } } else /* not a shared file */ @@ -1247,17 +1237,15 @@ DWORD WINAPI VerFindFileA( GetWindowsDirectoryA( winDir, MAX_PATH ); if(testFileExistenceA(destDir, lpszFilename, FALSE)) curDir = destDir; else if(testFileExistenceA(winDir, lpszFilename, FALSE)) + { curDir = winDir; + retval |= VFF_CURNEDEST; + } else if(testFileExistenceA(systemDir, lpszFilename, FALSE)) - curDir = systemDir; - - if (lpszAppDir && lpszAppDir[0]) { - if(!testFileExistenceA(lpszAppDir, lpszFilename, FALSE)) - retval |= VFF_CURNEDEST; - } - else if(testFileExistenceA(NULL, lpszFilename, FALSE)) + curDir = systemDir; retval |= VFF_CURNEDEST; + } } } diff --git a/media/doc/README.WINE b/media/doc/README.WINE index a9f299e28c..0652176980 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -192,7 +192,7 @@ reactos/dll/win32/urlmon # Synced to Wine-3.0 reactos/dll/win32/usp10 # Synced to Wine-3.0 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to Wine-3.0 -reactos/dll/win32/version # Synced to WineStaging-2.9 +reactos/dll/win32/version # Synced to Wine-3.0 reactos/dll/win32/vssapi # Synced to WineStaging-2.9 reactos/dll/win32/wbemdisp # Synced to WineStaging-2.16 reactos/dll/win32/wbemprox # Synced to WineStaging-2.16
6 years, 11 months
1
0
0
0
01/01: [VBSCRIPT_WINETEST] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=942c426525dde73327d5c…
commit 942c426525dde73327d5c46ccdd101f0d29892f2 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:40:57 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:40:57 2018 +0100 [VBSCRIPT_WINETEST] Sync with Wine 3.0. CORE-14225 --- modules/rostests/winetests/vbscript/api.vbs | 29 ++++- modules/rostests/winetests/vbscript/createobj.c | 4 + modules/rostests/winetests/vbscript/error.vbs | 12 +-- modules/rostests/winetests/vbscript/lang.vbs | 135 +++++++++++++++++++++++- modules/rostests/winetests/vbscript/run.c | 67 ++++++++---- 5 files changed, 219 insertions(+), 28 deletions(-) diff --git a/modules/rostests/winetests/vbscript/api.vbs b/modules/rostests/winetests/vbscript/api.vbs index f6b6f69420..8ebbfb6c5c 100644 --- a/modules/rostests/winetests/vbscript/api.vbs +++ b/modules/rostests/winetests/vbscript/api.vbs @@ -212,6 +212,31 @@ arr(0) = 2 arr(1) = 3 Call ok(not isNumeric(arr), "isNumeric(arr) is not true?") +Call ok(getVT(Array()) = "VT_ARRAY|VT_VARIANT", "getVT(Array()) = " & getVT(Array())) +x = Array("a1", 2, "a3") +Call ok(getVT(x) = "VT_ARRAY|VT_VARIANT*", "getVT(array) = " & getVT(x)) +Call ok(getVT(x(0)) = "VT_BSTR*", "getVT(array(0)) = " & getVT(x(0))) +Call ok(x(0) = "a1", "array(0) = " & x(0)) +Call ok(getVT(x(1)) = "VT_I2*", "getVT(array(1)) = " & getVT(x(1))) +Call ok(x(1) = 2, "array(1) = " & x(1)) +Call ok(getVT(x(2)) = "VT_BSTR*", "getVT(array(2)) = " & getVT(x(2))) +Call ok(x(2) = "a3", "array(2) = " & x(2)) + +Dim new_array +new_array = x +x(0) = "new value" +Call ok(new_array(0) = "a1", "new_array(0) = " & new_array(0)) + +Call ok(getVT(UBound(x)) = "VT_I4", "getVT(UBound(x)) = " & getVT(UBound(x))) +Call ok(UBound(x) = 2, "UBound(x) = " & UBound(x)) +Call ok(getVT(UBound(x, 1)) = "VT_I4", "getVT(UBound(x, 1)) = " & getVT(UBound(x, 1))) +Call ok(UBound(x, 1) = 2, "UBound(x) = " & UBound(x, 1)) + +Dim arr2(2, 4) +Call ok(UBound(arr2) = 2, "UBound(x) = " & UBound(x)) +Call ok(UBound(arr2, 1) = 2, "UBound(x) = " & UBound(x)) +Call ok(UBound(arr2, 2) = 4, "UBound(x) = " & UBound(x)) + Dim newObject Set newObject = New ValClass newObject.myval = 1 @@ -579,7 +604,6 @@ if isEnglishLang then Call ok(WeekDayName(1, false) = "Sunday", "WeekDayName(1, false) = " & WeekDayName(1, false)) Call ok(WeekDayName(1, true) = "Sun", "WeekDayName(1, true) = " & WeekDayName(1, true)) Call ok(WeekDayName(1, 10) = "Sun", "WeekDayName(1, 10) = " & WeekDayName(1, 10)) - Call ok(WeekDayName(1, true, 0) = "Sun", "WeekDayName(1, true, 0) = " & WeekDayName(1, true, 0)) Call ok(WeekDayName(1, true, 2) = "Mon", "WeekDayName(1, true, 2) = " & WeekDayName(1, true, 2)) Call ok(WeekDayName(1, true, 2.5) = "Mon", "WeekDayName(1, true, 2.5) = " & WeekDayName(1, true, 2.5)) Call ok(WeekDayName(1, true, 1.5) = "Mon", "WeekDayName(1, true, 1.5) = " & WeekDayName(1, true, 1.5)) @@ -594,6 +618,9 @@ if isEnglishLang then Call ok(MonthName(12, true) = "Dec", "MonthName(12, true) = " & MonthName(12, true)) end if +Call ok(WeekDayName(1, true, 0) = WeekDayName(1, true, firstDayOfWeek), _ + "WeekDayName(1, true, 0) = " & WeekDayName(1, true, 0)) + Call ok(getVT(Now()) = "VT_DATE", "getVT(Now()) = " & getVT(Now())) Call ok(vbOKOnly = 0, "vbOKOnly = " & vbOKOnly) diff --git a/modules/rostests/winetests/vbscript/createobj.c b/modules/rostests/winetests/vbscript/createobj.c index 71829600b8..4ff0ea7952 100644 --- a/modules/rostests/winetests/vbscript/createobj.c +++ b/modules/rostests/winetests/vbscript/createobj.c @@ -58,6 +58,8 @@ extern const CLSID CLSID_VBScript; +#define VB_E_ACCESS_DENIED 0x800a0046 + #define DEFINE_EXPECT(func) \ static BOOL expect_ ## func = FALSE, called_ ## func = FALSE @@ -996,6 +998,8 @@ static void test_GetObject(void) SET_EXPECT(SetSite); SET_EXPECT(reportSuccess); hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()"); + if(broken(hres == VB_E_ACCESS_DENIED)) /* 64-bit win8 fails on the first try */ + hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()"); if(hres == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) { /* Workaround for broken win2k */ win_skip("got unexpected error %08x\n", hres); CLEAR_CALLED(QI_IObjectWithSite); diff --git a/modules/rostests/winetests/vbscript/error.vbs b/modules/rostests/winetests/vbscript/error.vbs index 3bf03dfae4..78314c3569 100644 --- a/modules/rostests/winetests/vbscript/error.vbs +++ b/modules/rostests/winetests/vbscript/error.vbs @@ -190,7 +190,7 @@ sub testThrow next call ok(x = 2, "x = " & x) call ok(y = 1, "y = " & y) - 'todo_wine call ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number) + call todo_wine_ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number) Err.clear() y = 0 @@ -202,19 +202,19 @@ sub testThrow next call ok(y = 1, "y = " & y) call ok(x = 6, "x = " & x) - 'todo_wine call ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number) + call todo_wine_ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number) Err.clear() y = 0 x = 6 for x = 100 to throwInt(E_TESTERROR) call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) - 'todo_wine call ok(x = 6, "x = " & x) + call todo_wine_ok(x = 6, "x = " & x) y = y+1 next call ok(y = 1, "y = " & y) - 'todo_wine call ok(x = 6, "x = " & x) - 'todo_wine call ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number) + call todo_wine_ok(x = 6, "x = " & x) + call todo_wine_ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number) select case throwInt(E_TESTERROR) case true @@ -308,7 +308,7 @@ sub testForEachError() y = true next call ok(y, "for each not executed") - 'todo_wine call ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number) + call todo_wine_ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number) end sub call testForEachError() diff --git a/modules/rostests/winetests/vbscript/lang.vbs b/modules/rostests/winetests/vbscript/lang.vbs index 23402cd893..2af77bdfcc 100644 --- a/modules/rostests/winetests/vbscript/lang.vbs +++ b/modules/rostests/winetests/vbscript/lang.vbs @@ -16,7 +16,7 @@ ' Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ' -Option Explicit +OPTION EXPLICIT : : DIM W dim x, y, z Dim obj @@ -53,6 +53,9 @@ Call ok(false = 0, "false <> 0") Call ok(&hff = 255, "&hff <> 255") Call ok(&Hff = 255, "&Hff <> 255") +W = 5 +Call ok(W = 5, "W = " & W & " expected " & 5) + x = "xx" Call ok(x = "xx", "x = " & x & " expected ""xx""") @@ -330,6 +333,13 @@ WHILE x < 3 : x = x + 1 Wend Call ok(x = 3, "x not equal to 3") +z = 2 +while z > -4 : + + +z = z -2 +wend + x = false y = false do while not (x and y) @@ -353,6 +363,12 @@ Do While x < 2 : x = x + 1 Loop Call ok(x = 2, "x not equal to 2") +x = 0 +Do While x >= -2 : +x = x - 1 +Loop +Call ok(x = -3, "x not equal to -3") + x = false y = false do until x and y @@ -376,6 +392,14 @@ Do: :: x = x + 2 Loop Until x = 4 Call ok(x = 4, "x not equal to 4") +x = 5 +Do: : + +: x = x * 2 +Loop Until x = 40 +Call ok(x = 40, "x not equal to 40") + + x = false do if x then exit do @@ -495,6 +519,12 @@ for x = 1 to 100 Call ok(false, "exit for not escaped the loop?") next +for x = 1 to 5 : +: +: :exit for + Call ok(false, "exit for not escaped the loop?") +next + do while true for x = 1 to 100 exit do @@ -507,6 +537,14 @@ while null call ok(false, "while null evaluated") wend +Call collectionObj.reset() +y = 0 +for each x in collectionObj : + + :y = y + 3 +next +Call ok(y = 9, "y = " & y) + Call collectionObj.reset() y = 0 x = 10 @@ -611,6 +649,21 @@ select case 2: case 5,6,7: Call ok(false, "unexpected case") end select Call ok(x, "wrong case") +x = False +select case 1 : + + :case 3, 4 : + + + case 5 +: + Call ok(false, "unexpected case") : + Case Else: + + x = True +end select +Call ok(x, "wrong case") + if false then Sub testsub x = true @@ -699,6 +752,11 @@ Private Sub TestPrivateSub End Sub Call TestPrivateSub +Public Sub TestSeparatorSub : : +: +End Sub +Call TestSeparatorSub + if false then Function testfunc x = true @@ -814,6 +872,12 @@ Private Function TestPrivateFunc End Function Call TestPrivateFunc +Public Function TestSepFunc(ByVal a) : : +: TestSepFunc = a +End Function +Call ok(TestSepFunc(1) = 1, "Function did not return 1") + + ' Stop has an effect only in debugging mode Stop @@ -1074,6 +1138,30 @@ Class Property2 End Sub End Class +Class SeparatorTest : : Dim varTest1 +: + Private Sub Class_Initialize : varTest1 = 1 + End Sub :: + + Property Get Test1() : + Test1 = varTest1 + End Property :: +: : + Property Let Test1(a) : + varTest1 = a + End Property : + + Public Function AddToTest1(ByVal a) :: : + varTest1 = varTest1 + a + AddToTest1 = varTest1 + End Function : End Class : :: Set obj = New SeparatorTest + +Call ok(obj.Test1 = 1, "obj.Test1 is not 1") +obj.Test1 = 6 +Call ok(obj.Test1 = 6, "obj.Test1 is not 6") +obj.AddToTest1(5) +Call ok(obj.Test1 = 11, "obj.Test1 is not 11") + ' Array tests Call ok(getVT(arr) = "VT_EMPTY*", "getVT(arr) = " & getVT(arr)) @@ -1107,6 +1195,8 @@ arr3(3,2,1) = 1 arr3(1,2,3) = 2 Call ok(arr3(3,2,1) = 1, "arr3(3,2,1) = " & arr3(3,2,1)) Call ok(arr3(1,2,3) = 2, "arr3(1,2,3) = " & arr3(1,2,3)) +arr2(4,3) = 1 +Call ok(arr2(4,3) = 1, "arr2(4,3) = " & arr2(4,3)) x = arr3 Call ok(x(3,2,1) = 1, "x(3,2,1) = " & x(3,2,1)) @@ -1200,6 +1290,49 @@ Call testarrarg(1, "VT_I2*") Call testarrarg(false, "VT_BOOL*") Call testarrarg(Empty, "VT_EMPTY*") +Sub modifyarr(arr) + 'Following test crashes on wine + 'Call ok(arr(0) = "not modified", "arr(0) = " & arr(0)) + arr(0) = "modified" +End Sub + +arr(0) = "not modified" +Call modifyarr(arr) +Call ok(arr(0) = "modified", "arr(0) = " & arr(0)) + +arr(0) = "not modified" +modifyarr(arr) +Call todo_wine_ok(arr(0) = "not modified", "arr(0) = " & arr(0)) + +for x = 0 to UBound(arr) + arr(x) = x +next +y = 0 +for each x in arr + Call ok(x = y, "x = " & x & ", expected " & y) + Call ok(arr(y) = y, "arr(" & y & ") = " & arr(y)) + arr(y) = 1 + x = 1 + y = y+1 +next +Call ok(y = 4, "y = " & y & " after array enumeration") + +for x=0 to UBound(arr2, 1) + for y=0 to UBound(arr2, 2) + arr2(x, y) = x + y*(UBound(arr2, 1)+1) + next +next +y = 0 +for each x in arr2 + Call ok(x = y, "x = " & x & ", expected " & y) + y = y+1 +next +Call ok(y = 20, "y = " & y & " after array enumeration") + +for each x in noarr + Call ok(false, "Empty array contains: " & x) +next + ' It's allowed to declare non-builtin RegExp class... class RegExp public property get Global() diff --git a/modules/rostests/winetests/vbscript/run.c b/modules/rostests/winetests/vbscript/run.c index 8821b796db..382cffca97 100644 --- a/modules/rostests/winetests/vbscript/run.c +++ b/modules/rostests/winetests/vbscript/run.c @@ -129,6 +129,8 @@ DEFINE_EXPECT(OnScriptError); #define DISPID_GLOBAL_TESTOPTIONALARG 1017 #define DISPID_GLOBAL_LETOBJ 1018 #define DISPID_GLOBAL_SETOBJ 1019 +#define DISPID_GLOBAL_TODO_WINE_OK 1020 +#define DISPID_GLOBAL_WEEKSTARTDAY 1021 #define DISPID_TESTOBJ_PROPGET 2000 #define DISPID_TESTOBJ_PROPPUT 2001 @@ -142,6 +144,7 @@ static const WCHAR testW[] = {'t','e','s','t',0}; static const WCHAR emptyW[] = {0}; static BOOL strict_dispid_check, is_english, allow_ui; +static int first_day_of_week; static const char *test_name = "(null)"; static int test_counter; static SCRIPTUICHANDLING uic_handling = SCRIPTUICHANDLING_NOUIERROR; @@ -210,27 +213,22 @@ static const char *vt2a(VARIANT *v) } } -/* Returns true if the user interface is in English. Note that this does not - * presume of the formatting of dates, numbers, etc. +/* Sets is_english to true if the user interface is in English. Note that this + * does not presume the formatting of dates, numbers, etc. + * Sets first_day_of_week to 1 if Sunday, 2 if Monday, and so on. */ -static BOOL is_lang_english(void) +static void detect_locale(void) { - static HMODULE hkernel32 = NULL; - static LANGID (WINAPI *pGetThreadUILanguage)(void) = NULL; - static LANGID (WINAPI *pGetUserDefaultUILanguage)(void) = NULL; + HMODULE kernel32 = GetModuleHandleA("kernel32.dll"); + LANGID (WINAPI *pGetThreadUILanguage)(void) = (void*)GetProcAddress(kernel32, "GetThreadUILanguage"); - if (!hkernel32) - { - hkernel32 = GetModuleHandleA("kernel32.dll"); - pGetThreadUILanguage = (void*)GetProcAddress(hkernel32, "GetThreadUILanguage"); - pGetUserDefaultUILanguage = (void*)GetProcAddress(hkernel32, "GetUserDefaultUILanguage"); - } - if (pGetThreadUILanguage && PRIMARYLANGID(pGetThreadUILanguage()) != LANG_ENGLISH) - return FALSE; - if (pGetUserDefaultUILanguage && PRIMARYLANGID(pGetUserDefaultUILanguage()) != LANG_ENGLISH) - return FALSE; + is_english = ((!pGetThreadUILanguage || PRIMARYLANGID(pGetThreadUILanguage()) == LANG_ENGLISH) && + PRIMARYLANGID(GetUserDefaultUILanguage()) == LANG_ENGLISH && + PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH); - return PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH; + GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK | LOCALE_RETURN_NUMBER, + (void*)&first_day_of_week, sizeof(first_day_of_week)); + first_day_of_week = 1 + (first_day_of_week + 1) % 7; } static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) @@ -990,6 +988,11 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD *pid = DISPID_GLOBAL_OK; return S_OK; } + if(!strcmp_wa(bstrName, "todo_wine_ok")) { + test_grfdex(grfdex, fdexNameCaseInsensitive); + *pid = DISPID_GLOBAL_TODO_WINE_OK; + return S_OK; + } if(!strcmp_wa(bstrName, "trace")) { test_grfdex(grfdex, fdexNameCaseInsensitive); *pid = DISPID_GLOBAL_TRACE; @@ -1011,6 +1014,11 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD *pid = DISPID_GLOBAL_ISENGLANG; return S_OK; } + if(!strcmp_wa(bstrName, "firstDayOfWeek")) { + test_grfdex(grfdex, fdexNameCaseInsensitive); + *pid = DISPID_GLOBAL_WEEKSTARTDAY; + return S_OK; + } if(!strcmp_wa(bstrName, "testObj")) { test_grfdex(grfdex, fdexNameCaseInsensitive); *pid = DISPID_GLOBAL_TESTOBJ; @@ -1099,6 +1107,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) { switch(id) { + case DISPID_GLOBAL_TODO_WINE_OK: case DISPID_GLOBAL_OK: { VARIANT *b; @@ -1122,7 +1131,8 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, ok(V_VT(b) == VT_BOOL, "V_VT(b) = %d\n", V_VT(b)); - ok(V_BOOL(b), "%s: %s\n", test_name, wine_dbgstr_w(V_BSTR(pdp->rgvarg))); + todo_wine_if(id == DISPID_GLOBAL_TODO_WINE_OK) + ok(V_BOOL(b), "%s: %s\n", test_name, wine_dbgstr_w(V_BSTR(pdp->rgvarg))); return S_OK; } @@ -1182,6 +1192,11 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, V_BOOL(pvarRes) = is_english ? VARIANT_TRUE : VARIANT_FALSE; return S_OK; + case DISPID_GLOBAL_WEEKSTARTDAY: + V_VT(pvarRes) = VT_I4; + V_I4(pvarRes) = first_day_of_week; + return S_OK; + case DISPID_GLOBAL_VBVAR: CHECK_EXPECT(global_vbvar_i); @@ -1633,8 +1648,20 @@ static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, S static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror) { HRESULT hr = onerror_hres; - CHECK_EXPECT(OnScriptError); + if(!expect_OnScriptError) { + EXCEPINFO info; + ULONG line; + HRESULT hres; + + hres = IActiveScriptError_GetSourcePosition(pscripterror, NULL, &line, NULL); + if(SUCCEEDED(hres)) + hres = IActiveScriptError_GetExceptionInfo(pscripterror, &info); + if(SUCCEEDED(hres)) + trace("Error in line %u: %s\n", line+1, wine_dbgstr_w(info.bstrDescription)); + } + + CHECK_EXPECT(OnScriptError); onerror_hres = E_NOTIMPL; return hr; @@ -2342,7 +2369,7 @@ START_TEST(run) int argc; char **argv; - is_english = is_lang_english(); + detect_locale(); if(!is_english) skip("Skipping some tests in non-English locale\n");
6 years, 11 months
1
0
0
0
01/01: [VBSCRIPT] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e0b80a0929ec41313ac65…
commit e0b80a0929ec41313ac65ce2cc844f0f8703feca Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:39:40 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:39:40 2018 +0100 [VBSCRIPT] Sync with Wine 3.0. CORE-14225 --- dll/win32/vbscript/CMakeLists.txt | 1 + dll/win32/vbscript/global.c | 80 ++- dll/win32/vbscript/interp.c | 59 +- dll/win32/vbscript/parser.tab.c | 1286 +++++++++++++++++++------------------ dll/win32/vbscript/parser.tab.h | 8 +- dll/win32/vbscript/parser.y | 35 +- dll/win32/vbscript/utils.c | 189 ++++++ dll/win32/vbscript/vbdisp.c | 2 +- dll/win32/vbscript/vbscript.c | 3 + dll/win32/vbscript/vbscript.h | 2 + media/doc/README.WINE | 2 +- 11 files changed, 973 insertions(+), 694 deletions(-) diff --git a/dll/win32/vbscript/CMakeLists.txt b/dll/win32/vbscript/CMakeLists.txt index 81ba90b372..99df1c3163 100644 --- a/dll/win32/vbscript/CMakeLists.txt +++ b/dll/win32/vbscript/CMakeLists.txt @@ -10,6 +10,7 @@ list(APPEND SOURCE lex.c parser.tab.c regexp.c + utils.c vbdisp.c vbregexp.c vbscript.c diff --git a/dll/win32/vbscript/global.c b/dll/win32/vbscript/global.c index 1534805259..16bd9bbd20 100644 --- a/dll/win32/vbscript/global.c +++ b/dll/win32/vbscript/global.c @@ -815,8 +815,40 @@ static HRESULT Global_LBound(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VA static HRESULT Global_UBound(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) { - FIXME("\n"); - return E_NOTIMPL; + SAFEARRAY *sa; + HRESULT hres; + LONG ubound; + int dim; + + assert(args_cnt == 1 || args_cnt == 2); + + TRACE("%s %s\n", debugstr_variant(arg), args_cnt == 2 ? debugstr_variant(arg + 1) : "1"); + + switch(V_VT(arg)) { + case VT_VARIANT|VT_ARRAY: + sa = V_ARRAY(arg); + break; + case VT_VARIANT|VT_ARRAY|VT_BYREF: + sa = *V_ARRAYREF(arg); + break; + default: + FIXME("arg %s not supported\n", debugstr_variant(arg)); + return E_NOTIMPL; + } + + if(args_cnt == 2) { + hres = to_int(arg + 1, &dim); + if(FAILED(hres)) + return hres; + }else { + dim = 1; + } + + hres = SafeArrayGetUBound(sa, dim, &ubound); + if(FAILED(hres)) + return hres; + + return return_int(res, ubound); } static HRESULT Global_RGB(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) @@ -1785,8 +1817,44 @@ static HRESULT Global_TypeName(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, static HRESULT Global_Array(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) { - FIXME("\n"); - return E_NOTIMPL; + SAFEARRAYBOUND bounds; + SAFEARRAY *sa; + VARIANT *data; + HRESULT hres; + unsigned i; + + TRACE("arg_cnt=%u\n", args_cnt); + + bounds.lLbound = 0; + bounds.cElements = args_cnt; + sa = SafeArrayCreate(VT_VARIANT, 1, &bounds); + if(!sa) + return E_OUTOFMEMORY; + + hres = SafeArrayAccessData(sa, (void**)&data); + if(FAILED(hres)) { + SafeArrayDestroy(sa); + return hres; + } + + for(i=0; i<args_cnt; i++) { + hres = VariantCopyInd(data+i, arg+i); + if(FAILED(hres)) { + SafeArrayUnaccessData(sa); + SafeArrayDestroy(sa); + return hres; + } + } + SafeArrayUnaccessData(sa); + + if(res) { + V_VT(res) = VT_ARRAY|VT_VARIANT; + V_ARRAY(res) = sa; + }else { + SafeArrayDestroy(sa); + } + + return S_OK; } static HRESULT Global_Erase(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) @@ -2213,7 +2281,7 @@ static const builtin_prop_t global_props[] = { {DISPID_GLOBAL_RND, Global_Rnd, 0, 1}, {DISPID_GLOBAL_TIMER, Global_Timer, 0, 0}, {DISPID_GLOBAL_LBOUND, Global_LBound, 0, 1}, - {DISPID_GLOBAL_UBOUND, Global_UBound, 0, 1}, + {DISPID_GLOBAL_UBOUND, Global_UBound, 0, 1, 2}, {DISPID_GLOBAL_RGB, Global_RGB, 0, 3}, {DISPID_GLOBAL_LEN, Global_Len, 0, 1}, {DISPID_GLOBAL_LENB, Global_LenB, 0, 1}, @@ -2265,7 +2333,7 @@ static const builtin_prop_t global_props[] = { {DISPID_GLOBAL_DATEDIFF, Global_DateDiff, 0, 3, 5}, {DISPID_GLOBAL_DATEPART, Global_DatePart, 0, 2, 4}, {DISPID_GLOBAL_TYPENAME, Global_TypeName, 0, 1}, - {DISPID_GLOBAL_ARRAY, Global_Array, 0, 1}, + {DISPID_GLOBAL_ARRAY, Global_Array, 0, 0, MAXDWORD}, {DISPID_GLOBAL_ERASE, Global_Erase, 0, 1}, {DISPID_GLOBAL_FILTER, Global_Filter, 0, 2, 4}, {DISPID_GLOBAL_JOIN, Global_Join, 0, 1, 2}, diff --git a/dll/win32/vbscript/interp.c b/dll/win32/vbscript/interp.c index 9e30715915..56eaf9114f 100644 --- a/dll/win32/vbscript/interp.c +++ b/dll/win32/vbscript/interp.c @@ -475,10 +475,8 @@ static void vbstack_to_dp(exec_ctx_t *ctx, unsigned arg_cnt, BOOL is_propput, DI static HRESULT array_access(exec_ctx_t *ctx, SAFEARRAY *array, DISPPARAMS *dp, VARIANT **ret) { - unsigned cell_off = 0, dim_size = 1, i; - unsigned argc = arg_cnt(dp); - VARIANT *data; - LONG idx; + unsigned i, argc = arg_cnt(dp); + LONG *indices; HRESULT hres; if(!array) { @@ -486,34 +484,35 @@ static HRESULT array_access(exec_ctx_t *ctx, SAFEARRAY *array, DISPPARAMS *dp, V return E_FAIL; } + hres = SafeArrayLock(array); + if(FAILED(hres)) + return hres; + if(array->cDims != argc) { FIXME("argc %d does not match cDims %d\n", dp->cArgs, array->cDims); + SafeArrayUnlock(array); return E_FAIL; } - for(i=0; i < argc; i++) { - hres = to_int(get_arg(dp, i), &idx); - if(FAILED(hres)) - return hres; + indices = heap_alloc(sizeof(*indices) * argc); + if(!indices) { + SafeArrayUnlock(array); + return E_OUTOFMEMORY; + } - idx -= array->rgsabound[i].lLbound; - if(idx >= array->rgsabound[i].cElements) { - FIXME("out of bound element %d in dim %d of size %d\n", idx, i+1, array->rgsabound[i].cElements); - return E_FAIL; + for(i=0; i<argc; i++) { + hres = to_int(get_arg(dp, i), indices+i); + if(FAILED(hres)) { + heap_free(indices); + SafeArrayUnlock(array); + return hres; } - - cell_off += idx*dim_size; - dim_size *= array->rgsabound[i].cElements; } - hres = SafeArrayAccessData(array, (void**)&data); - if(FAILED(hres)) - return hres; - - *ret = data+cell_off; - - SafeArrayUnaccessData(array); - return S_OK; + hres = SafeArrayPtrOfIndex(array, indices, (void**)ret); + SafeArrayUnlock(array); + heap_free(indices); + return hres; } static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res) @@ -1143,6 +1142,18 @@ static HRESULT interp_newenum(exec_ctx_t *ctx) V_UNKNOWN(r) = (IUnknown*)iter; break; } + case VT_VARIANT|VT_ARRAY: + case VT_VARIANT|VT_ARRAY|VT_BYREF: { + IEnumVARIANT *iter; + + hres = create_safearray_iter(V_ISBYREF(v.v) ? *V_ARRAYREF(v.v) : V_ARRAY(v.v), &iter); + if(FAILED(hres)) + return hres; + + V_VT(r) = VT_UNKNOWN; + V_UNKNOWN(r) = (IUnknown*)iter; + break; + } default: FIXME("Unsupported for %s\n", debugstr_variant(v.v)); release_val(&v); @@ -1186,7 +1197,7 @@ static HRESULT interp_enumnext(exec_ctx_t *ctx) if(do_continue) { ctx->instr++; }else { - stack_pop(ctx); + stack_popn(ctx, 1); instr_jmp(ctx, loop_end); } return S_OK; diff --git a/dll/win32/vbscript/parser.tab.c b/dll/win32/vbscript/parser.tab.c index 1396fdcfed..39842e6bf5 100644 --- a/dll/win32/vbscript/parser.tab.c +++ b/dll/win32/vbscript/parser.tab.c @@ -127,7 +127,7 @@ static const WCHAR propertyW[] = {'p','r','o','p','e','r','t','y',0}; #define CHECK_ERROR if(((parser_ctx_t*)ctx)->hres != S_OK) YYABORT -#line 136 "parser.tab.c" /* yacc.c:339 */ +#line 131 "parser.tab.c" /* yacc.c:339 */ # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus @@ -147,8 +147,8 @@ static const WCHAR propertyW[] = {'p','r','o','p','e','r','t','y',0}; /* In a future release of Bison, this section will be replaced by #include "parser.tab.h". */ -#ifndef YY_PARSER_E_REACTOS_SYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED -# define YY_PARSER_E_REACTOS_SYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED +#ifndef YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED +# define YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -238,7 +238,7 @@ extern int parser_debug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 88 "parser.y" /* yacc.c:355 */ +#line 83 "parser.y" /* yacc.c:355 */ const WCHAR *string; statement_t *statement; @@ -257,7 +257,7 @@ union YYSTYPE BOOL boolean; double dbl; -#line 266 "parser.tab.c" /* yacc.c:355 */ +#line 261 "parser.tab.c" /* yacc.c:355 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -267,11 +267,11 @@ union YYSTYPE int parser_parse (parser_ctx_t *ctx); -#endif /* !YY_PARSER_E_REACTOS_SYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED */ +#endif /* !YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ -#line 280 "parser.tab.c" /* yacc.c:358 */ +#line 275 "parser.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -494,16 +494,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 909 +#define YYLAST 944 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 87 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 60 /* YYNRULES -- Number of rules. */ -#define YYNRULES 167 +#define YYNRULES 169 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 341 +#define YYNSTATES 343 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -556,23 +556,23 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 147, 147, 150, 151, 153, 155, 156, 159, 160, - 163, 164, 167, 170, 171, 172, 173, 174, 177, 178, - 179, 181, 182, 183, 185, 188, 191, 192, 193, 194, - 195, 196, 197, 198, 200, 201, 202, 203, 204, 206, - 208, 212, 213, 216, 217, 220, 221, 222, 225, 226, - 229, 230, 233, 236, 237, 240, 241, 244, 245, 248, - 250, 251, 254, 256, 259, 260, 263, 264, 267, 271, - 272, 275, 276, 277, 281, 282, 285, 286, 289, 290, - 291, 293, 295, 298, 299, 302, 303, 306, 307, 310, - 311, 314, 315, 318, 319, 322, 323, 326, 327, 328, - 329, 330, 331, 332, 333, 336, 337, 340, 341, 342, - 345, 346, 349, 350, 354, 355, 357, 361, 362, 365, - 366, 367, 368, 371, 372, 375, 376, 377, 378, 379, - 380, 381, 384, 385, 386, 387, 390, 391, 392, 395, - 396, 399, 402, 403, 405, 407, 408, 411, 413, 415, - 419, 421, 425, 426, 429, 430, 431, 434, 435, 438, - 439, 442, 443, 444, 448, 449, 453, 454 + 0, 142, 142, 145, 146, 148, 150, 151, 154, 155, + 158, 159, 162, 165, 166, 167, 168, 169, 172, 173, + 174, 176, 177, 178, 180, 183, 186, 187, 188, 189, + 190, 191, 192, 193, 195, 196, 197, 198, 199, 201, + 203, 207, 208, 211, 212, 215, 216, 217, 220, 221, + 224, 225, 228, 231, 232, 235, 236, 239, 240, 243, + 245, 246, 249, 251, 254, 255, 258, 259, 262, 266, + 267, 270, 271, 272, 276, 277, 280, 281, 284, 285, + 286, 288, 290, 293, 294, 297, 298, 301, 302, 305, + 306, 309, 310, 313, 314, 317, 318, 321, 322, 323, + 324, 325, 326, 327, 328, 331, 332, 335, 336, 337, + 340, 341, 344, 345, 349, 350, 352, 356, 357, 360, + 361, 362, 363, 366, 367, 370, 371, 372, 373, 374, + 375, 376, 379, 380, 381, 382, 385, 386, 387, 390, + 391, 394, 397, 398, 400, 402, 403, 406, 408, 410, + 414, 416, 420, 421, 424, 425, 426, 429, 430, 433, + 434, 437, 438, 439, 443, 444, 448, 449, 450, 451 }; #endif @@ -628,10 +628,10 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -159 +#define YYPACT_NINF -205 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-159))) + (!!((Yystate) == (-205))) #define YYTABLE_NINF -153 @@ -642,41 +642,41 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 15, 4, 58, -159, 73, -159, 320, -159, -159, 41, - 44, -159, 44, 511, 140, 511, 10, 19, 96, -159, - 44, 41, 84, -159, -159, 42, -159, 604, 511, -159, - 128, 78, 401, -159, 82, -159, -159, -159, 8, -159, - -159, 6, -159, 83, 7, -159, 94, 108, -159, -159, - 511, -159, -159, -159, 44, -159, -159, -159, -159, -159, - 545, 6, 22, 180, 184, 187, 189, -159, 34, 119, - -12, 183, 120, 39, 118, -159, 82, -159, -159, -159, - -159, -159, -159, -159, 31, -159, -159, -159, -159, 511, - 645, 44, 133, 511, 202, 6, -159, 70, -159, 11, - -159, 604, -159, 431, 431, 145, -159, -159, -33, 12, - 44, 44, 44, 431, 146, -159, 44, -159, -13, 44, - 182, -159, -159, -159, -159, 511, 361, 511, 511, 511, - 511, 545, 545, 545, 545, 545, 545, 545, 545, 545, - 545, 545, 545, 545, 545, 545, 698, 31, 185, -159, - 604, 176, 511, 31, 90, 153, 164, 154, -159, -159, - -159, 151, -3, 511, 431, -159, 16, 16, -159, -159, - -159, -159, 161, 155, -159, 97, -159, -159, 180, 604, - 87, 184, 187, 189, -159, 119, 119, 119, 119, 119, - 119, 119, -12, 183, 183, 120, 39, 118, 118, -159, - 196, 645, 81, -159, 511, 24, 197, 44, 210, 243, - 244, 162, 198, 511, -159, -159, -159, 239, -159, 33, - -159, 259, 261, -159, -13, -159, 236, 833, 240, -159, - -159, 230, 511, 31, 511, 481, 238, 266, 217, 90, - 90, 21, 268, 239, 44, 44, 199, 200, 267, 739, - 739, -159, 511, 245, -159, 236, 249, -159, -159, 239, - 780, 18, 20, 20, 14, 237, 90, 278, -159, -159, - 221, 223, 224, 90, 267, 267, -159, 33, -159, 260, - 262, 98, 291, 269, -159, -159, 235, 511, 20, 833, - 604, 511, -159, -159, -159, 16, 222, 226, -159, -159, - -159, -159, 282, 283, 303, 739, 280, -159, 239, 780, - -159, 197, -159, 305, 33, 33, -159, -159, 604, -159, - -159, 248, -159, 739, 234, 247, -159, -159, 284, 309, - 312, 296, 739, 739, -159, 290, 294, 298, 306, -159, - -159 + -12, -8, 47, -205, 22, -205, 346, 22, 22, -205, + -205, 34, 35, -205, 35, 537, 134, 537, 12, 32, + 60, -205, 35, 34, -10, -205, -205, 65, -205, 639, + 537, -205, 57, 2, 427, -205, 85, -205, -205, -205, + 109, -205, -205, -205, -205, 4, -205, 33, 5, -205, + 46, 81, -205, -205, 537, -205, -205, -205, 35, -205, + -205, -205, -205, -205, 571, 4, 16, 126, 155, 160, + 168, -205, 37, 117, 29, 181, 119, 79, 130, -205, + 85, -205, -205, -205, -205, -205, -205, -205, 18, -205, + -205, 537, 680, 35, 146, 537, 22, 4, -205, 121, + -205, 13, -205, 639, -205, 457, 457, 147, -205, -205, + 77, 0, 35, 35, 35, 457, 148, -205, 35, -205, + 111, 35, 601, -205, -205, -205, -205, 537, 387, 537, + 537, 537, 537, 571, 571, 571, 571, 571, 571, 571, + 571, 571, 571, 571, 571, 571, 571, 571, 733, 18, + 183, -205, 639, 178, 537, 18, 8, 152, 165, 156, + -205, -205, -205, 151, 1, 537, 457, -205, 6, 6, + -205, -205, -205, -205, 154, 157, -205, 136, -205, -205, + 126, 639, 143, 155, 160, 168, -205, 117, 117, 117, + 117, 117, 117, 117, 29, 181, 181, 119, 79, 130, + 130, -205, 198, 680, 95, -205, 537, 28, 189, 35, + 204, 22, 22, 96, 170, 537, -205, -205, -205, 223, + -205, -3, -205, 22, 22, -205, 111, -205, 210, 868, + 214, -205, -205, 212, 537, 18, 537, 507, 221, 22, + 199, 8, 8, 70, 22, 223, 35, 35, 177, 180, + 253, 774, 774, -205, 537, 231, -205, 210, 230, -205, + -205, 223, 815, 71, 22, 22, 17, 219, 8, 22, + -205, -205, 201, 202, 206, 8, 253, 253, -205, -3, + -205, 234, 239, 19, 269, 243, -205, -205, 213, 537, + 22, 868, 639, 537, -205, -205, -205, 6, 200, 203, + -205, -205, -205, -205, 255, 257, 274, 774, 254, -205, + 223, 815, -205, 189, -205, 22, -3, -3, -205, -205, + 639, -205, -205, 222, -205, 774, 216, 220, -205, -205, + 250, 22, 22, 259, 774, 774, -205, 267, 268, 266, + 278, -205, -205 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -684,63 +684,63 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 3, 0, 0, 5, 0, 1, 152, 4, 2, 0, - 0, 165, 0, 0, 0, 0, 0, 0, 0, 34, - 0, 0, 155, 156, 140, 0, 164, 13, 0, 6, - 0, 15, 81, 22, 0, 123, 7, 27, 0, 153, - 41, 81, 21, 43, 45, 37, 50, 0, 125, 126, - 0, 131, 129, 130, 0, 127, 134, 132, 135, 133, - 0, 81, 0, 85, 87, 89, 91, 93, 95, 97, - 105, 107, 110, 112, 114, 117, 120, 119, 128, 32, - 30, 31, 28, 29, 0, 166, 55, 56, 167, 0, - 152, 0, 0, 0, 0, 81, 154, 0, 14, 0, - 12, 17, 82, 0, 0, 124, 18, 77, 76, 78, - 0, 0, 0, 0, 19, 74, 0, 47, 0, 0, - 0, 96, 121, 122, 124, 0, 152, 0, 0, 0, + 3, 0, 0, 5, 0, 1, 152, 166, 167, 4, + 2, 0, 0, 165, 0, 0, 0, 0, 0, 0, + 0, 34, 0, 0, 155, 156, 140, 0, 164, 13, + 0, 6, 0, 15, 81, 22, 0, 123, 7, 27, + 0, 153, 41, 168, 169, 81, 21, 43, 45, 37, + 50, 0, 125, 126, 0, 131, 129, 130, 0, 127, + 134, 132, 135, 133, 0, 81, 0, 85, 87, 89, + 91, 93, 95, 97, 105, 107, 110, 112, 114, 117, + 120, 119, 128, 32, 30, 31, 28, 29, 0, 55, + 56, 0, 152, 0, 0, 0, 0, 81, 154, 0, + 14, 0, 12, 17, 82, 0, 0, 124, 18, 77, + 76, 78, 0, 0, 0, 0, 19, 74, 0, 47, + 0, 0, 0, 96, 121, 122, 124, 0, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 152, 0, 0, 9, - 10, 0, 0, 0, 152, 124, 0, 0, 139, 16, - 80, 0, 0, 0, 0, 42, 81, 81, 44, 138, - 136, 137, 0, 48, 51, 0, 52, 53, 86, 8, - 62, 88, 90, 92, 94, 99, 104, 103, 102, 98, - 100, 101, 106, 109, 108, 111, 113, 115, 116, 118, - 0, 152, 26, 11, 0, 0, 71, 0, 0, 0, - 0, 0, 153, 0, 35, 36, 75, 20, 79, 0, - 157, 0, 0, 46, 0, 54, 64, 152, 0, 60, - 23, 0, 0, 0, 0, 0, 0, 0, 0, 152, - 152, 0, 0, 33, 0, 0, 0, 159, 81, 152, - 152, 49, 0, 69, 65, 66, 62, 63, 24, 25, - 152, 57, 0, 0, 83, 0, 152, 0, 146, 143, - 0, 0, 0, 152, 81, 81, 158, 0, 161, 0, - 0, 0, 0, 0, 67, 61, 0, 0, 0, 152, - 8, 0, 40, 145, 141, 81, 0, 0, 144, 162, - 163, 160, 0, 0, 0, 152, 0, 39, 58, 152, - 72, 71, 84, 0, 0, 0, 150, 151, 8, 70, - 59, 0, 73, 152, 0, 0, 68, 38, 0, 0, - 0, 0, 152, 152, 147, 0, 0, 0, 0, 148, - 149 + 0, 0, 0, 0, 0, 0, 0, 0, 152, 0, + 0, 9, 10, 0, 0, 0, 152, 124, 0, 0, + 139, 16, 80, 0, 0, 0, 0, 42, 81, 81, + 44, 138, 136, 137, 0, 48, 51, 0, 52, 53, + 86, 8, 62, 88, 90, 92, 94, 99, 104, 103, + 102, 98, 100, 101, 106, 109, 108, 111, 113, 115, + 116, 118, 0, 152, 26, 11, 0, 0, 71, 0, + 0, 0, 0, 0, 153, 0, 35, 36, 75, 20, + 79, 0, 157, 0, 0, 46, 0, 54, 64, 152, + 0, 60, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 152, 152, 0, 0, 33, 0, 0, 0, 159, + 81, 152, 152, 49, 0, 69, 65, 66, 62, 63, + 24, 25, 152, 57, 0, 0, 83, 0, 152, 0, + 146, 143, 0, 0, 0, 152, 81, 81, 158, 0, + 161, 0, 0, 0, 0, 0, 67, 61, 0, 0, + 0, 152, 8, 0, 40, 145, 141, 81, 0, 0, + 144, 162, 163, 160, 0, 0, 0, 152, 0, 39, + 58, 152, 72, 71, 84, 0, 0, 0, 150, 151, + 8, 70, 59, 0, 73, 152, 0, 0, 68, 38, + 0, 0, 0, 0, 152, 152, 147, 0, 0, 0, + 0, 148, 149 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -159, -159, -159, -159, 28, -144, 328, -26, -159, -6, - 219, 129, 114, 220, -159, -159, 141, -159, -159, 86, - -159, 95, -159, -159, 38, 1, -159, -25, -16, 54, - 5, 227, 228, 229, 233, -40, -159, 79, 225, 32, - 231, 216, 48, -52, -4, 246, 192, -159, -159, -159, - -79, -159, -135, -114, -85, -158, 91, -137, 17, -80 + -205, -205, -205, -205, -124, -148, 298, -26, -205, -6, + 188, 99, 83, 190, -205, -205, 106, -205, -205, 54, + -205, 58, -205, -205, 7, -25, -205, -21, -33, 20, + 135, 191, 193, 194, 192, -45, -205, 56, 185, 66, + 195, 182, 67, -56, -4, 211, 158, -205, -205, -205, + -204, -205, -138, -128, -87, -163, 53, -102, 48, 27 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 2, 3, 6, 148, 149, 150, 30, 31, 61, - 42, 43, 172, 45, 46, 176, 89, 288, 33, 229, - 253, 254, 255, 283, 236, 105, 106, 161, 115, 263, - 109, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 173, 35, 36, - 208, 209, 37, 38, 39, 221, 246, 247, 40, 90 + -1, 2, 3, 6, 150, 151, 152, 32, 33, 65, + 46, 47, 174, 49, 50, 178, 91, 290, 35, 231, + 255, 256, 257, 285, 238, 107, 108, 163, 117, 265, + 111, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 175, 37, 38, + 210, 211, 39, 40, 41, 223, 248, 249, 42, 9 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -748,233 +748,241 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 32, 98, 34, 41, 146, 34, 203, 107, 123, 222, - 121, 125, 102, 117, 85, 95, 108, 34, 62, 210, - 84, 32, 102, 34, 85, 125, 125, 44, 125, 47, - 111, 112, 125, 99, 92, 85, 125, 94, 125, -74, - 211, -74, 114, 11, 86, 125, 270, 271, 87, 131, - 132, 133, 134, 4, 126, 169, 170, 11, 5, 287, - 171, 91, 124, 1, 234, 11, 139, 201, 11, 212, - 140, 122, 164, 206, 158, 159, 272, 7, 160, 244, - 245, 88, 113, 118, 32, 26, 34, 164, 158, 291, - 184, 88, 219, 199, 147, 32, 155, 34, 153, 26, - 180, 24, 88, 97, 210, 210, 135, 26, 151, 162, - 26, 207, 125, 136, 137, 86, 227, 28, 228, 87, - 32, -142, 34, 143, 144, 211, 211, 165, 166, 167, - 304, 210, 100, 44, 156, 157, 47, 313, 210, 218, - 32, 93, 34, 96, 32, 310, 34, 22, 23, 101, - 220, 220, 211, 260, 212, 212, 110, 205, 116, 211, - 268, 269, 79, 80, 81, 56, 57, 58, 217, 119, - 59, 193, 194, 32, 200, 34, 82, 324, 325, 83, - 120, 212, 289, 290, 111, 112, 241, 293, 212, 48, - 49, 197, 198, 127, 298, 32, 128, 34, 129, 130, - 138, 256, 141, 142, 145, 152, 154, 226, 309, 233, - 185, 186, 187, 188, 189, 190, 191, 163, 243, 204, - -124, 32, 202, 34, 44, 213, 214, 215, 216, 231, - 224, 230, 278, 51, 52, 53, 248, 259, 223, 261, - 264, 238, 235, 32, 32, 34, 34, 239, 240, 55, - 56, 57, 58, 125, 32, 59, 34, 281, 299, 300, - 175, 274, 275, 249, 242, 250, 252, 258, 257, 265, - 266, 267, 273, 102, 282, 277, 276, 279, 280, 220, - 228, 292, 294, 32, 32, 34, 34, 295, 286, 296, - 297, 302, 308, 303, 248, 305, 264, 307, 314, 32, - 306, 34, 315, 32, 316, 34, 317, 318, 320, 323, - 327, 329, 32, 332, 34, 331, 333, 32, 311, 34, - 334, 337, 339, 8, 330, 338, 32, 32, 34, 34, - 340, 248, 248, 319, 29, 168, 237, 321, 251, 174, - 9, 10, 285, 232, 11, 312, 326, 12, 13, 322, - 284, 328, 178, 14, 15, 181, 16, 182, 196, 17, - 335, 336, 183, 192, 18, 179, 177, 225, 301, 0, - 19, 0, 195, 0, 20, 21, 0, 22, 23, 0, - 24, 9, 10, 25, 0, 11, 26, 0, 12, 13, - 0, 27, 0, 0, 14, 15, 28, 16, 0, 0, - 17, 0, 0, 0, 0, 18, 0, 102, 48, 49, - 50, 19, 0, 0, 0, 0, 21, 0, 22, 23, - 0, 24, 0, 0, 25, 11, 0, 26, 0, 0, - 0, 0, 27, 0, 0, 0, 0, 28, 48, 49, - 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 51, 52, 53, 11, 0, 54, 0, 0, - 0, 24, 0, 0, 0, 0, 0, 26, 55, 56, - 57, 58, 0, 0, 59, 0, 103, 104, 0, 60, - 0, 0, 51, 52, 53, 0, 0, 54, 48, 49, - 50, 24, 0, 0, 0, 0, 0, 26, 55, 56, - 57, 58, 0, 0, 59, 11, 103, 28, 0, 60, - 262, 0, 0, 0, 0, 0, 0, 0, 48, 49, - 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 51, 52, 53, 11, 0, 54, 0, 0, - 0, 24, 0, 0, 0, 0, 0, 26, 55, 56, - 57, 58, 48, 49, 59, 0, 0, 28, 0, 60, - 0, 0, 51, 52, 53, 0, 0, 54, 0, 11, - 0, 24, 0, 0, 0, 0, 0, 26, 55, 56, - 57, 58, 0, 0, 59, 0, 0, 28, 0, 60, - 0, 0, 0, 0, 0, 0, 51, 52, 53, 0, - 0, 54, 0, 0, 0, 24, 0, 0, 0, 0, - 0, 26, 55, 56, 57, 58, 0, 0, 59, 0, - 0, 28, 0, 60, 9, 10, -152, -152, 11, 0, - 0, 12, 13, 0, 0, 0, 0, 14, 15, 0, - 16, 0, 0, 17, 0, 0, 0, 0, 18, 0, - 0, 0, 0, 0, 19, 0, 0, 0, 0, 21, - 0, 22, 23, 0, 24, 9, 10, 25, 0, 11, - 26, 0, 12, 13, 0, 27, 0, 0, 14, 15, - 28, 16, -8, 0, 17, 0, 0, 0, 0, 18, - 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, - 21, 0, 22, 23, 0, 24, 0, 0, 25, 0, - 0, 26, 0, 0, 0, 0, 27, 0, 9, 10, - 0, 28, 11, 0, 0, 12, 13, 0, 0, 0, - 0, 14, 15, -8, 16, 0, 0, 17, 0, 0, - 0, 0, 18, 0, 0, 0, 0, 0, 19, 0, - 0, 0, 0, 21, 0, 22, 23, 0, 24, 9, - 10, 25, 0, 11, 26, 0, 12, 13, 0, 27, - -8, 0, 14, 15, 28, 16, 0, 0, 17, 0, - 0, 0, 0, 18, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 21, 0, 22, 23, 0, 24, - 9, 10, 25, 0, 11, 26, 0, 12, 13, 0, - 27, 0, 0, 14, 15, 28, 16, 0, 0, 17, - 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 0, 21, 0, 22, 23, 0, - 24, 0, -8, 25, 0, 0, 26, 0, 0, 0, - 0, 27, 0, 9, 10, 0, 28, 11, 0, 0, - 12, 13, 0, 0, 0, 0, 14, 15, 0, 16, - 0, 0, 17, 0, 0, 0, 0, 18, 0, 0, - 0, 0, 0, 19, 0, 0, 0, 0, 21, 0, - 22, 23, 0, 24, 0, 0, 25, 0, 0, 26, - 0, 0, 0, 0, 27, 0, 0, 0, 0, 28 + 34, 110, 36, 100, 205, 45, 224, 36, 125, 123, + 104, 119, 104, 109, 127, 127, 7, 97, 212, 36, + 116, 13, 7, 34, 202, 36, 7, 127, 213, 209, + 127, 127, 127, 127, 43, 44, 1, 270, 271, -142, + 126, 4, 127, 246, 247, 92, 89, 5, 128, 98, + 90, 306, 133, 134, 135, 136, 13, 228, 13, 13, + 48, 102, 51, 28, 295, 24, 25, 94, 236, 214, + 96, 300, 157, 103, 93, 166, 166, 161, 160, 233, + 115, 120, 221, 8, 162, 127, 34, 186, 36, 8, + 160, 201, 293, 8, 26, 272, 273, 34, 28, 36, + 28, 28, 182, 212, 212, 95, 124, 141, 118, 137, + 30, 142, 289, 213, 213, 148, 138, 139, 113, 114, + 243, 121, 34, 156, 36, 274, 99, 281, 282, 89, + 212, 113, 114, 90, 315, 222, 222, 212, 288, 129, + 213, 153, 34, 312, 36, 220, 34, 213, 36, -74, + 66, -74, 88, 122, 214, 214, 83, 84, 85, 112, + 167, 168, 169, 145, 146, 101, 48, 130, 313, 51, + 86, 131, 229, 87, 230, 34, 203, 36, 132, 171, + 172, 214, 208, 321, 173, 158, 159, 323, 214, 187, + 188, 189, 190, 191, 192, 193, 328, 34, 140, 36, + 143, 330, 144, 258, 60, 61, 62, 195, 196, 63, + 337, 338, 199, 200, 326, 327, 147, 280, 154, 165, + 204, 206, -124, 34, 215, 36, 149, 216, 218, 217, + 155, 225, 226, 232, 237, 240, 244, 127, 241, 242, + 254, 164, 259, 301, 302, 34, 34, 36, 36, 260, + 251, 252, 267, 269, 278, 279, 34, 48, 36, 104, + 284, 230, 262, 294, 222, 304, 268, 297, 298, 250, + 305, 275, 299, 307, 308, 309, 316, 318, 320, 317, + 319, 333, 322, 336, 329, 34, 34, 36, 36, 207, + 341, 291, 292, 331, 276, 277, 296, 332, 339, 340, + 219, 34, 342, 36, 31, 34, 170, 36, 239, 253, + 234, 176, 287, 314, 34, 286, 36, 311, 180, 34, + 324, 36, 183, 185, 184, 194, 198, 250, 34, 34, + 36, 36, 303, 179, 0, 227, 0, 0, 197, 0, + 0, 235, 325, 0, 0, 0, 0, 0, 0, 10, + 245, 0, 0, 0, 0, 0, 0, 0, 334, 335, + 0, 0, 0, 0, 250, 250, 11, 12, 0, 261, + 13, 263, 266, 14, 15, 0, 0, 0, 0, 16, + 17, 0, 18, 0, 0, 19, 0, 0, 0, 283, + 20, 181, 0, 0, 0, 0, 21, 0, 0, 0, + 22, 23, 0, 24, 25, 0, 26, 11, 12, 27, + 0, 13, 28, 0, 14, 15, 0, 29, 0, 0, + 16, 17, 30, 18, 310, 0, 19, 0, 266, 0, + 0, 20, 0, 104, 52, 53, 54, 21, 0, 0, + 0, 0, 23, 0, 24, 25, 0, 26, 0, 0, + 27, 13, 0, 28, 0, 0, 0, 0, 29, 0, + 0, 0, 0, 30, 52, 53, 54, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, + 57, 13, 0, 58, 0, 0, 0, 26, 0, 0, + 0, 0, 0, 28, 59, 60, 61, 62, 0, 0, + 63, 0, 105, 106, 0, 64, 0, 0, 55, 56, + 57, 0, 0, 58, 52, 53, 54, 26, 0, 0, + 0, 0, 0, 28, 59, 60, 61, 62, 0, 0, + 63, 13, 105, 30, 0, 64, 264, 0, 0, 0, + 0, 0, 0, 0, 52, 53, 54, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, + 57, 13, 0, 58, 0, 0, 0, 26, 0, 0, + 0, 0, 0, 28, 59, 60, 61, 62, 52, 53, + 63, 0, 0, 30, 0, 64, 0, 0, 55, 56, + 57, 0, 0, 58, 0, 13, 0, 26, 0, 0, + 0, 0, 0, 28, 59, 60, 61, 62, 52, 53, + 63, 0, 0, 30, 0, 64, 0, 0, 0, 0, + 0, 0, 55, 56, 57, 0, 0, 58, 0, 0, + 0, 26, 0, 0, 0, 0, 0, 28, 59, 60, + 61, 62, 0, 0, 63, 0, 0, 30, 0, 64, + 0, 0, 55, 56, 57, 0, 0, 0, 0, 11, + 12, -152, -152, 13, 0, 0, 14, 15, 59, 60, + 61, 62, 16, 17, 63, 18, 0, 0, 19, 177, + 0, 0, 0, 20, 0, 0, 0, 0, 0, 21, + 0, 0, 0, 0, 23, 0, 24, 25, 0, 26, + 11, 12, 27, 0, 13, 28, 0, 14, 15, 0, + 29, 0, 0, 16, 17, 30, 18, -8, 0, 19, + 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 0, 23, 0, 24, 25, 0, + 26, 0, 0, 27, 0, 0, 28, 0, 0, 0, + 0, 29, 0, 11, 12, 0, 30, 13, 0, 0, + 14, 15, 0, 0, 0, 0, 16, 17, -8, 18, + 0, 0, 19, 0, 0, 0, 0, 20, 0, 0, + 0, 0, 0, 21, 0, 0, 0, 0, 23, 0, + 24, 25, 0, 26, 11, 12, 27, 0, 13, 28, + 0, 14, 15, 0, 29, -8, 0, 16, 17, 30, + 18, 0, 0, 19, 0, 0, 0, 0, 20, 0, + 0, 0, 0, 0, 21, 0, 0, 0, 0, 23, + 0, 24, 25, 0, 26, 11, 12, 27, 0, 13, + 28, 0, 14, 15, 0, 29, 0, 0, 16, 17, + 30, 18, 0, 0, 19, 0, 0, 0, 0, 20, + 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, + 23, 0, 24, 25, 0, 26, 0, -8, 27, 0, + 0, 28, 0, 0, 0, 0, 29, 0, 11, 12, + 0, 30, 13, 0, 0, 14, 15, 0, 0, 0, + 0, 16, 17, 0, 18, 0, 0, 19, 0, 0, + 0, 0, 20, 0, 0, 0, 0, 0, 21, 0, + 0, 0, 0, 23, 0, 24, 25, 0, 26, 0, + 0, 27, 0, 0, 28, 0, 0, 0, 0, 29, + 0, 0, 0, 0, 30 }; static const yytype_int16 yycheck[] = { - 6, 27, 6, 9, 84, 9, 150, 32, 60, 167, - 50, 14, 6, 6, 4, 21, 32, 21, 13, 154, - 15, 27, 6, 27, 4, 14, 14, 10, 14, 12, - 22, 23, 14, 28, 17, 4, 14, 20, 14, 72, - 154, 74, 41, 24, 34, 14, 25, 26, 38, 15, - 16, 17, 18, 49, 32, 68, 69, 24, 0, 41, - 73, 42, 61, 48, 40, 24, 78, 147, 24, 154, - 82, 54, 75, 153, 77, 101, 55, 4, 103, 46, - 47, 71, 76, 76, 90, 66, 90, 75, 77, 75, - 130, 71, 76, 145, 89, 101, 95, 101, 93, 66, - 126, 60, 71, 61, 239, 240, 72, 66, 91, 104, - 66, 21, 14, 79, 80, 34, 29, 76, 31, 38, - 126, 31, 126, 84, 85, 239, 240, 110, 111, 112, - 32, 266, 4, 116, 64, 65, 119, 295, 273, 164, - 146, 45, 146, 59, 150, 289, 150, 57, 58, 71, - 166, 167, 266, 233, 239, 240, 74, 152, 75, 273, - 239, 240, 22, 23, 24, 68, 69, 70, 163, 75, - 73, 139, 140, 179, 146, 179, 36, 314, 315, 39, - 72, 266, 262, 263, 22, 23, 24, 266, 273, 7, - 8, 143, 144, 13, 273, 201, 12, 201, 11, 10, - 81, 227, 19, 83, 86, 72, 4, 179, 288, 204, - 131, 132, 133, 134, 135, 136, 137, 72, 213, 43, - 74, 227, 37, 227, 207, 72, 62, 73, 77, 201, - 75, 35, 248, 51, 52, 53, 219, 232, 77, 234, - 235, 31, 45, 249, 250, 249, 250, 4, 4, 67, - 68, 69, 70, 14, 260, 73, 260, 252, 274, 275, - 78, 244, 245, 4, 66, 4, 30, 37, 28, 31, - 4, 54, 4, 6, 29, 75, 77, 249, 250, 295, - 31, 44, 4, 289, 290, 289, 290, 66, 260, 66, - 66, 31, 287, 31, 277, 4, 291, 62, 76, 305, - 31, 305, 76, 309, 22, 309, 23, 4, 28, 4, - 62, 77, 318, 4, 318, 31, 4, 323, 290, 323, - 24, 31, 24, 3, 77, 31, 332, 333, 332, 333, - 24, 314, 315, 305, 6, 116, 207, 309, 224, 119, - 20, 21, 256, 202, 24, 291, 318, 27, 28, 311, - 255, 323, 125, 33, 34, 127, 36, 128, 142, 39, - 332, 333, 129, 138, 44, 4, 120, 175, 277, -1, - 50, -1, 141, -1, 54, 55, -1, 57, 58, -1, - 60, 20, 21, 63, -1, 24, 66, -1, 27, 28, - -1, 71, -1, -1, 33, 34, 76, 36, -1, -1, - 39, -1, -1, -1, -1, 44, -1, 6, 7, 8, - 9, 50, -1, -1, -1, -1, 55, -1, 57, 58, - -1, 60, -1, -1, 63, 24, -1, 66, -1, -1, - -1, -1, 71, -1, -1, -1, -1, 76, 7, 8, - 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 51, 52, 53, 24, -1, 56, -1, -1, - -1, 60, -1, -1, -1, -1, -1, 66, 67, 68, - 69, 70, -1, -1, 73, -1, 75, 76, -1, 78, - -1, -1, 51, 52, 53, -1, -1, 56, 7, 8, - 9, 60, -1, -1, -1, -1, -1, 66, 67, 68, - 69, 70, -1, -1, 73, 24, 75, 76, -1, 78, - 29, -1, -1, -1, -1, -1, -1, -1, 7, 8, - 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 51, 52, 53, 24, -1, 56, -1, -1, - -1, 60, -1, -1, -1, -1, -1, 66, 67, 68, - 69, 70, 7, 8, 73, -1, -1, 76, -1, 78, - -1, -1, 51, 52, 53, -1, -1, 56, -1, 24, + 6, 34, 6, 29, 152, 11, 169, 11, 64, 54, + 6, 6, 6, 34, 14, 14, 4, 23, 156, 23, + 45, 24, 4, 29, 148, 29, 4, 14, 156, 21, + 14, 14, 14, 14, 7, 8, 48, 241, 242, 31, + 65, 49, 14, 46, 47, 18, 34, 0, 32, 59, + 38, 32, 15, 16, 17, 18, 24, 181, 24, 24, + 12, 4, 14, 66, 268, 57, 58, 19, 40, 156, + 22, 275, 97, 71, 42, 75, 75, 103, 77, 203, + 76, 76, 76, 71, 105, 14, 92, 132, 92, 71, + 77, 147, 75, 71, 60, 25, 26, 103, 66, 103, + 66, 66, 128, 241, 242, 45, 58, 78, 75, 72, + 76, 82, 41, 241, 242, 88, 79, 80, 22, 23, + 24, 75, 128, 96, 128, 55, 61, 251, 252, 34, + 268, 22, 23, 38, 297, 168, 169, 275, 262, 13, + 268, 93, 148, 291, 148, 166, 152, 275, 152, 72, + 15, 74, 17, 72, 241, 242, 22, 23, 24, 74, + 112, 113, 114, 84, 85, 30, 118, 12, 292, 121, + 36, 11, 29, 39, 31, 181, 149, 181, 10, 68, + 69, 268, 155, 307, 73, 64, 65, 311, 275, 133, + 134, 135, 136, 137, 138, 139, 320, 203, 81, 203, + 19, 325, 83, 229, 68, 69, 70, 141, 142, 73, + 334, 335, 145, 146, 316, 317, 86, 250, 72, 72, + 37, 43, 74, 229, 72, 229, 91, 62, 77, 73, + 95, 77, 75, 35, 45, 31, 66, 14, 211, 212, + 30, 106, 28, 276, 277, 251, 252, 251, 252, 37, + 223, 224, 31, 54, 77, 75, 262, 209, 262, 6, + 29, 31, 235, 44, 297, 31, 239, 66, 66, 221, + 31, 244, 66, 4, 31, 62, 76, 22, 4, 76, + 23, 31, 28, 24, 62, 291, 292, 291, 292, 154, + 24, 264, 265, 77, 246, 247, 269, 77, 31, 31, + 165, 307, 24, 307, 6, 311, 118, 311, 209, 226, + 204, 121, 258, 293, 320, 257, 320, 290, 127, 325, + 313, 325, 129, 131, 130, 140, 144, 279, 334, 335, + 334, 335, 279, 122, -1, 177, -1, -1, 143, -1, + -1, 206, 315, -1, -1, -1, -1, -1, -1, 3, + 215, -1, -1, -1, -1, -1, -1, -1, 331, 332, + -1, -1, -1, -1, 316, 317, 20, 21, -1, 234, + 24, 236, 237, 27, 28, -1, -1, -1, -1, 33, + 34, -1, 36, -1, -1, 39, -1, -1, -1, 254, + 44, 4, -1, -1, -1, -1, 50, -1, -1, -1, + 54, 55, -1, 57, 58, -1, 60, 20, 21, 63, + -1, 24, 66, -1, 27, 28, -1, 71, -1, -1, + 33, 34, 76, 36, 289, -1, 39, -1, 293, -1, + -1, 44, -1, 6, 7, 8, 9, 50, -1, -1, + -1, -1, 55, -1, 57, 58, -1, 60, -1, -1, + 63, 24, -1, 66, -1, -1, -1, -1, 71, -1, + -1, -1, -1, 76, 7, 8, 9, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 51, 52, + 53, 24, -1, 56, -1, -1, -1, 60, -1, -1, + -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, + 73, -1, 75, 76, -1, 78, -1, -1, 51, 52, + 53, -1, -1, 56, 7, 8, 9, 60, -1, -1, + -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, + 73, 24, 75, 76, -1, 78, 29, -1, -1, -1, + -1, -1, -1, -1, 7, 8, 9, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 51, 52, + 53, 24, -1, 56, -1, -1, -1, 60, -1, -1, + -1, -1, -1, 66, 67, 68, 69, 70, 7, 8, + 73, -1, -1, 76, -1, 78, -1, -1, 51, 52, + 53, -1, -1, 56, -1, 24, -1, 60, -1, -1, + -1, -1, -1, 66, 67, 68, 69, 70, 7, 8, + 73, -1, -1, 76, -1, 78, -1, -1, -1, -1, + -1, -1, 51, 52, 53, -1, -1, 56, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, -1, -1, 73, -1, -1, 76, -1, 78, - -1, -1, -1, -1, -1, -1, 51, 52, 53, -1, - -1, 56, -1, -1, -1, 60, -1, -1, -1, -1, - -1, 66, 67, 68, 69, 70, -1, -1, 73, -1, - -1, 76, -1, 78, 20, 21, 22, 23, 24, -1, - -1, 27, 28, -1, -1, -1, -1, 33, 34, -1, - 36, -1, -1, 39, -1, -1, -1, -1, 44, -1, - -1, -1, -1, -1, 50, -1, -1, -1, -1, 55, - -1, 57, 58, -1, 60, 20, 21, 63, -1, 24, - 66, -1, 27, 28, -1, 71, -1, -1, 33, 34, - 76, 36, 37, -1, 39, -1, -1, -1, -1, 44, - -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, - 55, -1, 57, 58, -1, 60, -1, -1, 63, -1, - -1, 66, -1, -1, -1, -1, 71, -1, 20, 21, - -1, 76, 24, -1, -1, 27, 28, -1, -1, -1, - -1, 33, 34, 35, 36, -1, -1, 39, -1, -1, - -1, -1, 44, -1, -1, -1, -1, -1, 50, -1, - -1, -1, -1, 55, -1, 57, 58, -1, 60, 20, - 21, 63, -1, 24, 66, -1, 27, 28, -1, 71, - 31, -1, 33, 34, 76, 36, -1, -1, 39, -1, + -1, -1, 51, 52, 53, -1, -1, -1, -1, 20, + 21, 22, 23, 24, -1, -1, 27, 28, 67, 68, + 69, 70, 33, 34, 73, 36, -1, -1, 39, 78, -1, -1, -1, 44, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 55, -1, 57, 58, -1, 60, 20, 21, 63, -1, 24, 66, -1, 27, 28, -1, - 71, -1, -1, 33, 34, 76, 36, -1, -1, 39, + 71, -1, -1, 33, 34, 76, 36, 37, -1, 39, -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 55, -1, 57, 58, -1, - 60, -1, 62, 63, -1, -1, 66, -1, -1, -1, + 60, -1, -1, 63, -1, -1, 66, -1, -1, -1, -1, 71, -1, 20, 21, -1, 76, 24, -1, -1, - 27, 28, -1, -1, -1, -1, 33, 34, -1, 36, + 27, 28, -1, -1, -1, -1, 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 55, -1, - 57, 58, -1, 60, -1, -1, 63, -1, -1, 66, - -1, -1, -1, -1, 71, -1, -1, -1, -1, 76 + 57, 58, -1, 60, 20, 21, 63, -1, 24, 66, + -1, 27, 28, -1, 71, 31, -1, 33, 34, 76, + 36, -1, -1, 39, -1, -1, -1, -1, 44, -1, + -1, -1, -1, -1, 50, -1, -1, -1, -1, 55, + -1, 57, 58, -1, 60, 20, 21, 63, -1, 24, + 66, -1, 27, 28, -1, 71, -1, -1, 33, 34, + 76, 36, -1, -1, 39, -1, -1, -1, -1, 44, + -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, + 55, -1, 57, 58, -1, 60, -1, 62, 63, -1, + -1, 66, -1, -1, -1, -1, 71, -1, 20, 21, + -1, 76, 24, -1, -1, 27, 28, -1, -1, -1, + -1, 33, 34, -1, 36, -1, -1, 39, -1, -1, + -1, -1, 44, -1, -1, -1, -1, -1, 50, -1, + -1, -1, -1, 55, -1, 57, 58, -1, 60, -1, + -1, 63, -1, -1, 66, -1, -1, -1, -1, 71, + -1, -1, -1, -1, 76 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 48, 88, 89, 49, 0, 90, 4, 3, 20, - 21, 24, 27, 28, 33, 34, 36, 39, 44, 50, - 54, 55, 57, 58, 60, 63, 66, 71, 76, 93, - 94, 95, 96, 105, 131, 135, 136, 139, 140, 141, - 145, 96, 97, 98, 145, 100, 101, 145, 7, 8, - 9, 51, 52, 53, 56, 67, 68, 69, 70, 73, - 78, 96, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 22, - 23, 24, 36, 39, 117, 4, 34, 38, 71, 103, - 146, 42, 145, 45, 145, 96, 59, 61, 94, 117, - 4, 71, 6, 75, 76, 112, 113, 114, 115, 117, - 74, 22, 23, 76, 112, 115, 75, 6, 76, 75, - 72, 122, 145, 130, 112, 14, 32, 13, 12, 11, - 10, 15, 16, 17, 18, 72, 79, 80, 81, 78, - 82, 19, 83, 84, 85, 86, 146, 117, 91, 92, - 93, 145, 72, 117, 4, 112, 64, 65, 77, 94, - 114, 114, 117, 72, 75, 145, 145, 145, 97, 68, - 69, 73, 99, 134, 100, 78, 102, 132, 118, 4, - 94, 119, 120, 121, 122, 124, 124, 124, 124, 124, - 124, 124, 125, 126, 126, 127, 128, 129, 129, 130, - 91, 146, 37, 92, 43, 117, 146, 21, 137, 138, - 139, 140, 141, 72, 62, 73, 77, 117, 114, 76, - 115, 142, 142, 77, 75, 133, 91, 29, 31, 106, - 35, 91, 103, 117, 40, 45, 111, 98, 31, 4, - 4, 24, 66, 117, 46, 47, 143, 144, 145, 4, - 4, 99, 30, 107, 108, 109, 94, 28, 37, 117, - 146, 117, 29, 116, 117, 31, 4, 54, 137, 137, - 25, 26, 55, 4, 145, 145, 77, 75, 115, 91, - 91, 117, 29, 110, 108, 106, 91, 41, 104, 146, - 146, 75, 44, 137, 4, 66, 66, 66, 137, 115, - 115, 143, 31, 31, 32, 4, 31, 62, 117, 146, - 92, 91, 116, 142, 76, 76, 22, 23, 4, 91, - 28, 91, 111, 4, 144, 144, 91, 62, 91, 77, - 77, 31, 4, 4, 24, 91, 91, 31, 31, 24, - 24 + 0, 48, 88, 89, 49, 0, 90, 4, 71, 146, + 3, 20, 21, 24, 27, 28, 33, 34, 36, 39, + 44, 50, 54, 55, 57, 58, 60, 63, 66, 71, + 76, 93, 94, 95, 96, 105, 131, 135, 136, 139, + 140, 141, 145, 146, 146, 96, 97, 98, 145, 100, + 101, 145, 7, 8, 9, 51, 52, 53, 56, 67, + 68, 69, 70, 73, 78, 96, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 22, 23, 24, 36, 39, 117, 34, + 38, 103, 146, 42, 145, 45, 145, 96, 59, 61, + 94, 117, 4, 71, 6, 75, 76, 112, 113, 114, + 115, 117, 74, 22, 23, 76, 112, 115, 75, 6, + 76, 75, 72, 122, 145, 130, 112, 14, 32, 13, + 12, 11, 10, 15, 16, 17, 18, 72, 79, 80, + 81, 78, 82, 19, 83, 84, 85, 86, 146, 117, + 91, 92, 93, 145, 72, 117, 146, 112, 64, 65, + 77, 94, 114, 114, 117, 72, 75, 145, 145, 145, + 97, 68, 69, 73, 99, 134, 100, 78, 102, 132, + 118, 4, 94, 119, 120, 121, 122, 124, 124, 124, + 124, 124, 124, 124, 125, 126, 126, 127, 128, 129, + 129, 130, 91, 146, 37, 92, 43, 117, 146, 21, + 137, 138, 139, 140, 141, 72, 62, 73, 77, 117, + 114, 76, 115, 142, 142, 77, 75, 133, 91, 29, + 31, 106, 35, 91, 103, 117, 40, 45, 111, 98, + 31, 146, 146, 24, 66, 117, 46, 47, 143, 144, + 145, 146, 146, 99, 30, 107, 108, 109, 94, 28, + 37, 117, 146, 117, 29, 116, 117, 31, 146, 54, + 137, 137, 25, 26, 55, 146, 145, 145, 77, 75, + 115, 91, 91, 117, 29, 110, 108, 106, 91, 41, + 104, 146, 146, 75, 44, 137, 146, 66, 66, 66, + 137, 115, 115, 143, 31, 31, 32, 4, 31, 62, + 117, 146, 92, 91, 116, 142, 76, 76, 22, 23, + 4, 91, 28, 91, 111, 146, 144, 144, 91, 62, + 91, 77, 77, 31, 146, 146, 24, 91, 91, 31, + 31, 24, 24 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -996,7 +1004,7 @@ static const yytype_uint8 yyr1[] = 132, 132, 133, 133, 133, 133, 134, 134, 134, 135, 135, 136, 137, 137, 137, 137, 137, 138, 138, 138, 139, 139, 140, 140, 141, 141, 141, 142, 142, 143, - 143, 144, 144, 144, 145, 145, 146, 146 + 143, 144, 144, 144, 145, 145, 146, 146, 146, 146 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1018,7 +1026,7 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 7, 0, 3, 4, 4, 3, 9, 11, 11, 8, 8, 0, 1, 2, 1, 1, 1, 3, 1, - 3, 2, 3, 3, 1, 1, 1, 1 + 3, 2, 3, 3, 1, 1, 1, 1, 2, 2 }; @@ -1701,964 +1709,964 @@ yyreduce: switch (yyn) { case 2: -#line 147 "parser.y" /* yacc.c:1646 */ +#line 142 "parser.y" /* yacc.c:1646 */ { parse_complete(ctx, (yyvsp[-2].boolean)); } -#line 1712 "parser.tab.c" /* yacc.c:1646 */ +#line 1715 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 3: -#line 150 "parser.y" /* yacc.c:1646 */ +#line 145 "parser.y" /* yacc.c:1646 */ { (yyval.boolean) = FALSE; } -#line 1718 "parser.tab.c" /* yacc.c:1646 */ +#line 1721 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 4: -#line 151 "parser.y" /* yacc.c:1646 */ +#line 146 "parser.y" /* yacc.c:1646 */ { (yyval.boolean) = TRUE; } -#line 1724 "parser.tab.c" /* yacc.c:1646 */ +#line 1727 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 6: -#line 155 "parser.y" /* yacc.c:1646 */ +#line 150 "parser.y" /* yacc.c:1646 */ { source_add_statement(ctx, (yyvsp[0].statement)); } -#line 1730 "parser.tab.c" /* yacc.c:1646 */ +#line 1733 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 7: -#line 156 "parser.y" /* yacc.c:1646 */ +#line 151 "parser.y" /* yacc.c:1646 */ { source_add_class(ctx, (yyvsp[0].class_decl)); } -#line 1736 "parser.tab.c" /* yacc.c:1646 */ +#line 1739 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 8: -#line 159 "parser.y" /* yacc.c:1646 */ +#line 154 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = NULL; } -#line 1742 "parser.tab.c" /* yacc.c:1646 */ +#line 1745 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 9: -#line 160 "parser.y" /* yacc.c:1646 */ +#line 155 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].statement); } -#line 1748 "parser.tab.c" /* yacc.c:1646 */ +#line 1751 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 10: -#line 163 "parser.y" /* yacc.c:1646 */ +#line 158 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].statement); } -#line 1754 "parser.tab.c" /* yacc.c:1646 */ +#line 1757 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 11: -#line 164 "parser.y" /* yacc.c:1646 */ +#line 159 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = link_statements((yyvsp[-1].statement), (yyvsp[0].statement)); } -#line 1760 "parser.tab.c" /* yacc.c:1646 */ +#line 1763 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 12: -#line 167 "parser.y" /* yacc.c:1646 */ +#line 162 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[-1].statement); } -#line 1766 "parser.tab.c" /* yacc.c:1646 */ +#line 1769 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 13: -#line 170 "parser.y" /* yacc.c:1646 */ +#line 165 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = NULL; } -#line 1772 "parser.tab.c" /* yacc.c:1646 */ +#line 1775 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 14: -#line 171 "parser.y" /* yacc.c:1646 */ +#line 166 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].statement); } -#line 1778 "parser.tab.c" /* yacc.c:1646 */ +#line 1781 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 15: -#line 172 "parser.y" /* yacc.c:1646 */ +#line 167 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].statement); } -#line 1784 "parser.tab.c" /* yacc.c:1646 */ +#line 1787 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 16: -#line 173 "parser.y" /* yacc.c:1646 */ +#line 168 "parser.y" /* yacc.c:1646 */ { (yyvsp[-2].statement)->next = (yyvsp[0].statement); (yyval.statement) = (yyvsp[-2].statement); } -#line 1790 "parser.tab.c" /* yacc.c:1646 */ +#line 1793 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 17: -#line 174 "parser.y" /* yacc.c:1646 */ +#line 169 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[-1].statement); } -#line 1796 "parser.tab.c" /* yacc.c:1646 */ +#line 1799 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 18: -#line 177 "parser.y" /* yacc.c:1646 */ +#line 172 "parser.y" /* yacc.c:1646 */ { (yyvsp[-1].member)->args = (yyvsp[0].expression); (yyval.statement) = new_call_statement(ctx, FALSE, (yyvsp[-1].member)); CHECK_ERROR; } -#line 1802 "parser.tab.c" /* yacc.c:1646 */ +#line 1805 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 19: -#line 178 "parser.y" /* yacc.c:1646 */ +#line 173 "parser.y" /* yacc.c:1646 */ { (yyvsp[-1].member)->args = (yyvsp[0].expression); (yyval.statement) = new_call_statement(ctx, TRUE, (yyvsp[-1].member)); CHECK_ERROR; } -#line 1808 "parser.tab.c" /* yacc.c:1646 */ +#line 1811 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 20: -#line 180 "parser.y" /* yacc.c:1646 */ +#line 175 "parser.y" /* yacc.c:1646 */ { (yyvsp[-3].member)->args = (yyvsp[-2].expression); (yyval.statement) = new_assign_statement(ctx, (yyvsp[-3].member), (yyvsp[0].expression)); CHECK_ERROR; } -#line 1814 "parser.tab.c" /* yacc.c:1646 */ +#line 1817 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 21: -#line 181 "parser.y" /* yacc.c:1646 */ +#line 176 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_dim_statement(ctx, (yyvsp[0].dim_decl)); CHECK_ERROR; } -#line 1820 "parser.tab.c" /* yacc.c:1646 */ +#line 1823 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 22: -#line 182 "parser.y" /* yacc.c:1646 */ +#line 177 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].statement); } -#line 1826 "parser.tab.c" /* yacc.c:1646 */ +#line 1829 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 23: -#line 184 "parser.y" /* yacc.c:1646 */ +#line 179 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_while_statement(ctx, STAT_WHILE, (yyvsp[-3].expression), (yyvsp[-1].statement)); CHECK_ERROR; } -#line 1832 "parser.tab.c" /* yacc.c:1646 */ +#line 1835 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 24: -#line 186 "parser.y" /* yacc.c:1646 */ +#line 181 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_while_statement(ctx, (yyvsp[-4].boolean) ? STAT_WHILELOOP : STAT_UNTIL, (yyvsp[-3].expression), (yyvsp[-1].statement)); CHECK_ERROR; } -#line 1839 "parser.tab.c" /* yacc.c:1646 */ +#line 1842 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 25: -#line 189 "parser.y" /* yacc.c:1646 */ +#line 184 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_while_statement(ctx, (yyvsp[-1].boolean) ? STAT_DOWHILE : STAT_DOUNTIL, (yyvsp[0].expression), (yyvsp[-3].statement)); CHECK_ERROR; } -#line 1846 "parser.tab.c" /* yacc.c:1646 */ +#line 1849 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 26: -#line 191 "parser.y" /* yacc.c:1646 */ +#line 186 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_while_statement(ctx, STAT_DOWHILE, NULL, (yyvsp[-1].statement)); CHECK_ERROR; } -#line 1852 "parser.tab.c" /* yacc.c:1646 */ +#line 1855 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 27: -#line 192 "parser.y" /* yacc.c:1646 */ +#line 187 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_function_statement(ctx, (yyvsp[0].func_decl)); CHECK_ERROR; } -#line 1858 "parser.tab.c" /* yacc.c:1646 */ +#line 1861 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 28: -#line 193 "parser.y" /* yacc.c:1646 */ +#line 188 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_statement(ctx, STAT_EXITDO, 0); CHECK_ERROR; } -#line 1864 "parser.tab.c" /* yacc.c:1646 */ +#line 1867 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 29: -#line 194 "parser.y" /* yacc.c:1646 */ +#line 189 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_statement(ctx, STAT_EXITFOR, 0); CHECK_ERROR; } -#line 1870 "parser.tab.c" /* yacc.c:1646 */ +#line 1873 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 30: -#line 195 "parser.y" /* yacc.c:1646 */ +#line 190 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_statement(ctx, STAT_EXITFUNC, 0); CHECK_ERROR; } -#line 1876 "parser.tab.c" /* yacc.c:1646 */ +#line 1879 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 31: -#line 196 "parser.y" /* yacc.c:1646 */ +#line 191 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_statement(ctx, STAT_EXITPROP, 0); CHECK_ERROR; } -#line 1882 "parser.tab.c" /* yacc.c:1646 */ +#line 1885 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 32: -#line 197 "parser.y" /* yacc.c:1646 */ +#line 192 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_statement(ctx, STAT_EXITSUB, 0); CHECK_ERROR; } -#line 1888 "parser.tab.c" /* yacc.c:1646 */ +#line 1891 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 33: -#line 199 "parser.y" /* yacc.c:1646 */ +#line 194 "parser.y" /* yacc.c:1646 */ { (yyvsp[-3].member)->args = (yyvsp[-2].expression); (yyval.statement) = new_set_statement(ctx, (yyvsp[-3].member), (yyvsp[0].expression)); CHECK_ERROR; } -#line 1894 "parser.tab.c" /* yacc.c:1646 */ +#line 1897 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 34: -#line 200 "parser.y" /* yacc.c:1646 */ +#line 195 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_statement(ctx, STAT_STOP, 0); CHECK_ERROR; } -#line 1900 "parser.tab.c" /* yacc.c:1646 */ +#line 1903 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 35: -#line 201 "parser.y" /* yacc.c:1646 */ +#line 196 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_onerror_statement(ctx, TRUE); CHECK_ERROR; } -#line 1906 "parser.tab.c" /* yacc.c:1646 */ +#line 1909 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 36: -#line 202 "parser.y" /* yacc.c:1646 */ +#line 197 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_onerror_statement(ctx, FALSE); CHECK_ERROR; } -#line 1912 "parser.tab.c" /* yacc.c:1646 */ +#line 1915 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 37: -#line 203 "parser.y" /* yacc.c:1646 */ +#line 198 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_const_statement(ctx, (yyvsp[0].const_decl)); CHECK_ERROR; } -#line 1918 "parser.tab.c" /* yacc.c:1646 */ +#line 1921 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 38: -#line 205 "parser.y" /* yacc.c:1646 */ +#line 200 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_forto_statement(ctx, (yyvsp[-8].string), (yyvsp[-6].expression), (yyvsp[-4].expression), (yyvsp[-3].expression), (yyvsp[-1].statement)); CHECK_ERROR; } -#line 1924 "parser.tab.c" /* yacc.c:1646 */ +#line 1927 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 39: -#line 207 "parser.y" /* yacc.c:1646 */ +#line 202 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_foreach_statement(ctx, (yyvsp[-5].string), (yyvsp[-3].expression), (yyvsp[-1].statement)); } -#line 1930 "parser.tab.c" /* yacc.c:1646 */ +#line 1933 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 40: -#line 209 "parser.y" /* yacc.c:1646 */ +#line 204 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_select_statement(ctx, (yyvsp[-4].expression), (yyvsp[-2].case_clausule)); } -#line 1936 "parser.tab.c" /* yacc.c:1646 */ +#line 1939 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 41: -#line 212 "parser.y" /* yacc.c:1646 */ +#line 207 "parser.y" /* yacc.c:1646 */ { (yyval.member) = new_member_expression(ctx, NULL, (yyvsp[0].string)); CHECK_ERROR; } -#line 1942 "parser.tab.c" /* yacc.c:1646 */ +#line 1945 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 42: -#line 213 "parser.y" /* yacc.c:1646 */ +#line 208 "parser.y" /* yacc.c:1646 */ { (yyval.member) = new_member_expression(ctx, (yyvsp[-2].expression), (yyvsp[0].string)); CHECK_ERROR; } -#line 1948 "parser.tab.c" /* yacc.c:1646 */ +#line 1951 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 43: -#line 216 "parser.y" /* yacc.c:1646 */ +#line 211 "parser.y" /* yacc.c:1646 */ { (yyval.dim_decl) = (yyvsp[0].dim_decl); } -#line 1954 "parser.tab.c" /* yacc.c:1646 */ +#line 1957 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 44: -#line 217 "parser.y" /* yacc.c:1646 */ +#line 212 "parser.y" /* yacc.c:1646 */ { (yyvsp[-2].dim_decl)->next = (yyvsp[0].dim_decl); (yyval.dim_decl) = (yyvsp[-2].dim_decl); } -#line 1960 "parser.tab.c" /* yacc.c:1646 */ +#line 1963 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 45: -#line 220 "parser.y" /* yacc.c:1646 */ +#line 215 "parser.y" /* yacc.c:1646 */ { (yyval.dim_decl) = new_dim_decl(ctx, (yyvsp[0].string), FALSE, NULL); CHECK_ERROR; } -#line 1966 "parser.tab.c" /* yacc.c:1646 */ +#line 1969 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 46: -#line 221 "parser.y" /* yacc.c:1646 */ +#line 216 "parser.y" /* yacc.c:1646 */ { (yyval.dim_decl) = new_dim_decl(ctx, (yyvsp[-3].string), TRUE, (yyvsp[-1].dim_list)); CHECK_ERROR; } -#line 1972 "parser.tab.c" /* yacc.c:1646 */ +#line 1975 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 47: -#line 222 "parser.y" /* yacc.c:1646 */ +#line 217 "parser.y" /* yacc.c:1646 */ { (yyval.dim_decl) = new_dim_decl(ctx, (yyvsp[-1].string), TRUE, NULL); CHECK_ERROR; } -#line 1978 "parser.tab.c" /* yacc.c:1646 */ +#line 1981 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 48: -#line 225 "parser.y" /* yacc.c:1646 */ +#line 220 "parser.y" /* yacc.c:1646 */ { (yyval.dim_list) = new_dim(ctx, (yyvsp[0].uint), NULL); } -#line 1984 "parser.tab.c" /* yacc.c:1646 */ +#line 1987 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 49: -#line 226 "parser.y" /* yacc.c:1646 */ +#line 221 "parser.y" /* yacc.c:1646 */ { (yyval.dim_list) = new_dim(ctx, (yyvsp[-2].uint), (yyvsp[0].dim_list)); } -#line 1990 "parser.tab.c" /* yacc.c:1646 */ +#line 1993 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 50: -#line 229 "parser.y" /* yacc.c:1646 */ +#line 224 "parser.y" /* yacc.c:1646 */ { (yyval.const_decl) = (yyvsp[0].const_decl); } -#line 1996 "parser.tab.c" /* yacc.c:1646 */ +#line 1999 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 51: -#line 230 "parser.y" /* yacc.c:1646 */ +#line 225 "parser.y" /* yacc.c:1646 */ { (yyvsp[-2].const_decl)->next = (yyvsp[0].const_decl); (yyval.const_decl) = (yyvsp[-2].const_decl); } -#line 2002 "parser.tab.c" /* yacc.c:1646 */ +#line 2005 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 52: -#line 233 "parser.y" /* yacc.c:1646 */ +#line 228 "parser.y" /* yacc.c:1646 */ { (yyval.const_decl) = new_const_decl(ctx, (yyvsp[-2].string), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2008 "parser.tab.c" /* yacc.c:1646 */ +#line 2011 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 53: -#line 236 "parser.y" /* yacc.c:1646 */ +#line 231 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2014 "parser.tab.c" /* yacc.c:1646 */ +#line 2017 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 54: -#line 237 "parser.y" /* yacc.c:1646 */ +#line 232 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_unary_expression(ctx, EXPR_NEG, (yyvsp[0].expression)); CHECK_ERROR; } -#line 2020 "parser.tab.c" /* yacc.c:1646 */ +#line 2023 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 55: -#line 240 "parser.y" /* yacc.c:1646 */ +#line 235 "parser.y" /* yacc.c:1646 */ { (yyval.boolean) = TRUE; } -#line 2026 "parser.tab.c" /* yacc.c:1646 */ +#line 2029 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 56: -#line 241 "parser.y" /* yacc.c:1646 */ +#line 236 "parser.y" /* yacc.c:1646 */ { (yyval.boolean) = FALSE; } -#line 2032 "parser.tab.c" /* yacc.c:1646 */ +#line 2035 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 57: -#line 244 "parser.y" /* yacc.c:1646 */ +#line 239 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = NULL;} -#line 2038 "parser.tab.c" /* yacc.c:1646 */ +#line 2041 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 58: -#line 245 "parser.y" /* yacc.c:1646 */ +#line 240 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2044 "parser.tab.c" /* yacc.c:1646 */ +#line 2047 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 59: -#line 249 "parser.y" /* yacc.c:1646 */ +#line 244 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_if_statement(ctx, (yyvsp[-7].expression), (yyvsp[-4].statement), (yyvsp[-3].elseif), (yyvsp[-2].statement)); CHECK_ERROR; } -#line 2050 "parser.tab.c" /* yacc.c:1646 */ +#line 2053 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 60: -#line 250 "parser.y" /* yacc.c:1646 */ +#line 245 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_if_statement(ctx, (yyvsp[-3].expression), (yyvsp[-1].statement), NULL, NULL); CHECK_ERROR; } -#line 2056 "parser.tab.c" /* yacc.c:1646 */ +#line 2059 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 61: -#line 252 "parser.y" /* yacc.c:1646 */ +#line 247 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = new_if_statement(ctx, (yyvsp[-5].expression), (yyvsp[-3].statement), NULL, (yyvsp[-1].statement)); CHECK_ERROR; } -#line 2062 "parser.tab.c" /* yacc.c:1646 */ +#line 2065 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 64: -#line 259 "parser.y" /* yacc.c:1646 */ +#line 254 "parser.y" /* yacc.c:1646 */ { (yyval.elseif) = NULL; } -#line 2068 "parser.tab.c" /* yacc.c:1646 */ +#line 2071 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 65: -#line 260 "parser.y" /* yacc.c:1646 */ +#line 255 "parser.y" /* yacc.c:1646 */ { (yyval.elseif) = (yyvsp[0].elseif); } -#line 2074 "parser.tab.c" /* yacc.c:1646 */ +#line 2077 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 66: -#line 263 "parser.y" /* yacc.c:1646 */ +#line 258 "parser.y" /* yacc.c:1646 */ { (yyval.elseif) = (yyvsp[0].elseif); } -#line 2080 "parser.tab.c" /* yacc.c:1646 */ +#line 2083 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 67: -#line 264 "parser.y" /* yacc.c:1646 */ +#line 259 "parser.y" /* yacc.c:1646 */ { (yyvsp[-1].elseif)->next = (yyvsp[0].elseif); (yyval.elseif) = (yyvsp[-1].elseif); } -#line 2086 "parser.tab.c" /* yacc.c:1646 */ +#line 2089 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 68: -#line 268 "parser.y" /* yacc.c:1646 */ +#line 263 "parser.y" /* yacc.c:1646 */ { (yyval.elseif) = new_elseif_decl(ctx, (yyvsp[-3].expression), (yyvsp[0].statement)); } -#line 2092 "parser.tab.c" /* yacc.c:1646 */ +#line 2095 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 69: -#line 271 "parser.y" /* yacc.c:1646 */ +#line 266 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = NULL; } -#line 2098 "parser.tab.c" /* yacc.c:1646 */ +#line 2101 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 70: -#line 272 "parser.y" /* yacc.c:1646 */ +#line 267 "parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].statement); } -#line 2104 "parser.tab.c" /* yacc.c:1646 */ +#line 2107 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 71: -#line 275 "parser.y" /* yacc.c:1646 */ +#line 270 "parser.y" /* yacc.c:1646 */ { (yyval.case_clausule) = NULL; } -#line 2110 "parser.tab.c" /* yacc.c:1646 */ +#line 2113 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 72: -#line 276 "parser.y" /* yacc.c:1646 */ +#line 271 "parser.y" /* yacc.c:1646 */ { (yyval.case_clausule) = new_case_clausule(ctx, NULL, (yyvsp[0].statement), NULL); } -#line 2116 "parser.tab.c" /* yacc.c:1646 */ +#line 2119 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 73: -#line 278 "parser.y" /* yacc.c:1646 */ +#line 273 "parser.y" /* yacc.c:1646 */ { (yyval.case_clausule) = new_case_clausule(ctx, (yyvsp[-3].expression), (yyvsp[-1].statement), (yyvsp[0].case_clausule)); } -#line 2122 "parser.tab.c" /* yacc.c:1646 */ +#line 2125 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 74: -#line 281 "parser.y" /* yacc.c:1646 */ +#line 276 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = NULL; } -#line 2128 "parser.tab.c" /* yacc.c:1646 */ +#line 2131 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 75: -#line 282 "parser.y" /* yacc.c:1646 */ +#line 277 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[-1].expression); } -#line 2134 "parser.tab.c" /* yacc.c:1646 */ +#line 2137 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 76: -#line 285 "parser.y" /* yacc.c:1646 */ +#line 280 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = NULL; } -#line 2140 "parser.tab.c" /* yacc.c:1646 */ +#line 2143 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 77: -#line 286 "parser.y" /* yacc.c:1646 */ +#line 281 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2146 "parser.tab.c" /* yacc.c:1646 */ +#line 2149 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 78: -#line 289 "parser.y" /* yacc.c:1646 */ +#line 284 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2152 "parser.tab.c" /* yacc.c:1646 */ +#line 2155 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 79: -#line 290 "parser.y" /* yacc.c:1646 */ +#line 285 "parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expression)->next = (yyvsp[0].expression); (yyval.expression) = (yyvsp[-2].expression); } -#line 2158 "parser.tab.c" /* yacc.c:1646 */ +#line 2161 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 80: -#line 291 "parser.y" /* yacc.c:1646 */ +#line 286 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_expression(ctx, EXPR_NOARG, 0); CHECK_ERROR; (yyval.expression)->next = (yyvsp[0].expression); } -#line 2164 "parser.tab.c" /* yacc.c:1646 */ +#line 2167 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 83: -#line 298 "parser.y" /* yacc.c:1646 */ +#line 293 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2170 "parser.tab.c" /* yacc.c:1646 */ +#line 2173 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 84: -#line 299 "parser.y" /* yacc.c:1646 */ +#line 294 "parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expression)->next = (yyvsp[0].expression); (yyval.expression) = (yyvsp[-2].expression); } -#line 2176 "parser.tab.c" /* yacc.c:1646 */ +#line 2179 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 85: -#line 302 "parser.y" /* yacc.c:1646 */ +#line 297 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2182 "parser.tab.c" /* yacc.c:1646 */ +#line 2185 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 86: -#line 303 "parser.y" /* yacc.c:1646 */ +#line 298 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_IMP, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2188 "parser.tab.c" /* yacc.c:1646 */ +#line 2191 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 87: -#line 306 "parser.y" /* yacc.c:1646 */ +#line 301 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2194 "parser.tab.c" /* yacc.c:1646 */ +#line 2197 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 88: -#line 307 "parser.y" /* yacc.c:1646 */ +#line 302 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_EQV, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2200 "parser.tab.c" /* yacc.c:1646 */ +#line 2203 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 89: -#line 310 "parser.y" /* yacc.c:1646 */ +#line 305 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2206 "parser.tab.c" /* yacc.c:1646 */ +#line 2209 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 90: -#line 311 "parser.y" /* yacc.c:1646 */ +#line 306 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_XOR, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2212 "parser.tab.c" /* yacc.c:1646 */ +#line 2215 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 91: -#line 314 "parser.y" /* yacc.c:1646 */ +#line 309 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2218 "parser.tab.c" /* yacc.c:1646 */ +#line 2221 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 92: -#line 315 "parser.y" /* yacc.c:1646 */ +#line 310 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_OR, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2224 "parser.tab.c" /* yacc.c:1646 */ +#line 2227 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 93: -#line 318 "parser.y" /* yacc.c:1646 */ +#line 313 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2230 "parser.tab.c" /* yacc.c:1646 */ +#line 2233 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 94: -#line 319 "parser.y" /* yacc.c:1646 */ +#line 314 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_AND, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2236 "parser.tab.c" /* yacc.c:1646 */ +#line 2239 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 95: -#line 322 "parser.y" /* yacc.c:1646 */ +#line 317 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2242 "parser.tab.c" /* yacc.c:1646 */ +#line 2245 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 96: -#line 323 "parser.y" /* yacc.c:1646 */ +#line 318 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_unary_expression(ctx, EXPR_NOT, (yyvsp[0].expression)); CHECK_ERROR; } -#line 2248 "parser.tab.c" /* yacc.c:1646 */ +#line 2251 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 97: -#line 326 "parser.y" /* yacc.c:1646 */ +#line 321 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2254 "parser.tab.c" /* yacc.c:1646 */ +#line 2257 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 98: -#line 327 "parser.y" /* yacc.c:1646 */ +#line 322 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_EQUAL, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2260 "parser.tab.c" /* yacc.c:1646 */ +#line 2263 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 99: -#line 328 "parser.y" /* yacc.c:1646 */ +#line 323 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_NEQUAL, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2266 "parser.tab.c" /* yacc.c:1646 */ +#line 2269 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 100: -#line 329 "parser.y" /* yacc.c:1646 */ +#line 324 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_GT, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2272 "parser.tab.c" /* yacc.c:1646 */ +#line 2275 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 101: -#line 330 "parser.y" /* yacc.c:1646 */ +#line 325 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_LT, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2278 "parser.tab.c" /* yacc.c:1646 */ +#line 2281 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 102: -#line 331 "parser.y" /* yacc.c:1646 */ +#line 326 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_GTEQ, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2284 "parser.tab.c" /* yacc.c:1646 */ +#line 2287 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 103: -#line 332 "parser.y" /* yacc.c:1646 */ +#line 327 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_LTEQ, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2290 "parser.tab.c" /* yacc.c:1646 */ +#line 2293 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 104: -#line 333 "parser.y" /* yacc.c:1646 */ +#line 328 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_IS, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2296 "parser.tab.c" /* yacc.c:1646 */ +#line 2299 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 105: -#line 336 "parser.y" /* yacc.c:1646 */ +#line 331 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2302 "parser.tab.c" /* yacc.c:1646 */ +#line 2305 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 106: -#line 337 "parser.y" /* yacc.c:1646 */ +#line 332 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_CONCAT, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2308 "parser.tab.c" /* yacc.c:1646 */ +#line 2311 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 107: -#line 340 "parser.y" /* yacc.c:1646 */ +#line 335 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2314 "parser.tab.c" /* yacc.c:1646 */ +#line 2317 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 108: -#line 341 "parser.y" /* yacc.c:1646 */ +#line 336 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_ADD, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2320 "parser.tab.c" /* yacc.c:1646 */ +#line 2323 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 109: -#line 342 "parser.y" /* yacc.c:1646 */ +#line 337 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_SUB, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2326 "parser.tab.c" /* yacc.c:1646 */ +#line 2329 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 110: -#line 345 "parser.y" /* yacc.c:1646 */ +#line 340 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2332 "parser.tab.c" /* yacc.c:1646 */ +#line 2335 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 111: -#line 346 "parser.y" /* yacc.c:1646 */ +#line 341 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_MOD, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2338 "parser.tab.c" /* yacc.c:1646 */ +#line 2341 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 112: -#line 349 "parser.y" /* yacc.c:1646 */ +#line 344 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2344 "parser.tab.c" /* yacc.c:1646 */ +#line 2347 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 113: -#line 351 "parser.y" /* yacc.c:1646 */ +#line 346 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_IDIV, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2350 "parser.tab.c" /* yacc.c:1646 */ +#line 2353 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 114: -#line 354 "parser.y" /* yacc.c:1646 */ +#line 349 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2356 "parser.tab.c" /* yacc.c:1646 */ +#line 2359 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 115: -#line 356 "parser.y" /* yacc.c:1646 */ +#line 351 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_MUL, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2362 "parser.tab.c" /* yacc.c:1646 */ +#line 2365 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 116: -#line 358 "parser.y" /* yacc.c:1646 */ +#line 353 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_DIV, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2368 "parser.tab.c" /* yacc.c:1646 */ +#line 2371 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 117: -#line 361 "parser.y" /* yacc.c:1646 */ +#line 356 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2374 "parser.tab.c" /* yacc.c:1646 */ +#line 2377 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 118: -#line 362 "parser.y" /* yacc.c:1646 */ +#line 357 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_binary_expression(ctx, EXPR_EXP, (yyvsp[-2].expression), (yyvsp[0].expression)); CHECK_ERROR; } -#line 2380 "parser.tab.c" /* yacc.c:1646 */ +#line 2383 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 119: -#line 365 "parser.y" /* yacc.c:1646 */ +#line 360 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2386 "parser.tab.c" /* yacc.c:1646 */ +#line 2389 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 120: -#line 366 "parser.y" /* yacc.c:1646 */ +#line 361 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2392 "parser.tab.c" /* yacc.c:1646 */ +#line 2395 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 121: -#line 367 "parser.y" /* yacc.c:1646 */ +#line 362 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_new_expression(ctx, (yyvsp[0].string)); CHECK_ERROR; } -#line 2398 "parser.tab.c" /* yacc.c:1646 */ +#line 2401 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 122: -#line 368 "parser.y" /* yacc.c:1646 */ +#line 363 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_unary_expression(ctx, EXPR_NEG, (yyvsp[0].expression)); CHECK_ERROR; } -#line 2404 "parser.tab.c" /* yacc.c:1646 */ +#line 2407 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 123: -#line 371 "parser.y" /* yacc.c:1646 */ +#line 366 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2410 "parser.tab.c" /* yacc.c:1646 */ +#line 2413 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 124: -#line 372 "parser.y" /* yacc.c:1646 */ +#line 367 "parser.y" /* yacc.c:1646 */ { (yyvsp[-1].member)->args = (yyvsp[0].expression); (yyval.expression) = &(yyvsp[-1].member)->expr; } -#line 2416 "parser.tab.c" /* yacc.c:1646 */ +#line 2419 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 125: -#line 375 "parser.y" /* yacc.c:1646 */ +#line 370 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_bool_expression(ctx, VARIANT_TRUE); CHECK_ERROR; } -#line 2422 "parser.tab.c" /* yacc.c:1646 */ +#line 2425 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 126: -#line 376 "parser.y" /* yacc.c:1646 */ +#line 371 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_bool_expression(ctx, VARIANT_FALSE); CHECK_ERROR; } -#line 2428 "parser.tab.c" /* yacc.c:1646 */ +#line 2431 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 127: -#line 377 "parser.y" /* yacc.c:1646 */ +#line 372 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_string_expression(ctx, (yyvsp[0].string)); CHECK_ERROR; } -#line 2434 "parser.tab.c" /* yacc.c:1646 */ +#line 2437 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 128: -#line 378 "parser.y" /* yacc.c:1646 */ +#line 373 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = (yyvsp[0].expression); } -#line 2440 "parser.tab.c" /* yacc.c:1646 */ +#line 2443 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 129: -#line 379 "parser.y" /* yacc.c:1646 */ +#line 374 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_expression(ctx, EXPR_EMPTY, 0); CHECK_ERROR; } -#line 2446 "parser.tab.c" /* yacc.c:1646 */ +#line 2449 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 130: -#line 380 "parser.y" /* yacc.c:1646 */ +#line 375 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_expression(ctx, EXPR_NULL, 0); CHECK_ERROR; } -#line 2452 "parser.tab.c" /* yacc.c:1646 */ +#line 2455 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 131: -#line 381 "parser.y" /* yacc.c:1646 */ +#line 376 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_expression(ctx, EXPR_NOTHING, 0); CHECK_ERROR; } -#line 2458 "parser.tab.c" /* yacc.c:1646 */ +#line 2461 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 132: -#line 384 "parser.y" /* yacc.c:1646 */ +#line 379 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_long_expression(ctx, EXPR_USHORT, (yyvsp[0].lng)); CHECK_ERROR; } -#line 2464 "parser.tab.c" /* yacc.c:1646 */ +#line 2467 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 133: -#line 385 "parser.y" /* yacc.c:1646 */ +#line 380 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_long_expression(ctx, EXPR_USHORT, 0); CHECK_ERROR; } -#line 2470 "parser.tab.c" /* yacc.c:1646 */ +#line 2473 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 134: -#line 386 "parser.y" /* yacc.c:1646 */ +#line 381 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_long_expression(ctx, EXPR_ULONG, (yyvsp[0].lng)); CHECK_ERROR; } -#line 2476 "parser.tab.c" /* yacc.c:1646 */ +#line 2479 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 135: -#line 387 "parser.y" /* yacc.c:1646 */ +#line 382 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_double_expression(ctx, (yyvsp[0].dbl)); CHECK_ERROR; } -#line 2482 "parser.tab.c" /* yacc.c:1646 */ +#line 2485 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 136: -#line 390 "parser.y" /* yacc.c:1646 */ +#line 385 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = (yyvsp[0].lng); } -#line 2488 "parser.tab.c" /* yacc.c:1646 */ +#line 2491 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 137: -#line 391 "parser.y" /* yacc.c:1646 */ +#line 386 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = 0; } -#line 2494 "parser.tab.c" /* yacc.c:1646 */ +#line 2497 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 138: -#line 392 "parser.y" /* yacc.c:1646 */ +#line 387 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = (yyvsp[0].lng); } -#line 2500 "parser.tab.c" /* yacc.c:1646 */ +#line 2503 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 139: -#line 395 "parser.y" /* yacc.c:1646 */ +#line 390 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_unary_expression(ctx, EXPR_BRACKETS, (yyvsp[-1].expression)); } -#line 2506 "parser.tab.c" /* yacc.c:1646 */ +#line 2509 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 140: -#line 396 "parser.y" /* yacc.c:1646 */ +#line 391 "parser.y" /* yacc.c:1646 */ { (yyval.expression) = new_expression(ctx, EXPR_ME, 0); CHECK_ERROR; } -#line 2512 "parser.tab.c" /* yacc.c:1646 */ +#line 2515 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 141: -#line 399 "parser.y" /* yacc.c:1646 */ +#line 394 "parser.y" /* yacc.c:1646 */ { (yyvsp[-3].class_decl)->name = (yyvsp[-5].string); (yyval.class_decl) = (yyvsp[-3].class_decl); } -#line 2518 "parser.tab.c" /* yacc.c:1646 */ +#line 2521 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 142: -#line 402 "parser.y" /* yacc.c:1646 */ +#line 397 "parser.y" /* yacc.c:1646 */ { (yyval.class_decl) = new_class_decl(ctx); } -#line 2524 "parser.tab.c" /* yacc.c:1646 */ +#line 2527 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 143: -#line 403 "parser.y" /* yacc.c:1646 */ +#line 398 "parser.y" /* yacc.c:1646 */ { (yyval.class_decl) = add_class_function(ctx, (yyvsp[0].class_decl), (yyvsp[-2].func_decl)); CHECK_ERROR; } -#line 2530 "parser.tab.c" /* yacc.c:1646 */ +#line 2533 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 144: -#line 405 "parser.y" /* yacc.c:1646 */ +#line 400 "parser.y" /* yacc.c:1646 */ { dim_decl_t *dim_decl = new_dim_decl(ctx, (yyvsp[-2].string), FALSE, NULL); CHECK_ERROR; (yyval.class_decl) = add_dim_prop(ctx, (yyvsp[0].class_decl), dim_decl, (yyvsp[-3].uint)); CHECK_ERROR; } -#line 2537 "parser.tab.c" /* yacc.c:1646 */ +#line 2540 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 145: -#line 407 "parser.y" /* yacc.c:1646 */ +#line 402 "parser.y" /* yacc.c:1646 */ { (yyval.class_decl) = add_dim_prop(ctx, (yyvsp[0].class_decl), (yyvsp[-2].dim_decl), 0); CHECK_ERROR; } -#line 2543 "parser.tab.c" /* yacc.c:1646 */ +#line 2546 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 146: -#line 408 "parser.y" /* yacc.c:1646 */ +#line 403 "parser.y" /* yacc.c:1646 */ { (yyval.class_decl) = add_class_function(ctx, (yyvsp[0].class_decl), (yyvsp[-2].func_decl)); CHECK_ERROR; } -#line 2549 "parser.tab.c" /* yacc.c:1646 */ +#line 2552 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 147: -#line 412 "parser.y" /* yacc.c:1646 */ +#line 407 "parser.y" /* yacc.c:1646 */ { (yyval.func_decl) = new_function_decl(ctx, (yyvsp[-5].string), FUNC_PROPGET, (yyvsp[-8].uint), (yyvsp[-4].arg_decl), (yyvsp[-2].statement)); CHECK_ERROR; } -#line 2555 "parser.tab.c" /* yacc.c:1646 */ +#line 2558 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 148: -#line 414 "parser.y" /* yacc.c:1646 */ +#line 409 "parser.y" /* yacc.c:1646 */ { (yyval.func_decl) = new_function_decl(ctx, (yyvsp[-7].string), FUNC_PROPLET, (yyvsp[-10].uint), (yyvsp[-5].arg_decl), (yyvsp[-2].statement)); CHECK_ERROR; } -#line 2561 "parser.tab.c" /* yacc.c:1646 */ +#line 2564 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 149: -#line 416 "parser.y" /* yacc.c:1646 */ +#line 411 "parser.y" /* yacc.c:1646 */ { (yyval.func_decl) = new_function_decl(ctx, (yyvsp[-7].string), FUNC_PROPSET, (yyvsp[-10].uint), (yyvsp[-5].arg_decl), (yyvsp[-2].statement)); CHECK_ERROR; } -#line 2567 "parser.tab.c" /* yacc.c:1646 */ +#line 2570 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 150: -#line 420 "parser.y" /* yacc.c:1646 */ +#line 415 "parser.y" /* yacc.c:1646 */ { (yyval.func_decl) = new_function_decl(ctx, (yyvsp[-5].string), FUNC_SUB, (yyvsp[-7].uint), (yyvsp[-4].arg_decl), (yyvsp[-2].statement)); CHECK_ERROR; } -#line 2573 "parser.tab.c" /* yacc.c:1646 */ +#line 2576 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 151: -#line 422 "parser.y" /* yacc.c:1646 */ +#line 417 "parser.y" /* yacc.c:1646 */ { (yyval.func_decl) = new_function_decl(ctx, (yyvsp[-5].string), FUNC_FUNCTION, (yyvsp[-7].uint), (yyvsp[-4].arg_decl), (yyvsp[-2].statement)); CHECK_ERROR; } -#line 2579 "parser.tab.c" /* yacc.c:1646 */ +#line 2582 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 152: -#line 425 "parser.y" /* yacc.c:1646 */ +#line 420 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = 0; } -#line 2585 "parser.tab.c" /* yacc.c:1646 */ +#line 2588 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 153: -#line 426 "parser.y" /* yacc.c:1646 */ +#line 421 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = (yyvsp[0].uint); } -#line 2591 "parser.tab.c" /* yacc.c:1646 */ +#line 2594 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 154: -#line 429 "parser.y" /* yacc.c:1646 */ +#line 424 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = STORAGE_IS_DEFAULT; } -#line 2597 "parser.tab.c" /* yacc.c:1646 */ +#line 2600 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 155: -#line 430 "parser.y" /* yacc.c:1646 */ +#line 425 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = 0; } -#line 2603 "parser.tab.c" /* yacc.c:1646 */ +#line 2606 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 156: -#line 431 "parser.y" /* yacc.c:1646 */ +#line 426 "parser.y" /* yacc.c:1646 */ { (yyval.uint) = STORAGE_IS_PRIVATE; } -#line 2609 "parser.tab.c" /* yacc.c:1646 */ +#line 2612 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 157: -#line 434 "parser.y" /* yacc.c:1646 */ +#line 429 "parser.y" /* yacc.c:1646 */ { (yyval.arg_decl) = NULL; } -#line 2615 "parser.tab.c" /* yacc.c:1646 */ +#line 2618 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 158: -#line 435 "parser.y" /* yacc.c:1646 */ +#line 430 "parser.y" /* yacc.c:1646 */ { (yyval.arg_decl) = (yyvsp[-1].arg_decl); } -#line 2621 "parser.tab.c" /* yacc.c:1646 */ +#line 2624 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 159: -#line 438 "parser.y" /* yacc.c:1646 */ +#line 433 "parser.y" /* yacc.c:1646 */ { (yyval.arg_decl) = (yyvsp[0].arg_decl); } -#line 2627 "parser.tab.c" /* yacc.c:1646 */ +#line 2630 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 160: -#line 439 "parser.y" /* yacc.c:1646 */ +#line 434 "parser.y" /* yacc.c:1646 */ { (yyvsp[-2].arg_decl)->next = (yyvsp[0].arg_decl); (yyval.arg_decl) = (yyvsp[-2].arg_decl); } -#line 2633 "parser.tab.c" /* yacc.c:1646 */ +#line 2636 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 161: -#line 442 "parser.y" /* yacc.c:1646 */ +#line 437 "parser.y" /* yacc.c:1646 */ { (yyval.arg_decl) = new_argument_decl(ctx, (yyvsp[-1].string), TRUE); } -#line 2639 "parser.tab.c" /* yacc.c:1646 */ +#line 2642 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 162: -#line 443 "parser.y" /* yacc.c:1646 */ +#line 438 "parser.y" /* yacc.c:1646 */ { (yyval.arg_decl) = new_argument_decl(ctx, (yyvsp[-1].string), TRUE); } -#line 2645 "parser.tab.c" /* yacc.c:1646 */ +#line 2648 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 163: -#line 444 "parser.y" /* yacc.c:1646 */ +#line 439 "parser.y" /* yacc.c:1646 */ { (yyval.arg_decl) = new_argument_decl(ctx, (yyvsp[-1].string), FALSE); } -#line 2651 "parser.tab.c" /* yacc.c:1646 */ +#line 2654 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 164: -#line 448 "parser.y" /* yacc.c:1646 */ +#line 443 "parser.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 2657 "parser.tab.c" /* yacc.c:1646 */ +#line 2660 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; case 165: -#line 449 "parser.y" /* yacc.c:1646 */ +#line 444 "parser.y" /* yacc.c:1646 */ { (yyval.string) = propertyW; } -#line 2663 "parser.tab.c" /* yacc.c:1646 */ +#line 2666 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ break; -#line 2667 "parser.tab.c" /* yacc.c:1646 */ +#line 2670 "E:/reactosSync3.0_gcc/dll/win32/vbscript/parser.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2886,7 +2894,7 @@ yyreturn: #endif return yyresult; } -#line 456 "parser.y" /* yacc.c:1906 */ +#line 453 "parser.y" /* yacc.c:1906 */ static int parser_error(parser_ctx_t *ctx, const char *str) diff --git a/dll/win32/vbscript/parser.tab.h b/dll/win32/vbscript/parser.tab.h index 6e55096456..513c2ef053 100644 --- a/dll/win32/vbscript/parser.tab.h +++ b/dll/win32/vbscript/parser.tab.h @@ -30,8 +30,8 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -#ifndef YY_PARSER_E_REACTOS_SYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED -# define YY_PARSER_E_REACTOS_SYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED +#ifndef YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED +# define YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -121,7 +121,7 @@ extern int parser_debug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 88 "parser.y" /* yacc.c:1909 */ +#line 83 "parser.y" /* yacc.c:1909 */ const WCHAR *string; statement_t *statement; @@ -150,4 +150,4 @@ union YYSTYPE int parser_parse (parser_ctx_t *ctx); -#endif /* !YY_PARSER_E_REACTOS_SYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED */ +#endif /* !YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED */ diff --git a/dll/win32/vbscript/parser.y b/dll/win32/vbscript/parser.y index 6b303eea35..34a07ad94b 100644 --- a/dll/win32/vbscript/parser.y +++ b/dll/win32/vbscript/parser.y @@ -19,11 +19,6 @@ %{ #include "vbscript.h" -#include "parse.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(vbscript); static int parser_error(parser_ctx_t *,const char*); @@ -148,7 +143,7 @@ Program OptionExplicit_opt : /* empty */ { $$ = FALSE; } - | tOPTION tEXPLICIT tNL { $$ = TRUE; } + | tOPTION tEXPLICIT StSep { $$ = TRUE; } SourceElements : /* empty */ @@ -164,7 +159,7 @@ StatementsNl | StatementNl StatementsNl { $$ = link_statements($1, $2); } StatementNl - : Statement tNL { $$ = $1; } + : Statement tNL { $$ = $1; } Statement : ':' { $$ = NULL; } @@ -396,29 +391,29 @@ PrimaryExpression | tME { $$ = new_expression(ctx, EXPR_ME, 0); CHECK_ERROR; } ClassDeclaration - : tCLASS Identifier tNL ClassBody tEND tCLASS tNL { $4->name = $2; $$ = $4; } + : tCLASS Identifier StSep ClassBody tEND tCLASS StSep { $4->name = $2; $$ = $4; } ClassBody - : /* empty */ { $$ = new_class_decl(ctx); } - | FunctionDecl tNL ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; } + : /* empty */ { $$ = new_class_decl(ctx); } + | FunctionDecl StSep ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; } /* FIXME: We should use DimDecl here to support arrays, but that conflicts with PropertyDecl. */ - | Storage tIdentifier tNL ClassBody { dim_decl_t *dim_decl = new_dim_decl(ctx, $2, FALSE, NULL); CHECK_ERROR; + | Storage tIdentifier StSep ClassBody { dim_decl_t *dim_decl = new_dim_decl(ctx, $2, FALSE, NULL); CHECK_ERROR; $$ = add_dim_prop(ctx, $4, dim_decl, $1); CHECK_ERROR; } - | tDIM DimDecl tNL ClassBody { $$ = add_dim_prop(ctx, $4, $2, 0); CHECK_ERROR; } - | PropertyDecl tNL ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; } + | tDIM DimDecl StSep ClassBody { $$ = add_dim_prop(ctx, $4, $2, 0); CHECK_ERROR; } + | PropertyDecl StSep ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; } PropertyDecl - : Storage_opt tPROPERTY tGET tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tPROPERTY + : Storage_opt tPROPERTY tGET tIdentifier ArgumentsDecl_opt StSep StatementsNl_opt tEND tPROPERTY { $$ = new_function_decl(ctx, $4, FUNC_PROPGET, $1, $5, $7); CHECK_ERROR; } - | Storage_opt tPROPERTY tLET tIdentifier '(' ArgumentDecl ')' tNL StatementsNl_opt tEND tPROPERTY + | Storage_opt tPROPERTY tLET tIdentifier '(' ArgumentDecl ')' StSep StatementsNl_opt tEND tPROPERTY { $$ = new_function_decl(ctx, $4, FUNC_PROPLET, $1, $6, $9); CHECK_ERROR; } - | Storage_opt tPROPERTY tSET tIdentifier '(' ArgumentDecl ')' tNL StatementsNl_opt tEND tPROPERTY + | Storage_opt tPROPERTY tSET tIdentifier '(' ArgumentDecl ')' StSep StatementsNl_opt tEND tPROPERTY { $$ = new_function_decl(ctx, $4, FUNC_PROPSET, $1, $6, $9); CHECK_ERROR; } FunctionDecl - : Storage_opt tSUB Identifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tSUB + : Storage_opt tSUB Identifier ArgumentsDecl_opt StSep StatementsNl_opt tEND tSUB { $$ = new_function_decl(ctx, $3, FUNC_SUB, $1, $4, $6); CHECK_ERROR; } - | Storage_opt tFUNCTION Identifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tFUNCTION + | Storage_opt tFUNCTION Identifier ArgumentsDecl_opt StSep StatementsNl_opt tEND tFUNCTION { $$ = new_function_decl(ctx, $3, FUNC_FUNCTION, $1, $4, $6); CHECK_ERROR; } Storage_opt @@ -448,10 +443,12 @@ Identifier : tIdentifier { $$ = $1; } | tPROPERTY { $$ = propertyW; } -/* Some statements accept both new line and ':' as a separator */ +/* Most statements accept both new line and ':' as separators */ StSep : tNL | ':' + | tNL StSep + | ':' StSep %% diff --git a/dll/win32/vbscript/utils.c b/dll/win32/vbscript/utils.c new file mode 100644 index 0000000000..9444c4778f --- /dev/null +++ b/dll/win32/vbscript/utils.c @@ -0,0 +1,189 @@ +/* + * Copyright 2017 Piotr Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "vbscript.h" + +typedef struct { + IEnumVARIANT IEnumVARIANT_iface; + + LONG ref; + + SAFEARRAY *sa; + ULONG i, size; +} safearray_iter; + +static inline safearray_iter *impl_from_IEnumVARIANT(IEnumVARIANT *iface) +{ + return CONTAINING_RECORD(iface, safearray_iter, IEnumVARIANT_iface); +} + +static HRESULT WINAPI safearray_iter_IEnumVARIANT_QueryInterface( + IEnumVARIANT *iface, REFIID riid, void **ppv) +{ + safearray_iter *This = impl_from_IEnumVARIANT(iface); + + if(IsEqualGUID(riid, &IID_IUnknown)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = &This->IEnumVARIANT_iface; + }else if(IsEqualGUID(riid, &IID_IEnumVARIANT)) { + TRACE("(%p)->(IID_IEnumVARIANT %p)\n", This, ppv); + *ppv = &This->IEnumVARIANT_iface; + }else { + FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI safearray_iter_IEnumVARIANT_AddRef(IEnumVARIANT *iface) +{ + safearray_iter *This = impl_from_IEnumVARIANT(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI safearray_iter_IEnumVARIANT_Release(IEnumVARIANT *iface) +{ + safearray_iter *This = impl_from_IEnumVARIANT(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", iface, ref); + + if(!ref) { + if(This->sa) + SafeArrayUnlock(This->sa); + heap_free(This); + } + + return ref; +} + +static HRESULT WINAPI safearray_iter_IEnumVARIANT_Next(IEnumVARIANT *iface, + ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched) +{ + safearray_iter *This = impl_from_IEnumVARIANT(iface); + HRESULT hres; + VARIANT *v; + + TRACE("(%p)->(%u %p %p)\n", This, celt, rgVar, pCeltFetched); + + if(celt != 1) { + FIXME("celt != 1\n"); + return E_NOTIMPL; + } + + if(This->i >= This->size) { + if(pCeltFetched) + *pCeltFetched = 0; + return S_FALSE; + } + + if(!This->sa->cLocks) + ERR("SAFEARRAY not locked\n"); + + v = (VARIANT*)(((BYTE*)This->sa->pvData) + This->i * This->sa->cbElements); + V_VT(rgVar) = VT_EMPTY; + hres = VariantCopy(rgVar, v); + if(FAILED(hres)) + return hres; + + This->i++; + if(pCeltFetched) + *pCeltFetched = 1; + return S_OK; +} + +static HRESULT WINAPI safearray_iter_IEnumVARIANT_Skip(IEnumVARIANT *iface, ULONG celt) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI safearray_iter_IEnumVARIANT_Reset(IEnumVARIANT *iface) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI safearray_iter_IEnumVARIANT_Clone( + IEnumVARIANT *iface, IEnumVARIANT **ppEnum) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static const IEnumVARIANTVtbl safearray_iter_EnumVARIANTVtbl = { + safearray_iter_IEnumVARIANT_QueryInterface, + safearray_iter_IEnumVARIANT_AddRef, + safearray_iter_IEnumVARIANT_Release, + safearray_iter_IEnumVARIANT_Next, + safearray_iter_IEnumVARIANT_Skip, + safearray_iter_IEnumVARIANT_Reset, + safearray_iter_IEnumVARIANT_Clone +}; + +static ULONG get_safearray_size(SAFEARRAY *sa) +{ + ULONG ret = 1; + USHORT i; + + if(!sa) + return 0; + + for(i=0; i<sa->cDims && ret; i++) + ret *= sa->rgsabound[i].cElements; + return ret; +} + +HRESULT create_safearray_iter(SAFEARRAY *sa, IEnumVARIANT **ev) +{ + safearray_iter *iter; + HRESULT hres; + + if(sa && !(sa->fFeatures & FADF_VARIANT)) { + FIXME("enumeration not supported: %x\n", sa->fFeatures); + return E_NOTIMPL; + } + + iter = heap_alloc(sizeof(*iter)); + if(!iter) + return E_OUTOFMEMORY; + + if(sa) { + hres = SafeArrayLock(sa); + if(FAILED(hres)) { + heap_free(iter); + return hres; + } + } + + iter->IEnumVARIANT_iface.lpVtbl = &safearray_iter_EnumVARIANTVtbl; + iter->ref = 1; + iter->sa = sa; + iter->i = 0; + iter->size = get_safearray_size(sa); + + *ev = &iter->IEnumVARIANT_iface; + return S_OK; +} diff --git a/dll/win32/vbscript/vbdisp.c b/dll/win32/vbscript/vbdisp.c index 7e1f2472d4..5a4b1f8806 100644 --- a/dll/win32/vbscript/vbdisp.c +++ b/dll/win32/vbscript/vbdisp.c @@ -549,7 +549,7 @@ static IDispatchExVtbl DispatchExVtbl = { static inline vbdisp_t *unsafe_impl_from_IDispatch(IDispatch *iface) { return iface->lpVtbl == (IDispatchVtbl*)&DispatchExVtbl - ? CONTAINING_RECORD((IDispatchEx *)iface, vbdisp_t, IDispatchEx_iface) + ? CONTAINING_RECORD(iface, vbdisp_t, IDispatchEx_iface) : NULL; } diff --git a/dll/win32/vbscript/vbscript.c b/dll/win32/vbscript/vbscript.c index 25be31a445..1fc788117c 100644 --- a/dll/win32/vbscript/vbscript.c +++ b/dll/win32/vbscript/vbscript.c @@ -345,6 +345,9 @@ static HRESULT WINAPI VBScript_SetScriptState(IActiveScript *iface, SCRIPTSTATE case SCRIPTSTATE_INITIALIZED: FIXME("unimplemented SCRIPTSTATE_INITIALIZED\n"); return S_OK; + case SCRIPTSTATE_DISCONNECTED: + FIXME("unimplemented SCRIPTSTATE_DISCONNECTED\n"); + return S_OK; default: FIXME("unimplemented state %d\n", ss); return E_NOTIMPL; diff --git a/dll/win32/vbscript/vbscript.h b/dll/win32/vbscript/vbscript.h index 070079eb71..5bb1577e4f 100644 --- a/dll/win32/vbscript/vbscript.h +++ b/dll/win32/vbscript/vbscript.h @@ -402,6 +402,8 @@ HRESULT create_regexp(IDispatch**) DECLSPEC_HIDDEN; HRESULT map_hres(HRESULT) DECLSPEC_HIDDEN; +HRESULT create_safearray_iter(SAFEARRAY *sa, IEnumVARIANT **ev) DECLSPEC_HIDDEN; + #define FACILITY_VBS 0xa #define MAKE_VBSERROR(code) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_VBS, code) diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 14089f8b59..a9f299e28c 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -191,7 +191,7 @@ reactos/dll/win32/url # Synced to WineStaging-2.9 reactos/dll/win32/urlmon # Synced to Wine-3.0 reactos/dll/win32/usp10 # Synced to Wine-3.0 reactos/dll/win32/uxtheme # Forked -reactos/dll/win32/vbscript # Synced to WineStaging-2.9 +reactos/dll/win32/vbscript # Synced to Wine-3.0 reactos/dll/win32/version # Synced to WineStaging-2.9 reactos/dll/win32/vssapi # Synced to WineStaging-2.9 reactos/dll/win32/wbemdisp # Synced to WineStaging-2.16
6 years, 11 months
1
0
0
0
01/01: [URLMON_WINETEST] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb91a739027bdd30b9dd5…
commit eb91a739027bdd30b9dd557266e8df70ac485c7f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:30:25 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:30:25 2018 +0100 [URLMON_WINETEST] Sync with Wine 3.0. CORE-14225 --- modules/rostests/winetests/urlmon/misc.c | 723 +++++++++++++++++++++++++++++++ modules/rostests/winetests/urlmon/url.c | 11 - 2 files changed, 723 insertions(+), 11 deletions(-) diff --git a/modules/rostests/winetests/urlmon/misc.c b/modules/rostests/winetests/urlmon/misc.c index 299dcdf923..875334d68f 100644 --- a/modules/rostests/winetests/urlmon/misc.c +++ b/modules/rostests/winetests/urlmon/misc.c @@ -114,6 +114,21 @@ static WCHAR *a2w(const char *str) return ret; } +static WCHAR *a2co(const char *str) +{ + WCHAR *ret; + int len; + + if(!str) + return NULL; + + len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); + ret = CoTaskMemAlloc(len*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); + + return ret; +} + static void test_CreateFormatEnum(void) { IEnumFORMATETC *fenum = NULL, *fenum2 = NULL; @@ -1930,6 +1945,713 @@ static void test_internet_features(void) { test_CoInternetSetFeatureEnabled(); } +static BINDINFO rem_bindinfo = { sizeof(rem_bindinfo) }, in_bindinfo; +static DWORD rem_bindf; + +static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv) +{ + if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid) + || IsEqualGUID(&IID_IBindStatusCallback, riid) + || IsEqualGUID(&IID_IUnknown, riid)) { + *ppv = iface; + return S_OK; + } + + *ppv = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallbackEx *iface) +{ + return 2; +} + +static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallbackEx *iface) +{ + return 1; +} + +static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallbackEx *iface, + DWORD dwReserved, IBinding *pib) +{ + ok(0, "unexpected call\n"); + return S_OK; +} + +static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallbackEx *iface, LONG *pnPriority) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallbackEx *iface, DWORD reserved) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallbackEx *iface, ULONG ulProgress, + ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) +{ + ok(0, "unexpected call\n"); + return S_OK; +} + +static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallbackEx *iface, HRESULT hresult, LPCWSTR szError) +{ + ok(0, "unexpected call\n"); + return S_OK; +} + +static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) +{ + in_bindinfo = *pbindinfo; + *grfBINDF = rem_bindf; + *pbindinfo = rem_bindinfo; + return S_OK; +} + +static STGMEDIUM in_stgmed, rem_stgmed; + +static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallbackEx *iface, DWORD grfBSCF, + DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed) +{ + in_stgmed = *pstgmed; + *pstgmed = rem_stgmed; + return S_OK; +} + +static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallbackEx *iface, REFIID riid, IUnknown *punk) +{ + ok(0, "unexpected call\n"); + return S_OK; +} + +static HRESULT WINAPI BindStatusCallbackEx_GetBindInfoEx(IBindStatusCallbackEx *iface, DWORD *grfBINDF, + BINDINFO *pbindinfo, DWORD *grfBINDF2, DWORD *pdwReserved) +{ + in_bindinfo = *pbindinfo; + *grfBINDF = rem_bindf; + *pbindinfo = rem_bindinfo; + *grfBINDF2 = 11; + *pdwReserved = 12; + return S_OK; +} + +static const IBindStatusCallbackExVtbl BindStatusCallbackExVtbl = { + BindStatusCallback_QueryInterface, + BindStatusCallback_AddRef, + BindStatusCallback_Release, + BindStatusCallback_OnStartBinding, + BindStatusCallback_GetPriority, + BindStatusCallback_OnLowResource, + BindStatusCallback_OnProgress, + BindStatusCallback_OnStopBinding, + BindStatusCallback_GetBindInfo, + BindStatusCallback_OnDataAvailable, + BindStatusCallback_OnObjectAvailable, + BindStatusCallbackEx_GetBindInfoEx +}; + +static IBindStatusCallbackEx BindStatusCallback = { &BindStatusCallbackExVtbl }; + +typedef struct { + IUnknown IUnknown_iface; + LONG ref; +} RefUnk; + +static inline RefUnk *impl_from_IUnknown(IUnknown *iface) +{ + return CONTAINING_RECORD(iface, RefUnk, IUnknown_iface); +} + +static HRESULT WINAPI RefUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) +{ + if(!IsEqualGUID(&IID_IUnknown, riid)) { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef(iface); + *ppv = iface; + return S_OK; +} + +static ULONG WINAPI RefUnk_AddRef(IUnknown *iface) +{ + RefUnk *This = impl_from_IUnknown(iface); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI RefUnk_Release(IUnknown *iface) +{ + RefUnk *This = impl_from_IUnknown(iface); + return InterlockedDecrement(&This->ref); +} + +static const IUnknownVtbl RefUnkVtbl = { + RefUnk_QueryInterface, + RefUnk_AddRef, + RefUnk_Release +}; + +static RefUnk unk_in = {{&RefUnkVtbl}}, unk_out = {{&RefUnkVtbl}}; + +static HANDLE thread_ready; + +static DWORD WINAPI bsc_thread(void *arg) +{ + IStream *stream = arg; + LARGE_INTEGER zero; + MSG msg; + HRESULT hres; + + CoInitialize(NULL); + + hres = CoMarshalInterface(stream, &IID_IBindStatusCallback, (IUnknown*)&BindStatusCallback, + MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); + ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + + zero.QuadPart = 0; + hres = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); + ok(hres == S_OK, "Seek failed: 0x%08x\n", hres); + + SetEvent(thread_ready); + + while(GetMessageW(&msg, NULL, 0, 0)) { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } + + CoUninitialize(); + return 0; +} + +static void test_bsc_marshaling(void) +{ + FORMATETC formatetc = {0, NULL, 1, -1, TYMED_ISTREAM}; + IBindStatusCallbackEx *callbackex; + IBindStatusCallback *bsc; + BINDINFO bindinfo; + IStream *stream, *binding_stream; + HANDLE thread; + WCHAR *extra_info_out; + WCHAR *verb_out; + LARGE_INTEGER zero; + STGMEDIUM stgmed; + void *buf; + DWORD bindf; + HRESULT hres; + + hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08x\n", hres); + + thread_ready = CreateEventW(NULL, TRUE, FALSE, NULL); + thread = CreateThread(NULL, 0, bsc_thread, stream, 0, NULL); + WaitForSingleObject(thread_ready, INFINITE); + + hres = CoUnmarshalInterface(stream, &IID_IBindStatusCallback, (void**)&bsc); + ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); + + hres = CreateStreamOnHGlobal(NULL, TRUE, &binding_stream); + ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08x\n", hres); + hres = IStream_Write(binding_stream, "xxx", 3, NULL); + ok(hres == S_OK, "Write failed: %08x\n", hres); + + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + bindinfo.grfBindInfoF = 12; + bindinfo.dwBindVerb = 13; + bindinfo.cbstgmedData = 19; + bindinfo.dwOptions = 14; + bindinfo.dwOptionsFlags = 15; + bindinfo.dwCodePage = 16; + bindinfo.securityAttributes.nLength = 30; + bindinfo.securityAttributes.lpSecurityDescriptor = (void*)0xdead0001; + bindinfo.securityAttributes.bInheritHandle = 31; + bindinfo.iid.Data1 = 17; + bindinfo.pUnk = (IUnknown*)0xdeadbeef; + bindinfo.dwReserved = 18; + bindinfo.stgmedData.pUnkForRelease = &unk_in.IUnknown_iface; + unk_in.ref = 1; + + memset(&rem_bindinfo, 0, sizeof(bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + rem_bindinfo.szExtraInfo = extra_info_out = a2co("extra info out"); + rem_bindinfo.grfBindInfoF = 22; + rem_bindinfo.dwBindVerb = 23; + rem_bindinfo.szCustomVerb = verb_out = a2co("custom verb out"); + rem_bindinfo.cbstgmedData = 29; + rem_bindinfo.dwOptions = 24; + rem_bindinfo.dwOptionsFlags = 25; + rem_bindinfo.dwCodePage = 16; + rem_bindinfo.securityAttributes.nLength = 40; + rem_bindinfo.securityAttributes.lpSecurityDescriptor = (void*)0xdead0002; + rem_bindinfo.securityAttributes.bInheritHandle = 41; + rem_bindinfo.iid.Data1 = 27; + rem_bindinfo.pUnk = (IUnknown*)0xdeadbeef; + rem_bindinfo.dwReserved = 18; + rem_bindinfo.stgmedData.pUnkForRelease = &unk_out.IUnknown_iface; + unk_out.ref = 1; + + hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); + ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.szExtraInfo, "szExtraInfo = %s\n", wine_dbgstr_w(in_bindinfo.szExtraInfo)); + ok(in_bindinfo.grfBindInfoF == 12, "cbSize = %u\n", in_bindinfo.grfBindInfoF); + ok(in_bindinfo.dwBindVerb == 13, "dwBindVerb = %u\n", in_bindinfo.dwBindVerb); + ok(!in_bindinfo.szCustomVerb, "szCustomVerb = %s\n", wine_dbgstr_w(in_bindinfo.szCustomVerb)); + ok(in_bindinfo.cbstgmedData == 19, "cbstgmedData = %u\n", in_bindinfo.cbstgmedData); + ok(!in_bindinfo.dwOptions, "dwOptions = %u\n", in_bindinfo.dwOptions); + ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %u\n", in_bindinfo.dwOptionsFlags); + ok(!in_bindinfo.dwCodePage, "dwCodePage = %u\n", in_bindinfo.dwCodePage); + ok(!in_bindinfo.iid.Data1, "iid.Data1 = %u\n", in_bindinfo.iid.Data1); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(!in_bindinfo.dwReserved, "dwReserved = %u\n", in_bindinfo.dwReserved); + ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %u\n", + in_bindinfo.securityAttributes.nLength); + ok(!in_bindinfo.securityAttributes.lpSecurityDescriptor, + "securityAttributes.lpSecurityDescriptor = %p\n", + in_bindinfo.securityAttributes.lpSecurityDescriptor); + ok(!in_bindinfo.securityAttributes.bInheritHandle, "securityAttributes.bInheritHandle = %u\n", + in_bindinfo.securityAttributes.bInheritHandle); + ok(!in_bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + in_bindinfo.stgmedData.pUnkForRelease); + + ok(bindinfo.cbSize == sizeof(rem_bindinfo), "cbSize = %u\n", rem_bindinfo.cbSize); + ok(!strcmp_wa(bindinfo.szExtraInfo, "extra info out"), + "szExtraInfo = %s\n", wine_dbgstr_w(bindinfo.szExtraInfo)); + ok(bindinfo.grfBindInfoF == 22, "grfBindInfoF = %u\n", rem_bindinfo.grfBindInfoF); + ok(bindinfo.dwBindVerb == 23, "dwBindVerb = %u\n", bindinfo.dwBindVerb); + ok(bindinfo.szCustomVerb != verb_out, "szCustomVerb == inbuf\n"); + ok(!strcmp_wa(bindinfo.szCustomVerb, "custom verb out"), "szCustomVerb = %s\n", + wine_dbgstr_w(bindinfo.szCustomVerb)); + ok(bindinfo.cbstgmedData == 29, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.dwOptions == 24, "dwOptions = %u\n", bindinfo.dwOptions); + ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %u\n", bindinfo.dwOptionsFlags); + ok(bindinfo.dwCodePage, "dwCodePage = %u\n", bindinfo.dwCodePage); + ok(!bindinfo.iid.Data1, "iid.Data1 = %u\n", bindinfo.iid.Data1); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.dwReserved == 18, "dwReserved = %u\n", bindinfo.dwReserved); + ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %u\n", + bindinfo.securityAttributes.nLength); + ok(bindinfo.securityAttributes.lpSecurityDescriptor == (void*)0xdead0001, + "securityAttributes.lpSecurityDescriptor = %p\n", + bindinfo.securityAttributes.lpSecurityDescriptor); + ok(bindinfo.securityAttributes.bInheritHandle == 31, "securityAttributes.bInheritHandle = %u\n", + bindinfo.securityAttributes.bInheritHandle); + ok(bindinfo.stgmedData.pUnkForRelease == &unk_in.IUnknown_iface, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(unk_out.ref == 1, "unk_out.ref = %u\n", unk_out.ref); + + bindinfo.stgmedData.pUnkForRelease = NULL; + ReleaseBindInfo(&bindinfo); + + zero.QuadPart = 0; + hres = IStream_Seek(binding_stream, zero, STREAM_SEEK_SET, NULL); + ok(hres == S_OK, "Seek failed: 0x%08x\n", hres); + + /* Return IStream stgmed from GetBindInfo, it's not marshaled back */ + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + + memset(&rem_bindinfo, 0, sizeof(rem_bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + + rem_bindinfo.stgmedData.tymed = TYMED_ISTREAM; + rem_bindinfo.stgmedData.u.pstm = binding_stream; + rem_bindinfo.cbstgmedData = 3; + IStream_AddRef(binding_stream); + + hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); + ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + in_bindinfo.stgmedData.tymed); + + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + bindinfo.stgmedData.tymed); + ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", + bindinfo.stgmedData.u.pstm); + ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + + ReleaseBindInfo(&bindinfo); + + /* Same, but with pUnkForRelease, it's not marshaled back */ + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + + memset(&rem_bindinfo, 0, sizeof(rem_bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + + rem_bindinfo.stgmedData.tymed = TYMED_ISTREAM; + rem_bindinfo.stgmedData.u.pstm = binding_stream; + rem_bindinfo.stgmedData.pUnkForRelease = &unk_out.IUnknown_iface; + unk_out.ref = 1; + rem_bindinfo.cbstgmedData = 3; + IStream_AddRef(binding_stream); + + hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); + ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + in_bindinfo.stgmedData.tymed); + + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + bindinfo.stgmedData.tymed); + ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", + bindinfo.stgmedData.u.pstm); + ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + + ReleaseBindInfo(&bindinfo); + + /* Return HGLOBAL stgmed from GetBindInfo, it's not marshaled back */ + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + + memset(&rem_bindinfo, 0, sizeof(rem_bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + + rem_bindinfo.stgmedData.tymed = TYMED_HGLOBAL; + + buf = GlobalAlloc(0, sizeof(5)); + strcpy(buf, "test"); + rem_bindinfo.stgmedData.u.hGlobal = buf; + rem_bindinfo.cbstgmedData = 5; + + hres = IBindStatusCallback_GetBindInfo(bsc, &bindf, &bindinfo); + ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + in_bindinfo.stgmedData.tymed); + + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + bindinfo.stgmedData.tymed); + ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", + bindinfo.stgmedData.u.pstm); + ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(bindinfo.cbstgmedData == 5, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + + ReleaseBindInfo(&bindinfo); + + /* Same with GetBindInfoEx */ + hres = IBindStatusCallback_QueryInterface(bsc, &IID_IBindStatusCallbackEx, (void**)&callbackex); + if(SUCCEEDED(hres)) { + DWORD bindf2, reserved; + + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = bindf2 = reserved = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + bindinfo.grfBindInfoF = 12; + bindinfo.dwBindVerb = 13; + bindinfo.cbstgmedData = 19; + bindinfo.dwOptions = 14; + bindinfo.dwOptionsFlags = 15; + bindinfo.dwCodePage = 16; + bindinfo.securityAttributes.nLength = 30; + bindinfo.securityAttributes.lpSecurityDescriptor = (void*)0xdead0001; + bindinfo.securityAttributes.bInheritHandle = 31; + bindinfo.iid.Data1 = 17; + bindinfo.pUnk = (IUnknown*)0xdeadbeef; + bindinfo.dwReserved = 18; + bindinfo.stgmedData.pUnkForRelease = &unk_in.IUnknown_iface; + unk_in.ref = 1; + + memset(&rem_bindinfo, 0, sizeof(bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + rem_bindinfo.szExtraInfo = extra_info_out = a2co("extra info out"); + rem_bindinfo.grfBindInfoF = 22; + rem_bindinfo.dwBindVerb = 23; + rem_bindinfo.szCustomVerb = verb_out = a2co("custom verb out"); + rem_bindinfo.cbstgmedData = 29; + rem_bindinfo.dwOptions = 24; + rem_bindinfo.dwOptionsFlags = 25; + rem_bindinfo.dwCodePage = 16; + rem_bindinfo.securityAttributes.nLength = 40; + rem_bindinfo.securityAttributes.lpSecurityDescriptor = (void*)0xdead0002; + rem_bindinfo.securityAttributes.bInheritHandle = 41; + rem_bindinfo.iid.Data1 = 27; + rem_bindinfo.pUnk = (IUnknown*)0xdeadbeef; + rem_bindinfo.dwReserved = 18; + rem_bindinfo.stgmedData.pUnkForRelease = &unk_out.IUnknown_iface; + unk_out.ref = 1; + + hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); + ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + ok(bindf2 == 11, "bindf2 = %x\n", bindf); + ok(reserved == 12, "reserved = %x\n", reserved); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.szExtraInfo, "szExtraInfo = %s\n", wine_dbgstr_w(in_bindinfo.szExtraInfo)); + ok(in_bindinfo.grfBindInfoF == 12, "cbSize = %u\n", in_bindinfo.grfBindInfoF); + ok(in_bindinfo.dwBindVerb == 13, "dwBindVerb = %u\n", in_bindinfo.dwBindVerb); + ok(!in_bindinfo.szCustomVerb, "szCustomVerb = %s\n", wine_dbgstr_w(in_bindinfo.szCustomVerb)); + ok(in_bindinfo.cbstgmedData == 19, "cbstgmedData = %u\n", in_bindinfo.cbstgmedData); + ok(!in_bindinfo.dwOptions, "dwOptions = %u\n", in_bindinfo.dwOptions); + ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %u\n", in_bindinfo.dwOptionsFlags); + ok(!in_bindinfo.dwCodePage, "dwCodePage = %u\n", in_bindinfo.dwCodePage); + ok(!in_bindinfo.iid.Data1, "iid.Data1 = %u\n", in_bindinfo.iid.Data1); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(!in_bindinfo.dwReserved, "dwReserved = %u\n", in_bindinfo.dwReserved); + ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %u\n", + in_bindinfo.securityAttributes.nLength); + ok(!in_bindinfo.securityAttributes.lpSecurityDescriptor, + "securityAttributes.lpSecurityDescriptor = %p\n", + in_bindinfo.securityAttributes.lpSecurityDescriptor); + ok(!in_bindinfo.securityAttributes.bInheritHandle, "securityAttributes.bInheritHandle = %u\n", + in_bindinfo.securityAttributes.bInheritHandle); + ok(!in_bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + in_bindinfo.stgmedData.pUnkForRelease); + + ok(bindinfo.cbSize == sizeof(rem_bindinfo), "cbSize = %u\n", rem_bindinfo.cbSize); + ok(!strcmp_wa(bindinfo.szExtraInfo, "extra info out"), + "szExtraInfo = %s\n", wine_dbgstr_w(bindinfo.szExtraInfo)); + ok(bindinfo.grfBindInfoF == 22, "grfBindInfoF = %u\n", rem_bindinfo.grfBindInfoF); + ok(bindinfo.dwBindVerb == 23, "dwBindVerb = %u\n", bindinfo.dwBindVerb); + ok(bindinfo.szCustomVerb != verb_out, "szCustomVerb == inbuf\n"); + ok(!strcmp_wa(bindinfo.szCustomVerb, "custom verb out"), "szCustomVerb = %s\n", + wine_dbgstr_w(bindinfo.szCustomVerb)); + ok(bindinfo.cbstgmedData == 29, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + ok(bindinfo.dwOptions == 24, "dwOptions = %u\n", bindinfo.dwOptions); + ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %u\n", bindinfo.dwOptionsFlags); + ok(bindinfo.dwCodePage, "dwCodePage = %u\n", bindinfo.dwCodePage); + ok(!bindinfo.iid.Data1, "iid.Data1 = %u\n", bindinfo.iid.Data1); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.dwReserved == 18, "dwReserved = %u\n", bindinfo.dwReserved); + ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %u\n", + bindinfo.securityAttributes.nLength); + ok(bindinfo.securityAttributes.lpSecurityDescriptor == (void*)0xdead0001, + "securityAttributes.lpSecurityDescriptor = %p\n", + bindinfo.securityAttributes.lpSecurityDescriptor); + ok(bindinfo.securityAttributes.bInheritHandle == 31, "securityAttributes.bInheritHandle = %u\n", + bindinfo.securityAttributes.bInheritHandle); + ok(bindinfo.stgmedData.pUnkForRelease == &unk_in.IUnknown_iface, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(unk_out.ref == 1, "unk_out.ref = %u\n", unk_out.ref); + + bindinfo.stgmedData.pUnkForRelease = NULL; + ReleaseBindInfo(&bindinfo); + + zero.QuadPart = 0; + hres = IStream_Seek(binding_stream, zero, STREAM_SEEK_SET, NULL); + ok(hres == S_OK, "Seek failed: 0x%08x\n", hres); + + /* Return IStream stgmed from GetBindInfoEx, it's not marshaled back */ + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = bindf2 = reserved = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + + memset(&rem_bindinfo, 0, sizeof(rem_bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + + rem_bindinfo.stgmedData.tymed = TYMED_ISTREAM; + rem_bindinfo.stgmedData.u.pstm = binding_stream; + rem_bindinfo.cbstgmedData = 3; + IStream_AddRef(binding_stream); + + hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); + ok(hres == S_OK, "GetBindInfoEx failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + in_bindinfo.stgmedData.tymed); + + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + bindinfo.stgmedData.tymed); + ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", + bindinfo.stgmedData.u.pstm); + ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + + ReleaseBindInfo(&bindinfo); + + /* Same, but with pUnkForRelease, it's not marshaled back */ + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = bindf2 = reserved = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + + memset(&rem_bindinfo, 0, sizeof(rem_bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + + rem_bindinfo.stgmedData.tymed = TYMED_ISTREAM; + rem_bindinfo.stgmedData.u.pstm = binding_stream; + rem_bindinfo.stgmedData.pUnkForRelease = &unk_out.IUnknown_iface; + unk_out.ref = 1; + rem_bindinfo.cbstgmedData = 3; + IStream_AddRef(binding_stream); + + hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); + ok(hres == S_OK, "GetBindInfoEx failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + in_bindinfo.stgmedData.tymed); + + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + bindinfo.stgmedData.tymed); + ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", + bindinfo.stgmedData.u.pstm); + ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(bindinfo.cbstgmedData == 3, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + + ReleaseBindInfo(&bindinfo); + + /* Return HGLOBAL stgmed from GetBindInfoEx, it's not marshaled back */ + rem_bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + bindf = bindf2 = reserved = 0xdeadbeef; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(bindinfo); + + memset(&rem_bindinfo, 0, sizeof(rem_bindinfo)); + rem_bindinfo.cbSize = sizeof(rem_bindinfo); + + rem_bindinfo.stgmedData.tymed = TYMED_HGLOBAL; + + buf = GlobalAlloc(0, sizeof(5)); + strcpy(buf, "test"); + rem_bindinfo.stgmedData.u.hGlobal = buf; + rem_bindinfo.cbstgmedData = 5; + + hres = IBindStatusCallbackEx_GetBindInfoEx(callbackex, &bindf, &bindinfo, &bindf2, &reserved); + ok(hres == S_OK, "GetBindInfoEx failed: %08x\n", hres); + ok(bindf == rem_bindf, "bindf = %x, expected %x\n", bindf, rem_bindf); + + ok(in_bindinfo.cbSize == sizeof(in_bindinfo), "cbSize = %u\n", in_bindinfo.cbSize); + ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk); + ok(in_bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + in_bindinfo.stgmedData.tymed); + + ok(bindinfo.cbSize == sizeof(bindinfo), "cbSize = %u\n", bindinfo.cbSize); + ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk); + ok(bindinfo.stgmedData.tymed == TYMED_NULL, "tymed = %u\n", + bindinfo.stgmedData.tymed); + ok(!bindinfo.stgmedData.u.pstm, "stm = %p\n", + bindinfo.stgmedData.u.pstm); + ok(!bindinfo.stgmedData.pUnkForRelease, "pUnkForRelease = %p\n", + bindinfo.stgmedData.pUnkForRelease); + ok(bindinfo.cbstgmedData == 5, "cbstgmedData = %u\n", bindinfo.cbstgmedData); + + ReleaseBindInfo(&bindinfo); + + IBindStatusCallbackEx_Release(callbackex); + }else { + win_skip("IBindStatusCallbackEx not supported\n"); + } + + /* Test marshaling stgmed from OnDataAvailable */ + memset(&in_stgmed, 0xcc, sizeof(in_stgmed)); + stgmed.tymed = TYMED_ISTREAM; + stgmed.u.pstm = binding_stream; + stgmed.pUnkForRelease = NULL; + + hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); + ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + + ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %u\n", in_stgmed.tymed); + ok(in_stgmed.u.pstm != NULL, "pstm = NULL\n"); + ok(!in_stgmed.pUnkForRelease, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease); + + /* OnDataAvailable with both IStream and pUnkForRelease */ + memset(&in_stgmed, 0xcc, sizeof(in_stgmed)); + stgmed.tymed = TYMED_ISTREAM; + stgmed.u.pstm = binding_stream; + stgmed.pUnkForRelease = &unk_in.IUnknown_iface; + unk_in.ref = 1; + + hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); + ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + + ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %u\n", in_stgmed.tymed); + ok(in_stgmed.u.pstm != NULL, "pstm = NULL\n"); + ok(in_stgmed.pUnkForRelease != NULL, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease); + ok(unk_in.ref > 1, "ref = %u\n", unk_in.ref); + + /* OnDataAvailable with TYMED_ISTREAM, but NULL stream */ + memset(&in_stgmed, 0xcc, sizeof(in_stgmed)); + stgmed.tymed = TYMED_ISTREAM; + stgmed.u.pstm = binding_stream; + stgmed.pUnkForRelease = NULL; + + hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); + ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + + ok(in_stgmed.tymed == TYMED_ISTREAM, "tymed = %u\n", in_stgmed.tymed); + ok(in_stgmed.u.pstm != NULL, "pstm = NULL\n"); + ok(!in_stgmed.pUnkForRelease, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease); + + /* OnDataAvailable with TYMED_NULL and pUnkForRelease */ + memset(&in_stgmed, 0xcc, sizeof(in_stgmed)); + stgmed.tymed = TYMED_NULL; + stgmed.u.pstm = binding_stream; + stgmed.pUnkForRelease = &unk_in.IUnknown_iface; + unk_in.ref = 1; + + hres = IBindStatusCallback_OnDataAvailable(bsc, 1, 10, &formatetc, &stgmed); + ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); + + ok(in_stgmed.tymed == TYMED_NULL, "tymed = %u\n", in_stgmed.tymed); + ok(!in_stgmed.u.pstm, "pstm != NULL\n"); + ok(in_stgmed.pUnkForRelease != NULL, "pUnkForRelease = %p\n", in_stgmed.pUnkForRelease); + ok(unk_in.ref == 1, "ref = %u\n", unk_in.ref); + + IStream_Release(binding_stream); + IBindStatusCallback_Release(bsc); + + TerminateThread(thread, 0); +} + START_TEST(misc) { HMODULE hurlmon; @@ -1981,6 +2703,7 @@ START_TEST(misc) test_user_agent(); test_MkParseDisplayNameEx(); test_IsValidURL(); + test_bsc_marshaling(); } test_internet_features(); diff --git a/modules/rostests/winetests/urlmon/url.c b/modules/rostests/winetests/urlmon/url.c index e71774d826..1cc886379e 100644 --- a/modules/rostests/winetests/urlmon/url.c +++ b/modules/rostests/winetests/urlmon/url.c @@ -190,7 +190,6 @@ static HRESULT abort_hres; static BOOL have_IHttpNegotiate2, use_bscex, is_async_prot; static BOOL test_redirect, use_cache_file, callback_read, no_callback, test_abort; static WCHAR cache_file_name[MAX_PATH]; -static WCHAR http_cache_file[MAX_PATH]; static BOOL only_check_prot_args = FALSE; static BOOL invalid_cn_accepted = FALSE; static BOOL abort_start = FALSE; @@ -1936,14 +1935,6 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRES ok( WaitForSingleObject(complete_event2, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); } - if(test_protocol == HTTP_TEST && !emulate_protocol && http_cache_file[0]) { - HANDLE file = CreateFileW(http_cache_file, DELETE, FILE_SHARE_DELETE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file == INVALID_HANDLE_VALUE, "expected INVALID_HANDLE_VALUE, got %p\n", file); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "expected ERROR_SHARING_VIOLATION, got %u\n", GetLastError()); - http_cache_file[0] = 0; - } - return S_OK; } @@ -2100,8 +2091,6 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW else if(emulate_protocol) ok(!lstrcmpW(pstgmed->u.lpszFileName, cache_fileW), "unexpected file name %s\n", wine_dbgstr_w(pstgmed->u.lpszFileName)); - else if(test_protocol == HTTP_TEST) - lstrcpyW(http_cache_file, pstgmed->u.lpszFileName); else ok(pstgmed->u.lpszFileName != NULL, "lpszFileName == NULL\n"); }
6 years, 11 months
1
0
0
0
01/01: [URLMON] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2eb77351e0ba6802d79ce…
commit 2eb77351e0ba6802d79ce1603d469311541286e9 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:29:39 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:29:39 2018 +0100 [URLMON] Sync with Wine 3.0. CORE-14225 --- dll/win32/urlmon/axinstall.c | 23 +++- dll/win32/urlmon/usrmarshal.c | 268 +++++++++++++++++++++++++++++++++++++++--- media/doc/README.WINE | 2 +- 3 files changed, 269 insertions(+), 24 deletions(-) diff --git a/dll/win32/urlmon/axinstall.c b/dll/win32/urlmon/axinstall.c index 18f8fdb9bd..c84adbbf94 100644 --- a/dll/win32/urlmon/axinstall.c +++ b/dll/win32/urlmon/axinstall.c @@ -243,12 +243,25 @@ static HRESULT install_inf_file(install_ctx_t *ctx) len = GetPrivateProfileStringW(add_codeW, NULL, NULL, buf, sizeof(buf)/sizeof(*buf), ctx->install_file); if(len) { - FIXME("[Add.Code] section not supported\n"); + default_install = FALSE; - /* Don't throw an error if we successfully ran setup hooks; - installation is likely to be complete enough */ - if(default_install) - return E_NOTIMPL; + for(key = buf; *key; key += strlenW(key)+1) { + TRACE("[Add.Code] key: %s\n", debugstr_w(key)); + + len = GetPrivateProfileStringW(add_codeW, key, NULL, sect_name, sizeof(sect_name)/sizeof(*sect_name), + ctx->install_file); + if(!len) { + WARN("Could not get key value\n"); + return E_FAIL; + } + + hres = RunSetupCommandW(ctx->hwnd, ctx->install_file, sect_name, + ctx->tmp_dir, NULL, NULL, RSC_FLAG_INF, NULL); + if(FAILED(hres)) { + WARN("RunSetupCommandW failed: %08x\n", hres); + return hres; + } + } } if(default_install) { diff --git a/dll/win32/urlmon/usrmarshal.c b/dll/win32/urlmon/usrmarshal.c index 1e4932521f..fd8d6d228f 100644 --- a/dll/win32/urlmon/usrmarshal.c +++ b/dll/win32/urlmon/usrmarshal.c @@ -18,6 +18,8 @@ #include "urlmon_main.h" +#include <ole2.h> + HRESULT CALLBACK IWinInetHttpInfo_QueryInfo_Proxy(IWinInetHttpInfo* This, DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf, DWORD *pdwFlags, DWORD *pdwReserved) @@ -80,51 +82,281 @@ HRESULT __RPC_STUB IBindHost_MonikerBindToObject_Stub(IBindHost* This, return IBindHost_MonikerBindToObject(This, moniker, bc, bsc, riid, (void**)obj); } +static HRESULT marshal_stgmed(STGMEDIUM *stgmed, RemSTGMEDIUM **ret) +{ + RemSTGMEDIUM *rem_stgmed; + IStream *stream = NULL; + ULONG size = 0; + HRESULT hres = S_OK; + + if((stgmed->tymed == TYMED_ISTREAM && stgmed->u.pstm) || stgmed->pUnkForRelease) { + hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); + if(FAILED(hres)) + return hres; + } + + switch(stgmed->tymed) { + case TYMED_NULL: + break; + case TYMED_ISTREAM: + if(stgmed->u.pstm) + hres = CoMarshalInterface(stream, &IID_IStream, (IUnknown*)stgmed->u.pstm, + MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL); + break; + default: + FIXME("unsupported tymed %u\n", stgmed->tymed); + break; + } + + if(SUCCEEDED(hres) && stgmed->pUnkForRelease) + hres = CoMarshalInterface(stream, &IID_IUnknown, stgmed->pUnkForRelease, + MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL); + if(FAILED(hres)) { + if(stream) + IStream_Release(stream); + return hres; + } + + if(stream) { + LARGE_INTEGER zero; + ULARGE_INTEGER off; + + zero.QuadPart = 0; + IStream_Seek(stream, zero, STREAM_SEEK_CUR, &off); + size = off.QuadPart; + IStream_Seek(stream, zero, STREAM_SEEK_SET, &off); + } + + rem_stgmed = heap_alloc_zero(FIELD_OFFSET(RemSTGMEDIUM, data[size])); + if(!rem_stgmed) { + if(stream) + IStream_Release(stream); + return E_OUTOFMEMORY; + } + + rem_stgmed->tymed = stgmed->tymed; + rem_stgmed->dwHandleType = 0; + rem_stgmed->pData = stgmed->u.pstm != NULL; + rem_stgmed->pUnkForRelease = stgmed->pUnkForRelease != NULL; + rem_stgmed->cbData = size; + if(stream) { + IStream_Read(stream, rem_stgmed->data, size, &size); + IStream_Release(stream); + } + + *ret = rem_stgmed; + return S_OK; +} + +static HRESULT unmarshal_stgmed(RemSTGMEDIUM *rem_stgmed, STGMEDIUM *stgmed) +{ + IStream *stream = NULL; + HRESULT hres = S_OK; + + stgmed->tymed = rem_stgmed->tymed; + + if((stgmed->tymed == TYMED_ISTREAM && rem_stgmed->pData) || rem_stgmed->pUnkForRelease) { + LARGE_INTEGER zero; + + hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); + if(FAILED(hres)) + return hres; + + hres = IStream_Write(stream, rem_stgmed->data, rem_stgmed->cbData, NULL); + if(FAILED(hres)) { + IStream_Release(stream); + return hres; + } + + zero.QuadPart = 0; + IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); + } + + switch(stgmed->tymed) { + case TYMED_NULL: + break; + case TYMED_ISTREAM: + if(rem_stgmed->pData) + hres = CoUnmarshalInterface(stream, &IID_IStream, (void**)&stgmed->u.pstm); + break; + default: + FIXME("unsupported tymed %u\n", stgmed->tymed); + break; + } + + if(SUCCEEDED(hres) && rem_stgmed->pUnkForRelease) + hres = CoUnmarshalInterface(stream, &IID_IUnknown, (void**)&stgmed->pUnkForRelease); + if(stream) + IStream_Release(stream); + return hres; +} + +static void proxy_marshal_bindinfo(BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo) +{ + rem_bindinfo->szExtraInfo = bindinfo->szExtraInfo; + rem_bindinfo->grfBindInfoF = bindinfo->grfBindInfoF; + rem_bindinfo->dwBindVerb = bindinfo->dwBindVerb; + rem_bindinfo->szCustomVerb = bindinfo->szCustomVerb; + rem_bindinfo->cbstgmedData = bindinfo->cbstgmedData; +} + +static void proxy_unmarshal_bindinfo(RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo) +{ + bindinfo->szExtraInfo = rem_bindinfo->szExtraInfo; + bindinfo->grfBindInfoF = rem_bindinfo->grfBindInfoF; + bindinfo->dwBindVerb = rem_bindinfo->dwBindVerb; + bindinfo->szCustomVerb = rem_bindinfo->szCustomVerb; + bindinfo->cbstgmedData = rem_bindinfo->cbstgmedData; + bindinfo->dwOptions = rem_bindinfo->dwOptions; + bindinfo->dwOptionsFlags = rem_bindinfo->dwOptionsFlags; + bindinfo->dwCodePage = rem_bindinfo->dwCodePage; + bindinfo->iid = IID_NULL; + bindinfo->pUnk = NULL; +} + +static void stub_unmarshal_bindinfo(RemBINDINFO *rem_bindinfo, BINDINFO *bindinfo) +{ + bindinfo->szExtraInfo = rem_bindinfo->szExtraInfo; + bindinfo->grfBindInfoF = rem_bindinfo->grfBindInfoF; + bindinfo->dwBindVerb = rem_bindinfo->dwBindVerb; + bindinfo->szCustomVerb = rem_bindinfo->szCustomVerb; + bindinfo->cbstgmedData = rem_bindinfo->cbstgmedData; + + if(bindinfo->stgmedData.tymed != TYMED_NULL) + WARN("stgmed data (tymed %u) will be lost!\n", bindinfo->stgmedData.tymed); +} + +static void stub_marshal_bindinfo(BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo) +{ + rem_bindinfo->cbSize = sizeof(*rem_bindinfo); + rem_bindinfo->szExtraInfo = bindinfo->szExtraInfo; + rem_bindinfo->grfBindInfoF = bindinfo->grfBindInfoF; + rem_bindinfo->dwBindVerb = bindinfo->dwBindVerb; + rem_bindinfo->szCustomVerb = bindinfo->szCustomVerb; + rem_bindinfo->cbstgmedData = bindinfo->cbstgmedData; + rem_bindinfo->dwOptions = bindinfo->dwOptions; + rem_bindinfo->dwOptionsFlags = bindinfo->dwOptionsFlags; + rem_bindinfo->dwCodePage = bindinfo->dwCodePage; + rem_bindinfo->pUnk = NULL; + rem_bindinfo->dwReserved = bindinfo->dwReserved; +} + + HRESULT CALLBACK IBindStatusCallbackEx_GetBindInfoEx_Proxy( - IBindStatusCallbackEx* This, DWORD *grfBINDF, BINDINFO *pbindinfo, + IBindStatusCallbackEx* This, DWORD *grfBINDF, BINDINFO *bindinfo, DWORD *grfBINDF2, DWORD *pdwReserved) { - FIXME("stub\n"); - return E_NOTIMPL; + RemBINDINFO rem_bindinfo = {sizeof(rem_bindinfo)}; + RemSTGMEDIUM rem_stgmed = {0}; + HRESULT hres; + + TRACE("(%p)->(%p %p %p %p)\n", This, grfBINDF, bindinfo, grfBINDF2, pdwReserved); + + proxy_marshal_bindinfo(bindinfo, &rem_bindinfo); + hres = IBindStatusCallbackEx_RemoteGetBindInfoEx_Proxy(This, grfBINDF, &rem_bindinfo, + &rem_stgmed, grfBINDF2, pdwReserved); + proxy_unmarshal_bindinfo(&rem_bindinfo, bindinfo); + return hres; } HRESULT __RPC_STUB IBindStatusCallbackEx_GetBindInfoEx_Stub( - IBindStatusCallbackEx* This, DWORD *grfBINDF, RemBINDINFO *pbindinfo, - RemSTGMEDIUM *pstgmed, DWORD *grfBINDF2, DWORD *pdwReserved) + IBindStatusCallbackEx* This, DWORD *grfBINDF, RemBINDINFO *rem_bindinfo, + RemSTGMEDIUM *rem_stgmed, DWORD *grfBINDF2, DWORD *pdwReserved) { - FIXME("stub\n"); - return E_NOTIMPL; -} + BINDINFO bindinfo = {sizeof(bindinfo)}; + HRESULT hres; + TRACE("(%p)->(%p %p %p %p %p)\n", This, grfBINDF, rem_bindinfo, rem_stgmed, grfBINDF2, pdwReserved); + + /* + * Although arguments suggest support for STGMEDIUM from BINDINFO, tests show + * that it's not supported and returned data is lost. + */ + stub_unmarshal_bindinfo(rem_bindinfo, &bindinfo); + hres = IBindStatusCallbackEx_GetBindInfoEx(This, grfBINDF, &bindinfo, grfBINDF2, pdwReserved); + stub_marshal_bindinfo(&bindinfo, rem_bindinfo); + return hres; +} HRESULT CALLBACK IBindStatusCallback_GetBindInfo_Proxy( - IBindStatusCallback* This, DWORD *grfBINDF, BINDINFO *pbindinfo) + IBindStatusCallback* This, DWORD *grfBINDF, BINDINFO *bindinfo) { - FIXME("stub\n"); - return E_NOTIMPL; + RemBINDINFO rem_bindinfo = {sizeof(rem_bindinfo)}; + RemSTGMEDIUM rem_stgmed = {0}; + HRESULT hres; + + TRACE("(%p)->(%p %p)\n", This, grfBINDF, bindinfo); + + proxy_marshal_bindinfo(bindinfo, &rem_bindinfo); + hres = IBindStatusCallback_RemoteGetBindInfo_Proxy(This, grfBINDF, &rem_bindinfo, &rem_stgmed); + proxy_unmarshal_bindinfo(&rem_bindinfo, bindinfo); + return hres; } HRESULT __RPC_STUB IBindStatusCallback_GetBindInfo_Stub( IBindStatusCallback* This, DWORD *grfBINDF, - RemBINDINFO *pbindinfo, RemSTGMEDIUM *pstgmed) + RemBINDINFO *rem_bindinfo, RemSTGMEDIUM *rem_stgmed) { - FIXME("stub\n"); - return E_NOTIMPL; + BINDINFO bindinfo = {sizeof(bindinfo)}; + HRESULT hres; + + TRACE("(%p)->(%p %p %p)\n", This, grfBINDF, rem_bindinfo, rem_stgmed); + + stub_unmarshal_bindinfo(rem_bindinfo, &bindinfo); + hres = IBindStatusCallback_GetBindInfo(This, grfBINDF, &bindinfo); + stub_marshal_bindinfo(&bindinfo, rem_bindinfo); + return hres; } HRESULT CALLBACK IBindStatusCallback_OnDataAvailable_Proxy( IBindStatusCallback* This, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed) { - FIXME("stub\n"); - return E_NOTIMPL; + RemFORMATETC rem_formatetc; + RemSTGMEDIUM *rem_stgmed; + HRESULT hres; + + TRACE("(%p)->(%x %u %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed); + + hres = marshal_stgmed(pstgmed, &rem_stgmed); + if(FAILED(hres)) + return hres; + + rem_formatetc.cfFormat = pformatetc->cfFormat; + rem_formatetc.ptd = 0; + rem_formatetc.dwAspect = pformatetc->dwAspect; + rem_formatetc.lindex = pformatetc->lindex; + rem_formatetc.tymed = pformatetc->tymed; + + hres = IBindStatusCallback_RemoteOnDataAvailable_Proxy(This, grfBSCF, dwSize, &rem_formatetc, rem_stgmed); + + heap_free(rem_stgmed); + return hres; } HRESULT __RPC_STUB IBindStatusCallback_OnDataAvailable_Stub( IBindStatusCallback* This, DWORD grfBSCF, DWORD dwSize, RemFORMATETC *pformatetc, RemSTGMEDIUM *pstgmed) { - FIXME("stub\n"); - return E_NOTIMPL; + STGMEDIUM stgmed = { TYMED_NULL }; + FORMATETC formatetc; + HRESULT hres; + + TRACE("(%p)->(%x %u %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed); + + hres = unmarshal_stgmed(pstgmed, &stgmed); + if(FAILED(hres)) + return hres; + + formatetc.cfFormat = pformatetc->cfFormat; + formatetc.ptd = NULL; + formatetc.dwAspect = pformatetc->dwAspect; + formatetc.lindex = pformatetc->lindex; + formatetc.tymed = pformatetc->tymed; + + hres = IBindStatusCallback_OnDataAvailable(This, grfBSCF, dwSize, &formatetc, &stgmed); + + ReleaseStgMedium(&stgmed); + return hres; } HRESULT CALLBACK IBinding_GetBindResult_Proxy(IBinding* This, diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 5106521886..14089f8b59 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -188,7 +188,7 @@ reactos/dll/win32/traffic # Synced to WineStaging-2.9 reactos/dll/win32/twain_32 # Synced to Wine-3.0 reactos/dll/win32/updspapi # Synced to WineStaging-2.9 reactos/dll/win32/url # Synced to WineStaging-2.9 -reactos/dll/win32/urlmon # Synced to WineStaging-2.16 +reactos/dll/win32/urlmon # Synced to Wine-3.0 reactos/dll/win32/usp10 # Synced to Wine-3.0 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to WineStaging-2.9
6 years, 11 months
1
0
0
0
01/01: [SHLWAPI_WINETEST] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a0b6db8b7f5c557ff6a53…
commit a0b6db8b7f5c557ff6a535dac7a6f760236eccd4 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 20 13:27:32 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 20 13:27:32 2018 +0100 [SHLWAPI_WINETEST] Sync with Wine 3.0. CORE-14225 --- modules/rostests/winetests/shlwapi/assoc.c | 284 +-------------------------- modules/rostests/winetests/shlwapi/clist.c | 21 +- modules/rostests/winetests/shlwapi/istream.c | 6 +- modules/rostests/winetests/shlwapi/ordinal.c | 1 + modules/rostests/winetests/shlwapi/path.c | 12 ++ modules/rostests/winetests/shlwapi/url.c | 47 ++--- 6 files changed, 42 insertions(+), 329 deletions(-) diff --git a/modules/rostests/winetests/shlwapi/assoc.c b/modules/rostests/winetests/shlwapi/assoc.c index 8915b3a7aa..90e44fb84b 100644 --- a/modules/rostests/winetests/shlwapi/assoc.c +++ b/modules/rostests/winetests/shlwapi/assoc.c @@ -19,13 +19,12 @@ #include "precomp.h" -#define expect(expected, got) ok( (expected) == (got), "Expected %d, got %d\n", (expected), (got)) -#define expect_hr(expected, got) ok( (expected) == (got), "Expected %08x, got %08x\n", (expected), (got)) +#define expect(expected, got) ok ( expected == got, "Expected %d, got %d\n", expected, got) +#define expect_hr(expected, got) ok ( expected == got, "Expected %08x, got %08x\n", expected, got) static HRESULT (WINAPI *pAssocQueryStringA)(ASSOCF,ASSOCSTR,LPCSTR,LPCSTR,LPSTR,LPDWORD) = NULL; static HRESULT (WINAPI *pAssocQueryStringW)(ASSOCF,ASSOCSTR,LPCWSTR,LPCWSTR,LPWSTR,LPDWORD) = NULL; static HRESULT (WINAPI *pAssocCreate)(CLSID, REFIID, void **) = NULL; -static HRESULT (WINAPI *pAssocGetPerceivedType)(LPCWSTR, PERCEIVED *, INT *, LPWSTR *) = NULL; /* Every version of Windows with IE should have this association? */ static const WCHAR dotHtml[] = { '.','h','t','m','l',0 }; @@ -303,283 +302,6 @@ static void test_assoc_create(void) } } -/* Based on
http://www.geoffchappell.com/studies/windows/shell/shlwapi/api/assocapi/get…
*/ -struct assoc_test_struct -{ - PCSTR extension; - PERCEIVED perceived; - INT flags; - PCSTR type; - DWORD minversion; - HRESULT hr; -}; - -#define HARDCODED_NATIVE_WMSDK (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_WMSDK) -#define HARDCODED_NATIVE_GDIPLUS (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_GDIPLUS) -#define HARDCODED_NATIVE_ZIPFLDR (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_ZIPFOLDER) -#define SOFTCODED_NATIVESUPPORT (PERCEIVEDFLAG_SOFTCODED | PERCEIVEDFLAG_NATIVESUPPORT) - -static const struct assoc_test_struct assoc_perceived_types[] = -{ - /* builtins */ - { ".aif", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".aifc", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".aiff", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".asf", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".asx", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".au", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".avi", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".bas", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".bat", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".bmp", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".cmd", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".com", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".cpl", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_HARDCODED, "system", 0x600 }, - { ".dib", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".dvr-ms", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".emf", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".exe", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".gif", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".hta", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - /* htm & html are PERCEIVED_TYPE_TEXT, PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_SOFTCODED in w2k3 */ - { ".htm", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_HARDCODED, "document", 0x600 }, - { ".html", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_HARDCODED, "document", 0x600 }, - { ".ico", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".IVF", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".jfif", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".jpe", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".jpeg", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".jpg", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".lnk", PERCEIVED_TYPE_UNSPECIFIED, PERCEIVEDFLAG_HARDCODED, NULL, 0x600, E_FAIL }, - { ".m1v", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".m3u", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".mht", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_HARDCODED, "document", 0x600 }, - { ".mid", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".midi", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".msi", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - /* below win8 this is defined to be video */ - { ".mp2", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio", 0x602 }, - { ".mp2v", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".mp3", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".mpa", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".mpe", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".mpeg", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".mpg", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".mpv2", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".pif", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".png", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".reg", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".rle", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".rmi", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".scr", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".search-ms", PERCEIVED_TYPE_UNSPECIFIED, PERCEIVEDFLAG_HARDCODED, NULL, 0x600, E_FAIL }, - { ".snd", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".tif", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".tiff", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".vb", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, - { ".wav", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".wax", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".wm", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".wma", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, - { ".wmf", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, - { ".wmv", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".wmx", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".wvx", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, - { ".zip", PERCEIVED_TYPE_COMPRESSED, HARDCODED_NATIVE_ZIPFLDR, "compressed" }, - /* found in the registry under HKEY_CLASSES_ROOT on a new Win7 VM */ - { ".386", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, - { ".3g2", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".3gp", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".3gp2", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".3gpp", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".AAC", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, - { ".ADT", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, - { ".ADTS", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, - { ".asm", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".asmx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".aspx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".c", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".cab", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed", 0x600 }, - { ".chk", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, - { ".cpp", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".css", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".cxx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".def", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".diz", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".docx", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x601 }, - { ".drv", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system", 0x600 }, - { ".gz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, - { ".h", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".hpp", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".hxx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".inc", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".ini", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x600 }, - { ".java", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".local", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, - { ".M2T", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".M2TS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".M2V", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".m4a", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, - { ".m4b", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, - { ".m4p", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, - { ".m4v", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".manifest", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, - { ".MOD", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".mov", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".mp4", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".mp4v", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".MTS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".nvr", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".ocx", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, - { ".odt", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x601 }, - { ".php3", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".pl", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".plg", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".ps1xml", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "Text" }, - { ".rtf", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".sed", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".shtml", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".sql", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".sys", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system", 0x600 }, - { ".tar", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, - { ".text", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".tgz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, - { ".TS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".tsv", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".TTS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".txt", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".vob", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, - { ".vxd", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, - { ".wdp", PERCEIVED_TYPE_IMAGE, PERCEIVEDFLAG_SOFTCODED, "image" }, - { ".wmz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, - { ".wpl", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, - { ".wsz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, - { ".x", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, - { ".xml", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x601 }, - { ".xsl", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x601 }, - { ".z", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, - /* found in the registry under HKEY_CLASSES_ROOT\PerceivedType */ - { ".doc", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".dot", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".mhtml", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".pot", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".ppt", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".rtf", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".wri", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".xls", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - { ".xlt", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, - -}; - -static void test_assoc_one(const struct assoc_test_struct* test) -{ - LPWSTR extension, type_expected, type_returned; - PERCEIVED perceived; - HRESULT hr; - INT flags; - - /* if SHStrDupA receives a nullptr as input, it will null the output */ - SHStrDupA(test->extension, &extension); - SHStrDupA(test->type, &type_expected); - - perceived = 0xdeadbeef; - flags = 0xdeadbeef; - - hr = pAssocGetPerceivedType(extension, &perceived, &flags, NULL); - expect_hr(type_expected ? S_OK : test->hr, hr); - ok(perceived == test->perceived, "%s: got perceived 0x%x, expected 0x%x\n", - test->extension, perceived, test->perceived); - ok(flags == test->flags, "%s: got flags 0x%x, expected 0x%x\n", - test->extension, flags, test->flags); - - type_returned = (void *)0xdeadbeef; - perceived = 0xdeadbeef; - flags = 0xdeadbeef; - - hr = pAssocGetPerceivedType(extension, &perceived, &flags, &type_returned); - expect_hr(type_expected ? S_OK : test->hr, hr); - ok(perceived == test->perceived, "%s: got perceived 0x%x, expected 0x%x\n", - test->extension, perceived, test->perceived); - ok(flags == test->flags, "%s: got flags 0x%x, expected 0x%x\n", - test->extension, flags, test->flags); - - if (!type_expected) - { - ok(type_returned == (void *)0xdeadbeef || broken(type_returned == NULL) /* Win 8 */, - "%s: got type %p, expected 0xdeadbeef\n", test->extension, type_returned); - } - else if (type_returned == (void *)0xdeadbeef) - { - ok(type_returned != (void *)0xdeadbeef, "%s: got type %p, expected '%s'\n", - test->extension, type_returned, test->type); - } - else - { - ok(StrCmpIW(type_expected, type_returned) == 0, "%s: got type %s, expected '%s'\n", - test->extension, wine_dbgstr_w(type_returned), test->type); - } - - CoTaskMemFree(type_returned); - CoTaskMemFree(extension); - CoTaskMemFree(type_expected); -} - -static void test_assoc_perceived(void) -{ - static const struct assoc_test_struct should_not_exist = - { ".should_not_exist", PERCEIVED_TYPE_UNSPECIFIED, PERCEIVEDFLAG_UNDEFINED, NULL, 0, 0x80070002 }; - static const struct assoc_test_struct htm[] = - { - { ".htm", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x600 }, - { ".html", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x600 }, - }; - static const struct assoc_test_struct mp2 = - { ".mp2", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }; - - OSVERSIONINFOEXW osvi; - DWORD version; - size_t i; - - if (!pAssocGetPerceivedType) - { - win_skip("AssocGetPerceivedType() is missing\n"); - return; - } - - memset(&osvi, 0, sizeof(osvi)); - osvi.dwOSVersionInfoSize = sizeof(osvi); - GetVersionExW((LPOSVERSIONINFOW)&osvi); - version = (osvi.dwMajorVersion << 8) | osvi.dwMinorVersion; - - /* invalid entry results in HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) */ - test_assoc_one(&should_not_exist); - - for (i = 0; i < sizeof(assoc_perceived_types) / sizeof(assoc_perceived_types[0]); ++i) - { - if (assoc_perceived_types[i].minversion && assoc_perceived_types[i].minversion > version) - continue; - if (!(assoc_perceived_types[i].flags & PERCEIVEDFLAG_HARDCODED)) - todo_wine test_assoc_one(&assoc_perceived_types[i]); - else - test_assoc_one(&assoc_perceived_types[i]); - } - - /* below Vista */ - if (version < 0x600) - { - todo_wine - test_assoc_one(&htm[0]); - todo_wine - test_assoc_one(&htm[1]); - } - - /* below Win8 */ - if (version < 0x602) - { - test_assoc_one(&mp2); - } -} - START_TEST(assoc) { HMODULE hshlwapi; @@ -587,11 +309,9 @@ START_TEST(assoc) pAssocQueryStringA = (void*)GetProcAddress(hshlwapi, "AssocQueryStringA"); pAssocQueryStringW = (void*)GetProcAddress(hshlwapi, "AssocQueryStringW"); pAssocCreate = (void*)GetProcAddress(hshlwapi, "AssocCreate"); - pAssocGetPerceivedType = (void*)GetProcAddress(hshlwapi, "AssocGetPerceivedType"); test_getstring_bad(); test_getstring_basic(); test_getstring_no_extra(); test_assoc_create(); - test_assoc_perceived(); } diff --git a/modules/rostests/winetests/shlwapi/clist.c b/modules/rostests/winetests/shlwapi/clist.c index c621ffc912..8aee3956b4 100755 --- a/modules/rostests/winetests/shlwapi/clist.c +++ b/modules/rostests/winetests/shlwapi/clist.c @@ -212,7 +212,7 @@ static IStreamVtbl iclvt = static HMODULE SHLWAPI_hshlwapi = 0; static VOID (WINAPI *pSHLWAPI_19)(LPSHLWAPI_CLIST); -static BOOL (WINAPI *pSHLWAPI_20)(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); +static HRESULT (WINAPI *pSHLWAPI_20)(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); static BOOL (WINAPI *pSHLWAPI_21)(LPSHLWAPI_CLIST*,ULONG); static LPSHLWAPI_CLIST (WINAPI *pSHLWAPI_22)(LPSHLWAPI_CLIST,ULONG); static HRESULT (WINAPI *pSHLWAPI_17)(IStream*, SHLWAPI_CLIST*); @@ -286,7 +286,6 @@ static void test_CList(void) struct dummystream streamobj; LPSHLWAPI_CLIST list = NULL; LPCSHLWAPI_CLIST item = SHLWAPI_CLIST_items; - BOOL bRet; HRESULT hRet; LPSHLWAPI_CLIST inserted; BYTE buff[64]; @@ -307,10 +306,10 @@ static void test_CList(void) buff[sizeof(SHLWAPI_CLIST)+i] = i*2; /* Add it */ - bRet = pSHLWAPI_20(&list, inserted); - ok(bRet == TRUE, "failed list add\n"); + hRet = pSHLWAPI_20(&list, inserted); + ok(hRet > S_OK, "failed list add\n"); - if (bRet == TRUE) + if (hRet > S_OK) { ok(list && list->ulSize, "item not added\n"); @@ -385,8 +384,11 @@ static void test_CList(void) inserted = (LPSHLWAPI_CLIST)buff; inserted->ulSize = sizeof(SHLWAPI_CLIST) -1; inserted->ulId = 33; - bRet = pSHLWAPI_20(&list, inserted); - ok(bRet == FALSE, "Expected failure\n"); + + /* The call succeeds but the item is not inserted, except on some early + * versions which return failure. Wine behaves like later versions. + */ + pSHLWAPI_20(&list, inserted); inserted = pSHLWAPI_22(list, 33); ok(inserted == NULL, "inserted bad element size\n"); @@ -394,8 +396,9 @@ static void test_CList(void) inserted = (LPSHLWAPI_CLIST)buff; inserted->ulSize = 44; inserted->ulId = ~0U; - bRet = pSHLWAPI_20(&list, inserted); - ok(bRet == FALSE, "Expected failure\n"); + + /* See comment above, some early versions fail this call */ + pSHLWAPI_20(&list, inserted); item = SHLWAPI_CLIST_items; diff --git a/modules/rostests/winetests/shlwapi/istream.c b/modules/rostests/winetests/shlwapi/istream.c index 134a74c32e..ce7c7c57db 100644 --- a/modules/rostests/winetests/shlwapi/istream.c +++ b/modules/rostests/winetests/shlwapi/istream.c @@ -654,8 +654,10 @@ static void test_SHCreateStreamOnFileEx_CopyTo(void) static const WCHAR prefix[] = { 'T', 'S', 'T', 0 }; GetTempPathW(MAX_PATH, tmpPath); - GetTempFileNameW(tmpPath, prefix, 0, srcFileName); - GetTempFileNameW(tmpPath, prefix, 0, dstFileName); + ret = GetTempFileNameW(tmpPath, prefix, 0, srcFileName); + ok(ret != 0, "GetTempFileName failed, got error %d\n", GetLastError()); + ret = GetTempFileNameW(tmpPath, prefix, 0, dstFileName); + ok(ret != 0, "GetTempFileName failed, got error %d\n", GetLastError()); ret = SHCreateStreamOnFileEx(srcFileName, STGM_CREATE | STGM_READWRITE | STGM_DELETEONRELEASE, FILE_ATTRIBUTE_TEMPORARY, FALSE, NULL, &src); ok(SUCCEEDED(ret), "SHCreateStreamOnFileEx failed with ret=0x%08x\n", ret); diff --git a/modules/rostests/winetests/shlwapi/ordinal.c b/modules/rostests/winetests/shlwapi/ordinal.c index 3cc8856e77..5cb9ce05fe 100755 --- a/modules/rostests/winetests/shlwapi/ordinal.c +++ b/modules/rostests/winetests/shlwapi/ordinal.c @@ -556,6 +556,7 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem) SetLastError(0xdeadbeef); hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0); ok(hmem2 == NULL, "expected NULL, got new handle\n"); +todo_wine ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError()); hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0); diff --git a/modules/rostests/winetests/shlwapi/path.c b/modules/rostests/winetests/shlwapi/path.c index d025dbf6a2..6edafc6f9f 100755 --- a/modules/rostests/winetests/shlwapi/path.c +++ b/modules/rostests/winetests/shlwapi/path.c @@ -1421,6 +1421,11 @@ static void test_PathGetDriveNumber(void) static const CHAR test2A[] = "file:////b:\\test.file"; static const CHAR test3A[] = "file:///c:\\test.file"; static const CHAR test4A[] = "file:\\\\c:\\test.file"; + static const CHAR test5A[] = "\\\\?\\C:\\dir\\file.txt"; + static const WCHAR test1W[] = + {'a',':','\\',0}; + static const WCHAR test5W[] = + {'\\','\\','?','\\','C',':','\\','d','i','r','\\','f','i','l','e',0}; int ret; SetLastError(0xdeadbeef); @@ -1430,12 +1435,19 @@ static void test_PathGetDriveNumber(void) ret = PathGetDriveNumberA(test1A); ok(ret == 0, "got %d\n", ret); + ret = PathGetDriveNumberW(test1W); + ok(ret == 0, "got %d\n", ret); ret = PathGetDriveNumberA(test2A); ok(ret == -1, "got %d\n", ret); ret = PathGetDriveNumberA(test3A); ok(ret == -1, "got %d\n", ret); ret = PathGetDriveNumberA(test4A); ok(ret == -1, "got %d\n", ret); + + ret = PathGetDriveNumberA(test5A); + ok(ret == -1, "got %d\n", ret); + ret = PathGetDriveNumberW(test5W); + ok(ret == 2 || broken(ret == -1) /* winxp */, "got = %d\n", ret); } static void test_PathUnExpandEnvStrings(void) diff --git a/modules/rostests/winetests/shlwapi/url.c b/modules/rostests/winetests/shlwapi/url.c index 1e7679f339..44d70ff410 100644 --- a/modules/rostests/winetests/shlwapi/url.c +++ b/modules/rostests/winetests/shlwapi/url.c @@ -197,15 +197,7 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { {"///A/../B", URL_WININET_COMPATIBILITY, S_OK, "///B", FALSE}, {"A", 0, S_OK, "A", FALSE}, {"../A", 0, S_OK, "../A", FALSE}, - {".\\A", 0, S_OK, ".\\A", FALSE}, - {"A\\.\\B", 0, S_OK, "A\\.\\B", FALSE}, {"A/../B", 0, S_OK, "B", TRUE}, - {"A/../B/./../C", 0, S_OK, "C", TRUE}, - {"A/../B/./../C", URL_DONT_SIMPLIFY, S_OK, "A/../B/./../C", FALSE}, - {".", 0, S_OK, "/", TRUE}, - {"./A", 0, S_OK, "A", TRUE}, - {"A/./B", 0, S_OK, "A/B", TRUE}, - {"/:test\\", 0, S_OK, "/:test\\", TRUE}, {"/uri-res/N2R?urn:sha1:B3K", URL_DONT_ESCAPE_EXTRA_INFO | URL_WININET_COMPATIBILITY /*0x82000000*/, S_OK, "/uri-res/N2R?urn:sha1:B3K", FALSE} /*LimeWire online installer calls this*/, {"http:www.winehq.org/dir/../index.html", 0, S_OK, "http:www.winehq.org/index.html"}, {"
http://localhost/test.html
", URL_FILE_USE_PATHURL, S_OK, "
http://localhost/test.html
"}, @@ -359,7 +351,6 @@ typedef struct _TEST_URL_COMBINE { DWORD flags; HRESULT expectret; const char *expecturl; - BOOL todo; } TEST_URL_COMBINE; static const TEST_URL_COMBINE TEST_COMBINE[] = { @@ -381,15 +372,6 @@ static const TEST_URL_COMBINE TEST_COMBINE[] = { {"
http://www.winehq.org/test14#aaa/bbb#ccc
", "#", 0, S_OK, "
http://www.winehq.org/test14#
"}, {"
http://www.winehq.org/tests/?query=x/y/z
", "tests15", 0, S_OK, "
http://www.winehq.org/tests/tests15
"}, {"
http://www.winehq.org/tests/?query=x/y/z#example
", "tests16", 0, S_OK, "
http://www.winehq.org/tests/tests16
"}, - {"
http://www.winehq.org/tests17
", ".", 0, S_OK, "
http://www.winehq.org/
"}, - {"
http://www.winehq.org/tests18/test
", ".", 0, S_OK, "
http://www.winehq.org/tests18/
"}, - {"
http://www.winehq.org/tests19/test
", "./", 0, S_OK, "
http://www.winehq.org/tests19/
", FALSE}, - {"
http://www.winehq.org/tests20/test
", "/", 0, S_OK, "
http://www.winehq.org/
", FALSE}, - {"
http://www.winehq.org/tests/test
", "./test21", 0, S_OK, "
http://www.winehq.org/tests/test21
", FALSE}, - {"
http://www.winehq.org/tests/test
", "./test22/../test", 0, S_OK, "
http://www.winehq.org/tests/test
", FALSE}, - {"
http://www.winehq.org/tests/
", "
http://www.winehq.org:80/tests23
", 0, S_OK, "
http://www.winehq.org/tests23
", TRUE}, - {"
http://www.winehq.org/tests/
", "tests24/./test/../test", 0, S_OK, "
http://www.winehq.org/tests/tests24/test
", FALSE}, - {"
http://www.winehq.org/tests/./tests25
", "./", 0, S_OK, "
http://www.winehq.org/tests/
", FALSE}, {"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/test.txt"}, {"file:///C:\\dir\\file.txt#hash\\hash", "test.txt", 0, S_OK, "file:///C:/dir/file.txt#hash/test.txt"}, {"file:///C:\\dir\\file.html#hash\\hash", "test.html", 0, S_OK, "file:///C:/dir/test.html"}, @@ -1208,7 +1190,7 @@ static void test_UrlCanonicalizeW(void) /* ########################### */ -static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFlags, HRESULT dwExpectReturn, const char *szExpectUrl, BOOL todo) +static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFlags, HRESULT dwExpectReturn, const char *szExpectUrl) { HRESULT hr; CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; @@ -1233,42 +1215,34 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla dwSize = 0; hr = pUrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags); ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); dwSize--; hr = pUrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); ok(hr == E_POINTER, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); hr = pUrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); ok(hr == dwExpectReturn, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn); - - if (todo) - { - todo_wine ok(dwSize == dwExpectLen && (FAILED(hr) || strcmp(szReturnUrl, szExpectUrl)==0), - "Expected %s (len=%d), but got %s (len=%d)\n", szExpectUrl, dwExpectLen, SUCCEEDED(hr) ? szReturnUrl : "(null)", dwSize); - } - else - { - ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); - if (SUCCEEDED(hr)) - ok(strcmp(szReturnUrl, szExpectUrl)==0, "Expected %s, but got %s\n", szExpectUrl, szReturnUrl); + ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); + if(SUCCEEDED(hr)) { + ok(strcmp(szReturnUrl,szExpectUrl)==0, "Expected %s, but got %s\n", szExpectUrl, szReturnUrl); } if (pUrlCombineW) { dwSize = 0; hr = pUrlCombineW(wszUrl1, wszUrl2, NULL, &dwSize, dwFlags); ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); dwSize--; hr = pUrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags); ok(hr == E_POINTER, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); hr = pUrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags); ok(hr == dwExpectReturn, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn); - ok(todo || dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); + ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); if(SUCCEEDED(hr)) { wszConvertedUrl = GetWideString(szReturnUrl); ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ascii and unicode UrlCombine!\n"); @@ -1288,7 +1262,7 @@ static void test_UrlCombine(void) unsigned int i; for(i=0; i<sizeof(TEST_COMBINE)/sizeof(TEST_COMBINE[0]); i++) { test_url_combine(TEST_COMBINE[i].url1, TEST_COMBINE[i].url2, TEST_COMBINE[i].flags, - TEST_COMBINE[i].expectret, TEST_COMBINE[i].expecturl, TEST_COMBINE[i].todo); + TEST_COMBINE[i].expectret, TEST_COMBINE[i].expecturl); } } @@ -1502,6 +1476,7 @@ static const struct parse_url_test_t { {"
ab-://www.winehq.org/
",S_OK,3,URL_SCHEME_UNKNOWN}, {"
http://www.winehq.org/
",URL_E_INVALID_SYNTAX}, {"
HTTP://www.winehq.org/
",S_OK,4,URL_SCHEME_HTTP}, + {"
a+-.://www.winehq.org/
",S_OK,4,URL_SCHEME_UNKNOWN}, }; static void test_ParseURL(void)
6 years, 11 months
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
38
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
Results per page:
10
25
50
100
200