w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

aptex-macros.h
Go to the documentation of this file.
1 /*
2  Copyright 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Clerk Ma
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301 USA.
18 */
19 
20 #ifndef APTEX_MACROS_H
21 #define APTEX_MACROS_H
22 
23 #define pTeX_version 3
24 #define pTeX_minor_version 9
25 #define pTeX_revision ".0"
26 #define pTeX_version_string "-p3.9.0"
27 
28 #define upTeX_version 1
29 #define upTeX_revision ".26"
30 #define upTeX_version_string "-u1.26"
31 
32 #define eTeX_version 2 // { \.{\\eTeXversion} }
33 #define eTeX_revision ".6" // { \.{\\eTeXrevision} }
34 #define eTeX_version_string "-2.6" // {current \eTeX\ version}
35 
36 #define epTeX_version_string "-210218"
37 #define epTeX_version_number 210218
38 
39 #define TeXXeT_code 0 // {the \TeXXeT\ feature is optional}
40 #define eTeX_states 1 // {number of \eTeX\ state variables in |eqtb|}
41 
42 #define eTeX_ex (eTeX_mode == true)
43 
44 // predefined macro
45 #define abs(x) ((integer)(x) >= 0 ? (integer)(x) : (integer)-(x))
46 #define chr(x) (x)
47 #define odd(x) ((x) % 2)
48 #define round(x) aptex_utils_round((real) (x))
49 #define decr(x) --(x)
50 #define incr(x) ++(x)
51 #define negate(x) x = -x
52 #define empty 0
53 #define KANJI(x) x
54 #define tokanji(x) x
55 #define tonum(x) x
56 // |scaled| data is equivalent to integer
57 #define sc cint
58 //#
59 #define font_base 0
60 /* sec 0022 */
61 #define null_code 0 // 0
62 #define carriage_return 015 // 13
63 #define invalid_code 0177 // 127
64 /* sec 0036 */
65 #define loc cur_input.loc_field
66 /* sec 0040 */
67 #define length(s) (str_start[(s) + 1] - str_start[(s)])
68 /* sec 0041 */
69 #define cur_length (pool_ptr - str_start[str_ptr])
70 #define flush_char() decr(pool_ptr)
71 /* sec 0054 */
72 enum
73 {
74  no_print = 16, // {|selector| setting that makes data disappear}
75  term_only = 17, // {printing is destined for the terminal only}
76  log_only = 18, // {printing is destined for the transcript file only}
77  term_and_log = 19, // {normal |selector| setting}
78  pseudo = 20, // {special |selector| setting for |show_context|}
79  new_string = 21, // {printing is deflected to the string pool}
80  max_selector = 21, // {highest selector setting}
81 };
82 /* sec 0073 */
83 enum
84 {
85  batch_mode = 0, // {omits all stops and omits terminal output}
86  nonstop_mode = 1, // {omits all stops}
87  scroll_mode = 2, // {omits error stops}
88  error_stop_mode = 3, // {stops at every opportunity to interact}
89 };
90 /* sec 0076 */
91 enum
92 {
93  spotless = 0, // {|history| value when nothing has been amiss yet}
94  warning_issued = 1, // {|history| value when |begin_diagnostic| has been called}
95  error_message_issued = 2, // {|history| value when |error| has been called}
96  fatal_error_stop = 3, // {|history| value when termination was premature}
97 };
98 /* sec 0079 */
99 #define help0() tex_help(0)
100 #define help1(...) tex_help(1, __VA_ARGS__)
101 #define help2(...) tex_help(2, __VA_ARGS__)
102 #define help3(...) tex_help(3, __VA_ARGS__)
103 #define help4(...) tex_help(4, __VA_ARGS__)
104 #define help5(...) tex_help(5, __VA_ARGS__)
105 #define help6(...) tex_help(6, __VA_ARGS__)
106 /* sec 0101 */
107 #define unity 0200000 // {$2^{16}$, represents 1.00000}
108 #define two 0400000 // {$2^{17}$, represents 2.00000}
109 /* sec 0095 @ metafont */
110 #define el_gordo 017777777777
111 /* sec 0105 @ metafont */
112 #define fraction_half 01000000000 // {$2^{27}$, represents 0.50000000}
113 #define fraction_one 02000000000 // {$2^{28}$, represents 1.00000000}
114 #define fraction_four 010000000000 // {$2^{30}$, represents 4.00000000}
115 /* sec 0105 */
116 #define nx_plus_y(a, b, c) mult_and_add(a, b, c, 07777777777)
117 #define mult_integers(a, b) mult_and_add(a, b, 0, 017777777777)
118 /* sec 0108 */
119 #define inf_bad 10000
120 /* sec 0109 */
121 #define set_glue_ratio_zero(a) (a) = 0.0
122 #define set_glue_ratio_one(a) (a) = 1.0
123 #define tex_float(a) (a)
124 #define unfloat(a) (a)
125 #define float_constant(a) (real) (a)
126 /* sec 0115 */
127 #define null min_halfword // {the null pointer}
128 /* sec 0118 */
129 #define link(p) mem[p].hh.rh // {the |link| field of a memory word}
130 #define info(p) mem[p].hh.lh // {the |info| field of a memory word}
131 /* sec 0122 */
132 #ifdef STAT
133 #define fast_get_avail(a) \
134  do \
135  { \
136  a = avail; \
137  \
138  if (a == 0) \
139  a = get_avail(); \
140  else \
141  { \
142  avail = link(a); \
143  link(a) = 0; \
144  incr(dyn_used); \
145  } \
146  } \
147  while (0)
148 #else
149 #define fast_get_avail(a) \
150  do \
151  { \
152  a = avail; \
153  \
154  if (a == 0) \
155  a = get_avail(); \
156  else \
157  { \
158  avail = link(a); \
159  link(a) = 0; \
160  } \
161  } \
162  while (0)
163 #endif
164 /* sec 0124 */
165 #define empty_flag max_halfword // {the |link| of an empty variable-size node}
166 #define is_empty(a) (link(a) == empty_flag) // {tests for empty node}
167 #define node_size info // {the size field in empty variable-size nodes}
168 #define llink(a) info(a + 1) // {left link in doubly-linked list of empty nodes}
169 #define rlink(a) link(a + 1) // {right link in doubly-linked list of empty nodes}
170 /* sec 0133 */
171 #define type(a) mem[a].hh.b0 // {identifies what kind of node this is}
172 #define subtype(a) mem[a].hh.b1 // {secondary identification in some cases}
173 /* sec 0134 */
174 #define is_char_node(a) (a >= hi_mem_min) // {does the argument point to a |char_node|?}
175 #define font type // {the font code in a |char_node|}
176 #define character subtype // {the character code in a |char_node|}
177 /* for SyncTeX */
178 #define synctex_field_size 2 // {Declare the {\sl Sync\TeX} field size to store the {\sl Sync\TeX} information: 2 integers for file tag and line}
179 #define sync_tag(a) mem[a - synctex_field_size].cint // {The tag subfield}
180 #define sync_line(a) mem[a - synctex_field_size + 1].cint // {The line subfield}
181 /* sec 0135 */
182 #define hlist_node 0 // {|type| of hlist nodes}
183 #define box_node_size (8 + synctex_field_size) // {number of words to allocate for a box node}
184 //#
185 #define dir_max 5
186 #define box_dir(a) (subtype(a) % 16 - dir_max) // {direction of a box}
187 #define set_box_dir(a,b) subtype(a) = box_lr(a) * 16 + b + dir_max
188 //#
189 #define dir_default 0 // {direction of the box, default Left to Right}
190 #define dir_dtou 1 // {direction of the box, Bottom to Top}
191 #define dir_tate 3 // {direction of the box, Top to Bottom}
192 #define dir_yoko 4 // {direction of the box, equal default}
193 #define any_dir dir_yoko: case dir_tate: case dir_dtou
194 //#
195 #define width_offset 1 // {position of |width| field in a box node}
196 #define depth_offset 2 // {position of |depth| field in a box node}
197 #define height_offset 3 // {position of |height| field in a box node}
198 #define width(a) mem[a + width_offset].sc // {width of the box, in sp}
199 #define depth(a) mem[a + depth_offset].sc // {depth of the box, in sp}
200 #define height(a) mem[a + height_offset].sc // {height of the box, in sp}
201 #define shift_amount(a) mem[a + 4].sc // {repositioning distance, in sp}
202 #define list_offset 5 // {position of |list_ptr| field in a box node}
203 #define list_ptr(a) link(a + list_offset) // {beginning of the list inside the box}
204 #define glue_order(a) subtype(a + list_offset) // {applicable order of infinity}
205 #define glue_sign(a) type(a + list_offset) // {stretching or shrinking}
206 #define normal 0 // {the most common case when several cases are named}
207 #define stretching 1 // {glue setting applies to the stretch components}
208 #define shrinking 2 // {glue setting applies to the shrink components}
209 #define glue_offset 6 // {position of |glue_set| in a box node}
210 #define glue_set(a) mem[a + glue_offset].gr // {a word of type |glue_ratio| for glue setting}
211 #define space_offset 7 // {position of |glue_set| in a box node}
212 #define space_ptr(a) link(a + space_offset)
213 #define xspace_ptr(a) info(a + space_offset)
214 /* sec 0137 */
215 #define vlist_node 1 // {|type| of vlist nodes}
216 #define dir_node 2 // {|type| of dir nodes}
217 /* sec 0138 */
218 #define rule_node 3 // {|type| of rule nodes}
219 #define rule_node_size (4 + synctex_field_size) // {number of words to allocate for a rule node}
220 #define null_flag -010000000000 // {$-2^{30}$, signifies a missing item}
221 #define is_running(a) (a == null_flag) // {tests for a running dimension}
222 /* sec 0140 */
223 #define ins_node 4 // {|type| of insertion nodes}
224 #define ins_node_size 6 // {number of words to allocate for an insertion}
225 #define float_cost(a) mem[a + 1].cint // {the |floating_penalty| to be used}
226 #define ins_ptr(a) info(a + 4) // {the vertical list to be inserted}
227 #define split_top_ptr(a) link(a + 4) // {the |split_top_skip| to be used}
228 #define ins_dir(a) (subtype(a + 5) - dir_max) // {direction of |ins_node|}
229 #define set_ins_dir(a, b) subtype(a + 5) = b + dir_max
230 //#
231 #define disp_node 5 // {|type| of a displace node}
232 #define disp_dimen(a) mem[a + 1].cint
233 /* sec 0141 */
234 #define mark_node 6 // {|type| of a mark node}
235 #define small_node_size 2 // {number of words to allocate for most node types}
236 #define medium_node_size (small_node_size + synctex_field_size)
237 // {number of words to allocate for synchronized node types like math, kern, glue and penalty nodes}
238 #define mark_ptr(a) link(a + 1) // {head of the token list for a mark}
239 #define mark_class(a) info(a + 1) // {the mark class}
240 /* sec 0142 */
241 #define adjust_node 7 // {|type| of an adjust node}
242 #define adjust_ptr(a) mem[a + 1].cint // {vertical list to be moved out of horizontal list}
243 /* sec 0143 */
244 #define ligature_node 8 // {|type| of a ligature node}
245 #define lig_char(a) (a + 1) // {the word where the ligature is to be found}
246 #define lig_ptr(a) link(lig_char(a)) // {the list of characters}
247 /* sec 0145 */
248 #define disc_node 9 // {|type| of a discretionary node}
249 #define replace_count subtype // {how many subsequent nodes to replace}
250 #define pre_break llink // {text that precedes a discretionary break}
251 #define post_break rlink // {text that follows a discretionary break}
252 /* sec 0146 */
253 #define whatsit_node 10 // {|type| of special extension nodes}
254 /* sec 0147 */
255 #define math_node 11 // {|type| of a math node}
256 #define before 0 // {|subtype| for math node that introduces a formula}
257 #define after 1 // {|subtype| for math node that winds up a formula}
258 
259 #define M_code 2
260 #define begin_M_code (M_code + before) // 2 {|subtype| for \.{\\beginM} node}
261 #define end_M_code (M_code + after) // 3 {|subtype| for \.{\\endM} node}
262 #define L_code 4
263 #define begin_L_code (L_code + begin_M_code) // 6 {|subtype| for \.{\\beginL} node}
264 #define end_L_code (L_code + end_M_code) // 7 {|subtype| for \.{\\endL} node}
265 #define R_code 8
266 #define begin_R_code (R_code + begin_M_code) // 10 {|subtype| for \.{\\beginR} node}
267 #define end_R_code (R_code + end_M_code) // 11 {|subtype| for \.{\\endR} node}
268 
269 #define end_LR(a) odd(subtype(a))
270 #define end_LR_type(a) (L_code * (subtype(a) / L_code) + end_M_code)
271 #define begin_LR_type(a) (a - after + before)
272 //
273 #define precedes_break(a) (type(a) < math_node)
274 #define non_discardable(a) (type(a) < math_node)
275 //
276 #define glue_node 12 // {|type| of node that points to a glue specification}
277 #define cond_math_glue 98 // {special |subtype| to suppress glue in the next node}
278 #define mu_glue 99 // {|subtype| for math glue}
279 #define a_leaders 100 // {|subtype| for aligned leaders}
280 #define c_leaders 101 // {|subtype| for centered leaders}
281 #define x_leaders 102 // {|subtype| for expanded leaders}
282 #define glue_ptr llink // {pointer to a glue specification}
283 #define leader_ptr rlink // {pointer to box or rule node for leaders}
284 /* sec 0150 */
285 #define glue_spec_size 4 // {number of words to allocate for a glue specification}
286 #define glue_ref_count(a) link(a) // {reference count of a glue specification}
287 #define stretch(a) mem[a + 2].sc // {the stretchability of this glob of glue}
288 #define shrink(a) mem[a + 3].sc // {the shrinkability of this glob of glue}
289 #define stretch_order type // {order of infinity for stretching}
290 #define shrink_order subtype // {order of infinity for shrinking}
291 #define fil 1 // {first-order infinity}
292 #define fill 2 // {second-order infinity}
293 #define filll 3 // {third-order infinity}
294 /* sec 0155 */
295 #define kern_node 13 // {|type| of a kern node}
296 #define explicit 1 // {|subtype| of kern nodes from \.{\\kern}}
297 #define acc_kern 2 // {|subtype| of kern nodes from accents}
298 #define ita_kern 3 // {|subtype| of kern nodes from \.{\\/}}
299 /* sec 0157 */
300 #define penalty_node 14 // {|type| of a penalty node}
301 #define widow_pena 1 // {|subtype| of penalty nodes from \.{\\jcharwidowpenalty}}
302 #define kinsoku_pena 2 // {|subtype| of penalty nodes from kinsoku}
303 #define inf_penalty inf_bad // {``infinite'' penalty value}
304 #define eject_penalty -inf_bad // {``negatively infinite'' penalty value}
305 #define penalty(a) mem[a + 1].cint // {the added cost of breaking a list here}
306 /* sec 0159 */
307 #define unset_node 15 // {|type| for an unset node}
308 #define glue_stretch(a) mem[a + glue_offset].sc // {total stretch in an unset node}
309 #define glue_shrink shift_amount // {total shrink in an unset node}
310 #define span_count subtype // {indicates the number of spanned columns}
311 /* sec 0162 */
312 #define zero_glue mem_bot // {specification for \.{0pt plus 0pt minus 0pt}}
313 #define fil_glue (zero_glue + glue_spec_size) // {\.{0pt plus 1fil minus 0pt}}
314 #define fill_glue (fil_glue + glue_spec_size) // {\.{0pt plus 1fill minus 0pt}}
315 #define ss_glue (fill_glue + glue_spec_size) // {\.{0pt plus 1fil minus 1fil}}
316 #define fil_neg_glue (ss_glue + glue_spec_size) // {\.{0pt plus -1fil minus 0pt}}
317 #define lo_mem_stat_max (fil_neg_glue + glue_spec_size - 1) // {largest statically allocated word in the variable-size |mem|}
318 // #
319 #define page_ins_head mem_top // {list of insertion data for current page}
320 #define contrib_head (mem_top - 1) // {vlist of items not yet on current page}
321 #define page_head (mem_top - 2) // {vlist for current page}
322 #define temp_head (mem_top - 3) // {head of a temporary list of some kind}
323 #define hold_head (mem_top - 4) // {head of a temporary list of another kind}
324 #define adjust_head (mem_top - 5) // {head of adjustment list returned by |hpack|}
325 #define active (mem_top - 7) // {head of active list in |line_break|, needs two words}
326 #define align_head (mem_top - 8) // {head of preamble list for alignments}
327 #define end_span (mem_top - 9) // {tail of spanned-width lists}
328 #define omit_template (mem_top - 10) // {a constant token list}
329 #define null_list (mem_top - 11) // {permanently empty list}
330 #define lig_trick (mem_top - 12) // {a ligature masquerading as a |char_node|}
331 #define garbage (mem_top - 12) // {used for scrap information}
332 #define backup_head (mem_top - 13) // {head of token list built by |scan_keyword|}
333 #define hi_mem_stat_min (mem_top - 13) // {smallest statically allocated word in the one-word |mem|}
334 #define hi_mem_stat_usage 14 // {the number of one-word nodes always present}
335 /* sec 0200 */
336 #define token_ref_count(a) info(a) // {reference count preceding a token list}
337 /* sec 0203 */
338 #define add_token_ref(a) incr(token_ref_count(a)) // {new reference to a token list}
339 #define add_glue_ref(a) incr(glue_ref_count(a)) // {new reference to a glue spec}
340 /* sec 0207 */
341 #define escape 0 // {escape delimiter (called \.\\ in {\sl The \TeX book\/})}
342 #define relax 0 // {do nothing ( \.{\\relax} )}
343 #define left_brace 1 // {beginning of a group ( \.\{ )}
344 #define right_brace 2 // {ending of a group ( \.\} )}
345 #define math_shift 3 // {mathematics shift character ( \.\$ )}
346 #define tab_mark 4 // {alignment delimiter ( \.\&, \.{\\span} )}
347 #define car_ret 5 // {end of line ( |carriage_return|, \.{\\cr}, \.{\\crcr} )}
348 #define out_param 5 // {output a macro parameter}
349 #define mac_param 6 // {macro parameter symbol ( \.\# )}
350 #define sup_mark 7 // {superscript ( \.{\char'136} )}
351 #define sub_mark 8 // {subscript ( \.{\char'137} )}
352 #define ignore 9 // {characters to ignore ( \.{\^\^@@} )}
353 #define endv 9 // {end of <v_j> list in alignment template}
354 #define spacer 10 // {characters equivalent to blank space ( \.{\ } )}
355 #define letter 11 // {characters regarded as letters ( \.{A..Z}, \.{a..z} )}
356 #define other_char 12 // {none of the special character types}
357 #define active_char 13 // {characters that invoke macros ( \.{\char`\~} )}
358 #define par_end 13 // {end of paragraph ( \.{\\par} )}
359 #define match 13 // {match a macro parameter}
360 #define comment 14 // {characters that introduce comments ( \.\% )}
361 #define end_match 14 // {end of parameters to macro}
362 #define stop 14 // {end of job ( \.{\\end}, \.{\\dump} )}
363 #define invalid_char 15 // {characters that shouldn't appear ( \.{\^\^?} )}
364 #define delim_num 15 // {specify delimiter numerically ( \.{\\delimiter} )}
365 #define not_cjk 15 // {is not cjk characters}
366 #define kanji 16 // {kanji}
367 #define kana 17 // {hiragana, katakana, alphabet}
368 #define other_kchar 18 // {cjk symbol codes}
369 #define hangul 19 // {hangul codes}
370 #define max_char_code 19 // {largest catcode for individual characters}
371 /* sec 0208 */
372 #define char_num (max_char_code + 1) // {character specified numerically ( \.{\\char} )}
373 #define math_char_num (char_num + 1) // {explicit math code ( \.{\\mathchar} )}
374 #define mark (math_char_num + 1) // {mark definition ( \.{\\mark} )}
375 #define xray (mark + 1) // {peek inside of \TeX\ ( \.{\\show}, \.{\\showbox}, etc.~)}
376 #define make_box (xray + 1) // {make a box ( \.{\\box}, \.{\\copy}, \.{\\hbox}, etc.~)}
377 #define hmove (make_box + 1) // {horizontal motion ( \.{\\moveleft}, \.{\\moveright} )}
378 #define vmove (hmove + 1) // {vertical motion ( \.{\\raise}, \.{\\lower} )}
379 #define un_hbox (vmove + 1) // {unglue a box ( \.{\\unhbox}, \.{\\unhcopy} )}
380 #define un_vbox (un_hbox + 1) // {unglue a box ( \.{\\unvbox}, \.{\\unvcopy} )}
381  // {( or \.{\\pagediscards}, \.{\\splitdiscards})}
382 #define remove_item (un_vbox + 1) // {nullify last item ( \.{\\unpenalty}, \.{\\unkern}, \.{\\unskip} )}
383 #define hskip (remove_item + 1) // {horizontal glue ( \.{\\hskip}, \.{\\hfil}, etc.~)}
384 #define vskip (hskip + 1) // {vertical glue ( \.{\\vskip}, \.{\\vfil}, etc.~)}
385 #define mskip (vskip + 1) // {math glue ( \.{\\mskip} )}
386 #define kern (mskip + 1) // {fixed space ( \.{\\kern})}
387 #define mkern (kern + 1) // {math kern ( \.{\\mkern} )}
388 #define leader_ship (mkern + 1) // {use a box ( \.{\\shipout}, \.{\\leaders}, etc.~)}
389 #define halign (leader_ship + 1) // {horizontal table alignment ( \.{\\halign} )}
390 #define valign (halign + 1) // {vertical table alignment ( \.{\\valign} )}
391  // {or text direction directives ( \.{\\beginL}, etc.~)}
392 #define no_align (valign + 1) // {temporary escape from alignment ( \.{\\noalign} )}
393 #define vrule (no_align + 1) // {vertical rule ( \.{\\vrule} )}
394 #define hrule (vrule + 1) // {horizontal rule ( \.{\\hrule} )}
395 #define insert (hrule + 1) // {vlist inserted in box ( \.{\\insert} )}
396 #define vadjust (insert + 1) // {vlist inserted in enclosing paragraph ( \.{\\vadjust} )}
397 #define ignore_spaces (vadjust + 1) // {gobble |spacer| tokens ( \.{\\ignorespaces} )}
398 #define after_assignment (ignore_spaces + 1) // {save till assignment is done ( \.{\\afterassignment} )}
399 #define after_group (after_assignment + 1) // {save till group is done ( \.{\\aftergroup} )}
400 #define break_penalty (after_group + 1) // {additional badness ( \.{\\penalty} )}
401 #define start_par (break_penalty + 1) // {begin paragraph ( \.{\\indent}, \.{\\noindent} )}
402 #define ital_corr (start_par + 1) // {italic correction ( \.{\\/} )}
403 #define accent (ital_corr + 1) // {attach accent in text ( \.{\\accent} )}
404 #define math_accent (accent + 1) // {attach accent in math ( \.{\\mathaccent} )}
405 #define discretionary (math_accent + 1) // {discretionary texts ( \.{\\-}, \.{\\discretionary} )}
406 #define eq_no (discretionary + 1) // {equation number ( \.{\\eqno}, \.{\\leqno} )}
407 #define left_right (eq_no + 1) // {variable delimiter ( \.{\\left}, \.{\\right} )}
408  // {( or \.{\\middle})}
409 #define kchar_num (left_right + 1) // {cjk character specified numerically ( \.{\\kchar} )}
410 #define math_comp (kchar_num + 1) // {component of formula ( \.{\\mathbin}, etc.~)}
411 #define limit_switch (math_comp + 1) // {diddle limit conventions ( \.{\\displaylimits}, etc.~)}
412 #define above (limit_switch + 1) // {generalized fraction ( \.{\\above}, \.{\\atop}, etc.~)}
413 #define math_style (above + 1) // {style specification ( \.{\\displaystyle}, etc.~)}
414 #define math_choice (math_style + 1) // {choice specification ( \.{\\mathchoice} )}
415 #define non_script (math_choice + 1) // {conditional math glue ( \.{\\nonscript} )}
416 #define vcenter (non_script + 1) // {vertically center a vbox ( \.{\\vcenter} )}
417 #define case_shift (vcenter + 1) // {force specific case ( \.{\\lowercase}, \.{\\uppercase}~)}
418 #define message (case_shift + 1) // {send to user ( \.{\\message}, \.{\\errmessage} )}
419 #define extension (message + 1) // {extensions to \TeX\ ( \.{\\write}, \.{\\special}, etc.~)}
420 #define in_stream (extension + 1) // {files for reading ( \.{\\openin}, \.{\\closein} )}
421 #define begin_group (in_stream + 1) // {begin local grouping ( \.{\\begingroup} )}
422 #define end_group (begin_group + 1) // {end local grouping ( \.{\\endgroup} )}
423 #define omit (end_group + 1) // {omit alignment template ( \.{\\omit} )}
424 #define ex_space (omit + 1) // {explicit space ( \.{\\\ } )}
425 #define no_boundary (ex_space + 1) // {suppress boundary ligatures ( \.{\\noboundary} )}
426 #define radical (no_boundary + 1) // {square root and similar signs ( \.{\\radical} )}
427 #define end_cs_name (radical + 1) // {end control sequence ( \.{\\endcsname} )}
428 #define min_internal (end_cs_name + 1) // {the smallest code that can follow \.{\\the}}
429 #define char_given (min_internal + 1) // {character code defined by \.{\\chardef}}
430 #define kchar_given (char_given + 1) // {cjk character code defined by \.{\\kchardef}}
431 #define math_given (kchar_given + 1) // {math code defined by \.{\\mathchardef}}
432 #define last_item (math_given + 1) // {most recent item ( \.{\\lastpenalty}, \.{\\lastkern}, \.{\\lastskip} )}
433 #define inhibit_glue (last_item + 1) // {inhibit adjust glue ( \.{\\inhibitglue} )}
434 #define chg_dir (inhibit_glue + 1) // {change dir mode by \.{\\tate}, \.{\\yoko}}
435 #define max_non_prefixed_command (chg_dir) // {largest command code that can't be \.{\\global}}
436 /* sec 0209 */
437 #define toks_register (max_non_prefixed_command + 1) // {token list register ( \.{\\toks} )}
438 #define assign_toks (toks_register + 1) // {special token list ( \.{\\output}, \.{\\everypar}, etc.~)}
439 #define assign_int (assign_toks + 1) // {user-defined integer ( \.{\\tolerance}, \.{\\day}, etc.~)}
440 #define assign_dimen (assign_int + 1) // {user-defined length ( \.{\\hsize}, etc.~)}
441 #define assign_glue (assign_dimen + 1) // {user-defined glue ( \.{\\baselineskip}, etc.~)}
442 #define assign_mu_glue (assign_glue + 1) // {user-defined muglue ( \.{\\thinmuskip}, etc.~)}
443 #define assign_font_dimen (assign_mu_glue + 1) // {user-defined font dimension ( \.{\\fontdimen} )}
444 #define assign_font_int (assign_font_dimen + 1) // {user-defined font integer ( \.{\\hyphenchar}, \.{\\skewchar} )}
445 #define assign_kinsoku (assign_font_int + 1) // {user-defined kinsoku character ( \.{\\prebreakpenalty}, \.{\\postbreakpenalty} )}
446 #define assign_inhibit_xsp_code (assign_kinsoku + 1) // {user-defined inhibit xsp character ( \.{\\inhibitxspcode} )}
447 #define set_kansuji_char (assign_inhibit_xsp_code + 1) // {user-defined kansuji character ( \.{\\kansujichar} )}
448 #define set_aux (set_kansuji_char + 1) // {specify state info ( \.{\\spacefactor}, \.{\\prevdepth} )}
449 #define set_prev_graf (set_aux + 1) // {specify state info ( \.{\\prevgraf} )}
450 #define set_page_dimen (set_prev_graf + 1) // {specify state info ( \.{\\pagegoal}, etc.~)}
451 #define set_page_int (set_page_dimen + 1) // {specify state info ( \.{\\deadcycles}, \.{\\insertpenalties} )}
452  // {(or \.{\\interactionmode})}
453 #define set_box_dimen (set_page_int + 1) // {change dimension of box ( \.{\\wd}, \.{\\ht}, \.{\\dp} )}
454 #define set_shape (set_box_dimen + 1) // {specify fancy paragraph shape ( \.{\\parshape} )}
455  // {(or \.{\\interlinepenalties}, etc.~)}
456 #define def_code (set_shape + 1) // {define a character code ( \.{\\catcode}, etc.~)}
457 #define def_family (def_code + 1) // {declare math fonts ( \.{\\textfont}, etc.~)}
458 #define set_font (def_family + 1) // {set current font ( font identifiers )}
459 #define def_font (set_font + 1) // {define a font file ( \.{\\font} )}
460 #define def_jfont (def_font + 1) // {define a font file ( \.{\\jfont} )}
461 #define def_tfont (def_jfont + 1) // {define a font file ( \.{\\tfont} )}
462 #define tex_register (def_tfont + 1) // {internal register ( \.{\\count}, \.{\\dimen}, etc.~)}
463 #define max_internal tex_register // {the largest code that can follow \.{\\the}}
464 #define advance (max_internal + 1) // {advance a register or parameter ( \.{\\advance} )}
465 #define multiply (advance + 1) // {multiply a register or parameter ( \.{\\multiply} )}
466 #define divide (multiply + 1) // {divide a register or parameter ( \.{\\divide} )}
467 #define prefix (divide + 1) // {qualify a definition ( \.{\\global}, \.{\\long}, \.{\\outer} )}
468  // {( or \.{\\protected})}
469 #define let (prefix + 1) // {assign a command code ( \.{\\let}, \.{\\futurelet} )}
470 #define shorthand_def (let + 1) // {code definition ( \.{\\chardef}, \.{\\countdef}, etc.~)}
471 #define read_to_cs (shorthand_def + 1) // {read into a control sequence ( \.{\\read} )}
472  // {( or \.{\\readline})}
473 #define def (read_to_cs + 1) // {macro definition ( \.{\\def}, \.{\\gdef}, \.{\\xdef}, \.{\\edef} )}
474 #define set_box (def + 1) // {set a box ( \.{\\setbox} )}
475 #define hyph_data (set_box + 1) // {hyphenation data ( \.{\\hyphenation}, \.{\\patterns} )}
476 #define set_interaction (hyph_data + 1) // {define level of interaction ( \.{\\batchmode}, etc.~)}
477 #define set_auto_spacing (set_interaction + 1) // {set auto spaceing mode ( \.{\\autospacing}, \.{\\noautospacing}, (\.{\\autoxspacing}, \.{\\noautoxspacing})}
478 #define set_enable_cjk_token (set_auto_spacing + 1) // {set cjk mode ( \.{\\enablecjktoken}, \.{\\disablecjktoken}, \.{\\forcecjktoken} )}
479 #define max_command set_enable_cjk_token // {the largest command code seen at |big_switch|}
480 /* sec 0210 */
481 #define undefined_cs (max_command + 1 ) // {initial state of most |eq_type| fields}
482 #define expand_after (max_command + 2 ) // {special expansion ( \.{\\expandafter} )}
483 #define no_expand (max_command + 3 ) // {special nonexpansion ( \.{\\noexpand} )}
484 #define input (max_command + 4 ) // {input a source file ( \.{\\input}, \.{\\endinput} )}
485  // {( or \.{\\scantokens})}
486 #define if_test (max_command + 5 ) // {conditional text ( \.{\\if}, \.{\\ifcase}, etc.~)}
487 #define fi_or_else (max_command + 6 ) // {delimiters for conditionals ( \.{\\else}, etc.~)}
488 #define cs_name (max_command + 7 ) // {make a control sequence from tokens ( \.{\\csname} )}
489 #define convert (max_command + 8 ) // {convert to text ( \.{\\number}, \.{\\string}, etc.~)}
490 #define the (max_command + 9 ) // {expand an internal quantity ( \.{\\the} )}
491  // {( or \.{\\unexpanded}, \.{\\detokenize})}
492 #define top_bot_mark (max_command + 10) // {inserted mark ( \.{\\topmark}, etc.~)}
493 #define call (max_command + 11) // {non-long, non-outer control sequence}
494 #define long_call (max_command + 12) // {long, non-outer control sequence}
495 #define outer_call (max_command + 13) // {non-long, outer control sequence}
496 #define long_outer_call (max_command + 14) // {long, outer control sequence}
497 #define end_template (max_command + 15) // {end of an alignment template}
498 #define dont_expand (max_command + 16) // {the following token was marked by \.{\\noexpand}}
499 #define glue_ref (max_command + 17) // {the equivalent points to a glue specification}
500 #define shape_ref (max_command + 18) // {the equivalent points to a parshape specification}
501 #define box_ref (max_command + 19) // {the equivalent points to a box node, or is |null|}
502 #define data (max_command + 20) // {the equivalent is simply a halfword number}
503 /* sec 0211 */
504 #define vmode 1 // {vertical mode}
505 #define hmode (vmode + max_command + 1) // {horizontal mode}
506 #define mmode (hmode + max_command + 1) // {math mode}
507 /* sec 0212 */
508 #define ignore_depth -65536000 // {|prev_depth| value that is ignored}
509 /* sec 0213 */
510 #define mode cur_list.mode_field // {current mode}
511 #define direction cur_list.dir_field // {current direction}
512 #define adjust_dir cur_list.adj_dir_field // {current adjust direction}
513 #define head cur_list.head_field // {header node of current list}
514 #define tail cur_list.tail_field // {final node on current list}
515 #define prev_node cur_list.pnode_field // {previous to last |disp_node|}
516 #define prev_disp cur_list.pdisp_field // {displacemant at |prev_node|}
517 #define last_jchr cur_list.last_jchr_field // {final jchar node on current list}
518 #define disp_called cur_list.disp_called_field // {is a |disp_node| present in the current list?}
519 #define inhibit_glue_flag cur_list.inhibit_glue_flag_field // {is \.{inhibitglue} is specified at the current list?}
520 #define eTeX_aux cur_list.eTeX_aux_field // {auxiliary data for \eTeX}
521 #define LR_save eTeX_aux // {LR stack when a paragraph is interrupted}
522 #define LR_box eTeX_aux // {prototype box for display}
523 #define delim_ptr eTeX_aux // {most recent left or right noad of a math left group}
524 #define prev_graf cur_list.pg_field // {number of paragraph lines accumulated}
525 #define aux cur_list.aux_field // {auxiliary data about the current list}
526 #define prev_depth aux.sc // {the name of |aux| in vertical mode}
527 #define space_factor aux.hh.lh // {part of |aux| in horizontal mode}
528 #define clang aux.hh.rh // {the other part of |aux| in horizontal mode}
529 #define incompleat_noad aux.cint // {the name of |aux| in math mode}
530 #define mode_line cur_list.ml_field // {source file line number at beginning of list}
531 /* sec 0221 */
532 #define eq_level_field(a) a.hh.b1
533 #define eq_type_field(a) a.hh.b0
534 #define equiv_field(a) a.hh.rh
535 #define eq_level(a) eq_level_field(eqtb[a]) // {level of definition}
536 #define eq_type(a) eq_type_field(eqtb[a]) // {command code for equivalent}
537 #define equiv(a) equiv_field(eqtb[a]) // {equivalent value}
538 #define level_zero min_quarterword // {level for undefined quantities}
539 #define level_one (level_zero + 1) // {outermost level for defined quantities}
540 /* sec 0222 */
541 #define active_base 1 // {beginning of region 1, for active character equivalents}
542 #define single_base (active_base + 256) // {equivalents of one-character control sequences}
543 #define null_cs (single_base + 256) // {equivalent of \.{\\csname\\endcsname}}
544 #define hash_base (null_cs + 1) // {beginning of region 2, for the hash table}
545 #define frozen_control_sequence (hash_base + hash_size) // {for error recovery}
546 #define frozen_protection frozen_control_sequence // {inaccessible but definable}
547 #define frozen_cr (frozen_control_sequence + 1) // {permanent `\.{\\cr}'}
548 #define frozen_end_group (frozen_control_sequence + 2) // {permanent `\.{\\endgroup}'}
549 #define frozen_right (frozen_control_sequence + 3) // {permanent `\.{\\right}'}
550 #define frozen_fi (frozen_control_sequence + 4) // {permanent `\.{\\fi}'}
551 #define frozen_end_template (frozen_control_sequence + 5) // {permanent `\.{\\endtemplate}'}
552 #define frozen_endv (frozen_control_sequence + 6) // {second permanent `\.{\\endtemplate}'}
553 #define frozen_relax (frozen_control_sequence + 7) // {permanent `\.{\\relax}'}
554 #define end_write (frozen_control_sequence + 8) // {permanent `\.{\\endwrite}'}
555 #define frozen_dont_expand (frozen_control_sequence + 9) // {permanent `\.{\\notexpanded:}'}
556 #define frozen_primitive (frozen_control_sequence + 10) // {permanent `\.{\\pdfprimitive}'}
557 #define prim_eqtb_base (frozen_primitive + 1)
558 #define prim_size 2100 // {maximum number of primitives }
559 #define frozen_null_font (prim_eqtb_base + prim_size + 1) // {permanent `\.{\\nullfont}'}
560 #define font_id_base (frozen_null_font - font_base) // {begins table of 257 permanent font identifiers}
561 #define undefined_control_sequence (frozen_null_font + font_max + 2) // {dummy location}
562 #define glue_base (undefined_control_sequence + 1) // {beginning of region 3}
563 /* sec 0224 */
564 #define line_skip_code 0 // {interline glue if |baseline_skip| is infeasible}
565 #define baseline_skip_code 1 // {desired glue between baselines}
566 #define par_skip_code 2 // {extra glue just above a paragraph}
567 #define above_display_skip_code 3 // {extra glue just above displayed math}
568 #define below_display_skip_code 4 // {extra glue just below displayed math}
569 #define above_display_short_skip_code 5 // {glue above displayed math following short lines}
570 #define below_display_short_skip_code 6 // {glue below displayed math following short lines}
571 #define left_skip_code 7 // {glue at left of justified lines}
572 #define right_skip_code 8 // {glue at right of justified lines}
573 #define top_skip_code 9 // {glue at top of main pages}
574 #define split_top_skip_code 10 // {glue at top of split pages}
575 #define tab_skip_code 11 // {glue between aligned entries}
576 #define space_skip_code 12 // {glue between words (if not |zero_glue|)}
577 #define xspace_skip_code 13 // {glue after sentences (if not |zero_glue|)}
578 #define par_fill_skip_code 14 // {glue on last line of paragraph}
579 #define kanji_skip_code 15 // {between kanji-kanji space}
580 #define xkanji_skip_code 16 // {between latin-kanji or kanji-latin space}
581 #define thin_mu_skip_code 17 // {thin space in math formula}
582 #define med_mu_skip_code 18 // {medium space in math formula}
583 #define thick_mu_skip_code 19 // {thick space in math formula}
584 #define jfm_skip 20 // {space refer from JFM}
585 #define glue_pars 21 // {total number of glue parameters}
586 #define skip_base (glue_base + glue_pars) // {table of 256 ``skip'' registers}
587 #define mu_skip_base (skip_base + 256) // {table of 256 ``muskip'' registers}
588 #define local_base (mu_skip_base + 256) // {beginning of region 4}
589 // #
590 #define skip(a) equiv(skip_base + a) // {|mem| location of glue specification}
591 #define mu_skip(a) equiv(mu_skip_base + a) // {|mem| location of math glue spec}
592 #define glue_par(a) equiv(glue_base + a) // {|mem| location of glue specification}
593 #define line_skip glue_par(line_skip_code)
594 #define baseline_skip glue_par(baseline_skip_code)
595 #define par_skip glue_par(par_skip_code)
596 #define above_display_skip glue_par(above_display_skip_code)
597 #define below_display_skip glue_par(below_display_skip_code)
598 #define above_display_short_skip glue_par(above_display_short_skip_code)
599 #define below_display_short_skip glue_par(below_display_short_skip_code)
600 #define left_skip glue_par(left_skip_code)
601 #define right_skip glue_par(right_skip_code)
602 #define top_skip glue_par(top_skip_code)
603 #define split_top_skip glue_par(split_top_skip_code)
604 #define tab_skip glue_par(tab_skip_code)
605 #define space_skip glue_par(space_skip_code)
606 #define xspace_skip glue_par(xspace_skip_code)
607 #define par_fill_skip glue_par(par_fill_skip_code)
608 #define kanji_skip glue_par(kanji_skip_code)
609 #define xkanji_skip glue_par(xkanji_skip_code)
610 #define thin_mu_skip glue_par(thin_mu_skip_code)
611 #define med_mu_skip glue_par(med_mu_skip_code)
612 #define thick_mu_skip glue_par(thick_mu_skip_code)
613 /* sec 0230 */
614 #define par_shape_loc local_base // {specifies paragraph shape}
615 #define output_routine_loc (local_base + 1) // {points to token list for \.{\\output}}
616 #define every_par_loc (local_base + 2) // {points to token list for \.{\\everypar}}
617 #define every_math_loc (local_base + 3) // {points to token list for \.{\\everymath}}
618 #define every_display_loc (local_base + 4) // {points to token list for \.{\\everydisplay}}
619 #define every_hbox_loc (local_base + 5) // {points to token list for \.{\\everyhbox}}
620 #define every_vbox_loc (local_base + 6) // {points to token list for \.{\\everyvbox}}
621 #define every_job_loc (local_base + 7) // {points to token list for \.{\\everyjob}}
622 #define every_cr_loc (local_base + 8) // {points to token list for \.{\\everycr}}
623 #define err_help_loc (local_base + 9) // {points to token list for \.{\\errhelp}}
624 #define tex_toks (local_base + 10) // {end of \TeX's token list parameters}
625 //#
626 #define etex_toks_base tex_toks // {base for \eTeX's token list parameters}
627 #define every_eof_loc etex_toks_base // {points to token list for \.{\\everyeof}}
628 #define etex_toks (etex_toks_base + 1) // {end of \eTeX's token list parameters}
629 //#
630 #define toks_base etex_toks // {table of 256 token list registers}
631 //#
632 #define etex_pen_base (toks_base + 256) // {start of table of \eTeX's penalties}
633 #define inter_line_penalties_loc etex_pen_base // {additional penalties between lines}
634 #define club_penalties_loc (etex_pen_base + 1) // {penalties for creating club lines}
635 #define widow_penalties_loc (etex_pen_base + 2) // {penalties for creating widow lines}
636 #define display_widow_penalties_loc (etex_pen_base + 3) // {ditto, just before a display}
637 #define etex_pens (etex_pen_base + 4) // {end of table of \eTeX's penalties}
638 //#
639 #define box_base etex_pens // {table of 256 box registers}
640 #define cur_font_loc (box_base + 256) // {internal font number outside math mode}
641 #define math_font_base (cur_font_loc + 1) // {table of 48 math font numbers}
642 #define cur_jfont_loc (math_font_base + 48)
643 #define cur_tfont_loc (cur_jfont_loc + 1)
644 #define auto_spacing_code (cur_tfont_loc + 1)
645 #define auto_xspacing_code (auto_spacing_code + 1)
646 #define enable_cjk_token_code (auto_xspacing_code + 1)
647 #define cat_code_base (enable_cjk_token_code + 1) // {table of 256 command codes (the ``catcodes'')}
648 #define kcat_code_base (cat_code_base + 256) // {table of 512 command codes for the wchar's catcodes }
649 #define auto_xsp_code_base (kcat_code_base + 512) // {table of 256 auto spacer flag}
650 #define inhibit_xsp_code_base (auto_xsp_code_base + 256)
651 #define kinsoku_base (inhibit_xsp_code_base + 256) // {table of 256 kinsoku mappings}
652 #define kansuji_base (kinsoku_base + 256) // {table of 10 kansuji mappings}
653 #define lc_code_base (kansuji_base + 10) // {table of 256 lowercase mappings}
654 #define uc_code_base (lc_code_base + 256) // {table of 256 uppercase mappings}
655 #define sf_code_base (uc_code_base + 256) // {table of 256 spacefactor mappings}
656 #define math_code_base (sf_code_base + 256) // {table of 256 math mode mappings}
657 #define int_base (math_code_base + 256) // {table of character substitutions}
658 // #
659 #define par_shape_ptr equiv(par_shape_loc)
660 #define output_routine equiv(output_routine_loc)
661 #define every_par equiv(every_par_loc)
662 #define every_math equiv(every_math_loc)
663 #define every_display equiv(every_display_loc)
664 #define every_hbox equiv(every_hbox_loc)
665 #define every_vbox equiv(every_vbox_loc)
666 #define every_job equiv(every_job_loc)
667 #define every_cr equiv(every_cr_loc)
668 #define err_help equiv(err_help_loc)
669 #define every_eof equiv(every_eof_loc)
670 #define inter_line_penalties_ptr equiv(inter_line_penalties_loc)
671 #define club_penalties_ptr equiv(club_penalties_loc)
672 #define widow_penalties_ptr equiv(widow_penalties_loc)
673 #define display_widow_penalties_ptr equiv(display_widow_penalties_loc)
674 #define toks(a) equiv(toks_base + a)
675 #define box(a) equiv(box_base + a)
676 #define cur_font equiv(cur_font_loc)
677 #define fam_fnt(a) equiv(math_font_base + a)
678 #define cur_jfont equiv(cur_jfont_loc)
679 #define cur_tfont equiv(cur_tfont_loc)
680 #define auto_spacing equiv(auto_spacing_code)
681 #define auto_xspacing equiv(auto_xspacing_code)
682 #define enable_cjk_token equiv(enable_cjk_token_code)
683 #define kcat_code(a) equiv(kcat_code_base + a)
684 #define auto_xsp_code(a) equiv(auto_xsp_code_base + a)
685 #define inhibit_xsp_type(a) eq_type(inhibit_xsp_code_base + a)
686 #define inhibit_xsp_code(a) equiv(inhibit_xsp_code_base + a)
687 #define kinsoku_type(a) eq_type(kinsoku_base + a)
688 #define kinsoku_code(a) equiv(kinsoku_base + a)
689 #define kansuji_char(a) equiv(kansuji_base + a)
690 #define cat_code(a) equiv(cat_code_base + a)
691 #define lc_code(a) equiv(lc_code_base + a)
692 #define uc_code(a) equiv(uc_code_base + a)
693 #define sf_code(a) equiv(sf_code_base + a)
694 #define math_code(a) equiv(math_code_base + a)
695 /* sec 0232 */
696 #define null_font font_base
697 #define var_code 070000 // {math code meaning ``use the current family''}
698 /* sec 0236 */
699 #define pretolerance_code 0 // {badness tolerance before hyphenation}
700 #define tolerance_code 1 // {badness tolerance after hyphenation}
701 #define line_penalty_code 2 // {added to the badness of every line}
702 #define hyphen_penalty_code 3 // {penalty for break after discretionary hyphen}
703 #define ex_hyphen_penalty_code 4 // {penalty for break after explicit hyphen}
704 #define club_penalty_code 5 // {penalty for creating a club line}
705 #define widow_penalty_code 6 // {penalty for creating a widow line}
706 #define display_widow_penalty_code 7 // {ditto, just before a display}
707 #define broken_penalty_code 8 // {penalty for breaking a page at a broken line}
708 #define bin_op_penalty_code 9 // {penalty for breaking after a binary operation}
709 #define rel_penalty_code 10 // {penalty for breaking after a relation}
710 #define pre_display_penalty_code 11 // {penalty for breaking just before a displayed formula}
711 #define post_display_penalty_code 12 // {penalty for breaking just after a displayed formula}
712 #define inter_line_penalty_code 13 // {additional penalty between lines}
713 #define double_hyphen_demerits_code 14 // {demerits for double hyphen break}
714 #define final_hyphen_demerits_code 15 // {demerits for final hyphen break}
715 #define adj_demerits_code 16 // {demerits for adjacent incompatible lines}
716 #define mag_code 17 // {magnification ratio}
717 #define delimiter_factor_code 18 // {ratio for variable-size delimiters}
718 #define looseness_code 19 // {change in number of lines for a paragraph}
719 #define time_code 20 // {current time of day}
720 #define day_code 21 // {current day of the month}
721 #define month_code 22 // {current month of the year}
722 #define year_code 23 // {current year of our Lord}
723 #define show_box_breadth_code 24 // {nodes per level in |show_box|}
724 #define show_box_depth_code 25 // {maximum level in |show_box|}
725 #define hbadness_code 26 // {hboxes exceeding this badness will be shown by |hpack|}
726 #define vbadness_code 27 // {vboxes exceeding this badness will be shown by |vpack|}
727 #define pausing_code 28 // {pause after each line is read from a file}
728 #define tracing_online_code 29 // {show diagnostic output on terminal}
729 #define tracing_macros_code 30 // {show macros as they are being expanded}
730 #define tracing_stats_code 31 // {show memory usage if \TeX\ knows it}
731 #define tracing_paragraphs_code 32 // {show line-break calculations}
732 #define tracing_pages_code 33 // {show page-break calculations}
733 #define tracing_output_code 34 // {show boxes when they are shipped out}
734 #define tracing_lost_chars_code 35 // {show characters that aren't in the font}
735 #define tracing_commands_code 36 // {show command codes at |big_switch|}
736 #define tracing_restores_code 37 // {show equivalents when they are restored}
737 #define uc_hyph_code 38 // {hyphenate words beginning with a capital letter}
738 #define output_penalty_code 39 // {penalty found at current page break}
739 #define max_dead_cycles_code 40 // {bound on consecutive dead cycles of output}
740 #define hang_after_code 41 // {hanging indentation changes after this many lines}
741 #define floating_penalty_code 42 // {penalty for insertions heldover after a split}
742 #define global_defs_code 43 // {override \.{\\global} specifications}
743 #define cur_fam_code 44 // {current family}
744 #define cur_jfam_code 45 // {current kanji family}
745 #define escape_char_code 46 // {escape character for token output}
746 #define default_hyphen_char_code 47 // {value of \.{\\hyphenchar} when a font is loaded}
747 #define default_skew_char_code 48 // {value of \.{\\skewchar} when a font is loaded}
748 #define end_line_char_code 49 // {character placed at the right end of the buffer}
749 #define new_line_char_code 50 // {character that prints as |print_ln|}
750 #define language_code 51 // {current hyphenation table}
751 #define left_hyphen_min_code 52 // {minimum left hyphenation fragment size}
752 #define right_hyphen_min_code 53 // {minimum right hyphenation fragment size}
753 #define holding_inserts_code 54 // {do not remove insertion nodes from \.{\\box255}}
754 #define error_context_lines_code 55 // {maximum intermediate line pairs shown}
755 #define jchr_widow_penalty_code 56 // {penalty for creating a widow KANJI character line}
756 #define text_baseline_shift_factor_code 57
757 #define script_baseline_shift_factor_code 58
758 #define scriptscript_baseline_shift_factor_code 59
759 #define tracing_assigns_code 60 // {show assignments}
760 #define tracing_groups_code 61 // {show save/restore groups}
761 #define tracing_ifs_code 62 // {show conditionals}
762 #define tracing_scan_tokens_code 63 // {show pseudo file open and close}
763 #define tracing_nesting_code 64 // {show incomplete groups and ifs within files}
764 #define pre_display_direction_code 65 // {text direction preceding a display}
765 #define last_line_fit_code 66 // {adjustment for last line of paragraph}
766 #define saving_vdiscards_code 67 // {save items discarded from vlists}
767 #define saving_hyph_codes_code 68 // {save hyphenation codes for languages}
768 #define eTeX_state_code 69 // {\eTeX\ state variables}
769 #define tracing_fontloaders_code 70
770 #define pdf_compress_level_code 71
771 #define pdf_major_version_code 72
772 #define pdf_minor_version_code 73
773 #define synctex_code 74
774 #define tracing_stack_levels_code 75
775 #define int_pars 76
776 #define count_base (int_base + int_pars) // {256 user \.{\\count} registers}
777 #define del_code_base (count_base + 256) // {256 delimiter code mappings}
778 #define dimen_base (del_code_base + 256) // {beginning of region 6}
779 // #
780 #define del_code(a) eqtb[del_code_base + a].cint
781 #define count(a) eqtb[count_base + a].cint
782 #define int_par(a) eqtb[int_base + a].cint
783 #define eTeX_state_base (int_base + eTeX_state_code)
784 #define eTeX_state(a) eqtb[eTeX_state_base + a].cint
785 #define pretolerance int_par(pretolerance_code)
786 #define tolerance int_par(tolerance_code)
787 #define line_penalty int_par(line_penalty_code)
788 #define hyphen_penalty int_par(hyphen_penalty_code)
789 #define ex_hyphen_penalty int_par(ex_hyphen_penalty_code)
790 #define club_penalty int_par(club_penalty_code)
791 #define widow_penalty int_par(widow_penalty_code)
792 #define display_widow_penalty int_par(display_widow_penalty_code)
793 #define broken_penalty int_par(broken_penalty_code)
794 #define bin_op_penalty int_par(bin_op_penalty_code)
795 #define rel_penalty int_par(rel_penalty_code)
796 #define pre_display_penalty int_par(pre_display_penalty_code)
797 #define post_display_penalty int_par(post_display_penalty_code)
798 #define inter_line_penalty int_par(inter_line_penalty_code)
799 #define double_hyphen_demerits int_par(double_hyphen_demerits_code)
800 #define final_hyphen_demerits int_par(final_hyphen_demerits_code)
801 #define adj_demerits int_par(adj_demerits_code)
802 #define mag int_par(mag_code)
803 #define delimiter_factor int_par(delimiter_factor_code)
804 #define looseness int_par(looseness_code)
805 #define tex_time int_par(time_code)
806 #define day int_par(day_code)
807 #define month int_par(month_code)
808 #define year int_par(year_code)
809 #define show_box_breadth int_par(show_box_breadth_code)
810 #define show_box_depth int_par(show_box_depth_code)
811 #define hbadness int_par(hbadness_code)
812 #define vbadness int_par(vbadness_code)
813 #define pausing int_par(pausing_code)
814 #define tracing_online int_par(tracing_online_code)
815 #define tracing_macros int_par(tracing_macros_code)
816 #define tracing_stats int_par(tracing_stats_code)
817 #define tracing_paragraphs int_par(tracing_paragraphs_code)
818 #define tracing_pages int_par(tracing_pages_code)
819 #define tracing_output int_par(tracing_output_code)
820 #define tracing_lost_chars int_par(tracing_lost_chars_code)
821 #define tracing_commands int_par(tracing_commands_code)
822 #define tracing_restores int_par(tracing_restores_code)
823 #define tracing_fontloaders int_par(tracing_fontloaders_code)
824 #define uc_hyph int_par(uc_hyph_code)
825 #define output_penalty int_par(output_penalty_code)
826 #define max_dead_cycles int_par(max_dead_cycles_code)
827 #define hang_after int_par(hang_after_code)
828 #define floating_penalty int_par(floating_penalty_code)
829 #define global_defs int_par(global_defs_code)
830 #define cur_fam int_par(cur_fam_code)
831 #define cur_jfam int_par(cur_jfam_code)
832 #define escape_char int_par(escape_char_code)
833 #define default_hyphen_char int_par(default_hyphen_char_code)
834 #define default_skew_char int_par(default_skew_char_code)
835 #define end_line_char int_par(end_line_char_code)
836 #define new_line_char int_par(new_line_char_code)
837 #define language int_par(language_code)
838 #define left_hyphen_min int_par(left_hyphen_min_code)
839 #define right_hyphen_min int_par(right_hyphen_min_code)
840 #define holding_inserts int_par(holding_inserts_code)
841 #define error_context_lines int_par(error_context_lines_code)
842 #define jchr_widow_penalty int_par(jchr_widow_penalty_code)
843 #define text_baseline_shift_factor int_par(text_baseline_shift_factor_code)
844 #define script_baseline_shift_factor int_par(script_baseline_shift_factor_code)
845 #define scriptscript_baseline_shift_factor int_par(scriptscript_baseline_shift_factor_code)
846 #define tracing_assigns int_par(tracing_assigns_code)
847 #define tracing_groups int_par(tracing_groups_code)
848 #define tracing_ifs int_par(tracing_ifs_code)
849 #define tracing_scan_tokens int_par(tracing_scan_tokens_code)
850 #define tracing_nesting int_par(tracing_nesting_code)
851 #define pre_display_direction int_par(pre_display_direction_code)
852 #define last_line_fit int_par(last_line_fit_code)
853 #define saving_vdiscards int_par(saving_vdiscards_code)
854 #define saving_hyph_codes int_par(saving_hyph_codes_code)
855 #define pdf_compress_level int_par(pdf_compress_level_code)
856 #define pdf_major_version int_par(pdf_major_version_code)
857 #define pdf_minor_version int_par(pdf_minor_version_code)
858 #define synctex int_par(synctex_code)
859 #define tracing_stack_levels int_par(tracing_stack_levels_code)
860 /* sec 0247 */
861 #define par_indent_code 0 // {indentation of paragraphs}
862 #define math_surround_code 1 // {space around math in text}
863 #define line_skip_limit_code 2 // {threshold for |line_skip| instead of |baseline_skip|}
864 #define hsize_code 3 // {line width in horizontal mode}
865 #define vsize_code 4 // {page height in vertical mode}
866 #define max_depth_code 5 // {maximum depth of boxes on main pages}
867 #define split_max_depth_code 6 // {maximum depth of boxes on split pages}
868 #define box_max_depth_code 7 // {maximum depth of explicit vboxes}
869 #define hfuzz_code 8 // {tolerance for overfull hbox messages}
870 #define vfuzz_code 9 // {tolerance for overfull vbox messages}
871 #define delimiter_shortfall_code 10 // {maximum amount uncovered by variable delimiters}
872 #define null_delimiter_space_code 11 // {blank space in null delimiters}
873 #define script_space_code 12 // {extra space after subscript or superscript}
874 #define pre_display_size_code 13 // {length of text preceding a display}
875 #define display_width_code 14 // {length of line for displayed equation}
876 #define display_indent_code 15 // {indentation of line for displayed equation}
877 #define overfull_rule_code 16 // {width of rule that identifies overfull hboxes}
878 #define hang_indent_code 17 // {amount of hanging indentation}
879 #define h_offset_code 18 // {amount of horizontal offset when shipping pages out}
880 #define v_offset_code 19 // {amount of vertical offset when shipping pages out}
881 #define emergency_stretch_code 20 // {reduces badnesses on final pass of line-breaking}
882 #define t_baseline_shift_code 21 // {shift amount when mixing TATE-kumi and Alphabet}
883 #define y_baseline_shift_code 22 // {shift amount when mixing YOKO-kumi and Alphabet}
884 #define pdf_h_origin_code 23
885 #define pdf_v_origin_code 24
886 #define pdf_page_width_code 25
887 #define pdf_page_height_code 26
888 #define dimen_pars 27
889 #define scaled_base (dimen_base + dimen_pars) // {table of 256 user-defined \.{\\dimen} registers}
890 #define kinsoku_penalty_base (scaled_base + 256) // {table of 256 kinsoku registers}
891 #define eqtb_size (kinsoku_penalty_base + 255) // {largest subscript of |eqtb|}
892 // #
893 #define dimen(a) eqtb[scaled_base + a].sc
894 #define dimen_par(a) eqtb[dimen_base + a].sc // {a scaled quantity}
895 #define kinsoku_penalty(a) eqtb[kinsoku_penalty_base + a].cint
896 #define par_indent dimen_par(par_indent_code)
897 #define math_surround dimen_par(math_surround_code)
898 #define line_skip_limit dimen_par(line_skip_limit_code)
899 #define hsize dimen_par(hsize_code)
900 #define vsize dimen_par(vsize_code)
901 #define max_depth dimen_par(max_depth_code)
902 #define split_max_depth dimen_par(split_max_depth_code)
903 #define box_max_depth dimen_par(box_max_depth_code)
904 #define hfuzz dimen_par(hfuzz_code)
905 #define vfuzz dimen_par(vfuzz_code)
906 #define delimiter_shortfall dimen_par(delimiter_shortfall_code)
907 #define null_delimiter_space dimen_par(null_delimiter_space_code)
908 #define script_space dimen_par(script_space_code)
909 #define pre_display_size dimen_par(pre_display_size_code)
910 #define display_width dimen_par(display_width_code)
911 #define display_indent dimen_par(display_indent_code)
912 #define overfull_rule dimen_par(overfull_rule_code)
913 #define hang_indent dimen_par(hang_indent_code)
914 #define h_offset dimen_par(h_offset_code)
915 #define v_offset dimen_par(v_offset_code)
916 #define t_baseline_shift dimen_par(t_baseline_shift_code)
917 #define y_baseline_shift dimen_par(y_baseline_shift_code)
918 #define emergency_stretch dimen_par(emergency_stretch_code)
919 #define pdf_h_origin dimen_par(pdf_h_origin_code)
920 #define pdf_v_origin dimen_par(pdf_v_origin_code)
921 #define pdf_page_width dimen_par(pdf_page_width_code)
922 #define pdf_page_height dimen_par(pdf_page_height_code)
923 /* sec 0256 */
924 #define next(a) hash[a].lh // {link for coalesced lists}
925 #define text(a) hash[a].rh // {string number for control sequence name}
926 #define hash_is_full (hash_used == hash_base) // {test if all positions are occupied}
927 #define font_id_text(a) text(font_id_base + a) // {a frozen font identifier's name}
928 // #
929 #define prim_prime 1777 // {about 85\pct! of |primitive_size|}
930 #define prim_base 1
931 #define prim_next(a) prim[a].lh // {link for coalesced lists}
932 #define prim_text(a) prim[a].rh // {string number for control sequence name, plus one}
933 #define prim_is_full (prim_used == prim_base) // {test if all positions are occupied}
934 #define prim_eq_level_field(a) a.hh.b1
935 #define prim_eq_type_field(a) a.hh.b0
936 #define prim_equiv_field(a) a.hh.rh
937 #define prim_eq_level(a) prim_eq_level_field(eqtb[prim_eqtb_base+a]) // {level of definition}
938 #define prim_eq_type(a) prim_eq_type_field(eqtb[prim_eqtb_base+a]) // {command code for equivalent}
939 #define prim_equiv(a) prim_equiv_field(eqtb[prim_eqtb_base+a]) // {equivalent value}
940 #define undefined_primitive 0
941 #define biggest_char 255 // { 65535 in XeTeX }
942 /* sec 0268 */
943 #define save_type(a) save_stack[a].hh.b0 // {classifies a |save_stack| entry}
944 #define save_level(a) save_stack[a].hh.b1 // {saved level for regions 5 and 6, or group code}
945 #define save_index(a) save_stack[a].hh.rh // {|eqtb| location or token or |save_stack| location}
946 #define restore_old_value 0 // {|save_type| when a value should be restored later}
947 #define restore_zero 1 // {|save_type| when an undefined entry should be restored}
948 #define insert_token 2 // {|save_type| when a token is being saved for later use}
949 #define level_boundary 3 // {|save_type| corresponding to beginning of group}
950 #define restore_sa 4 // {|save_type| when sparse array entries should be restored}
951 /* sec 0269 */
952 #define bottom_level 0 // {group code for the outside world}
953 #define simple_group 1 // {group code for local structure only}
954 #define hbox_group 2 // {code for `\.{\\hbox}\grp'}
955 #define adjusted_hbox_group 3 // {code for `\.{\\hbox}\grp' in vertical mode}
956 #define vbox_group 4 // {code for `\.{\\vbox}\grp'}
957 #define vtop_group 5 // {code for `\.{\\vtop}\grp'}
958 #define align_group 6 // {code for `\.{\\halign}\grp', `\.{\\valign}\grp'}
959 #define no_align_group 7 // {code for `\.{\\noalign}\grp'}
960 #define output_group 8 // {code for output routine}
961 #define math_group 9 // {code for, e.g., `\.{\char'136}\grp'}
962 #define disc_group 10 // {code for `\.{\\discretionary}\grp\grp\grp'}
963 #define insert_group 11 // {code for `\.{\\insert}\grp', `\.{\\vadjust}\grp'}
964 #define vcenter_group 12 // {code for `\.{\\vcenter}\grp'}
965 #define math_choice_group 13 // {code for `\.{\\mathchoice}\grp\grp\grp\grp'}
966 #define semi_simple_group 14 // {code for `\.{\\begingroup...\\endgroup}'}
967 #define math_shift_group 15 // {code for `\.{\$...\$}'}
968 #define math_left_group 16 // {code for `\.{\\left...\\right}'}
969 #define max_group_code 16
970 /* sec 0274 */
971 #define saved(a) save_stack[save_ptr + (a)].cint
972 /* sec 0289 */
973 #define cs_token_flag 0x1FFFFFFF // {amount added to the |eqtb| location in a
974 // token that stands for a control sequence; is a multiple of~@"1000000, less~1}
975 #define max_char_val 0x100 // {to separate char and command code}
976 #define left_brace_token 0x100 // {$2^8\cdot|left_brace|$}
977 #define left_brace_limit 0x200 // {$2^8\cdot(|left_brace|+1)$}
978 #define right_brace_token 0x200 // {$2^8\cdot|right_brace|$}
979 #define right_brace_limit 0x300 // {$2^8\cdot(|right_brace|+1)$}
980 #define math_shift_token 0x300 // {$2^8\cdot|math_shift|$}
981 #define tab_token 0x400 // {$2^8\cdot|tab_mark|$}
982 #define out_param_token 0x500 // {$2^8\cdot|out_param|$}
983 #define space_token 0xA20 // {$2^8\cdot|spacer|+|" "|$}
984 #define letter_token 0xB00 // {$2^8\cdot|letter|$}
985 #define other_token 0xC00 // {$2^8\cdot|other_char|$}
986 #define match_token 0xD00 // {$2^8\cdot|match|$}
987 #define end_match_token 0xE00 // {$2^8\cdot|end_match|$}
988 #define protected_token 0xE01 // {$2^8\cdot|end_match|+1$}
989 /* sec 0298 */
990 #define chr_cmd(s) \
991 do { \
992  prints(s); \
993  print(chr_code); \
994 } while (0)
995 /* sec 0302 */
996 #define state cur_input.state_field // {current scanner state}
997 #define index cur_input.index_field // {reference for buffer information}
998 #define start cur_input.start_field // {starting position in |buffer|}
999 #define limit cur_input.limit_field // {end of current line in |buffer|}
1000 #define name cur_input.name_field // {name of the current file}
1001 #define synctex_tag cur_input.synctex_tag_field // {{\sl Sync\TeX} tag of the current file}
1002 /* sec 0303 */
1003 #define mid_line 1 // {|state| code when scanning a line of characters}
1004 #define mid_kanji (2 + max_char_code) // {|state| code when scanning a line of characters}
1005 #define skip_blanks (3 + max_char_code + max_char_code) // {|state| code when ignoring blanks}
1006 #define new_line (4 + max_char_code + max_char_code + max_char_code) // {|state| code at start of line}
1007 /* sec 0304 */
1008 #define terminal_input (name == 0) // {are we reading from the terminal?}
1009 #define cur_file input_file[index] // {the current |alpha_file| variable}
1010 /* sec 0305 */
1011 #define skipping 1 // {|scanner_status| when passing conditional text}
1012 #define defining 2 // {|scanner_status| when reading a macro definition}
1013 #define matching 3 // {|scanner_status| when reading macro arguments}
1014 #define aligning 4 // {|scanner_status| when reading an alignment preamble}
1015 #define absorbing 5 // {|scanner_status| when reading a balanced text}
1016 /* sec 0307 */
1017 #define token_list 0 // {|state| code when scanning a token list}
1018 #define token_type index // {type of current token list}
1019 #define param_start limit // {base of macro parameters in |param_stack|}
1020 #define parameter 0 // {|token_type| code for parameter}
1021 #define u_template 1 // {|token_type| code for <u_j> template}
1022 #define v_template 2 // {|token_type| code for <v_j> template}
1023 #define backed_up 3 // {|token_type| code for text to be reread}
1024 #define inserted 4 // {|token_type| code for inserted texts}
1025 #define macro 5 // {|token_type| code for defined control sequences}
1026 #define output_text 6 // {|token_type| code for output routines}
1027 #define every_par_text 7 // {|token_type| code for \.{\\everypar}}
1028 #define every_math_text 8 // {|token_type| code for \.{\\everymath}}
1029 #define every_display_text 9 // {|token_type| code for \.{\\everydisplay}}
1030 #define every_hbox_text 10 // {|token_type| code for \.{\\everyhbox}}
1031 #define every_vbox_text 11 // {|token_type| code for \.{\\everyvbox}}
1032 #define every_job_text 12 // {|token_type| code for \.{\\everyjob}}
1033 #define every_cr_text 13 // {|token_type| code for \.{\\everycr}}
1034 #define mark_text 14 // {|token_type| code for \.{\\topmark}, etc.}
1035 //#
1036 #define eTeX_text_offset (output_routine_loc - output_text)
1037 #define every_eof_text (every_eof_loc - eTeX_text_offset)
1038 //#
1039 #define write_text (toks_base - eTeX_text_offset)
1040 /* sec 0316 */
1041 #define begin_pseudoprint() \
1042 do { \
1043  l = tally; \
1044  tally = 0; \
1045  selector = pseudo; \
1046  kcode_pos = 0; \
1047  trick_count = 1000000; \
1048 } while (0)
1049 //
1050 #define set_trick_count() \
1051 do { \
1052  first_count = tally; \
1053  kcp = trick_buf2[(first_count - 1) % error_line]; \
1054  \
1055  if ((first_count > 0) && (kcp > 0)) \
1056  first_count = first_count + nrestmultichr(kcp); \
1057  \
1058  trick_count = first_count + 1 + error_line - half_error_line; \
1059  \
1060  if (trick_count < error_line) \
1061  trick_count = error_line; \
1062 } while (0)
1063 /* sec 0323 */
1064 #define back_list(a) begin_token_list(a, backed_up) // {backs up a simple token list}
1065 #define ins_list(a) begin_token_list(a, inserted) // {inserts a simple token list}
1066 /* sec 0344 */
1067 #define any_state_plus(a) \
1068  mid_line + (a): \
1069  case mid_kanji + (a): \
1070  case skip_blanks + (a): \
1071  case new_line + (a)
1072 /* sec 0347 */
1073 #define add_delims_to(a) \
1074  (a) + math_shift: \
1075  case (a) + tab_mark: \
1076  case (a) + mac_param: \
1077  case (a) + sub_mark: \
1078  case (a) + letter: \
1079  case (a) + other_char
1080 //#
1081 #define all_jcode(a) \
1082  (a) + kanji: \
1083  case (a) + kana: \
1084  case (a) + other_kchar
1085 #define hangul_code(a) \
1086  (a) + hangul
1087 /* sec 0352 */
1088 #define is_hex(a) \
1089  (((a >= '0') && (a <= '9')) || ((a >= 'a') && (a <= 'f')))
1090 //
1091 #define hex_to_cur_chr() \
1092 do { \
1093  if (c <= '9') \
1094  cur_chr = c - '0'; \
1095  else \
1096  cur_chr = c - 'a' + 10; \
1097  \
1098  if (cc <= '9') \
1099  cur_chr = 16 * cur_chr + cc - '0'; \
1100  else \
1101  cur_chr = 16 * cur_chr + cc - 'a' + 10; \
1102 } while (0)
1103 /* sec 0360 */
1104 #define end_line_char_inactive() \
1105  (end_line_char < 0) || (end_line_char > 255)
1106 /* sec 0358 */
1107 /* sec 0371 */
1108 #define store_new_token(a) \
1109 do { \
1110  q = get_avail(); \
1111  link(p) = q; \
1112  info(q) = a; \
1113  p = q; \
1114 } while (0)
1115 //
1116 #define fast_store_new_token(a) \
1117 do { \
1118  fast_get_avail(q); \
1119  link(p) = q; \
1120  info(q) = a; \
1121  p = q; \
1122 } while (0)
1123 #define no_expand_flag 257 // {this characterizes a special variant of |relax|}
1124 /* sec 0382 */
1125 #define marks_code 5 // {add this for \.{\\topmarks} etc.}
1126 //#
1127 #define top_mark_code 0 // {the mark in effect at the previous page break}
1128 #define first_mark_code 1 // {the first mark between |top_mark| and |bot_mark|}
1129 #define bot_mark_code 2 // {the mark in effect at the current page break}
1130 #define split_first_mark_code 3 // {the first mark found by \.{\\vsplit}}
1131 #define split_bot_mark_code 4 // {the last mark found by \.{\\vsplit}}
1132 #define top_mark cur_mark[top_mark_code]
1133 #define first_mark cur_mark[first_mark_code]
1134 #define bot_mark cur_mark[bot_mark_code]
1135 #define split_first_mark cur_mark[split_first_mark_code]
1136 #define split_bot_mark cur_mark[split_bot_mark_code]
1137 /* sec 0400 */
1138 #define int_val 0 // {integer values}
1139 #define dimen_val 1 // {dimension values}
1140 #define glue_val 2 // {glue specifications}
1141 #define mu_val 3 // {math glue specifications}
1142 #define ident_val 4 // {font identifier}
1143 #define tok_val 5 // {token lists}
1144 /* sec 0413 */
1145 #define scanned_result(va, vb) \
1146 do { \
1147  cur_val = va; \
1148  cur_val_level = vb; \
1149 } while (0)
1150 /* sec 0416 */
1151 #define last_node_type_code (glue_val + 1) // {code for \.{\\lastnodetype}}
1152 #define last_node_char_code (glue_val + 2) // {code for \.{\\lastnodechar}}
1153 #define last_node_subtype_code (glue_val + 3) // {code for \.{\\lastnodesubtype}}
1154 #define input_line_no_code (glue_val + 4) // {code for \.{\\inputlineno}}
1155 #define badness_code (input_line_no_code + 1) // {code for \.{\\badness}}
1156 #define shell_escape_code (badness_code + 1) // {code for \.{\\shellescape}}
1157 #define ptex_version_code (shell_escape_code + 1) // {code for \.{\\ptexversion}}
1158 #define ptex_minor_version_code (ptex_version_code + 1) // {code for \.{\\ptexminorversion}}
1159 #define uptex_version_code (ptex_minor_version_code + 1) // {code for \.{\\uptexversion}}
1160 #define eptex_version_code (uptex_version_code + 1) // {code for \.{\\epTeXversion}}
1161 #define pdf_last_x_pos_code (eptex_version_code + 1) // {code for \.{\\pdflastxpos}}
1162 #define pdf_last_y_pos_code (pdf_last_x_pos_code + 1) // {code for \.{\\pdflastypos}}
1163 #define elapsed_time_code (pdf_last_y_pos_code + 1) // {code for \.{\\elapsedtime}}
1164 #define random_seed_code (elapsed_time_code + 1) // {code for \.{\\randomseed}}
1165 //
1166 #define eTeX_int (badness_code + 10) // {first of \eTeX\ codes for integers}
1167 #define eTeX_version_code eTeX_int //
1168 #define current_group_level_code (eTeX_int + 1)
1169 #define current_group_type_code (eTeX_int + 2)
1170 #define current_if_level_code (eTeX_int + 3)
1171 #define current_if_type_code (eTeX_int + 4)
1172 #define current_if_branch_code (eTeX_int + 5)
1173 #define glue_stretch_order_code (eTeX_int + 6)
1174 #define glue_shrink_order_code (eTeX_int + 7)
1175 #define current_spacing_mode_code (eTeX_int + 8)
1176 #define current_xspacing_mode_code (eTeX_int + 9)
1177 #define current_cjk_token_code (eTeX_int + 10)
1178 #define eTeX_dim (eTeX_int + 11)
1179 #define font_char_wd_code eTeX_dim
1180 #define font_char_ht_code (eTeX_dim + 1)
1181 #define font_char_dp_code (eTeX_dim + 2)
1182 #define font_char_ic_code (eTeX_dim + 3)
1183 #define par_shape_length_code (eTeX_dim + 4)
1184 #define par_shape_indent_code (eTeX_dim + 5)
1185 #define par_shape_dimen_code (eTeX_dim + 6)
1186 #define glue_stretch_code (eTeX_dim + 7)
1187 #define glue_shrink_code (eTeX_dim + 8)
1188 #define eTeX_glue (eTeX_dim + 9)
1189 #define eTeX_mu (eTeX_glue + 1)
1190 #define mu_to_glue_code eTeX_glue
1191 #define glue_to_mu_code eTeX_mu
1192 #define eTeX_expr (eTeX_mu + 1)
1193 /* sec 0421 */
1194 #define max_dimen 07777777777
1195 /* sec 0438 */
1196 #define octal_token (other_token + '\'') // {apostrophe, indicates an octal constant}
1197 #define hex_token (other_token + '"' ) // {double quote, indicates a hex constant}
1198 #define alpha_token (other_token + '`' ) // {reverse apostrophe, precedes alpha constants}
1199 #define point_token (other_token + '.' ) // {decimal point}
1200 #define continental_point_token (other_token + ',' ) // {decimal point, Eurostyle}
1201 /* sec 0445 */
1202 #define infinity 017777777777 // {the largest positive value that \TeX\ knows}
1203 #define zero_token (other_token + '0') // {zero, the smallest digit}
1204 #define A_token (letter_token + 'A') // {the smallest special hex digit}
1205 #define other_A_token (other_token + 'A') // {special hex digit of type |other_char|}
1206 /* sec 0448 */
1207 #define scan_normal_dimen() scan_dimen(false, false, false)
1208 /* sec 0458 */
1209 #define set_conversion(a, b) \
1210 do { \
1211  num = a; \
1212  denom = b; \
1213 } while (0)
1214 /* sec 0468 */
1215 #define number_code 0 // {command code for \.{\\number}}
1216 #define roman_numeral_code 1 // {command code for \.{\\romannumeral}}
1217 #define kansuji_code 2 // {command code for \.{\\kansuji}}
1218 #define string_code 3 // {command code for \.{\\string}}
1219 #define meaning_code 4 // {command code for \.{\\meaning}}
1220 #define font_name_code 5 // {command code for \.{\\fontname}}
1221 #define euc_code 6 // {command code for \.{\\euc}}
1222 #define sjis_code 7 // {command code for \.{\\sjis}}
1223 #define jis_code 8 // {command code for \.{\\jis}}
1224 #define kuten_code 9 // {command code for \.{\\kuten}}
1225 #define ucs_code 10 // {command code for \.{\\ucs}}
1226 #define eTeX_revision_code 11 // {base for \eTeX's command codes}
1227 #define ng_strcmp_code 12 // {command code for \.{\\pdfstrcmp}}
1228 #define ng_banner_code 13 // {command code for \.{\\ngbanner}}
1229 #define ng_os_type_code 14 // {command code for \.{\\ngostype}}
1230 #define ptex_revision_code 15 // {command code for \.{\\ptexrevision}}
1231 #define uptex_revision_code 16 // {command code for \.{\\uptexrevision}}
1232 #define pdf_creation_date_code 17 // {command code for \.{\\pdfcreationdate}}
1233 #define pdf_file_mod_date_code 18 // {command code for \.{\\pdffilemodedate}}
1234 #define pdf_file_size_code 19 // {command code for \.{\\pdffilesize}}
1235 #define pdf_mdfive_sum_code 20 // {command code for \.{\\pdfmdfivesum}}
1236 #define pdf_file_dump_code 21 // {command code for \.{\\pdffiledump}}
1237 #define pdf_uniform_deviate_code 22 // {command code for \.{\\pdfuniformdeviate}}
1238 #define pdf_normal_deviate_code 23 // {command code for \.{\\pdfnormaldeviate}}
1239 #define expanded_code 24 // {command code for \.{\\expanded}}
1240 #define Uchar_convert_code 25 // {command code for \.{\\Uchar}}
1241 #define Ucharcat_convert_code 26 // {command code for \.{\\Ucharcat}}
1242 #define job_name_code 27 // {command code for \.{\\jobname}}
1243 /* sec 0480 */
1244 #define closed 2
1245 #define just_open 1
1246 /* sec 0487 */
1247 #define unless_code 32
1248 #define if_char_code 0
1249 #define if_cat_code 1
1250 #define if_int_code 2
1251 #define if_dim_code 3
1252 #define if_odd_code 4
1253 #define if_vmode_code 5
1254 #define if_hmode_code 6
1255 #define if_mmode_code 7
1256 #define if_inner_code 8
1257 #define if_void_code 9
1258 #define if_hbox_code 10
1259 #define if_vbox_code 11
1260 #define ifx_code 12
1261 #define if_eof_code 13
1262 #define if_true_code 14
1263 #define if_false_code 15
1264 #define if_case_code 16
1265 #define if_def_code 17
1266 #define if_cs_code 18
1267 #define if_font_char_code 19
1268 //#
1269 #define if_in_csname_code (if_case_code + 4)
1270 #define if_pdfprimitive_code (if_in_csname_code + 1)
1271 #define if_tdir_code (if_pdfprimitive_code + 1)
1272 #define if_ydir_code (if_tdir_code + 1)
1273 #define if_ddir_code (if_ydir_code + 1)
1274 #define if_mdir_code (if_ddir_code + 1)
1275 #define if_tbox_code (if_mdir_code + 1)
1276 #define if_ybox_code (if_tbox_code + 1)
1277 #define if_dbox_code (if_ybox_code + 1)
1278 #define if_mbox_code (if_dbox_code + 1)
1279 #define if_jfont_code (if_mbox_code + 1)
1280 #define if_tfont_code (if_jfont_code + 1)
1281 /* sec 0489 */
1282 #define if_node_size 2
1283 #define if_line_field(a) mem[(a) + 1].cint
1284 #define if_code 1
1285 #define fi_code 2
1286 #define else_code 3
1287 #define or_code 4
1288 /* sec 0506 */
1289 #define get_x_token_or_active_char() \
1290 do { \
1291  get_x_token(); \
1292  \
1293  if (cur_cmd == relax) \
1294  { \
1295  if (cur_chr == no_expand_flag) \
1296  { \
1297  cur_cmd = active_char; \
1298  cur_chr = cur_tok - cs_token_flag - active_base; \
1299  } \
1300  } \
1301 } while (0)
1302 /* sec 0519 */
1303 #define append_to_name(a) \
1304 do { \
1305  c = a; incr(k); \
1306  \
1307  if (k < file_name_size) \
1308  name_of_file[k] = xchr[c]; \
1309 } while (0)
1310 /* sec 0529 */
1311 #define pack_cur_name() pack_file_name(cur_name, cur_area, cur_ext)
1312 /* sec 0544 */
1313 #define yoko_jfm_id 11
1314 #define tate_jfm_id 9
1315 //#
1316 #define no_tag 0
1317 #define lig_tag 1
1318 #define gk_tag 1
1319 #define list_tag 2
1320 #define ext_tag 3
1321 /* sec 0545 */
1322 #define stop_flag 128
1323 #define kern_flag 128
1324 #define skip_byte(a) a.b0
1325 #define next_char(a) a.b1
1326 #define op_byte(a) a.b2
1327 #define rem_byte(a) a.b3
1328 /* sec 0546 */
1329 #define ext_top(a) a.b0
1330 #define ext_mid(a) a.b1
1331 #define ext_bot(a) a.b2
1332 #define ext_rep(a) a.b3
1333 /* sec 0547 */
1334 #define slant_code 1
1335 #define space_code 2
1336 #define space_stretch_code 3
1337 #define space_shrink_code 4
1338 #define x_height_code 5
1339 #define quad_code 6
1340 #define extra_space_code 7
1341 /* sec 0549 */
1342 #define non_char 256
1343 #define non_address 0
1344 /* sec 0554 */
1345 #define char_info(a, b) font_info[char_base[a] + b].qqqq
1346 #define kchar_code(a, b) font_info[ctype_base[a] + b].hh.rh
1347 #define kchar_type(a, b) font_info[ctype_base[a] + b].hh.lh
1348 #define char_width(a, b) font_info[width_base[a] + b.b0].cint
1349 #define char_exists(a) (a.b0 > min_quarterword)
1350 #define char_italic(a, b) font_info[italic_base[a] + (b.b2) / 4].cint
1351 #define height_depth(a) (a.b1)
1352 #define char_height(a, b) font_info[height_base[a] + (b) / 16].cint
1353 #define char_depth(a, b) font_info[depth_base[a] + (b) % 16].cint
1354 #define char_tag(a) (a.b2 % 4)
1355 /* sec 0557 */
1356 #define char_kern(a, b) font_info[kern_base[a] + 256 * op_byte(b) + rem_byte(b)].cint
1357 #define kern_base_offset (256 * (128 + min_quarterword))
1358 #define lig_kern_start(a, b) lig_kern_base[a] + rem_byte(b)
1359 #define glue_kern_start(a, b) lig_kern_base[a] + rem_byte(b)
1360 #define glue_kern_restart(a, b) lig_kern_base[a] + 256 * op_byte(b) + rem_byte(b) + 32768 - kern_base_offset
1361 #define lig_kern_restart(a, b) lig_kern_base[a] + 256 * op_byte(b) + rem_byte(b) + 32768 - kern_base_offset
1362 /* sec 0558 */
1363 #define param(a, b) font_info[a + param_base[b]].cint
1364 #define slant(f) param(slant_code, f)
1365 #define space(f) param(space_code, f)
1366 #define space_stretch(f) param(space_stretch_code, f)
1367 #define space_shrink(f) param(space_shrink_code, f)
1368 #define x_height(f) param(x_height_code, f)
1369 #define quad(f) param(quad_code, f)
1370 #define extra_space(f) param(extra_space_code, f)
1371 /* sec 0561 */
1372 #define start_font_error_message() \
1373 do { \
1374  print_err("Font "); \
1375  sprint_cs(u); \
1376  print_char('='); \
1377  print_file_name(nom, aire, 335); \
1378  \
1379  if (s >= 0) \
1380  { \
1381  prints(" at "); \
1382  print_scaled(s); \
1383  prints("pt"); \
1384  } \
1385  else if (s != -1000) \
1386  { \
1387  prints(" scaled "); \
1388  print_int(-s); \
1389  } \
1390 } while (0)
1391 /* sec 0564 */
1392 #define read_sixteen(a) \
1393 do { \
1394  a = fbyte; \
1395  \
1396  if (a > 127) \
1397  goto bad_tfm; \
1398  \
1399  fget(); \
1400  a = a * 256 + fbyte; \
1401 } while (0)
1402 // #
1403 #define read_twentyfourx(a) \
1404 do { \
1405  a = fbyte; \
1406  fget(); \
1407  a = a * 0x100 + fbyte; \
1408  fget(); \
1409  a = a + fbyte * 0x10000; \
1410 } while (0)
1411 // #
1412 #define store_four_quarters(val) \
1413 do { \
1414  fget(); a = fbyte; qw.b0 = a; \
1415  fget(); b = fbyte; qw.b1 = b; \
1416  fget(); c = fbyte; qw.b2 = c; \
1417  fget(); d = fbyte; qw.b3 = d; \
1418  val = qw; \
1419 } while (0)
1420 /* sec 0570 */
1421 #define check_byte_range(a) \
1422 do { \
1423  if ((a < bc) || (a > ec)) \
1424  goto bad_tfm; \
1425 } while (0)
1426 /* sec 0571 */
1427 #define store_scaled(a) \
1428 do { \
1429  fget(); a = fbyte; fget(); b = fbyte; \
1430  fget(); c = fbyte; fget(); d = fbyte; \
1431  sw = (((((d * z) / 256) + (c * z)) / 256) + (b * z)) / beta;\
1432  \
1433  if (a == 0) \
1434  a = sw; \
1435  else if (a == 255) \
1436  a = sw - alpha; \
1437  else \
1438  goto bad_tfm; \
1439 } while (0)
1440 /* sec 0573 */
1441 #define check_existence(a) \
1442 do { \
1443  check_byte_range(a); \
1444  qw = char_info(f, a); \
1445  \
1446  if (!char_exists(qw)) \
1447  goto bad_tfm; \
1448 } while (0)
1449 /* sec 0576 */
1450 #define adjust(a) a[f] = a[f]
1451 /* sec 0585 */
1452 #define set1 128 // c[1]
1453 #define set2 129 // c[2]
1454 #define set3 130 // c[3]
1455 #define set4 131 // c[4]
1456 #define set_rule 132 // a[4] b[4]
1457 #define put1 133 // c[1]
1458 #define put2 134 // c[2]
1459 #define put3 135 // c[3]
1460 #define put4 136 // c[4]
1461 #define put_rule 137 // a[4] b[4]
1462 #define nop 138 // NULL
1463 #define bop 139 // c0[4] c1[4] ... c9[4] p[4]
1464 #define eop 140 // NULL
1465 #define push 141 // NULL
1466 #define pop 142 // NULL
1467 #define right1 143 // b[1]
1468 #define right2 144 // b[2]
1469 #define right3 145 // b[3]
1470 #define right4 146 // b[4]
1471 #define w0 147 // NULL
1472 #define w1 148 // b[1]
1473 #define w2 149 // b[2]
1474 #define w3 150 // b[3]
1475 #define w4 151 // b[4]
1476 #define x0 152 // NULL
1477 #define x1 153 // b[1]
1478 #define x2 154 // b[2]
1479 #define x3 155 // b[3]
1480 #define x4 156 // b[4]
1481 #define down1 157 // a[1]
1482 #define down2 158 // a[2]
1483 #define down3 159 // a[3]
1484 #define down4 160 // a[4]
1485 #define y0 161 //
1486 #define y1 162 // a[1]
1487 #define y2 163 // a[2]
1488 #define y3 164 // a[3]
1489 #define y4 165 // a[4]
1490 #define z0 166 //
1491 #define z1 167 // a[1]
1492 #define z2 168 // a[2]
1493 #define z3 169 // a[3]
1494 #define z4 170 // a[4]
1495 #define fnt_num_0 171 //
1496 #define fnt1 235 // k[1]
1497 #define fnt2 236 // k[2]
1498 #define fnt3 237 // k[3]
1499 #define fnt4 238 // k[4]
1500 #define xxx1 239 // k[1] x[k]
1501 #define xxx2 240 // k[2] x[k]
1502 #define xxx3 241 // k[3] x[k]
1503 #define xxx4 242 // k[4] x[k]
1504 #define fnt_def1 243 // k[1] c[4] s[4] d[4] a[1] l[1] n[a + l]
1505 #define fnt_def2 244 // k[2] c[4] s[4] d[4] a[1] l[1] n[a + l]
1506 #define fnt_def3 245 // k[3] c[4] s[4] d[4] a[1] l[1] n[a + l]
1507 #define fnt_def4 246 // k[4] c[4] s[4] d[4] a[1] l[1] n[a + l]
1508 #define pre 247 // i[1] num[4] den[4] mag[4] k[1] x[k]
1509 #define post 248 //
1510 #define post_post 249 //
1511 #define dirchg 255
1512 /* sec 0587 */
1513 #define id_byte 2
1514 #define ex_id_byte 3
1515 /* sec 0605 */
1516 #define movement_node_size 3
1517 #define location(a) mem[a + 2].cint
1518 /* sec 0608 */
1519 #define y_here 1
1520 #define z_here 2
1521 #define yz_OK 3
1522 #define y_OK 4
1523 #define z_OK 5
1524 #define d_fixed 6
1525 /* sec 0611 */
1526 #define none_seen 0
1527 #define y_seen 6
1528 #define z_seen 12
1529 /* sec 0625 */
1530 #define billion 1000000000.0
1531 #define vet_glue(a) \
1532 do { \
1533  glue_temp = a; \
1534  \
1535  if (glue_temp > billion) \
1536  glue_temp = billion; \
1537  else if (glue_temp < -billion)\
1538  glue_temp = -billion; \
1539 } while (0)
1540 /* sec 0644 */
1541 #define exactly 0
1542 #define additional 1
1543 #define natural 0, additional
1544 /* sec 0769 */
1545 #define u_part(a) mem[(a) + height_offset].cint
1546 #define v_part(a) mem[(a) + depth_offset].cint
1547 #define extra_info(a) info((a) + list_offset)
1548 /* sec 0681 */
1549 #define noad_size 5 // {number of words in a normal noad}
1550 #define nucleus(a) ((a) + 1) // {the |nucleus| field of a noad}
1551 #define supscr(a) ((a) + 2) // {the |supscr| field of a noad}
1552 #define subscr(a) ((a) + 3) // {the |subscr| field of a noad}
1553 #define kcode_noad(a) ((a) + 4)
1554 #define math_kcode(a) info((a) + 4) // {the |kanji character| field of a noad}
1555 #define kcode_noad_nucleus(a) ((a) + 3)
1556 #define math_kcode_nucleus(a) info((a) + 3) // {the |kanji character| field offset from nucleus}
1557 //#
1558 #define math_jchar 6
1559 #define math_text_jchar 7
1560 #define math_type link // {a |halfword| in |mem|}
1561 #define fam font // {a |quarterword| in |mem|}
1562 #define math_char 1 // {|math_type| when the attribute is simple}
1563 #define sub_box 2 // {|math_type| when the attribute is a box}
1564 #define sub_exp_box 3 // {|math_type| when the attribute is an explicit created box}
1565 #define sub_mlist 4 // {|math_type| when the attribute is a formula}
1566 #define math_text_char 5 // {|math_type| when italic correction is dubious}
1567 /* sec 0682 */
1568 #define ord_noad (unset_node + 3) // 18 {|type| of a noad classified Ord}
1569 #define op_noad (ord_noad + 1 ) // 19 {|type| of a noad classified Op}
1570 #define bin_noad (ord_noad + 2 ) // 20 {|type| of a noad classified Bin}
1571 #define rel_noad (ord_noad + 3 ) // 21 {|type| of a noad classified Rel}
1572 #define open_noad (ord_noad + 4 ) // 22 {|type| of a noad classified Ope}
1573 #define close_noad (ord_noad + 5 ) // 23 {|type| of a noad classified Clo}
1574 #define punct_noad (ord_noad + 6 ) // 24 {|type| of a noad classified Pun}
1575 #define inner_noad (ord_noad + 7 ) // 25 {|type| of a noad classified Inn}
1576 #define limits 1 // {|subtype| of |op_noad| whose scripts are to be above, below}
1577 #define no_limits 2 // {|subtype| of |op_noad| whose scripts are to be normal}
1578 /* sec 0683 */
1579 #define left_delimiter(a) ((a) + 5)
1580 #define right_delimiter(a) ((a) + 4)
1581 #define radical_noad (inner_noad + 1) // 24
1582 #define radical_noad_size 6
1583 #define fraction_noad (radical_noad + 1) // 25
1584 #define fraction_noad_size 6
1585 #define small_fam(a) mem[(a)].qqqq.b0
1586 #define small_char(a) mem[(a)].qqqq.b1
1587 #define large_fam(a) mem[(a)].qqqq.b2
1588 #define large_char(a) mem[(a)].qqqq.b3
1589 #define thickness width
1590 #define default_code 010000000000
1591 #define numerator supscr
1592 #define denominator subscr
1593 /* sec 0687 */
1594 #define under_noad (fraction_noad + 1) // 26
1595 #define over_noad (under_noad + 1 ) // 27
1596 #define accent_noad (over_noad + 1 ) // 28
1597 #define accent_noad_size 6
1598 #define accent_chr(a) ((a) + 5)
1599 #define vcenter_noad (accent_noad + 1 ) // 29
1600 #define left_noad (vcenter_noad + 1 ) // 30
1601 #define right_noad (left_noad + 1 ) // 31
1602 #define delimiter nucleus
1603 #define middle_noad 1
1604 #define script_allowed(a) ((type(a) >= ord_noad) && (type(a) < left_noad))
1605 /* sec 0688 */
1606 #define style_node (unset_node + 1) // 16 {|type| of a style node}
1607 #define style_node_size 3 // {number of words in a style node}
1608 #define display_style 0 // {|subtype| for \.{\\displaystyle}}
1609 #define text_style 2 // {|subtype| for \.{\\textstyle}}
1610 #define script_style 4 // {|subtype| for \.{\\scriptstyle}}
1611 #define script_script_style 6 // {|subtype| for \.{\\scriptscriptstyle}}
1612 #define cramped 1 // {add this to an uncramped style if you want to cramp it}
1613 /* sec 0689 */
1614 #define choice_node (unset_node + 2) // 17 {|type| of a choice node}
1615 #define display_mlist(a) info((a) + 1) // {mlist to be used in display style}
1616 #define text_mlist(a) link((a) + 1) // {mlist to be used in text style}
1617 #define script_mlist(a) info((a) + 2) // {mlist to be used in script style}
1618 #define script_script_mlist(a) link((a) + 2) // {mlist to be used in scriptscript style}
1619 /* sec 0699 */
1620 #define text_size 0 // {size code for the largest size in a family}
1621 #define script_size 16 // {size code for the medium size in a family}
1622 #define script_script_size 32 // {size code for the smallest size in a family}
1623 /* sec 0700 */
1624 #define mathsy(a, b) font_info[a + param_base[fam_fnt(2 + b)]].cint
1625 #define math_x_height(a) mathsy(5, a) // {height of `\.x'}
1626 #define math_quad(a) mathsy(6, a) // {\.{18mu}}
1627 #define num1(a) mathsy(8, a) // {numerator shift-up in display styles}
1628 #define num2(a) mathsy(9, a) // {numerator shift-up in non-display, non-\.{\\atop}}
1629 #define num3(a) mathsy(10, a) // {numerator shift-up in non-display \.{\\atop}}
1630 #define denom1(a) mathsy(11, a) // {denominator shift-down in display styles}
1631 #define denom2(a) mathsy(12, a) // {denominator shift-down in non-display styles}
1632 #define sup1(a) mathsy(13, a) // {superscript shift-up in uncramped display style}
1633 #define sup2(a) mathsy(14, a) // {superscript shift-up in uncramped non-display}
1634 #define sup3(a) mathsy(15, a) // {superscript shift-up in cramped styles}
1635 #define sub1(a) mathsy(16, a) // {subscript shift-down if superscript is absent}
1636 #define sub2(a) mathsy(17, a) // {subscript shift-down if superscript is present}
1637 #define sup_drop(a) mathsy(18, a) // {superscript baseline below top of large box}
1638 #define sub_drop(a) mathsy(19, a) // {subscript baseline below bottom of large box}
1639 #define delim1(a) mathsy(20, a) // {size of \.{\\atopwithdelims} delimiters in display styles}
1640 #define delim2(a) mathsy(21, a) // {size of \.{\\atopwithdelims} delimiters in non-displays}
1641 #define axis_height(a) mathsy(22, a) // {height of fraction lines above the baseline}
1642 #define total_mathsy_params 22
1643 /* sec 0701 */
1644 #define mathex(a) font_info[(a) + param_base[fam_fnt(3 + cur_size)]].cint
1645 #define default_rule_thickness mathex(8) // {thickness of \.{\\over} bars}
1646 #define big_op_spacing1 mathex(9) // {minimum clearance above a displayed op}
1647 #define big_op_spacing2 mathex(10) // {minimum clearance below a displayed op}
1648 #define big_op_spacing3 mathex(11) // {minimum baselineskip above displayed op}
1649 #define big_op_spacing4 mathex(12) // {minimum baselineskip below displayed op}
1650 #define big_op_spacing5 mathex(13) // {padding above and below displayed limits}
1651 #define total_mathex_params 13
1652 /* sec 0702 */
1653 #define cramped_style(a) (2 * ((a) / 2) + cramped) // {cramp the style}
1654 #define sub_style(a) (2 * ((a) / 4) + script_style + cramped) // {smaller and cramped}
1655 #define sup_style(a) (2 * ((a) / 4) + script_style + ((a) % 2)) // {smaller}
1656 #define num_style(a) ((a) + 2 - 2 * ((a) / 6)) // {smaller unless already script-script}
1657 #define denom_style(a) (2 * ((a) / 2) + cramped + 2 - 2 * ((a) / 6)) // {smaller, cramped}
1658 /* sec 0716 */
1659 #define mu_mult(a) nx_plus_y(n, a, xn_over_d(a, f, 0200000))
1660 /* sec 0725 */
1661 #define new_hlist(a) mem[nucleus(a)].cint
1662 /* sec 0731 */
1663 #define choose_mlist(a) \
1664 do { \
1665  p = a(q); \
1666  a(q) = null; \
1667 } while (0)
1668 /* sec 0770 */
1669 #define preamble link(align_head)
1670 #define align_stack_node_size 5
1671 /* sec 0780 */
1672 #define span_code 256
1673 #define cr_code 257
1674 #define cr_cr_code (cr_code + 1)
1675 #define end_template_token (cs_token_flag + frozen_end_template)
1676 /* sec 0797 */
1677 #define span_node_size 2
1678 /* sec 0817 */
1679 #define tight_fit 3
1680 #define loose_fit 1
1681 #define very_loose_fit 0
1682 #define decent_fit 2
1683 /* sec 0819 */
1684 #define active_node_size_normal 3
1685 #define active_node_size_extended 5
1686 #define active_short(a) mem[a + 3].cint
1687 #define active_glue(a) mem[a + 4].cint
1688 #define fitness subtype
1689 #define break_node rlink
1690 #define line_number llink
1691 #define total_demerits(a) mem[a + 2].cint
1692 #define unhyphenated 0
1693 #define hyphenated 1
1694 #define last_active active
1695 /* sec 0821 */
1696 #define passive_node_size 2
1697 #define cur_break rlink
1698 #define prev_break llink
1699 #define serial info
1700 /* sec 0822 */
1701 #define delta_node_size 7
1702 #define delta_node 2
1703 /* sec 0823 */
1704 #define do_all_six(a) \
1705 do { \
1706  a(1); a(2); a(3); \
1707  a(4); a(5); a(6); \
1708 } while (0)
1709 /* sec 0825 */
1710 #define check_shrinkage(s) \
1711 do { \
1712  if ((shrink_order(s) != normal) && (shrink(s) != 0))\
1713  s = finite_shrink(s); \
1714 } while (0)
1715 /* sec 0829 */
1716 #define copy_to_cur_active(a) cur_active_width[a] = active_width[a]
1717 /* sec 0832 */
1718 #define update_width(a) cur_active_width[a] = cur_active_width[a] + mem[r + (a)].cint
1719 /* sec 0833 */
1720 #define awful_bad 07777777777
1721 /* sec 0837 */
1722 #define set_break_width_to_background(a) break_width[a] = background[a]
1723 /* sec 0843 */
1724 #define convert_to_break_width(a) mem[prev_r + (a)].cint = mem[prev_r + (a)].cint - cur_active_width[a] + break_width[a]
1725 #define store_break_width(a) active_width[a] = break_width[a]
1726 #define new_delta_to_break_width(a) mem[q + (a)].cint = break_width[(a)] - cur_active_width[(a)]
1727 /* sec 0844 */
1728 #define new_delta_from_break_width(a) mem[q + (a)].cint = cur_active_width[(a)] - break_width[(a)]
1729 /* sec 0860 */
1730 #define combine_two_deltas(a) mem[prev_r + (a)].cint = mem[prev_r + (a)].cint + mem[r + (a)].cint
1731 #define downdate_width(a) cur_active_width[(a)] = cur_active_width[(a)] - mem[prev_r + (a)].cint
1732 /* sec 0861 */
1733 #define update_active(a) active_width[(a)] = active_width[(a)] + mem[r + (a)].cint
1734 /* sec 0864 */
1735 #define store_background(a) active_width[a] = background[a]
1736 /* sec 0866 */
1737 #define act_width active_width[1]
1738 #define kern_break() \
1739 do { \
1740  if (!is_char_node(link(cur_p)) && auto_breaking) \
1741  if (type(link(cur_p)) == glue_node) \
1742  try_break(0, unhyphenated); \
1743  \
1744  act_width = act_width + width(cur_p); \
1745 } while (0)
1746 /* sec 0877 */
1747 #define next_break prev_break
1748 /* sec 0908 */
1749 #define append_charnode_to_t(a) \
1750 do { \
1751  link(t) = get_avail(); \
1752  t = link(t); \
1753  font(t) = hf; \
1754  character(t) = (a); \
1755 } while (0)
1756 //
1757 #define set_cur_r() \
1758 do { \
1759  if (j < n) \
1760  cur_r = hu[j + 1]; \
1761  else \
1762  cur_r = bchar; \
1763  \
1764  if (odd(hyf[j])) \
1765  cur_rh = hchar; \
1766  else \
1767  cur_rh = non_char; \
1768 } while (0)
1769 /* sec 0910 */
1770 #define wrap_lig(a) \
1771 do { \
1772  if (ligature_present) \
1773  { \
1774  p = new_ligature(hf, cur_l, link(cur_q)); \
1775  \
1776  if (lft_hit) \
1777  { \
1778  subtype(p) = 2; \
1779  lft_hit = false; \
1780  } \
1781  \
1782  if ((a)) \
1783  if (lig_stack == 0) \
1784  { \
1785  incr(subtype(p)); \
1786  rt_hit = false; \
1787  } \
1788  \
1789  link(cur_q) = p; \
1790  t = p; \
1791  ligature_present = false; \
1792  } \
1793 } while (0)
1794 //
1795 #define pop_lig_stack() \
1796 do { \
1797  if (lig_ptr(lig_stack) != 0) \
1798  { \
1799  link(t) = lig_ptr(lig_stack); \
1800  t = link(t); \
1801  incr(j); \
1802  } \
1803  \
1804  p = lig_stack; \
1805  lig_stack = link(p); \
1806  free_node(p, small_node_size); \
1807  \
1808  if (lig_stack == 0) \
1809  { \
1810  set_cur_r(); \
1811  } \
1812  else \
1813  cur_r = character(lig_stack); \
1814 } while (0)
1815 /* sec 0914 */
1816 #define advance_major_tail() \
1817 do { \
1818  major_tail = link(major_tail); \
1819  incr(r_count); \
1820 } while (0)
1821 /* sec 0947 */
1822 #define trie_root trie_l[0]
1823 /* sec 0970 */
1824 #define active_height active_width
1825 #define cur_height active_height[1]
1826 #define set_height_zero(a) active_width[(a)] = 0
1827 /* sec 0974 */
1828 #define deplorable 100000
1829 /* sec 0980 */
1830 #define inserts_only 1
1831 #define box_there 2
1832 /* sec 0981 */
1833 #define page_ins_node_size 4 // {number of words for a page insertion node}
1834 #define inserting 0 // {an insertion class that has not yet overflowed}
1835 #define split_up 1 // {an overflowed insertion class}
1836 #define broken_ptr(a) link(a + 1) // {an insertion for this class will break here if anywhere}
1837 #define broken_ins(a) info(a + 1) // {this insertion might break at |broken_ptr|}
1838 #define last_ins_ptr(a) link(a + 2) // {the most recent insertion for this |subtype|}
1839 #define best_ins_ptr(a) info(a + 2) // {the optimum most recent insertion}
1840 /* sec 0982 */
1841 #define page_goal page_so_far[0] // {desired height of information on page being built}
1842 #define page_total page_so_far[1] // {height of the current page}
1843 #define page_shrink page_so_far[6] // {shrinkability of the current page}
1844 #define page_depth page_so_far[7] // {depth of the current page}
1845 /* sec 0987 */
1846 #define set_page_so_far_zero(a) page_so_far[(a)] = 0
1847 /* sec 0995 */
1848 #define contrib_tail nest[0].tail_field // {tail of the contribution list}
1849 /* sec 1034 */
1850 #define adjust_space_factor() \
1851 do { \
1852  main_s = sf_code(cur_chr); \
1853  \
1854  if (main_s == 1000) \
1855  space_factor = 1000; \
1856  else if (main_s < 1000) \
1857  { \
1858  if (main_s > 0) \
1859  space_factor = main_s; \
1860  } \
1861  else if (space_factor < 1000) \
1862  space_factor = 1000; \
1863  else \
1864  space_factor = main_s; \
1865 } while (0)
1866 /* sec 1035 */
1867 // {the parameter is either |rt_hit| or |false|}
1868 #define pack_lig(a) \
1869 do { \
1870  main_p = new_ligature(main_f, cur_l, link(cur_q)); \
1871  \
1872  if (lft_hit) \
1873  { \
1874  subtype(main_p) = 2; \
1875  lft_hit = false; \
1876  } \
1877  \
1878  if (a) \
1879  if (lig_stack == 0) \
1880  { \
1881  incr(subtype(main_p)); \
1882  rt_hit = false; \
1883  } \
1884  \
1885  link(cur_q) = main_p; \
1886  tail = main_p; \
1887  ligature_present = false; \
1888 } while (0)
1889 //
1890 #define wrapup(a) \
1891 do { \
1892  if (cur_l < non_char) \
1893  { \
1894  if (link(cur_q) != 0) \
1895  if (character(tail) == hyphen_char[main_f]) \
1896  ins_disc = true; \
1897  \
1898  if (ligature_present) \
1899  pack_lig(a); \
1900  \
1901  if (ins_disc) \
1902  { \
1903  ins_disc = false; \
1904  \
1905  if (mode > 0) \
1906  { \
1907  tail_append(new_disc()); \
1908  } \
1909  } \
1910  } \
1911 } while (0)
1912 /* sec 1045 */
1913 #define any_mode(a) vmode + a: case hmode + a: case mmode + a
1914 /* sec 1046 */
1915 #define non_math(a) vmode + a: case hmode + a
1916 /* sec 1058 */
1917 #define fil_code 0 // {identifies \.{\\hfil} and \.{\\vfil}}
1918 #define fill_code 1 // {identifies \.{\\hfill} and \.{\\vfill}}
1919 #define ss_code 2 // {identifies \.{\\hss} and \.{\\vss}}
1920 #define fil_neg_code 3 // {identifies \.{\\hfilneg} and \.{\\vfilneg}}
1921 #define skip_code 4 // {identifies \.{\\hskip} and \.{\\vskip}}
1922 #define mskip_code 5 // {identifies \.{\\mskip}}
1923 /* sec 1071 */
1924 #define box_flag 010000000000 // {context code for `\.{\\setbox0}'}
1925 #define global_box_flag 010000100000 // {context code for `\.{\\global\\setbox0}'}
1926 #define ship_out_flag 010000200000 // {context code for `\.{\\shipout}'}
1927 #define leader_flag 010000200001 // {context code for `\.{\\leaders}'}
1928 #define box_code 0 // {|chr_code| for `\.{\\box}'}
1929 #define copy_code 1 // {|chr_code| for `\.{\\copy}'}
1930 #define last_box_code 2 // {|chr_code| for `\.{\\lastbox}'}
1931 #define vsplit_code 3 // {|chr_code| for `\.{\\vsplit}'}
1932 #define vtop_code 4 // {|chr_code| for `\.{\\vtop}'}
1933 /* sec 1151 */
1934 #define fam_in_range ((cur_fam >= 0) && (cur_fam < 16))
1935 /* sec 1178 */
1936 #define above_code 0 // { `\.{\\above}' }
1937 #define over_code 1 // { `\.{\\over}' }
1938 #define atop_code 2 // { `\.{\\atop}' }
1939 #define delimited_code 3 // { `\.{\\abovewithdelims}', etc.}
1940 /* sec 1214 */
1941 #define global (a >= 4)
1942 #define define(p, t, e) \
1943 do \
1944 { \
1945  if (global) \
1946  geq_define(p, t, e);\
1947  else \
1948  eq_define(p, t, e); \
1949 } \
1950 while (0)
1951 #define word_define(p, w) \
1952 do \
1953 { \
1954  if (global) \
1955  geq_word_define(p, w);\
1956  else \
1957  eq_word_define(p, w); \
1958 } \
1959 while (0)
1960 /* sec 1222 */
1961 #define char_def_code 0 // {|shorthand_def| for \.{\\chardef}}
1962 #define math_char_def_code 1 // {|shorthand_def| for \.{\\mathchardef}}
1963 #define count_def_code 2 // {|shorthand_def| for \.{\\countdef}}
1964 #define dimen_def_code 3 // {|shorthand_def| for \.{\\dimendef}}
1965 #define skip_def_code 4 // {|shorthand_def| for \.{\\skipdef}}
1966 #define mu_skip_def_code 5 // {|shorthand_def| for \.{\\muskipdef}}
1967 #define toks_def_code 6 // {|shorthand_def| for \.{\\toksdef}}
1968 #define kchar_def_code 7 // {|shorthand_def| for \.{\\kchardef}}
1969 /* sec 1290 */
1970 #define show_code 0 // { \.{\\show} }
1971 #define show_box_code 1 // { \.{\\showbox} }
1972 #define show_the_code 2 // { \.{\\showthe} }
1973 #define show_lists_code 3 // { \.{\\showlists} }
1974 #define show_groups 4 // { \.{\\showgroups} }
1975 #define show_tokens 5 // { \.{\\showtokens} , must be odd! }
1976 #define show_ifs 6 // { \.{\\showifs} }
1977 #define show_mode 7 // { \.{\\showmode} }
1978 /* sec 1306 */
1979 #define undump(va, vb, vc) \
1980 do { \
1981  undump_int(x); \
1982  \
1983  if ((x < (va)) || (x > (vb))) \
1984  goto bad_fmt; \
1985  else \
1986  vc = x; \
1987 } while (0)
1988 
1989 
1990 #define dump_things(base, len) aptex_dump_put (fmt_file, &(base), sizeof(base) * (int) (len))
1991 #define undump_things(base, len) aptex_dump_get (fmt_file, &(base), sizeof(base) * (int) (len))
1992 #define generic_dump(x) aptex_dump_put (fmt_file, &(x), sizeof(x)) //dump_things(x, 1)
1993 #define generic_undump(x) aptex_dump_get (fmt_file, &(x), sizeof(x)) //undump_things(x, 1)
1994 
1995 #define undump_hh generic_undump
1996 #define undump_int generic_undump
1997 
1998 #define too_small(a) \
1999 do { \
2000  wake_up_terminal(); \
2001  printf("---! Must increase the %s", a); \
2002  goto bad_fmt; \
2003 } while (0)
2004 
2005 #define undump_size(arg1, arg2, arg3, arg4) \
2006 do { \
2007  undump_int(x); \
2008  \
2009  if (x < arg1) \
2010  goto bad_fmt; \
2011  \
2012  if (x > arg2) \
2013  too_small(arg3); \
2014  else \
2015  arg4 = x; \
2016 } while (0)
2017 /* sec 1342 */
2018 #define write_node_size 2 // {number of words in a write/whatsit node}
2019 #define open_node_size 3 // {number of words in an open/whatsit node}
2020 #define open_node 0 // {|subtype| in whatsits that represent files to \.{\\openout}}
2021 #define write_node 1 // {|subtype| in whatsits that represent things to \.{\\write}}
2022 #define close_node 2 // {|subtype| in whatsits that represent streams to \.{\\closeout}}
2023 #define special_node 3 // {|subtype| in whatsits that represent \.{\\special} things}
2024 #define language_node 4 // {|subtype| in whatsits that change the current language}
2025 #define what_lang(s) link(s + 1) // {language number, in the range |0..255|}
2026 #define what_lhm(s) type(s + 1) // {minimum left fragment, in the range |1..63|}
2027 #define what_rhm(s) subtype(s + 1) // {minimum right fragment, in the range |1..63|}
2028 #define write_tokens(s) link(s + 1) // {reference count of token list to write}
2029 #define write_stream(s) info(s + 1) // {stream number (0 to 17)}
2030 #define open_name(s) link(s + 1) // {string number of file name to open}
2031 #define open_area(s) info(s + 2) // {string number of file area for |open_name|}
2032 #define open_ext(s) link(s + 2) // {string number of file extension for |open_name|}
2033 
2034 /* sec 1344 */
2035 #define immediate_code 4 // {command modifier for \.{\\immediate}}
2036 #define set_language_code 5 // {command modifier for \.{\\setlanguage}}
2037 #define pdf_save_pos_node 6
2038 #define reset_timer_code 7
2039 #define set_random_seed_code 8
2040 /* sec 1371 */
2041 #define end_write_token (cs_token_flag + end_write)
2042 // macros of pTeX
2043 #define find_effective_tail_epTeX() \
2044 do { \
2045  tx = tail; \
2046  \
2047  if (!is_char_node(tx)) \
2048  { \
2049  if (type(tx) == disp_node) \
2050  tx = prev_node; \
2051  } \
2052  \
2053  if (!is_char_node(tx)) \
2054  { \
2055  if ((type(tx) == disp_node) || \
2056  ((type(tx) == math_node) && (subtype(tx) == end_M_code))) \
2057  { \
2058  r = head; \
2059  q = link(head); \
2060  \
2061  while (q != tx) \
2062  { \
2063  if (is_char_node(q)) \
2064  r = q; \
2065  else if ((type(q) != disp_node) && \
2066  ((type(q) != math_node) || (subtype(q) != end_M_code))) \
2067  r = q; \
2068  \
2069  q = link(q); \
2070  } \
2071  \
2072  tx = r; \
2073  } \
2074  } \
2075 } while (0)
2076 //#
2077 #define find_effective_tail() find_effective_tail_epTeX()
2078 #define find_last_char() \
2079 do { \
2080  if (font_dir[font(tx)] != dir_default) \
2081  cur_val = KANJI(info(link(tx))) % max_cjk_val; \
2082  else \
2083  cur_val = character(tx); \
2084 } while (0)
2085 #define ignore_font_kerning() \
2086 do { \
2087  if (((type(tx) == glue_node) && (subtype(tx) == jfm_skip + 1)) || \
2088  ((type(tx) == penalty_node) && (subtype(tx) == kinsoku_pena))) \
2089  tx = last_jchr; \
2090  else if ((type(tx) == kern_node) && (subtype(tx) == normal)) \
2091  { \
2092  r = head; q = link(head); \
2093  while (q != tx) \
2094  { \
2095  r = q; \
2096  if (is_char_node(q)) \
2097  if (font_dir[font(q)] != dir_default) \
2098  q = link(q); \
2099  q = link(q); \
2100  } \
2101  if ((type(r) == penalty_node) && (subtype(r) == kinsoku_pena)) \
2102  tx = last_jchr; \
2103  else \
2104  tx = r; \
2105  } \
2106  if (!is_char_node(tx)) \
2107  { \
2108  if (type(tx) == ligature_node) \
2109  { \
2110  r = lig_ptr(tx); \
2111  while (link(r) != null) \
2112  r = link(r); \
2113  cur_val = character(r); \
2114  } \
2115  } \
2116  else \
2117  find_last_char(); \
2118 } while (0)
2119 #define current_character_being_worked_on (k - char_base[f])
2120 #define print_lc_hex(a) \
2121 do { \
2122  l = (a); \
2123  \
2124  if (l < 10) \
2125  print_char(l + '0'); \
2126  else \
2127  print_char(l - 10 + 'a'); \
2128 } while (0)
2129 //
2130 #define goto_main_lig_loop() \
2131 do { \
2132  bchar = non_char; \
2133  cur_r = bchar; \
2134  lig_stack = 0; \
2135  \
2136  if (ligature_present) \
2137  pack_lig(rt_hit); \
2138  \
2139  if (ins_kp == true) \
2140  { \
2141  cx = cur_l; \
2142  insert_kinsoku_penalty(); \
2143  } \
2144  \
2145  ins_kp = false; \
2146  goto main_loop_j; \
2147 } \
2148 while (0)
2149 //
2150 /*
2151 {extract |tx|, drop \.{\\beginM} \.{\\endM} pair and\slash or merge |disp_node| pair}
2152 */
2153 #define fetch_effective_tail_epTeX(a) \
2154 do \
2155 { \
2156  q = head; \
2157  p = null; r = null; fm = 0; fd = 0; \
2158  disp = 0; \
2159  pdisp = 0; \
2160  \
2161  do { \
2162  s = r; r = p; \
2163  p = q; fm = fm / 2; fd = fd / 2; \
2164  fd = false; \
2165  \
2166  if (!is_char_node(q)) \
2167  if (type(q) == disc_node) \
2168  { \
2169  for (m = 1; m <= replace_count(q); m++) \
2170  p = link(p); \
2171  \
2172  if (p == tx) \
2173  { \
2174  a; \
2175  } \
2176  } \
2177  else if ((type(q) == math_node) && \
2178  (subtype(q) == begin_M_code)) \
2179  fm = 2; \
2180  else if (type(q) == disp_node) \
2181  { \
2182  pdisp = disp; \
2183  disp = disp_dimen(q); \
2184  fd = 2; \
2185  } \
2186  \
2187  q = link(p); \
2188  } while (!(q == tx)); \
2189  \
2190  q = link(tx); link(p) = q; link(tx) = null; \
2191  \
2192  if (q == null) \
2193  { \
2194  tail = p; gm = 0; gd = 0; \
2195  } \
2196  else \
2197  { \
2198  if (type(q) == math_node) \
2199  { \
2200  gm = 2; \
2201  \
2202  if (link(q) == null) \
2203  gd = 0; \
2204  else if (type(link(q)) == disp_node) \
2205  gd = 1; \
2206  else \
2207  confusion("tail3"); \
2208  } \
2209  else if (type(q) == disp_node) \
2210  { \
2211  prev_node = p; gd = 2; \
2212  \
2213  if (link(q) == null) \
2214  gm = 0; \
2215  else if (type(link(q)) == math_node) \
2216  gm = 1; \
2217  else \
2218  confusion("tail4"); \
2219  } \
2220  else \
2221  confusion("tail5"); \
2222  } \
2223  \
2224  if (gm == 0) if (fm == 2) confusion("tail1"); \
2225  else if (fm == 1) confusion("tail2"); \
2226  if ((fm + fd) == 1) { fm = 0; fd = 0; } \
2227  if (gm == 0) fm = 0; \
2228  if (gd == 0) fd = 0; \
2229  \
2230  if (fd > 0) \
2231  { \
2232  if (gm == 0) \
2233  { \
2234  t = q; q = null; link(p) = q; tail = p; \
2235  } \
2236  else if (gm == 1) \
2237  { \
2238  t = q; q = link(q); link(p) = q; gm = 2; \
2239  } \
2240  else \
2241  { \
2242  t = link(q); link(q) = null; tail = q; \
2243  } \
2244  \
2245  if (fd == 1) \
2246  { \
2247  prev_node = s; \
2248  disp_dimen(r) = disp_dimen(t); \
2249  } \
2250  else \
2251  { \
2252  prev_node = r; \
2253  disp_dimen(p) = disp_dimen(t); \
2254  } \
2255  \
2256  prev_disp = pdisp; \
2257  free_node(t, small_node_size); \
2258  gd = 0; \
2259  } \
2260  \
2261  if (fm > 0) \
2262  { \
2263  if (gd == 0) \
2264  { \
2265  t = q; q = null; link(p) = q; tail = p; \
2266  } \
2267  else if (gd == 1) \
2268  { \
2269  t = q; q = link(q); link(p) = q; \
2270  prev_node = p; link(t) = null; \
2271  } \
2272  else \
2273  { \
2274  t = link(q); link(q) = null; tail = q; \
2275  } \
2276  \
2277  if (fm == 1) \
2278  { \
2279  link(s) = p; link(r) = t; t = r; \
2280  prev_node = s; \
2281  } \
2282  else \
2283  { \
2284  link(r) = q; link(p) = t; t = p; \
2285  \
2286  if (q == null) tail = r; \
2287  else prev_node = r; \
2288  } \
2289  \
2290  flush_node_list(t); \
2291  } \
2292 } \
2293 while (0)
2294 
2295 #define check_effective_tail(a) find_effective_tail_epTeX()
2296 #define fetch_effective_tail fetch_effective_tail_epTeX
2297 
2298 #define reset_auto_spacing_code 0
2299 #define set_auto_spacing_code 1
2300 #define reset_auto_xspacing_code 2
2301 #define set_auto_xspacing_code 3
2302 
2303 #define reset_enable_cjk_token_code 0
2304 #define set_enable_cjk_token_code 1
2305 #define set_force_cjk_token_code 2
2306 
2307 #define inhibit_both 0 // {disable to insert space before 2byte-char and after it}
2308 #define inhibit_previous 1 // {disable to insert space before 2byte-char}
2309 #define inhibit_after 2 // {disable to insert space after 2byte-char}
2310 #define inhibit_none 3 // {enable to insert space before/after 2byte-char}
2311 #define inhibit_unused 4 // {unused entry}
2312 #define no_entry 1000
2313 #define new_pos 0
2314 #define cur_pos 1
2315 
2316 #define pre_break_penalty_code 1
2317 #define post_break_penalty_code 2
2318 #define kinsoku_unused_code 3
2319 
2320 #define dvi_yoko 0
2321 #define dvi_tate 1
2322 #define dvi_dtou 3
2323 
2324 #define no_skip 0
2325 #define after_schar 1
2326 #define after_wchar 2
2327 
2328 // @<Insert a space around the character |p|@>
2329 #define insert_space_around_char() \
2330 do { \
2331  if (font_dir[font(p)] != dir_default) \
2332  { \
2333  KANJI(cx) = info(link(p)) % max_cjk_val; \
2334  \
2335  if (insert_skip == after_schar) \
2336  insert_ascii_kanji_spacing(); \
2337  \
2338  p = link(p); \
2339  insert_skip = after_wchar; \
2340  } \
2341  else \
2342  { \
2343  ax = character(p); \
2344  \
2345  if (insert_skip == after_wchar) \
2346  insert_kanji_ascii_spacing(); \
2347  \
2348  if (auto_xsp_code(ax) >= 2) \
2349  insert_skip = after_schar; \
2350  else \
2351  insert_skip = no_skip; \
2352  } \
2353 } while (0)
2354 // @<Insert hbox surround spacing@>
2355 #define insert_hbox_surround_spacing() \
2356 do { \
2357  find_first_char = true; \
2358  first_char = null; \
2359  last_char = null; \
2360  \
2361  if (shift_amount(p) == 0) \
2362  { \
2363  if (check_box(list_ptr(p))) \
2364  { \
2365  if (first_char != null) \
2366  insert_space_before_first_char(); \
2367  \
2368  if (last_char != null) \
2369  insert_space_after_last_char(); \
2370  else \
2371  insert_skip = no_skip; \
2372  } \
2373  else \
2374  insert_skip = no_skip; \
2375  } \
2376  else \
2377  insert_skip = no_skip; \
2378 } while (0)
2379 // @<Insert a space before the |first_char|@>
2380 #define insert_space_before_first_char() \
2381 do { \
2382  if (type(first_char) == math_node) \
2383  { \
2384  ax = '0'; \
2385  \
2386  if (insert_skip == after_wchar) \
2387  insert_kanji_ascii_spacing(); \
2388  } \
2389  else if (font_dir[font(first_char)] != dir_default) \
2390  { \
2391  KANJI(cx) = info(link(first_char)) % max_cjk_val; \
2392  \
2393  if (insert_skip == after_schar) \
2394  insert_ascii_kanji_spacing(); \
2395  else if (insert_skip == after_wchar) \
2396  insert_kanji_kanji_spacing(); \
2397  } \
2398  else \
2399  { \
2400  ax = character(first_char); \
2401  \
2402  if (insert_skip == after_wchar) \
2403  insert_kanji_ascii_spacing(); \
2404  } \
2405 } while (0)
2406 // @<Insert a space after the |last_char|@>
2407 #define insert_space_after_last_char() \
2408 do { \
2409  if (type(last_char) == math_node) \
2410  { \
2411  ax = '0'; \
2412  \
2413  if (auto_xsp_code(ax) >= 2) \
2414  insert_skip = after_schar; \
2415  else \
2416  insert_skip = no_skip; \
2417  } \
2418  else if (font_dir[font(last_char)] != dir_default) \
2419  { \
2420  insert_skip = after_wchar; \
2421  KANJI(cx) = info(link(last_char)); \
2422  \
2423  if (is_char_node(link(p)) && \
2424  (font_dir[font(link(p))] != dir_default)) \
2425  { \
2426  append_kanji_kanji_spacing(); \
2427  p = link(p); \
2428  } \
2429  } \
2430  else \
2431  { \
2432  ax = character(last_char); \
2433  \
2434  if (auto_xsp_code(ax) >= 2) \
2435  insert_skip = after_schar; \
2436  else \
2437  insert_skip = no_skip; \
2438  } \
2439 } while (0)
2440 // @<Insert math surround spacing@>
2441 #define insert_math_surround_spacing() \
2442 do { \
2443  if ((subtype(p) == before) && (insert_skip == after_wchar)) \
2444  { \
2445  ax = '0'; \
2446  insert_kanji_ascii_spacing(); \
2447  insert_skip = no_skip; \
2448  } \
2449  else if (subtype(p) == after) \
2450  { \
2451  ax = '0'; \
2452  \
2453  if (auto_xsp_code(ax) >= 2) \
2454  insert_skip = after_schar; \
2455  else \
2456  insert_skip = no_skip; \
2457  } \
2458  else \
2459  insert_skip = no_skip; \
2460 } while (0)
2461 // @<Insert ligature surround spacing@>
2462 #define insert_ligature_surround_spacing() \
2463 do { \
2464  t = lig_ptr(p); \
2465  \
2466  if (is_char_node(t)) \
2467  { \
2468  ax = character(t); \
2469  \
2470  if (insert_skip == after_wchar) \
2471  insert_kanji_ascii_spacing(); \
2472  \
2473  while (link(t) != null) \
2474  t = link(t); \
2475  \
2476  if (is_char_node(t)) \
2477  { \
2478  ax = character(t); \
2479  \
2480  if (auto_xsp_code(ax) >= 2) \
2481  insert_skip = after_schar; \
2482  else \
2483  insert_skip = no_skip; \
2484  } \
2485  } \
2486 } while (0)
2487 // @<Insert penalty or displace surround spacing@>
2488 #define insert_penalty_or_displace_surround_spacing() \
2489 do { \
2490  if (is_char_node(link(p))) \
2491  { \
2492  q = p; \
2493  p = link(p); \
2494  \
2495  if (font_dir[font(p)] != dir_default) \
2496  { \
2497  KANJI(cx) = info(link(p)) % max_cjk_val; \
2498  \
2499  if (insert_skip == after_schar) \
2500  insert_ascii_kanji_spacing(); \
2501  else if (insert_skip == after_wchar) \
2502  insert_kanji_kanji_spacing(); \
2503  \
2504  p = link(p); \
2505  insert_skip = after_wchar; \
2506  } \
2507  else \
2508  { \
2509  ax = character(p); \
2510  \
2511  if (insert_skip == after_wchar) \
2512  insert_kanji_ascii_spacing(); \
2513  \
2514  if (auto_xsp_code(ax) >= 2) \
2515  insert_skip = after_schar; \
2516  else \
2517  insert_skip = no_skip; \
2518  } \
2519  } \
2520 } while (0)
2521 // @<Insert ASCII-KANJI spacing@>
2522 #define insert_ascii_kanji_spacing() \
2523 do { \
2524  { \
2525  x = get_inhibit_pos(cx, cur_pos); \
2526  \
2527  if (x != no_entry) \
2528  if ((inhibit_xsp_type(x) == inhibit_both) || \
2529  (inhibit_xsp_type(x) == inhibit_previous)) \
2530  do_ins = false; \
2531  else \
2532  do_ins = true; \
2533  else \
2534  do_ins = true; \
2535  } \
2536  \
2537  if (do_ins) \
2538  { \
2539  z = new_glue(s); \
2540  subtype(z) = xkanji_skip_code + 1; \
2541  link(z) = link(q); \
2542  link(q) = z; \
2543  q = z; \
2544  } \
2545 } while (0)
2546 // @<Insert KANJI-ASCII spacing@>
2547 #define insert_kanji_ascii_spacing() \
2548 do { \
2549  if ((auto_xsp_code(ax) % 2) == 1) \
2550  { \
2551  x = get_inhibit_pos(cx, cur_pos); \
2552  \
2553  if (x != no_entry) \
2554  if ((inhibit_xsp_type(x) == inhibit_both) || \
2555  (inhibit_xsp_type(x) == inhibit_after)) \
2556  do_ins = false; \
2557  else \
2558  do_ins = true; \
2559  else \
2560  do_ins = true; \
2561  } \
2562  else \
2563  do_ins = false; \
2564  \
2565  if (do_ins) \
2566  { \
2567  z = new_glue(s); \
2568  subtype(z) = xkanji_skip_code + 1; \
2569  link(z) = link(q); \
2570  link(q) = z; \
2571  q = z; \
2572  } \
2573 } while (0)
2574 // @<Insert KANJI-KANJI spacing@>
2575 #define insert_kanji_kanji_spacing() \
2576 do { \
2577  z = new_glue(u); \
2578  subtype(z) = kanji_skip_code + 1; \
2579  link(z) = link(q); \
2580  link(q) = z; \
2581  q = z; \
2582 } while (0)
2583 // @<Append KANJI-KANJI spacing@>
2584 #define append_kanji_kanji_spacing() \
2585 do { \
2586  z = new_glue(u); \
2587  subtype(z) = kanji_skip_code + 1; \
2588  link(z) = link(p); \
2589  link(p) = z; \
2590  p = link(z); \
2591  q = z; \
2592 } while (0)
2593 // @<Make |jchr_widow_penalty| node@>
2594 #define make_jchr_widow_penalty_node() \
2595 do { \
2596  q = v; \
2597  p = link(v); \
2598  \
2599  if (is_char_node(v) && (font_dir[font(v)] != dir_default)) \
2600  { \
2601  q = p; \
2602  p = link(p); \
2603  } \
2604  \
2605  t = q; \
2606  s = null; \
2607  seek_list_and_make(); \
2608  \
2609  if (s != null) \
2610  { \
2611  s = link(t); \
2612  \
2613  if (!is_char_node(s) && (type(s) == penalty_node)) \
2614  penalty(s) = penalty(s) + jchr_widow_penalty; \
2615  else if (jchr_widow_penalty != 0) \
2616  { \
2617  s = new_penalty(jchr_widow_penalty); \
2618  subtype(s) = widow_pena; \
2619  link(s) = link(t); \
2620  link(t) = s; \
2621  t = link(s); \
2622  \
2623  while (!is_char_node(t)) \
2624  { \
2625  if ((type(t) == glue_node) || (type(t) == kern_node)) \
2626  goto exit; \
2627  \
2628  t = link(t); \
2629  } \
2630  \
2631  z = new_glue(u); \
2632  subtype(z) = kanji_skip_code + 1; \
2633  link(z) = link(s); \
2634  link(s) = z; \
2635  } \
2636  } \
2637 } while (0)
2638 // @<Seek list and make |t| pointing widow penalty position@>
2639 #define seek_list_and_make() \
2640 do { \
2641  while (p != null) \
2642  { \
2643  if (is_char_node(p)) \
2644  { \
2645  if (font_dir[font(p)] != dir_default) \
2646  { \
2647  KANJI(cx) = info(link(p)) % max_cjk_val; \
2648  i = info(link(p)) / max_cjk_val; \
2649  k = 0; \
2650  \
2651  if ((i == kanji) || (i == kana) || (i == hangul)) \
2652  { \
2653  t = q; \
2654  s = p; \
2655  } \
2656  \
2657  p = link(p); \
2658  q = p; \
2659  } \
2660  else \
2661  { \
2662  k = k + 1; \
2663  \
2664  if (k > 1) \
2665  { \
2666  q = p; \
2667  s = null; \
2668  } \
2669  } \
2670  } \
2671  else \
2672  { \
2673  switch (type(p)) \
2674  { \
2675  case penalty_node: \
2676  case mark_node: \
2677  case adjust_node: \
2678  case whatsit_node: \
2679  case glue_node: \
2680  case kern_node: \
2681  case math_node: \
2682  case disp_node: \
2683  do_nothing(); \
2684  break; \
2685  \
2686  default: \
2687  { \
2688  q = p; \
2689  s = null; \
2690  } \
2691  break; \
2692  } \
2693  } \
2694  \
2695  p = link(p); \
2696  } \
2697 } while (0)
2698 // @<Insert kinsoku penalty@>
2699 #define insert_kinsoku_penalty() \
2700 do { \
2701  kp = get_kinsoku_pos(cx, cur_pos); \
2702  \
2703  if (kp != no_entry) if (kinsoku_penalty(kp) != 0) \
2704  { \
2705  if (kinsoku_type(kp) == pre_break_penalty_code) \
2706  { \
2707  if (!is_char_node(cur_q) && (type(cur_q) == penalty_node))\
2708  penalty(cur_q) = penalty(cur_q) + kinsoku_penalty(kp); \
2709  else \
2710  { \
2711  main_p = link(cur_q); \
2712  link(cur_q) = new_penalty(kinsoku_penalty(kp)); \
2713  subtype(link(cur_q)) = kinsoku_pena; \
2714  link(link(cur_q)) = main_p; \
2715  } \
2716  } \
2717  else if (kinsoku_type(kp) == post_break_penalty_code) \
2718  { \
2719  tail_append(new_penalty(kinsoku_penalty(kp))); \
2720  subtype(tail) = kinsoku_pena; \
2721  } \
2722  } \
2723 } while (0)
2724 // @<Insert |pre_break_penalty| of |cur_chr|@>
2725 #define insert_pre_break_penalty() \
2726 do { \
2727  kp = get_kinsoku_pos(cur_chr, cur_pos); \
2728  \
2729  if (kp != no_entry) if (kinsoku_penalty(kp) != 0) \
2730  { \
2731  if (kinsoku_type(kp) == pre_break_penalty_code) \
2732  if (!is_char_node(tail) && (type(tail) == penalty_node)) \
2733  penalty(tail) = penalty(tail) + kinsoku_penalty(kp); \
2734  else \
2735  { \
2736  tail_append(new_penalty(kinsoku_penalty(kp))); \
2737  subtype(tail) = kinsoku_pena; \
2738  } \
2739  } \
2740 } while (0)
2741 // @<Insert |post_break_penalty|@>
2742 #define insert_post_break_penalty() \
2743 do { \
2744  kp = get_kinsoku_pos(cx, cur_pos); \
2745  \
2746  if (kp != no_entry) if (kinsoku_penalty(kp) != 0) \
2747  { \
2748  if (kinsoku_type(kp) == post_break_penalty_code) \
2749  { \
2750  tail_append(new_penalty(kinsoku_penalty(kp))); \
2751  subtype(tail) = kinsoku_pena; \
2752  } \
2753  } \
2754 } while (0)
2755 
2756 /*
2757  @<Append KANJI-character |cur_chr|
2758  to the current hlist in the current font; |goto reswitch| when
2759  a non-character has been fetched@>
2760 */
2761 
2762 #define append_kanji_to_hlist() \
2763 do { \
2764  if (is_char_node(tail)) \
2765  { \
2766  if (!((last_jchr != null) && (link(last_jchr) == tail))) \
2767  { \
2768  cx = character(tail); \
2769  insert_post_break_penalty(); \
2770  } \
2771  } \
2772  else if (type(tail) == ligature_node) \
2773  { \
2774  cx = character(lig_char(tail)); \
2775  insert_post_break_penalty(); \
2776  } \
2777  \
2778  if (direction == dir_tate) \
2779  { \
2780  if (font_dir[main_f] == dir_tate) \
2781  disp = 0; \
2782  else if (font_dir[main_f] == dir_yoko) \
2783  disp = t_baseline_shift - y_baseline_shift; \
2784  else \
2785  disp = t_baseline_shift; \
2786  \
2787  main_f = cur_tfont; \
2788  } \
2789  else \
2790  { \
2791  if (font_dir[main_f] == dir_yoko) \
2792  disp = 0; \
2793  else if (font_dir[main_f] == dir_tate) \
2794  disp = y_baseline_shift - t_baseline_shift; \
2795  else \
2796  disp = y_baseline_shift; \
2797  \
2798  main_f = cur_jfont; \
2799  } \
2800  \
2801  append_disp_node_at_end(); \
2802  ins_kp = false; \
2803  ligature_present = false; \
2804  cur_l = get_jfm_pos(KANJI(cur_chr), main_f); \
2805  main_i = char_info(main_f, 0); \
2806  goto main_loop_j_3; \
2807  \
2808 main_loop_j_1: \
2809  space_factor = 1000; \
2810  \
2811  if (main_f != null_font) \
2812  { \
2813  if (!disp_called) \
2814  { \
2815  prev_node = tail; \
2816  tail_append(get_node(small_node_size)); \
2817  type(tail) = disp_node; \
2818  disp_dimen(tail) = 0; \
2819  disp_called = true; \
2820  } \
2821  fast_get_avail(main_p); \
2822  font(main_p) = main_f; \
2823  character(main_p) = cur_l; \
2824  link(tail) = main_p; \
2825  tail = main_p; \
2826  last_jchr = tail; \
2827  fast_get_avail(main_p); \
2828  info(main_p) = \
2829  KANJI(cur_chr) + cur_cmd * max_cjk_val; \
2830  link(tail) = main_p; \
2831  tail = main_p; \
2832  cx = cur_chr; \
2833  insert_kinsoku_penalty(); \
2834  } \
2835  \
2836  ins_kp = false; \
2837  \
2838 again_2: \
2839  get_next(); \
2840  main_i = char_info(main_f, cur_l); \
2841  \
2842  switch (cur_cmd) \
2843  { \
2844  case kanji: \
2845  case kana: \
2846  case other_kchar: \
2847  case hangul: \
2848  { \
2849  cur_l = get_jfm_pos(KANJI(cur_chr), main_f); \
2850  goto main_loop_j_3; \
2851  } \
2852  break; \
2853  \
2854  case letter: \
2855  case other_char: \
2856  { \
2857  ins_kp = true; \
2858  cur_l = 0; \
2859  goto main_loop_j_3; \
2860  } \
2861  break; \
2862  } \
2863  \
2864  x_token(); \
2865  \
2866  switch (cur_cmd) \
2867  { \
2868  case kanji: \
2869  case kana: \
2870  case other_kchar: \
2871  case hangul: \
2872  cur_l = get_jfm_pos(KANJI(cur_chr), main_f); \
2873  break; \
2874  \
2875  case letter: \
2876  case other_char: \
2877  { \
2878  ins_kp = true; \
2879  cur_l = 0; \
2880  } \
2881  break; \
2882  \
2883  case char_given: \
2884  { \
2885  if (check_echar_range(cur_chr)) \
2886  { \
2887  ins_kp = true; \
2888  cur_l = 0; \
2889  } \
2890  else \
2891  cur_l = get_jfm_pos(KANJI(cur_chr), main_f); \
2892  } \
2893  break; \
2894  \
2895  case char_num: \
2896  { \
2897  scan_char_num(); \
2898  cur_chr = cur_val; \
2899  \
2900  if (check_echar_range(cur_chr)) \
2901  { \
2902  ins_kp = true; \
2903  cur_l = 0; \
2904  } \
2905  else \
2906  cur_l = get_jfm_pos(KANJI(cur_chr), main_f); \
2907  } \
2908  break; \
2909  \
2910  case kchar_given: \
2911  { \
2912  cur_l = (get_jfm_pos(KANJI(cur_chr), main_f)); \
2913  } \
2914  break; \
2915  \
2916  case kchar_num: \
2917  { \
2918  scan_char_num(); \
2919  cur_chr = cur_val; \
2920  cur_l = (get_jfm_pos(KANJI(cur_chr), main_f)); \
2921  } \
2922  break; \
2923  \
2924  case inhibit_glue: \
2925  { \
2926  inhibit_glue_flag = (cur_chr == 0); \
2927  goto again_2; \
2928  } \
2929  break; \
2930  \
2931  default: \
2932  { \
2933  ins_kp = max_halfword; \
2934  cur_l = -1; \
2935  cur_r = non_char; \
2936  lig_stack = null; \
2937  } \
2938  break; \
2939  } \
2940  \
2941 main_loop_j_3: \
2942  if (ins_kp == true) \
2943  insert_pre_break_penalty(); \
2944  \
2945  if (main_f != null_font) \
2946  look_ahead_for_glue_or_kerning(); \
2947  else \
2948  inhibit_glue_flag = false; \
2949  \
2950  if (ins_kp == false) \
2951  goto main_loop_j_1; \
2952  else if (ins_kp == true) \
2953  { \
2954  ins_kp = false; \
2955  goto main_loop; \
2956  } \
2957  else \
2958  goto reswitch; \
2959 } while (0)
2960 // @<Append |disp_node| at begin of displace area@>
2961 #define append_disp_node_at_begin() \
2962 do { \
2963  if (!is_char_node(tail) && (type(tail) == disp_node)) \
2964  { \
2965  if (prev_disp == disp) \
2966  { \
2967  free_node(tail, small_node_size); \
2968  tail = prev_node; \
2969  link(tail) = null; \
2970  } \
2971  else \
2972  disp_dimen(tail) = disp; \
2973  } \
2974  else if (disp != 0 || !disp_called) \
2975  { \
2976  prev_node = tail; \
2977  tail_append(get_node(small_node_size)); \
2978  type(tail) = disp_node; \
2979  disp_dimen(tail) = disp; \
2980  prev_disp = disp; \
2981  disp_called = true; \
2982  } \
2983 } while (0)
2984 // @<Append |disp_node| at end of displace area@>
2985 #define append_disp_node_at_end() \
2986 do { \
2987  if (disp != 0) \
2988  { \
2989  if (!is_char_node(tail) && (type(tail) == disp_node)) \
2990  { \
2991  disp_dimen(tail) = 0; \
2992  } \
2993  else \
2994  { \
2995  prev_node = tail; \
2996  tail_append(get_node(small_node_size)); \
2997  type(tail) = disp_node; \
2998  disp_dimen(tail) = 0; \
2999  prev_disp = disp; \
3000  disp_called = true; \
3001  } \
3002  } \
3003 } while (0)
3004 // @<Look ahead for glue or kerning@>
3005 #define look_ahead_for_glue_or_kerning() \
3006 do { \
3007  cur_q = tail; \
3008  \
3009  if (inhibit_glue_flag != true) \
3010  { \
3011  /*{ prints("IF"); print_int(cur_l); }*/ \
3012  if (cur_l < 0) cur_l = 0; else inhibit_glue_flag = false; \
3013  if ((tail == link(head)) && (!is_char_node(tail)) \
3014  && (type(tail) == disp_node)) \
3015  goto skip_loop; \
3016  else \
3017  { \
3018  if (char_tag(main_i) == gk_tag) \
3019  { \
3020  main_k = glue_kern_start(main_f, main_i); \
3021  main_j = font_info[main_k].qqqq; \
3022  \
3023  if (skip_byte(main_j)>stop_flag) \
3024  { \
3025  main_k = glue_kern_restart(main_f, main_j); \
3026  main_j = font_info[main_k].qqqq; \
3027  } \
3028  \
3029  while (true) { \
3030  if (next_char(main_j) == cur_l) \
3031  if (skip_byte(main_j) <= stop_flag) \
3032  { \
3033  if (op_byte(main_j) < kern_flag) \
3034  { \
3035  gp = font_glue[main_f]; \
3036  cur_r = rem_byte(main_j); \
3037  \
3038  if (gp != null) \
3039  { \
3040  while ((type(gp) != cur_r) && (link(gp) != null)) \
3041  { \
3042  gp = link(gp); \
3043  } \
3044  \
3045  gq = glue_ptr(gp); \
3046  } \
3047  else \
3048  { \
3049  gp = get_node(small_node_size); \
3050  font_glue[main_f] = gp; \
3051  gq = null; \
3052  } \
3053  \
3054  if (gq == null) \
3055  { \
3056  type(gp) = cur_r; \
3057  gq = new_spec(zero_glue); \
3058  glue_ptr(gp) = gq; \
3059  main_k = exten_base[main_f] + (cur_r * 3); \
3060  width(gq) = font_info[main_k].cint; \
3061  stretch(gq) = font_info[main_k + 1].cint; \
3062  shrink(gq) = font_info[main_k + 2].cint; \
3063  add_glue_ref(gq); \
3064  link(gp) = get_node(small_node_size); \
3065  gp = link(gp); \
3066  glue_ptr(gp) = null; \
3067  link(gp) = null; \
3068  } \
3069  \
3070  tail_append(new_glue(gq)); \
3071  subtype(tail) = jfm_skip + 1; \
3072  goto skip_loop; \
3073  } \
3074  else \
3075  { \
3076  tail_append(new_kern(char_kern(main_f, main_j))); \
3077  goto skip_loop; \
3078  } \
3079  } \
3080  \
3081  if (skip_byte(main_j) >= stop_flag) goto skip_loop; \
3082  main_k = main_k + (skip_byte(main_j)) + 1; \
3083  main_j = font_info[main_k].qqqq; \
3084  } \
3085  } \
3086  } \
3087  } \
3088  else \
3089  { \
3090  /*{ prints("IF"); print_int(cur_l); }*/ \
3091  if (cur_l < 0) cur_l = 0; else inhibit_glue_flag = false; \
3092  } \
3093 skip_loop: do_nothing(); \
3094 } while (0)
3095 
3096 // eTeX
3097 #define reversed 1 // {subtype for an |hlist_node| whose hlist has been reversed}
3098 #define dlist 2 // {subtype for an |hlist_node| from display math mode}
3099 #define box_lr(a) (subtype(a) / 16) // {direction mode of a box}
3100 #define set_box_lr(a, b) subtype(a) = box_dir(a) + dir_max + 16 * b
3101 //#
3102 #define left_to_right 0
3103 #define right_to_left 1
3104 #define reflected (1 - cur_dir) // {the opposite of |cur_dir|}
3105 
3106 #define round_glue() \
3107 do{ \
3108  g = glue_ptr(p); \
3109  rule_wd = width(g) - cur_g; \
3110  \
3111  if (g_sign != normal) \
3112  { \
3113  if (g_sign == stretching) \
3114  { \
3115  if (stretch_order(g) == g_order) \
3116  { \
3117  cur_glue = cur_glue + stretch(g); \
3118  vet_glue(glue_set(this_box) * cur_glue); \
3119  cur_g = round(glue_temp); \
3120  } \
3121  } \
3122  else if (shrink_order(g) == g_order) \
3123  { \
3124  cur_glue = cur_glue - shrink(g); \
3125  vet_glue(glue_set(this_box) * cur_glue); \
3126  cur_g = round(glue_temp); \
3127  } \
3128  } \
3129  \
3130  rule_wd = rule_wd + cur_g; \
3131 } while (0)
3132 
3133 #define handle_a_glue_node() \
3134 do { \
3135  if (((g_sign == stretching) && (stretch_order(g) == g_order)) ||\
3136  ((g_sign == shrinking) && (shrink_order(g) == g_order))) \
3137  { \
3138  fast_delete_glue_ref(g); \
3139  \
3140  if (subtype(p) < a_leaders) \
3141  { \
3142  type(p) = kern_node; \
3143  width(p) = rule_wd; \
3144  } \
3145  else \
3146  { \
3147  g = get_node(glue_spec_size); \
3148  stretch_order(g) = filll + 1; \
3149  shrink_order(g) = filll + 1; \
3150  width(g) = rule_wd; \
3151  stretch(g) = 0; \
3152  shrink(g) = 0; \
3153  glue_ptr(p) = g; \
3154  } \
3155  } \
3156 } while (0)
3157 
3158 #define report_LR_problems() \
3159 do { \
3160  print_ln(); \
3161  print_nl("\\endL or \\endR problem ("); \
3162  print_int(LR_problems / 10000); \
3163  prints(" missing, "); \
3164  print_int(LR_problems % 10000); \
3165  prints(" extra"); \
3166  LR_problems = 0; \
3167 } while (0)
3168 
3169 #define put_LR(a) \
3170 do { \
3171  temp_ptr = get_avail(); \
3172  info(temp_ptr) = a; \
3173  link(temp_ptr) = LR_ptr;\
3174  LR_ptr = temp_ptr; \
3175 } while (0)
3176 
3177 #define push_LR(a) put_LR(end_LR_type(a))
3178 
3179 #define pop_LR() \
3180 do { \
3181  temp_ptr = LR_ptr; \
3182  LR_ptr = link(temp_ptr);\
3183  free_avail(temp_ptr); \
3184 } while (0)
3185 
3186 #define LR_dir(a) (subtype(a) / R_code)
3187 
3188 #define edge_node style_node // {a |style_node| does not occur in hlists}
3189 #define edge_node_size style_node_size // {number of words in an edge node}
3190 #define edge_dist(a) depth(a) // {new |left_edge| position relative to |cur_h| (after |width| has been taken into account)}
3191 
3192 #define adjust_the_LR_stack_p() \
3193 do { \
3194  if (end_LR(q)) \
3195  { \
3196  if (LR_ptr != null) \
3197  if (info(LR_ptr) == end_LR_type(q)) \
3198  pop_LR(); \
3199  } \
3200  else \
3201  push_LR(q); \
3202 } while (0)
3203 
3204 #define adjust_the_LR_stack_j() \
3205 do { \
3206  if (end_LR(p)) \
3207  if (info(LR_ptr) != end_LR_type(p)) \
3208  { \
3209  type(p) = kern_node; \
3210  incr(LR_problems); \
3211  } \
3212  else \
3213  { \
3214  pop_LR(); \
3215  \
3216  if (n > min_halfword) \
3217  { \
3218  decr(n); \
3219  decr(subtype(p)); \
3220  } \
3221  else \
3222  { \
3223  if (m > min_halfword) \
3224  decr(m); \
3225  else \
3226  goto found; \
3227  \
3228  type(p) = kern_node; \
3229  } \
3230  } \
3231  else \
3232  { \
3233  push_LR(p); \
3234  \
3235  if ((n > min_halfword) || \
3236  (LR_dir(p) != cur_dir)) \
3237  { \
3238  incr(n); \
3239  incr(subtype(p)); \
3240  } \
3241  else \
3242  { \
3243  type(p) = kern_node; \
3244  incr(m); \
3245  } \
3246  } \
3247 } while (0)
3248 
3249 #define set_value_of_x() \
3250 do { \
3251  if (LR_save == null) \
3252  x = 0; \
3253  else if (info(LR_save) >= R_code) \
3254  x = -1; \
3255  else \
3256  x = 1; \
3257 } while (0)
3258 
3259 #define TeXXeT_state eTeX_state(TeXXeT_code)
3260 #define TeXXeT_en (TeXXeT_state > 0)
3261 
3262 #define segment_node style_node
3263 #define segment_node_size style_node_size // {number of words in a segment node}
3264 #define segment_first(a) info(a+2) // {first node of the segment}
3265 #define segment_last(a) link(a+2) // {last node of the segment}
3266 
3267 #define cancel_glue(a,b,c,d,e) \
3268 do { \
3269  j = new_skip_param(a); \
3270  link(b) = j; link(j) = c; \
3271  j = glue_ptr(d); \
3272  stretch_order(temp_ptr) = stretch_order(j); \
3273  shrink_order(temp_ptr) = shrink_order(j); \
3274  width(temp_ptr) = e - width(j); \
3275  stretch(temp_ptr) = -stretch(j); \
3276  shrink(temp_ptr) = -shrink(j); \
3277 } while (0)
3278 
3279 #define expr_none 0 // {\.( seen, or \.( $\langle\it expr\rangle$ \.) seen}
3280 #define expr_add 1 // {\.( $\langle\it expr\rangle$ \.+ seen}
3281 #define expr_sub 2 // {\.( $\langle\it expr\rangle$ \.- seen}
3282 #define expr_mult 3 // {$\langle\it term\rangle$ \.* seen}
3283 #define expr_div 4 // {$\langle\it term\rangle$ \./ seen}
3284 #define expr_scale 5 // {$\langle\it term\rangle$ \.* $\langle\it factor\rangle$ \./ seen}
3285 
3286 #define expr_node_size 4 // {number of words in stack entry for subexpressions}
3287 #define expr_e_field(a) mem[a + 1].cint // {saved expression so far}
3288 #define expr_t_field(a) mem[a + 2].cint // {saved term so far}
3289 #define expr_n_field(a) mem[a + 3].cint // {saved numerator}
3290 
3291 #define num_error(a) \
3292 do { \
3293  arith_error = true; \
3294  a = 0; \
3295 } while (0)
3296 
3297 #define glue_error(a) \
3298 do { \
3299  arith_error = true; \
3300  delete_glue_ref(a); \
3301  a = new_spec(zero_glue);\
3302 } while (0)
3303 
3304 #define normalize_glue(a) \
3305 do { \
3306  if (stretch(a) == 0) \
3307  stretch_order(a) = normal;\
3308  \
3309  if (shrink(a) == 0) \
3310  shrink_order(a) = normal; \
3311 } while (0)
3312 
3313 #define expr_add_sub(a,b,c) add_or_sub(a, b, c, r==expr_sub)
3314 #define expr_a(a,b) expr_add_sub(a,b, max_dimen)
3315 #define expr_m(a) a = nx_plus_y(a, f, 0)
3316 #define expr_d(a) a = quotient(a, f)
3317 #define expr_s(a) a = fract(a, n, f, max_dimen)
3318 
3319 // for sparse array
3320 #define box_val 4
3321 #define mark_val 6
3322 //
3323 #define dimen_val_limit 0x20
3324 #define mu_val_limit 0x40
3325 #define box_val_limit 0x50
3326 #define tok_val_limit 0x60
3327 //
3328 #define index_node_size 9
3329 #define sa_index type
3330 #define sa_used subtype
3331 //
3332 #define sa_mark sa_root[mark_val]
3333 //
3334 #define if_cur_ptr_is_null_then_return_or_goto(a) \
3335 do { \
3336  if (cur_ptr == null) \
3337  { \
3338  if (w) \
3339  goto a; \
3340  else \
3341  return; \
3342  } \
3343 } while (0)
3344 //
3345 #define hex_dig1(a) (a / 4096)
3346 #define hex_dig2(a) (a / 256) % 16
3347 #define hex_dig3(a) (a / 16) % 16
3348 #define hex_dig4(a) (a % 16)
3349 //
3350 #define get_sa_ptr() \
3351 do { \
3352  if odd(i) \
3353  cur_ptr = link(q + (i / 2) + 1);\
3354  else \
3355  cur_ptr = info(q + (i / 2) + 1);\
3356 } while (0)
3357 
3358 #define put_sa_ptr(a) \
3359 do { \
3360  if odd(i) \
3361  link(q + (i / 2) + 1) = a; \
3362  else \
3363  info(q + (i / 2) + 1) = a; \
3364 } while (0)
3365 
3366 #define add_sa_ptr() \
3367 do { \
3368  put_sa_ptr(cur_ptr); \
3369  incr(sa_used(q)); \
3370 } while (0)
3371 
3372 #define delete_sa_ptr() \
3373 do { \
3374  put_sa_ptr(null); \
3375  decr(sa_used(q)); \
3376 } while (0)
3377 //
3378 #define sa_lev sa_used
3379 #define pointer_node_size 2
3380 #define sa_type(a) (sa_index(a) / 16)
3381 #define sa_ref(a) info(a + 1)
3382 #define sa_ptr(a) link(a + 1)
3383 //
3384 #define word_node_size 3
3385 #define sa_num sa_ptr
3386 #define sa_int(a) mem[a + 2].cint
3387 #define sa_dim(a) mem[a + 2].cint
3388 //
3389 #define mark_class_node_size 4
3390 //
3391 #define fetch_box(a) \
3392 do { \
3393  if (cur_val < 256) \
3394  a = box(cur_val); \
3395  else \
3396  { \
3397  find_sa_element(box_val, cur_val, false); \
3398  \
3399  if (cur_ptr == null) \
3400  a = null; \
3401  else \
3402  a = sa_ptr(cur_ptr); \
3403  } \
3404 } while (0)
3405 //
3406 #define add_sa_ref(a) incr(sa_ref(a))
3407 //
3408 #define change_box(a) \
3409 do { \
3410  if (cur_val<256) \
3411  box(cur_val) = a; \
3412  else \
3413  set_sa_box(a); \
3414 } while (0)
3415 
3416 #define set_sa_box(a) \
3417 do { \
3418  find_sa_element(box_val,cur_val,false); \
3419  \
3420  if (cur_ptr != null) \
3421  { \
3422  sa_ptr(cur_ptr) = a; \
3423  add_sa_ref(cur_ptr); \
3424  delete_sa_ref(cur_ptr); \
3425  } \
3426 } while (0)
3427 //
3428 #define vsplit_init 0
3429 #define fire_up_init 1
3430 #define fire_up_done 2
3431 #define destroy_marks 3
3432 //
3433 #define sa_top_mark(a) info(a + 1)
3434 #define sa_first_mark(a) link(a + 1)
3435 #define sa_bot_mark(a) info(a + 2)
3436 #define sa_split_first_mark(a) link(a + 2)
3437 #define sa_split_bot_mark(a) info(a + 3)
3438 //
3439 #define sa_loc sa_ref
3440 //
3441 #define sa_define(a1,a2,a3,a4,a5) \
3442 do { \
3443  if (e) \
3444  { \
3445  if (global) \
3446  gsa_def(a1, a2); \
3447  else \
3448  sa_def(a1, a2); \
3449  } \
3450  else \
3451  define(a3, a4, a5); \
3452 } while (0)
3453 //
3454 #define sa_def_box() \
3455 do { \
3456  find_sa_element(box_val, cur_val, true);\
3457  \
3458  if (global) \
3459  gsa_def(cur_ptr,cur_box); \
3460  else \
3461  sa_def(cur_ptr,cur_box); \
3462 } while (0)
3463 //
3464 #define sa_word_define(a1,a2) \
3465 do { \
3466  if (e) \
3467  { \
3468  if (global) \
3469  gsa_w_def(a1, a2); \
3470  else \
3471  sa_w_def(a1, a2); \
3472  } \
3473  else word_define(a1, a2); \
3474 } while (0)
3475 //
3476 #define trie_link(a) trie_trl[a]
3477 #define trie_char(a) trie_trc[a]
3478 #define trie_op(a) trie_tro[a]
3479 
3480 #define set_hyph_index() \
3481 do { \
3482  if (trie_char(hyph_start + cur_lang) != cur_lang) \
3483  hyph_index = 0; \
3484  else \
3485  hyph_index = trie_link(hyph_start+cur_lang); \
3486 } while (0)
3487 
3488 #define set_lc_code(a) \
3489 do { \
3490  if (hyph_index == 0) \
3491  hc[0] = lc_code(a); \
3492  else if (trie_char(hyph_index + a) != a) \
3493  hc[0] = 0; \
3494  else \
3495  hc[0] = trie_op(hyph_index + a); \
3496 } while (0)
3497 
3498 #define hyph_root trie_r[0]
3499 #define tail_page_disc disc_ptr[copy_code]
3500 #define page_disc disc_ptr[last_box_code]
3501 #define split_disc disc_ptr[vsplit_code]
3502 
3503 #define illegal_Ucharcat_ascii_catcode(a) \
3504  (a<left_brace)||(a>active_char)||(a==out_param)||(a==ignore)
3505 #define illegal_Ucharcat_wchar_catcode(a) \
3506  (a<kanji)||(a>hangul)
3507 
3508 #endif
@ error_message_issued
Definition: aptex-macros.h:95
@ spotless
Definition: aptex-macros.h:93
@ fatal_error_stop
Definition: aptex-macros.h:96
@ warning_issued
Definition: aptex-macros.h:94
@ batch_mode
Definition: aptex-macros.h:85
@ error_stop_mode
Definition: aptex-macros.h:88
@ nonstop_mode
Definition: aptex-macros.h:86
@ scroll_mode
Definition: aptex-macros.h:87
@ term_only
Definition: aptex-macros.h:75
@ no_print
Definition: aptex-macros.h:74
@ log_only
Definition: aptex-macros.h:76
@ new_string
Definition: aptex-macros.h:79
@ pseudo
Definition: aptex-macros.h:78
@ term_and_log
Definition: aptex-macros.h:77
@ max_selector
Definition: aptex-macros.h:80