doc
This commit is contained in:
parent
a795b70859
commit
8a3718b840
@ -164,7 +164,9 @@ void kjv_(struct kjv *const kjv) {
|
|||||||
verse_table_(&kjv->verses);
|
verse_table_(&kjv->verses);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Loads 66 files from the "kjv/" directory. */
|
/** Loads 66 files from the "kjv/" directory. Prints out something if it
|
||||||
|
doesn't work, but does not call `perror` or reset `errno`. Use
|
||||||
|
<fn:kjv_is_valid> to tell. */
|
||||||
struct kjv kjv(void) {
|
struct kjv kjv(void) {
|
||||||
const char *const dir_kjv = "kjv";
|
const char *const dir_kjv = "kjv";
|
||||||
struct text backing;
|
struct text backing;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <inttypes.h> /* C99 */
|
#include <inttypes.h> /* C99 */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
int success = EXIT_SUCCESS;
|
int success = EXIT_SUCCESS;
|
||||||
@ -12,6 +13,8 @@ int main(void) {
|
|||||||
kjv_add(&k, (union kjvcite){ .book = Genesis, .chapter = 1, .verse = 2 });
|
kjv_add(&k, (union kjvcite){ .book = Genesis, .chapter = 1, .verse = 2 });
|
||||||
kjv_add(&k, (union kjvcite){ .book = Genesis, .chapter = 1, .verse = 1 });
|
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));
|
fprintf(stderr, "%zu of which: %s.\n", k.set_words, kjv_set_to_string(&k));
|
||||||
|
assert(k.total_words == 789633);
|
||||||
|
assert(k.set_words == 39);
|
||||||
goto finally;
|
goto finally;
|
||||||
catch:
|
catch:
|
||||||
success = EXIT_FAILURE, perror("kjv");
|
success = EXIT_FAILURE, perror("kjv");
|
||||||
|
Loading…
Reference in New Issue
Block a user