6 #pragma warning(disable:4115) // kill rpcasync.h complaint
8 #define MYLIBAPI __declspec(dllexport)
13 #pragma warning(disable:4131) // old style declarator
14 #pragma warning(disable:4135) // conversion between different integral types
15 #pragma warning(disable:4127) // conditional expression is constant
23 #pragma warning(disable:4244) /* 96/Jan/10 */
25 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
26 void align_peek (void)
28 lab20: align_state = 1000000L;
31 } while(!(cur_cmd != 10));
35 if(mode == -1) normal_paragraph ();
37 else if(cur_cmd == 2){
40 else if((cur_cmd == 5)&&(cur_chr == 258))
47 /* used in itex.c only */
48 halfword finite_shrink_(halfword p)
49 {register halfword Result;
52 noshrinkerroryet = false;
56 print_nl(262); /* ! */
57 print(911); /* Infinite glue shrinkage found in a paragraph */
61 help_line[4]= 912; /* The paragraph just ended includes some glue that has */
62 help_line[3]= 913; /* infinite shrinkability, e.g., `\hskip 0pt minus 1fil'. */
63 help_line[2]= 914; /* Such glue doesn't belong there---it allows a paragraph */
64 help_line[1]= 915; /* of any length to fit on one line. But it's safe to proceed, */
65 help_line[0]= 916; /* since the offensive shrinkability has been made finite. */
75 void try_break_ (integer pi,small_number breaktype)
86 internal_font_number f;
88 bool noderstaysactive;
91 halfword b; /* current badness */
93 bool artificialdemerits;
103 cur_active_width[1]= active_width[1];
104 cur_active_width[2]= active_width[2];
105 cur_active_width[3]= active_width[3];
106 cur_active_width[4]= active_width[4];
107 cur_active_width[5]= active_width[5];
108 cur_active_width[6]= active_width[6];
110 lab22: r = mem[prevr].hh.v.RH;
111 if(mem[r].hh.b0 == 2)
113 cur_active_width[1]= cur_active_width[1]+ mem[r + 1].cint;
114 cur_active_width[2]= cur_active_width[2]+ mem[r + 2].cint;
115 cur_active_width[3]= cur_active_width[3]+ mem[r + 3].cint;
116 cur_active_width[4]= cur_active_width[4]+ mem[r + 4].cint;
117 cur_active_width[5]= cur_active_width[5]+ mem[r + 5].cint;
118 cur_active_width[6]= cur_active_width[6]+ mem[r + 6].cint;
124 l = mem[r + 1].hh.v.LH;
127 if((minimum_demerits < 1073741823L)&& /* 2^30 - 1 */
128 ((oldl != easyline)||(r == mem_top - 7)))
133 break_width[1]= background[1];
134 break_width[2]= background[2];
135 break_width[3]= background[3];
136 break_width[4]= background[4];
137 break_width[5]= background[5];
138 break_width[6]= background[6];
140 /* if break_type>unhyphenated then if cur_p<>null then l.16451 */
144 t = mem[cur_p].hh.b1;
146 s = mem[cur_p + 1].hh.v.RH;
151 if((v >= hi_mem_min))
154 break_width[1]= break_width[1]- font_info[width_base[
155 f]+ font_info[char_base[f]+ mem[v].hh.b1].qqqq
158 else switch(mem[v].hh.b0)
161 f = mem[v + 1].hh.b0;
162 break_width[1]= break_width[1]- font_info[width_base
163 [f]+ font_info[char_base[f]+ mem[v + 1].hh.b1]
171 break_width[1]= break_width[1]- mem[v + 1].cint;
175 confusion(917); /* disc1 */
176 return; // abort_flag set
181 while(s != 0){ /* while s<>null do l.16453 */
183 if((s >= hi_mem_min))
186 break_width[1]= break_width[1]+ font_info[width_base[
187 f]+ font_info[char_base[f]+ mem[s].hh.b1].qqqq
190 else switch(mem[s].hh.b0)
193 f = mem[s + 1].hh.b0;
194 break_width[1]= break_width[1]+ font_info[width_base
195 [f]+ font_info[char_base[f]+ mem[s + 1].hh.b1]
202 /* didn't used to drop through to case 11 from case 2 in 3.141 */
204 /* used to be some extra code here in case 11 in 3.141 */
205 break_width[1]= break_width[1]+ mem[s + 1].cint;
209 confusion(918); /* disc1 */
210 return; // abort_flag set
214 /* used to be an increment t here in 3.141 */
217 break_width[1]= break_width[1]+ disc_width;
218 /* used to be a test on t here instead in 3.141 */
219 if(mem[cur_p + 1].hh.v.RH == 0)
224 if((s >= hi_mem_min))
229 v = mem[s + 1].hh.v.LH;
230 break_width[1]= break_width[1]- mem[v + 1].cint;
231 break_width[2 + mem[v].hh.b0]= break_width[2 + mem[
232 v].hh.b0]- mem[v + 2].cint;
233 break_width[6]= break_width[6]- mem[v + 3].cint;
240 /* case 9 used to drop through to case 11 in 3.141 */
241 break_width[1]= break_width[1]- mem[s + 1].cint;
244 /* changes here in nature of test since 3.141 */
245 if(mem[s].hh.b1 != 1)
247 else break_width[1]= break_width[1]- mem[s + 1].cint
258 if(mem[prevr].hh.b0 == 2)
260 mem[prevr + 1].cint = mem[prevr + 1].cint - cur_active_width
262 mem[prevr + 2].cint = mem[prevr + 2].cint - cur_active_width
264 mem[prevr + 3].cint = mem[prevr + 3].cint - cur_active_width
266 mem[prevr + 4].cint = mem[prevr + 4].cint - cur_active_width
268 mem[prevr + 5].cint = mem[prevr + 5].cint - cur_active_width
270 mem[prevr + 6].cint = mem[prevr + 6].cint - cur_active_width
273 else if(prevr == mem_top - 7)
275 active_width[1]= break_width[1];
276 active_width[2]= break_width[2];
277 active_width[3]= break_width[3];
278 active_width[4]= break_width[4];
279 active_width[5]= break_width[5];
280 active_width[6]= break_width[6];
288 mem[q + 1].cint = break_width[1]- cur_active_width[1];
289 mem[q + 2].cint = break_width[2]- cur_active_width[2];
290 mem[q + 3].cint = break_width[3]- cur_active_width[3];
291 mem[q + 4].cint = break_width[4]- cur_active_width[4];
292 mem[q + 5].cint = break_width[5]- cur_active_width[5];
293 mem[q + 6].cint = break_width[6]- cur_active_width[6];
294 mem[prevr].hh.v.RH = q;
298 if(abs(eqtb[(hash_size + 3179)].cint)>= 1073741823L - minimum_demerits)
299 minimum_demerits = 1073741822L; /* 2^30 - 2 */
300 else minimum_demerits = minimum_demerits + abs(eqtb[(hash_size + 3179)].cint
303 register integer for_end;
306 if(fitclass <= for_end) do
308 if(minimal_demerits[fitclass]<= minimum_demerits)
311 mem[q].hh.v.RH = passive;
313 mem[q + 1].hh.v.RH = cur_p;
317 mem[q].hh.v.LH = pass_number;
319 mem[q + 1].hh.v.LH = best_place[fitclass];
321 mem[q + 1].hh.v.RH = passive;
322 mem[q + 1].hh.v.LH = best_pl_line[fitclass]+ 1;
323 mem[q].hh.b1 = fitclass;
324 mem[q].hh.b0 = breaktype;
325 mem[q + 2].cint = minimal_demerits[fitclass];
327 mem[prevr].hh.v.RH = q;
331 if(eqtb[(hash_size + 3195)].cint > 0)
333 print_nl(919); /* @@ */
334 print_int(mem[passive].hh.v.LH);
335 print(920); /* : line */
336 print_int(mem[q + 1].hh.v.LH - 1);
337 print_char(46); /* . */
340 print_char(45); /* - */
342 print_int(mem[q + 2].cint);
343 print(922); /* -> @@ */
344 if(mem[passive + 1].hh.v.LH == 0)
345 print_char(48); /* 0 */
346 else print_int(mem[mem[passive + 1].hh.v.LH].hh
351 minimal_demerits[fitclass]= 1073741823L; /* 2^30 - 1 */
353 while(fitclass++ < for_end); }
354 minimum_demerits = 1073741823L; /* 2^30 - 1 */
361 mem[q + 1].cint = cur_active_width[1]- break_width[1];
362 mem[q + 2].cint = cur_active_width[2]- break_width[2];
363 mem[q + 3].cint = cur_active_width[3]- break_width[3];
364 mem[q + 4].cint = cur_active_width[4]- break_width[4];
365 mem[q + 5].cint = cur_active_width[5]- break_width[5];
366 mem[q + 6].cint = cur_active_width[6]- break_width[6];
367 mem[prevr].hh.v.RH = q;
376 linewidth = second_width;
377 oldl = 262142L; /* 2^18 - 2 ? */
382 if(l > last_special_line)
383 linewidth = second_width;
384 else if(eqtb[(hash_size + 1312)].hh.v.RH == 0)
385 linewidth = first_width;
386 else linewidth = mem[eqtb[(hash_size + 1312)].hh.v.RH + 2 * l].cint;
391 artificialdemerits = false;
392 shortfall = linewidth - cur_active_width[1]; /* linewidth may be ... */
394 if((cur_active_width[3]!= 0)||(cur_active_width[4]!= 0)||(
395 cur_active_width[5]!= 0))
402 if(shortfall > 7230584L)
403 if(cur_active_width[2]< 1663497L)
409 b = badness(shortfall, cur_active_width[2]);
419 if(- (integer) shortfall > cur_active_width[6])
421 else b = badness(- (integer) shortfall, cur_active_width[6]);
426 if((b > 10000)||(pi == -10000))
428 if(final_pass &&(minimum_demerits == 1073741823L)&& /* 2^30 - 1 */
429 (mem[r].hh.v.RH == mem_top - 7)&&(prevr == mem_top - 7))
430 artificialdemerits = true;
431 else if(b > threshold)
433 noderstaysactive = false;
440 noderstaysactive = true;
442 if(artificialdemerits)
446 d = eqtb[(hash_size + 3165)].cint + b;
455 if((breaktype == 1)&&(mem[r].hh.b0 == 1))
457 d = d + eqtb[(hash_size + 3177)].cint;
458 else d = d + eqtb[(hash_size + 3178)].cint;
459 if(abs(toint(fitclass)- toint(mem[r].hh.b1)) > 1)
460 d = d + eqtb[(hash_size + 3179)].cint;
464 if(eqtb[(hash_size + 3195)].cint > 0)
466 if(printed_node != cur_p)
470 short_display(mem[printed_node].hh.v.RH);
473 savelink = mem[cur_p].hh.v.RH;
474 mem[cur_p].hh.v.RH = 0;
476 short_display(mem[printed_node].hh.v.RH);
477 mem[cur_p].hh.v.RH = savelink;
479 printed_node = cur_p;
481 print_nl(64); /* @ */
483 print_esc(594); /* par */
484 else if(mem[cur_p].hh.b0 != 10)
486 if(mem[cur_p].hh.b0 == 12)
487 print_esc(528); /* penalty */
488 else if(mem[cur_p].hh.b0 == 7)
489 print_esc(346); /* discretionary */
490 else if(mem[cur_p].hh.b0 == 11)
491 print_esc(337); /* kern */
492 else print_esc(340); /* math */
494 print(923); /* via @@ */
495 if(mem[r + 1].hh.v.RH == 0)
496 print_char(48); /* 0 */
497 else print_int(mem[mem[r + 1].hh.v.RH].hh.v.LH);
500 print_char(42); /* * */
505 if(artificialdemerits)
506 print_char(42); /* * */
510 d = d + mem[r + 2].cint;
511 if(d <= minimal_demerits[fitclass])
513 minimal_demerits[fitclass]= d;
514 best_place[fitclass]= mem[r + 1].hh.v.RH;
515 best_pl_line[fitclass]= l;
516 if(d < minimum_demerits)
517 minimum_demerits = d;
521 lab60: mem[prevr].hh.v.RH = mem[r].hh.v.RH;
523 if(prevr == mem_top - 7)
525 r = mem[mem_top - 7].hh.v.RH;
526 if(mem[r].hh.b0 == 2)
528 active_width[1]= active_width[1]+ mem[r + 1].cint;
529 active_width[2]= active_width[2]+ mem[r + 2].cint;
530 active_width[3]= active_width[3]+ mem[r + 3].cint;
531 active_width[4]= active_width[4]+ mem[r + 4].cint;
532 active_width[5]= active_width[5]+ mem[r + 5].cint;
533 active_width[6]= active_width[6]+ mem[r + 6].cint;
534 cur_active_width[1]= active_width[1];
535 cur_active_width[2]= active_width[2];
536 cur_active_width[3]= active_width[3];
537 cur_active_width[4]= active_width[4];
538 cur_active_width[5]= active_width[5];
539 cur_active_width[6]= active_width[6];
540 mem[mem_top - 7].hh.v.RH = mem[r].hh.v.RH;
544 else if(mem[prevr].hh.b0 == 2)
546 r = mem[prevr].hh.v.RH;
549 cur_active_width[1]= cur_active_width[1]- mem[prevr + 1]
551 cur_active_width[2]= cur_active_width[2]- mem[prevr + 2]
553 cur_active_width[3]= cur_active_width[3]- mem[prevr + 3]
555 cur_active_width[4]= cur_active_width[4]- mem[prevr + 4]
557 cur_active_width[5]= cur_active_width[5]- mem[prevr + 5]
559 cur_active_width[6]= cur_active_width[6]- mem[prevr + 6]
561 mem[prevprevr].hh.v.RH = mem_top - 7; /* prevprevr may be used ... */
565 else if(mem[r].hh.b0 == 2)
567 cur_active_width[1]= cur_active_width[1]+ mem[r + 1].cint;
568 cur_active_width[2]= cur_active_width[2]+ mem[r + 2].cint;
569 cur_active_width[3]= cur_active_width[3]+ mem[r + 3].cint;
570 cur_active_width[4]= cur_active_width[4]+ mem[r + 4].cint;
571 cur_active_width[5]= cur_active_width[5]+ mem[r + 5].cint;
572 cur_active_width[6]= cur_active_width[6]+ mem[r + 6].cint;
573 mem[prevr + 1].cint = mem[prevr + 1].cint + mem[r + 1]
575 mem[prevr + 2].cint = mem[prevr + 2].cint + mem[r + 2]
577 mem[prevr + 3].cint = mem[prevr + 3].cint + mem[r + 3]
579 mem[prevr + 4].cint = mem[prevr + 4].cint + mem[r + 4]
581 mem[prevr + 5].cint = mem[prevr + 5].cint + mem[r + 5]
583 mem[prevr + 6].cint = mem[prevr + 6].cint + mem[r + 6]
585 mem[prevr].hh.v.RH = mem[r].hh.v.RH;
594 if(cur_p == printed_node)
596 if(mem[cur_p].hh.b0 == 7){
597 t = mem[cur_p].hh.b1;
600 printed_node = mem[printed_node].hh.v.RH;
604 /* must exit here, there are no internal return - except for confusion */
605 /* savedbadness = b; */ /* 96/Feb/9 - for test in itex.c */
607 /* end of the old tex5.c here */
608 void post_line_break_(integer finalwidowpenalty)
618 q = mem[best_bet + 1].hh.v.RH;
622 q = mem[q + 1].hh.v.LH;
623 mem[r + 1].hh.v.LH = cur_p;
626 curline = prev_graf + 1;
628 q = mem[cur_p + 1].hh.v.RH;
630 postdiscbreak = false;
632 if(mem[q].hh.b0 == 10)
634 delete_glue_ref(mem[q + 1].hh.v.LH);
635 mem[q + 1].hh.v.LH = eqtb[(hash_size + 790)].hh.v.RH;
637 incr(mem[eqtb[(hash_size + 790)].hh.v.RH].hh.v.RH);
642 if(mem[q].hh.b0 == 7)
658 flush_node_list(mem[q].hh.v.RH);
661 if(mem[q + 1].hh.v.RH != 0)
663 s = mem[q + 1].hh.v.RH;
664 while(mem[s].hh.v.RH != 0)s = mem[s].hh.v.RH;
666 r = mem[q + 1].hh.v.RH;
667 mem[q + 1].hh.v.RH = 0;
668 postdiscbreak = true;
670 if(mem[q + 1].hh.v.LH != 0)
672 s = mem[q + 1].hh.v.LH;
674 while(mem[s].hh.v.RH != 0)s = mem[s].hh.v.RH;
675 mem[q + 1].hh.v.LH = 0;
681 else if((mem[q].hh.b0 == 9)||(mem[q].hh.b0 == 11))
687 while(mem[q].hh.v.RH != 0)q = mem[q].hh.v.RH;
689 r = new_param_glue(8);
690 mem[r].hh.v.RH = mem[q].hh.v.RH;
696 q = mem[mem_top - 3].hh.v.RH;
697 mem[mem_top - 3].hh.v.RH = r;
698 if(eqtb[(hash_size + 789)].hh.v.RH != 0)
700 r = new_param_glue(7);
704 if(curline > last_special_line)
706 curwidth = second_width;
707 curindent = second_indent;
709 else if(eqtb[(hash_size + 1312)].hh.v.RH == 0)
711 curwidth = first_width;
712 curindent = first_indent;
716 curwidth = mem[eqtb[(hash_size + 1312)].hh.v.RH + 2 * curline].cint;
717 curindent = mem[eqtb[(hash_size + 1312)].hh.v.RH + 2 * curline - 1].cint;
719 adjust_tail = mem_top - 5;
720 just_box = hpack(q, curwidth, 0);
721 mem[just_box + 4].cint = curindent;
722 append_to_vlist(just_box);
723 /* if adjust_head<>adjust_tail then l.17346 */
724 if(mem_top - 5 != adjust_tail)
726 mem[tail].hh.v.RH = mem[mem_top - 5].hh.v.RH;
729 adjust_tail = 0; /* adjust_tail:=null */
730 if(curline + 1 != best_line)
732 pen = eqtb[(hash_size + 3176)].cint;
733 if(curline == prev_graf + 1)
734 pen = pen + eqtb[(hash_size + 3168)].cint;
735 if(curline + 2 == best_line)
736 pen = pen + finalwidowpenalty;
738 pen = pen + eqtb[(hash_size + 3171)].cint;
741 r = new_penalty(pen);
742 mem[tail].hh.v.RH = r;
747 cur_p = mem[cur_p + 1].hh.v.LH;
754 if(q == mem[cur_p + 1].hh.v.RH)
756 if((q >= hi_mem_min))
758 if((mem[q].hh.b0 < 9))
760 /* change in tests here from 3.141 != 1 instead of == 2 */
761 if(mem[q].hh.b0 == 11)
762 if(mem[q].hh.b1 != 1)
766 lab31: if(r != mem_top - 3)
769 flush_node_list(mem[mem_top - 3].hh.v.RH);
770 mem[mem_top - 3].hh.v.RH = q;
773 } while(!(cur_p == 0));
774 if((curline != best_line)||(mem[mem_top - 3].hh.v.RH != 0)) {
775 confusion(933); /* disc2 */
776 return; // abort_flag set
778 prev_graf = best_line - 1;
780 /* Reconstitute ligatures during hyphenation pass */
781 small_number reconstitute_(small_number j, small_number n, halfword bchar, halfword hchar)
782 {/* 22 30 */ register small_number Result;
790 hyphen_passed = 0; /* paragraph 907 ? */
793 mem[mem_top - 4].hh.v.RH = 0;
798 ligature_present = init_lig;
802 /* while p>null do l.17772 */
803 /* while(p > 0){ */ /* NO! */
804 while(p != 0){ /* 94/Mar/22 BUG FIX */
806 /* append_charnode_to_t(character(p)); */
807 mem[t].hh.v.RH = get_avail ();
810 mem[t].hh.b1 = mem[p].hh.b1;
812 p = mem[p].hh.v.RH; /* p:=link(p); */
817 mem[t].hh.v.RH = get_avail ();
820 mem[t].hh.b1 = cur_l;
822 lig_stack = 0; /* lig_stack:=null; */
831 lab22: if(cur_l == 256) /* if cur_l = non_char then */
833 k = bchar_label[hf]; /* begin k:=bchar_label[hf]; */
834 /* if k=non_address then goto done@+else q:=font_info[k].qqqq; l.17812 */
835 /* if(k == font_mem_size) */
836 if(k == non_address) /* i.e. 0 --- 96/Jan/15 */
838 else q = font_info[k].qqqq;
841 q = font_info[char_base[hf]+ cur_l].qqqq;
844 k = lig_kern_base[hf]+ q.b3;
845 q = font_info[k].qqqq;
848 k = lig_kern_base[hf]+ 256 * q.b2 + q.b3 + 32768L - 256 *(128);
849 q = font_info[k].qqqq;
852 if(currh < 256) /* if cur_rh < non_char then test_char:=cur_rh */
854 else testchar = cur_r; /* else test_char:=cur_r; l.17817 */
855 /* loop@+begin if next_char(q)=test_char then if skip_byte(q)<=stop_flag then */
859 if(currh < 256) /* if cur_rh<non_char then */
864 goto lab22; /* goto continue; */
866 else { /* else begin if hchar<non_char then if odd(hyf[j]) then */
873 if(q.b2 < 128) /* if op_byte(q)<kern_flag then */
875 // @<Carry out a ligature replacement, updating the cursor structure
876 // and possibly advancing~|j|; |goto continue| if the cursor doesn't
877 // advance, otherwise |goto done|@>; => l.17869
878 if(cur_l == 256) /* begin if cur_l=non_char then lft_hit:=true; */
881 if(lig_stack == 0)/* if lig_stack=null ? */
885 pause_for_instructions ();
888 switch(q.b2) /* case op_byte(q) of */
893 ligature_present = true;
900 /* if lig_stack>null then character(lig_stack):=cur_r */
901 /* if(lig_stack > 0) */ /* 94/Mar/22 */
902 if(lig_stack != 0) /* line breaking?? */
903 mem[lig_stack].hh.b1 = cur_r; /* l.17877 ? */
905 lig_stack = new_lig_item(cur_r);
910 mem[lig_stack + 1].hh.v.RH = p;
911 mem[p].hh.b1 = hu[j + 1];
921 lig_stack = new_lig_item(cur_r);
922 mem[lig_stack].hh.v.RH = p;
930 p = new_ligature(hf, cur_l, mem[cur_q].hh.v.RH);
940 } */ /* removed 99/Jan/6 */
941 mem[cur_q].hh.v.RH = p;
943 ligature_present = false;
947 ligature_present = true;
952 /* othercases begin cur_l:=rem_byte(q);
953 ligature_present:=true; {\.{=:}} l.17869 */
955 ligature_present = true;
956 /* if lig_stack>null then pop_lig_stack l.17870 => l.17828 */
957 /* if(lig_stack > 0)*/ /* 94/Mar/22 ??? */
958 if(lig_stack != 0) /* BUG FIX */
960 /* if(mem[lig_stack + 1].hh.v.RH > 0) */ /* 94/Mar/22 */
961 if(mem[lig_stack + 1].hh.v.RH != 0) /* l.17828 ? */
963 mem[t].hh.v.RH = mem[lig_stack + 1].hh.v.RH;
968 lig_stack = mem[p].hh.v.RH;
970 if(lig_stack == 0) /* if lig_stack=null ? */
979 else cur_r = mem[lig_stack].hh.b1;
986 mem[t].hh.v.RH = get_avail ();
989 mem[t].hh.b1 = cur_r;
1009 w = font_info[kern_base[hf]+ 256 * q.b2 + q.b3].cint;
1021 q = font_info[k].qqqq;
1024 if(ligature_present)
1026 p = new_ligature(hf, cur_l, mem[cur_q].hh.v.RH);
1033 if(lig_stack == 0) /* if lig_stack=null ? */
1038 mem[cur_q].hh.v.RH = p;
1040 ligature_present = false;
1044 mem[t].hh.v.RH = new_kern(w);
1048 /* if(lig_stack > 0)*/ /* 94/Mar/22 ??? l.17870 */
1049 if(lig_stack != 0) /* l.17841 */
1051 /* begin cur_q:=t; cur_l:=character(lig_stack);
1052 ligature_present:=true; l.17842 */
1054 cur_l = mem[lig_stack].hh.b1;
1055 ligature_present = true;
1057 /* pop_lig_stack; goto continue; l.17843 => l.17828 */
1058 /* if(mem[lig_stack + 1].hh.v.RH > 0) *//* 94/Mar/22 */
1059 if(mem[lig_stack + 1].hh.v.RH != 0) /* BUG FIX */
1061 mem[t].hh.v.RH = mem[lig_stack + 1].hh.v.RH;
1066 lig_stack = mem[p].hh.v.RH;
1077 else cur_r = mem[lig_stack].hh.b1;
1084 /* #pragma optimize ("g", off) */ /* not needed for MSVC it seems ... */
1085 void hyphenate (void)
1086 {/* 50 30 40 41 42 45 10 */
1089 int l; /* 95/Jan/7 */
1092 halfword majortail, minortail;
1094 int c; /* 95/Jan/7 */
1096 /* integer rcount; */
1097 int rcount; /* 95/Jan/7 */
1105 register integer for_end;
1110 while(j++ < for_end);
1116 register integer for_end;
1120 /* h =(h + h + hc[j])% 607; */
1121 h =(h + h + hc[j])% hyphen_prime;
1122 while(j++ < for_end);
1128 if((str_start[k + 1]- str_start[k])< hn)
1130 if((str_start[k + 1]- str_start[k])== hn)
1135 if(str_pool[u]< hc[j])
1137 if(str_pool[u]> hc[j])
1143 while(s != 0){ /* while s<>null do l.18173 */
1145 hyf[mem[s].hh.v.LH]= 1;
1155 else h = hyphen_prime;
1158 if(trietrc[cur_lang + 1]!= cur_lang)
1164 register integer for_end;
1166 for_end = hn - rhyf + 1;
1169 z = trietrl[cur_lang + 1]+ hc[j];
1171 while(hc[l]== trietrc[z]){
1172 if(trietro[z]!= min_trie_op)
1176 v = v + op_start[cur_lang];
1177 i = l - hyf_distance[v];
1178 if(hyf_num[v]> hyf[i])
1181 } while(!(v == min_trie_op));
1184 z = trietrl[z]+ hc[l];
1187 while(j++ < for_end); }
1189 register integer for_end;
1194 while(j++ < for_end);
1197 register integer for_end;
1202 while(j++ < for_end);
1204 /* was j = 0; for_end = rhyf - 1; in 3.141 */
1206 register integer for_end;
1208 for_end = hn - rhyf;
1210 /* lost if (j <= for_end) do since 3.141 */
1213 while(j++ < for_end);
1217 q = mem[hb].hh.v.RH;
1218 mem[hb].hh.v.RH = 0;
1219 r = mem[ha].hh.v.RH;
1220 mem[ha].hh.v.RH = 0;
1222 if((ha >= hi_mem_min))
1223 if(mem[ha].hh.b0 != hf)
1229 hu[0]= mem[ha].hh.b1;
1231 else if(mem[ha].hh.b0 == 6)
1232 if(mem[ha + 1].hh.b0 != hf)
1236 init_list = mem[ha + 1].hh.v.RH;
1238 init_lft =(mem[ha].hh.b1 > 1);
1239 hu[0]= mem[ha + 1].hh.b1;
1250 if(!(r >= hi_mem_min))
1251 if(mem[r].hh.b0 == 6)
1252 if(mem[r].hh.b1 > 1)
1260 while(mem[s].hh.v.RH != ha)s = mem[s].hh.v.RH;
1268 lab50: flush_node_list(r);
1271 j = reconstitute(j, hn, bchar, hyf_char)+ 1;
1272 if(hyphen_passed == 0)
1274 mem[s].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1275 /* while(mem[s].hh.v.RH > 0)*/ /* 94/Mar/22 */
1276 while(mem[s].hh.v.RH != 0) /* l.17903 */
1281 hyphen_passed = j - 1;
1282 mem[mem_top - 4].hh.v.RH = 0; /* link(hold_head):=null; */
1285 if(hyphen_passed > 0)
1288 mem[r].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1292 /* while link(major_tail)>null do advance_major_tail; l.17929 */
1293 /* while(mem[majortail].hh.v.RH > 0){ */ /* 94/Mar/22 */
1294 while(mem[majortail].hh.v.RH != 0){ /* ??? */
1296 majortail = mem[majortail].hh.v.RH;
1301 /* minor_tail:=null; pre_break(r):=null; l.17943 */
1303 mem[r + 1].hh.v.LH = 0;
1304 /* hyf_node:=new_character(hf,hyf_char); */
1305 hyfnode = new_character(hf, hyf_char);
1306 if(hyfnode != 0) /* if hyf_node<>null then */
1312 mem[hyfnode].hh.v.RH = avail;
1321 /* begin l:=reconstitute(l,i,font_bchar[hf],non_char)+1; l.17948 */
1322 l = reconstitute(l, i, font_bchar[hf], 256)+ 1;
1323 /* if link(hold_head)>null then l.17949 */
1324 /* if(mem[mem_top - 4].hh.v.RH > 0)*/ /* 94/Mar/22 */
1325 if(mem[mem_top - 4].hh.v.RH != 0) /* BUG FIX ??? */
1327 if(minortail == 0)/* if minor_tail=null then */
1328 mem[r + 1].hh.v.LH = mem[mem_top - 4].hh.v.RH;
1329 else mem[minortail].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1330 minortail = mem[mem_top - 4].hh.v.RH;
1331 /* while link(minor_tail)>null do minor_tail:=link(minor_tail); l.17953 */
1332 /* while(mem[minortail].hh.v.RH > 0)*/ /* 94/Mar/22 */
1333 while(mem[minortail].hh.v.RH != 0) /* BUG FIX */
1334 minortail = mem[minortail].hh.v.RH;
1337 if(hyfnode != 0) /* if hyf_node<>null then l.17956 */
1343 /* minor_tail:=null; post_break(r):=null; c_loc:=0; l.17964 */
1345 mem[r + 1].hh.v.RH = 0;
1347 /* if bchar_label[hf]<non_address then l.17991 3.1415 */
1348 /* if(bchar_label[hf]< font_mem_size) */
1349 /* if bchar_label[hf]<>non_address then l.17991 3.14159 */
1350 if(bchar_label[hf]!= non_address) /* i.e. 0 --- 96/Jan/15 */
1360 l = reconstitute(l, hn, bchar, 256)+ 1;
1363 hu[cloc]= c; /* c may be used ... */
1366 /* if link(hold_head)>null then l. l.17973 */
1367 /* if(mem[mem_top - 4].hh.v.RH > 0) */ /* 94/Mar/22 ??? */
1368 if(mem[mem_top - 4].hh.v.RH != 0) /* BUG FIX */
1370 if(minortail == 0)/* begin if minor_tail=null then */
1371 mem[r + 1].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1372 else mem[minortail].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1373 minortail = mem[mem_top - 4].hh.v.RH;
1374 /* while link(minor_tail)>null do minor_tail:=link(minor_tail); l.17977 */
1375 /* while(mem[minortail].hh.v.RH > 0)*/ /* 94/Mar/22 */
1376 while(mem[minortail].hh.v.RH != 0) /* ??? */
1377 minortail = mem[minortail].hh.v.RH;
1382 j = reconstitute(j, hn, bchar, 256)+ 1;
1383 mem[majortail].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1384 /* while link(major_tail)>null do advance_major_tail; l.17987 */
1385 /* while(mem[majortail].hh.v.RH > 0){ */ /* 94/Mar/22 */
1386 while(mem[majortail].hh.v.RH != 0){ /* ??? */
1387 majortail = mem[majortail].hh.v.RH;
1394 mem[s].hh.v.RH = mem[r].hh.v.RH;
1395 mem[r].hh.v.RH = 0; /* link(r):=null */
1401 mem[r].hh.b1 = rcount;
1404 hyphen_passed = j - 1;
1405 mem[mem_top - 4].hh.v.RH = 0; /* link(hold_head):=null; */
1406 } while(!(! odd(hyf[j - 1])));
1409 flush_list(init_list);
1411 /* #pragma optimize ("g", off) */ /* not needed for MSVC it seems ... */
1412 /* used only in itex.c */
1413 void new_hyph_exceptions (void)
1415 /* small_number n; */ /* in 3.141 */
1417 /* small_number j; */ /* in 3.141 */
1426 if(eqtb[(hash_size + 3213)].cint <= 0)
1428 else if(eqtb[(hash_size + 3213)].cint > 255)
1430 else cur_lang = eqtb[(hash_size + 3213)].cint;
1437 lab21: switch(cur_cmd){
1453 if(eqtb[(hash_size + 2139) + cur_chr].hh.v.RH == 0)
1456 if(interaction == 3)
1458 print_nl(262); /* ! */
1459 print(939); /* Not a letter */
1463 help_line[1]= 940; /* Letters in \hyphenation words must have \lccode>0. */
1464 help_line[0]= 941; /* Proceed; I'll ignore the character I just read. */
1471 hc[n]= eqtb[(hash_size + 2139) + cur_chr].hh.v.RH;
1491 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
1492 #ifdef ALLOCATESTRING
1493 if(pool_ptr + n > current_pool_size)
1494 /* str_pool = realloc_str_pool (increment_pool_size); */
1495 str_pool = realloc_str_pool (increment_pool_size + n);
1496 if(pool_ptr + n > current_pool_size){ /* in case it failed 94/Jan/24 */
1497 overflow(257, current_pool_size - init_pool_ptr); /* 97/Mar/7 */
1498 return; // abort_flag set
1501 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
1502 if(pool_ptr + n > pool_size){
1503 overflow(257, pool_size - init_pool_ptr); /* pool size */
1504 return; // abort_flag set
1510 register integer for_end;
1515 /* h =(h + h + hc[j])% 607; */
1516 h =(h + h + hc[j])% hyphen_prime;
1518 str_pool[pool_ptr]= hc[j];
1522 while(j++ < for_end);
1525 /* if(hyph_count == 607)*/
1526 if(hyph_count == hyphen_prime){
1527 /* overflow(942, 607); */
1528 overflow(942, hyphen_prime); /* exception dictionary - NOT DYNAMIC */
1529 /* not dynamic ---- but can be set -e=... from command line in ini-TeX */
1530 return; // abort_flag set
1533 while(hyph_word[h]!= 0){
1536 if((str_start[k + 1]- str_start[k])<(str_start[s + 1
1539 if((str_start[k + 1]- str_start[k])>(str_start[s + 1
1545 if(str_pool[u]< str_pool[v])
1547 if(str_pool[u]> str_pool[v])
1551 } while(!(u == str_start[k + 1]));
1552 lab40: q = hyph_list[h];
1562 else h = hyphen_prime;
1576 if(interaction == 3)
1578 print_nl(262); /* ! */
1579 print(677); /* Improper */
1581 print_esc(935); /* hyphenation */
1582 print(936); /* will be flushed */
1585 help_line[1]= 937; /* Hyphenation exceptions must contain only letters */
1586 help_line[0]= 938; /* and hyphens. But continue; I'll forgive and forget. */
1591 } /* end of switch */
1594 halfword prune_page_top_(halfword p)
1595 {register halfword Result;
1598 prevp = mem_top - 3;
1599 mem[mem_top - 3].hh.v.RH = p;
1600 /* while p<>null do l.18803 */
1601 while(p != 0)switch(mem[p].hh.b0)
1606 q = new_skip_param(10);
1607 mem[prevp].hh.v.RH = q;
1609 if(mem[temp_ptr + 1].cint > mem[p + 3].cint)
1610 mem[temp_ptr + 1].cint = mem[temp_ptr + 1].cint - mem[p + 3]
1612 else mem[temp_ptr + 1].cint = 0;
1613 p = 0; /* p:=null */
1621 p = mem[prevp].hh.v.RH;
1631 mem[prevp].hh.v.RH = p;
1637 confusion(953); /* pruning */
1638 return 0; // abort_flag set
1642 Result = mem[mem_top - 3].hh.v.RH;
1645 halfword vert_break_(halfword p, scaled h, scaled d)
1646 {/* 30 45 90 */ register halfword Result;
1652 halfword best_place;
1654 /* small_number t; */
1655 int t; /* 95/Jan/7 */
1657 leastcost = 1073741823L; /* 2^30 - 1 */
1666 if(p == 0) /* if p=null l.18879 */
1668 else switch(mem[p].hh.b0)
1673 active_width[1]= active_width[1]+ prevdp + mem[p + 3].cint;
1674 prevdp = mem[p + 2].cint;
1682 if((mem[prevp].hh.b0 < 9))
1688 if(mem[p].hh.v.RH == 0)/* if link(p)=null l.18903 */
1690 else t = mem[mem[p].hh.v.RH].hh.b0;
1697 pi = mem[p + 1].cint;
1705 confusion(954); /* vert_break */
1706 return 0; // abort_flag set
1710 if(pi < 10000) /* pi may be used ... */
1712 if(active_width[1]< h)
1713 if((active_width[3]!= 0)||(active_width[4]!= 0)||(
1714 active_width[5]!= 0))
1716 else b = badness(h - active_width[1], active_width[2]);
1717 else if(active_width[1]- h > active_width[6])
1718 b = 1073741823L; /* 2^30 - 1 */
1719 else b = badness(active_width[1]- h, active_width[6]);
1720 if(b < 1073741823L) /* 2^30 - 1 */
1730 best_height_plus_depth = active_width[1]+ prevdp;
1732 if((b == 1073741823L)||(pi <= -10000)) /* 2^30 - 1 */
1735 if((mem[p].hh.b0 < 10)||(mem[p].hh.b0 > 11))
1737 lab90: if(mem[p].hh.b0 == 11)
1741 q = mem[p + 1].hh.v.LH;
1742 active_width[2 + mem[q].hh.b0]= active_width[2 + mem[q]
1743 .hh.b0]+ mem[q + 2].cint;
1744 active_width[6]= active_width[6]+ mem[q + 3].cint;
1745 if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0))
1748 if(interaction == 3)
1750 print_nl(262); /* ! */
1751 print(955); /* Infinite glue shrinkage found in box being split */
1755 help_line[3]= 956; /* The box you are \vsplitting contains some infinitely */
1756 help_line[2]= 957; /* shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'. */
1757 help_line[1]= 958; /* Such glue doesn't belong there; but you can safely proceed, */
1758 help_line[0]= 916; /* since the offensive shrinkability has been made finite. */
1764 mem[p + 1].hh.v.LH = r;
1768 active_width[1]= active_width[1]+ prevdp + mem[q + 1].cint;
1770 lab45: if(prevdp > d)
1772 active_width[1]= active_width[1]+ prevdp - d;
1776 p = mem[prevp].hh.v.RH;
1778 lab30: Result = best_place; /* best_place may be used ... */
1781 /* called only from tex7.c */
1782 halfword vsplit_(eight_bits n, scaled h)
1783 {/* 10 30 */ register halfword Result;
1787 v = eqtb[(hash_size + 1578) + n].hh.v.RH;
1790 delete_token_ref(cur_mark[3]);
1792 delete_token_ref(cur_mark[4]);
1795 if(v == 0) /* if v=null then l.18999 */
1797 Result = 0; /* begin vsplit:=null; return; */
1800 if(mem[v].hh.b0 != 1)
1803 if(interaction == 3)
1805 print_nl(262); /* ! */
1809 print_esc(959); /* vsplit */
1810 print(960); /* needs a */
1811 print_esc(961); /* vbox */
1814 help_line[1]= 962; /* The box you are trying to split is an \hbox. */
1815 help_line[0]= 963; /* I can't split such a box, so I'll leave it alone. */
1821 q = vert_break(mem[v + 5].hh.v.RH, h, eqtb[(hash_size + 3736)].cint);
1822 p = mem[v + 5].hh.v.RH;
1824 mem[v + 5].hh.v.RH = 0;
1826 if(mem[p].hh.b0 == 4)
1829 cur_mark[3]= mem[p + 1].cint;
1830 cur_mark[4]= cur_mark[3];
1831 mem[cur_mark[3]].hh.v.LH = mem[cur_mark[3]].hh.v.LH + 2;
1834 delete_token_ref(cur_mark[4]);
1835 cur_mark[4]= mem[p + 1].cint;
1836 incr(mem[cur_mark[4]].hh.v.LH);
1838 if(mem[p].hh.v.RH == q)
1846 q = prune_page_top(q);
1847 p = mem[v + 5].hh.v.RH;
1849 if(q == 0) /* if q=null l.18993 */
1850 eqtb[(hash_size + 1578) + n].hh.v.RH = 0; /* then box(n):=null */
1851 else eqtb[(hash_size + 1578) + n].hh.v.RH =
1852 vpackage(q, 0, 1, 1073741823L); /* 2^30 - 1 */
1853 Result = vpackage(p, h, 0, eqtb[(hash_size + 3736)].cint);
1856 void print_totals (void)
1858 print_scaled(page_so_far[1]);
1859 if(page_so_far[2]!= 0)
1861 print(310); /* plus */
1862 print_scaled(page_so_far[2]);
1865 if(page_so_far[3]!= 0)
1867 print(310); /* plus */
1868 print_scaled(page_so_far[3]);
1869 print(309); /* fil */
1871 if(page_so_far[4]!= 0)
1873 print(310); /* plus */
1874 print_scaled(page_so_far[4]);
1875 print(972); /* fill */
1877 if(page_so_far[5]!= 0)
1879 print(310); /* plus */
1880 print_scaled(page_so_far[5]);
1881 print(973); /* filll */
1883 if(page_so_far[6]!= 0)
1885 print(311); /* minus */
1886 print_scaled(page_so_far[6]);
1889 void freeze_page_specs_(small_number s)
1892 page_so_far[0]= eqtb[(hash_size + 3734)].cint;
1893 page_max_depth = eqtb[(hash_size + 3735)].cint;
1901 least_page_cost = 1073741823L; /* 2^30 - 1 */
1904 if(eqtb[(hash_size + 3196)].cint > 0)
1906 begin_diagnostic ();
1907 print_nl(981); /* might split */
1908 print_scaled(page_so_far[0]);
1909 print(982); /*, max depth= */
1910 print_scaled(page_max_depth);
1911 end_diagnostic(false);
1915 void box_error_(eight_bits n)
1918 begin_diagnostic ();
1919 print_nl(830); /* The following box has been deleted: */
1920 show_box(eqtb[(hash_size + 1578) + n].hh.v.RH);
1921 end_diagnostic(true);
1922 flush_node_list(eqtb[(hash_size + 1578) + n].hh.v.RH);
1923 eqtb[(hash_size + 1578) + n].hh.v.RH = 0;
1925 void ensure_vbox_(eight_bits n)
1928 p = eqtb[(hash_size + 1578) + n].hh.v.RH;
1929 if(p != 0) /* if p<>null then if type(p)=hlist_node then l.19324 */
1930 if(mem[p].hh.b0 == 0)
1933 if(interaction == 3)
1935 print_nl(262); /* ! */
1936 print(983); /* Insertions can only be added to a vbox */
1940 help_line[2]= 984; /* Tut tut: You're trying to \insert into a */
1941 help_line[1]= 985; /* \box register that now contains an \hbox. */
1942 help_line[0]= 986; /* Proceed, and I'll discard its present contents. */
1947 /* called only from tex7.c */
1948 void fire_up_(halfword c)
1950 halfword p, q, r, s;
1952 /* unsigned char n; */
1953 unsigned int n; /* 95/Jan/7 */
1955 integer savevbadness;
1957 halfword savesplittopskip;
1958 if(mem[best_page_break].hh.b0 == 12)
1960 geq_word_define((hash_size + 3202), mem[best_page_break + 1].cint);
1961 mem[best_page_break + 1].cint = 10000;
1963 else geq_word_define((hash_size + 3202), 10000);
1967 delete_token_ref(cur_mark[0]);
1968 cur_mark[0]= cur_mark[2];
1969 incr(mem[cur_mark[0]].hh.v.LH);
1970 delete_token_ref(cur_mark[1]);
1973 if(c == best_page_break)
1974 best_page_break = 0;
1975 if(eqtb[(hash_size + 1833)].hh.v.RH != 0)
1978 if(interaction == 3)
1980 print_nl(262); /* ! */
1983 print_esc(406); /* box */
1984 print(997); /* 255 is not void */
1987 help_line[1]= 998; /* You shouldn't use \box255 except in \output routines. */
1988 help_line[0]= 986; /* Proceed, and I'll discard its present contents. */
1992 insert_penalties = 0;
1993 savesplittopskip = eqtb[(hash_size + 792)].hh.v.RH;
1994 if(eqtb[(hash_size + 3216)].cint <= 0)
1996 r = mem[mem_top].hh.v.RH;
1997 while(r != mem_top){
1999 if(mem[r + 2].hh.v.LH != 0)
2003 /* if box(n)=null then box(n):=new_null_box; l.19759 */
2004 if(eqtb[(hash_size + 1578) + n].hh.v.RH == 0)
2005 eqtb[(hash_size + 1578) + n].hh.v.RH = new_null_box ();
2006 p = eqtb[(hash_size + 1578) + n].hh.v.RH + 5;
2007 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
2008 mem[r + 2].hh.v.RH = p;
2015 prevp = mem_top - 2;
2016 p = mem[prevp].hh.v.RH;
2017 while(p != best_page_break){
2019 if(mem[p].hh.b0 == 3)
2021 if(eqtb[(hash_size + 3216)].cint <= 0)
2023 r = mem[mem_top].hh.v.RH;
2024 while(mem[r].hh.b1 != mem[p].hh.b1)r = mem[r].hh.v.RH
2026 /* if best_ins_ptr(r)=null then wait:=true l.19783 */
2027 if(mem[r + 2].hh.v.LH == 0)
2032 s = mem[r + 2].hh.v.RH;
2033 mem[s].hh.v.RH = mem[p + 4].hh.v.LH;
2034 if(mem[r + 2].hh.v.LH == p)
2036 if(mem[r].hh.b0 == 1)
2037 if((mem[r + 1].hh.v.LH == p)&&(mem[r + 1].hh.v.RH
2040 while(mem[s].hh.v.RH != mem[r + 1].hh.v.RH)s = mem
2043 eqtb[(hash_size + 792)].hh.v.RH = mem[p + 4].hh.v.RH;
2044 mem[p + 4].hh.v.LH = prune_page_top(mem[r + 1].hh.v.RH
2046 if(mem[p + 4].hh.v.LH != 0)
2048 temp_ptr = vpackage(mem[p + 4].hh.v.LH, 0, 1,
2049 1073741823L); /* 2^30 - 1 */
2050 mem[p + 3].cint = mem[temp_ptr + 3].cint + mem[
2052 free_node(temp_ptr, 7);
2056 mem[r + 2].hh.v.LH = 0;
2058 temp_ptr = mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 5].hh.v.RH;
2059 free_node(eqtb[(hash_size + 1578) + n].hh.v.RH, 7);
2060 eqtb[(hash_size + 1578) + n].hh.v.RH = vpackage(temp_ptr, 0, 1,
2061 1073741823L); /* 2^30 - 1 */
2065 while(mem[s].hh.v.RH != 0)s = mem[s].hh.v.RH;
2066 mem[r + 2].hh.v.RH = s;
2069 mem[prevp].hh.v.RH = mem[p].hh.v.RH;
2075 incr(insert_penalties);
2079 delete_glue_ref(mem[p + 4].hh.v.RH);
2085 else if(mem[p].hh.b0 == 4)
2089 cur_mark[1]= mem[p + 1].cint;
2090 incr(mem[cur_mark[1]].hh.v.LH);
2093 delete_token_ref(cur_mark[2]);
2094 cur_mark[2]= mem[p + 1].cint;
2095 incr(mem[cur_mark[2]].hh.v.LH);
2098 p = mem[prevp].hh.v.RH;
2100 eqtb[(hash_size + 792)].hh.v.RH = savesplittopskip;
2101 if(p != 0) /* if p<>null then l.19730 */
2103 if(mem[mem_top - 1].hh.v.RH == 0)/* if link(contrib_head)=null then */
2106 else nest[0].tail_field = page_tail;
2107 mem[page_tail].hh.v.RH = mem[mem_top - 1].hh.v.RH;
2108 mem[mem_top - 1].hh.v.RH = p;
2109 mem[prevp].hh.v.RH = 0; /* link(prev_p):=null; */
2111 savevbadness = eqtb[(hash_size + 3190)].cint;
2112 eqtb[(hash_size + 3190)].cint = 10000;
2113 savevfuzz = eqtb[(hash_size + 3739)].cint;
2114 eqtb[(hash_size + 3739)].cint = 1073741823L; /* 2^30 - 1 */
2115 eqtb[(hash_size + 1833)].hh.v.RH = vpackage(mem[mem_top - 2].hh.v.RH,
2116 best_size, 0, page_max_depth);
2117 eqtb[(hash_size + 3190)].cint = savevbadness;
2118 eqtb[(hash_size + 3739)].cint = savevfuzz;
2119 /* if(last_glue != 262143L) */
2120 if(last_glue != empty_flag)
2121 delete_glue_ref(last_glue);
2123 page_tail = mem_top - 2;
2124 mem[mem_top - 2].hh.v.RH = 0;
2125 /* last_glue = 262143L; */
2126 last_glue = empty_flag;
2131 if(q != mem_top - 4)
2133 mem[mem_top - 2].hh.v.RH = mem[mem_top - 4].hh.v.RH;
2136 r = mem[mem_top].hh.v.RH;
2137 while(r != mem_top){
2143 mem[mem_top].hh.v.RH = mem_top;
2144 /* if (top_mark<>null)and(first_mark=null) then l.19654 */
2145 if((cur_mark[0]!= 0)&&(cur_mark[1]== 0))
2147 cur_mark[1]= cur_mark[0];
2148 incr(mem[cur_mark[0]].hh.v.LH);
2150 /* if output_routine<>null then */
2151 if(eqtb[(hash_size + 1313)].hh.v.RH != 0)
2152 if(dead_cycles >= eqtb[(hash_size + 3203)].cint)
2155 if(interaction == 3)
2157 print_nl(262); /* ! */
2158 print(999); /* Output loop--- */
2160 print_int(dead_cycles);
2161 print(1000); /* consecutive dead cycles */
2164 help_line[2]= 1001; /* I've concluded that your \output is awry; it never does */
2165 help_line[1]= 1002; /* \ship_out, so I'm shipping \box255 out myself. Next */
2166 help_line[0]= 1003; /* increase \maxdeadcycles if you want me to be more patient! */
2171 output_active = true;
2175 cur_list.aux_field.cint = ignore_depth;
2176 mode_line = - (integer) line;
2177 begin_token_list(eqtb[(hash_size + 1313)].hh.v.RH, 6); /* output */
2179 normal_paragraph ();
2184 if(mem[mem_top - 2].hh.v.RH != 0)
2186 if(mem[mem_top - 1].hh.v.RH == 0)
2189 else nest[0].tail_field = page_tail;
2190 else mem[page_tail].hh.v.RH = mem[mem_top - 1].hh.v.RH;
2191 mem[mem_top - 1].hh.v.RH = mem[mem_top - 2].hh.v.RH;
2192 mem[mem_top - 2].hh.v.RH = 0;
2193 page_tail = mem_top - 2;
2195 ship_out(eqtb[(hash_size + 1833)].hh.v.RH);
2196 eqtb[(hash_size + 1833)].hh.v.RH = 0;
2199 /* used to continue here with build_page etc in tex6.c */