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
ea97b39a
Commit
ea97b39a
authored
Aug 13, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid dependencies on y.tab.h.
parent
60067579
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
26 deletions
+42
-26
header.c
tools/widl/header.c
+3
-4
parser.y
tools/widl/parser.y
+20
-20
proxy.c
tools/widl/proxy.c
+0
-1
widltypes.h
tools/widl/widltypes.h
+19
-1
No files found.
tools/widl/header.c
View file @
ea97b39a
...
...
@@ -33,7 +33,6 @@
#include "parser.h"
#include "header.h"
#include "proxy.h"
#include "y.tab.h"
static
int
indentation
=
0
;
...
...
@@ -177,7 +176,7 @@ void write_typedef(type_t *type, var_t *names)
int
is_object
(
attr_t
*
a
)
{
while
(
a
)
{
if
(
a
->
type
==
t
OBJECT
)
return
1
;
if
(
a
->
type
==
ATTR_
OBJECT
)
return
1
;
a
=
NEXT_LINK
(
a
);
}
return
0
;
...
...
@@ -186,7 +185,7 @@ int is_object(attr_t *a)
int
is_local
(
attr_t
*
a
)
{
while
(
a
)
{
if
(
a
->
type
==
t
LOCAL
)
return
1
;
if
(
a
->
type
==
ATTR_
LOCAL
)
return
1
;
a
=
NEXT_LINK
(
a
);
}
return
0
;
...
...
@@ -195,7 +194,7 @@ int is_local(attr_t *a)
var_t
*
is_callas
(
attr_t
*
a
)
{
while
(
a
)
{
if
(
a
->
type
==
t
CALLAS
)
return
a
->
u
.
pval
;
if
(
a
->
type
==
ATTR_
CALLAS
)
return
a
->
u
.
pval
;
a
=
NEXT_LINK
(
a
);
}
return
NULL
;
...
...
tools/widl/parser.y
View file @
ea97b39a
...
...
@@ -61,9 +61,9 @@
# endif
#endif
static attr_t *make_attr(
int
type);
static attr_t *make_attrv(
int
type, DWORD val);
static attr_t *make_attrp(
int
type, void *val);
static attr_t *make_attr(
enum attr_type
type);
static attr_t *make_attrv(
enum attr_type
type, DWORD val);
static attr_t *make_attrp(
enum attr_type
type, void *val);
static type_t *make_type(BYTE type, type_t *ref);
static typeref_t *make_tref(char *name, type_t *ref);
static typeref_t *uniq_tref(typeref_t *ref);
...
...
@@ -253,30 +253,30 @@ attrib_list: attribute
;
attribute:
tASYNC { $$ = make_attr(
t
ASYNC); }
| tCALLAS '(' ident ')' { $$ = make_attrp(
t
CALLAS, $3); }
tASYNC { $$ = make_attr(
ATTR_
ASYNC); }
| tCALLAS '(' ident ')' { $$ = make_attrp(
ATTR_
CALLAS, $3); }
| tCASE '(' expr_list ')' { $$ = NULL; }
| tCONTEXTHANDLE { $$ = NULL; }
| tCONTEXTHANDLENOSERIALIZE { $$ = NULL; }
| tCONTEXTHANDLESERIALIZE { $$ = NULL; }
| tDEFAULT { $$ = make_attr(
t
DEFAULT); }
| tIIDIS '(' ident ')' { $$ = make_attrp(
t
IIDIS, $3); }
| tIN { $$ = make_attr(
t
IN); }
| tDEFAULT { $$ = make_attr(
ATTR_
DEFAULT); }
| tIIDIS '(' ident ')' { $$ = make_attrp(
ATTR_
IIDIS, $3); }
| tIN { $$ = make_attr(
ATTR_
IN); }
| tLENGTHIS '(' aexprs ')' { $$ = NULL; }
| tLOCAL { $$ = make_attr(
t
LOCAL); }
| tOBJECT { $$ = make_attr(
t
OBJECT); }
| tOLEAUTOMATION { $$ = make_attr(
t
OLEAUTOMATION); }
| tOUT { $$ = make_attr(
t
OUT); }
| tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(
t
POINTERDEFAULT, $3); }
| tLOCAL { $$ = make_attr(
ATTR_
LOCAL); }
| tOBJECT { $$ = make_attr(
ATTR_
OBJECT); }
| tOLEAUTOMATION { $$ = make_attr(
ATTR_
OLEAUTOMATION); }
| tOUT { $$ = make_attr(
ATTR_
OUT); }
| tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(
ATTR_
POINTERDEFAULT, $3); }
| tSIZEIS '(' aexprs ')' { $$ = NULL; }
| tSTRING { $$ = make_attr(
t
STRING); }
| tSTRING { $$ = make_attr(
ATTR_
STRING); }
| tSWITCHIS '(' aexpr ')' { $$ = NULL; }
| tSWITCHTYPE '(' type ')' { $$ = NULL; }
| tUUID '(' aUUID ')' { $$ = NULL; }
| tV1ENUM { $$ = make_attr(
t
V1ENUM); }
| tV1ENUM { $$ = make_attr(
ATTR_
V1ENUM); }
| tVERSION '(' version ')' { $$ = NULL; }
| tWIREMARSHAL '(' type ')' { $$ = make_attrp(
t
WIREMARSHAL, type_ref($3)); }
| pointer_type { $$ = make_attrv(
t
POINTERTYPE, $1); }
| tWIREMARSHAL '(' type ')' { $$ = make_attrp(
ATTR_
WIREMARSHAL, type_ref($3)); }
| pointer_type { $$ = make_attrv(
ATTR_
POINTERTYPE, $1); }
;
callconv:
...
...
@@ -464,7 +464,7 @@ version:
%%
static attr_t *make_attr(
int
type)
static attr_t *make_attr(
enum attr_type
type)
{
attr_t *a = xmalloc(sizeof(attr_t));
a->type = type;
...
...
@@ -472,7 +472,7 @@ static attr_t *make_attr(int type)
return a;
}
static attr_t *make_attrv(
int
type, DWORD val)
static attr_t *make_attrv(
enum attr_type
type, DWORD val)
{
attr_t *a = xmalloc(sizeof(attr_t));
a->type = type;
...
...
@@ -480,7 +480,7 @@ static attr_t *make_attrv(int type, DWORD val)
return a;
}
static attr_t *make_attrp(
int
type, void *val)
static attr_t *make_attrp(
enum attr_type
type, void *val)
{
attr_t *a = xmalloc(sizeof(attr_t));
a->type = type;
...
...
tools/widl/proxy.c
View file @
ea97b39a
...
...
@@ -32,7 +32,6 @@
#include "utils.h"
#include "parser.h"
#include "header.h"
#include "y.tab.h"
/* FIXME: support generation of stubless proxies */
...
...
tools/widl/widltypes.h
View file @
ea97b39a
...
...
@@ -43,8 +43,26 @@ typedef struct _func_t func_t;
#define NEXT_LINK(x) ((x)->l_next)
#define PREV_LINK(x) ((x)->l_prev)
enum
attr_type
{
ATTR_ASYNC
,
ATTR_CALLAS
,
ATTR_DEFAULT
,
ATTR_IIDIS
,
ATTR_IN
,
ATTR_LOCAL
,
ATTR_OBJECT
,
ATTR_OLEAUTOMATION
,
ATTR_OUT
,
ATTR_POINTERDEFAULT
,
ATTR_POINTERTYPE
,
ATTR_STRING
,
ATTR_V1ENUM
,
ATTR_WIREMARSHAL
,
};
struct
_attr_t
{
int
type
;
enum
attr_type
type
;
union
{
DWORD
ival
;
void
*
pval
;
...
...
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