interpret/test/test_kjv.c

30 lines
988 B
C

#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));*/
fprintf(stderr, "%zu total words, %s\n", k.words, kjv_entire_to_string(&k));
kjv_(&k);
return EXIT_SUCCESS;
}