[WBEMPROX] Sync with Wine 3.0. CORE-14225

This commit is contained in:
Amine Khaldi 2018-01-20 13:47:34 +01:00
parent b99f0b4922
commit 7e99651d65
4 changed files with 241 additions and 287 deletions

View file

@ -136,10 +136,6 @@ static const WCHAR prop_codesetW[] =
{'C','o','d','e','S','e','t',0}; {'C','o','d','e','S','e','t',0};
static const WCHAR prop_commandlineW[] = static const WCHAR prop_commandlineW[] =
{'C','o','m','m','a','n','d','L','i','n','e',0}; {'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[] = static const WCHAR prop_countrycodeW[] =
{'C','o','u','n','t','r','y','C','o','d','e',0}; {'C','o','u','n','t','r','y','C','o','d','e',0};
static const WCHAR prop_cpustatusW[] = 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}; {'D','o','m','a','i','n','R','o','l','e',0};
static const WCHAR prop_driveW[] = static const WCHAR prop_driveW[] =
{'D','r','i','v','e',0}; {'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[] = static const WCHAR prop_drivernameW[] =
{'D','r','i','v','e','r','N','a','m','e',0}; {'D','r','i','v','e','r','N','a','m','e',0};
#ifndef __REACTOS__ #ifndef __REACTOS__
@ -212,8 +204,6 @@ static const WCHAR prop_flavorW[] =
{'F','l','a','v','o','r',0}; {'F','l','a','v','o','r',0};
static const WCHAR prop_freespaceW[] = static const WCHAR prop_freespaceW[] =
{'F','r','e','e','S','p','a','c','e',0}; {'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[] = static const WCHAR prop_handleW[] =
{'H','a','n','d','l','e',0}; {'H','a','n','d','l','e',0};
static const WCHAR prop_horizontalresolutionW[] = static const WCHAR prop_horizontalresolutionW[] =
@ -228,10 +218,6 @@ static const WCHAR prop_indexW[] =
{'I','n','d','e','x',0}; {'I','n','d','e','x',0};
static const WCHAR prop_installdateW[] = static const WCHAR prop_installdateW[] =
{'I','n','s','t','a','l','l','D','a','t','e',0}; {'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[] = static const WCHAR prop_interfaceindexW[] =
{'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0}; {'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0};
static const WCHAR prop_interfacetypeW[] = 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}; {'L','o','c','a','l','D','a','t','e','T','i','m','e',0};
static const WCHAR prop_localeW[] = static const WCHAR prop_localeW[] =
{'L','o','c','a','l','e',0}; {'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[] = static const WCHAR prop_lockpresentW[] =
{'L','o','c','k','P','r','e','s','e','n','t',0}; {'L','o','c','k','P','r','e','s','e','n','t',0};
static const WCHAR prop_macaddressW[] = 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}; {'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[] = static const WCHAR prop_pnpdeviceidW[] =
{'P','N','P','D','e','v','i','c','e','I','D',0}; {'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[] = static const WCHAR prop_pprocessidW[] =
{'P','a','r','e','n','t','P','r','o','c','e','s','s','I','D',0}; {'P','a','r','e','n','t','P','r','o','c','e','s','s','I','D',0};
static const WCHAR prop_primaryW[] = 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}; {'S','t','a','r','t','i','n','g','O','f','f','s','e','t',0};
static const WCHAR prop_stateW[] = static const WCHAR prop_stateW[] =
{'S','t','a','t','e',0}; {'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[] = static const WCHAR prop_statusinfoW[] =
{'S','t','a','t','u','s','I','n','f','o',0}; {'S','t','a','t','u','s','I','n','f','o',0};
static const WCHAR prop_strvalueW[] = 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}; {'V','a','r','i','a','n','t','T','y','p','e',0};
static const WCHAR prop_versionW[] = static const WCHAR prop_versionW[] =
{'V','e','r','s','i','o','n',0}; {'V','e','r','s','i','o','n',0};
static const WCHAR prop_vendorW[] =
{'V','e','n','d','o','r',0};
#ifndef __REACTOS__ #ifndef __REACTOS__
static const WCHAR prop_videoarchitectureW[] = static const WCHAR prop_videoarchitectureW[] =
{'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0}; {'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[] = static const struct column col_compsysproduct[] =
{ {
{ prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY }, { prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY },
{ prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC }
{ prop_vendorW, CIM_STRING },
}; };
static const struct column col_datafile[] = static const struct column col_datafile[] =
{ {
@ -554,7 +529,6 @@ static const struct column col_os[] =
{ prop_systemdirectoryW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_systemdirectoryW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_totalvirtualmemorysizeW, CIM_UINT64 }, { prop_totalvirtualmemorysizeW, CIM_UINT64 },
{ prop_totalvisiblememorysizeW, CIM_UINT64 }, { prop_totalvisiblememorysizeW, CIM_UINT64 },
{ prop_freephysicalmemoryW, CIM_UINT64 },
{ prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC } { prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC }
}; };
static const struct column col_param[] = static const struct column col_param[] =
@ -584,10 +558,7 @@ static const struct column col_printer[] =
{ prop_horizontalresolutionW, CIM_UINT32 }, { prop_horizontalresolutionW, CIM_UINT32 },
{ prop_localW, CIM_BOOLEAN }, { prop_localW, CIM_BOOLEAN },
{ prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_networkW, CIM_BOOLEAN }, { 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 },
}; };
static const struct column col_process[] = static const struct column col_process[] =
{ {
@ -693,7 +664,6 @@ static const struct column col_videocontroller[] =
{ prop_adapterramW, CIM_UINT32, VT_I4 }, { prop_adapterramW, CIM_UINT32, VT_I4 },
{ prop_availabilityW, CIM_UINT16 }, { prop_availabilityW, CIM_UINT16 },
{ prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_configmanagererrorcodeW, CIM_UINT32, VT_I4 },
{ prop_currentbitsperpixelW, CIM_UINT32, VT_I4 }, { prop_currentbitsperpixelW, CIM_UINT32, VT_I4 },
{ prop_currenthorizontalresW, CIM_UINT32, VT_I4 }, { prop_currenthorizontalresW, CIM_UINT32, VT_I4 },
{ prop_currentrefreshrateW, CIM_UINT32, VT_I4 }, { prop_currentrefreshrateW, CIM_UINT32, VT_I4 },
@ -701,16 +671,13 @@ static const struct column col_videocontroller[] =
{ prop_currentverticalresW, CIM_UINT32, VT_I4 }, { prop_currentverticalresW, CIM_UINT32, VT_I4 },
{ prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_deviceidW, CIM_STRING|COL_FLAG_KEY }, { prop_deviceidW, CIM_STRING|COL_FLAG_KEY },
{ prop_driverdateW, CIM_DATETIME },
{ prop_driverversionW, CIM_STRING }, { prop_driverversionW, CIM_STRING },
{ prop_installeddisplaydriversW,CIM_STRING },
{ prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_statusW, CIM_STRING },
{ prop_videoarchitectureW, CIM_UINT16, VT_I4 }, { prop_videoarchitectureW, CIM_UINT16, VT_I4 },
{ prop_videomemorytypeW, CIM_UINT16, VT_I4 }, { prop_videomemorytypeW, CIM_UINT16, VT_I4 },
{ prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC }
}; };
#endif #endif
@ -758,8 +725,6 @@ static const WCHAR compsysproduct_identifyingnumberW[] =
static const WCHAR compsysproduct_uuidW[] = 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','-','d','e','a','d','-','d','e','a','d','-',
'd','e','a','d','d','e','a','d','d','e','a','d',0}; '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[] = static const WCHAR diskdrive_interfacetypeW[] =
{'I','D','E',0}; {'I','D','E',0};
static const WCHAR diskdrive_manufacturerW[] = 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}; {'I','n','t','e','g','r','a','t','e','d',' ','R','A','M','D','A','C',0};
static const WCHAR videocontroller_deviceidW[] = static const WCHAR videocontroller_deviceidW[] =
{'V','i','d','e','o','C','o','n','t','r','o','l','l','e','r','1',0}; {'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[] = static const WCHAR videocontroller_driverversionW[] =
{'1','.','0',0}; {'1','.','0',0};
static const WCHAR videocontroller_statusW[] =
{'O','K',0};
#endif #endif
#include "pshpack1.h" #include "pshpack1.h"
@ -856,7 +817,6 @@ struct record_computersystemproduct
{ {
const WCHAR *identifyingnumber; const WCHAR *identifyingnumber;
const WCHAR *uuid; const WCHAR *uuid;
const WCHAR *vendor;
}; };
struct record_datafile struct record_datafile
{ {
@ -964,7 +924,6 @@ struct record_operatingsystem
const WCHAR *systemdirectory; const WCHAR *systemdirectory;
UINT64 totalvirtualmemorysize; UINT64 totalvirtualmemorysize;
UINT64 totalvisiblememorysize; UINT64 totalvisiblememorysize;
UINT64 freephysicalmemory;
const WCHAR *version; const WCHAR *version;
}; };
struct record_param struct record_param
@ -995,9 +954,6 @@ struct record_printer
int local; int local;
const WCHAR *name; const WCHAR *name;
int network; int network;
const WCHAR *device_id;
const WCHAR *portname;
const WCHAR *location;
}; };
struct record_process struct record_process
{ {
@ -1101,7 +1057,6 @@ struct record_videocontroller
UINT32 adapter_ram; UINT32 adapter_ram;
UINT16 availability; UINT16 availability;
const WCHAR *caption; const WCHAR *caption;
UINT32 config_errorcode;
UINT32 current_bitsperpixel; UINT32 current_bitsperpixel;
UINT32 current_horizontalres; UINT32 current_horizontalres;
UINT32 current_refreshrate; UINT32 current_refreshrate;
@ -1109,12 +1064,9 @@ struct record_videocontroller
UINT32 current_verticalres; UINT32 current_verticalres;
const WCHAR *description; const WCHAR *description;
const WCHAR *device_id; const WCHAR *device_id;
const WCHAR *driverdate;
const WCHAR *driverversion; const WCHAR *driverversion;
const WCHAR *installeddriver;
const WCHAR *name; const WCHAR *name;
const WCHAR *pnpdevice_id; const WCHAR *pnpdevice_id;
const WCHAR *status;
UINT16 videoarchitecture; UINT16 videoarchitecture;
UINT16 videomemorytype; UINT16 videomemorytype;
const WCHAR *videomodedescription; const WCHAR *videomodedescription;
@ -1338,15 +1290,6 @@ static UINT64 get_total_physical_memory(void)
return status.ullTotalPhys; 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) static WCHAR *get_computername(void)
{ {
WCHAR *ret; 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 = (struct record_computersystemproduct *)table->data;
rec->identifyingnumber = compsysproduct_identifyingnumberW; rec->identifyingnumber = compsysproduct_identifyingnumberW;
rec->uuid = get_compsysproduct_uuid(); rec->uuid = get_compsysproduct_uuid();
rec->vendor = compsysproduct_vendorW;
if (!match_row( table, row, cond, &status )) free_row_values( table, row ); if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++; else row++;
@ -2114,7 +2056,7 @@ static enum fill_status fill_ip4routetable( struct table *table, const struct ex
heap_free( forwards ); heap_free( forwards );
return FILL_STATUS_FAILED; 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 ); heap_free( forwards );
return FILL_STATUS_FAILED; 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 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; struct record_printer *rec;
enum fill_status status = FILL_STATUS_UNFILTERED; enum fill_status status = FILL_STATUS_UNFILTERED;
PRINTER_INFO_2W *info; PRINTER_INFO_2W *info;
DWORD i, offset = 0, count = 0, size = 0, num_rows = 0; DWORD i, offset = 0, count = 0, size = 0, num_rows = 0;
WCHAR id[20];
EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &size, &count ); EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &size, &count );
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) return FILL_STATUS_FAILED; 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->local = -1;
rec->name = heap_strdupW( info[i].pPrinterName ); rec->name = heap_strdupW( info[i].pPrinterName );
rec->network = 0; 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 )) if (!match_row( table, i, cond, &status ))
{ {
free_row_values( table, i ); 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->systemdirectory = get_systemdirectory();
rec->totalvirtualmemorysize = get_total_physical_memory() / 1024; rec->totalvirtualmemorysize = get_total_physical_memory() / 1024;
rec->totalvisiblememorysize = rec->totalvirtualmemorysize; rec->totalvisiblememorysize = rec->totalvirtualmemorysize;
rec->freephysicalmemory = get_available_physical_memory() / 1024;
rec->version = get_osversion( &ver ); rec->version = get_osversion( &ver );
if (!match_row( table, row, cond, &status )) free_row_values( table, row ); if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++; else row++;
@ -3225,29 +3160,6 @@ static WCHAR *get_pnpdeviceid( DXGI_ADAPTER_DESC *desc )
return ret; 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 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}; 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_dactype = videocontroller_dactypeW;
rec->adapter_ram = vidmem; rec->adapter_ram = vidmem;
rec->availability = 3; /* Running or Full Power */ rec->availability = 3; /* Running or Full Power */
rec->config_errorcode = 0; /* no error */
rec->caption = heap_strdupW( name ); rec->caption = heap_strdupW( name );
rec->current_bitsperpixel = get_bits_per_pixel( &hres, &vres ); rec->current_bitsperpixel = get_bits_per_pixel( &hres, &vres );
rec->current_horizontalres = hres; rec->current_horizontalres = hres;
@ -3291,12 +3202,9 @@ done:
rec->current_verticalres = vres; rec->current_verticalres = vres;
rec->description = heap_strdupW( name ); rec->description = heap_strdupW( name );
rec->device_id = videocontroller_deviceidW; rec->device_id = videocontroller_deviceidW;
rec->driverdate = videocontroller_driverDateW;
rec->driverversion = videocontroller_driverversionW; rec->driverversion = videocontroller_driverversionW;
rec->installeddriver = get_video_driver( desc.VendorId );
rec->name = heap_strdupW( name ); rec->name = heap_strdupW( name );
rec->pnpdevice_id = get_pnpdeviceid( &desc ); rec->pnpdevice_id = get_pnpdeviceid( &desc );
rec->status = videocontroller_statusW;
rec->videoarchitecture = 2; /* Unknown */ rec->videoarchitecture = 2; /* Unknown */
rec->videomemorytype = 2; /* Unknown */ rec->videomemorytype = 2; /* Unknown */
wsprintfW( mode, fmtW, hres, vres, (UINT64)1 << rec->current_bitsperpixel ); wsprintfW( mode, fmtW, hres, vres, (UINT64)1 << rec->current_bitsperpixel );

View file

@ -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 /* Bison implementation for Yacc-like parsers in C
@ -44,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "3.0.2" #define YYBISON_VERSION "3.0"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
@ -243,13 +243,13 @@ static int wql_lex( void *val, struct parser *parser );
result = current_view 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 # if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULLPTR nullptr # define YY_NULL nullptr
# else # else
# define YY_NULLPTR 0 # define YY_NULL 0
# endif # endif
# endif # endif
@ -261,7 +261,10 @@ static int wql_lex( void *val, struct parser *parser );
# define YYERROR_VERBOSE 1 # define YYERROR_VERBOSE 1
#endif #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. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 0 # define YYDEBUG 0
@ -312,7 +315,7 @@ extern int wql_debug;
typedef union YYSTYPE YYSTYPE; typedef union YYSTYPE YYSTYPE;
union 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; struct string str;
WCHAR *string; WCHAR *string;
@ -321,7 +324,7 @@ union YYSTYPE
struct expr *expr; struct expr *expr;
int integer; 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_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
@ -331,11 +334,11 @@ union YYSTYPE
int wql_parse (struct parser *ctx); 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. */ /* 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 #ifdef short
# undef short # undef short
@ -392,30 +395,11 @@ typedef short int yytype_int16;
# endif # endif
#endif #endif
#ifndef YY_ATTRIBUTE #ifndef __attribute__
# if (defined __GNUC__ \ /* This feature is available in gcc versions 2.5 and later. */
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ # if (! defined __GNUC__ || __GNUC__ < 2 \
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
# define YY_ATTRIBUTE(Spec) __attribute__(Spec) # define __attribute__(Spec) /* empty */
# 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__))
# endif # endif
#endif #endif
@ -577,16 +561,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 9 #define YYFINAL 9
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 68 #define YYLAST 85
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 32 #define YYNTOKENS 32
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 10 #define YYNNTS 10
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 36 #define YYNRULES 40
/* YYNSTATES -- Number of states. */ /* YYNSTATES -- Number of states. */
#define YYNSTATES 67 #define YYNSTATES 74
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */ 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. */ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] = static const yytype_uint16 yyrline[] =
{ {
0, 221, 221, 233, 245, 260, 261, 265, 272, 278, 0, 209, 209, 221, 233, 248, 249, 253, 260, 266,
287, 296, 303, 309, 315, 321, 327, 333, 339, 345, 275, 284, 291, 297, 303, 309, 315, 321, 327, 333,
351, 357, 363, 369, 375, 381, 387, 393, 399, 405, 339, 345, 351, 357, 363, 369, 375, 381, 387, 393,
411, 420, 429, 438, 444, 450, 456 399, 405, 411, 417, 423, 432, 441, 450, 456, 462,
468
}; };
#endif #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_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", "TK_EQ", "TK_NE", "TK_LT", "TK_GT", "TK_LE", "TK_GE", "TK_LIKE",
"$accept", "select", "proplist", "prop", "id", "number", "expr", "$accept", "select", "proplist", "prop", "id", "number", "expr",
"string_val", "prop_val", "const_val", YY_NULLPTR "string_val", "prop_val", "const_val", YY_NULL
}; };
#endif #endif
@ -669,10 +654,10 @@ static const yytype_uint16 yytoknum[] =
}; };
# endif # endif
#define YYPACT_NINF -18 #define YYPACT_NINF -23
#define yypact_value_is_default(Yystate) \ #define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-18))) (!!((Yystate) == (-23)))
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
@ -683,13 +668,14 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */ STATE-NUM. */
static const yytype_int8 yypact[] = static const yytype_int8 yypact[] =
{ {
7, 3, 12, -5, -18, -18, 24, 29, 35, -18, -2, 10, 34, 14, -23, -23, 29, 48, 46, -23,
-18, -5, 4, -5, 21, -18, -18, 17, 17, -18, -23, 14, 11, 14, 42, -23, -23, 28, 28, -16,
-18, -18, -18, 17, -18, -18, 11, -8, 25, 22, -23, -23, -23, -23, 28, -23, -23, 22, -8, -22,
-18, 17, 17, 16, -9, -9, -9, -9, -9, -9, 33, 14, 14, -23, 28, 28, 27, 50, 54, 59,
23, -5, -5, -5, -5, -5, -5, -18, 45, -18, 59, 59, 59, 39, 14, 14, 14, 14, 14, 14,
-18, 37, -18, -18, -18, -18, -18, -18, -18, -18, -23, -23, -23, 52, -23, -23, 58, -23, -23, -23,
-18, -18, -18, -18, -18, -18, -18 -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
-23, -23, -23, -23
}; };
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@ -698,24 +684,25 @@ static const yytype_int8 yypact[] =
static const yytype_uint8 yydefact[] = static const yytype_uint8 yydefact[] =
{ {
0, 0, 0, 0, 7, 10, 0, 5, 9, 1, 0, 0, 0, 0, 7, 10, 0, 5, 9, 1,
2, 0, 0, 0, 3, 6, 8, 0, 0, 36, 2, 0, 0, 0, 3, 6, 8, 0, 0, 0,
35, 11, 34, 0, 32, 33, 4, 0, 0, 0, 40, 39, 11, 38, 0, 36, 37, 4, 0, 0,
15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 12, 14, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 16, 21, 18, 17, 19, 20, 31, 28, 12, 32, 34, 14, 13, 29, 0, 31, 16, 33,
22, 27, 24, 23, 25, 26, 30 21, 18, 17, 19, 20, 35, 28, 22, 27, 24,
23, 25, 26, 30
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] = 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]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] = 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 /* 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. */ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] = static const yytype_uint8 yytable[] =
{ {
33, 29, 7, 19, 20, 21, 30, 3, 4, 4, 36, 1, 7, 44, 45, 46, 47, 48, 49, 31,
1, 22, 9, 7, 48, 49, 5, 34, 35, 36, 32, 51, 52, 7, 3, 4, 4, 37, 38, 39,
37, 38, 39, 40, 5, 5, 18, 50, 11, 19, 40, 41, 42, 43, 67, 68, 69, 70, 71, 72,
20, 21, 47, 31, 32, 12, 17, 22, 5, 10, 30, 5, 5, 11, 9, 5, 33, 18, 55, 19,
51, 23, 13, 58, 31, 32, 15, 14, 66, 16, 20, 21, 22, 50, 34, 35, 53, 54, 23, 5,
41, 42, 43, 44, 45, 46, 60, 61, 62, 63, 10, 56, 24, 13, 12, 34, 35, 17, 14, 65,
64, 65, 52, 53, 54, 55, 56, 57, 32 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, 8, 3, 1, 25, 26, 27, 28, 29, 30, 25,
3, 20, 0, 12, 31, 32, 21, 25, 26, 27, 26, 31, 32, 12, 4, 5, 5, 25, 26, 27,
28, 29, 30, 31, 21, 21, 9, 11, 4, 12, 28, 29, 30, 31, 44, 45, 46, 47, 48, 49,
13, 14, 10, 22, 23, 6, 15, 20, 21, 3, 18, 21, 21, 4, 0, 21, 24, 9, 11, 11,
24, 24, 7, 20, 22, 23, 12, 11, 11, 13, 12, 13, 14, 10, 22, 23, 34, 35, 20, 21,
25, 26, 27, 28, 29, 30, 41, 42, 43, 44, 3, 24, 24, 7, 6, 22, 23, 15, 11, 20,
45, 46, 34, 35, 36, 37, 38, 39, 23 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 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@ -748,12 +739,13 @@ static const yytype_uint8 yycheck[] =
static const yytype_uint8 yystos[] = static const yytype_uint8 yystos[] =
{ {
0, 3, 33, 4, 5, 21, 34, 35, 36, 0, 0, 3, 33, 4, 5, 21, 34, 35, 36, 0,
36, 4, 6, 7, 36, 34, 36, 15, 9, 12, 36, 4, 6, 7, 36, 34, 36, 15, 9, 11,
13, 14, 20, 24, 35, 37, 38, 40, 41, 38, 12, 13, 14, 20, 24, 35, 37, 38, 40, 41,
38, 22, 23, 8, 25, 26, 27, 28, 29, 30, 38, 25, 26, 38, 22, 23, 8, 25, 26, 27,
31, 25, 26, 27, 28, 29, 30, 10, 38, 38, 28, 29, 30, 31, 25, 26, 27, 28, 29, 30,
11, 24, 41, 41, 41, 41, 41, 41, 20, 39, 10, 40, 40, 38, 38, 11, 24, 11, 41, 11,
40, 40, 40, 40, 40, 40, 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. */ /* 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, 0, 32, 33, 33, 33, 34, 34, 34, 35, 35,
36, 37, 38, 38, 38, 38, 38, 38, 38, 38, 36, 37, 38, 38, 38, 38, 38, 38, 38, 38,
38, 38, 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. */ /* 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, 0, 2, 3, 4, 6, 1, 3, 1, 3, 1,
1, 1, 3, 3, 3, 2, 3, 3, 3, 3, 1, 1, 3, 3, 3, 2, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 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, yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken) 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; YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */ /* Internationalized format string. */
const char *yyformat = YY_NULLPTR; const char *yyformat = YY_NULL;
/* Arguments of yyformat. */ /* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per /* 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]; 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 if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM)) && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2; return 2;
@ -1454,7 +1448,7 @@ yyreduce:
switch (yyn) switch (yyn)
{ {
case 2: case 2:
#line 222 "wql.y" /* yacc.c:1646 */ #line 210 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
HRESULT hr; HRESULT hr;
struct parser *parser = ctx; struct parser *parser = ctx;
@ -1466,11 +1460,11 @@ yyreduce:
PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); 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; break;
case 3: case 3:
#line 234 "wql.y" /* yacc.c:1646 */ #line 222 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
HRESULT hr; HRESULT hr;
struct parser *parser = ctx; struct parser *parser = ctx;
@ -1482,11 +1476,11 @@ yyreduce:
PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); 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; break;
case 4: case 4:
#line 246 "wql.y" /* yacc.c:1646 */ #line 234 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
HRESULT hr; HRESULT hr;
struct parser *parser = ctx; struct parser *parser = ctx;
@ -1498,315 +1492,355 @@ yyreduce:
PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); 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; break;
case 6: 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); (yyvsp[-2].proplist)->next = (yyvsp[0].proplist);
} }
#line 1522 "wql.tab.c" /* yacc.c:1646 */ #line 1504 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 7: 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; (yyval.proplist) = NULL;
} }
#line 1530 "wql.tab.c" /* yacc.c:1646 */ #line 1512 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 8: 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) ); (yyval.proplist) = alloc_property( ctx, (yyvsp[-2].string), (yyvsp[0].string) );
if (!(yyval.proplist)) if (!(yyval.proplist))
YYABORT; YYABORT;
} }
#line 1540 "wql.tab.c" /* yacc.c:1646 */ #line 1522 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 9: 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) ); (yyval.proplist) = alloc_property( ctx, NULL, (yyvsp[0].string) );
if (!(yyval.proplist)) if (!(yyval.proplist))
YYABORT; YYABORT;
} }
#line 1550 "wql.tab.c" /* yacc.c:1646 */ #line 1532 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 10: 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) ); (yyval.string) = get_string( ctx, &(yyvsp[0].str) );
if (!(yyval.string)) if (!(yyval.string))
YYABORT; YYABORT;
} }
#line 1560 "wql.tab.c" /* yacc.c:1646 */ #line 1542 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 11: 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 ); (yyval.integer) = get_int( ctx );
} }
#line 1568 "wql.tab.c" /* yacc.c:1646 */ #line 1550 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 12: 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); (yyval.expr) = (yyvsp[-1].expr);
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1578 "wql.tab.c" /* yacc.c:1646 */ #line 1560 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 13: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_AND, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1588 "wql.tab.c" /* yacc.c:1646 */ #line 1570 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 14: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_OR, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1598 "wql.tab.c" /* yacc.c:1646 */ #line 1580 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 15: 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 ); (yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_NOT );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1608 "wql.tab.c" /* yacc.c:1646 */ #line 1590 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 16: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_EQ, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1618 "wql.tab.c" /* yacc.c:1646 */ #line 1600 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 17: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GT, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1628 "wql.tab.c" /* yacc.c:1646 */ #line 1610 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 18: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LT, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1638 "wql.tab.c" /* yacc.c:1646 */ #line 1620 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 19: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LE, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1648 "wql.tab.c" /* yacc.c:1646 */ #line 1630 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 20: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GE, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1658 "wql.tab.c" /* yacc.c:1646 */ #line 1640 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 21: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_NE, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1668 "wql.tab.c" /* yacc.c:1646 */ #line 1650 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 22: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_EQ, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1678 "wql.tab.c" /* yacc.c:1646 */ #line 1660 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 23: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GT, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1688 "wql.tab.c" /* yacc.c:1646 */ #line 1670 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 24: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LT, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1698 "wql.tab.c" /* yacc.c:1646 */ #line 1680 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 25: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LE, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1708 "wql.tab.c" /* yacc.c:1646 */ #line 1690 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 26: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GE, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1718 "wql.tab.c" /* yacc.c:1646 */ #line 1700 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 27: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_NE, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1728 "wql.tab.c" /* yacc.c:1646 */ #line 1710 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 28: 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) ); (yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LIKE, (yyvsp[0].expr) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1738 "wql.tab.c" /* yacc.c:1646 */ #line 1720 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 29: 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 ); (yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_ISNULL );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1748 "wql.tab.c" /* yacc.c:1646 */ #line 1730 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 30: 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 ); (yyval.expr) = expr_unary( ctx, (yyvsp[-3].expr), OP_NOTNULL );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1758 "wql.tab.c" /* yacc.c:1646 */ #line 1740 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 31: 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_unary( ctx, (yyvsp[-2].expr), OP_ISNULL );
if (!(yyval.expr))
YYABORT;
}
#line 1750 "wql.tab.c" /* yacc.c:1646 */
break;
case 32:
#line 412 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_ISNULL );
if (!(yyval.expr))
YYABORT;
}
#line 1760 "wql.tab.c" /* yacc.c:1646 */
break;
case 33:
#line 418 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_NOTNULL );
if (!(yyval.expr))
YYABORT;
}
#line 1770 "wql.tab.c" /* yacc.c:1646 */
break;
case 34:
#line 424 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_NOTNULL );
if (!(yyval.expr))
YYABORT;
}
#line 1780 "wql.tab.c" /* yacc.c:1646 */
break;
case 35:
#line 433 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
(yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1768 "wql.tab.c" /* yacc.c:1646 */ #line 1790 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 32: case 36:
#line 430 "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) ); (yyval.expr) = expr_propval( ctx, (yyvsp[0].proplist) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1778 "wql.tab.c" /* yacc.c:1646 */ #line 1800 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 33: case 37:
#line 439 "wql.y" /* yacc.c:1646 */ #line 451 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
(yyval.expr) = expr_ival( ctx, (yyvsp[0].integer) ); (yyval.expr) = expr_ival( ctx, (yyvsp[0].integer) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1788 "wql.tab.c" /* yacc.c:1646 */ #line 1810 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 34: case 38:
#line 445 "wql.y" /* yacc.c:1646 */ #line 457 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
(yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1798 "wql.tab.c" /* yacc.c:1646 */ #line 1820 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 35: case 39:
#line 451 "wql.y" /* yacc.c:1646 */ #line 463 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
(yyval.expr) = expr_bval( ctx, -1 ); (yyval.expr) = expr_bval( ctx, -1 );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1808 "wql.tab.c" /* yacc.c:1646 */ #line 1830 "wql.tab.c" /* yacc.c:1646 */
break; break;
case 36: case 40:
#line 457 "wql.y" /* yacc.c:1646 */ #line 469 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
{ {
(yyval.expr) = expr_bval( ctx, 0 ); (yyval.expr) = expr_bval( ctx, 0 );
if (!(yyval.expr)) if (!(yyval.expr))
YYABORT; YYABORT;
} }
#line 1818 "wql.tab.c" /* yacc.c:1646 */ #line 1840 "wql.tab.c" /* yacc.c:1646 */
break; break;
#line 1822 "wql.tab.c" /* yacc.c:1646 */ #line 1844 "wql.tab.c" /* yacc.c:1646 */
default: break; default: break;
} }
/* User semantic actions sometimes alter yychar, and that requires /* User semantic actions sometimes alter yychar, and that requires
@ -2034,7 +2068,7 @@ yyreturn:
#endif #endif
return yyresult; 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 ) HRESULT parse_query( const WCHAR *str, struct view **view, struct list *mem )

View file

@ -18,20 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * 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 "wbemprox_private.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
struct parser struct parser
{ {
const WCHAR *cmd; const WCHAR *cmd;
@ -414,6 +402,30 @@ expr:
if (!$$) if (!$$)
YYABORT; 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: string_val:

View file

@ -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/version # Synced to Wine-3.0
reactos/dll/win32/vssapi # Synced to WineStaging-2.9 reactos/dll/win32/vssapi # Synced to WineStaging-2.9
reactos/dll/win32/wbemdisp # Synced to Wine-3.0 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/windowscodecs # Synced to WineStaging-2.16
reactos/dll/win32/windowscodecsext # Synced to WineStaging-2.9 reactos/dll/win32/windowscodecsext # Synced to WineStaging-2.9
reactos/dll/win32/winemp3.acm # Synced to WineStaging-2.16 reactos/dll/win32/winemp3.acm # Synced to WineStaging-2.16