git.shiar.nl
/
unifont.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unifont-7.0.06.tar.gz
[unifont.git]
/
src
/
unihex2png
diff --git
a/src/unihex2png
b/src/unihex2png
index 3595f8052f3455de00d8e1dde4ccc349422aaddd..3708a59ebb8f1ff08c3d30735df18d8a37cb8c62 100755
(executable)
--- a/
src/unihex2png
+++ b/
src/unihex2png
@@
-38,7
+38,7
@@
$result = GetOptions (
);
if ($opt_help) {
);
if ($opt_help) {
- print << "END";
+ print << "END"
or die ("Cannot print to stdout.\n")
;
Turn a GNU Unifont hex glyph page of 256 code points into a PNG file
Turn a GNU Unifont hex glyph page of 256 code points into a PNG file
@@
-160,7
+160,7
@@
for ($count = 0; $count <= 15; $count++) {
}
if ($input) {
}
if ($input) {
- open (HEXFILE, "$input") or die ('Cannot open
file
\n');
+ open (HEXFILE, "$input") or die ('Cannot open
hex file for input.
\n');
} else {
*HEXFILE = *STDIN;
}
} else {
*HEXFILE = *STDIN;
}
@@
-197,11
+197,11
@@
while (<HEXFILE>) {
}
# Only close input file handler if it isn't STDIN.
if ($input) {
}
# Only close input file handler if it isn't STDIN.
if ($input) {
- close HEXFILE;
+ close HEXFILE
or die ("Cannot properly close input file.\n")
;
}
# Save image
}
# Save image
-open (PICTURE, ">$output") or die ("Cannot save image\n");
+open (PICTURE, ">$output") or die ("Cannot save image
.
\n");
binmode PICTURE;
binmode PICTURE;
-print PICTURE $im->png;
-close PICTURE;
+print PICTURE $im->png
or die ("Cannot write to picture file.\n")
;
+close PICTURE
or die ("Cannot properly close output file.\n")
;