summaryrefslogtreecommitdiff
path: root/main.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 /main.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 'main.c')
-rw-r--r--main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/main.c b/main.c
index d104b14..d8313b9 100644
--- a/main.c
+++ b/main.c
@@ -204,9 +204,7 @@ int main(int argc, char **argv)
for (ops = ops_list; ops != ARRAY_END(ops_list); ops++)
if (!strcmp((*ops)->name, *gfx_argv))
goto found;
- fprintf(stderr, "graphics backend \"%s\" not found\n",
- *gfx_argv);
- exit(1);
+ fatal("graphics backend \"%s\" not found\n", *gfx_argv);
found:
;
}
@@ -221,11 +219,8 @@ found:
if (recurse) {
const struct sheet *sheet;
- if (!gfx_multi_sheet()) {
- fprintf(stderr,
- "graphics backend only supports single sheet\n");
- exit(1);
- }
+ if (!gfx_multi_sheet())
+ fatal("graphics backend only supports single sheet\n");
for (sheet = sch_ctx.sheets; sheet; sheet = sheet->next) {
sch_render(sheet);
if (sheet->next)