2 *******************************************************************************
5 * RCS: $Header: /home/matthew/cvs/bible-kjv-4.10/brl-index.c,v 2.1 2005/01/21 18:57:48 matthew Exp $
6 * Description: BRL verse index tables
7 * Author: Chip Chapin, Hewlett Packard Company
9 * Modified: Tue Jan 5 15:27:22 1993 (Chip Chapin) chip@hpclbis
11 * Package: Bible Retrieval System
12 * Status: Experimental (Do Not Distribute)
14 * $Log: brl-index.c,v $
15 * Revision 2.1 2005/01/21 18:57:48 matthew
16 * clear up unnecessary definition of rcs_ident
18 * Revision 2.0 2003/01/08 15:29:52 matthew
19 * versions collected from the net
21 * Revision 1.3 93/01/05 19:05:27 19:05:27 chip (Chip Chapin)
22 * Release 3.00: (not for distribution)
23 * Fixed errors (blank lines) in bible.data file. Data file is not compatible
24 * with previous (1.x and 2.x) distributions. Further changes pending.
25 * Rewrote context handling, and added "<" and ">" commands.
26 * Tools for building brl-index are now part of release.
28 * Revision 1.2 89/09/14 20:33:40 20:33:40 chip (Chip Chapin)
29 * Release 1-2. Supports -f and -l options for formatting the output.
30 * Updates primarily brl.c, bible.c, and bible.1.
32 * Revision 1.1 89/09/05 17:49:09 17:49:09 chip (Chip Chapin)
36 *******************************************************************************
40 * Tue Jan 5 14:29:08 1993 (Chip Chapin) chip@hpclbis
41 * Revised to INCLUDE the tables, which can thus be more easily regenerated
42 * (by the makeindex2 program). This is the first time I've needed to change
43 * the tables since 1989.
44 *******************************************************************************
48 /*----------------------------------------------------------------------
53 | This file contains predefined tables that are used by the
54 | Bible Retrieval Library to index the Bible text. The
55 | tables allow one to locate the absolute verse number (i.e.
56 | counting from the start of the text) of a particular
57 | Book/Chapter/Verse. Another table (currently kept in
58 | bsc-index.c) can then be used to determine the starting
59 | byte location for that verse in the data file.
64 | Two tables: "start_verse" and "start_chapter", described below.
67 | 890121 cc Initial version.
68 | 890830 cc Revised so that the tables can be indexed by
69 | "n+1", i.e. start_chapter[Rev+1] and start_verse[Rev23].
70 | This is very useful for forcing chapter and verse
71 | into the correct range.
73 \*----------------------------------------------------------------------*/
78 This table gives the number of verses occuring in the Bible BEFORE
79 any particular chapter. Gen 1 is "chapter 1", Gen 2 is "chapter 2"
80 etc. Since there are no verses prior to Gen 1, start_verse[1] == 0.
81 start_verse[2] == 31 because there are 31 verses prior to Gen 2:1.
83 #include "brl-startverse.h"
86 The start_chapter table is indexed by Bible BOOK (0..65) and
87 gives the number of CHAPTERS in the whole Bible that precede that
88 particular book. Thus given the BOOK, CHAPTER, and VERSE for a
89 reference, we can easily compute an absolute verse number for that
92 abs_verse = start_verse[ start_chapter[BOOK] + CHAPTER ] + VERSE
94 #include "brl-startchapter.h"