1
4
5# include "luametatex.h"
6
7
8
9
10
11void tex_dump_constants(dumpstream f)
12{
13 dump_via_int(f, max_n_of_toks_registers);
14 dump_via_int(f, max_n_of_box_registers);
15 dump_via_int(f, max_n_of_integer_registers);
16 dump_via_int(f, max_n_of_dimension_registers);
17 dump_via_int(f, max_n_of_attribute_registers);
18 dump_via_int(f, max_n_of_posit_registers);
19 dump_via_int(f, max_n_of_glue_registers);
20 dump_via_int(f, max_n_of_muglue_registers);
21 dump_via_int(f, max_n_of_bytecodes);
22 dump_via_int(f, max_n_of_math_families);
23 dump_via_int(f, max_n_of_math_classes);
24 dump_via_int(f, max_n_of_catcode_tables);
25 dump_via_int(f, max_n_of_box_indices);
26 dump_via_int(f, max_n_of_marks);
27 dump_via_int(f, max_n_of_inserts);
28 dump_via_int(f, max_n_of_box_indices);
29 dump_via_int(f, max_n_of_bytecodes);
30 dump_via_int(f, max_n_of_math_families);
31 dump_via_int(f, max_n_of_math_classes);
32}
33
34static void tex_aux_check_constant(dumpstream f, int c)
35{
36 int x;
37 undump_int(f, x);
38 if (x != c) {
39 tex_fatal_undump_error("inconsistent constant");
40 }
41}
42
43void tex_undump_constants(dumpstream f)
44{
45 tex_aux_check_constant(f, max_n_of_toks_registers);
46 tex_aux_check_constant(f, max_n_of_box_registers);
47 tex_aux_check_constant(f, max_n_of_integer_registers);
48 tex_aux_check_constant(f, max_n_of_dimension_registers);
49 tex_aux_check_constant(f, max_n_of_attribute_registers);
50 tex_aux_check_constant(f, max_n_of_posit_registers);
51 tex_aux_check_constant(f, max_n_of_glue_registers);
52 tex_aux_check_constant(f, max_n_of_muglue_registers);
53 tex_aux_check_constant(f, max_n_of_bytecodes);
54 tex_aux_check_constant(f, max_n_of_math_families);
55 tex_aux_check_constant(f, max_n_of_math_classes);
56 tex_aux_check_constant(f, max_n_of_catcode_tables);
57 tex_aux_check_constant(f, max_n_of_box_indices);
58 tex_aux_check_constant(f, max_n_of_marks);
59 tex_aux_check_constant(f, max_n_of_inserts);
60 tex_aux_check_constant(f, max_n_of_box_indices);
61 tex_aux_check_constant(f, max_n_of_bytecodes);
62 tex_aux_check_constant(f, max_n_of_math_families);
63 tex_aux_check_constant(f, max_n_of_math_classes);
64}
65 |