mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 13:38:19 +00:00
Sync to Wine-0.9.58
- Rob Shearman <rob@codeweavers.com> Thu, 14 Feb 2008 widl: Remove unused headers. - Rob Shearman <rob@codeweavers.com> Thu, 14 Feb 2008 widl: Guard the inclusion of unistd.h. - Rob Shearman <rob@codeweavers.com> Tue, 19 Feb 2008 Add the nounistd option to all lex source files. - Alexandre Julliard <julliard@winehq.org> Tue, 19 Feb 2008 Avoid the nounistd option that doesn't exist on older flex, define YY_NO_UNISTD_H... - Dan Hipschman <dsh@linux.ucla.edu> Thu, 21 Feb 2008 widl: Allow is_string_type to work for typedef'd types. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 22 Feb 2008 widl: Include <unistd.h> for prototype of unlink(). - Dan Hipschman <dsh@linux.ucla.edu> Wed, 19 Mar 2008 widl: Ignore libraries in imported IDL files. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 20 Mar 2008 widl: Make structures with FC_ENUM16 fields complex. svn path=/trunk/; revision=36394
This commit is contained in:
parent
1c1bfdafe2
commit
4a8d830f83
14 changed files with 909 additions and 901 deletions
|
@ -26,7 +26,7 @@ reactos/tools/wpp # Synced to Wine-0_9_5
|
|||
reactos/tools/winebuild # Synced to Wine-20071217
|
||||
reactos/tools/wmc # Synced to Wine-20071201
|
||||
reactos/tools/wrc # Synced to Wine-0_9_53
|
||||
reactos/tools/widl # Synced to Wine-0_9_55
|
||||
reactos/tools/widl # Synced to Wine-0_9_58
|
||||
|
||||
The following libraries are shared with Wine.
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "widl.h"
|
||||
#include "utils.h"
|
||||
|
|
|
@ -27,9 +27,7 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "widl.h"
|
||||
#include "utils.h"
|
||||
|
|
|
@ -78,7 +78,8 @@ static inline int last_array(const type_t *type)
|
|||
|
||||
static inline int is_string_type(const attr_list_t *attrs, const type_t *type)
|
||||
{
|
||||
return is_attr(attrs, ATTR_STRING) && (last_ptr(type) || last_array(type));
|
||||
return ((is_attr(attrs, ATTR_STRING) || is_attr(type->attrs, ATTR_STRING))
|
||||
&& (last_ptr(type) || last_array(type)));
|
||||
}
|
||||
|
||||
static inline int is_context_handle(const type_t *type)
|
||||
|
|
|
@ -44,8 +44,11 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)*
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define YY_NO_UNISTD_H
|
||||
#endif
|
||||
|
||||
#include "widl.h"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -320,6 +320,7 @@ imp_statements: {}
|
|||
| imp_statements moduledef { if (!parse_only) add_typelib_entry($2); }
|
||||
| imp_statements statement {}
|
||||
| imp_statements importlib {}
|
||||
| imp_statements librarydef {}
|
||||
;
|
||||
|
||||
int_statements: { $$ = NULL; }
|
||||
|
@ -363,12 +364,12 @@ importlib: tIMPORTLIB '(' aSTRING ')' { if(!parse_only) add_importlib($3); }
|
|||
|
||||
libraryhdr: tLIBRARY aIDENTIFIER { $$ = $2; }
|
||||
;
|
||||
library_start: attributes libraryhdr '{' { start_typelib($2, $1);
|
||||
library_start: attributes libraryhdr '{' { if (!parse_only) start_typelib($2, $1);
|
||||
if (!parse_only && do_header) write_library($2, $1);
|
||||
if (!parse_only && do_idfile) write_libid($2, $1);
|
||||
}
|
||||
;
|
||||
librarydef: library_start imp_statements '}' { end_typelib(); }
|
||||
librarydef: library_start imp_statements '}' { if (!parse_only) end_typelib(); }
|
||||
;
|
||||
|
||||
m_args: { $$ = NULL; }
|
||||
|
@ -1855,7 +1856,6 @@ static int get_struct_type(var_list_t *fields)
|
|||
case RPC_FC_FLOAT:
|
||||
case RPC_FC_DOUBLE:
|
||||
case RPC_FC_STRUCT:
|
||||
case RPC_FC_ENUM16:
|
||||
case RPC_FC_ENUM32:
|
||||
break;
|
||||
|
||||
|
@ -1906,6 +1906,7 @@ static int get_struct_type(var_list_t *fields)
|
|||
case RPC_FC_ENCAPSULATED_UNION:
|
||||
case RPC_FC_NON_ENCAPSULATED_UNION:
|
||||
case RPC_FC_BOGUS_STRUCT:
|
||||
case RPC_FC_ENUM16:
|
||||
return RPC_FC_BOGUS_STRUCT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -524,8 +524,11 @@ char *yytext;
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define YY_NO_UNISTD_H
|
||||
#endif
|
||||
|
||||
#include "widl.h"
|
||||
|
@ -583,7 +586,7 @@ UUID *parse_uuid(const char *u)
|
|||
* The flexer starts here
|
||||
**************************************************************************
|
||||
*/
|
||||
#line 587 "parser.yy.c"
|
||||
#line 590 "parser.yy.c"
|
||||
|
||||
/* Macros after this point can all be overridden by user definitions in
|
||||
* section 1.
|
||||
|
@ -737,9 +740,9 @@ YY_DECL
|
|||
register char *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
|
||||
#line 108 "parser.l"
|
||||
#line 111 "parser.l"
|
||||
|
||||
#line 743 "parser.yy.c"
|
||||
#line 746 "parser.yy.c"
|
||||
|
||||
if ( yy_init )
|
||||
{
|
||||
|
@ -825,12 +828,12 @@ do_action: /* This label is used only to access EOF actions. */
|
|||
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 109 "parser.l"
|
||||
#line 112 "parser.l"
|
||||
yy_push_state(PP_LINE);
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 110 "parser.l"
|
||||
#line 113 "parser.l"
|
||||
{
|
||||
int lineno;
|
||||
char *cptr, *fname;
|
||||
|
@ -853,12 +856,12 @@ YY_RULE_SETUP
|
|||
YY_BREAK
|
||||
case 3:
|
||||
YY_RULE_SETUP
|
||||
#line 129 "parser.l"
|
||||
#line 132 "parser.l"
|
||||
yy_push_state(QUOTE); cbufidx = 0;
|
||||
YY_BREAK
|
||||
case 4:
|
||||
YY_RULE_SETUP
|
||||
#line 130 "parser.l"
|
||||
#line 133 "parser.l"
|
||||
{
|
||||
yy_pop_state();
|
||||
parser_lval.str = get_buffered_cstring();
|
||||
|
@ -866,40 +869,40 @@ YY_RULE_SETUP
|
|||
}
|
||||
YY_BREAK
|
||||
case 5:
|
||||
#line 136 "parser.l"
|
||||
#line 139 "parser.l"
|
||||
case 6:
|
||||
YY_RULE_SETUP
|
||||
#line 136 "parser.l"
|
||||
#line 139 "parser.l"
|
||||
addcchar(yytext[1]);
|
||||
YY_BREAK
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
#line 137 "parser.l"
|
||||
#line 140 "parser.l"
|
||||
addcchar('\\'); addcchar(yytext[1]);
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
#line 138 "parser.l"
|
||||
#line 141 "parser.l"
|
||||
addcchar(yytext[0]);
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
#line 139 "parser.l"
|
||||
#line 142 "parser.l"
|
||||
yy_push_state(ATTR); return '[';
|
||||
YY_BREAK
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 140 "parser.l"
|
||||
#line 143 "parser.l"
|
||||
yy_pop_state(); return ']';
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
#line 141 "parser.l"
|
||||
#line 144 "parser.l"
|
||||
return attr_token(yytext);
|
||||
YY_BREAK
|
||||
case 12:
|
||||
YY_RULE_SETUP
|
||||
#line 142 "parser.l"
|
||||
#line 145 "parser.l"
|
||||
{
|
||||
parser_lval.uuid = parse_uuid(yytext);
|
||||
return aUUID;
|
||||
|
@ -907,7 +910,7 @@ YY_RULE_SETUP
|
|||
YY_BREAK
|
||||
case 13:
|
||||
YY_RULE_SETUP
|
||||
#line 146 "parser.l"
|
||||
#line 149 "parser.l"
|
||||
{
|
||||
parser_lval.num = strtoul(yytext, NULL, 0);
|
||||
return aHEXNUM;
|
||||
|
@ -915,7 +918,7 @@ YY_RULE_SETUP
|
|||
YY_BREAK
|
||||
case 14:
|
||||
YY_RULE_SETUP
|
||||
#line 150 "parser.l"
|
||||
#line 153 "parser.l"
|
||||
{
|
||||
parser_lval.num = strtoul(yytext, NULL, 0);
|
||||
return aNUM;
|
||||
|
@ -923,7 +926,7 @@ YY_RULE_SETUP
|
|||
YY_BREAK
|
||||
case 15:
|
||||
YY_RULE_SETUP
|
||||
#line 154 "parser.l"
|
||||
#line 157 "parser.l"
|
||||
{
|
||||
parser_lval.dbl = strtod(yytext, NULL);
|
||||
return aDOUBLE;
|
||||
|
@ -934,44 +937,44 @@ case 16:
|
|||
yy_c_buf_p = yy_cp -= 1;
|
||||
YY_DO_BEFORE_ACTION; /* set up yytext again */
|
||||
YY_RULE_SETUP
|
||||
#line 158 "parser.l"
|
||||
#line 161 "parser.l"
|
||||
return tSAFEARRAY;
|
||||
YY_BREAK
|
||||
case 17:
|
||||
YY_RULE_SETUP
|
||||
#line 159 "parser.l"
|
||||
#line 162 "parser.l"
|
||||
return kw_token(yytext);
|
||||
YY_BREAK
|
||||
case 18:
|
||||
YY_RULE_SETUP
|
||||
#line 160 "parser.l"
|
||||
#line 163 "parser.l"
|
||||
line_number++;
|
||||
YY_BREAK
|
||||
case 19:
|
||||
YY_RULE_SETUP
|
||||
#line 161 "parser.l"
|
||||
#line 164 "parser.l"
|
||||
|
||||
YY_BREAK
|
||||
case 20:
|
||||
YY_RULE_SETUP
|
||||
#line 162 "parser.l"
|
||||
#line 165 "parser.l"
|
||||
return SHL;
|
||||
YY_BREAK
|
||||
case 21:
|
||||
YY_RULE_SETUP
|
||||
#line 163 "parser.l"
|
||||
#line 166 "parser.l"
|
||||
return SHR;
|
||||
YY_BREAK
|
||||
case 22:
|
||||
YY_RULE_SETUP
|
||||
#line 164 "parser.l"
|
||||
#line 167 "parser.l"
|
||||
return yytext[0];
|
||||
YY_BREAK
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(QUOTE):
|
||||
case YY_STATE_EOF(ATTR):
|
||||
case YY_STATE_EOF(PP_LINE):
|
||||
#line 165 "parser.l"
|
||||
#line 168 "parser.l"
|
||||
{
|
||||
if (import_stack_ptr) {
|
||||
pop_import();
|
||||
|
@ -982,10 +985,10 @@ case YY_STATE_EOF(PP_LINE):
|
|||
YY_BREAK
|
||||
case 23:
|
||||
YY_RULE_SETUP
|
||||
#line 172 "parser.l"
|
||||
#line 175 "parser.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 989 "parser.yy.c"
|
||||
#line 992 "parser.yy.c"
|
||||
|
||||
case YY_END_OF_BUFFER:
|
||||
{
|
||||
|
@ -1871,7 +1874,7 @@ int main()
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
#line 172 "parser.l"
|
||||
#line 175 "parser.l"
|
||||
|
||||
|
||||
#ifndef parser_wrap
|
||||
|
|
|
@ -28,9 +28,7 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "widl.h"
|
||||
#include "utils.h"
|
||||
|
|
|
@ -27,9 +27,7 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "widl.h"
|
||||
#include "utils.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "widl.h"
|
||||
|
@ -2356,6 +2355,13 @@ static size_t process_tfs(FILE *file, const ifref_list_t *ifaces, type_pred_t pr
|
|||
{
|
||||
if (is_local(func->def->attrs)) continue;
|
||||
|
||||
if (!is_void(func->def->type))
|
||||
update_tfsoff(func->def->type,
|
||||
write_typeformatstring_var(
|
||||
file, 2, NULL, func->def->type,
|
||||
func->def, &typeformat_offset),
|
||||
file);
|
||||
|
||||
current_func = func;
|
||||
if (func->args)
|
||||
LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry )
|
||||
|
@ -2822,7 +2828,7 @@ static void write_remoting_arg(FILE *file, int indent, const func_t *func,
|
|||
fprintf(file, ";\n");
|
||||
}
|
||||
|
||||
if ((phase == PHASE_FREE) || (pointer_type == RPC_FC_UP))
|
||||
if (phase == PHASE_FREE || pass == PASS_RETURN || pointer_type == RPC_FC_UP)
|
||||
print_phase_function(file, indent, "Pointer", phase, var,
|
||||
start_offset - (type->size_is ? 4 : 2));
|
||||
else
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
|
|
|
@ -147,13 +147,13 @@ enum {
|
|||
static const char short_options[] =
|
||||
"cC:d:D:EhH:I:NpP:sS:tT:uU:VW";
|
||||
static const struct option long_options[] = {
|
||||
{ "dlldata", required_argument, 0, DLLDATA_OPTION },
|
||||
{ "dlldata-only", no_argument, 0, DLLDATA_ONLY_OPTION },
|
||||
{ "local-stubs", required_argument, 0, LOCAL_STUBS_OPTION },
|
||||
{ "oldnames", no_argument, 0, OLDNAMES_OPTION },
|
||||
{ "prefix-all", required_argument, 0, PREFIX_ALL_OPTION },
|
||||
{ "prefix-client", required_argument, 0, PREFIX_CLIENT_OPTION },
|
||||
{ "prefix-server", required_argument, 0, PREFIX_SERVER_OPTION },
|
||||
{ "dlldata", 1, 0, DLLDATA_OPTION },
|
||||
{ "dlldata-only", 0, 0, DLLDATA_ONLY_OPTION },
|
||||
{ "local-stubs", 1, 0, LOCAL_STUBS_OPTION },
|
||||
{ "oldnames", 0, 0, OLDNAMES_OPTION },
|
||||
{ "prefix-all", 1, 0, PREFIX_ALL_OPTION },
|
||||
{ "prefix-client", 1, 0, PREFIX_CLIENT_OPTION },
|
||||
{ "prefix-server", 1, 0, PREFIX_SERVER_OPTION },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -1450,7 +1450,6 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int
|
|||
i = 0;
|
||||
LIST_FOR_EACH_ENTRY( arg, func->args, var_t, entry )
|
||||
{
|
||||
const attr_t *attr;
|
||||
int paramflags = 0;
|
||||
int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) + i * 3;
|
||||
int *defaultdata = num_defaults ? typedata + 6 + extra_attr + i : NULL;
|
||||
|
|
Loading…
Reference in a new issue