Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cfa54572
Commit
cfa54572
authored
Oct 08, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Oct 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Allow quoted UUIDs.
parent
e31d8d8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
parser.l
tools/widl/parser.l
+1
-1
parser.y
tools/widl/parser.y
+25
-1
utils.h
tools/widl/utils.h
+3
-0
No files found.
tools/widl/parser.l
View file @
cfa54572
...
@@ -78,7 +78,7 @@ int import_stack_ptr = 0;
...
@@ -78,7 +78,7 @@ int import_stack_ptr = 0;
static void pop_import(void);
static void pop_import(void);
static UUID* parse_uuid(const char
*u)
UUID *parse_uuid(const char
*u)
{
{
UUID* uuid = xmalloc(sizeof(UUID));
UUID* uuid = xmalloc(sizeof(UUID));
char b[3];
char b[3];
...
...
tools/widl/parser.y
View file @
cfa54572
...
@@ -265,6 +265,7 @@ static void check_all_user_types(ifref_list_t *ifaces);
...
@@ -265,6 +265,7 @@ static void check_all_user_types(ifref_list_t *ifaces);
%type <type> coclass coclasshdr coclassdef
%type <type> coclass coclasshdr coclassdef
%type <num> pointer_type version
%type <num> pointer_type version
%type <str> libraryhdr
%type <str> libraryhdr
%type <uuid> uuid_string
%left ','
%left ','
%right '?' ':'
%right '?' ':'
...
@@ -498,7 +499,7 @@ attribute: { $$ = NULL; }
...
@@ -498,7 +499,7 @@ attribute: { $$ = NULL; }
| tSWITCHIS '(' expr ')' { $$ = make_attrp(ATTR_SWITCHIS, $3); }
| tSWITCHIS '(' expr ')' { $$ = make_attrp(ATTR_SWITCHIS, $3); }
| tSWITCHTYPE '(' type ')' { $$ = make_attrp(ATTR_SWITCHTYPE, $3); }
| tSWITCHTYPE '(' type ')' { $$ = make_attrp(ATTR_SWITCHTYPE, $3); }
| tTRANSMITAS '(' type ')' { $$ = make_attrp(ATTR_TRANSMITAS, $3); }
| tTRANSMITAS '(' type ')' { $$ = make_attrp(ATTR_TRANSMITAS, $3); }
| tUUID '('
aUUID ')'
{ $$ = make_attrp(ATTR_UUID, $3); }
| tUUID '('
uuid_string ')'
{ $$ = make_attrp(ATTR_UUID, $3); }
| tV1ENUM { $$ = make_attr(ATTR_V1ENUM); }
| tV1ENUM { $$ = make_attr(ATTR_V1ENUM); }
| tVARARG { $$ = make_attr(ATTR_VARARG); }
| tVARARG { $$ = make_attr(ATTR_VARARG); }
| tVERSION '(' version ')' { $$ = make_attrv(ATTR_VERSION, $3); }
| tVERSION '(' version ')' { $$ = make_attrv(ATTR_VERSION, $3); }
...
@@ -506,6 +507,12 @@ attribute: { $$ = NULL; }
...
@@ -506,6 +507,12 @@ attribute: { $$ = NULL; }
| pointer_type { $$ = make_attrv(ATTR_POINTERTYPE, $1); }
| pointer_type { $$ = make_attrv(ATTR_POINTERTYPE, $1); }
;
;
uuid_string:
aUUID
| aSTRING { if (!is_valid_uuid($1))
yyerror("invalid UUID: %s", $1);
$$ = parse_uuid($1); }
callconv:
callconv:
| tSTDCALL
| tSTDCALL
;
;
...
@@ -2037,3 +2044,20 @@ static void check_all_user_types(ifref_list_t *ifrefs)
...
@@ -2037,3 +2044,20 @@ static void check_all_user_types(ifref_list_t *ifrefs)
check_for_user_types_and_context_handles(f->args);
check_for_user_types_and_context_handles(f->args);
}
}
}
}
int is_valid_uuid(const char *s)
{
int i;
for (i = 0; i < 36; ++i)
if (i == 8 || i == 13 || i == 18 || i == 23)
{
if (s[i] != '-')
return FALSE;
}
else
if (!isxdigit(s[i]))
return FALSE;
return s[i] == '\0';
}
tools/widl/utils.h
View file @
cfa54572
...
@@ -42,4 +42,7 @@ void chat(const char *s, ...) __attribute__((format (printf, 1, 2)));
...
@@ -42,4 +42,7 @@ void chat(const char *s, ...) __attribute__((format (printf, 1, 2)));
char
*
dup_basename
(
const
char
*
name
,
const
char
*
ext
);
char
*
dup_basename
(
const
char
*
name
,
const
char
*
ext
);
UUID
*
parse_uuid
(
const
char
*
u
);
int
is_valid_uuid
(
const
char
*
s
);
#endif
#endif
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