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
864d5a38
Commit
864d5a38
authored
Feb 07, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Increment the type format string when writing the pointer
layouts. Write out pointer layouts for structures.
parent
0d22347f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
4 deletions
+72
-4
typegen.c
tools/widl/typegen.c
+72
-4
No files found.
tools/widl/typegen.c
View file @
864d5a38
...
...
@@ -786,8 +786,11 @@ static size_t write_array_tfs(FILE *file, const attr_t *attrs,
{
print_file
(
file
,
2
,
"0x%x, /* FC_PP */
\n
"
,
RPC_FC_PP
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
*
typestring_offset
+=
2
;
*
typestring_offset
=
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
print_file
(
file
,
2
,
"0x%x, /* FC_END */
\n
"
,
RPC_FC_END
);
*
typestring_offset
+=
1
;
}
print_file
(
file
,
2
,
"0x0, /* FIXME: write out conversion data */
\n
"
);
...
...
@@ -837,8 +840,11 @@ static size_t write_array_tfs(FILE *file, const attr_t *attrs,
{
print_file
(
file
,
2
,
"0x%x, /* FC_PP */
\n
"
,
RPC_FC_PP
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
*
typestring_offset
+=
2
;
*
typestring_offset
+=
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
print_file
(
file
,
2
,
"0x%x, /* FC_END */
\n
"
,
RPC_FC_END
);
*
typestring_offset
+=
1
;
}
print_file
(
file
,
2
,
"0x0, /* FIXME: write out conversion data */
\n
"
);
...
...
@@ -867,8 +873,11 @@ static size_t write_array_tfs(FILE *file, const attr_t *attrs,
{
print_file
(
file
,
2
,
"0x%x, /* FC_PP */
\n
"
,
RPC_FC_PP
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
*
typestring_offset
+=
2
;
*
typestring_offset
+=
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
print_file
(
file
,
2
,
"0x%x, /* FC_END */
\n
"
,
RPC_FC_END
);
*
typestring_offset
+=
1
;
}
print_file
(
file
,
2
,
"0x0, /* FIXME: write out conversion data */
\n
"
);
...
...
@@ -900,8 +909,11 @@ static size_t write_array_tfs(FILE *file, const attr_t *attrs,
{
print_file
(
file
,
2
,
"0x%x, /* FC_PP */
\n
"
,
RPC_FC_PP
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
*
typestring_offset
+=
2
;
*
typestring_offset
+=
write_pointer_description
(
file
,
attrs
,
type
,
0
,
array
,
0
,
pointer_start_offset
);
print_file
(
file
,
2
,
"0x%x, /* FC_END */
\n
"
,
RPC_FC_END
);
*
typestring_offset
+=
1
;
}
print_file
(
file
,
2
,
"0x0, /* FIXME: write out conversion data */
\n
"
);
...
...
@@ -934,16 +946,25 @@ static size_t write_struct_tfs(FILE *file, const type_t *type,
const
var_t
*
array
;
size_t
start_offset
;
size_t
array_offset
;
size_t
pointer_offset
;
switch
(
type
->
type
)
{
case
RPC_FC_STRUCT
:
case
RPC_FC_PSTRUCT
:
total_size
=
type_memsize
(
type
,
0
,
NULL
);
if
(
total_size
>
USHRT_MAX
)
error
(
"structure size for parameter %s exceeds %d bytes by %d bytes
\n
"
,
name
,
USHRT_MAX
,
total_size
-
USHRT_MAX
);
if
(
type
->
type
==
RPC_FC_PSTRUCT
)
{
pointer_offset
=
*
typestring_offset
;
write_pointers
(
file
,
NULL
,
type
,
0
,
NULL
,
0
,
typestring_offset
);
}
else
pointer_offset
=
0
;
/* silence warning */
start_offset
=
*
typestring_offset
;
WRITE_FCTYPE
(
file
,
FC_STRUCT
,
*
typestring_offset
);
/* alignment */
...
...
@@ -952,6 +973,17 @@ static size_t write_struct_tfs(FILE *file, const type_t *type,
print_file
(
file
,
2
,
"NdrShort(0x%x), /* %u */
\n
"
,
total_size
,
total_size
);
*
typestring_offset
+=
4
;
if
(
type
->
type
==
RPC_FC_PSTRUCT
)
{
print_file
(
file
,
2
,
"0x%x, /* FC_PP */
\n
"
,
RPC_FC_PP
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
*
typestring_offset
+=
2
;
*
typestring_offset
+=
write_pointer_description
(
file
,
NULL
,
type
,
0
,
NULL
,
0
,
pointer_offset
);
print_file
(
file
,
2
,
"0x%x, /* FC_END */
\n
"
,
RPC_FC_END
);
*
typestring_offset
+=
1
;
}
/* member layout */
print_file
(
file
,
2
,
"0x0, /* FIXME: write out conversion data */
\n
"
);
print_file
(
file
,
2
,
"FC_END,
\n
"
);
...
...
@@ -959,6 +991,7 @@ static size_t write_struct_tfs(FILE *file, const type_t *type,
*
typestring_offset
+=
2
;
return
start_offset
;
case
RPC_FC_CSTRUCT
:
case
RPC_FC_CPSTRUCT
:
total_size
=
type_memsize
(
type
,
0
,
NULL
);
if
(
total_size
>
USHRT_MAX
)
...
...
@@ -972,6 +1005,13 @@ static size_t write_struct_tfs(FILE *file, const type_t *type,
typestring_offset
);
current_structure
=
NULL
;
if
(
type
->
type
==
RPC_FC_CPSTRUCT
)
{
pointer_offset
=
*
typestring_offset
;
write_pointers
(
file
,
NULL
,
type
,
0
,
NULL
,
0
,
typestring_offset
);
}
else
pointer_offset
=
0
;
/* silence warning */
start_offset
=
*
typestring_offset
;
WRITE_FCTYPE
(
file
,
FC_CSTRUCT
,
*
typestring_offset
);
/* alignment */
...
...
@@ -984,6 +1024,18 @@ static size_t write_struct_tfs(FILE *file, const type_t *type,
array_offset
-
*
typestring_offset
,
array_offset
);
*
typestring_offset
+=
2
;
if
(
type
->
type
==
RPC_FC_CPSTRUCT
)
{
print_file
(
file
,
2
,
"0x%x, /* FC_PP */
\n
"
,
RPC_FC_PP
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
*
typestring_offset
+=
2
;
*
typestring_offset
+=
write_pointer_description
(
file
,
NULL
,
type
,
0
,
NULL
,
0
,
pointer_offset
);
print_file
(
file
,
2
,
"0x%x, /* FC_END */
\n
"
,
RPC_FC_END
);
*
typestring_offset
+=
1
;
}
print_file
(
file
,
2
,
"FC_END,
\n
"
);
*
typestring_offset
+=
1
;
...
...
@@ -1007,6 +1059,10 @@ static size_t write_struct_tfs(FILE *file, const type_t *type,
typestring_offset
);
current_structure
=
NULL
;
pointer_offset
=
*
typestring_offset
;
if
(
!
write_pointers
(
file
,
NULL
,
type
,
0
,
NULL
,
0
,
typestring_offset
))
pointer_offset
=
0
;
start_offset
=
*
typestring_offset
;
WRITE_FCTYPE
(
file
,
FC_CVSTRUCT
,
*
typestring_offset
);
/* alignment */
...
...
@@ -1019,6 +1075,18 @@ static size_t write_struct_tfs(FILE *file, const type_t *type,
array_offset
-
*
typestring_offset
,
array_offset
);
*
typestring_offset
+=
2
;
if
(
pointer_offset
!=
0
)
{
print_file
(
file
,
2
,
"0x%x, /* FC_PP */
\n
"
,
RPC_FC_PP
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
*
typestring_offset
+=
2
;
*
typestring_offset
+=
write_pointer_description
(
file
,
NULL
,
type
,
0
,
NULL
,
0
,
pointer_offset
);
print_file
(
file
,
2
,
"0x%x, /* FC_END */
\n
"
,
RPC_FC_END
);
*
typestring_offset
+=
1
;
}
print_file
(
file
,
2
,
"FC_END,
\n
"
);
*
typestring_offset
+=
1
;
...
...
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