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 */
26 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
28 /* rebox_ used to be in tex4.c */
30 halfword rebox_(halfword b, scaled w)
31 {register halfword Result;
33 internal_font_number f;
35 /* begin if (width(b)<>w)and(list_ptr(b)<>null) then l.14010 */
36 if ((mem[b + 1].cint != w) && (mem[b + 5].hh.v.RH != 0)) {
37 if (mem[b].hh.b0 == 1)
39 p = mem[b + 5].hh.v.RH;
40 /* if (is_char_node(p))and(link(p)=null) then l.14013 */
41 if (((p >= hi_mem_min)) &&(mem[p].hh.v.RH == 0)) {
43 v = font_info[width_base[f]+ font_info[char_base[f]+ mem[p].hh.b1].qqqq.b0].cint;
44 if (v != mem[b + 1].cint)
45 mem[p].hh.v.RH = new_kern(mem[b + 1].cint - v);
50 /* while link(p)<>null do p:=link(p); l.14019 */
51 while (mem[p].hh.v.RH != 0) p = mem[p].hh.v.RH;
52 mem[p].hh.v.RH = new_glue(12);
53 Result = hpack(b, w, 0);
60 /* This is to be the start of tex5.c */
61 halfword math_glue_(halfword g, scaled m)
63 register halfword Result;
67 n = x_over_n(m, 65536L);
74 mem[p + 1].cint = mult_and_add(n, mem[g + 1].cint, xn_over_d(mem[g + 1].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
75 mem[p].hh.b0 = mem[g].hh.b0;
76 if (mem[p].hh.b0 == 0)
77 mem[p + 2].cint = mult_and_add(n, mem[g + 2].cint, xn_over_d(mem[g + 2].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
79 mem[p + 2].cint = mem[g + 2].cint;
80 mem[p].hh.b1 = mem[g].hh.b1;
81 if (mem[p].hh.b1 == 0)
82 mem[p + 3].cint = mult_and_add(n, mem[g + 3].cint, xn_over_d(mem[g + 3].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
84 mem[p + 3].cint = mem[g + 3].cint;
88 void math_kern_ (halfword p, scaled m)
92 if (mem[p].hh.b1 == 99)
94 n = x_over_n(m, 65536L);
101 mem[p + 1].cint = mult_and_add(n, mem[p + 1].cint, xn_over_d(mem
102 [p + 1].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
103 /* mem[p].hh.b1 = 0; */
104 mem[p].hh.b1 = 1; /* changed in 3.14159 */
107 void flush_math (void)
109 flush_node_list(mem[head].hh.v.RH);
110 flush_node_list(cur_list.aux_field.cint);
111 mem[head].hh.v.RH = 0;
113 cur_list.aux_field.cint = 0;
115 halfword clean_box_(halfword p, small_number s)
116 {/* 40 */ register halfword Result;
118 small_number savestyle;
121 switch(mem[p].hh.v.RH)
124 cur_mlist = new_noad();
125 mem[cur_mlist + 1]= mem[p];
135 cur_mlist = mem[p].hh.v.LH;
144 savestyle = cur_style;
146 mlist_penalties = false;
148 q = mem[temp_head].hh.v.RH;
149 cur_style = savestyle;
153 else cur_size = 16 *((cur_style - 2)/ 2);
154 cur_mu = x_over_n(font_info[6 +
155 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint, 18);
157 lab40: if ((q >= hi_mem_min)||(q == 0))
159 else if ((mem[q].hh.v.RH == 0)&&(mem[q].hh.b0 <= 1)&&(mem
162 else x = hpack(q, 0, 1);
163 q = mem[x + 5].hh.v.RH;
164 if ((q >= hi_mem_min))
167 /* if r<>null then if link(r)=null then l.14140 */
169 if (mem[r].hh.v.RH == 0)
170 if (!(r >= hi_mem_min))
171 if (mem[r].hh.b0 == 11)
174 mem[q].hh.v.RH = 0; /* link(q):=null; */
180 void fetch_(halfword a)
182 cur_c = mem[a].hh.b1;
183 cur_f = eqtb[(hash_size + 1835) + mem[a].hh.b0 + cur_size].hh.v.RH;
187 print_size(cur_size);
189 print_int(mem[a].hh.b0);
190 print_string("is undefined (character ");
193 help4("Somewhere in the math formula just ended, you used the",
194 "stated character from an undefined font family. For example,",
195 "plain TeX doesn't allow \\it or \\sl in subscripts. Proceed,",
196 "and I'll try to forget that I needed that character.");
198 cur_i = null_character;
203 if ((cur_c >= font_bc[cur_f])&&(cur_c <= font_ec[cur_f]))
204 cur_i = font_info[char_base[cur_f]+ cur_c].qqqq;
205 else cur_i = null_character;
206 if (!((cur_i.b0 > 0)))
208 char_warning(cur_f, cur_c);
213 void make_over_(halfword q)
215 mem[q + 1].hh.v.LH = overbar(clean_box(q + 1, 2 *(cur_style / 2)
216 + 1), 3 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]
217 ].cint, font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]]
219 mem[q + 1].hh.v.RH = 2;
221 void make_under_(halfword q)
225 x = clean_box(q + 1, cur_style);
226 p = new_kern(3 * font_info[8 +
227 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
229 mem[p].hh.v.RH = fraction_rule(font_info[8 +
230 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
231 y = vpackage(x, 0, 1, 1073741823L); /* 2^30 - 1 */
232 delta = mem[y + 3].cint + mem[y + 2].cint + font_info[8 +
233 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
234 mem[y + 3].cint = mem[x + 3].cint;
235 mem[y + 2].cint = delta - mem[y + 3].cint;
236 mem[q + 1].hh.v.LH = y;
237 mem[q + 1].hh.v.RH = 2;
239 void make_vcenter_(halfword q)
243 v = mem[q + 1].hh.v.LH;
244 if (mem[v].hh.b0 != 1){
245 confusion("vcenter");
246 return; // abort_flag set
248 delta = mem[v + 3].cint + mem[v + 2].cint;
249 mem[v + 3].cint = font_info[22 +
250 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + half(delta);
251 mem[v + 2].cint = delta - mem[v + 3].cint;
253 void make_radical_(halfword q)
257 x = clean_box(q + 1, 2 *(cur_style / 2)+ 1);
260 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint +
261 (abs(font_info[5 + param_base[eqtb[(hash_size + 1837) +
262 cur_size].hh.v.RH]].cint)/ 4);
266 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
267 clr = clr +(abs(clr)/ 4);
269 y = var_delimiter(q + 4, cur_size, mem[x + 3].cint + mem[x + 2]
270 .cint + clr + font_info[8 +
271 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
272 delta = mem[y + 2].cint -(mem[x + 3].cint + mem[x + 2].cint +
275 clr = clr + half(delta);
276 mem[y + 4].cint = - (integer)(mem[x + 3].cint + clr);
277 mem[y].hh.v.RH = overbar(x, clr, mem[y + 3].cint);
278 mem[q + 1].hh.v.LH = hpack(y, 0, 1);
279 mem[q + 1].hh.v.RH = 2;
281 void make_math_accent_(halfword q)
286 internal_font_number f;
299 if (mem[q + 1].hh.v.RH == 1)
302 if (((cur_i.b2)% 4)== 1)
304 a = lig_kern_base[cur_f]+ cur_i.b3;
305 cur_i = font_info[a].qqqq;
308 a = lig_kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3 + 32768L - 256
310 cur_i = font_info[a].qqqq;
313 if (cur_i.b1 == skew_char[cur_f])
317 s = font_info[kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3]
323 a = a + cur_i.b0 + 1;
324 cur_i = font_info[a].qqqq;
329 x = clean_box(q + 1, 2 *(cur_style / 2)+ 1);
336 i = font_info[char_base[f]+ y].qqqq;
339 if (font_info[width_base[f]+ i.b0].cint > w)
341 /* long to unsigned short ... */
345 if (h < font_info[5 + param_base[f]].cint)
347 else delta = font_info[5 + param_base[f]].cint;
348 if ((mem[q + 2].hh.v.RH != 0)||(mem[q + 3].hh.v.RH != 0)
350 if (mem[q + 1].hh.v.RH == 1)
354 mem[x + 1]= mem[q + 1];
355 mem[x + 2]= mem[q + 2];
356 mem[x + 3]= mem[q + 3];
357 mem[q + 2].hh = empty_field;
358 mem[q + 3].hh = empty_field;
359 mem[q + 1].hh.v.RH = 3;
360 mem[q + 1].hh.v.LH = x;
361 x = clean_box(q + 1, cur_style);
362 delta = delta + mem[x + 3].cint - h;
366 mem[y + 4].cint = s + half(w - mem[y + 1].cint);
368 p = new_kern(- (integer) delta);
371 y = vpackage(y, 0, 1, 1073741823L); /* 2^30 - 1 */
372 mem[y + 1].cint = mem[x + 1].cint;
373 if (mem[y + 3].cint < h)
375 p = new_kern(h - mem[y + 3].cint);
376 mem[p].hh.v.RH = mem[y + 5].hh.v.RH;
377 mem[y + 5].hh.v.RH = p;
380 mem[q + 1].hh.v.LH = y;
381 mem[q + 1].hh.v.RH = 2;
384 void make_fraction_(halfword q)
386 halfword p, v, x, y, z;
387 scaled delta, delta1, delta2, shiftup, shiftdown, clr;
388 if (mem[q + 1].cint == 1073741824L) /* 2^30 */
389 mem[q + 1].cint = font_info[8 +
390 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
391 x = clean_box(q + 2, cur_style + 2 - 2 *(cur_style / 6));
392 z = clean_box(q + 3, 2 *(cur_style / 2)+ 3 - 2 *(cur_style / 6));
393 if (mem[x + 1].cint < mem[z + 1].cint)
394 x = rebox(x, mem[z + 1].cint);
395 else z = rebox(z, mem[x + 1].cint);
398 shiftup = font_info[8 +
399 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
400 shiftdown = font_info[11 +
401 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
405 shiftdown = font_info[12 +
406 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
407 if (mem[q + 1].cint != 0)
408 shiftup = font_info[9 +
409 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
410 else shiftup = font_info[10 +
411 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
413 if (mem[q + 1].cint == 0)
416 clr = 7 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]
418 else clr = 3 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
420 delta = half(clr -((shiftup - mem[x + 2].cint)-(mem[z + 3]
421 .cint - shiftdown)));
424 shiftup = shiftup + delta;
425 shiftdown = shiftdown + delta;
431 clr = 3 * mem[q + 1].cint;
432 else clr = mem[q + 1].cint;
433 delta = half(mem[q + 1].cint);
434 delta1 = clr -((shiftup - mem[x + 2].cint)-(font_info[22 +
435 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + delta));
436 delta2 = clr -((font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size]
437 .hh.v.RH]].cint - delta)-(mem[z + 3].cint - shiftdown));
439 shiftup = shiftup + delta1;
441 shiftdown = shiftdown + delta2;
445 mem[v + 3].cint = shiftup + mem[x + 3].cint;
446 mem[v + 2].cint = mem[z + 2].cint + shiftdown;
447 mem[v + 1].cint = mem[x + 1].cint;
448 if (mem[q + 1].cint == 0)
450 p = new_kern((shiftup - mem[x + 2].cint)-(mem[z + 3].cint -
456 y = fraction_rule(mem[q + 1].cint);
457 p = new_kern((font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
458 .v.RH]].cint - delta)-(mem[z + 3].cint - shiftdown));
461 p = new_kern((shiftup - mem[x + 2].cint)-(font_info[22 +
462 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + delta));
466 mem[v + 5].hh.v.RH = x;
468 delta = font_info[20 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
470 else delta = font_info[21 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH
472 x = var_delimiter(q + 4, cur_size, delta);
474 z = var_delimiter(q + 5, cur_size, delta);
476 mem[q + 1].cint = hpack(x, 0, 1);
478 /***************************************************************************/
479 /* moved to end to avoid questions about pragma optimize 96/Sep/12 */
480 scaled make_op_ (halfword);
481 /***************************************************************************/
482 void make_ord_(halfword q)
486 lab20: if (mem[q + 3].hh.v.RH == 0)
487 if (mem[q + 2].hh.v.RH == 0)
488 if (mem[q + 1].hh.v.RH == 1)
492 if ((mem[p].hh.b0 >= 16)&&(mem[p].hh.b0 <= 22))
493 if (mem[p + 1].hh.v.RH == 1)
494 if (mem[p + 1].hh.b0 == mem[q + 1].hh.b0)
496 mem[q + 1].hh.v.RH = 4;
498 if (((cur_i.b2)% 4)== 1)
500 a = lig_kern_base[cur_f]+ cur_i.b3;
501 cur_c = mem[p + 1].hh.b1;
502 cur_i = font_info[a].qqqq;
505 a = lig_kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3 + 32768L - 256
507 cur_i = font_info[a].qqqq;
510 if (cur_i.b1 == cur_c)
514 p = new_kern(font_info[kern_base[cur_f]+ 256 * cur_i.b2 + cur_i
516 mem[p].hh.v.RH = mem[q].hh.v.RH;
524 pause_for_instructions();
530 mem[q + 1].hh.b1 = cur_i.b3;
534 mem[p + 1].hh.b1 = cur_i.b3;
541 mem[r + 1].hh.b1 = cur_i.b3;
542 mem[r + 1].hh.b0 = mem[q + 1].hh.b0;
546 mem[r + 1].hh.v.RH = 1;
547 else mem[r + 1].hh.v.RH = 4;
552 mem[q].hh.v.RH = mem[p].hh.v.RH;
553 mem[q + 1].hh.b1 = cur_i.b3;
554 mem[q + 3]= mem[p + 3];
555 mem[q + 2]= mem[p + 2];
562 mem[q + 1].hh.v.RH = 1;
567 a = a + cur_i.b0 + 1;
568 cur_i = font_info[a].qqqq;
574 /***************************************************************************/
575 /* moved to end to avoid questions about pragma optimize 96/Sep/12 */
576 void make_scripts_ (halfword, scaled);
577 /***************************************************************************/
578 small_number make_left_right_(halfword q, small_number style, scaled maxd, scaled max_h)
579 {register small_number Result;
580 scaled delta, delta1, delta2;
583 else cur_size = 16 *((style - 2)/ 2);
584 delta2 = maxd + font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
586 delta1 = max_h + maxd - delta2;
589 delta =(delta1 / 500) * delimiter_factor;
590 delta2 = delta1 + delta1 - delimiter_shortfall;
593 mem[q + 1].cint = var_delimiter(q + 1, cur_size, delta);
594 Result = mem[q].hh.b0 -(10);
597 void mlist_to_hlist (void)
598 {/* 21 82 80 81 83 30 */
602 small_number savestyle;
605 /* small_number rtype; */
606 int rtype; /* 95/Jan/7 */
607 /* small_number t; */
608 int t; /* 95/Jan/7 */
615 penalties = mlist_penalties;
625 else cur_size = 16 *((cur_style - 2)/ 2);
626 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
632 switch(mem[q].hh.b0){
656 if (rtype == 18) mem[r].hh.b0 = 16;
657 if (mem[q].hh.b0 == 31) goto lab80;
672 if (mem[q].hh.b1 == 1)
700 cur_style = mem[q].hh.b1;
704 else cur_size = 16 *((cur_style - 2)/ 2);
705 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
706 .hh.v.RH]].cint, 18);
713 switch(cur_style / 2)
716 p = mem[q + 1].hh.v.LH;
717 mem[q + 1].hh.v.LH = 0;
722 p = mem[q + 1].hh.v.RH;
723 mem[q + 1].hh.v.RH = 0;
728 p = mem[q + 2].hh.v.LH;
729 mem[q + 2].hh.v.LH = 0;
734 p = mem[q + 2].hh.v.RH;
735 mem[q + 2].hh.v.RH = 0;
739 flush_node_list(mem[q + 1].hh.v.LH);
740 flush_node_list(mem[q + 1].hh.v.RH);
741 flush_node_list(mem[q + 2].hh.v.LH);
742 flush_node_list(mem[q + 2].hh.v.RH);
744 mem[q].hh.b1 = cur_style;
747 if (p != 0)/* if p<>null then l.14317 */
751 /* while link(p)<>null do p:=link(p); */
752 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
768 if (mem[q + 3].cint > max_h)
769 max_h = mem[q + 3].cint;
770 if (mem[q + 2].cint > maxd)
771 maxd = mem[q + 2].cint;
777 if (mem[q].hh.b1 == 99)
779 x = mem[q + 1].hh.v.LH;
780 y = math_glue(x, cur_mu);
782 mem[q + 1].hh.v.LH = y;
785 else if ((cur_size != 0)&&(mem[q].hh.b1 == 98))
788 /* if p<>null then if (type(p)=glue_node)or(type(p)=kern_node) then */
790 if ((mem[p].hh.b0 == 10)||(mem[p].hh.b0 == 11))
792 mem[q].hh.v.RH = mem[p].hh.v.RH;
802 math_kern(q, cur_mu);
809 return; // abort_flag set
812 } /* end of switch */
814 switch(mem[q + 1].hh.v.RH){
821 delta = font_info[italic_base[cur_f]+(cur_i.b2)/ 4].cint;
822 p = new_character(cur_f, cur_c);
823 if ((mem[q + 1].hh.v.RH == 4)&&(font_info[2 + param_base
826 if ((mem[q + 3].hh.v.RH == 0)&&(delta != 0))
828 mem[p].hh.v.RH = new_kern(delta);
839 p = mem[q + 1].hh.v.LH;
843 cur_mlist = mem[q + 1].hh.v.LH;
844 savestyle = cur_style;
845 mlist_penalties = false;
847 cur_style = savestyle;
851 else cur_size = 16 *((cur_style - 2)/ 2);
852 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
853 .hh.v.RH]].cint, 18);
855 p = hpack(mem[temp_head].hh.v.RH, 0, 1);
861 return; // abort_flag set
864 } /* end of switch */
866 mem[q + 1].cint = p; /* p may be used without ... */
867 if ((mem[q + 3].hh.v.RH == 0)&&(mem[q + 2].hh.v.RH == 0)
870 make_scripts(q, delta);
871 lab82: z = hpack(mem[q + 1].cint, 0, 1);
872 if (mem[z + 3].cint > max_h)
873 max_h = mem[z + 3].cint;
874 if (mem[z + 2].cint > maxd)
875 maxd = mem[z + 2].cint;
878 rtype = mem[r].hh.b0;
879 lab81: q = mem[q].hh.v.RH;
891 else cur_size = 16 *((cur_style - 2)/ 2);
892 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
911 pen = bin_op_penalty;
940 t = make_left_right(q, style, maxd, max_h);
944 cur_style = mem[q].hh.b1;
949 else cur_size = 16 *((cur_style - 2)/ 2);
950 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
951 .hh.v.RH]].cint, 18);
976 return; // abort_flag set
982 switch(str_pool[rtype * 8 + t + magic_offset])
1006 confusion("mlist4");
1007 return; // abort_flag set
1013 y = math_glue(eqtb[(hash_size + 782) + x].hh.v.RH, cur_mu); /* gluebase + x */
1018 mem[z].hh.b1 = x + 1; /* x may be used without ... */
1021 if (mem[q + 1].cint != 0)
1023 mem[p].hh.v.RH = mem[q + 1].cint;
1026 } while(!(mem[p].hh.v.RH == 0));
1029 if (mem[q].hh.v.RH != 0)
1032 rtype = mem[mem[q].hh.v.RH].hh.b0;
1036 z = new_penalty(pen);
1048 void push_alignment (void)
1052 mem[p].hh.v.RH = align_ptr;
1053 mem[p].hh.v.LH = cur_align;
1054 mem[p + 1].hh.v.LH = mem[align_head].hh.v.RH;
1055 mem[p + 1].hh.v.RH = cur_span;
1056 mem[p + 2].cint = cur_loop;
1057 mem[p + 3].cint = align_state;
1058 mem[p + 4].hh.v.LH = cur_head;
1059 mem[p + 4].hh.v.RH = cur_tail;
1061 cur_head = get_avail();
1063 void pop_alignment (void)
1067 mem[cur_head].hh.v.RH = avail;
1075 cur_tail = mem[p + 4].hh.v.RH;
1076 cur_head = mem[p + 4].hh.v.LH;
1077 align_state = mem[p + 3].cint;
1078 cur_loop = mem[p + 2].cint;
1079 cur_span = mem[p + 1].hh.v.RH;
1080 mem[align_head].hh.v.RH = mem[p + 1].hh.v.LH;
1081 cur_align = mem[p].hh.v.LH;
1082 align_ptr = mem[p].hh.v.RH;
1085 void get_preamble_token (void)
1088 while((cur_chr == 256)&&(cur_cmd == 4)) {
1098 fatal_error("(interwoven alignment preambles are not allowed)"); /* */
1099 return; // abort_flag set
1101 if ((cur_cmd == 75)&&(cur_chr == (hash_size + 793)))
1103 scan_optional_equals();
1105 if (global_defs > 0)
1106 geq_define((hash_size + 793), 117, cur_val);
1107 else eq_define((hash_size + 793), 117, cur_val);
1111 void init_align (void)
1117 align_state = -1000000L;
1118 if ((mode == 203)&&((tail != cur_list
1119 .head_field)||(cur_list.aux_field.cint != 0)))
1121 print_err("Improper ");
1122 print_esc("halign");
1123 print_string("inside $$");
1124 help3("Displays can use special alignments (like \\eqalignno)",
1125 "only if nothing but the alignment itself is between $$'s.",
1126 "So I've deleted the formulas that preceded this alignment.");
1134 cur_list.aux_field.cint = nest[nest_ptr - 2].aux_field.cint;
1137 /* long to short ... */
1138 mode = - (integer) mode;
1139 scan_spec(6, false);
1140 mem[align_head].hh.v.RH = 0;
1141 cur_align = align_head;
1144 warning_index = savecsptr;
1145 align_state = -1000000L;
1147 mem[cur_align].hh.v.RH = new_param_glue(11);
1148 cur_align = mem[cur_align].hh.v.RH;
1154 get_preamble_token();
1157 if ((cur_cmd <= 5)&&(cur_cmd >= 4)&&(align_state == -1000000L))
1158 if ((p == hold_head)&&(cur_loop == 0)&&(cur_cmd == 4))
1159 cur_loop = cur_align;
1161 print_err("Missing # inserted in alignment preamble");
1162 help3("There should be exactly one # between &'s, when an",
1163 "\\halign or \\valign is being set up. In this case you had",
1164 "none, so I've put one in; maybe that will work.");
1168 else if ((cur_cmd != 10)||(p != hold_head))
1170 mem[p].hh.v.RH = get_avail();
1172 mem[p].hh.v.LH = cur_tok;
1176 mem[cur_align].hh.v.RH = new_null_box();
1177 cur_align = mem[cur_align].hh.v.RH;
1178 mem[cur_align].hh.v.LH = end_span;
1179 mem[cur_align + 1].cint = -1073741824L; /* - 2^30 */
1180 mem[cur_align + 3].cint = mem[hold_head].hh.v.RH;
1185 get_preamble_token();
1186 if ((cur_cmd <= 5)&&(cur_cmd >= 4)&&(align_state == -1000000L))
1190 print_err("Only one # is allowed per tab");
1191 help3("There should be exactly one # between &'s, when an",
1192 "\\halign or \\valign is being set up. In this case you had",
1193 "more than one, so I'm ignoring all but the first.");
1197 mem[p].hh.v.RH = get_avail();
1199 mem[p].hh.v.LH = cur_tok;
1201 lab32: mem[p].hh.v.RH = get_avail();
1203 /* mem[p].hh.v.LH = (hash_size + 4614); */
1204 /* mem[p].hh.v.LH = (hash_size + 4095 + 519); */
1205 mem[p].hh.v.LH = (hash_size + hash_extra + 4095 + 519); /* 96/Jan/10 */
1206 mem[cur_align + 2].cint = mem[hold_head].hh.v.RH;
1208 lab30: scanner_status = 0;
1210 /* if every_cr<>null then begin_token_list(every_cr,every_cr_text); l.15665 */
1211 if (every_cr != 0)/* everycr */
1212 begin_token_list(every_cr, 13);
1215 void init_span_ (halfword p)
1219 space_factor = 1000;
1222 cur_list.aux_field.cint = ignore_depth;
1227 void init_row (void)
1233 else cur_list.aux_field.cint = 0;
1235 mem[tail].hh.v.RH = new_glue(mem[mem[align_head]
1236 .hh.v.RH + 1].hh.v.LH);
1237 tail = mem[tail].hh.v.RH;
1239 mem[tail].hh.b1 = 12;
1240 cur_align = mem[mem[align_head].hh.v.RH].hh.v.RH;
1241 cur_tail = cur_head;
1242 init_span(cur_align);
1244 void init_col (void)
1246 mem[cur_align + 5].hh.v.LH = cur_cmd;
1252 begin_token_list(mem[cur_align + 3].cint, 1);
1255 /* fin_col() moved to end to hide in pragma (g, "off") */
1256 /* may need to move more ? everything calling new_null_box() ? */
1262 p = hpack(mem[head].hh.v.RH, 0, 1);
1265 if (cur_head != cur_tail)
1267 mem[tail].hh.v.RH = mem[cur_head].hh.v.RH;
1273 p = vpackage(mem[head].hh.v.RH, 0, 1,
1274 1073741823L); /* 2^30 - 1 */
1276 mem[tail].hh.v.RH = p;
1278 space_factor = 1000;
1281 mem[p + 6].cint = 0;
1282 if (every_cr != 0)/* everycr */
1283 begin_token_list(every_cr, 13);
1286 void fin_align (void)
1288 halfword p, q, r, s, u, v;
1293 memory_word auxsave;
1295 if (cur_group != 6){
1296 confusion("align1");
1297 return; // abort_flag set
1300 if (cur_group != 6){
1301 confusion("align0");
1302 return; // abort_flag set
1305 if (nest[nest_ptr - 1].mode_field == 203)
1308 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1310 flush_list(mem[q + 3].cint);
1311 flush_list(mem[q + 2].cint);
1312 p = mem[mem[q].hh.v.RH].hh.v.RH;
1313 if (mem[q + 1].cint == -1073741824L) /* - 2^30 */
1315 mem[q + 1].cint = 0;
1317 s = mem[r + 1].hh.v.LH;
1320 incr(mem[0].hh.v.RH); /* mem[mem_bot]? mem[null]? */
1322 mem[r + 1].hh.v.LH = 0;
1325 if (mem[q].hh.v.LH != end_span)
1327 t = mem[q + 1].cint + mem[mem[mem[q].hh.v.RH + 1].hh
1334 mem[r + 1].cint = mem[r + 1].cint - t;
1336 while(mem[r].hh.v.RH > n){
1339 n = mem[mem[s].hh.v.LH].hh.v.RH + 1;
1341 if (mem[r].hh.v.RH < n)
1343 mem[r].hh.v.LH = mem[s].hh.v.LH;
1345 decr(mem[r].hh.v.RH);
1350 if (mem[r + 1].cint > mem[mem[s].hh.v.LH + 1].cint)
1351 mem[mem[s].hh.v.LH + 1].cint = mem[r + 1].cint;
1355 } while(!(r == end_span));
1359 mem[q + 3].cint = 0;
1360 mem[q + 2].cint = 0;
1361 mem[q + 5].hh.b1 = 0;
1362 mem[q + 5].hh.b0 = 0;
1363 mem[q + 6].cint = 0;
1364 mem[q + 4].cint = 0;
1367 save_ptr = save_ptr - 2;
1368 pack_begin_line = - (integer) mode_line;
1371 rulesave = overfull_rule;
1373 p = hpack(mem[align_head].hh.v.RH, save_stack[save_ptr + 1].cint, save_stack[save_ptr + 0].cint);
1374 overfull_rule = rulesave;
1378 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1380 mem[q + 3].cint = mem[q + 1].cint;
1381 mem[q + 1].cint = 0;
1382 q = mem[mem[q].hh.v.RH].hh.v.RH;
1384 p = vpackage(mem[align_head].hh.v.RH, save_stack[save_ptr + 1]
1385 .cint, save_stack[save_ptr + 0].cint, 1073741823L); /* 2^30 - 1 */
1386 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1388 mem[q + 1].cint = mem[q + 3].cint;
1389 mem[q + 3].cint = 0;
1390 q = mem[mem[q].hh.v.RH].hh.v.RH;
1393 pack_begin_line = 0;
1394 q = mem[head].hh.v.RH;
1396 while(q != 0){ /* while q<>null l.15794 OK */
1398 if (!(q >= hi_mem_min)) /* begin if not is_char_node(q) then */
1399 if (mem[q].hh.b0 == 13)
1404 mem[q + 1].cint = mem[p + 1].cint;
1409 mem[q + 3].cint = mem[p + 3].cint;
1411 mem[q + 5].hh.b1 = mem[p + 5].hh.b1;
1412 mem[q + 5].hh.b0 = mem[p + 5].hh.b0;
1413 mem[q + 6].gr = mem[p + 6].gr;
1414 mem[q + 4].cint = o;
1415 r = mem[mem[q + 5].hh.v.RH].hh.v.RH;
1416 s = mem[mem[p + 5].hh.v.RH].hh.v.RH;
1419 t = mem[s + 1].cint;
1426 v = mem[s + 1].hh.v.LH;
1427 mem[u].hh.v.RH = new_glue(v);
1430 t = t + mem[v + 1].cint;
1431 if (mem[p + 5].hh.b0 == 1)
1433 if (mem[v].hh.b0 == mem[p + 5].hh.b1)
1434 t = t + round(mem[p + 6].gr * mem[v + 2].cint);
1436 else if (mem[p + 5].hh.b0 == 2)
1438 if (mem[v].hh.b1 == mem[p + 5].hh.b1)
1439 t = t - round(mem[p + 6].gr * mem[v + 3].cint);
1442 mem[u].hh.v.RH = new_null_box();
1444 t = t + mem[s + 1].cint;
1446 mem[u + 1].cint = mem[s + 1].cint;
1450 mem[u + 3].cint = mem[s + 1].cint;
1455 mem[r + 3].cint = mem[q + 3].cint;
1456 mem[r + 2].cint = mem[q + 2].cint;
1457 if (t == mem[r + 1].cint)
1459 mem[r + 5].hh.b0 = 0;
1460 mem[r + 5].hh.b1 = 0;
1461 mem[r + 6].gr = 0.0;
1463 else if (t > mem[r + 1].cint)
1465 mem[r + 5].hh.b0 = 1;
1466 if (mem[r + 6].cint == 0)
1467 mem[r + 6].gr = 0.0;
1468 else mem[r + 6].gr =(t - mem[r + 1].cint)/ ((double)
1473 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1474 mem[r + 5].hh.b0 = 2;
1475 if (mem[r + 4].cint == 0)
1476 mem[r + 6].gr = 0.0;
1477 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 1].cint -
1478 t > mem[r + 4].cint))
1479 mem[r + 6].gr = 1.0;
1480 else mem[r + 6].gr =(mem[r + 1].cint - t)/ ((double)
1483 mem[r + 1].cint = w;
1488 mem[r + 1].cint = mem[q + 1].cint;
1489 if (t == mem[r + 3].cint)
1491 mem[r + 5].hh.b0 = 0;
1492 mem[r + 5].hh.b1 = 0;
1493 mem[r + 6].gr = 0.0;
1495 else if (t > mem[r + 3].cint)
1497 mem[r + 5].hh.b0 = 1;
1498 if (mem[r + 6].cint == 0)
1499 mem[r + 6].gr = 0.0;
1500 else mem[r + 6].gr =(t - mem[r + 3].cint)/ ((double)
1505 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1506 mem[r + 5].hh.b0 = 2;
1507 if (mem[r + 4].cint == 0)
1508 mem[r + 6].gr = 0.0;
1509 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 3].cint -
1510 t > mem[r + 4].cint))
1511 mem[r + 6].gr = 1.0;
1512 else mem[r + 6].gr =(mem[r + 3].cint - t)/ ((double)
1515 mem[r + 3].cint = w;
1518 mem[r + 4].cint = 0;
1521 mem[u].hh.v.RH = mem[r].hh.v.RH;
1522 mem[r].hh.v.RH = mem[hold_head].hh.v.RH;
1525 r = mem[mem[r].hh.v.RH].hh.v.RH;
1526 s = mem[mem[s].hh.v.RH].hh.v.RH;
1529 else if (mem[q].hh.b0 == 2)
1531 if ((mem[q + 1].cint == -1073741824L)) /* 2^30 */
1532 mem[q + 1].cint = mem[p + 1].cint;
1533 if ((mem[q + 3].cint == -1073741824L)) /* 2^30 */
1534 mem[q + 3].cint = mem[p + 3].cint;
1535 if ((mem[q + 2].cint == -1073741824L)) /* 2^30 */
1536 mem[q + 2].cint = mem[p + 2].cint;
1542 mem[q + 4].cint = o;
1552 auxsave = cur_list.aux_field;
1553 p = mem[head].hh.v.RH;
1560 print_err("Missing $$ inserted");
1561 help2("Displays can use special alignments (like \\eqalignno)",
1562 "only if nothing but the alignment itself is between $$'s.");
1570 print_err("Display math should end with $$");
1571 help2("The `$' that I just saw supposedly matches a previous `$$'.",
1572 "So I shall assume that you typed `$$' both times.");
1578 mem[tail].hh.v.RH = new_penalty(pre_display_penalty);
1579 tail = mem[tail].hh.v.RH;
1582 mem[tail].hh.v.RH = new_param_glue(3);
1583 tail = mem[tail].hh.v.RH;
1585 mem[tail].hh.v.RH = p;
1589 mem[tail].hh.v.RH = new_penalty(post_display_penalty);
1590 tail = mem[tail].hh.v.RH;
1593 mem[tail].hh.v.RH = new_param_glue(4);
1594 tail = mem[tail].hh.v.RH;
1596 cur_list.aux_field.cint = auxsave.cint;
1597 resume_after_display();
1601 cur_list.aux_field = auxsave;
1602 mem[tail].hh.v.RH = p;
1603 if (p != 0) /* if p<>null then tail:=q; l.15926 */
1610 /* used to be align_peek, zfintieshrink, etc in old tex5.c */
1611 /************************************************************************/
1612 /* moved down here to avoid questions about pragma optimize */
1613 #pragma optimize("g", off) /* for MC VS compiler */
1614 /* Moved down here 96/Oct/12 in response to problem with texerror.tex */
1615 /* pragma optimize("a", off) not strong enough - this may slow things */
1617 {/* 10 */ register bool Result;
1625 if (cur_align == 0){
1627 return 0; // abort_flag set
1629 q = mem[cur_align].hh.v.RH;
1632 return 0; // abort_flag set
1634 if (align_state < 500000L) { /* ??? */
1635 fatal_error("(interwoven alignment preambles are not allowed)"); /* */
1636 return 0; // abort_flag set
1638 p = mem[q].hh.v.RH; /* p <- link(q) p.791 */
1639 /* if (p = null) ^ (extra_info(cur_align) < cr_code) then p.792 */
1640 if ((p == 0)&&(mem[cur_align + 5].hh.v.LH < 257))
1643 /* potential problem here if new_null_box causes memory reallocation ??? */
1644 /* compiler optimization does not refresh `mem' loaded in registers ? */
1645 mem[q].hh.v.RH = new_null_box();
1647 mem[p].hh.v.LH = end_span;
1648 mem[p + 1].cint = -1073741824L; /* - 2^30 */
1649 cur_loop = mem[cur_loop].hh.v.RH;
1651 r = mem[cur_loop + 3].cint;
1654 mem[q].hh.v.RH = get_avail();
1656 mem[q].hh.v.LH = mem[r].hh.v.LH;
1660 mem[p + 3].cint = mem[hold_head].hh.v.RH;
1662 r = mem[cur_loop + 2].cint;
1665 mem[q].hh.v.RH = get_avail();
1667 mem[q].hh.v.LH = mem[r].hh.v.LH;
1671 mem[p + 2].cint = mem[hold_head].hh.v.RH;
1672 cur_loop = mem[cur_loop].hh.v.RH;
1673 mem[p].hh.v.RH = new_glue(mem[cur_loop + 1].hh.v.LH);
1676 print_err("Extra alignment tab has been changed to ");
1678 help3("You have given more \\span or & marks than there were",
1679 "in the preamble to the \\halign or \\valign now in progress.",
1680 "So I'll assume that you meant to type \\cr instead.");
1681 /* extra_info(cur_align) < cr_code) ? */
1682 mem[cur_align + 5].hh.v.LH = 257;
1685 if (mem[cur_align + 5].hh.v.LH != 256)
1692 adjust_tail = cur_tail;
1693 u = hpack(mem[head].hh.v.RH, 0, 1);
1694 w = mem[u + 1].cint;
1695 cur_tail = adjust_tail;
1700 u = vpackage(mem[head].hh.v.RH, 0, 1, 0);
1701 w = mem[u + 3].cint;
1704 if (cur_span != cur_align)
1709 q = mem[mem[q].hh.v.RH].hh.v.RH;
1710 } while(!(q == cur_align));
1711 /* if n > max_quarterword then confusion("256 spans"); p.798 */
1712 /* if (n > 255) */ /* 94/Apr/4 ? */
1713 if (n > max_quarterword) { /* 96/Oct/12 ??? */
1714 confusion("256 spans"); /* 256 spans --- message wrong now, but ... */
1715 return 0; // abort_flag set
1718 while(mem[mem[q].hh.v.LH].hh.v.RH < n)q = mem[q].hh
1720 if (mem[mem[q].hh.v.LH].hh.v.RH > n)
1723 mem[s].hh.v.LH = mem[q].hh.v.LH;
1726 mem[s + 1].cint = w;
1728 else if (mem[mem[q].hh.v.LH + 1].cint < w)
1729 mem[mem[q].hh.v.LH + 1].cint = w;
1731 else if (w > mem[cur_align + 1].cint)
1732 mem[cur_align + 1].cint = w;
1735 if (total_stretch[3]!= 0)
1737 else if (total_stretch[2]!= 0)
1739 else if (total_stretch[1]!= 0)
1742 mem[u + 5].hh.b1 = o;
1743 mem[u + 6].cint = total_stretch[o];
1744 if (total_shrink[3]!= 0)
1746 else if (total_shrink[2]!= 0)
1748 else if (total_shrink[1]!= 0)
1751 mem[u + 5].hh.b0 = o;
1752 mem[u + 4].cint = total_shrink[o];
1754 mem[tail].hh.v.RH = u;
1758 mem[tail].hh.v.RH = new_glue(mem[mem[cur_align]
1759 .hh.v.RH + 1].hh.v.LH);
1760 tail = mem[tail].hh.v.RH;
1762 mem[tail].hh.b1 = 12;
1763 /* if (extra_info(cur_align) >= cr_code) then p.792 */
1764 if (mem[cur_align + 5].hh.v.LH >= 257)
1771 align_state = 1000000L;
1774 } while(!(cur_cmd != 10));
1780 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1781 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1782 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1783 /* #pragma optimize("g", off) */ /* for MC VS compiler */
1785 scaled make_op_(halfword q)
1786 {register scaled Result;
1788 halfword p, v, x, y, z;
1791 scaled shiftup, shiftdown;
1792 if ((mem[q].hh.b1 == 0)&&(cur_style < 2))
1794 if (mem[q + 1].hh.v.RH == 1)
1797 if ((cur_style < 2)&&(((cur_i.b2)% 4)== 2))
1800 i = font_info[char_base[cur_f]+ c].qqqq;
1805 mem[q + 1].hh.b1 = c;
1808 delta = font_info[italic_base[cur_f]+(cur_i.b2)/ 4].cint;
1809 x = clean_box(q + 1, cur_style);
1810 if ((mem[q + 3].hh.v.RH != 0)&&(mem[q].hh.b1 != 1))
1811 mem[x + 1].cint = mem[x + 1].cint - delta;
1812 mem[x + 4].cint = half(mem[x + 3].cint - mem[x + 2].cint)-
1813 font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
1814 mem[q + 1].hh.v.RH = 2;
1815 mem[q + 1].hh.v.LH = x;
1818 if (mem[q].hh.b1 == 1)
1820 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1821 y = clean_box(q + 1, cur_style);
1822 z = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1825 mem[v + 1].cint = mem[y + 1].cint;
1826 if (mem[x + 1].cint > mem[v + 1].cint)
1827 mem[v + 1].cint = mem[x + 1].cint;
1828 if (mem[z + 1].cint > mem[v + 1].cint)
1829 mem[v + 1].cint = mem[z + 1].cint;
1830 x = rebox(x, mem[v + 1].cint);
1831 y = rebox(y, mem[v + 1].cint);
1832 z = rebox(z, mem[v + 1].cint);
1833 mem[x + 4].cint = half(delta);
1834 mem[z + 4].cint = - (integer) mem[x + 4].cint;
1835 mem[v + 3].cint = mem[y + 3].cint;
1836 mem[v + 2].cint = mem[y + 2].cint;
1837 if (mem[q + 2].hh.v.RH == 0)
1840 mem[v + 5].hh.v.RH = y;
1844 shiftup = font_info[11 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1845 ]].cint - mem[x + 2].cint;
1846 if (shiftup < font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1848 shiftup = font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1850 p = new_kern(shiftup);
1853 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1856 mem[v + 5].hh.v.RH = p;
1857 mem[v + 3].cint = mem[v + 3].cint + font_info[13 + param_base[
1858 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[x + 3].cint + mem
1859 [x + 2].cint + shiftup;
1861 if (mem[q + 3].hh.v.RH == 0)
1865 shiftdown = font_info[12 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1866 .v.RH]].cint - mem[z + 3].cint;
1867 if (shiftdown < font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size]
1869 shiftdown = font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1871 p = new_kern(shiftdown);
1874 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1877 mem[v + 2].cint = mem[v + 2].cint + font_info[13 + param_base[
1878 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[z + 3].cint + mem
1879 [z + 2].cint + shiftdown;
1881 mem[q + 1].cint = v;
1886 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1887 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1888 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1889 /* #pragma optimize ("g", off) */
1891 void make_scripts_(halfword q, scaled delta)
1893 halfword p, x, y, z;
1894 scaled shiftup, shiftdown, clr;
1896 p = mem[q + 1].cint;
1897 if ((p >= hi_mem_min))
1908 shiftup = mem[z + 3].cint - font_info[18 + param_base[eqtb[(hash_size + 1837) +
1910 shiftdown = mem[z + 2].cint + font_info[19 + param_base[eqtb[(hash_size + 1837)
1911 + t].hh.v.RH]].cint;
1914 if (mem[q + 2].hh.v.RH == 0)
1916 x = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1917 mem[x + 1].cint = mem[x + 1].cint + script_space;
1918 if (shiftdown < font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1920 shiftdown = font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH
1922 clr = mem[x + 3].cint -(abs(font_info[5 + param_base[eqtb[
1923 (hash_size + 1837) + cur_size].hh.v.RH]].cint * 4)/ 5);
1924 if (shiftdown < clr)
1926 mem[x + 4].cint = shiftdown;
1931 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1932 mem[x + 1].cint = mem[x + 1].cint + script_space;
1934 clr = font_info[15 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1936 else if (cur_style < 2)
1937 clr = font_info[13 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1939 else clr = font_info[14 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1943 clr = mem[x + 2].cint +(abs(font_info[5 +
1944 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint)/ 4);
1948 if (mem[q + 3].hh.v.RH == 0)
1949 mem[x + 4].cint = - (integer) shiftup;
1951 y = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1952 mem[y + 1].cint = mem[y + 1].cint + script_space;
1953 if (shiftdown < font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size]
1955 shiftdown = font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1957 clr = 4 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1958 ]].cint -((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1962 shiftdown = shiftdown + clr;
1963 clr =(abs(font_info[5 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1964 .v.RH]].cint * 4)/ 5)-(shiftup - mem[x + 2].cint);
1967 shiftup = shiftup + clr;
1968 shiftdown = shiftdown - clr;
1971 mem[x + 4].cint = delta;
1972 p = new_kern((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1976 x = vpackage(x, 0, 1, 1073741823L); /* 2^30 - 1 */
1977 mem[x + 4].cint = shiftdown;
1980 if (mem[q + 1].cint == 0)
1981 mem[q + 1].cint = x;
1984 p = mem[q + 1].cint;
1985 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
1989 /* #pragma optimize ("g", on) */ /* 96/Sep/12 */
1990 /* #pragma optimize ("g") */ /* 94/Jan/25 */
1991 #pragma optimize ("", on) /* 96/Sep/12 */
1992 /***************************************************************************/