Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
cc9a07f1
Commit
cc9a07f1
authored
Feb 07, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add a string list type and use it for the endpoint attribute.
parent
24ded9e6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
parser.y
tools/widl/parser.y
+24
-1
widltypes.h
tools/widl/widltypes.h
+7
-0
No files found.
tools/widl/parser.y
View file @
cc9a07f1
...
...
@@ -64,6 +64,7 @@
# endif
#endif
static str_list_t *append_str(str_list_t *list, char *str);
static attr_list_t *append_attr(attr_list_t *list, attr_t *attr);
static attr_t *make_attr(enum attr_type type);
static attr_t *make_attrv(enum attr_type type, unsigned long val);
...
...
@@ -122,6 +123,7 @@ static void check_arg(var_t *arg);
%union {
attr_t *attr;
attr_list_t *attr_list;
str_list_t *str_list;
expr_t *expr;
expr_list_t *expr_list;
array_dims_t *array_dims;
...
...
@@ -223,6 +225,7 @@ static void check_arg(var_t *arg);
%type <attr> attribute
%type <attr_list> m_attributes attributes attrib_list
%type <str_list> str_list
%type <expr> m_expr expr expr_const
%type <expr_list> m_exprs /* exprs expr_list */ expr_list_const
%type <array_dims> array array_list
...
...
@@ -386,6 +389,10 @@ attrib_list: attribute { $$ = append_attr( NULL, $1 );
| attrib_list ']' '[' attribute { $$ = append_attr( $1, $4 ); }
;
str_list: aSTRING { $$ = append_str( NULL, $1 ); }
| str_list ',' aSTRING { $$ = append_str( $1, $3 ); }
;
attribute: { $$ = NULL; }
| tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); }
| tAPPOBJECT { $$ = make_attr(ATTR_APPOBJECT); }
...
...
@@ -406,7 +413,7 @@ attribute: { $$ = NULL; }
| tDISPLAYBIND { $$ = make_attr(ATTR_DISPLAYBIND); }
| tDLLNAME '(' aSTRING ')' { $$ = make_attrp(ATTR_DLLNAME, $3); }
| tDUAL { $$ = make_attr(ATTR_DUAL); }
| tENDPOINT '('
aSTRING
')' { $$ = make_attrp(ATTR_ENDPOINT, $3); }
| tENDPOINT '('
str_list
')' { $$ = make_attrp(ATTR_ENDPOINT, $3); }
| tENTRY '(' aSTRING ')' { $$ = make_attrp(ATTR_ENTRY_STRING, $3); }
| tENTRY '(' expr_const ')' { $$ = make_attrp(ATTR_ENTRY_ORDINAL, $3); }
| tEXPLICITHANDLE { $$ = make_attr(ATTR_EXPLICIT_HANDLE); }
...
...
@@ -907,6 +914,22 @@ void init_types(void)
decl_builtin("handle_t", RPC_FC_BIND_PRIMITIVE);
}
static str_list_t *append_str(str_list_t *list, char *str)
{
struct str_list_entry_t *entry;
if (!str) return list;
if (!list)
{
list = xmalloc( sizeof(*list) );
list_init( list );
}
entry = xmalloc( sizeof(*entry) );
entry->str = str;
list_add_tail( list, &entry->entry );
return list;
}
static attr_list_t *append_attr(attr_list_t *list, attr_t *attr)
{
if (!attr) return list;
...
...
tools/widl/widltypes.h
View file @
cc9a07f1
...
...
@@ -47,6 +47,7 @@ typedef struct _importinfo_t importinfo_t;
typedef
struct
_typelib_t
typelib_t
;
typedef
struct
list
attr_list_t
;
typedef
struct
list
str_list_t
;
typedef
struct
list
func_list_t
;
typedef
struct
list
expr_list_t
;
typedef
struct
list
var_list_t
;
...
...
@@ -162,6 +163,12 @@ enum type_kind
TKIND_MAX
};
struct
str_list_entry_t
{
char
*
str
;
struct
list
entry
;
};
struct
_attr_t
{
enum
attr_type
type
;
union
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment