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;
53 print_err("Infinite glue shrinkage found in a paragraph");
54 help5("The paragraph just ended includes some glue that has",
55 "infinite shrinkability, e.g., `\\hskip 0pt minus 1fil'.",
56 "Such glue doesn't belong there---it allows a paragraph",
57 "of any length to fit on one line. But it's safe to proceed,",
58 "since the offensive shrinkability has been made finite.");
67 void try_break_ (integer pi,small_number breaktype)
78 internal_font_number f;
80 bool noderstaysactive;
83 halfword b; /* current badness */
85 bool artificialdemerits;
95 cur_active_width[1]= active_width[1];
96 cur_active_width[2]= active_width[2];
97 cur_active_width[3]= active_width[3];
98 cur_active_width[4]= active_width[4];
99 cur_active_width[5]= active_width[5];
100 cur_active_width[6]= active_width[6];
102 lab22: r = mem[prevr].hh.v.RH;
103 if(mem[r].hh.b0 == 2)
105 cur_active_width[1]= cur_active_width[1]+ mem[r + 1].cint;
106 cur_active_width[2]= cur_active_width[2]+ mem[r + 2].cint;
107 cur_active_width[3]= cur_active_width[3]+ mem[r + 3].cint;
108 cur_active_width[4]= cur_active_width[4]+ mem[r + 4].cint;
109 cur_active_width[5]= cur_active_width[5]+ mem[r + 5].cint;
110 cur_active_width[6]= cur_active_width[6]+ mem[r + 6].cint;
116 l = mem[r + 1].hh.v.LH;
119 if((minimum_demerits < 1073741823L)&& /* 2^30 - 1 */
120 ((oldl != easyline)||(r == mem_top - 7)))
125 break_width[1]= background[1];
126 break_width[2]= background[2];
127 break_width[3]= background[3];
128 break_width[4]= background[4];
129 break_width[5]= background[5];
130 break_width[6]= background[6];
132 /* if break_type>unhyphenated then if cur_p<>null then l.16451 */
136 t = mem[cur_p].hh.b1;
138 s = mem[cur_p + 1].hh.v.RH;
143 if((v >= hi_mem_min))
146 break_width[1]= break_width[1]- font_info[width_base[
147 f]+ font_info[char_base[f]+ mem[v].hh.b1].qqqq
150 else switch(mem[v].hh.b0)
153 f = mem[v + 1].hh.b0;
154 break_width[1]= break_width[1]- font_info[width_base
155 [f]+ font_info[char_base[f]+ mem[v + 1].hh.b1]
163 break_width[1]= break_width[1]- mem[v + 1].cint;
167 confusion(917); /* disc1 */
168 return; // abort_flag set
173 while(s != 0){ /* while s<>null do l.16453 */
175 if((s >= hi_mem_min))
178 break_width[1]= break_width[1]+ font_info[width_base[
179 f]+ font_info[char_base[f]+ mem[s].hh.b1].qqqq
182 else switch(mem[s].hh.b0)
185 f = mem[s + 1].hh.b0;
186 break_width[1]= break_width[1]+ font_info[width_base
187 [f]+ font_info[char_base[f]+ mem[s + 1].hh.b1]
194 /* didn't used to drop through to case 11 from case 2 in 3.141 */
196 /* used to be some extra code here in case 11 in 3.141 */
197 break_width[1]= break_width[1]+ mem[s + 1].cint;
201 confusion(918); /* disc1 */
202 return; // abort_flag set
206 /* used to be an increment t here in 3.141 */
209 break_width[1]= break_width[1]+ disc_width;
210 /* used to be a test on t here instead in 3.141 */
211 if(mem[cur_p + 1].hh.v.RH == 0)
216 if((s >= hi_mem_min))
221 v = mem[s + 1].hh.v.LH;
222 break_width[1]= break_width[1]- mem[v + 1].cint;
223 break_width[2 + mem[v].hh.b0]= break_width[2 + mem[
224 v].hh.b0]- mem[v + 2].cint;
225 break_width[6]= break_width[6]- mem[v + 3].cint;
232 /* case 9 used to drop through to case 11 in 3.141 */
233 break_width[1]= break_width[1]- mem[s + 1].cint;
236 /* changes here in nature of test since 3.141 */
237 if(mem[s].hh.b1 != 1)
239 else break_width[1]= break_width[1]- mem[s + 1].cint
250 if(mem[prevr].hh.b0 == 2)
252 mem[prevr + 1].cint = mem[prevr + 1].cint - cur_active_width
254 mem[prevr + 2].cint = mem[prevr + 2].cint - cur_active_width
256 mem[prevr + 3].cint = mem[prevr + 3].cint - cur_active_width
258 mem[prevr + 4].cint = mem[prevr + 4].cint - cur_active_width
260 mem[prevr + 5].cint = mem[prevr + 5].cint - cur_active_width
262 mem[prevr + 6].cint = mem[prevr + 6].cint - cur_active_width
265 else if(prevr == mem_top - 7)
267 active_width[1]= break_width[1];
268 active_width[2]= break_width[2];
269 active_width[3]= break_width[3];
270 active_width[4]= break_width[4];
271 active_width[5]= break_width[5];
272 active_width[6]= break_width[6];
280 mem[q + 1].cint = break_width[1]- cur_active_width[1];
281 mem[q + 2].cint = break_width[2]- cur_active_width[2];
282 mem[q + 3].cint = break_width[3]- cur_active_width[3];
283 mem[q + 4].cint = break_width[4]- cur_active_width[4];
284 mem[q + 5].cint = break_width[5]- cur_active_width[5];
285 mem[q + 6].cint = break_width[6]- cur_active_width[6];
286 mem[prevr].hh.v.RH = q;
290 if(abs(eqtb[(hash_size + 3179)].cint)>= 1073741823L - minimum_demerits)
291 minimum_demerits = 1073741822L; /* 2^30 - 2 */
292 else minimum_demerits = minimum_demerits + abs(eqtb[(hash_size + 3179)].cint
295 register integer for_end;
298 if(fitclass <= for_end) do
300 if(minimal_demerits[fitclass]<= minimum_demerits)
303 mem[q].hh.v.RH = passive;
305 mem[q + 1].hh.v.RH = cur_p;
309 mem[q].hh.v.LH = pass_number;
311 mem[q + 1].hh.v.LH = best_place[fitclass];
313 mem[q + 1].hh.v.RH = passive;
314 mem[q + 1].hh.v.LH = best_pl_line[fitclass]+ 1;
315 mem[q].hh.b1 = fitclass;
316 mem[q].hh.b0 = breaktype;
317 mem[q + 2].cint = minimal_demerits[fitclass];
319 mem[prevr].hh.v.RH = q;
323 if(eqtb[(hash_size + 3195)].cint > 0)
325 print_nl("@@"); /* @@ */
326 print_int(mem[passive].hh.v.LH);
327 print_string(": line ");
328 print_int(mem[q + 1].hh.v.LH - 1);
329 print_char(46); /* . */
332 print_char(45); /* - */
334 print_int(mem[q + 2].cint);
335 print_string("-> @@");
336 if(mem[passive + 1].hh.v.LH == 0)
337 print_char(48); /* 0 */
338 else print_int(mem[mem[passive + 1].hh.v.LH].hh
343 minimal_demerits[fitclass]= 1073741823L; /* 2^30 - 1 */
345 while(fitclass++ < for_end); }
346 minimum_demerits = 1073741823L; /* 2^30 - 1 */
353 mem[q + 1].cint = cur_active_width[1]- break_width[1];
354 mem[q + 2].cint = cur_active_width[2]- break_width[2];
355 mem[q + 3].cint = cur_active_width[3]- break_width[3];
356 mem[q + 4].cint = cur_active_width[4]- break_width[4];
357 mem[q + 5].cint = cur_active_width[5]- break_width[5];
358 mem[q + 6].cint = cur_active_width[6]- break_width[6];
359 mem[prevr].hh.v.RH = q;
368 linewidth = second_width;
369 oldl = 262142L; /* 2^18 - 2 ? */
374 if(l > last_special_line)
375 linewidth = second_width;
376 else if(eqtb[(hash_size + 1312)].hh.v.RH == 0)
377 linewidth = first_width;
378 else linewidth = mem[eqtb[(hash_size + 1312)].hh.v.RH + 2 * l].cint;
383 artificialdemerits = false;
384 shortfall = linewidth - cur_active_width[1]; /* linewidth may be ... */
386 if((cur_active_width[3]!= 0)||(cur_active_width[4]!= 0)||(
387 cur_active_width[5]!= 0))
394 if(shortfall > 7230584L)
395 if(cur_active_width[2]< 1663497L)
401 b = badness(shortfall, cur_active_width[2]);
411 if(- (integer) shortfall > cur_active_width[6])
413 else b = badness(- (integer) shortfall, cur_active_width[6]);
418 if((b > 10000)||(pi == -10000))
420 if(final_pass &&(minimum_demerits == 1073741823L)&& /* 2^30 - 1 */
421 (mem[r].hh.v.RH == mem_top - 7)&&(prevr == mem_top - 7))
422 artificialdemerits = true;
423 else if(b > threshold)
425 noderstaysactive = false;
432 noderstaysactive = true;
434 if(artificialdemerits)
438 d = eqtb[(hash_size + 3165)].cint + b;
447 if((breaktype == 1)&&(mem[r].hh.b0 == 1))
449 d = d + eqtb[(hash_size + 3177)].cint;
450 else d = d + eqtb[(hash_size + 3178)].cint;
451 if(abs(toint(fitclass)- toint(mem[r].hh.b1)) > 1)
452 d = d + eqtb[(hash_size + 3179)].cint;
456 if(eqtb[(hash_size + 3195)].cint > 0)
458 if(printed_node != cur_p)
462 short_display(mem[printed_node].hh.v.RH);
465 savelink = mem[cur_p].hh.v.RH;
466 mem[cur_p].hh.v.RH = 0;
468 short_display(mem[printed_node].hh.v.RH);
469 mem[cur_p].hh.v.RH = savelink;
471 printed_node = cur_p;
473 print_nl("@"); /* @ */
476 else if(mem[cur_p].hh.b0 != 10)
478 if(mem[cur_p].hh.b0 == 12)
479 print_esc("penalty");
480 else if(mem[cur_p].hh.b0 == 7)
481 print_esc("discretionary");
482 else if(mem[cur_p].hh.b0 == 11)
484 else print_esc("math");
486 print_string("via @@"); /* */
487 if(mem[r + 1].hh.v.RH == 0)
488 print_char(48); /* 0 */
489 else print_int(mem[mem[r + 1].hh.v.RH].hh.v.LH);
492 print_char(42); /* * */
497 if(artificialdemerits)
498 print_char(42); /* * */
502 d = d + mem[r + 2].cint;
503 if(d <= minimal_demerits[fitclass])
505 minimal_demerits[fitclass]= d;
506 best_place[fitclass]= mem[r + 1].hh.v.RH;
507 best_pl_line[fitclass]= l;
508 if(d < minimum_demerits)
509 minimum_demerits = d;
513 lab60: mem[prevr].hh.v.RH = mem[r].hh.v.RH;
515 if(prevr == mem_top - 7)
517 r = mem[mem_top - 7].hh.v.RH;
518 if(mem[r].hh.b0 == 2)
520 active_width[1]= active_width[1]+ mem[r + 1].cint;
521 active_width[2]= active_width[2]+ mem[r + 2].cint;
522 active_width[3]= active_width[3]+ mem[r + 3].cint;
523 active_width[4]= active_width[4]+ mem[r + 4].cint;
524 active_width[5]= active_width[5]+ mem[r + 5].cint;
525 active_width[6]= active_width[6]+ mem[r + 6].cint;
526 cur_active_width[1]= active_width[1];
527 cur_active_width[2]= active_width[2];
528 cur_active_width[3]= active_width[3];
529 cur_active_width[4]= active_width[4];
530 cur_active_width[5]= active_width[5];
531 cur_active_width[6]= active_width[6];
532 mem[mem_top - 7].hh.v.RH = mem[r].hh.v.RH;
536 else if(mem[prevr].hh.b0 == 2)
538 r = mem[prevr].hh.v.RH;
541 cur_active_width[1]= cur_active_width[1]- mem[prevr + 1]
543 cur_active_width[2]= cur_active_width[2]- mem[prevr + 2]
545 cur_active_width[3]= cur_active_width[3]- mem[prevr + 3]
547 cur_active_width[4]= cur_active_width[4]- mem[prevr + 4]
549 cur_active_width[5]= cur_active_width[5]- mem[prevr + 5]
551 cur_active_width[6]= cur_active_width[6]- mem[prevr + 6]
553 mem[prevprevr].hh.v.RH = mem_top - 7; /* prevprevr may be used ... */
557 else if(mem[r].hh.b0 == 2)
559 cur_active_width[1]= cur_active_width[1]+ mem[r + 1].cint;
560 cur_active_width[2]= cur_active_width[2]+ mem[r + 2].cint;
561 cur_active_width[3]= cur_active_width[3]+ mem[r + 3].cint;
562 cur_active_width[4]= cur_active_width[4]+ mem[r + 4].cint;
563 cur_active_width[5]= cur_active_width[5]+ mem[r + 5].cint;
564 cur_active_width[6]= cur_active_width[6]+ mem[r + 6].cint;
565 mem[prevr + 1].cint = mem[prevr + 1].cint + mem[r + 1]
567 mem[prevr + 2].cint = mem[prevr + 2].cint + mem[r + 2]
569 mem[prevr + 3].cint = mem[prevr + 3].cint + mem[r + 3]
571 mem[prevr + 4].cint = mem[prevr + 4].cint + mem[r + 4]
573 mem[prevr + 5].cint = mem[prevr + 5].cint + mem[r + 5]
575 mem[prevr + 6].cint = mem[prevr + 6].cint + mem[r + 6]
577 mem[prevr].hh.v.RH = mem[r].hh.v.RH;
586 if(cur_p == printed_node)
588 if(mem[cur_p].hh.b0 == 7){
589 t = mem[cur_p].hh.b1;
592 printed_node = mem[printed_node].hh.v.RH;
596 /* must exit here, there are no internal return - except for confusion */
597 /* savedbadness = b; */ /* 96/Feb/9 - for test in itex.c */
599 /* end of the old tex5.c here */
600 void post_line_break_(integer finalwidowpenalty)
610 q = mem[best_bet + 1].hh.v.RH;
614 q = mem[q + 1].hh.v.LH;
615 mem[r + 1].hh.v.LH = cur_p;
618 curline = prev_graf + 1;
620 q = mem[cur_p + 1].hh.v.RH;
622 postdiscbreak = false;
624 if(mem[q].hh.b0 == 10)
626 delete_glue_ref(mem[q + 1].hh.v.LH);
627 mem[q + 1].hh.v.LH = eqtb[(hash_size + 790)].hh.v.RH;
629 incr(mem[eqtb[(hash_size + 790)].hh.v.RH].hh.v.RH);
634 if(mem[q].hh.b0 == 7)
650 flush_node_list(mem[q].hh.v.RH);
653 if(mem[q + 1].hh.v.RH != 0)
655 s = mem[q + 1].hh.v.RH;
656 while(mem[s].hh.v.RH != 0)s = mem[s].hh.v.RH;
658 r = mem[q + 1].hh.v.RH;
659 mem[q + 1].hh.v.RH = 0;
660 postdiscbreak = true;
662 if(mem[q + 1].hh.v.LH != 0)
664 s = mem[q + 1].hh.v.LH;
666 while(mem[s].hh.v.RH != 0)s = mem[s].hh.v.RH;
667 mem[q + 1].hh.v.LH = 0;
673 else if((mem[q].hh.b0 == 9)||(mem[q].hh.b0 == 11))
679 while(mem[q].hh.v.RH != 0)q = mem[q].hh.v.RH;
681 r = new_param_glue(8);
682 mem[r].hh.v.RH = mem[q].hh.v.RH;
688 q = mem[mem_top - 3].hh.v.RH;
689 mem[mem_top - 3].hh.v.RH = r;
690 if(eqtb[(hash_size + 789)].hh.v.RH != 0)
692 r = new_param_glue(7);
696 if(curline > last_special_line)
698 curwidth = second_width;
699 curindent = second_indent;
701 else if(eqtb[(hash_size + 1312)].hh.v.RH == 0)
703 curwidth = first_width;
704 curindent = first_indent;
708 curwidth = mem[eqtb[(hash_size + 1312)].hh.v.RH + 2 * curline].cint;
709 curindent = mem[eqtb[(hash_size + 1312)].hh.v.RH + 2 * curline - 1].cint;
711 adjust_tail = mem_top - 5;
712 just_box = hpack(q, curwidth, 0);
713 mem[just_box + 4].cint = curindent;
714 append_to_vlist(just_box);
715 /* if adjust_head<>adjust_tail then l.17346 */
716 if(mem_top - 5 != adjust_tail)
718 mem[tail].hh.v.RH = mem[mem_top - 5].hh.v.RH;
721 adjust_tail = 0; /* adjust_tail:=null */
722 if(curline + 1 != best_line)
724 pen = eqtb[(hash_size + 3176)].cint;
725 if(curline == prev_graf + 1)
726 pen = pen + eqtb[(hash_size + 3168)].cint;
727 if(curline + 2 == best_line)
728 pen = pen + finalwidowpenalty;
730 pen = pen + eqtb[(hash_size + 3171)].cint;
733 r = new_penalty(pen);
734 mem[tail].hh.v.RH = r;
739 cur_p = mem[cur_p + 1].hh.v.LH;
746 if(q == mem[cur_p + 1].hh.v.RH)
748 if((q >= hi_mem_min))
750 if((mem[q].hh.b0 < 9))
752 /* change in tests here from 3.141 != 1 instead of == 2 */
753 if(mem[q].hh.b0 == 11)
754 if(mem[q].hh.b1 != 1)
758 lab31: if(r != mem_top - 3)
761 flush_node_list(mem[mem_top - 3].hh.v.RH);
762 mem[mem_top - 3].hh.v.RH = q;
765 } while(!(cur_p == 0));
766 if((curline != best_line)||(mem[mem_top - 3].hh.v.RH != 0)) {
767 confusion(933); /* disc2 */
768 return; // abort_flag set
770 prev_graf = best_line - 1;
772 /* Reconstitute ligatures during hyphenation pass */
773 small_number reconstitute_(small_number j, small_number n, halfword bchar, halfword hchar)
774 {/* 22 30 */ register small_number Result;
782 hyphen_passed = 0; /* paragraph 907 ? */
785 mem[mem_top - 4].hh.v.RH = 0;
790 ligature_present = init_lig;
794 /* while p>null do l.17772 */
795 /* while(p > 0){ */ /* NO! */
796 while(p != 0){ /* 94/Mar/22 BUG FIX */
798 /* append_charnode_to_t(character(p)); */
799 mem[t].hh.v.RH = get_avail ();
802 mem[t].hh.b1 = mem[p].hh.b1;
804 p = mem[p].hh.v.RH; /* p:=link(p); */
809 mem[t].hh.v.RH = get_avail ();
812 mem[t].hh.b1 = cur_l;
814 lig_stack = 0; /* lig_stack:=null; */
823 lab22: if(cur_l == 256) /* if cur_l = non_char then */
825 k = bchar_label[hf]; /* begin k:=bchar_label[hf]; */
826 /* if k=non_address then goto done@+else q:=font_info[k].qqqq; l.17812 */
827 /* if(k == font_mem_size) */
828 if(k == non_address) /* i.e. 0 --- 96/Jan/15 */
830 else q = font_info[k].qqqq;
833 q = font_info[char_base[hf]+ cur_l].qqqq;
836 k = lig_kern_base[hf]+ q.b3;
837 q = font_info[k].qqqq;
840 k = lig_kern_base[hf]+ 256 * q.b2 + q.b3 + 32768L - 256 *(128);
841 q = font_info[k].qqqq;
844 if(currh < 256) /* if cur_rh < non_char then test_char:=cur_rh */
846 else testchar = cur_r; /* else test_char:=cur_r; l.17817 */
847 /* loop@+begin if next_char(q)=test_char then if skip_byte(q)<=stop_flag then */
851 if(currh < 256) /* if cur_rh<non_char then */
856 goto lab22; /* goto continue; */
858 else { /* else begin if hchar<non_char then if odd(hyf[j]) then */
865 if(q.b2 < 128) /* if op_byte(q)<kern_flag then */
867 // @<Carry out a ligature replacement, updating the cursor structure
868 // and possibly advancing~|j|; |goto continue| if the cursor doesn't
869 // advance, otherwise |goto done|@>; => l.17869
870 if(cur_l == 256) /* begin if cur_l=non_char then lft_hit:=true; */
873 if(lig_stack == 0)/* if lig_stack=null ? */
877 pause_for_instructions ();
880 switch(q.b2) /* case op_byte(q) of */
885 ligature_present = true;
892 /* if lig_stack>null then character(lig_stack):=cur_r */
893 /* if(lig_stack > 0) */ /* 94/Mar/22 */
894 if(lig_stack != 0) /* line breaking?? */
895 mem[lig_stack].hh.b1 = cur_r; /* l.17877 ? */
897 lig_stack = new_lig_item(cur_r);
902 mem[lig_stack + 1].hh.v.RH = p;
903 mem[p].hh.b1 = hu[j + 1];
913 lig_stack = new_lig_item(cur_r);
914 mem[lig_stack].hh.v.RH = p;
922 p = new_ligature(hf, cur_l, mem[cur_q].hh.v.RH);
932 } */ /* removed 99/Jan/6 */
933 mem[cur_q].hh.v.RH = p;
935 ligature_present = false;
939 ligature_present = true;
944 /* othercases begin cur_l:=rem_byte(q);
945 ligature_present:=true; {\.{=:}} l.17869 */
947 ligature_present = true;
948 /* if lig_stack>null then pop_lig_stack l.17870 => l.17828 */
949 /* if(lig_stack > 0)*/ /* 94/Mar/22 ??? */
950 if(lig_stack != 0) /* BUG FIX */
952 /* if(mem[lig_stack + 1].hh.v.RH > 0) */ /* 94/Mar/22 */
953 if(mem[lig_stack + 1].hh.v.RH != 0) /* l.17828 ? */
955 mem[t].hh.v.RH = mem[lig_stack + 1].hh.v.RH;
960 lig_stack = mem[p].hh.v.RH;
962 if(lig_stack == 0) /* if lig_stack=null ? */
971 else cur_r = mem[lig_stack].hh.b1;
978 mem[t].hh.v.RH = get_avail ();
981 mem[t].hh.b1 = cur_r;
1001 w = font_info[kern_base[hf]+ 256 * q.b2 + q.b3].cint;
1013 q = font_info[k].qqqq;
1016 if(ligature_present)
1018 p = new_ligature(hf, cur_l, mem[cur_q].hh.v.RH);
1025 if(lig_stack == 0) /* if lig_stack=null ? */
1030 mem[cur_q].hh.v.RH = p;
1032 ligature_present = false;
1036 mem[t].hh.v.RH = new_kern(w);
1040 /* if(lig_stack > 0)*/ /* 94/Mar/22 ??? l.17870 */
1041 if(lig_stack != 0) /* l.17841 */
1043 /* begin cur_q:=t; cur_l:=character(lig_stack);
1044 ligature_present:=true; l.17842 */
1046 cur_l = mem[lig_stack].hh.b1;
1047 ligature_present = true;
1049 /* pop_lig_stack; goto continue; l.17843 => l.17828 */
1050 /* if(mem[lig_stack + 1].hh.v.RH > 0) *//* 94/Mar/22 */
1051 if(mem[lig_stack + 1].hh.v.RH != 0) /* BUG FIX */
1053 mem[t].hh.v.RH = mem[lig_stack + 1].hh.v.RH;
1058 lig_stack = mem[p].hh.v.RH;
1069 else cur_r = mem[lig_stack].hh.b1;
1076 /* #pragma optimize ("g", off) */ /* not needed for MSVC it seems ... */
1077 void hyphenate (void)
1078 {/* 50 30 40 41 42 45 10 */
1081 int l; /* 95/Jan/7 */
1084 halfword majortail, minortail;
1086 int c; /* 95/Jan/7 */
1088 /* integer rcount; */
1089 int rcount; /* 95/Jan/7 */
1097 register integer for_end;
1102 while(j++ < for_end);
1108 register integer for_end;
1112 /* h =(h + h + hc[j])% 607; */
1113 h =(h + h + hc[j])% hyphen_prime;
1114 while(j++ < for_end);
1120 if((str_start[k + 1]- str_start[k])< hn)
1122 if((str_start[k + 1]- str_start[k])== hn)
1127 if(str_pool[u]< hc[j])
1129 if(str_pool[u]> hc[j])
1135 while(s != 0){ /* while s<>null do l.18173 */
1137 hyf[mem[s].hh.v.LH]= 1;
1147 else h = hyphen_prime;
1150 if(trietrc[cur_lang + 1]!= cur_lang)
1156 register integer for_end;
1158 for_end = hn - rhyf + 1;
1161 z = trietrl[cur_lang + 1]+ hc[j];
1163 while(hc[l]== trietrc[z]){
1164 if(trietro[z]!= min_trie_op)
1168 v = v + op_start[cur_lang];
1169 i = l - hyf_distance[v];
1170 if(hyf_num[v]> hyf[i])
1173 } while(!(v == min_trie_op));
1176 z = trietrl[z]+ hc[l];
1179 while(j++ < for_end); }
1181 register integer for_end;
1186 while(j++ < for_end);
1189 register integer for_end;
1194 while(j++ < for_end);
1196 /* was j = 0; for_end = rhyf - 1; in 3.141 */
1198 register integer for_end;
1200 for_end = hn - rhyf;
1202 /* lost if (j <= for_end) do since 3.141 */
1205 while(j++ < for_end);
1209 q = mem[hb].hh.v.RH;
1210 mem[hb].hh.v.RH = 0;
1211 r = mem[ha].hh.v.RH;
1212 mem[ha].hh.v.RH = 0;
1214 if((ha >= hi_mem_min))
1215 if(mem[ha].hh.b0 != hf)
1221 hu[0]= mem[ha].hh.b1;
1223 else if(mem[ha].hh.b0 == 6)
1224 if(mem[ha + 1].hh.b0 != hf)
1228 init_list = mem[ha + 1].hh.v.RH;
1230 init_lft =(mem[ha].hh.b1 > 1);
1231 hu[0]= mem[ha + 1].hh.b1;
1242 if(!(r >= hi_mem_min))
1243 if(mem[r].hh.b0 == 6)
1244 if(mem[r].hh.b1 > 1)
1252 while(mem[s].hh.v.RH != ha)s = mem[s].hh.v.RH;
1260 lab50: flush_node_list(r);
1263 j = reconstitute(j, hn, bchar, hyf_char)+ 1;
1264 if(hyphen_passed == 0)
1266 mem[s].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1267 /* while(mem[s].hh.v.RH > 0)*/ /* 94/Mar/22 */
1268 while(mem[s].hh.v.RH != 0) /* l.17903 */
1273 hyphen_passed = j - 1;
1274 mem[mem_top - 4].hh.v.RH = 0; /* link(hold_head):=null; */
1277 if(hyphen_passed > 0)
1280 mem[r].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1284 /* while link(major_tail)>null do advance_major_tail; l.17929 */
1285 /* while(mem[majortail].hh.v.RH > 0){ */ /* 94/Mar/22 */
1286 while(mem[majortail].hh.v.RH != 0){ /* ??? */
1288 majortail = mem[majortail].hh.v.RH;
1293 /* minor_tail:=null; pre_break(r):=null; l.17943 */
1295 mem[r + 1].hh.v.LH = 0;
1296 /* hyf_node:=new_character(hf,hyf_char); */
1297 hyfnode = new_character(hf, hyf_char);
1298 if(hyfnode != 0) /* if hyf_node<>null then */
1304 mem[hyfnode].hh.v.RH = avail;
1313 /* begin l:=reconstitute(l,i,font_bchar[hf],non_char)+1; l.17948 */
1314 l = reconstitute(l, i, font_bchar[hf], 256)+ 1;
1315 /* if link(hold_head)>null then l.17949 */
1316 /* if(mem[mem_top - 4].hh.v.RH > 0)*/ /* 94/Mar/22 */
1317 if(mem[mem_top - 4].hh.v.RH != 0) /* BUG FIX ??? */
1319 if(minortail == 0)/* if minor_tail=null then */
1320 mem[r + 1].hh.v.LH = mem[mem_top - 4].hh.v.RH;
1321 else mem[minortail].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1322 minortail = mem[mem_top - 4].hh.v.RH;
1323 /* while link(minor_tail)>null do minor_tail:=link(minor_tail); l.17953 */
1324 /* while(mem[minortail].hh.v.RH > 0)*/ /* 94/Mar/22 */
1325 while(mem[minortail].hh.v.RH != 0) /* BUG FIX */
1326 minortail = mem[minortail].hh.v.RH;
1329 if(hyfnode != 0) /* if hyf_node<>null then l.17956 */
1335 /* minor_tail:=null; post_break(r):=null; c_loc:=0; l.17964 */
1337 mem[r + 1].hh.v.RH = 0;
1339 /* if bchar_label[hf]<non_address then l.17991 3.1415 */
1340 /* if(bchar_label[hf]< font_mem_size) */
1341 /* if bchar_label[hf]<>non_address then l.17991 3.14159 */
1342 if(bchar_label[hf]!= non_address) /* i.e. 0 --- 96/Jan/15 */
1352 l = reconstitute(l, hn, bchar, 256)+ 1;
1355 hu[cloc]= c; /* c may be used ... */
1358 /* if link(hold_head)>null then l. l.17973 */
1359 /* if(mem[mem_top - 4].hh.v.RH > 0) */ /* 94/Mar/22 ??? */
1360 if(mem[mem_top - 4].hh.v.RH != 0) /* BUG FIX */
1362 if(minortail == 0)/* begin if minor_tail=null then */
1363 mem[r + 1].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1364 else mem[minortail].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1365 minortail = mem[mem_top - 4].hh.v.RH;
1366 /* while link(minor_tail)>null do minor_tail:=link(minor_tail); l.17977 */
1367 /* while(mem[minortail].hh.v.RH > 0)*/ /* 94/Mar/22 */
1368 while(mem[minortail].hh.v.RH != 0) /* ??? */
1369 minortail = mem[minortail].hh.v.RH;
1374 j = reconstitute(j, hn, bchar, 256)+ 1;
1375 mem[majortail].hh.v.RH = mem[mem_top - 4].hh.v.RH;
1376 /* while link(major_tail)>null do advance_major_tail; l.17987 */
1377 /* while(mem[majortail].hh.v.RH > 0){ */ /* 94/Mar/22 */
1378 while(mem[majortail].hh.v.RH != 0){ /* ??? */
1379 majortail = mem[majortail].hh.v.RH;
1386 mem[s].hh.v.RH = mem[r].hh.v.RH;
1387 mem[r].hh.v.RH = 0; /* link(r):=null */
1393 mem[r].hh.b1 = rcount;
1396 hyphen_passed = j - 1;
1397 mem[mem_top - 4].hh.v.RH = 0; /* link(hold_head):=null; */
1398 } while(!(! odd(hyf[j - 1])));
1401 flush_list(init_list);
1403 /* #pragma optimize ("g", off) */ /* not needed for MSVC it seems ... */
1404 /* used only in itex.c */
1405 void new_hyph_exceptions (void)
1407 /* small_number n; */ /* in 3.141 */
1409 /* small_number j; */ /* in 3.141 */
1418 if(eqtb[(hash_size + 3213)].cint <= 0)
1420 else if(eqtb[(hash_size + 3213)].cint > 255)
1422 else cur_lang = eqtb[(hash_size + 3213)].cint;
1429 lab21: switch(cur_cmd){
1445 if(eqtb[(hash_size + 2139) + cur_chr].hh.v.RH == 0)
1447 print_err("Not a letter");
1448 help2("Letters in \\hyphenation words must have \\lccode>0.",
1449 "Proceed; I'll ignore the character I just read.");
1455 hc[n]= eqtb[(hash_size + 2139) + cur_chr].hh.v.RH;
1475 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
1476 #ifdef ALLOCATESTRING
1477 if(pool_ptr + n > current_pool_size)
1478 /* str_pool = realloc_str_pool (increment_pool_size); */
1479 str_pool = realloc_str_pool (increment_pool_size + n);
1480 if(pool_ptr + n > current_pool_size){ /* in case it failed 94/Jan/24 */
1481 overflow(257, current_pool_size - init_pool_ptr); /* 97/Mar/7 */
1482 return; // abort_flag set
1485 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
1486 if(pool_ptr + n > pool_size){
1487 overflow(257, pool_size - init_pool_ptr); /* pool size */
1488 return; // abort_flag set
1494 register integer for_end;
1499 /* h =(h + h + hc[j])% 607; */
1500 h =(h + h + hc[j])% hyphen_prime;
1502 str_pool[pool_ptr]= hc[j];
1506 while(j++ < for_end);
1509 /* if(hyph_count == 607)*/
1510 if(hyph_count == hyphen_prime){
1511 /* overflow(942, 607); */
1512 overflow(942, hyphen_prime); /* exception dictionary - NOT DYNAMIC */
1513 /* not dynamic ---- but can be set -e=... from command line in ini-TeX */
1514 return; // abort_flag set
1517 while(hyph_word[h]!= 0){
1520 if((str_start[k + 1]- str_start[k])<(str_start[s + 1
1523 if((str_start[k + 1]- str_start[k])>(str_start[s + 1
1529 if(str_pool[u]< str_pool[v])
1531 if(str_pool[u]> str_pool[v])
1535 } while(!(u == str_start[k + 1]));
1536 lab40: q = hyph_list[h];
1546 else h = hyphen_prime;
1559 print_err("Improper ");
1560 print_esc("hyphenation");
1561 print_string("will be flushed");
1562 help2("Hyphenation exceptions must contain only letters",
1563 "and hyphens. But continue; I'll forgive and forget.");
1567 } /* end of switch */
1570 halfword prune_page_top_(halfword p)
1571 {register halfword Result;
1574 prevp = mem_top - 3;
1575 mem[mem_top - 3].hh.v.RH = p;
1576 /* while p<>null do l.18803 */
1577 while(p != 0)switch(mem[p].hh.b0)
1582 q = new_skip_param(10);
1583 mem[prevp].hh.v.RH = q;
1585 if(mem[temp_ptr + 1].cint > mem[p + 3].cint)
1586 mem[temp_ptr + 1].cint = mem[temp_ptr + 1].cint - mem[p + 3]
1588 else mem[temp_ptr + 1].cint = 0;
1589 p = 0; /* p:=null */
1597 p = mem[prevp].hh.v.RH;
1607 mem[prevp].hh.v.RH = p;
1613 confusion(953); /* pruning */
1614 return 0; // abort_flag set
1618 Result = mem[mem_top - 3].hh.v.RH;
1621 halfword vert_break_(halfword p, scaled h, scaled d)
1622 {/* 30 45 90 */ register halfword Result;
1628 halfword best_place;
1630 /* small_number t; */
1631 int t; /* 95/Jan/7 */
1633 leastcost = 1073741823L; /* 2^30 - 1 */
1642 if(p == 0) /* if p=null l.18879 */
1644 else switch(mem[p].hh.b0)
1649 active_width[1]= active_width[1]+ prevdp + mem[p + 3].cint;
1650 prevdp = mem[p + 2].cint;
1658 if((mem[prevp].hh.b0 < 9))
1664 if(mem[p].hh.v.RH == 0)/* if link(p)=null l.18903 */
1666 else t = mem[mem[p].hh.v.RH].hh.b0;
1673 pi = mem[p + 1].cint;
1681 confusion(954); /* vert_break */
1682 return 0; // abort_flag set
1686 if(pi < 10000) /* pi may be used ... */
1688 if(active_width[1]< h)
1689 if((active_width[3]!= 0)||(active_width[4]!= 0)||(
1690 active_width[5]!= 0))
1692 else b = badness(h - active_width[1], active_width[2]);
1693 else if(active_width[1]- h > active_width[6])
1694 b = 1073741823L; /* 2^30 - 1 */
1695 else b = badness(active_width[1]- h, active_width[6]);
1696 if(b < 1073741823L) /* 2^30 - 1 */
1706 best_height_plus_depth = active_width[1]+ prevdp;
1708 if((b == 1073741823L)||(pi <= -10000)) /* 2^30 - 1 */
1711 if((mem[p].hh.b0 < 10)||(mem[p].hh.b0 > 11))
1713 lab90: if(mem[p].hh.b0 == 11)
1717 q = mem[p + 1].hh.v.LH;
1718 active_width[2 + mem[q].hh.b0]= active_width[2 + mem[q]
1719 .hh.b0]+ mem[q + 2].cint;
1720 active_width[6]= active_width[6]+ mem[q + 3].cint;
1721 if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0))
1723 print_err("Infinite glue shrinkage found in box being split");
1724 help4("The box you are \\vsplitting contains some infinitely",
1725 "shrinkable glue, e.g., `\\vss' or `\\vskip 0pt minus 1fil'.",
1726 "Such glue doesn't belong there; but you can safely proceed,",
1727 "since the offensive shrinkability has been made finite.");
1732 mem[p + 1].hh.v.LH = r;
1736 active_width[1]= active_width[1]+ prevdp + mem[q + 1].cint;
1738 lab45: if(prevdp > d)
1740 active_width[1]= active_width[1]+ prevdp - d;
1744 p = mem[prevp].hh.v.RH;
1746 lab30: Result = best_place; /* best_place may be used ... */
1749 /* called only from tex7.c */
1750 halfword vsplit_(eight_bits n, scaled h)
1751 {/* 10 30 */ register halfword Result;
1755 v = eqtb[(hash_size + 1578) + n].hh.v.RH;
1758 delete_token_ref(cur_mark[3]);
1760 delete_token_ref(cur_mark[4]);
1763 if(v == 0) /* if v=null then l.18999 */
1765 Result = 0; /* begin vsplit:=null; return; */
1768 if(mem[v].hh.b0 != 1)
1771 print_esc("vsplit");
1772 print_string("needs a ");
1774 help2("The box you are trying to split is an \\hbox.",
1775 "I can't split such a box, so I'll leave it alone.");
1780 q = vert_break(mem[v + 5].hh.v.RH, h, eqtb[(hash_size + 3736)].cint);
1781 p = mem[v + 5].hh.v.RH;
1783 mem[v + 5].hh.v.RH = 0;
1785 if(mem[p].hh.b0 == 4)
1788 cur_mark[3]= mem[p + 1].cint;
1789 cur_mark[4]= cur_mark[3];
1790 mem[cur_mark[3]].hh.v.LH = mem[cur_mark[3]].hh.v.LH + 2;
1793 delete_token_ref(cur_mark[4]);
1794 cur_mark[4]= mem[p + 1].cint;
1795 incr(mem[cur_mark[4]].hh.v.LH);
1797 if(mem[p].hh.v.RH == q)
1805 q = prune_page_top(q);
1806 p = mem[v + 5].hh.v.RH;
1808 if(q == 0) /* if q=null l.18993 */
1809 eqtb[(hash_size + 1578) + n].hh.v.RH = 0; /* then box(n):=null */
1810 else eqtb[(hash_size + 1578) + n].hh.v.RH =
1811 vpackage(q, 0, 1, 1073741823L); /* 2^30 - 1 */
1812 Result = vpackage(p, h, 0, eqtb[(hash_size + 3736)].cint);
1815 void print_totals (void)
1817 print_scaled(page_so_far[1]);
1818 if(page_so_far[2]!= 0)
1820 print_string(" plus ");
1821 print_scaled(page_so_far[2]);
1824 if(page_so_far[3]!= 0)
1826 print_string(" plus ");
1827 print_scaled(page_so_far[3]);
1828 print_string("fil");
1830 if(page_so_far[4]!= 0)
1832 print_string(" plus ");
1833 print_scaled(page_so_far[4]);
1834 print_string("fill");
1836 if(page_so_far[5]!= 0)
1838 print_string(" plus ");
1839 print_scaled(page_so_far[5]);
1840 print_string("filll");
1842 if(page_so_far[6]!= 0)
1844 print_string(" minus ");
1845 print_scaled(page_so_far[6]);
1848 void freeze_page_specs_(small_number s)
1851 page_so_far[0]= eqtb[(hash_size + 3734)].cint;
1852 page_max_depth = eqtb[(hash_size + 3735)].cint;
1860 least_page_cost = 1073741823L; /* 2^30 - 1 */
1863 if(eqtb[(hash_size + 3196)].cint > 0)
1865 begin_diagnostic ();
1866 print_nl("might split"); /* */
1867 print_scaled(page_so_far[0]);
1868 print_string(", max depth=");
1869 print_scaled(page_max_depth);
1870 end_diagnostic(false);
1874 void box_error_(eight_bits n)
1877 begin_diagnostic ();
1878 print_nl("The following box has been deleted:"); /* */
1879 show_box(eqtb[(hash_size + 1578) + n].hh.v.RH);
1880 end_diagnostic(true);
1881 flush_node_list(eqtb[(hash_size + 1578) + n].hh.v.RH);
1882 eqtb[(hash_size + 1578) + n].hh.v.RH = 0;
1884 void ensure_vbox_(eight_bits n)
1887 p = eqtb[(hash_size + 1578) + n].hh.v.RH;
1888 if(p != 0) /* if p<>null then if type(p)=hlist_node then l.19324 */
1889 if(mem[p].hh.b0 == 0)
1891 print_err("Insertions can only be added to a vbox");
1892 help3("Tut tut: You're trying to \\insert into a",
1893 "\\box register that now contains an \\hbox.",
1894 "Proceed, and I'll discard its present contents.");
1898 /* called only from tex7.c */
1899 void fire_up_(halfword c)
1901 halfword p, q, r, s;
1903 /* unsigned char n; */
1904 unsigned int n; /* 95/Jan/7 */
1906 integer savevbadness;
1908 halfword savesplittopskip;
1909 if(mem[best_page_break].hh.b0 == 12)
1911 geq_word_define((hash_size + 3202), mem[best_page_break + 1].cint);
1912 mem[best_page_break + 1].cint = 10000;
1914 else geq_word_define((hash_size + 3202), 10000);
1918 delete_token_ref(cur_mark[0]);
1919 cur_mark[0]= cur_mark[2];
1920 incr(mem[cur_mark[0]].hh.v.LH);
1921 delete_token_ref(cur_mark[1]);
1924 if(c == best_page_break)
1925 best_page_break = 0;
1926 if(eqtb[(hash_size + 1833)].hh.v.RH != 0)
1930 print_string("255 is not void");
1931 help2("You shouldn't use \\box255 except in \\output routines.",
1932 "Proceed, and I'll discard its present contents.");
1935 insert_penalties = 0;
1936 savesplittopskip = eqtb[(hash_size + 792)].hh.v.RH;
1937 if(eqtb[(hash_size + 3216)].cint <= 0)
1939 r = mem[mem_top].hh.v.RH;
1940 while(r != mem_top){
1942 if(mem[r + 2].hh.v.LH != 0)
1946 /* if box(n)=null then box(n):=new_null_box; l.19759 */
1947 if(eqtb[(hash_size + 1578) + n].hh.v.RH == 0)
1948 eqtb[(hash_size + 1578) + n].hh.v.RH = new_null_box ();
1949 p = eqtb[(hash_size + 1578) + n].hh.v.RH + 5;
1950 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
1951 mem[r + 2].hh.v.RH = p;
1958 prevp = mem_top - 2;
1959 p = mem[prevp].hh.v.RH;
1960 while(p != best_page_break){
1962 if(mem[p].hh.b0 == 3)
1964 if(eqtb[(hash_size + 3216)].cint <= 0)
1966 r = mem[mem_top].hh.v.RH;
1967 while(mem[r].hh.b1 != mem[p].hh.b1)r = mem[r].hh.v.RH
1969 /* if best_ins_ptr(r)=null then wait:=true l.19783 */
1970 if(mem[r + 2].hh.v.LH == 0)
1975 s = mem[r + 2].hh.v.RH;
1976 mem[s].hh.v.RH = mem[p + 4].hh.v.LH;
1977 if(mem[r + 2].hh.v.LH == p)
1979 if(mem[r].hh.b0 == 1)
1980 if((mem[r + 1].hh.v.LH == p)&&(mem[r + 1].hh.v.RH
1983 while(mem[s].hh.v.RH != mem[r + 1].hh.v.RH)s = mem
1986 eqtb[(hash_size + 792)].hh.v.RH = mem[p + 4].hh.v.RH;
1987 mem[p + 4].hh.v.LH = prune_page_top(mem[r + 1].hh.v.RH
1989 if(mem[p + 4].hh.v.LH != 0)
1991 temp_ptr = vpackage(mem[p + 4].hh.v.LH, 0, 1,
1992 1073741823L); /* 2^30 - 1 */
1993 mem[p + 3].cint = mem[temp_ptr + 3].cint + mem[
1995 free_node(temp_ptr, 7);
1999 mem[r + 2].hh.v.LH = 0;
2001 temp_ptr = mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 5].hh.v.RH;
2002 free_node(eqtb[(hash_size + 1578) + n].hh.v.RH, 7);
2003 eqtb[(hash_size + 1578) + n].hh.v.RH = vpackage(temp_ptr, 0, 1,
2004 1073741823L); /* 2^30 - 1 */
2008 while(mem[s].hh.v.RH != 0)s = mem[s].hh.v.RH;
2009 mem[r + 2].hh.v.RH = s;
2012 mem[prevp].hh.v.RH = mem[p].hh.v.RH;
2018 incr(insert_penalties);
2022 delete_glue_ref(mem[p + 4].hh.v.RH);
2028 else if(mem[p].hh.b0 == 4)
2032 cur_mark[1]= mem[p + 1].cint;
2033 incr(mem[cur_mark[1]].hh.v.LH);
2036 delete_token_ref(cur_mark[2]);
2037 cur_mark[2]= mem[p + 1].cint;
2038 incr(mem[cur_mark[2]].hh.v.LH);
2041 p = mem[prevp].hh.v.RH;
2043 eqtb[(hash_size + 792)].hh.v.RH = savesplittopskip;
2044 if(p != 0) /* if p<>null then l.19730 */
2046 if(mem[mem_top - 1].hh.v.RH == 0)/* if link(contrib_head)=null then */
2049 else nest[0].tail_field = page_tail;
2050 mem[page_tail].hh.v.RH = mem[mem_top - 1].hh.v.RH;
2051 mem[mem_top - 1].hh.v.RH = p;
2052 mem[prevp].hh.v.RH = 0; /* link(prev_p):=null; */
2054 savevbadness = eqtb[(hash_size + 3190)].cint;
2055 eqtb[(hash_size + 3190)].cint = 10000;
2056 savevfuzz = eqtb[(hash_size + 3739)].cint;
2057 eqtb[(hash_size + 3739)].cint = 1073741823L; /* 2^30 - 1 */
2058 eqtb[(hash_size + 1833)].hh.v.RH = vpackage(mem[mem_top - 2].hh.v.RH,
2059 best_size, 0, page_max_depth);
2060 eqtb[(hash_size + 3190)].cint = savevbadness;
2061 eqtb[(hash_size + 3739)].cint = savevfuzz;
2062 /* if(last_glue != 262143L) */
2063 if(last_glue != empty_flag)
2064 delete_glue_ref(last_glue);
2066 page_tail = mem_top - 2;
2067 mem[mem_top - 2].hh.v.RH = 0;
2068 /* last_glue = 262143L; */
2069 last_glue = empty_flag;
2074 if(q != mem_top - 4)
2076 mem[mem_top - 2].hh.v.RH = mem[mem_top - 4].hh.v.RH;
2079 r = mem[mem_top].hh.v.RH;
2080 while(r != mem_top){
2086 mem[mem_top].hh.v.RH = mem_top;
2087 /* if (top_mark<>null)and(first_mark=null) then l.19654 */
2088 if((cur_mark[0]!= 0)&&(cur_mark[1]== 0))
2090 cur_mark[1]= cur_mark[0];
2091 incr(mem[cur_mark[0]].hh.v.LH);
2093 /* if output_routine<>null then */
2094 if(eqtb[(hash_size + 1313)].hh.v.RH != 0)
2095 if(dead_cycles >= eqtb[(hash_size + 3203)].cint)
2097 print_err("Output loop---");
2098 print_int(dead_cycles);
2099 print_string(" consecutive dead cycles");
2100 help3("I've concluded that your \\output is awry; it never does",
2101 "\\ship_out, so I'm shipping \box255 out myself. Next ",
2102 "increase \\maxdeadcycles if you want me to be more patient!");
2106 output_active = true;
2110 cur_list.aux_field.cint = ignore_depth;
2111 mode_line = - (integer) line;
2112 begin_token_list(eqtb[(hash_size + 1313)].hh.v.RH, 6); /* output */
2114 normal_paragraph ();
2119 if(mem[mem_top - 2].hh.v.RH != 0)
2121 if(mem[mem_top - 1].hh.v.RH == 0)
2124 else nest[0].tail_field = page_tail;
2125 else mem[page_tail].hh.v.RH = mem[mem_top - 1].hh.v.RH;
2126 mem[mem_top - 1].hh.v.RH = mem[mem_top - 2].hh.v.RH;
2127 mem[mem_top - 2].hh.v.RH = 0;
2128 page_tail = mem_top - 2;
2130 ship_out(eqtb[(hash_size + 1833)].hh.v.RH);
2131 eqtb[(hash_size + 1833)].hh.v.RH = 0;
2134 /* used to continue here with build_page etc in tex6.c */