mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 06:15:52 +00:00
[WIDL] Reduce diff to Wine-4.0
This commit is contained in:
parent
995e4c829a
commit
bba03c886c
7 changed files with 14 additions and 35 deletions
|
@ -35,7 +35,7 @@ list(APPEND SOURCE
|
|||
../port/getopt1.c
|
||||
../port/mkstemps.c)
|
||||
|
||||
add_definitions(-DINT16=SHORT)
|
||||
add_definitions(-DINT16=SHORT -DLANG_SCOTTISH_GAELIC=0x91)
|
||||
add_host_tool(widl ${SOURCE})
|
||||
target_link_libraries(widl PRIVATE host_includes wpphost)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
|
|
@ -543,10 +543,10 @@ unsigned int lhash_val_of_name_sys( syskind_t skind, LCID lcid, LPCSTR lpStr)
|
|||
case LANG_VIETNAMESE: case LANG_MALTESE: case LANG_IRISH:
|
||||
case LANG_SAMI: case LANG_UPPER_SORBIAN: case LANG_TSWANA:
|
||||
case LANG_XHOSA: case LANG_ZULU: case LANG_WELSH:
|
||||
case LANG_BRETON: case LANG_NEUTRAL:
|
||||
case LANG_BRETON: case LANG_SCOTTISH_GAELIC: case LANG_NEUTRAL:
|
||||
/* some languages not in all windows versions or ReactOS */
|
||||
#ifdef LANG_GAELIC
|
||||
case LANG_GAELIC:
|
||||
#ifdef LANG_MANX_GAELIC
|
||||
case LANG_MANX_GAELIC:
|
||||
#endif
|
||||
#ifdef LANG_TAJIK
|
||||
case LANG_TAJIK:
|
||||
|
|
|
@ -136,9 +136,7 @@ static struct namespace global_namespace = {
|
|||
|
||||
static struct namespace *current_namespace = &global_namespace;
|
||||
|
||||
#ifndef __REACTOS__
|
||||
static typelib_t *current_typelib;
|
||||
#endif
|
||||
|
||||
%}
|
||||
%union {
|
||||
|
|
|
@ -34,9 +34,7 @@
|
|||
#include "parser.h"
|
||||
#include "header.h"
|
||||
#include "typegen.h"
|
||||
#ifndef __REACTOS__
|
||||
#include "typelib.h"
|
||||
#endif
|
||||
|
||||
static int indent;
|
||||
|
||||
|
@ -276,7 +274,6 @@ void write_regscript( const statement_list_t *stmts )
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef __REACTOS__
|
||||
void write_typelib_regscript( const statement_list_t *stmts )
|
||||
{
|
||||
const statement_t *stmt;
|
||||
|
@ -289,17 +286,11 @@ void write_typelib_regscript( const statement_list_t *stmts )
|
|||
if (count && !strendswith( typelib_name, ".res" ))
|
||||
error( "Cannot store multiple typelibs into %s\n", typelib_name );
|
||||
else
|
||||
{
|
||||
if (do_old_typelib)
|
||||
create_sltg_typelib( stmt->u.lib );
|
||||
else
|
||||
create_msft_typelib( stmt->u.lib );
|
||||
}
|
||||
create_msft_typelib( stmt->u.lib );
|
||||
count++;
|
||||
}
|
||||
if (count && strendswith( typelib_name, ".res" )) flush_output_resources( typelib_name );
|
||||
}
|
||||
#endif
|
||||
|
||||
void output_typelib_regscript( const typelib_t *typelib )
|
||||
{
|
||||
|
@ -309,9 +300,7 @@ void output_typelib_regscript( const typelib_t *typelib )
|
|||
unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION );
|
||||
unsigned int flags = 0;
|
||||
char id_part[12] = "";
|
||||
#ifndef __REACTOS__
|
||||
char *resname = typelib_name;
|
||||
#endif
|
||||
expr_t *expr;
|
||||
|
||||
if (is_attr( typelib->attrs, ATTR_RESTRICTED )) flags |= 1; /* LIBFLAG_FRESTRICTED */
|
||||
|
@ -329,17 +318,14 @@ void output_typelib_regscript( const typelib_t *typelib )
|
|||
MAJORVERSION(version), MINORVERSION(version), descr ? descr : typelib->name );
|
||||
put_str( indent++, "{\n" );
|
||||
expr = get_attrp( typelib->attrs, ATTR_ID );
|
||||
#ifdef __REACTOS__
|
||||
if (expr)
|
||||
sprintf(id_part, "\\%d", expr->cval);
|
||||
#else
|
||||
if (expr)
|
||||
{
|
||||
sprintf(id_part, "\\%d", expr->cval);
|
||||
#ifndef __REACTOS__
|
||||
resname = xmalloc( strlen(typelib_name) + 20 );
|
||||
sprintf(resname, "%s\\%d", typelib_name, expr->cval);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
put_str( indent, "'%x' { %s = s '%%MODULE%%%s' }\n",
|
||||
lcid_expr ? lcid_expr->cval : 0, pointer_size == 8 ? "win64" : "win32", id_part );
|
||||
put_str( indent, "FLAGS = s '%u'\n", flags );
|
||||
|
@ -359,9 +345,6 @@ void output_typelib_regscript( const typelib_t *typelib )
|
|||
|
||||
write_progids( typelib->stmts );
|
||||
put_str( --indent, "}\n" );
|
||||
#ifdef __REACTOS__
|
||||
add_output_to_resources( "WINE_REGISTRY", typelib_name );
|
||||
#else
|
||||
|
||||
add_output_to_resources( "WINE_REGISTRY", resname );
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -96,9 +96,7 @@ extern void write_proxies(const statement_list_t *stmts);
|
|||
extern void write_client(const statement_list_t *stmts);
|
||||
extern void write_server(const statement_list_t *stmts);
|
||||
extern void write_regscript(const statement_list_t *stmts);
|
||||
#ifndef __REACTOS__
|
||||
extern void write_typelib_regscript(const statement_list_t *stmts);
|
||||
#endif
|
||||
extern void output_typelib_regscript( const typelib_t *typelib );
|
||||
extern void write_local_stubs(const statement_list_t *stmts);
|
||||
extern void write_dlldata(const statement_list_t *stmts);
|
||||
|
|
|
@ -900,7 +900,7 @@ static int encode_type(
|
|||
|
||||
if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) {
|
||||
int mix_field;
|
||||
|
||||
|
||||
if (target_type & 0x80000000) {
|
||||
mix_field = ((target_type >> 16) & 0x3fff) | VT_BYREF;
|
||||
} else {
|
||||
|
@ -936,7 +936,7 @@ static int encode_type(
|
|||
|
||||
if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) {
|
||||
int mix_field;
|
||||
|
||||
|
||||
if (target_type & 0x80000000) {
|
||||
mix_field = ((target_type >> 16) & VT_TYPEMASK) | VT_ARRAY;
|
||||
} else {
|
||||
|
@ -1551,7 +1551,7 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index)
|
|||
}
|
||||
|
||||
/* update the index data */
|
||||
typeinfo->func_indices[typeinfo->typeinfo->cElement & 0xffff] = id;
|
||||
typeinfo->func_indices[typeinfo->typeinfo->cElement & 0xffff] = id;
|
||||
typeinfo->func_offsets[typeinfo->typeinfo->cElement & 0xffff] = offset;
|
||||
typeinfo->func_names[typeinfo->typeinfo->cElement & 0xffff] = name_offset;
|
||||
|
||||
|
@ -1607,7 +1607,7 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var)
|
|||
unsigned int typedata_size;
|
||||
INT *typedata;
|
||||
unsigned int var_datawidth, var_alignment = 0;
|
||||
int var_type_size, var_kind = 0 /* VAR_PERINSTANCE */;
|
||||
int var_type_size, var_kind = 0 /* VAR_PERINSTANCE */;
|
||||
int alignment;
|
||||
int varflags = 0;
|
||||
const attr_t *attr;
|
||||
|
@ -2705,7 +2705,7 @@ int create_msft_typelib(typelib_t *typelib)
|
|||
set_help_context(msft);
|
||||
set_help_string_dll(msft);
|
||||
set_help_string_context(msft);
|
||||
|
||||
|
||||
/* midl adds two sets of custom data to the library: the current unix time
|
||||
and midl's version number */
|
||||
time_override = getenv( "WIDL_TIME_OVERRIDE");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue