blob: 60a2ce74736b5b4b030e093bb11b9e51477e87bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#ifndef DATA_H
#define DATA_H
/* data.h - first cut at data structures for info2html filter */
/* many of these are motivated by the source code to the 'info' program */
/* file we're working on */
char work_filename[1024];
/* node we're working on */
char work_node[1024];
/* some type's we'll want to use below */
typedef struct info_menu_entry MENU_ENTRY;
/* the basic component of an info file is a Node */
/* a node is described by (FILENAME)NODENAME */
/* .next and .prev are normally along the same branch as current node */
/* .up is normally 'one branch' up the tree above current branch. */
/* All can be arbitrary links however */
/* menu entry is just a linked list of references */
typedef struct {
char *filename; /* file in which this node exists */
char *nodename; /* name of this node */
char *contents; /* text within this node */
int contlen; /* length of contents */
char *next; /* node which follows this one */
char *prev; /* node previous to this one */
char *up; /* node above this one */
MENU_ENTRY *menu; /* linked list of refs from this node */
char *menu_start; /* ptr to start of menu text in contents */
} NODE;
/* a reference is a link to a node */
typedef struct {
char *refname; /* menu name for reference */
NODE *node; /* descriptor of node we point at */
} REFERENCE;
struct info_menu_entry{
char *header; /* header to go before menu */
REFERENCE *ref;
struct info_menu_entry *next;
};
#define INFO_FF '\014'
#define INFO_COOKIE '\037'
#define MENU_START "* Menu:"
#define MENU_ENTRY "* "
#endif /* DATA_H */
|