diff --git a/reactos/dll/win32/wbemprox/CMakeLists.txt b/reactos/dll/win32/wbemprox/CMakeLists.txt index ede7f423349..b9e676389de 100644 --- a/reactos/dll/win32/wbemprox/CMakeLists.txt +++ b/reactos/dll/win32/wbemprox/CMakeLists.txt @@ -14,6 +14,7 @@ list(APPEND SOURCE qualifier.c query.c reg.c + security.c service.c services.c table.c diff --git a/reactos/dll/win32/wbemprox/builtin.c b/reactos/dll/win32/wbemprox/builtin.c index b2369e710ac..787207161d7 100644 --- a/reactos/dll/win32/wbemprox/builtin.c +++ b/reactos/dll/win32/wbemprox/builtin.c @@ -69,6 +69,8 @@ static const WCHAR class_process_getowner_outW[] = 'N','E','R','_','O','U','T',0}; static const WCHAR class_processorW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0}; +static const WCHAR class_processor2W[] = + {'C','I','M','_','P','r','o','c','e','s','s','o','r',0}; static const WCHAR class_sounddeviceW[] = {'W','i','n','3','2','_','S','o','u','n','d','D','e','v','i','c','e',0}; static const WCHAR class_videocontrollerW[] = @@ -114,6 +116,8 @@ static const WCHAR prop_csdversionW[] = {'C','S','D','V','e','r','s','i','o','n',0}; static const WCHAR prop_currentbitsperpixelW[] = {'C','u','r','r','e','n','t','B','i','t','s','P','e','r','P','i','x','e','l',0}; +static const WCHAR prop_currentclockspeedW[] = + {'C','u','r','r','e','n','t','C','l','o','c','k','S','p','e','e','d',0}; static const WCHAR prop_currenthorizontalresW[] = {'C','u','r','r','e','n','t','H','o','r','i','z','o','n','t','a','l','R','e','s','o','l','u','t','i','o','n',0}; static const WCHAR prop_currentverticalresW[] = @@ -294,7 +298,7 @@ static const struct column col_compsys[] = { { prop_descriptionW, CIM_STRING }, { prop_domainW, CIM_STRING }, - { prop_domainroleW, CIM_UINT16 }, + { prop_domainroleW, CIM_UINT16, VT_I4 }, { prop_manufacturerW, CIM_STRING }, { prop_modelW, CIM_STRING }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, @@ -361,8 +365,8 @@ static const struct column col_networkadapter[] = }; static const struct column col_networkadapterconfig[] = { - { prop_indexW, CIM_UINT32|COL_FLAG_KEY }, - { prop_ipconnectionmetricW, CIM_UINT32 }, + { prop_indexW, CIM_UINT32|COL_FLAG_KEY, VT_I4 }, + { prop_ipconnectionmetricW, CIM_UINT32, VT_I4 }, { prop_ipenabledW, CIM_BOOLEAN }, { prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC } }; @@ -425,6 +429,7 @@ static const struct column col_processor[] = { { prop_addresswidthW, CIM_UINT16, VT_I4 }, { prop_cpustatusW, CIM_UINT16 }, + { prop_currentclockspeedW, CIM_UINT32, VT_I4 }, { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, { prop_familyW, CIM_UINT16, VT_I4 }, { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC }, @@ -473,14 +478,19 @@ static const struct column col_stdregprov[] = { method_enumvaluesW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }, { method_getstringvalueW, CIM_FLAG_ARRAY|COL_FLAG_METHOD } }; +static const struct column col_systemsecurity[] = +{ + { method_getsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }, + { method_setsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }, +}; static const struct column col_videocontroller[] = { { prop_adapterdactypeW, CIM_STRING }, { prop_adapterramW, CIM_UINT32, VT_I4 }, { prop_availabilityW, CIM_UINT16 }, - { prop_currentbitsperpixelW, CIM_UINT32 }, - { prop_currenthorizontalresW, CIM_UINT32 }, - { prop_currentverticalresW, CIM_UINT32 }, + { prop_currentbitsperpixelW, CIM_UINT32, VT_I4 }, + { prop_currenthorizontalresW, CIM_UINT32, VT_I4 }, + { prop_currentverticalresW, CIM_UINT32, VT_I4 }, { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_deviceidW, CIM_STRING|COL_FLAG_KEY }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, @@ -731,6 +741,7 @@ struct record_processor { UINT16 addresswidth; UINT16 cpu_status; + UINT32 currentclockspeed; const WCHAR *device_id; UINT16 family; const WCHAR *manufacturer; @@ -779,6 +790,11 @@ struct record_stdregprov class_method *enumvalues; class_method *getstringvalue; }; +struct record_systemsecurity +{ + class_method *getsd; + class_method *setsd; +}; struct record_videocontroller { const WCHAR *adapter_dactype; @@ -825,7 +841,11 @@ static const struct record_param data_param[] = { class_stdregprovW, method_getstringvalueW, 1, param_subkeynameW, CIM_STRING }, { class_stdregprovW, method_getstringvalueW, 1, param_valuenameW, CIM_STRING }, { class_stdregprovW, method_getstringvalueW, -1, param_returnvalueW, CIM_UINT32, VT_I4 }, - { class_stdregprovW, method_getstringvalueW, -1, param_valueW, CIM_STRING } + { class_stdregprovW, method_getstringvalueW, -1, param_valueW, CIM_STRING }, + { class_systemsecurityW, method_getsdW, -1, param_returnvalueW, CIM_UINT32, VT_I4 }, + { class_systemsecurityW, method_getsdW, -1, param_sdW, CIM_UINT8|CIM_FLAG_ARRAY }, + { class_systemsecurityW, method_setsdW, 1, param_sdW, CIM_UINT8|CIM_FLAG_ARRAY }, + { class_systemsecurityW, method_setsdW, -1, param_returnvalueW, CIM_UINT32, VT_I4 }, }; #define FLAVOR_ID (WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE | WBEM_FLAVOR_NOT_OVERRIDABLE |\ @@ -848,6 +868,10 @@ static const struct record_stdregprov data_stdregprov[] = { { reg_enum_key, reg_enum_values, reg_get_stringvalue } }; +static const struct record_systemsecurity data_systemsecurity[] = +{ + { security_get_sd, security_set_sd } +}; /* check if row matches condition and update status */ static BOOL match_row( const struct table *table, UINT row, const struct expr *cond, enum fill_status *status ) @@ -1949,7 +1973,7 @@ static void get_processor_name( WCHAR *name ) regs_to_str( regs, 16, name + 32 ); } } -static UINT get_processor_maxclockspeed( void ) +static UINT get_processor_currentclockspeed( UINT index ) { PROCESSOR_POWER_INFORMATION *info; UINT ret = 1000, size = get_processor_count() * sizeof(PROCESSOR_POWER_INFORMATION); @@ -1958,7 +1982,21 @@ static UINT get_processor_maxclockspeed( void ) if ((info = heap_alloc( size ))) { status = NtPowerInformation( ProcessorInformation, NULL, 0, info, size ); - if (!status) ret = info[0].MaxMhz; + if (!status) ret = info[index].CurrentMhz; + heap_free( info ); + } + return ret; +} +static UINT get_processor_maxclockspeed( UINT index ) +{ + PROCESSOR_POWER_INFORMATION *info; + UINT ret = 1000, size = get_processor_count() * sizeof(PROCESSOR_POWER_INFORMATION); + NTSTATUS status; + + if ((info = heap_alloc( size ))) + { + status = NtPowerInformation( ProcessorInformation, NULL, 0, info, size ); + if (!status) ret = info[index].MaxMhz; heap_free( info ); } return ret; @@ -1976,7 +2014,7 @@ static enum fill_status fill_processor( struct table *table, const struct expr * static const WCHAR fmtW[] = {'C','P','U','%','u',0}; WCHAR device_id[14], processor_id[17], manufacturer[13], name[49] = {0}; struct record_processor *rec; - UINT i, offset = 0, maxclockspeed, num_cores, num_logical_processors, count = get_processor_count(); + UINT i, offset = 0, num_cores, num_logical_processors, count = get_processor_count(); enum fill_status status = FILL_STATUS_UNFILTERED; if (!resize_table( table, count, sizeof(*rec) )) return FILL_STATUS_FAILED; @@ -1985,7 +2023,6 @@ static enum fill_status fill_processor( struct table *table, const struct expr * get_processor_manufacturer( manufacturer ); get_processor_name( name ); - maxclockspeed = get_processor_maxclockspeed(); num_logical_processors = get_logical_processor_count( &num_cores ) / count; num_cores /= count; @@ -1994,11 +2031,12 @@ static enum fill_status fill_processor( struct table *table, const struct expr * rec = (struct record_processor *)(table->data + offset); rec->addresswidth = get_osarchitecture() == os_32bitW ? 32 : 64; rec->cpu_status = 1; /* CPU Enabled */ + rec->currentclockspeed = get_processor_currentclockspeed( i ); sprintfW( device_id, fmtW, i ); rec->device_id = heap_strdupW( device_id ); rec->family = 2; /* Unknown */ rec->manufacturer = heap_strdupW( manufacturer ); - rec->maxclockspeed = maxclockspeed; + rec->maxclockspeed = get_processor_maxclockspeed( i ); rec->name = heap_strdupW( name ); rec->num_cores = num_cores; rec->num_logical_processors = num_logical_processors; @@ -2380,10 +2418,12 @@ static struct table builtin_classes[] = { class_physicalmemoryW, SIZEOF(col_physicalmemory), col_physicalmemory, 0, 0, NULL, fill_physicalmemory }, { class_processW, SIZEOF(col_process), col_process, 0, 0, NULL, fill_process }, { class_processorW, SIZEOF(col_processor), col_processor, 0, 0, NULL, fill_processor }, + { class_processor2W, SIZEOF(col_processor), col_processor, 0, 0, NULL, fill_processor }, { class_qualifiersW, SIZEOF(col_qualifier), col_qualifier, SIZEOF(data_qualifier), 0, (BYTE *)data_qualifier }, { class_serviceW, SIZEOF(col_service), col_service, 0, 0, NULL, fill_service }, { class_sounddeviceW, SIZEOF(col_sounddevice), col_sounddevice, SIZEOF(data_sounddevice), 0, (BYTE *)data_sounddevice }, { class_stdregprovW, SIZEOF(col_stdregprov), col_stdregprov, SIZEOF(data_stdregprov), 0, (BYTE *)data_stdregprov }, + { class_systemsecurityW, SIZEOF(col_systemsecurity), col_systemsecurity, SIZEOF(data_systemsecurity), 0, (BYTE *)data_systemsecurity }, { class_videocontrollerW, SIZEOF(col_videocontroller), col_videocontroller, 0, 0, NULL, fill_videocontroller } }; diff --git a/reactos/dll/win32/wbemprox/class.c b/reactos/dll/win32/wbemprox/class.c index aa51816b278..30342badc3d 100644 --- a/reactos/dll/win32/wbemprox/class.c +++ b/reactos/dll/win32/wbemprox/class.c @@ -498,23 +498,30 @@ static HRESULT WINAPI class_object_Next( CIMTYPE *pType, LONG *plFlavor ) { - struct class_object *co = impl_from_IWbemClassObject( iface ); - struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter ); - struct view *view = ec->query->view; - BSTR property; + struct class_object *obj = impl_from_IWbemClassObject( iface ); + struct enum_class_object *iter = impl_from_IEnumWbemClassObject( obj->iter ); + struct view *view = iter->query->view; + BSTR prop; HRESULT hr; + UINT i; TRACE("%p, %08x, %p, %p, %p, %p\n", iface, lFlags, strName, pVal, pType, plFlavor); - if (!(property = get_property_name( co->name, co->index_property ))) return WBEM_S_NO_MORE_DATA; - if ((hr = get_propval( view, co->index, property, pVal, pType, plFlavor )) != S_OK) + for (i = obj->index_property; i < view->table->num_cols; i++) { - SysFreeString( property ); - return hr; + if (is_method( view->table, i )) continue; + if (!is_selected_prop( view, view->table->columns[i].name )) continue; + if (!(prop = SysAllocString( view->table->columns[i].name ))) return E_OUTOFMEMORY; + if ((hr = get_propval( view, obj->index, prop, pVal, pType, plFlavor )) != S_OK) + { + SysFreeString( prop ); + return hr; + } + obj->index_property = i + 1; + *strName = prop; + return S_OK; } - *strName = property; - co->index_property++; - return S_OK; + return WBEM_S_NO_MORE_DATA; } static HRESULT WINAPI class_object_EndEnumeration( diff --git a/reactos/dll/win32/wbemprox/main.c b/reactos/dll/win32/wbemprox/main.c index 064a497a286..214dfd7a41a 100644 --- a/reactos/dll/win32/wbemprox/main.c +++ b/reactos/dll/win32/wbemprox/main.c @@ -105,8 +105,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: instance = hinstDLL; DisableThreadLibraryCalls(hinstDLL); diff --git a/reactos/dll/win32/wbemprox/process.c b/reactos/dll/win32/wbemprox/process.c index ec723d859e1..0f22a8d87ee 100644 --- a/reactos/dll/win32/wbemprox/process.c +++ b/reactos/dll/win32/wbemprox/process.c @@ -54,7 +54,7 @@ done: HRESULT process_get_owner( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT user, domain, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p, %p\n", obj, in, out); @@ -62,29 +62,40 @@ HRESULT process_get_owner( IWbemClassObject *obj, IWbemClassObject *in, IWbemCla hr = create_signature( class_processW, method_getownerW, PARAM_OUT, &sig ); if (hr != S_OK) return hr; - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + IWbemClassObject_Release( sig ); + return hr; + } } VariantInit( &user ); VariantInit( &domain ); hr = get_owner( &user, &domain, &retval ); if (hr != S_OK) goto done; - if (!V_UI4( &retval )) + if (out_params) { - hr = IWbemClassObject_Put( *out, param_userW, 0, &user, CIM_STRING ); - if (hr != S_OK) goto done; - hr = IWbemClassObject_Put( *out, param_domainW, 0, &domain, CIM_STRING ); - if (hr != S_OK) goto done; + if (!V_UI4( &retval )) + { + hr = IWbemClassObject_Put( out_params, param_userW, 0, &user, CIM_STRING ); + if (hr != S_OK) goto done; + hr = IWbemClassObject_Put( out_params, param_domainW, 0, &domain, CIM_STRING ); + if (hr != S_OK) goto done; + } + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); } - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &user ); VariantClear( &domain ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } diff --git a/reactos/dll/win32/wbemprox/query.c b/reactos/dll/win32/wbemprox/query.c index e7984a4e4ce..07528b69e29 100644 --- a/reactos/dll/win32/wbemprox/query.c +++ b/reactos/dll/win32/wbemprox/query.c @@ -412,7 +412,7 @@ done: return hr; } -static BOOL is_selected_prop( const struct view *view, const WCHAR *name ) +BOOL is_selected_prop( const struct view *view, const WCHAR *name ) { const struct property *prop = view->proplist; @@ -551,7 +551,7 @@ done: return ret; } -static inline BOOL is_method( const struct table *table, UINT column ) +BOOL is_method( const struct table *table, UINT column ) { return table->columns[column].type & COL_FLAG_METHOD; } @@ -652,6 +652,8 @@ VARTYPE to_vartype( CIMTYPE type ) case CIM_BOOLEAN: return VT_BOOL; case CIM_STRING: case CIM_DATETIME: return VT_BSTR; + case CIM_SINT8: return VT_I1; + case CIM_UINT8: return VT_UI1; case CIM_SINT16: return VT_I2; case CIM_UINT16: return VT_UI2; case CIM_SINT32: return VT_I4; @@ -712,6 +714,12 @@ void set_variant( VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret ) case VT_BSTR: V_BSTR( ret ) = val_ptr; break; + case VT_I1: + V_I1( ret ) = val; + break; + case VT_UI1: + V_UI1( ret ) = val; + break; case VT_I2: V_I2( ret ) = val; break; @@ -776,6 +784,12 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR else vartype = VT_NULL; break; + case CIM_SINT8: + if (!vartype) vartype = VT_I1; + break; + case CIM_UINT8: + if (!vartype) vartype = VT_UI1; + break; case CIM_SINT16: if (!vartype) vartype = VT_I2; break; @@ -814,6 +828,8 @@ static CIMTYPE to_cimtype( VARTYPE type ) { case VT_BOOL: return CIM_BOOLEAN; case VT_BSTR: return CIM_STRING; + case VT_I1: return CIM_SINT8; + case VT_UI1: return CIM_UINT8; case VT_I2: return CIM_SINT16; case VT_UI2: return CIM_UINT16; case VT_I4: return CIM_SINT32; @@ -951,28 +967,30 @@ HRESULT get_properties( const struct view *view, LONG flags, SAFEARRAY **props ) { SAFEARRAY *sa; BSTR str; - LONG i; - UINT num_props = count_properties( view ); + UINT i, num_props = count_selected_properties( view ); + LONG j; if (!(sa = SafeArrayCreateVector( VT_BSTR, 0, num_props ))) return E_OUTOFMEMORY; - for (i = 0; i < view->table->num_cols; i++) + for (i = 0, j = 0; i < view->table->num_cols; i++) { BOOL is_system; if (is_method( view->table, i )) continue; + if (!is_selected_prop( view, view->table->columns[i].name )) continue; is_system = is_system_prop( view->table->columns[i].name ); if ((flags & WBEM_FLAG_NONSYSTEM_ONLY) && is_system) continue; else if ((flags & WBEM_FLAG_SYSTEM_ONLY) && !is_system) continue; str = SysAllocString( view->table->columns[i].name ); - if (!str || SafeArrayPutElement( sa, &i, str ) != S_OK) + if (!str || SafeArrayPutElement( sa, &j, str ) != S_OK) { SysFreeString( str ); SafeArrayDestroy( sa ); return E_OUTOFMEMORY; } + j++; } *props = sa; return S_OK; diff --git a/reactos/dll/win32/wbemprox/reg.c b/reactos/dll/win32/wbemprox/reg.c index f38a64bbc96..5363f367c93 100644 --- a/reactos/dll/win32/wbemprox/reg.c +++ b/reactos/dll/win32/wbemprox/reg.c @@ -114,7 +114,7 @@ static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT HRESULT reg_enum_key( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT defkey, subkey, names, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p\n", in, out); @@ -130,28 +130,39 @@ HRESULT reg_enum_key( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObj VariantClear( &subkey ); return hr; } - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - VariantClear( &subkey ); - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + VariantClear( &subkey ); + IWbemClassObject_Release( sig ); + return hr; + } } VariantInit( &names ); hr = enum_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &retval ); if (hr != S_OK) goto done; - if (!V_UI4( &retval )) + if (out_params) { - hr = IWbemClassObject_Put( *out, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY ); - if (hr != S_OK) goto done; + if (!V_UI4( &retval )) + { + hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY ); + if (hr != S_OK) goto done; + } + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); } - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &names ); VariantClear( &subkey ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } @@ -212,7 +223,7 @@ done: HRESULT reg_enum_values( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT defkey, subkey, names, types, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p\n", in, out); @@ -228,32 +239,43 @@ HRESULT reg_enum_values( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass VariantClear( &subkey ); return hr; } - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - VariantClear( &subkey ); - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + VariantClear( &subkey ); + IWbemClassObject_Release( sig ); + return hr; + } } VariantInit( &names ); VariantInit( &types ); hr = enum_values( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &types, &retval ); if (hr != S_OK) goto done; - if (!V_UI4( &retval )) + if (out_params) { - hr = IWbemClassObject_Put( *out, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY ); - if (hr != S_OK) goto done; - hr = IWbemClassObject_Put( *out, param_typesW, 0, &types, CIM_SINT32|CIM_FLAG_ARRAY ); - if (hr != S_OK) goto done; + if (!V_UI4( &retval )) + { + hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY ); + if (hr != S_OK) goto done; + hr = IWbemClassObject_Put( out_params, param_typesW, 0, &types, CIM_SINT32|CIM_FLAG_ARRAY ); + if (hr != S_OK) goto done; + } + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); } - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &types ); VariantClear( &names ); VariantClear( &subkey ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } @@ -284,7 +306,7 @@ done: HRESULT reg_get_stringvalue( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT defkey, subkey, name, value, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p\n", in, out); @@ -303,28 +325,39 @@ HRESULT reg_get_stringvalue( IWbemClassObject *obj, IWbemClassObject *in, IWbemC VariantClear( &subkey ); return hr; } - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - VariantClear( &name ); - VariantClear( &subkey ); - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + VariantClear( &name ); + VariantClear( &subkey ); + IWbemClassObject_Release( sig ); + return hr; + } } VariantInit( &value ); hr = get_stringvalue( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), V_BSTR(&name), &value, &retval ); if (hr != S_OK) goto done; - if (!V_UI4( &retval )) + if (out_params) { - hr = IWbemClassObject_Put( *out, param_valueW, 0, &value, CIM_STRING ); - if (hr != S_OK) goto done; + if (!V_UI4( &retval )) + { + hr = IWbemClassObject_Put( out_params, param_valueW, 0, &value, CIM_STRING ); + if (hr != S_OK) goto done; + } + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); } - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &name ); VariantClear( &subkey ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } diff --git a/reactos/dll/win32/wbemprox/security.c b/reactos/dll/win32/wbemprox/security.c new file mode 100644 index 00000000000..f73827c1f1b --- /dev/null +++ b/reactos/dll/win32/wbemprox/security.c @@ -0,0 +1,206 @@ +/* + * __SystemSecurity implementation + * + * Copyright 2014 Vincent Povirk 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 "wbemprox_private.h" + +#include + +static HRESULT to_byte_array( void *data, DWORD size, VARIANT *var ) +{ + SAFEARRAY *sa; + void *sadata; + HRESULT hr; + + if (!(sa = SafeArrayCreateVector( VT_UI1, 0, size ))) return E_OUTOFMEMORY; + + hr = SafeArrayAccessData( sa, &sadata ); + + if (SUCCEEDED(hr)) + { + memcpy( sadata, data, size ); + + SafeArrayUnaccessData( sa ); + } + else + { + SafeArrayDestroy( sa ); + return hr; + } + + set_variant( VT_UI1|VT_ARRAY, 0, sa, var ); + return S_OK; +} + +static HRESULT get_sd( SECURITY_DESCRIPTOR **sd, DWORD *size ) +{ + BYTE sid_admin_buffer[SECURITY_MAX_SID_SIZE]; + SID *sid_admin = (SID*)sid_admin_buffer; + BYTE sid_network_buffer[SECURITY_MAX_SID_SIZE]; + SID *sid_network = (SID*)sid_network_buffer; + BYTE sid_local_buffer[SECURITY_MAX_SID_SIZE]; + SID *sid_local = (SID*)sid_local_buffer; + BYTE sid_users_buffer[SECURITY_MAX_SID_SIZE]; + SID *sid_users = (SID*)sid_users_buffer; + BYTE acl_buffer[sizeof(ACL) + 4 * (sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD) + SECURITY_MAX_SID_SIZE)]; + ACL *acl = (ACL*)acl_buffer; + DWORD sid_size; + SECURITY_DESCRIPTOR absolute_sd; + HRESULT hr = S_OK; + + sid_size = sizeof(sid_admin_buffer); + CreateWellKnownSid( WinBuiltinAdministratorsSid, NULL, sid_admin, &sid_size ); + + sid_size = sizeof(sid_network_buffer); + CreateWellKnownSid( WinNetworkServiceSid, NULL, sid_network, &sid_size ); + + sid_size = sizeof(sid_local_buffer); + CreateWellKnownSid( WinLocalServiceSid, NULL, sid_local, &sid_size ); + + sid_size = sizeof(sid_users_buffer); + CreateWellKnownSid( WinAuthenticatedUserSid, NULL, sid_users, &sid_size ); + + InitializeAcl( acl, sizeof(acl_buffer), ACL_REVISION ); + + AddAccessAllowedAceEx( acl, ACL_REVISION, CONTAINER_INHERIT_ACE|INHERITED_ACE, + ADS_RIGHT_DS_CREATE_CHILD|ADS_RIGHT_DS_DELETE_CHILD|ADS_RIGHT_ACTRL_DS_LIST|ADS_RIGHT_DS_SELF| + ADS_RIGHT_DS_READ_PROP|ADS_RIGHT_DS_WRITE_PROP|READ_CONTROL|WRITE_DAC, + sid_admin ); + + AddAccessAllowedAceEx( acl, ACL_REVISION, CONTAINER_INHERIT_ACE|INHERITED_ACE, + ADS_RIGHT_DS_CREATE_CHILD|ADS_RIGHT_DS_DELETE_CHILD|ADS_RIGHT_DS_READ_PROP, + sid_network ); + + AddAccessAllowedAceEx( acl, ACL_REVISION, CONTAINER_INHERIT_ACE|INHERITED_ACE, + ADS_RIGHT_DS_CREATE_CHILD|ADS_RIGHT_DS_DELETE_CHILD|ADS_RIGHT_DS_READ_PROP, + sid_local ); + + AddAccessAllowedAceEx( acl, ACL_REVISION, CONTAINER_INHERIT_ACE|INHERITED_ACE, + ADS_RIGHT_DS_CREATE_CHILD|ADS_RIGHT_DS_DELETE_CHILD|ADS_RIGHT_DS_READ_PROP, + sid_users ); + + InitializeSecurityDescriptor( &absolute_sd, SECURITY_DESCRIPTOR_REVISION ); + + SetSecurityDescriptorOwner( &absolute_sd, sid_admin, TRUE ); + SetSecurityDescriptorGroup( &absolute_sd, sid_admin, TRUE ); + SetSecurityDescriptorDacl( &absolute_sd, TRUE, acl, TRUE ); + + *size = GetSecurityDescriptorLength( &absolute_sd ); + + *sd = HeapAlloc( GetProcessHeap(), 0, *size ); + if (!*sd) + hr = E_OUTOFMEMORY; + + if (SUCCEEDED(hr)) + { + if (!MakeSelfRelativeSD(&absolute_sd, *sd, size)) + hr = E_FAIL; + } + + return hr; +} + +HRESULT security_get_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) +{ + VARIANT var_sd, retval; + IWbemClassObject *sig, *out_params = NULL; + HRESULT hr, ret; + SECURITY_DESCRIPTOR *sd; + DWORD sd_size; + + TRACE("%p, %p\n", in, out); + + hr = create_signature( class_systemsecurityW, method_getsdW, PARAM_OUT, &sig ); + + if (SUCCEEDED(hr)) + { + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + + IWbemClassObject_Release( sig ); + } + + if (SUCCEEDED(hr)) + { + ret = get_sd( &sd, &sd_size ); + + if (SUCCEEDED(ret)) + { + VariantInit( &var_sd ); + + hr = to_byte_array( sd, sd_size, &var_sd ); + + if (SUCCEEDED(hr)) + hr = IWbemClassObject_Put( out_params, param_sdW, 0, &var_sd, CIM_UINT8|CIM_FLAG_ARRAY ); + + HeapFree( GetProcessHeap(), 0, sd ); + VariantClear( &var_sd ); + } + + if (SUCCEEDED(hr)) + { + set_variant( VT_UI4, ret, NULL, &retval ); + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); + } + + if (SUCCEEDED(hr) && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + + IWbemClassObject_Release( out_params ); + } + + return hr; +} + + +HRESULT security_set_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) +{ + VARIANT retval; + IWbemClassObject *sig, *out_params = NULL; + HRESULT hr; + + FIXME("stub\n"); + + hr = create_signature( class_systemsecurityW, method_setsdW, PARAM_OUT, &sig ); + + if (SUCCEEDED(hr)) + { + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + + IWbemClassObject_Release( sig ); + } + + if (SUCCEEDED(hr)) + { + set_variant( VT_UI4, S_OK, NULL, &retval ); + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); + + if (SUCCEEDED(hr) && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + + IWbemClassObject_Release( out_params ); + } + + return hr; +} diff --git a/reactos/dll/win32/wbemprox/service.c b/reactos/dll/win32/wbemprox/service.c index 182938f46e0..a399a85119d 100644 --- a/reactos/dll/win32/wbemprox/service.c +++ b/reactos/dll/win32/wbemprox/service.c @@ -67,7 +67,7 @@ done: HRESULT service_pause_service( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT name, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p, %p\n", obj, in, out); @@ -81,28 +81,38 @@ HRESULT service_pause_service( IWbemClassObject *obj, IWbemClassObject *in, IWbe VariantClear( &name ); return hr; } - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - VariantClear( &name ); - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + VariantClear( &name ); + IWbemClassObject_Release( sig ); + return hr; + } } hr = control_service( V_BSTR(&name), SERVICE_CONTROL_PAUSE, &retval ); if (hr != S_OK) goto done; - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); + + if (out_params) + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &name ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } HRESULT service_resume_service( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT name, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p, %p\n", obj, in, out); @@ -116,21 +126,31 @@ HRESULT service_resume_service( IWbemClassObject *obj, IWbemClassObject *in, IWb VariantClear( &name ); return hr; } - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - VariantClear( &name ); - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + VariantClear( &name ); + IWbemClassObject_Release( sig ); + return hr; + } } hr = control_service( V_BSTR(&name), SERVICE_CONTROL_CONTINUE, &retval ); if (hr != S_OK) goto done; - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); + + if (out_params) + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &name ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } @@ -161,7 +181,7 @@ done: HRESULT service_start_service( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT name, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p, %p\n", obj, in, out); @@ -175,28 +195,38 @@ HRESULT service_start_service( IWbemClassObject *obj, IWbemClassObject *in, IWbe VariantClear( &name ); return hr; } - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - VariantClear( &name ); - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + VariantClear( &name ); + IWbemClassObject_Release( sig ); + return hr; + } } hr = start_service( V_BSTR(&name), &retval ); if (hr != S_OK) goto done; - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); + + if (out_params) + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &name ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } HRESULT service_stop_service( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) { VARIANT name, retval; - IWbemClassObject *sig; + IWbemClassObject *sig, *out_params = NULL; HRESULT hr; TRACE("%p, %p, %p\n", obj, in, out); @@ -210,20 +240,30 @@ HRESULT service_stop_service( IWbemClassObject *obj, IWbemClassObject *in, IWbem VariantClear( &name ); return hr; } - hr = IWbemClassObject_SpawnInstance( sig, 0, out ); - if (hr != S_OK) + if (out) { - VariantClear( &name ); - IWbemClassObject_Release( sig ); - return hr; + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + if (hr != S_OK) + { + VariantClear( &name ); + IWbemClassObject_Release( sig ); + return hr; + } } hr = control_service( V_BSTR(&name), SERVICE_CONTROL_STOP, &retval ); if (hr != S_OK) goto done; - hr = IWbemClassObject_Put( *out, param_returnvalueW, 0, &retval, CIM_UINT32 ); + + if (out_params) + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); done: VariantClear( &name ); IWbemClassObject_Release( sig ); - if (hr != S_OK) IWbemClassObject_Release( *out ); + if (hr == S_OK && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + if (out_params) IWbemClassObject_Release( out_params ); return hr; } diff --git a/reactos/dll/win32/wbemprox/table.c b/reactos/dll/win32/wbemprox/table.c index dc8eacd2d9c..449a63fd010 100644 --- a/reactos/dll/win32/wbemprox/table.c +++ b/reactos/dll/win32/wbemprox/table.c @@ -42,6 +42,9 @@ UINT get_type_size( CIMTYPE type ) { case CIM_BOOLEAN: return sizeof(int); + case CIM_SINT8: + case CIM_UINT8: + return sizeof(INT8); case CIM_SINT16: case CIM_UINT16: return sizeof(INT16); @@ -101,6 +104,12 @@ HRESULT get_value( const struct table *table, UINT row, UINT column, LONGLONG *v case CIM_STRING: *val = (INT_PTR)*(const WCHAR **)ptr; break; + case CIM_SINT8: + *val = *(const INT8 *)ptr; + break; + case CIM_UINT8: + *val = *(const UINT8 *)ptr; + break; case CIM_SINT16: *val = *(const INT16 *)ptr; break; @@ -205,6 +214,12 @@ HRESULT set_value( const struct table *table, UINT row, UINT column, LONGLONG va case CIM_STRING: *(WCHAR **)ptr = (WCHAR *)(INT_PTR)val; break; + case CIM_SINT8: + *(INT8 *)ptr = val; + break; + case CIM_UINT8: + *(UINT8 *)ptr = val; + break; case CIM_SINT16: *(INT16 *)ptr = val; break; @@ -396,28 +411,3 @@ BSTR get_method_name( const WCHAR *class, UINT index ) release_table( table ); return NULL; } - -BSTR get_property_name( const WCHAR *class, UINT index ) -{ - struct table *table; - UINT i, count = 0; - BSTR ret; - - if (!(table = grab_table( class ))) return NULL; - - for (i = 0; i < table->num_cols; i++) - { - if (!(table->columns[i].type & COL_FLAG_METHOD)) - { - if (index == count) - { - ret = SysAllocString( table->columns[i].name ); - release_table( table ); - return ret; - } - count++; - } - } - release_table( table ); - return NULL; -} diff --git a/reactos/dll/win32/wbemprox/wbemprox_private.h b/reactos/dll/win32/wbemprox/wbemprox_private.h index d155637e16f..1b1515265a5 100644 --- a/reactos/dll/win32/wbemprox/wbemprox_private.h +++ b/reactos/dll/win32/wbemprox/wbemprox_private.h @@ -217,6 +217,7 @@ HRESULT get_column_index( const struct table *, const WCHAR *, UINT * ) DECLSPEC HRESULT get_value( const struct table *, UINT, UINT, LONGLONG * ) DECLSPEC_HIDDEN; BSTR get_value_bstr( const struct table *, UINT, UINT ) DECLSPEC_HIDDEN; HRESULT set_value( const struct table *, UINT, UINT, LONGLONG, CIMTYPE ) DECLSPEC_HIDDEN; +BOOL is_method( const struct table *, UINT ) DECLSPEC_HIDDEN; HRESULT get_method( const struct table *, const WCHAR *, class_method ** ) DECLSPEC_HIDDEN; HRESULT get_propval( const struct view *, UINT, const WCHAR *, VARIANT *, CIMTYPE *, LONG * ) DECLSPEC_HIDDEN; @@ -225,10 +226,10 @@ HRESULT to_longlong( VARIANT *, LONGLONG *, CIMTYPE * ) DECLSPEC_HIDDEN; SAFEARRAY *to_safearray( const struct array *, CIMTYPE ) DECLSPEC_HIDDEN; VARTYPE to_vartype( CIMTYPE ) DECLSPEC_HIDDEN; void destroy_array( struct array *, CIMTYPE ) DECLSPEC_HIDDEN; +BOOL is_selected_prop( const struct view *, const WCHAR * ) DECLSPEC_HIDDEN; HRESULT get_properties( const struct view *, LONG, SAFEARRAY ** ) DECLSPEC_HIDDEN; HRESULT get_object( const WCHAR *, IWbemClassObject ** ) DECLSPEC_HIDDEN; BSTR get_method_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; -BSTR get_property_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; void set_variant( VARTYPE, LONGLONG, void *, VARIANT * ) DECLSPEC_HIDDEN; HRESULT create_signature( const WCHAR *, const WCHAR *, enum param_direction, IWbemClassObject ** ) DECLSPEC_HIDDEN; @@ -248,6 +249,8 @@ HRESULT service_pause_service(IWbemClassObject *, IWbemClassObject *, IWbemClass HRESULT service_resume_service(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; HRESULT service_start_service(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; HRESULT service_stop_service(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; +HRESULT security_get_sd(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; +HRESULT security_set_sd(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1); static inline void *heap_alloc( size_t len ) @@ -283,15 +286,18 @@ static inline WCHAR *heap_strdupW( const WCHAR *src ) static const WCHAR class_processW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s',0}; static const WCHAR class_serviceW[] = {'W','i','n','3','2','_','S','e','r','v','i','c','e',0}; static const WCHAR class_stdregprovW[] = {'S','t','d','R','e','g','P','r','o','v',0}; +static const WCHAR class_systemsecurityW[] = {'_','_','S','y','s','t','e','m','S','e','c','u','r','i','t','y',0}; static const WCHAR prop_nameW[] = {'N','a','m','e',0}; static const WCHAR method_enumkeyW[] = {'E','n','u','m','K','e','y',0}; static const WCHAR method_enumvaluesW[] = {'E','n','u','m','V','a','l','u','e','s',0}; static const WCHAR method_getownerW[] = {'G','e','t','O','w','n','e','r',0}; +static const WCHAR method_getsdW[] = {'G','e','t','S','D',0}; static const WCHAR method_getstringvalueW[] = {'G','e','t','S','t','r','i','n','g','V','a','l','u','e',0}; static const WCHAR method_pauseserviceW[] = {'P','a','u','s','e','S','e','r','v','i','c','e',0}; static const WCHAR method_resumeserviceW[] = {'R','e','s','u','m','e','S','e','r','v','i','c','e',0}; +static const WCHAR method_setsdW[] = {'S','e','t','S','D',0}; static const WCHAR method_startserviceW[] = {'S','t','a','r','t','S','e','r','v','i','c','e',0}; static const WCHAR method_stopserviceW[] = {'S','t','o','p','S','e','r','v','i','c','e',0}; @@ -299,6 +305,7 @@ static const WCHAR param_defkeyW[] = {'h','D','e','f','K','e','y',0}; static const WCHAR param_domainW[] = {'D','o','m','a','i','n',0}; static const WCHAR param_namesW[] = {'s','N','a','m','e','s',0}; static const WCHAR param_returnvalueW[] = {'R','e','t','u','r','n','V','a','l','u','e',0}; +static const WCHAR param_sdW[] = {'S','D',0}; static const WCHAR param_subkeynameW[] = {'s','S','u','b','K','e','y','N','a','m','e',0}; static const WCHAR param_typesW[] = {'T','y','p','e','s',0}; static const WCHAR param_userW[] = {'U','s','e','r',0}; diff --git a/reactos/dll/win32/wbemprox/wql.tab.c b/reactos/dll/win32/wbemprox/wql.tab.c index 86127b41da8..1747573fd10 100644 --- a/reactos/dll/win32/wbemprox/wql.tab.c +++ b/reactos/dll/win32/wbemprox/wql.tab.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program 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 General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,23 +58,17 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse wql_parse #define yylex wql_lex #define yyerror wql_error -#define yylval wql_lval -#define yychar wql_char #define yydebug wql_debug #define yynerrs wql_nerrs /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "wql.y" +#line 1 "wql.y" /* yacc.c:339 */ /* @@ -249,14 +243,15 @@ static int wql_lex( void *val, struct parser *parser ); result = current_view +#line 259 "wql.tab.c" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 267 "wql.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -266,58 +261,58 @@ static int wql_lex( void *val, struct parser *parser ); # define YYERROR_VERBOSE 1 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int wql_debug; #endif - -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TK_SELECT = 258, - TK_FROM = 259, - TK_STAR = 260, - TK_COMMA = 261, - TK_DOT = 262, - TK_IS = 263, - TK_LP = 264, - TK_RP = 265, - TK_NULL = 266, - TK_FALSE = 267, - TK_TRUE = 268, - TK_INTEGER = 269, - TK_WHERE = 270, - TK_SPACE = 271, - TK_MINUS = 272, - TK_ILLEGAL = 273, - TK_BY = 274, - TK_STRING = 275, - TK_ID = 276, - TK_OR = 277, - TK_AND = 278, - TK_NOT = 279, - TK_LIKE = 280, - TK_GE = 281, - TK_LE = 282, - TK_GT = 283, - TK_LT = 284, - TK_NE = 285, - TK_EQ = 286 - }; + enum yytokentype + { + TK_SELECT = 258, + TK_FROM = 259, + TK_STAR = 260, + TK_COMMA = 261, + TK_DOT = 262, + TK_IS = 263, + TK_LP = 264, + TK_RP = 265, + TK_NULL = 266, + TK_FALSE = 267, + TK_TRUE = 268, + TK_INTEGER = 269, + TK_WHERE = 270, + TK_SPACE = 271, + TK_MINUS = 272, + TK_ILLEGAL = 273, + TK_BY = 274, + TK_STRING = 275, + TK_ID = 276, + TK_OR = 277, + TK_AND = 278, + TK_NOT = 279, + TK_EQ = 280, + TK_NE = 281, + TK_LT = 282, + TK_GT = 283, + TK_LE = 284, + TK_GE = 285, + TK_LIKE = 286 + }; #endif - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 194 "wql.y" +#line 194 "wql.y" /* yacc.c:355 */ struct string str; WCHAR *string; @@ -326,22 +321,21 @@ typedef union YYSTYPE struct expr *expr; int integer; - - -/* Line 293 of yacc.c */ -#line 345 "wql.tab.c" -} YYSTYPE; +#line 337 "wql.tab.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + +int wql_parse (struct parser *ctx); + + + /* Copy the second part of user declarations. */ - -/* Line 343 of yacc.c */ -#line 357 "wql.tab.c" +#line 351 "wql.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -355,11 +349,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -379,8 +370,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -394,38 +384,67 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# 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__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -444,9 +463,9 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -456,8 +475,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -473,7 +492,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -481,15 +500,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -499,7 +516,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -524,35 +541,35 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -568,17 +585,19 @@ union yyalloc #define YYNNTS 10 /* YYNRULES -- Number of rules. */ #define YYNRULES 36 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 67 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 286 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -613,35 +632,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 7, 12, 19, 21, 25, 27, 31, - 33, 35, 37, 41, 45, 49, 52, 56, 60, 64, - 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, - 108, 113, 115, 117, 119, 121, 123 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 33, 0, -1, 3, 4, 36, -1, 3, 34, 4, - 36, -1, 3, 34, 4, 36, 15, 38, -1, 35, - -1, 35, 6, 34, -1, 5, -1, 36, 7, 36, - -1, 36, -1, 21, -1, 14, -1, 9, 38, 10, - -1, 38, 23, 38, -1, 38, 22, 38, -1, 24, - 38, -1, 40, 31, 41, -1, 40, 28, 41, -1, - 40, 29, 41, -1, 40, 27, 41, -1, 40, 26, - 41, -1, 40, 30, 41, -1, 41, 31, 40, -1, - 41, 28, 40, -1, 41, 29, 40, -1, 41, 27, - 40, -1, 41, 26, 40, -1, 41, 30, 40, -1, - 40, 25, 39, -1, 40, 8, 11, -1, 40, 8, - 24, 11, -1, 20, -1, 35, -1, 37, -1, 20, - -1, 13, -1, 12, -1 -}; - -/* 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[] = { 0, 221, 221, 233, 245, 260, 261, 265, 272, 278, @@ -651,7 +642,7 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 1 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -660,15 +651,15 @@ static const char *const yytname[] = "TK_COMMA", "TK_DOT", "TK_IS", "TK_LP", "TK_RP", "TK_NULL", "TK_FALSE", "TK_TRUE", "TK_INTEGER", "TK_WHERE", "TK_SPACE", "TK_MINUS", "TK_ILLEGAL", "TK_BY", "TK_STRING", "TK_ID", "TK_OR", "TK_AND", "TK_NOT", - "TK_LIKE", "TK_GE", "TK_LE", "TK_GT", "TK_LT", "TK_NE", "TK_EQ", + "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", 0 + "string_val", "prop_val", "const_val", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -678,7 +669,94 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +#define YYPACT_NINF -18 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-18))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + 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 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +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 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -18, -18, 34, 1, 36, -18, -17, -18, 15, 28 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 2, 6, 24, 8, 25, 26, 59, 27, 28 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + 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 +}; + +static const yytype_uint8 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 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +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 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 32, 33, 33, 33, 34, 34, 34, 35, 35, @@ -687,7 +765,7 @@ static const yytype_uint8 yyr1[] = 38, 39, 40, 41, 41, 41, 41 }; -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 3, 4, 6, 1, 3, 1, 3, 1, @@ -696,179 +774,41 @@ static const yytype_uint8 yyr2[] = 4, 1, 1, 1, 1, 1, 1 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -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, 31, 28, 20, 19, 17, 18, 21, 16, - 26, 25, 23, 24, 27, 22, 30 -}; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 2, 6, 24, 8, 25, 26, 53, 27, 28 -}; +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -18 -static const yytype_int8 yypact[] = -{ - 7, 3, 12, -5, -18, -18, 31, 30, 21, -18, - -18, -5, 4, -5, 28, -18, -18, 17, 17, -18, - -18, -18, -18, 17, -18, -18, 11, -8, 24, 22, - -18, 17, 17, 16, 26, -9, -9, -9, -9, -9, - -9, -5, -5, -5, -5, -5, -5, -18, 19, -18, - -18, 37, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18 -}; +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -18, -18, 56, 1, 36, -18, -17, -18, 15, 27 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -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, 13, 19, - 20, 21, 47, 31, 32, 11, 12, 22, 5, 10, - 51, 23, 32, 17, 31, 32, 52, 14, 66, 16, - 41, 42, 43, 44, 45, 46, 60, 61, 62, 63, - 64, 65, 54, 55, 56, 57, 58, 59, 15 -}; - -#define yypact_value_is_default(yystate) \ - ((yystate) == (-18)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - -static const yytype_uint8 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, 7, 12, - 13, 14, 10, 22, 23, 4, 6, 20, 21, 3, - 24, 24, 23, 15, 22, 23, 20, 11, 11, 13, - 26, 27, 28, 29, 30, 31, 41, 42, 43, 44, - 45, 46, 35, 36, 37, 38, 39, 40, 12 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -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, 26, 27, 28, 29, 30, 31, 10, 38, 38, - 11, 24, 20, 39, 41, 41, 41, 41, 41, 41, - 40, 40, 40, 40, 40, 40, 11 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (ctx, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* This macro is provided for backward compatibility. */ - -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, ctx) -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -878,56 +818,47 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, ctx); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, ctx); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser *ctx) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - struct parser *ctx; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (ctx); if (!yyvaluep) return; - YYUSE (ctx); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -935,23 +866,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser *ctx) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, ctx) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - struct parser *ctx; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx); YYFPRINTF (yyoutput, ")"); @@ -962,16 +881,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, ctx) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -982,50 +893,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser *ctx) -#else -static void -yy_reduce_print (yyvsp, yyrule, ctx) - YYSTYPE *yyvsp; - int yyrule; - struct parser *ctx; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, struct parser *ctx) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , ctx); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , ctx); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, ctx); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, ctx); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1039,7 +942,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1062,15 +965,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1086,16 +982,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1125,27 +1013,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1168,12 +1056,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1181,10 +1068,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1233,11 +1116,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1257,10 +1142,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1297,83 +1184,39 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser *ctx) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, ctx) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - struct parser *ctx; -#endif { YYUSE (yyvaluep); YYUSE (ctx); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (struct parser *ctx); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (struct parser *ctx) -#else -int -yyparse (ctx) - struct parser *ctx; -#endif -#endif { /* The lookahead symbol. */ int yychar; + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -1383,10 +1226,10 @@ YYSTYPE yylval; int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1404,7 +1247,7 @@ YYSTYPE yylval; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1422,9 +1265,8 @@ YYSTYPE yylval; Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1433,14 +1275,6 @@ YYSTYPE yylval; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1461,23 +1295,23 @@ YYSTYPE yylval; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1485,22 +1319,22 @@ YYSTYPE yylval; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1509,10 +1343,10 @@ YYSTYPE yylval; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1541,7 +1375,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, ctx); } if (yychar <= YYEOF) @@ -1581,7 +1415,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1604,7 +1440,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1618,395 +1454,359 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1806 of yacc.c */ -#line 222 "wql.y" +#line 222 "wql.y" /* yacc.c:1646 */ { HRESULT hr; struct parser *parser = ctx; struct view *view; - hr = create_view( NULL, (yyvsp[(3) - (3)].string), NULL, &view ); + hr = create_view( NULL, (yyvsp[0].string), NULL, &view ); if (hr != S_OK) YYABORT; PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); } +#line 1482 "wql.tab.c" /* yacc.c:1646 */ break; case 3: - -/* Line 1806 of yacc.c */ -#line 234 "wql.y" +#line 234 "wql.y" /* yacc.c:1646 */ { HRESULT hr; struct parser *parser = ctx; struct view *view; - hr = create_view( (yyvsp[(2) - (4)].proplist), (yyvsp[(4) - (4)].string), NULL, &view ); + hr = create_view( (yyvsp[-2].proplist), (yyvsp[0].string), NULL, &view ); if (hr != S_OK) YYABORT; PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); } +#line 1498 "wql.tab.c" /* yacc.c:1646 */ break; case 4: - -/* Line 1806 of yacc.c */ -#line 246 "wql.y" +#line 246 "wql.y" /* yacc.c:1646 */ { HRESULT hr; struct parser *parser = ctx; struct view *view; - hr = create_view( (yyvsp[(2) - (6)].proplist), (yyvsp[(4) - (6)].string), (yyvsp[(6) - (6)].expr), &view ); + hr = create_view( (yyvsp[-4].proplist), (yyvsp[-2].string), (yyvsp[0].expr), &view ); if (hr != S_OK) YYABORT; PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view ); } +#line 1514 "wql.tab.c" /* yacc.c:1646 */ break; case 6: - -/* Line 1806 of yacc.c */ -#line 262 "wql.y" +#line 262 "wql.y" /* yacc.c:1646 */ { - (yyvsp[(1) - (3)].proplist)->next = (yyvsp[(3) - (3)].proplist); + (yyvsp[-2].proplist)->next = (yyvsp[0].proplist); } +#line 1522 "wql.tab.c" /* yacc.c:1646 */ break; case 7: - -/* Line 1806 of yacc.c */ -#line 266 "wql.y" +#line 266 "wql.y" /* yacc.c:1646 */ { (yyval.proplist) = NULL; } +#line 1530 "wql.tab.c" /* yacc.c:1646 */ break; case 8: - -/* Line 1806 of yacc.c */ -#line 273 "wql.y" +#line 273 "wql.y" /* yacc.c:1646 */ { - (yyval.proplist) = alloc_property( ctx, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].string) ); + (yyval.proplist) = alloc_property( ctx, (yyvsp[-2].string), (yyvsp[0].string) ); if (!(yyval.proplist)) YYABORT; } +#line 1540 "wql.tab.c" /* yacc.c:1646 */ break; case 9: - -/* Line 1806 of yacc.c */ -#line 279 "wql.y" +#line 279 "wql.y" /* yacc.c:1646 */ { - (yyval.proplist) = alloc_property( ctx, NULL, (yyvsp[(1) - (1)].string) ); + (yyval.proplist) = alloc_property( ctx, NULL, (yyvsp[0].string) ); if (!(yyval.proplist)) YYABORT; } +#line 1550 "wql.tab.c" /* yacc.c:1646 */ break; case 10: - -/* Line 1806 of yacc.c */ -#line 288 "wql.y" +#line 288 "wql.y" /* yacc.c:1646 */ { - (yyval.string) = get_string( ctx, &(yyvsp[(1) - (1)].str) ); + (yyval.string) = get_string( ctx, &(yyvsp[0].str) ); if (!(yyval.string)) YYABORT; } +#line 1560 "wql.tab.c" /* yacc.c:1646 */ break; case 11: - -/* Line 1806 of yacc.c */ -#line 297 "wql.y" +#line 297 "wql.y" /* yacc.c:1646 */ { (yyval.integer) = get_int( ctx ); } +#line 1568 "wql.tab.c" /* yacc.c:1646 */ break; case 12: - -/* Line 1806 of yacc.c */ -#line 304 "wql.y" +#line 304 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(2) - (3)].expr); + (yyval.expr) = (yyvsp[-1].expr); if (!(yyval.expr)) YYABORT; } +#line 1578 "wql.tab.c" /* yacc.c:1646 */ break; case 13: - -/* Line 1806 of yacc.c */ -#line 310 "wql.y" +#line 310 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_AND, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 14: - -/* Line 1806 of yacc.c */ -#line 316 "wql.y" +#line 316 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_OR, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 322 "wql.y" +#line 322 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_unary( ctx, (yyvsp[(2) - (2)].expr), OP_NOT ); + (yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_NOT ); if (!(yyval.expr)) YYABORT; } +#line 1608 "wql.tab.c" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 328 "wql.y" +#line 328 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_EQ, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 334 "wql.y" +#line 334 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GT, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 340 "wql.y" +#line 340 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LT, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 346 "wql.y" +#line 346 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LE, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 352 "wql.y" +#line 352 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GE, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 358 "wql.y" +#line 358 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_NE, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 364 "wql.y" +#line 364 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_EQ, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 370 "wql.y" +#line 370 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GT, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 376 "wql.y" +#line 376 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LT, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 382 "wql.y" +#line 382 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LE, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 388 "wql.y" +#line 388 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_GE, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 394 "wql.y" +#line 394 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_NE, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 400 "wql.y" +#line 400 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_complex( ctx, (yyvsp[(1) - (3)].expr), OP_LIKE, (yyvsp[(3) - (3)].expr) ); + (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 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 406 "wql.y" +#line 406 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_unary( ctx, (yyvsp[(1) - (3)].expr), OP_ISNULL ); + (yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_ISNULL ); if (!(yyval.expr)) YYABORT; } +#line 1748 "wql.tab.c" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 412 "wql.y" +#line 412 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_unary( ctx, (yyvsp[(1) - (4)].expr), OP_NOTNULL ); + (yyval.expr) = expr_unary( ctx, (yyvsp[-3].expr), OP_NOTNULL ); if (!(yyval.expr)) YYABORT; } +#line 1758 "wql.tab.c" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 421 "wql.y" +#line 421 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_sval( ctx, &(yyvsp[(1) - (1)].str) ); + (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); if (!(yyval.expr)) YYABORT; } +#line 1768 "wql.tab.c" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 430 "wql.y" +#line 430 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_propval( ctx, (yyvsp[(1) - (1)].proplist) ); + (yyval.expr) = expr_propval( ctx, (yyvsp[0].proplist) ); if (!(yyval.expr)) YYABORT; } +#line 1778 "wql.tab.c" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 439 "wql.y" +#line 439 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_ival( ctx, (yyvsp[(1) - (1)].integer) ); + (yyval.expr) = expr_ival( ctx, (yyvsp[0].integer) ); if (!(yyval.expr)) YYABORT; } +#line 1788 "wql.tab.c" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 445 "wql.y" +#line 445 "wql.y" /* yacc.c:1646 */ { - (yyval.expr) = expr_sval( ctx, &(yyvsp[(1) - (1)].str) ); + (yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) ); if (!(yyval.expr)) YYABORT; } +#line 1798 "wql.tab.c" /* yacc.c:1646 */ break; case 35: - -/* Line 1806 of yacc.c */ -#line 451 "wql.y" +#line 451 "wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_bval( ctx, -1 ); if (!(yyval.expr)) YYABORT; } +#line 1808 "wql.tab.c" /* yacc.c:1646 */ break; case 36: - -/* Line 1806 of yacc.c */ -#line 457 "wql.y" +#line 457 "wql.y" /* yacc.c:1646 */ { (yyval.expr) = expr_bval( ctx, 0 ); if (!(yyval.expr)) YYABORT; } +#line 1818 "wql.tab.c" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 2022 "wql.tab.c" +#line 1822 "wql.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2028,7 +1828,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2043,9 +1843,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2096,20 +1896,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, ctx); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, ctx); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2128,7 +1928,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2141,35 +1941,37 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, ctx); + yystos[yystate], yyvsp, ctx); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2193,7 +1995,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2212,14 +2014,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, ctx); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, ctx); + yystos[*yyssp], yyvsp, ctx); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2230,14 +2032,9 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 464 "wql.y" +#line 464 "wql.y" /* yacc.c:1906 */ HRESULT parse_query( const WCHAR *str, struct view **view, struct list *mem ) @@ -2477,4 +2274,3 @@ static int wql_error( struct parser *parser, const char *str ) ERR("%s\n", str); return 0; } - diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 24c8e0622e3..b65f6e29c0c 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -206,7 +206,7 @@ reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to Wine-1.7.27 reactos/dll/win32/version # Synced to Wine-1.7.17 reactos/dll/win32/wbemdisp # Synced to Wine-1.7.17 -reactos/dll/win32/wbemprox # Synced to Wine-1.7.17 +reactos/dll/win32/wbemprox # Synced to Wine-1.7.27 reactos/dll/win32/wer # Autosync reactos/dll/win32/windowscodecs # Synced to Wine-1.7.17 reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.17