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)
32 register halfword Result;
34 internal_font_number f;
36 /* begin if (width(b)<>w)and(list_ptr(b)<>null) then l.14010 */
37 if ((mem[b + 1].cint != w) && (mem[b + 5].hh.v.RH != 0))
39 if (mem[b].hh.b0 == 1)
41 p = mem[b + 5].hh.v.RH;
42 /* if (is_char_node(p))and(link(p)=null) then l.14013 */
43 if (((p >= hi_mem_min)) &&(mem[p].hh.v.RH == 0)) {
45 v = font_info[width_base[f]+ font_info[char_base[f]+ mem[p].hh.b1].qqqq.b0].cint;
46 if (v != mem[b + 1].cint)
47 mem[p].hh.v.RH = new_kern(mem[b + 1].cint - v);
52 /* while link(p)<>null do p:=link(p); l.14019 */
53 while (mem[p].hh.v.RH != 0) p = mem[p].hh.v.RH;
54 mem[p].hh.v.RH = new_glue(12);
55 Result = hpack(b, w, 0);
62 /* This is to be the start of tex5.c */
63 halfword math_glue_(halfword g, scaled m)
65 register halfword Result;
69 n = x_over_n(m, 65536L);
76 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 */
77 mem[p].hh.b0 = mem[g].hh.b0;
78 if (mem[p].hh.b0 == 0)
79 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 */
81 mem[p + 2].cint = mem[g + 2].cint;
82 mem[p].hh.b1 = mem[g].hh.b1;
83 if (mem[p].hh.b1 == 0)
84 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 */
86 mem[p + 3].cint = mem[g + 3].cint;
90 void math_kern_ (halfword p, scaled m)
94 if (mem[p].hh.b1 == 99)
96 n = x_over_n(m, 65536L);
103 mem[p + 1].cint = mult_and_add(n, mem[p + 1].cint, xn_over_d(mem
104 [p + 1].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
105 /* mem[p].hh.b1 = 0; */
106 mem[p].hh.b1 = 1; /* changed in 3.14159 */
109 void flush_math (void)
111 flush_node_list(mem[head].hh.v.RH);
112 flush_node_list(cur_list.aux_field.cint);
113 mem[head].hh.v.RH = 0;
115 cur_list.aux_field.cint = 0;
117 halfword clean_box_(halfword p, small_number s)
118 {/* 40 */ register halfword Result;
120 small_number savestyle;
123 switch(mem[p].hh.v.RH)
126 cur_mlist = new_noad();
127 mem[cur_mlist + 1]= mem[p];
137 cur_mlist = mem[p].hh.v.LH;
146 savestyle = cur_style;
148 mlist_penalties = false;
150 q = mem[temp_head].hh.v.RH;
151 cur_style = savestyle;
155 else cur_size = 16 *((cur_style - 2)/ 2);
156 cur_mu = x_over_n(font_info[6 +
157 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint, 18);
159 lab40: if ((q >= hi_mem_min)||(q == 0))
161 else if ((mem[q].hh.v.RH == 0)&&(mem[q].hh.b0 <= 1)&&(mem
164 else x = hpack(q, 0, 1);
165 q = mem[x + 5].hh.v.RH;
166 if ((q >= hi_mem_min))
169 /* if r<>null then if link(r)=null then l.14140 */
171 if (mem[r].hh.v.RH == 0)
172 if (!(r >= hi_mem_min))
173 if (mem[r].hh.b0 == 11)
176 mem[q].hh.v.RH = 0; /* link(q):=null; */
182 void fetch_(halfword a)
184 cur_c = mem[a].hh.b1;
185 cur_f = eqtb[(hash_size + 1835) + mem[a].hh.b0 + cur_size].hh.v.RH;
189 print_size(cur_size);
191 print_int(mem[a].hh.b0);
192 print_string("is undefined (character ");
195 help4("Somewhere in the math formula just ended, you used the",
196 "stated character from an undefined font family. For example,",
197 "plain TeX doesn't allow \\it or \\sl in subscripts. Proceed,",
198 "and I'll try to forget that I needed that character.");
200 cur_i = null_character;
205 if ((cur_c >= font_bc[cur_f])&&(cur_c <= font_ec[cur_f]))
206 cur_i = font_info[char_base[cur_f]+ cur_c].qqqq;
207 else cur_i = null_character;
208 if (!((cur_i.b0 > 0)))
210 char_warning(cur_f, cur_c);
215 void make_over_(halfword q)
217 mem[q + 1].hh.v.LH = overbar(clean_box(q + 1, 2 *(cur_style / 2)
218 + 1), 3 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]
219 ].cint, font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]]
221 mem[q + 1].hh.v.RH = 2;
223 void make_under_(halfword q)
227 x = clean_box(q + 1, cur_style);
228 p = new_kern(3 * font_info[8 +
229 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
231 mem[p].hh.v.RH = fraction_rule(font_info[8 +
232 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
233 y = vpackage(x, 0, 1, 1073741823L); /* 2^30 - 1 */
234 delta = mem[y + 3].cint + mem[y + 2].cint + font_info[8 +
235 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
236 mem[y + 3].cint = mem[x + 3].cint;
237 mem[y + 2].cint = delta - mem[y + 3].cint;
238 mem[q + 1].hh.v.LH = y;
239 mem[q + 1].hh.v.RH = 2;
241 void make_vcenter_(halfword q)
245 v = mem[q + 1].hh.v.LH;
246 if (mem[v].hh.b0 != 1){
247 confusion("vcenter");
248 return; // abort_flag set
250 delta = mem[v + 3].cint + mem[v + 2].cint;
251 mem[v + 3].cint = font_info[22 +
252 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + half(delta);
253 mem[v + 2].cint = delta - mem[v + 3].cint;
255 void make_radical_(halfword q)
259 x = clean_box(q + 1, 2 *(cur_style / 2)+ 1);
262 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint +
263 (abs(font_info[5 + param_base[eqtb[(hash_size + 1837) +
264 cur_size].hh.v.RH]].cint)/ 4);
268 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
269 clr = clr +(abs(clr)/ 4);
271 y = var_delimiter(q + 4, cur_size, mem[x + 3].cint + mem[x + 2]
272 .cint + clr + font_info[8 +
273 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
274 delta = mem[y + 2].cint -(mem[x + 3].cint + mem[x + 2].cint +
277 clr = clr + half(delta);
278 mem[y + 4].cint = - (integer)(mem[x + 3].cint + clr);
279 mem[y].hh.v.RH = overbar(x, clr, mem[y + 3].cint);
280 mem[q + 1].hh.v.LH = hpack(y, 0, 1);
281 mem[q + 1].hh.v.RH = 2;
283 void make_math_accent_(halfword q)
288 internal_font_number f;
301 if (mem[q + 1].hh.v.RH == 1)
304 if (((cur_i.b2)% 4)== 1)
306 a = lig_kern_base[cur_f]+ cur_i.b3;
307 cur_i = font_info[a].qqqq;
310 a = lig_kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3 + 32768L - 256
312 cur_i = font_info[a].qqqq;
315 if (cur_i.b1 == skew_char[cur_f])
319 s = font_info[kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3]
325 a = a + cur_i.b0 + 1;
326 cur_i = font_info[a].qqqq;
331 x = clean_box(q + 1, 2 *(cur_style / 2)+ 1);
338 i = font_info[char_base[f]+ y].qqqq;
341 if (font_info[width_base[f]+ i.b0].cint > w)
343 /* long to unsigned short ... */
347 if (h < font_info[5 + param_base[f]].cint)
349 else delta = font_info[5 + param_base[f]].cint;
350 if ((mem[q + 2].hh.v.RH != 0)||(mem[q + 3].hh.v.RH != 0)
352 if (mem[q + 1].hh.v.RH == 1)
356 mem[x + 1]= mem[q + 1];
357 mem[x + 2]= mem[q + 2];
358 mem[x + 3]= mem[q + 3];
359 mem[q + 2].hh = empty_field;
360 mem[q + 3].hh = empty_field;
361 mem[q + 1].hh.v.RH = 3;
362 mem[q + 1].hh.v.LH = x;
363 x = clean_box(q + 1, cur_style);
364 delta = delta + mem[x + 3].cint - h;
368 mem[y + 4].cint = s + half(w - mem[y + 1].cint);
370 p = new_kern(- (integer) delta);
373 y = vpackage(y, 0, 1, 1073741823L); /* 2^30 - 1 */
374 mem[y + 1].cint = mem[x + 1].cint;
375 if (mem[y + 3].cint < h)
377 p = new_kern(h - mem[y + 3].cint);
378 mem[p].hh.v.RH = mem[y + 5].hh.v.RH;
379 mem[y + 5].hh.v.RH = p;
382 mem[q + 1].hh.v.LH = y;
383 mem[q + 1].hh.v.RH = 2;
386 void make_fraction_(halfword q)
388 halfword p, v, x, y, z;
389 scaled delta, delta1, delta2, shiftup, shiftdown, clr;
390 if (mem[q + 1].cint == 1073741824L) /* 2^30 */
391 mem[q + 1].cint = font_info[8 +
392 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
393 x = clean_box(q + 2, cur_style + 2 - 2 *(cur_style / 6));
394 z = clean_box(q + 3, 2 *(cur_style / 2)+ 3 - 2 *(cur_style / 6));
395 if (mem[x + 1].cint < mem[z + 1].cint)
396 x = rebox(x, mem[z + 1].cint);
397 else z = rebox(z, mem[x + 1].cint);
400 shiftup = font_info[8 +
401 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
402 shiftdown = font_info[11 +
403 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
407 shiftdown = font_info[12 +
408 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
409 if (mem[q + 1].cint != 0)
410 shiftup = font_info[9 +
411 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
412 else shiftup = font_info[10 +
413 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
415 if (mem[q + 1].cint == 0)
418 clr = 7 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]
420 else clr = 3 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
422 delta = half(clr -((shiftup - mem[x + 2].cint)-(mem[z + 3]
423 .cint - shiftdown)));
426 shiftup = shiftup + delta;
427 shiftdown = shiftdown + delta;
433 clr = 3 * mem[q + 1].cint;
434 else clr = mem[q + 1].cint;
435 delta = half(mem[q + 1].cint);
436 delta1 = clr -((shiftup - mem[x + 2].cint)-(font_info[22 +
437 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + delta));
438 delta2 = clr -((font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size]
439 .hh.v.RH]].cint - delta)-(mem[z + 3].cint - shiftdown));
441 shiftup = shiftup + delta1;
443 shiftdown = shiftdown + delta2;
447 mem[v + 3].cint = shiftup + mem[x + 3].cint;
448 mem[v + 2].cint = mem[z + 2].cint + shiftdown;
449 mem[v + 1].cint = mem[x + 1].cint;
450 if (mem[q + 1].cint == 0)
452 p = new_kern((shiftup - mem[x + 2].cint)-(mem[z + 3].cint -
458 y = fraction_rule(mem[q + 1].cint);
459 p = new_kern((font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
460 .v.RH]].cint - delta)-(mem[z + 3].cint - shiftdown));
463 p = new_kern((shiftup - mem[x + 2].cint)-(font_info[22 +
464 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + delta));
468 mem[v + 5].hh.v.RH = x;
470 delta = font_info[20 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
472 else delta = font_info[21 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH
474 x = var_delimiter(q + 4, cur_size, delta);
476 z = var_delimiter(q + 5, cur_size, delta);
478 mem[q + 1].cint = hpack(x, 0, 1);
480 /***************************************************************************/
481 /* moved to end to avoid questions about pragma optimize 96/Sep/12 */
482 scaled make_op_ (halfword);
483 /***************************************************************************/
484 void make_ord_(halfword q)
488 lab20: if (mem[q + 3].hh.v.RH == 0)
489 if (mem[q + 2].hh.v.RH == 0)
490 if (mem[q + 1].hh.v.RH == 1)
494 if ((mem[p].hh.b0 >= 16)&&(mem[p].hh.b0 <= 22))
495 if (mem[p + 1].hh.v.RH == 1)
496 if (mem[p + 1].hh.b0 == mem[q + 1].hh.b0)
498 mem[q + 1].hh.v.RH = 4;
500 if (((cur_i.b2)% 4)== 1)
502 a = lig_kern_base[cur_f]+ cur_i.b3;
503 cur_c = mem[p + 1].hh.b1;
504 cur_i = font_info[a].qqqq;
507 a = lig_kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3 + 32768L - 256
509 cur_i = font_info[a].qqqq;
512 if (cur_i.b1 == cur_c)
516 p = new_kern(font_info[kern_base[cur_f]+ 256 * cur_i.b2 + cur_i
518 mem[p].hh.v.RH = mem[q].hh.v.RH;
526 pause_for_instructions();
532 mem[q + 1].hh.b1 = cur_i.b3;
536 mem[p + 1].hh.b1 = cur_i.b3;
543 mem[r + 1].hh.b1 = cur_i.b3;
544 mem[r + 1].hh.b0 = mem[q + 1].hh.b0;
548 mem[r + 1].hh.v.RH = 1;
549 else mem[r + 1].hh.v.RH = 4;
554 mem[q].hh.v.RH = mem[p].hh.v.RH;
555 mem[q + 1].hh.b1 = cur_i.b3;
556 mem[q + 3]= mem[p + 3];
557 mem[q + 2]= mem[p + 2];
564 mem[q + 1].hh.v.RH = 1;
569 a = a + cur_i.b0 + 1;
570 cur_i = font_info[a].qqqq;
576 /***************************************************************************/
577 /* moved to end to avoid questions about pragma optimize 96/Sep/12 */
578 void make_scripts_ (halfword, scaled);
579 /***************************************************************************/
580 small_number make_left_right_(halfword q, small_number style, scaled maxd, scaled max_h)
581 {register small_number Result;
582 scaled delta, delta1, delta2;
585 else cur_size = 16 *((style - 2)/ 2);
586 delta2 = maxd + font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
588 delta1 = max_h + maxd - delta2;
591 delta =(delta1 / 500) * delimiter_factor;
592 delta2 = delta1 + delta1 - delimiter_shortfall;
595 mem[q + 1].cint = var_delimiter(q + 1, cur_size, delta);
596 Result = mem[q].hh.b0 -(10);
599 void mlist_to_hlist (void)
600 {/* 21 82 80 81 83 30 */
604 small_number savestyle;
607 /* small_number rtype; */
608 int rtype; /* 95/Jan/7 */
609 /* small_number t; */
610 int t; /* 95/Jan/7 */
617 penalties = mlist_penalties;
627 else cur_size = 16 *((cur_style - 2)/ 2);
628 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
634 switch(mem[q].hh.b0){
658 if (rtype == 18) mem[r].hh.b0 = 16;
659 if (mem[q].hh.b0 == 31) goto lab80;
674 if (mem[q].hh.b1 == 1)
702 cur_style = mem[q].hh.b1;
706 else cur_size = 16 *((cur_style - 2)/ 2);
707 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
708 .hh.v.RH]].cint, 18);
715 switch(cur_style / 2)
718 p = mem[q + 1].hh.v.LH;
719 mem[q + 1].hh.v.LH = 0;
724 p = mem[q + 1].hh.v.RH;
725 mem[q + 1].hh.v.RH = 0;
730 p = mem[q + 2].hh.v.LH;
731 mem[q + 2].hh.v.LH = 0;
736 p = mem[q + 2].hh.v.RH;
737 mem[q + 2].hh.v.RH = 0;
741 flush_node_list(mem[q + 1].hh.v.LH);
742 flush_node_list(mem[q + 1].hh.v.RH);
743 flush_node_list(mem[q + 2].hh.v.LH);
744 flush_node_list(mem[q + 2].hh.v.RH);
746 mem[q].hh.b1 = cur_style;
749 if (p != 0)/* if p<>null then l.14317 */
753 /* while link(p)<>null do p:=link(p); */
754 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
770 if (mem[q + 3].cint > max_h)
771 max_h = mem[q + 3].cint;
772 if (mem[q + 2].cint > maxd)
773 maxd = mem[q + 2].cint;
779 if (mem[q].hh.b1 == 99)
781 x = mem[q + 1].hh.v.LH;
782 y = math_glue(x, cur_mu);
784 mem[q + 1].hh.v.LH = y;
787 else if ((cur_size != 0)&&(mem[q].hh.b1 == 98))
790 /* if p<>null then if (type(p)=glue_node)or(type(p)=kern_node) then */
792 if ((mem[p].hh.b0 == 10)||(mem[p].hh.b0 == 11))
794 mem[q].hh.v.RH = mem[p].hh.v.RH;
804 math_kern(q, cur_mu);
811 return; // abort_flag set
814 } /* end of switch */
816 switch(mem[q + 1].hh.v.RH){
823 delta = font_info[italic_base[cur_f]+(cur_i.b2)/ 4].cint;
824 p = new_character(cur_f, cur_c);
825 if ((mem[q + 1].hh.v.RH == 4)&&(font_info[2 + param_base
828 if ((mem[q + 3].hh.v.RH == 0)&&(delta != 0))
830 mem[p].hh.v.RH = new_kern(delta);
841 p = mem[q + 1].hh.v.LH;
845 cur_mlist = mem[q + 1].hh.v.LH;
846 savestyle = cur_style;
847 mlist_penalties = false;
849 cur_style = savestyle;
853 else cur_size = 16 *((cur_style - 2)/ 2);
854 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
855 .hh.v.RH]].cint, 18);
857 p = hpack(mem[temp_head].hh.v.RH, 0, 1);
863 return; // abort_flag set
866 } /* end of switch */
868 mem[q + 1].cint = p; /* p may be used without ... */
869 if ((mem[q + 3].hh.v.RH == 0)&&(mem[q + 2].hh.v.RH == 0)
872 make_scripts(q, delta);
873 lab82: z = hpack(mem[q + 1].cint, 0, 1);
874 if (mem[z + 3].cint > max_h)
875 max_h = mem[z + 3].cint;
876 if (mem[z + 2].cint > maxd)
877 maxd = mem[z + 2].cint;
880 rtype = mem[r].hh.b0;
881 lab81: q = mem[q].hh.v.RH;
893 else cur_size = 16 *((cur_style - 2)/ 2);
894 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
913 pen = bin_op_penalty;
942 t = make_left_right(q, style, maxd, max_h);
946 cur_style = mem[q].hh.b1;
951 else cur_size = 16 *((cur_style - 2)/ 2);
952 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
953 .hh.v.RH]].cint, 18);
978 return; // abort_flag set
984 switch(str_pool[rtype * 8 + t + magic_offset])
1008 confusion("mlist4");
1009 return; // abort_flag set
1015 y = math_glue(eqtb[(hash_size + 782) + x].hh.v.RH, cur_mu); /* gluebase + x */
1020 mem[z].hh.b1 = x + 1; /* x may be used without ... */
1023 if (mem[q + 1].cint != 0)
1025 mem[p].hh.v.RH = mem[q + 1].cint;
1028 } while(!(mem[p].hh.v.RH == 0));
1031 if (mem[q].hh.v.RH != 0)
1034 rtype = mem[mem[q].hh.v.RH].hh.b0;
1038 z = new_penalty(pen);
1050 void push_alignment (void)
1054 mem[p].hh.v.RH = align_ptr;
1055 mem[p].hh.v.LH = cur_align;
1056 mem[p + 1].hh.v.LH = mem[align_head].hh.v.RH;
1057 mem[p + 1].hh.v.RH = cur_span;
1058 mem[p + 2].cint = cur_loop;
1059 mem[p + 3].cint = align_state;
1060 mem[p + 4].hh.v.LH = cur_head;
1061 mem[p + 4].hh.v.RH = cur_tail;
1063 cur_head = get_avail();
1065 void pop_alignment (void)
1069 mem[cur_head].hh.v.RH = avail;
1077 cur_tail = mem[p + 4].hh.v.RH;
1078 cur_head = mem[p + 4].hh.v.LH;
1079 align_state = mem[p + 3].cint;
1080 cur_loop = mem[p + 2].cint;
1081 cur_span = mem[p + 1].hh.v.RH;
1082 mem[align_head].hh.v.RH = mem[p + 1].hh.v.LH;
1083 cur_align = mem[p].hh.v.LH;
1084 align_ptr = mem[p].hh.v.RH;
1087 void get_preamble_token (void)
1090 while((cur_chr == 256)&&(cur_cmd == 4)) {
1100 fatal_error("(interwoven alignment preambles are not allowed)"); /* */
1101 return; // abort_flag set
1103 if ((cur_cmd == 75)&&(cur_chr == (hash_size + 793)))
1105 scan_optional_equals();
1107 if (global_defs > 0)
1108 geq_define((hash_size + 793), 117, cur_val);
1109 else eq_define((hash_size + 793), 117, cur_val);
1113 void init_align (void)
1119 align_state = -1000000L;
1120 if ((mode == 203)&&((tail != cur_list
1121 .head_field)||(cur_list.aux_field.cint != 0)))
1123 print_err("Improper ");
1124 print_esc("halign");
1125 print_string("inside $$");
1126 help3("Displays can use special alignments (like \\eqalignno)",
1127 "only if nothing but the alignment itself is between $$'s.",
1128 "So I've deleted the formulas that preceded this alignment.");
1136 cur_list.aux_field.cint = nest[nest_ptr - 2].aux_field.cint;
1139 /* long to short ... */
1140 mode = - (integer) mode;
1141 scan_spec(6, false);
1142 mem[align_head].hh.v.RH = 0;
1143 cur_align = align_head;
1146 warning_index = savecsptr;
1147 align_state = -1000000L;
1149 mem[cur_align].hh.v.RH = new_param_glue(11);
1150 cur_align = mem[cur_align].hh.v.RH;
1156 get_preamble_token();
1159 if ((cur_cmd <= 5)&&(cur_cmd >= 4)&&(align_state == -1000000L))
1160 if ((p == hold_head)&&(cur_loop == 0)&&(cur_cmd == 4))
1161 cur_loop = cur_align;
1163 print_err("Missing # inserted in alignment preamble");
1164 help3("There should be exactly one # between &'s, when an",
1165 "\\halign or \\valign is being set up. In this case you had",
1166 "none, so I've put one in; maybe that will work.");
1170 else if ((cur_cmd != 10)||(p != hold_head))
1172 mem[p].hh.v.RH = get_avail();
1174 mem[p].hh.v.LH = cur_tok;
1178 mem[cur_align].hh.v.RH = new_null_box();
1179 cur_align = mem[cur_align].hh.v.RH;
1180 mem[cur_align].hh.v.LH = end_span;
1181 mem[cur_align + 1].cint = -1073741824L; /* - 2^30 */
1182 mem[cur_align + 3].cint = mem[hold_head].hh.v.RH;
1187 get_preamble_token();
1188 if ((cur_cmd <= 5)&&(cur_cmd >= 4)&&(align_state == -1000000L))
1192 print_err("Only one # is allowed per tab");
1193 help3("There should be exactly one # between &'s, when an",
1194 "\\halign or \\valign is being set up. In this case you had",
1195 "more than one, so I'm ignoring all but the first.");
1199 mem[p].hh.v.RH = get_avail();
1201 mem[p].hh.v.LH = cur_tok;
1203 lab32: mem[p].hh.v.RH = get_avail();
1205 /* mem[p].hh.v.LH = (hash_size + 4614); */
1206 /* mem[p].hh.v.LH = (hash_size + 4095 + 519); */
1207 mem[p].hh.v.LH = (hash_size + hash_extra + 4095 + 519); /* 96/Jan/10 */
1208 mem[cur_align + 2].cint = mem[hold_head].hh.v.RH;
1210 lab30: scanner_status = 0;
1212 /* if every_cr<>null then begin_token_list(every_cr,every_cr_text); l.15665 */
1213 if (every_cr != 0)/* everycr */
1214 begin_token_list(every_cr, 13);
1217 void init_span_ (halfword p)
1221 space_factor = 1000;
1224 cur_list.aux_field.cint = ignore_depth;
1229 void init_row (void)
1235 else cur_list.aux_field.cint = 0;
1237 mem[tail].hh.v.RH = new_glue(mem[mem[align_head]
1238 .hh.v.RH + 1].hh.v.LH);
1239 tail = mem[tail].hh.v.RH;
1241 mem[tail].hh.b1 = 12;
1242 cur_align = mem[mem[align_head].hh.v.RH].hh.v.RH;
1243 cur_tail = cur_head;
1244 init_span(cur_align);
1246 void init_col (void)
1248 mem[cur_align + 5].hh.v.LH = cur_cmd;
1254 begin_token_list(mem[cur_align + 3].cint, 1);
1257 /* fin_col() moved to end to hide in pragma (g, "off") */
1258 /* may need to move more ? everything calling new_null_box() ? */
1264 p = hpack(mem[head].hh.v.RH, 0, 1);
1267 if (cur_head != cur_tail)
1269 mem[tail].hh.v.RH = mem[cur_head].hh.v.RH;
1275 p = vpackage(mem[head].hh.v.RH, 0, 1,
1276 1073741823L); /* 2^30 - 1 */
1278 mem[tail].hh.v.RH = p;
1280 space_factor = 1000;
1283 mem[p + 6].cint = 0;
1284 if (every_cr != 0)/* everycr */
1285 begin_token_list(every_cr, 13);
1288 void fin_align (void)
1290 halfword p, q, r, s, u, v;
1295 memory_word auxsave;
1297 if (cur_group != 6){
1298 confusion("align1");
1299 return; // abort_flag set
1302 if (cur_group != 6){
1303 confusion("align0");
1304 return; // abort_flag set
1307 if (nest[nest_ptr - 1].mode_field == 203)
1310 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1312 flush_list(mem[q + 3].cint);
1313 flush_list(mem[q + 2].cint);
1314 p = mem[mem[q].hh.v.RH].hh.v.RH;
1315 if (mem[q + 1].cint == -1073741824L) /* - 2^30 */
1317 mem[q + 1].cint = 0;
1319 s = mem[r + 1].hh.v.LH;
1322 incr(mem[0].hh.v.RH); /* mem[mem_bot]? mem[null]? */
1324 mem[r + 1].hh.v.LH = 0;
1327 if (mem[q].hh.v.LH != end_span)
1329 t = mem[q + 1].cint + mem[mem[mem[q].hh.v.RH + 1].hh
1336 mem[r + 1].cint = mem[r + 1].cint - t;
1338 while(mem[r].hh.v.RH > n){
1341 n = mem[mem[s].hh.v.LH].hh.v.RH + 1;
1343 if (mem[r].hh.v.RH < n)
1345 mem[r].hh.v.LH = mem[s].hh.v.LH;
1347 decr(mem[r].hh.v.RH);
1352 if (mem[r + 1].cint > mem[mem[s].hh.v.LH + 1].cint)
1353 mem[mem[s].hh.v.LH + 1].cint = mem[r + 1].cint;
1357 } while(!(r == end_span));
1361 mem[q + 3].cint = 0;
1362 mem[q + 2].cint = 0;
1363 mem[q + 5].hh.b1 = 0;
1364 mem[q + 5].hh.b0 = 0;
1365 mem[q + 6].cint = 0;
1366 mem[q + 4].cint = 0;
1369 save_ptr = save_ptr - 2;
1370 pack_begin_line = - (integer) mode_line;
1373 rulesave = overfull_rule;
1375 p = hpack(mem[align_head].hh.v.RH, save_stack[save_ptr + 1].cint, save_stack[save_ptr + 0].cint);
1376 overfull_rule = rulesave;
1380 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1382 mem[q + 3].cint = mem[q + 1].cint;
1383 mem[q + 1].cint = 0;
1384 q = mem[mem[q].hh.v.RH].hh.v.RH;
1386 p = vpackage(mem[align_head].hh.v.RH, save_stack[save_ptr + 1]
1387 .cint, save_stack[save_ptr + 0].cint, 1073741823L); /* 2^30 - 1 */
1388 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1390 mem[q + 1].cint = mem[q + 3].cint;
1391 mem[q + 3].cint = 0;
1392 q = mem[mem[q].hh.v.RH].hh.v.RH;
1395 pack_begin_line = 0;
1396 q = mem[head].hh.v.RH;
1398 while(q != 0){ /* while q<>null l.15794 OK */
1400 if (!(q >= hi_mem_min)) /* begin if not is_char_node(q) then */
1401 if (mem[q].hh.b0 == 13)
1406 mem[q + 1].cint = mem[p + 1].cint;
1411 mem[q + 3].cint = mem[p + 3].cint;
1413 mem[q + 5].hh.b1 = mem[p + 5].hh.b1;
1414 mem[q + 5].hh.b0 = mem[p + 5].hh.b0;
1415 mem[q + 6].gr = mem[p + 6].gr;
1416 mem[q + 4].cint = o;
1417 r = mem[mem[q + 5].hh.v.RH].hh.v.RH;
1418 s = mem[mem[p + 5].hh.v.RH].hh.v.RH;
1421 t = mem[s + 1].cint;
1428 v = mem[s + 1].hh.v.LH;
1429 mem[u].hh.v.RH = new_glue(v);
1432 t = t + mem[v + 1].cint;
1433 if (mem[p + 5].hh.b0 == 1)
1435 if (mem[v].hh.b0 == mem[p + 5].hh.b1)
1436 t = t + round(mem[p + 6].gr * mem[v + 2].cint);
1438 else if (mem[p + 5].hh.b0 == 2)
1440 if (mem[v].hh.b1 == mem[p + 5].hh.b1)
1441 t = t - round(mem[p + 6].gr * mem[v + 3].cint);
1444 mem[u].hh.v.RH = new_null_box();
1446 t = t + mem[s + 1].cint;
1448 mem[u + 1].cint = mem[s + 1].cint;
1452 mem[u + 3].cint = mem[s + 1].cint;
1457 mem[r + 3].cint = mem[q + 3].cint;
1458 mem[r + 2].cint = mem[q + 2].cint;
1459 if (t == mem[r + 1].cint)
1461 mem[r + 5].hh.b0 = 0;
1462 mem[r + 5].hh.b1 = 0;
1463 mem[r + 6].gr = 0.0;
1465 else if (t > mem[r + 1].cint)
1467 mem[r + 5].hh.b0 = 1;
1468 if (mem[r + 6].cint == 0)
1469 mem[r + 6].gr = 0.0;
1470 else mem[r + 6].gr =(t - mem[r + 1].cint)/ ((double)
1475 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1476 mem[r + 5].hh.b0 = 2;
1477 if (mem[r + 4].cint == 0)
1478 mem[r + 6].gr = 0.0;
1479 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 1].cint -
1480 t > mem[r + 4].cint))
1481 mem[r + 6].gr = 1.0;
1482 else mem[r + 6].gr =(mem[r + 1].cint - t)/ ((double)
1485 mem[r + 1].cint = w;
1490 mem[r + 1].cint = mem[q + 1].cint;
1491 if (t == mem[r + 3].cint)
1493 mem[r + 5].hh.b0 = 0;
1494 mem[r + 5].hh.b1 = 0;
1495 mem[r + 6].gr = 0.0;
1497 else if (t > mem[r + 3].cint)
1499 mem[r + 5].hh.b0 = 1;
1500 if (mem[r + 6].cint == 0)
1501 mem[r + 6].gr = 0.0;
1502 else mem[r + 6].gr =(t - mem[r + 3].cint)/ ((double)
1507 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1508 mem[r + 5].hh.b0 = 2;
1509 if (mem[r + 4].cint == 0)
1510 mem[r + 6].gr = 0.0;
1511 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 3].cint -
1512 t > mem[r + 4].cint))
1513 mem[r + 6].gr = 1.0;
1514 else mem[r + 6].gr =(mem[r + 3].cint - t)/ ((double)
1517 mem[r + 3].cint = w;
1520 mem[r + 4].cint = 0;
1523 mem[u].hh.v.RH = mem[r].hh.v.RH;
1524 mem[r].hh.v.RH = mem[hold_head].hh.v.RH;
1527 r = mem[mem[r].hh.v.RH].hh.v.RH;
1528 s = mem[mem[s].hh.v.RH].hh.v.RH;
1531 else if (mem[q].hh.b0 == 2)
1533 if ((mem[q + 1].cint == -1073741824L)) /* 2^30 */
1534 mem[q + 1].cint = mem[p + 1].cint;
1535 if ((mem[q + 3].cint == -1073741824L)) /* 2^30 */
1536 mem[q + 3].cint = mem[p + 3].cint;
1537 if ((mem[q + 2].cint == -1073741824L)) /* 2^30 */
1538 mem[q + 2].cint = mem[p + 2].cint;
1544 mem[q + 4].cint = o;
1554 auxsave = cur_list.aux_field;
1555 p = mem[head].hh.v.RH;
1562 print_err("Missing $$ inserted");
1563 help2("Displays can use special alignments (like \\eqalignno)",
1564 "only if nothing but the alignment itself is between $$'s.");
1572 print_err("Display math should end with $$");
1573 help2("The `$' that I just saw supposedly matches a previous `$$'.",
1574 "So I shall assume that you typed `$$' both times.");
1580 mem[tail].hh.v.RH = new_penalty(pre_display_penalty);
1581 tail = mem[tail].hh.v.RH;
1584 mem[tail].hh.v.RH = new_param_glue(3);
1585 tail = mem[tail].hh.v.RH;
1587 mem[tail].hh.v.RH = p;
1591 mem[tail].hh.v.RH = new_penalty(post_display_penalty);
1592 tail = mem[tail].hh.v.RH;
1595 mem[tail].hh.v.RH = new_param_glue(4);
1596 tail = mem[tail].hh.v.RH;
1598 cur_list.aux_field.cint = auxsave.cint;
1599 resume_after_display();
1603 cur_list.aux_field = auxsave;
1604 mem[tail].hh.v.RH = p;
1605 if (p != 0) /* if p<>null then tail:=q; l.15926 */
1612 /* used to be align_peek, zfintieshrink, etc in old tex5.c */
1613 /************************************************************************/
1614 /* moved down here to avoid questions about pragma optimize */
1615 #pragma optimize("g", off) /* for MC VS compiler */
1616 /* Moved down here 96/Oct/12 in response to problem with texerror.tex */
1617 /* pragma optimize("a", off) not strong enough - this may slow things */
1619 {/* 10 */ register bool Result;
1627 if (cur_align == 0){
1629 return 0; // abort_flag set
1631 q = mem[cur_align].hh.v.RH;
1634 return 0; // abort_flag set
1636 if (align_state < 500000L) { /* ??? */
1637 fatal_error("(interwoven alignment preambles are not allowed)"); /* */
1638 return 0; // abort_flag set
1640 p = mem[q].hh.v.RH; /* p <- link(q) p.791 */
1641 /* if (p = null) ^ (extra_info(cur_align) < cr_code) then p.792 */
1642 if ((p == 0)&&(mem[cur_align + 5].hh.v.LH < 257))
1645 /* potential problem here if new_null_box causes memory reallocation ??? */
1646 /* compiler optimization does not refresh `mem' loaded in registers ? */
1647 mem[q].hh.v.RH = new_null_box();
1649 mem[p].hh.v.LH = end_span;
1650 mem[p + 1].cint = -1073741824L; /* - 2^30 */
1651 cur_loop = mem[cur_loop].hh.v.RH;
1653 r = mem[cur_loop + 3].cint;
1656 mem[q].hh.v.RH = get_avail();
1658 mem[q].hh.v.LH = mem[r].hh.v.LH;
1662 mem[p + 3].cint = mem[hold_head].hh.v.RH;
1664 r = mem[cur_loop + 2].cint;
1667 mem[q].hh.v.RH = get_avail();
1669 mem[q].hh.v.LH = mem[r].hh.v.LH;
1673 mem[p + 2].cint = mem[hold_head].hh.v.RH;
1674 cur_loop = mem[cur_loop].hh.v.RH;
1675 mem[p].hh.v.RH = new_glue(mem[cur_loop + 1].hh.v.LH);
1678 print_err("Extra alignment tab has been changed to ");
1680 help3("You have given more \\span or & marks than there were",
1681 "in the preamble to the \\halign or \\valign now in progress.",
1682 "So I'll assume that you meant to type \\cr instead.");
1683 /* extra_info(cur_align) < cr_code) ? */
1684 mem[cur_align + 5].hh.v.LH = 257;
1687 if (mem[cur_align + 5].hh.v.LH != 256)
1694 adjust_tail = cur_tail;
1695 u = hpack(mem[head].hh.v.RH, 0, 1);
1696 w = mem[u + 1].cint;
1697 cur_tail = adjust_tail;
1702 u = vpackage(mem[head].hh.v.RH, 0, 1, 0);
1703 w = mem[u + 3].cint;
1706 if (cur_span != cur_align)
1711 q = mem[mem[q].hh.v.RH].hh.v.RH;
1712 } while(!(q == cur_align));
1713 /* if n > max_quarterword then confusion("256 spans"); p.798 */
1714 /* if (n > 255) */ /* 94/Apr/4 ? */
1715 if (n > max_quarterword) { /* 96/Oct/12 ??? */
1716 confusion("256 spans"); /* 256 spans --- message wrong now, but ... */
1717 return 0; // abort_flag set
1720 while(mem[mem[q].hh.v.LH].hh.v.RH < n)q = mem[q].hh
1722 if (mem[mem[q].hh.v.LH].hh.v.RH > n)
1725 mem[s].hh.v.LH = mem[q].hh.v.LH;
1728 mem[s + 1].cint = w;
1730 else if (mem[mem[q].hh.v.LH + 1].cint < w)
1731 mem[mem[q].hh.v.LH + 1].cint = w;
1733 else if (w > mem[cur_align + 1].cint)
1734 mem[cur_align + 1].cint = w;
1737 if (total_stretch[3]!= 0)
1739 else if (total_stretch[2]!= 0)
1741 else if (total_stretch[1]!= 0)
1744 mem[u + 5].hh.b1 = o;
1745 mem[u + 6].cint = total_stretch[o];
1746 if (total_shrink[3]!= 0)
1748 else if (total_shrink[2]!= 0)
1750 else if (total_shrink[1]!= 0)
1753 mem[u + 5].hh.b0 = o;
1754 mem[u + 4].cint = total_shrink[o];
1756 mem[tail].hh.v.RH = u;
1760 mem[tail].hh.v.RH = new_glue(mem[mem[cur_align]
1761 .hh.v.RH + 1].hh.v.LH);
1762 tail = mem[tail].hh.v.RH;
1764 mem[tail].hh.b1 = 12;
1765 /* if (extra_info(cur_align) >= cr_code) then p.792 */
1766 if (mem[cur_align + 5].hh.v.LH >= 257)
1773 align_state = 1000000L;
1776 } while(!(cur_cmd != 10));
1782 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1783 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1784 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1785 /* #pragma optimize("g", off) */ /* for MC VS compiler */
1787 scaled make_op_(halfword q)
1788 {register scaled Result;
1790 halfword p, v, x, y, z;
1793 scaled shiftup, shiftdown;
1794 if ((mem[q].hh.b1 == 0)&&(cur_style < 2))
1796 if (mem[q + 1].hh.v.RH == 1)
1799 if ((cur_style < 2)&&(((cur_i.b2)% 4)== 2))
1802 i = font_info[char_base[cur_f]+ c].qqqq;
1807 mem[q + 1].hh.b1 = c;
1810 delta = font_info[italic_base[cur_f]+(cur_i.b2)/ 4].cint;
1811 x = clean_box(q + 1, cur_style);
1812 if ((mem[q + 3].hh.v.RH != 0)&&(mem[q].hh.b1 != 1))
1813 mem[x + 1].cint = mem[x + 1].cint - delta;
1814 mem[x + 4].cint = half(mem[x + 3].cint - mem[x + 2].cint)-
1815 font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
1816 mem[q + 1].hh.v.RH = 2;
1817 mem[q + 1].hh.v.LH = x;
1820 if (mem[q].hh.b1 == 1)
1822 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1823 y = clean_box(q + 1, cur_style);
1824 z = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1827 mem[v + 1].cint = mem[y + 1].cint;
1828 if (mem[x + 1].cint > mem[v + 1].cint)
1829 mem[v + 1].cint = mem[x + 1].cint;
1830 if (mem[z + 1].cint > mem[v + 1].cint)
1831 mem[v + 1].cint = mem[z + 1].cint;
1832 x = rebox(x, mem[v + 1].cint);
1833 y = rebox(y, mem[v + 1].cint);
1834 z = rebox(z, mem[v + 1].cint);
1835 mem[x + 4].cint = half(delta);
1836 mem[z + 4].cint = - (integer) mem[x + 4].cint;
1837 mem[v + 3].cint = mem[y + 3].cint;
1838 mem[v + 2].cint = mem[y + 2].cint;
1839 if (mem[q + 2].hh.v.RH == 0)
1842 mem[v + 5].hh.v.RH = y;
1846 shiftup = font_info[11 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1847 ]].cint - mem[x + 2].cint;
1848 if (shiftup < font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1850 shiftup = font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1852 p = new_kern(shiftup);
1855 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1858 mem[v + 5].hh.v.RH = p;
1859 mem[v + 3].cint = mem[v + 3].cint + font_info[13 + param_base[
1860 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[x + 3].cint + mem
1861 [x + 2].cint + shiftup;
1863 if (mem[q + 3].hh.v.RH == 0)
1867 shiftdown = font_info[12 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1868 .v.RH]].cint - mem[z + 3].cint;
1869 if (shiftdown < font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size]
1871 shiftdown = font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1873 p = new_kern(shiftdown);
1876 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1879 mem[v + 2].cint = mem[v + 2].cint + font_info[13 + param_base[
1880 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[z + 3].cint + mem
1881 [z + 2].cint + shiftdown;
1883 mem[q + 1].cint = v;
1888 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1889 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1890 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1891 /* #pragma optimize ("g", off) */
1893 void make_scripts_(halfword q, scaled delta)
1895 halfword p, x, y, z;
1896 scaled shiftup, shiftdown, clr;
1898 p = mem[q + 1].cint;
1899 if ((p >= hi_mem_min))
1910 shiftup = mem[z + 3].cint - font_info[18 + param_base[eqtb[(hash_size + 1837) +
1912 shiftdown = mem[z + 2].cint + font_info[19 + param_base[eqtb[(hash_size + 1837)
1913 + t].hh.v.RH]].cint;
1916 if (mem[q + 2].hh.v.RH == 0)
1918 x = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1919 mem[x + 1].cint = mem[x + 1].cint + script_space;
1920 if (shiftdown < font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1922 shiftdown = font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH
1924 clr = mem[x + 3].cint -(abs(font_info[5 + param_base[eqtb[
1925 (hash_size + 1837) + cur_size].hh.v.RH]].cint * 4)/ 5);
1926 if (shiftdown < clr)
1928 mem[x + 4].cint = shiftdown;
1933 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1934 mem[x + 1].cint = mem[x + 1].cint + script_space;
1936 clr = font_info[15 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1938 else if (cur_style < 2)
1939 clr = font_info[13 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1941 else clr = font_info[14 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1945 clr = mem[x + 2].cint +(abs(font_info[5 +
1946 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint)/ 4);
1950 if (mem[q + 3].hh.v.RH == 0)
1951 mem[x + 4].cint = - (integer) shiftup;
1953 y = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1954 mem[y + 1].cint = mem[y + 1].cint + script_space;
1955 if (shiftdown < font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size]
1957 shiftdown = font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1959 clr = 4 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1960 ]].cint -((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1964 shiftdown = shiftdown + clr;
1965 clr =(abs(font_info[5 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1966 .v.RH]].cint * 4)/ 5)-(shiftup - mem[x + 2].cint);
1969 shiftup = shiftup + clr;
1970 shiftdown = shiftdown - clr;
1973 mem[x + 4].cint = delta;
1974 p = new_kern((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1978 x = vpackage(x, 0, 1, 1073741823L); /* 2^30 - 1 */
1979 mem[x + 4].cint = shiftdown;
1982 if (mem[q + 1].cint == 0)
1983 mem[q + 1].cint = x;
1986 p = mem[q + 1].cint;
1987 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
1991 /* #pragma optimize ("g", on) */ /* 96/Sep/12 */
1992 /* #pragma optimize ("g") */ /* 94/Jan/25 */
1993 #pragma optimize ("", on) /* 96/Sep/12 */
1994 /***************************************************************************/