2022-12-27 15:28:04 -05:00
|
|
|
#include "../src/kjv.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <inttypes.h> /* C99 */
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
struct kjv k = kjv();
|
|
|
|
union kjvcite c;
|
|
|
|
/*struct verse_table_iterator it = verse_table_begin(&kjv.verses);*/
|
|
|
|
unsigned *verses;
|
|
|
|
/* printf("%%{\n"
|
|
|
|
"#include \"../src/kjv.h\"\n"
|
|
|
|
"%%}\n"
|
|
|
|
"struct kjvverse { uint32_t name; unsigned words; };\n"
|
|
|
|
"%%%%\n"); I don't even think this is possible 1.44 bits/key. */
|
|
|
|
|
|
|
|
/*while(verse_table_next(&it, &c, &verses))
|
|
|
|
printf("%" PRIu32 ", %u\n", c.u32, *verses);*/
|
|
|
|
/*printf("%s %u:%u -> %u\n",
|
|
|
|
kjv_book_string[c.book], c.chapter, c.verse, *verses);*/
|
|
|
|
/*c = (union kjvcite){ .book = Genesis, .chapter = 1, .verse = 1 };
|
|
|
|
printf("1:1:1 -> %u\n", verse_table_get(&kjv.verses, c));*/
|
|
|
|
/*c = (union kjvcite){ .book = Genesis, .chapter = 1, .verse = 1 };
|
|
|
|
printf("1:1:1 -> %u\n", verse_table_get(&kjv.verses, c));*/
|
|
|
|
|
2022-12-27 16:01:51 -05:00
|
|
|
fprintf(stderr, "%zu total words, %s.\n", k.total_words, kjv_to_string(&k));
|
|
|
|
kjv_add(&k, (union kjvcite){ .book = Genesis, .chapter = 1, .verse = 1 });
|
|
|
|
fprintf(stderr, "%zu of which: %s.\n", k.set_words, kjv_set_to_string(&k));
|
2022-12-27 15:28:04 -05:00
|
|
|
kjv_(&k);
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|