OSDN Git Service

removed libavl.
[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 * main_memory;   /* remembered so can be free() later */
329   EXTERN memory_word * mem;
330 #else
331   /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
332   EXTERN memory_word 
333   /* #define zmem (zzzaa - (int)(mem_min)) */
334   /*  zzzaa[mem_max - mem_min + 1]; */
335   #define zmem (zzzaa - (int)(mem_bot))
336   zzzaa[mem_max - mem_bot + 1];
337 #endif
338
339 EXTERN halfword lo_mem_max;
340 EXTERN halfword hi_mem_min;
341 EXTERN integer var_used, dyn_used;
342 EXTERN halfword avail; 
343 EXTERN halfword mem_end; 
344 EXTERN halfword mem_start;      /* new in 3.14159 ??? */
345 EXTERN halfword rover; 
346
347 /* NOTE: the following really also need to be dynamically allocated */
348 #ifdef DEBUG
349 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
350 #ifdef ALLOCATEMAIN
351   EXTERN char * zzzab;
352 #else
353 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
354 /* EXTERN bool  */    /* save (4 - 1) * mem_max - mem_min */
355 EXTERN char
356 /* #define freearr (zzzab - (int)(mem_min)) */
357 /*  zzzab[mem_max - mem_min + 1];  */
358 #define freearr (zzzab - (int)(mem_bot))
359   zzzab[mem_max - mem_bot + 1]; 
360 #endif
361
362 #ifdef ALLOCATEMAIN
363   EXTERN char *zzzac;
364 #else
365 /* EXTERN bool */   /* save (4 - 1) * mem_max - mem_min */
366 EXTERN char
367 /* #define wasfree (zzzac - (int)(mem_min)) */
368 #define wasfree (zzzac - (int)(mem_bot))
369 /*  zzzac[mem_max - mem_min + 1];  */
370   zzzac[mem_max - mem_bot + 1]; 
371 #endif
372
373 EXTERN halfword was_mem_end, was_lo_max, was_hi_min; 
374 EXTERN bool panicking; 
375 #endif /* DEBUG */
376
377 EXTERN integer font_in_short_display; 
378 EXTERN integer depth_threshold; 
379 EXTERN integer breadth_max; 
380 /* EXTERN list_state_record nest[nest_size + 1];  */
381 /* EXTERN short shown_mode; */
382 /* EXTERN integer shown_mode; */ /* padded out */
383 EXTERN int shown_mode; /* padded out */   /* 95/Jan/7 */
384 /* EXTERN char old_setting; */
385 /* EXTERN integer old_setting; */ /* padded out */
386 EXTERN int old_setting; /* padded out */    /* 95/Jan/7 */
387
388 /* eqtn_extra is no longer used --- it should be 0 96/Jan/10 */
389 #ifdef INCREASEFONTS
390   #define eqtb_extra (font_max - 255 + hash_extra) 
391 #else
392   #define eqtb_extra 0
393 #endif
394
395 /* Probably require eqtb_extra to be zero, so hash_extra = 255 - font_max */
396 #if (eqtb_extra != 0)
397   #error ERROR: eqtb_extra is not zero (need hash_extra equal 255 - font_max)
398 #endif
399
400 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
401 #ifdef ALLOCATEZEQTB
402 EXTERN memory_word * zeqtb;
403 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
404 #else
405 #ifdef INCREASEFONTS
406 EXTERN memory_word eqtb[(hash_size + 4007) + eqtb_extra]; 
407 #else
408 EXTERN memory_word zeqtb[(hash_size + 4007)]; 
409 #endif
410 #endif
411
412 #ifdef INCREASEFONTS
413   #define xeq_level (zzzad - (int_base + eqtb_extra))
414 #else
415   #define xeq_level (zzzad - (int_base))
416 #endif
417 /* zzzad[844]; */
418 EXTERN quarterword zzzad[844]; /* ??? attempt to fix 99/Jan/5 */
419 /* region 5 & 6 int_base to eqtb_size: 13507 - 12663 */
420
421 #ifdef ALLOCATEHASH
422 #ifdef SHORTHASH
423 EXTERN htwohalves *zzzae;
424 #else
425 EXTERN twohalves *zzzae;
426 #endif
427 #define hash (zzzae - 514)
428 #else /* not allocating hash table */
429 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
430 #ifdef SHORTHASH
431 EXTERN htwohalves 
432 #else
433 EXTERN twohalves 
434 #endif
435 #define hash (zzzae - 514)
436
437 #ifdef INCREASEFONTS
438   zzzae[hash_size + 267 + eqtb_extra]; 
439 #else
440   zzzae[hash_size + 267]; 
441 #endif
442 #endif
443
444 EXTERN halfword hash_used; 
445 EXTERN bool no_new_control_sequence; 
446 EXTERN integer cs_count; 
447
448 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
449 /* using allocated save stack slows it down 1% to 2% */
450 /* despite reallocation, we still limit it to something finite */
451 /* to avoid soaking up all of machine memory in case of infinite loop */
452 #ifdef ALLOCATESAVESTACK
453   #define save_size           65536     /* arbitrary - ridiculously large */
454   #define initial_save_size   1000
455   #define increment_save_size 2000
456   EXTERN memory_word *save_stack; 
457 #else
458   #define save_size 8000        /* 1999/Jan/6 enough for even CRC */
459 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
460   EXTERN memory_word save_stack[save_size + 1]; 
461 #endif
462
463 EXTERN integer save_ptr; 
464 EXTERN integer max_save_stack; 
465
466 /* The following could really be char instead of quarterword ... */
467 /* EXTERN quarterword cur_level;  */
468 /* EXTERN integer cur_level; */ /* padded out */
469 EXTERN int cur_level; /* padded out */    /* 95/Jan/7 */
470
471 /* EXTERN group_code cur_group;  */
472 /* EXTERN integer cur_group;  */ /* padded out */
473 EXTERN int cur_group; /* padded out */      /* 95/Jan/7 */
474
475 EXTERN integer cur_boundary; 
476 EXTERN integer mag_set; 
477
478 /* EXTERN eight_bits cur_cmd;  */
479 /* EXTERN integer cur_cmd;  */ /* padded out */
480 EXTERN int cur_cmd; /* padded out */      /* 95/Jan/7 */
481
482 /* EXTERN halfword cur_chr;  */ /* itex, tex0, tex, tex3, tex5, tex6, tex7, tex8 */
483 EXTERN int cur_chr;             /* 95/Jan/7 */
484
485 EXTERN halfword cur_cs; 
486 EXTERN halfword cur_tok; 
487
488 #ifdef ALLOCATENESTSTACK
489   #define nest_size           65536         /* arbitrary - ridiculously large */
490   #define initial_nest_size   100
491   #define increment_nest_size 200
492   EXTERN list_state_record * nest; 
493 #else
494   #define nest_size 200       /* 1999/Jan/7 */
495   EXTERN list_state_record nest[nest_size + 1]; 
496 #endif
497 EXTERN integer nest_ptr; 
498 EXTERN integer max_nest_stack; 
499 EXTERN list_state_record cur_list; 
500
501 #ifdef ALLOCATEPARAMSTACK
502   #define param_size 65536        /* arbitrary - ridiculously large */
503   #define initial_param_size 100
504   #define increment_param_size 200
505   EXTERN halfword * param_stack; 
506 #else
507   #define param_size 500        /* 1997/Jan/17 */
508 EXTERN halfword param_stack[param_size + 1]; 
509 #endif
510 EXTERN integer param_ptr; 
511 EXTERN integer max_param_stack; 
512
513 #ifdef ALLOCATEINPUTSTACK
514   #define stack_size           65536          /* arbitrary - ridiculously large */
515   #define initial_stack_size   100
516   #define increment_stack_size 200
517   EXTERN in_state_record * input_stack; 
518 #else
519   #define stack_size 800
520   EXTERN in_state_record input_stack[stack_size + 1]; 
521 #endif
522 EXTERN integer input_ptr; 
523 EXTERN integer max_in_stack; 
524
525 EXTERN integer high_in_open;      /* 1997/Jan/17 */
526 EXTERN in_state_record cur_input; 
527
528 /* EXTERN integer in_open;  */      /* used in itex, tex2, texmf */
529 EXTERN int in_open;         /* 95/Jan/7 */
530
531 EXTERN integer open_parens;
532 EXTERN integer max_open_parens; 
533 EXTERN alpha_file input_file[max_in_open + 1]; 
534 EXTERN integer line; 
535 EXTERN integer line_stack[max_in_open + 1]; 
536
537 /* EXTERN char scanner_status;  */
538 /* EXTERN integer scanner_status;  */ /* padded out */
539 EXTERN int scanner_status; /* padded out */ /* 95/Jan/7 */
540
541 EXTERN halfword warning_index; 
542 EXTERN halfword def_ref; 
543
544 EXTERN integer align_state; 
545 EXTERN integer base_ptr; 
546 EXTERN halfword par_loc; 
547 EXTERN halfword par_token; 
548 EXTERN bool force_eof; 
549 /* EXTERN halfword cur_mark[5];  */
550 EXTERN halfword cur_mark[6]; 
551
552 /* EXTERN char long_state; */
553 /* EXTERN integer long_state; */ /* padded out */
554 EXTERN int long_state; /* padded out */ /* 95/Jan/7 */
555
556 /* EXTERN halfword pstack[9];  */
557 EXTERN halfword pstack[10]; 
558
559 /* EXTERN integer cur_val; */
560 EXTERN int cur_val;           /* 95/Jan/7 */
561
562 /* EXTERN char cur_val_level;  */
563 /* EXTERN integer cur_val_level; */ /* padded out */
564 EXTERN int cur_val_level; /* padded out */ /* 95/Jan/7 */
565
566 /* EXTERN small_number radix;  */
567 /* EXTERN integer radix;  */ /* padded out */
568 EXTERN int radix; /* padded out */    /* 95/Jan/7 */
569
570 /* EXTERN glue_ord cur_order;  */
571 /* EXTERN integer cur_order;  */ /* padded out */
572 EXTERN int cur_order; /* padded out */    /* 95/Jan/7 */
573
574 EXTERN alpha_file read_file[16];  /* hard wired limit in TeX */
575 /* EXTERN char read_open[17];  */
576 EXTERN char read_open[20]; /* padded out */
577
578 EXTERN halfword cond_ptr; 
579
580 /* EXTERN char if_limit; */
581 /* EXTERN integer if_limit; */ /* padded out */
582 EXTERN int if_limit; /* padded out */   /* 95/Jan/7 */
583
584 /* EXTERN small_number cur_if; */
585 /* EXTERN integer cur_if; */ /* padded out */
586 EXTERN int cur_if; /* padded out */   /* 95/Jan/7 */
587
588 EXTERN integer if_line; 
589 EXTERN integer skip_line; 
590 EXTERN str_number cur_name; 
591 EXTERN str_number cur_area; 
592 EXTERN str_number cur_ext; 
593 EXTERN pool_pointer area_delimiter; 
594 EXTERN pool_pointer ext_delimiter; 
595 EXTERN integer format_default_length; 
596 EXTERN char * TEX_format_default; 
597 EXTERN bool name_in_progress; 
598 EXTERN bool log_opened; 
599 EXTERN bool quoted_file_name;
600 EXTERN str_number job_name; 
601 EXTERN str_number output_file_name;   // DVI file
602 EXTERN str_number texmf_log_name;   // LOG file
603 EXTERN byte_file dvi_file; 
604 EXTERN byte_file tfm_file;
605 EXTERN byte_file pdf_file;
606 EXTERN char * dvi_file_name;
607 EXTERN char * pdf_file_name;
608 EXTERN char * log_file_name;
609
610 /*******************************************************************/
611
612 /* SHORTFONTINFO halves the memory word used to store font info */
613 /* if it is not defined we use ordinary TeX memory words */
614
615 #ifdef SHORTFONTINFO
616 /* keep definition of fmemoryword in texmfmem.h */
617 /* keep definition of ffourquarters in texfmem.h */
618 /* keep definition of fquarterword in texfmem.h */
619 #else
620 /* go back to original definition as TeX memory word */
621 #undef fmemoryword
622 #define fmemoryword memory_word
623 /* go back to original definition as fourquarters of a TeX word */
624 #undef ffourquarters
625 #define ffourquarters fourquarters
626 /* go back to original definition as quaterword */
627 #undef fquarterword
628 #define fquarterword quarterword
629 #endif
630
631 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
632 #ifdef ALLOCATEFONT
633   EXTERN fmemoryword * font_info; 
634 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
635 #else
636 /* EXTERN memory_word font_info[font_mem_size + 1];  */
637   EXTERN fmemoryword font_info[font_mem_size + 1]; 
638 #endif
639
640 EXTERN font_index fmem_ptr; 
641 EXTERN internal_font_number font_ptr;
642 EXTERN internal_font_number frozen_font_ptr;
643 /* There are about 24 integer size items per font, or about 100 bytes */
644 EXTERN ffourquarters font_check[font_max + 1]; 
645
646 EXTERN scaled font_size[font_max + 1]; 
647 EXTERN scaled font_dsize[font_max + 1]; 
648 EXTERN font_index font_params[font_max + 1];
649 EXTERN str_number font_name[font_max + 1]; 
650 EXTERN str_number font_area[font_max + 1]; 
651 EXTERN eight_bits font_bc[font_max + 1];
652 EXTERN eight_bits font_ec[font_max + 1];
653 EXTERN halfword font_glue[font_max + 1]; 
654 /* use char instead of bool to save space, but is it worth slow down ? */
655 EXTERN bool font_used[font_max + 1]; 
656
657 /* might want to make some of following only one character wide also ? */
658 /* except some use -1 as special case value */
659 /* well, at least make them short instead of integer */
660 EXTERN integer hyphen_char[font_max + 1]; 
661 EXTERN integer skew_char[font_max + 1]; 
662 EXTERN font_index bchar_label[font_max + 1]; 
663 EXTERN short font_bchar[font_max + 1];
664 /* don't change above to int or format file will be incompatible */
665 EXTERN short font_false_bchar[font_max + 1];
666 /* don't change above to int or format file will be incompatible */
667 EXTERN integer char_base[font_max + 1]; 
668 EXTERN integer width_base[font_max + 1]; 
669 EXTERN integer height_base[font_max + 1]; 
670 EXTERN integer depth_base[font_max + 1]; 
671 EXTERN integer italic_base[font_max + 1]; 
672 EXTERN integer lig_kern_base[font_max + 1]; 
673 EXTERN integer kern_base[font_max + 1]; 
674 EXTERN integer exten_base[font_max + 1]; 
675 EXTERN integer param_base[font_max + 1]; 
676
677 EXTERN ffourquarters null_character; 
678
679 EXTERN integer total_pages; 
680 EXTERN scaled max_v; 
681 EXTERN scaled max_h; 
682 EXTERN integer max_push; 
683 EXTERN integer last_bop; 
684 EXTERN integer dead_cycles; 
685 EXTERN bool doing_leaders; 
686
687 /* EXTERN quarterword c, f;  */
688 /* EXTERN integer c, f */;
689 EXTERN int c, f;
690
691 EXTERN scaled rule_ht, rule_dp, rule_wd; 
692 EXTERN halfword g; 
693 EXTERN integer lq, lr; 
694
695 EXTERN eight_bits dvi_buf[dvi_buf_size + 4];
696
697 EXTERN dvi_index half_buf; 
698 EXTERN dvi_index dvi_limit; 
699 EXTERN dvi_index dvi_ptr; 
700 EXTERN integer dvi_offset;
701 EXTERN integer pdf_offset;
702 EXTERN integer dvi_gone; 
703 EXTERN halfword down_ptr, right_ptr; 
704 EXTERN scaled dvi_h, dvi_v;
705 EXTERN scaled pdf_h, pdf_v;
706 EXTERN scaled pdf_x, pdf_y;
707 EXTERN scaled pdf_delta_h, pdf_delta_v;
708 EXTERN scaled cur_h, cur_v; 
709 EXTERN internal_font_number dvi_f; 
710 EXTERN internal_font_number pdf_f;
711 EXTERN integer cur_s; /* sec 616 */
712 EXTERN scaled total_stretch[4], total_shrink[4]; /* padded already */
713 EXTERN integer last_badness; 
714 EXTERN halfword adjust_tail; 
715 EXTERN integer pack_begin_line; 
716 EXTERN twohalves empty_field; 
717 EXTERN fourquarters null_delimiter; 
718 EXTERN halfword cur_mlist; 
719
720 /* EXTERN small_number cur_style; */
721 /* EXTERN integer cur_style; */  /* padded out */ /* tex5.c, tex7.c */
722 EXTERN int cur_style;  /* padded out */     /* 95/Jan/7 */
723
724 /* EXTERN small_number cur_size; */
725 /* EXTERN integer cur_size;  */ /* padded out */
726 EXTERN int cur_size;  /* padded out */        /* 95/Jan/7 */
727
728 EXTERN scaled cur_mu; 
729 EXTERN bool mlist_penalties; 
730 EXTERN internal_font_number cur_f; 
731
732 /* EXTERN quarterword cur_c; */
733 /* EXTERN integer cur_c; */  /* padded out */
734 EXTERN int cur_c;  /* padded out */     /* 95/Jan/7 */
735
736 EXTERN ffourquarters cur_i;
737 EXTERN integer magic_offset;
738 EXTERN halfword cur_align;
739 EXTERN halfword cur_span;
740 EXTERN halfword cur_loop;
741 EXTERN halfword align_ptr;
742 EXTERN halfword cur_head, cur_tail;
743 EXTERN halfword just_box;
744 EXTERN halfword passive;
745 EXTERN halfword printed_node;
746 EXTERN halfword pass_number;
747 EXTERN scaled active_width[8];
748 EXTERN scaled cur_active_width[8];
749 EXTERN scaled background[8];
750 EXTERN scaled break_width[8];
751 EXTERN bool no_shrink_error_yet;
752 EXTERN halfword cur_p;
753 EXTERN bool second_pass;
754 EXTERN bool final_pass;
755 EXTERN integer threshold;
756 EXTERN integer minimal_demerits[4];
757 EXTERN integer minimum_demerits;
758 EXTERN halfword best_place[4];
759 EXTERN halfword best_pl_line[4];
760 EXTERN scaled disc_width;
761 EXTERN halfword easyline;
762 EXTERN halfword last_special_line;
763 EXTERN scaled first_width;
764 EXTERN scaled second_width;
765 EXTERN scaled first_indent;
766 EXTERN scaled second_indent;
767 EXTERN halfword best_bet;
768 EXTERN integer fewest_demerits;
769 EXTERN halfword best_line;
770 EXTERN integer actual_looseness;
771 EXTERN integer line_diff;
772 /* EXTERN short hc[64+2]; */  /* padded OK 66 * 2 = 132 which is divisible by 4 */
773 EXTERN int hc[66];  /* padded OK 66 * 2 = 132 which is divisible by 4 */
774
775 /* EXTERN small_number hn; */
776 /* EXTERN integer hn; */  /* padded out */
777 EXTERN int hn;  /* padded out */      /* 95/Jan/7 */
778
779 EXTERN halfword ha, hb;
780
781 /* EXTERN internal_font_number hf;  */
782 EXTERN int hf;              /* 95/Jan/7 */
783
784 /* EXTERN short hu[64+2]; */    /* padded OK */
785 EXTERN int hu[66];    /* padded OK */ 
786
787 /* EXTERN integer hyf_char;  */
788 EXTERN int hyf_char;            /* 95/Jan/7 */
789
790 /* init_cur_lang new in 3.14159 */
791 /* EXTERN ASCII_code cur_lang, init_cur_lang; */
792 /* EXTERN integer cur_lang, init_cur_lang; */ /* padded out */
793 EXTERN int cur_lang, init_cur_lang; /* padded out */    /* 95/Jan/7 */
794
795 EXTERN integer lhyf, rhyf;
796 /* EXTERN init_l_hyf, init_r_hyf; */ /* new in 3.14159 */
797 EXTERN integer init_l_hyf, init_r_hyf;  /* new in 3.14159 */
798
799 EXTERN halfword hyfbchar;
800 /* EXTERN char hyf[65];  */
801 EXTERN char hyf[68]; /* padded out */
802 EXTERN halfword init_list;
803 EXTERN bool init_lig;
804 EXTERN bool init_lft;
805
806 /* EXTERN small_number hyphen_passed; */
807 /* EXTERN integer hyphen_passed; */  /* padded out */
808 EXTERN int hyphen_passed;  /* padded out */     /* 95/Jan/7 */
809
810 /* EXTERN halfword cur_l, cur_r; */   /* make int's ? 95/Jan/7 */
811 EXTERN int cur_l, cur_r;    /* make int's ? 95/Jan/7 */
812
813 EXTERN halfword cur_q;
814 EXTERN halfword lig_stack;
815 EXTERN bool ligature_present;
816 EXTERN bool lft_hit, rt_hit;
817
818 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
819 /* could perhaps use packed_ASCII_code for trie_trc ? */
820 #ifdef ALLOCATETRIES
821   EXTERN halfword * trie_trl;
822   EXTERN halfword * trie_tro;
823   EXTERN quarterword * trie_trc;
824 #else
825   /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
826   EXTERN halfword trie_trl[trie_size + 1];
827   EXTERN halfword trie_tro[trie_size + 1];
828   EXTERN quarterword trie_trc[trie_size + 1];
829 #endif
830 EXTERN small_number hyf_distance[trie_op_size + 1]; /* already padded 751 + 1 */
831 EXTERN small_number hyf_num[trie_op_size + 1];    /* already padded 751 + 1 */
832 EXTERN trie_op_code hyf_next[trie_op_size + 1];
833 EXTERN integer op_start[256];
834
835 /* if ALLOCATEHYPHEN is true, then hyphen_prime is a variable */
836 /* otherwise it is a pre-processor defined constant */
837 #ifdef ALLOCATEHYPHEN
838   #define default_hyphen_prime 1009
839   EXTERN str_number * hyph_word;
840   EXTERN halfword * hyph_list;
841   /* EXTERN hyphen_prime; */
842   EXTERN integer hyphen_prime;
843 #else
844   #define hyphen_prime 607
845   /* EXTERN str_number hyph_word[608];  */
846   EXTERN str_number hyph_word[hyphen_prime + 1]; 
847   /* EXTERN halfword hyph_list[608];  */
848   EXTERN halfword hyph_list[hyphen_prime + 1]; 
849 #endif
850
851 /* EXTERN hyph_pointer hyph_count;  */
852 /* EXTERN integer hyph_count; */  /* padded out */
853 EXTERN int hyph_count;  /* padded out */    /* 95/Jan/7 */
854
855 #ifdef INITEX
856 EXTERN integer trie_op_hash_C[trie_op_size - neg_trie_op_size + 1];
857 #define trie_op_hash (trie_op_hash_C - (int)(neg_trie_op_size)) 
858 EXTERN trie_op_code trie_used[256]; 
859 EXTERN ASCII_code trie_op_lang[trie_op_size + 1];   /* already padded 751 + 1 */
860 EXTERN trie_op_code trie_op_val[trie_op_size + 1]; 
861 EXTERN integer trie_op_ptr; 
862 #endif /* INITEX */
863
864 EXTERN trie_op_code max_op_used; 
865 EXTERN bool smallop; 
866
867 #ifdef INITEX
868   #ifdef ALLOCATEINI
869     EXTERN packed_ASCII_code *trie_c; /* characters to match */
870     EXTERN trie_op_code *trie_o;      /* operations to perform */
871     EXTERN trie_pointer *trie_l;      /* left subtrie links */
872     EXTERN trie_pointer *trie_r;      /* right subtrie links */
873     EXTERN trie_pointer *trie_hash;   /* used to identify equivlent subtries */
874   #else /* end ALLOCATEINI */
875     EXTERN packed_ASCII_code trie_c[trie_size + 1]; 
876     EXTERN trie_op_code trie_o[trie_size + 1]; 
877     EXTERN trie_pointer trie_l[trie_size + 1]; 
878     EXTERN trie_pointer trie_r[trie_size + 1]; 
879     EXTERN trie_pointer trie_hash[trie_size + 1]; 
880   #endif /* end not ALLOCATEINI */
881   EXTERN trie_pointer trie_ptr; 
882 #endif /* INITEX */
883
884 #ifdef INITEX
885   #ifdef ALLOCATEINI
886     /* EXTERN bool *trie_taken; */ /* save (4 - 1) * trie_size = 90,000 byte */
887     EXTERN char *trie_taken; 
888   #else
889     EXTERN bool trie_taken[trie_size + 1]; 
890   #endif
891
892   EXTERN trie_pointer trie_min[256]; 
893   EXTERN trie_pointer trie_max; 
894   EXTERN bool trie_not_ready; 
895 #endif /* INITEX */
896 EXTERN scaled best_height_plus_depth; 
897 EXTERN halfword page_tail; 
898
899 /* EXTERN char page_contents; */
900 /* EXTERN integer page_contents; */ /* padded out */
901 EXTERN int page_contents; /* padded out */      /* 95/Jan/7 */
902
903 /* ********************************************************************* */
904
905 /* do *some* sanity checking here --- rather than in TeX later 96/Jan/18 */
906 /* (cannot catch everything here, since some is now dynamic) */
907
908 #if (half_error_line < 30) || (half_error_line > error_line - 15)
909   #error ERROR: (half_error_line < 30) || (half_error_line > error_line - 15) BAD 1
910 #endif
911
912 #if (max_print_line < 60)
913   #error ERROR: (max_print_line < 60) BAD 2
914 #endif
915
916 #if (hash_prime > hash_size)
917   #error ERROR: (hash_prime > hash_size) BAD 5
918 #endif
919
920 #if (max_in_open > 127)
921   #error ERROR: (max_in_open > 127) BAD 6
922 #endif
923
924 #if (min_quarterword > 0) || (max_quarterword < 127)
925   #error ERROR: (min_quarterword > 0) || (max_quarterword < 127) BAD 11
926 #endif
927
928 #if (min_halfword > 0) || (max_halfword < 32767)
929   #error ERROR:  (min_halfword > 0) || (max_halfword < 32767) BAD 12
930 #endif
931
932 #if (min_quarterword < min_halfword) || (max_quarterword > max_halfword)
933   #error ERROR: (min_quarterword < min_halfword) || (max_quarterword > max_halfword) BAD 13
934 #endif
935
936 #if (font_max > max_quarterword)
937   #error ERROR: (font_max > max_quarterword) BAD 15
938 #endif
939
940 #if (save_size > max_halfword)
941   #error ERROR: (save_size > max_halfword) BAD 17
942 #endif
943
944 #if (buf_size > max_halfword)
945   #error ERROR:  (buf_size > max_halfword) BAD 18
946 #endif
947
948 #if (max_quarterword - min_quarterword) < 255
949   #error (max_quarterword - min_quarterword) < 255 BAD 19
950 #endif
951
952 /* ********************************************************************* */
953
954 EXTERN scaled page_max_depth; 
955 EXTERN halfword best_page_break; 
956 EXTERN integer least_page_cost; 
957 EXTERN scaled best_size; 
958 EXTERN scaled page_so_far[8]; 
959 EXTERN halfword last_glue; 
960 EXTERN integer last_penalty; 
961 EXTERN scaled last_kern; 
962 EXTERN integer insert_penalties; 
963 EXTERN bool output_active; 
964 EXTERN internal_font_number main_f; 
965
966 EXTERN ffourquarters main_i; 
967 EXTERN ffourquarters main_j; 
968
969 EXTERN font_index main_k; 
970 EXTERN halfword main_p; 
971 EXTERN integer main_s; 
972 EXTERN halfword bchar; 
973 EXTERN halfword false_bchar; 
974 EXTERN bool cancel_boundary; 
975 EXTERN bool ins_disc; 
976 EXTERN halfword cur_box; 
977 EXTERN halfword after_token; 
978 EXTERN bool long_help_seen; 
979 EXTERN str_number format_ident; 
980 EXTERN word_file fmt_file; 
981 EXTERN integer ready_already; 
982
983 EXTERN alpha_file write_file[16]; /* hard wired limit in TeX */
984 EXTERN bool write_open[18]; 
985
986 EXTERN halfword write_loc; 
987 EXTERN pool_pointer edit_name_start; 
988 /* EXTERN integer edit_name_length, edit_line, tfm_temp;  */
989 EXTERN integer edit_name_length, edit_line; 
990 /* EXTERN integer tfm_temp; */    /* only used in tex3.c */
991 EXTERN int tfm_temp;        /* only used in tex3.c 95/Jan/7 */
992
993 /* new stuff defined in local.c - bkph */
994
995 EXTERN bool is_initex;
996 EXTERN bool verbose_flag;
997 EXTERN bool trace_flag;
998 EXTERN bool debug_flag;
999 EXTERN bool heap_flag;
1000 EXTERN bool open_trace_flag;
1001 EXTERN bool cache_file_flag;
1002 EXTERN bool knuth_flag;
1003 EXTERN bool no_interrupts;
1004 EXTERN bool c_style_flag;
1005 EXTERN bool non_ascii;
1006 EXTERN bool key_replace;
1007 EXTERN bool deslash;
1008 EXTERN bool trimeof;
1009 EXTERN bool allow_patterns;
1010 EXTERN bool show_fonts_used;
1011 EXTERN bool reset_exceptions;
1012 EXTERN bool show_current;
1013 EXTERN bool current_flag;
1014 EXTERN bool current_tfm;
1015 EXTERN bool return_flag;
1016 EXTERN bool want_version;
1017 EXTERN bool civilize_flag;
1018 EXTERN bool show_numeric;
1019 EXTERN bool restrict_to_ascii;
1020 EXTERN bool show_missing;
1021 EXTERN bool full_file_name_flag;
1022 EXTERN bool save_strings_flag;
1023 EXTERN int mem_initex;
1024 EXTERN int mem_extra_high;
1025 EXTERN int mem_extra_low;
1026 EXTERN int new_hyphen_prime;
1027 EXTERN int missing_characters;
1028 EXTERN int show_in_hex;
1029 EXTERN int show_in_dos;
1030 EXTERN int test_dir_access;
1031 EXTERN int dir_method;
1032 EXTERN int file_method;
1033 /* EXTERN int waitflush; */
1034 EXTERN int show_fmt_flag;
1035 EXTERN int show_tfm_flag;
1036 EXTERN bool show_texinput_flag;  /* 1998/Jan/28 */
1037 EXTERN bool truncate_long_lines; /* 1998/Feb/2 */
1038 EXTERN bool show_cs_names;       /* 1998/Mar/31 */
1039 EXTERN int tab_step;
1040 EXTERN int pseudo_tilde;
1041 EXTERN int pseudo_space;
1042 EXTERN int allow_quoted_names;
1043 EXTERN int default_rule;
1044 EXTERN char * format_file;
1045 EXTERN char * source_direct;
1046 EXTERN char * format_name;
1047 EXTERN char * encoding_name;
1048 EXTERN bool format_specific;
1049 EXTERN bool encoding_specific;
1050 EXTERN bool show_line_break_stats;  /* 1996/Feb/9 */
1051 EXTERN int first_pass_count;        /* 1996/Feb/9 */
1052 EXTERN int second_pass_count;       /* 1996/Feb/9 */
1053 EXTERN int final_pass_count;        /* 1996/Feb/9 */
1054 EXTERN int underfull_hbox;          /* 1996/Feb/9 */
1055 EXTERN int overfull_hbox;           /* 1996/Feb/9 */
1056 EXTERN int underfull_vbox;          /* 1996/Feb/9 */
1057 EXTERN int overfull_vbox;           /* 1996/Feb/9 */
1058 EXTERN int paragraph_failed;        /* 1996/Feb/9 */
1059 EXTERN int single_line;             /* 1996/Feb/15 */
1060 EXTERN FILE * errout;
1061 EXTERN int font_dimen_zero;   /* 1998/Oct/5 */
1062 EXTERN int ignore_frozen;     /* 1998/Oct/5 */
1063 EXTERN bool suppress_f_ligs;  /* 1999/Jan/5 */
1064 EXTERN int abort_flag;      // not yet hooked up ???
1065 EXTERN int err_level;     // not yet hooked up ???
1066 EXTERN int jump_used;       /* 1999/Nov/28 */
1067 EXTERN jmp_buf jumpbuffer;  /* 1999/Nov/7 */
1068 extern int current_pool_size;        /* in local.c - bkph */
1069 extern int current_max_strings;      /* in local.c - bkph */
1070 extern int current_mem_size;         /* in local.c - bkph */
1071 extern int current_font_mem_size;    /* in local.c - bkph */
1072 extern int current_save_size;        /* in local.c - bkph */
1073 extern int current_stack_size;       /* in local.c - bkph */
1074 extern int current_nest_size;        /* in local.c - bkph */
1075 extern int current_param_size;       /* in local.c - bkph */
1076 extern int current_buf_size;         /* in local.c - bkph */
1077 extern char *tex_version;            /* in local.c - bkph */
1078 extern char *application;            /* in local.c - bkph */
1079 extern char *yandyversion;           /* in local.c - bkph */
1080 extern unsigned char wintodos[128];  /* in local.c - bkph */
1081 extern char log_line[MAXLINE];       /* in local.c */
1082 extern char *texpath;           /* in local.c */
1083
1084 memory_word * allocate_main_memory (int);     /* in local.c - bkph */
1085 memory_word * realloc_main (int, int);        /* in local.c - bkph */
1086 packed_ASCII_code * realloc_str_pool (int);   /* in local.c - bkph */
1087 pool_pointer * realloc_str_start (int);       /* in local.c - bkph */
1088 memory_word * realloc_save_stack (int);       /* in local.c - bkph */
1089 list_state_record * realloc_nest_stack (int); /* in local.c - bkph */
1090 in_state_record * realloc_input_stack (int);  /* in local.c - bkph */
1091 halfword * realloc_param_stack (int);         /* in local.c - bkph */
1092 ASCII_code * realloc_buffer (int);            /* in local.c - bkph */
1093 fmemoryword * realloc_font_info (int);        /* in local.c - bkph */
1094
1095 int realloc_hyphen (int);         /* in local.c - bkph */
1096 int allocate_tries (int);         /* in local.c - bkph */
1097 void check_eqtb (char *);          /* in local.c - bkph */
1098 void probe_memory (void);          /* in local.c - bkph */
1099 void print_cs_names (FILE *, int); /* in local.c - bkph */
1100 void perrormod(char *);            /* in local.c */
1101 char *grabenv(char *);             /* in local.c - bkph */
1102 void stamp_it (char *);            /* in local.c - bkph */
1103 void stampcopy (char *);           /* in local.c - bkph */
1104 bool prime (int);                  /* in local.c - bkph */
1105 int endit (int);                   /* in local.c - bkph */
1106
1107 void uexit (int unix_code);     /* in lib/uexit.c - bkph */
1108 void t_open_in (void);          /* in lib/texmf.c - bkph */
1109
1110
1111 void call_edit (ASCII_code *filename, pool_pointer fnstart,
1112                 integer fnlength, integer linenumber); /* from lib/texmf.c - bkph */
1113
1114 void add_variable_space(int);       /* in itex.c - bkph */
1115
1116 void get_date_and_time (integer *minutes, integer *day,
1117                         integer *month, integer *year);   /* in lib/texmf.c - bkph */
1118
1119 char *unixify (char *);       /* in pathsrch.c bkph */
1120
1121 /****************************************************************************/
1122
1123 #include "coerce.h"
1124 #include "yandy_macros.h"
1125
1126 /****************************************************************************/
1127 /* sec 79 */
1128 extern void synch_h(void);
1129 extern void synch_v(void);
1130 extern void set_cur_lang(void);
1131 extern str_number make_string_pool (char *s);
1132 extern char * md5_file(FILE * in_file);
1133 extern INLINE void str_room_ (int val);
1134 #define str_room(a) str_room_((int) a)
1135 extern INLINE void tail_append_ (pointer val);
1136 #define tail_append(a) tail_append_((pointer) a)
1137 extern INLINE void tex_help (unsigned int n, ...);
1138 extern INLINE void append_char(ASCII_code c);
1139 extern INLINE void append_lc_hex(ASCII_code c);
1140 extern INLINE void succumb(void);
1141 extern INLINE void dvi_out_ (ASCII_code op);
1142 #define dvi_out(op) dvi_out_((ASCII_code) (op))
1143 extern INLINE void free_avail_(halfword p);
1144 #define free_avail(p) free_avail_((halfword) (p))
1145 extern INLINE void flush_string (void);
1146 extern int load_pool_strings (integer spare_size);
1147 #define help0()     tex_help(0)
1148 #define help1(...)  tex_help(1, __VA_ARGS__)
1149 #define help2(...)  tex_help(2, __VA_ARGS__)
1150 #define help3(...)  tex_help(3, __VA_ARGS__)
1151 #define help4(...)  tex_help(4, __VA_ARGS__)
1152 #define help5(...)  tex_help(5, __VA_ARGS__)
1153 #define help6(...)  tex_help(6, __VA_ARGS__)
1154
1155 /********BINDING WITH LIBHARU*********/
1156
1157 EXTERN HPDF_Doc  yandy_pdf;
1158 EXTERN HPDF_Page yandy_page;
1159 EXTERN HPDF_Font yandy_font[1024];
1160 EXTERN bool pdf_doing_string;
1161 EXTERN bool pdf_doing_text;
1162 //EXTERN integer ten_pow[10];
1163 EXTERN integer scaled_out;
1164 EXTERN bool pdf_output_flag;
1165 EXTERN void pdf_ship_out(pointer p);
1166 EXTERN void pdf_vlist_out (void);
1167 EXTERN void pdf_hlist_out (void);
1168 EXTERN void pdf_begin_text(void);
1169 EXTERN void pdf_font_def(internal_font_number f);
1170 EXTERN void pdf_error_handler (HPDF_STATUS error_no, HPDF_STATUS detail_no, void * user_data);
1171 /********BINDING WITH LIBHARU*********/