beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / tex / nesting.h
blob238522a77d17d9aa00995f795087d3f20d5d3e98
1 /* nesting.h
3 Copyright 2009 Taco Hoekwater <taco@luatex.org>
5 This file is part of LuaTeX.
7 LuaTeX is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
12 LuaTeX is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License along
18 with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
21 #ifndef NESTING_H
22 # define NESTING_H
24 # define vmode 1 /* vertical mode */
25 # define hmode (vmode+max_command_cmd+1)
26 /* horizontal mode */
27 # define mmode (hmode+max_command_cmd+1)
28 /* math mode */
30 extern void print_mode(int m);
31 extern void print_in_mode(int m);
32 extern int get_mode_id(void);
34 # define ignore_depth -65536000 /* magic dimension value to mean `ignore me' */
36 typedef struct list_state_record_ {
37 int mode_field;
38 halfword head_field;
39 halfword tail_field;
40 halfword eTeX_aux_field;
41 int pg_field;
42 int ml_field;
43 halfword prev_depth_field;
44 halfword space_factor_field;
45 halfword incompleat_noad_field;
46 halfword dirs_field;
47 int math_field;
48 int math_style_field;
49 } list_state_record;
51 extern list_state_record *nest;
52 extern int nest_ptr;
53 extern int max_nest_stack;
54 # define cur_list nest[nest_ptr]
55 /* the ``top'' semantic state */
56 extern int shown_mode;
57 extern halfword save_tail;
59 extern void push_nest(void);
60 extern void pop_nest(void);
61 extern void initialize_nesting(void);
63 extern void tail_append(halfword p);
64 extern halfword pop_tail(void);
67 extern void show_activities(void);
70 #endif