fixed a bug in openMemStream (LS); deleted unused close_lua_node (HH)
[luatex.git] / source / texk / web2c / luatexdir / tex / expand.h
blob713901986a3d82dfa98b9f42670d5978e9e71fec
1 /* expand.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 EXPAND_H
22 # define EXPAND_H
24 extern boolean is_in_csname;
25 extern void expand(void);
26 extern void complain_missing_csname(void);
27 extern void manufacture_csname(void);
28 extern void insert_relax(void);
29 extern void get_x_token(void);
30 extern void x_token(void);
32 # define top_mark_code 0 /* the mark in effect at the previous page break */
33 # define first_mark_code 1 /* the first mark between |top_mark| and |bot_mark| */
34 # define bot_mark_code 2 /* the mark in effect at the current page break */
35 # define split_first_mark_code 3
36 /* the first mark found by \.{\\vsplit} */
37 # define split_bot_mark_code 4 /* the last mark found by \.{\\vsplit} */
38 # define marks_code 5
40 # define top_mark(A) top_marks_array[(A)]
41 # define first_mark(A) first_marks_array[(A)]
42 # define bot_mark(A) bot_marks_array[(A)]
43 # define split_first_mark(A) split_first_marks_array[(A)]
44 # define split_bot_mark(A) split_bot_marks_array[(A)]
46 # define set_top_mark(A,B) top_mark(A)=(B)
47 # define set_first_mark(A,B) first_mark(A)=(B)
48 # define set_bot_mark(A,B) bot_mark(A)=(B)
49 # define set_split_first_mark(A,B) split_first_mark(A)=(B)
50 # define set_split_bot_mark(A,B) split_bot_mark(A)=(B)
52 # define delete_top_mark(A) do { \
53 if (top_mark(A)!=null) \
54 delete_token_ref(top_mark(A)); \
55 top_mark(A)=null; \
56 } while (0)
58 # define delete_bot_mark(A) do { \
59 if (bot_mark(A)!=null) \
60 delete_token_ref(bot_mark(A)); \
61 bot_mark(A)=null; \
62 } while (0)
64 # define delete_first_mark(A) do { \
65 if (first_mark(A)!=null) \
66 delete_token_ref(first_mark(A)); \
67 first_mark(A)=null; \
68 } while (0)
70 # define delete_split_first_mark(A) do { \
71 if (split_first_mark(A)!=null) \
72 delete_token_ref(split_first_mark(A)); \
73 split_first_mark(A)=null; \
74 } while (0)
76 # define delete_split_bot_mark(A) do { \
77 if (split_bot_mark(A)!=null) \
78 delete_token_ref(split_bot_mark(A)); \
79 split_bot_mark(A)=null; \
80 } while (0)
82 # define clear_marks_code 1
84 # define biggest_mark 65535
86 extern halfword top_marks_array[(biggest_mark + 1)];
87 extern halfword first_marks_array[(biggest_mark + 1)];
88 extern halfword bot_marks_array[(biggest_mark + 1)];
89 extern halfword split_first_marks_array[(biggest_mark + 1)];
90 extern halfword split_bot_marks_array[(biggest_mark + 1)];
91 extern halfword biggest_used_mark;
94 extern void initialize_marks(void);
96 extern int long_state;
97 extern halfword pstack[9];
98 extern void macro_call(void);
101 #endif