1 /* -*-C-*- 2 ******************************************************************************* 3 * 4 * File: brl.h 5 * RCS: $Header: /home/matthew/cvs/bible-kjv-4.10/brl.h,v 2.2 2005/01/22 17:47:23 matthew Exp $ 6 * Description: Bible Retrieval Library header file 7 * Author: Chip Chapin, Hewlett Packard Company 8 * Created: Jan 21 1989 9 * Modified: Mon Apr 26 11:12:49 1993 (Chip Chapin) chip@hpclbis 10 * Language: C 11 * Package: Bible Retrieval System 12 * Status: Experimental (Do Not Distribute) 13 * 14 ******************************************************************************* 15 * 16 * Revisions: 17 * 18 * Tue Jan 5 16:23:25 1993 (Chip Chapin) chip@hpclbis 19 * Moved get_nonblank into util.h 20 ******************************************************************************* 21 * 22 * $Log: brl.h,v $ 23 * Revision 2.2 2005/01/22 17:47:23 matthew 24 * add some more function prototypes 25 * 26 * Revision 2.1 2005/01/21 19:05:38 matthew 27 * prototype functions properly 28 * 29 * Revision 2.0 2003/01/08 15:29:52 matthew 30 * versions collected from the net 31 * 32 * Revision 1.6 93/04/26 11:18:23 11:18:23 chip (Chip Chapin) 33 * Release 4.00 34 * Public release of portable datafile version. 35 * 36 * Revision 1.5 93/01/05 19:06:21 19:06:21 chip (Chip Chapin) 37 * Release 3.00: (not for distribution) 38 * Fixed errors (blank lines) in bible.data file. Data file is not compatible 39 * with previous (1.x and 2.x) distributions. Further changes pending. 40 * Rewrote context handling, and added "<" and ">" commands. 41 * Tools for building brl-index are now part of release. 42 * 43 * Revision 1.4 93/01/04 16:21:01 16:21:01 chip (Chip Chapin) 44 * Release 2.1, implements ?in and ?or commands. 45 * 46 * Revision 1.3 92/12/24 11:09:19 11:09:19 chip (Chip Chapin) 47 * Release 2.04. Include verse ref in prompt line. 48 * 49 * Revision 1.2 89/09/14 20:34:11 20:34:11 chip (Chip Chapin) 50 * Release 1-2. Supports -f and -l options for formatting the output. 51 * Updates primarily brl.c, bible.c, and bible.1. 52 * 53 * Revision 1.1 89/09/05 17:49:45 17:49:45 chip (Chip Chapin) 54 * Initial revision 55 * 56 * 57 */ 58 59 60 #define BADBOOK "Bad Book: '%s'" 61 #define NO_VERSE "Missing verse: '%s'" 62 63 enum books { GENESIS, EXODUS, LEVIT, NUM, DEUT, JOSHUA, JUDGES, RUTH, 64 SAM1, SAM2, KINGS1, KINGS2, CHRON1, CHRON2, EZRA, NEHEM, ESTHER, 65 JOB, PSALMS, PROV, ECCL, SONG, ISAIAH, JEREM, LAMENT, 66 EZEKIEL, DANIEL, HOSEA, JOEL, AMOS, OBADIAH, JONAH, MICAH, 67 NAHUM, HABAK, ZEPH, HAGGAI, ZECH, MALACHI, 68 MATT, MARK, LUKE, JOHN, ACTS, ROMANS, COR1, COR2, GAL, EPH, 69 PHILIP, COLOS, THESS1, THESS2, TIM1, TIM2, TITUS, PHILEM, 70 HEBREWS, JAMES, PET1, PET2, JOHN1, JOHN2, JOHN3, JUDE, 71 REV }; 72 73 /* Defined in "brl-index.c" */ 74 extern short start_verse[]; 75 extern short start_chapter[]; 76 77 /* Defined in "brl.c" */ 78 extern char brl_textname[]; 79 extern ref_t brl_cur_vnum; 80 81 ref_t brl_extract_num(ref_t absverse,int *bp,int *cp,int *vp); 82 ref_t brl_verse_spec(char **s,int *n); 83 ref_t brl_printverse(char *vs,int pretty,int lwidth,FILE *outf); 84 char* brl_num_to_ref(char *vbuf,ref_t *absversep); 85 86 void brl_init(char *dfname,char *dfpath,int memlimit); 87 void brl_close(void); 88 89 int get_book(char **s,int book); 90 int verse_continuation(char **s,int book,int chapter,int verse,ref_t absverse); 91 ref_t verse_id(char **s,int *bookp,int *chapterp,int *versep ); 92 ref_t verse_num(int b,int c,int v); 93 94 95