1 /* index.h -- declarations for index.c.
2 $Id: index.h,v 1.2 2004/04/11 17:56:47 karl Exp $
4 Copyright (C) 1998, 99 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 2, or (at your option)
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, write to the Free Software Foundation,
18 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26 /* User commands are only new indices. (Macros are handled separately.) */
27 extern COMMAND
**user_command_array
;
28 extern int user_command_array_len
;
30 /* An index element... */
31 typedef struct index_elt
33 struct index_elt
*next
;
34 char *entry
; /* The index entry itself, after expansion. */
35 char *entry_text
; /* The original, non-expanded entry text. */
36 char *node
; /* The node from whence it came. */
37 char *section
; /* Current section number we are in, */
38 char *section_name
; /* ... and its title. */
39 int code
; /* Nonzero means add `@code{...}' when
40 printing this element. */
41 int defining_line
; /* Line number where this entry was written. */
42 int output_line
; /* And line number where it is in the output. */
43 char *defining_file
; /* Source file for defining_line. */
44 char *output_file
; /* Output file for output_line. */
45 int entry_number
; /* Entry number. */
49 /* A list of short-names for each index.
50 There are two indices into the the_indices array.
51 * read_index is the index that points to the list of index
52 entries that we will find if we ask for the list of entries for
54 * write_index is the index that points to the list of index entries
55 that we will add new entries to.
57 Initially, read_index and write_index are the same, but the
58 @syncodeindex and @synindex commands can change the list we add
61 For example, after the commands
67 the cp index will contain the entry `foo', and the new ii
68 index will contain the entry `bar'. This is consistent with the
69 way texinfo.tex handles the same situation.
71 In addition, for each index, it is remembered whether that index is
72 a code index or not. Code indices have @code{} inserted around the
73 first word when they are printed with printindex. */
77 int read_index
; /* index entries for `name' */
78 int write_index
; /* store index entries here, @synindex can change it */
82 extern INDEX_ALIST
**name_index_alist
;
84 /* Initialize all indices. */
85 extern void init_indices (void);
87 extern int defined_indices
;
88 extern int printing_index
;
89 extern int index_counter
;
91 INDEX_ELT
*index_list (char *name
);