Back to index

tetex-bin  3.0
Classes | Typedefs | Functions | Variables
index.h File Reference
#include "makeinfo.h"
#include "cmds.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  index_elt
struct  INDEX_ALIST

Typedefs

typedef struct index_elt INDEX_ELT

Functions

void init_indices (void)
INDEX_ELTindex_list (char *name)

Variables

COMMAND ** user_command_array
int user_command_array_len
INDEX_ALIST ** name_index_alist
int defined_indices
int printing_index
int index_counter

Class Documentation

struct index_elt

Definition at line 31 of file index.h.

Collaboration diagram for index_elt:
Class Members
int code
char * defining_file
int defining_line
char * entry
int entry_number
char * entry_text
struct index_elt * next
char * node
char * output_file
int output_line
char * section
char * section_name
struct INDEX_ALIST

Definition at line 74 of file index.h.

Class Members
int code
char * name
int read_index
int write_index

Typedef Documentation

typedef struct index_elt INDEX_ELT

Function Documentation

INDEX_ELT* index_list ( char *  name)

Definition at line 394 of file index.c.

{
  int which = translate_index (name);
  if (which < 0)
    return (INDEX_ELT *) -1;
  else
    return the_indices[which];
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 331 of file index.c.

{
  int i;

  /* Create the default data structures. */

  /* Initialize data space. */
  if (!the_indices)
    {
      the_indices = xmalloc ((1 + defined_indices) * sizeof (INDEX_ELT *));
      the_indices[defined_indices] = NULL;

      name_index_alist = xmalloc ((1 + defined_indices)
                                  * sizeof (INDEX_ALIST *));
      name_index_alist[defined_indices] = NULL;
    }

  /* If there were existing indices, get rid of them now. */
  for (i = 0; i < defined_indices; i++)
    {
      if (name_index_alist[i])
        { /* Suppose we're called with two input files, and the first
             does a @synindex pg cp.  Then, when we get here to start
             the second file, the "pg" element won't get freed by
             undefindex (because it's pointing to "cp").  So free it
             here; otherwise, when we try to define the pg index again
             just below, it will still point to cp.  */
          undefindex (name_index_alist[i]->name);

          /* undefindex sets all this to null in some cases.  */
          if (name_index_alist[i])
            {
              free (name_index_alist[i]->name);
              free (name_index_alist[i]);
              name_index_alist[i] = NULL;
            }
        }
    }

  /* Add the default indices. */
  top_defindex ("cp", 0);           /* cp is the only non-code index.  */
  top_defindex ("fn", 1);
  top_defindex ("ky", 1);
  top_defindex ("pg", 1);
  top_defindex ("tp", 1);
  top_defindex ("vr", 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 40 of file index.c.

Definition at line 43 of file index.c.

Definition at line 32 of file index.c.

Definition at line 698 of file index.c.

Definition at line 46 of file index.c.

Definition at line 47 of file index.c.