xref: /netbsd-src/external/gpl2/groff/dist/src/include/index.h (revision 89a07cf815a29524268025a1139fac4c5190f765)
1*89a07cf8Schristos /*	$NetBSD: index.h,v 1.1.1.1 2016/01/13 18:41:48 christos Exp $	*/
2*89a07cf8Schristos 
3*89a07cf8Schristos // -*- C++ -*-
4*89a07cf8Schristos /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
5*89a07cf8Schristos      Written by James Clark (jjc@jclark.com)
6*89a07cf8Schristos 
7*89a07cf8Schristos This file is part of groff.
8*89a07cf8Schristos 
9*89a07cf8Schristos groff is free software; you can redistribute it and/or modify it under
10*89a07cf8Schristos the terms of the GNU General Public License as published by the Free
11*89a07cf8Schristos Software Foundation; either version 2, or (at your option) any later
12*89a07cf8Schristos version.
13*89a07cf8Schristos 
14*89a07cf8Schristos groff is distributed in the hope that it will be useful, but WITHOUT ANY
15*89a07cf8Schristos WARRANTY; without even the implied warranty of MERCHANTABILITY or
16*89a07cf8Schristos FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17*89a07cf8Schristos for more details.
18*89a07cf8Schristos 
19*89a07cf8Schristos You should have received a copy of the GNU General Public License along
20*89a07cf8Schristos with groff; see the file COPYING.  If not, write to the Free Software
21*89a07cf8Schristos Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
22*89a07cf8Schristos 
23*89a07cf8Schristos #define INDEX_MAGIC 0x23021964
24*89a07cf8Schristos #define INDEX_VERSION 1
25*89a07cf8Schristos 
26*89a07cf8Schristos struct index_header {
27*89a07cf8Schristos   int magic;
28*89a07cf8Schristos   int version;
29*89a07cf8Schristos   int tags_size;
30*89a07cf8Schristos   int table_size;
31*89a07cf8Schristos   int lists_size;
32*89a07cf8Schristos   int strings_size;
33*89a07cf8Schristos   int truncate;
34*89a07cf8Schristos   int shortest;
35*89a07cf8Schristos   int common;
36*89a07cf8Schristos };
37*89a07cf8Schristos 
38*89a07cf8Schristos struct tag {
39*89a07cf8Schristos   int filename_index;
40*89a07cf8Schristos   int start;
41*89a07cf8Schristos   int length;
42*89a07cf8Schristos };
43*89a07cf8Schristos 
44*89a07cf8Schristos unsigned hash(const char *s, int len);
45