2023-02-02 21:53:59 -05:00
|
|
|
#include "../src/journal.h"
|
|
|
|
#include "../src/source.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <assert.h>
|
2023-02-03 14:50:10 -05:00
|
|
|
#include <errno.h>
|
2023-02-02 21:53:59 -05:00
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
int success = EXIT_SUCCESS;
|
|
|
|
errno = 0;
|
|
|
|
struct journal j = journal();
|
|
|
|
struct sources s = sources(&j);
|
|
|
|
if(errno) goto catch;
|
|
|
|
goto finally;
|
|
|
|
catch:
|
|
|
|
success = EXIT_FAILURE, perror("source");
|
|
|
|
finally:
|
|
|
|
sources_(&s);
|
|
|
|
journal_(&j);
|
|
|
|
return success;
|
|
|
|
}
|