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.h
Go to the documentation of this file.
1 /*
2  Copyright 2014, 2015, 2016, 2017, 2018, 2019, 2020 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_H
21 #define APTEX_H
22 
23 #ifndef EXTERN
24  #define EXTERN static
25 #endif
26 
27 // macro for dynamic allocation
28 #define APTEX_EXTENSION
29 
30 // tex's infrastructure
31 #define STAT
32 #define INITEX
33 
34 // headers and pragmas
35 #if defined (_MSC_VER)
36  // MSVC
37  // https://msdn.microsoft.com/en-us/library/d9x1s805.aspx
38 
39  #if _MSC_VER == 1900
40  #pragma warning(disable:4459) // declaration of 'identifier' hides global declaration
41  #pragma warning(disable:4311) // 'variable': pointer truncation from 'type1' to 'type2'
42  #else
43  // https://msdn.microsoft.com/en-us/library/ms235356.aspx
44  // Disables performance-critical locking in I/O operations.
45  #define _CRT_DISABLE_PERFCRIT_LOCKS
46  #endif
47 
48  // https://msdn.microsoft.com/en-us/library/ms175759.aspx
49  // Secure Template Overloads
50  #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
51  #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
52  #define _USE_MATH_DEFINES 1
53 
54  // https://msdn.microsoft.com/en-us/library/8x5x43k7.aspx
55  // C/C++ Build Errors
56  #pragma warning(disable:4201) // nameless struct/union
57  #pragma warning(disable:4996) // a function that was marked with deprecated
58  #pragma warning(disable:4701) // potentially uninitialized local variable 'name' used
59  #pragma warning(disable:4135) // conversion between different integral types
60  #pragma warning(disable:4127) // conditional expression is constant
61 
62 #elif defined (__clang__)
63  // Clang
64  // http://clang.llvm.org/docs/UsersManual.html
65  #pragma clang diagnostic ignored "-Wdangling-else"
66 #endif
67 
68 // standard C headers
69 #include <stdio.h>
70 #include <stdlib.h>
71 #include <stdarg.h>
72 #include <time.h>
73 #include <math.h>
74 #include <signal.h>
75 #include <assert.h>
76 #include <ctype.h>
77 
78 // TeX Live's kpathsea
79 #include <kpathsea/config.h>
80 #include <kpathsea/c-pathmx.h> // PATH_MAX
81 #include <kpathsea/getopt.h> // get_opt
82 #include <kpathsea/tex-file.h> // kpse_find_file
83 #include <kpathsea/types.h> // RPId64
84 #include <kpathsea/version.h> // kpathsea_version_string
85 
86 // ptexenc for kanji processing
87 #include <ptexenc/ptexenc.h>
88 #include <ptexenc/unicode.h>
89 
90 // zlib for format file and SyncTeX
91 #include "zlib.h"
92 
93 // libmruby
94 #include "mruby.h"
95 #include "mruby/compile.h"
96 #include "aptex-mruby.h"
97 
98 // internal headers
100 #include "aptex-opentype.h"
101 #include "aptex-unicode.h"
102 #include "aptex-utils.h"
103 
104 #ifdef __cplusplus
105 extern "C" {
106 #endif
107 
108 // types: integers
114 
115 // types: files
116 typedef struct {
117  void * file_data;
119 } alpha_file; // fopen or popen
120 typedef FILE * byte_file; // stdio
121 typedef void * word_file; // stdio/zlib
122 
123 #ifdef link
124  #undef link
125 #endif
126 
127 #ifdef APTEX_EXTENSION
128  #define def_const(sym, val0, val1) \
129  enum {sym = val1}
130  #define def_alloc(sym, val0, val1, init, incr) \
131  EXTERN uint32_t current_##sym; enum {sym = val1, initial_##sym = init, increment_##sym = incr}
132  #define def_type(sym, t0, t1) \
133  typedef t1 sym
134  #define def_array(sym, type, size) \
135  EXTERN type * sym
136  #define def_alter(sym, type, val) \
137  EXTERN type sym
138 #else
139  #define def_const(sym, val0, val1) \
140  enum {sym = val0}
141  #define def_alloc(sym, val0, val1, init, incr) \
142  EXTERN int current_##sym; enum {sym = val0}
143  #define def_type(sym, t0, t1) \
144  typedef t0 sym
145  #define def_array(sym, type, size) \
146  EXTERN type sym[size]
147  #define def_alter(sym, type, val) \
148  enum {sym = val}
149 #endif
150 
152 
153 def_const(min_quarterword, 0, 0); // {smallest allowable value in a |quarterword|}
154 def_const(max_quarterword, 255, 65535); // {largest allowable value in a |quarterword|}
155 def_const(min_halfword, 0, 0); // {smallest allowable value in a |halfword|}
156 def_const(max_halfword, 65536, 2147483647); // {largest allowable value in a |halfword|}
157 def_const(max_cjk_val, 0x1000000, 0x1000000);// {to separate wchar and kcatcode}
158 
159 def_const(max_in_open, 15, 15); // {maximum number of input files and error insertions that can be going on simultaneously}
160 def_const(block_size, 1000, 1000);
161 
163 def_const(error_line, 79, 79); // {width of context lines on terminal error messages}
164 def_const(half_error_line, 50, 50); // {width of first lines of contexts in terminal error messages; should be between 30 and |error_line-15|}
165 def_const(max_print_line, 79, 79); // {width of longest text lines output; should be at least 60}
167 
168 def_const(font_max, 255, 65535);
169 def_const(string_vacancies, 100000, 100000);
170 def_const(trie_op_size, 751, 35111);
173 def_const(max_trie_op, 500, 1000);
174 def_const(dvi_buf_size, 16384, 16384);
175 def_const(hash_prime, 55711, 445631);
176 def_const(hash_size, 65536, 524288);
177 
178 def_alloc(buf_size, 200000, 2000000, 10000, 2000);
179 def_alloc(font_mem_size, 100000, (max_halfword / 8 - 1), 20000, 40000);
180 def_alloc(pool_size, 124000, (max_halfword - 1), 40000, 80000);
181 def_alloc(max_strings, 16384, (max_halfword / 8 - 1), 5000, 10000);
182 def_alloc(save_size, 8000, 65536, 1000, 2000);
183 def_alloc(nest_size, 200, 65536, 100, 200);
184 def_alloc(param_size, 500, 65536, 100, 200);
185 def_alloc(stack_size, 800, 65536, 100, 200);
186 
188 
192 def_type(glue_ratio, float, double);
193 def_type(real, float, double);
194 
197 typedef integer scaled;
199 
203 
205 
207 
208 def_const(default_trie_size, 0, 1000000); // 60000
209 
210 /* mem_min may be < 0 */
211 /* sec 0113 */
212 typedef halfword pointer; // {a flag or a location in |mem| or |eqtb|}
213 /* sec 0113 */
214 typedef struct
215 {
217 
218  union
219  {
221 
222  struct
223  {
225  };
226  };
227 } two_halves;
228 
229 typedef struct
230 {
232 } four_quarters;
233 
234 typedef union
235 {
240 } memory_word;
241 
242 #include "aptex-macros.h"
243 
244 /* sec 0150 */
246 /* sec 0212 */
247 typedef struct
248 {
250  int dir_field, adj_dir_field;
252  pointer head_field, tail_field, pnode_field, last_jchr_field;
256  integer pg_field, ml_field;
259 /* sec 0269 */
260 typedef char group_code;
261 /* sec 0300 */
262 typedef struct
263 {
264  quarterword state_field, index_field;
265  halfword start_field, loc_field, limit_field, name_field;
268 /* sec 0548 */
271 /* sec 0594 */
273 /* sec 0920 */
275 /* sec 0925 */
278 
279 EXTERN integer bad; // {is some ``constant'' wrong?}
280 
281 EXTERN ASCII_code xord[256]; // {specifies conversion of input characters}
282 EXTERN ASCII_code xchr[256]; // { specifies conversion of output characters }
283 
285 EXTERN integer name_length; // {this many characters are actually relevant in |name_of_file| (the rest are blank)}
286 
287 def_array(buffer, ASCII_code, buf_size + 4); // {lines of characters being read}
288 
289 EXTERN uint32_t first; // {the first unused position in |buffer|}
290 EXTERN uint32_t last; // {end of the line just input to |buffer|}
291 EXTERN uint32_t max_buf_stack; // {largest index used in |buffer|}
292 
293 EXTERN alpha_file term_in; // {the terminal as an input file}
294 EXTERN alpha_file term_out; // {the terminal as an output file}
295 
296 def_array(str_pool, packed_ASCII_code, pool_size + 1); // {the characters}
297 def_array(str_start, pool_pointer, max_strings + 1); // {the starting pointers}
298 
299 EXTERN pool_pointer pool_ptr; // {first unused position in |str_pool|}
300 EXTERN str_number str_ptr; // {number of the current string being created}
301 EXTERN pool_pointer init_pool_ptr; // {the starting value of |pool_ptr|}
302 EXTERN str_number init_str_ptr; // {the starting value of |str_ptr|}
303 
304 EXTERN alpha_file log_file; // {transcript of \TeX\ session}
305 EXTERN uint32_t selector; // {where to print a message}
306 EXTERN uint32_t dig[23 + 1]; // {digits in a number being output}
307 EXTERN integer tally; // {the number of characters recently printed}
308 EXTERN integer term_offset; // {the number of characters on the current terminal line}
309 EXTERN integer file_offset; // {the number of characters on the current file line}
310 EXTERN ASCII_code trick_buf[error_line + 1]; // {circular buffer for pseudoprinting}
311 EXTERN ASCII_code trick_buf2[error_line + 1]; // {pTeX: buffer for KANJI}
312 EXTERN ASCII_code kcode_pos; // {pTeX: denotes whether first byte or second byte of KANJI 1..2:2byte-char, 11..13:3byte-char, 21..24:4byte-char}
313 EXTERN ASCII_code kcp; // {temporary kcode_pos}
315 EXTERN integer trick_count; // {threshold for pseudoprinting, explained later}
316 EXTERN integer first_count; // {another variable for pseudoprinting}
317 
318 EXTERN int interaction; // {current level of interaction}
319 
320 EXTERN boolean deletions_allowed; // {is it safe for |error| to call |get_token|? }
321 EXTERN boolean set_box_allowed; // {is it safe to do a \.{\\setbox} assignment?}
322 EXTERN int history; // {has the source input been clean so far?}
323 EXTERN int error_count; // {the number of scrolled errors since the last paragraph ended}
324 
325 EXTERN char * help_line[6]; // {helps for the next |error|}
326 EXTERN int help_ptr; // {the number of help lines present}
327 EXTERN boolean use_err_help; // {should the |err_help| list be shown?}
328 
329 EXTERN integer interrupt; // {should \TeX\ pause for instructions?}
330 EXTERN boolean OK_to_interrupt; // {should interrupts be observed?}
331 
332 EXTERN boolean arith_error; // {has arithmetic overflow occurred recently?}
333 EXTERN scaled ng_remainder; // {amount subtracted to get an exact division}
334 
335 EXTERN integer randoms[55]; // {the last 55 random values generated}
336 EXTERN uint32_t j_random; // {the number of unused |randoms|}
337 EXTERN scaled random_seed; // {the default random seed}
338 EXTERN integer two_to_the[32]; // {powers of two}
339 EXTERN integer spec_log[29]; // {special logarithms}
340 
341 EXTERN halfword temp_ptr; // {a pointer variable for occasional emergency use}
342 
344 
346 EXTERN pointer lo_mem_max; // {the largest location of variable-size memory in use}
347 EXTERN pointer hi_mem_min; // {the smallest location of one-word memory in use}
348 EXTERN integer var_used, dyn_used; // {how much memory is in use}
349 
350 EXTERN pointer avail; // {head of the list of available one-word nodes}
351 EXTERN pointer mem_end; // {the last one-word node used in |mem|}
353 /* sec 0124 */
354 EXTERN pointer rover; // {points to some node in the list of empties}
355 
356 /* sec 0165 */
357 #ifdef APTEX_DEBUG
358  //define_array(zzzab, char, mem_max - mem_bot + 1);
359  EXTERN char zzzab[mem_max - mem_bot + 1];
360  //define_array(zzzac, char, mem_max - mem_bot + 1);
361  EXTERN char zzzac[mem_max - mem_bot + 1];
362  #define freearr (zzzab - mem_bot)
363  #define wasfree (zzzac - mem_bot)
364 #endif
365 
368 
369 EXTERN integer font_in_short_display; // {an internal font number}
370 
371 EXTERN integer depth_threshold; // {maximum nesting depth in box displays}
372 EXTERN integer breadth_max; // {maximum number of items shown at the same list level}
373 
375 
376 EXTERN integer nest_ptr; // {first unused location of |nest|}
377 EXTERN integer max_nest_stack; // {maximum of |nest_ptr| when pushing}
378 EXTERN list_state_record cur_list; // {the ``top'' semantic state}
379 EXTERN int shown_mode; // {most recent mode shown by \.{\\tracingcommands}}
380 
382 EXTERN integer sys_time, sys_day, sys_month, sys_year; // {date and time supplied by external system}
383 
386 #define xeq_level (zzzad - int_base)
388 #define hash (zzzae - hash_base) // {the hash table}
389 EXTERN pointer hash_used; // {allocation pointer for |hash|}
390 EXTERN boolean no_new_control_sequence; // {are new identifiers legal?}
391 EXTERN integer cs_count; // {total number of known identifiers}
392 // #
393 EXTERN two_halves prim[prim_size + 1]; // {the primitives table}
394 EXTERN pointer prim_used; // {allocation pointer for |prim|}
395 
397 
398 EXTERN integer save_ptr; // {first unused entry on |save_stack|}
399 EXTERN integer max_save_stack; // {maximum usage of save stack}
400 EXTERN int cur_level; // {current nesting level for groups}
401 EXTERN int cur_group; // {current group type}
402 EXTERN integer cur_boundary; // {where the current level begins}
403 
404 EXTERN integer mag_set; // {if nonzero, this magnification should be used henceforth}
405 
406 EXTERN int cur_cmd; // {current command set by |get_next|}
407 EXTERN halfword cur_chr; // {operand of current command}
408 EXTERN pointer cur_cs; // {control sequence found here, zero if none found}
409 EXTERN halfword cur_tok; // {packed representative of |cur_cmd| and |cur_chr|}
410 
412 
413 EXTERN integer input_ptr; // {first unused location of |input_stack|}
414 EXTERN integer max_in_stack; // {largest value of |input_ptr| when pushing}
416 EXTERN in_state_record cur_input; // {the ``top'' input state, according to convention (1)}
417 
418 EXTERN int in_open; // {the number of lines in the buffer, less one}
419 EXTERN integer open_parens; // {the number of open text files}
421 EXTERN integer line; // {current line number in the current source file}
423 
424 EXTERN int scanner_status; // {can a subfile end now?}
425 EXTERN pointer warning_index; // {identifier relevant to non-|normal| scanner status}
426 EXTERN pointer def_ref; // {reference count of token list being defined}
427 
428 def_array(param_stack, pointer, param_size + 1); // {token list pointers for parameters}
429 
430 EXTERN integer param_ptr; // {first unused entry in |param_stack|}
431 EXTERN integer max_param_stack; // {largest value of |param_ptr|, will be |<=param_size+9|}
432 
433 EXTERN integer align_state; // {group level with respect to current alignment}
434 
435 EXTERN integer base_ptr; // {shallowest level shown by |show_context|}
436 
437 EXTERN pointer par_loc; // {location of `\.{\\par}' in |eqtb|}
438 EXTERN halfword par_token; // {token representing `\.{\\par}'}
439 
441 EXTERN boolean force_eof; // {should the next \.{\\input} be aborted early?}
442 EXTERN pointer cur_mark[6]; // {token lists for marks}
443 
444 EXTERN int long_state; // {governs the acceptance of \.{\\par}}
445 EXTERN pointer pstack[10]; // {arguments supplied to a macro}
446 
447 EXTERN integer cur_val; // {value returned by numeric scanners}
448 EXTERN int cur_val_level; // {the ``level'' of this value}
449 
450 EXTERN int radix; // {|scan_int| sets this to 8, 10, 16, or zero}
451 
452 EXTERN int cur_order; // {order of infinity found by |scan_dimen|}
453 
454 EXTERN alpha_file read_file[16]; // {used for \.{\\read}}
455 EXTERN char read_open[17]; // {state of |read_file[n]|}
456 
457 EXTERN pointer cond_ptr; // {top of the condition stack}
458 EXTERN int if_limit; // {upper bound on |fi_or_else| codes}
459 EXTERN int cur_if; // {type of conditional being worked on}
460 EXTERN integer if_line; // {line where that conditional began}
461 
462 EXTERN integer skip_line; // {skipping began here}
463 
464 EXTERN str_number cur_name; // {name of file just scanned}
465 EXTERN str_number cur_area; // {file area just scanned, or \.{""}}
466 EXTERN str_number cur_ext; // {file extension just scanned, or \.{""}}
467 
468 EXTERN pool_pointer area_delimiter; // {the most recent `\./', if any}
469 EXTERN pool_pointer ext_delimiter; // {the most recent `\..', if any}
470 
473 
474 EXTERN boolean name_in_progress; // {is a file name being scanned?}
475 EXTERN str_number job_name; // {principal file name}
476 EXTERN boolean log_opened; // {has the transcript file been opened?}
478 
479 EXTERN byte_file dvi_file; // {the device-independent output goes here}
480 EXTERN str_number output_file_name; // {full name of the output file}
481 EXTERN str_number log_name; // {full name of the log file}
482 
484 
485 def_array(font_info, memory_word, font_mem_size + 1); // {pTeX: use halfword for |char_type| table.}
486 
487 EXTERN eight_bits font_dir[font_max + 1]; // {pTeX: direction of fonts, 0 is default, 1 is Yoko, 2 is Tate}
488 EXTERN integer font_num_ext[font_max + 1]; // {pTeX: number of the |char_type| table.}
489 EXTERN font_index fmem_ptr; // {first unused word of |font_info|}
490 EXTERN internal_font_number font_ptr; // {largest internal font number in use}
492 EXTERN scaled font_size[font_max + 1]; // {``at'' size}
493 EXTERN scaled font_dsize[font_max + 1]; // {``design'' size}
494 EXTERN font_index font_params[font_max + 1]; // {how many font parameters are present}
495 EXTERN str_number font_name[font_max + 1]; // {name of the font}
496 EXTERN str_number font_area[font_max + 1]; // {area of the font}
497 EXTERN eight_bits font_bc[font_max + 1]; // {beginning (smallest) character code}
498 EXTERN eight_bits font_ec[font_max + 1]; // {ending (largest) character code}
499 EXTERN pointer font_glue[font_max + 1]; // {glue specification for interword space, |null| if not allocated}
500 EXTERN boolean font_used[font_max + 1]; // {has a character from this font actually appeared in the output?}
501 EXTERN integer hyphen_char[font_max + 1]; // {current \.{\\hyphenchar} values}
502 EXTERN integer skew_char[font_max + 1]; // {current \.{\\skewchar} values}
503 EXTERN font_index bchar_label[font_max + 1]; // {start of |lig_kern| program for left boundary character, |non_address| if there is none}
504 EXTERN short font_bchar[font_max + 1]; // {right boundary character, |non_char| if there is none}
505 EXTERN short font_false_bchar[font_max + 1]; // {|font_bchar| if it doesn't exist in the font, otherwise |non_char|}
506 
507 EXTERN integer char_base[font_max + 1]; // {base addresses for |char_info|}
508 EXTERN integer ctype_base[font_max + 1]; // {pTeX: base addresses for KANJI character type parameters}
509 EXTERN integer width_base[font_max + 1]; // {base addresses for widths}
510 EXTERN integer height_base[font_max + 1]; // {base addresses for heights}
511 EXTERN integer depth_base[font_max + 1]; // {base addresses for depths}
512 EXTERN integer italic_base[font_max + 1]; // {base addresses for italic corrections}
513 EXTERN integer lig_kern_base[font_max + 1]; // {base addresses for ligature/kerning programs}
514 EXTERN integer kern_base[font_max + 1]; // {base addresses for kerns}
515 EXTERN integer exten_base[font_max + 1]; // {base addresses for extensible recipes}
516 EXTERN integer param_base[font_max + 1]; // {base addresses for font parameters}
517 
518 EXTERN four_quarters null_character; // {nonexistent character information}
519 
520 EXTERN integer total_pages; // {the number of pages that have been shipped out}
521 EXTERN scaled max_v; // {maximum height-plus-depth of pages shipped so far}
522 EXTERN scaled max_h; // {maximum width of pages shipped so far}
523 EXTERN integer max_push; // {deepest nesting of |push| commands encountered so far}
524 EXTERN integer last_bop; // {location of previous |bop| in the \.{DVI} output}
525 EXTERN integer dead_cycles; // {recent outputs that didn't ship anything out}
526 EXTERN boolean doing_leaders; // {are we inside a leader box?}
527 
529 EXTERN boolean dir_used; // {Is this dvi extended?}
530 EXTERN scaled rule_ht, rule_dp, rule_wd; // {size of current rule being output}
531 EXTERN pointer g; // {current glue specification}
532 EXTERN integer lq, lr; // {quantities used in calculations for leaders}
533 EXTERN eight_bits dvi_buf[dvi_buf_size + 4]; // {buffer for \.{DVI} output}
534 EXTERN dvi_index half_buf; // {half of |dvi_buf_size|}
535 EXTERN dvi_index dvi_limit; // {end of the current half buffer}
536 EXTERN dvi_index dvi_ptr; // {the next available buffer address}
537 EXTERN integer dvi_offset; // {|dvi_buf_size| times the number of times the output buffer has been fully emptied}
538 EXTERN integer dvi_gone; // {the number of bytes already output to |dvi_file|}
539 
540 EXTERN pointer down_ptr, right_ptr; // {heads of the down and right stacks}
541 
542 EXTERN scaled dvi_h, dvi_v; // {a \.{DVI} reader program thinks we are here}
543 EXTERN scaled cur_h, cur_v; // {\TeX\ thinks we are here}
544 EXTERN internal_font_number dvi_f; // {the current font}
545 EXTERN integer cur_s; // {current depth of output box nesting, initially $-1$}
546 
547 EXTERN scaled total_stretch[4], total_shrink[4]; // {glue found by |hpack| or |vpack|}
548 EXTERN integer last_badness; // {badness of the most recently packaged box}
549 
550 EXTERN integer pack_begin_line; // {source file line where the current paragraph or alignment began; a negative value denotes alignment}
551 
552 EXTERN pointer adjust_tail; // {tail of adjustment list}
553 EXTERN scaled last_disp; // {displacement at end of list}
556 
559 
560 EXTERN pointer cur_mlist; // {beginning of mlist to be translated}
561 EXTERN small_number cur_style; // {style code at current place in the list}
562 EXTERN small_number cur_size; // {size code corresponding to |cur_style|}
563 EXTERN scaled cur_mu; // {the math unit width corresponding to |cur_size|}
564 EXTERN boolean mlist_penalties; // {should |mlist_to_hlist| insert penalties?}
565 
566 EXTERN internal_font_number cur_f; // {the |font| field of a |math_char|}
567 EXTERN quarterword cur_c; // {the |character| field of a |math_char|}
568 EXTERN four_quarters cur_i; // {the |char_info| of a |math_char|, or a lig/kern instruction}
569 
570 EXTERN integer magic_offset; // {used to find inter-element spacing}
571 
572 EXTERN pointer cur_align; // {current position in preamble list}
573 EXTERN pointer cur_span; // {start of currently spanned columns in preamble list}
574 EXTERN pointer cur_loop; // {place to copy when extending a periodic preamble}
575 EXTERN pointer align_ptr; // {most recently pushed-down alignment stack node}
576 EXTERN pointer cur_head, cur_tail; // {adjustment list pointers}
577 
578 EXTERN pointer just_box; // {the |hlist_node| for the last line of the new paragraph}
579 
580 EXTERN pointer passive; // {most recent node on passive list}
581 EXTERN pointer printed_node; // {most recent node that has been printed}
582 EXTERN halfword pass_number; // {the number of passive nodes allocated on this pass}
583 
584 EXTERN scaled active_width[8]; // {distance from first active node to~|cur_p|}
585 EXTERN scaled cur_active_width[8]; // {distance from current active node}
586 EXTERN scaled background[8]; // {length of an ``empty'' line}
587 EXTERN scaled break_width[8]; // {length being computed after current break}
588 
589 EXTERN boolean no_shrink_error_yet; // {have we complained about infinite shrinkage?}
590 
591 EXTERN pointer cur_p; // {the current breakpoint under consideration}
592 EXTERN boolean chain; // {chain current line and next line?}
593 EXTERN boolean second_pass; // {is this our second attempt to break this paragraph?}
594 EXTERN boolean final_pass; // {is this our final attempt to break this paragraph?}
595 EXTERN integer threshold; // {maximum badness on feasible lines}
596 
597 EXTERN scaled disc_width; // {the length of discretionary material preceding a break}
598 
599 EXTERN halfword easy_line; // {line numbers |>easy_line| are equivalent in break nodes}
600 EXTERN halfword last_special_line; // {line numbers |>last_special_line| all have the same width}
601 EXTERN scaled first_width; // {the width of all lines |<=last_special_line|, if no \.{\\parshape} has been specified}
602 EXTERN scaled second_width; // {the width of all lines |>last_special_line|}
603 EXTERN scaled first_indent; // {left margin to go with |first_width|}
604 EXTERN scaled second_indent; // {left margin to go with |second_width|}
605 
606 EXTERN pointer best_bet; // {use this passive node and its predecessors}
607 EXTERN integer fewest_demerits; // {the demerits associated with |best_bet|}
608 EXTERN halfword best_line; // {line number following the last line of the new paragraph}
609 EXTERN integer actual_looseness; // {the difference between |line_number(best_bet)| and the optimum |best_line|}
610 EXTERN integer line_diff; // {the difference between the current line number and the optimum |best_line|}
611 
612 EXTERN int hc[66]; // {word to be hyphenated}
613 EXTERN int hn; // {the number of positions occupied in |hc|}
614 EXTERN halfword ha, hb; // {nodes |ha..hb| should be replaced by the hyphenated result}
615 EXTERN int hf; // {font number of the letters in |hc|}
616 EXTERN int hu[66]; // {like |hc|, before conversion to lowercase}
617 EXTERN int hyf_char; // {hyphen character of the relevant font}
618 EXTERN int cur_lang, init_cur_lang; // {current hyphenation table of interest}
619 EXTERN integer l_hyf, r_hyf; // {limits on fragment sizes}
621 EXTERN halfword hyf_bchar; // {boundary character after $c_n$}
622 
623 EXTERN char hyf[68]; // {odd values indicate discretionary hyphens}
624 EXTERN pointer init_list; // {list of punctuation characters preceding the word}
625 EXTERN boolean init_lig; // {does |init_list| represent a ligature?}
626 EXTERN boolean init_lft; // {if so, did the ligature involve a left boundary?}
627 
628 EXTERN int hyphen_passed; // {first hyphen in a ligature, if any}
629 
630 EXTERN halfword cur_l, cur_r; // {characters before and after the cursor}
631 EXTERN pointer cur_q; // {where a ligature should be detached}
632 EXTERN pointer lig_stack; // {unfinished business to the right of the cursor}
633 EXTERN boolean ligature_present; // {should a ligature node be made for |cur_l|?}
634 EXTERN boolean lft_hit, rt_hit; // {did we hit a ligature with a boundary character?}
635 
639 
640 EXTERN small_number hyf_distance[trie_op_size + 1]; // {position |k-j| of $n_j$}
641 EXTERN small_number hyf_num[trie_op_size + 1]; // {value of $n_j$}
642 EXTERN trie_op_code hyf_next[trie_op_size + 1]; // {continuation code}
643 EXTERN integer op_start[256]; // {offset for current language}
644 
645 def_array(hyph_word, str_number, hyphen_prime + 1); // {exception words}
646 def_array(hyph_list, pointer, hyphen_prime + 1); // {lists of hyphen positions}
647 
649 
650 #ifdef APTEX_EXTENSION
651  #define default_hyphen_prime 8191 // 1009
652 #endif
653 
655 
656 #ifdef INITEX
658  #define trie_op_hash (trie_op_hash_C - (int)(neg_trie_op_size))
663 #endif
664 
666 
667 #ifdef INITEX
668  def_array(trie_c, packed_ASCII_code, trie_size + 1); /* characters to match */
669  def_array(trie_o, trie_op_code, trie_size + 1); /* operations to perform */
670  def_array(trie_l, trie_pointer, trie_size + 1); /* left subtrie links */
671  def_array(trie_r, trie_pointer, trie_size + 1); /* right subtrie links */
672  def_array(trie_hash, trie_pointer, trie_size + 1); /* used to identify equivlent subtries */
673  def_array(trie_taken, char, trie_size + 1); // char / boolean
678 #endif
679 
680 EXTERN scaled best_height_plus_depth; // {height of the best box, without stretching or shrinking}
681 
682 EXTERN pointer page_tail; // {the final node on the current page}
683 EXTERN int page_contents; // {what is on the current page so far?}
684 EXTERN scaled page_max_depth; // {maximum box depth on page being built}
685 EXTERN pointer best_page_break; // {break here to get the best page known so far}
686 EXTERN integer least_page_cost; // {the score for this currently best page}
687 EXTERN scaled best_size; // {its |page_goal|}
688 
689 EXTERN scaled page_so_far[8]; // {height and glue of the current page}
690 EXTERN pointer last_glue; // {used to implement \.{\\lastskip}}
691 EXTERN integer last_penalty; // {used to implement \.{\\lastpenalty}}
692 EXTERN scaled last_kern; // {used to implement \.{\\lastkern}}
693 EXTERN integer last_node_type; // {used to implement \.{\\lastnodetype}}
694 EXTERN integer last_node_subtype; // {used to implement \.{\\lastnodesubtype}}
695 EXTERN integer insert_penalties; // {sum of the penalties for held-over insertions}
696 
697 EXTERN boolean output_active; // {are we in the midst of an output routine?}
698 
699 EXTERN internal_font_number main_f; // {the current font}
700 EXTERN four_quarters main_i; // {character information bytes for |cur_l|}
701 EXTERN four_quarters main_j; // {ligature/kern command}
702 EXTERN font_index main_k; // {index into |font_info|}
703 EXTERN pointer main_p; // {temporary register for list manipulation}
704 EXTERN integer main_s; // {space factor value}
705 EXTERN halfword bchar; // {right boundary character of current font, or |non_char|}
706 EXTERN halfword false_bchar; // {nonexistent character matching |bchar|, or |non_char|}
707 EXTERN boolean cancel_boundary; // {should the left boundary be ignored?}
708 EXTERN boolean ins_disc; // {should we insert a discretionary node?}
709 
710 EXTERN pointer cur_box; // {box to be placed into its context}
711 
712 EXTERN halfword after_token; // {zero, or a saved token}
713 
714 EXTERN boolean long_help_seen; // {has the long \.{\\errmessage} help been used?}
715 
717 
718 EXTERN word_file fmt_file; // {for input or output of format information}
719 
720 EXTERN integer ready_already; // {a sacrifice of purity for economy}
721 
723 EXTERN boolean write_open[18];
724 
725 EXTERN pointer write_loc; // {|eqtb| address of \.{\\write}}
726 
727 EXTERN scaled cur_page_width; // {"physical" width of page being shipped}
728 EXTERN scaled cur_page_height; // {"physical" height of page being shipped}
731 
732 EXTERN boolean eTeX_mode; // {identifies compatibility and extended mode}
733 
734 EXTERN boolean eof_seen[max_in_open + 1]; // {has eof been seen?}
735 
736 EXTERN scaled revdisp; // {temporary value of displacement}
737 EXTERN pointer LR_ptr; // {stack of LR codes for |hpack|, |ship_out|, and |init_math|}
738 EXTERN integer LR_problems; // {counts missing begins and ends}
739 EXTERN small_number cur_dir; // {current text direction}
740 
741 EXTERN pointer pseudo_files; // {stack of pseudo files}
742 
743 EXTERN pointer grp_stack[max_in_open + 1]; // {initial |cur_boundary|}
744 EXTERN pointer if_stack[max_in_open + 1]; // {initial |cond_ptr|}
745 
746 EXTERN halfword max_reg_num; // {largest allowed register number}
747 EXTERN const char * max_reg_help_line; // {first line of help message}
748 
749 EXTERN pointer sa_root[7]; // {roots of sparse arrays}
750 EXTERN pointer cur_ptr; // {value returned by |new_index| and |find_sa_element|}
751 EXTERN memory_word sa_null; // {two |null| pointers}
752 
753 EXTERN pointer sa_chain; // {chain of saved sparse array entries}
754 EXTERN quarterword sa_level; // {group level for |sa_chain|}
755 
756 EXTERN pointer last_line_fill; // {the |par_fill_skip| glue node of the new paragraph}
757 EXTERN boolean do_last_line_fit; // {special algorithm for last line of paragraph?}
758 EXTERN small_number active_node_size; // {number of words in active nodes}
759 EXTERN scaled fill_width[3]; // {infinite stretch components of |par_fill_skip|}
760 EXTERN scaled best_pl_short[4]; // {|shortfall| corresponding to |minimal_demerits|}
761 EXTERN scaled best_pl_glue[4]; // {corresponding glue stretch or shrink}
762 
763 EXTERN trie_pointer hyph_start; // {root of the packed trie for |hyph_codes|}
764 EXTERN trie_pointer hyph_index; // {pointer to hyphenation codes for |cur_lang|}
765 
766 EXTERN pointer disc_ptr[4]; // {list pointers}
767 
768 EXTERN integer minimal_demerits[4]; // {best total demerits known for current line class and position, given the fitness}
769 EXTERN integer minimum_demerits; // {best total demerits known for current line class and position}
770 EXTERN pointer best_place[4]; // {how to achieve |minimal_demerits|}
771 EXTERN halfword best_pl_line[4]; // {corresponding line number}
772 
773 EXTERN integer dvi_dir; // {a \.{DVI} reader program thinks we direct to}
774 EXTERN integer cur_dir_hv; // {\TeX\ thinks we direct to}
776 
777 EXTERN pointer first_char; // {first printable character}
778 EXTERN pointer last_char; // {last printable character}
779 EXTERN boolean find_first_char; // {find for a first printable character?}
781 
782 // eTeX
787 
788 // for SyncTeX
792 
793 EXTERN struct {
794  // enviroment in UTF-8
795  int argc;
796  char ** argv;
797  char * aptex_fmt;
798  char * aptex_src;
799  char * aptex_job;
800  char * aptex_map;
801  // time variables
805  // tracing options
806  boolean trace_mem;
807  boolean trace_realloc;
808  boolean trace_lbrk;
809  // flags
810  boolean flag_initex;
811  boolean flag_tex82;
820 
821 #include "aptex-functions.h"
822 
823 #ifdef __cplusplus
824 }
825 #endif
826 
827 #endif
#define prim_size
Definition: aptex-macros.h:558
#define hash_base
Definition: aptex-macros.h:544
#define int_base
Definition: aptex-macros.h:657
#define eqtb_size
Definition: aptex-macros.h:891
#define undefined_control_sequence
Definition: aptex-macros.h:561
static integer term_offset
Definition: aptex.h:308
static two_halves empty_field
Definition: aptex.h:557
static integer cur_boundary
Definition: aptex.h:402
static int hu[66]
Definition: aptex.h:616
static pointer right_ptr
Definition: aptex.h:540
static scaled max_v
Definition: aptex.h:521
static pointer disc_ptr[4]
Definition: aptex.h:766
static integer microseconds
Definition: aptex.h:786
boolean flag_compact_fmt
Definition: aptex.h:813
static halfword cur_r
Definition: aptex.h:630
uint8_t small_number
Definition: aptex.h:113
static integer last_penalty
Definition: aptex.h:691
static integer minimum_demerits
Definition: aptex.h:769
@ trie_op_size
Definition: aptex.h:170
static scaled cur_mu
Definition: aptex.h:563
static alpha_file input_file[max_in_open+1]
Definition: aptex.h:420
static pointer best_bet
Definition: aptex.h:606
static char read_open[17]
Definition: aptex.h:455
@ min_quarterword
Definition: aptex.h:153
static integer skip_line
Definition: aptex.h:462
static pointer adjust_tail
Definition: aptex.h:552
static int cur_group
Definition: aptex.h:401
static uint32_t dig[23+1]
Definition: aptex.h:306
static font_index bchar_label[font_max+1]
Definition: aptex.h:503
static integer least_page_cost
Definition: aptex.h:686
static scaled rule_wd
Definition: aptex.h:530
@ default_trie_size
Definition: aptex.h:208
static integer italic_base[font_max+1]
Definition: aptex.h:512
static pointer cur_box
Definition: aptex.h:710
static boolean panicking
Definition: aptex.h:367
static uint32_t j_random
Definition: aptex.h:336
static integer total_pages
Definition: aptex.h:520
static int current_mem_size
Definition: aptex.h:187
integer nonnegative_integer
Definition: aptex.h:198
integer str_number
Definition: aptex.h:196
static small_number cur_dir
Definition: aptex.h:739
static integer height_base[font_max+1]
Definition: aptex.h:510
static pointer lig_stack
Definition: aptex.h:632
static integer param_ptr
Definition: aptex.h:430
static halfword hyf_bchar
Definition: aptex.h:621
static int hc[66]
Definition: aptex.h:612
static boolean is_print_utf8
Definition: aptex.h:783
static halfword cur_chr
Definition: aptex.h:407
static boolean find_first_char
Definition: aptex.h:779
@ hash_prime
Definition: aptex.h:175
static pointer mem_start
Definition: aptex.h:352
static trie_op_code hyf_next[trie_op_size+1]
Definition: aptex.h:642
static integer max_save_stack
Definition: aptex.h:399
static integer trie_op_hash_C[trie_op_size - neg_trie_op_size+1]
Definition: aptex.h:657
static font_index font_params[font_max+1]
Definition: aptex.h:494
static ASCII_code trie_op_lang[trie_op_size+1]
Definition: aptex.h:660
static integer epochseconds
Definition: aptex.h:785
static integer last_node_subtype
Definition: aptex.h:694
static dvi_index half_buf
Definition: aptex.h:534
static scaled best_pl_glue[4]
Definition: aptex.h:761
static small_number cur_style
Definition: aptex.h:561
@ nest_size
Definition: aptex.h:183
static memory_word eqtb[((((((((((((((((((((((((((((((((((((((((1+256)+256)+1)+hash_size)+10)+1)+2100+1)+font_max+2)+1)+21)+256)+256)+10)+1)+256)+4)+256)+1)+48)+1)+1)+1)+1)+1)+256)+512)+256)+256)+256)+10)+256)+256)+256)+256)+76)+256)+256)+27)+256)+255)+1]
Definition: aptex.h:384
static integer dyn_used
Definition: aptex.h:348
static int cur_lang
Definition: aptex.h:618
@ max_strings
Definition: aptex.h:181
static pointer init_list
Definition: aptex.h:624
static pointer cur_q
Definition: aptex.h:631
@ dvi_buf_size
Definition: aptex.h:174
static pointer first_char
Definition: aptex.h:777
static pointer def_ref
Definition: aptex.h:426
static int scanner_status
Definition: aptex.h:424
static uint32_t first
Definition: aptex.h:289
static two_halves prim[2100+1]
Definition: aptex.h:393
static short font_false_bchar[font_max+1]
Definition: aptex.h:505
static halfword ha
Definition: aptex.h:614
static integer trie_size
Definition: aptex.h:206
uint8_t ASCII_code
Definition: aptex.h:109
static scaled max_h
Definition: aptex.h:522
static scaled last_disp
Definition: aptex.h:553
static str_number font_area[font_max+1]
Definition: aptex.h:496
static pointer cur_align
Definition: aptex.h:572
static scaled break_width[8]
Definition: aptex.h:587
static pointer cur_p
Definition: aptex.h:591
static alpha_file term_in
Definition: aptex.h:293
static small_number cur_size
Definition: aptex.h:562
static int shown_mode
Definition: aptex.h:379
static memory_word * main_memory
Definition: aptex.h:345
static short font_bchar[font_max+1]
Definition: aptex.h:504
static dvi_index dvi_ptr
Definition: aptex.h:536
integer internal_font_number
Definition: aptex.h:269
boolean trace_lbrk
Definition: aptex.h:808
@ buf_size
Definition: aptex.h:178
static boolean dir_used
Definition: aptex.h:529
static str_number last_tokens_string
Definition: aptex.h:784
static integer ctype_base[font_max+1]
Definition: aptex.h:508
static quarterword sa_level
Definition: aptex.h:754
static eight_bits font_ec[font_max+1]
Definition: aptex.h:498
static quarterword cur_c
Definition: aptex.h:567
static integer cur_s
Definition: aptex.h:545
boolean flag_reset_hyphen
Definition: aptex.h:815
#define def_alloc(sym, val0, val1, init, incr)
Definition: aptex.h:130
static boolean arith_error
Definition: aptex.h:332
static scaled second_width
Definition: aptex.h:602
static trie_pointer trie_max
Definition: aptex.h:676
static scaled cur_active_width[8]
Definition: aptex.h:585
static boolean init_lig
Definition: aptex.h:625
static integer align_state
Definition: aptex.h:433
@ string_vacancies
Definition: aptex.h:169
static integer op_start[256]
Definition: aptex.h:643
static scaled second_indent
Definition: aptex.h:604
@ font_max
Definition: aptex.h:168
static boolean force_eof
Definition: aptex.h:441
static boolean final_pass
Definition: aptex.h:594
static boolean cancel_boundary
Definition: aptex.h:707
FILE * byte_file
Definition: aptex.h:120
static boolean no_new_control_sequence
Definition: aptex.h:390
static ASCII_code xord[256]
Definition: aptex.h:281
static integer mem_top
Definition: aptex.h:200
static pointer * hyph_list
Definition: aptex.h:646
static two_halves zzzae[((((((((1+256)+256)+1)+hash_size)+10)+1)+2100+1)+font_max+2) -(((1+256)+256)+1)]
Definition: aptex.h:387
static boolean use_err_help
Definition: aptex.h:327
static integer name_length
Definition: aptex.h:285
static int hf
Definition: aptex.h:615
static integer nest_ptr
Definition: aptex.h:376
@ max_mem_size
Definition: aptex.h:204
static integer param_base[font_max+1]
Definition: aptex.h:516
char * aptex_fmt
Definition: aptex.h:797
static trie_op_code trie_used[256]
Definition: aptex.h:659
static int hyf_char
Definition: aptex.h:617
static int in_open
Definition: aptex.h:418
char * aptex_job
Definition: aptex.h:799
static boolean init_lft
Definition: aptex.h:626
static integer input_ptr
Definition: aptex.h:413
#define def_const(sym, val0, val1)
Definition: aptex.h:128
static scaled background[8]
Definition: aptex.h:586
static pointer lo_mem_max
Definition: aptex.h:346
static boolean long_help_seen
Definition: aptex.h:714
static integer randoms[55]
Definition: aptex.h:335
static scaled cur_v
Definition: aptex.h:543
static scaled cur_page_height
Definition: aptex.h:728
static ASCII_code trick_buf2[error_line+1]
Definition: aptex.h:311
static integer sys_time
Definition: aptex.h:382
static pointer pstack[10]
Definition: aptex.h:445
static integer cur_dir_hv
Definition: aptex.h:774
static scaled rule_dp
Definition: aptex.h:530
static integer format_default_length
Definition: aptex.h:471
static pointer avail
Definition: aptex.h:350
static halfword hb
Definition: aptex.h:614
static integer line_diff
Definition: aptex.h:610
@ max_trie_op
Definition: aptex.h:173
static scaled best_size
Definition: aptex.h:687
static pointer page_tail
Definition: aptex.h:682
#define def_type(sym, t0, t1)
Definition: aptex.h:132
static boolean quoted_file_name
Definition: aptex.h:477
static integer actual_looseness
Definition: aptex.h:609
static halfword par_token
Definition: aptex.h:438
static integer high_in_open
Definition: aptex.h:415
static trie_op_code max_op_used
Definition: aptex.h:665
static int fbyte
Definition: aptex.h:780
static trie_pointer trie_ptr
Definition: aptex.h:674
static boolean ins_disc
Definition: aptex.h:708
clock_t time_finish
Definition: aptex.h:804
static integer first_count
Definition: aptex.h:316
@ min_halfword
Definition: aptex.h:155
static ASCII_code kcode_pos
Definition: aptex.h:312
static scaled revdisp
Definition: aptex.h:736
static integer insert_penalties
Definition: aptex.h:695
static pointer cur_mlist
Definition: aptex.h:560
@ neg_trie_op_size
Definition: aptex.h:171
integer hyph_pointer
Definition: aptex.h:277
static integer bad
Definition: aptex.h:279
static integer tally
Definition: aptex.h:307
boolean flag_visual_debug
Definition: aptex.h:818
static int page_contents
Definition: aptex.h:683
static integer sys_month
Definition: aptex.h:382
static integer fewest_demerits
Definition: aptex.h:607
static packed_ASCII_code * trie_c
Definition: aptex.h:668
static ASCII_code kcp
Definition: aptex.h:313
boolean flag_suppress_f_ligs
Definition: aptex.h:816
static boolean is_in_csname
Definition: aptex.h:791
static pointer passive
Definition: aptex.h:580
static boolean eof_seen[max_in_open+1]
Definition: aptex.h:734
static list_state_record * nest
Definition: aptex.h:374
static pointer par_loc
Definition: aptex.h:437
static scaled random_seed
Definition: aptex.h:337
static integer dvi_offset
Definition: aptex.h:537
integer pool_pointer
Definition: aptex.h:195
static pointer main_p
Definition: aptex.h:703
@ min_trie_op
Definition: aptex.h:172
static str_number cur_name
Definition: aptex.h:464
static char * trie_taken
Definition: aptex.h:673
boolean trace_mem
Definition: aptex.h:806
static scaled active_width[8]
Definition: aptex.h:584
static int hn
Definition: aptex.h:613
static pointer cur_ptr
Definition: aptex.h:750
static integer max_push
Definition: aptex.h:523
static integer cs_count
Definition: aptex.h:391
static in_state_record cur_input
Definition: aptex.h:416
static integer dvi_dir
Definition: aptex.h:773
static scaled font_size[font_max+1]
Definition: aptex.h:492
static scaled dvi_v
Definition: aptex.h:542
static integer pdf_last_y_pos
Definition: aptex.h:730
static halfword easy_line
Definition: aptex.h:599
static integer width_base[font_max+1]
Definition: aptex.h:509
static char * TEX_format_default
Definition: aptex.h:472
static four_quarters null_delimiter
Definition: aptex.h:558
@ max_quarterword
Definition: aptex.h:154
uint8_t packed_ASCII_code
Definition: aptex.h:112
static integer trie_op_ptr
Definition: aptex.h:662
char * aptex_src
Definition: aptex.h:798
static pointer cur_loop
Definition: aptex.h:574
static uint32_t max_buf_stack
Definition: aptex.h:291
@ param_size
Definition: aptex.h:184
static integer threshold
Definition: aptex.h:595
static trie_pointer * trie_hash
Definition: aptex.h:672
static integer l_hyf
Definition: aptex.h:619
static pointer cur_xkanji_skip
Definition: aptex.h:555
static integer font_in_short_display
Definition: aptex.h:369
static scaled cur_page_width
Definition: aptex.h:727
static boolean skip_mode
Definition: aptex.h:440
static boolean doing_leaders
Definition: aptex.h:526
#define EXTERN
Definition: aptex.h:24
static integer magic_offset
Definition: aptex.h:570
static boolean log_opened
Definition: aptex.h:476
static eight_bits font_bc[font_max+1]
Definition: aptex.h:497
static halfword cur_l
Definition: aptex.h:630
static trie_op_code * trie_o
Definition: aptex.h:669
static str_number log_name
Definition: aptex.h:481
static pointer rover
Definition: aptex.h:354
static pool_pointer ext_delimiter
Definition: aptex.h:469
static four_quarters font_check[font_max+1]
Definition: aptex.h:491
static boolean do_last_line_fit
Definition: aptex.h:757
static boolean chain
Definition: aptex.h:592
static quarterword zzzad[((((((((((((((((((((((((((((((((((((((((1+256)+256)+1)+hash_size)+10)+1)+2100+1)+font_max+2)+1)+21)+256)+256)+10)+1)+256)+4)+256)+1)+48)+1)+1)+1)+1)+1)+256)+512)+256)+256)+256)+10)+256)+256)+256)+256)+76)+256)+256)+27)+256)+255) -((((((((((((((((((((((((((((((((((1+256)+256)+1)+hash_size)+10)+1)+2100+1)+font_max+2)+1)+21)+256)+256)+10)+1)+256)+4)+256)+1)+48)+1)+1)+1)+1)+1)+256)+512)+256)+256)+256)+10)+256)+256)+256)+256)+1]
Definition: aptex.h:385
char group_code
Definition: aptex.h:260
static int cur_cmd
Definition: aptex.h:406
static boolean eTeX_mode
Definition: aptex.h:732
static integer skew_char[font_max+1]
Definition: aptex.h:502
static pointer cur_head
Definition: aptex.h:576
static boolean ligature_present
Definition: aptex.h:633
static pointer sa_chain
Definition: aptex.h:753
static in_state_record * input_stack
Definition: aptex.h:411
static memory_word * save_stack
Definition: aptex.h:396
static int interaction
Definition: aptex.h:318
static scaled best_pl_short[4]
Definition: aptex.h:760
static integer max_in_stack
Definition: aptex.h:414
static integer var_used
Definition: aptex.h:348
static pointer cur_mark[6]
Definition: aptex.h:442
static str_number cur_ext
Definition: aptex.h:466
static integer depth_threshold
Definition: aptex.h:371
static pool_pointer init_pool_ptr
Definition: aptex.h:301
static memory_word * mem
Definition: aptex.h:343
static int old_setting
Definition: aptex.h:381
@ block_size
Definition: aptex.h:160
static small_number hyf_distance[trie_op_size+1]
Definition: aptex.h:640
static str_number str_ptr
Definition: aptex.h:300
static halfword * trie_trl
Definition: aptex.h:636
static str_number cur_area
Definition: aptex.h:465
static integer lr
Definition: aptex.h:532
static scaled first_indent
Definition: aptex.h:603
static ASCII_code name_of_file[file_name_size+4]
Definition: aptex.h:284
static scaled total_stretch[4]
Definition: aptex.h:547
static alpha_file write_file[16]
Definition: aptex.h:722
static scaled rule_ht
Definition: aptex.h:530
static halfword max_reg_num
Definition: aptex.h:746
static scaled total_shrink[4]
Definition: aptex.h:547
static halfword temp_ptr
Definition: aptex.h:341
static integer synctex_option
Definition: aptex.h:789
static pointer warning_index
Definition: aptex.h:425
static int cur_order
Definition: aptex.h:452
static hyph_pointer hyph_count
Definition: aptex.h:654
static boolean mlist_penalties
Definition: aptex.h:564
static halfword last_special_line
Definition: aptex.h:600
static trie_pointer * trie_r
Definition: aptex.h:671
static scaled fill_width[3]
Definition: aptex.h:759
static char * help_line[6]
Definition: aptex.h:325
boolean flag_reset_trie
Definition: aptex.h:814
static pointer cur_span
Definition: aptex.h:573
static pointer cur_cs
Definition: aptex.h:408
static integer max_param_stack
Definition: aptex.h:431
clock_t time_main
Definition: aptex.h:803
static integer pack_begin_line
Definition: aptex.h:550
static boolean no_shrink_error_yet
Definition: aptex.h:589
static str_number * hyph_word
Definition: aptex.h:645
static int history
Definition: aptex.h:322
static four_quarters cur_i
Definition: aptex.h:568
static pointer mem_end
Definition: aptex.h:351
static integer font_num_ext[font_max+1]
Definition: aptex.h:488
static scaled page_max_depth
Definition: aptex.h:684
uint8_t eight_bits
Definition: aptex.h:111
static halfword best_pl_line[4]
Definition: aptex.h:771
static pointer best_page_break
Definition: aptex.h:685
static pointer down_ptr
Definition: aptex.h:540
static boolean font_used[font_max+1]
Definition: aptex.h:500
static integer max_nest_stack
Definition: aptex.h:377
static boolean write_open[18]
Definition: aptex.h:723
static int radix
Definition: aptex.h:450
static integer exten_base[font_max+1]
Definition: aptex.h:515
@ font_mem_size
Definition: aptex.h:179
static trie_pointer trie_min[256]
Definition: aptex.h:675
static boolean set_box_allowed
Definition: aptex.h:321
static dvi_index dvi_limit
Definition: aptex.h:535
static integer cur_val
Definition: aptex.h:447
static integer main_s
Definition: aptex.h:704
int32_t KANJI_code
Definition: aptex.h:110
static int init_cur_lang
Definition: aptex.h:618
static integer line_stack[max_in_open+1]
Definition: aptex.h:422
static integer sys_day
Definition: aptex.h:382
static integer init_r_hyf
Definition: aptex.h:620
static int cur_level
Definition: aptex.h:400
static boolean name_in_progress
Definition: aptex.h:474
@ max_print_line
Definition: aptex.h:165
static halfword bchar
Definition: aptex.h:705
static pointer was_hi_min
Definition: aptex.h:366
static internal_font_number dvi_f
Definition: aptex.h:544
static pointer hi_mem_min
Definition: aptex.h:347
static pointer cond_ptr
Definition: aptex.h:457
static boolean lft_hit
Definition: aptex.h:634
static uint32_t selector
Definition: aptex.h:305
integer scaled
Definition: aptex.h:197
static scaled font_dsize[font_max+1]
Definition: aptex.h:493
static str_number job_name
Definition: aptex.h:475
static pointer cur_kanji_skip
Definition: aptex.h:554
static eight_bits page_dir
Definition: aptex.h:775
static alpha_file read_file[16]
Definition: aptex.h:454
static ASCII_code trick_buf[error_line+1]
Definition: aptex.h:310
static alpha_file term_out
Definition: aptex.h:294
@ max_halfword
Definition: aptex.h:156
integer dvi_index
Definition: aptex.h:272
static pointer was_mem_end
Definition: aptex.h:366
static pointer pseudo_files
Definition: aptex.h:741
static four_quarters null_character
Definition: aptex.h:518
char * aptex_map
Definition: aptex.h:800
@ max_in_open
Definition: aptex.h:159
static boolean output_active
Definition: aptex.h:697
boolean flag_shell_escape
Definition: aptex.h:812
static pointer cur_tail
Definition: aptex.h:576
static integer last_badness
Definition: aptex.h:548
static small_number active_node_size
Definition: aptex.h:758
static pointer just_box
Definition: aptex.h:578
static int cur_val_level
Definition: aptex.h:448
static integer char_base[font_max+1]
Definition: aptex.h:507
static pointer grp_stack[max_in_open+1]
Definition: aptex.h:743
static integer trick_count
Definition: aptex.h:315
static scaled best_height_plus_depth
Definition: aptex.h:680
@ file_name_size
Definition: aptex.h:151
static integer r_hyf
Definition: aptex.h:619
static internal_font_number cur_f
Definition: aptex.h:566
static pointer * param_stack
Definition: aptex.h:428
static ASCII_code xchr[256]
Definition: aptex.h:282
static char * max_reg_help_line
Definition: aptex.h:747
static quarterword * trie_trc
Definition: aptex.h:638
static integer ready_already
Definition: aptex.h:720
static pointer font_glue[font_max+1]
Definition: aptex.h:499
static str_number format_ident
Definition: aptex.h:716
static font_index fmem_ptr
Definition: aptex.h:489
static memory_word * font_info
Definition: aptex.h:485
static integer breadth_max
Definition: aptex.h:372
static int error_count
Definition: aptex.h:323
static integer dvi_gone
Definition: aptex.h:538
static small_number hyf_num[trie_op_size+1]
Definition: aptex.h:641
static quarterword c
Definition: aptex.h:528
static pool_pointer * str_start
Definition: aptex.h:297
static font_index main_k
Definition: aptex.h:702
static pointer last_line_fill
Definition: aptex.h:756
static halfword false_bchar
Definition: aptex.h:706
halfword pointer
Definition: aptex.h:212
static boolean deletions_allowed
Definition: aptex.h:320
uint32_t glue_ord
Definition: aptex.h:245
static pool_pointer pool_ptr
Definition: aptex.h:299
static integer mag_set
Definition: aptex.h:404
static four_quarters main_i
Definition: aptex.h:700
static str_number font_name[font_max+1]
Definition: aptex.h:495
static halfword best_line
Definition: aptex.h:608
static boolean OK_to_interrupt
Definition: aptex.h:330
void * word_file
Definition: aptex.h:121
static pointer sa_root[7]
Definition: aptex.h:749
static integer lig_kern_base[font_max+1]
Definition: aptex.h:513
integer trie_pointer
Definition: aptex.h:276
static boolean second_pass
Definition: aptex.h:593
static integer kern_base[font_max+1]
Definition: aptex.h:514
static boolean rt_hit
Definition: aptex.h:634
boolean flag_merge_kanji_baseline
Definition: aptex.h:817
static pointer LR_ptr
Definition: aptex.h:737
static list_state_record cur_list
Definition: aptex.h:378
#define def_alter(sym, type, val)
Definition: aptex.h:136
@ hash_size
Definition: aptex.h:176
boolean flag_tex82
Definition: aptex.h:811
@ pool_size
Definition: aptex.h:180
static pointer best_place[4]
Definition: aptex.h:770
static integer minimal_demerits[4]
Definition: aptex.h:768
double glue_ratio
Definition: aptex.h:192
static integer if_line
Definition: aptex.h:460
static halfword pass_number
Definition: aptex.h:582
static quarterword f
Definition: aptex.h:528
integer trie_op_code
Definition: aptex.h:274
static pool_pointer area_delimiter
Definition: aptex.h:468
static integer LR_problems
Definition: aptex.h:738
static pointer g
Definition: aptex.h:531
int argc
Definition: aptex.h:795
static eight_bits font_dir[font_max+1]
Definition: aptex.h:487
static struct @1622 aptex_env
static integer open_parens
Definition: aptex.h:419
static internal_font_number font_ptr
Definition: aptex.h:490
static integer mem_max
Definition: aptex.h:201
static str_number output_file_name
Definition: aptex.h:480
static char hyf[68]
Definition: aptex.h:623
static int cur_if
Definition: aptex.h:459
static integer mem_min
Definition: aptex.h:202
static scaled last_kern
Definition: aptex.h:692
#define def_array(sym, type, size)
Definition: aptex.h:134
static int hyphen_passed
Definition: aptex.h:628
static pointer align_ptr
Definition: aptex.h:575
static pointer was_lo_max
Definition: aptex.h:366
static integer interrupt
Definition: aptex.h:329
static halfword cur_tok
Definition: aptex.h:409
static byte_file tfm_file
Definition: aptex.h:483
static trie_op_code trie_op_val[trie_op_size+1]
Definition: aptex.h:661
static pointer prim_used
Definition: aptex.h:394
static four_quarters main_j
Definition: aptex.h:701
static int help_ptr
Definition: aptex.h:326
static str_number init_str_ptr
Definition: aptex.h:302
@ max_cjk_val
Definition: aptex.h:157
@ stack_size
Definition: aptex.h:185
static integer lq
Definition: aptex.h:532
static integer dead_cycles
Definition: aptex.h:525
static integer depth_base[font_max+1]
Definition: aptex.h:511
boolean flag_initex
Definition: aptex.h:810
boolean trace_realloc
Definition: aptex.h:807
clock_t time_start
Definition: aptex.h:802
static boolean trie_not_ready
Definition: aptex.h:677
@ mem_bot
Definition: aptex.h:166
static integer file_offset
Definition: aptex.h:309
static integer init_l_hyf
Definition: aptex.h:620
static integer sys_year
Definition: aptex.h:382
static integer save_ptr
Definition: aptex.h:398
static scaled first_width
Definition: aptex.h:601
static packed_ASCII_code * str_pool
Definition: aptex.h:296
@ error_line
Definition: aptex.h:163
static integer hyphen_char[font_max+1]
Definition: aptex.h:501
static scaled disc_width
Definition: aptex.h:597
static integer two_to_the[32]
Definition: aptex.h:338
static int long_state
Definition: aptex.h:444
static ASCII_code prev_char
Definition: aptex.h:314
static integer last_bop
Definition: aptex.h:524
@ default_mem_top
Definition: aptex.h:162
static eight_bits dvi_buf[dvi_buf_size+4]
Definition: aptex.h:533
static pointer last_char
Definition: aptex.h:778
static integer hyphen_prime
Definition: aptex.h:648
static uint32_t last
Definition: aptex.h:290
integer font_index
Definition: aptex.h:270
static halfword after_token
Definition: aptex.h:712
static trie_pointer hyph_start
Definition: aptex.h:763
static integer pdf_last_x_pos
Definition: aptex.h:729
static trie_pointer * trie_l
Definition: aptex.h:670
char ** argv
Definition: aptex.h:796
static integer line
Definition: aptex.h:421
static boolean stop_at_space
Definition: aptex.h:790
@ half_error_line
Definition: aptex.h:164
@ save_size
Definition: aptex.h:182
static scaled dvi_h
Definition: aptex.h:542
static integer base_ptr
Definition: aptex.h:435
static integer last_node_type
Definition: aptex.h:693
static pointer hash_used
Definition: aptex.h:389
static scaled cur_h
Definition: aptex.h:543
static byte_file dvi_file
Definition: aptex.h:479
static alpha_file log_file
Definition: aptex.h:304
static internal_font_number main_f
Definition: aptex.h:699
static pointer printed_node
Definition: aptex.h:581
static int if_limit
Definition: aptex.h:458
static word_file fmt_file
Definition: aptex.h:718
static scaled page_so_far[8]
Definition: aptex.h:689
static memory_word sa_null
Definition: aptex.h:751
static trie_pointer hyph_index
Definition: aptex.h:764
static pointer last_glue
Definition: aptex.h:690
static pointer if_stack[max_in_open+1]
Definition: aptex.h:744
static pointer write_loc
Definition: aptex.h:725
static scaled ng_remainder
Definition: aptex.h:333
static halfword * trie_tro
Definition: aptex.h:637
static integer spec_log[29]
Definition: aptex.h:339
double real
Definition: dvips.h:66
unsigned short halfword
Definition: dvips.h:68
unsigned char * pointer
Definition: fontmisc.h:33
struct in_state_record in_state_record
#define PATH_MAX
Definition: ftmac.c:91
signed short int16_t
Definition: stdint.h:76
unsigned short uint16_t
Definition: stdint.h:79
signed __int64 int64_t
Definition: stdint.h:89
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78
uint8_t eight_bits
Definition: ctangleboot.c:165
#define b1
Definition: texmfmem.h:169
#define b3
Definition: texmfmem.h:171
#define b2
Definition: texmfmem.h:170
long clock_t
Definition: types.h:55
FILE * alpha_file
Definition: mainbody.h:82
struct list_state_record_ list_state_record
int integer
Definition: pbmtopk.c:38
char quarterword
Definition: pbmtopk.c:39
void * file_data
Definition: aptex.h:117
uint32_t file_type
Definition: aptex.h:118
Definition: utils.c:300
quarterword b0
Definition: aptex.h:231
halfword limit_field
Definition: aptex.h:265
quarterword index_field
Definition: aptex.h:264
integer synctex_tag_field
Definition: aptex.h:266
integer inhibit_glue_flag_field
Definition: aptex.h:254
memory_word aux_field
Definition: aptex.h:257
scaled pdisp_field
Definition: aptex.h:251
pointer eTeX_aux_field
Definition: aptex.h:255
boolean disp_called_field
Definition: aptex.h:253
int adj_dir_field
Definition: aptex.h:250
integer ml_field
Definition: aptex.h:256
pointer head_field
Definition: aptex.h:252
halfword rh
Definition: aptex.h:216
quarterword b0
Definition: aptex.h:224
halfword lh
Definition: aptex.h:220
#define FILE
Definition: t1stdio.h:34
two_halves hh
Definition: aptex.h:238
integer cint
Definition: aptex.h:236
glue_ratio gr
Definition: aptex.h:237
four_quarters qqqq
Definition: aptex.h:239
long long scaled
Definition: vf_ng.c:93