libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 6b4077b84c4c667a5b753cd63e8778f23eaf7c7b
parent 2cd1977130f5d6c3bb78a69e7f8d21885b708de1
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed,  4 Jul 2018 11:04:57 +0200

Do not print anything and return error codes instead

Diffstat:
Msrc/output.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/output.c b/src/output.c @@ -18,8 +18,7 @@ int output(gdImagePtr im_Source, char *output, char *retinaout, int retinaScaleF gdImagePng(im_Source, file_Out); fclose(file_Out); } else { - perror("Can't create output file"); - exit(1); + return -1; } // in case Retina image output is wanted @@ -41,12 +40,13 @@ int output(gdImagePtr im_Source, char *output, char *retinaout, int retinaScaleF gdImagePng(im_Retina, file_RetinaOut); fclose(file_RetinaOut); } else { - perror("Can't create output file"); - exit(1); + return -1; } gdImageDestroy(im_Retina); } gdImageDestroy(im_Source); + + return 0; }