/*
 *	$Source$
 *	$Author$
 *	$Header$
 */

#define LIBDIR "/thor/site/bible/kjv/"
#define NUMBOOKS 66

char tmp[1024];

char *strdup(), *strndup(), *parse_skip(), *malloc(), *frob_ext();

struct book {
	char	*key;		/* Name used internally in file */
	char	*filename;	/* Where to find the text */
	char	*abbrev;	/* Abbreviation of title */
	char	*name;		/* Full title of the book */
	int	numchap;	/* Number of chapters in the book */
	FILE	*f;
	FILE	*fx;		/* File index */
	int	num;		/* Sequence number */
	long	last_used;	/* Time this book was last used, if opened */
	long	current_pos;	/* Current position in the index file */
				/* This determines the "current verse" */
};

typedef struct book BOOK;

extern BOOK	booktab[NUMBOOKS];
extern BOOK	*current_book;	/* Identifies the current book */
extern long	open_book_time;

struct verse {
	BOOK	*bk;
	int	c;
	int	v;
	char	*s;
};

typedef struct verse VERSE;

VERSE *parse_verse(), *read_verse(), *goto_rel_verse();

struct verse_idx {
	int	chapter;
	int	verse;
	long	pos;
};
