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
b8ad360b
Commit
b8ad360b
authored
Apr 03, 2014
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make_xftmpl: Always output data in little-endian format.
parent
13013ba9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
make_xftmpl.c
tools/make_xftmpl.c
+21
-4
No files found.
tools/make_xftmpl.c
View file @
b8ad360b
...
...
@@ -188,12 +188,29 @@ static inline BOOL write_byte(struct parser *parser, BYTE value)
static
inline
BOOL
write_word
(
struct
parser
*
parser
,
WORD
value
)
{
return
write_bytes
(
parser
,
&
value
,
sizeof
(
value
));
return
write_byte
(
parser
,
value
)
&&
write_byte
(
parser
,
value
>>
8
);
}
static
inline
BOOL
write_dword
(
struct
parser
*
parser
,
DWORD
value
)
{
return
write_bytes
(
parser
,
&
value
,
sizeof
(
value
));
return
write_word
(
parser
,
value
)
&&
write_word
(
parser
,
value
>>
16
);
}
static
inline
BOOL
write_float
(
struct
parser
*
parser
,
float
value
)
{
DWORD
val
;
memcpy
(
&
val
,
&
value
,
sizeof
(
value
)
);
return
write_dword
(
parser
,
val
);
}
static
inline
BOOL
write_guid
(
struct
parser
*
parser
,
const
GUID
*
guid
)
{
return
write_dword
(
parser
,
guid
->
Data1
)
&&
write_word
(
parser
,
guid
->
Data2
)
&&
write_word
(
parser
,
guid
->
Data3
)
&&
write_bytes
(
parser
,
guid
->
Data4
,
sizeof
(
guid
->
Data4
)
);
}
static
int
compare_names
(
const
void
*
a
,
const
void
*
b
)
...
...
@@ -240,7 +257,7 @@ static BOOL parse_guid(struct parser *parser)
guid
.
Data4
[
7
]
=
tab
[
9
];
return
write_word
(
parser
,
TOKEN_GUID
)
&&
write_
bytes
(
parser
,
&
guid
,
sizeof
(
guid
)
);
write_
guid
(
parser
,
&
guid
);
}
static
BOOL
parse_name
(
struct
parser
*
parser
)
...
...
@@ -291,7 +308,7 @@ static BOOL parse_number(struct parser *parser)
ret
=
sscanf
(
buffer
,
"%f"
,
&
value
);
if
(
!
ret
)
fatal_error
(
parser
,
"invalid float token
\n
"
);
ret
=
write_word
(
parser
,
TOKEN_FLOAT
)
&&
write_
bytes
(
parser
,
&
value
,
sizeof
(
value
)
);
write_
float
(
parser
,
value
);
}
else
{
int
value
;
ret
=
sscanf
(
buffer
,
"%d"
,
&
value
);
...
...
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