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))
38 if (mem[b].hh.b0 == 1)
40 p = mem[b + 5].hh.v.RH;
41 /* if (is_char_node(p))and(link(p)=null) then l.14013 */
42 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]
46 .hh.b1].qqqq.b0].cint;
47 if (v != mem[b + 1].cint)
48 mem[p].hh.v.RH = new_kern(mem[b + 1].cint - v);
53 /* while link(p)<>null do p:=link(p); l.14019 */
54 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
55 mem[p].hh.v.RH = new_glue(12);
56 Result = hpack(b, w, 0);
65 /* This is to be the start of tex5.c */
66 halfword math_glue_(halfword g, scaled m)
67 {register halfword Result;
71 n = x_over_n(m, 65536L);
79 mem[p + 1].cint = mult_and_add(n, mem[g + 1].cint, xn_over_d(mem[
80 g + 1].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
81 mem[p].hh.b0 = mem[g].hh.b0;
82 if (mem[p].hh.b0 == 0)
83 mem[p + 2].cint = mult_and_add(n, mem[g + 2].cint, xn_over_d(mem[
84 g + 2].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
85 else mem[p + 2].cint = mem[g + 2].cint;
86 mem[p].hh.b1 = mem[g].hh.b1;
87 if (mem[p].hh.b1 == 0)
88 mem[p + 3].cint = mult_and_add(n, mem[g + 3].cint, xn_over_d(mem[
89 g + 3].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
90 else mem[p + 3].cint = mem[g + 3].cint;
94 void math_kern_ (halfword p, scaled m)
98 if (mem[p].hh.b1 == 99)
100 n = x_over_n(m, 65536L);
107 mem[p + 1].cint = mult_and_add(n, mem[p + 1].cint, xn_over_d(mem
108 [p + 1].cint, f, 65536L), 1073741823L); /* 2^30 - 1 */
109 /* mem[p].hh.b1 = 0; */
110 mem[p].hh.b1 = 1; /* changed in 3.14159 */
113 void flush_math (void)
115 flush_node_list(mem[head].hh.v.RH);
116 flush_node_list(cur_list.aux_field.cint);
117 mem[head].hh.v.RH = 0;
119 cur_list.aux_field.cint = 0;
121 halfword clean_box_(halfword p, small_number s)
122 {/* 40 */ register halfword Result;
124 small_number savestyle;
127 switch(mem[p].hh.v.RH)
130 cur_mlist = new_noad ();
131 mem[cur_mlist + 1]= mem[p];
141 cur_mlist = mem[p].hh.v.LH;
150 savestyle = cur_style;
152 mlist_penalties = false;
154 q = mem[temp_head].hh.v.RH;
155 cur_style = savestyle;
159 else cur_size = 16 *((cur_style - 2)/ 2);
160 cur_mu = x_over_n(font_info[6 +
161 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint, 18);
163 lab40: if ((q >= hi_mem_min)||(q == 0))
165 else if ((mem[q].hh.v.RH == 0)&&(mem[q].hh.b0 <= 1)&&(mem
168 else x = hpack(q, 0, 1);
169 q = mem[x + 5].hh.v.RH;
170 if ((q >= hi_mem_min))
173 /* if r<>null then if link(r)=null then l.14140 */
175 if (mem[r].hh.v.RH == 0)
176 if (!(r >= hi_mem_min))
177 if (mem[r].hh.b0 == 11)
180 mem[q].hh.v.RH = 0; /* link(q):=null; */
186 void fetch_(halfword a)
188 cur_c = mem[a].hh.b1;
189 cur_f = eqtb[(hash_size + 1835) + mem[a].hh.b0 + cur_size].hh.v.RH;
193 print_size(cur_size);
195 print_int(mem[a].hh.b0);
196 print_string("is undefined (character ");
199 help4("Somewhere in the math formula just ended, you used the",
200 "stated character from an undefined font family. For example,",
201 "plain TeX doesn't allow \\it or \\sl in subscripts. Proceed,",
202 "and I'll try to forget that I needed that character.");
204 cur_i = null_character;
209 if ((cur_c >= font_bc[cur_f])&&(cur_c <= font_ec[cur_f]))
210 cur_i = font_info[char_base[cur_f]+ cur_c].qqqq;
211 else cur_i = null_character;
212 if (!((cur_i.b0 > 0)))
214 char_warning(cur_f, cur_c);
219 void make_over_(halfword q)
221 mem[q + 1].hh.v.LH = overbar(clean_box(q + 1, 2 *(cur_style / 2)
222 + 1), 3 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]
223 ].cint, font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]]
225 mem[q + 1].hh.v.RH = 2;
227 void make_under_(halfword q)
231 x = clean_box(q + 1, cur_style);
232 p = new_kern(3 * font_info[8 +
233 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
235 mem[p].hh.v.RH = fraction_rule(font_info[8 +
236 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
237 y = vpackage(x, 0, 1, 1073741823L); /* 2^30 - 1 */
238 delta = mem[y + 3].cint + mem[y + 2].cint + font_info[8 +
239 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
240 mem[y + 3].cint = mem[x + 3].cint;
241 mem[y + 2].cint = delta - mem[y + 3].cint;
242 mem[q + 1].hh.v.LH = y;
243 mem[q + 1].hh.v.RH = 2;
245 void make_vcenter_(halfword q)
249 v = mem[q + 1].hh.v.LH;
250 if (mem[v].hh.b0 != 1){
251 confusion("vcenter");
252 return; // abort_flag set
254 delta = mem[v + 3].cint + mem[v + 2].cint;
255 mem[v + 3].cint = font_info[22 +
256 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + half(delta);
257 mem[v + 2].cint = delta - mem[v + 3].cint;
259 void make_radical_(halfword q)
263 x = clean_box(q + 1, 2 *(cur_style / 2)+ 1);
266 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint +
267 (abs(font_info[5 + param_base[eqtb[(hash_size + 1837) +
268 cur_size].hh.v.RH]].cint)/ 4);
272 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
273 clr = clr +(abs(clr)/ 4);
275 y = var_delimiter(q + 4, cur_size, mem[x + 3].cint + mem[x + 2]
276 .cint + clr + font_info[8 +
277 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint);
278 delta = mem[y + 2].cint -(mem[x + 3].cint + mem[x + 2].cint +
281 clr = clr + half(delta);
282 mem[y + 4].cint = - (integer)(mem[x + 3].cint + clr);
283 mem[y].hh.v.RH = overbar(x, clr, mem[y + 3].cint);
284 mem[q + 1].hh.v.LH = hpack(y, 0, 1);
285 mem[q + 1].hh.v.RH = 2;
287 void make_math_accent_(halfword q)
292 internal_font_number f;
305 if (mem[q + 1].hh.v.RH == 1)
308 if (((cur_i.b2)% 4)== 1)
310 a = lig_kern_base[cur_f]+ cur_i.b3;
311 cur_i = font_info[a].qqqq;
314 a = lig_kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3 + 32768L - 256
316 cur_i = font_info[a].qqqq;
319 if (cur_i.b1 == skew_char[cur_f])
323 s = font_info[kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3]
329 a = a + cur_i.b0 + 1;
330 cur_i = font_info[a].qqqq;
335 x = clean_box(q + 1, 2 *(cur_style / 2)+ 1);
342 i = font_info[char_base[f]+ y].qqqq;
345 if (font_info[width_base[f]+ i.b0].cint > w)
347 /* long to unsigned short ... */
351 if (h < font_info[5 + param_base[f]].cint)
353 else delta = font_info[5 + param_base[f]].cint;
354 if ((mem[q + 2].hh.v.RH != 0)||(mem[q + 3].hh.v.RH != 0)
356 if (mem[q + 1].hh.v.RH == 1)
360 mem[x + 1]= mem[q + 1];
361 mem[x + 2]= mem[q + 2];
362 mem[x + 3]= mem[q + 3];
363 mem[q + 2].hh = empty_field;
364 mem[q + 3].hh = empty_field;
365 mem[q + 1].hh.v.RH = 3;
366 mem[q + 1].hh.v.LH = x;
367 x = clean_box(q + 1, cur_style);
368 delta = delta + mem[x + 3].cint - h;
372 mem[y + 4].cint = s + half(w - mem[y + 1].cint);
374 p = new_kern(- (integer) delta);
377 y = vpackage(y, 0, 1, 1073741823L); /* 2^30 - 1 */
378 mem[y + 1].cint = mem[x + 1].cint;
379 if (mem[y + 3].cint < h)
381 p = new_kern(h - mem[y + 3].cint);
382 mem[p].hh.v.RH = mem[y + 5].hh.v.RH;
383 mem[y + 5].hh.v.RH = p;
386 mem[q + 1].hh.v.LH = y;
387 mem[q + 1].hh.v.RH = 2;
390 void make_fraction_(halfword q)
392 halfword p, v, x, y, z;
393 scaled delta, delta1, delta2, shiftup, shiftdown, clr;
394 if (mem[q + 1].cint == 1073741824L) /* 2^30 */
395 mem[q + 1].cint = font_info[8 +
396 param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint;
397 x = clean_box(q + 2, cur_style + 2 - 2 *(cur_style / 6));
398 z = clean_box(q + 3, 2 *(cur_style / 2)+ 3 - 2 *(cur_style / 6));
399 if (mem[x + 1].cint < mem[z + 1].cint)
400 x = rebox(x, mem[z + 1].cint);
401 else z = rebox(z, mem[x + 1].cint);
404 shiftup = font_info[8 +
405 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
406 shiftdown = font_info[11 +
407 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
411 shiftdown = font_info[12 +
412 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
413 if (mem[q + 1].cint != 0)
414 shiftup = font_info[9 +
415 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
416 else shiftup = font_info[10 +
417 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
419 if (mem[q + 1].cint == 0)
422 clr = 7 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH]
424 else clr = 3 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
426 delta = half(clr -((shiftup - mem[x + 2].cint)-(mem[z + 3]
427 .cint - shiftdown)));
430 shiftup = shiftup + delta;
431 shiftdown = shiftdown + delta;
437 clr = 3 * mem[q + 1].cint;
438 else clr = mem[q + 1].cint;
439 delta = half(mem[q + 1].cint);
440 delta1 = clr -((shiftup - mem[x + 2].cint)-(font_info[22 +
441 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + delta));
442 delta2 = clr -((font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size]
443 .hh.v.RH]].cint - delta)-(mem[z + 3].cint - shiftdown));
445 shiftup = shiftup + delta1;
447 shiftdown = shiftdown + delta2;
451 mem[v + 3].cint = shiftup + mem[x + 3].cint;
452 mem[v + 2].cint = mem[z + 2].cint + shiftdown;
453 mem[v + 1].cint = mem[x + 1].cint;
454 if (mem[q + 1].cint == 0)
456 p = new_kern((shiftup - mem[x + 2].cint)-(mem[z + 3].cint -
462 y = fraction_rule(mem[q + 1].cint);
463 p = new_kern((font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
464 .v.RH]].cint - delta)-(mem[z + 3].cint - shiftdown));
467 p = new_kern((shiftup - mem[x + 2].cint)-(font_info[22 +
468 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint + delta));
472 mem[v + 5].hh.v.RH = x;
474 delta = font_info[20 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
476 else delta = font_info[21 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH
478 x = var_delimiter(q + 4, cur_size, delta);
480 z = var_delimiter(q + 5, cur_size, delta);
482 mem[q + 1].cint = hpack(x, 0, 1);
484 /***************************************************************************/
485 /* moved to end to avoid questions about pragma optimize 96/Sep/12 */
486 scaled make_op_ (halfword);
487 /***************************************************************************/
488 void make_ord_(halfword q)
492 lab20: if (mem[q + 3].hh.v.RH == 0)
493 if (mem[q + 2].hh.v.RH == 0)
494 if (mem[q + 1].hh.v.RH == 1)
498 if ((mem[p].hh.b0 >= 16)&&(mem[p].hh.b0 <= 22))
499 if (mem[p + 1].hh.v.RH == 1)
500 if (mem[p + 1].hh.b0 == mem[q + 1].hh.b0)
502 mem[q + 1].hh.v.RH = 4;
504 if (((cur_i.b2)% 4)== 1)
506 a = lig_kern_base[cur_f]+ cur_i.b3;
507 cur_c = mem[p + 1].hh.b1;
508 cur_i = font_info[a].qqqq;
511 a = lig_kern_base[cur_f]+ 256 * cur_i.b2 + cur_i.b3 + 32768L - 256
513 cur_i = font_info[a].qqqq;
516 if (cur_i.b1 == cur_c)
520 p = new_kern(font_info[kern_base[cur_f]+ 256 * cur_i.b2 + cur_i
522 mem[p].hh.v.RH = mem[q].hh.v.RH;
530 pause_for_instructions ();
536 mem[q + 1].hh.b1 = cur_i.b3;
540 mem[p + 1].hh.b1 = cur_i.b3;
547 mem[r + 1].hh.b1 = cur_i.b3;
548 mem[r + 1].hh.b0 = mem[q + 1].hh.b0;
552 mem[r + 1].hh.v.RH = 1;
553 else mem[r + 1].hh.v.RH = 4;
558 mem[q].hh.v.RH = mem[p].hh.v.RH;
559 mem[q + 1].hh.b1 = cur_i.b3;
560 mem[q + 3]= mem[p + 3];
561 mem[q + 2]= mem[p + 2];
568 mem[q + 1].hh.v.RH = 1;
573 a = a + cur_i.b0 + 1;
574 cur_i = font_info[a].qqqq;
580 /***************************************************************************/
581 /* moved to end to avoid questions about pragma optimize 96/Sep/12 */
582 void make_scripts_ (halfword, scaled);
583 /***************************************************************************/
584 small_number make_left_right_(halfword q, small_number style, scaled maxd, scaled max_h)
585 {register small_number Result;
586 scaled delta, delta1, delta2;
589 else cur_size = 16 *((style - 2)/ 2);
590 delta2 = maxd + font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
592 delta1 = max_h + maxd - delta2;
595 delta =(delta1 / 500)* eqtb[(hash_size + 3181)].cint;
596 delta2 = delta1 + delta1 - eqtb[(hash_size + 3740)].cint;
599 mem[q + 1].cint = var_delimiter(q + 1, cur_size, delta);
600 Result = mem[q].hh.b0 -(10);
603 void mlist_to_hlist (void)
604 {/* 21 82 80 81 83 30 */
608 small_number savestyle;
611 /* small_number rtype; */
612 int rtype; /* 95/Jan/7 */
613 /* small_number t; */
614 int t; /* 95/Jan/7 */
621 penalties = mlist_penalties;
631 else cur_size = 16 *((cur_style - 2)/ 2);
632 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
638 switch(mem[q].hh.b0){
662 if (rtype == 18) mem[r].hh.b0 = 16;
663 if (mem[q].hh.b0 == 31) goto lab80;
678 if (mem[q].hh.b1 == 1)
706 cur_style = mem[q].hh.b1;
710 else cur_size = 16 *((cur_style - 2)/ 2);
711 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
712 .hh.v.RH]].cint, 18);
719 switch(cur_style / 2)
722 p = mem[q + 1].hh.v.LH;
723 mem[q + 1].hh.v.LH = 0;
728 p = mem[q + 1].hh.v.RH;
729 mem[q + 1].hh.v.RH = 0;
734 p = mem[q + 2].hh.v.LH;
735 mem[q + 2].hh.v.LH = 0;
740 p = mem[q + 2].hh.v.RH;
741 mem[q + 2].hh.v.RH = 0;
745 flush_node_list(mem[q + 1].hh.v.LH);
746 flush_node_list(mem[q + 1].hh.v.RH);
747 flush_node_list(mem[q + 2].hh.v.LH);
748 flush_node_list(mem[q + 2].hh.v.RH);
750 mem[q].hh.b1 = cur_style;
753 if (p != 0)/* if p<>null then l.14317 */
757 /* while link(p)<>null do p:=link(p); */
758 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
774 if (mem[q + 3].cint > max_h)
775 max_h = mem[q + 3].cint;
776 if (mem[q + 2].cint > maxd)
777 maxd = mem[q + 2].cint;
783 if (mem[q].hh.b1 == 99)
785 x = mem[q + 1].hh.v.LH;
786 y = math_glue(x, cur_mu);
788 mem[q + 1].hh.v.LH = y;
791 else if ((cur_size != 0)&&(mem[q].hh.b1 == 98))
794 /* if p<>null then if (type(p)=glue_node)or(type(p)=kern_node) then */
796 if ((mem[p].hh.b0 == 10)||(mem[p].hh.b0 == 11))
798 mem[q].hh.v.RH = mem[p].hh.v.RH;
808 math_kern(q, cur_mu);
815 return; // abort_flag set
818 } /* end of switch */
820 switch(mem[q + 1].hh.v.RH){
827 delta = font_info[italic_base[cur_f]+(cur_i.b2)/ 4].cint;
828 p = new_character(cur_f, cur_c);
829 if ((mem[q + 1].hh.v.RH == 4)&&(font_info[2 + param_base
832 if ((mem[q + 3].hh.v.RH == 0)&&(delta != 0))
834 mem[p].hh.v.RH = new_kern(delta);
845 p = mem[q + 1].hh.v.LH;
849 cur_mlist = mem[q + 1].hh.v.LH;
850 savestyle = cur_style;
851 mlist_penalties = false;
853 cur_style = savestyle;
857 else cur_size = 16 *((cur_style - 2)/ 2);
858 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
859 .hh.v.RH]].cint, 18);
861 p = hpack(mem[temp_head].hh.v.RH, 0, 1);
867 return; // abort_flag set
870 } /* end of switch */
872 mem[q + 1].cint = p; /* p may be used without ... */
873 if ((mem[q + 3].hh.v.RH == 0)&&(mem[q + 2].hh.v.RH == 0)
876 make_scripts(q, delta);
877 lab82: z = hpack(mem[q + 1].cint, 0, 1);
878 if (mem[z + 3].cint > max_h)
879 max_h = mem[z + 3].cint;
880 if (mem[z + 2].cint > maxd)
881 maxd = mem[z + 2].cint;
884 rtype = mem[r].hh.b0;
885 lab81: q = mem[q].hh.v.RH;
897 else cur_size = 16 *((cur_style - 2)/ 2);
898 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
917 pen = eqtb[(hash_size + 3172)].cint;
923 pen = eqtb[(hash_size + 3173)].cint;
946 t = make_left_right(q, style, maxd, max_h);
950 cur_style = mem[q].hh.b1;
955 else cur_size = 16 *((cur_style - 2)/ 2);
956 cur_mu = x_over_n(font_info[6 + param_base[eqtb[(hash_size + 1837) + cur_size]
957 .hh.v.RH]].cint, 18);
982 return; // abort_flag set
988 switch(str_pool[rtype * 8 + t + magic_offset])
1012 confusion("mlist4");
1013 return; // abort_flag set
1019 y = math_glue(eqtb[(hash_size + 782) + x].hh.v.RH, cur_mu); /* gluebase + x */
1024 mem[z].hh.b1 = x + 1; /* x may be used without ... */
1027 if (mem[q + 1].cint != 0)
1029 mem[p].hh.v.RH = mem[q + 1].cint;
1032 } while(!(mem[p].hh.v.RH == 0));
1035 if (mem[q].hh.v.RH != 0)
1038 rtype = mem[mem[q].hh.v.RH].hh.b0;
1042 z = new_penalty(pen);
1054 void push_alignment (void)
1058 mem[p].hh.v.RH = align_ptr;
1059 mem[p].hh.v.LH = cur_align;
1060 mem[p + 1].hh.v.LH = mem[align_head].hh.v.RH;
1061 mem[p + 1].hh.v.RH = cur_span;
1062 mem[p + 2].cint = cur_loop;
1063 mem[p + 3].cint = align_state;
1064 mem[p + 4].hh.v.LH = cur_head;
1065 mem[p + 4].hh.v.RH = cur_tail;
1067 cur_head = get_avail ();
1069 void pop_alignment (void)
1073 mem[cur_head].hh.v.RH = avail;
1081 cur_tail = mem[p + 4].hh.v.RH;
1082 cur_head = mem[p + 4].hh.v.LH;
1083 align_state = mem[p + 3].cint;
1084 cur_loop = mem[p + 2].cint;
1085 cur_span = mem[p + 1].hh.v.RH;
1086 mem[align_head].hh.v.RH = mem[p + 1].hh.v.LH;
1087 cur_align = mem[p].hh.v.LH;
1088 align_ptr = mem[p].hh.v.RH;
1091 void get_preamble_token (void)
1093 lab20: get_token ();
1094 while((cur_chr == 256)&&(cur_cmd == 4)) {
1104 fatal_error("(interwoven alignment preambles are not allowed)"); /* */
1105 return; // abort_flag set
1107 if ((cur_cmd == 75)&&(cur_chr == (hash_size + 793)))
1109 scan_optional_equals ();
1111 if (eqtb[(hash_size + 3206)].cint > 0)
1112 geq_define((hash_size + 793), 117, cur_val);
1113 else eq_define((hash_size + 793), 117, cur_val);
1117 void init_align (void)
1123 align_state = -1000000L;
1124 if ((mode == 203)&&((tail != cur_list
1125 .head_field)||(cur_list.aux_field.cint != 0)))
1127 print_err("Improper ");
1128 print_esc("halign");
1129 print_string("inside $$");
1130 help3("Displays can use special alignments (like \\eqalignno)",
1131 "only if nothing but the alignment itself is between $$'s.",
1132 "So I've deleted the formulas that preceded this alignment.");
1140 cur_list.aux_field.cint = nest[nest_ptr - 2].aux_field.cint;
1143 /* long to short ... */
1144 mode = - (integer) mode;
1145 scan_spec(6, false);
1146 mem[align_head].hh.v.RH = 0;
1147 cur_align = align_head;
1150 warning_index = savecsptr;
1151 align_state = -1000000L;
1153 mem[cur_align].hh.v.RH = new_param_glue(11);
1154 cur_align = mem[cur_align].hh.v.RH;
1160 get_preamble_token();
1163 if ((cur_cmd <= 5)&&(cur_cmd >= 4)&&(align_state == -1000000L))
1164 if ((p == hold_head)&&(cur_loop == 0)&&(cur_cmd == 4))
1165 cur_loop = cur_align;
1167 print_err("Missing # inserted in alignment preamble");
1168 help3("There should be exactly one # between &'s, when an",
1169 "\\halign or \\valign is being set up. In this case you had",
1170 "none, so I've put one in; maybe that will work.");
1174 else if ((cur_cmd != 10)||(p != hold_head))
1176 mem[p].hh.v.RH = get_avail ();
1178 mem[p].hh.v.LH = cur_tok;
1182 mem[cur_align].hh.v.RH = new_null_box ();
1183 cur_align = mem[cur_align].hh.v.RH;
1184 mem[cur_align].hh.v.LH = end_span;
1185 mem[cur_align + 1].cint = -1073741824L; /* - 2^30 */
1186 mem[cur_align + 3].cint = mem[hold_head].hh.v.RH;
1191 get_preamble_token();
1192 if ((cur_cmd <= 5)&&(cur_cmd >= 4)&&(align_state == -1000000L))
1196 print_err("Only one # is allowed per tab");
1197 help3("There should be exactly one # between &'s, when an",
1198 "\\halign or \\valign is being set up. In this case you had",
1199 "more than one, so I'm ignoring all but the first.");
1203 mem[p].hh.v.RH = get_avail ();
1205 mem[p].hh.v.LH = cur_tok;
1207 lab32: mem[p].hh.v.RH = get_avail ();
1209 /* mem[p].hh.v.LH = (hash_size + 4614); */
1210 /* mem[p].hh.v.LH = (hash_size + 4095 + 519); */
1211 mem[p].hh.v.LH = (hash_size + hash_extra + 4095 + 519); /* 96/Jan/10 */
1212 mem[cur_align + 2].cint = mem[hold_head].hh.v.RH;
1214 lab30: scanner_status = 0;
1216 /* if every_cr<>null then begin_token_list(every_cr,every_cr_text); l.15665 */
1217 if (eqtb[(hash_size + 1320)].hh.v.RH != 0)/* everycr */
1218 begin_token_list(eqtb[(hash_size + 1320)].hh.v.RH, 13);
1221 void init_span_ (halfword p)
1225 space_factor = 1000;
1228 cur_list.aux_field.cint = ignore_depth;
1229 normal_paragraph ();
1233 void init_row (void)
1239 else cur_list.aux_field.cint = 0;
1241 mem[tail].hh.v.RH = new_glue(mem[mem[align_head]
1242 .hh.v.RH + 1].hh.v.LH);
1243 tail = mem[tail].hh.v.RH;
1245 mem[tail].hh.b1 = 12;
1246 cur_align = mem[mem[align_head].hh.v.RH].hh.v.RH;
1247 cur_tail = cur_head;
1248 init_span(cur_align);
1250 void init_col (void)
1252 mem[cur_align + 5].hh.v.LH = cur_cmd;
1258 begin_token_list(mem[cur_align + 3].cint, 1);
1261 /* fin_col() moved to end to hide in pragma (g, "off") */
1262 /* may need to move more ? everything calling new_null_box() ? */
1268 p = hpack(mem[head].hh.v.RH, 0, 1);
1271 if (cur_head != cur_tail)
1273 mem[tail].hh.v.RH = mem[cur_head].hh.v.RH;
1279 p = vpackage(mem[head].hh.v.RH, 0, 1,
1280 1073741823L); /* 2^30 - 1 */
1282 mem[tail].hh.v.RH = p;
1284 space_factor = 1000;
1287 mem[p + 6].cint = 0;
1288 if (eqtb[(hash_size + 1320)].hh.v.RH != 0)/* everycr */
1289 begin_token_list(eqtb[(hash_size + 1320)].hh.v.RH, 13);
1292 void fin_align (void)
1294 halfword p, q, r, s, u, v;
1299 memory_word auxsave;
1301 if (cur_group != 6){
1302 confusion("align1");
1303 return; // abort_flag set
1306 if (cur_group != 6){
1307 confusion("align0");
1308 return; // abort_flag set
1311 if (nest[nest_ptr - 1].mode_field == 203)
1312 o = eqtb[(hash_size + 3745)].cint;
1314 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1316 flush_list(mem[q + 3].cint);
1317 flush_list(mem[q + 2].cint);
1318 p = mem[mem[q].hh.v.RH].hh.v.RH;
1319 if (mem[q + 1].cint == -1073741824L) /* - 2^30 */
1321 mem[q + 1].cint = 0;
1323 s = mem[r + 1].hh.v.LH;
1326 incr(mem[0].hh.v.RH); /* mem[mem_bot]? mem[null]? */
1328 mem[r + 1].hh.v.LH = 0;
1331 if (mem[q].hh.v.LH != end_span)
1333 t = mem[q + 1].cint + mem[mem[mem[q].hh.v.RH + 1].hh
1340 mem[r + 1].cint = mem[r + 1].cint - t;
1342 while(mem[r].hh.v.RH > n){
1345 n = mem[mem[s].hh.v.LH].hh.v.RH + 1;
1347 if (mem[r].hh.v.RH < n)
1349 mem[r].hh.v.LH = mem[s].hh.v.LH;
1351 decr(mem[r].hh.v.RH);
1356 if (mem[r + 1].cint > mem[mem[s].hh.v.LH + 1].cint)
1357 mem[mem[s].hh.v.LH + 1].cint = mem[r + 1].cint;
1361 } while(!(r == end_span));
1365 mem[q + 3].cint = 0;
1366 mem[q + 2].cint = 0;
1367 mem[q + 5].hh.b1 = 0;
1368 mem[q + 5].hh.b0 = 0;
1369 mem[q + 6].cint = 0;
1370 mem[q + 4].cint = 0;
1373 save_ptr = save_ptr - 2;
1374 pack_begin_line = - (integer) mode_line;
1377 rulesave = eqtb[(hash_size + 3746)].cint;
1378 eqtb[(hash_size + 3746)].cint = 0;
1379 p = hpack(mem[align_head].hh.v.RH, save_stack[save_ptr + 1].cint
1380 , save_stack[save_ptr + 0].cint);
1381 eqtb[(hash_size + 3746)].cint = rulesave;
1385 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1387 mem[q + 3].cint = mem[q + 1].cint;
1388 mem[q + 1].cint = 0;
1389 q = mem[mem[q].hh.v.RH].hh.v.RH;
1391 p = vpackage(mem[align_head].hh.v.RH, save_stack[save_ptr + 1]
1392 .cint, save_stack[save_ptr + 0].cint, 1073741823L); /* 2^30 - 1 */
1393 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1395 mem[q + 1].cint = mem[q + 3].cint;
1396 mem[q + 3].cint = 0;
1397 q = mem[mem[q].hh.v.RH].hh.v.RH;
1400 pack_begin_line = 0;
1401 q = mem[head].hh.v.RH;
1403 while(q != 0){ /* while q<>null l.15794 OK */
1405 if (!(q >= hi_mem_min)) /* begin if not is_char_node(q) then */
1406 if (mem[q].hh.b0 == 13)
1411 mem[q + 1].cint = mem[p + 1].cint;
1416 mem[q + 3].cint = mem[p + 3].cint;
1418 mem[q + 5].hh.b1 = mem[p + 5].hh.b1;
1419 mem[q + 5].hh.b0 = mem[p + 5].hh.b0;
1420 mem[q + 6].gr = mem[p + 6].gr;
1421 mem[q + 4].cint = o;
1422 r = mem[mem[q + 5].hh.v.RH].hh.v.RH;
1423 s = mem[mem[p + 5].hh.v.RH].hh.v.RH;
1426 t = mem[s + 1].cint;
1433 v = mem[s + 1].hh.v.LH;
1434 mem[u].hh.v.RH = new_glue(v);
1437 t = t + mem[v + 1].cint;
1438 if (mem[p + 5].hh.b0 == 1)
1440 if (mem[v].hh.b0 == mem[p + 5].hh.b1)
1441 t = t + round(mem[p + 6].gr * mem[v + 2].cint);
1443 else if (mem[p + 5].hh.b0 == 2)
1445 if (mem[v].hh.b1 == mem[p + 5].hh.b1)
1446 t = t - round(mem[p + 6].gr * mem[v + 3].cint);
1449 mem[u].hh.v.RH = new_null_box ();
1451 t = t + mem[s + 1].cint;
1453 mem[u + 1].cint = mem[s + 1].cint;
1457 mem[u + 3].cint = mem[s + 1].cint;
1462 mem[r + 3].cint = mem[q + 3].cint;
1463 mem[r + 2].cint = mem[q + 2].cint;
1464 if (t == mem[r + 1].cint)
1466 mem[r + 5].hh.b0 = 0;
1467 mem[r + 5].hh.b1 = 0;
1468 mem[r + 6].gr = 0.0;
1470 else if (t > mem[r + 1].cint)
1472 mem[r + 5].hh.b0 = 1;
1473 if (mem[r + 6].cint == 0)
1474 mem[r + 6].gr = 0.0;
1475 else mem[r + 6].gr =(t - mem[r + 1].cint)/ ((double)
1480 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1481 mem[r + 5].hh.b0 = 2;
1482 if (mem[r + 4].cint == 0)
1483 mem[r + 6].gr = 0.0;
1484 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 1].cint -
1485 t > mem[r + 4].cint))
1486 mem[r + 6].gr = 1.0;
1487 else mem[r + 6].gr =(mem[r + 1].cint - t)/ ((double)
1490 mem[r + 1].cint = w;
1495 mem[r + 1].cint = mem[q + 1].cint;
1496 if (t == mem[r + 3].cint)
1498 mem[r + 5].hh.b0 = 0;
1499 mem[r + 5].hh.b1 = 0;
1500 mem[r + 6].gr = 0.0;
1502 else if (t > mem[r + 3].cint)
1504 mem[r + 5].hh.b0 = 1;
1505 if (mem[r + 6].cint == 0)
1506 mem[r + 6].gr = 0.0;
1507 else mem[r + 6].gr =(t - mem[r + 3].cint)/ ((double)
1512 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1513 mem[r + 5].hh.b0 = 2;
1514 if (mem[r + 4].cint == 0)
1515 mem[r + 6].gr = 0.0;
1516 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 3].cint -
1517 t > mem[r + 4].cint))
1518 mem[r + 6].gr = 1.0;
1519 else mem[r + 6].gr =(mem[r + 3].cint - t)/ ((double)
1522 mem[r + 3].cint = w;
1525 mem[r + 4].cint = 0;
1528 mem[u].hh.v.RH = mem[r].hh.v.RH;
1529 mem[r].hh.v.RH = mem[hold_head].hh.v.RH;
1532 r = mem[mem[r].hh.v.RH].hh.v.RH;
1533 s = mem[mem[s].hh.v.RH].hh.v.RH;
1536 else if (mem[q].hh.b0 == 2)
1538 if ((mem[q + 1].cint == -1073741824L)) /* 2^30 */
1539 mem[q + 1].cint = mem[p + 1].cint;
1540 if ((mem[q + 3].cint == -1073741824L)) /* 2^30 */
1541 mem[q + 3].cint = mem[p + 3].cint;
1542 if ((mem[q + 2].cint == -1073741824L)) /* 2^30 */
1543 mem[q + 2].cint = mem[p + 2].cint;
1549 mem[q + 4].cint = o;
1559 auxsave = cur_list.aux_field;
1560 p = mem[head].hh.v.RH;
1567 print_err("Missing $$ inserted");
1568 help2("Displays can use special alignments (like \\eqalignno)",
1569 "only if nothing but the alignment itself is between $$'s.");
1577 print_err("Display math should end with $$");
1578 help2("The `$' that I just saw supposedly matches a previous `$$'.",
1579 "So I shall assume that you typed `$$' both times.");
1585 mem[tail].hh.v.RH = new_penalty(eqtb[(hash_size + 3174)].cint
1587 tail = mem[tail].hh.v.RH;
1590 mem[tail].hh.v.RH = new_param_glue(3);
1591 tail = mem[tail].hh.v.RH;
1593 mem[tail].hh.v.RH = p;
1597 mem[tail].hh.v.RH = new_penalty(eqtb[(hash_size + 3175)].cint
1599 tail = mem[tail].hh.v.RH;
1602 mem[tail].hh.v.RH = new_param_glue(4);
1603 tail = mem[tail].hh.v.RH;
1605 cur_list.aux_field.cint = auxsave.cint;
1606 resume_after_display ();
1610 cur_list.aux_field = auxsave;
1611 mem[tail].hh.v.RH = p;
1612 if (p != 0) /* if p<>null then tail:=q; l.15926 */
1619 /* used to be align_peek, zfintieshrink, etc in old tex5.c */
1620 /************************************************************************/
1621 /* moved down here to avoid questions about pragma optimize */
1622 #pragma optimize("g", off) /* for MC VS compiler */
1623 /* Moved down here 96/Oct/12 in response to problem with texerror.tex */
1624 /* pragma optimize("a", off) not strong enough - this may slow things */
1626 {/* 10 */ register bool Result;
1634 if (cur_align == 0){
1636 return 0; // abort_flag set
1638 q = mem[cur_align].hh.v.RH;
1641 return 0; // abort_flag set
1643 if (align_state < 500000L) { /* ??? */
1644 fatal_error("(interwoven alignment preambles are not allowed)"); /* */
1645 return 0; // abort_flag set
1647 p = mem[q].hh.v.RH; /* p <- link(q) p.791 */
1648 /* if (p = null) ^ (extra_info(cur_align) < cr_code) then p.792 */
1649 if ((p == 0)&&(mem[cur_align + 5].hh.v.LH < 257))
1652 /* potential problem here if new_null_box causes memory reallocation ??? */
1653 /* compiler optimization does not refresh `mem' loaded in registers ? */
1654 mem[q].hh.v.RH = new_null_box ();
1656 mem[p].hh.v.LH = end_span;
1657 mem[p + 1].cint = -1073741824L; /* - 2^30 */
1658 cur_loop = mem[cur_loop].hh.v.RH;
1660 r = mem[cur_loop + 3].cint;
1663 mem[q].hh.v.RH = get_avail ();
1665 mem[q].hh.v.LH = mem[r].hh.v.LH;
1669 mem[p + 3].cint = mem[hold_head].hh.v.RH;
1671 r = mem[cur_loop + 2].cint;
1674 mem[q].hh.v.RH = get_avail ();
1676 mem[q].hh.v.LH = mem[r].hh.v.LH;
1680 mem[p + 2].cint = mem[hold_head].hh.v.RH;
1681 cur_loop = mem[cur_loop].hh.v.RH;
1682 mem[p].hh.v.RH = new_glue(mem[cur_loop + 1].hh.v.LH);
1685 print_err("Extra alignment tab has been changed to ");
1687 help3("You have given more \\span or & marks than there were",
1688 "in the preamble to the \\halign or \\valign now in progress.",
1689 "So I'll assume that you meant to type \\cr instead.");
1690 /* extra_info(cur_align) < cr_code) ? */
1691 mem[cur_align + 5].hh.v.LH = 257;
1694 if (mem[cur_align + 5].hh.v.LH != 256)
1701 adjust_tail = cur_tail;
1702 u = hpack(mem[head].hh.v.RH, 0, 1);
1703 w = mem[u + 1].cint;
1704 cur_tail = adjust_tail;
1709 u = vpackage(mem[head].hh.v.RH, 0, 1, 0);
1710 w = mem[u + 3].cint;
1713 if (cur_span != cur_align)
1718 q = mem[mem[q].hh.v.RH].hh.v.RH;
1719 } while(!(q == cur_align));
1720 /* if n > max_quarterword then confusion("256 spans"); p.798 */
1721 /* if (n > 255) */ /* 94/Apr/4 ? */
1722 if (n > max_quarterword) { /* 96/Oct/12 ??? */
1723 confusion("256 spans"); /* 256 spans --- message wrong now, but ... */
1724 return 0; // abort_flag set
1727 while(mem[mem[q].hh.v.LH].hh.v.RH < n)q = mem[q].hh
1729 if (mem[mem[q].hh.v.LH].hh.v.RH > n)
1732 mem[s].hh.v.LH = mem[q].hh.v.LH;
1735 mem[s + 1].cint = w;
1737 else if (mem[mem[q].hh.v.LH + 1].cint < w)
1738 mem[mem[q].hh.v.LH + 1].cint = w;
1740 else if (w > mem[cur_align + 1].cint)
1741 mem[cur_align + 1].cint = w;
1744 if (totalstretch[3]!= 0)
1746 else if (totalstretch[2]!= 0)
1748 else if (totalstretch[1]!= 0)
1751 mem[u + 5].hh.b1 = o;
1752 mem[u + 6].cint = totalstretch[o];
1753 if (totalshrink[3]!= 0)
1755 else if (totalshrink[2]!= 0)
1757 else if (totalshrink[1]!= 0)
1760 mem[u + 5].hh.b0 = o;
1761 mem[u + 4].cint = totalshrink[o];
1763 mem[tail].hh.v.RH = u;
1767 mem[tail].hh.v.RH = new_glue(mem[mem[cur_align]
1768 .hh.v.RH + 1].hh.v.LH);
1769 tail = mem[tail].hh.v.RH;
1771 mem[tail].hh.b1 = 12;
1772 /* if (extra_info(cur_align) >= cr_code) then p.792 */
1773 if (mem[cur_align + 5].hh.v.LH >= 257)
1780 align_state = 1000000L;
1783 } while(!(cur_cmd != 10));
1789 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1790 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1791 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1792 /* #pragma optimize("g", off) */ /* for MC VS compiler */
1794 scaled make_op_(halfword q)
1795 {register scaled Result;
1797 halfword p, v, x, y, z;
1800 scaled shiftup, shiftdown;
1801 if ((mem[q].hh.b1 == 0)&&(cur_style < 2))
1803 if (mem[q + 1].hh.v.RH == 1)
1806 if ((cur_style < 2)&&(((cur_i.b2)% 4)== 2))
1809 i = font_info[char_base[cur_f]+ c].qqqq;
1814 mem[q + 1].hh.b1 = c;
1817 delta = font_info[italic_base[cur_f]+(cur_i.b2)/ 4].cint;
1818 x = clean_box(q + 1, cur_style);
1819 if ((mem[q + 3].hh.v.RH != 0)&&(mem[q].hh.b1 != 1))
1820 mem[x + 1].cint = mem[x + 1].cint - delta;
1821 mem[x + 4].cint = half(mem[x + 3].cint - mem[x + 2].cint)-
1822 font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
1823 mem[q + 1].hh.v.RH = 2;
1824 mem[q + 1].hh.v.LH = x;
1827 if (mem[q].hh.b1 == 1)
1829 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1830 y = clean_box(q + 1, cur_style);
1831 z = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1832 v = new_null_box ();
1834 mem[v + 1].cint = mem[y + 1].cint;
1835 if (mem[x + 1].cint > mem[v + 1].cint)
1836 mem[v + 1].cint = mem[x + 1].cint;
1837 if (mem[z + 1].cint > mem[v + 1].cint)
1838 mem[v + 1].cint = mem[z + 1].cint;
1839 x = rebox(x, mem[v + 1].cint);
1840 y = rebox(y, mem[v + 1].cint);
1841 z = rebox(z, mem[v + 1].cint);
1842 mem[x + 4].cint = half(delta);
1843 mem[z + 4].cint = - (integer) mem[x + 4].cint;
1844 mem[v + 3].cint = mem[y + 3].cint;
1845 mem[v + 2].cint = mem[y + 2].cint;
1846 if (mem[q + 2].hh.v.RH == 0)
1849 mem[v + 5].hh.v.RH = y;
1853 shiftup = font_info[11 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1854 ]].cint - mem[x + 2].cint;
1855 if (shiftup < font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1857 shiftup = font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1859 p = new_kern(shiftup);
1862 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1865 mem[v + 5].hh.v.RH = p;
1866 mem[v + 3].cint = mem[v + 3].cint + font_info[13 + param_base[
1867 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[x + 3].cint + mem
1868 [x + 2].cint + shiftup;
1870 if (mem[q + 3].hh.v.RH == 0)
1874 shiftdown = font_info[12 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1875 .v.RH]].cint - mem[z + 3].cint;
1876 if (shiftdown < font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size]
1878 shiftdown = font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1880 p = new_kern(shiftdown);
1883 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1886 mem[v + 2].cint = mem[v + 2].cint + font_info[13 + param_base[
1887 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[z + 3].cint + mem
1888 [z + 2].cint + shiftdown;
1890 mem[q + 1].cint = v;
1895 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1896 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1897 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1898 /* #pragma optimize ("g", off) */
1900 void make_scripts_(halfword q, scaled delta)
1902 halfword p, x, y, z;
1903 scaled shiftup, shiftdown, clr;
1905 p = mem[q + 1].cint;
1906 if ((p >= hi_mem_min))
1917 shiftup = mem[z + 3].cint - font_info[18 + param_base[eqtb[(hash_size + 1837) +
1919 shiftdown = mem[z + 2].cint + font_info[19 + param_base[eqtb[(hash_size + 1837)
1920 + t].hh.v.RH]].cint;
1923 if (mem[q + 2].hh.v.RH == 0)
1925 x = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1926 mem[x + 1].cint = mem[x + 1].cint + eqtb[(hash_size + 3742)].cint;
1927 if (shiftdown < font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1929 shiftdown = font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH
1931 clr = mem[x + 3].cint -(abs(font_info[5 + param_base[eqtb[
1932 (hash_size + 1837) + cur_size].hh.v.RH]].cint * 4)/ 5);
1933 if (shiftdown < clr)
1935 mem[x + 4].cint = shiftdown;
1940 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1941 mem[x + 1].cint = mem[x + 1].cint + eqtb[(hash_size + 3742)].cint;
1943 clr = font_info[15 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1945 else if (cur_style < 2)
1946 clr = font_info[13 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1948 else clr = font_info[14 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1952 clr = mem[x + 2].cint +(abs(font_info[5 +
1953 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint)/ 4);
1957 if (mem[q + 3].hh.v.RH == 0)
1958 mem[x + 4].cint = - (integer) shiftup;
1961 y = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1962 mem[y + 1].cint = mem[y + 1].cint + eqtb[(hash_size + 3742)].cint;
1963 if (shiftdown < font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size]
1965 shiftdown = font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1967 clr = 4 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1968 ]].cint -((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1972 shiftdown = shiftdown + clr;
1973 clr =(abs(font_info[5 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1974 .v.RH]].cint * 4)/ 5)-(shiftup - mem[x + 2].cint);
1977 shiftup = shiftup + clr;
1978 shiftdown = shiftdown - clr;
1981 mem[x + 4].cint = delta;
1982 p = new_kern((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1986 x = vpackage(x, 0, 1, 1073741823L); /* 2^30 - 1 */
1987 mem[x + 4].cint = shiftdown;
1990 if (mem[q + 1].cint == 0)
1991 mem[q + 1].cint = x;
1994 p = mem[q + 1].cint;
1995 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
1999 /* #pragma optimize ("g", on) */ /* 96/Sep/12 */
2000 /* #pragma optimize ("g") */ /* 94/Jan/25 */
2001 #pragma optimize ("", on) /* 96/Sep/12 */
2002 /***************************************************************************/