source: trunk/third/texinfo/makeinfo/node.h @ 18945

Revision 18945, 4.3 KB checked in by amb, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18944, which included commits to RCS files with non-trunk default branches.
Line 
1/* node.h -- declarations for Node.
2   $Id: node.h,v 1.1.1.2 2003-02-28 17:44:05 amb Exp $
3
4   Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
5
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)
9   any later version.
10
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.
15
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
18   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20   Written by Brian Fox (bfox@ai.mit.edu). */
21
22#ifndef NODE_H
23#define NODE_H
24
25/* The various references that we know about. */
26/* What we remember for each node. */
27typedef struct tentry
28{
29  struct tentry *next_ent;
30  char *node;           /* Name of this node. */
31  char *prev;           /* Name of "Prev:" for this node. */
32  char *next;           /* Name of "Next:" for this node. */
33  char *up;             /* Name of "Up:" for this node.   */
34  int position;         /* Output file position of this node. */
35  int line_no;          /* Defining line in source file. */
36  char *filename;       /* The file that this node was found in. */
37  int touched;          /* Nonzero means this node has been referenced. */
38  int flags;
39  int number;           /* Number for this node, relevant for HTML
40                           splitting -- from use+define order, not just
41                           define. */
42  char *html_fname;     /* The HTML file to which this node is written
43                           (non-NULL only for HTML splitting).  */
44} TAG_ENTRY;
45
46/* If node-a has a "Next" for node-b, but node-b has no "Prev" for node-a,
47   we turn on this flag bit in node-b's tag entry.  This means that when
48   it is time to validate node-b, we don't report an additional error
49   if there was no "Prev" field. */
50#define TAG_FLAG_PREV_ERROR  1
51#define TAG_FLAG_NEXT_ERROR  2
52#define TAG_FLAG_UP_ERROR    4
53#define TAG_FLAG_NO_WARN     8
54#define TAG_FLAG_IS_TOP     16
55#define TAG_FLAG_ANCHOR     32
56
57/* Menu reference, *note reference, and validation hacking. */
58
59/* A structure to remember references with.  A reference to a node is
60   either an entry in a menu, or a cross-reference made with [px]ref. */
61typedef struct node_ref
62{
63  struct node_ref *next;
64  char *node;                   /* Name of node referred to. */
65  char *containing_node;        /* Name of node containing this reference. */
66  int line_no;                  /* Line number where the reference occurs. */
67  int section;                  /* Section level where the reference occurs. */
68  char *filename;               /* Name of file where the reference occurs. */
69  enum reftype type;            /* Type of reference, either menu or note. */
70  int number;                   /* Number for this node, relevant for
71                                   HTML splitting -- from use+define
72                                   order, not just define. */
73} NODE_REF;
74
75/* The linked list of such structures. */
76extern NODE_REF *node_references;
77
78/* A similar list for references occuring in @node next
79   and similar references, needed for HTML. */
80extern NODE_REF *node_node_references;
81
82/* List of all nodes.  */
83extern TAG_ENTRY *tag_table;
84
85/* Counter for setting node_ref.number; zero is Top. */
86extern int node_number;
87
88/* The current node's section level. */
89extern int current_section;
90
91/* Nonzero when the next sectioning command should generate an anchor
92   corresponding to the current node in HTML mode. */
93extern int outstanding_node;
94
95extern TAG_ENTRY *find_node ();
96
97/* A search string which is used to find a line defining a node. */
98DECLARE (char *, node_search_string, "\n@node ");
99
100/* Extract node name from a menu item. */
101extern char *glean_node_from_menu ();
102
103/* Remember a node for later validation.  */
104extern void remember_node_reference ();
105
106/* Remember the name of the current output file.  */
107extern void set_current_output_filename ();
108
109/* Expand macros and commands in the node name and canonicalize
110   whitespace in the resulting expansion.  */
111extern char *expand_node_name ();
112
113#endif /* NODE_H */
Note: See TracBrowser for help on using the repository browser.