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
67c634c2
Commit
67c634c2
authored
Oct 17, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Oct 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Improve file cleanup when errors occur.
parent
b3a3804b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
widl.c
tools/widl/widl.c
+23
-8
No files found.
tools/widl/widl.c
View file @
67c634c2
...
...
@@ -177,6 +177,16 @@ static void exit_on_signal( int sig )
exit
(
1
);
/* this will call the atexit functions */
}
static
void
set_everything
(
int
x
)
{
do_header
=
x
;
do_typelib
=
x
;
do_proxies
=
x
;
do_client
=
x
;
do_server
=
x
;
do_idfile
=
x
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
extern
char
*
optarg
;
...
...
@@ -279,7 +289,7 @@ int main(int argc,char *argv[])
}
if
(
do_everything
)
{
do_header
=
do_typelib
=
do_proxies
=
do_client
=
do_server
=
do_idfile
=
1
;
set_everything
(
TRUE
)
;
}
if
(
optind
<
argc
)
{
input_name
=
xstrdup
(
argv
[
optind
]);
...
...
@@ -434,10 +444,9 @@ int main(int argc,char *argv[])
if
(
ret
)
{
exit
(
1
);
}
header_name
=
NULL
;
client_name
=
NULL
;
server_name
=
NULL
;
idfile_name
=
NULL
;
/* Everything has been done successfully, don't delete any files. */
set_everything
(
FALSE
);
return
0
;
}
...
...
@@ -446,10 +455,16 @@ static void rm_tempfile(void)
abort_import
();
if
(
temp_name
)
unlink
(
temp_name
);
if
(
header_name
)
if
(
do_header
)
unlink
(
header_name
);
if
(
client_name
)
if
(
do_client
)
unlink
(
client_name
);
if
(
server_name
)
if
(
do_server
)
unlink
(
server_name
);
if
(
do_idfile
)
unlink
(
idfile_name
);
if
(
do_proxies
)
unlink
(
proxy_name
);
if
(
do_typelib
)
unlink
(
typelib_name
);
}
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