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
49326cb2
Commit
49326cb2
authored
Jan 19, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Use flush_output_buffer() in a few more places.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
318822d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
utils.c
tools/widl/utils.c
+2
-9
res32.c
tools/winebuild/res32.c
+1
-7
No files found.
tools/widl/utils.c
View file @
49326cb2
...
...
@@ -276,7 +276,6 @@ void add_output_to_resources( const char *type, const char *name )
void
flush_output_resources
(
const
char
*
name
)
{
int
fd
;
unsigned
int
i
;
/* all output must have been saved with add_output_to_resources() first */
...
...
@@ -294,19 +293,13 @@ void flush_output_resources( const char *name )
put_dword
(
0
);
/* Version */
put_dword
(
0
);
/* Characteristics */
fd
=
open
(
name
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
|
O_BINARY
,
0666
);
if
(
fd
==
-
1
)
error
(
"Error creating %s
\n
"
,
name
);
if
(
write
(
fd
,
output_buffer
,
output_buffer_pos
)
!=
output_buffer_pos
)
error
(
"Error writing to %s
\n
"
,
name
);
for
(
i
=
0
;
i
<
nb_resources
;
i
++
)
{
if
(
write
(
fd
,
resources
[
i
].
data
,
resources
[
i
].
size
)
!=
resources
[
i
].
size
)
error
(
"Error writing to %s
\n
"
,
name
);
put_data
(
resources
[
i
].
data
,
resources
[
i
].
size
);
free
(
resources
[
i
].
data
);
}
close
(
fd
);
flush_output_buffer
(
name
);
nb_resources
=
0
;
free
(
output_buffer
);
}
/* pointer-sized word */
...
...
tools/winebuild/res32.c
View file @
49326cb2
...
...
@@ -623,7 +623,6 @@ void output_res_o_file( DLLSPEC *spec )
{
unsigned
int
i
;
char
*
res_file
=
NULL
;
int
fd
;
struct
strarray
args
;
if
(
!
spec
->
nb_resources
)
fatal_error
(
"--resources mode needs at least one resource file as input
\n
"
);
...
...
@@ -673,12 +672,7 @@ void output_res_o_file( DLLSPEC *spec )
}
res_file
=
get_temp_file_name
(
output_file_name
,
".res"
);
if
((
fd
=
open
(
res_file
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
|
O_BINARY
,
0600
))
==
-
1
)
fatal_error
(
"Cannot create %s
\n
"
,
res_file
);
if
(
write
(
fd
,
output_buffer
,
output_buffer_pos
)
!=
output_buffer_pos
)
fatal_error
(
"Error writing to %s
\n
"
,
res_file
);
close
(
fd
);
free
(
output_buffer
);
flush_output_buffer
(
res_file
);
args
=
find_tool
(
"windres"
,
NULL
);
strarray_add
(
&
args
,
"-i"
);
...
...
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