2 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
4 #define ALLOCATEINI /* allocate iniTeX (550 k) trie_c, trie_o, trie_l, trie_r, trie_hash, trie_taken */
5 #define ALLOCATEMAIN /* allocate main memory for TeX (2 Meg) zmem = zzzaa */
6 #define ALLOCATEFONT /* allocate font_info (800 k) (dynamically now) */
7 #define ALLOCATETRIES /* allocate hyphenation trie stuff (270 k) trie_trl, trie_tro, trie_trc */
8 #define ALLOCATEHYPHEN /* allocate hyphenation exception tables */
9 #define VARIABLETRIESIZE /* allow trie_size to be variable */
10 #define ALLOCATESTRING /* allocate strings and string pointers (184 k)str_pool & str_start */
11 #define ALLOCATESAVESTACK /* experiment to dynamically deal with save_stack 99/Jan/4 */
12 #define ALLOCATEINPUTSTACK /* experiment to dynamically deal with input_stack 99/Jan/21 */
13 #define ALLOCATENESTSTACK /* experiment to dynamically deal with nest_stack 99/Jan/21 */
14 #define ALLOCATEPARAMSTACK /* experiment to dynamically deal with param_stack 99/Jan/21 */
15 #define ALLOCATEBUFFER /* experiment to dynamically deal with input buffer 99/Jan/22 */
16 /* NOT *//* allow increasing high area of main memory */ /* FLUSH */
18 /* NOT *//* allow increasing low area of main memory */ /* FLUSH */
20 /* NOT */ /* allocate hash table (zzzae) (78k) */
22 /* NOT */ /* allocate dvi_buf (16k) */ /* changed in 1.3 1996/Jan/18 */
23 /* #define ALLOCATEDVIBUF */
25 /* increase fixed allocations */
27 /* increase number of fonts - quarterword 16 bit - max_quarterword limit */
28 /* there may still be some bugs with this however ... also may slow down */
29 /* also: should split use of quarterword for (i) font from (ii) char */
30 /* for example, xeq_level ? hyphenation trie_trc ? */
32 /* NOT NOT *//* allocate eqtb (108k) */ /* changed in 1.3 1996/Jan/18 */
34 /* make font_info array fmemoryword == 32 bit instead of memory_word = 64 bit */
36 /* make hash table htwohalves == 32 bit instead of twohalves == 64 bit */
37 // #define SHORTHASH --- changed 2000/Feb/22 increase max_strings from 64K to 512M
39 /* increase trie_op_size from 751 to 3001 96/Oct/12 */
40 #define INCREASETRIEOP
43 /* With old PharLap linker it was important to avoid large fixed allocation */
44 /* Now may be better to use fixed arrays rather than allocate them */
45 /* hence ALLOCATEZQTB, ALLOCATEDVIBUF and ALLOCATEMINOR are NOT defined */
47 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
55 /* #define max_halfword 65535L */ /* for 32 bit memory word */
56 /* #define max_halfword 262143L */ /* for 36 bit memory word */
57 #define min_halfword -2147483647L /* for 64 bit memory word (signed) */
58 #define max_halfword 2147483647L /* for 64 bit memory word (signed) */
60 #define block_size 1000 /* block_size for variable length node alloc */
62 /* min_quarterword assumed 0 -- i.e. we use unsigned types for quarterword */
63 #define min_quarterword 0
65 #define max_quarterword 65535L
67 #define max_quarterword 255
70 /* #define default_mem_top 262140L */ /* usual big TeX allocation 2 Meg bytes */
71 /* #define default_mem_top 131070L */ /* usual big TeX allocation 1 Meg bytes */
72 #define default_mem_top 65534L /* usual small TeX allocation 0.5 Meg */
74 /* mem_bot smallest index in mem array dumped by iniTeX mem_top >= mem_min */
76 /* mem_top largest index in mem array dumped by iniTeX mem_top <= mem_max */
78 EXTERN integer mem_top;
79 #define max_mem_size (max_halfword / sizeof(memory_word) - 1)
81 #define mem_top 262140L
84 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
85 /* mem_max == mem_top in iniTeX, otherwise mem_max >= mem_top */
86 /* if ALLOCATEMAIN is true, then mem_max is a variable */
87 /* otherwise it is a pre-processor defined constant */
89 EXTERN integer mem_max;
91 /* #define mem_max 262140L */
92 #define mem_max mem_top
95 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
96 /* if ALLOCATEMAIN is true, then mem_min is a variable */
97 /* otherwise it is a pre-processor defined constant */
98 /* mem_min == mem_bot in iniTeX, otherwise mem_min <= mem_bot */
100 EXTERN integer mem_min;
105 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
106 /* buf_size is max size of input line and max size of csname */
107 /* make sure its multiple of four bytes long */
108 /* want to increase this so it can handle whole paragraph imported from WP */
110 /* #define buf_size 8192 */
111 /* #define buf_size 12000 */ /* 1996/Jan/17 */
112 /* #define buf_size 16384 */ /* 1998/June/30 */
113 /* #define buf_size 20000 */ /* 1999/Jan/7 */
115 /* #define buf_size 3000 */
118 #ifdef ALLOCATEBUFFER
119 #define initial_buf_size 1000
120 #define increment_buf_size 2000
121 #define buf_size 2000000L /* arbitrary limit <= max_halfword */
122 EXTERN ASCII_code * buffer;
124 #define buf_size 20000 /* 1999/Jan/7 */
125 EXTERN ASCII_code buffer[buf_size + 4]; /* padded out to ... + 4 */
127 EXTERN integer first;
129 EXTERN integer max_buf_stack;
131 #define error_line 79
132 #define half_error_line 50
133 #define max_print_line 79
135 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
137 #define max_in_open 127 /* 1996/Jan/20 - really ? */
139 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
140 /* #define stack_size 300 */ /* Unix C version default */
141 #define max_in_open 15
142 /* #define save_size 1000 */ /* 3.14159 C version */
143 /* #define save_size 4000 */ /* 3.14159 C version */
146 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
147 /* maximum internal font number - cannot be greated than max_quarter_word! */
149 #define font_max 1023 /* 1996/Jan/17 */
154 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
155 /* free the limit on font memory ! */ /* (2^32 - 1) / sizeof(memory_word) */
157 /* #define font_mem_size 262140L */
158 #define font_mem_size (max_halfword / sizeof(memory_word) -1)
160 #define font_mem_size 100000L
163 /* our real font_mem_size is 268435456 --- ridiculously large, of course */
165 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
167 /* below is new dynamic allocation - bkph 93/Nov/28 */ /* enough for lplain */
169 #define initial_font_mem_size 20000
170 #define increment_font_mem_size 40000
173 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
174 /* max_strings max number of strings */ /* (2^32 - 1) / sizeof (integer) */
175 #ifdef ALLOCATESTRING
176 /* #define max_strings 262140L */
177 // #define max_strings (max_halfword / sizeof(integer) -1)
178 #define max_strings (max_halfword / sizeof(pool_pointer) - 1)
179 /* #define pool_size 4032000L */
180 #define pool_size (max_halfword - 1)
181 /* #define stringmargin 32768L */
182 #define stringmargin 10000
184 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
185 /* #define max_strings 15000 */
186 #define max_strings 16384
187 #define pool_size 124000L
189 #define string_vacancies 100000L
191 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
192 /* #if defined (ALLOCATEINITRIE) && defined (ALLOCATEHYPHEN) */
193 #ifdef VARIABLETRIESIZE
194 EXTERN integer trie_size;
195 #define default_trie_size 60000
197 #define trie_size 30000 /* 3.14159 C version */
200 /* increase trieop to accomadate more hyphenation patterns 96/OCt/12 */
202 #ifdef INCREASETRIEOP
203 #define trie_op_size 3001
204 #define neg_trie_op_size -3001
205 #define min_trie_op 0
206 #define max_trie_op 1000
208 #define trie_op_size 751
209 #define neg_trie_op_size -751
210 #define min_trie_op 0
211 #define max_trie_op 500
214 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
215 /* dvi_buf_size must be multiple of 8 - half is written out at a time */
216 #ifdef ALLOCATEDVIBUF
217 #define default_dvi_buf_size 16384
218 /* #define default_dvi_buf_size 32768 */ /* ? */
219 EXTERN int dvi_buf_size;
221 #define dvi_buf_size 16384 /* 3.14159 C version */
222 /* #define dvi_buf_size 32768 */ /* ? */
225 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
226 /* WARNING: increasing hash table for cs names is not trivial */
227 /* size of hash table for control sequence name < (mem_max - mem_min) / 10 */
228 /* #define hash_size 9500 */
229 /* #define hash_size 25000 */ /* 96/Jan/10 */
230 #define hash_size 32768 /* 96/Jan/17 */
231 /* trick to try and get around eqtb_extra problem */
232 /* 1024 fonts = font_max + 2 */
233 /* #define hash_extra -256 */
234 #define hash_extra (255 - font_max)
235 /* hash prime about 85% of hash_size (+ hash_extra) */
236 /* #define hashprime 7919 */
237 /* #define hash_prime 21247 */ /* 96/Jan/10 */
238 #define hash_prime 27197 /* 96/Jan/17 */
239 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
241 /* CONSTRAINT: reconcile increase font use by stealing from hash table ... */
243 /* Probably require eqtb_extra to be zero, so hash_extra = 255 - font_max */
244 #if (hash_extra != 255 - font_max)
245 #error ERROR: hash_extra not equal to (255 - font_max)
248 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
250 /* some sanity check when using narrow hash table ... */
252 /* using SHORTHASH limits hash_size to be less than 65536 */
253 /* using SHORTHASH limits max_strings to be less than 65536 */
254 /* if you ever need more string pointers, then #undef SHORTHASH --- */
255 /* you'll use more memory (about 130k byte) and format file larger (8k) */
258 /* can only do this if INCREASEFONTS defined up above ... */
259 #if (max_quarterword < 65535L)
260 #error ERROR: max_quarterword < 65535L
262 /* with narrowed hash table can only have 65535 string pointers */
263 /* #if (max_strings > max_quarterword) */ /* this test does not work */
265 #define max_strings max_quarterword
267 /* with narrowed hash table can only have 65535 hash table entries */
268 #if (hash_size > max_quarterword)
270 #define hash_size max_quarterword
272 #endif /* end of if SHORTHASH */
274 /* NOTE: if you define/undefine SHORTFONT have to redo formats */
276 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
278 typedef unsigned short quarterword;
280 typedef unsigned char quarterword;
283 /* possible alternative ? */ /* min_halfword = 0 and double max_halfword ? */
284 /* typedef unsigned long halfword; NO NO: since mem_min may be < 0 */
285 typedef integer halfword;
286 typedef char twochoices;
287 typedef char fourchoices;
289 #include "texmfmem.h"
291 typedef char glue_ord;
295 /* short mode_field; */
297 halfword head_field, tail_field;
298 integer pg_field, ml_field;
299 memory_word aux_field;
302 typedef char group_code;
306 quarterword state_field, index_field;
307 halfword start_field, loc_field, limit_field, name_field;
310 typedef integer internal_font_number;
311 typedef integer font_index;
312 typedef integer dvi_index;
313 typedef integer trie_op_code;
314 typedef integer trie_pointer;
316 /* typedef short hyph_pointer; */ /* increased 1996/Oct/20 ??? */
317 typedef integer hyph_pointer;
320 EXTERN ASCII_code xord[256];
321 EXTERN ASCII_code xchr[256];
322 EXTERN unsigned char name_of_file[PATHMAX + 4]; // fix 2000 June 18
323 EXTERN integer name_length;
325 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
326 #ifdef ALLOCATESTRING
327 #define initial_pool_size 40000
328 #define increment_pool_size 80000
329 EXTERN packed_ASCII_code * str_pool;
330 #define initial_max_strings 5000
331 #define increment_max_strings 10000
332 EXTERN pool_pointer * str_start;
334 EXTERN packed_ASCII_code str_pool[pool_size + 1];
335 EXTERN pool_pointer str_start[max_strings + 1];
337 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
339 EXTERN pool_pointer pool_ptr;
340 EXTERN str_number str_ptr;
341 EXTERN pool_pointer init_pool_ptr;
342 EXTERN str_number init_str_ptr;
345 EXTERN alpha_file pool_file;
348 EXTERN alpha_file log_file;
349 /* EXTERN char selector; */
350 /* EXTERN integer selector; */ /* padded out */
351 EXTERN int selector; /* padded out */ /* 95/Jan/7 */
352 /* EXTERN char dig[23]; */
353 EXTERN char dig[23 + 1]; /* padded out */
354 EXTERN integer tally;
355 EXTERN integer term_offset;
356 EXTERN integer file_offset;
357 EXTERN ASCII_code trick_buf[error_line + 1]; /* already padded 79 + 1 */
358 EXTERN integer trick_count;
359 EXTERN integer first_count;
360 /* EXTERN char interaction; */
361 /* EXTERN integer interaction; */ /* padded out */
362 EXTERN int interaction; /* padded out */ /* 95/Jan/7 */
363 EXTERN bool deletions_allowed;
364 EXTERN bool set_box_allowed;
365 /* EXTERN char history; */
366 /* EXTERN integer history; */ /* padded out */
367 EXTERN int history; /* padded out */ /* 95/Jan/7 */
368 /* EXTERN schar error_count; */
369 /* EXTERN integer error_count; */ /* padded out */
370 EXTERN int error_count; /* padded out */ /* 95/Jan/7 */
371 /* EXTERN str_number help_line[6]; */
372 EXTERN char * help_line[6];
373 /* EXTERN char help_ptr; */
374 /* EXTERN integer help_ptr; */ /* padded out */
375 EXTERN int help_ptr; /* padded out */ /* 95/Jan/7 */
376 EXTERN bool use_err_help;
377 /* EXTERN integer interrupt; */
378 EXTERN volatile integer interrupt; /* bkph - do avoid compiler optimization */
379 EXTERN bool OK_to_interrupt;
380 EXTERN bool arith_error;
381 EXTERN scaled tex_remainder;
382 EXTERN halfword temp_ptr;
384 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
386 EXTERN memory_word * mainmemory; /* remembered so can be free() later */
387 EXTERN memory_word * zzzaa;
390 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
392 /* #define zmem (zzzaa - (int)(mem_min)) */
393 /* zzzaa[mem_max - mem_min + 1]; */
394 #define zmem (zzzaa - (int)(mem_bot))
395 zzzaa[mem_max - mem_bot + 1];
398 EXTERN halfword lo_mem_max;
399 EXTERN halfword hi_mem_min;
400 EXTERN integer var_used, dyn_used;
401 EXTERN halfword avail;
402 EXTERN halfword mem_end;
403 EXTERN halfword mem_start; /* new in 3.14159 ??? */
404 EXTERN halfword rover;
406 /* NOTE: the following really also need to be dynamically allocated */
408 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
412 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
413 /* EXTERN bool */ /* save (4 - 1) * mem_max - mem_min */
415 /* #define freearr (zzzab - (int)(mem_min)) */
416 /* zzzab[mem_max - mem_min + 1]; */
417 #define freearr (zzzab - (int)(mem_bot))
418 zzzab[mem_max - mem_bot + 1];
424 /* EXTERN bool */ /* save (4 - 1) * mem_max - mem_min */
426 /* #define wasfree (zzzac - (int)(mem_min)) */
427 #define wasfree (zzzac - (int)(mem_bot))
428 /* zzzac[mem_max - mem_min + 1]; */
429 zzzac[mem_max - mem_bot + 1];
432 EXTERN halfword was_mem_end, was_lo_max, was_hi_min;
433 EXTERN bool panicking;
436 EXTERN integer font_in_short_display;
437 EXTERN integer depth_threshold;
438 EXTERN integer breadth_max;
439 /* EXTERN list_state_record nest[nest_size + 1]; */
440 /* EXTERN short shown_mode; */
441 /* EXTERN integer shown_mode; */ /* padded out */
442 EXTERN int shown_mode; /* padded out */ /* 95/Jan/7 */
443 /* EXTERN char old_setting; */
444 /* EXTERN integer old_setting; */ /* padded out */
445 EXTERN int old_setting; /* padded out */ /* 95/Jan/7 */
447 /* eqtn_extra is no longer used --- it should be 0 96/Jan/10 */
449 #define eqtb_extra (font_max - 255 + hash_extra)
454 /* Probably require eqtb_extra to be zero, so hash_extra = 255 - font_max */
455 #if (eqtb_extra != 0)
456 #error ERROR: eqtb_extra is not zero (need hash_extra equal 255 - font_max)
459 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
461 EXTERN memory_word * zeqtb;
462 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
465 EXTERN memory_word eqtb[(hash_size + 4007) + eqtb_extra];
467 EXTERN memory_word zeqtb[(hash_size + 4007)];
472 #define xeq_level (zzzad - (int_base + eqtb_extra))
474 #define xeq_level (zzzad - (int_base))
477 EXTERN quarterword zzzad[844]; /* ??? attempt to fix 99/Jan/5 */
478 /* region 5 & 6 int_base to eqtb_size: 13507 - 12663 */
482 EXTERN htwohalves *zzzae;
484 EXTERN twohalves *zzzae;
486 #define hash (zzzae - 514)
487 #else /* not allocating hash table */
488 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
494 #define hash (zzzae - 514)
497 zzzae[hash_size + 267 + eqtb_extra];
499 zzzae[hash_size + 267];
503 EXTERN halfword hash_used;
504 EXTERN bool no_new_control_sequence;
505 EXTERN integer cs_count;
507 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
508 /* using allocated save stack slows it down 1% to 2% */
509 /* despite reallocation, we still limit it to something finite */
510 /* to avoid soaking up all of machine memory in case of infinite loop */
511 #ifdef ALLOCATESAVESTACK
512 #define save_size 65536 /* arbitrary - ridiculously large */
513 #define initial_save_size 1000
514 #define increment_save_size 2000
515 EXTERN memory_word *save_stack;
517 #define save_size 8000 /* 1999/Jan/6 enough for even CRC */
518 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
519 EXTERN memory_word save_stack[save_size + 1];
522 EXTERN integer save_ptr;
523 EXTERN integer max_save_stack;
525 /* The following could really be char instead of quarterword ... */
526 /* EXTERN quarterword cur_level; */
527 /* EXTERN integer cur_level; */ /* padded out */
528 EXTERN int cur_level; /* padded out */ /* 95/Jan/7 */
530 /* EXTERN group_code cur_group; */
531 /* EXTERN integer cur_group; */ /* padded out */
532 EXTERN int cur_group; /* padded out */ /* 95/Jan/7 */
534 EXTERN integer cur_boundary;
535 EXTERN integer mag_set;
537 /* EXTERN eight_bits cur_cmd; */
538 /* EXTERN integer cur_cmd; */ /* padded out */
539 EXTERN int cur_cmd; /* padded out */ /* 95/Jan/7 */
541 /* EXTERN halfword cur_chr; */ /* itex, tex0, tex, tex3, tex5, tex6, tex7, tex8 */
542 EXTERN int cur_chr; /* 95/Jan/7 */
544 EXTERN halfword cur_cs;
545 EXTERN halfword cur_tok;
547 #ifdef ALLOCATENESTSTACK
548 #define nest_size 65536 /* arbitrary - ridiculously large */
549 #define initial_nest_size 100
550 #define increment_nest_size 200
551 EXTERN list_state_record * nest;
553 #define nest_size 200 /* 1999/Jan/7 */
554 EXTERN list_state_record nest[nest_size + 1];
556 EXTERN integer nest_ptr;
557 EXTERN integer max_nest_stack;
558 EXTERN list_state_record cur_list;
560 #ifdef ALLOCATEPARAMSTACK
561 #define param_size 65536 /* arbitrary - ridiculously large */
562 #define initial_param_size 100
563 #define increment_param_size 200
564 EXTERN halfword * param_stack;
566 #define param_size 500 /* 1997/Jan/17 */
567 EXTERN halfword param_stack[param_size + 1];
569 EXTERN integer param_ptr;
570 EXTERN integer max_param_stack;
572 #ifdef ALLOCATEINPUTSTACK
573 #define stack_size 65536 /* arbitrary - ridiculously large */
574 #define initial_stack_size 100
575 #define increment_stack_size 200
576 EXTERN in_state_record * input_stack;
578 #define stack_size 800
579 EXTERN in_state_record input_stack[stack_size + 1];
581 EXTERN integer input_ptr;
582 EXTERN integer max_in_stack;
584 EXTERN integer high_in_open; /* 1997/Jan/17 */
585 EXTERN in_state_record cur_input;
587 /* EXTERN integer in_open; */ /* used in itex, tex2, texmf */
588 EXTERN int in_open; /* 95/Jan/7 */
590 EXTERN integer open_parens;
591 EXTERN integer max_open_parens;
592 EXTERN alpha_file input_file[max_in_open + 1];
594 EXTERN integer line_stack[max_in_open + 1];
596 /* EXTERN char scanner_status; */
597 /* EXTERN integer scanner_status; */ /* padded out */
598 EXTERN int scanner_status; /* padded out */ /* 95/Jan/7 */
600 EXTERN halfword warning_index;
601 EXTERN halfword def_ref;
603 EXTERN integer align_state;
604 EXTERN integer base_ptr;
605 EXTERN halfword par_loc;
606 EXTERN halfword par_token;
607 EXTERN bool force_eof;
608 /* EXTERN halfword cur_mark[5]; */
609 EXTERN halfword cur_mark[6];
611 /* EXTERN char long_state; */
612 /* EXTERN integer long_state; */ /* padded out */
613 EXTERN int long_state; /* padded out */ /* 95/Jan/7 */
615 /* EXTERN halfword pstack[9]; */
616 EXTERN halfword pstack[10];
618 /* EXTERN integer cur_val; */
619 EXTERN int cur_val; /* 95/Jan/7 */
621 /* EXTERN char cur_val_level; */
622 /* EXTERN integer cur_val_level; */ /* padded out */
623 EXTERN int cur_val_level; /* padded out */ /* 95/Jan/7 */
625 /* EXTERN small_number radix; */
626 /* EXTERN integer radix; */ /* padded out */
627 EXTERN int radix; /* padded out */ /* 95/Jan/7 */
629 /* EXTERN glue_ord cur_order; */
630 /* EXTERN integer cur_order; */ /* padded out */
631 EXTERN int cur_order; /* padded out */ /* 95/Jan/7 */
633 EXTERN alpha_file read_file[16]; /* hard wired limit in TeX */
634 /* EXTERN char read_open[17]; */
635 EXTERN char read_open[20]; /* padded out */
637 EXTERN halfword cond_ptr;
639 /* EXTERN char if_limit; */
640 /* EXTERN integer if_limit; */ /* padded out */
641 EXTERN int if_limit; /* padded out */ /* 95/Jan/7 */
643 /* EXTERN small_number cur_if; */
644 /* EXTERN integer cur_if; */ /* padded out */
645 EXTERN int cur_if; /* padded out */ /* 95/Jan/7 */
647 EXTERN integer if_line;
648 EXTERN integer skip_line;
649 EXTERN str_number cur_name;
650 EXTERN str_number cur_area;
651 EXTERN str_number cur_ext;
652 EXTERN pool_pointer area_delimiter;
653 EXTERN pool_pointer ext_delimiter;
654 EXTERN integer format_default_length;
655 EXTERN char * TEX_format_default;
656 EXTERN bool name_in_progress;
657 EXTERN bool log_opened;
658 EXTERN bool quoted_file_name;
659 EXTERN str_number job_name;
660 EXTERN str_number output_file_name; // DVI file
661 EXTERN str_number texmf_log_name; // LOG file
662 EXTERN byte_file dvi_file;
663 EXTERN byte_file tfm_file;
664 EXTERN byte_file pdf_file;
665 EXTERN char * dvi_file_name;
666 EXTERN char * pdf_file_name;
667 EXTERN char * log_file_name;
669 /*******************************************************************/
671 /* SHORTFONTINFO halves the memory word used to store font info */
672 /* if it is not defined we use ordinary TeX memory words */
675 /* keep definition of fmemoryword in texmfmem.h */
676 /* keep definition of ffourquarters in texfmem.h */
677 /* keep definition of fquarterword in texfmem.h */
679 /* go back to original definition as TeX memory word */
681 #define fmemoryword memory_word
682 /* go back to original definition as fourquarters of a TeX word */
684 #define ffourquarters fourquarters
685 /* go back to original definition as quaterword */
687 #define fquarterword quarterword
690 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
692 EXTERN fmemoryword * font_info;
693 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
695 /* EXTERN memory_word font_info[font_mem_size + 1]; */
696 EXTERN fmemoryword font_info[font_mem_size + 1];
699 EXTERN font_index fmem_ptr;
700 EXTERN internal_font_number font_ptr;
701 EXTERN internal_font_number frozen_font_ptr;
702 /* There are about 24 integer size items per font, or about 100 bytes */
703 EXTERN ffourquarters font_check[font_max + 1];
705 EXTERN scaled font_size[font_max + 1];
706 EXTERN scaled font_dsize[font_max + 1];
707 EXTERN font_index font_params[font_max + 1];
708 EXTERN str_number font_name[font_max + 1];
709 EXTERN str_number font_area[font_max + 1];
710 EXTERN eight_bits font_bc[font_max + 1];
711 EXTERN eight_bits font_ec[font_max + 1];
712 EXTERN halfword font_glue[font_max + 1];
713 /* use char instead of bool to save space, but is it worth slow down ? */
714 EXTERN bool font_used[font_max + 1];
716 /* might want to make some of following only one character wide also ? */
717 /* except some use -1 as special case value */
718 /* well, at least make them short instead of integer */
719 EXTERN integer hyphen_char[font_max + 1];
720 EXTERN integer skew_char[font_max + 1];
721 EXTERN font_index bchar_label[font_max + 1];
722 EXTERN short font_bchar[font_max + 1];
723 /* don't change above to int or format file will be incompatible */
724 EXTERN short font_false_bchar[font_max + 1];
725 /* don't change above to int or format file will be incompatible */
726 EXTERN integer char_base[font_max + 1];
727 EXTERN integer width_base[font_max + 1];
728 EXTERN integer height_base[font_max + 1];
729 EXTERN integer depth_base[font_max + 1];
730 EXTERN integer italic_base[font_max + 1];
731 EXTERN integer lig_kern_base[font_max + 1];
732 EXTERN integer kern_base[font_max + 1];
733 EXTERN integer exten_base[font_max + 1];
734 EXTERN integer param_base[font_max + 1];
736 EXTERN ffourquarters null_character;
738 EXTERN integer total_pages;
741 EXTERN integer max_push;
742 EXTERN integer last_bop;
743 EXTERN integer dead_cycles;
744 EXTERN bool doing_leaders;
746 /* EXTERN quarterword c, f; */
747 /* EXTERN integer c, f */;
750 EXTERN scaled rule_ht, rule_dp, rule_wd;
752 EXTERN integer lq, lr;
754 #ifdef ALLOCATEDVIBUF
755 EXTERN eight_bits *zdvibuf;
757 /* EXTERN eight_bits dvi_buf[dvi_buf_size + 1]; */
758 /* EXTERN eight_bits dvi_buf[dvi_buf_size + 4]; */ /* padded out */
759 EXTERN eight_bits zdvibuf[dvi_buf_size + 4]; /* padded out 1996/Jan/18 */
762 EXTERN dvi_index half_buf;
763 EXTERN dvi_index dvi_limit;
764 EXTERN dvi_index dvi_ptr;
765 EXTERN integer dvi_offset;
766 EXTERN integer pdf_offset;
767 EXTERN integer dvi_gone;
768 EXTERN halfword down_ptr, right_ptr;
769 EXTERN scaled dvi_h, dvi_v;
770 EXTERN scaled pdf_h, pdf_v;
771 EXTERN scaled pdf_x, pdf_y;
772 EXTERN scaled pdf_delta_h, pdf_delta_v;
773 EXTERN scaled cur_h, cur_v;
774 EXTERN internal_font_number dvi_f;
775 EXTERN internal_font_number pdf_f;
776 EXTERN integer cur_s;
777 EXTERN scaled total_stretch[4], total_shrink[4]; /* padded already */
778 EXTERN integer last_badness;
779 EXTERN halfword adjust_tail;
780 EXTERN integer pack_begin_line;
781 EXTERN twohalves empty_field;
782 EXTERN fourquarters null_delimiter;
783 EXTERN halfword cur_mlist;
785 /* EXTERN small_number cur_style; */
786 /* EXTERN integer cur_style; */ /* padded out */ /* tex5.c, tex7.c */
787 EXTERN int cur_style; /* padded out */ /* 95/Jan/7 */
789 /* EXTERN small_number cur_size; */
790 /* EXTERN integer cur_size; */ /* padded out */
791 EXTERN int cur_size; /* padded out */ /* 95/Jan/7 */
793 EXTERN scaled cur_mu;
794 EXTERN bool mlist_penalties;
795 EXTERN internal_font_number cur_f;
797 /* EXTERN quarterword cur_c; */
798 /* EXTERN integer cur_c; */ /* padded out */
799 EXTERN int cur_c; /* padded out */ /* 95/Jan/7 */
801 EXTERN ffourquarters cur_i;
802 EXTERN integer magic_offset;
803 EXTERN halfword cur_align;
804 EXTERN halfword cur_span;
805 EXTERN halfword cur_loop;
806 EXTERN halfword align_ptr;
807 EXTERN halfword cur_head, cur_tail;
808 EXTERN halfword just_box;
809 EXTERN halfword passive;
810 EXTERN halfword printed_node;
811 EXTERN halfword pass_number;
812 EXTERN scaled active_width[8];
813 EXTERN scaled cur_active_width[8];
814 EXTERN scaled background[8];
815 EXTERN scaled break_width[8];
816 EXTERN bool no_shrink_error_yet;
817 EXTERN halfword cur_p;
818 EXTERN bool second_pass;
819 EXTERN bool final_pass;
820 EXTERN integer threshold;
821 EXTERN integer minimal_demerits[4];
822 EXTERN integer minimum_demerits;
823 EXTERN halfword best_place[4];
824 EXTERN halfword best_pl_line[4];
825 EXTERN scaled disc_width;
826 EXTERN halfword easyline;
827 EXTERN halfword last_special_line;
828 EXTERN scaled first_width;
829 EXTERN scaled second_width;
830 EXTERN scaled first_indent;
831 EXTERN scaled second_indent;
832 EXTERN halfword best_bet;
833 EXTERN integer fewest_demerits;
834 EXTERN halfword best_line;
835 EXTERN integer actual_looseness;
836 EXTERN integer line_diff;
837 /* EXTERN short hc[64+2]; */ /* padded OK 66 * 2 = 132 which is divisible by 4 */
838 EXTERN int hc[66]; /* padded OK 66 * 2 = 132 which is divisible by 4 */
840 /* EXTERN small_number hn; */
841 /* EXTERN integer hn; */ /* padded out */
842 EXTERN int hn; /* padded out */ /* 95/Jan/7 */
844 EXTERN halfword ha, hb;
846 /* EXTERN internal_font_number hf; */
847 EXTERN int hf; /* 95/Jan/7 */
849 /* EXTERN short hu[64+2]; */ /* padded OK */
850 EXTERN int hu[66]; /* padded OK */
852 /* EXTERN integer hyf_char; */
853 EXTERN int hyf_char; /* 95/Jan/7 */
855 /* init_cur_lang new in 3.14159 */
856 /* EXTERN ASCII_code cur_lang, init_cur_lang; */
857 /* EXTERN integer cur_lang, init_cur_lang; */ /* padded out */
858 EXTERN int cur_lang, init_cur_lang; /* padded out */ /* 95/Jan/7 */
860 EXTERN integer lhyf, rhyf;
861 /* EXTERN init_l_hyf, init_r_hyf; */ /* new in 3.14159 */
862 EXTERN integer init_l_hyf, init_r_hyf; /* new in 3.14159 */
864 EXTERN halfword hyfbchar;
865 /* EXTERN char hyf[65]; */
866 EXTERN char hyf[68]; /* padded out */
867 EXTERN halfword init_list;
868 EXTERN bool init_lig;
869 EXTERN bool init_lft;
871 /* EXTERN small_number hyphen_passed; */
872 /* EXTERN integer hyphen_passed; */ /* padded out */
873 EXTERN int hyphen_passed; /* padded out */ /* 95/Jan/7 */
875 /* EXTERN halfword cur_l, cur_r; */ /* make int's ? 95/Jan/7 */
876 EXTERN int cur_l, cur_r; /* make int's ? 95/Jan/7 */
878 EXTERN halfword cur_q;
879 EXTERN halfword lig_stack;
880 EXTERN bool ligature_present;
881 EXTERN bool lft_hit, rt_hit;
883 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
884 /* could perhaps use packed_ASCII_code for trie_trc ? */
886 EXTERN halfword * trie_trl;
887 EXTERN halfword * trie_tro;
888 EXTERN quarterword * trie_trc;
890 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
891 EXTERN halfword trie_trl[trie_size + 1];
892 EXTERN halfword trie_tro[trie_size + 1];
893 EXTERN quarterword trie_trc[trie_size + 1];
895 EXTERN small_number hyf_distance[trie_op_size + 1]; /* already padded 751 + 1 */
896 EXTERN small_number hyf_num[trie_op_size + 1]; /* already padded 751 + 1 */
897 EXTERN trie_op_code hyf_next[trie_op_size + 1];
898 EXTERN integer op_start[256];
900 /* if ALLOCATEHYPHEN is true, then hyphen_prime is a variable */
901 /* otherwise it is a pre-processor defined constant */
902 #ifdef ALLOCATEHYPHEN
903 #define default_hyphen_prime 1009
904 EXTERN str_number * hyph_word;
905 EXTERN halfword * hyph_list;
906 /* EXTERN hyphen_prime; */
907 EXTERN integer hyphen_prime;
909 #define hyphen_prime 607
910 /* EXTERN str_number hyph_word[608]; */
911 EXTERN str_number hyph_word[hyphen_prime + 1];
912 /* EXTERN halfword hyph_list[608]; */
913 EXTERN halfword hyph_list[hyphen_prime + 1];
916 /* EXTERN hyph_pointer hyph_count; */
917 /* EXTERN integer hyph_count; */ /* padded out */
918 EXTERN int hyph_count; /* padded out */ /* 95/Jan/7 */
921 EXTERN integer trie_op_hash_C[trie_op_size - neg_trie_op_size + 1];
922 #define trie_op_hash (trie_op_hash_C - (int)(neg_trie_op_size))
923 EXTERN trie_op_code trie_used[256];
924 EXTERN ASCII_code trie_op_lang[trie_op_size + 1]; /* already padded 751 + 1 */
925 EXTERN trie_op_code trie_op_val[trie_op_size + 1];
926 EXTERN integer trie_op_ptr;
929 EXTERN trie_op_code max_op_used;
934 EXTERN packed_ASCII_code *trie_c; /* characters to match */
935 EXTERN trie_op_code *trie_o; /* operations to perform */
936 EXTERN trie_pointer *trie_l; /* left subtrie links */
937 EXTERN trie_pointer *trie_r; /* right subtrie links */
938 EXTERN trie_pointer *trie_hash; /* used to identify equivlent subtries */
939 #else /* end ALLOCATEINI */
940 EXTERN packed_ASCII_code trie_c[trie_size + 1];
941 EXTERN trie_op_code trie_o[trie_size + 1];
942 EXTERN trie_pointer trie_l[trie_size + 1];
943 EXTERN trie_pointer trie_r[trie_size + 1];
944 EXTERN trie_pointer trie_hash[trie_size + 1];
945 #endif /* end not ALLOCATEINI */
946 EXTERN trie_pointer trie_ptr;
951 /* EXTERN bool *trie_taken; */ /* save (4 - 1) * trie_size = 90,000 byte */
952 EXTERN char *trie_taken;
954 EXTERN bool trie_taken[trie_size + 1];
957 EXTERN trie_pointer trie_min[256];
958 EXTERN trie_pointer trie_max;
959 EXTERN bool trie_not_ready;
961 EXTERN scaled best_height_plus_depth;
962 EXTERN halfword page_tail;
964 /* EXTERN char page_contents; */
965 /* EXTERN integer page_contents; */ /* padded out */
966 EXTERN int page_contents; /* padded out */ /* 95/Jan/7 */
968 /* ********************************************************************* */
970 /* do *some* sanity checking here --- rather than in TeX later 96/Jan/18 */
971 /* (cannot catch everything here, since some is now dynamic) */
973 #if (half_error_line < 30) || (half_error_line > error_line - 15)
974 #error ERROR: (half_error_line < 30) || (half_error_line > error_line - 15) BAD 1
977 #if (max_print_line < 60)
978 #error ERROR: (max_print_line < 60) BAD 2
981 #if (hash_prime > hash_size)
982 #error ERROR: (hash_prime > hash_size) BAD 5
985 #if (max_in_open > 127)
986 #error ERROR: (max_in_open > 127) BAD 6
989 #if (min_quarterword > 0) || (max_quarterword < 127)
990 #error ERROR: (min_quarterword > 0) || (max_quarterword < 127) BAD 11
993 #if (min_halfword > 0) || (max_halfword < 32767)
994 #error ERROR: (min_halfword > 0) || (max_halfword < 32767) BAD 12
997 #if (min_quarterword < min_halfword) || (max_quarterword > max_halfword)
998 #error ERROR: (min_quarterword < min_halfword) || (max_quarterword > max_halfword) BAD 13
1001 #if (font_max > max_quarterword)
1002 #error ERROR: (font_max > max_quarterword) BAD 15
1005 #if (save_size > max_halfword)
1006 #error ERROR: (save_size > max_halfword) BAD 17
1009 #if (buf_size > max_halfword)
1010 #error ERROR: (buf_size > max_halfword) BAD 18
1013 #if (max_quarterword - min_quarterword) < 255
1014 #error (max_quarterword - min_quarterword) < 255 BAD 19
1017 /* ********************************************************************* */
1019 EXTERN scaled page_max_depth;
1020 EXTERN halfword best_page_break;
1021 EXTERN integer least_page_cost;
1022 EXTERN scaled best_size;
1023 EXTERN scaled page_so_far[8];
1024 EXTERN halfword last_glue;
1025 EXTERN integer last_penalty;
1026 EXTERN scaled last_kern;
1027 EXTERN integer insert_penalties;
1028 EXTERN bool output_active;
1029 EXTERN internal_font_number main_f;
1031 EXTERN ffourquarters main_i;
1032 EXTERN ffourquarters main_j;
1034 EXTERN font_index main_k;
1035 EXTERN halfword main_p;
1036 EXTERN integer main_s;
1037 EXTERN halfword bchar;
1038 EXTERN halfword false_bchar;
1039 EXTERN bool cancel_boundary;
1040 EXTERN bool ins_disc;
1041 EXTERN halfword cur_box;
1042 EXTERN halfword after_token;
1043 EXTERN bool long_help_seen;
1044 EXTERN str_number format_ident;
1045 EXTERN word_file fmt_file;
1046 EXTERN integer ready_already;
1048 EXTERN alpha_file write_file[16]; /* hard wired limit in TeX */
1049 EXTERN bool write_open[18];
1051 EXTERN halfword write_loc;
1052 EXTERN pool_pointer edit_name_start;
1053 /* EXTERN integer edit_name_length, edit_line, tfm_temp; */
1054 EXTERN integer edit_name_length, edit_line;
1055 /* EXTERN integer tfm_temp; */ /* only used in tex3.c */
1056 EXTERN int tfm_temp; /* only used in tex3.c 95/Jan/7 */
1058 /* new stuff defined in local.c - bkph */
1060 EXTERN bool is_initex;
1061 EXTERN bool verbose_flag;
1062 EXTERN bool trace_flag;
1063 EXTERN bool debug_flag;
1064 EXTERN bool heap_flag;
1065 EXTERN bool open_trace_flag;
1066 EXTERN bool cache_file_flag;
1067 EXTERN bool knuth_flag;
1068 EXTERN bool no_interrupts;
1069 EXTERN bool c_style_flag;
1070 EXTERN bool non_ascii;
1071 EXTERN bool key_replace;
1072 EXTERN bool deslash;
1073 EXTERN bool trimeof;
1074 EXTERN bool allow_patterns;
1075 EXTERN bool show_fonts_used;
1076 EXTERN bool reset_exceptions;
1077 EXTERN bool show_current;
1078 EXTERN bool current_flag;
1079 EXTERN bool current_tfm;
1080 EXTERN bool return_flag;
1081 EXTERN bool want_version;
1082 EXTERN bool civilize_flag;
1083 EXTERN bool show_numeric;
1084 EXTERN bool restrict_to_ascii;
1085 EXTERN bool show_missing;
1086 EXTERN bool full_file_name_flag;
1087 EXTERN bool save_strings_flag;
1088 EXTERN int mem_initex;
1089 EXTERN int mem_extra_high;
1090 EXTERN int mem_extra_low;
1091 EXTERN int new_hyphen_prime;
1092 EXTERN int missing_characters;
1093 EXTERN int show_in_hex;
1094 EXTERN int show_in_dos;
1095 EXTERN int test_dir_access;
1096 EXTERN int dir_method;
1097 EXTERN int file_method;
1098 /* EXTERN int waitflush; */
1099 EXTERN int show_fmt_flag;
1100 EXTERN int show_tfm_flag;
1101 EXTERN bool show_texinput_flag; /* 1998/Jan/28 */
1102 EXTERN bool truncate_long_lines; /* 1998/Feb/2 */
1103 EXTERN bool show_cs_names; /* 1998/Mar/31 */
1104 EXTERN int tab_step;
1105 EXTERN int pseudo_tilde;
1106 EXTERN int pseudo_space;
1107 EXTERN int allow_quoted_names;
1108 EXTERN int default_rule;
1109 EXTERN char * format_file;
1110 EXTERN char * source_direct; /* 1998/Sep/29 */
1111 EXTERN char * string_file;
1112 EXTERN int share_flag;
1113 EXTERN char * format_name;
1114 EXTERN char * encoding_name;
1115 EXTERN bool format_specific;
1116 EXTERN bool encoding_specific;
1117 EXTERN bool show_line_break_stats; /* 1996/Feb/9 */
1118 EXTERN int first_pass_count; /* 1996/Feb/9 */
1119 EXTERN int second_pass_count; /* 1996/Feb/9 */
1120 EXTERN int final_pass_count; /* 1996/Feb/9 */
1121 EXTERN int underfull_hbox; /* 1996/Feb/9 */
1122 EXTERN int overfull_hbox; /* 1996/Feb/9 */
1123 EXTERN int underfull_vbox; /* 1996/Feb/9 */
1124 EXTERN int overfull_vbox; /* 1996/Feb/9 */
1125 EXTERN int paragraph_failed; /* 1996/Feb/9 */
1126 EXTERN int single_line; /* 1996/Feb/15 */
1127 EXTERN FILE * errout;
1128 EXTERN int font_dimen_zero; /* 1998/Oct/5 */
1129 EXTERN int ignore_frozen; /* 1998/Oct/5 */
1130 EXTERN bool suppress_f_ligs; /* 1999/Jan/5 */
1131 EXTERN int abort_flag; // not yet hooked up ???
1132 EXTERN int err_level; // not yet hooked up ???
1133 EXTERN int jump_used; /* 1999/Nov/28 */
1134 EXTERN jmp_buf jumpbuffer; /* 1999/Nov/7 */
1135 extern int current_pool_size; /* in local.c - bkph */
1136 extern int current_max_strings; /* in local.c - bkph */
1137 extern int current_mem_size; /* in local.c - bkph */
1138 extern int current_font_mem_size; /* in local.c - bkph */
1139 extern int current_save_size; /* in local.c - bkph */
1140 extern int current_stack_size; /* in local.c - bkph */
1141 extern int current_nest_size; /* in local.c - bkph */
1142 extern int current_param_size; /* in local.c - bkph */
1143 extern int current_buf_size; /* in local.c - bkph */
1144 extern char *tex_version; /* in local.c - bkph */
1145 extern char *application; /* in local.c - bkph */
1146 extern char *yandyversion; /* in local.c - bkph */
1147 extern unsigned char wintodos[128]; /* in local.c - bkph */
1148 extern char log_line[MAXLINE]; /* in local.c */
1149 extern char *texpath; /* in local.c */
1151 memory_word * allocate_main_memory (int); /* in local.c - bkph */
1152 memory_word * realloc_main (int, int); /* in local.c - bkph */
1153 packed_ASCII_code * realloc_str_pool (int); /* in local.c - bkph */
1154 pool_pointer * realloc_str_start (int); /* in local.c - bkph */
1155 memory_word * realloc_save_stack (int); /* in local.c - bkph */
1156 list_state_record * realloc_nest_stack (int); /* in local.c - bkph */
1157 in_state_record * realloc_input_stack (int); /* in local.c - bkph */
1158 halfword * realloc_param_stack (int); /* in local.c - bkph */
1159 ASCII_code * realloc_buffer (int); /* in local.c - bkph */
1160 fmemoryword * realloc_font_info (int); /* in local.c - bkph */
1162 int realloc_hyphen (int); /* in local.c - bkph */
1163 int allocate_tries (int); /* in local.c - bkph */
1164 void check_eqtb (char *); /* in local.c - bkph */
1165 void probe_memory (void); /* in local.c - bkph */
1166 void print_cs_names (FILE *, int); /* in local.c - bkph */
1167 void perrormod(char *); /* in local.c */
1168 char *grabenv(char *); /* in local.c - bkph */
1169 void stamp_it (char *); /* in local.c - bkph */
1170 void stampcopy (char *); /* in local.c - bkph */
1171 bool prime (int); /* in local.c - bkph */
1172 int endit (int); /* in local.c - bkph */
1174 void uexit (int unix_code); /* in lib/uexit.c - bkph */
1175 void t_open_in (void); /* in lib/texmf.c - bkph */
1178 void call_edit (ASCII_code *filename, pool_pointer fnstart,
1179 integer fnlength, integer linenumber); /* from lib/texmf.c - bkph */
1181 void add_variable_space(int); /* in itex.c - bkph */
1183 void get_date_and_time (integer *minutes, integer *day,
1184 integer *month, integer *year); /* in lib/texmf.c - bkph */
1186 char *unixify (char *); /* in pathsrch.c bkph */
1188 /****************************************************************************/
1191 #include "yandy_macros.h"
1193 /****************************************************************************/
1195 extern void synch_h(void);
1196 extern void synch_v(void);
1197 extern void set_cur_lang(void);
1198 extern str_number make_string_pool (char *s);
1199 extern char * md5_file(FILE * in_file);
1200 extern INLINE void str_room_ (int val);
1201 #define str_room(a) str_room_((int) a)
1202 extern INLINE void tail_append_ (pointer val);
1203 #define tail_append(a) tail_append_((pointer) a)
1204 extern INLINE void tex_help (unsigned int n, ...);
1205 extern INLINE void append_char(ASCII_code c);
1206 extern INLINE void append_lc_hex(ASCII_code c);
1207 extern INLINE void succumb(void);
1208 extern INLINE void dvi_out_ (ASCII_code op);
1209 #define dvi_out(op) dvi_out_((ASCII_code) (op))
1210 extern INLINE void free_avail_(halfword p);
1211 #define free_avail(p) free_avail_((halfword) (p))
1212 extern INLINE void flush_string (void);
1213 extern int load_pool_strings (integer spare_size);
1214 #define help0() tex_help(0)
1215 #define help1(...) tex_help(1, __VA_ARGS__)
1216 #define help2(...) tex_help(2, __VA_ARGS__)
1217 #define help3(...) tex_help(3, __VA_ARGS__)
1218 #define help4(...) tex_help(4, __VA_ARGS__)
1219 #define help5(...) tex_help(5, __VA_ARGS__)
1220 #define help6(...) tex_help(6, __VA_ARGS__)
1222 /********BINDING WITH LIBHARU*********/
1224 EXTERN HPDF_Doc yandy_pdf;
1225 EXTERN HPDF_Page yandy_page;
1226 EXTERN HPDF_Font yandy_font[1024];
1227 EXTERN bool pdf_doing_string;
1228 EXTERN bool pdf_doing_text;
1229 //EXTERN integer ten_pow[10];
1230 EXTERN integer scaled_out;
1231 EXTERN bool pdf_output_flag;
1232 EXTERN tree *avl_tree;
1233 EXTERN void init_tfm_map(void);
1234 EXTERN void free_tfm_map(void);
1235 EXTERN void pdf_ship_out(pointer p);
1236 EXTERN void pdf_vlist_out (void);
1237 EXTERN void pdf_hlist_out (void);
1238 EXTERN void pdf_begin_text(void);
1239 EXTERN void pdf_font_def(internal_font_number f);
1240 EXTERN void pdf_error_handler (HPDF_STATUS error_no, HPDF_STATUS detail_no, void * user_data);
1241 /********BINDING WITH LIBHARU*********/