1
4
5# ifndef LMT_NESTING_H
6# define LMT_NESTING_H
7
8
12
13typedef struct list_state_record {
14 int mode;
15 halfword head;
16 halfword tail;
17 int prev_graf;
18 int mode_line;
19 halfword prev_depth;
20 halfword space_factor;
21 halfword direction_stack;
22 int math_dir;
23 int math_style;
24 int math_main_style;
25 int math_parent_style;
26 int math_scale;
27 halfword math_flatten;
28 halfword math_begin;
29 halfword math_end;
30 halfword math_mode;
31 halfword delimiter;
32 halfword incomplete_noad;
33 int options;
34} list_state_record;
35
36typedef struct nest_state_info {
37 list_state_record *nest;
38 memory_data nest_data;
39 int shown_mode;
40 int math_mode;
41} nest_state_info;
42
43extern nest_state_info lmt_nest_state;
44
45# define cur_list lmt_nest_state.nest[lmt_nest_state.nest_data.ptr]
46# define cur_mode (abs(cur_list.mode))
47
48extern void tex_initialize_nest_state (void);
49
50extern void tex_initialize_nesting (void);
51extern void tex_push_nest (void);
52extern void tex_pop_nest (void);
53extern void tex_tail_prepend (halfword p);
54extern void tex_tail_append (halfword p);
55extern void tex_tail_append_list (halfword p);
56extern void tex_tail_append_callback (halfword p);
57extern halfword tex_tail_fetch_callback (void);
58extern halfword tex_tail_apply_callback (halfword p, halfword c);
59extern halfword tex_pop_tail (void);
60extern const char *tex_string_mode (int m);
61extern void tex_show_activities (void);
62extern int tex_vmode_nest_index (void);
63
64
70
71
78
79
82
83typedef enum mvl_options {
84 mvl_ignore_prev_depth = 0x0001,
85 mvl_no_prev_depth = 0x0002,
86 mvl_discard_top = 0x0004,
87 mvl_discard_bottom = 0x0008,
88} mvl_options;
89
90typedef struct mvl_state_info {
91 list_state_record *mvl;
92 memory_data mvl_data;
93 halfword slot;
94} mvl_state_info;
95
96extern mvl_state_info lmt_mvl_state;
97
98extern void tex_initialize_mvl_state (void);
99extern void tex_start_mvl (void);
100extern void tex_stop_mvl (void);
101extern halfword tex_flush_mvl (halfword n);
102extern int tex_appended_mvl (halfword context, halfword boundary);
103extern int tex_current_mvl (halfword *head, halfword *tail);
104
105# endif
106 |