This commit is contained in:
Neil 2023-03-16 20:08:36 -07:00
parent 26be3e1afb
commit a52d8ce0ba
1 changed files with 12 additions and 6 deletions

View File

@ -280,16 +280,22 @@ int main(void) {
printf("set term postscript eps enhanced\n"
"set output \"kjv.eps\"\n"
"$Data <<EOD\n"
"# date\tverse\tset\tcumulative / %zu\n", count.words.total);
"# date, source, verse, words, set / %zu\n",
count.words.total);
while(kjv_line_next(&it, &line, &range)) {
char citestr[12], datestr[12];
const struct source *src = source_lookup(&srcs, line);
const struct source *src = source_lookup(&srcs, line); /* Source. */
if(!src || !src->name.a) { errno = EDOM; goto catch; }
kjvcite_to_string(range->start, &citestr);
date32_to_string(line.date, &datestr);
printf("# %s", citestr);
date32_to_string(line.date, &datestr); /* Date. */
kjvcite_to_string(range->start, &citestr); /* KJV cite. */
for(uint32_t c = range->start.verse; ; c++) {
//if(!kjv_add(kj, cite)) return 0;
if(!range->verse_end || range->verse_end <= c) break;
}
printf("%s, %.*s, %s", datestr,
(int)(src->name.b - src->name.a), src->name.a, citestr);
if(range->verse_end) printf("-%" PRIu32, range->verse_end);
printf("\n");
printf(", \n");
#if 0
//fixme
for( ; ; cite.verse++) {