summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-11 17:19:32 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-12 10:40:55 -0300
commit748cb86c337e08b4cdd5b9dc11f0b1ff86315a14 (patch)
tree8cac50c6e85d3c79d952e8dd5ebfc146e253ba5c /diff.c
parent073b91b1273029b07e0f3028022b35aef54c7143 (diff)
downloadeeshow-748cb86c337e08b4cdd5b9dc11f0b1ff86315a14.tar.gz
eeshow-748cb86c337e08b4cdd5b9dc11f0b1ff86315a14.tar.bz2
eeshow-748cb86c337e08b4cdd5b9dc11f0b1ff86315a14.zip
eeshow/: use dedicated functions for diagnostics, instead of fprintf and exit
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/diff.c b/diff.c
index 4dca702..c79c316 100644
--- a/diff.c
+++ b/diff.c
@@ -20,6 +20,7 @@
#include <cairo/cairo.h>
#include "util.h"
+#include "diag.h"
#include "main.h"
#include "cro.h"
#include "file.h"
@@ -280,11 +281,8 @@ static void diff_end(void *ctx)
int w, h, stride;
old_img = cro_img_end(diff->cr_ctx, &w, &h, &stride);
- if (diff->w != w || diff->h != h) {
- fprintf(stderr, "%d x %d vs. %d x %d image\n",
- w, h, diff->w, diff->h);
- exit(1);
- }
+ if (diff->w != w || diff->h != h)
+ fatal("%d x %d vs. %d x %d image\n", w, h, diff->w, diff->h);
differences(diff, old_img, diff->new_img);
show_areas(diff, old_img);