summaryrefslogtreecommitdiff
path: root/src/gd2topng.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2013-04-16 11:31:22 +0200
committerOndřej Surý <ondrej@sury.org>2013-04-18 08:28:36 +0200
commit32b1307c62a5e8385118b6d7ce84743d125d335d (patch)
tree70cb1251e9ac6341c6a93b9a2ba3b35762ce59a7 /src/gd2topng.c
parent21efcc3092a76540476a3f5e0ddc236214d05de0 (diff)
downloadlibgd-32b1307c62a5e8385118b6d7ce84743d125d335d.tar.gz
Use custom error handler instead of fprintf(stderr, ...)
Diffstat (limited to 'src/gd2topng.c')
-rw-r--r--src/gd2topng.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gd2topng.c b/src/gd2topng.c
index a48ad70..6c0626f 100644
--- a/src/gd2topng.c
+++ b/src/gd2topng.c
@@ -33,7 +33,7 @@ main (int argc, char **argv)
}
in = fopen (argv[1], "rb");
if (!in) {
- fprintf (stderr, "Input file does not exist!\n");
+ fprintf(stderr, "Input file does not exist!\n");
exit (1);
}
if (argc == 7) {
@@ -43,19 +43,19 @@ main (int argc, char **argv)
}
fclose (in);
if (!im) {
- fprintf (stderr, "Input is not in GD2 format!\n");
+ fprintf(stderr, "Input is not in GD2 format!\n");
exit (1);
}
out = fopen (argv[2], "wb");
if (!out) {
- fprintf (stderr, "Output file cannot be written to!\n");
+ fprintf(stderr, "Output file cannot be written to!\n");
gdImageDestroy (im);
exit (1);
}
#ifdef HAVE_LIBPNG
gdImagePng (im, out);
#else
- fprintf (stderr, "No PNG library support available.\n");
+ fprintf(stderr, "No PNG library support available.\n");
#endif
fclose (out);
gdImageDestroy (im);