#define BOOKS \
	X(Genesis),\
	X(Exodus),\
	X(Leviticus),\
	X(Numbers),\
	X(Deuteronomy),\
	X(Joshua),\
	X(Judges),\
	X(Ruth),\
	X(ISamuel),\
	X(IISamuel),\
	X(IKings),\
	X(IIKings),\
	X(IChronicles),\
	X(IIChronicles),\
	X(Ezra),\
	X(Nehemiah),\
	X(Esther),\
	X(Job),\
	X(Psalms),\
	X(Proverbs),\
	X(Ecclesiastes),\
	X(Song_of_Solomon),\
	X(Isaiah),\
	X(Jeremiah),\
	X(Lamentations),\
	X(Ezekiel),\
	X(Daniel),\
	X(Hosea),\
	X(Joel),\
	X(Amos),\
	X(Obadiah),\
	X(Jonah),\
	X(Micah),\
	X(Nahum),\
	X(Habakkuk),\
	X(Zephaniah),\
	X(Haggai),\
	X(Zechariah),\
	X(Malachi),\
	\
	X(Matthew),\
	X(Mark),\
	X(Luke),\
	X(John),\
	X(Acts),\
	X(Romans),\
	X(ICorinthians),\
	X(IICorinthians),\
	X(Galatians),\
	X(Ephesians),\
	X(Philippians),\
	X(Colossians),\
	X(IThessalonians),\
	X(IIThessalonians),\
	X(ITimothy),\
	X(IITimothy),\
	X(Titus),\
	X(Philemon),\
	X(Hebrews),\
	X(James),\
	X(IPeter),\
	X(IIPeter),\
	X(IJohn),\
	X(IIJohn),\
	X(IIIJohn),\
	X(Jude),\
	X(Revelation),\
	X(KJV_BOOK_SIZE)
#define X(book) book
enum kjv_book { BOOKS };
#undef X
#define X(book) #book
static const char *kjv_book_string[] = { BOOKS };
#undef X
#undef BOOKS
#include <stdint.h> /* C99 */
union kjvcite {
	struct { uint32_t verse : 12, chapter : 13, book : 7; }; /* C11, reverse */
	uint32_t u32;
};
struct kjvrange { union kjvcite start; uint32_t verse_end; };
void kjvcite_to_string(const union kjvcite, char (*)[12]);

#define TABLE_NAME kjvset
#define TABLE_KEY union kjvcite
#define TABLE_UINT uint32_t
#define TABLE_UNHASH
#define TABLE_HEAD
#include "../src/table.h"

#define TABLE_NAME kjvcount
#define TABLE_KEY union kjvcite
#define TABLE_UINT uint32_t
#define TABLE_VALUE unsigned
#define TABLE_UNHASH
#define TABLE_HEAD
#include "../src/table.h"

#include <stddef.h> /* size_t */
void kjv_count_(struct kjvcount_table *);
struct kjvcount_table kjv_count(size_t *);
size_t kjv_count_get(struct kjvcount_table *, const union kjvcite);
const char *kjv_count_to_string(const struct kjvcount_table *);

struct kjvset_table kjv_set(void);
void kjv_set_(struct kjvset_table *);
enum table_result kjv_set_add(struct kjvset_table *, const union kjvcite);
const char *kjv_set_to_string(const struct kjvset_table *);
