Commit commit.

This commit is contained in:
Neil 2023-04-21 20:49:36 -07:00
parent d6c1b22b5d
commit e05a82a860
1 changed files with 4 additions and 4 deletions

View File

@ -11,19 +11,19 @@
#include <assert.h> #include <assert.h>
int main(void) { int main(void) {
const char *fail = 0; const char *intent = "start";
struct journal jrnl = {0}; struct journal jrnl = {0};
errno = 0; errno = 0;
intent = "loading journal";
jrnl = journal("../journal"); jrnl = journal("../journal");
fprintf(stderr, "Journal: %s.\n", journal_to_string(&jrnl)); fprintf(stderr, "Journal: %s.\n", journal_to_string(&jrnl));
if(errno) goto catch; if(errno) goto catch;
goto finally; goto finally;
catch: catch:
if(!fail) fail = "scan"; perror(intent);
perror(fail);
finally: finally:
journal_(&jrnl); journal_(&jrnl);
return fail ? EXIT_FAILURE : EXIT_SUCCESS; return intent ? EXIT_FAILURE : EXIT_SUCCESS;
} }