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

#ifndef BOOK_H_DEFINED
#define BOOK_H_DEFINED

/*
 * Number of books in the bible
 */
#define NUMBOOKS 66

struct book {
	/* This information found in BOOKTAB */
	int	num;		/* Sequence number */
	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 */
	
	/* This is state information, that doesn't last */
	FILE	*f;
	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" */
	int	open_idx;	/* Index to the open_books table */
};

typedef struct book BOOK;

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

extern int	open_book();

#endif /* BOOK_H_DEFINIED */



