Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
4ca7a064
Commit
4ca7a064
authored
May 27, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfnt2fnt: Clean output files when aborting on a signal.
parent
4e07d0d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
sfnt2fnt.c
tools/sfnt2fnt.c
+12
-0
No files found.
tools/sfnt2fnt.c
View file @
4ca7a064
...
...
@@ -23,6 +23,7 @@
#include <assert.h>
#include <ctype.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -113,6 +114,11 @@ static void cleanup(void)
if
(
output_name
)
unlink
(
output_name
);
}
static
void
exit_on_signal
(
int
sig
)
{
exit
(
1
);
/* this will call the atexit functions */
}
static
void
error
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
static
void
error
(
const
char
*
s
,
...)
...
...
@@ -479,6 +485,12 @@ int main(int argc, char **argv)
sprintf
(
output
,
"%s-%d-%d-%d.fnt"
,
name
,
enc
,
dpi
,
ppem
);
atexit
(
cleanup
);
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
fp
=
fopen
(
output
,
"w"
);
output_name
=
output
;
...
...
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