OSDN Git Service

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