Moved journal to ../journal.
This commit is contained in:
parent
80c95adfe6
commit
26be3e1afb
@ -118,7 +118,7 @@ void journal_(struct journal *const j) {
|
||||
/** @return A completed journal out of "journal". Any reading errors and
|
||||
`errno` will be set, it will be idle. */
|
||||
struct journal journal(void) {
|
||||
const char *const dir_journal = "journal";
|
||||
const char *const dir_journal = "../journal";
|
||||
struct journal j = {0};
|
||||
char *intent = 0;
|
||||
DIR *dir = 0;
|
||||
|
17
src/kjv.re.c
17
src/kjv.re.c
@ -248,23 +248,27 @@ int main(void) {
|
||||
int success = EXIT_SUCCESS;
|
||||
const char *reason = 0;
|
||||
errno = 0;
|
||||
struct kjvcount count = {0};
|
||||
struct journal jrnl = {0};
|
||||
struct sources srcs = {0};
|
||||
struct kjvline_tree lines = {0};
|
||||
|
||||
struct kjvcount count = kjvcount();
|
||||
count = kjvcount();
|
||||
fprintf(stderr, "KJV count: %s.\n", kjvcount_to_string(&count));
|
||||
if(kjvcount_is_empty(&count))
|
||||
{ reason = "kjv failed to load"; goto catch; }
|
||||
|
||||
struct journal jrnl = journal();
|
||||
jrnl = journal();
|
||||
fprintf(stderr, "Journal: %s.\n", journal_to_string(&jrnl));
|
||||
if(journal_is_empty(&jrnl))
|
||||
{ reason = "journal failed to load"; goto catch; }
|
||||
|
||||
struct sources srcs = sources(&jrnl);
|
||||
srcs = sources(&jrnl);
|
||||
//fprintf(stderr, "Sources: %s.\n", sources_to_string(&srcs));
|
||||
if(sources_is_empty(&srcs))
|
||||
{ reason = "sources failed to parse"; goto catch; }
|
||||
|
||||
struct kjvline_tree lines = kjv_line(&jrnl);
|
||||
lines = kjv_line(&jrnl);
|
||||
fprintf(stderr, "KJV lines: %s.\n", kjv_line_to_string(&lines));
|
||||
if(kjv_line_is_empty(&lines))
|
||||
{ reason = "KJV lines parsing failed"; goto catch; }
|
||||
@ -282,13 +286,16 @@ int main(void) {
|
||||
const struct source *src = source_lookup(&srcs, line);
|
||||
if(!src || !src->name.a) { errno = EDOM; goto catch; }
|
||||
kjvcite_to_string(range->start, &citestr);
|
||||
date32_to_string(line.date, &datestr);
|
||||
printf("# %s", citestr);
|
||||
if(range->verse_end) printf("-%" PRIu32, range->verse_end);
|
||||
printf("\n");
|
||||
#if 0
|
||||
//fixme
|
||||
for( ; ; cite.verse++) {
|
||||
if(!kjv_add(kj, cite)) return 0;
|
||||
if(!verse_end || verse_end <= cite.verse) break;
|
||||
}
|
||||
date32_to_string(date, &datestr);
|
||||
printf("%s\t%zu\t%zu\t%zu\t# ",
|
||||
datestr, kj->words.verse, kj->words.set, kj->words.cumulative);
|
||||
if(verse_end) {
|
||||
|
Loading…
Reference in New Issue
Block a user