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)* eqtb[(hash_size + 3181)].cint;
590 delta2 = delta1 + delta1 - eqtb[(hash_size + 3740)].cint;
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 = eqtb[(hash_size + 3172)].cint;
917 pen = eqtb[(hash_size + 3173)].cint;
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 (eqtb[(hash_size + 3206)].cint > 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 (eqtb[(hash_size + 1320)].hh.v.RH != 0)/* everycr */
1212 begin_token_list(eqtb[(hash_size + 1320)].hh.v.RH, 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 (eqtb[(hash_size + 1320)].hh.v.RH != 0)/* everycr */
1283 begin_token_list(eqtb[(hash_size + 1320)].hh.v.RH, 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)
1306 o = eqtb[(hash_size + 3745)].cint;
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 = eqtb[(hash_size + 3746)].cint;
1372 eqtb[(hash_size + 3746)].cint = 0;
1373 p = hpack(mem[align_head].hh.v.RH, save_stack[save_ptr + 1].cint
1374 , save_stack[save_ptr + 0].cint);
1375 eqtb[(hash_size + 3746)].cint = rulesave;
1379 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1381 mem[q + 3].cint = mem[q + 1].cint;
1382 mem[q + 1].cint = 0;
1383 q = mem[mem[q].hh.v.RH].hh.v.RH;
1385 p = vpackage(mem[align_head].hh.v.RH, save_stack[save_ptr + 1]
1386 .cint, save_stack[save_ptr + 0].cint, 1073741823L); /* 2^30 - 1 */
1387 q = mem[mem[align_head].hh.v.RH].hh.v.RH;
1389 mem[q + 1].cint = mem[q + 3].cint;
1390 mem[q + 3].cint = 0;
1391 q = mem[mem[q].hh.v.RH].hh.v.RH;
1394 pack_begin_line = 0;
1395 q = mem[head].hh.v.RH;
1397 while(q != 0){ /* while q<>null l.15794 OK */
1399 if (!(q >= hi_mem_min)) /* begin if not is_char_node(q) then */
1400 if (mem[q].hh.b0 == 13)
1405 mem[q + 1].cint = mem[p + 1].cint;
1410 mem[q + 3].cint = mem[p + 3].cint;
1412 mem[q + 5].hh.b1 = mem[p + 5].hh.b1;
1413 mem[q + 5].hh.b0 = mem[p + 5].hh.b0;
1414 mem[q + 6].gr = mem[p + 6].gr;
1415 mem[q + 4].cint = o;
1416 r = mem[mem[q + 5].hh.v.RH].hh.v.RH;
1417 s = mem[mem[p + 5].hh.v.RH].hh.v.RH;
1420 t = mem[s + 1].cint;
1427 v = mem[s + 1].hh.v.LH;
1428 mem[u].hh.v.RH = new_glue(v);
1431 t = t + mem[v + 1].cint;
1432 if (mem[p + 5].hh.b0 == 1)
1434 if (mem[v].hh.b0 == mem[p + 5].hh.b1)
1435 t = t + round(mem[p + 6].gr * mem[v + 2].cint);
1437 else if (mem[p + 5].hh.b0 == 2)
1439 if (mem[v].hh.b1 == mem[p + 5].hh.b1)
1440 t = t - round(mem[p + 6].gr * mem[v + 3].cint);
1443 mem[u].hh.v.RH = new_null_box();
1445 t = t + mem[s + 1].cint;
1447 mem[u + 1].cint = mem[s + 1].cint;
1451 mem[u + 3].cint = mem[s + 1].cint;
1456 mem[r + 3].cint = mem[q + 3].cint;
1457 mem[r + 2].cint = mem[q + 2].cint;
1458 if (t == mem[r + 1].cint)
1460 mem[r + 5].hh.b0 = 0;
1461 mem[r + 5].hh.b1 = 0;
1462 mem[r + 6].gr = 0.0;
1464 else if (t > mem[r + 1].cint)
1466 mem[r + 5].hh.b0 = 1;
1467 if (mem[r + 6].cint == 0)
1468 mem[r + 6].gr = 0.0;
1469 else mem[r + 6].gr =(t - mem[r + 1].cint)/ ((double)
1474 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1475 mem[r + 5].hh.b0 = 2;
1476 if (mem[r + 4].cint == 0)
1477 mem[r + 6].gr = 0.0;
1478 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 1].cint -
1479 t > mem[r + 4].cint))
1480 mem[r + 6].gr = 1.0;
1481 else mem[r + 6].gr =(mem[r + 1].cint - t)/ ((double)
1484 mem[r + 1].cint = w;
1489 mem[r + 1].cint = mem[q + 1].cint;
1490 if (t == mem[r + 3].cint)
1492 mem[r + 5].hh.b0 = 0;
1493 mem[r + 5].hh.b1 = 0;
1494 mem[r + 6].gr = 0.0;
1496 else if (t > mem[r + 3].cint)
1498 mem[r + 5].hh.b0 = 1;
1499 if (mem[r + 6].cint == 0)
1500 mem[r + 6].gr = 0.0;
1501 else mem[r + 6].gr =(t - mem[r + 3].cint)/ ((double)
1506 mem[r + 5].hh.b1 = mem[r + 5].hh.b0;
1507 mem[r + 5].hh.b0 = 2;
1508 if (mem[r + 4].cint == 0)
1509 mem[r + 6].gr = 0.0;
1510 else if ((mem[r + 5].hh.b1 == 0)&&(mem[r + 3].cint -
1511 t > mem[r + 4].cint))
1512 mem[r + 6].gr = 1.0;
1513 else mem[r + 6].gr =(mem[r + 3].cint - t)/ ((double)
1516 mem[r + 3].cint = w;
1519 mem[r + 4].cint = 0;
1522 mem[u].hh.v.RH = mem[r].hh.v.RH;
1523 mem[r].hh.v.RH = mem[hold_head].hh.v.RH;
1526 r = mem[mem[r].hh.v.RH].hh.v.RH;
1527 s = mem[mem[s].hh.v.RH].hh.v.RH;
1530 else if (mem[q].hh.b0 == 2)
1532 if ((mem[q + 1].cint == -1073741824L)) /* 2^30 */
1533 mem[q + 1].cint = mem[p + 1].cint;
1534 if ((mem[q + 3].cint == -1073741824L)) /* 2^30 */
1535 mem[q + 3].cint = mem[p + 3].cint;
1536 if ((mem[q + 2].cint == -1073741824L)) /* 2^30 */
1537 mem[q + 2].cint = mem[p + 2].cint;
1543 mem[q + 4].cint = o;
1553 auxsave = cur_list.aux_field;
1554 p = mem[head].hh.v.RH;
1561 print_err("Missing $$ inserted");
1562 help2("Displays can use special alignments (like \\eqalignno)",
1563 "only if nothing but the alignment itself is between $$'s.");
1571 print_err("Display math should end with $$");
1572 help2("The `$' that I just saw supposedly matches a previous `$$'.",
1573 "So I shall assume that you typed `$$' both times.");
1579 mem[tail].hh.v.RH = new_penalty(eqtb[(hash_size + 3174)].cint
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(eqtb[(hash_size + 3175)].cint
1593 tail = mem[tail].hh.v.RH;
1596 mem[tail].hh.v.RH = new_param_glue(4);
1597 tail = mem[tail].hh.v.RH;
1599 cur_list.aux_field.cint = auxsave.cint;
1600 resume_after_display();
1604 cur_list.aux_field = auxsave;
1605 mem[tail].hh.v.RH = p;
1606 if (p != 0) /* if p<>null then tail:=q; l.15926 */
1613 /* used to be align_peek, zfintieshrink, etc in old tex5.c */
1614 /************************************************************************/
1615 /* moved down here to avoid questions about pragma optimize */
1616 #pragma optimize("g", off) /* for MC VS compiler */
1617 /* Moved down here 96/Oct/12 in response to problem with texerror.tex */
1618 /* pragma optimize("a", off) not strong enough - this may slow things */
1620 {/* 10 */ register bool Result;
1628 if (cur_align == 0){
1630 return 0; // abort_flag set
1632 q = mem[cur_align].hh.v.RH;
1635 return 0; // abort_flag set
1637 if (align_state < 500000L) { /* ??? */
1638 fatal_error("(interwoven alignment preambles are not allowed)"); /* */
1639 return 0; // abort_flag set
1641 p = mem[q].hh.v.RH; /* p <- link(q) p.791 */
1642 /* if (p = null) ^ (extra_info(cur_align) < cr_code) then p.792 */
1643 if ((p == 0)&&(mem[cur_align + 5].hh.v.LH < 257))
1646 /* potential problem here if new_null_box causes memory reallocation ??? */
1647 /* compiler optimization does not refresh `mem' loaded in registers ? */
1648 mem[q].hh.v.RH = new_null_box();
1650 mem[p].hh.v.LH = end_span;
1651 mem[p + 1].cint = -1073741824L; /* - 2^30 */
1652 cur_loop = mem[cur_loop].hh.v.RH;
1654 r = mem[cur_loop + 3].cint;
1657 mem[q].hh.v.RH = get_avail();
1659 mem[q].hh.v.LH = mem[r].hh.v.LH;
1663 mem[p + 3].cint = mem[hold_head].hh.v.RH;
1665 r = mem[cur_loop + 2].cint;
1668 mem[q].hh.v.RH = get_avail();
1670 mem[q].hh.v.LH = mem[r].hh.v.LH;
1674 mem[p + 2].cint = mem[hold_head].hh.v.RH;
1675 cur_loop = mem[cur_loop].hh.v.RH;
1676 mem[p].hh.v.RH = new_glue(mem[cur_loop + 1].hh.v.LH);
1679 print_err("Extra alignment tab has been changed to ");
1681 help3("You have given more \\span or & marks than there were",
1682 "in the preamble to the \\halign or \\valign now in progress.",
1683 "So I'll assume that you meant to type \\cr instead.");
1684 /* extra_info(cur_align) < cr_code) ? */
1685 mem[cur_align + 5].hh.v.LH = 257;
1688 if (mem[cur_align + 5].hh.v.LH != 256)
1695 adjust_tail = cur_tail;
1696 u = hpack(mem[head].hh.v.RH, 0, 1);
1697 w = mem[u + 1].cint;
1698 cur_tail = adjust_tail;
1703 u = vpackage(mem[head].hh.v.RH, 0, 1, 0);
1704 w = mem[u + 3].cint;
1707 if (cur_span != cur_align)
1712 q = mem[mem[q].hh.v.RH].hh.v.RH;
1713 } while(!(q == cur_align));
1714 /* if n > max_quarterword then confusion("256 spans"); p.798 */
1715 /* if (n > 255) */ /* 94/Apr/4 ? */
1716 if (n > max_quarterword) { /* 96/Oct/12 ??? */
1717 confusion("256 spans"); /* 256 spans --- message wrong now, but ... */
1718 return 0; // abort_flag set
1721 while(mem[mem[q].hh.v.LH].hh.v.RH < n)q = mem[q].hh
1723 if (mem[mem[q].hh.v.LH].hh.v.RH > n)
1726 mem[s].hh.v.LH = mem[q].hh.v.LH;
1729 mem[s + 1].cint = w;
1731 else if (mem[mem[q].hh.v.LH + 1].cint < w)
1732 mem[mem[q].hh.v.LH + 1].cint = w;
1734 else if (w > mem[cur_align + 1].cint)
1735 mem[cur_align + 1].cint = w;
1738 if (totalstretch[3]!= 0)
1740 else if (totalstretch[2]!= 0)
1742 else if (totalstretch[1]!= 0)
1745 mem[u + 5].hh.b1 = o;
1746 mem[u + 6].cint = totalstretch[o];
1747 if (totalshrink[3]!= 0)
1749 else if (totalshrink[2]!= 0)
1751 else if (totalshrink[1]!= 0)
1754 mem[u + 5].hh.b0 = o;
1755 mem[u + 4].cint = totalshrink[o];
1757 mem[tail].hh.v.RH = u;
1761 mem[tail].hh.v.RH = new_glue(mem[mem[cur_align]
1762 .hh.v.RH + 1].hh.v.LH);
1763 tail = mem[tail].hh.v.RH;
1765 mem[tail].hh.b1 = 12;
1766 /* if (extra_info(cur_align) >= cr_code) then p.792 */
1767 if (mem[cur_align + 5].hh.v.LH >= 257)
1774 align_state = 1000000L;
1777 } while(!(cur_cmd != 10));
1783 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1784 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1785 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1786 /* #pragma optimize("g", off) */ /* for MC VS compiler */
1788 scaled make_op_(halfword q)
1789 {register scaled Result;
1791 halfword p, v, x, y, z;
1794 scaled shiftup, shiftdown;
1795 if ((mem[q].hh.b1 == 0)&&(cur_style < 2))
1797 if (mem[q + 1].hh.v.RH == 1)
1800 if ((cur_style < 2)&&(((cur_i.b2)% 4)== 2))
1803 i = font_info[char_base[cur_f]+ c].qqqq;
1808 mem[q + 1].hh.b1 = c;
1811 delta = font_info[italic_base[cur_f]+(cur_i.b2)/ 4].cint;
1812 x = clean_box(q + 1, cur_style);
1813 if ((mem[q + 3].hh.v.RH != 0)&&(mem[q].hh.b1 != 1))
1814 mem[x + 1].cint = mem[x + 1].cint - delta;
1815 mem[x + 4].cint = half(mem[x + 3].cint - mem[x + 2].cint)-
1816 font_info[22 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint;
1817 mem[q + 1].hh.v.RH = 2;
1818 mem[q + 1].hh.v.LH = x;
1821 if (mem[q].hh.b1 == 1)
1823 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1824 y = clean_box(q + 1, cur_style);
1825 z = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1828 mem[v + 1].cint = mem[y + 1].cint;
1829 if (mem[x + 1].cint > mem[v + 1].cint)
1830 mem[v + 1].cint = mem[x + 1].cint;
1831 if (mem[z + 1].cint > mem[v + 1].cint)
1832 mem[v + 1].cint = mem[z + 1].cint;
1833 x = rebox(x, mem[v + 1].cint);
1834 y = rebox(y, mem[v + 1].cint);
1835 z = rebox(z, mem[v + 1].cint);
1836 mem[x + 4].cint = half(delta);
1837 mem[z + 4].cint = - (integer) mem[x + 4].cint;
1838 mem[v + 3].cint = mem[y + 3].cint;
1839 mem[v + 2].cint = mem[y + 2].cint;
1840 if (mem[q + 2].hh.v.RH == 0)
1843 mem[v + 5].hh.v.RH = y;
1847 shiftup = font_info[11 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1848 ]].cint - mem[x + 2].cint;
1849 if (shiftup < font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1851 shiftup = font_info[9 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1853 p = new_kern(shiftup);
1856 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1859 mem[v + 5].hh.v.RH = p;
1860 mem[v + 3].cint = mem[v + 3].cint + font_info[13 + param_base[
1861 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[x + 3].cint + mem
1862 [x + 2].cint + shiftup;
1864 if (mem[q + 3].hh.v.RH == 0)
1868 shiftdown = font_info[12 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1869 .v.RH]].cint - mem[z + 3].cint;
1870 if (shiftdown < font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size]
1872 shiftdown = font_info[10 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1874 p = new_kern(shiftdown);
1877 p = new_kern(font_info[13 + param_base[eqtb[(hash_size + 1838) + cur_size].hh
1880 mem[v + 2].cint = mem[v + 2].cint + font_info[13 + param_base[
1881 eqtb[(hash_size + 1838) + cur_size].hh.v.RH]].cint + mem[z + 3].cint + mem
1882 [z + 2].cint + shiftdown;
1884 mem[q + 1].cint = v;
1889 /* #pragma optimize ("g", on) */ /* for MC VS compiler */
1890 /* #pragma optimize ("g",) */ /* 94/Jan/25 */
1891 /* #pragma optimize ("", on) */ /* 96/Sep/12 */
1892 /* #pragma optimize ("g", off) */
1894 void make_scripts_(halfword q, scaled delta)
1896 halfword p, x, y, z;
1897 scaled shiftup, shiftdown, clr;
1899 p = mem[q + 1].cint;
1900 if ((p >= hi_mem_min))
1911 shiftup = mem[z + 3].cint - font_info[18 + param_base[eqtb[(hash_size + 1837) +
1913 shiftdown = mem[z + 2].cint + font_info[19 + param_base[eqtb[(hash_size + 1837)
1914 + t].hh.v.RH]].cint;
1917 if (mem[q + 2].hh.v.RH == 0)
1919 x = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1920 mem[x + 1].cint = mem[x + 1].cint + eqtb[(hash_size + 3742)].cint;
1921 if (shiftdown < font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1923 shiftdown = font_info[16 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH
1925 clr = mem[x + 3].cint -(abs(font_info[5 + param_base[eqtb[
1926 (hash_size + 1837) + cur_size].hh.v.RH]].cint * 4)/ 5);
1927 if (shiftdown < clr)
1929 mem[x + 4].cint = shiftdown;
1934 x = clean_box(q + 2, 2 *(cur_style / 4)+ 4 +(cur_style % 2));
1935 mem[x + 1].cint = mem[x + 1].cint + eqtb[(hash_size + 3742)].cint;
1937 clr = font_info[15 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1939 else if (cur_style < 2)
1940 clr = font_info[13 + param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]]
1942 else clr = font_info[14 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1946 clr = mem[x + 2].cint +(abs(font_info[5 +
1947 param_base[eqtb[(hash_size + 1837) + cur_size].hh.v.RH]].cint)/ 4);
1951 if (mem[q + 3].hh.v.RH == 0)
1952 mem[x + 4].cint = - (integer) shiftup;
1955 y = clean_box(q + 3, 2 *(cur_style / 4)+ 5);
1956 mem[y + 1].cint = mem[y + 1].cint + eqtb[(hash_size + 3742)].cint;
1957 if (shiftdown < font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size]
1959 shiftdown = font_info[17 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1961 clr = 4 * font_info[8 + param_base[eqtb[(hash_size + 1838) + cur_size].hh.v.RH
1962 ]].cint -((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1966 shiftdown = shiftdown + clr;
1967 clr =(abs(font_info[5 + param_base[eqtb[(hash_size + 1837) + cur_size].hh
1968 .v.RH]].cint * 4)/ 5)-(shiftup - mem[x + 2].cint);
1971 shiftup = shiftup + clr;
1972 shiftdown = shiftdown - clr;
1975 mem[x + 4].cint = delta;
1976 p = new_kern((shiftup - mem[x + 2].cint)-(mem[y + 3].cint
1980 x = vpackage(x, 0, 1, 1073741823L); /* 2^30 - 1 */
1981 mem[x + 4].cint = shiftdown;
1984 if (mem[q + 1].cint == 0)
1985 mem[q + 1].cint = x;
1988 p = mem[q + 1].cint;
1989 while(mem[p].hh.v.RH != 0)p = mem[p].hh.v.RH;
1993 /* #pragma optimize ("g", on) */ /* 96/Sep/12 */
1994 /* #pragma optimize ("g") */ /* 94/Jan/25 */
1995 #pragma optimize ("", on) /* 96/Sep/12 */
1996 /***************************************************************************/