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
21a90850
Commit
21a90850
authored
Jan 24, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Strings.
Write out type format strings for string types.
parent
d07589e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
rpcfc.h
include/wine/rpcfc.h
+2
-0
typegen.c
tools/widl/typegen.c
+58
-3
No files found.
include/wine/rpcfc.h
View file @
21a90850
...
...
@@ -130,6 +130,8 @@
#define RPC_FC_STRUCTPAD2 0x3e
#define RPC_FC_STRING_SIZED 0x44
#define RPC_FC_NO_REPEAT 0x46
#define RPC_FC_FIXED_REPEAT 0x47
#define RPC_FC_VARIABLE_REPEAT 0x48
...
...
tools/widl/typegen.c
View file @
21a90850
...
...
@@ -281,12 +281,67 @@ static size_t type_memsize(const type_t *t, int ptr_level, const expr_t *array)
return
size
;
}
static
size_t
write_string_tfs
(
FILE
*
file
,
const
attr_t
*
attr
,
static
size_t
write_string_tfs
(
FILE
*
file
,
const
attr_t
*
attr
s
,
const
type_t
*
type
,
const
expr_t
*
array
,
const
char
*
name
)
{
error
(
"write_string_tfs: Unimplemented. name: %s
\n
"
,
name
);
return
0
;
const
expr_t
*
size_is
=
get_attrp
(
attrs
,
ATTR_SIZEIS
);
int
has_size
=
size_is
&&
(
size_is
->
type
!=
EXPR_VOID
);
if
((
type
->
type
!=
RPC_FC_CHAR
)
&&
(
type
->
type
!=
RPC_FC_WCHAR
))
{
error
(
"write_string_tfs: Unimplemented for type 0x%x of name: %s
\n
"
,
type
->
type
,
name
);
return
0
;
}
if
(
array
&&
array
->
is_const
)
{
size_t
typestring_size
;
if
(
array
->
cval
>
USHRT_MAX
)
error
(
"array size for parameter %s exceeds %d bytes by %ld bytes
\n
"
,
name
,
USHRT_MAX
,
array
->
cval
-
USHRT_MAX
);
if
(
type
->
type
==
RPC_FC_CHAR
)
print_file
(
file
,
2
,
"0x%x, /* FC_CSTRING */
\n
"
,
RPC_FC_C_CSTRING
);
else
print_file
(
file
,
2
,
"0x%x, /* FC_WSTRING */
\n
"
,
RPC_FC_C_WSTRING
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
typestring_size
=
2
;
print_file
(
file
,
2
,
"NdrFcShort(0x%x), /* %d */
\n
"
,
array
->
cval
,
array
->
cval
);
typestring_size
+=
2
;
return
typestring_size
;
}
else
if
(
has_size
)
{
size_t
typestring_size
;
if
(
type
->
type
==
RPC_FC_CHAR
)
print_file
(
file
,
2
,
"0x%x, /* FC_C_CSTRING */
\n
"
,
RPC_FC_C_CSTRING
);
else
print_file
(
file
,
2
,
"0x%x, /* FC_C_WSTRING */
\n
"
,
RPC_FC_C_WSTRING
);
print_file
(
file
,
2
,
"0x%x, /* FC_PAD */
\n
"
,
RPC_FC_PAD
);
typestring_size
=
2
;
return
typestring_size
;
}
else
{
size_t
typestring_size
;
if
(
type
->
type
==
RPC_FC_CHAR
)
print_file
(
file
,
2
,
"0x%x, /* FC_C_CSTRING */
\n
"
,
RPC_FC_C_CSTRING
);
else
print_file
(
file
,
2
,
"0x%x, /* FC_C_WSTRING */
\n
"
,
RPC_FC_C_WSTRING
);
print_file
(
file
,
2
,
"0x%x, /* FC_STRING_SIZED */
\n
"
,
RPC_FC_STRING_SIZED
);
typestring_size
=
2
;
/* FIXME: write out conformance descriptor */
return
typestring_size
;
}
}
static
size_t
write_array_tfs
(
FILE
*
file
,
const
attr_t
*
attrs
,
...
...
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