chiark / gitweb /
Merge remote-tracking branch 'refs/remotes/dgit/dgit/sid'
[bible-kjv.git] / brl-index.c
1 /* -*-C-*-
2 *******************************************************************************
3 *
4 * File:         brl-index.c
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
8 * Created:      Jan 21 1989
9 * Modified:     Tue Jan  5 15:27:22 1993 (Chip Chapin) chip@hpclbis
10 * Language:     C
11 * Package:      Bible Retrieval System
12 * Status:       Experimental (Do Not Distribute)
13 *
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
17 *
18 * Revision 2.0  2003/01/08 15:29:52  matthew
19 * versions collected from the net
20 *
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.
27  * 
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.
31  * 
32  * Revision 1.1  89/09/05  17:49:09  17:49:09  chip (Chip Chapin)
33  * Initial revision
34  * 
35 *
36 *******************************************************************************
37 *
38 * Revisions:
39 *
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 *******************************************************************************
45 */
46
47
48 /*----------------------------------------------------------------------
49 |   NAME:
50 |       brl-index.c
51 |
52 |   PURPOSE:
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.
60 |       
61 |   FUNCTIONS:
62 |       No functions.
63 |       
64 |       Two tables: "start_verse" and "start_chapter", described below.
65 |
66 |   HISTORY:
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.
72 |
73 \*----------------------------------------------------------------------*/
74
75
76
77 /* 
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.
82 */
83 #include "brl-startverse.h"
84
85 /*
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
90     reference as follows:
91
92         abs_verse = start_verse[ start_chapter[BOOK] + CHAPTER ] + VERSE
93 */
94 #include "brl-startchapter.h"
95
96
97 /* end brl-index.c */