diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-04-16 11:31:22 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-04-18 08:28:36 +0200 |
commit | 32b1307c62a5e8385118b6d7ce84743d125d335d (patch) | |
tree | 70cb1251e9ac6341c6a93b9a2ba3b35762ce59a7 /src/gdparttopng.c | |
parent | 21efcc3092a76540476a3f5e0ddc236214d05de0 (diff) | |
download | libgd-32b1307c62a5e8385118b6d7ce84743d125d335d.tar.gz |
Use custom error handler instead of fprintf(stderr, ...)
Diffstat (limited to 'src/gdparttopng.c')
-rw-r--r-- | src/gdparttopng.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gdparttopng.c b/src/gdparttopng.c index ed01d98..42d6df2 100644 --- a/src/gdparttopng.c +++ b/src/gdparttopng.c @@ -26,7 +26,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); } @@ -40,19 +40,19 @@ main (int argc, char **argv) im = gdImageCreateFromGd2Part (in, x, y, w, h); 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.\n"); + fprintf(stderr, "No PNG library support.\n"); #endif fclose (out); gdImageDestroy (im); |