This commit is contained in:
Neil 2023-03-16 20:08:36 -07:00
parent 26be3e1afb
commit a52d8ce0ba

View File

@ -280,16 +280,22 @@ int main(void) {
printf("set term postscript eps enhanced\n" printf("set term postscript eps enhanced\n"
"set output \"kjv.eps\"\n" "set output \"kjv.eps\"\n"
"$Data <<EOD\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)) { while(kjv_line_next(&it, &line, &range)) {
char citestr[12], datestr[12]; 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; } if(!src || !src->name.a) { errno = EDOM; goto catch; }
kjvcite_to_string(range->start, &citestr); date32_to_string(line.date, &datestr); /* Date. */
date32_to_string(line.date, &datestr); kjvcite_to_string(range->start, &citestr); /* KJV cite. */
printf("# %s", citestr); 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); if(range->verse_end) printf("-%" PRIu32, range->verse_end);
printf("\n"); printf(", \n");
#if 0 #if 0
//fixme //fixme
for( ; ; cite.verse++) { for( ; ; cite.verse++) {