3 /* index.h -- declarations for index.c.
4 Id: index.h,v 1.2 2004/04/11 17:56:47 karl Exp
6 Copyright (C) 1998, 99 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software Foundation,
20 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
28 /* User commands are only new indices. (Macros are handled separately.) */
29 extern COMMAND
**user_command_array
;
30 extern int user_command_array_len
;
32 /* An index element... */
33 typedef struct index_elt
35 struct index_elt
*next
;
36 char *entry
; /* The index entry itself, after expansion. */
37 char *entry_text
; /* The original, non-expanded entry text. */
38 char *node
; /* The node from whence it came. */
39 char *section
; /* Current section number we are in, */
40 char *section_name
; /* ... and its title. */
41 int code
; /* Nonzero means add `@code{...}' when
42 printing this element. */
43 int defining_line
; /* Line number where this entry was written. */
44 int output_line
; /* And line number where it is in the output. */
45 char *defining_file
; /* Source file for defining_line. */
46 char *output_file
; /* Output file for output_line. */
47 int entry_number
; /* Entry number. */
51 /* A list of short-names for each index.
52 There are two indices into the the_indices array.
53 * read_index is the index that points to the list of index
54 entries that we will find if we ask for the list of entries for
56 * write_index is the index that points to the list of index entries
57 that we will add new entries to.
59 Initially, read_index and write_index are the same, but the
60 @syncodeindex and @synindex commands can change the list we add
63 For example, after the commands
69 the cp index will contain the entry `foo', and the new ii
70 index will contain the entry `bar'. This is consistent with the
71 way texinfo.tex handles the same situation.
73 In addition, for each index, it is remembered whether that index is
74 a code index or not. Code indices have @code{} inserted around the
75 first word when they are printed with printindex. */
79 int read_index
; /* index entries for `name' */
80 int write_index
; /* store index entries here, @synindex can change it */
84 extern INDEX_ALIST
**name_index_alist
;
86 /* Initialize all indices. */
87 extern void init_indices (void);
89 extern int defined_indices
;
90 extern int printing_index
;
91 extern int index_counter
;
93 INDEX_ELT
*index_list (char *name
);