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
2761fc91
Commit
2761fc91
authored
Nov 01, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add __int32 type support.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2172855f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
3 deletions
+21
-3
expr.c
tools/widl/expr.c
+2
-0
header.c
tools/widl/header.c
+7
-0
parser.l
tools/widl/parser.l
+1
-0
parser.y
tools/widl/parser.y
+5
-2
typegen.c
tools/widl/typegen.c
+3
-1
typelib.c
tools/widl/typelib.c
+1
-0
typetree.c
tools/widl/typetree.c
+1
-0
widltypes.h
tools/widl/widltypes.h
+1
-0
No files found.
tools/widl/expr.c
View file @
2761fc91
...
@@ -50,6 +50,7 @@ static int is_integer_type(const type_t *type)
...
@@ -50,6 +50,7 @@ static int is_integer_type(const type_t *type)
case
TYPE_BASIC_INT64
:
case
TYPE_BASIC_INT64
:
case
TYPE_BASIC_INT
:
case
TYPE_BASIC_INT
:
case
TYPE_BASIC_INT3264
:
case
TYPE_BASIC_INT3264
:
case
TYPE_BASIC_LONG
:
case
TYPE_BASIC_CHAR
:
case
TYPE_BASIC_CHAR
:
case
TYPE_BASIC_HYPER
:
case
TYPE_BASIC_HYPER
:
case
TYPE_BASIC_BYTE
:
case
TYPE_BASIC_BYTE
:
...
@@ -82,6 +83,7 @@ static int is_signed_integer_type(const type_t *type)
...
@@ -82,6 +83,7 @@ static int is_signed_integer_type(const type_t *type)
case
TYPE_BASIC_INT64
:
case
TYPE_BASIC_INT64
:
case
TYPE_BASIC_INT
:
case
TYPE_BASIC_INT
:
case
TYPE_BASIC_INT3264
:
case
TYPE_BASIC_INT3264
:
case
TYPE_BASIC_LONG
:
return
type_basic_get_sign
(
type
)
<
0
;
return
type_basic_get_sign
(
type
)
<
0
;
case
TYPE_BASIC_CHAR
:
case
TYPE_BASIC_CHAR
:
return
TRUE
;
return
TRUE
;
...
...
tools/widl/header.c
View file @
2761fc91
...
@@ -369,6 +369,7 @@ void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly)
...
@@ -369,6 +369,7 @@ void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly)
case
TYPE_BASIC
:
case
TYPE_BASIC
:
if
(
type_basic_get_type
(
t
)
!=
TYPE_BASIC_INT32
&&
if
(
type_basic_get_type
(
t
)
!=
TYPE_BASIC_INT32
&&
type_basic_get_type
(
t
)
!=
TYPE_BASIC_INT64
&&
type_basic_get_type
(
t
)
!=
TYPE_BASIC_INT64
&&
type_basic_get_type
(
t
)
!=
TYPE_BASIC_LONG
&&
type_basic_get_type
(
t
)
!=
TYPE_BASIC_HYPER
)
type_basic_get_type
(
t
)
!=
TYPE_BASIC_HYPER
)
{
{
if
(
type_basic_get_sign
(
t
)
<
0
)
fprintf
(
h
,
"signed "
);
if
(
type_basic_get_sign
(
t
)
<
0
)
fprintf
(
h
,
"signed "
);
...
@@ -389,6 +390,12 @@ void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly)
...
@@ -389,6 +390,12 @@ void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly)
case
TYPE_BASIC_HANDLE
:
fprintf
(
h
,
"handle_t"
);
break
;
case
TYPE_BASIC_HANDLE
:
fprintf
(
h
,
"handle_t"
);
break
;
case
TYPE_BASIC_INT32
:
case
TYPE_BASIC_INT32
:
if
(
type_basic_get_sign
(
t
)
>
0
)
if
(
type_basic_get_sign
(
t
)
>
0
)
fprintf
(
h
,
"UINT32"
);
else
fprintf
(
h
,
"INT32"
);
break
;
case
TYPE_BASIC_LONG
:
if
(
type_basic_get_sign
(
t
)
>
0
)
fprintf
(
h
,
"ULONG"
);
fprintf
(
h
,
"ULONG"
);
else
else
fprintf
(
h
,
"LONG"
);
fprintf
(
h
,
"LONG"
);
...
...
tools/widl/parser.l
View file @
2761fc91
...
@@ -250,6 +250,7 @@ static const struct keyword keywords[] = {
...
@@ -250,6 +250,7 @@ static const struct keyword keywords[] = {
{"TRUE", tTRUE},
{"TRUE", tTRUE},
{"__cdecl", tCDECL},
{"__cdecl", tCDECL},
{"__fastcall", tFASTCALL},
{"__fastcall", tFASTCALL},
{"__int32", tINT32},
{"__int3264", tINT3264},
{"__int3264", tINT3264},
{"__int64", tINT64},
{"__int64", tINT64},
{"__pascal", tPASCAL},
{"__pascal", tPASCAL},
...
...
tools/widl/parser.y
View file @
2761fc91
...
@@ -208,7 +208,7 @@ static typelib_t *current_typelib;
...
@@ -208,7 +208,7 @@ static typelib_t *current_typelib;
%token tIMPORT tIMPORTLIB
%token tIMPORT tIMPORTLIB
%token tIN tIN_LINE tINLINE
%token tIN tIN_LINE tINLINE
%token tINPUTSYNC
%token tINPUTSYNC
%token tINT tINT3264 tINT64
%token tINT tINT32
tINT32
64 tINT64
%token tINTERFACE
%token tINTERFACE
%token tLCID
%token tLCID
%token tLENGTHIS tLIBRARY
%token tLENGTHIS tLIBRARY
...
@@ -815,10 +815,11 @@ m_int:
...
@@ -815,10 +815,11 @@ m_int:
int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); }
int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); }
| tSHORT m_int { $$ = type_new_int(TYPE_BASIC_INT16, 0); }
| tSHORT m_int { $$ = type_new_int(TYPE_BASIC_INT16, 0); }
| tSMALL { $$ = type_new_int(TYPE_BASIC_INT8, 0); }
| tSMALL { $$ = type_new_int(TYPE_BASIC_INT8, 0); }
| tLONG m_int { $$ = type_new_int(TYPE_BASIC_
INT32
, 0); }
| tLONG m_int { $$ = type_new_int(TYPE_BASIC_
LONG
, 0); }
| tHYPER m_int { $$ = type_new_int(TYPE_BASIC_HYPER, 0); }
| tHYPER m_int { $$ = type_new_int(TYPE_BASIC_HYPER, 0); }
| tINT64 { $$ = type_new_int(TYPE_BASIC_INT64, 0); }
| tINT64 { $$ = type_new_int(TYPE_BASIC_INT64, 0); }
| tCHAR { $$ = type_new_int(TYPE_BASIC_CHAR, 0); }
| tCHAR { $$ = type_new_int(TYPE_BASIC_CHAR, 0); }
| tINT32 { $$ = type_new_int(TYPE_BASIC_INT32, 0); }
| tINT3264 { $$ = type_new_int(TYPE_BASIC_INT3264, 0); }
| tINT3264 { $$ = type_new_int(TYPE_BASIC_INT3264, 0); }
;
;
...
@@ -1408,6 +1409,7 @@ static int is_allowed_range_type(const type_t *type)
...
@@ -1408,6 +1409,7 @@ static int is_allowed_range_type(const type_t *type)
case TYPE_BASIC_INT64:
case TYPE_BASIC_INT64:
case TYPE_BASIC_INT:
case TYPE_BASIC_INT:
case TYPE_BASIC_INT3264:
case TYPE_BASIC_INT3264:
case TYPE_BASIC_LONG:
case TYPE_BASIC_BYTE:
case TYPE_BASIC_BYTE:
case TYPE_BASIC_CHAR:
case TYPE_BASIC_CHAR:
case TYPE_BASIC_WCHAR:
case TYPE_BASIC_WCHAR:
...
@@ -2399,6 +2401,7 @@ static int is_allowed_conf_type(const type_t *type)
...
@@ -2399,6 +2401,7 @@ static int is_allowed_conf_type(const type_t *type)
case TYPE_BASIC_INT32:
case TYPE_BASIC_INT32:
case TYPE_BASIC_INT64:
case TYPE_BASIC_INT64:
case TYPE_BASIC_INT:
case TYPE_BASIC_INT:
case TYPE_BASIC_LONG:
case TYPE_BASIC_CHAR:
case TYPE_BASIC_CHAR:
case TYPE_BASIC_HYPER:
case TYPE_BASIC_HYPER:
case TYPE_BASIC_BYTE:
case TYPE_BASIC_BYTE:
...
...
tools/widl/typegen.c
View file @
2761fc91
...
@@ -208,7 +208,8 @@ unsigned char get_basic_fc(const type_t *type)
...
@@ -208,7 +208,8 @@ unsigned char get_basic_fc(const type_t *type)
{
{
case
TYPE_BASIC_INT8
:
return
(
sign
<=
0
?
FC_SMALL
:
FC_USMALL
);
case
TYPE_BASIC_INT8
:
return
(
sign
<=
0
?
FC_SMALL
:
FC_USMALL
);
case
TYPE_BASIC_INT16
:
return
(
sign
<=
0
?
FC_SHORT
:
FC_USHORT
);
case
TYPE_BASIC_INT16
:
return
(
sign
<=
0
?
FC_SHORT
:
FC_USHORT
);
case
TYPE_BASIC_INT32
:
return
(
sign
<=
0
?
FC_LONG
:
FC_ULONG
);
case
TYPE_BASIC_INT32
:
case
TYPE_BASIC_LONG
:
return
(
sign
<=
0
?
FC_LONG
:
FC_ULONG
);
case
TYPE_BASIC_INT64
:
return
FC_HYPER
;
case
TYPE_BASIC_INT64
:
return
FC_HYPER
;
case
TYPE_BASIC_INT
:
return
(
sign
<=
0
?
FC_LONG
:
FC_ULONG
);
case
TYPE_BASIC_INT
:
return
(
sign
<=
0
?
FC_LONG
:
FC_ULONG
);
case
TYPE_BASIC_INT3264
:
return
(
sign
<=
0
?
FC_INT3264
:
FC_UINT3264
);
case
TYPE_BASIC_INT3264
:
return
(
sign
<=
0
?
FC_INT3264
:
FC_UINT3264
);
...
@@ -234,6 +235,7 @@ static unsigned char get_basic_fc_signed(const type_t *type)
...
@@ -234,6 +235,7 @@ static unsigned char get_basic_fc_signed(const type_t *type)
case
TYPE_BASIC_INT64
:
return
FC_HYPER
;
case
TYPE_BASIC_INT64
:
return
FC_HYPER
;
case
TYPE_BASIC_INT
:
return
FC_LONG
;
case
TYPE_BASIC_INT
:
return
FC_LONG
;
case
TYPE_BASIC_INT3264
:
return
FC_INT3264
;
case
TYPE_BASIC_INT3264
:
return
FC_INT3264
;
case
TYPE_BASIC_LONG
:
return
FC_LONG
;
case
TYPE_BASIC_BYTE
:
return
FC_BYTE
;
case
TYPE_BASIC_BYTE
:
return
FC_BYTE
;
case
TYPE_BASIC_CHAR
:
return
FC_CHAR
;
case
TYPE_BASIC_CHAR
:
return
FC_CHAR
;
case
TYPE_BASIC_WCHAR
:
return
FC_WCHAR
;
case
TYPE_BASIC_WCHAR
:
return
FC_WCHAR
;
...
...
tools/widl/typelib.c
View file @
2761fc91
...
@@ -156,6 +156,7 @@ unsigned short get_type_vt(type_t *t)
...
@@ -156,6 +156,7 @@ unsigned short get_type_vt(type_t *t)
else
else
return
VT_INT
;
return
VT_INT
;
case
TYPE_BASIC_INT32
:
case
TYPE_BASIC_INT32
:
case
TYPE_BASIC_LONG
:
case
TYPE_BASIC_ERROR_STATUS_T
:
case
TYPE_BASIC_ERROR_STATUS_T
:
if
(
type_basic_get_sign
(
t
)
>
0
)
if
(
type_basic_get_sign
(
t
)
>
0
)
return
VT_UI4
;
return
VT_UI4
;
...
...
tools/widl/typetree.c
View file @
2761fc91
...
@@ -377,6 +377,7 @@ static int is_valid_bitfield_type(const type_t *type)
...
@@ -377,6 +377,7 @@ static int is_valid_bitfield_type(const type_t *type)
case
TYPE_BASIC_INT64
:
case
TYPE_BASIC_INT64
:
case
TYPE_BASIC_INT
:
case
TYPE_BASIC_INT
:
case
TYPE_BASIC_INT3264
:
case
TYPE_BASIC_INT3264
:
case
TYPE_BASIC_LONG
:
case
TYPE_BASIC_CHAR
:
case
TYPE_BASIC_CHAR
:
case
TYPE_BASIC_HYPER
:
case
TYPE_BASIC_HYPER
:
case
TYPE_BASIC_BYTE
:
case
TYPE_BASIC_BYTE
:
...
...
tools/widl/widltypes.h
View file @
2761fc91
...
@@ -265,6 +265,7 @@ enum type_basic_type
...
@@ -265,6 +265,7 @@ enum type_basic_type
TYPE_BASIC_INT64
,
TYPE_BASIC_INT64
,
TYPE_BASIC_INT
,
TYPE_BASIC_INT
,
TYPE_BASIC_INT3264
,
TYPE_BASIC_INT3264
,
TYPE_BASIC_LONG
,
TYPE_BASIC_CHAR
,
TYPE_BASIC_CHAR
,
TYPE_BASIC_HYPER
,
TYPE_BASIC_HYPER
,
TYPE_BASIC_BYTE
,
TYPE_BASIC_BYTE
,
...
...
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