OSDN Git Service

touaTeX + Y&Y TeX.
[putex/putex.git] / src / texsourc / tex7.c
1 #ifdef _WINDOWS
2   #define NOCOMM
3   #define NOSOUND
4   #define NODRIVERS
5   #define STRICT
6   #pragma warning(disable:4115) // kill rpcasync.h complaint
7   #include <windows.h>
8   #define MYLIBAPI __declspec(dllexport)
9 #endif
10
11 #include "texwin.h"
12
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
16
17 #include <setjmp.h>
18
19 #define EXTERN extern
20
21 #include "texd.h"
22
23 #pragma warning(disable:4244)       /* 96/Jan/10 */
24
25 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
26 /* sec 0944 */
27 void build_page (void) 
28 {/* 10 30 31 22 80 90 */ 
29   halfword p; 
30   halfword q, r; 
31   integer b, c; 
32   integer pi; 
33 /*  unsigned char n;  */
34   unsigned int n;             /* 95/Jan/7 */
35   scaled delta, h, w; 
36
37 /* begin if (link(contrib_head)=null)or output_active then return; l.19351 */
38   if((mem[mem_top - 1].hh.v.RH == 0)|| output_active)
39   return; 
40   do {
41       lab22: p = mem[mem_top - 1].hh.v.RH; 
42 /*    if(last_glue != 262143L) */
43     if(last_glue != empty_flag)
44     delete_glue_ref(last_glue); 
45     last_penalty = 0; 
46     last_kern = 0; 
47     if(mem[p].hh.b0 == 10)
48     {
49       last_glue = mem[p + 1].hh.v.LH; 
50       incr(mem[last_glue].hh.v.RH); 
51     } 
52     else {
53   
54 /*      last_glue = 262143L;  */
55       last_glue = empty_flag; 
56       if(mem[p].hh.b0 == 12)
57       last_penalty = mem[p + 1].cint; 
58       else if(mem[p].hh.b0 == 11)
59       last_kern = mem[p + 1].cint; 
60     } 
61     switch(mem[p].hh.b0)
62     {case 0 : 
63     case 1 : 
64     case 2 : 
65       if(page_contents < 2)
66       {
67   if(page_contents == 0)
68   freeze_page_specs(2); 
69   else page_contents = 2; 
70   q = new_skip_param(9); 
71   if(mem[temp_ptr + 1].cint > mem[p + 3].cint)
72   mem[temp_ptr + 1].cint = mem[temp_ptr + 1].cint - mem[p + 3]
73  .cint; 
74   else mem[temp_ptr + 1].cint = 0; 
75   mem[q].hh.v.RH = p; 
76   mem[mem_top - 1].hh.v.RH = q; 
77   goto lab22; 
78       } 
79       else {
80     
81   page_so_far[1]= page_so_far[1]+ page_so_far[7]+ mem[p + 3]
82  .cint; 
83   page_so_far[7]= mem[p + 2].cint; 
84   goto lab80; 
85       } 
86       break; 
87     case 8 : 
88       goto lab80; 
89       break; 
90     case 10 : 
91       if(page_contents < 2)
92       goto lab31; 
93       else if((mem[page_tail].hh.b0 < 9)) 
94       pi = 0; 
95       else goto lab90; 
96       break; 
97     case 11 : 
98       if(page_contents < 2)
99       goto lab31; 
100       else if(mem[p].hh.v.RH == 0)
101       return; 
102       else if(mem[mem[p].hh.v.RH].hh.b0 == 10)
103       pi = 0; 
104       else goto lab90; 
105       break; 
106     case 12 : 
107       if(page_contents < 2)
108       goto lab31; 
109       else pi = mem[p + 1].cint; 
110       break; 
111     case 4 : 
112       goto lab80; 
113       break; 
114     case 3 : 
115       {
116   if(page_contents == 0)
117   freeze_page_specs(1); 
118   n = mem[p].hh.b1; 
119   r = mem_top; 
120   while(n >= mem[mem[r].hh.v.RH].hh.b1)r = mem[r].hh 
121  .v.RH; 
122   n = n; 
123   if(mem[r].hh.b1 != n)
124   {
125     q = get_node(4); 
126     mem[q].hh.v.RH = mem[r].hh.v.RH; 
127     mem[r].hh.v.RH = q; 
128     r = q; 
129     mem[r].hh.b1 = n; 
130     mem[r].hh.b0 = 0; 
131     ensure_vbox(n); 
132     if(eqtb[(hash_size + 1578) + n].hh.v.RH == 0)
133     mem[r + 3].cint = 0; 
134     else mem[r + 3].cint = mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 3]
135    .cint + mem[eqtb[(hash_size + 1578) + n].hh.v.RH + 2].cint; 
136     mem[r + 2].hh.v.LH = 0; 
137     q = eqtb[(hash_size + 800) + n].hh.v.RH; 
138     if(eqtb[(hash_size + 3218) + n].cint == 1000)
139     h = mem[r + 3].cint; 
140     else h = x_over_n(mem[r + 3].cint, 1000)* eqtb[(hash_size + 3218) + n]
141    .cint; 
142     page_so_far[0]= page_so_far[0]- h - mem[q + 1].cint; 
143     page_so_far[2 + mem[q].hh.b0]= page_so_far[2 + mem[q]
144     .hh.b0]+ mem[q + 2].cint; 
145     page_so_far[6]= page_so_far[6]+ mem[q + 3].cint; 
146     if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0)) 
147     {
148       {
149         if(interaction == 3)
150      ; 
151         print_nl(262);   /* ! */
152         print(992);   /* Infinite glue shrinkage inserted from */
153       } 
154       print_esc(392);    /* skip*/
155       print_int(n); 
156       {
157         help_ptr = 3; 
158         help_line[2]= 993;  /* The correction glue for page breaking with insertions */
159         help_line[1]= 994;  /* must have finite shrinkability. But you may proceed, */
160         help_line[0]= 916;  /* since the offensive shrinkability has been made finite. */
161       } 
162       error (); 
163     } 
164   } 
165   if(mem[r].hh.b0 == 1)
166   insert_penalties = insert_penalties + mem[p + 1].cint; 
167   else {
168       
169     mem[r + 2].hh.v.RH = p; 
170     delta = page_so_far[0]- page_so_far[1]- page_so_far[7]+ 
171     page_so_far[6]; 
172     if(eqtb[(hash_size + 3218) + n].cint == 1000)
173     h = mem[p + 3].cint; 
174     else h = x_over_n(mem[p + 3].cint, 1000)* eqtb[(hash_size + 3218) + n]
175    .cint; 
176     if(((h <= 0)||(h <= delta)) &&(mem[p + 3].cint + mem 
177    [r + 3].cint <= eqtb[(hash_size + 3751) + n].cint)) 
178     {
179       page_so_far[0]= page_so_far[0]- h; 
180       mem[r + 3].cint = mem[r + 3].cint + mem[p + 3].cint; 
181     } 
182     else {
183         
184       if(eqtb[(hash_size + 3218) + n].cint <= 0)
185       w = 1073741823L;  /* 2^30 - 1 */
186       else {
187     
188         w = page_so_far[0]- page_so_far[1]- page_so_far[7]; 
189         if(eqtb[(hash_size + 3218) + n].cint != 1000)
190         w = x_over_n(w, eqtb[(hash_size + 3218) + n].cint)* 1000; 
191       } 
192       if(w > eqtb[(hash_size + 3751) + n].cint - mem[r + 3].cint)
193       w = eqtb[(hash_size + 3751) + n].cint - mem[r + 3].cint; 
194       q = vert_break(mem[p + 4].hh.v.LH, w, mem[p + 2].cint); 
195       mem[r + 3].cint = mem[r + 3].cint + best_height_plus_depth; 
196 ;
197 #ifdef STAT
198       if(eqtb[(hash_size + 3196)].cint > 0)
199       {
200         begin_diagnostic (); 
201         print_nl(995);   /* % split */
202         print_int(n); 
203         print(996);   /*  to */
204         print_scaled(w); 
205         print_char(44);  /*, */
206         print_scaled(best_height_plus_depth); 
207         print(925);   /*  p= */
208         if(q == 0)    /* if q=null l.19614 */
209         print_int(-10000); 
210         else if(mem[q].hh.b0 == 12)
211         print_int(mem[q + 1].cint); 
212         else print_char(48); /* 0 */
213         end_diagnostic(false); 
214       } 
215 #endif /* STAT */
216       if(eqtb[(hash_size + 3218) + n].cint != 1000)
217       best_height_plus_depth = x_over_n(best_height_plus_depth, 1000)*
218     eqtb[(hash_size + 3218) + n].cint; 
219       page_so_far[0]= page_so_far[0]- best_height_plus_depth; 
220       mem[r].hh.b0 = 1; 
221       mem[r + 1].hh.v.RH = q; 
222       mem[r + 1].hh.v.LH = p; 
223       if(q == 0)
224       insert_penalties = insert_penalties - 10000; 
225       else if(mem[q].hh.b0 == 12)
226       insert_penalties = insert_penalties + mem[q + 1].cint; 
227     } 
228   } 
229   goto lab80; 
230       } 
231     break; 
232       default:
233     {
234       confusion(987); /* page */
235       return;       // abort_flag set
236     }
237       break; 
238   } 
239     if(pi < 10000)/* pi may be used ... */
240     {
241       if(page_so_far[1]< page_so_far[0])
242       if((page_so_far[3]!= 0)||(page_so_far[4]!= 0)||(page_so_far 
243      [5]!= 0)) 
244       b = 0; 
245       else b = badness(page_so_far[0]- page_so_far[1], page_so_far[2])
246    ; 
247       else if(page_so_far[1]- page_so_far[0]> page_so_far[6])
248       b = 1073741823L;  /* 2^30 - 1 */
249       else b = badness(page_so_far[1]- page_so_far[0], page_so_far[6])
250    ; 
251       if(b < 1073741823L) /* 2^30 - 1 */
252       if(pi <= -10000)
253       c = pi; 
254       else if(b < 10000)
255       c = b + pi + insert_penalties; 
256       else c = 100000L; 
257       else c = b; 
258       if(insert_penalties >= 10000)
259       c = 1073741823L;  /* 2^30 - 1 */
260 ;
261 #ifdef STAT
262       if(eqtb[(hash_size + 3196)].cint > 0)
263       {
264   begin_diagnostic (); 
265   print_nl(37);  /* % */
266   print(921);   /*  t= */
267   print_totals (); 
268   print(990);   /*  g= */
269   print_scaled(page_so_far[0]); 
270   print(924);   /*  b= */
271   if(b == 1073741823L) /* 2^30 - 1 */
272   print_char(42);  /* * */
273   else print_int(b); 
274   print(925);   /*  p= */
275   print_int(pi); 
276   print(991);   /*  c= */
277   if(c == 1073741823L) /* 2^30 - 1 */
278   print_char(42);  /* * */
279   else print_int(c); 
280   if(c <= least_page_cost)
281   print_char(35);  /* # */
282   end_diagnostic(false); 
283       } 
284 #endif /* STAT */
285       if(c <= least_page_cost)
286       {
287   best_page_break = p; 
288   best_size = page_so_far[0]; 
289   least_page_cost = c; 
290   r = mem[mem_top].hh.v.RH; 
291   while(r != mem_top){
292       
293     mem[r + 2].hh.v.LH = mem[r + 2].hh.v.RH; 
294     r = mem[r].hh.v.RH; 
295   } 
296       } 
297       if((c == 1073741823L)||(pi <= -10000))  /* 2^30 - 1 */
298       {
299   fire_up(p); 
300   if(output_active)return; 
301   goto lab30; 
302       } 
303     } 
304     if((mem[p].hh.b0 < 10)||(mem[p].hh.b0 > 11)) 
305     goto lab80; 
306     lab90: if(mem[p].hh.b0 == 11)
307     q = p; 
308     else {
309   
310       q = mem[p + 1].hh.v.LH; 
311       page_so_far[2 + mem[q].hh.b0]= page_so_far[2 + mem[q].hh.b0]
312       + mem[q + 2].cint; 
313       page_so_far[6]= page_so_far[6]+ mem[q + 3].cint; 
314       if((mem[q].hh.b1 != 0)&&(mem[q + 3].cint != 0)) 
315       {
316   {
317     if(interaction == 3)
318  ; 
319     print_nl(262);   /* ! */
320     print(988);   /* Infinite glue shrinkage found on current page */
321   } 
322   {
323     help_ptr = 4; 
324     help_line[3]= 989;  /* The page about to be output contains some infinitely */
325     help_line[2]= 957;  /* shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'. */
326     help_line[1]= 958;  /* Such glue doesn't belong there; but you can safely proceed, */
327     help_line[0]= 916;  /* since the offensive shrinkability has been made finite. */
328   } 
329   error (); 
330   r = new_spec(q); 
331   mem[r].hh.b1 = 0; 
332   delete_glue_ref(q); 
333   mem[p + 1].hh.v.LH = r; 
334   q = r; 
335       } 
336     } 
337     page_so_far[1]= page_so_far[1]+ page_so_far[7]+ mem[q + 1].cint 
338  ; 
339     page_so_far[7]= 0; 
340     lab80: if(page_so_far[7]> page_max_depth)
341     {
342       page_so_far[1]= page_so_far[1]+ page_so_far[7]- page_max_depth; 
343       page_so_far[7]= page_max_depth; 
344     } 
345     mem[page_tail].hh.v.RH = p; 
346     page_tail = p; 
347     mem[mem_top - 1].hh.v.RH = mem[p].hh.v.RH; 
348     mem[p].hh.v.RH = 0; 
349     goto lab30; 
350     lab31: mem[mem_top - 1].hh.v.RH = mem[p].hh.v.RH; 
351     mem[p].hh.v.RH = 0; 
352     flush_node_list(p); 
353     lab30:; 
354   } while(!(mem[mem_top - 1].hh.v.RH == 0)); 
355   if(nest_ptr == 0)
356   tail = mem_top - 1; 
357   else nest[0].tail_field = mem_top - 1; 
358
359 /* sec 1043 */
360 void app_space (void) 
361
362   halfword q; 
363   if((space_factor >= 2000)&&
364     (eqtb[(hash_size + 795)].hh.v.RH != 0)) 
365   q = new_param_glue(13); 
366   else {
367       
368     if(eqtb[(hash_size + 794)].hh.v.RH != 0)
369     main_p = eqtb[(hash_size + 794)].hh.v.RH; 
370     else {
371   
372       main_p = font_glue[eqtb[(hash_size + 1834)].hh.v.RH]; 
373       if(main_p == 0)
374       {
375   main_p = new_spec(0); 
376   main_k = param_base[eqtb[(hash_size + 1834)].hh.v.RH]+ 2; 
377   mem[main_p + 1].cint = font_info[main_k].cint; 
378   mem[main_p + 2].cint = font_info[main_k + 1].cint; 
379   mem[main_p + 3].cint = font_info[main_k + 2].cint; 
380   font_glue[eqtb[(hash_size + 1834)].hh.v.RH]= main_p; 
381       } 
382     } 
383     main_p = new_spec(main_p); 
384     if(space_factor >= 2000)
385     mem[main_p + 1].cint = mem[main_p + 1].cint + font_info[7 + 
386     param_base[eqtb[(hash_size + 1834)].hh.v.RH]].cint; 
387     mem[main_p + 2].cint = xn_over_d(mem[main_p + 2].cint, cur_list 
388    .aux_field.hh.v.LH, 1000); 
389     mem[main_p + 3].cint = xn_over_d(mem[main_p + 3].cint, 1000, 
390     space_factor); 
391     q = new_glue(main_p); 
392     mem[main_p].hh.v.RH = 0; 
393   } 
394   mem[tail].hh.v.RH = q; 
395   tail = q; 
396
397 /* called from tex8.c only */
398 /* sec 1047 */
399 void insert_dollar_sign (void) 
400
401   back_input (); 
402   cur_tok = 804; 
403   {
404     if(interaction == 3)
405  ; 
406     print_nl(262); /* ! */
407     print(1011);  /* Proceed; I'll discard its present contents. */
408   } 
409   {
410     help_ptr = 2; 
411     help_line[1]= 1012;   /* I've inserted a begin-math/end-math symbol since I think */
412     help_line[0]= 1013;   /* you left one out. Proceed, with fingers crossed. */
413   } 
414   ins_error (); 
415
416 /* sec 1049 */
417 void you_cant (void) 
418 {
419   {
420     if(interaction == 3)
421  ; 
422     print_nl(262); /* ! */
423     print(682);   /* You can't use ` */
424   } 
425   print_cmd_chr(cur_cmd, cur_chr); 
426   print(1014);    /* ' in  */
427   print_mode(mode); 
428
429 /* sec 1050 */
430 void report_illegal_case (void) 
431
432   you_cant (); 
433   {
434     help_ptr = 4; 
435     help_line[3]= 1015;   /* Sorry, but I'm not programmed to handle this case; */
436     help_line[2]= 1016;   /* I'll just pretend that you didn't ask for it. */
437     help_line[1]= 1017;   /* If you're in the wrong mode, you might be able to */
438     help_line[0]= 1018;   /* return to the right one by typing `I}' or `I$' or `I\par'. */
439   } 
440   error (); 
441
442 /* sec 1051 */
443 bool privileged (void) 
444 {register bool Result; 
445   if(mode > 0)Result = true; 
446   else {
447     report_illegal_case (); 
448     Result = false; 
449   } 
450   return Result; 
451
452 /* sec 1054 */
453 bool its_all_over (void) 
454 {/* 10 */ register bool Result; 
455   if(privileged ())
456   {
457     if((mem_top - 2 == page_tail)&&(head == cur_list 
458    .tail_field)&&(dead_cycles == 0)) 
459     {
460       Result = true; 
461       return(Result); 
462     } 
463     back_input (); 
464     {
465       mem[tail].hh.v.RH = new_null_box (); 
466       tail = mem[tail].hh.v.RH; 
467     } 
468     mem[tail + 1].cint = eqtb[(hash_size + 3733)].cint; 
469     {
470       mem[tail].hh.v.RH = new_glue(8); 
471       tail = mem[tail].hh.v.RH; 
472     } 
473     {
474       mem[tail].hh.v.RH = new_penalty(-1073741824L); 
475     /* - 2^30  */
476       tail = mem[tail].hh.v.RH; 
477     } 
478     build_page (); 
479   } 
480   Result = false; 
481   return Result; 
482
483 /* sec 1060 */
484 void append_glue (void)
485 {
486    small_number s; 
487   s = cur_chr; 
488   switch(s)
489   {case 0 : 
490       cur_val = 4; 
491   break; 
492   case 1 : 
493     cur_val = 8; 
494     break; 
495   case 2 : 
496     cur_val = 12; 
497     break; 
498   case 3 : 
499     cur_val = 16; 
500     break; 
501   case 4 : 
502     scan_glue(2); 
503         break; 
504   case 5 : 
505     scan_glue(3); 
506         break; 
507   } 
508   {
509     mem[tail].hh.v.RH = new_glue(cur_val); 
510     tail = mem[tail].hh.v.RH; 
511   } 
512   if(s >= 4)
513   {
514     decr(mem[cur_val].hh.v.RH); 
515     if(s > 4)
516       mem[tail].hh.b1 = 99; 
517   } 
518
519 /* sec 1161 */
520 void append_kern (void)
521
522   quarterword s; 
523   s = cur_chr; 
524   scan_dimen(s == 99, false, false); 
525   {
526     mem[tail].hh.v.RH = new_kern(cur_val); 
527     tail = mem[tail].hh.v.RH; 
528   } 
529   mem[tail].hh.b1 = s; 
530
531 /* sec 1054 */
532 void off_save (void) 
533
534   halfword p; 
535   if(cur_group == 0)
536   {
537     {
538       if(interaction == 3)
539    ; 
540       print_nl(262);   /* ! */
541       print(773);   /* Extra  */
542     } 
543     print_cmd_chr(cur_cmd, cur_chr); 
544     {
545       help_ptr = 1; 
546       help_line[0]= 1037; /* Things are pretty mixed up, but I think the worst is over. */
547     } 
548     error (); 
549   } 
550   else {
551       
552     back_input (); 
553     p = get_avail (); 
554     mem[mem_top - 3].hh.v.RH = p; 
555     {
556       if(interaction == 3)
557    ; 
558       print_nl(262);   /* ! */
559       print(622);   /* Missing  */
560     } 
561     switch(cur_group)
562     {case 14 : 
563       {
564 /*  mem[p].hh.v.LH = (hash_size + 4611);  */
565 /*  mem[p].hh.v.LH = (hash_size + 4095 + 516);  */
566   mem[p].hh.v.LH = (hash_size + hash_extra + 4095 + 516); /* 96/Jan/10 */
567   print_esc(513);  /* endgroup */
568       } 
569       break; 
570     case 15 : 
571       {
572   mem[p].hh.v.LH = 804; 
573   print_char(36); 
574       } 
575       break; 
576     case 16 : 
577       {
578 /*  mem[p].hh.v.LH = (hash_size + 4612);  */
579 /*  mem[p].hh.v.LH = (hash_size + 4095 + 517);  */
580   mem[p].hh.v.LH = (hash_size + hash_extra + 4095 + 517); /* 96/Jan/10 */
581   mem[p].hh.v.RH = get_avail (); 
582   p = mem[p].hh.v.RH; 
583   mem[p].hh.v.LH = 3118; 
584   print_esc(1036);   /* right. */
585       } 
586       break; 
587       default: 
588       {
589   mem[p].hh.v.LH = 637; 
590   print_char(125);   /* } */
591       } 
592       break; 
593     } 
594     print(623);   /*  inserted */
595     begin_token_list(mem[mem_top - 3].hh.v.RH, 4); 
596     {
597       help_ptr = 5; 
598       help_line[4]= 1031; /* I've inserted something that you may have forgotten. */
599       help_line[3]= 1032; /* (See the <inserted text> above.) */
600       help_line[2]= 1033; /* With luck, this will get me unwedged. But if you */
601       help_line[1]= 1034; /* really didn't forget anything, try typing `2' now; then */
602       help_line[0]= 1035; /* my insertion and my current dilemma will both disappear. */
603     } 
604     error (); 
605   } 
606
607 /* only called from tex8.c */
608 /* sec 1069 */
609 void extra_right_brace (void) 
610 {
611   {
612     if(interaction == 3)
613  ; 
614     print_nl(262);   /* ! */
615     print(1042);  /* Extra }, or forgotten */
616   } 
617   switch(cur_group)
618   {case 14 : 
619     print_esc(513);  /* endgroup */
620     break; 
621   case 15 : 
622     print_char(36); /* $ */
623     break; 
624   case 16 : 
625     print_esc(871);  /* right */
626     break; 
627   } 
628   {
629     help_ptr = 5; 
630     help_line[4]= 1043;   /* I've deleted a group-closing symbol because it seems to be */
631     help_line[3]= 1044;   /* spurious, as in `$x}$'. But perhaps the } is legitimate and */
632     help_line[2]= 1045;   /* you forgot something else, as in `\hbox{$x}'. In such cases */
633     help_line[1]= 1046;   /* the way to recover is to insert both the forgotten and the */
634     help_line[0]= 1047;   /* deleted material, e.g., by typing `I$}'. */
635   } 
636   error (); 
637   incr(align_state); 
638
639 /* sec 1070 */
640 void normal_paragraph (void) 
641
642 /* if looseness<>0 then eq_word_define(int_base+looseness_code,0); */
643   if(eqtb[(hash_size + 3182)].cint != 0)
644   eq_word_define((hash_size + 3182), 0); 
645   if(eqtb[(hash_size + 3747)].cint != 0)
646   eq_word_define((hash_size + 3747), 0); 
647   if(eqtb[(hash_size + 3204)].cint != 1)
648   eq_word_define((hash_size + 3204), 1); 
649   if(eqtb[(hash_size + 1312)].hh.v.RH != 0)
650   eq_define((hash_size + 1312), 118, 0); 
651
652 /* sec 1075 */
653 void box_end_(integer boxcontext)
654 {
655   halfword p; 
656 /* if box_context<box_flag then ... 1073741824 2^30 */
657   if(boxcontext < 1073741824L)
658   {
659     if(cur_box != 0)
660     {
661       mem[cur_box + 4].cint = boxcontext; 
662       if(abs(mode)== 1)
663       {
664   append_to_vlist(cur_box); 
665   if(adjust_tail != 0)
666   {
667     if(mem_top - 5 != adjust_tail)
668     {
669       mem[tail].hh.v.RH = mem[mem_top - 5].hh 
670      .v.RH; 
671       tail = adjust_tail; 
672     } 
673     adjust_tail = 0; 
674   } 
675   if(mode > 0){
676     build_page ();
677   }
678       } 
679       else {
680     
681   if(abs(mode)== 102)
682   space_factor = 1000; 
683   else {
684       
685     p = new_noad (); 
686     mem[p + 1].hh.v.RH = 2; 
687     mem[p + 1].hh.v.LH = cur_box; 
688     cur_box = p; 
689   } 
690   mem[tail].hh.v.RH = cur_box; 
691   tail = cur_box; 
692       } 
693     } 
694   } 
695
696 /* following fixed 1994/Apr/5 1 day anno Yang --- moby sigh ... */
697
698 /* else if box_context<box_flag+512 then ... */
699 /*  else if(boxcontext < 1073742336L)*/   /* 2^30 + 512 */ 
700   else if(boxcontext < (1073741824L + 512))   /* 2^30 + 512 */ 
701 /* else if box_context<box_flag+256 then ... */
702 /*  if(boxcontext < 1073742080L)*/ /* 2^30 + 256 */ 
703   if(boxcontext < (1073741824L + 256))/* 2^30 + 256 */ 
704 /* eq_define(box_base-box_flag+box_context,box_ref,cur_box) */
705 /* eq_define((hash_size - 1073740246L) + boxcontext, 119, cur_box); */
706   eq_define((hash_size + 1578 - 1073741824L) + boxcontext, 119, cur_box); 
707 /* else geq_define(box_base-box_flag-256+box_context,box_ref,cur_box) */
708 /* else geq_define((hash_size - 1073740502L) + boxcontext, 119, cur_box); */
709   else geq_define((hash_size + 1322 - 1073741824L) + boxcontext, 119, cur_box); 
710   else if(cur_box != 0)
711 /*  if(boxcontext > 1073742336L)*/  /* 2^30 + 512 */ 
712   if(boxcontext > (1073741824L + 512)) /* 2^30 + 512 */ 
713   {
714     do {
715     get_x_token (); 
716     } while(!((cur_cmd != 10)&&(cur_cmd != 0))); 
717     if(((cur_cmd == 26)&&(abs(mode)!= 1)) ||((
718     cur_cmd == 27)&&(abs(mode)== 1)) ||((cur_cmd == 
719     28)&&(abs(mode)== 203)))
720     {
721 /*   begin append_glue; subtype(tail):=box_context-(leader_flag-a_leaders); */
722       append_glue (); 
723 /*      -(2^30 + 513 - 100)  */
724       mem[tail].hh.b1 = boxcontext -(1073742237L); 
725       mem[tail + 1].hh.v.RH = cur_box; 
726     } 
727     else {
728   
729       {
730   if(interaction == 3)
731
732   print_nl(262);   /* ! */
733   print(1060);  /* Leaders not followed by proper glue */
734       } 
735       {
736   help_ptr = 3; 
737   help_line[2]= 1061;   /* You should say `\leaders <box or rule><hskip or vskip>'. */
738   help_line[1]= 1062;   /* I found the <box or rule>, but there's no suitable */
739   help_line[0]= 1063;   /* <hskip or vskip>, so I'm ignoring these leaders. */
740       } 
741       back_error (); 
742       flush_node_list(cur_box); 
743   }
744   }
745   else ship_out(cur_box); 
746
747 /* called only from tex8.c */
748 /* sec 1079 */
749 void begin_box_(integer boxcontext)
750 {/* 10 30 */
751   halfword p, q; 
752   quarterword m; 
753   halfword k; 
754   eight_bits n; 
755   switch(cur_chr){
756   case 0 : 
757     {
758       scan_eight_bit_int (); 
759       cur_box = eqtb[(hash_size + 1578) + cur_val].hh.v.RH; 
760       eqtb[(hash_size + 1578) + cur_val].hh.v.RH = 0; 
761     } 
762     break; 
763   case 1 : 
764     {
765       scan_eight_bit_int (); 
766       cur_box = copy_node_list(eqtb[(hash_size + 1578) + cur_val].hh.v.RH); 
767     } 
768     break; 
769   case 2 : 
770     {
771       cur_box = 0; 
772       if(abs(mode)== 203)
773       {
774   you_cant (); 
775   {
776     help_ptr = 1; 
777     help_line[0]= 1064; /* Sorry; this \lastbox will be void. */
778   } 
779   error (); 
780       } 
781       else if((mode == 1)&&(head == cur_list 
782      .tail_field)) 
783       {
784   you_cant (); 
785   {
786     help_ptr = 2; 
787     help_line[1]= 1065; /* Sorry...I usually can't take things from the current page. */
788     help_line[0]= 1066; /* This \lastbox will therefore be void. */
789   } 
790   error (); 
791       } 
792       else {
793   if(!(tail >= hi_mem_min)) 
794   if((mem[tail].hh.b0 == 0)||(mem[cur_list 
795  .tail_field].hh.b0 == 1)) 
796   {
797     q = head; 
798     do {
799         p = q; 
800       if(!(q >= hi_mem_min)) 
801       if(mem[q].hh.b0 == 7)
802       {
803         {
804         register integer for_end; 
805         m = 1; 
806         for_end = mem[q].hh.b1; 
807         if(m <= for_end) do 
808           p = mem[p].hh.v.RH; 
809         while(m++ < for_end);
810       } 
811         if(p == tail)
812         goto lab30; 
813       } 
814       q = mem[p].hh.v.RH; 
815     } while(!(q == tail)); 
816     cur_box = tail; 
817     mem[cur_box + 4].cint = 0; 
818     tail = p; 
819     mem[p].hh.v.RH = 0; 
820     lab30:; 
821   } 
822       } 
823     } 
824     break; 
825   case 3 : 
826     {
827       scan_eight_bit_int (); 
828       n = cur_val; 
829       if(! scan_keyword(836))  /* to */
830       {
831   {
832     if(interaction == 3)
833  ; 
834     print_nl(262);   /* ! */
835     print(1067);    /* Missing `to' inserted */
836   } 
837   {
838     help_ptr = 2; 
839     help_line[1]= 1068; /* I'm working on `\vsplit<box number> to <dimen>'; */
840     help_line[0]= 1069; /* will look for the <dimen> next. */
841   } 
842   error (); 
843       } 
844       scan_dimen(false, false, false); 
845       cur_box = vsplit(n, cur_val); 
846     } 
847     break; 
848     default: 
849     {
850       k = cur_chr - 4; 
851       save_stack[save_ptr + 0].cint = boxcontext; 
852       if(k == 102)
853       if((boxcontext < 1073741824L)&& /* 2^30 */
854       (abs(mode)== 1)
855     )
856       scan_spec(3, true); 
857       else scan_spec(2, true); 
858       else {
859     
860   if(k == 1)
861   scan_spec(4, true); 
862   else {
863       
864     scan_spec(5, true); 
865     k = 1; 
866   } 
867   normal_paragraph (); 
868       } 
869       push_nest (); 
870       mode = - (integer) k; 
871       if(k == 1)
872       {
873   cur_list.aux_field.cint = ignore_depth; 
874   if(eqtb[(hash_size + 1318)].hh.v.RH != 0)/* everyhbox */
875   begin_token_list(eqtb[(hash_size + 1318)].hh.v.RH, 11); 
876       } 
877       else {
878     
879   space_factor = 1000; 
880   if(eqtb[(hash_size + 1317)].hh.v.RH != 0)/* everyhbox */
881     begin_token_list(eqtb[(hash_size + 1317)].hh.v.RH, 10); 
882       } 
883       return; 
884     } 
885     break; 
886   } 
887   box_end(boxcontext); 
888
889 /* sec 1084 */
890 void scan_box_(integer boxcontext)
891
892   do {
893       get_x_token (); 
894   } while(!((cur_cmd != 10)&&(cur_cmd != 0))); 
895   if(cur_cmd == 20){
896     begin_box(boxcontext);
897   }
898   else if((boxcontext >= 1073742337L)&& /* (2^30 + 512 + 1)  */
899      ((cur_cmd == 36)||(cur_cmd == 35)))
900   {
901     cur_box = scan_rule_spec (); 
902     box_end(boxcontext); 
903   } 
904   else {
905       
906     {
907       if(interaction == 3)
908    ; 
909       print_nl(262);     /* ! */
910       print(1070);      /* A <box> was supposed to be here */
911     } 
912     {
913       help_ptr = 3; 
914       help_line[2]= 1071; /* I was expecting to see \hbox or \vbox or \copy or \box or */
915       help_line[1]= 1072; /* something like that. So you might find something missing in */
916       help_line[0]= 1073; /* your output. But keep trying; you can fix this later. */
917     } 
918     back_error (); 
919   }
920
921 /****************************************************************************/
922 void package_ (small_number);
923 /****************************************************************************/
924 /* sec 1091 */
925 small_number norm_min_ (integer h) 
926 {register
927 /*  small_number Result; */
928   int Result;               /* 95/Jan/7 */
929   if(h <= 0)
930     Result = 1; 
931   else if(h >= 63)
932     Result = 63; 
933   else Result = h; 
934   return Result; 
935
936 /* sec 1091 */
937 void new_graf_(bool indented)
938
939   prev_graf = 0; 
940   if((mode == 1)||(head != cur_list 
941  .tail_field)) 
942   {
943     mem[tail].hh.v.RH = new_param_glue(2); 
944     tail = mem[tail].hh.v.RH; 
945   } 
946 /* used to be followingin 3.141 */
947 /*  cur_list .lhmfield = norm_min(eqtb[(hash_size + 3214)].cint); */
948 /*  cur_list .rhmfield = norm_min(eqtb[(hash_size + 3215)].cint); */
949   push_nest (); 
950   mode = 102; 
951   space_factor = 1000; 
952 /* changes here since 3.141 */
953   if(eqtb[(hash_size + 3213)].cint <= 0)
954   cur_lang = 0; 
955   else if(eqtb[(hash_size + 3213)].cint > 255)
956   cur_lang = 0; 
957   else cur_lang = eqtb[(hash_size + 3213)].cint; 
958   clang = cur_lang; 
959   prev_graf =(norm_min(eqtb[(hash_size + 3214)].cint)* 64 + 
960      norm_min(eqtb[(hash_size + 3215)].cint)) * 65536L + cur_lang; 
961 /* eqtb ??? hash_size ? hash_size + hash_extra ? norm_min etc */
962 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
963   if(indented)
964   {
965     tail = new_null_box (); 
966     mem[head].hh.v.RH = tail; 
967     mem[tail + 1].cint = eqtb[(hash_size + 3730)].cint; 
968   } 
969   if(eqtb[(hash_size + 1314)].hh.v.RH != 0)  /* everypar */
970     begin_token_list(eqtb[(hash_size + 1314)].hh.v.RH, 7); 
971   if(nest_ptr == 1){
972     build_page ();
973   }
974
975 /* procedure indent_in_hmode; l.21058 */
976 /* sec 1093 */
977 void indent_in_hmode (void) 
978
979   halfword p, q; 
980   if(cur_chr > 0)
981   {
982     p = new_null_box (); 
983     mem[p + 1].cint = eqtb[(hash_size + 3730)].cint; 
984     if(abs(mode)== 102)
985     space_factor = 1000; 
986     else {
987   
988       q = new_noad (); 
989       mem[q + 1].hh.v.RH = 2; 
990       mem[q + 1].hh.v.LH = p; 
991       p = q; 
992     } 
993     {
994       mem[tail].hh.v.RH = p; 
995       tail = mem[tail].hh.v.RH; 
996     } 
997   } 
998
999 /* only called from tex8.c */
1000 /* sec 1095 */
1001 void head_for_vmode (void) 
1002
1003   if(mode < 0)
1004   if(cur_cmd != 36){
1005     off_save ();
1006   }
1007   else {
1008     {
1009       if(interaction == 3)
1010    ; 
1011       print_nl(262);   /* ! */
1012       print(682); /* You can't use ` */
1013     } 
1014     print_esc(518);  /* hrule */
1015     print(1076);  /* ' here except with leaders */
1016     {
1017       help_ptr = 2; 
1018       help_line[1]= 1077; /* To put a horizontal rule in an hbox or an alignment, */
1019       help_line[0]= 1078; /* you should use \leaders or \hrulefill (see The TeXbook). */
1020     } 
1021     error (); 
1022   } 
1023   else {
1024       
1025     back_input (); 
1026     cur_tok = par_token; 
1027     back_input (); 
1028     cur_input.index_field = 4; 
1029   } 
1030
1031 /* sec 1096 */
1032 void end_graf (void) 
1033 {
1034   if(mode == 102)
1035   {
1036     if(head == tail)
1037     pop_nest (); 
1038     else line_break(eqtb[(hash_size + 3169)].cint); 
1039     normal_paragraph (); 
1040     error_count = 0; 
1041   } 
1042
1043 /* only called form tex8.c */
1044 /* sec 1099 */
1045 void begin_insert_or_adjust (void) 
1046
1047   if(cur_cmd == 38)
1048   cur_val = 255; 
1049   else {
1050       
1051     scan_eight_bit_int (); 
1052     if(cur_val == 255)
1053     {
1054       {
1055   if(interaction == 3)
1056
1057   print_nl(262); /* ! */
1058   print(1079);  /* You can't  */
1059       } 
1060       print_esc(327); /* insert */
1061       print_int(255); 
1062       {
1063   help_ptr = 1; 
1064   help_line[0]= 1080;   /* I'm changing to \insert0; box 255 is special. */
1065       } 
1066       error (); 
1067       cur_val = 0; 
1068     } 
1069   } 
1070   save_stack[save_ptr + 0].cint = cur_val; 
1071   incr(save_ptr); 
1072   new_save_level(11); 
1073   scan_left_brace (); 
1074   normal_paragraph (); 
1075   push_nest (); 
1076   mode = -1; 
1077   cur_list.aux_field.cint = ignore_depth; 
1078
1079 /* sec 1101 */
1080 void make_mark (void) 
1081 {
1082   halfword p; 
1083   p = scan_toks(false, true); 
1084   p = get_node(2); 
1085   mem[p].hh.b0 = 4; 
1086   mem[p].hh.b1 = 0; 
1087   mem[p + 1].cint = def_ref; 
1088   mem[tail].hh.v.RH = p; 
1089   tail = p; 
1090
1091 /* sec 1103 */
1092 void append_penalty (void) 
1093
1094     scan_int (); 
1095   {
1096     mem[tail].hh.v.RH = new_penalty(cur_val); 
1097     tail = mem[tail].hh.v.RH; 
1098   } 
1099   if(mode == 1){
1100     build_page ();
1101   }
1102
1103 /* only called from tex8.c */
1104 /* sec 1105 */
1105 void delete_last (void) 
1106 {/* 10 */ 
1107   halfword p, q; 
1108   quarterword m; 
1109   if((mode == 1)&&(tail == cur_list 
1110  .head_field)) 
1111   {
1112 /*    if((cur_chr != 10)||(last_glue != 262143L)) */
1113     if((cur_chr != 10)||(last_glue != empty_flag)) 
1114     {
1115       you_cant (); 
1116       {
1117   help_ptr = 2; 
1118   help_line[1]= 1065;   /* Sorry...I usually can't take things from the current page. */
1119   help_line[0]= 1081;   /* Try `I\vskip-\lastskip' instead. */
1120       } 
1121       if(cur_chr == 11)
1122       help_line[0]=(1082); /* Try `I\kern-\last_kern' instead. */
1123       else if(cur_chr != 10)
1124       help_line[0]=(1083); /* Perhaps you can make the output routine do it. */
1125       error (); 
1126     } 
1127   } 
1128   else {
1129       
1130     if(!(tail >= hi_mem_min)) 
1131     if(mem[tail].hh.b0 == cur_chr)
1132     {
1133       q = head; 
1134       do {
1135     p = q; 
1136   if(!(q >= hi_mem_min)) 
1137   if(mem[q].hh.b0 == 7)
1138   {
1139     {
1140       register integer for_end;
1141       m = 1;
1142       for_end = mem[q].hh.b1;
1143       if(m <= for_end) do 
1144         p = mem[p].hh.v.RH; 
1145       while(m++ < for_end);
1146     } 
1147     if(p == tail)
1148     return; 
1149   } 
1150   q = mem[p].hh.v.RH; 
1151       } while(!(q == tail)); 
1152       mem[p].hh.v.RH = 0; 
1153       flush_node_list(tail); 
1154       tail = p; 
1155     } 
1156   } 
1157
1158 /* only called from tex8.c */
1159 /* procedure unpackage; l.21256 */
1160 /* sec 1110 */
1161 void unpackage (void) 
1162 {/* 10 */
1163   halfword p; 
1164   char c; 
1165   c = cur_chr; 
1166   scan_eight_bit_int (); 
1167   p = eqtb[(hash_size + 1578) + cur_val].hh.v.RH; 
1168   if(p == 0)/* if p=null then return; l.21261 */
1169   return; 
1170   if((abs(mode)== 203)||((abs(mode)
1171   == 1)&&(mem[p].hh.b0 != 1)) ||((abs(mode)== 
1172   102)&&(mem[p].hh.b0 != 0)))
1173   {
1174     {
1175       if(interaction == 3)
1176    ; 
1177       print_nl(262);   /* ! */
1178       print(1091);    /* Incompatible list can't be unboxed */
1179     } 
1180     {
1181       help_ptr = 3; 
1182       help_line[2]= 1092; /* Sorry, Pandora. (You sneaky devil.) */
1183       help_line[1]= 1093; /* I refuse to unbox an \hbox in vertical mode or vice versa. */
1184       help_line[0]= 1094; /* And I can't open any boxes in math mode. */
1185     } 
1186     error (); 
1187     return; 
1188   } 
1189   if(c == 1)
1190   mem[tail].hh.v.RH = copy_node_list(mem[p + 5].hh 
1191  .v.RH); 
1192   else {
1193       
1194     mem[tail].hh.v.RH = mem[p + 5].hh.v.RH; 
1195     eqtb[(hash_size + 1578) + cur_val].hh.v.RH = 0; 
1196     free_node(p, 7); 
1197   } 
1198   while(mem[tail].hh.v.RH != 0)tail = mem 
1199  [tail].hh.v.RH; 
1200
1201 /* sec 1113 */
1202 void append_italic_correction (void) 
1203 {/* 10 */ 
1204   halfword p; 
1205   internal_font_number f; 
1206   if(tail != head)
1207   {
1208     if((tail >= hi_mem_min)) 
1209     p = tail; 
1210     else if(mem[tail].hh.b0 == 6)
1211     p = tail + 1; 
1212     else return; 
1213     f = mem[p].hh.b0; 
1214     {
1215       mem[tail].hh.v.RH = new_kern(font_info[italic_base[
1216       f]+(font_info[char_base[f]+ mem[p].hh.b1].qqqq.b2)/ 4]
1217      .cint); 
1218       tail = mem[tail].hh.v.RH; 
1219     } 
1220     mem[tail].hh.b1 = 1; 
1221   } 
1222
1223 /* sec 1117 */
1224 void append_discretionary (void) 
1225
1226   integer c; 
1227   {
1228     mem[tail].hh.v.RH = new_disc (); 
1229     tail = mem[tail].hh.v.RH; 
1230   } 
1231   if(cur_chr == 1)
1232   {
1233     c = hyphen_char[eqtb[(hash_size + 1834)].hh.v.RH]; 
1234     if(c >= 0)
1235     if(c < 256)
1236     mem[tail + 1].hh.v.LH = new_character(eqtb[(hash_size + 1834)]
1237    .hh.v.RH, c); 
1238   } 
1239   else {
1240       
1241     incr(save_ptr); 
1242     save_stack[save_ptr - 1].cint = 0; 
1243     new_save_level(10); 
1244     scan_left_brace (); 
1245     push_nest (); 
1246     mode = -102; 
1247     space_factor = 1000; 
1248   } 
1249
1250 /* only called form tex8.c */
1251 /* sec 1119 */
1252 void build_discretionary (void) 
1253 {/* 30 10 */ 
1254   halfword p, q; 
1255   integer n; 
1256   unsave (); 
1257   q = head; 
1258   p = mem[q].hh.v.RH; 
1259   n = 0; 
1260   while(p != 0){
1261       
1262     if(!(p >= hi_mem_min)) 
1263     if(mem[p].hh.b0 > 2)
1264     if(mem[p].hh.b0 != 11)
1265     if(mem[p].hh.b0 != 6)
1266     {
1267       {
1268   if(interaction == 3)
1269
1270   print_nl(262);     /* ! */
1271   print(1101);    /* Improper discretionary list */
1272       } 
1273       {
1274   help_ptr = 1; 
1275   help_line[0]= 1102;   /* Discretionary lists must contain only boxes and kerns. */
1276       } 
1277       error (); 
1278       begin_diagnostic (); 
1279       print_nl(1103);  /* The following discretionary sublist has been deleted: */
1280       show_box(p); 
1281       end_diagnostic(true); 
1282       flush_node_list(p); 
1283       mem[q].hh.v.RH = 0; 
1284       goto lab30; 
1285     } 
1286     q = p; 
1287     p = mem[q].hh.v.RH; 
1288     incr(n); 
1289   } 
1290   lab30:; 
1291   p = mem[head].hh.v.RH; 
1292   pop_nest (); 
1293   switch(save_stack[save_ptr - 1].cint)
1294   {case 0 : 
1295     mem[tail + 1].hh.v.LH = p; 
1296     break; 
1297   case 1 : 
1298     mem[tail + 1].hh.v.RH = p; 
1299     break; 
1300   case 2 : 
1301     {
1302       if((n > 0)&&(abs(mode)== 203)) 
1303       {
1304   {
1305     if(interaction == 3)
1306  ; 
1307     print_nl(262);   /* ! */
1308     print(1095);    /* Illegal math  */
1309   } 
1310   print_esc(346);  /* discretionary */
1311   {
1312     help_ptr = 2; 
1313     help_line[1]= 1096; /* Sorry: The third part of a discretionary break must be */
1314     help_line[0]= 1097; /* empty, in math formulas. I had to delete your third part. */
1315   } 
1316   flush_node_list(p); 
1317   n = 0; 
1318   error (); 
1319       } 
1320       else mem[tail].hh.v.RH = p; 
1321 /* if n <= max_quarterword then replace_count(tail) <- n; p.1120 */
1322 /*      if(n <= 255) */       /* 94/Apr/4 ? */
1323       if(n <= max_quarterword)     /* 96/Oct/12 ??? */
1324       mem[tail].hh.b1 = n; 
1325       else {
1326     
1327   {
1328     if(interaction == 3)
1329  ; 
1330     print_nl(262);   /* ! */
1331     print(1098);    /* Discretionary list is too long */
1332   } 
1333   {
1334     help_ptr = 2; 
1335     help_line[1]= 1099; /* Wow---I never thought anybody would tweak me here. */
1336     help_line[0]= 1100; /* You can't seriously need such a huge discretionary list? */
1337   } 
1338   error (); 
1339       } 
1340       if(n > 0)
1341       tail = q; 
1342       decr(save_ptr); 
1343       return; 
1344     } 
1345     break; 
1346   } 
1347   incr(save_stack[save_ptr - 1].cint); 
1348   new_save_level(10); 
1349   scan_left_brace (); 
1350   push_nest (); 
1351   mode = -102; 
1352   space_factor = 1000; 
1353
1354 /* called only from tex8.c */
1355 /* sec 1123 */
1356 void make_accent (void) 
1357 {
1358   real s, t; 
1359   halfword p, q, r; 
1360   internal_font_number f; 
1361   scaled a, h, x, w, delta; 
1362   ffourquarters i; 
1363   scan_char_num (); 
1364   f = eqtb[(hash_size + 1834)].hh.v.RH; 
1365   p = new_character(f, cur_val); 
1366   if(p != 0)
1367   {
1368     x = font_info[5 + param_base[f]].cint; 
1369     s = font_info[1 + param_base[f]].cint / ((double) 65536.0); 
1370     a = font_info[width_base[f]+ font_info[char_base[f]+ mem[p]
1371     .hh.b1].qqqq.b0].cint; 
1372     do_assignments (); 
1373     q = 0; 
1374     f = eqtb[(hash_size + 1834)].hh.v.RH; 
1375     if((cur_cmd == 11)||(cur_cmd == 12)||(cur_cmd == 68)) 
1376     q = new_character(f, cur_chr); 
1377     else if(cur_cmd == 16)
1378     {
1379       scan_char_num (); 
1380       q = new_character(f, cur_val); 
1381     } 
1382     else back_input (); 
1383     if(q != 0)
1384     {
1385       t = font_info[1 + param_base[f]].cint / ((double) 65536.0); 
1386       i = font_info[char_base[f]+ mem[q].hh.b1].qqqq; 
1387       w = font_info[width_base[f]+ i.b0].cint; 
1388       h = font_info[height_base[f]+(i.b1)/ 16].cint; 
1389       if(h != x)
1390       {
1391   p = hpack(p, 0, 1); 
1392   mem[p + 4].cint = x - h; 
1393       } 
1394       delta = round((w - a)/ ((double) 2.0)+ h * t - x * s); 
1395       r = new_kern(delta); 
1396       mem[r].hh.b1 = 2; 
1397       mem[tail].hh.v.RH = r; 
1398       mem[r].hh.v.RH = p; 
1399       tail = new_kern(- (integer) a - delta); 
1400       mem[tail].hh.b1 = 2; 
1401       mem[p].hh.v.RH = tail; 
1402       p = q; 
1403     } 
1404     mem[tail].hh.v.RH = p; 
1405     tail = p; 
1406     space_factor = 1000; 
1407   } 
1408
1409 /* sec 1127 */
1410 void align_error (void) 
1411
1412   if(abs(align_state)> 2){
1413     {
1414       if(interaction == 3)
1415    ; 
1416       print_nl(262);     /* ! */
1417       print(1108);      /* Misplaced  */
1418     } 
1419     print_cmd_chr(cur_cmd, cur_chr); 
1420     if(cur_tok == 1062) {
1421       {
1422   help_ptr = 6; 
1423   help_line[5]= 1109;   /* I can't figure out why you would want to use a tab mark */
1424   help_line[4]= 1110;   /* here. If you just want an ampersand, the remedy is */
1425   help_line[3]= 1111;   /* simple: Just type `I\&' now. But if some right brace */
1426   help_line[2]= 1112;   /* up above has ended a previous alignment prematurely, */
1427   help_line[1]= 1113;   /* you're probably due for more error messages, and you */
1428   help_line[0]= 1114;   /* might try typing `S' now just to see what is salvageable. */
1429       } 
1430     } 
1431     else {
1432       {
1433   help_ptr = 5; 
1434   help_line[4]= 1109;   /* I can't figure out why you would want to use a tab mark */
1435   help_line[3]= 1115;   /* or \cr or \span just now. If something like a right brace */
1436   help_line[2]= 1112;   /* up above has ended a previous alignment prematurely, */
1437   help_line[1]= 1113;   /* you're probably due for more error messages, and you */
1438   help_line[0]= 1114;   /* might try typing `S' now just to see what is salvageable. */
1439       } 
1440     } 
1441     error (); 
1442   } 
1443   else {
1444     back_input (); 
1445     if(align_state < 0) {
1446       {
1447   if(interaction == 3)
1448  ; 
1449   print_nl(262);     /* ! */
1450   print(654);     /* Missing { inserted */
1451       } 
1452       incr(align_state); 
1453       cur_tok = 379;    /* belowdisplayshortskip ? */
1454     } 
1455     else {
1456       {
1457   if(interaction == 3)
1458  ; 
1459   print_nl(262);     /* ! */
1460   print(1104);    /* Missing } inserted */
1461       } 
1462       decr(align_state); 
1463       cur_tok = 637; 
1464     } 
1465     {
1466       help_ptr = 3; 
1467       help_line[2]= 1105; /* I've put in what seems to be necessary to fix */
1468       help_line[1]= 1106; /* the current column of the current alignment. */
1469       help_line[0]= 1107; /* Try to go on, since this might almost work. */
1470     } 
1471     ins_error (); 
1472   }
1473
1474 /* sec 1129 */
1475 void noalign_error (void) 
1476 {
1477   {
1478     if(interaction == 3)
1479  ; 
1480     print_nl(262);     /* ! */
1481     print(1108);    /* Misplaced  */
1482   } 
1483   print_esc(524);    /* noalign */
1484   {
1485     help_ptr = 2; 
1486     help_line[1]= 1116;   /* I expect to see \noalign only after the \cr of */
1487     help_line[0]= 1117;   /* an alignment. Proceed, and I'll ignore this case. */
1488   } 
1489   error (); 
1490
1491 /* only called from tex8.c */
1492 /* sec 1129 */
1493 void omit_error (void) 
1494
1495   {
1496     if(interaction == 3)
1497  ; 
1498     print_nl(262);     /* ! */
1499     print(1108);    /* Misplaced  */
1500   } 
1501   print_esc(527);    /* omit */
1502   {
1503     help_ptr = 2; 
1504     help_line[1]= 1118;   /* I expect to see \omit only after tab marks or the \cr of */
1505     help_line[0]= 1117;   /* an alignment. Proceed, and I'll ignore this case. */
1506   } 
1507   error (); 
1508
1509 /* sec 1131 */
1510 void do_endv (void) 
1511 {
1512   if(cur_group == 6) {
1513     end_graf (); 
1514     if(fin_col ())fin_row ();
1515   } 
1516   else off_save ();
1517
1518 /* only called form tex8.c */
1519 /* sec 1135 */
1520 void cs_error (void) 
1521 {
1522   {
1523     if(interaction == 3)
1524  ; 
1525     print_nl(262);   /* ! */
1526     print(773);   /* Extra  */
1527   } 
1528   print_esc(502);  /* endcsname */
1529   {
1530     help_ptr = 1; 
1531     help_line[0]= 1120;   /* I'm ignoring this, since I wasn't doing a \csname. */
1532   } 
1533   error (); 
1534
1535 /* sec 1136 */
1536 void push_math_(group_code c) 
1537 {
1538   push_nest (); 
1539   mode = -203; 
1540   cur_list.aux_field.cint = 0; 
1541   new_save_level(c); 
1542
1543 /* sec 1138 */
1544 void init_math (void) 
1545 {/* 21 40 45 30 */
1546   scaled w; 
1547   scaled l; 
1548   scaled s; 
1549   halfword p; 
1550   halfword q; 
1551   internal_font_number f; 
1552   integer n; 
1553   scaled v; 
1554   scaled d; 
1555   get_token (); 
1556   if((cur_cmd == 3)&&(mode > 0)) 
1557   {
1558     if(head == tail)
1559     {
1560       pop_nest (); 
1561       w = -1073741823L; /* - (2^30 - 1) */
1562     } 
1563     else {
1564   
1565       line_break(eqtb[(hash_size + 3170)].cint); 
1566       v = mem[just_box + 4].cint + 2 * font_info[6 +
1567       param_base[eqtb[(hash_size + 1834)].hh.v.RH]].cint; 
1568       w = -1073741823L;  /* - (2^30 - 1) */
1569       p = mem[just_box + 5].hh.v.RH; 
1570       while(p != 0){
1571     
1572   lab21: if((p >= hi_mem_min)) 
1573   {
1574     f = mem[p].hh.b0; 
1575     d = font_info[width_base[f]+ font_info[char_base[f]+ mem[p 
1576   ].hh.b1].qqqq.b0].cint; 
1577     goto lab40; 
1578   } 
1579   switch(mem[p].hh.b0)
1580   {case 0 : 
1581   case 1 : 
1582   case 2 : 
1583     {
1584       d = mem[p + 1].cint; 
1585       goto lab40; 
1586     } 
1587     break; 
1588   case 6 : 
1589     {
1590       mem[mem_top - 12]= mem[p + 1]; 
1591       mem[mem_top - 12].hh.v.RH = mem[p].hh.v.RH; 
1592       p = mem_top - 12; 
1593       goto lab21; 
1594     } 
1595     break; 
1596   case 11 : 
1597   case 9 : 
1598     d = mem[p + 1].cint; 
1599     break; 
1600   case 10 : 
1601     {
1602       q = mem[p + 1].hh.v.LH; 
1603       d = mem[q + 1].cint; 
1604       if(mem[just_box + 5].hh.b0 == 1)
1605       {
1606         if((mem[just_box + 5].hh.b1 == mem[q].hh.b0)&&(mem 
1607        [q + 2].cint != 0)) 
1608         v = 1073741823L;  /* - (2^30 - 1) */
1609       } 
1610       else if(mem[just_box + 5].hh.b0 == 2)
1611       {
1612         if((mem[just_box + 5].hh.b1 == mem[q].hh.b1)&&(mem 
1613        [q + 3].cint != 0)) 
1614         v = 1073741823L;  /* - (2^30 - 1) */
1615       } 
1616       if(mem[p].hh.b1 >= 100)
1617       goto lab40; 
1618     } 
1619     break; 
1620   case 8 : 
1621     d = 0; 
1622     break; 
1623     default: 
1624     d = 0; 
1625     break; 
1626   } 
1627   if(v < 1073741823L) /* - (2^30 - 1) */
1628   v = v + d; 
1629   goto lab45; 
1630   lab40: if(v < 1073741823L) /* - (2^30 - 1) */
1631   {
1632     v = v + d; 
1633     w = v; 
1634   } 
1635   else {
1636       
1637     w = 1073741823L;  /* - (2^30 - 1) */
1638     goto lab30; 
1639   } 
1640   lab45: p = mem[p].hh.v.RH; 
1641       } 
1642       lab30:; 
1643     } 
1644     if(eqtb[(hash_size + 1312)].hh.v.RH == 0)
1645     if((eqtb[(hash_size + 3747)].cint != 0)&&(((eqtb[(hash_size + 3204)].cint >= 0)&& 
1646    (prev_graf + 2 > eqtb[(hash_size + 3204)].cint)) ||(prev_graf + 
1647     1 < - (integer) eqtb[(hash_size + 3204)].cint)))
1648     {
1649       l = eqtb[(hash_size + 3733)].cint - abs(eqtb[(hash_size + 3747)].cint); 
1650       if(eqtb[(hash_size + 3747)].cint > 0)
1651       s = eqtb[(hash_size + 3747)].cint; 
1652       else s = 0; 
1653     } 
1654     else {
1655   
1656       l = eqtb[(hash_size + 3733)].cint; 
1657       s = 0; 
1658     } 
1659     else {
1660   
1661       n = mem[eqtb[(hash_size + 1312)].hh.v.RH].hh.v.LH; 
1662       if(prev_graf + 2 >= n)
1663       p = eqtb[(hash_size + 1312)].hh.v.RH + 2 * n; 
1664       else p = eqtb[(hash_size + 1312)].hh.v.RH + 2 *(prev_graf + 2); 
1665       s = mem[p - 1].cint; 
1666       l = mem[p].cint; 
1667     } 
1668     push_math(15); 
1669     mode = 203; 
1670     eq_word_define((hash_size + 3207), -1); 
1671     eq_word_define((hash_size + 3743), w); 
1672     eq_word_define((hash_size + 3744), l); 
1673     eq_word_define((hash_size + 3745), s); 
1674     if(eqtb[(hash_size + 1316)].hh.v.RH != 0)/* everydisplay */
1675     begin_token_list(eqtb[(hash_size + 1316)].hh.v.RH, 9); 
1676     if(nest_ptr == 1){
1677     build_page ();
1678   }
1679   } 
1680   else {
1681       
1682     back_input (); 
1683     {
1684       push_math(15); 
1685       eq_word_define((hash_size + 3207), -1); 
1686       if(eqtb[(hash_size + 1315)].hh.v.RH != 0)/* everymath */
1687       begin_token_list(eqtb[(hash_size + 1315)].hh.v.RH, 8); 
1688     } 
1689   } 
1690
1691 /* sec 1142 */
1692 void start_eq_no (void) 
1693 {
1694   save_stack[save_ptr + 0].cint = cur_chr; 
1695   incr(save_ptr); 
1696   {
1697     push_math(15); 
1698     eq_word_define((hash_size + 3207), -1); 
1699     if(eqtb[(hash_size + 1315)].hh.v.RH != 0)/* everymath */
1700     begin_token_list(eqtb[(hash_size + 1315)].hh.v.RH, 8); 
1701   } 
1702
1703 /* sec 1151 */
1704 void scan_math_(halfword p)
1705 {/* 20 21 10 */ 
1706   integer c; 
1707   lab20: do {
1708       get_x_token (); 
1709   } while(!((cur_cmd != 10)&&(cur_cmd != 0))); 
1710   lab21: switch(cur_cmd)
1711   {case 11 : 
1712   case 12 : 
1713   case 68 : 
1714     {
1715       c = eqtb[(hash_size + 2907) + cur_chr].hh.v.RH; 
1716       if(c == 32768L)
1717       {
1718   {
1719     cur_cs = cur_chr + 1; 
1720     cur_cmd = eqtb[cur_cs].hh.b0; 
1721     cur_chr = eqtb[cur_cs].hh.v.RH; 
1722     x_token (); 
1723     back_input (); 
1724   } 
1725   goto lab20; 
1726       } 
1727     } 
1728     break; 
1729   case 16 : 
1730     {
1731       scan_char_num (); 
1732       cur_chr = cur_val; 
1733       cur_cmd = 68; 
1734       goto lab21; 
1735     } 
1736     break; 
1737   case 17 : 
1738     {
1739       scan_fifteen_bit_int (); 
1740       c = cur_val; 
1741     } 
1742     break; 
1743   case 69 : 
1744     c = cur_chr; 
1745     break; 
1746   case 15 : 
1747     {
1748       scan_twenty_seven_bit_int (); 
1749       c = cur_val / 4096;  
1750 /*      c = cur_val >> 12; */
1751     } 
1752     break; 
1753     default: 
1754     {
1755       back_input (); 
1756       scan_left_brace (); 
1757       save_stack[save_ptr + 0].cint = p; 
1758       incr(save_ptr); 
1759       push_math(9); 
1760       return; 
1761     } 
1762     break; 
1763   } 
1764   mem[p].hh.v.RH = 1; 
1765   mem[p].hh.b1 = c % 256; 
1766 /*  mem[p].hh.b1 = c & 255; */ /* last 8 bits */
1767   if((c >= 28672)&& /* 32768 - 4096 ??? if (c>=var_code) and ... */
1768     ((eqtb[(hash_size + 3207)].cint >= 0)&&
1769     (eqtb[(hash_size + 3207)].cint < 16)))
1770   mem[p].hh.b0 = eqtb[(hash_size + 3207)].cint; 
1771   else mem[p].hh.b0 =(c / 256)% 16; 
1772 /*  else mem[p].hh.b0 =(c >> 8)& 15; */ /* 4 bits to left */
1773
1774 /* sec 1155 */
1775 void set_math_char_(integer c)
1776 {
1777   halfword p; 
1778   if(c >= 32768L)
1779   {
1780     cur_cs = cur_chr + 1;          /* ??? */
1781 /*    cur_cmd = eqtb[eqtbextra + cur_cs].hh.b0;  */ /* was wrong ??? */
1782     cur_cmd = eqtb[cur_cs].hh.b0; 
1783 /*    cur_chr = eqtb[cur_cs].hh.v.RH; */ /* should have been eqtbextra ? */
1784     cur_chr = eqtb[cur_cs].hh.v.RH; 
1785     x_token (); 
1786     back_input (); 
1787   } 
1788   else {
1789       
1790     p = new_noad (); 
1791     mem[p + 1].hh.v.RH = 1; 
1792     mem[p + 1].hh.b1 = c % 256;  
1793 /*    mem[p + 1].hh.b1 = c & 255;  */ /* last 8 bits */
1794     mem[p + 1].hh.b0 =(c / 256)% 16; 
1795 /*    mem[p + 1].hh.b0 =(c >> 8)& 15;  */ /* 4 bits to left */
1796     if(c >= 28672)  /* 32768 - 4096 ? */
1797     {
1798       if(((eqtb[(hash_size + 3207)].cint >= 0)&&(eqtb[(hash_size + 3207)].cint < 16)) 
1799     )
1800       mem[p + 1].hh.b0 = eqtb[(hash_size + 3207)].cint; 
1801       mem[p].hh.b0 = 16; 
1802     } 
1803     else mem[p].hh.b0 = 16 +(c / 4096);  
1804 /*    else mem[p].hh.b0 = 16 +(c >> 12);  */
1805     mem[tail].hh.v.RH = p; 
1806     tail = p; 
1807   } 
1808
1809 /* sec 1159 */
1810 void math_limit_switch (void) 
1811 {/* 10 */
1812   if(head != tail)
1813   if(mem[tail].hh.b0 == 17)
1814   {
1815     mem[tail].hh.b1 = cur_chr; 
1816     return; 
1817   } 
1818   {
1819     if(interaction == 3)
1820  ; 
1821     print_nl(262);     /* ! */
1822     print(1124);    /* Limit controls must follow a math operator */
1823   } 
1824   {
1825     help_ptr = 1; 
1826     help_line[0]= 1125;   /* I'm ignoring this misplaced \limits or \nolimits command. */
1827   } 
1828   error (); 
1829
1830 /* sec 1160 */
1831 void scan_delimiter_(halfword p, bool r)
1832 {
1833    if(r){
1834    scan_twenty_seven_bit_int ();
1835   }
1836   else {
1837       
1838     do {
1839   get_x_token (); 
1840     } while(!((cur_cmd != 10)&&(cur_cmd != 0))); 
1841     switch(cur_cmd)
1842     {case 11 : 
1843     case 12 : 
1844       cur_val = eqtb[(hash_size + 3474) + cur_chr].cint; 
1845       break; 
1846     case 15 : 
1847       scan_twenty_seven_bit_int (); 
1848       break; 
1849       default: 
1850       cur_val = -1; 
1851       break; 
1852     } 
1853   } 
1854   if(cur_val < 0)
1855   {
1856     {
1857       if(interaction == 3)
1858    ; 
1859       print_nl(262);   /* ! */
1860       print(1126);    /* Missing delimiter (. inserted) */
1861     } 
1862     {
1863       help_ptr = 6; 
1864       help_line[5]= 1127; /* I was expecting to see something like `(' or `\{' or */
1865       help_line[4]= 1128; /* `\}' here. If you typed, e.g., `{' instead of `\{', you */
1866       help_line[3]= 1129; /* should probably delete the `{' by typing `1' now, so that */
1867       help_line[2]= 1130; /* braces don't get unbalanced. Otherwise just proceed. */
1868       help_line[1]= 1131; /* Acceptable delimiters are characters whose \delcode is */
1869       help_line[0]= 1132; /* nonnegative, or you can use `\delimiter <delimiter code>'. */
1870     } 
1871     back_error (); 
1872     cur_val = 0; 
1873   }
1874 /* attempt to speed up - bkph */  /* is compiler smart enough already ? */
1875   mem[p].qqqq.b0 =(cur_val / 1048576L)% 16;   /* 2^20 */
1876 /*  mem[p].qqqq.b0 =(cur_val >> 20)& 15;  */
1877   mem[p].qqqq.b1 =(cur_val / 4096)% 256; 
1878 /*  mem[p].qqqq.b1 =(cur_val >> 12)& 255; */
1879   mem[p].qqqq.b2 =(cur_val / 256)% 16; 
1880 /*  mem[p].qqqq.b2 =(cur_val >> 8)& 15; */
1881   mem[p].qqqq.b3 = cur_val % 256; 
1882 /*  mem[p].qqqq.b3 = cur_val & 255;  */
1883
1884 /* sec 1163 */
1885 void math_radical (void) 
1886
1887   {
1888     mem[tail].hh.v.RH = get_node(5); 
1889     tail = mem[tail].hh.v.RH; 
1890   } 
1891   mem[tail].hh.b0 = 24; 
1892   mem[tail].hh.b1 = 0; 
1893   mem[tail + 1].hh = empty_field; 
1894   mem[tail + 3].hh = empty_field; 
1895   mem[tail + 2].hh = empty_field; 
1896   scan_delimiter(tail + 4, true); 
1897   scan_math(tail + 1); 
1898
1899 /* sec 1165 */
1900 void math_ac (void) 
1901
1902   if(cur_cmd == 45)
1903   {
1904     {
1905       if(interaction == 3)
1906    ; 
1907       print_nl(262);   /* ! */
1908       print(1133);    /* Please use  */
1909     } 
1910     print_esc(520);    /* mathaccent */
1911     print(1134);    /*  for accents in math mode */
1912     {
1913       help_ptr = 2; 
1914       help_line[1]= 1135; /* I'm changing \accent to \mathaccent here; wish me luck. */
1915       help_line[0]= 1136; /* (Accents are not the same in formulas as they are in text.) */
1916     } 
1917     error (); 
1918   } 
1919   {
1920     mem[tail].hh.v.RH = get_node(5); 
1921     tail = mem[tail].hh.v.RH; 
1922   } 
1923   mem[tail].hh.b0 = 28; 
1924   mem[tail].hh.b1 = 0; 
1925   mem[tail + 1].hh = empty_field; 
1926   mem[tail + 3].hh = empty_field; 
1927   mem[tail + 2].hh = empty_field; 
1928   mem[tail + 4].hh.v.RH = 1; 
1929   scan_fifteen_bit_int (); 
1930   mem[tail + 4].hh.b1 = cur_val % 256;  
1931 /*  mem[tail + 4].hh.b1 = cur_val & 255; */
1932   if((cur_val >= 28672)&& /* 32768 - 4096 ? */
1933     ((eqtb[(hash_size + 3207)].cint >= 0)&&
1934     (eqtb[(hash_size + 3207)].cint < 16)))
1935   mem[tail + 4].hh.b0 = eqtb[(hash_size + 3207)].cint; 
1936   else mem[tail + 4].hh.b0 =(cur_val / 256)% 16; 
1937 /*  else mem[tail + 4].hh.b0 =(cur_val >> 8)& 15; */
1938   scan_math(tail + 1); 
1939
1940 /* sec 1172 */
1941 void append_choices (void) 
1942
1943   {
1944     mem[tail].hh.v.RH = new_choice (); 
1945     tail = mem[tail].hh.v.RH; 
1946   } 
1947   incr(save_ptr); 
1948   save_stack[save_ptr - 1].cint = 0; 
1949   push_math(13); 
1950   scan_left_brace (); 
1951
1952 /* sec 1184 */
1953 halfword fin_mlist_(halfword p)
1954 {register halfword Result; 
1955   halfword q; 
1956   if(cur_list.aux_field.cint != 0)
1957   {
1958     mem[cur_list.aux_field.cint + 3].hh.v.RH = 3; 
1959     mem[cur_list.aux_field.cint + 3].hh.v.LH = mem[head]
1960    .hh.v.RH; 
1961     if(p == 0)
1962     q = cur_list.aux_field.cint; 
1963     else {
1964   
1965       q = mem[cur_list.aux_field.cint + 2].hh.v.LH; 
1966       if(mem[q].hh.b0 != 30){
1967       confusion(871); /* right */
1968       return 0;       // abort_flag set
1969     }
1970       mem[cur_list.aux_field.cint + 2].hh.v.LH = mem[q].hh.v.RH; 
1971       mem[q].hh.v.RH = cur_list.aux_field.cint; 
1972       mem[cur_list.aux_field.cint].hh.v.RH = p; 
1973     } 
1974   } 
1975   else {
1976       
1977     mem[tail].hh.v.RH = p; 
1978     q = mem[head].hh.v.RH; 
1979   } 
1980   pop_nest (); 
1981   Result = q; 
1982   return Result; 
1983
1984 /* sec 1174 */
1985 void build_choices (void) 
1986 {/* 10 */
1987   halfword p; 
1988   unsave (); 
1989   p = fin_mlist(0); 
1990   switch(save_stack[save_ptr - 1].cint)
1991   {case 0 : 
1992     mem[tail + 1].hh.v.LH = p; 
1993     break; 
1994   case 1 : 
1995     mem[tail + 1].hh.v.RH = p; 
1996     break; 
1997   case 2 : 
1998     mem[tail + 2].hh.v.LH = p; 
1999     break; 
2000   case 3 : 
2001     {
2002       mem[tail + 2].hh.v.RH = p; 
2003       decr(save_ptr); 
2004       return; 
2005     } 
2006     break; 
2007   } 
2008   incr(save_stack[save_ptr - 1].cint); 
2009   push_math(13); 
2010   scan_left_brace (); 
2011
2012 /* sec 1176 */
2013 void sub_sup (void) 
2014 {
2015 /*  small_number t; */
2016   int t;              /* 95/Jan/7 */
2017   halfword p; 
2018   t = 0; 
2019   p = 0; 
2020   if(tail != head)
2021   if((mem[tail].hh.b0 >= 16)&&
2022     (mem[tail].hh.b0 < 30)) 
2023   {
2024     p = tail + 2 + cur_cmd - 7; 
2025     t = mem[p].hh.v.RH; 
2026   } 
2027   if((p == 0)||(t != 0)) 
2028   {
2029     {
2030       mem[tail].hh.v.RH = new_noad (); 
2031       tail = mem[tail].hh.v.RH; 
2032     } 
2033     p = tail + 2 + cur_cmd - 7; 
2034     if(t != 0)
2035     {
2036       if(cur_cmd == 7)
2037       {
2038   {
2039     if(interaction == 3)
2040  ; 
2041     print_nl(262);   /* ! */
2042     print(1137);    /* Double superscript */
2043   } 
2044   {
2045     help_ptr = 1; 
2046     help_line[0]= 1138; /* I treat `x^1^2' essentially like `x^1{}^2'.  */
2047   } 
2048       } 
2049       else {
2050     
2051   {
2052     if(interaction == 3)
2053  ; 
2054     print_nl(262);   /* ! */
2055     print(1139);    /* Double subscript */
2056   } 
2057   {
2058     help_ptr = 1; 
2059     help_line[0]= 1140; /* I treat `x_1_2' essentially like `x_1{}_2'. */
2060   } 
2061       } 
2062       error (); 
2063     } 
2064   } 
2065   scan_math(p); 
2066
2067 /* used to continue here with math_fraction etc in tex7.c */
2068 /*****************************************************************************/
2069 /* moved down here to avoid pragma optimize questions 96/Sep/12 */
2070 /* #pragma optimize("g", off) */          /* for MC VS compiler */
2071 /* #pragma optimize("a", off) */          /* for MC VS compiler */
2072 /* sec 1086 */
2073 void package_(small_number c)
2074
2075   scaled h; 
2076   halfword p; 
2077   scaled d; 
2078   d = eqtb[(hash_size + 3737)].cint; 
2079   unsave (); 
2080   save_ptr = save_ptr - 3; 
2081   if(mode == -102)
2082   cur_box = hpack(mem[head].hh.v.RH, save_stack[save_ptr 
2083   + 2].cint, save_stack[save_ptr + 1].cint); 
2084   else {
2085       
2086     cur_box = vpackage(mem[head].hh.v.RH, save_stack[
2087     save_ptr + 2].cint, save_stack[save_ptr + 1].cint, d); 
2088     if(c == 4)
2089     {
2090       h = 0; 
2091       p = mem[cur_box + 5].hh.v.RH; 
2092       if(p != 0)
2093       if(mem[p].hh.b0 <= 2)
2094       h = mem[p + 3].cint; 
2095       mem[cur_box + 2].cint = mem[cur_box + 2].cint - h + mem[cur_box + 
2096       3].cint; 
2097       mem[cur_box + 3].cint = h; 
2098     } 
2099   } 
2100   pop_nest (); 
2101   box_end(save_stack[save_ptr + 0].cint); 
2102
2103 /* #pragma optimize("g", on) */         /* for MC VS compiler */
2104 /* #pragma optimize("a", on) */         /* for MC VS compiler */
2105 /* #pragma optimize("a",) */          /* 94/Jan/25 */
2106 #pragma optimize ("", on)           /* 96/Sep/12 */
2107 /****************************************************************************/