2023-04-22 03:11:57 +00:00
|
|
|
/** @license 2023 Neil Edelman, distributed under the terms of the
|
|
|
|
[MIT License](https://opensource.org/licenses/MIT).
|
|
|
|
|
|
|
|
Scan source files for meanings.
|
|
|
|
|
|
|
|
@std C99 */
|
|
|
|
|
|
|
|
#include "journal.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
int main(void) {
|
2023-04-22 03:49:36 +00:00
|
|
|
const char *intent = "start";
|
2023-04-22 03:11:57 +00:00
|
|
|
struct journal jrnl = {0};
|
|
|
|
errno = 0;
|
|
|
|
|
2023-04-22 03:49:36 +00:00
|
|
|
intent = "loading journal";
|
2023-04-22 03:11:57 +00:00
|
|
|
jrnl = journal("../journal");
|
|
|
|
fprintf(stderr, "Journal: %s.\n", journal_to_string(&jrnl));
|
|
|
|
if(errno) goto catch;
|
|
|
|
|
|
|
|
goto finally;
|
|
|
|
catch:
|
2023-04-22 03:49:36 +00:00
|
|
|
perror(intent);
|
2023-04-22 03:11:57 +00:00
|
|
|
finally:
|
|
|
|
journal_(&jrnl);
|
2023-04-22 03:49:36 +00:00
|
|
|
return intent ? EXIT_FAILURE : EXIT_SUCCESS;
|
2023-04-22 03:11:57 +00:00
|
|
|
}
|