-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse.h
More file actions
116 lines (95 loc) · 2.77 KB
/
parse.h
File metadata and controls
116 lines (95 loc) · 2.77 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
* (C) 1997 by Marcin Dalecki <dalecki@math.uni-goettingen.de>
*
* This file is part of the Motif Info browser.
*
* The MInfo program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef PARSE_H
#define PARSE_H
#include <Xm/Text.h>
struct indirect { /* table of indirection files */
struct indirect *next;
char *file;
int tag;
};
struct node { /* node in indirection table */
struct node *next;
char *node;
int tag;
char *file;
};
struct top { /* top indirect file */
struct indirect *indirect;
struct node *node;
};
struct menu {
struct menu *next;
char *name;
char *node;
int hide; /* don't show duplicate xref's or menu entries in menus */
int start; /* offset of it's start in page text */
int stop; /* offset of first char past it's end in page text */
int ustart; /* where to do underlining */
int ustop; /* where to stop underlining */
Boolean visited; /* had this link allready been visited */
};
/*
* Structure describing an chunk of text, which will recive special
* treatment during redrawing of it
*/
enum chunk_kind {
NO_CHUNK,
HEAD1,
HEAD2,
HEAD3,
HEAD4,
ULINE1,
ULINE2,
ULINE3,
ULINE4,
FOOTNOTE,
MENUHEAD,
LISTITEM,
SUBITEM
};
struct chunk {
struct chunk *next;
enum chunk_kind kind;
int start;
int stop;
};
struct page {
struct page *next; /* next in page cache */
char *file;
char *File;
char *Node;
char *Next;
char *Prev;
char *Up;
char *text; /* The actual contents of this page */
struct menu *menu; /* list of menu items in this page */
struct menu *note; /* list of xrefs in this page */
XmTextPosition saved_pos; /* preserved text position if any */
int saved_sbar; /* preserved scrollbar positino if any */
struct chunk *chunk; /* displaying information */
};
extern struct top *parse_top(char *text);
struct page *parse_file(char *file, char *text);
extern void normalize_white_space(char **text);
extern void debug_print_top(struct top *top);
extern void debug_print_page(struct page *page);
#endif /* PARSE_H */