[VBSCRIPT] Sync with Wine Staging 3.3. CORE-14434

This commit is contained in:
Amine Khaldi 2018-03-24 13:09:01 +01:00
parent 79d934d0a1
commit 9f8faabac0
20 changed files with 481 additions and 411 deletions

View file

@ -15,7 +15,7 @@ list(APPEND SOURCE
vbregexp.c
vbscript.c
vbscript_main.c
vbscript.h)
precomp.h)
list(APPEND vbscript_rc_deps
${CMAKE_CURRENT_SOURCE_DIR}/vbscript_classes.rgs
@ -39,5 +39,5 @@ set_module_type(vbscript win32dll)
target_link_libraries(vbscript uuid wine)
add_importlibs(vbscript oleaut32 ole32 user32 msvcrt kernel32 ntdll)
add_dependencies(vbscript vbscript_idlheader stdole2)
add_pch(vbscript vbscript.h SOURCE)
add_pch(vbscript precomp.h SOURCE)
add_cd_file(TARGET vbscript DESTINATION reactos/system32 FOR all)

View file

@ -16,8 +16,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "vbscript.h"
#include <assert.h>
#include "vbscript.h"
#include "parse.h"
#include "parser.tab.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
WINE_DECLARE_DEBUG_CHANNEL(vbscript_disas);
typedef struct _statement_ctx_t {

View file

@ -16,11 +16,22 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "vbscript.h"
#include <assert.h>
#include <math.h>
#include "vbscript.h"
#include "vbscript_defs.h"
#include "mshtmhst.h"
#include "objsafe.h"
#include "wine/debug.h"
#ifdef __REACTOS__
#include <wingdi.h>
#include <mshtmhst.h>
#endif
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
#define VB_E_CANNOT_CREATE_OBJ 0x800a01ad
#define VB_E_MK_PARSE_ERROR 0x800a01b0

View file

@ -16,8 +16,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <assert.h>
#include "vbscript.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
static DISPID propput_dispid = DISPID_PROPERTYPUT;
typedef struct {

View file

@ -16,11 +16,19 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <limits.h>
#include "vbscript.h"
#include "parse.h"
#include "parser.tab.h"
#include <wine/config.h>
#include <wine/port.h>
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
static const WCHAR andW[] = {'a','n','d',0};
static const WCHAR byrefW[] = {'b','y','r','e','f',0};

View file

@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma once
typedef enum {
EXPR_ADD,
EXPR_AND,

File diff suppressed because it is too large Load diff

View file

@ -30,8 +30,8 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED
# define YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED
#ifndef YY_PARSER_E_REACTOSSYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED
# define YY_PARSER_E_REACTOSSYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@ -121,7 +121,7 @@ extern int parser_debug;
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
#line 83 "parser.y" /* yacc.c:1909 */
#line 88 "parser.y" /* yacc.c:1909 */
const WCHAR *string;
statement_t *statement;
@ -150,4 +150,4 @@ union YYSTYPE
int parser_parse (parser_ctx_t *ctx);
#endif /* !YY_PARSER_E_REACTOSSYNC3_0_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED */
#endif /* !YY_PARSER_E_REACTOSSYNC_GCC_DLL_WIN32_VBSCRIPT_PARSER_TAB_H_INCLUDED */

View file

@ -19,6 +19,11 @@
%{
#include "vbscript.h"
#include "parse.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
static int parser_error(parser_ctx_t *,const char*);

View file

@ -0,0 +1,21 @@
#ifndef _VBSCRIPT_PRECOMP_H
#define _VBSCRIPT_PRECOMP_H
#include <assert.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include "vbscript.h"
#include <objsafe.h>
#include <wine/debug.h>
#include "parse.h"
#include "regexp.h"
#include "vbscript_defs.h"
#endif /* !_VBSCRIPT_PRECOMP_H */

View file

@ -31,7 +31,14 @@
* the Initial Developer. All Rights Reserved.
*/
#include <assert.h>
#include "vbscript.h"
#include "regexp.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
/* FIXME: Better error handling */
#define ReportRegExpError(a,b,c)

View file

@ -31,6 +31,8 @@
* the Initial Developer. All Rights Reserved.
*/
#pragma once
#define REG_FOLD 0x01 /* fold uppercase to lowercase */
#define REG_GLOB 0x02 /* global exec, creates array of matches */
#define REG_MULTILINE 0x04 /* treat ^ and $ as begin and end of line */

View file

@ -18,6 +18,10 @@
#include "vbscript.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
typedef struct {
IEnumVARIANT IEnumVARIANT_iface;

View file

@ -16,8 +16,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <assert.h>
#include "vbscript.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
#define FDEX_VERSION_MASK 0xf0000000
static inline BOOL is_func_id(vbdisp_t *This, DISPID id)
@ -549,7 +555,7 @@ static IDispatchExVtbl DispatchExVtbl = {
static inline vbdisp_t *unsafe_impl_from_IDispatch(IDispatch *iface)
{
return iface->lpVtbl == (IDispatchVtbl*)&DispatchExVtbl
? CONTAINING_RECORD(iface, vbdisp_t, IDispatchEx_iface)
? CONTAINING_RECORD((IDispatchEx *)iface, vbdisp_t, IDispatchEx_iface)
: NULL;
}

View file

@ -17,9 +17,12 @@
*/
#include "vbscript.h"
#include "regexp.h"
#include "vbsregexp55.h"
#include <initguid.h>
#include <vbsregexp55.h>
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
#define REGEXP_TID_LIST \
XDIID(RegExp2), \

View file

@ -16,9 +16,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "vbscript.h"
#include <vbscript_classes.h>
#include <assert.h>
#include "vbscript.h"
#include "objsafe.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
#ifdef _WIN64

View file

@ -16,31 +16,26 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _VBSCRIPT_H
#define _VBSCRIPT_H
#pragma once
#include <assert.h>
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <oleauto.h>
#include <objsafe.h>
#include <dispex.h>
#include <activscp.h>
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "dispex.h"
#include "activscp.h"
#include <wine/debug.h>
#include <wine/list.h>
#include <wine/unicode.h>
#ifdef __REACTOS__
#include <initguid.h>
#endif
#include "vbscript_classes.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/unicode.h"
typedef struct {
void **blocks;
@ -441,26 +436,6 @@ HRESULT create_safearray_iter(SAFEARRAY *sa, IEnumVARIANT **ev) DECLSPEC_HIDDEN;
HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT WINAPI VBScriptRegExpFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
}
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size)
{
return HeapReAlloc(GetProcessHeap(), 0, mem, size);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
static inline LPWSTR heap_strdupW(LPCWSTR str)
{
LPWSTR ret = NULL;
@ -480,9 +455,3 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
#define VBSCRIPT_BUILD_VERSION 16978
#define VBSCRIPT_MAJOR_VERSION 5
#define VBSCRIPT_MINOR_VERSION 8
#include "parse.h"
#include "regexp.h"
#include "vbscript_defs.h"
#endif /* _VBSCRIPT_H */

View file

@ -39,4 +39,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define WINE_PRODUCTVERSION 5,8,0,16978
#define WINE_PRODUCTVERSION_STR "5.8.7601.16978"
#include <wine/wine_common_ver.rc>
#include "wine/wine_common_ver.rc"

View file

@ -16,15 +16,23 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "initguid.h"
#include "vbscript.h"
#include "objsafe.h"
#include "mshtmhst.h"
#include "rpcproxy.h"
#include "vbscript_classes.h"
#include "vbsglobal.h"
#include "vbsregexp55.h"
#include <rpcproxy.h>
#include <initguid.h>
#include <vbscript_classes.h>
#include <vbsglobal.h>
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
WINE_DECLARE_DEBUG_CHANNEL(heap);
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
static HINSTANCE vbscript_hinstance;
static ITypeLib *typelib;

View file

@ -191,7 +191,7 @@ reactos/dll/win32/url # Synced to WineStaging-3.3
reactos/dll/win32/urlmon # Synced to WineStaging-3.3
reactos/dll/win32/usp10 # Synced to WineStaging-3.3
reactos/dll/win32/uxtheme # Forked
reactos/dll/win32/vbscript # Synced to Wine-3.0
reactos/dll/win32/vbscript # Synced to WineStaging-3.3
reactos/dll/win32/version # Synced to Wine-3.0
reactos/dll/win32/vssapi # Synced to WineStaging-2.9
reactos/dll/win32/wbemdisp # Synced to Wine-3.0