1 /* index.h -- declarations for index.c.
2 $Id: index.h,v 1.6 2007/09/26 20:53:40 karl Exp $
4 Copyright (C) 1998, 1999, 2007 Free Software Foundation, Inc.
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
25 extern int printing_index;
26 extern int defined_indices;
27 extern int index_counter;
29 /* User commands are only new indices. (Macros are handled separately.) */
30 extern COMMAND **user_command_array;
31 extern int user_command_array_len;
33 /* An index element... */
34 typedef struct index_elt
36 struct index_elt *next;
37 char *entry; /* The index entry itself, after expansion. */
38 char *entry_text; /* The original, non-expanded entry text. */
39 char *node; /* The node from whence it came. */
40 char *section; /* Current section number we are in, */
41 char *section_name; /* ... and its title. */
42 int code; /* Nonzero means add `@code{...}' when
43 printing this element. */
44 int defining_line; /* Line number where this entry was written. */
45 int output_line; /* And line number where it is in the output. */
46 char *defining_file; /* Source file for defining_line. */
47 char *output_file; /* Output file for output_line. */
48 int entry_number; /* Entry number. */
52 /* A list of short-names for each index.
53 There are two indices into the the_indices array.
54 * read_index is the index that points to the list of index
55 entries that we will find if we ask for the list of entries for
57 * write_index is the index that points to the list of index entries
58 that we will add new entries to.
60 Initially, read_index and write_index are the same, but the
61 @syncodeindex and @synindex commands can change the list we add
64 For example, after the commands
70 the cp index will contain the entry `foo', and the new ii
71 index will contain the entry `bar'. This is consistent with the
72 way texinfo.tex handles the same situation.
74 In addition, for each index, it is remembered whether that index is
75 a code index or not. Code indices have @code{} inserted around the
76 first word when they are printed with printindex. */
80 int read_index; /* index entries for `name' */
81 int write_index; /* store index entries here, @synindex can change it */
85 extern INDEX_ALIST **name_index_alist;
87 /* Initialize all indices. */
88 extern void init_indices (void);
90 INDEX_ELT *index_list (char *name);