1
4
5# ifndef LMT_MARKS_H
6# define LMT_MARKS_H
7
8typedef enum get_mark_codes {
9 current_marks_code,
10 top_marks_code,
11 first_marks_code,
12 bot_marks_code,
13 split_first_marks_code,
14 split_bot_marks_code,
15
16 top_mark_code,
17 first_mark_code,
18 bot_mark_code,
19 split_first_mark_code,
20 split_bot_mark_code,
21} get_mark_codes;
22
23# define first_valid_mark_code top_marks_code
24# define last_unique_mark_code split_bot_marks_code
25# define last_get_mark_code split_bot_mark_code
26
27typedef enum set_mark_codes {
28 set_mark_code,
29 set_marks_code,
30 clear_marks_code,
31 flush_marks_code,
32} set_mark_codes;
33
34# define last_set_mark_code flush_marks_code
35
36
37
38typedef struct mark_record {
39 halfword marks[split_bot_marks_code+1];
40 halfword state;
41} mark_record;
42
43typedef struct mark_state_info {
44 mark_record *data;
45 int min_used;
46 int max_used;
47 memory_data mark_data;
48} mark_state_info;
49
50extern mark_state_info lmt_mark_state;
51
52extern void tex_initialize_marks (void);
53extern int tex_valid_mark (halfword m);
54extern void tex_reset_mark (halfword m);
55extern void tex_wipe_mark (halfword m);
56extern void tex_delete_mark (halfword m, int what);
57extern halfword tex_get_some_mark (halfword chr, halfword val);
58extern halfword tex_new_mark (quarterword subtype, halfword index, halfword ptr);
59extern int tex_update_top_marks (void);
60extern void tex_update_first_and_bot_mark (halfword m);
61extern int tex_update_first_marks (void);
62extern void tex_update_split_mark (halfword m);
63extern int tex_update_marks (halfword n);
64
65extern void tex_show_marks (void);
66extern int tex_has_mark (halfword m);
67extern halfword tex_get_mark (halfword m, halfword s);
68extern void tex_set_mark (halfword m, halfword s, halfword v);
69
70extern void tex_run_mark (void);
71
72extern halfword lmt_get_mark_class (lua_State *L, int index);
73
74# endif
75 |