mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +00:00
[WIDL] Sync with Wine Staging 1.9.11. CORE-11368
svn path=/trunk/; revision=71775
This commit is contained in:
parent
893c145538
commit
234f15fb5c
17 changed files with 4804 additions and 2733 deletions
|
@ -16,7 +16,7 @@ wine-patches@winehq.com and ros-dev@reactos.org
|
||||||
The following build tools are shared with Wine.
|
The following build tools are shared with Wine.
|
||||||
|
|
||||||
reactos/tools/unicode # Synced to WineStaging-1.9.11
|
reactos/tools/unicode # Synced to WineStaging-1.9.11
|
||||||
reactos/tools/widl # Synced to WineStaging-1.7.55
|
reactos/tools/widl # Synced to WineStaging-1.9.11
|
||||||
reactos/tools/wpp # Synced to WineStaging-1.9.4
|
reactos/tools/wpp # Synced to WineStaging-1.9.4
|
||||||
|
|
||||||
The following libraries are shared with Wine.
|
The following libraries are shared with Wine.
|
||||||
|
|
|
@ -26,6 +26,7 @@ list(APPEND SOURCE
|
||||||
utils.c
|
utils.c
|
||||||
widl.c
|
widl.c
|
||||||
write_msft.c
|
write_msft.c
|
||||||
|
write_sltg.c
|
||||||
parser.yy.c
|
parser.yy.c
|
||||||
parser.tab.c
|
parser.tab.c
|
||||||
port/mkstemps.c)
|
port/mkstemps.c)
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "header.h"
|
#include "header.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "typetree.h"
|
#include "typetree.h"
|
||||||
|
#include "typelib.h"
|
||||||
|
|
||||||
static int indentation = 0;
|
static int indentation = 0;
|
||||||
static int is_object_interface = 0;
|
static int is_object_interface = 0;
|
||||||
|
@ -1009,6 +1010,16 @@ void write_args(FILE *h, const var_list_t *args, const char *name, int method, i
|
||||||
/* Output default value only if all following arguments also have default value. */
|
/* Output default value only if all following arguments also have default value. */
|
||||||
LIST_FOR_EACH_ENTRY_REV( tail_arg, args, const var_t, entry ) {
|
LIST_FOR_EACH_ENTRY_REV( tail_arg, args, const var_t, entry ) {
|
||||||
if(tail_arg == arg) {
|
if(tail_arg == arg) {
|
||||||
|
expr_t bstr;
|
||||||
|
|
||||||
|
/* Fixup the expression type for a BSTR like midl does. */
|
||||||
|
if (get_type_vt(arg->type) == VT_BSTR && expr->type == EXPR_STRLIT)
|
||||||
|
{
|
||||||
|
bstr = *expr;
|
||||||
|
bstr.type = EXPR_WSTRLIT;
|
||||||
|
expr = &bstr;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(h, " = ");
|
fprintf(h, " = ");
|
||||||
write_expr( h, expr, 0, 1, NULL, NULL, "" );
|
write_expr( h, expr, 0, 1, NULL, NULL, "" );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -45,6 +45,9 @@ void pop_import(void);
|
||||||
|
|
||||||
int is_type(const char *name);
|
int is_type(const char *name);
|
||||||
|
|
||||||
|
int do_warning(char *toggle, warning_list_t *wnum);
|
||||||
|
int is_warning_enabled(int warning);
|
||||||
|
|
||||||
extern char *temp_name;
|
extern char *temp_name;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,6 +76,8 @@ static int cbufalloc = 0;
|
||||||
static int kw_token(const char *kw);
|
static int kw_token(const char *kw);
|
||||||
static int attr_token(const char *kw);
|
static int attr_token(const char *kw);
|
||||||
|
|
||||||
|
static warning_list_t *disabled_warnings = NULL;
|
||||||
|
|
||||||
#define MAX_IMPORT_DEPTH 10
|
#define MAX_IMPORT_DEPTH 10
|
||||||
struct {
|
struct {
|
||||||
YY_BUFFER_STATE state;
|
YY_BUFFER_STATE state;
|
||||||
|
@ -164,6 +166,7 @@ UUID *parse_uuid(const char *u)
|
||||||
yy_pop_state();
|
yy_pop_state();
|
||||||
}
|
}
|
||||||
<PP_PRAGMA>[^\n]* parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA;
|
<PP_PRAGMA>[^\n]* parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA;
|
||||||
|
<INITIAL>^{ws}*midl_pragma{ws}+warning return tPRAGMA_WARNING;
|
||||||
<INITIAL,ATTR>\" yy_push_state(QUOTE); cbufidx = 0;
|
<INITIAL,ATTR>\" yy_push_state(QUOTE); cbufidx = 0;
|
||||||
<QUOTE>\" {
|
<QUOTE>\" {
|
||||||
yy_pop_state();
|
yy_pop_state();
|
||||||
|
@ -555,3 +558,61 @@ void abort_import(void)
|
||||||
for (ptr=0; ptr<import_stack_ptr; ptr++)
|
for (ptr=0; ptr<import_stack_ptr; ptr++)
|
||||||
unlink(import_stack[ptr].temp_name);
|
unlink(import_stack[ptr].temp_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void warning_disable(int warning)
|
||||||
|
{
|
||||||
|
warning_t *warning_entry;
|
||||||
|
LIST_FOR_EACH_ENTRY(warning_entry, disabled_warnings, warning_t, entry)
|
||||||
|
if(warning_entry->num == warning)
|
||||||
|
return;
|
||||||
|
warning_entry = xmalloc( sizeof(*warning_entry) );
|
||||||
|
warning_entry->num = warning;
|
||||||
|
list_add_tail(disabled_warnings, &warning_entry->entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void warning_enable(int warning)
|
||||||
|
{
|
||||||
|
warning_t *warning_entry;
|
||||||
|
LIST_FOR_EACH_ENTRY(warning_entry, disabled_warnings, warning_t, entry)
|
||||||
|
if(warning_entry->num == warning)
|
||||||
|
{
|
||||||
|
list_remove(&warning_entry->entry);
|
||||||
|
free(warning_entry);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int do_warning(char *toggle, warning_list_t *wnum)
|
||||||
|
{
|
||||||
|
warning_t *warning, *next;
|
||||||
|
int ret = 1;
|
||||||
|
if(!disabled_warnings)
|
||||||
|
{
|
||||||
|
disabled_warnings = xmalloc( sizeof(*disabled_warnings) );
|
||||||
|
list_init( disabled_warnings );
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!strcmp(toggle, "disable"))
|
||||||
|
LIST_FOR_EACH_ENTRY(warning, wnum, warning_t, entry)
|
||||||
|
warning_disable(warning->num);
|
||||||
|
else if(!strcmp(toggle, "enable"))
|
||||||
|
LIST_FOR_EACH_ENTRY(warning, wnum, warning_t, entry)
|
||||||
|
warning_enable(warning->num);
|
||||||
|
else
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
|
LIST_FOR_EACH_ENTRY_SAFE(warning, next, wnum, warning_t, entry)
|
||||||
|
free(warning);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int is_warning_enabled(int warning)
|
||||||
|
{
|
||||||
|
warning_t *warning_entry;
|
||||||
|
if(!disabled_warnings)
|
||||||
|
return 1;
|
||||||
|
LIST_FOR_EACH_ENTRY(warning_entry, disabled_warnings, warning_t, entry)
|
||||||
|
if(warning_entry->num == warning)
|
||||||
|
return 0;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
||||||
/* A Bison parser, made by GNU Bison 3.0.2. */
|
/* A Bison parser, made by GNU Bison 3.0. */
|
||||||
|
|
||||||
/* Bison interface for Yacc-like parsers in C
|
/* Bison interface for Yacc-like parsers in C
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
This special exception was added by the Free Software Foundation in
|
This special exception was added by the Free Software Foundation in
|
||||||
version 2.2 of Bison. */
|
version 2.2 of Bison. */
|
||||||
|
|
||||||
#ifndef YY_PARSER_PARSER_TAB_H_INCLUDED
|
#ifndef YY_PARSER_E_REACTOS_SYNC_GCC_HOST_TOOLS_SDK_TOOLS_WIDL_PARSER_TAB_H_INCLUDED
|
||||||
# define YY_PARSER_PARSER_TAB_H_INCLUDED
|
# define YY_PARSER_E_REACTOS_SYNC_GCC_HOST_TOOLS_SDK_TOOLS_WIDL_PARSER_TAB_H_INCLUDED
|
||||||
/* Debug traces. */
|
/* Debug traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG 0
|
# define YYDEBUG 0
|
||||||
|
@ -169,65 +169,66 @@ extern int parser_debug;
|
||||||
tPARTIALIGNORE = 379,
|
tPARTIALIGNORE = 379,
|
||||||
tPASCAL = 380,
|
tPASCAL = 380,
|
||||||
tPOINTERDEFAULT = 381,
|
tPOINTERDEFAULT = 381,
|
||||||
tPROGID = 382,
|
tPRAGMA_WARNING = 382,
|
||||||
tPROPERTIES = 383,
|
tPROGID = 383,
|
||||||
tPROPGET = 384,
|
tPROPERTIES = 384,
|
||||||
tPROPPUT = 385,
|
tPROPGET = 385,
|
||||||
tPROPPUTREF = 386,
|
tPROPPUT = 386,
|
||||||
tPROXY = 387,
|
tPROPPUTREF = 387,
|
||||||
tPTR = 388,
|
tPROXY = 388,
|
||||||
tPUBLIC = 389,
|
tPTR = 389,
|
||||||
tRANGE = 390,
|
tPUBLIC = 390,
|
||||||
tREADONLY = 391,
|
tRANGE = 391,
|
||||||
tREF = 392,
|
tREADONLY = 392,
|
||||||
tREGISTER = 393,
|
tREF = 393,
|
||||||
tREPRESENTAS = 394,
|
tREGISTER = 394,
|
||||||
tREQUESTEDIT = 395,
|
tREPRESENTAS = 395,
|
||||||
tRESTRICTED = 396,
|
tREQUESTEDIT = 396,
|
||||||
tRETVAL = 397,
|
tRESTRICTED = 397,
|
||||||
tSAFEARRAY = 398,
|
tRETVAL = 398,
|
||||||
tSHORT = 399,
|
tSAFEARRAY = 399,
|
||||||
tSIGNED = 400,
|
tSHORT = 400,
|
||||||
tSIZEIS = 401,
|
tSIGNED = 401,
|
||||||
tSIZEOF = 402,
|
tSIZEIS = 402,
|
||||||
tSMALL = 403,
|
tSIZEOF = 403,
|
||||||
tSOURCE = 404,
|
tSMALL = 404,
|
||||||
tSTATIC = 405,
|
tSOURCE = 405,
|
||||||
tSTDCALL = 406,
|
tSTATIC = 406,
|
||||||
tSTRICTCONTEXTHANDLE = 407,
|
tSTDCALL = 407,
|
||||||
tSTRING = 408,
|
tSTRICTCONTEXTHANDLE = 408,
|
||||||
tSTRUCT = 409,
|
tSTRING = 409,
|
||||||
tSWITCH = 410,
|
tSTRUCT = 410,
|
||||||
tSWITCHIS = 411,
|
tSWITCH = 411,
|
||||||
tSWITCHTYPE = 412,
|
tSWITCHIS = 412,
|
||||||
tTHREADING = 413,
|
tSWITCHTYPE = 413,
|
||||||
tTRANSMITAS = 414,
|
tTHREADING = 414,
|
||||||
tTRUE = 415,
|
tTRANSMITAS = 415,
|
||||||
tTYPEDEF = 416,
|
tTRUE = 416,
|
||||||
tUIDEFAULT = 417,
|
tTYPEDEF = 417,
|
||||||
tUNION = 418,
|
tUIDEFAULT = 418,
|
||||||
tUNIQUE = 419,
|
tUNION = 419,
|
||||||
tUNSIGNED = 420,
|
tUNIQUE = 420,
|
||||||
tUSESGETLASTERROR = 421,
|
tUNSIGNED = 421,
|
||||||
tUSERMARSHAL = 422,
|
tUSESGETLASTERROR = 422,
|
||||||
tUUID = 423,
|
tUSERMARSHAL = 423,
|
||||||
tV1ENUM = 424,
|
tUUID = 424,
|
||||||
tVARARG = 425,
|
tV1ENUM = 425,
|
||||||
tVERSION = 426,
|
tVARARG = 426,
|
||||||
tVIPROGID = 427,
|
tVERSION = 427,
|
||||||
tVOID = 428,
|
tVIPROGID = 428,
|
||||||
tWCHAR = 429,
|
tVOID = 429,
|
||||||
tWIREMARSHAL = 430,
|
tWCHAR = 430,
|
||||||
tAPARTMENT = 431,
|
tWIREMARSHAL = 431,
|
||||||
tNEUTRAL = 432,
|
tAPARTMENT = 432,
|
||||||
tSINGLE = 433,
|
tNEUTRAL = 433,
|
||||||
tFREE = 434,
|
tSINGLE = 434,
|
||||||
tBOTH = 435,
|
tFREE = 435,
|
||||||
CAST = 436,
|
tBOTH = 436,
|
||||||
PPTR = 437,
|
CAST = 437,
|
||||||
POS = 438,
|
PPTR = 438,
|
||||||
NEG = 439,
|
POS = 439,
|
||||||
ADDRESSOF = 440
|
NEG = 440,
|
||||||
|
ADDRESSOF = 441
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -236,7 +237,7 @@ extern int parser_debug;
|
||||||
typedef union YYSTYPE YYSTYPE;
|
typedef union YYSTYPE YYSTYPE;
|
||||||
union YYSTYPE
|
union YYSTYPE
|
||||||
{
|
{
|
||||||
#line 137 "parser.y" /* yacc.c:1909 */
|
#line 138 "parser.y" /* yacc.c:1909 */
|
||||||
|
|
||||||
attr_t *attr;
|
attr_t *attr;
|
||||||
attr_list_t *attr_list;
|
attr_list_t *attr_list;
|
||||||
|
@ -251,6 +252,8 @@ union YYSTYPE
|
||||||
declarator_list_t *declarator_list;
|
declarator_list_t *declarator_list;
|
||||||
statement_t *statement;
|
statement_t *statement;
|
||||||
statement_list_t *stmt_list;
|
statement_list_t *stmt_list;
|
||||||
|
warning_t *warning;
|
||||||
|
warning_list_t *warning_list;
|
||||||
ifref_t *ifref;
|
ifref_t *ifref;
|
||||||
ifref_list_t *ifref_list;
|
ifref_list_t *ifref_list;
|
||||||
char *str;
|
char *str;
|
||||||
|
@ -263,7 +266,7 @@ union YYSTYPE
|
||||||
struct _decl_spec_t *declspec;
|
struct _decl_spec_t *declspec;
|
||||||
enum storage_class stgclass;
|
enum storage_class stgclass;
|
||||||
|
|
||||||
#line 267 "parser.tab.h" /* yacc.c:1909 */
|
#line 270 "parser.tab.h" /* yacc.c:1909 */
|
||||||
};
|
};
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
|
@ -274,4 +277,4 @@ extern YYSTYPE parser_lval;
|
||||||
|
|
||||||
int parser_parse (void);
|
int parser_parse (void);
|
||||||
|
|
||||||
#endif /* !YY_PARSER_PARSER_TAB_H_INCLUDED */
|
#endif /* !YY_PARSER_E_REACTOS_SYNC_GCC_HOST_TOOLS_SDK_TOOLS_WIDL_PARSER_TAB_H_INCLUDED */
|
||||||
|
|
|
@ -83,6 +83,7 @@ static declarator_t *make_declarator(var_t *var);
|
||||||
static type_t *make_safearray(type_t *type);
|
static type_t *make_safearray(type_t *type);
|
||||||
static typelib_t *make_library(const char *name, const attr_list_t *attrs);
|
static typelib_t *make_library(const char *name, const attr_list_t *attrs);
|
||||||
static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type);
|
static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type);
|
||||||
|
static warning_list_t *append_warning(warning_list_t *, int);
|
||||||
|
|
||||||
static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs);
|
static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs);
|
||||||
static type_t *find_type_or_error(const char *name, int t);
|
static type_t *find_type_or_error(const char *name, int t);
|
||||||
|
@ -148,6 +149,8 @@ static struct namespace *current_namespace = &global_namespace;
|
||||||
declarator_list_t *declarator_list;
|
declarator_list_t *declarator_list;
|
||||||
statement_t *statement;
|
statement_t *statement;
|
||||||
statement_list_t *stmt_list;
|
statement_list_t *stmt_list;
|
||||||
|
warning_t *warning;
|
||||||
|
warning_list_t *warning_list;
|
||||||
ifref_t *ifref;
|
ifref_t *ifref;
|
||||||
ifref_list_t *ifref_list;
|
ifref_list_t *ifref_list;
|
||||||
char *str;
|
char *str;
|
||||||
|
@ -224,6 +227,7 @@ static struct namespace *current_namespace = &global_namespace;
|
||||||
%token tOUT
|
%token tOUT
|
||||||
%token tPARTIALIGNORE tPASCAL
|
%token tPARTIALIGNORE tPASCAL
|
||||||
%token tPOINTERDEFAULT
|
%token tPOINTERDEFAULT
|
||||||
|
%token tPRAGMA_WARNING
|
||||||
%token tPROGID tPROPERTIES
|
%token tPROGID tPROPERTIES
|
||||||
%token tPROPGET tPROPPUT tPROPPUTREF
|
%token tPROPGET tPROPPUT tPROPPUTREF
|
||||||
%token tPROXY tPTR
|
%token tPROXY tPTR
|
||||||
|
@ -291,8 +295,9 @@ static struct namespace *current_namespace = &global_namespace;
|
||||||
%type <uuid> uuid_string
|
%type <uuid> uuid_string
|
||||||
%type <import> import_start
|
%type <import> import_start
|
||||||
%type <typelib> library_start librarydef
|
%type <typelib> library_start librarydef
|
||||||
%type <statement> statement typedef
|
%type <statement> statement typedef pragma_warning
|
||||||
%type <stmt_list> gbl_statements imp_statements int_statements
|
%type <stmt_list> gbl_statements imp_statements int_statements
|
||||||
|
%type <warning_list> warnings
|
||||||
|
|
||||||
%left ','
|
%left ','
|
||||||
%right '?' ':'
|
%right '?' ':'
|
||||||
|
@ -373,6 +378,22 @@ statement:
|
||||||
| import { $$ = make_statement_import($1); }
|
| import { $$ = make_statement_import($1); }
|
||||||
| typedef ';' { $$ = $1; }
|
| typedef ';' { $$ = $1; }
|
||||||
| aPRAGMA { $$ = make_statement_pragma($1); }
|
| aPRAGMA { $$ = make_statement_pragma($1); }
|
||||||
|
| pragma_warning { $$ = NULL; }
|
||||||
|
;
|
||||||
|
|
||||||
|
pragma_warning: tPRAGMA_WARNING '(' aIDENTIFIER ':' warnings ')'
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
$$ = NULL;
|
||||||
|
result = do_warning($3, $5);
|
||||||
|
if(!result)
|
||||||
|
error_loc("expected \"disable\" or \"enable\"\n");
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
warnings:
|
||||||
|
aNUM { $$ = append_warning(NULL, $1); }
|
||||||
|
| warnings aNUM { $$ = append_warning($1, $2); }
|
||||||
;
|
;
|
||||||
|
|
||||||
typedecl:
|
typedecl:
|
||||||
|
@ -1413,6 +1434,21 @@ static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type)
|
||||||
return ptrchain;
|
return ptrchain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static warning_list_t *append_warning(warning_list_t *list, int num)
|
||||||
|
{
|
||||||
|
warning_t *entry;
|
||||||
|
|
||||||
|
if(!list)
|
||||||
|
{
|
||||||
|
list = xmalloc( sizeof(*list) );
|
||||||
|
list_init( list );
|
||||||
|
}
|
||||||
|
entry = xmalloc( sizeof(*entry) );
|
||||||
|
entry->num = num;
|
||||||
|
list_add_tail( list, &entry->entry );
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl,
|
static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl,
|
||||||
int top)
|
int top)
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -247,7 +247,10 @@ void end_typelib(void)
|
||||||
{
|
{
|
||||||
if (!typelib) return;
|
if (!typelib) return;
|
||||||
|
|
||||||
create_msft_typelib(typelib);
|
if (do_old_typelib)
|
||||||
|
create_sltg_typelib(typelib);
|
||||||
|
else
|
||||||
|
create_msft_typelib(typelib);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tlb_read(int fd, void *buf, int count)
|
static void tlb_read(int fd, void *buf, int count)
|
||||||
|
|
|
@ -85,4 +85,5 @@ enum VARENUM {
|
||||||
extern unsigned short get_type_vt(type_t *t);
|
extern unsigned short get_type_vt(type_t *t);
|
||||||
|
|
||||||
extern int create_msft_typelib(typelib_t *typelib);
|
extern int create_msft_typelib(typelib_t *typelib);
|
||||||
|
extern int create_sltg_typelib(typelib_t *typelib);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -215,7 +215,7 @@ typedef struct {
|
||||||
|
|
||||||
/* after this may follow an array with default value pointers if the
|
/* after this may follow an array with default value pointers if the
|
||||||
* appropriate bit in the FKCCIC field has been set:
|
* appropriate bit in the FKCCIC field has been set:
|
||||||
* INT oDefautlValue[nrargs];
|
* INT oDefaultValue[nrargs];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Parameter info one per argument*/
|
/* Parameter info one per argument*/
|
||||||
|
|
|
@ -65,6 +65,7 @@ static const char usage[] =
|
||||||
" -m32, -m64 Set the kind of typelib to build (Win32 or Win64)\n"
|
" -m32, -m64 Set the kind of typelib to build (Win32 or Win64)\n"
|
||||||
" -N Do not preprocess input\n"
|
" -N Do not preprocess input\n"
|
||||||
" --oldnames Use old naming conventions\n"
|
" --oldnames Use old naming conventions\n"
|
||||||
|
" --oldtlb Use old typelib (SLTG) format\n"
|
||||||
" -o, --output=NAME Set the output file name\n"
|
" -o, --output=NAME Set the output file name\n"
|
||||||
" -Otype Type of stubs to generate (-Os, -Oi, -Oif)\n"
|
" -Otype Type of stubs to generate (-Os, -Oi, -Oif)\n"
|
||||||
" -p Generate proxy\n"
|
" -p Generate proxy\n"
|
||||||
|
@ -103,6 +104,7 @@ int do_everything = 1;
|
||||||
static int preprocess_only = 0;
|
static int preprocess_only = 0;
|
||||||
int do_header = 0;
|
int do_header = 0;
|
||||||
int do_typelib = 0;
|
int do_typelib = 0;
|
||||||
|
int do_old_typelib = 0;
|
||||||
int do_proxies = 0;
|
int do_proxies = 0;
|
||||||
int do_client = 0;
|
int do_client = 0;
|
||||||
int do_server = 0;
|
int do_server = 0;
|
||||||
|
@ -163,7 +165,8 @@ enum {
|
||||||
WIN64_OPTION,
|
WIN64_OPTION,
|
||||||
WIN32_ALIGN_OPTION,
|
WIN32_ALIGN_OPTION,
|
||||||
WIN64_ALIGN_OPTION,
|
WIN64_ALIGN_OPTION,
|
||||||
APP_CONFIG_OPTION
|
APP_CONFIG_OPTION,
|
||||||
|
OLD_TYPELIB_OPTION
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char short_options[] =
|
static const char short_options[] =
|
||||||
|
@ -185,6 +188,7 @@ static const struct option long_options[] = {
|
||||||
{ "win32-align", 1, NULL, WIN32_ALIGN_OPTION },
|
{ "win32-align", 1, NULL, WIN32_ALIGN_OPTION },
|
||||||
{ "win64-align", 1, NULL, WIN64_ALIGN_OPTION },
|
{ "win64-align", 1, NULL, WIN64_ALIGN_OPTION },
|
||||||
{ "app_config", 0, NULL, APP_CONFIG_OPTION },
|
{ "app_config", 0, NULL, APP_CONFIG_OPTION },
|
||||||
|
{ "oldtlb", 0, NULL, OLD_TYPELIB_OPTION },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -306,6 +310,7 @@ static void set_everything(int x)
|
||||||
{
|
{
|
||||||
do_header = x;
|
do_header = x;
|
||||||
do_typelib = x;
|
do_typelib = x;
|
||||||
|
do_old_typelib = x;
|
||||||
do_proxies = x;
|
do_proxies = x;
|
||||||
do_client = x;
|
do_client = x;
|
||||||
do_server = x;
|
do_server = x;
|
||||||
|
@ -691,6 +696,9 @@ int main(int argc,char *argv[])
|
||||||
do_everything = 0;
|
do_everything = 0;
|
||||||
do_typelib = 1;
|
do_typelib = 1;
|
||||||
break;
|
break;
|
||||||
|
case OLD_TYPELIB_OPTION:
|
||||||
|
do_old_typelib = 1;
|
||||||
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
typelib_name = xstrdup(optarg);
|
typelib_name = xstrdup(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -38,6 +38,7 @@ extern int pedantic;
|
||||||
extern int do_everything;
|
extern int do_everything;
|
||||||
extern int do_header;
|
extern int do_header;
|
||||||
extern int do_typelib;
|
extern int do_typelib;
|
||||||
|
extern int do_old_typelib;
|
||||||
extern int do_proxies;
|
extern int do_proxies;
|
||||||
extern int do_client;
|
extern int do_client;
|
||||||
extern int do_server;
|
extern int do_server;
|
||||||
|
|
|
@ -21,15 +21,6 @@
|
||||||
#ifndef __WIDL_WIDLTYPES_H
|
#ifndef __WIDL_WIDLTYPES_H
|
||||||
#define __WIDL_WIDLTYPES_H
|
#define __WIDL_WIDLTYPES_H
|
||||||
|
|
||||||
#define S_OK 0
|
|
||||||
#define S_FALSE 1
|
|
||||||
#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
|
|
||||||
#define TYPE_E_IOERROR ((HRESULT)0x80028CA2L)
|
|
||||||
|
|
||||||
#ifndef max
|
|
||||||
#define max(a, b) ((a) > (b) ? a : b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "guiddef.h"
|
#include "guiddef.h"
|
||||||
|
@ -60,6 +51,7 @@ typedef struct _user_type_t context_handle_t;
|
||||||
typedef struct _user_type_t generic_handle_t;
|
typedef struct _user_type_t generic_handle_t;
|
||||||
typedef struct _type_list_t type_list_t;
|
typedef struct _type_list_t type_list_t;
|
||||||
typedef struct _statement_t statement_t;
|
typedef struct _statement_t statement_t;
|
||||||
|
typedef struct _warning_t warning_t;
|
||||||
|
|
||||||
typedef struct list attr_list_t;
|
typedef struct list attr_list_t;
|
||||||
typedef struct list str_list_t;
|
typedef struct list str_list_t;
|
||||||
|
@ -72,6 +64,7 @@ typedef struct list user_type_list_t;
|
||||||
typedef struct list context_handle_list_t;
|
typedef struct list context_handle_list_t;
|
||||||
typedef struct list generic_handle_list_t;
|
typedef struct list generic_handle_list_t;
|
||||||
typedef struct list statement_list_t;
|
typedef struct list statement_list_t;
|
||||||
|
typedef struct list warning_list_t;
|
||||||
|
|
||||||
enum attr_type
|
enum attr_type
|
||||||
{
|
{
|
||||||
|
@ -547,6 +540,11 @@ struct _statement_t {
|
||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _warning_t {
|
||||||
|
int num;
|
||||||
|
struct list entry;
|
||||||
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SYS_WIN16,
|
SYS_WIN16,
|
||||||
SYS_WIN32,
|
SYS_WIN32,
|
||||||
|
|
|
@ -50,6 +50,12 @@
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "typetree.h"
|
#include "typetree.h"
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
#define S_OK 0
|
||||||
|
#define S_FALSE 1
|
||||||
|
#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
|
||||||
|
#endif
|
||||||
|
|
||||||
enum MSFT_segment_index {
|
enum MSFT_segment_index {
|
||||||
MSFT_SEG_TYPEINFO = 0, /* type information */
|
MSFT_SEG_TYPEINFO = 0, /* type information */
|
||||||
MSFT_SEG_IMPORTINFO, /* import information */
|
MSFT_SEG_IMPORTINFO, /* import information */
|
||||||
|
@ -502,7 +508,7 @@ static int ctl2_alloc_guid(
|
||||||
offset = ctl2_find_guid(typelib, hash_key, &guid->guid);
|
offset = ctl2_find_guid(typelib, hash_key, &guid->guid);
|
||||||
if (offset != -1)
|
if (offset != -1)
|
||||||
{
|
{
|
||||||
if (pedantic)
|
if (is_warning_enabled(2368))
|
||||||
warning("duplicate uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
|
warning("duplicate uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
|
||||||
guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
|
guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
|
||||||
guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
|
guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
|
||||||
|
|
1859
reactos/sdk/tools/widl/write_sltg.c
Normal file
1859
reactos/sdk/tools/widl/write_sltg.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue