{4:}{9:}{$C-,A+,D-}{[$C+,D+]}{:9}program ETEX;label{6:}1,9998,9999; {:6}const{11:}mem_max=30000;mem_min=0;buf_size=500;error_line=72; half_error_line=42;max_print_line=79;stack_size=200;max_in_open=6; font_max=75;font_mem_size=20000;param_size=60;nest_size=40; max_strings=3000;string_vacancies=8000;pool_size=32000;save_size=600; trie_size=8000;trie_op_size=500;dvi_buf_size=800;file_name_size=40; pool_name='TeXformats:TEX.POOL '; {:11}type{18:}ASCII_code=0..255;{:18}{25:}eight_bits=0..255; alpha_file=packed file of char;byte_file=packed file of eight_bits; {:25}{38:}pool_pointer=0..pool_size;str_number=0..max_strings; packed_ASCII_code=0..255;{:38}{101:}scaled=integer; nonnegative_integer=0..2147483647;small_number=0..63; {:101}{109:}glue_ratio=real;{:109}{113:}quarterword=0..255; halfword=0..65535;two_choices=1..2;four_choices=1..4; two_halves=packed record rh:halfword; case two_choices of 1:(lh:halfword);2:(b0:quarterword;b1:quarterword); end;four_quarters=packed record b0:quarterword;b1:quarterword; b2:quarterword;b3:quarterword;end; memory_word=record case four_choices of 1:(int:integer); 2:(gr:glue_ratio);3:(hh:two_halves);4:(qqqq:four_quarters);end; word_file=file of memory_word;{:113}{150:}glue_ord=0..3; {:150}{212:}list_state_record=record mode_field:-203..203; head_field,tail_field:halfword;eTeX_aux_field:halfword; pg_field,ml_field:integer;aux_field:memory_word;end; {:212}{269:}group_code=0..16; {:269}{300:}in_state_record=record state_field,index_field:quarterword; start_field,loc_field,limit_field,name_field:halfword;end; {:300}{548:}internal_font_number=0..font_max; font_index=0..font_mem_size;{:548}{594:}dvi_index=0..dvi_buf_size; {:594}{920:}trie_pointer=0..trie_size;{:920}{925:}hyph_pointer=0..307; {:925}{1409:}save_pointer=0..save_size;{:1409}var{13:}bad:integer; {:13}{20:}xord:array[char]of ASCII_code;xchr:array[ASCII_code]of char; {:20}{26:}name_of_file:packed array[1..file_name_size]of char; name_length:0..file_name_size; {:26}{30:}buffer:array[0..buf_size]of ASCII_code;first:0..buf_size; last:0..buf_size;max_buf_stack:0..buf_size;{:30}{32:}term_in:alpha_file; term_out:alpha_file; {:32}{39:}str_pool:packed array[pool_pointer]of packed_ASCII_code; str_start:array[str_number]of pool_pointer;pool_ptr:pool_pointer; str_ptr:str_number;init_pool_ptr:pool_pointer;init_str_ptr:str_number; {:39}{50:}pool_file:alpha_file;{:50}{54:}log_file:alpha_file; selector:0..21;dig:array[0..22]of 0..15;tally:integer; term_offset:0..max_print_line;file_offset:0..max_print_line; trick_buf:array[0..error_line]of ASCII_code;trick_count:integer; first_count:integer;{:54}{73:}interaction:0..3; {:73}{76:}deletions_allowed:boolean;set_box_allowed:boolean; history:0..3;error_count:-1..100; {:76}{79:}help_line:array[0..5]of str_number;help_ptr:0..6; use_err_help:boolean;{:79}{96:}interrupt:integer; OK_to_interrupt:boolean;{:96}{104:}arith_error:boolean;remainder:scaled; {:104}{115:}temp_ptr:halfword; {:115}{116:}mem:array[mem_min..mem_max]of memory_word; lo_mem_max:halfword;hi_mem_min:halfword; {:116}{117:}var_used,dyn_used:integer;{:117}{118:}avail:halfword; mem_end:halfword;{:118}{124:}rover:halfword; {:124}{165:}{free:packed array[mem_min..mem_max]of boolean; was_free:packed array[mem_min..mem_max]of boolean; was_mem_end,was_lo_max,was_hi_min:halfword;panicking:boolean;} {:165}{173:}font_in_short_display:integer; {:173}{181:}depth_threshold:integer;breadth_max:integer; {:181}{213:}nest:array[0..nest_size]of list_state_record; nest_ptr:0..nest_size;max_nest_stack:0..nest_size; cur_list:list_state_record;shown_mode:-203..203; {:213}{246:}old_setting:0..21; sys_time,sys_day,sys_month,sys_year:integer; {:246}{253:}eqtb:array[1..6121]of memory_word; xeq_level:array[5268..6121]of quarterword; {:253}{256:}hash:array[514..2880]of two_halves;hash_used:halfword; no_new_control_sequence:boolean;cs_count:integer; {:256}{271:}save_stack:array[0..save_size]of memory_word; save_ptr:0..save_size;max_save_stack:0..save_size;cur_level:quarterword; cur_group:group_code;cur_boundary:0..save_size; {:271}{286:}mag_set:integer;{:286}{297:}cur_cmd:eight_bits; cur_chr:halfword;cur_cs:halfword;cur_tok:halfword; {:297}{301:}input_stack:array[0..stack_size]of in_state_record; input_ptr:0..stack_size;max_in_stack:0..stack_size; cur_input:in_state_record;{:301}{304:}in_open:0..max_in_open; open_parens:0..max_in_open; input_file:array[1..max_in_open]of alpha_file;line:integer; line_stack:array[1..max_in_open]of integer; {:304}{305:}scanner_status:0..5;warning_index:halfword;def_ref:halfword; {:305}{308:}param_stack:array[0..param_size]of halfword; param_ptr:0..param_size;max_param_stack:integer; {:308}{309:}align_state:integer;{:309}{310:}base_ptr:0..stack_size; {:310}{333:}par_loc:halfword;par_token:halfword; {:333}{361:}force_eof:boolean; {:361}{382:}cur_mark:array[0..4]of halfword; {:382}{387:}long_state:111..114; {:387}{388:}pstack:array[0..8]of halfword;{:388}{410:}cur_val:integer; cur_val_level:0..5;{:410}{438:}radix:small_number; {:438}{447:}cur_order:glue_ord; {:447}{480:}read_file:array[0..15]of alpha_file; read_open:array[0..16]of 0..2;{:480}{489:}cond_ptr:halfword; if_limit:0..4;cur_if:small_number;if_line:integer; {:489}{493:}skip_line:integer;{:493}{512:}cur_name:str_number; cur_area:str_number;cur_ext:str_number; {:512}{513:}area_delimiter:pool_pointer;ext_delimiter:pool_pointer; {:513}{520:}TEX_format_default:packed array[1..20]of char; {:520}{527:}name_in_progress:boolean;job_name:str_number; log_opened:boolean;{:527}{532:}dvi_file:byte_file; output_file_name:str_number;log_name:str_number; {:532}{539:}tfm_file:byte_file; {:539}{549:}font_info:array[font_index]of memory_word; fmem_ptr:font_index;font_ptr:internal_font_number; font_check:array[internal_font_number]of four_quarters; font_size:array[internal_font_number]of scaled; font_dsize:array[internal_font_number]of scaled; font_params:array[internal_font_number]of font_index; font_name:array[internal_font_number]of str_number; font_area:array[internal_font_number]of str_number; font_bc:array[internal_font_number]of eight_bits; font_ec:array[internal_font_number]of eight_bits; font_glue:array[internal_font_number]of halfword; font_used:array[internal_font_number]of boolean; hyphen_char:array[internal_font_number]of integer; skew_char:array[internal_font_number]of integer; bchar_label:array[internal_font_number]of font_index; font_bchar:array[internal_font_number]of 0..256; font_false_bchar:array[internal_font_number]of 0..256; {:549}{550:}char_base:array[internal_font_number]of integer; width_base:array[internal_font_number]of integer; height_base:array[internal_font_number]of integer; depth_base:array[internal_font_number]of integer; italic_base:array[internal_font_number]of integer; lig_kern_base:array[internal_font_number]of integer; kern_base:array[internal_font_number]of integer; exten_base:array[internal_font_number]of integer; param_base:array[internal_font_number]of integer; {:550}{555:}null_character:four_quarters; {:555}{592:}total_pages:integer;max_v:scaled;max_h:scaled; max_push:integer;last_bop:integer;dead_cycles:integer; doing_leaders:boolean;c,f:quarterword;rule_ht,rule_dp,rule_wd:scaled; g:halfword;lq,lr:integer; {:592}{595:}dvi_buf:array[dvi_index]of eight_bits;half_buf:dvi_index; dvi_limit:dvi_index;dvi_ptr:dvi_index;dvi_offset:integer; dvi_gone:integer;{:595}{605:}down_ptr,right_ptr:halfword; {:605}{616:}dvi_h,dvi_v:scaled;cur_h,cur_v:scaled; dvi_f:internal_font_number;cur_s:integer; {:616}{646:}total_stretch,total_shrink:array[glue_ord]of scaled; last_badness:integer;{:646}{647:}adjust_tail:halfword; {:647}{661:}pack_begin_line:integer;{:661}{684:}empty_field:two_halves; null_delimiter:four_quarters;{:684}{719:}cur_mlist:halfword; cur_style:small_number;cur_size:small_number;cur_mu:scaled; mlist_penalties:boolean;{:719}{724:}cur_f:internal_font_number; cur_c:quarterword;cur_i:four_quarters;{:724}{764:}magic_offset:integer; {:764}{770:}cur_align:halfword;cur_span:halfword;cur_loop:halfword; align_ptr:halfword;cur_head,cur_tail:halfword; {:770}{814:}just_box:halfword;{:814}{821:}passive:halfword; printed_node:halfword;pass_number:halfword; {:821}{823:}active_width:array[1..6]of scaled; cur_active_width:array[1..6]of scaled;background:array[1..6]of scaled; break_width:array[1..6]of scaled; {:823}{825:}no_shrink_error_yet:boolean;{:825}{828:}cur_p:halfword; second_pass:boolean;final_pass:boolean;threshold:integer; {:828}{833:}minimal_demerits:array[0..3]of integer; minimum_demerits:integer;best_place:array[0..3]of halfword; best_pl_line:array[0..3]of halfword;{:833}{839:}disc_width:scaled; {:839}{847:}easy_line:halfword;last_special_line:halfword; first_width:scaled;second_width:scaled;first_indent:scaled; second_indent:scaled;{:847}{872:}best_bet:halfword; fewest_demerits:integer;best_line:halfword;actual_looseness:integer; line_diff:integer;{:872}{892:}hc:array[0..65]of 0..256;hn:0..64; ha,hb:halfword;hf:internal_font_number;hu:array[0..63]of 0..256; hyf_char:integer;cur_lang,init_cur_lang:ASCII_code; l_hyf,r_hyf,init_l_hyf,init_r_hyf:integer;hyf_bchar:halfword; {:892}{900:}hyf:array[0..64]of 0..9;init_list:halfword;init_lig:boolean; init_lft:boolean;{:900}{905:}hyphen_passed:small_number; {:905}{907:}cur_l,cur_r:halfword;cur_q:halfword;lig_stack:halfword; ligature_present:boolean;lft_hit,rt_hit:boolean; {:907}{921:}trie:array[trie_pointer]of two_halves; hyf_distance:array[1..trie_op_size]of small_number; hyf_num:array[1..trie_op_size]of small_number; hyf_next:array[1..trie_op_size]of quarterword; op_start:array[ASCII_code]of 0..trie_op_size; {:921}{926:}hyph_word:array[hyph_pointer]of str_number; hyph_list:array[hyph_pointer]of halfword;hyph_count:hyph_pointer; {:926}{943:}trie_op_hash:array[-trie_op_size..trie_op_size]of 0.. trie_op_size;trie_used:array[ASCII_code]of quarterword; trie_op_lang:array[1..trie_op_size]of ASCII_code; trie_op_val:array[1..trie_op_size]of quarterword; trie_op_ptr:0..trie_op_size; {:943}{947:}trie_c:packed array[trie_pointer]of packed_ASCII_code; trie_o:packed array[trie_pointer]of quarterword; trie_l:packed array[trie_pointer]of trie_pointer; trie_r:packed array[trie_pointer]of trie_pointer;trie_ptr:trie_pointer; trie_hash:packed array[trie_pointer]of trie_pointer; {:947}{950:}trie_taken:packed array[1..trie_size]of boolean; trie_min:array[ASCII_code]of trie_pointer;trie_max:trie_pointer; trie_not_ready:boolean;{:950}{971:}best_height_plus_depth:scaled; {:971}{980:}page_tail:halfword;page_contents:0..2;page_max_depth:scaled; best_page_break:halfword;least_page_cost:integer;best_size:scaled; {:980}{982:}page_so_far:array[0..7]of scaled;last_glue:halfword; last_penalty:integer;last_kern:scaled;last_node_type:integer; insert_penalties:integer;{:982}{989:}output_active:boolean; {:989}{1032:}main_f:internal_font_number;main_i:four_quarters; main_j:four_quarters;main_k:font_index;main_p:halfword;main_s:integer; bchar:halfword;false_bchar:halfword;cancel_boundary:boolean; ins_disc:boolean;{:1032}{1074:}cur_box:halfword; {:1074}{1266:}after_token:halfword;{:1266}{1281:}long_help_seen:boolean; {:1281}{1299:}format_ident:str_number;{:1299}{1305:}fmt_file:word_file; {:1305}{1331:}ready_already:integer; {:1331}{1342:}write_file:array[0..15]of alpha_file; write_open:array[0..17]of boolean;{:1342}{1345:}write_loc:halfword; {:1345}{1383:}eTeX_mode:0..1; {:1383}{1391:}eof_seen:array[1..max_in_open]of boolean; {:1391}{1436:}LR_ptr:halfword;LR_problems:integer;cur_dir:small_number; {:1436}{1485:}pseudo_files:halfword; {:1485}{1508:}grp_stack:array[0..max_in_open]of save_pointer; if_stack:array[0..max_in_open]of halfword; {:1508}{1549:}max_reg_num:halfword;max_reg_help_line:str_number; {:1549}{1551:}sa_root:array[0..6]of halfword;cur_ptr:halfword; sa_null:memory_word;{:1551}{1570:}sa_chain:halfword; sa_level:quarterword;{:1570}{1577:}last_line_fill:halfword; do_last_line_fit:boolean;active_node_size:small_number; fill_width:array[0..2]of scaled;best_pl_short:array[0..3]of scaled; best_pl_glue:array[0..3]of scaled;{:1577}{1593:}hyph_start:trie_pointer; hyph_index:trie_pointer;{:1593}{1594:}disc_ptr:array[1..3]of halfword; {:1594}procedure initialize;var{19:}i:integer;{:19}{163:}k:integer; {:163}{927:}z:hyph_pointer;{:927}begin{8:}{21:}xchr[32]:=' '; xchr[33]:='!';xchr[34]:='"';xchr[35]:='#';xchr[36]:='$';xchr[37]:='%'; xchr[38]:='&';xchr[39]:='''';xchr[40]:='(';xchr[41]:=')';xchr[42]:='*'; xchr[43]:='+';xchr[44]:=',';xchr[45]:='-';xchr[46]:='.';xchr[47]:='/'; xchr[48]:='0';xchr[49]:='1';xchr[50]:='2';xchr[51]:='3';xchr[52]:='4'; xchr[53]:='5';xchr[54]:='6';xchr[55]:='7';xchr[56]:='8';xchr[57]:='9'; xchr[58]:=':';xchr[59]:=';';xchr[60]:='<';xchr[61]:='=';xchr[62]:='>'; xchr[63]:='?';xchr[64]:='@';xchr[65]:='A';xchr[66]:='B';xchr[67]:='C'; xchr[68]:='D';xchr[69]:='E';xchr[70]:='F';xchr[71]:='G';xchr[72]:='H'; xchr[73]:='I';xchr[74]:='J';xchr[75]:='K';xchr[76]:='L';xchr[77]:='M'; xchr[78]:='N';xchr[79]:='O';xchr[80]:='P';xchr[81]:='Q';xchr[82]:='R'; xchr[83]:='S';xchr[84]:='T';xchr[85]:='U';xchr[86]:='V';xchr[87]:='W'; xchr[88]:='X';xchr[89]:='Y';xchr[90]:='Z';xchr[91]:='[';xchr[92]:='\'; xchr[93]:=']';xchr[94]:='^';xchr[95]:='_';xchr[96]:='`';xchr[97]:='a'; xchr[98]:='b';xchr[99]:='c';xchr[100]:='d';xchr[101]:='e'; xchr[102]:='f';xchr[103]:='g';xchr[104]:='h';xchr[105]:='i'; xchr[106]:='j';xchr[107]:='k';xchr[108]:='l';xchr[109]:='m'; xchr[110]:='n';xchr[111]:='o';xchr[112]:='p';xchr[113]:='q'; xchr[114]:='r';xchr[115]:='s';xchr[116]:='t';xchr[117]:='u'; xchr[118]:='v';xchr[119]:='w';xchr[120]:='x';xchr[121]:='y'; xchr[122]:='z';xchr[123]:='{';xchr[124]:='|';xchr[125]:='}'; xchr[126]:='~';{:21}{23:}for i:=0 to 31 do xchr[i]:=' '; for i:=127 to 255 do xchr[i]:=' '; {:23}{24:}for i:=0 to 255 do xord[chr(i)]:=127; for i:=128 to 255 do xord[xchr[i]]:=i; for i:=0 to 126 do xord[xchr[i]]:=i;{:24}{74:}interaction:=3; {:74}{77:}deletions_allowed:=true;set_box_allowed:=true;error_count:=0; {:77}{80:}help_ptr:=0;use_err_help:=false;{:80}{97:}interrupt:=0; OK_to_interrupt:=true;{:97}{166:}{was_mem_end:=mem_min; was_lo_max:=mem_min;was_hi_min:=mem_max;panicking:=false;} {:166}{215:}nest_ptr:=0;max_nest_stack:=0;cur_list.mode_field:=1; cur_list.head_field:=29999;cur_list.tail_field:=29999; cur_list.eTeX_aux_field:=0;cur_list.aux_field.int:=-65536000; cur_list.ml_field:=0;cur_list.pg_field:=0;shown_mode:=0; {991:}page_contents:=0;page_tail:=29998;mem[29998].hh.rh:=0; last_glue:=65535;last_penalty:=0;last_kern:=0;last_node_type:=-1; page_so_far[7]:=0;page_max_depth:=0{:991}; {:215}{254:}for k:=5268 to 6121 do xeq_level[k]:=1; {:254}{257:}no_new_control_sequence:=true;hash[514].lh:=0; hash[514].rh:=0;for k:=515 to 2880 do hash[k]:=hash[514]; {:257}{272:}save_ptr:=0;cur_level:=1;cur_group:=0;cur_boundary:=0; max_save_stack:=0;{:272}{287:}mag_set:=0;{:287}{383:}cur_mark[0]:=0; cur_mark[1]:=0;cur_mark[2]:=0;cur_mark[3]:=0;cur_mark[4]:=0; {:383}{439:}cur_val:=0;cur_val_level:=0;radix:=0;cur_order:=0; {:439}{481:}for k:=0 to 16 do read_open[k]:=2;{:481}{490:}cond_ptr:=0; if_limit:=0;cur_if:=0;if_line:=0; {:490}{521:}TEX_format_default:='TeXformats:plain.fmt'; {:521}{551:}for k:=0 to font_max do font_used[k]:=false; {:551}{556:}null_character.b0:=0;null_character.b1:=0; null_character.b2:=0;null_character.b3:=0;{:556}{593:}total_pages:=0; max_v:=0;max_h:=0;max_push:=0;last_bop:=-1;doing_leaders:=false; dead_cycles:=0;cur_s:=-1;{:593}{596:}half_buf:=dvi_buf_size div 2; dvi_limit:=dvi_buf_size;dvi_ptr:=0;dvi_offset:=0;dvi_gone:=0; {:596}{606:}down_ptr:=0;right_ptr:=0;{:606}{648:}adjust_tail:=0; last_badness:=0;{:648}{662:}pack_begin_line:=0; {:662}{685:}empty_field.rh:=0;empty_field.lh:=0;null_delimiter.b0:=0; null_delimiter.b1:=0;null_delimiter.b2:=0;null_delimiter.b3:=0; {:685}{771:}align_ptr:=0;cur_align:=0;cur_span:=0;cur_loop:=0; cur_head:=0;cur_tail:=0; {:771}{928:}for z:=0 to 307 do begin hyph_word[z]:=0;hyph_list[z]:=0; end;hyph_count:=0;{:928}{990:}output_active:=false;insert_penalties:=0; {:990}{1033:}ligature_present:=false;cancel_boundary:=false; lft_hit:=false;rt_hit:=false;ins_disc:=false; {:1033}{1267:}after_token:=0;{:1267}{1282:}long_help_seen:=false; {:1282}{1300:}format_ident:=0; {:1300}{1343:}for k:=0 to 17 do write_open[k]:=false; {:1343}{1437:}LR_ptr:=0;LR_problems:=0;cur_dir:=0; {:1437}{1486:}pseudo_files:=0;{:1486}{1552:}sa_root[6]:=0; sa_null.hh.lh:=0;sa_null.hh.rh:=0;{:1552}{1571:}sa_chain:=0;sa_level:=0; {:1571}{1595:}disc_ptr[2]:=0;disc_ptr[3]:=0; {:1595}{164:}for k:=1 to 19 do mem[k].int:=0;k:=0; while k<=19 do begin mem[k].hh.rh:=1;mem[k].hh.b0:=0;mem[k].hh.b1:=0; k:=k+4;end;mem[6].int:=65536;mem[4].hh.b0:=1;mem[10].int:=65536; mem[8].hh.b0:=2;mem[14].int:=65536;mem[12].hh.b0:=1;mem[15].int:=65536; mem[12].hh.b1:=1;mem[18].int:=-65536;mem[16].hh.b0:=1;rover:=20; mem[rover].hh.rh:=65535;mem[rover].hh.lh:=1000; mem[rover+1].hh.lh:=rover;mem[rover+1].hh.rh:=rover; lo_mem_max:=rover+1000;mem[lo_mem_max].hh.rh:=0; mem[lo_mem_max].hh.lh:=0; for k:=29987 to 30000 do mem[k]:=mem[lo_mem_max]; {790:}mem[29990].hh.lh:=6714;{:790}{797:}mem[29991].hh.rh:=256; mem[29991].hh.lh:=0;{:797}{820:}mem[29993].hh.b0:=1; mem[29994].hh.lh:=65535;mem[29993].hh.b1:=0; {:820}{981:}mem[30000].hh.b1:=255;mem[30000].hh.b0:=1; mem[30000].hh.rh:=30000;{:981}{988:}mem[29998].hh.b0:=10; mem[29998].hh.b1:=0;{:988};avail:=0;mem_end:=30000;hi_mem_min:=29987; var_used:=20;dyn_used:=14;{:164}{222:}eqtb[2881].hh.b0:=101; eqtb[2881].hh.rh:=0;eqtb[2881].hh.b1:=0; for k:=1 to 2880 do eqtb[k]:=eqtb[2881];{:222}{228:}eqtb[2882].hh.rh:=0; eqtb[2882].hh.b1:=1;eqtb[2882].hh.b0:=117; for k:=2883 to 3411 do eqtb[k]:=eqtb[2882]; mem[0].hh.rh:=mem[0].hh.rh+530;{:228}{232:}eqtb[3412].hh.rh:=0; eqtb[3412].hh.b0:=118;eqtb[3412].hh.b1:=1; for k:=3679 to 3682 do eqtb[k]:=eqtb[3412]; for k:=3413 to 3678 do eqtb[k]:=eqtb[2881];eqtb[3683].hh.rh:=0; eqtb[3683].hh.b0:=119;eqtb[3683].hh.b1:=1; for k:=3684 to 3938 do eqtb[k]:=eqtb[3683];eqtb[3939].hh.rh:=0; eqtb[3939].hh.b0:=120;eqtb[3939].hh.b1:=1; for k:=3940 to 3987 do eqtb[k]:=eqtb[3939];eqtb[3988].hh.rh:=0; eqtb[3988].hh.b0:=120;eqtb[3988].hh.b1:=1; for k:=3989 to 5267 do eqtb[k]:=eqtb[3988]; for k:=0 to 255 do begin eqtb[3988+k].hh.rh:=12;eqtb[5012+k].hh.rh:=k+0; eqtb[4756+k].hh.rh:=1000;end;eqtb[4001].hh.rh:=5;eqtb[4020].hh.rh:=10; eqtb[4080].hh.rh:=0;eqtb[4025].hh.rh:=14;eqtb[4115].hh.rh:=15; eqtb[3988].hh.rh:=9;for k:=48 to 57 do eqtb[5012+k].hh.rh:=k+28672; for k:=65 to 90 do begin eqtb[3988+k].hh.rh:=11; eqtb[3988+k+32].hh.rh:=11;eqtb[5012+k].hh.rh:=k+28928; eqtb[5012+k+32].hh.rh:=k+28960;eqtb[4244+k].hh.rh:=k+32; eqtb[4244+k+32].hh.rh:=k+32;eqtb[4500+k].hh.rh:=k; eqtb[4500+k+32].hh.rh:=k;eqtb[4756+k].hh.rh:=999;end; {:232}{240:}for k:=5268 to 5588 do eqtb[k].int:=0;eqtb[5285].int:=1000; eqtb[5269].int:=10000;eqtb[5309].int:=1;eqtb[5308].int:=25; eqtb[5313].int:=92;eqtb[5316].int:=13; for k:=0 to 255 do eqtb[5589+k].int:=-1;eqtb[5635].int:=0; {:240}{250:}for k:=5845 to 6121 do eqtb[k].int:=0; {:250}{258:}hash_used:=2614;cs_count:=0;eqtb[2623].hh.b0:=116; hash[2623].rh:=505;{:258}{552:}font_ptr:=0;fmem_ptr:=7; font_name[0]:=812;font_area[0]:=339;hyphen_char[0]:=45;skew_char[0]:=-1; bchar_label[0]:=0;font_bchar[0]:=256;font_false_bchar[0]:=256; font_bc[0]:=1;font_ec[0]:=0;font_size[0]:=0;font_dsize[0]:=0; char_base[0]:=0;width_base[0]:=0;height_base[0]:=0;depth_base[0]:=0; italic_base[0]:=0;lig_kern_base[0]:=0;kern_base[0]:=0;exten_base[0]:=0; font_glue[0]:=0;font_params[0]:=7;param_base[0]:=-1; for k:=0 to 6 do font_info[k].int:=0; {:552}{946:}for k:=-trie_op_size to trie_op_size do trie_op_hash[k]:=0; for k:=0 to 255 do trie_used[k]:=0;trie_op_ptr:=0; {:946}{951:}trie_not_ready:=true;trie_l[0]:=0;trie_c[0]:=0;trie_ptr:=0; {:951}{1216:}hash[2614].rh:=1206;{:1216}{1301:}format_ident:=1271; {:1301}{1369:}hash[2622].rh:=1310;eqtb[2622].hh.b1:=1; eqtb[2622].hh.b0:=113;eqtb[2622].hh.rh:=0;{:1369}{1384:}eTeX_mode:=0; {1547:}max_reg_num:=255;max_reg_help_line:=697; {:1547}{:1384}{1553:}for i:=0 to 5 do sa_root[i]:=0; {:1553}{1589:}trie_r[0]:=0;hyph_start:=0;{:1589}{:8}end; {57:}procedure print_ln; begin case selector of 19:begin write_ln(term_out);write_ln(log_file); term_offset:=0;file_offset:=0;end;18:begin write_ln(log_file); file_offset:=0;end;17:begin write_ln(term_out);term_offset:=0;end; 16,20,21:;others:write_ln(write_file[selector])end;end; {:57}{58:}procedure print_char(s:ASCII_code);label 10; begin if{244:}s=eqtb[5317].int{:244}then if selector<20 then begin print_ln;goto 10;end;case selector of 19:begin write(term_out,xchr[s]); write(log_file,xchr[s]);term_offset:=term_offset+1; file_offset:=file_offset+1; if term_offset=max_print_line then begin write_ln(term_out); term_offset:=0;end; if file_offset=max_print_line then begin write_ln(log_file); file_offset:=0;end;end;18:begin write(log_file,xchr[s]); file_offset:=file_offset+1;if file_offset=max_print_line then print_ln; end;17:begin write(term_out,xchr[s]);term_offset:=term_offset+1; if term_offset=max_print_line then print_ln;end;16:; 20:if tally=str_ptr then s:=260 else if s<256 then if s<0 then s:=260 else begin if selector>20 then begin print_char(s);goto 10;end; if({244:}s=eqtb[5317].int{:244})then if selector<20 then begin print_ln; goto 10;end;nl:=eqtb[5317].int;eqtb[5317].int:=-1;j:=str_start[s]; while j=str_ptr)or(s<256)then print(s)else begin j:=str_start[s]; while j0)and(odd(selector)))or((file_offset>0)and( selector>=18))then print_ln;print(s);end; {:62}{63:}procedure print_esc(s:str_number);var c:integer; begin{243:}c:=eqtb[5313].int{:243};if c>=0 then if c<256 then print(c); slow_print(s);end;{:63}{64:}procedure print_the_digs(k:eight_bits); begin while k>0 do begin k:=k-1; if dig[k]<10 then print_char(48+dig[k])else print_char(55+dig[k]);end; end;{:64}{65:}procedure print_int(n:integer);var k:0..23;m:integer; begin k:=0;if n<0 then begin print_char(45); if n>-100000000 then n:=-n else begin m:=-1-n;n:=m div 10; m:=(m mod 10)+1;k:=1;if m<10 then dig[0]:=m else begin dig[0]:=0;n:=n+1; end;end;end;repeat dig[k]:=n mod 10;n:=n div 10;k:=k+1;until n=0; print_the_digs(k);end;{:65}{262:}procedure print_cs(p:integer); begin if p<514 then if p>=257 then if p=513 then begin print_esc(507); print_esc(508);print_char(32);end else begin print_esc(p-257); if eqtb[3988+p-257].hh.rh=11 then print_char(32); end else if p<1 then print_esc(509)else print(p-1)else if p>=2881 then print_esc(509)else if(hash[p].rh<0)or(hash[p].rh>=str_ptr)then print_esc (510)else begin print_esc(hash[p].rh);print_char(32);end;end; {:262}{263:}procedure sprint_cs(p:halfword); begin if p<514 then if p<257 then print(p-1)else if p<513 then print_esc (p-257)else begin print_esc(507);print_esc(508); end else print_esc(hash[p].rh);end; {:263}{518:}procedure print_file_name(n,a,e:integer); begin slow_print(a);slow_print(n);slow_print(e);end; {:518}{699:}procedure print_size(s:integer); begin if s=0 then print_esc(415)else if s=16 then print_esc(416)else print_esc(417);end; {:699}{1355:}procedure print_write_whatsit(s:str_number;p:halfword); begin print_esc(s); if mem[p+1].hh.lh<16 then print_int(mem[p+1].hh.lh)else if mem[p+1].hh. lh=16 then print_char(42)else print_char(45);end; {:1355}{1557:}procedure print_sa_num(q:halfword);var n:halfword; begin if mem[q].hh.b0<32 then n:=mem[q+1].hh.rh else begin n:=mem[q].hh. b0 mod 16;q:=mem[q].hh.rh;n:=n+16*mem[q].hh.b0;q:=mem[q].hh.rh; n:=n+256*(mem[q].hh.b0+16*mem[mem[q].hh.rh].hh.b0);end;print_int(n);end; {:1557}{78:}procedure normalize_selector;forward;procedure get_token; forward;procedure term_input;forward;procedure show_context;forward; procedure begin_file_reading;forward;procedure open_log_file;forward; procedure close_files_and_terminate;forward; procedure clear_for_error_prompt;forward;procedure give_err_help; forward;{procedure debug_help;forward;}{:78}{81:}procedure jump_out; begin goto 9998;end;{:81}{82:}procedure error;label 22,10; var c:ASCII_code;s1,s2,s3,s4:integer;begin if history<2 then history:=2; print_char(46);show_context; if interaction=3 then{83:}while true do begin 22:if interaction<>3 then goto 10;clear_for_error_prompt;begin;print(265);term_input;end; if last=first then goto 10;c:=buffer[first];if c>=97 then c:=c-32; {84:}case c of 48,49,50,51,52,53,54,55,56,57:if deletions_allowed then {88:}begin s1:=cur_tok;s2:=cur_cmd;s3:=cur_chr;s4:=align_state; align_state:=1000000;OK_to_interrupt:=false; if(last>first+1)and(buffer[first+1]>=48)and(buffer[first+1]<=57)then c:= c*10+buffer[first+1]-48*11 else c:=c-48;while c>0 do begin get_token; c:=c-1;end;cur_tok:=s1;cur_cmd:=s2;cur_chr:=s3;align_state:=s4; OK_to_interrupt:=true;begin help_ptr:=2;help_line[1]:=280; help_line[0]:=281;end;show_context;goto 22;end{:88}; {68:begin debug_help;goto 22;end;} 69:if base_ptr>0 then if input_stack[base_ptr].name_field>=256 then begin print_nl(266);slow_print(input_stack[base_ptr].name_field); print(267);print_int(line);interaction:=2;jump_out;end; 72:{89:}begin if use_err_help then begin give_err_help; use_err_help:=false;end else begin if help_ptr=0 then begin help_ptr:=2; help_line[1]:=282;help_line[0]:=283;end;repeat help_ptr:=help_ptr-1; print(help_line[help_ptr]);print_ln;until help_ptr=0;end; begin help_ptr:=4;help_line[3]:=284;help_line[2]:=283;help_line[1]:=285; help_line[0]:=286;end;goto 22;end{:89};73:{87:}begin begin_file_reading; if last>first+1 then begin cur_input.loc_field:=first+1; buffer[first]:=32;end else begin begin;print(279);term_input;end; cur_input.loc_field:=first;end;first:=last; cur_input.limit_field:=last-1;goto 10;end{:87}; 81,82,83:{86:}begin error_count:=0;interaction:=0+c-81;print(274); case c of 81:begin print_esc(275);selector:=selector-1;end; 82:print_esc(276);83:print_esc(277);end;print(278);print_ln; break(term_out);goto 10;end{:86};88:begin interaction:=2;jump_out;end; others:end;{85:}begin print(268);print_nl(269);print_nl(270); if base_ptr>0 then if input_stack[base_ptr].name_field>=256 then print( 271);if deletions_allowed then print_nl(272);print_nl(273); end{:85}{:84};end{:83};error_count:=error_count+1; if error_count=100 then begin print_nl(264);history:=3;jump_out;end; {90:}if interaction>0 then selector:=selector-1; if use_err_help then begin print_ln;give_err_help; end else while help_ptr>0 do begin help_ptr:=help_ptr-1; print_nl(help_line[help_ptr]);end;print_ln; if interaction>0 then selector:=selector+1;print_ln{:90};10:end; {:82}{93:}procedure fatal_error(s:str_number);begin normalize_selector; begin if interaction=3 then;print_nl(263);print(288);end; begin help_ptr:=1;help_line[0]:=s;end; begin if interaction=3 then interaction:=2;if log_opened then error; {if interaction>0 then debug_help;}history:=3;jump_out;end;end; {:93}{94:}procedure overflow(s:str_number;n:integer); begin normalize_selector;begin if interaction=3 then;print_nl(263); print(289);end;print(s);print_char(61);print_int(n);print_char(93); begin help_ptr:=2;help_line[1]:=290;help_line[0]:=291;end; begin if interaction=3 then interaction:=2;if log_opened then error; {if interaction>0 then debug_help;}history:=3;jump_out;end;end; {:94}{95:}procedure confusion(s:str_number);begin normalize_selector; if history<2 then begin begin if interaction=3 then;print_nl(263); print(292);end;print(s);print_char(41);begin help_ptr:=1; help_line[0]:=293;end;end else begin begin if interaction=3 then; print_nl(263);print(294);end;begin help_ptr:=2;help_line[1]:=295; help_line[0]:=296;end;end;begin if interaction=3 then interaction:=2; if log_opened then error;{if interaction>0 then debug_help;}history:=3; jump_out;end;end; {:95}{:4}{27:}function a_open_in(var f:alpha_file):boolean; begin reset(f,name_of_file,'/O');a_open_in:=erstat(f)=0;end; function a_open_out(var f:alpha_file):boolean; begin rewrite(f,name_of_file,'/O');a_open_out:=erstat(f)=0;end; function b_open_in(var f:byte_file):boolean; begin reset(f,name_of_file,'/O');b_open_in:=erstat(f)=0;end; function b_open_out(var f:byte_file):boolean; begin rewrite(f,name_of_file,'/O');b_open_out:=erstat(f)=0;end; function w_open_in(var f:word_file):boolean; begin reset(f,name_of_file,'/O');w_open_in:=erstat(f)=0;end; function w_open_out(var f:word_file):boolean; begin rewrite(f,name_of_file,'/O');w_open_out:=erstat(f)=0;end; {:27}{28:}procedure a_close(var f:alpha_file);begin close(f);end; procedure b_close(var f:byte_file);begin close(f);end; procedure w_close(var f:word_file);begin close(f);end; {:28}{31:}function input_ln(var f:alpha_file; bypass_eoln:boolean):boolean;var last_nonblank:0..buf_size; begin if bypass_eoln then if not eof(f)then get(f);last:=first; if eof(f)then input_ln:=false else begin last_nonblank:=first; while not eoln(f)do begin if last>=max_buf_stack then begin max_buf_stack:=last+1; if max_buf_stack=buf_size then{35:}if format_ident=0 then begin write_ln (term_out,'Buffer size exceeded!');goto 9999; end else begin cur_input.loc_field:=first;cur_input.limit_field:=last-1; overflow(257,buf_size);end{:35};end;buffer[last]:=xord[f^];get(f); last:=last+1;if buffer[last-1]<>32 then last_nonblank:=last;end; last:=last_nonblank;input_ln:=true;end;end; {:31}{37:}function init_terminal:boolean;label 10; begin reset(term_in,'TTY:','/O/I');while true do begin; write(term_out,'**');break(term_out); if not input_ln(term_in,true)then begin write_ln(term_out); write(term_out,'! End of file on the terminal... why?'); init_terminal:=false;goto 10;end;cur_input.loc_field:=first; while(cur_input.loc_fieldbuffer[k]then begin result:=false;goto 45;end;j:=j+1;k:=k+1;end;result:=true; 45:str_eq_buf:=result;end; {:45}{46:}function str_eq_str(s,t:str_number):boolean;label 45; var j,k:pool_pointer;result:boolean;begin result:=false; if(str_start[s+1]-str_start[s])<>(str_start[t+1]-str_start[t])then goto 45;j:=str_start[s];k:=str_start[t]; while jstr_pool[k]then goto 45; j:=j+1;k:=k+1;end;result:=true;45:str_eq_str:=result;end; {:46}{47:}function get_strings_started:boolean;label 30,10; var k,l:0..255;m,n:char;g:str_number;a:integer;c:boolean; begin pool_ptr:=0;str_ptr:=0;str_start[0]:=0; {48:}for k:=0 to 255 do begin if({49:}(k<32)or(k>126){:49})then begin begin str_pool[pool_ptr]:=94;pool_ptr:=pool_ptr+1;end; begin str_pool[pool_ptr]:=94;pool_ptr:=pool_ptr+1;end; if k<64 then begin str_pool[pool_ptr]:=k+64;pool_ptr:=pool_ptr+1; end else if k<128 then begin str_pool[pool_ptr]:=k-64; pool_ptr:=pool_ptr+1;end else begin l:=k div 16; if l<10 then begin str_pool[pool_ptr]:=l+48;pool_ptr:=pool_ptr+1; end else begin str_pool[pool_ptr]:=l+87;pool_ptr:=pool_ptr+1;end; l:=k mod 16;if l<10 then begin str_pool[pool_ptr]:=l+48; pool_ptr:=pool_ptr+1;end else begin str_pool[pool_ptr]:=l+87; pool_ptr:=pool_ptr+1;end;end;end else begin str_pool[pool_ptr]:=k; pool_ptr:=pool_ptr+1;end;g:=make_string;end{:48}; {51:}name_of_file:=pool_name;if a_open_in(pool_file)then begin c:=false; repeat{52:}begin if eof(pool_file)then begin; write_ln(term_out,'! TEX.POOL has no check sum.');a_close(pool_file); get_strings_started:=false;goto 10;end;read(pool_file,m,n); if m='*'then{53:}begin a:=0;k:=1; while true do begin if(xord[n]<48)or(xord[n]>57)then begin; write_ln(term_out,'! TEX.POOL check sum doesn''t have nine digits.'); a_close(pool_file);get_strings_started:=false;goto 10;end; a:=10*a+xord[n]-48;if k=9 then goto 30;k:=k+1;read(pool_file,n);end; 30:if a<>337691162 then begin; write_ln(term_out,'! TEX.POOL doesn''t match; TANGLE me again.'); a_close(pool_file);get_strings_started:=false;goto 10;end;c:=true; end{:53}else begin if(xord[m]<48)or(xord[m]>57)or(xord[n]<48)or(xord[n]> 57)then begin; write_ln(term_out,'! TEX.POOL line doesn''t begin with two digits.'); a_close(pool_file);get_strings_started:=false;goto 10;end; l:=xord[m]*10+xord[n]-48*11; if pool_ptr+l+string_vacancies>pool_size then begin; write_ln(term_out,'! You have to increase POOLSIZE.'); a_close(pool_file);get_strings_started:=false;goto 10;end; for k:=1 to l do begin if eoln(pool_file)then m:=' 'else read(pool_file, m);begin str_pool[pool_ptr]:=xord[m];pool_ptr:=pool_ptr+1;end;end; read_ln(pool_file);g:=make_string;end;end{:52};until c; a_close(pool_file);get_strings_started:=true;end else begin; write_ln(term_out,'! I can''t read TEX.POOL.');a_close(pool_file); get_strings_started:=false;goto 10;end{:51};10:end; {:47}{66:}procedure print_two(n:integer);begin n:=abs(n)mod 100; print_char(48+(n div 10));print_char(48+(n mod 10));end; {:66}{67:}procedure print_hex(n:integer);var k:0..22;begin k:=0; print_char(34);repeat dig[k]:=n mod 16;n:=n div 16;k:=k+1;until n=0; print_the_digs(k);end;{:67}{69:}procedure print_roman_int(n:integer); label 10;var j,k:pool_pointer;u,v:nonnegative_integer; begin j:=str_start[261];v:=1000; while true do begin while n>=v do begin print_char(str_pool[j]);n:=n-v; end;if n<=0 then goto 10;k:=j+2;u:=v div(str_pool[k-1]-48); if str_pool[k-1]=50 then begin k:=k+2;u:=u div(str_pool[k-1]-48);end; if n+u>=v then begin print_char(str_pool[k]);n:=n+u; end else begin j:=j+2;v:=v div(str_pool[j-1]-48);end;end;10:end; {:69}{70:}procedure print_current_string;var j:pool_pointer; begin j:=str_start[str_ptr]; while jfirst then for k:=first to last-1 do print(buffer[k]);print_ln; selector:=selector+1;end;{:71}{91:}procedure int_error(n:integer); begin print(287);print_int(n);print_char(41);error;end; {:91}{92:}procedure normalize_selector; begin if log_opened then selector:=19 else selector:=17; if job_name=0 then open_log_file; if interaction=0 then selector:=selector-1;end; {:92}{98:}procedure pause_for_instructions; begin if OK_to_interrupt then begin interaction:=3; if(selector=18)or(selector=16)then selector:=selector+1; begin if interaction=3 then;print_nl(263);print(297);end; begin help_ptr:=3;help_line[2]:=298;help_line[1]:=299;help_line[0]:=300; end;deletions_allowed:=false;error;deletions_allowed:=true;interrupt:=0; end;end;{:98}{100:}function half(x:integer):integer; begin if odd(x)then half:=(x+1)div 2 else half:=x div 2;end; {:100}{102:}function round_decimals(k:small_number):scaled; var a:integer;begin a:=0;while k>0 do begin k:=k-1; a:=(a+dig[k]*131072)div 10;end;round_decimals:=(a+1)div 2;end; {:102}{103:}procedure print_scaled(s:scaled);var delta:scaled; begin if s<0 then begin print_char(45);s:=-s;end;print_int(s div 65536); print_char(46);s:=10*(s mod 65536)+5;delta:=10; repeat if delta>65536 then s:=s-17232;print_char(48+(s div 65536)); s:=10*(s mod 65536);delta:=delta*10;until s<=delta;end; {:103}{105:}function mult_and_add(n:integer; x,y,max_answer:scaled):scaled;begin if n<0 then begin x:=-x;n:=-n;end; if n=0 then mult_and_add:=y else if((x<=(max_answer-y)div n)and(-x<=( max_answer+y)div n))then mult_and_add:=n*x+y else begin arith_error:= true;mult_and_add:=0;end;end;{:105}{106:}function x_over_n(x:scaled; n:integer):scaled;var negative:boolean;begin negative:=false; if n=0 then begin arith_error:=true;x_over_n:=0;remainder:=x; end else begin if n<0 then begin x:=-x;n:=-n;negative:=true;end; if x>=0 then begin x_over_n:=x div n;remainder:=x mod n; end else begin x_over_n:=-((-x)div n);remainder:=-((-x)mod n);end;end; if negative then remainder:=-remainder;end; {:106}{107:}function xn_over_d(x:scaled;n,d:integer):scaled; var positive:boolean;t,u,v:nonnegative_integer; begin if x>=0 then positive:=true else begin x:=-x;positive:=false;end; t:=(x mod 32768)*n;u:=(x div 32768)*n+(t div 32768); v:=(u mod d)*32768+(t mod 32768); if u div d>=32768 then arith_error:=true else u:=32768*(u div d)+(v div d);if positive then begin xn_over_d:=u;remainder:=v mod d; end else begin xn_over_d:=-u;remainder:=-(v mod d);end;end; {:107}{108:}function badness(t,s:scaled):halfword;var r:integer; begin if t=0 then badness:=0 else if s<=0 then badness:=10000 else begin if t<=7230584 then r:=(t*297)div s else if s>=1663497 then r:=t div(s div 297)else r:=t; if r>1290 then badness:=10000 else badness:=(r*r*r+131072)div 262144; end;end;{:108}{114:}{procedure print_word(w:memory_word); begin print_int(w.int);print_char(32);print_scaled(w.int); print_char(32);print_scaled(round(65536*w.gr));print_ln; print_int(w.hh.lh);print_char(61);print_int(w.hh.b0);print_char(58); print_int(w.hh.b1);print_char(59);print_int(w.hh.rh);print_char(32); print_int(w.qqqq.b0);print_char(58);print_int(w.qqqq.b1);print_char(58); print_int(w.qqqq.b2);print_char(58);print_int(w.qqqq.b3);end;} {:114}{119:}{292:}procedure show_token_list(p,q:integer;l:integer); label 10;var m,c:integer;match_chr:ASCII_code;n:ASCII_code; begin match_chr:=35;n:=48;tally:=0; while(p<>0)and(tallymem_end)then begin print_esc(310);goto 10; end; if mem[p].hh.lh>=4095 then print_cs(mem[p].hh.lh-4095)else begin m:=mem[ p].hh.lh div 256;c:=mem[p].hh.lh mod 256; if mem[p].hh.lh<0 then print_esc(562)else{294:}case m of 1,2,3,4,7,8,10, 11,12:print(c);6:begin print(c);print(c);end;5:begin print(match_chr); if c<=9 then print_char(c+48)else begin print_char(33);goto 10;end;end; 13:begin match_chr:=c;print(c);n:=n+1;print_char(n); if n>57 then goto 10;end;14:if c=0 then print(563); others:print_esc(562)end{:294};end{:293};p:=mem[p].hh.rh;end; if p<>0 then print_esc(411);10:end;{:292}{306:}procedure runaway; var p:halfword;begin if scanner_status>1 then begin print_nl(577); case scanner_status of 2:begin print(578);p:=def_ref;end; 3:begin print(579);p:=29997;end;4:begin print(580);p:=29996;end; 5:begin print(581);p:=def_ref;end;end;print_char(63);print_ln; show_token_list(mem[p].hh.rh,0,error_line-10);end;end; {:306}{:119}{120:}function get_avail:halfword;var p:halfword; begin p:=avail; if p<>0 then avail:=mem[avail].hh.rh else if mem_end0 then begin r:=p;repeat q:=r;r:=mem[r].hh.rh; {dyn_used:=dyn_used-1;}until r=0;mem[q].hh.rh:=avail;avail:=p;end;end; {:123}{125:}function get_node(s:integer):halfword;label 40,10,20; var p:halfword;q:halfword;r:integer;t:integer;begin 20:p:=rover; repeat{127:}q:=p+mem[p].hh.lh; while(mem[q].hh.rh=65535)do begin t:=mem[q+1].hh.rh; if q=rover then rover:=t;mem[t+1].hh.lh:=mem[q+1].hh.lh; mem[mem[q+1].hh.lh+1].hh.rh:=t;q:=q+mem[q].hh.lh;end;r:=q-s; if r>p+1 then{128:}begin mem[p].hh.lh:=r-p;rover:=p;goto 40;end{:128}; if r=p then if mem[p+1].hh.rh<>p then{129:}begin rover:=mem[p+1].hh.rh; t:=mem[p+1].hh.lh;mem[rover+1].hh.lh:=t;mem[t+1].hh.rh:=rover;goto 40; end{:129};mem[p].hh.lh:=q-p{:127};p:=mem[p+1].hh.rh;until p=rover; if s=1073741824 then begin get_node:=65535;goto 10;end; if lo_mem_max+2=1998 then t:=lo_mem_max+1000 else t:= lo_mem_max+1+(hi_mem_min-lo_mem_max)div 2;p:=mem[rover+1].hh.lh; q:=lo_mem_max;mem[p+1].hh.rh:=q;mem[rover+1].hh.lh:=q; if t>65535 then t:=65535;mem[q+1].hh.rh:=rover;mem[q+1].hh.lh:=p; mem[q].hh.rh:=65535;mem[q].hh.lh:=t-lo_mem_max;lo_mem_max:=t; mem[lo_mem_max].hh.rh:=0;mem[lo_mem_max].hh.lh:=0;rover:=q;goto 20; end{:126};overflow(301,mem_max+1-mem_min);40:mem[r].hh.rh:=0; {var_used:=var_used+s;}get_node:=r;10:end; {:125}{130:}procedure free_node(p:halfword;s:halfword);var q:halfword; begin mem[p].hh.lh:=s;mem[p].hh.rh:=65535;q:=mem[rover+1].hh.lh; mem[p+1].hh.lh:=q;mem[p+1].hh.rh:=rover;mem[rover+1].hh.lh:=p; mem[q+1].hh.rh:=p;{var_used:=var_used-s;}end; {:130}{131:}procedure sort_avail;var p,q,r:halfword;old_rover:halfword; begin p:=get_node(1073741824);p:=mem[rover+1].hh.rh; mem[rover+1].hh.rh:=65535;old_rover:=rover; while p<>old_rover do{132:}if p65535 do begin mem[mem[p+1].hh.rh+1].hh.lh:=p; p:=mem[p+1].hh.rh;end;mem[p+1].hh.rh:=rover;mem[rover+1].hh.lh:=p;end; {:131}{136:}function new_null_box:halfword;var p:halfword; begin p:=get_node(7);mem[p].hh.b0:=0;mem[p].hh.b1:=0;mem[p+1].int:=0; mem[p+2].int:=0;mem[p+3].int:=0;mem[p+4].int:=0;mem[p+5].hh.rh:=0; mem[p+5].hh.b0:=0;mem[p+5].hh.b1:=0;mem[p+6].gr:=0.0;new_null_box:=p; end;{:136}{139:}function new_rule:halfword;var p:halfword; begin p:=get_node(4);mem[p].hh.b0:=2;mem[p].hh.b1:=0; mem[p+1].int:=-1073741824;mem[p+2].int:=-1073741824; mem[p+3].int:=-1073741824;new_rule:=p;end; {:139}{144:}function new_ligature(f,c:quarterword;q:halfword):halfword; var p:halfword;begin p:=get_node(2);mem[p].hh.b0:=6;mem[p+1].hh.b0:=f; mem[p+1].hh.b1:=c;mem[p+1].hh.rh:=q;mem[p].hh.b1:=0;new_ligature:=p;end; function new_lig_item(c:quarterword):halfword;var p:halfword; begin p:=get_node(2);mem[p].hh.b1:=c;mem[p+1].hh.rh:=0;new_lig_item:=p; end;{:144}{145:}function new_disc:halfword;var p:halfword; begin p:=get_node(2);mem[p].hh.b0:=7;mem[p].hh.b1:=0;mem[p+1].hh.lh:=0; mem[p+1].hh.rh:=0;new_disc:=p;end; {:145}{147:}function new_math(w:scaled;s:small_number):halfword; var p:halfword;begin p:=get_node(2);mem[p].hh.b0:=9;mem[p].hh.b1:=s; mem[p+1].int:=w;new_math:=p;end; {:147}{151:}function new_spec(p:halfword):halfword;var q:halfword; begin q:=get_node(4);mem[q]:=mem[p];mem[q].hh.rh:=0; mem[q+1].int:=mem[p+1].int;mem[q+2].int:=mem[p+2].int; mem[q+3].int:=mem[p+3].int;new_spec:=q;end; {:151}{152:}function new_param_glue(n:small_number):halfword; var p:halfword;q:halfword;begin p:=get_node(2);mem[p].hh.b0:=10; mem[p].hh.b1:=n+1;mem[p+1].hh.rh:=0;q:={224:}eqtb[2882+n].hh.rh{:224}; mem[p+1].hh.lh:=q;mem[q].hh.rh:=mem[q].hh.rh+1;new_param_glue:=p;end; {:152}{153:}function new_glue(q:halfword):halfword;var p:halfword; begin p:=get_node(2);mem[p].hh.b0:=10;mem[p].hh.b1:=0;mem[p+1].hh.rh:=0; mem[p+1].hh.lh:=q;mem[q].hh.rh:=mem[q].hh.rh+1;new_glue:=p;end; {:153}{154:}function new_skip_param(n:small_number):halfword; var p:halfword;begin temp_ptr:=new_spec({224:}eqtb[2882+n].hh.rh{:224}); p:=new_glue(temp_ptr);mem[temp_ptr].hh.rh:=0;mem[p].hh.b1:=n+1; new_skip_param:=p;end;{:154}{156:}function new_kern(w:scaled):halfword; var p:halfword;begin p:=get_node(2);mem[p].hh.b0:=11;mem[p].hh.b1:=0; mem[p+1].int:=w;new_kern:=p;end; {:156}{158:}function new_penalty(m:integer):halfword;var p:halfword; begin p:=get_node(2);mem[p].hh.b0:=12;mem[p].hh.b1:=0;mem[p+1].int:=m; new_penalty:=p;end;{:158}{167:}{procedure check_mem(print_locs:boolean); label 31,32;var p,q:halfword;clobbered:boolean; begin for p:=mem_min to lo_mem_max do free[p]:=false; for p:=hi_mem_min to mem_end do free[p]:=false;[168:]p:=avail;q:=0; clobbered:=false; while p<>0 do begin if(p>mem_end)or(p=lo_mem_max)or(p=lo_mem_max)or(mem[p+1].hh.rh lo_mem_max)or(mem[mem[p+1].hh.rh+1].hh.lh<>p)then clobbered:=true; if clobbered then begin print_nl(303);print_int(q);goto 32;end; for q:=p to p+mem[p].hh.lh-1 do begin if free[q]then begin print_nl(304) ;print_int(q);goto 32;end;free[q]:=true;end;q:=p;p:=mem[p+1].hh.rh; until p=rover;32:[:169];[170:]p:=mem_min; while p<=lo_mem_max do begin if(mem[p].hh.rh=65535)then begin print_nl( 305);print_int(p);end;while(p<=lo_mem_max)and not free[p]do p:=p+1; while(p<=lo_mem_max)and free[p]do p:=p+1;end[:170]; if print_locs then[171:]begin print_nl(306); for p:=mem_min to lo_mem_max do if not free[p]and((p>was_lo_max)or was_free[p])then begin print_char(32);print_int(p);end; for p:=hi_mem_min to mem_end do if not free[p]and((p was_mem_end)or was_free[p])then begin print_char(32);print_int(p);end; end[:171];for p:=mem_min to lo_mem_max do was_free[p]:=free[p]; for p:=hi_mem_min to mem_end do was_free[p]:=free[p]; was_mem_end:=mem_end;was_lo_max:=lo_mem_max;was_hi_min:=hi_mem_min;end;} {:167}{172:}{procedure search_mem(p:halfword);var q:integer; begin for q:=mem_min to lo_mem_max do begin if mem[q].hh.rh=p then begin print_nl(307);print_int(q);print_char(41);end; if mem[q].hh.lh=p then begin print_nl(308);print_int(q);print_char(41); end;end; for q:=hi_mem_min to mem_end do begin if mem[q].hh.rh=p then begin print_nl(307);print_int(q);print_char(41);end; if mem[q].hh.lh=p then begin print_nl(308);print_int(q);print_char(41); end;end; [255:]for q:=1 to 3938 do begin if eqtb[q].hh.rh=p then begin print_nl( 504);print_int(q);print_char(41);end;end[:255]; [285:]if save_ptr>0 then for q:=0 to save_ptr-1 do begin if save_stack[q ].hh.rh=p then begin print_nl(554);print_int(q);print_char(41);end; end[:285]; [933:]for q:=0 to 307 do begin if hyph_list[q]=p then begin print_nl(952 );print_int(q);print_char(41);end;end[:933];end;} {:172}{174:}procedure short_display(p:integer);var n:integer; begin while p>mem_min do begin if(p>=hi_mem_min)then begin if p<=mem_end then begin if mem[p].hh.b0<>font_in_short_display then begin if(mem[p]. hh.b0<0)or(mem[p].hh.b0>font_max)then print_char(42)else{267:}print_esc( hash[2624+mem[p].hh.b0].rh){:267};print_char(32); font_in_short_display:=mem[p].hh.b0;end;print(mem[p].hh.b1-0);end; end else{175:}case mem[p].hh.b0 of 0,1,3,8,4,5,13:print(309); 2:print_char(124);10:if mem[p+1].hh.lh<>0 then print_char(32); 9:if mem[p].hh.b1>=4 then print(309)else print_char(36); 6:short_display(mem[p+1].hh.rh);7:begin short_display(mem[p+1].hh.lh); short_display(mem[p+1].hh.rh);n:=mem[p].hh.b1; while n>0 do begin if mem[p].hh.rh<>0 then p:=mem[p].hh.rh;n:=n-1;end; end;others:end{:175};p:=mem[p].hh.rh;end;end; {:174}{176:}procedure print_font_and_char(p:integer); begin if p>mem_end then print_esc(310)else begin if(mem[p].hh.b0<0)or( mem[p].hh.b0>font_max)then print_char(42)else{267:}print_esc(hash[2624+ mem[p].hh.b0].rh){:267};print_char(32);print(mem[p].hh.b1-0);end;end; procedure print_mark(p:integer);begin print_char(123); if(pmem_end)then print_esc(310)else show_token_list(mem [p].hh.rh,0,max_print_line-10);print_char(125);end; procedure print_rule_dimen(d:scaled); begin if(d=-1073741824)then print_char(42)else print_scaled(d);end; {:176}{177:}procedure print_glue(d:scaled;order:integer;s:str_number); begin print_scaled(d); if(order<0)or(order>3)then print(311)else if order>0 then begin print( 312);while order>1 do begin print_char(108);order:=order-1;end; end else if s<>0 then print(s);end; {:177}{178:}procedure print_spec(p:integer;s:str_number); begin if(p=lo_mem_max)then print_char(42)else begin print_scaled(mem[p+1].int);if s<>0 then print(s); if mem[p+2].int<>0 then begin print(313); print_glue(mem[p+2].int,mem[p].hh.b0,s);end; if mem[p+3].int<>0 then begin print(314); print_glue(mem[p+3].int,mem[p].hh.b1,s);end;end;end; {:178}{179:}{691:}procedure print_fam_and_char(p:halfword); begin print_esc(467);print_int(mem[p].hh.b0);print_char(32); print(mem[p].hh.b1-0);end;procedure print_delimiter(p:halfword); var a:integer;begin a:=mem[p].qqqq.b0*256+mem[p].qqqq.b1-0; a:=a*4096+mem[p].qqqq.b2*256+mem[p].qqqq.b3-0; if a<0 then print_int(a)else print_hex(a);end; {:691}{692:}procedure show_info;forward; procedure print_subsidiary_data(p:halfword;c:ASCII_code); begin if(pool_ptr-str_start[str_ptr])>=depth_threshold then begin if mem [p].hh.rh<>0 then print(315);end else begin begin str_pool[pool_ptr]:=c; pool_ptr:=pool_ptr+1;end;temp_ptr:=p; case mem[p].hh.rh of 1:begin print_ln;print_current_string; print_fam_and_char(p);end;2:show_info; 3:if mem[p].hh.lh=0 then begin print_ln;print_current_string;print(871); end else show_info;others:end;pool_ptr:=pool_ptr-1;end;end; {:692}{694:}procedure print_style(c:integer); begin case c div 2 of 0:print_esc(872);1:print_esc(873); 2:print_esc(874);3:print_esc(875);others:print(876)end;end; {:694}{225:}procedure print_skip_param(n:integer); begin case n of 0:print_esc(379);1:print_esc(380);2:print_esc(381); 3:print_esc(382);4:print_esc(383);5:print_esc(384);6:print_esc(385); 7:print_esc(386);8:print_esc(387);9:print_esc(388);10:print_esc(389); 11:print_esc(390);12:print_esc(391);13:print_esc(392);14:print_esc(393); 15:print_esc(394);16:print_esc(395);17:print_esc(396); others:print(397)end;end; {:225}{:179}{182:}procedure show_node_list(p:integer);label 10; var n:integer;g:real; begin if(pool_ptr-str_start[str_ptr])>depth_threshold then begin if p>0 then print(315);goto 10;end;n:=0;while p>mem_min do begin print_ln; print_current_string;if p>mem_end then begin print(316);goto 10;end; n:=n+1;if n>breadth_max then begin print(317);goto 10;end; {183:}if(p>=hi_mem_min)then print_font_and_char(p)else case mem[p].hh.b0 of 0,1,13:{184:}begin if mem[p].hh.b0=0 then print_esc(104)else if mem[p ].hh.b0=1 then print_esc(118)else print_esc(319);print(320); print_scaled(mem[p+3].int);print_char(43);print_scaled(mem[p+2].int); print(321);print_scaled(mem[p+1].int); if mem[p].hh.b0=13 then{185:}begin if mem[p].hh.b1<>0 then begin print( 287);print_int(mem[p].hh.b1+1);print(323);end; if mem[p+6].int<>0 then begin print(324); print_glue(mem[p+6].int,mem[p+5].hh.b1,0);end; if mem[p+4].int<>0 then begin print(325); print_glue(mem[p+4].int,mem[p+5].hh.b0,0);end; end{:185}else begin{186:}g:=mem[p+6].gr; if(g<>0.0)and(mem[p+5].hh.b0<>0)then begin print(326); if mem[p+5].hh.b0=2 then print(327); if abs(mem[p+6].int)<1048576 then print(328)else if abs(g)>20000.0 then begin if g>0.0 then print_char(62)else print(329); print_glue(20000*65536,mem[p+5].hh.b1,0); end else print_glue(round(65536*g),mem[p+5].hh.b1,0);end{:186}; if mem[p+4].int<>0 then begin print(322);print_scaled(mem[p+4].int);end; if(eTeX_mode=1)then{1435:}if(mem[p].hh.b0=0)and((mem[p].hh.b1-0)=2)then print(1371){:1435};end;begin begin str_pool[pool_ptr]:=46; pool_ptr:=pool_ptr+1;end;show_node_list(mem[p+5].hh.rh); pool_ptr:=pool_ptr-1;end;end{:184};2:{187:}begin print_esc(330); print_rule_dimen(mem[p+3].int);print_char(43); print_rule_dimen(mem[p+2].int);print(321); print_rule_dimen(mem[p+1].int);end{:187};3:{188:}begin print_esc(331); print_int(mem[p].hh.b1-0);print(332);print_scaled(mem[p+3].int); print(333);print_spec(mem[p+4].hh.rh,0);print_char(44); print_scaled(mem[p+2].int);print(334);print_int(mem[p+1].int); begin begin str_pool[pool_ptr]:=46;pool_ptr:=pool_ptr+1;end; show_node_list(mem[p+4].hh.lh);pool_ptr:=pool_ptr-1;end;end{:188}; 8:{1356:}case mem[p].hh.b1 of 0:begin print_write_whatsit(1299,p); print_char(61); print_file_name(mem[p+1].hh.rh,mem[p+2].hh.lh,mem[p+2].hh.rh);end; 1:begin print_write_whatsit(603,p);print_mark(mem[p+1].hh.rh);end; 2:print_write_whatsit(1300,p);3:begin print_esc(1301); print_mark(mem[p+1].hh.rh);end;4:begin print_esc(1303); print_int(mem[p+1].hh.rh);print(1306);print_int(mem[p+1].hh.b0); print_char(44);print_int(mem[p+1].hh.b1);print_char(41);end; others:print(1307)end{:1356}; 10:{189:}if mem[p].hh.b1>=100 then{190:}begin print_esc(339); if mem[p].hh.b1=101 then print_char(99)else if mem[p].hh.b1=102 then print_char(120);print(340);print_spec(mem[p+1].hh.lh,0); begin begin str_pool[pool_ptr]:=46;pool_ptr:=pool_ptr+1;end; show_node_list(mem[p+1].hh.rh);pool_ptr:=pool_ptr-1;end; end{:190}else begin print_esc(335); if mem[p].hh.b1<>0 then begin print_char(40); if mem[p].hh.b1<98 then print_skip_param(mem[p].hh.b1-1)else if mem[p]. hh.b1=98 then print_esc(336)else print_esc(337);print_char(41);end; if mem[p].hh.b1<>98 then begin print_char(32); if mem[p].hh.b1<98 then print_spec(mem[p+1].hh.lh,0)else print_spec(mem[ p+1].hh.lh,338);end;end{:189}; 11:{191:}if mem[p].hh.b1<>99 then begin print_esc(341); if mem[p].hh.b1<>0 then print_char(32);print_scaled(mem[p+1].int); if mem[p].hh.b1=2 then print(342);end else begin print_esc(343); print_scaled(mem[p+1].int);print(338);end{:191}; 9:{192:}if mem[p].hh.b1>1 then begin if odd(mem[p].hh.b1)then print_esc( 344)else print_esc(345); if mem[p].hh.b1>8 then print_char(82)else if mem[p].hh.b1>4 then print_char(76)else print_char(77);end else begin print_esc(346); if mem[p].hh.b1=0 then print(347)else print(348); if mem[p+1].int<>0 then begin print(349);print_scaled(mem[p+1].int);end; end{:192};6:{193:}begin print_font_and_char(p+1);print(350); if mem[p].hh.b1>1 then print_char(124); font_in_short_display:=mem[p+1].hh.b0;short_display(mem[p+1].hh.rh); if odd(mem[p].hh.b1)then print_char(124);print_char(41);end{:193}; 12:{194:}begin print_esc(351);print_int(mem[p+1].int);end{:194}; 7:{195:}begin print_esc(352);if mem[p].hh.b1>0 then begin print(353); print_int(mem[p].hh.b1);end;begin begin str_pool[pool_ptr]:=46; pool_ptr:=pool_ptr+1;end;show_node_list(mem[p+1].hh.lh); pool_ptr:=pool_ptr-1;end;begin str_pool[pool_ptr]:=124; pool_ptr:=pool_ptr+1;end;show_node_list(mem[p+1].hh.rh); pool_ptr:=pool_ptr-1;end{:195};4:{196:}begin print_esc(354); if mem[p+1].hh.lh<>0 then begin print_char(115); print_int(mem[p+1].hh.lh);end;print_mark(mem[p+1].hh.rh);end{:196}; 5:{197:}begin print_esc(355);begin begin str_pool[pool_ptr]:=46; pool_ptr:=pool_ptr+1;end;show_node_list(mem[p+1].int); pool_ptr:=pool_ptr-1;end;end{:197};{690:}14:print_style(mem[p].hh.b1); 15:{695:}begin print_esc(528);begin str_pool[pool_ptr]:=68; pool_ptr:=pool_ptr+1;end;show_node_list(mem[p+1].hh.lh); pool_ptr:=pool_ptr-1;begin str_pool[pool_ptr]:=84;pool_ptr:=pool_ptr+1; end;show_node_list(mem[p+1].hh.rh);pool_ptr:=pool_ptr-1; begin str_pool[pool_ptr]:=83;pool_ptr:=pool_ptr+1;end; show_node_list(mem[p+2].hh.lh);pool_ptr:=pool_ptr-1; begin str_pool[pool_ptr]:=115;pool_ptr:=pool_ptr+1;end; show_node_list(mem[p+2].hh.rh);pool_ptr:=pool_ptr-1;end{:695}; 16,17,18,19,20,21,22,23,24,27,26,29,28,30,31:{696:}begin case mem[p].hh. b0 of 16:print_esc(877);17:print_esc(878);18:print_esc(879); 19:print_esc(880);20:print_esc(881);21:print_esc(882);22:print_esc(883); 23:print_esc(884);27:print_esc(885);26:print_esc(886);29:print_esc(543); 24:begin print_esc(537);print_delimiter(p+4);end; 28:begin print_esc(511);print_fam_and_char(p+4);end; 30:begin print_esc(887);print_delimiter(p+1);end; 31:begin if mem[p].hh.b1=0 then print_esc(888)else print_esc(889); print_delimiter(p+1);end;end; if mem[p].hh.b0<30 then begin if mem[p].hh.b1<>0 then if mem[p].hh.b1=1 then print_esc(890)else print_esc(891);print_subsidiary_data(p+1,46); end;print_subsidiary_data(p+2,94);print_subsidiary_data(p+3,95); end{:696};25:{697:}begin print_esc(892); if mem[p+1].int=1073741824 then print(893)else print_scaled(mem[p+1].int ); if(mem[p+4].qqqq.b0<>0)or(mem[p+4].qqqq.b1<>0)or(mem[p+4].qqqq.b2<>0)or( mem[p+4].qqqq.b3<>0)then begin print(894);print_delimiter(p+4);end; if(mem[p+5].qqqq.b0<>0)or(mem[p+5].qqqq.b1<>0)or(mem[p+5].qqqq.b2<>0)or( mem[p+5].qqqq.b3<>0)then begin print(895);print_delimiter(p+5);end; print_subsidiary_data(p+2,92);print_subsidiary_data(p+3,47);end{:697}; {:690}others:print(318)end{:183};p:=mem[p].hh.rh;end;10:end; {:182}{198:}procedure show_box(p:halfword); begin{236:}depth_threshold:=eqtb[5293].int; breadth_max:=eqtb[5292].int{:236};if breadth_max<=0 then breadth_max:=5; if pool_ptr+depth_threshold>=pool_size then depth_threshold:=pool_size- pool_ptr-1;show_node_list(p);print_ln;end; {:198}{200:}procedure delete_token_ref(p:halfword); begin if mem[p].hh.lh=0 then flush_list(p)else mem[p].hh.lh:=mem[p].hh. lh-1;end;{:200}{201:}procedure delete_glue_ref(p:halfword); begin if mem[p].hh.rh=0 then free_node(p,4)else mem[p].hh.rh:=mem[p].hh. rh-1;end;{:201}{202:}procedure flush_node_list(p:halfword);label 30; var q:halfword;begin while p<>0 do begin q:=mem[p].hh.rh; if(p>=hi_mem_min)then begin mem[p].hh.rh:=avail;avail:=p; {dyn_used:=dyn_used-1;} end else begin case mem[p].hh.b0 of 0,1,13:begin flush_node_list(mem[p+5 ].hh.rh);free_node(p,7);goto 30;end;2:begin free_node(p,4);goto 30;end; 3:begin flush_node_list(mem[p+4].hh.lh);delete_glue_ref(mem[p+4].hh.rh); free_node(p,5);goto 30;end; 8:{1358:}begin case mem[p].hh.b1 of 0:free_node(p,3); 1,3:begin delete_token_ref(mem[p+1].hh.rh);free_node(p,2);goto 30;end; 2,4:free_node(p,2);others:confusion(1309)end;goto 30;end{:1358}; 10:begin begin if mem[mem[p+1].hh.lh].hh.rh=0 then free_node(mem[p+1].hh .lh,4)else mem[mem[p+1].hh.lh].hh.rh:=mem[mem[p+1].hh.lh].hh.rh-1;end; if mem[p+1].hh.rh<>0 then flush_node_list(mem[p+1].hh.rh);end;11,9,12:; 6:flush_node_list(mem[p+1].hh.rh);4:delete_token_ref(mem[p+1].hh.rh); 7:begin flush_node_list(mem[p+1].hh.lh);flush_node_list(mem[p+1].hh.rh); end;5:flush_node_list(mem[p+1].int);{698:}14:begin free_node(p,3); goto 30;end;15:begin flush_node_list(mem[p+1].hh.lh); flush_node_list(mem[p+1].hh.rh);flush_node_list(mem[p+2].hh.lh); flush_node_list(mem[p+2].hh.rh);free_node(p,3);goto 30;end; 16,17,18,19,20,21,22,23,24,27,26,29,28:begin if mem[p+1].hh.rh>=2 then flush_node_list(mem[p+1].hh.lh); if mem[p+2].hh.rh>=2 then flush_node_list(mem[p+2].hh.lh); if mem[p+3].hh.rh>=2 then flush_node_list(mem[p+3].hh.lh); if mem[p].hh.b0=24 then free_node(p,5)else if mem[p].hh.b0=28 then free_node(p,5)else free_node(p,4);goto 30;end; 30,31:begin free_node(p,4);goto 30;end; 25:begin flush_node_list(mem[p+2].hh.lh); flush_node_list(mem[p+3].hh.lh);free_node(p,6);goto 30;end; {:698}others:confusion(356)end;free_node(p,2);30:end;p:=q;end;end; {:202}{204:}function copy_node_list(p:halfword):halfword;var h:halfword; q:halfword;r:halfword;words:0..5;begin h:=get_avail;q:=h; while p<>0 do begin{205:}words:=1; if(p>=hi_mem_min)then r:=get_avail else{206:}case mem[p].hh.b0 of 0,1,13 :begin r:=get_node(7);mem[r+6]:=mem[p+6];mem[r+5]:=mem[p+5]; mem[r+5].hh.rh:=copy_node_list(mem[p+5].hh.rh);words:=5;end; 2:begin r:=get_node(4);words:=4;end;3:begin r:=get_node(5); mem[r+4]:=mem[p+4]; mem[mem[p+4].hh.rh].hh.rh:=mem[mem[p+4].hh.rh].hh.rh+1; mem[r+4].hh.lh:=copy_node_list(mem[p+4].hh.lh);words:=4;end; 8:{1357:}case mem[p].hh.b1 of 0:begin r:=get_node(3);words:=3;end; 1,3:begin r:=get_node(2); mem[mem[p+1].hh.rh].hh.lh:=mem[mem[p+1].hh.rh].hh.lh+1;words:=2;end; 2,4:begin r:=get_node(2);words:=2;end;others:confusion(1308)end{:1357}; 10:begin r:=get_node(2); mem[mem[p+1].hh.lh].hh.rh:=mem[mem[p+1].hh.lh].hh.rh+1; mem[r+1].hh.lh:=mem[p+1].hh.lh; mem[r+1].hh.rh:=copy_node_list(mem[p+1].hh.rh);end; 11,9,12:begin r:=get_node(2);words:=2;end;6:begin r:=get_node(2); mem[r+1]:=mem[p+1];mem[r+1].hh.rh:=copy_node_list(mem[p+1].hh.rh);end; 7:begin r:=get_node(2);mem[r+1].hh.lh:=copy_node_list(mem[p+1].hh.lh); mem[r+1].hh.rh:=copy_node_list(mem[p+1].hh.rh);end; 4:begin r:=get_node(2); mem[mem[p+1].hh.rh].hh.lh:=mem[mem[p+1].hh.rh].hh.lh+1;words:=2;end; 5:begin r:=get_node(2);mem[r+1].int:=copy_node_list(mem[p+1].int);end; others:confusion(357)end{:206};while words>0 do begin words:=words-1; mem[r+words]:=mem[p+words];end{:205};mem[q].hh.rh:=r;q:=r; p:=mem[p].hh.rh;end;mem[q].hh.rh:=0;q:=mem[h].hh.rh; begin mem[h].hh.rh:=avail;avail:=h;{dyn_used:=dyn_used-1;}end; copy_node_list:=q;end;{:204}{211:}procedure print_mode(m:integer); begin if m>0 then case m div(101)of 0:print(358);1:print(359); 2:print(360); end else if m=0 then print(361)else case(-m)div(101)of 0:print(362); 1:print(363);2:print(346);end;print(364);end; {:211}{216:}procedure push_nest; begin if nest_ptr>max_nest_stack then begin max_nest_stack:=nest_ptr; if nest_ptr=nest_size then overflow(365,nest_size);end; nest[nest_ptr]:=cur_list;nest_ptr:=nest_ptr+1; cur_list.head_field:=get_avail;cur_list.tail_field:=cur_list.head_field; cur_list.pg_field:=0;cur_list.ml_field:=line;cur_list.eTeX_aux_field:=0; end;{:216}{217:}procedure pop_nest; begin begin mem[cur_list.head_field].hh.rh:=avail; avail:=cur_list.head_field;{dyn_used:=dyn_used-1;}end; nest_ptr:=nest_ptr-1;cur_list:=nest[nest_ptr];end; {:217}{218:}procedure print_totals;forward;procedure show_activities; var p:0..nest_size;m:-203..203;a:memory_word;q,r:halfword;t:integer; begin nest[nest_ptr]:=cur_list;print_nl(339);print_ln; for p:=nest_ptr downto 0 do begin m:=nest[p].mode_field; a:=nest[p].aux_field;print_nl(366);print_mode(m);print(367); print_int(abs(nest[p].ml_field)); if m=102 then if nest[p].pg_field<>8585216 then begin print(368); print_int(nest[p].pg_field mod 65536);print(369); print_int(nest[p].pg_field div 4194304);print_char(44); print_int((nest[p].pg_field div 65536)mod 64);print_char(41);end; if nest[p].ml_field<0 then print(370); if p=0 then begin{986:}if 29998<>page_tail then begin print_nl(992); if output_active then print(993);show_box(mem[29998].hh.rh); if page_contents>0 then begin print_nl(994);print_totals;print_nl(995); print_scaled(page_so_far[0]);r:=mem[30000].hh.rh; while r<>30000 do begin print_ln;print_esc(331);t:=mem[r].hh.b1-0; print_int(t);print(996); if eqtb[5333+t].int=1000 then t:=mem[r+3].int else t:=x_over_n(mem[r+3]. int,1000)*eqtb[5333+t].int;print_scaled(t); if mem[r].hh.b0=1 then begin q:=29998;t:=0;repeat q:=mem[q].hh.rh; if(mem[q].hh.b0=3)and(mem[q].hh.b1=mem[r].hh.b1)then t:=t+1; until q=mem[r+1].hh.lh;print(997);print_int(t);print(998);end; r:=mem[r].hh.rh;end;end;end{:986}; if mem[29999].hh.rh<>0 then print_nl(371);end; show_box(mem[nest[p].head_field].hh.rh); {219:}case abs(m)div(101)of 0:begin print_nl(372); if a.int<=-65536000 then print(373)else print_scaled(a.int); if nest[p].pg_field<>0 then begin print(374); print_int(nest[p].pg_field);print(375); if nest[p].pg_field<>1 then print_char(115);end;end; 1:begin print_nl(376);print_int(a.hh.lh); if m>0 then if a.hh.rh>0 then begin print(377);print_int(a.hh.rh);end; end;2:if a.int<>0 then begin print(378);show_box(a.int);end;end{:219}; end;end;{:218}{237:}procedure print_param(n:integer); begin case n of 0:print_esc(423);1:print_esc(424);2:print_esc(425); 3:print_esc(426);4:print_esc(427);5:print_esc(428);6:print_esc(429); 7:print_esc(430);8:print_esc(431);9:print_esc(432);10:print_esc(433); 11:print_esc(434);12:print_esc(435);13:print_esc(436);14:print_esc(437); 15:print_esc(438);16:print_esc(439);17:print_esc(440);18:print_esc(441); 19:print_esc(442);20:print_esc(443);21:print_esc(444);22:print_esc(445); 23:print_esc(446);24:print_esc(447);25:print_esc(448);26:print_esc(449); 27:print_esc(450);28:print_esc(451);29:print_esc(452);30:print_esc(453); 31:print_esc(454);32:print_esc(455);33:print_esc(456);34:print_esc(457); 35:print_esc(458);36:print_esc(459);37:print_esc(460);38:print_esc(461); 39:print_esc(462);40:print_esc(463);41:print_esc(464);42:print_esc(465); 43:print_esc(466);44:print_esc(467);45:print_esc(468);46:print_esc(469); 47:print_esc(470);48:print_esc(471);49:print_esc(472);50:print_esc(473); 51:print_esc(474);52:print_esc(475);53:print_esc(476);54:print_esc(477); {1390:}55:print_esc(1319);56:print_esc(1320);57:print_esc(1321); 58:print_esc(1322);59:print_esc(1323);60:print_esc(1324); 61:print_esc(1325);62:print_esc(1326);63:print_esc(1327); {:1390}{1431:}64:print_esc(1366);{:1431}others:print(478)end;end; {:237}{241:}procedure fix_date_and_time;begin sys_time:=12*60; sys_day:=4;sys_month:=7;sys_year:=1776;eqtb[5288].int:=sys_time; eqtb[5289].int:=sys_day;eqtb[5290].int:=sys_month; eqtb[5291].int:=sys_year;end;{:241}{245:}procedure begin_diagnostic; begin old_setting:=selector; if(eqtb[5297].int<=0)and(selector=19)then begin selector:=selector-1; if history=0 then history:=1;end;end; procedure end_diagnostic(blank_line:boolean);begin print_nl(339); if blank_line then print_ln;selector:=old_setting;end; {:245}{247:}procedure print_length_param(n:integer); begin case n of 0:print_esc(481);1:print_esc(482);2:print_esc(483); 3:print_esc(484);4:print_esc(485);5:print_esc(486);6:print_esc(487); 7:print_esc(488);8:print_esc(489);9:print_esc(490);10:print_esc(491); 11:print_esc(492);12:print_esc(493);13:print_esc(494);14:print_esc(495); 15:print_esc(496);16:print_esc(497);17:print_esc(498);18:print_esc(499); 19:print_esc(500);20:print_esc(501);others:print(502)end;end; {:247}{252:}{298:}procedure print_cmd_chr(cmd:quarterword; chr_code:halfword);var n:integer;begin case cmd of 1:begin print(564); print(chr_code);end;2:begin print(565);print(chr_code);end; 3:begin print(566);print(chr_code);end;6:begin print(567); print(chr_code);end;7:begin print(568);print(chr_code);end; 8:begin print(569);print(chr_code);end;9:print(570);10:begin print(571); print(chr_code);end;11:begin print(572);print(chr_code);end; 12:begin print(573);print(chr_code);end; {227:}75,76:if chr_code<2900 then print_skip_param(chr_code-2882)else if chr_code<3156 then begin print_esc(398);print_int(chr_code-2900); end else begin print_esc(399);print_int(chr_code-3156);end; {:227}{231:}72:if chr_code>=3423 then begin print_esc(410); print_int(chr_code-3423);end else case chr_code of 3413:print_esc(401); 3414:print_esc(402);3415:print_esc(403);3416:print_esc(404); 3417:print_esc(405);3418:print_esc(406);3419:print_esc(407); 3420:print_esc(408);{1389:}3422:print_esc(1318); {:1389}others:print_esc(409)end; {:231}{239:}73:if chr_code<5333 then print_param(chr_code-5268)else begin print_esc(479);print_int(chr_code-5333);end; {:239}{249:}74:if chr_code<5866 then print_length_param(chr_code-5845) else begin print_esc(503);print_int(chr_code-5866);end; {:249}{266:}45:print_esc(511);90:print_esc(512);40:print_esc(513); 41:print_esc(514);77:print_esc(522);61:print_esc(515);42:print_esc(535); 16:print_esc(516);107:print_esc(507);88:print_esc(521); 15:print_esc(517);92:print_esc(518);67:print_esc(508);62:print_esc(519); 64:print_esc(32); 102:if chr_code=0 then print_esc(520){1498:}else print_esc(784){:1498}; 32:print_esc(523);36:print_esc(524);39:print_esc(525);37:print_esc(331); 44:print_esc(47);18:begin print_esc(354); if chr_code>0 then print_char(115);end;46:print_esc(526); 17:print_esc(527);54:print_esc(528);91:print_esc(529);34:print_esc(530); 65:print_esc(531);103:print_esc(532);55:print_esc(336); 63:print_esc(533);66:print_esc(537); 96:if chr_code=0 then print_esc(538){1495:}else print_esc(1381){:1495}; 0:print_esc(539);98:print_esc(540);80:print_esc(536); 84:case chr_code of 3412:print_esc(534);{1600:}3679:print_esc(1414); 3680:print_esc(1415);3681:print_esc(1416);3682:print_esc(1417); {:1600}end; 109:if chr_code=0 then print_esc(541){1418:}else if chr_code=1 then print_esc(1356)else print_esc(1357){:1418}; 71:{1568:}begin print_esc(410); if chr_code<>0 then print_sa_num(chr_code);end{:1568};38:print_esc(355); 33:if chr_code=0 then print_esc(542){1433:}else case chr_code of 6: print_esc(1367);7:print_esc(1368);10:print_esc(1369); others:print_esc(1370)end{:1433};56:print_esc(543);35:print_esc(544); {:266}{335:}13:print_esc(606); {:335}{377:}104:if chr_code=0 then print_esc(638){1483:}else if chr_code =2 then print_esc(1379){:1483}else print_esc(639); {:377}{385:}110:begin case(chr_code mod 5)of 1:print_esc(641); 2:print_esc(642);3:print_esc(643);4:print_esc(644); others:print_esc(640)end;if chr_code>=5 then print_char(115);end; {:385}{412:}89:{1567:}begin if(chr_code<0)or(chr_code>19)then cmd:=(mem[ chr_code].hh.b0 div 16)else begin cmd:=chr_code-0;chr_code:=0;end; if cmd=0 then print_esc(479)else if cmd=1 then print_esc(503)else if cmd =2 then print_esc(398)else print_esc(399); if chr_code<>0 then print_sa_num(chr_code);end{:1567}; {:412}{417:}79:if chr_code=1 then print_esc(678)else print_esc(677); 82:if chr_code=0 then print_esc(679){1424:}else if chr_code=2 then print_esc(1362){:1424}else print_esc(680); 83:if chr_code=1 then print_esc(681)else if chr_code=3 then print_esc( 682)else print_esc(683);70:case chr_code of 0:print_esc(684); 1:print_esc(685);2:print_esc(686);4:print_esc(687); {1381:}3:print_esc(1315);6:print_esc(1316); {:1381}{1395:}7:print_esc(1341);8:print_esc(1342); {:1395}{1398:}9:print_esc(1343);10:print_esc(1344);11:print_esc(1345); {:1398}{1401:}14:print_esc(1346);15:print_esc(1347);16:print_esc(1348); 17:print_esc(1349);{:1401}{1404:}18:print_esc(1350);19:print_esc(1351); 20:print_esc(1352);{:1404}{1514:}25:print_esc(1390);26:print_esc(1391); 27:print_esc(1392);28:print_esc(1393);{:1514}{1537:}12:print_esc(1397); 13:print_esc(1398);21:print_esc(1399);22:print_esc(1400); {:1537}{1541:}23:print_esc(1401);24:print_esc(1402); {:1541}others:print_esc(688)end; {:417}{469:}108:case chr_code of 0:print_esc(744);1:print_esc(745); 2:print_esc(746);3:print_esc(747);4:print_esc(748);5:print_esc(750); others:print_esc(749)end; {:469}{488:}105:begin if chr_code>=32 then print_esc(784); case chr_code mod 32 of 1:print_esc(768);2:print_esc(769); 3:print_esc(770);4:print_esc(771);5:print_esc(772);6:print_esc(773); 7:print_esc(774);8:print_esc(775);9:print_esc(776);10:print_esc(777); 11:print_esc(778);12:print_esc(779);13:print_esc(780);14:print_esc(781); 15:print_esc(782);16:print_esc(783);{1499:}17:print_esc(1382); 18:print_esc(1383);19:print_esc(1384);{:1499}others:print_esc(767)end; end; {:488}{492:}106:if chr_code=2 then print_esc(785)else if chr_code=4 then print_esc(786)else print_esc(787); {:492}{781:}4:if chr_code=256 then print_esc(910)else begin print(914); print(chr_code);end; 5:if chr_code=257 then print_esc(911)else print_esc(912); {:781}{984:}81:case chr_code of 0:print_esc(982);1:print_esc(983); 2:print_esc(984);3:print_esc(985);4:print_esc(986);5:print_esc(987); 6:print_esc(988);others:print_esc(989)end; {:984}{1053:}14:if chr_code=1 then print_esc(1037)else print_esc(344); {:1053}{1059:}26:case chr_code of 4:print_esc(1038);0:print_esc(1039); 1:print_esc(1040);2:print_esc(1041);others:print_esc(1042)end; 27:case chr_code of 4:print_esc(1043);0:print_esc(1044); 1:print_esc(1045);2:print_esc(1046);others:print_esc(1047)end; 28:print_esc(337);29:print_esc(341);30:print_esc(343); {:1059}{1072:}21:if chr_code=1 then print_esc(1065)else print_esc(1066); 22:if chr_code=1 then print_esc(1067)else print_esc(1068); 20:case chr_code of 0:print_esc(412);1:print_esc(1069); 2:print_esc(1070);3:print_esc(977);4:print_esc(1071);5:print_esc(979); others:print_esc(1072)end; 31:if chr_code=100 then print_esc(1074)else if chr_code=101 then print_esc(1075)else if chr_code=102 then print_esc(1076)else print_esc( 1073); {:1072}{1089:}43:if chr_code=0 then print_esc(1093)else print_esc(1092); {:1089}{1108:}25:if chr_code=10 then print_esc(1104)else if chr_code=11 then print_esc(1103)else print_esc(1102); 23:if chr_code=1 then print_esc(1106)else print_esc(1105); 24:if chr_code=1 then print_esc(1108){1597:}else if chr_code=2 then print_esc(1412)else if chr_code=3 then print_esc(1413){:1597}else print_esc(1107); {:1108}{1115:}47:if chr_code=1 then print_esc(45)else print_esc(352); {:1115}{1143:}48:if chr_code=1 then print_esc(1140)else print_esc(1139); {:1143}{1157:}50:case chr_code of 16:print_esc(877);17:print_esc(878); 18:print_esc(879);19:print_esc(880);20:print_esc(881);21:print_esc(882); 22:print_esc(883);23:print_esc(884);26:print_esc(886); others:print_esc(885)end; 51:if chr_code=1 then print_esc(890)else if chr_code=2 then print_esc( 891)else print_esc(1141);{:1157}{1170:}53:print_style(chr_code); {:1170}{1179:}52:case chr_code of 1:print_esc(1160);2:print_esc(1161); 3:print_esc(1162);4:print_esc(1163);5:print_esc(1164); others:print_esc(1159)end; {:1179}{1189:}49:if chr_code=30 then print_esc(887){1429:}else if chr_code=1 then print_esc(889){:1429}else print_esc(888); {:1189}{1209:}93:if chr_code=1 then print_esc(1184)else if chr_code=2 then print_esc(1185){1506:}else if chr_code=8 then print_esc(1198) {:1506}else print_esc(1186); 97:if chr_code=0 then print_esc(1187)else if chr_code=1 then print_esc( 1188)else if chr_code=2 then print_esc(1189)else print_esc(1190); {:1209}{1220:}94:if chr_code<>0 then print_esc(1208)else print_esc(1207) ;{:1220}{1223:}95:case chr_code of 0:print_esc(1209);1:print_esc(1210); 2:print_esc(1211);3:print_esc(1212);4:print_esc(1213);5:print_esc(1214); others:print_esc(1215)end;68:begin print_esc(516);print_hex(chr_code); end;69:begin print_esc(527);print_hex(chr_code);end; {:1223}{1231:}85:if chr_code=3988 then print_esc(418)else if chr_code= 5012 then print_esc(422)else if chr_code=4244 then print_esc(419)else if chr_code=4500 then print_esc(420)else if chr_code=4756 then print_esc( 421)else print_esc(480);86:print_size(chr_code-3940); {:1231}{1251:}99:if chr_code=1 then print_esc(965)else print_esc(953); {:1251}{1255:}78:if chr_code=0 then print_esc(1233)else print_esc(1234); {:1255}{1261:}87:begin print(1242);slow_print(font_name[chr_code]); if font_size[chr_code]<>font_dsize[chr_code]then begin print(751); print_scaled(font_size[chr_code]);print(400);end;end; {:1261}{1263:}100:case chr_code of 0:print_esc(275);1:print_esc(276); 2:print_esc(277);others:print_esc(1243)end; {:1263}{1273:}60:if chr_code=0 then print_esc(1245)else print_esc(1244); {:1273}{1278:}58:if chr_code=0 then print_esc(1246)else print_esc(1247); {:1278}{1287:}57:if chr_code=4244 then print_esc(1253)else print_esc( 1254);{:1287}{1292:}19:case chr_code of 1:print_esc(1256); 2:print_esc(1257);3:print_esc(1258);{1407:}4:print_esc(1353); {:1407}{1416:}5:print_esc(1355);{:1416}{1421:}6:print_esc(1358); {:1421}others:print_esc(1255)end;{:1292}{1295:}101:print(1265); 111,112,113,114:begin n:=cmd-111; if mem[mem[chr_code].hh.rh].hh.lh=3585 then n:=n+4; if odd(n div 4)then print_esc(1198);if odd(n)then print_esc(1184); if odd(n div 2)then print_esc(1185);if n>0 then print_char(32); print(1266);end;115:print_esc(1267); {:1295}{1346:}59:case chr_code of 0:print_esc(1299);1:print_esc(603); 2:print_esc(1300);3:print_esc(1301);4:print_esc(1302);5:print_esc(1303); others:print(1304)end;{:1346}others:print(574)end;end; {:298}{procedure show_eqtb(n:halfword); begin if n<1 then print_char(63)else if n<2882 then[223:]begin sprint_cs (n);print_char(61);print_cmd_chr(eqtb[n].hh.b0,eqtb[n].hh.rh); if eqtb[n].hh.b0>=111 then begin print_char(58); show_token_list(mem[eqtb[n].hh.rh].hh.rh,0,32);end; end[:223]else if n<3412 then[229:]if n<2900 then begin print_skip_param( n-2882);print_char(61); if n<2897 then print_spec(eqtb[n].hh.rh,400)else print_spec(eqtb[n].hh. rh,338);end else if n<3156 then begin print_esc(398);print_int(n-2900); print_char(61);print_spec(eqtb[n].hh.rh,400); end else begin print_esc(399);print_int(n-3156);print_char(61); print_spec(eqtb[n].hh.rh,338); end[:229]else if n<5268 then[233:]if(n=3412)or((n>=3679)and(n<3683))then begin print_cmd_chr(84,n);print_char(61); if eqtb[n].hh.rh=0 then print_char(48)else if n>3412 then begin print_int(mem[eqtb[n].hh.rh+1].int);print_char(32); print_int(mem[eqtb[n].hh.rh+2].int); if mem[eqtb[n].hh.rh+1].int>1 then print_esc(411); end else print_int(mem[eqtb[3412].hh.rh].hh.lh); end else if n<3423 then begin print_cmd_chr(72,n);print_char(61); if eqtb[n].hh.rh<>0 then show_token_list(mem[eqtb[n].hh.rh].hh.rh,0,32); end else if n<3683 then begin print_esc(410);print_int(n-3423); print_char(61); if eqtb[n].hh.rh<>0 then show_token_list(mem[eqtb[n].hh.rh].hh.rh,0,32); end else if n<3939 then begin print_esc(412);print_int(n-3683); print_char(61); if eqtb[n].hh.rh=0 then print(413)else begin depth_threshold:=0; breadth_max:=1;show_node_list(eqtb[n].hh.rh);end; end else if n<3988 then[234:]begin if n=3939 then print(414)else if n< 3956 then begin print_esc(415);print_int(n-3940); end else if n<3972 then begin print_esc(416);print_int(n-3956); end else begin print_esc(417);print_int(n-3972);end;print_char(61); print_esc(hash[2624+eqtb[n].hh.rh].rh); end[:234]else[235:]if n<5012 then begin if n<4244 then begin print_esc( 418);print_int(n-3988);end else if n<4500 then begin print_esc(419); print_int(n-4244);end else if n<4756 then begin print_esc(420); print_int(n-4500);end else begin print_esc(421);print_int(n-4756);end; print_char(61);print_int(eqtb[n].hh.rh);end else begin print_esc(422); print_int(n-5012);print_char(61);print_int(eqtb[n].hh.rh-0); end[:235][:233]else if n<5845 then[242:]begin if n<5333 then print_param (n-5268)else if n<5589 then begin print_esc(479);print_int(n-5333); end else begin print_esc(480);print_int(n-5589);end;print_char(61); print_int(eqtb[n].int); end[:242]else if n<=6121 then[251:]begin if n<5866 then print_length_param(n-5845)else begin print_esc(503);print_int(n-5866); end;print_char(61);print_scaled(eqtb[n].int);print(400); end[:251]else print_char(63);end;} {:252}{259:}function id_lookup(j,l:integer):halfword;label 40; var h:integer;d:integer;p:halfword;k:halfword;begin{261:}h:=buffer[j]; for k:=j+1 to j+l-1 do begin h:=h+h+buffer[k]; while h>=1777 do h:=h-1777;end{:261};p:=h+514; while true do begin if hash[p].rh>0 then if(str_start[hash[p].rh+1]- str_start[hash[p].rh])=l then if str_eq_buf(hash[p].rh,j)then goto 40; if hash[p].lh=0 then begin if no_new_control_sequence then p:=2881 else {260:}begin if hash[p].rh>0 then begin repeat if(hash_used=514)then overflow(506,2100);hash_used:=hash_used-1;until hash[hash_used].rh=0; hash[p].lh:=hash_used;p:=hash_used;end; begin if pool_ptr+l>pool_size then overflow(258,pool_size-init_pool_ptr) ;end;d:=(pool_ptr-str_start[str_ptr]); while pool_ptr>str_start[str_ptr]do begin pool_ptr:=pool_ptr-1; str_pool[pool_ptr+l]:=str_pool[pool_ptr];end; for k:=j to j+l-1 do begin str_pool[pool_ptr]:=buffer[k]; pool_ptr:=pool_ptr+1;end;hash[p].rh:=make_string;pool_ptr:=pool_ptr+d; {cs_count:=cs_count+1;}end{:260};goto 40;end;p:=hash[p].lh;end; 40:id_lookup:=p;end;{:259}{264:}procedure primitive(s:str_number; c:quarterword;o:halfword);var k:pool_pointer;j:0..buf_size; l:small_number; begin if s<256 then cur_val:=s+257 else begin k:=str_start[s]; l:=str_start[s+1]-k;if first+l>buf_size+1 then overflow(257,buf_size); for j:=0 to l-1 do buffer[first+j]:=str_pool[k+j]; cur_val:=id_lookup(first,l);begin str_ptr:=str_ptr-1; pool_ptr:=str_start[str_ptr];end;hash[cur_val].rh:=s;end; eqtb[cur_val].hh.b1:=1;eqtb[cur_val].hh.b0:=c;eqtb[cur_val].hh.rh:=o; end;{:264}{268:}{284:}{procedure restore_trace(p:halfword;s:str_number); begin begin_diagnostic;print_char(123);print(s);print_char(32); show_eqtb(p);print_char(125);end_diagnostic(false);end;} {:284}{1392:}procedure print_group(e:boolean);label 10; begin case cur_group of 0:begin print(1328);goto 10;end; 1,14:begin if cur_group=14 then print(1329);print(1330);end; 2,3:begin if cur_group=3 then print(1331);print(1072);end;4:print(979); 5:print(1071);6,7:begin if cur_group=7 then print(1332);print(1333);end; 8:print(401);10:print(1334);11:print(331);12:print(543); 9,13,15,16:begin print(346); if cur_group=13 then print(1335)else if cur_group=15 then print(1336) else if cur_group=16 then print(1337);end;end;print(1338); print_int(cur_level-0);print_char(41); if save_stack[save_ptr-1].int<>0 then begin if e then print(367)else print(267);print_int(save_stack[save_ptr-1].int);end;10:end; {:1392}{1393:}{procedure group_trace(e:boolean);begin begin_diagnostic; print_char(123);if e then print(1339)else print(1340);print_group(e); print_char(125);end_diagnostic(false);end;} {:1393}{1491:}function pseudo_input:boolean;var p:halfword;sz:integer; w:four_quarters;r:halfword;begin last:=first;p:=mem[pseudo_files].hh.lh; if p=0 then pseudo_input:=false else begin mem[pseudo_files].hh.lh:=mem[ p].hh.rh;sz:=mem[p].hh.lh-0; if 4*sz-3>=buf_size-last then{35:}if format_ident=0 then begin write_ln( term_out,'Buffer size exceeded!');goto 9999; end else begin cur_input.loc_field:=first;cur_input.limit_field:=last-1; overflow(257,buf_size);end{:35};last:=first; for r:=p+1 to p+sz-1 do begin w:=mem[r].qqqq;buffer[last]:=w.b0; buffer[last+1]:=w.b1;buffer[last+2]:=w.b2;buffer[last+3]:=w.b3; last:=last+4;end;if last>=max_buf_stack then max_buf_stack:=last+1; while(last>first)and(buffer[last-1]=32)do last:=last-1;free_node(p,sz); pseudo_input:=true;end;end;{:1491}{1492:}procedure pseudo_close; var p,q:halfword;begin p:=mem[pseudo_files].hh.rh; q:=mem[pseudo_files].hh.lh;begin mem[pseudo_files].hh.rh:=avail; avail:=pseudo_files;{dyn_used:=dyn_used-1;}end;pseudo_files:=p; while q<>0 do begin p:=q;q:=mem[p].hh.rh;free_node(p,mem[p].hh.lh-0); end;end;{:1492}{1509:}procedure group_warning;var i:0..max_in_open; w:boolean;begin base_ptr:=input_ptr;input_stack[base_ptr]:=cur_input; i:=in_open;w:=false; while(grp_stack[i]=cur_boundary)and(i>0)do begin{1510:}if eqtb[5327].int >0 then begin while(input_stack[base_ptr].state_field=0)or(input_stack[ base_ptr].index_field>i)do base_ptr:=base_ptr-1; if input_stack[base_ptr].name_field>17 then w:=true;end{:1510}; grp_stack[i]:=save_stack[save_ptr].hh.rh;i:=i-1;end; if w then begin print_nl(1386);print_group(true);print(1387);print_ln; if eqtb[5327].int>1 then show_context;if history=0 then history:=1;end; end;{:1509}{1511:}procedure if_warning;var i:0..max_in_open;w:boolean; begin base_ptr:=input_ptr;input_stack[base_ptr]:=cur_input;i:=in_open; w:=false; while if_stack[i]=cond_ptr do begin{1510:}if eqtb[5327].int>0 then begin while(input_stack[base_ptr].state_field=0)or(input_stack[base_ptr]. index_field>i)do base_ptr:=base_ptr-1; if input_stack[base_ptr].name_field>17 then w:=true;end{:1510}; if_stack[i]:=mem[cond_ptr].hh.rh;i:=i-1;end; if w then begin print_nl(1386);print_cmd_chr(105,cur_if); if if_line<>0 then begin print(1359);print_int(if_line);end;print(1387); print_ln;if eqtb[5327].int>1 then show_context; if history=0 then history:=1;end;end; {:1511}{1512:}procedure file_warning;var p:halfword;l:quarterword; c:quarterword;i:integer;begin p:=save_ptr;l:=cur_level;c:=cur_group; save_ptr:=cur_boundary; while grp_stack[in_open]<>save_ptr do begin cur_level:=cur_level-1; print_nl(1388);print_group(true);print(1389); cur_group:=save_stack[save_ptr].hh.b1; save_ptr:=save_stack[save_ptr].hh.rh end;save_ptr:=p;cur_level:=l; cur_group:=c;p:=cond_ptr;l:=if_limit;c:=cur_if;i:=if_line; while if_stack[in_open]<>cond_ptr do begin print_nl(1388); print_cmd_chr(105,cur_if);if if_limit=2 then print_esc(787); if if_line<>0 then begin print(1359);print_int(if_line);end;print(1389); if_line:=mem[cond_ptr+1].int;cur_if:=mem[cond_ptr].hh.b1; if_limit:=mem[cond_ptr].hh.b0;cond_ptr:=mem[cond_ptr].hh.rh;end; cond_ptr:=p;if_limit:=l;cur_if:=c;if_line:=i;print_ln; if eqtb[5327].int>1 then show_context;if history=0 then history:=1;end; {:1512}{1556:}procedure delete_sa_ref(q:halfword);label 10; var p:halfword;i:small_number;s:small_number; begin mem[q+1].hh.lh:=mem[q+1].hh.lh-1; if mem[q+1].hh.lh<>0 then goto 10; if mem[q].hh.b0<32 then if mem[q+2].int=0 then s:=3 else goto 10 else begin if mem[q].hh.b0<64 then if mem[q+1].hh.rh=0 then delete_glue_ref(0 )else goto 10 else if mem[q+1].hh.rh<>0 then goto 10;s:=2;end; repeat i:=mem[q].hh.b0 mod 16;p:=q;q:=mem[p].hh.rh;free_node(p,s); if q=0 then begin sa_root[i]:=0;goto 10;end; begin if odd(i)then mem[q+(i div 2)+1].hh.rh:=0 else mem[q+(i div 2)+1]. hh.lh:=0;mem[q].hh.b1:=mem[q].hh.b1-1;end;s:=9;until mem[q].hh.b1>0; 10:end;{:1556}{1558:}{procedure show_sa(p:halfword;s:str_number); var t:small_number;begin begin_diagnostic;print_char(123);print(s); print_char(32); if p=0 then print_char(63)else begin t:=(mem[p].hh.b0 div 16); if t<4 then print_cmd_chr(89,p)else if t=4 then begin print_esc(412); print_sa_num(p); end else if t=5 then print_cmd_chr(71,p)else print_char(63); print_char(61); if t=0 then print_int(mem[p+2].int)else if t=1 then begin print_scaled( mem[p+2].int);print(400);end else begin p:=mem[p+1].hh.rh; if t=2 then print_spec(p,400)else if t=3 then print_spec(p,338)else if t =4 then if p=0 then print(413)else begin depth_threshold:=0; breadth_max:=1;show_node_list(p); end else if t=5 then begin if p<>0 then show_token_list(mem[p].hh.rh,0, 32);end else print_char(63);end;end;print_char(125); end_diagnostic(false);end;}{:1558}{1572:}procedure sa_save(p:halfword); var q:halfword;i:quarterword; begin if cur_level<>sa_level then begin if save_ptr>max_save_stack then begin max_save_stack:=save_ptr; if max_save_stack>save_size-7 then overflow(545,save_size);end; save_stack[save_ptr].hh.b0:=4;save_stack[save_ptr].hh.b1:=sa_level; save_stack[save_ptr].hh.rh:=sa_chain;save_ptr:=save_ptr+1;sa_chain:=0; sa_level:=cur_level;end;i:=mem[p].hh.b0; if i<32 then begin if mem[p+2].int=0 then begin q:=get_node(2);i:=96; end else begin q:=get_node(3);mem[q+2].int:=mem[p+2].int;end; mem[q+1].hh.rh:=0;end else begin q:=get_node(2); mem[q+1].hh.rh:=mem[p+1].hh.rh;end;mem[q+1].hh.lh:=p;mem[q].hh.b0:=i; mem[q].hh.b1:=mem[p].hh.b1;mem[q].hh.rh:=sa_chain;sa_chain:=q; mem[p+1].hh.lh:=mem[p+1].hh.lh+1;end; {:1572}{1573:}procedure sa_destroy(p:halfword); begin if mem[p].hh.b0<64 then delete_glue_ref(mem[p+1].hh.rh)else if mem [p+1].hh.rh<>0 then if mem[p].hh.b0<80 then flush_node_list(mem[p+1].hh. rh)else delete_token_ref(mem[p+1].hh.rh);end; {:1573}{1574:}procedure sa_def(p:halfword;e:halfword); begin mem[p+1].hh.lh:=mem[p+1].hh.lh+1; if mem[p+1].hh.rh=e then begin{if eqtb[5323].int>0 then show_sa(p,547);} sa_destroy(p);end else begin{if eqtb[5323].int>0 then show_sa(p,548);} if mem[p].hh.b1=cur_level then sa_destroy(p)else sa_save(p); mem[p].hh.b1:=cur_level;mem[p+1].hh.rh:=e; {if eqtb[5323].int>0 then show_sa(p,549);}end;delete_sa_ref(p);end; procedure sa_w_def(p:halfword;w:integer); begin mem[p+1].hh.lh:=mem[p+1].hh.lh+1; if mem[p+2].int=w then begin{if eqtb[5323].int>0 then show_sa(p,547);} end else begin{if eqtb[5323].int>0 then show_sa(p,548);} if mem[p].hh.b1<>cur_level then sa_save(p);mem[p].hh.b1:=cur_level; mem[p+2].int:=w;{if eqtb[5323].int>0 then show_sa(p,549);}end; delete_sa_ref(p);end;{:1574}{1575:}procedure gsa_def(p:halfword; e:halfword);begin mem[p+1].hh.lh:=mem[p+1].hh.lh+1; {if eqtb[5323].int>0 then show_sa(p,550);}sa_destroy(p);mem[p].hh.b1:=1; mem[p+1].hh.rh:=e;{if eqtb[5323].int>0 then show_sa(p,549);} delete_sa_ref(p);end;procedure gsa_w_def(p:halfword;w:integer); begin mem[p+1].hh.lh:=mem[p+1].hh.lh+1; {if eqtb[5323].int>0 then show_sa(p,550);}mem[p].hh.b1:=1; mem[p+2].int:=w;{if eqtb[5323].int>0 then show_sa(p,549);} delete_sa_ref(p);end;{:1575}{1576:}procedure sa_restore;var p:halfword; begin repeat p:=mem[sa_chain+1].hh.lh; if mem[p].hh.b1=1 then begin if mem[p].hh.b0>=32 then sa_destroy( sa_chain);{if eqtb[5305].int>0 then show_sa(p,552);} end else begin if mem[p].hh.b0<32 then if mem[sa_chain].hh.b0<32 then mem[p+2].int:=mem[sa_chain+2].int else mem[p+2].int:=0 else begin sa_destroy(p);mem[p+1].hh.rh:=mem[sa_chain+1].hh.rh;end; mem[p].hh.b1:=mem[sa_chain].hh.b1; {if eqtb[5305].int>0 then show_sa(p,553);}end;delete_sa_ref(p); p:=sa_chain;sa_chain:=mem[p].hh.rh; if mem[p].hh.b0<32 then free_node(p,3)else free_node(p,2); until sa_chain=0;end; {:1576}{:268}{274:}procedure new_save_level(c:group_code); begin if save_ptr>max_save_stack then begin max_save_stack:=save_ptr; if max_save_stack>save_size-7 then overflow(545,save_size);end; if(eTeX_mode=1)then begin save_stack[save_ptr+0].int:=line; save_ptr:=save_ptr+1;end;save_stack[save_ptr].hh.b0:=3; save_stack[save_ptr].hh.b1:=cur_group; save_stack[save_ptr].hh.rh:=cur_boundary; if cur_level=255 then overflow(546,255);cur_boundary:=save_ptr; cur_group:=c;{if eqtb[5324].int>0 then group_trace(false);} cur_level:=cur_level+1;save_ptr:=save_ptr+1;end; {:274}{275:}procedure eq_destroy(w:memory_word);var q:halfword; begin case w.hh.b0 of 111,112,113,114:delete_token_ref(w.hh.rh); 117:delete_glue_ref(w.hh.rh);118:begin q:=w.hh.rh; if q<>0 then free_node(q,mem[q].hh.lh+mem[q].hh.lh+1);end; 119:flush_node_list(w.hh.rh); {1569:}71,89:if(w.hh.rh<0)or(w.hh.rh>19)then delete_sa_ref(w.hh.rh); {:1569}others:end;end;{:275}{276:}procedure eq_save(p:halfword; l:quarterword); begin if save_ptr>max_save_stack then begin max_save_stack:=save_ptr; if max_save_stack>save_size-7 then overflow(545,save_size);end; if l=0 then save_stack[save_ptr].hh.b0:=1 else begin save_stack[save_ptr ]:=eqtb[p];save_ptr:=save_ptr+1;save_stack[save_ptr].hh.b0:=0;end; save_stack[save_ptr].hh.b1:=l;save_stack[save_ptr].hh.rh:=p; save_ptr:=save_ptr+1;end;{:276}{277:}procedure eq_define(p:halfword; t:quarterword;e:halfword);label 10; begin if(eTeX_mode=1)and(eqtb[p].hh.b0=t)and(eqtb[p].hh.rh=e)then begin{ if eqtb[5323].int>0 then restore_trace(p,547);}eq_destroy(eqtb[p]); goto 10;end;{if eqtb[5323].int>0 then restore_trace(p,548);} if eqtb[p].hh.b1=cur_level then eq_destroy(eqtb[p])else if cur_level>1 then eq_save(p,eqtb[p].hh.b1);eqtb[p].hh.b1:=cur_level;eqtb[p].hh.b0:=t; eqtb[p].hh.rh:=e;{if eqtb[5323].int>0 then restore_trace(p,549);}10:end; {:277}{278:}procedure eq_word_define(p:halfword;w:integer);label 10; begin if(eTeX_mode=1)and(eqtb[p].int=w)then begin{if eqtb[5323].int>0 then restore_trace(p,547);}goto 10;end; {if eqtb[5323].int>0 then restore_trace(p,548);} if xeq_level[p]<>cur_level then begin eq_save(p,xeq_level[p]); xeq_level[p]:=cur_level;end;eqtb[p].int:=w; {if eqtb[5323].int>0 then restore_trace(p,549);}10:end; {:278}{279:}procedure geq_define(p:halfword;t:quarterword;e:halfword); begin{if eqtb[5323].int>0 then restore_trace(p,550);} begin eq_destroy(eqtb[p]);eqtb[p].hh.b1:=1;eqtb[p].hh.b0:=t; eqtb[p].hh.rh:=e;end;{if eqtb[5323].int>0 then restore_trace(p,549);} end;procedure geq_word_define(p:halfword;w:integer); begin{if eqtb[5323].int>0 then restore_trace(p,550);} begin eqtb[p].int:=w;xeq_level[p]:=1;end; {if eqtb[5323].int>0 then restore_trace(p,549);}end; {:279}{280:}procedure save_for_after(t:halfword); begin if cur_level>1 then begin if save_ptr>max_save_stack then begin max_save_stack:=save_ptr; if max_save_stack>save_size-7 then overflow(545,save_size);end; save_stack[save_ptr].hh.b0:=2;save_stack[save_ptr].hh.b1:=0; save_stack[save_ptr].hh.rh:=t;save_ptr:=save_ptr+1;end;end; {:280}{281:}procedure back_input;forward;procedure unsave;label 30; var p:halfword;l:quarterword;t:halfword;a:boolean;begin a:=false; if cur_level>1 then begin cur_level:=cur_level-1; {282:}while true do begin save_ptr:=save_ptr-1; if save_stack[save_ptr].hh.b0=3 then goto 30; p:=save_stack[save_ptr].hh.rh; if save_stack[save_ptr].hh.b0=2 then{326:}begin t:=cur_tok;cur_tok:=p; if a then begin p:=get_avail;mem[p].hh.lh:=cur_tok; mem[p].hh.rh:=cur_input.loc_field;cur_input.loc_field:=p; cur_input.start_field:=p; if cur_tok<768 then if cur_tok<512 then align_state:=align_state-1 else align_state:=align_state+1;end else begin back_input;a:=(eTeX_mode=1); end;cur_tok:=t; end{:326}else if save_stack[save_ptr].hh.b0=4 then begin sa_restore; sa_chain:=p;sa_level:=save_stack[save_ptr].hh.b1; end else begin if save_stack[save_ptr].hh.b0=0 then begin l:=save_stack[ save_ptr].hh.b1;save_ptr:=save_ptr-1; end else save_stack[save_ptr]:=eqtb[2881]; {283:}if p<5268 then if eqtb[p].hh.b1=1 then begin eq_destroy(save_stack [save_ptr]);{if eqtb[5305].int>0 then restore_trace(p,552);} end else begin eq_destroy(eqtb[p]);eqtb[p]:=save_stack[save_ptr]; {if eqtb[5305].int>0 then restore_trace(p,553);} end else if xeq_level[p]<>1 then begin eqtb[p]:=save_stack[save_ptr]; xeq_level[p]:=l;{if eqtb[5305].int>0 then restore_trace(p,553);} end else begin{if eqtb[5305].int>0 then restore_trace(p,552);}end{:283}; end;end;30:{if eqtb[5324].int>0 then group_trace(true);} if grp_stack[in_open]=cur_boundary then group_warning; cur_group:=save_stack[save_ptr].hh.b1; cur_boundary:=save_stack[save_ptr].hh.rh; if(eTeX_mode=1)then save_ptr:=save_ptr-1{:282};end else confusion(551); end;{:281}{288:}procedure prepare_mag; begin if(mag_set>0)and(eqtb[5285].int<>mag_set)then begin begin if interaction=3 then;print_nl(263);print(555);end; print_int(eqtb[5285].int);print(556);print_nl(557);begin help_ptr:=2; help_line[1]:=558;help_line[0]:=559;end;int_error(mag_set); geq_word_define(5285,mag_set);end; if(eqtb[5285].int<=0)or(eqtb[5285].int>32768)then begin begin if interaction=3 then;print_nl(263);print(560);end;begin help_ptr:=1; help_line[0]:=561;end;int_error(eqtb[5285].int); geq_word_define(5285,1000);end;mag_set:=eqtb[5285].int;end; {:288}{295:}procedure token_show(p:halfword); begin if p<>0 then show_token_list(mem[p].hh.rh,0,10000000);end; {:295}{296:}procedure print_meaning; begin print_cmd_chr(cur_cmd,cur_chr); if cur_cmd>=111 then begin print_char(58);print_ln;token_show(cur_chr); end else if(cur_cmd=110)and(cur_chr<5)then begin print_char(58); print_ln;token_show(cur_mark[cur_chr]);end;end; {:296}{299:}procedure show_cur_cmd_chr;var n:integer;l:integer; p:halfword;begin begin_diagnostic;print_nl(123); if cur_list.mode_field<>shown_mode then begin print_mode(cur_list. mode_field);print(575);shown_mode:=cur_list.mode_field;end; print_cmd_chr(cur_cmd,cur_chr); if eqtb[5325].int>0 then if cur_cmd>=105 then if cur_cmd<=106 then begin print(575);if cur_cmd=106 then begin print_cmd_chr(105,cur_if); print_char(32);n:=0;l:=if_line;end else begin n:=1;l:=line;end; p:=cond_ptr;while p<>0 do begin n:=n+1;p:=mem[p].hh.rh;end;print(576); print_int(n);print_char(41);if l<>0 then begin print(1359);print_int(l); end;end;print_char(125);end_diagnostic(false);end; {:299}{311:}procedure show_context;label 30;var old_setting:0..21; nn:integer;bottom_line:boolean;{315:}i:0..buf_size;j:0..buf_size; l:0..half_error_line;m:integer;n:0..error_line;p:integer;q:integer; {:315}begin base_ptr:=input_ptr;input_stack[base_ptr]:=cur_input;nn:=-1; bottom_line:=false;while true do begin cur_input:=input_stack[base_ptr]; if(cur_input.state_field<>0)then if(cur_input.name_field>19)or(base_ptr= 0)then bottom_line:=true; if(base_ptr=input_ptr)or bottom_line or(nn0)or(cur_input. index_field<>3)or(cur_input.loc_field<>0)then begin tally:=0; old_setting:=selector; if cur_input.state_field<>0 then begin{313:}if cur_input.name_field<=17 then if(cur_input.name_field=0)then if base_ptr=0 then print_nl(582)else print_nl(583)else begin print_nl(584); if cur_input.name_field=17 then print_char(42)else print_int(cur_input. name_field-1);print_char(62);end else begin print_nl(585); if cur_input.index_field=in_open then print_int(line)else print_int( line_stack[cur_input.index_field+1]);end;print_char(32){:313}; {318:}begin l:=tally;tally:=0;selector:=20;trick_count:=1000000;end; if buffer[cur_input.limit_field]=eqtb[5316].int then j:=cur_input. limit_field else j:=cur_input.limit_field+1; if j>0 then for i:=cur_input.start_field to j-1 do begin if i=cur_input. loc_field then begin first_count:=tally; trick_count:=tally+1+error_line-half_error_line; if trick_counterror_line then print(278){:317};nn:=nn+1;end; end{:312}else if nn=eqtb[5322].int then begin print_nl(278);nn:=nn+1; end;if bottom_line then goto 30;base_ptr:=base_ptr-1;end; 30:cur_input:=input_stack[input_ptr];end; {:311}{323:}procedure begin_token_list(p:halfword;t:quarterword); begin begin if input_ptr>max_in_stack then begin max_in_stack:=input_ptr ;if input_ptr=stack_size then overflow(602,stack_size);end; input_stack[input_ptr]:=cur_input;input_ptr:=input_ptr+1;end; cur_input.state_field:=0;cur_input.start_field:=p; cur_input.index_field:=t; if t>=5 then begin mem[p].hh.lh:=mem[p].hh.lh+1; if t=5 then cur_input.limit_field:=param_ptr else begin cur_input. loc_field:=mem[p].hh.rh;if eqtb[5298].int>1 then begin begin_diagnostic; print_nl(339);case t of 14:print_esc(354);16:print_esc(603); others:print_cmd_chr(72,t+3407)end;print(563);token_show(p); end_diagnostic(false);end;end;end else cur_input.loc_field:=p;end; {:323}{324:}procedure end_token_list; begin if cur_input.index_field>=3 then begin if cur_input.index_field<=4 then flush_list(cur_input.start_field)else begin delete_token_ref( cur_input.start_field); if cur_input.index_field=5 then while param_ptr>cur_input.limit_field do begin param_ptr:=param_ptr-1;flush_list(param_stack[param_ptr]);end;end; end else if cur_input.index_field=1 then if align_state>500000 then align_state:=0 else fatal_error(604);begin input_ptr:=input_ptr-1; cur_input:=input_stack[input_ptr];end; begin if interrupt<>0 then pause_for_instructions;end;end; {:324}{325:}procedure back_input;var p:halfword; begin while(cur_input.state_field=0)and(cur_input.loc_field=0)and( cur_input.index_field<>2)do end_token_list;p:=get_avail; mem[p].hh.lh:=cur_tok; if cur_tok<768 then if cur_tok<512 then align_state:=align_state-1 else align_state:=align_state+1; begin if input_ptr>max_in_stack then begin max_in_stack:=input_ptr; if input_ptr=stack_size then overflow(602,stack_size);end; input_stack[input_ptr]:=cur_input;input_ptr:=input_ptr+1;end; cur_input.state_field:=0;cur_input.start_field:=p; cur_input.index_field:=3;cur_input.loc_field:=p;end; {:325}{327:}procedure back_error;begin OK_to_interrupt:=false; back_input;OK_to_interrupt:=true;error;end;procedure ins_error; begin OK_to_interrupt:=false;back_input;cur_input.index_field:=4; OK_to_interrupt:=true;error;end; {:327}{328:}procedure begin_file_reading; begin if in_open=max_in_open then overflow(605,max_in_open); if first=buf_size then overflow(257,buf_size);in_open:=in_open+1; begin if input_ptr>max_in_stack then begin max_in_stack:=input_ptr; if input_ptr=stack_size then overflow(602,stack_size);end; input_stack[input_ptr]:=cur_input;input_ptr:=input_ptr+1;end; cur_input.index_field:=in_open;eof_seen[cur_input.index_field]:=false; grp_stack[cur_input.index_field]:=cur_boundary; if_stack[cur_input.index_field]:=cond_ptr; line_stack[cur_input.index_field]:=line;cur_input.start_field:=first; cur_input.state_field:=1;cur_input.name_field:=0;end; {:328}{329:}procedure end_file_reading; begin first:=cur_input.start_field; line:=line_stack[cur_input.index_field]; if(cur_input.name_field=18)or(cur_input.name_field=19)then pseudo_close else if cur_input.name_field>17 then a_close(input_file[cur_input. index_field]);begin input_ptr:=input_ptr-1; cur_input:=input_stack[input_ptr];end;in_open:=in_open-1;end; {:329}{330:}procedure clear_for_error_prompt; begin while(cur_input.state_field<>0)and(cur_input.name_field=0)and( input_ptr>0)and(cur_input.loc_field>cur_input.limit_field)do end_file_reading;print_ln;break_in(term_in,true);end; {:330}{336:}procedure check_outer_validity;var p:halfword;q:halfword; begin if scanner_status<>0 then begin deletions_allowed:=false; {337:}if cur_cs<>0 then begin if(cur_input.state_field=0)or(cur_input. name_field<1)or(cur_input.name_field>17)then begin p:=get_avail; mem[p].hh.lh:=4095+cur_cs;begin_token_list(p,3);end;cur_cmd:=10; cur_chr:=32;end{:337};if scanner_status>1 then{338:}begin runaway; if cur_cs=0 then begin if interaction=3 then;print_nl(263);print(613); end else begin cur_cs:=0;begin if interaction=3 then;print_nl(263); print(614);end;end;print(615);{339:}p:=get_avail; case scanner_status of 2:begin print(578);mem[p].hh.lh:=637;end; 3:begin print(621);mem[p].hh.lh:=par_token;long_state:=113;end; 4:begin print(580);mem[p].hh.lh:=637;q:=p;p:=get_avail;mem[p].hh.rh:=q; mem[p].hh.lh:=6710;align_state:=-1000000;end;5:begin print(581); mem[p].hh.lh:=637;end;end;begin_token_list(p,4){:339};print(616); sprint_cs(warning_index);begin help_ptr:=4;help_line[3]:=617; help_line[2]:=618;help_line[1]:=619;help_line[0]:=620;end;error; end{:338}else begin begin if interaction=3 then;print_nl(263); print(607);end;print_cmd_chr(105,cur_if);print(608); print_int(skip_line);begin help_ptr:=3;help_line[2]:=609; help_line[1]:=610;help_line[0]:=611;end; if cur_cs<>0 then cur_cs:=0 else help_line[2]:=612;cur_tok:=6713; ins_error;end;deletions_allowed:=true;end;end; {:336}{340:}procedure firm_up_the_line;forward; {:340}{341:}procedure get_next;label 20,25,21,26,40,10; var k:0..buf_size;t:halfword;cat:0..15;c,cc:ASCII_code;d:2..3; begin 20:cur_cs:=0; if cur_input.state_field<>0 then{343:}begin 25:if cur_input.loc_field<= cur_input.limit_field then begin cur_chr:=buffer[cur_input.loc_field]; cur_input.loc_field:=cur_input.loc_field+1; 21:cur_cmd:=eqtb[3988+cur_chr].hh.rh; {344:}case cur_input.state_field+cur_cmd of{345:}10,26,42,27,43{:345}: goto 25; 1,17,33:{354:}begin if cur_input.loc_field>cur_input.limit_field then cur_cs:=513 else begin 26:k:=cur_input.loc_field;cur_chr:=buffer[k]; cat:=eqtb[3988+cur_chr].hh.rh;k:=k+1; if cat=11 then cur_input.state_field:=17 else if cat=10 then cur_input. state_field:=17 else cur_input.state_field:=1; if(cat=11)and(k<=cur_input.limit_field)then{356:}begin repeat cur_chr:= buffer[k];cat:=eqtb[3988+cur_chr].hh.rh;k:=k+1; until(cat<>11)or(k>cur_input.limit_field); {355:}begin if buffer[k]=cur_chr then if cat=7 then if k=48)and(c<=57))or((c>=97)and(c<=102)))then if k+2<=cur_input. limit_field then begin cc:=buffer[k+2]; if(((cc>=48)and(cc<=57))or((cc>=97)and(cc<=102)))then d:=d+1;end; if d>2 then begin if c<=57 then cur_chr:=c-48 else cur_chr:=c-87; if cc<=57 then cur_chr:=16*cur_chr+cc-48 else cur_chr:=16*cur_chr+cc-87; buffer[k-1]:=cur_chr; end else if c<64 then buffer[k-1]:=c+64 else buffer[k-1]:=c-64; cur_input.limit_field:=cur_input.limit_field-d;first:=first-d; while k<=cur_input.limit_field do begin buffer[k]:=buffer[k+d];k:=k+1; end;goto 26;end;end;end{:355};if cat<>11 then k:=k-1; if k>cur_input.loc_field+1 then begin cur_cs:=id_lookup(cur_input. loc_field,k-cur_input.loc_field);cur_input.loc_field:=k;goto 40;end; end{:356}else{355:}begin if buffer[k]=cur_chr then if cat=7 then if k< cur_input.limit_field then begin c:=buffer[k+1]; if c<128 then begin d:=2; if(((c>=48)and(c<=57))or((c>=97)and(c<=102)))then if k+2<=cur_input. limit_field then begin cc:=buffer[k+2]; if(((cc>=48)and(cc<=57))or((cc>=97)and(cc<=102)))then d:=d+1;end; if d>2 then begin if c<=57 then cur_chr:=c-48 else cur_chr:=c-87; if cc<=57 then cur_chr:=16*cur_chr+cc-48 else cur_chr:=16*cur_chr+cc-87; buffer[k-1]:=cur_chr; end else if c<64 then buffer[k-1]:=c+64 else buffer[k-1]:=c-64; cur_input.limit_field:=cur_input.limit_field-d;first:=first-d; while k<=cur_input.limit_field do begin buffer[k]:=buffer[k+d];k:=k+1; end;goto 26;end;end;end{:355};cur_cs:=257+buffer[cur_input.loc_field]; cur_input.loc_field:=cur_input.loc_field+1;end; 40:cur_cmd:=eqtb[cur_cs].hh.b0;cur_chr:=eqtb[cur_cs].hh.rh; if cur_cmd>=113 then check_outer_validity;end{:354}; 14,30,46:{353:}begin cur_cs:=cur_chr+1;cur_cmd:=eqtb[cur_cs].hh.b0; cur_chr:=eqtb[cur_cs].hh.rh;cur_input.state_field:=1; if cur_cmd>=113 then check_outer_validity;end{:353}; 8,24,40:{352:}begin if cur_chr=buffer[cur_input.loc_field]then if cur_input.loc_field=48)and(c<=57))or((c>=97)and(c<=102)))then if cur_input.loc_field <=cur_input.limit_field then begin cc:=buffer[cur_input.loc_field]; if(((cc>=48)and(cc<=57))or((cc>=97)and(cc<=102)))then begin cur_input. loc_field:=cur_input.loc_field+1; if c<=57 then cur_chr:=c-48 else cur_chr:=c-87; if cc<=57 then cur_chr:=16*cur_chr+cc-48 else cur_chr:=16*cur_chr+cc-87; goto 21;end;end;if c<64 then cur_chr:=c+64 else cur_chr:=c-64;goto 21; end;end;cur_input.state_field:=1;end{:352}; 16,32,48:{346:}begin begin if interaction=3 then;print_nl(263); print(622);end;begin help_ptr:=2;help_line[1]:=623;help_line[0]:=624; end;deletions_allowed:=false;error;deletions_allowed:=true;goto 20; end{:346};{347:}11:{349:}begin cur_input.state_field:=17;cur_chr:=32; end{:349};6:{348:}begin cur_input.loc_field:=cur_input.limit_field+1; cur_cmd:=10;cur_chr:=32;end{:348}; 22,15,31,47:{350:}begin cur_input.loc_field:=cur_input.limit_field+1; goto 25;end{:350}; 38:{351:}begin cur_input.loc_field:=cur_input.limit_field+1; cur_cs:=par_loc;cur_cmd:=eqtb[cur_cs].hh.b0;cur_chr:=eqtb[cur_cs].hh.rh; if cur_cmd>=113 then check_outer_validity;end{:351}; 2:align_state:=align_state+1;18,34:begin cur_input.state_field:=1; align_state:=align_state+1;end;3:align_state:=align_state-1; 19,35:begin cur_input.state_field:=1;align_state:=align_state-1;end; 20,21,23,25,28,29,36,37,39,41,44,45:cur_input.state_field:=1; {:347}others:end{:344};end else begin cur_input.state_field:=33; {360:}if cur_input.name_field>17 then{362:}begin line:=line+1; first:=cur_input.start_field; if not force_eof then if cur_input.name_field<=19 then begin if pseudo_input then firm_up_the_line else if(eqtb[3422].hh.rh<>0)and not eof_seen[cur_input.index_field]then begin cur_input.limit_field:=first-1 ;eof_seen[cur_input.index_field]:=true; begin_token_list(eqtb[3422].hh.rh,15);goto 20;end else force_eof:=true; end else begin if input_ln(input_file[cur_input.index_field],true)then firm_up_the_line else if(eqtb[3422].hh.rh<>0)and not eof_seen[cur_input. index_field]then begin cur_input.limit_field:=first-1; eof_seen[cur_input.index_field]:=true; begin_token_list(eqtb[3422].hh.rh,15);goto 20;end else force_eof:=true; end; if force_eof then begin if eqtb[5327].int>0 then if(grp_stack[in_open]<> cur_boundary)or(if_stack[in_open]<>cond_ptr)then file_warning; if cur_input.name_field>=19 then begin print_char(41); open_parens:=open_parens-1;break(term_out);end;force_eof:=false; end_file_reading;check_outer_validity;goto 20;end; if(eqtb[5316].int<0)or(eqtb[5316].int>255)then cur_input.limit_field:= cur_input.limit_field-1 else buffer[cur_input.limit_field]:=eqtb[5316]. int;first:=cur_input.limit_field+1; cur_input.loc_field:=cur_input.start_field; end{:362}else begin if not(cur_input.name_field=0)then begin cur_cmd:=0; cur_chr:=0;goto 10;end;if input_ptr>0 then begin end_file_reading; goto 20;end;if selector<18 then open_log_file; if interaction>1 then begin if(eqtb[5316].int<0)or(eqtb[5316].int>255) then cur_input.limit_field:=cur_input.limit_field+1; if cur_input.limit_field=cur_input.start_field then print_nl(625); print_ln;first:=cur_input.start_field;begin;print(42);term_input;end; cur_input.limit_field:=last; if(eqtb[5316].int<0)or(eqtb[5316].int>255)then cur_input.limit_field:= cur_input.limit_field-1 else buffer[cur_input.limit_field]:=eqtb[5316]. int;first:=cur_input.limit_field+1; cur_input.loc_field:=cur_input.start_field;end else fatal_error(626); end{:360};begin if interrupt<>0 then pause_for_instructions;end;goto 25; end; end{:343}else{357:}if cur_input.loc_field<>0 then begin t:=mem[cur_input .loc_field].hh.lh;cur_input.loc_field:=mem[cur_input.loc_field].hh.rh; if t>=4095 then begin cur_cs:=t-4095;cur_cmd:=eqtb[cur_cs].hh.b0; cur_chr:=eqtb[cur_cs].hh.rh; if cur_cmd>=113 then if cur_cmd=116 then{358:}begin cur_cs:=mem[ cur_input.loc_field].hh.lh-4095;cur_input.loc_field:=0; cur_cmd:=eqtb[cur_cs].hh.b0;cur_chr:=eqtb[cur_cs].hh.rh; if cur_cmd>100 then begin cur_cmd:=0;cur_chr:=257;end; end{:358}else check_outer_validity;end else begin cur_cmd:=t div 256; cur_chr:=t mod 256;case cur_cmd of 1:align_state:=align_state+1; 2:align_state:=align_state-1; 5:{359:}begin begin_token_list(param_stack[cur_input.limit_field+cur_chr -1],0);goto 20;end{:359};others:end;end;end else begin end_token_list; goto 20;end{:357}; {342:}if cur_cmd<=5 then if cur_cmd>=4 then if align_state=0 then{789:} begin if(scanner_status=4)or(cur_align=0)then fatal_error(604); cur_cmd:=mem[cur_align+5].hh.lh;mem[cur_align+5].hh.lh:=cur_chr; if cur_cmd=63 then begin_token_list(29990,2)else begin_token_list(mem[ cur_align+2].int,2);align_state:=1000000;goto 20;end{:789}{:342};10:end; {:341}{363:}procedure firm_up_the_line;var k:0..buf_size; begin cur_input.limit_field:=last; if eqtb[5296].int>0 then if interaction>1 then begin;print_ln; if cur_input.start_fieldfirst then begin for k:=first to last-1 do buffer[k+cur_input. start_field-first]:=buffer[k]; cur_input.limit_field:=cur_input.start_field+last-first;end;end;end; {:363}{365:}procedure get_token;begin no_new_control_sequence:=false; get_next;no_new_control_sequence:=true; if cur_cs=0 then cur_tok:=(cur_cmd*256)+cur_chr else cur_tok:=4095+ cur_cs;end;{:365}{366:}{389:}procedure macro_call;label 10,22,30,31,40; var r:halfword;p:halfword;q:halfword;s:halfword;t:halfword;u,v:halfword; rbrace_ptr:halfword;n:small_number;unbalance:halfword;m:halfword; ref_count:halfword;save_scanner_status:small_number; save_warning_index:halfword;match_chr:ASCII_code; begin save_scanner_status:=scanner_status; save_warning_index:=warning_index;warning_index:=cur_cs; ref_count:=cur_chr;r:=mem[ref_count].hh.rh;n:=0; if eqtb[5298].int>0 then{401:}begin begin_diagnostic;print_ln; print_cs(warning_index);token_show(ref_count);end_diagnostic(false); end{:401};if mem[r].hh.lh=3585 then r:=mem[r].hh.rh; if mem[r].hh.lh<>3584 then{391:}begin scanner_status:=3;unbalance:=0; long_state:=eqtb[cur_cs].hh.b0; if long_state>=113 then long_state:=long_state-2; repeat mem[29997].hh.rh:=0; if(mem[r].hh.lh>3583)or(mem[r].hh.lh<3328)then s:=0 else begin match_chr :=mem[r].hh.lh-3328;s:=mem[r].hh.rh;r:=s;p:=29997;m:=0;end; {392:}22:get_token; if cur_tok=mem[r].hh.lh then{394:}begin r:=mem[r].hh.rh; if(mem[r].hh.lh>=3328)and(mem[r].hh.lh<=3584)then begin if cur_tok<512 then align_state:=align_state-1;goto 40;end else goto 22;end{:394}; {397:}if s<>r then if s=0 then{398:}begin begin if interaction=3 then; print_nl(263);print(659);end;sprint_cs(warning_index);print(660); begin help_ptr:=4;help_line[3]:=661;help_line[2]:=662;help_line[1]:=663; help_line[0]:=664;end;error;goto 10;end{:398}else begin t:=s; repeat begin q:=get_avail;mem[p].hh.rh:=q;mem[q].hh.lh:=mem[t].hh.lh; p:=q;end;m:=m+1;u:=mem[t].hh.rh;v:=s; while true do begin if u=r then if cur_tok<>mem[v].hh.lh then goto 30 else begin r:=mem[v].hh.rh;goto 22;end; if mem[u].hh.lh<>mem[v].hh.lh then goto 30;u:=mem[u].hh.rh; v:=mem[v].hh.rh;end;30:t:=mem[t].hh.rh;until t=r;r:=s;end{:397}; if cur_tok=par_token then if long_state<>112 then{396:}begin if long_state=111 then begin runaway;begin if interaction=3 then; print_nl(263);print(654);end;sprint_cs(warning_index);print(655); begin help_ptr:=3;help_line[2]:=656;help_line[1]:=657;help_line[0]:=658; end;back_error;end;pstack[n]:=mem[29997].hh.rh; align_state:=align_state-unbalance; for m:=0 to n do flush_list(pstack[m]);goto 10;end{:396}; if cur_tok<768 then if cur_tok<512 then{399:}begin unbalance:=1; while true do begin begin begin q:=avail; if q=0 then q:=get_avail else begin avail:=mem[q].hh.rh;mem[q].hh.rh:=0; {dyn_used:=dyn_used+1;}end;end;mem[p].hh.rh:=q;mem[q].hh.lh:=cur_tok; p:=q;end;get_token; if cur_tok=par_token then if long_state<>112 then{396:}begin if long_state=111 then begin runaway;begin if interaction=3 then; print_nl(263);print(654);end;sprint_cs(warning_index);print(655); begin help_ptr:=3;help_line[2]:=656;help_line[1]:=657;help_line[0]:=658; end;back_error;end;pstack[n]:=mem[29997].hh.rh; align_state:=align_state-unbalance; for m:=0 to n do flush_list(pstack[m]);goto 10;end{:396}; if cur_tok<768 then if cur_tok<512 then unbalance:=unbalance+1 else begin unbalance:=unbalance-1;if unbalance=0 then goto 31;end;end; 31:rbrace_ptr:=p;begin q:=get_avail;mem[p].hh.rh:=q; mem[q].hh.lh:=cur_tok;p:=q;end;end{:399}else{395:}begin back_input; begin if interaction=3 then;print_nl(263);print(646);end; sprint_cs(warning_index);print(647);begin help_ptr:=6;help_line[5]:=648; help_line[4]:=649;help_line[3]:=650;help_line[2]:=651;help_line[1]:=652; help_line[0]:=653;end;align_state:=align_state+1;long_state:=111; cur_tok:=par_token;ins_error;goto 22; end{:395}else{393:}begin if cur_tok=2592 then if mem[r].hh.lh<=3584 then if mem[r].hh.lh>=3328 then goto 22;begin q:=get_avail;mem[p].hh.rh:=q; mem[q].hh.lh:=cur_tok;p:=q;end;end{:393};m:=m+1; if mem[r].hh.lh>3584 then goto 22;if mem[r].hh.lh<3328 then goto 22; 40:if s<>0 then{400:}begin if(m=1)and(mem[p].hh.lh<768)then begin mem[ rbrace_ptr].hh.rh:=0;begin mem[p].hh.rh:=avail;avail:=p; {dyn_used:=dyn_used-1;}end;p:=mem[29997].hh.rh;pstack[n]:=mem[p].hh.rh; begin mem[p].hh.rh:=avail;avail:=p;{dyn_used:=dyn_used-1;}end; end else pstack[n]:=mem[29997].hh.rh;n:=n+1; if eqtb[5298].int>0 then begin begin_diagnostic;print_nl(match_chr); print_int(n);print(665);show_token_list(pstack[n-1],0,1000); end_diagnostic(false);end;end{:400}{:392};until mem[r].hh.lh=3584; end{:391}; {390:}while(cur_input.state_field=0)and(cur_input.loc_field=0)and( cur_input.index_field<>2)do end_token_list; begin_token_list(ref_count,5);cur_input.name_field:=warning_index; cur_input.loc_field:=mem[r].hh.rh; if n>0 then begin if param_ptr+n>max_param_stack then begin max_param_stack:=param_ptr+n; if max_param_stack>param_size then overflow(645,param_size);end; for m:=0 to n-1 do param_stack[param_ptr+m]:=pstack[m]; param_ptr:=param_ptr+n;end{:390};10:scanner_status:=save_scanner_status; warning_index:=save_warning_index;end; {:389}{379:}procedure insert_relax;begin cur_tok:=4095+cur_cs; back_input;cur_tok:=6716;back_input;cur_input.index_field:=4;end; {:379}{1487:}procedure pseudo_start;forward; {:1487}{1545:}procedure scan_register_num;forward; {:1545}{1550:}procedure new_index(i:quarterword;q:halfword); var k:small_number;begin cur_ptr:=get_node(9);mem[cur_ptr].hh.b0:=i; mem[cur_ptr].hh.b1:=0;mem[cur_ptr].hh.rh:=q; for k:=1 to 8 do mem[cur_ptr+k]:=sa_null;end; {:1550}{1554:}procedure find_sa_element(t:small_number;n:halfword; w:boolean);label 45,46,47,48,49,10;var q:halfword;i:small_number; begin cur_ptr:=sa_root[t]; begin if cur_ptr=0 then if w then goto 45 else goto 10;end;q:=cur_ptr; i:=n div 4096; if odd(i)then cur_ptr:=mem[q+(i div 2)+1].hh.rh else cur_ptr:=mem[q+(i div 2)+1].hh.lh;begin if cur_ptr=0 then if w then goto 46 else goto 10; end;q:=cur_ptr;i:=(n div 256)mod 16; if odd(i)then cur_ptr:=mem[q+(i div 2)+1].hh.rh else cur_ptr:=mem[q+(i div 2)+1].hh.lh;begin if cur_ptr=0 then if w then goto 47 else goto 10; end;q:=cur_ptr;i:=(n div 16)mod 16; if odd(i)then cur_ptr:=mem[q+(i div 2)+1].hh.rh else cur_ptr:=mem[q+(i div 2)+1].hh.lh;begin if cur_ptr=0 then if w then goto 48 else goto 10; end;q:=cur_ptr;i:=n mod 16; if odd(i)then cur_ptr:=mem[q+(i div 2)+1].hh.rh else cur_ptr:=mem[q+(i div 2)+1].hh.lh;if(cur_ptr=0)and w then goto 49;goto 10; 45:new_index(t,0);sa_root[t]:=cur_ptr;q:=cur_ptr;i:=n div 4096; 46:new_index(i,q); begin if odd(i)then mem[q+(i div 2)+1].hh.rh:=cur_ptr else mem[q+(i div 2)+1].hh.lh:=cur_ptr;mem[q].hh.b1:=mem[q].hh.b1+1;end;q:=cur_ptr; i:=(n div 256)mod 16;47:new_index(i,q); begin if odd(i)then mem[q+(i div 2)+1].hh.rh:=cur_ptr else mem[q+(i div 2)+1].hh.lh:=cur_ptr;mem[q].hh.b1:=mem[q].hh.b1+1;end;q:=cur_ptr; i:=(n div 16)mod 16;48:new_index(i,q); begin if odd(i)then mem[q+(i div 2)+1].hh.rh:=cur_ptr else mem[q+(i div 2)+1].hh.lh:=cur_ptr;mem[q].hh.b1:=mem[q].hh.b1+1;end;q:=cur_ptr; i:=n mod 16;49:{1555:}if t=6 then begin cur_ptr:=get_node(4); mem[cur_ptr+1]:=sa_null;mem[cur_ptr+2]:=sa_null;mem[cur_ptr+3]:=sa_null; end else begin if t<=1 then begin cur_ptr:=get_node(3); mem[cur_ptr+2].int:=0;mem[cur_ptr+1].hh.rh:=n; end else begin cur_ptr:=get_node(2); if t<=3 then begin mem[cur_ptr+1].hh.rh:=0;mem[0].hh.rh:=mem[0].hh.rh+1; end else mem[cur_ptr+1].hh.rh:=0;end;mem[cur_ptr+1].hh.lh:=0;end; mem[cur_ptr].hh.b0:=16*t+i;mem[cur_ptr].hh.b1:=1{:1555}; mem[cur_ptr].hh.rh:=q; begin if odd(i)then mem[q+(i div 2)+1].hh.rh:=cur_ptr else mem[q+(i div 2)+1].hh.lh:=cur_ptr;mem[q].hh.b1:=mem[q].hh.b1+1;end;10:end; {:1554}procedure pass_text;forward;procedure start_input;forward; procedure conditional;forward;procedure get_x_token;forward; procedure conv_toks;forward;procedure ins_the_toks;forward; procedure expand;label 21;var t:halfword;p,q,r:halfword;j:0..buf_size; cv_backup:integer;cvl_backup,radix_backup,co_backup:small_number; backup_backup:halfword;save_scanner_status:small_number; begin cv_backup:=cur_val;cvl_backup:=cur_val_level;radix_backup:=radix; co_backup:=cur_order;backup_backup:=mem[29987].hh.rh; 21:if cur_cmd<111 then{367:}begin if eqtb[5304].int>1 then show_cur_cmd_chr;case cur_cmd of 110:{386:}begin t:=cur_chr mod 5; if cur_chr>=5 then scan_register_num else cur_val:=0; if cur_val=0 then cur_ptr:=cur_mark[t]else{1559:}begin find_sa_element(6 ,cur_val,false); if cur_ptr<>0 then if odd(t)then cur_ptr:=mem[cur_ptr+(t div 2)+1].hh.rh else cur_ptr:=mem[cur_ptr+(t div 2)+1].hh.lh;end{:1559}; if cur_ptr<>0 then begin_token_list(cur_ptr,14);end{:386}; 102:if cur_chr=0 then{368:}begin get_token;t:=cur_tok;get_token; if cur_cmd>100 then expand else back_input;cur_tok:=t;back_input; end{:368}else{1500:}begin get_token; if(cur_cmd=105)and(cur_chr<>16)then begin cur_chr:=cur_chr+32;goto 21; end;begin if interaction=3 then;print_nl(263);print(694);end; print_esc(784);print(1385);print_cmd_chr(cur_cmd,cur_chr); print_char(39);begin help_ptr:=1;help_line[0]:=624;end;back_error; end{:1500};103:{369:}begin save_scanner_status:=scanner_status; scanner_status:=0;get_token;scanner_status:=save_scanner_status; t:=cur_tok;back_input;if t>=4095 then begin p:=get_avail; mem[p].hh.lh:=6718;mem[p].hh.rh:=cur_input.loc_field; cur_input.start_field:=p;cur_input.loc_field:=p;end;end{:369}; 107:{372:}begin r:=get_avail;p:=r;repeat get_x_token; if cur_cs=0 then begin q:=get_avail;mem[p].hh.rh:=q; mem[q].hh.lh:=cur_tok;p:=q;end;until cur_cs<>0; if cur_cmd<>67 then{373:}begin begin if interaction=3 then; print_nl(263);print(634);end;print_esc(508);print(635); begin help_ptr:=2;help_line[1]:=636;help_line[0]:=637;end;back_error; end{:373};{374:}j:=first;p:=mem[r].hh.rh; while p<>0 do begin if j>=max_buf_stack then begin max_buf_stack:=j+1; if max_buf_stack=buf_size then overflow(257,buf_size);end; buffer[j]:=mem[p].hh.lh mod 256;j:=j+1;p:=mem[p].hh.rh;end; if j>first+1 then begin no_new_control_sequence:=false; cur_cs:=id_lookup(first,j-first);no_new_control_sequence:=true; end else if j=first then cur_cs:=513 else cur_cs:=257+buffer[first] {:374};flush_list(r); if eqtb[cur_cs].hh.b0=101 then begin eq_define(cur_cs,0,256);end; cur_tok:=cur_cs+4095;back_input;end{:372};108:conv_toks; 109:ins_the_toks;105:conditional; 106:{510:}begin if eqtb[5325].int>0 then if eqtb[5304].int<=1 then show_cur_cmd_chr; if cur_chr>if_limit then if if_limit=1 then insert_relax else begin begin if interaction=3 then;print_nl(263);print(788);end; print_cmd_chr(106,cur_chr);begin help_ptr:=1;help_line[0]:=789;end; error;end else begin while cur_chr<>2 do pass_text; {496:}begin if if_stack[in_open]=cond_ptr then if_warning;p:=cond_ptr; if_line:=mem[p+1].int;cur_if:=mem[p].hh.b1;if_limit:=mem[p].hh.b0; cond_ptr:=mem[p].hh.rh;free_node(p,2);end{:496};end;end{:510}; 104:{378:}if cur_chr=1 then force_eof:=true{1484:}else if cur_chr=2 then pseudo_start{:1484}else if name_in_progress then insert_relax else start_input{:378};others:{370:}begin begin if interaction=3 then; print_nl(263);print(628);end;begin help_ptr:=5;help_line[4]:=629; help_line[3]:=630;help_line[2]:=631;help_line[1]:=632;help_line[0]:=633; end;error;end{:370}end; end{:367}else if cur_cmd<115 then macro_call else{375:}begin cur_tok:= 6715;back_input;end{:375};cur_val:=cv_backup;cur_val_level:=cvl_backup; radix:=radix_backup;cur_order:=co_backup; mem[29987].hh.rh:=backup_backup;end;{:366}{380:}procedure get_x_token; label 20,30;begin 20:get_next;if cur_cmd<=100 then goto 30; if cur_cmd>=111 then if cur_cmd<115 then macro_call else begin cur_cs:= 2620;cur_cmd:=9;goto 30;end else expand;goto 20; 30:if cur_cs=0 then cur_tok:=(cur_cmd*256)+cur_chr else cur_tok:=4095+ cur_cs;end;{:380}{381:}procedure x_token; begin while cur_cmd>100 do begin expand;get_next;end; if cur_cs=0 then cur_tok:=(cur_cmd*256)+cur_chr else cur_tok:=4095+ cur_cs;end;{:381}{403:}procedure scan_left_brace; begin{404:}repeat get_x_token;until(cur_cmd<>10)and(cur_cmd<>0){:404}; if cur_cmd<>1 then begin begin if interaction=3 then;print_nl(263); print(666);end;begin help_ptr:=4;help_line[3]:=667;help_line[2]:=668; help_line[1]:=669;help_line[0]:=670;end;back_error;cur_tok:=379; cur_cmd:=1;cur_chr:=123;align_state:=align_state+1;end;end; {:403}{405:}procedure scan_optional_equals; begin{406:}repeat get_x_token;until cur_cmd<>10{:406}; if cur_tok<>3133 then back_input;end; {:405}{407:}function scan_keyword(s:str_number):boolean;label 10; var p:halfword;q:halfword;k:pool_pointer;begin p:=29987;mem[p].hh.rh:=0; k:=str_start[s];while k10)or(p<>29987)then begin back_input; if p<>29987 then begin_token_list(mem[29987].hh.rh,3); scan_keyword:=false;goto 10;end;end;flush_list(mem[29987].hh.rh); scan_keyword:=true;10:end;{:407}{408:}procedure mu_error; begin begin if interaction=3 then;print_nl(263);print(671);end; begin help_ptr:=1;help_line[0]:=672;end;error;end; {:408}{409:}procedure scan_int;forward; {433:}procedure scan_eight_bit_int;begin scan_int; if(cur_val<0)or(cur_val>255)then begin begin if interaction=3 then; print_nl(263);print(696);end;begin help_ptr:=2;help_line[1]:=697; help_line[0]:=698;end;int_error(cur_val);cur_val:=0;end;end; {:433}{434:}procedure scan_char_num;begin scan_int; if(cur_val<0)or(cur_val>255)then begin begin if interaction=3 then; print_nl(263);print(699);end;begin help_ptr:=2;help_line[1]:=700; help_line[0]:=698;end;int_error(cur_val);cur_val:=0;end;end; {:434}{435:}procedure scan_four_bit_int;begin scan_int; if(cur_val<0)or(cur_val>15)then begin begin if interaction=3 then; print_nl(263);print(701);end;begin help_ptr:=2;help_line[1]:=702; help_line[0]:=698;end;int_error(cur_val);cur_val:=0;end;end; {:435}{436:}procedure scan_fifteen_bit_int;begin scan_int; if(cur_val<0)or(cur_val>32767)then begin begin if interaction=3 then; print_nl(263);print(703);end;begin help_ptr:=2;help_line[1]:=704; help_line[0]:=698;end;int_error(cur_val);cur_val:=0;end;end; {:436}{437:}procedure scan_twenty_seven_bit_int;begin scan_int; if(cur_val<0)or(cur_val>134217727)then begin begin if interaction=3 then ;print_nl(263);print(705);end;begin help_ptr:=2;help_line[1]:=706; help_line[0]:=698;end;int_error(cur_val);cur_val:=0;end;end; {:437}{1546:}procedure scan_register_num;begin scan_int; if(cur_val<0)or(cur_val>max_reg_num)then begin begin if interaction=3 then;print_nl(263);print(696);end;begin help_ptr:=2; help_line[1]:=max_reg_help_line;help_line[0]:=698;end; int_error(cur_val);cur_val:=0;end;end; {:1546}{1413:}procedure scan_general_text;forward; {:1413}{1507:}procedure get_x_or_protected;label 10; begin while true do begin get_token;if cur_cmd<=100 then goto 10; if(cur_cmd>=111)and(cur_cmd<115)then if mem[mem[cur_chr].hh.rh].hh.lh= 3585 then goto 10;expand;end;10:end;{:1507}{1516:}procedure scan_expr; forward;{:1516}{1521:}procedure scan_normal_glue;forward; procedure scan_mu_glue;forward;{:1521}{577:}procedure scan_font_ident; var f:internal_font_number;m:halfword;begin{406:}repeat get_x_token; until cur_cmd<>10{:406}; if cur_cmd=88 then f:=eqtb[3939].hh.rh else if cur_cmd=87 then f:= cur_chr else if cur_cmd=86 then begin m:=cur_chr;scan_four_bit_int; f:=eqtb[m+cur_val].hh.rh;end else begin begin if interaction=3 then; print_nl(263);print(828);end;begin help_ptr:=2;help_line[1]:=829; help_line[0]:=830;end;back_error;f:=0;end;cur_val:=f;end; {:577}{578:}procedure find_font_dimen(writing:boolean); var f:internal_font_number;n:integer;begin scan_int;n:=cur_val; scan_font_ident;f:=cur_val; if n<=0 then cur_val:=fmem_ptr else begin if writing and(n<=4)and(n>=2) and(font_glue[f]<>0)then begin delete_glue_ref(font_glue[f]); font_glue[f]:=0;end; if n>font_params[f]then if f5 then begin begin if interaction=3 then; print_nl(263);print(673);end;begin help_ptr:=3;help_line[2]:=674; help_line[1]:=675;help_line[0]:=676;end;back_error;begin cur_val:=0; cur_val_level:=1;end; end else if cur_cmd<=72 then begin if cur_cmd<72 then if m=0 then begin scan_register_num; if cur_val<256 then cur_val:=eqtb[3423+cur_val].hh.rh else begin find_sa_element(5,cur_val,false); if cur_ptr=0 then cur_val:=0 else cur_val:=mem[cur_ptr+1].hh.rh;end; end else cur_val:=mem[m+1].hh.rh else cur_val:=eqtb[m].hh.rh; cur_val_level:=5;end else begin back_input;scan_font_ident; begin cur_val:=2624+cur_val;cur_val_level:=4;end;end{:415}; 73:begin cur_val:=eqtb[m].int;cur_val_level:=0;end; 74:begin cur_val:=eqtb[m].int;cur_val_level:=1;end; 75:begin cur_val:=eqtb[m].hh.rh;cur_val_level:=2;end; 76:begin cur_val:=eqtb[m].hh.rh;cur_val_level:=3;end; 79:{418:}if abs(cur_list.mode_field)<>m then begin begin if interaction= 3 then;print_nl(263);print(689);end;print_cmd_chr(79,m); begin help_ptr:=4;help_line[3]:=690;help_line[2]:=691;help_line[1]:=692; help_line[0]:=693;end;error;if level<>5 then begin cur_val:=0; cur_val_level:=1;end else begin cur_val:=0;cur_val_level:=0;end; end else if m=1 then begin cur_val:=cur_list.aux_field.int; cur_val_level:=1;end else begin cur_val:=cur_list.aux_field.hh.lh; cur_val_level:=0;end{:418}; 80:{422:}if cur_list.mode_field=0 then begin cur_val:=0; cur_val_level:=0;end else begin nest[nest_ptr]:=cur_list;p:=nest_ptr; while abs(nest[p].mode_field)<>1 do p:=p-1; begin cur_val:=nest[p].pg_field;cur_val_level:=0;end;end{:422}; 82:{419:}begin if m=0 then cur_val:=dead_cycles{1425:}else if m=2 then cur_val:=interaction{:1425}else cur_val:=insert_penalties; cur_val_level:=0;end{:419}; 81:{421:}begin if(page_contents=0)and(not output_active)then if m=0 then cur_val:=1073741823 else cur_val:=0 else cur_val:=page_so_far[m]; cur_val_level:=1;end{:421}; 84:{423:}begin if m>3412 then{1601:}begin scan_int; if(eqtb[m].hh.rh=0)or(cur_val<0)then cur_val:=0 else begin if cur_val> mem[eqtb[m].hh.rh+1].int then cur_val:=mem[eqtb[m].hh.rh+1].int; cur_val:=mem[eqtb[m].hh.rh+cur_val+1].int;end; end{:1601}else if eqtb[3412].hh.rh=0 then cur_val:=0 else cur_val:=mem[ eqtb[3412].hh.rh].hh.lh;cur_val_level:=0;end{:423}; 83:{420:}begin scan_register_num; if cur_val<256 then q:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then q:=0 else q:=mem[cur_ptr+1].hh.rh;end; if q=0 then cur_val:=0 else cur_val:=mem[q+m].int;cur_val_level:=1; end{:420};68,69:begin cur_val:=cur_chr;cur_val_level:=0;end; 77:{425:}begin find_font_dimen(false);font_info[fmem_ptr].int:=0; begin cur_val:=font_info[cur_val].int;cur_val_level:=1;end;end{:425}; 78:{426:}begin scan_font_ident; if m=0 then begin cur_val:=hyphen_char[cur_val];cur_val_level:=0; end else begin cur_val:=skew_char[cur_val];cur_val_level:=0;end; end{:426}; 89:{427:}begin if(m<0)or(m>19)then begin cur_val_level:=(mem[m].hh.b0 div 16); if cur_val_level<2 then cur_val:=mem[m+2].int else cur_val:=mem[m+1].hh. rh;end else begin scan_register_num;cur_val_level:=m-0; if cur_val>255 then begin find_sa_element(cur_val_level,cur_val,false); if cur_ptr=0 then if cur_val_level<2 then cur_val:=0 else cur_val:=0 else if cur_val_level<2 then cur_val:=mem[cur_ptr+2].int else cur_val:= mem[cur_ptr+1].hh.rh; end else case cur_val_level of 0:cur_val:=eqtb[5333+cur_val].int; 1:cur_val:=eqtb[5866+cur_val].int;2:cur_val:=eqtb[2900+cur_val].hh.rh; 3:cur_val:=eqtb[3156+cur_val].hh.rh;end;end;end{:427}; 70:{424:}if m>=4 then if m>=23 then{1515:}begin if m<24 then begin case m of{1542:}23:scan_mu_glue;{:1542}end;cur_val_level:=2; end else if m<25 then begin case m of{1543:}24:scan_normal_glue; {:1543}end;cur_val_level:=3;end else begin cur_val_level:=m-25; scan_expr;end; while cur_val_level>level do begin if cur_val_level=2 then begin m:= cur_val;cur_val:=mem[m+1].int;delete_glue_ref(m); end else if cur_val_level=3 then mu_error; cur_val_level:=cur_val_level-1;end; if negative then if cur_val_level>=2 then begin m:=cur_val; cur_val:=new_spec(m);delete_glue_ref(m); {431:}begin mem[cur_val+1].int:=-mem[cur_val+1].int; mem[cur_val+2].int:=-mem[cur_val+2].int; mem[cur_val+3].int:=-mem[cur_val+3].int;end{:431}; end else cur_val:=-cur_val;goto 10; end{:1515}else if m>=14 then begin case m of{1402:}14,15,16,17:begin scan_font_ident;q:=cur_val;scan_char_num; if(font_bc[q]<=cur_val)and(font_ec[q]>=cur_val)then begin i:=font_info[ char_base[q]+cur_val+0].qqqq; case m of 14:cur_val:=font_info[width_base[q]+i.b0].int; 15:cur_val:=font_info[height_base[q]+(i.b1-0)div 16].int; 16:cur_val:=font_info[depth_base[q]+(i.b1-0)mod 16].int; 17:cur_val:=font_info[italic_base[q]+(i.b2-0)div 4].int;end; end else cur_val:=0;end;{:1402}{1405:}18,19,20:begin q:=cur_chr-18; scan_int; if(eqtb[3412].hh.rh=0)or(cur_val<=0)then cur_val:=0 else begin if q=2 then begin q:=cur_val mod 2;cur_val:=(cur_val+q)div 2;end; if cur_val>mem[eqtb[3412].hh.rh].hh.lh then cur_val:=mem[eqtb[3412].hh. rh].hh.lh;cur_val:=mem[eqtb[3412].hh.rh+2*cur_val-q].int;end; cur_val_level:=1;end;{:1405}{1539:}21,22:begin scan_normal_glue; q:=cur_val; if m=21 then cur_val:=mem[q+2].int else cur_val:=mem[q+3].int; delete_glue_ref(q);end;{:1539}end;cur_val_level:=1; end else begin case m of 4:cur_val:=line;5:cur_val:=last_badness; {1382:}6:cur_val:=2;{:1382}{1396:}7:cur_val:=cur_level-1; 8:cur_val:=cur_group;{:1396}{1399:}9:begin q:=cond_ptr;cur_val:=0; while q<>0 do begin cur_val:=cur_val+1;q:=mem[q].hh.rh;end;end; 10:if cond_ptr=0 then cur_val:=0 else if cur_if<32 then cur_val:=cur_if +1 else cur_val:=-(cur_if-31); 11:if(if_limit=4)or(if_limit=3)then cur_val:=1 else if if_limit=2 then cur_val:=-1 else cur_val:=0;{:1399}{1538:}12,13:begin scan_normal_glue; q:=cur_val; if m=12 then cur_val:=mem[q].hh.b0 else cur_val:=mem[q].hh.b1; delete_glue_ref(q);end;{:1538}end;cur_val_level:=0; end else begin if cur_chr=2 then cur_val:=0 else cur_val:=0; tx:=cur_list.tail_field; if not(tx>=hi_mem_min)then if(mem[tx].hh.b0=9)and(mem[tx].hh.b1=3)then begin r:=cur_list.head_field;repeat q:=r;r:=mem[q].hh.rh;until r=tx; tx:=q;end;if cur_chr=3 then begin cur_val_level:=0; if(tx=cur_list.head_field)or(cur_list.mode_field=0)then cur_val:=-1; end else cur_val_level:=cur_chr; if not(tx>=hi_mem_min)and(cur_list.mode_field<>0)then case cur_chr of 0: if mem[tx].hh.b0=12 then cur_val:=mem[tx+1].int; 1:if mem[tx].hh.b0=11 then cur_val:=mem[tx+1].int; 2:if mem[tx].hh.b0=10 then begin cur_val:=mem[tx+1].hh.lh; if mem[tx].hh.b1=99 then cur_val_level:=3;end; 3:if mem[tx].hh.b0<=13 then cur_val:=mem[tx].hh.b0+1 else cur_val:=15; end else if(cur_list.mode_field=1)and(tx=cur_list.head_field)then case cur_chr of 0:cur_val:=last_penalty;1:cur_val:=last_kern; 2:if last_glue<>65535 then cur_val:=last_glue;3:cur_val:=last_node_type; end;end{:424};others:{428:}begin begin if interaction=3 then; print_nl(263);print(694);end;print_cmd_chr(cur_cmd,cur_chr);print(695); print_esc(541);begin help_ptr:=1;help_line[0]:=693;end;error; if level<>5 then begin cur_val:=0;cur_val_level:=1; end else begin cur_val:=0;cur_val_level:=0;end;end{:428}end; while cur_val_level>level do{429:}begin if cur_val_level=2 then cur_val :=mem[cur_val+1].int else if cur_val_level=3 then mu_error; cur_val_level:=cur_val_level-1;end{:429}; {430:}if negative then if cur_val_level>=2 then begin cur_val:=new_spec( cur_val);{431:}begin mem[cur_val+1].int:=-mem[cur_val+1].int; mem[cur_val+2].int:=-mem[cur_val+2].int; mem[cur_val+3].int:=-mem[cur_val+3].int;end{:431}; end else cur_val:=-cur_val else if(cur_val_level>=2)and(cur_val_level<=3 )then mem[cur_val].hh.rh:=mem[cur_val].hh.rh+1{:430};10:end; {:413}{440:}procedure scan_int;label 30;var negative:boolean;m:integer; d:small_number;vacuous:boolean;OK_so_far:boolean;begin radix:=0; OK_so_far:=true;{441:}negative:=false;repeat{406:}repeat get_x_token; until cur_cmd<>10{:406}; if cur_tok=3117 then begin negative:=not negative;cur_tok:=3115;end; until cur_tok<>3115{:441};if cur_tok=3168 then{442:}begin get_token; if cur_tok<4095 then begin cur_val:=cur_chr; if cur_cmd<=2 then if cur_cmd=2 then align_state:=align_state+1 else align_state:=align_state-1; end else if cur_tok<4352 then cur_val:=cur_tok-4096 else cur_val:= cur_tok-4352;if cur_val>255 then begin begin if interaction=3 then; print_nl(263);print(707);end;begin help_ptr:=2;help_line[1]:=708; help_line[0]:=709;end;cur_val:=48;back_error; end else{443:}begin get_x_token;if cur_cmd<>10 then back_input; end{:443};end{:442}else if(cur_cmd>=68)and(cur_cmd<=89)then scan_something_internal(0,false)else{444:}begin radix:=10;m:=214748364; if cur_tok=3111 then begin radix:=8;m:=268435456;get_x_token; end else if cur_tok=3106 then begin radix:=16;m:=134217728;get_x_token; end;vacuous:=true;cur_val:=0; {445:}while true do begin if(cur_tok<3120+radix)and(cur_tok>=3120)and( cur_tok<=3129)then d:=cur_tok-3120 else if radix=16 then if(cur_tok<= 2886)and(cur_tok>=2881)then d:=cur_tok-2871 else if(cur_tok<=3142)and( cur_tok>=3137)then d:=cur_tok-3127 else goto 30 else goto 30; vacuous:=false; if(cur_val>=m)and((cur_val>m)or(d>7)or(radix<>10))then begin if OK_so_far then begin begin if interaction=3 then;print_nl(263); print(710);end;begin help_ptr:=2;help_line[1]:=711;help_line[0]:=712; end;error;cur_val:=2147483647;OK_so_far:=false;end; end else cur_val:=cur_val*radix+d;get_x_token;end;30:{:445}; if vacuous then{446:}begin begin if interaction=3 then;print_nl(263); print(673);end;begin help_ptr:=3;help_line[2]:=674;help_line[1]:=675; help_line[0]:=676;end;back_error; end{:446}else if cur_cmd<>10 then back_input;end{:444}; if negative then cur_val:=-cur_val;end; {:440}{448:}procedure scan_dimen(mu,inf,shortcut:boolean); label 30,31,32,40,45,88,89;var negative:boolean;f:integer; {450:}num,denom:1..65536;k,kk:small_number;p,q:halfword;v:scaled; save_cur_val:integer;{:450}begin f:=0;arith_error:=false;cur_order:=0; negative:=false;if not shortcut then begin{441:}negative:=false; repeat{406:}repeat get_x_token;until cur_cmd<>10{:406}; if cur_tok=3117 then begin negative:=not negative;cur_tok:=3115;end; until cur_tok<>3115{:441}; if(cur_cmd>=68)and(cur_cmd<=89)then{449:}if mu then begin scan_something_internal(3,false); {451:}if cur_val_level>=2 then begin v:=mem[cur_val+1].int; delete_glue_ref(cur_val);cur_val:=v;end{:451}; if cur_val_level=3 then goto 89;if cur_val_level<>0 then mu_error; end else begin scan_something_internal(1,false); if cur_val_level=1 then goto 89;end{:449}else begin back_input; if cur_tok=3116 then cur_tok:=3118; if cur_tok<>3118 then scan_int else begin radix:=10;cur_val:=0;end; if cur_tok=3116 then cur_tok:=3118; if(radix=10)and(cur_tok=3118)then{452:}begin k:=0;p:=0;get_token; while true do begin get_x_token; if(cur_tok>3129)or(cur_tok<3120)then goto 31; if k<17 then begin q:=get_avail;mem[q].hh.rh:=p; mem[q].hh.lh:=cur_tok-3120;p:=q;k:=k+1;end;end; 31:for kk:=k downto 1 do begin dig[kk-1]:=mem[p].hh.lh;q:=p; p:=mem[p].hh.rh;begin mem[q].hh.rh:=avail;avail:=q; {dyn_used:=dyn_used-1;}end;end;f:=round_decimals(k); if cur_cmd<>10 then back_input;end{:452};end;end; if cur_val<0 then begin negative:=not negative;cur_val:=-cur_val;end; {453:}if inf then{454:}if scan_keyword(312)then begin cur_order:=1; while scan_keyword(108)do begin if cur_order=3 then begin begin if interaction=3 then;print_nl(263);print(714);end;print(715); begin help_ptr:=1;help_line[0]:=716;end;error; end else cur_order:=cur_order+1;end;goto 88;end{:454}; {455:}save_cur_val:=cur_val;{406:}repeat get_x_token; until cur_cmd<>10{:406}; if(cur_cmd<68)or(cur_cmd>89)then back_input else begin if mu then begin scan_something_internal(3,false); {451:}if cur_val_level>=2 then begin v:=mem[cur_val+1].int; delete_glue_ref(cur_val);cur_val:=v;end{:451}; if cur_val_level<>3 then mu_error; end else scan_something_internal(1,false);v:=cur_val;goto 40;end; if mu then goto 45; if scan_keyword(717)then v:=({558:}font_info[6+param_base[eqtb[3939].hh. rh]].int{:558})else if scan_keyword(718)then v:=({559:}font_info[5+ param_base[eqtb[3939].hh.rh]].int{:559})else goto 45; {443:}begin get_x_token;if cur_cmd<>10 then back_input;end{:443}; 40:cur_val:=mult_and_add(save_cur_val,v,xn_over_d(v,f,65536),1073741823) ;goto 89;45:{:455}; if mu then{456:}if scan_keyword(338)then goto 88 else begin begin if interaction=3 then;print_nl(263);print(714);end;print(719); begin help_ptr:=4;help_line[3]:=720;help_line[2]:=721;help_line[1]:=722; help_line[0]:=723;end;error;goto 88;end{:456}; if scan_keyword(713)then{457:}begin prepare_mag; if eqtb[5285].int<>1000 then begin cur_val:=xn_over_d(cur_val,1000,eqtb[ 5285].int);f:=(1000*f+65536*remainder)div eqtb[5285].int; cur_val:=cur_val+(f div 65536);f:=f mod 65536;end;end{:457}; if scan_keyword(400)then goto 88; {458:}if scan_keyword(724)then begin num:=7227;denom:=100; end else if scan_keyword(725)then begin num:=12;denom:=1; end else if scan_keyword(726)then begin num:=7227;denom:=254; end else if scan_keyword(727)then begin num:=7227;denom:=2540; end else if scan_keyword(728)then begin num:=7227;denom:=7200; end else if scan_keyword(729)then begin num:=1238;denom:=1157; end else if scan_keyword(730)then begin num:=14856;denom:=1157; end else if scan_keyword(731)then goto 30 else{459:}begin begin if interaction=3 then;print_nl(263);print(714);end;print(732); begin help_ptr:=6;help_line[5]:=733;help_line[4]:=734;help_line[3]:=735; help_line[2]:=721;help_line[1]:=722;help_line[0]:=723;end;error;goto 32; end{:459};cur_val:=xn_over_d(cur_val,num,denom); f:=(num*f+65536*remainder)div denom;cur_val:=cur_val+(f div 65536); f:=f mod 65536;32:{:458}; 88:if cur_val>=16384 then arith_error:=true else cur_val:=cur_val*65536+ f;30:{:453};{443:}begin get_x_token;if cur_cmd<>10 then back_input; end{:443}; 89:if arith_error or(abs(cur_val)>=1073741824)then{460:}begin begin if interaction=3 then;print_nl(263);print(736);end;begin help_ptr:=2; help_line[1]:=737;help_line[0]:=738;end;error;cur_val:=1073741823; arith_error:=false;end{:460};if negative then cur_val:=-cur_val;end; {:448}{461:}procedure scan_glue(level:small_number);label 10; var negative:boolean;q:halfword;mu:boolean;begin mu:=(level=3); {441:}negative:=false;repeat{406:}repeat get_x_token; until cur_cmd<>10{:406}; if cur_tok=3117 then begin negative:=not negative;cur_tok:=3115;end; until cur_tok<>3115{:441}; if(cur_cmd>=68)and(cur_cmd<=89)then begin scan_something_internal(level, negative); if cur_val_level>=2 then begin if cur_val_level<>level then mu_error; goto 10;end; if cur_val_level=0 then scan_dimen(mu,false,true)else if level=3 then mu_error;end else begin back_input;scan_dimen(mu,false,false); if negative then cur_val:=-cur_val;end;{462:}q:=new_spec(0); mem[q+1].int:=cur_val; if scan_keyword(739)then begin scan_dimen(mu,true,false); mem[q+2].int:=cur_val;mem[q].hh.b0:=cur_order;end; if scan_keyword(740)then begin scan_dimen(mu,true,false); mem[q+3].int:=cur_val;mem[q].hh.b1:=cur_order;end;cur_val:=q{:462}; 10:end;{1517:}{1528:}function add_or_sub(x,y,max_answer:integer; negative:boolean):integer;var a:integer;begin if negative then y:=-y; if x>=0 then if y<=max_answer-x then a:=x+y else begin arith_error:=true ;a:=0; end else if y>=-max_answer-x then a:=x+y else begin arith_error:=true; a:=0;end;add_or_sub:=a;end; {:1528}{1532:}function quotient(n,d:integer):integer; var negative:boolean;a:integer; begin if d=0 then begin arith_error:=true;a:=0; end else begin if d>0 then negative:=false else begin d:=-d; negative:=true;end;if n<0 then begin n:=-n;negative:=not negative;end; a:=n div d;n:=n-a*d;d:=n-d;if d+n>=0 then a:=a+1;if negative then a:=-a; end;quotient:=a;end; {:1532}{1534:}function fract(x,n,d,max_answer:integer):integer; label 40,41,88,30;var negative:boolean;a:integer;f:integer;h:integer; r:integer;t:integer;begin if d=0 then goto 88;a:=0; if d>0 then negative:=false else begin d:=-d;negative:=true;end; if x<0 then begin x:=-x;negative:=not negative; end else if x=0 then goto 30;if n<0 then begin n:=-n; negative:=not negative;end;t:=n div d; if t>max_answer div x then goto 88;a:=t*x;n:=n-t*d;if n=0 then goto 40; t:=x div d;if t>(max_answer-a)div n then goto 88;a:=a+t*n;x:=x-t*d; if x=0 then goto 40;if x=0 then begin r:=r-d;f:=f+1;end;end;n:=n div 2;if n=0 then goto 41; if x(max_answer-a)then goto 88;a:=a+f; 40:if negative then a:=-a;goto 30;88:begin arith_error:=true;a:=0;end; 30:fract:=a;end;{:1534}procedure scan_expr;label 20,22,40; var a,b:boolean;l:small_number;r:small_number;s:small_number; o:small_number;e:integer;t:integer;f:integer;n:integer;p:halfword; q:halfword;begin l:=cur_val_level;a:=arith_error;b:=false;p:=0; {1518:}20:r:=0;e:=0;s:=0;t:=0;n:=0;22:if s=0 then o:=l else o:=0; {1520:}{406:}repeat get_x_token;until cur_cmd<>10{:406}; if cur_tok=3112 then{1523:}begin q:=get_node(4);mem[q].hh.rh:=p; mem[q].hh.b0:=l;mem[q].hh.b1:=4*s+r;mem[q+1].int:=e;mem[q+2].int:=t; mem[q+3].int:=n;p:=q;l:=o;goto 20;end{:1523};back_input; if o=0 then scan_int else if o=1 then scan_dimen(false,false,false)else if o=2 then scan_normal_glue else scan_mu_glue;f:=cur_val{:1520}; 40:{1519:}{406:}repeat get_x_token;until cur_cmd<>10{:406}; if cur_tok=3115 then o:=1 else if cur_tok=3117 then o:=2 else if cur_tok =3114 then o:=3 else if cur_tok=3119 then o:=4 else begin o:=0; if p=0 then begin if cur_cmd<>0 then back_input; end else if cur_tok<>3113 then begin begin if interaction=3 then; print_nl(263);print(1395);end;begin help_ptr:=1;help_line[0]:=1396;end; back_error;end;end{:1519};arith_error:=b; {1525:}if(l=0)or(s>2)then begin if(f>2147483647)or(f<-2147483647)then begin arith_error:=true;f:=0;end; end else if l=1 then begin if abs(f)>1073741823 then begin arith_error:= true;f:=0;end; end else begin if(abs(mem[f+1].int)>1073741823)or(abs(mem[f+2].int)> 1073741823)or(abs(mem[f+3].int)>1073741823)then begin arith_error:=true; delete_glue_ref(f);f:=new_spec(0);end;end{:1525}; case s of{1526:}0:if(l>=2)and(o<>0)then begin t:=new_spec(f); delete_glue_ref(f);if mem[t+2].int=0 then mem[t].hh.b0:=0; if mem[t+3].int=0 then mem[t].hh.b1:=0;end else t:=f; {:1526}{1530:}3:if o=4 then begin n:=f;o:=5; end else if l=0 then t:=mult_and_add(t,f,0,2147483647)else if l=1 then t :=mult_and_add(t,f,0,1073741823)else begin mem[t+1].int:=mult_and_add( mem[t+1].int,f,0,1073741823); mem[t+2].int:=mult_and_add(mem[t+2].int,f,0,1073741823); mem[t+3].int:=mult_and_add(mem[t+3].int,f,0,1073741823);end; {:1530}{1531:}4:if l<2 then t:=quotient(t,f)else begin mem[t+1].int:= quotient(mem[t+1].int,f);mem[t+2].int:=quotient(mem[t+2].int,f); mem[t+3].int:=quotient(mem[t+3].int,f);end; {:1531}{1533:}5:if l=0 then t:=fract(t,n,f,2147483647)else if l=1 then t :=fract(t,n,f,1073741823)else begin mem[t+1].int:=fract(mem[t+1].int,n,f ,1073741823);mem[t+2].int:=fract(mem[t+2].int,n,f,1073741823); mem[t+3].int:=fract(mem[t+3].int,n,f,1073741823);end;{:1533}end; if o>2 then s:=o else{1527:}begin s:=0; if r=0 then e:=t else if l=0 then e:=add_or_sub(e,t,2147483647,r=2)else if l=1 then e:=add_or_sub(e,t,1073741823,r=2)else{1529:}begin mem[e+1]. int:=add_or_sub(mem[e+1].int,mem[t+1].int,1073741823,r=2); if mem[e].hh.b0=mem[t].hh.b0 then mem[e+2].int:=add_or_sub(mem[e+2].int, mem[t+2].int,1073741823,r=2)else if(mem[e].hh.b00)then begin mem[e+2].int:=mem[t+2].int; mem[e].hh.b0:=mem[t].hh.b0;end; if mem[e].hh.b1=mem[t].hh.b1 then mem[e+3].int:=add_or_sub(mem[e+3].int, mem[t+3].int,1073741823,r=2)else if(mem[e].hh.b10)then begin mem[e+3].int:=mem[t+3].int; mem[e].hh.b1:=mem[t].hh.b1;end;delete_glue_ref(t); if mem[e+2].int=0 then mem[e].hh.b0:=0; if mem[e+3].int=0 then mem[e].hh.b1:=0;end{:1529};r:=o;end{:1527}; b:=arith_error;if o<>0 then goto 22;if p<>0 then{1524:}begin f:=e;q:=p; e:=mem[q+1].int;t:=mem[q+2].int;n:=mem[q+3].int;s:=mem[q].hh.b1 div 4; r:=mem[q].hh.b1 mod 4;l:=mem[q].hh.b0;p:=mem[q].hh.rh;free_node(q,4); goto 40;end{:1524}{:1518};if b then begin begin if interaction=3 then; print_nl(263);print(1223);end;begin help_ptr:=2;help_line[1]:=1394; help_line[0]:=1225;end;error;if l>=2 then begin delete_glue_ref(e);e:=0; mem[e].hh.rh:=mem[e].hh.rh+1;end else e:=0;end;arith_error:=a; cur_val:=e;cur_val_level:=l;end; {:1517}{1522:}procedure scan_normal_glue;begin scan_glue(2);end; procedure scan_mu_glue;begin scan_glue(3);end; {:1522}{:461}{463:}function scan_rule_spec:halfword;label 21; var q:halfword;begin q:=new_rule; if cur_cmd=35 then mem[q+1].int:=26214 else begin mem[q+3].int:=26214; mem[q+2].int:=0;end; 21:if scan_keyword(741)then begin scan_dimen(false,false,false); mem[q+1].int:=cur_val;goto 21;end; if scan_keyword(742)then begin scan_dimen(false,false,false); mem[q+3].int:=cur_val;goto 21;end; if scan_keyword(743)then begin scan_dimen(false,false,false); mem[q+2].int:=cur_val;goto 21;end;scan_rule_spec:=q;end; {:463}{464:}{1414:}procedure scan_general_text;label 40;var s:0..5; w:halfword;d:halfword;p:halfword;q:halfword;unbalance:halfword; begin s:=scanner_status;w:=warning_index;d:=def_ref;scanner_status:=5; warning_index:=cur_cs;def_ref:=get_avail;mem[def_ref].hh.lh:=0; p:=def_ref;scan_left_brace;unbalance:=1;while true do begin get_token; if cur_tok<768 then if cur_cmd<2 then unbalance:=unbalance+1 else begin unbalance:=unbalance-1;if unbalance=0 then goto 40;end; begin q:=get_avail;mem[p].hh.rh:=q;mem[q].hh.lh:=cur_tok;p:=q;end;end; 40:q:=mem[def_ref].hh.rh;begin mem[def_ref].hh.rh:=avail;avail:=def_ref; {dyn_used:=dyn_used-1;}end;if q=0 then cur_val:=29997 else cur_val:=p; mem[29997].hh.rh:=q;scanner_status:=s;warning_index:=w;def_ref:=d;end; {:1414}{1488:}procedure pseudo_start;var old_setting:0..21;s:str_number; l,m:pool_pointer;p,q,r:halfword;w:four_quarters;nl,sz:integer; begin scan_general_text;old_setting:=selector;selector:=21; token_show(29997);selector:=old_setting;flush_list(mem[29997].hh.rh); begin if pool_ptr+1>pool_size then overflow(258,pool_size-init_pool_ptr) ;end;s:=make_string;{1489:}str_pool[pool_ptr]:=32;l:=str_start[s]; nl:=eqtb[5317].int;p:=get_avail;q:=p;while lnl)do l:=l+1;sz:=(l-m+7)div 4; if sz=1 then sz:=2;r:=get_node(sz);mem[q].hh.rh:=r;q:=r; mem[q].hh.lh:=sz+0;while sz>2 do begin sz:=sz-1;r:=r+1; w.b0:=str_pool[m]+0;w.b1:=str_pool[m+1]+0;w.b2:=str_pool[m+2]+0; w.b3:=str_pool[m+3]+0;mem[r].qqqq:=w;m:=m+4;end;w.b0:=32;w.b1:=32; w.b2:=32;w.b3:=32;if l>m then begin w.b0:=str_pool[m]+0; if l>m+1 then begin w.b1:=str_pool[m+1]+0; if l>m+2 then begin w.b2:=str_pool[m+2]+0; if l>m+3 then w.b3:=str_pool[m+3]+0;end;end;end;mem[r+1].qqqq:=w; if str_pool[l]=nl then l:=l+1;end;mem[p].hh.lh:=mem[p].hh.rh; mem[p].hh.rh:=pseudo_files;pseudo_files:=p{:1489}; begin str_ptr:=str_ptr-1;pool_ptr:=str_start[str_ptr];end; {1490:}begin_file_reading;line:=0; cur_input.limit_field:=cur_input.start_field; cur_input.loc_field:=cur_input.limit_field+1; if eqtb[5326].int>0 then begin if term_offset>max_print_line-3 then print_ln else if(term_offset>0)or(file_offset>0)then print_char(32); cur_input.name_field:=19;print(1380);open_parens:=open_parens+1; break(term_out);end else cur_input.name_field:=18{:1490};end; {:1488}function str_toks(b:pool_pointer):halfword;var p:halfword; q:halfword;t:halfword;k:pool_pointer; begin begin if pool_ptr+1>pool_size then overflow(258,pool_size- init_pool_ptr);end;p:=29997;mem[p].hh.rh:=0;k:=b; while k=4 then{466:}begin p:=29997;mem[p].hh.rh:=0; if cur_val_level=4 then begin q:=get_avail;mem[p].hh.rh:=q; mem[q].hh.lh:=4095+cur_val;p:=q; end else if cur_val<>0 then begin r:=mem[cur_val].hh.rh; while r<>0 do begin begin begin q:=avail; if q=0 then q:=get_avail else begin avail:=mem[q].hh.rh;mem[q].hh.rh:=0; {dyn_used:=dyn_used+1;}end;end;mem[p].hh.rh:=q; mem[q].hh.lh:=mem[r].hh.lh;p:=q;end;r:=mem[r].hh.rh;end;end;the_toks:=p; end{:466}else begin old_setting:=selector;selector:=21;b:=pool_ptr; case cur_val_level of 0:print_int(cur_val); 1:begin print_scaled(cur_val);print(400);end; 2:begin print_spec(cur_val,400);delete_glue_ref(cur_val);end; 3:begin print_spec(cur_val,338);delete_glue_ref(cur_val);end;end; selector:=old_setting;the_toks:=str_toks(b);end;10:end; {:465}{467:}procedure ins_the_toks;begin mem[29988].hh.rh:=the_toks; begin_token_list(mem[29997].hh.rh,4);end; {:467}{470:}procedure conv_toks;var old_setting:0..21;c:0..6; save_scanner_status:small_number;b:pool_pointer;begin c:=cur_chr; {471:}case c of 0,1:scan_int; 2,3:begin save_scanner_status:=scanner_status;scanner_status:=0; get_token;scanner_status:=save_scanner_status;end;4:scan_font_ident;5:; 6:if job_name=0 then open_log_file;end{:471};old_setting:=selector; selector:=21;b:=pool_ptr;{472:}case c of 0:print_int(cur_val); 1:print_roman_int(cur_val); 2:if cur_cs<>0 then sprint_cs(cur_cs)else print_char(cur_chr); 3:print_meaning;4:begin print(font_name[cur_val]); if font_size[cur_val]<>font_dsize[cur_val]then begin print(751); print_scaled(font_size[cur_val]);print(400);end;end;5:print(256); 6:print(job_name);end{:472};selector:=old_setting; mem[29988].hh.rh:=str_toks(b);begin_token_list(mem[29997].hh.rh,4);end; {:470}{473:}function scan_toks(macro_def,xpand:boolean):halfword; label 40,22,30,31,32;var t:halfword;s:halfword;p:halfword;q:halfword; unbalance:halfword;hash_brace:halfword; begin if macro_def then scanner_status:=2 else scanner_status:=5; warning_index:=cur_cs;def_ref:=get_avail;mem[def_ref].hh.lh:=0; p:=def_ref;hash_brace:=0;t:=3120; if macro_def then{474:}begin while true do begin 22:get_token; if cur_tok<768 then goto 31; if cur_cmd=6 then{476:}begin s:=3328+cur_chr;get_token; if cur_tok<512 then begin hash_brace:=cur_tok;begin q:=get_avail; mem[p].hh.rh:=q;mem[q].hh.lh:=cur_tok;p:=q;end;begin q:=get_avail; mem[p].hh.rh:=q;mem[q].hh.lh:=3584;p:=q;end;goto 30;end; if t=3129 then begin begin if interaction=3 then;print_nl(263); print(754);end;begin help_ptr:=2;help_line[1]:=755;help_line[0]:=756; end;error;goto 22;end else begin t:=t+1; if cur_tok<>t then begin begin if interaction=3 then;print_nl(263); print(757);end;begin help_ptr:=2;help_line[1]:=758;help_line[0]:=759; end;back_error;end;cur_tok:=s;end;end{:476};begin q:=get_avail; mem[p].hh.rh:=q;mem[q].hh.lh:=cur_tok;p:=q;end;end; 31:begin q:=get_avail;mem[p].hh.rh:=q;mem[q].hh.lh:=3584;p:=q;end; if cur_cmd=2 then{475:}begin begin if interaction=3 then;print_nl(263); print(666);end;align_state:=align_state+1;begin help_ptr:=2; help_line[1]:=752;help_line[0]:=753;end;error;goto 40;end{:475}; 30:end{:474}else scan_left_brace;{477:}unbalance:=1; while true do begin if xpand then{478:}begin while true do begin get_next; if cur_cmd>=111 then if mem[mem[cur_chr].hh.rh].hh.lh=3585 then begin cur_cmd:=0;cur_chr:=257;end;if cur_cmd<=100 then goto 32; if cur_cmd<>109 then expand else begin q:=the_toks; if mem[29997].hh.rh<>0 then begin mem[p].hh.rh:=mem[29997].hh.rh;p:=q; end;end;end;32:x_token end{:478}else get_token; if cur_tok<768 then if cur_cmd<2 then unbalance:=unbalance+1 else begin unbalance:=unbalance-1;if unbalance=0 then goto 40; end else if cur_cmd=6 then if macro_def then{479:}begin s:=cur_tok; if xpand then get_x_token else get_token; if cur_cmd<>6 then if(cur_tok<=3120)or(cur_tok>t)then begin begin if interaction=3 then;print_nl(263);print(760);end; sprint_cs(warning_index);begin help_ptr:=3;help_line[2]:=761; help_line[1]:=762;help_line[0]:=763;end;back_error;cur_tok:=s; end else cur_tok:=1232+cur_chr;end{:479};begin q:=get_avail; mem[p].hh.rh:=q;mem[q].hh.lh:=cur_tok;p:=q;end;end{:477}; 40:scanner_status:=0;if hash_brace<>0 then begin q:=get_avail; mem[p].hh.rh:=q;mem[q].hh.lh:=hash_brace;p:=q;end;scan_toks:=p;end; {:473}{482:}procedure read_toks(n:integer;r:halfword;j:halfword); label 30;var p:halfword;q:halfword;s:integer;m:small_number; begin scanner_status:=2;warning_index:=r;def_ref:=get_avail; mem[def_ref].hh.lh:=0;p:=def_ref;begin q:=get_avail;mem[p].hh.rh:=q; mem[q].hh.lh:=3584;p:=q;end;if(n<0)or(n>15)then m:=16 else m:=n; s:=align_state;align_state:=1000000;repeat{483:}begin_file_reading; cur_input.name_field:=m+1; if read_open[m]=2 then{484:}if interaction>1 then if n<0 then begin; print(339);term_input;end else begin;print_ln;sprint_cs(r);begin; print(61);term_input;end;n:=-1; end else fatal_error(764){:484}else if read_open[m]=1 then{485:}if input_ln(read_file[m],false)then read_open[m]:=0 else begin a_close( read_file[m]);read_open[m]:=2; end{:485}else{486:}begin if not input_ln(read_file[m],true)then begin a_close(read_file[m]);read_open[m]:=2; if align_state<>1000000 then begin runaway;begin if interaction=3 then; print_nl(263);print(765);end;print_esc(538);begin help_ptr:=1; help_line[0]:=766;end;align_state:=1000000;cur_input.limit_field:=0; error;end;end;end{:486};cur_input.limit_field:=last; if(eqtb[5316].int<0)or(eqtb[5316].int>255)then cur_input.limit_field:= cur_input.limit_field-1 else buffer[cur_input.limit_field]:=eqtb[5316]. int;first:=cur_input.limit_field+1; cur_input.loc_field:=cur_input.start_field;cur_input.state_field:=33; {1496:}if j=1 then begin while cur_input.loc_field<=cur_input. limit_field do begin cur_chr:=buffer[cur_input.loc_field]; cur_input.loc_field:=cur_input.loc_field+1; if cur_chr=32 then cur_tok:=2592 else cur_tok:=cur_chr+3072; begin q:=get_avail;mem[p].hh.rh:=q;mem[q].hh.lh:=cur_tok;p:=q;end;end; goto 30;end{:1496};while true do begin get_token; if cur_tok=0 then goto 30; if align_state<1000000 then begin repeat get_token;until cur_tok=0; align_state:=1000000;goto 30;end;begin q:=get_avail;mem[p].hh.rh:=q; mem[q].hh.lh:=cur_tok;p:=q;end;end;30:end_file_reading{:483}; until align_state=1000000;cur_val:=def_ref;scanner_status:=0; align_state:=s;end;{:482}{494:}procedure pass_text;label 30; var l:integer;save_scanner_status:small_number; begin save_scanner_status:=scanner_status;scanner_status:=1;l:=0; skip_line:=line;while true do begin get_next; if cur_cmd=106 then begin if l=0 then goto 30;if cur_chr=2 then l:=l-1; end else if cur_cmd=105 then l:=l+1;end; 30:scanner_status:=save_scanner_status; if eqtb[5325].int>0 then show_cur_cmd_chr;end; {:494}{497:}procedure change_if_limit(l:small_number;p:halfword); label 10;var q:halfword; begin if p=cond_ptr then if_limit:=l else begin q:=cond_ptr; while true do begin if q=0 then confusion(767); if mem[q].hh.rh=p then begin mem[q].hh.b0:=l;goto 10;end; q:=mem[q].hh.rh;end;end;10:end;{:497}{498:}procedure conditional; label 10,50;var b:boolean;r:60..62;m,n:integer;p,q:halfword; save_scanner_status:small_number;save_cond_ptr:halfword; this_if:small_number;is_unless:boolean; begin if eqtb[5325].int>0 then if eqtb[5304].int<=1 then show_cur_cmd_chr;{495:}begin p:=get_node(2);mem[p].hh.rh:=cond_ptr; mem[p].hh.b0:=if_limit;mem[p].hh.b1:=cur_if;mem[p+1].int:=if_line; cond_ptr:=p;cur_if:=cur_chr;if_limit:=1;if_line:=line;end{:495}; save_cond_ptr:=cond_ptr;is_unless:=(cur_chr>=32); this_if:=cur_chr mod 32; {501:}case this_if of 0,1:{506:}begin begin get_x_token; if cur_cmd=0 then if cur_chr=257 then begin cur_cmd:=13; cur_chr:=cur_tok-4096;end;end; if(cur_cmd>13)or(cur_chr>255)then begin m:=0;n:=256; end else begin m:=cur_cmd;n:=cur_chr;end;begin get_x_token; if cur_cmd=0 then if cur_chr=257 then begin cur_cmd:=13; cur_chr:=cur_tok-4096;end;end; if(cur_cmd>13)or(cur_chr>255)then begin cur_cmd:=0;cur_chr:=256;end; if this_if=0 then b:=(n=cur_chr)else b:=(m=cur_cmd);end{:506}; 2,3:{503:}begin if this_if=2 then scan_int else scan_dimen(false,false, false);n:=cur_val;{406:}repeat get_x_token;until cur_cmd<>10{:406}; if(cur_tok>=3132)and(cur_tok<=3134)then r:=cur_tok-3072 else begin begin if interaction=3 then;print_nl(263);print(792);end; print_cmd_chr(105,this_if);begin help_ptr:=1;help_line[0]:=793;end; back_error;r:=61;end; if this_if=2 then scan_int else scan_dimen(false,false,false); case r of 60:b:=(ncur_val);end; end{:503};4:{504:}begin scan_int;b:=odd(cur_val);end{:504}; 5:b:=(abs(cur_list.mode_field)=1);6:b:=(abs(cur_list.mode_field)=102); 7:b:=(abs(cur_list.mode_field)=203);8:b:=(cur_list.mode_field<0); 9,10,11:{505:}begin scan_register_num; if cur_val<256 then p:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then p:=0 else p:=mem[cur_ptr+1].hh.rh;end; if this_if=9 then b:=(p=0)else if p=0 then b:=false else if this_if=10 then b:=(mem[p].hh.b0=0)else b:=(mem[p].hh.b0=1);end{:505}; 12:{507:}begin save_scanner_status:=scanner_status;scanner_status:=0; get_next;n:=cur_cs;p:=cur_cmd;q:=cur_chr;get_next; if cur_cmd<>p then b:=false else if cur_cmd<111 then b:=(cur_chr=q)else {508:}begin p:=mem[cur_chr].hh.rh;q:=mem[eqtb[n].hh.rh].hh.rh; if p=q then b:=true else begin while(p<>0)and(q<>0)do if mem[p].hh.lh<> mem[q].hh.lh then p:=0 else begin p:=mem[p].hh.rh;q:=mem[q].hh.rh;end; b:=((p=0)and(q=0));end;end{:508};scanner_status:=save_scanner_status; end{:507};13:begin scan_four_bit_int;b:=(read_open[cur_val]=2);end; 14:b:=true;15:b:=false; {1501:}17:begin save_scanner_status:=scanner_status;scanner_status:=0; get_next;b:=(cur_cmd<>101);scanner_status:=save_scanner_status;end; {:1501}{1502:}18:begin n:=get_avail;p:=n;repeat get_x_token; if cur_cs=0 then begin q:=get_avail;mem[p].hh.rh:=q; mem[q].hh.lh:=cur_tok;p:=q;end;until cur_cs<>0; if cur_cmd<>67 then{373:}begin begin if interaction=3 then; print_nl(263);print(634);end;print_esc(508);print(635); begin help_ptr:=2;help_line[1]:=636;help_line[0]:=637;end;back_error; end{:373};{1503:}m:=first;p:=mem[n].hh.rh; while p<>0 do begin if m>=max_buf_stack then begin max_buf_stack:=m+1; if max_buf_stack=buf_size then overflow(257,buf_size);end; buffer[m]:=mem[p].hh.lh mod 256;m:=m+1;p:=mem[p].hh.rh;end; if m>first+1 then cur_cs:=id_lookup(first,m-first)else if m=first then cur_cs:=513 else cur_cs:=257+buffer[first]{:1503};flush_list(n); b:=(eqtb[cur_cs].hh.b0<>101);end;{:1502}{1504:}19:begin scan_font_ident; n:=cur_val;scan_char_num; if(font_bc[n]<=cur_val)and(font_ec[n]>=cur_val)then b:=(font_info[ char_base[n]+cur_val+0].qqqq.b0>0)else b:=false;end; {:1504}16:{509:}begin scan_int;n:=cur_val; if eqtb[5304].int>1 then begin begin_diagnostic;print(794);print_int(n); print_char(125);end_diagnostic(false);end;while n<>0 do begin pass_text; if cond_ptr=save_cond_ptr then if cur_chr=4 then n:=n-1 else goto 50 else if cur_chr=2 then{496:}begin if if_stack[in_open]=cond_ptr then if_warning;p:=cond_ptr;if_line:=mem[p+1].int;cur_if:=mem[p].hh.b1; if_limit:=mem[p].hh.b0;cond_ptr:=mem[p].hh.rh;free_node(p,2);end{:496}; end;change_if_limit(4,save_cond_ptr);goto 10;end{:509};end{:501}; if is_unless then b:=not b; if eqtb[5304].int>1 then{502:}begin begin_diagnostic; if b then print(790)else print(791);end_diagnostic(false);end{:502}; if b then begin change_if_limit(3,save_cond_ptr);goto 10;end; {500:}while true do begin pass_text; if cond_ptr=save_cond_ptr then begin if cur_chr<>4 then goto 50; begin if interaction=3 then;print_nl(263);print(788);end;print_esc(786); begin help_ptr:=1;help_line[0]:=789;end;error; end else if cur_chr=2 then{496:}begin if if_stack[in_open]=cond_ptr then if_warning;p:=cond_ptr;if_line:=mem[p+1].int;cur_if:=mem[p].hh.b1; if_limit:=mem[p].hh.b0;cond_ptr:=mem[p].hh.rh;free_node(p,2);end{:496}; end{:500}; 50:if cur_chr=2 then{496:}begin if if_stack[in_open]=cond_ptr then if_warning;p:=cond_ptr;if_line:=mem[p+1].int;cur_if:=mem[p].hh.b1; if_limit:=mem[p].hh.b0;cond_ptr:=mem[p].hh.rh;free_node(p,2); end{:496}else if_limit:=2;10:end;{:498}{515:}procedure begin_name; begin area_delimiter:=0;ext_delimiter:=0;end; {:515}{516:}function more_name(c:ASCII_code):boolean; begin if c=32 then more_name:=false else begin begin if pool_ptr+1> pool_size then overflow(258,pool_size-init_pool_ptr);end; begin str_pool[pool_ptr]:=c;pool_ptr:=pool_ptr+1;end; if(c=62)or(c=58)then begin area_delimiter:=(pool_ptr-str_start[str_ptr]) ;ext_delimiter:=0; end else if(c=46)and(ext_delimiter=0)then ext_delimiter:=(pool_ptr- str_start[str_ptr]);more_name:=true;end;end; {:516}{517:}procedure end_name; begin if str_ptr+3>max_strings then overflow(259,max_strings- init_str_ptr); if area_delimiter=0 then cur_area:=339 else begin cur_area:=str_ptr; str_start[str_ptr+1]:=str_start[str_ptr]+area_delimiter; str_ptr:=str_ptr+1;end;if ext_delimiter=0 then begin cur_ext:=339; cur_name:=make_string;end else begin cur_name:=str_ptr; str_start[str_ptr+1]:=str_start[str_ptr]+ext_delimiter-area_delimiter-1; str_ptr:=str_ptr+1;cur_ext:=make_string;end;end; {:517}{519:}procedure pack_file_name(n,a,e:str_number);var k:integer; c:ASCII_code;j:pool_pointer;begin k:=0; for j:=str_start[a]to str_start[a+1]-1 do begin c:=str_pool[j];k:=k+1; if k<=file_name_size then name_of_file[k]:=xchr[c];end; for j:=str_start[n]to str_start[n+1]-1 do begin c:=str_pool[j];k:=k+1; if k<=file_name_size then name_of_file[k]:=xchr[c];end; for j:=str_start[e]to str_start[e+1]-1 do begin c:=str_pool[j];k:=k+1; if k<=file_name_size then name_of_file[k]:=xchr[c];end; if k<=file_name_size then name_length:=k else name_length:= file_name_size; for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';end; {:519}{523:}procedure pack_buffered_name(n:small_number;a,b:integer); var k:integer;c:ASCII_code;j:integer; begin if n+b-a+5>file_name_size then b:=a+file_name_size-n-5;k:=0; for j:=1 to n do begin c:=xord[TEX_format_default[j]];k:=k+1; if k<=file_name_size then name_of_file[k]:=xchr[c];end; for j:=a to b do begin c:=buffer[j];k:=k+1; if k<=file_name_size then name_of_file[k]:=xchr[c];end; for j:=17 to 20 do begin c:=xord[TEX_format_default[j]];k:=k+1; if k<=file_name_size then name_of_file[k]:=xchr[c];end; if k<=file_name_size then name_length:=k else name_length:= file_name_size; for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';end; {:523}{525:}function make_name_string:str_number; var k:1..file_name_size; begin if(pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or(( pool_ptr-str_start[str_ptr])>0)then make_name_string:=63 else begin for k:=1 to name_length do begin str_pool[pool_ptr]:=xord[name_of_file[k]]; pool_ptr:=pool_ptr+1;end;make_name_string:=make_string;end;end; function a_make_name_string(var f:alpha_file):str_number; begin a_make_name_string:=make_name_string;end; function b_make_name_string(var f:byte_file):str_number; begin b_make_name_string:=make_name_string;end; function w_make_name_string(var f:word_file):str_number; begin w_make_name_string:=make_name_string;end; {:525}{526:}procedure scan_file_name;label 30; begin name_in_progress:=true;begin_name;{406:}repeat get_x_token; until cur_cmd<>10{:406}; while true do begin if(cur_cmd>12)or(cur_chr>255)then begin back_input; goto 30;end;if not more_name(cur_chr)then goto 30;get_x_token;end; 30:end_name;name_in_progress:=false;end; {:526}{529:}procedure pack_job_name(s:str_number);begin cur_area:=339; cur_ext:=s;cur_name:=job_name;pack_file_name(cur_name,cur_area,cur_ext); end;{:529}{530:}procedure prompt_file_name(s,e:str_number);label 30; var k:0..buf_size;begin if interaction=2 then; if s=798 then begin if interaction=3 then;print_nl(263);print(799); end else begin if interaction=3 then;print_nl(263);print(800);end; print_file_name(cur_name,cur_area,cur_ext);print(801); if e=802 then show_context;print_nl(803);print(s); if interaction<2 then fatal_error(804);break_in(term_in,true);begin; print(575);term_input;end;{531:}begin begin_name;k:=first; while(buffer[k]=32)and(kmax_print_line-2 then print_ln else if(term_offset>0)or( file_offset>0)then print_char(32);print_char(40); open_parens:=open_parens+1;slow_print(cur_input.name_field); break(term_out);cur_input.state_field:=33; if cur_input.name_field=str_ptr-1 then begin begin str_ptr:=str_ptr-1; pool_ptr:=str_start[str_ptr];end;cur_input.name_field:=cur_name;end; {538:}begin line:=1; if input_ln(input_file[cur_input.index_field],false)then; firm_up_the_line; if(eqtb[5316].int<0)or(eqtb[5316].int>255)then cur_input.limit_field:= cur_input.limit_field-1 else buffer[cur_input.limit_field]:=eqtb[5316]. int;first:=cur_input.limit_field+1; cur_input.loc_field:=cur_input.start_field;end{:538};end; {:537}{560:}function read_font_info(u:halfword;nom,aire:str_number; s:scaled):internal_font_number;label 30,11,45;var k:font_index; file_opened:boolean;lf,lh,bc,ec,nw,nh,nd,ni,nl,nk,ne,np:halfword; f:internal_font_number;g:internal_font_number;a,b,c,d:eight_bits; qw:four_quarters;sw:scaled;bch_label:integer;bchar:0..256;z:scaled; alpha:integer;beta:1..16;begin g:=0;{562:}{563:}file_opened:=false; if aire=339 then pack_file_name(nom,796,822)else pack_file_name(nom,aire ,822);if not b_open_in(tfm_file)then goto 11;file_opened:=true{:563}; {565:}begin begin lf:=tfm_file^;if lf>127 then goto 11;get(tfm_file); lf:=lf*256+tfm_file^;end;get(tfm_file);begin lh:=tfm_file^; if lh>127 then goto 11;get(tfm_file);lh:=lh*256+tfm_file^;end; get(tfm_file);begin bc:=tfm_file^;if bc>127 then goto 11;get(tfm_file); bc:=bc*256+tfm_file^;end;get(tfm_file);begin ec:=tfm_file^; if ec>127 then goto 11;get(tfm_file);ec:=ec*256+tfm_file^;end; if(bc>ec+1)or(ec>255)then goto 11;if bc>255 then begin bc:=1;ec:=0;end; get(tfm_file);begin nw:=tfm_file^;if nw>127 then goto 11;get(tfm_file); nw:=nw*256+tfm_file^;end;get(tfm_file);begin nh:=tfm_file^; if nh>127 then goto 11;get(tfm_file);nh:=nh*256+tfm_file^;end; get(tfm_file);begin nd:=tfm_file^;if nd>127 then goto 11;get(tfm_file); nd:=nd*256+tfm_file^;end;get(tfm_file);begin ni:=tfm_file^; if ni>127 then goto 11;get(tfm_file);ni:=ni*256+tfm_file^;end; get(tfm_file);begin nl:=tfm_file^;if nl>127 then goto 11;get(tfm_file); nl:=nl*256+tfm_file^;end;get(tfm_file);begin nk:=tfm_file^; if nk>127 then goto 11;get(tfm_file);nk:=nk*256+tfm_file^;end; get(tfm_file);begin ne:=tfm_file^;if ne>127 then goto 11;get(tfm_file); ne:=ne*256+tfm_file^;end;get(tfm_file);begin np:=tfm_file^; if np>127 then goto 11;get(tfm_file);np:=np*256+tfm_file^;end; if lf<>6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+nk+ne+np then goto 11; if(nw=0)or(nh=0)or(nd=0)or(ni=0)then goto 11;end{:565}; {566:}lf:=lf-6-lh;if np<7 then lf:=lf+7-np; if(font_ptr=font_max)or(fmem_ptr+lf>font_mem_size)then{567:}begin begin if interaction=3 then;print_nl(263);print(813);end;sprint_cs(u); print_char(61);print_file_name(nom,aire,339); if s>=0 then begin print(751);print_scaled(s);print(400); end else if s<>-1000 then begin print(814);print_int(-s);end;print(823); begin help_ptr:=4;help_line[3]:=824;help_line[2]:=825;help_line[1]:=826; help_line[0]:=827;end;error;goto 30;end{:567};f:=font_ptr+1; char_base[f]:=fmem_ptr-bc;width_base[f]:=char_base[f]+ec+1; height_base[f]:=width_base[f]+nw;depth_base[f]:=height_base[f]+nh; italic_base[f]:=depth_base[f]+nd;lig_kern_base[f]:=italic_base[f]+ni; kern_base[f]:=lig_kern_base[f]+nl-256*(128); exten_base[f]:=kern_base[f]+256*(128)+nk; param_base[f]:=exten_base[f]+ne{:566};{568:}begin if lh<2 then goto 11; begin get(tfm_file);a:=tfm_file^;qw.b0:=a+0;get(tfm_file);b:=tfm_file^; qw.b1:=b+0;get(tfm_file);c:=tfm_file^;qw.b2:=c+0;get(tfm_file); d:=tfm_file^;qw.b3:=d+0;font_check[f]:=qw;end;get(tfm_file); begin z:=tfm_file^;if z>127 then goto 11;get(tfm_file); z:=z*256+tfm_file^;end;get(tfm_file);z:=z*256+tfm_file^;get(tfm_file); z:=(z*16)+(tfm_file^div 16);if z<65536 then goto 11; while lh>2 do begin get(tfm_file);get(tfm_file);get(tfm_file); get(tfm_file);lh:=lh-1;end;font_dsize[f]:=z; if s<>-1000 then if s>=0 then z:=s else z:=xn_over_d(z,-s,1000); font_size[f]:=z;end{:568}; {569:}for k:=fmem_ptr to width_base[f]-1 do begin begin get(tfm_file); a:=tfm_file^;qw.b0:=a+0;get(tfm_file);b:=tfm_file^;qw.b1:=b+0; get(tfm_file);c:=tfm_file^;qw.b2:=c+0;get(tfm_file);d:=tfm_file^; qw.b3:=d+0;font_info[k].qqqq:=qw;end; if(a>=nw)or(b div 16>=nh)or(b mod 16>=nd)or(c div 4>=ni)then goto 11; case c mod 4 of 1:if d>=nl then goto 11;3:if d>=ne then goto 11; 2:{570:}begin begin if(dec)then goto 11 end; while d2 then goto 45;d:=qw.b3-0;end; if d=k+bc-fmem_ptr then goto 11;45:end{:570};others:end;end{:569}; {571:}begin{572:}begin alpha:=16;while z>=8388608 do begin z:=z div 2; alpha:=alpha+alpha;end;beta:=256 div alpha;alpha:=alpha*z;end{:572}; for k:=width_base[f]to lig_kern_base[f]-1 do begin get(tfm_file); a:=tfm_file^;get(tfm_file);b:=tfm_file^;get(tfm_file);c:=tfm_file^; get(tfm_file);d:=tfm_file^; sw:=(((((d*z)div 256)+(c*z))div 256)+(b*z))div beta; if a=0 then font_info[k].int:=sw else if a=255 then font_info[k].int:=sw -alpha else goto 11;end;if font_info[width_base[f]].int<>0 then goto 11; if font_info[height_base[f]].int<>0 then goto 11; if font_info[depth_base[f]].int<>0 then goto 11; if font_info[italic_base[f]].int<>0 then goto 11;end{:571}; {573:}bch_label:=32767;bchar:=256; if nl>0 then begin for k:=lig_kern_base[f]to kern_base[f]+256*(128)-1 do begin begin get(tfm_file);a:=tfm_file^;qw.b0:=a+0;get(tfm_file); b:=tfm_file^;qw.b1:=b+0;get(tfm_file);c:=tfm_file^;qw.b2:=c+0; get(tfm_file);d:=tfm_file^;qw.b3:=d+0;font_info[k].qqqq:=qw;end; if a>128 then begin if 256*c+d>=nl then goto 11; if a=255 then if k=lig_kern_base[f]then bchar:=b; end else begin if b<>bchar then begin begin if(bec)then goto 11 end;qw:=font_info[char_base[f]+b].qqqq;if not(qw.b0>0)then goto 11;end; if c<128 then begin begin if(dec)then goto 11 end; qw:=font_info[char_base[f]+d].qqqq;if not(qw.b0>0)then goto 11; end else if 256*(c-128)+d>=nk then goto 11; if a<128 then if k-lig_kern_base[f]+a+1>=nl then goto 11;end;end; if a=255 then bch_label:=256*c+d;end; for k:=kern_base[f]+256*(128)to exten_base[f]-1 do begin get(tfm_file); a:=tfm_file^;get(tfm_file);b:=tfm_file^;get(tfm_file);c:=tfm_file^; get(tfm_file);d:=tfm_file^; sw:=(((((d*z)div 256)+(c*z))div 256)+(b*z))div beta; if a=0 then font_info[k].int:=sw else if a=255 then font_info[k].int:=sw -alpha else goto 11;end;{:573}; {574:}for k:=exten_base[f]to param_base[f]-1 do begin begin get(tfm_file );a:=tfm_file^;qw.b0:=a+0;get(tfm_file);b:=tfm_file^;qw.b1:=b+0; get(tfm_file);c:=tfm_file^;qw.b2:=c+0;get(tfm_file);d:=tfm_file^; qw.b3:=d+0;font_info[k].qqqq:=qw;end; if a<>0 then begin begin if(aec)then goto 11 end; qw:=font_info[char_base[f]+a].qqqq;if not(qw.b0>0)then goto 11;end; if b<>0 then begin begin if(bec)then goto 11 end; qw:=font_info[char_base[f]+b].qqqq;if not(qw.b0>0)then goto 11;end; if c<>0 then begin begin if(cec)then goto 11 end; qw:=font_info[char_base[f]+c].qqqq;if not(qw.b0>0)then goto 11;end; begin begin if(dec)then goto 11 end; qw:=font_info[char_base[f]+d].qqqq;if not(qw.b0>0)then goto 11;end; end{:574};{575:}begin for k:=1 to np do if k=1 then begin get(tfm_file); sw:=tfm_file^;if sw>127 then sw:=sw-256;get(tfm_file); sw:=sw*256+tfm_file^;get(tfm_file);sw:=sw*256+tfm_file^;get(tfm_file); font_info[param_base[f]].int:=(sw*16)+(tfm_file^div 16); end else begin get(tfm_file);a:=tfm_file^;get(tfm_file);b:=tfm_file^; get(tfm_file);c:=tfm_file^;get(tfm_file);d:=tfm_file^; sw:=(((((d*z)div 256)+(c*z))div 256)+(b*z))div beta; if a=0 then font_info[param_base[f]+k-1].int:=sw else if a=255 then font_info[param_base[f]+k-1].int:=sw-alpha else goto 11;end; if eof(tfm_file)then goto 11; for k:=np+1 to 7 do font_info[param_base[f]+k-1].int:=0;end{:575}; {576:}if np>=7 then font_params[f]:=np else font_params[f]:=7; hyphen_char[f]:=eqtb[5314].int;skew_char[f]:=eqtb[5315].int; if bch_label=bc then begin qw:=font_info[char_base[f]+ bchar].qqqq;if(qw.b0>0)then font_false_bchar[f]:=256;end; font_name[f]:=nom;font_area[f]:=aire;font_bc[f]:=bc;font_ec[f]:=ec; font_glue[f]:=0;char_base[f]:=char_base[f]-0; width_base[f]:=width_base[f]-0;lig_kern_base[f]:=lig_kern_base[f]-0; kern_base[f]:=kern_base[f]-0;exten_base[f]:=exten_base[f]-0; param_base[f]:=param_base[f]-1;fmem_ptr:=fmem_ptr+lf;font_ptr:=f;g:=f; goto 30{:576}{:562};11:{561:}begin if interaction=3 then;print_nl(263); print(813);end;sprint_cs(u);print_char(61); print_file_name(nom,aire,339);if s>=0 then begin print(751); print_scaled(s);print(400);end else if s<>-1000 then begin print(814); print_int(-s);end;if file_opened then print(815)else print(816); begin help_ptr:=5;help_line[4]:=817;help_line[3]:=818;help_line[2]:=819; help_line[1]:=820;help_line[0]:=821;end;error{:561}; 30:if file_opened then b_close(tfm_file);read_font_info:=g;end; {:560}{581:}procedure char_warning(f:internal_font_number;c:eight_bits); var old_setting:integer; begin if eqtb[5303].int>0 then begin old_setting:=eqtb[5297].int; if(eTeX_mode=1)and(eqtb[5303].int>1)then eqtb[5297].int:=1; begin begin_diagnostic;print_nl(836);print(c);print(837); slow_print(font_name[f]);print_char(33);end_diagnostic(false);end; eqtb[5297].int:=old_setting;end;end; {:581}{582:}function new_character(f:internal_font_number; c:eight_bits):halfword;label 10;var p:halfword; begin if font_bc[f]<=c then if font_ec[f]>=c then if(font_info[char_base [f]+c+0].qqqq.b0>0)then begin p:=get_avail;mem[p].hh.b0:=f; mem[p].hh.b1:=c+0;new_character:=p;goto 10;end;char_warning(f,c); new_character:=0;10:end;{:582}{597:}procedure write_dvi(a,b:dvi_index); var k:dvi_index;begin for k:=a to b do write(dvi_file,dvi_buf[k]);end; {:597}{598:}procedure dvi_swap; begin if dvi_limit=dvi_buf_size then begin write_dvi(0,half_buf-1); dvi_limit:=half_buf;dvi_offset:=dvi_offset+dvi_buf_size;dvi_ptr:=0; end else begin write_dvi(half_buf,dvi_buf_size-1); dvi_limit:=dvi_buf_size;end;dvi_gone:=dvi_gone+half_buf;end; {:598}{600:}procedure dvi_four(x:integer); begin if x>=0 then begin dvi_buf[dvi_ptr]:=x div 16777216; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap; end else begin x:=x+1073741824;x:=x+1073741824; begin dvi_buf[dvi_ptr]:=(x div 16777216)+128;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;end;x:=x mod 16777216; begin dvi_buf[dvi_ptr]:=x div 65536;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;x:=x mod 65536; begin dvi_buf[dvi_ptr]:=x div 256;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=x mod 256;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;end; {:600}{601:}procedure dvi_pop(l:integer); begin if(l=dvi_offset+dvi_ptr)and(dvi_ptr>0)then dvi_ptr:=dvi_ptr-1 else begin dvi_buf[dvi_ptr]:=142;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;end; {:601}{602:}procedure dvi_font_def(f:internal_font_number); var k:pool_pointer;begin begin dvi_buf[dvi_ptr]:=243;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;begin dvi_buf[dvi_ptr]:=f-1; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=font_check[f].b0-0;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=font_check[f].b1-0;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=font_check[f].b2-0;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=font_check[f].b3-0;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;dvi_four(font_size[f]); dvi_four(font_dsize[f]); begin dvi_buf[dvi_ptr]:=(str_start[font_area[f]+1]-str_start[font_area[f ]]);dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=(str_start[font_name[f]+1]-str_start[font_name[f ]]);dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; {603:}for k:=str_start[font_area[f]]to str_start[font_area[f]+1]-1 do begin dvi_buf[dvi_ptr]:=str_pool[k];dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; for k:=str_start[font_name[f]]to str_start[font_name[f]+1]-1 do begin dvi_buf[dvi_ptr]:=str_pool[k];dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end{:603};end; {:602}{607:}procedure movement(w:scaled;o:eight_bits); label 10,40,45,2,1;var mstate:small_number;p,q:halfword;k:integer; begin q:=get_node(3);mem[q+1].int:=w;mem[q+2].int:=dvi_offset+dvi_ptr; if o=157 then begin mem[q].hh.rh:=down_ptr;down_ptr:=q; end else begin mem[q].hh.rh:=right_ptr;right_ptr:=q;end; {611:}p:=mem[q].hh.rh;mstate:=0; while p<>0 do begin if mem[p+1].int=w then{612:}case mstate+mem[p].hh.lh of 3,4,15,16:if mem[p+2].int=8388608 then begin begin dvi_buf[dvi_ptr]:=o+3; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end;dvi_four(w); goto 10;end;if abs(w)>=32768 then begin begin dvi_buf[dvi_ptr]:=o+2; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; if w<0 then w:=w+16777216;begin dvi_buf[dvi_ptr]:=w div 65536; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; w:=w mod 65536;goto 2;end; if abs(w)>=128 then begin begin dvi_buf[dvi_ptr]:=o+1; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; if w<0 then w:=w+65536;goto 2;end;begin dvi_buf[dvi_ptr]:=o; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; if w<0 then w:=w+256;goto 1;2:begin dvi_buf[dvi_ptr]:=w div 256; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; 1:begin dvi_buf[dvi_ptr]:=w mod 256;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;goto 10{:610}; 40:{609:}mem[q].hh.lh:=mem[p].hh.lh; if mem[q].hh.lh=1 then begin begin dvi_buf[dvi_ptr]:=o+4; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; while mem[q].hh.rh<>p do begin q:=mem[q].hh.rh; case mem[q].hh.lh of 3:mem[q].hh.lh:=5;4:mem[q].hh.lh:=6;others:end;end; end else begin begin dvi_buf[dvi_ptr]:=o+9;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; while mem[q].hh.rh<>p do begin q:=mem[q].hh.rh; case mem[q].hh.lh of 3:mem[q].hh.lh:=4;5:mem[q].hh.lh:=6;others:end;end; end{:609};10:end;{:607}{615:}procedure prune_movements(l:integer); label 30,10;var p:halfword; begin while down_ptr<>0 do begin if mem[down_ptr+2].int0 do begin if mem[right_ptr+2].intdvi_h then begin movement(cur_h-dvi_h,143);dvi_h:=cur_h; end;if cur_v<>dvi_v then begin movement(cur_v-dvi_v,157);dvi_v:=cur_v; end;old_setting:=selector;selector:=21; show_token_list(mem[mem[p+1].hh.rh].hh.rh,0,pool_size-pool_ptr); selector:=old_setting; begin if pool_ptr+1>pool_size then overflow(258,pool_size-init_pool_ptr) ;end; if(pool_ptr-str_start[str_ptr])<256 then begin begin dvi_buf[dvi_ptr]:= 239;dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=(pool_ptr-str_start[str_ptr]); dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; end else begin begin dvi_buf[dvi_ptr]:=242;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; dvi_four((pool_ptr-str_start[str_ptr]));end; for k:=str_start[str_ptr]to pool_ptr-1 do begin dvi_buf[dvi_ptr]:= str_pool[k];dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; pool_ptr:=str_start[str_ptr];end; {:1368}{1370:}procedure write_out(p:halfword);var old_setting:0..21; old_mode:integer;j:small_number;q,r:halfword;begin{1371:}q:=get_avail; mem[q].hh.lh:=637;r:=get_avail;mem[q].hh.rh:=r;mem[r].hh.lh:=6717; begin_token_list(q,4);begin_token_list(mem[p+1].hh.rh,16);q:=get_avail; mem[q].hh.lh:=379;begin_token_list(q,4);old_mode:=cur_list.mode_field; cur_list.mode_field:=0;cur_cs:=write_loc;q:=scan_toks(false,true); get_token;if cur_tok<>6717 then{1372:}begin begin if interaction=3 then; print_nl(263);print(1311);end;begin help_ptr:=2;help_line[1]:=1312; help_line[0]:=1024;end;error;repeat get_token;until cur_tok=6717; end{:1372};cur_list.mode_field:=old_mode;end_token_list{:1371}; old_setting:=selector;j:=mem[p+1].hh.lh; if write_open[j]then selector:=j else begin if(j=17)and(selector=19)then selector:=18;print_nl(339);end;token_show(def_ref);print_ln; flush_list(def_ref);selector:=old_setting;end; {:1370}{1373:}procedure out_what(p:halfword);var j:small_number; begin case mem[p].hh.b1 of 0,1,2:{1374:}if not doing_leaders then begin j:=mem[p+1].hh.lh; if mem[p].hh.b1=1 then write_out(p)else begin if write_open[j]then a_close(write_file[j]); if mem[p].hh.b1=2 then write_open[j]:=false else if j<16 then begin cur_name:=mem[p+1].hh.rh;cur_area:=mem[p+2].hh.lh; cur_ext:=mem[p+2].hh.rh;if cur_ext=339 then cur_ext:=802; pack_file_name(cur_name,cur_area,cur_ext); while not a_open_out(write_file[j])do prompt_file_name(1314,802); write_open[j]:=true;end;end;end{:1374};3:special_out(p);4:; others:confusion(1313)end;end; {:1373}{1450:}function new_edge(s:small_number;w:scaled):halfword; var p:halfword;begin p:=get_node(3);mem[p].hh.b0:=14;mem[p].hh.b1:=s; mem[p+1].int:=w;mem[p+2].int:=0;new_edge:=p;end; {:1450}{1454:}function reverse(this_box,t:halfword;var cur_g:scaled; var cur_glue:real):halfword;label 21,15,30;var l:halfword;p:halfword; q:halfword;g_order:glue_ord;g_sign:0..2;glue_temp:real;m,n:halfword; begin g_order:=mem[this_box+5].hh.b1;g_sign:=mem[this_box+5].hh.b0;l:=t; p:=temp_ptr;m:=0;n:=0; while true do begin while p<>0 do{1459:}21:if(p>=hi_mem_min)then repeat f:=mem[p].hh.b0;c:=mem[p].hh.b1; cur_h:=cur_h+font_info[width_base[f]+font_info[char_base[f]+c].qqqq.b0]. int;q:=mem[p].hh.rh;mem[p].hh.rh:=l;l:=p;p:=q; until not(p>=hi_mem_min)else{1460:}begin q:=mem[p].hh.rh; case mem[p].hh.b0 of 0,1,2,11:rule_wd:=mem[p+1].int; {1461:}10:begin g:=mem[p+1].hh.lh;rule_wd:=mem[g+1].int-cur_g; if g_sign<>0 then begin if g_sign=1 then begin if mem[g].hh.b0=g_order then begin cur_glue:=cur_glue+mem[g+2].int; glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end; end else if mem[g].hh.b1=g_order then begin cur_glue:=cur_glue-mem[g+3]. int;glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end;end;rule_wd:=rule_wd+cur_g; {1430:}if(((g_sign=1)and(mem[g].hh.b0=g_order))or((g_sign=2)and(mem[g]. hh.b1=g_order)))then begin begin if mem[g].hh.rh=0 then free_node(g,4) else mem[g].hh.rh:=mem[g].hh.rh-1;end; if mem[p].hh.b1<100 then begin mem[p].hh.b0:=11;mem[p+1].int:=rule_wd; end else begin g:=get_node(4);mem[g].hh.b0:=4;mem[g].hh.b1:=4; mem[g+1].int:=rule_wd;mem[g+2].int:=0;mem[g+3].int:=0;mem[p+1].hh.lh:=g; end;end{:1430};end; {:1461}{1462:}6:begin flush_node_list(mem[p+1].hh.rh);temp_ptr:=p; p:=get_avail;mem[p]:=mem[temp_ptr+1];mem[p].hh.rh:=q; free_node(temp_ptr,2);goto 21;end; {:1462}{1463:}9:begin rule_wd:=mem[p+1].int; if odd(mem[p].hh.b1)then if mem[LR_ptr].hh.lh<>(4*(mem[p].hh.b1 div 4)+3 )then begin mem[p].hh.b0:=11;LR_problems:=LR_problems+1; end else begin begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;{dyn_used:=dyn_used-1;} end;end;if n>0 then begin n:=n-1;mem[p].hh.b1:=mem[p].hh.b1-1; end else begin mem[p].hh.b0:=11; if m>0 then m:=m-1 else{1464:}begin free_node(p,2);mem[t].hh.rh:=q; mem[t+1].int:=rule_wd;mem[t+2].int:=-cur_h-rule_wd;goto 30;end{:1464}; end;end else begin begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[p].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end; if(n>0)or((mem[p].hh.b1 div 8)<>cur_dir)then begin n:=n+1; mem[p].hh.b1:=mem[p].hh.b1+1;end else begin mem[p].hh.b0:=11;m:=m+1;end; end;end;{:1463}14:confusion(1376);others:goto 15 end; cur_h:=cur_h+rule_wd;15:mem[p].hh.rh:=l; if mem[p].hh.b0=11 then if(rule_wd=0)or(l=0)then begin free_node(p,2); p:=l;end;l:=p;p:=q;end{:1460}{:1459}; if(t=0)and(m=0)and(n=0)then goto 30;p:=new_math(0,mem[LR_ptr].hh.lh); LR_problems:=LR_problems+10000;end;30:reverse:=l;end; {:1454}{1455:}{[1456:]function new_segment(s:small_number; f:halfword):halfword;var p:halfword;begin p:=get_node(3); mem[p].hh.b0:=14;mem[p].hh.b1:=s;mem[p+1].int:=0;mem[p+2].hh.lh:=f; mem[p+2].hh.rh:=f;new_segment:=p;end; [:1456][1458:]function has_whatsit(p:halfword):boolean;label 10; begin p:=mem[p+5].hh.rh;has_whatsit:=true; while p<>0 do begin if not(p>=hi_mem_min)then case mem[p].hh.b0 of 0,1: if has_whatsit(p)then goto 10;8:goto 10;others:end;p:=mem[p].hh.rh;end; has_whatsit:=false;10:end;[:1458]function reverse(this_box,t:halfword; var cur_g:scaled;var cur_glue:real):halfword;label 21,15,30; var l:halfword;p:halfword;q:halfword;g_order:glue_ord;g_sign:0..2; glue_temp:real;m,n:halfword;begin g_order:=mem[this_box+5].hh.b1; g_sign:=mem[this_box+5].hh.b0;[1457:]begin end[:1457];l:=t;p:=temp_ptr; m:=0;n:=0; while true do begin while p<>0 do[1459:]21:if(p>=hi_mem_min)then repeat f:=mem[p].hh.b0;c:=mem[p].hh.b1; cur_h:=cur_h+font_info[width_base[f]+font_info[char_base[f]+c].qqqq.b0]. int;q:=mem[p].hh.rh;mem[p].hh.rh:=l;l:=p;p:=q; until not(p>=hi_mem_min)else[1460:]begin q:=mem[p].hh.rh; case mem[p].hh.b0 of 0,1,2,11:rule_wd:=mem[p+1].int; [1461:]10:begin g:=mem[p+1].hh.lh;rule_wd:=mem[g+1].int-cur_g; if g_sign<>0 then begin if g_sign=1 then begin if mem[g].hh.b0=g_order then begin cur_glue:=cur_glue+mem[g+2].int; glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end; end else if mem[g].hh.b1=g_order then begin cur_glue:=cur_glue-mem[g+3]. int;glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end;end;rule_wd:=rule_wd+cur_g; [1430:]if(((g_sign=1)and(mem[g].hh.b0=g_order))or((g_sign=2)and(mem[g]. hh.b1=g_order)))then begin begin if mem[g].hh.rh=0 then free_node(g,4) else mem[g].hh.rh:=mem[g].hh.rh-1;end; if mem[p].hh.b1<100 then begin mem[p].hh.b0:=11;mem[p+1].int:=rule_wd; end else begin g:=get_node(4);mem[g].hh.b0:=4;mem[g].hh.b1:=4; mem[g+1].int:=rule_wd;mem[g+2].int:=0;mem[g+3].int:=0;mem[p+1].hh.lh:=g; end;end[:1430];end; [:1461][1462:]6:begin flush_node_list(mem[p+1].hh.rh);temp_ptr:=p; p:=get_avail;mem[p]:=mem[temp_ptr+1];mem[p].hh.rh:=q; free_node(temp_ptr,2);goto 21;end; [:1462][1463:]9:begin rule_wd:=mem[p+1].int; if odd(mem[p].hh.b1)then if mem[LR_ptr].hh.lh<>(4*(mem[p].hh.b1 div 4)+3 )then begin mem[p].hh.b0:=11;LR_problems:=LR_problems+1; end else begin begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;[dyn_used:=dyn_used-1; ]end;end;if n>0 then begin n:=n-1;mem[p].hh.b1:=mem[p].hh.b1-1; end else begin mem[p].hh.b0:=11; if m>0 then m:=m-1 else[1464:]begin free_node(p,2);mem[t].hh.rh:=q; mem[t+1].int:=rule_wd;mem[t+2].int:=-cur_h-rule_wd;goto 30;end[:1464]; end;end else begin begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[p].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end; if(n>0)or((mem[p].hh.b1 div 8)<>cur_dir)then begin n:=n+1; mem[p].hh.b1:=mem[p].hh.b1+1;end else begin mem[p].hh.b0:=11;m:=m+1;end; end;end;[:1463]14:confusion(1376);others:goto 15 end; cur_h:=cur_h+rule_wd;15:mem[p].hh.rh:=l; if mem[p].hh.b0=11 then if(rule_wd=0)or(l=0)then begin free_node(p,2); p:=l;end;l:=p;p:=q;end[:1460][:1459]; if(t=0)and(m=0)and(n=0)then goto 30;p:=new_math(0,mem[LR_ptr].hh.lh); LR_problems:=LR_problems+10000;end;30:reverse:=l;end;} {:1455}procedure hlist_out;label 21,13,14,15;var base_line:scaled; left_edge:scaled;save_h,save_v:scaled;this_box:halfword; g_order:glue_ord;g_sign:0..2;p:halfword;save_loc:integer; leader_box:halfword;leader_wd:scaled;lx:scaled; outer_doing_leaders:boolean;edge:scaled;prev_p:halfword;glue_temp:real; cur_glue:real;cur_g:scaled;begin cur_g:=0;cur_glue:=0.0; this_box:=temp_ptr;g_order:=mem[this_box+5].hh.b1; g_sign:=mem[this_box+5].hh.b0;p:=mem[this_box+5].hh.rh;cur_s:=cur_s+1; if cur_s>0 then begin dvi_buf[dvi_ptr]:=141;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; if cur_s>max_push then max_push:=cur_s;save_loc:=dvi_offset+dvi_ptr; base_line:=cur_v;prev_p:=this_box+5; {1445:}if(eTeX_mode=1)then begin{1441:}begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=0;mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr; end{:1441}; if(mem[this_box].hh.b1-0)=2 then if cur_dir=1 then begin cur_dir:=0; cur_h:=cur_h-mem[this_box+1].int;end else mem[this_box].hh.b1:=0; if(cur_dir=1)and((mem[this_box].hh.b1-0)<>1)then{1452:}begin save_h:= cur_h;temp_ptr:=p;p:=new_kern(0);mem[prev_p].hh.rh:=p;cur_h:=0; mem[p].hh.rh:=reverse(this_box,0,cur_g,cur_glue);mem[p+1].int:=-cur_h; cur_h:=save_h;mem[this_box].hh.b1:=1;end{:1452};end{:1445}; left_edge:=cur_h; while p<>0 do{620:}21:if(p>=hi_mem_min)then begin if cur_h<>dvi_h then begin movement(cur_h-dvi_h,143);dvi_h:=cur_h;end; if cur_v<>dvi_v then begin movement(cur_v-dvi_v,157);dvi_v:=cur_v;end; repeat f:=mem[p].hh.b0;c:=mem[p].hh.b1; if f<>dvi_f then{621:}begin if not font_used[f]then begin dvi_font_def(f );font_used[f]:=true;end;if f<=64 then begin dvi_buf[dvi_ptr]:=f+170; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap; end else begin begin dvi_buf[dvi_ptr]:=235;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;begin dvi_buf[dvi_ptr]:=f-1; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end;end;dvi_f:=f; end{:621};if c>=128 then begin dvi_buf[dvi_ptr]:=128;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;begin dvi_buf[dvi_ptr]:=c-0; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; cur_h:=cur_h+font_info[width_base[f]+font_info[char_base[f]+c].qqqq.b0]. int;prev_p:=mem[prev_p].hh.rh;p:=mem[p].hh.rh;until not(p>=hi_mem_min); dvi_h:=cur_h; end else{622:}begin case mem[p].hh.b0 of 0,1:{623:}if mem[p+5].hh.rh=0 then cur_h:=cur_h+mem[p+1].int else begin save_h:=dvi_h;save_v:=dvi_v; cur_v:=base_line+mem[p+4].int;temp_ptr:=p;edge:=cur_h+mem[p+1].int; if cur_dir=1 then cur_h:=edge; if mem[p].hh.b0=1 then vlist_out else hlist_out;dvi_h:=save_h; dvi_v:=save_v;cur_h:=edge;cur_v:=base_line;end{:623}; 2:begin rule_ht:=mem[p+3].int;rule_dp:=mem[p+2].int; rule_wd:=mem[p+1].int;goto 14;end;8:{1367:}out_what(p){:1367}; 10:{625:}begin g:=mem[p+1].hh.lh;rule_wd:=mem[g+1].int-cur_g; if g_sign<>0 then begin if g_sign=1 then begin if mem[g].hh.b0=g_order then begin cur_glue:=cur_glue+mem[g+2].int; glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end; end else if mem[g].hh.b1=g_order then begin cur_glue:=cur_glue-mem[g+3]. int;glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end;end;rule_wd:=rule_wd+cur_g; if(eTeX_mode=1)then{1430:}if(((g_sign=1)and(mem[g].hh.b0=g_order))or(( g_sign=2)and(mem[g].hh.b1=g_order)))then begin begin if mem[g].hh.rh=0 then free_node(g,4)else mem[g].hh.rh:=mem[g].hh.rh-1;end; if mem[p].hh.b1<100 then begin mem[p].hh.b0:=11;mem[p+1].int:=rule_wd; end else begin g:=get_node(4);mem[g].hh.b0:=4;mem[g].hh.b1:=4; mem[g+1].int:=rule_wd;mem[g+2].int:=0;mem[g+3].int:=0;mem[p+1].hh.lh:=g; end;end{:1430}; if mem[p].hh.b1>=100 then{626:}begin leader_box:=mem[p+1].hh.rh; if mem[leader_box].hh.b0=2 then begin rule_ht:=mem[leader_box+3].int; rule_dp:=mem[leader_box+2].int;goto 14;end; leader_wd:=mem[leader_box+1].int; if(leader_wd>0)and(rule_wd>0)then begin rule_wd:=rule_wd+10; if cur_dir=1 then cur_h:=cur_h-10;edge:=cur_h+rule_wd;lx:=0; {627:}if mem[p].hh.b1=100 then begin save_h:=cur_h; cur_h:=left_edge+leader_wd*((cur_h-left_edge)div leader_wd); if cur_hdvi_v then begin movement(cur_v-dvi_v,157); dvi_v:=cur_v;end;save_v:=dvi_v; if cur_h<>dvi_h then begin movement(cur_h-dvi_h,143);dvi_h:=cur_h;end; save_h:=dvi_h;temp_ptr:=leader_box; if cur_dir=1 then cur_h:=cur_h+leader_wd; outer_doing_leaders:=doing_leaders;doing_leaders:=true; if mem[leader_box].hh.b0=1 then vlist_out else hlist_out; doing_leaders:=outer_doing_leaders;dvi_v:=save_v;dvi_h:=save_h; cur_v:=base_line;cur_h:=save_h+leader_wd+lx;end{:628}; if cur_dir=1 then cur_h:=edge else cur_h:=edge-10;goto 15;end;end{:626}; goto 13;end{:625};11:cur_h:=cur_h+mem[p+1].int; 9:{1447:}begin if(eTeX_mode=1)then{1448:}begin if odd(mem[p].hh.b1)then if mem[LR_ptr].hh.lh=(4*(mem[p].hh.b1 div 4)+3)then begin temp_ptr:= LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh;begin mem[temp_ptr].hh.rh:=avail; avail:=temp_ptr;{dyn_used:=dyn_used-1;}end; end else begin if mem[p].hh.b1>4 then LR_problems:=LR_problems+1; end else begin begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[p].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end; if(mem[p].hh.b1 div 8)<>cur_dir then{1453:}begin save_h:=cur_h; temp_ptr:=mem[p].hh.rh;rule_wd:=mem[p+1].int;free_node(p,2); cur_dir:=1-cur_dir;p:=new_edge(cur_dir,rule_wd);mem[prev_p].hh.rh:=p; cur_h:=cur_h-left_edge+rule_wd; mem[p].hh.rh:=reverse(this_box,new_edge(1-cur_dir,0),cur_g,cur_glue); mem[p+2].int:=cur_h;cur_dir:=1-cur_dir;cur_h:=save_h;goto 21;end{:1453}; end;mem[p].hh.b0:=11;end{:1448};cur_h:=cur_h+mem[p+1].int;end{:1447}; 6:{652:}begin mem[29988]:=mem[p+1];mem[29988].hh.rh:=mem[p].hh.rh; p:=29988;goto 21;end{:652};{1451:}14:begin cur_h:=cur_h+mem[p+1].int; left_edge:=cur_h+mem[p+2].int;cur_dir:=mem[p].hh.b1;end; {:1451}others:end;goto 15; 14:{624:}if(rule_ht=-1073741824)then rule_ht:=mem[this_box+3].int; if(rule_dp=-1073741824)then rule_dp:=mem[this_box+2].int; rule_ht:=rule_ht+rule_dp; if(rule_ht>0)and(rule_wd>0)then begin if cur_h<>dvi_h then begin movement(cur_h-dvi_h,143);dvi_h:=cur_h;end;cur_v:=base_line+rule_dp; if cur_v<>dvi_v then begin movement(cur_v-dvi_v,157);dvi_v:=cur_v;end; begin dvi_buf[dvi_ptr]:=132;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;dvi_four(rule_ht); dvi_four(rule_wd);cur_v:=base_line;dvi_h:=dvi_h+rule_wd;end{:624}; 13:cur_h:=cur_h+rule_wd;15:prev_p:=p;p:=mem[p].hh.rh;end{:622}{:620}; {1446:}if(eTeX_mode=1)then begin{1449:}begin while mem[LR_ptr].hh.lh<>0 do begin if mem[LR_ptr].hh.lh>4 then LR_problems:=LR_problems+10000; begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;{dyn_used:=dyn_used-1;} end;end;end;begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;{dyn_used:=dyn_used-1;} end;end;end{:1449};if(mem[this_box].hh.b1-0)=2 then cur_dir:=1; end{:1446};prune_movements(save_loc);if cur_s>0 then dvi_pop(save_loc); cur_s:=cur_s-1;end;{:619}{629:}procedure vlist_out;label 13,14,15; var left_edge:scaled;top_edge:scaled;save_h,save_v:scaled; this_box:halfword;g_order:glue_ord;g_sign:0..2;p:halfword; save_loc:integer;leader_box:halfword;leader_ht:scaled;lx:scaled; outer_doing_leaders:boolean;edge:scaled;glue_temp:real;cur_glue:real; cur_g:scaled;begin cur_g:=0;cur_glue:=0.0;this_box:=temp_ptr; g_order:=mem[this_box+5].hh.b1;g_sign:=mem[this_box+5].hh.b0; p:=mem[this_box+5].hh.rh;cur_s:=cur_s+1; if cur_s>0 then begin dvi_buf[dvi_ptr]:=141;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; if cur_s>max_push then max_push:=cur_s;save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h;cur_v:=cur_v-mem[this_box+3].int;top_edge:=cur_v; while p<>0 do{630:}begin if(p>=hi_mem_min)then confusion(839)else{631:} begin case mem[p].hh.b0 of 0,1:{632:}if mem[p+5].hh.rh=0 then cur_v:= cur_v+mem[p+3].int+mem[p+2].int else begin cur_v:=cur_v+mem[p+3].int; if cur_v<>dvi_v then begin movement(cur_v-dvi_v,157);dvi_v:=cur_v;end; save_h:=dvi_h;save_v:=dvi_v; if cur_dir=1 then cur_h:=left_edge-mem[p+4].int else cur_h:=left_edge+ mem[p+4].int;temp_ptr:=p; if mem[p].hh.b0=1 then vlist_out else hlist_out;dvi_h:=save_h; dvi_v:=save_v;cur_v:=save_v+mem[p+2].int;cur_h:=left_edge;end{:632}; 2:begin rule_ht:=mem[p+3].int;rule_dp:=mem[p+2].int; rule_wd:=mem[p+1].int;goto 14;end;8:{1366:}out_what(p){:1366}; 10:{634:}begin g:=mem[p+1].hh.lh;rule_ht:=mem[g+1].int-cur_g; if g_sign<>0 then begin if g_sign=1 then begin if mem[g].hh.b0=g_order then begin cur_glue:=cur_glue+mem[g+2].int; glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end; end else if mem[g].hh.b1=g_order then begin cur_glue:=cur_glue-mem[g+3]. int;glue_temp:=mem[this_box+6].gr*cur_glue; if glue_temp>1000000000.0 then glue_temp:=1000000000.0 else if glue_temp <-1000000000.0 then glue_temp:=-1000000000.0;cur_g:=round(glue_temp); end;end;rule_ht:=rule_ht+cur_g; if mem[p].hh.b1>=100 then{635:}begin leader_box:=mem[p+1].hh.rh; if mem[leader_box].hh.b0=2 then begin rule_wd:=mem[leader_box+1].int; rule_dp:=0;goto 14;end; leader_ht:=mem[leader_box+3].int+mem[leader_box+2].int; if(leader_ht>0)and(rule_ht>0)then begin rule_ht:=rule_ht+10; edge:=cur_v+rule_ht;lx:=0; {636:}if mem[p].hh.b1=100 then begin save_v:=cur_v; cur_v:=top_edge+leader_ht*((cur_v-top_edge)div leader_ht); if cur_vdvi_h then begin movement(cur_h-dvi_h,143);dvi_h:=cur_h; end;save_h:=dvi_h;cur_v:=cur_v+mem[leader_box+3].int; if cur_v<>dvi_v then begin movement(cur_v-dvi_v,157);dvi_v:=cur_v;end; save_v:=dvi_v;temp_ptr:=leader_box;outer_doing_leaders:=doing_leaders; doing_leaders:=true; if mem[leader_box].hh.b0=1 then vlist_out else hlist_out; doing_leaders:=outer_doing_leaders;dvi_v:=save_v;dvi_h:=save_h; cur_h:=left_edge;cur_v:=save_v-mem[leader_box+3].int+leader_ht+lx; end{:637};cur_v:=edge-10;goto 15;end;end{:635};goto 13;end{:634}; 11:cur_v:=cur_v+mem[p+1].int;others:end;goto 15; 14:{633:}if(rule_wd=-1073741824)then rule_wd:=mem[this_box+1].int; rule_ht:=rule_ht+rule_dp;cur_v:=cur_v+rule_ht; if(rule_ht>0)and(rule_wd>0)then begin if cur_dir=1 then cur_h:=cur_h- rule_wd;if cur_h<>dvi_h then begin movement(cur_h-dvi_h,143); dvi_h:=cur_h;end;if cur_v<>dvi_v then begin movement(cur_v-dvi_v,157); dvi_v:=cur_v;end;begin dvi_buf[dvi_ptr]:=137;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;dvi_four(rule_ht); dvi_four(rule_wd);cur_h:=left_edge;end;goto 15{:633}; 13:cur_v:=cur_v+rule_ht;end{:631};15:p:=mem[p].hh.rh;end{:630}; prune_movements(save_loc);if cur_s>0 then dvi_pop(save_loc); cur_s:=cur_s-1;end;{:629}{638:}procedure ship_out(p:halfword);label 30; var page_loc:integer;j,k:0..9;s:pool_pointer;old_setting:0..21; begin if eqtb[5302].int>0 then begin print_nl(339);print_ln;print(840); end; if term_offset>max_print_line-9 then print_ln else if(term_offset>0)or( file_offset>0)then print_char(32);print_char(91);j:=9; while(eqtb[5333+j].int=0)and(j>0)do j:=j-1; for k:=0 to j do begin print_int(eqtb[5333+k].int); if k0 then begin print_char(93);begin_diagnostic; show_box(p);end_diagnostic(true);end; {640:}{641:}if(mem[p+3].int>1073741823)or(mem[p+2].int>1073741823)or(mem [p+3].int+mem[p+2].int+eqtb[5864].int>1073741823)or(mem[p+1].int+eqtb[ 5863].int>1073741823)then begin begin if interaction=3 then; print_nl(263);print(844);end;begin help_ptr:=2;help_line[1]:=845; help_line[0]:=846;end;error; if eqtb[5302].int<=0 then begin begin_diagnostic;print_nl(847); show_box(p);end_diagnostic(true);end;goto 30;end; if mem[p+3].int+mem[p+2].int+eqtb[5864].int>max_v then max_v:=mem[p+3]. int+mem[p+2].int+eqtb[5864].int; if mem[p+1].int+eqtb[5863].int>max_h then max_h:=mem[p+1].int+eqtb[5863] .int{:641};{617:}dvi_h:=0;dvi_v:=0;cur_h:=eqtb[5863].int;dvi_f:=0; if output_file_name=0 then begin if job_name=0 then open_log_file; pack_job_name(805); while not b_open_out(dvi_file)do prompt_file_name(806,805); output_file_name:=b_make_name_string(dvi_file);end; if total_pages=0 then begin begin dvi_buf[dvi_ptr]:=247; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=2;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;dvi_four(25400000); dvi_four(473628672);prepare_mag;dvi_four(eqtb[5285].int); old_setting:=selector;selector:=21;print(838);print_int(eqtb[5291].int); print_char(46);print_two(eqtb[5290].int);print_char(46); print_two(eqtb[5289].int);print_char(58); print_two(eqtb[5288].int div 60);print_two(eqtb[5288].int mod 60); selector:=old_setting; begin dvi_buf[dvi_ptr]:=(pool_ptr-str_start[str_ptr]); dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; for s:=str_start[str_ptr]to pool_ptr-1 do begin dvi_buf[dvi_ptr]:= str_pool[s];dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; pool_ptr:=str_start[str_ptr];end{:617};page_loc:=dvi_offset+dvi_ptr; begin dvi_buf[dvi_ptr]:=139;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; for k:=0 to 9 do dvi_four(eqtb[5333+k].int);dvi_four(last_bop); last_bop:=page_loc;cur_v:=mem[p+3].int+eqtb[5864].int;temp_ptr:=p; if mem[p].hh.b0=1 then vlist_out else hlist_out; begin dvi_buf[dvi_ptr]:=140;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;total_pages:=total_pages+1; cur_s:=-1;30:{:640}; if(eTeX_mode=1)then{1465:}begin if LR_problems>0 then begin{1444:}begin print_ln;print_nl(1373);print_int(LR_problems div 10000);print(1374); print_int(LR_problems mod 10000);print(1375);LR_problems:=0;end{:1444}; print_char(41);print_ln;end; if(LR_ptr<>0)or(cur_dir<>0)then confusion(1377);end{:1465}; if eqtb[5302].int<=0 then print_char(93);dead_cycles:=0;break(term_out); {639:}{if eqtb[5299].int>1 then begin print_nl(841);print_int(var_used); print_char(38);print_int(dyn_used);print_char(59);end;} flush_node_list(p);{if eqtb[5299].int>1 then begin print(842); print_int(var_used);print_char(38);print_int(dyn_used);print(843); print_int(hi_mem_min-lo_mem_max-1);print_ln;end;}{:639};end; {:638}{645:}procedure scan_spec(c:group_code;three_codes:boolean); label 40;var s:integer;spec_code:0..1; begin if three_codes then s:=save_stack[save_ptr+0].int; if scan_keyword(853)then spec_code:=0 else if scan_keyword(854)then spec_code:=1 else begin spec_code:=1;cur_val:=0;goto 40;end; scan_dimen(false,false,false); 40:if three_codes then begin save_stack[save_ptr+0].int:=s; save_ptr:=save_ptr+1;end;save_stack[save_ptr+0].int:=spec_code; save_stack[save_ptr+1].int:=cur_val;save_ptr:=save_ptr+2; new_save_level(c);scan_left_brace;end; {:645}{649:}function hpack(p:halfword;w:scaled;m:small_number):halfword; label 21,50,10;var r:halfword;q:halfword;h,d,x:scaled;s:scaled; g:halfword;o:glue_ord;f:internal_font_number;i:four_quarters; hd:eight_bits;begin last_badness:=0;r:=get_node(7);mem[r].hh.b0:=0; mem[r].hh.b1:=0;mem[r+4].int:=0;q:=r+5;mem[q].hh.rh:=p;h:=0;{650:}d:=0; x:=0;total_stretch[0]:=0;total_shrink[0]:=0;total_stretch[1]:=0; total_shrink[1]:=0;total_stretch[2]:=0;total_shrink[2]:=0; total_stretch[3]:=0;total_shrink[3]:=0{:650}; if(eqtb[5332].int>0)then{1441:}begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=0;mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr; end{:1441}; while p<>0 do{651:}begin 21:while(p>=hi_mem_min)do{654:}begin f:=mem[p]. hh.b0;i:=font_info[char_base[f]+mem[p].hh.b1].qqqq;hd:=i.b1-0; x:=x+font_info[width_base[f]+i.b0].int; s:=font_info[height_base[f]+(hd)div 16].int;if s>h then h:=s; s:=font_info[depth_base[f]+(hd)mod 16].int;if s>d then d:=s; p:=mem[p].hh.rh;end{:654}; if p<>0 then begin case mem[p].hh.b0 of 0,1,2,13:{653:}begin x:=x+mem[p +1].int;if mem[p].hh.b0>=2 then s:=0 else s:=mem[p+4].int; if mem[p+3].int-s>h then h:=mem[p+3].int-s; if mem[p+2].int+s>d then d:=mem[p+2].int+s;end{:653}; 3,4,5:if adjust_tail<>0 then{655:}begin while mem[q].hh.rh<>p do q:=mem[ q].hh.rh; if mem[p].hh.b0=5 then begin mem[adjust_tail].hh.rh:=mem[p+1].int; while mem[adjust_tail].hh.rh<>0 do adjust_tail:=mem[adjust_tail].hh.rh; p:=mem[p].hh.rh;free_node(mem[q].hh.rh,2); end else begin mem[adjust_tail].hh.rh:=p;adjust_tail:=p;p:=mem[p].hh.rh; end;mem[q].hh.rh:=p;p:=q;end{:655};8:{1360:}{:1360}; 10:{656:}begin g:=mem[p+1].hh.lh;x:=x+mem[g+1].int;o:=mem[g].hh.b0; total_stretch[o]:=total_stretch[o]+mem[g+2].int;o:=mem[g].hh.b1; total_shrink[o]:=total_shrink[o]+mem[g+3].int; if mem[p].hh.b1>=100 then begin g:=mem[p+1].hh.rh; if mem[g+3].int>h then h:=mem[g+3].int; if mem[g+2].int>d then d:=mem[g+2].int;end;end{:656}; 11:x:=x+mem[p+1].int;9:begin x:=x+mem[p+1].int; if(eqtb[5332].int>0)then{1442:}if odd(mem[p].hh.b1)then if mem[LR_ptr]. hh.lh=(4*(mem[p].hh.b1 div 4)+3)then begin temp_ptr:=LR_ptr; LR_ptr:=mem[temp_ptr].hh.rh;begin mem[temp_ptr].hh.rh:=avail; avail:=temp_ptr;{dyn_used:=dyn_used-1;}end; end else begin LR_problems:=LR_problems+1;mem[p].hh.b0:=11; mem[p].hh.b1:=1;end else begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[p].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end{:1442};end; 6:{652:}begin mem[29988]:=mem[p+1];mem[29988].hh.rh:=mem[p].hh.rh; p:=29988;goto 21;end{:652};others:end;p:=mem[p].hh.rh;end;end{:651}; if adjust_tail<>0 then mem[adjust_tail].hh.rh:=0;mem[r+3].int:=h; mem[r+2].int:=d;{657:}if m=1 then w:=x+w;mem[r+1].int:=w;x:=w-x; if x=0 then begin mem[r+5].hh.b0:=0;mem[r+5].hh.b1:=0;mem[r+6].gr:=0.0; goto 10; end else if x>0 then{658:}begin{659:}if total_stretch[3]<>0 then o:=3 else if total_stretch[2]<>0 then o:=2 else if total_stretch[1]<>0 then o :=1 else o:=0{:659};mem[r+5].hh.b1:=o;mem[r+5].hh.b0:=1; if total_stretch[o]<>0 then mem[r+6].gr:=x/total_stretch[o]else begin mem[r+5].hh.b0:=0;mem[r+6].gr:=0.0;end; if o=0 then if mem[r+5].hh.rh<>0 then{660:}begin last_badness:=badness(x ,total_stretch[0]);if last_badness>eqtb[5294].int then begin print_ln; if last_badness>100 then print_nl(855)else print_nl(856);print(857); print_int(last_badness);goto 50;end;end{:660};goto 10; end{:658}else{664:}begin{665:}if total_shrink[3]<>0 then o:=3 else if total_shrink[2]<>0 then o:=2 else if total_shrink[1]<>0 then o:=1 else o :=0{:665};mem[r+5].hh.b1:=o;mem[r+5].hh.b0:=2; if total_shrink[o]<>0 then mem[r+6].gr:=(-x)/total_shrink[o]else begin mem[r+5].hh.b0:=0;mem[r+6].gr:=0.0;end; if(total_shrink[o]<-x)and(o=0)and(mem[r+5].hh.rh<>0)then begin last_badness:=1000000;mem[r+6].gr:=1.0; {666:}if(-x-total_shrink[0]>eqtb[5853].int)or(eqtb[5294].int<100)then begin if(eqtb[5861].int>0)and(-x-total_shrink[0]>eqtb[5853].int)then begin while mem[q].hh.rh<>0 do q:=mem[q].hh.rh;mem[q].hh.rh:=new_rule; mem[mem[q].hh.rh+1].int:=eqtb[5861].int;end;print_ln;print_nl(863); print_scaled(-x-total_shrink[0]);print(864);goto 50;end{:666}; end else if o=0 then if mem[r+5].hh.rh<>0 then{667:}begin last_badness:= badness(-x,total_shrink[0]); if last_badness>eqtb[5294].int then begin print_ln;print_nl(865); print_int(last_badness);goto 50;end;end{:667};goto 10;end{:664}{:657}; 50:{663:}if output_active then print(858)else begin if pack_begin_line<> 0 then begin if pack_begin_line>0 then print(859)else print(860); print_int(abs(pack_begin_line));print(861);end else print(862); print_int(line);end;print_ln;font_in_short_display:=0; short_display(mem[r+5].hh.rh);print_ln;begin_diagnostic;show_box(r); end_diagnostic(true){:663}; 10:if(eqtb[5332].int>0)then{1443:}begin if mem[LR_ptr].hh.lh<>0 then begin while mem[q].hh.rh<>0 do q:=mem[q].hh.rh;repeat temp_ptr:=q; q:=new_math(0,mem[LR_ptr].hh.lh);mem[temp_ptr].hh.rh:=q; LR_problems:=LR_problems+10000;begin temp_ptr:=LR_ptr; LR_ptr:=mem[temp_ptr].hh.rh;begin mem[temp_ptr].hh.rh:=avail; avail:=temp_ptr;{dyn_used:=dyn_used-1;}end;end; until mem[LR_ptr].hh.lh=0;end; if LR_problems>0 then begin{1444:}begin print_ln;print_nl(1373); print_int(LR_problems div 10000);print(1374); print_int(LR_problems mod 10000);print(1375);LR_problems:=0;end{:1444}; goto 50;end;begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;{dyn_used:=dyn_used-1;} end;end;if LR_ptr<>0 then confusion(1372);end{:1443};hpack:=r;end; {:649}{668:}function vpackage(p:halfword;h:scaled;m:small_number; l:scaled):halfword;label 50,10;var r:halfword;w,d,x:scaled;s:scaled; g:halfword;o:glue_ord;begin last_badness:=0;r:=get_node(7); mem[r].hh.b0:=1;mem[r].hh.b1:=0;mem[r+4].int:=0;mem[r+5].hh.rh:=p;w:=0; {650:}d:=0;x:=0;total_stretch[0]:=0;total_shrink[0]:=0; total_stretch[1]:=0;total_shrink[1]:=0;total_stretch[2]:=0; total_shrink[2]:=0;total_stretch[3]:=0;total_shrink[3]:=0{:650}; while p<>0 do{669:}begin if(p>=hi_mem_min)then confusion(866)else case mem[p].hh.b0 of 0,1,2,13:{670:}begin x:=x+d+mem[p+3].int; d:=mem[p+2].int;if mem[p].hh.b0>=2 then s:=0 else s:=mem[p+4].int; if mem[p+1].int+s>w then w:=mem[p+1].int+s;end{:670};8:{1359:}{:1359}; 10:{671:}begin x:=x+d;d:=0;g:=mem[p+1].hh.lh;x:=x+mem[g+1].int; o:=mem[g].hh.b0;total_stretch[o]:=total_stretch[o]+mem[g+2].int; o:=mem[g].hh.b1;total_shrink[o]:=total_shrink[o]+mem[g+3].int; if mem[p].hh.b1>=100 then begin g:=mem[p+1].hh.rh; if mem[g+1].int>w then w:=mem[g+1].int;end;end{:671}; 11:begin x:=x+d+mem[p+1].int;d:=0;end;others:end;p:=mem[p].hh.rh; end{:669};mem[r+1].int:=w;if d>l then begin x:=x+d-l;mem[r+2].int:=l; end else mem[r+2].int:=d;{672:}if m=1 then h:=x+h;mem[r+3].int:=h; x:=h-x;if x=0 then begin mem[r+5].hh.b0:=0;mem[r+5].hh.b1:=0; mem[r+6].gr:=0.0;goto 10; end else if x>0 then{673:}begin{659:}if total_stretch[3]<>0 then o:=3 else if total_stretch[2]<>0 then o:=2 else if total_stretch[1]<>0 then o :=1 else o:=0{:659};mem[r+5].hh.b1:=o;mem[r+5].hh.b0:=1; if total_stretch[o]<>0 then mem[r+6].gr:=x/total_stretch[o]else begin mem[r+5].hh.b0:=0;mem[r+6].gr:=0.0;end; if o=0 then if mem[r+5].hh.rh<>0 then{674:}begin last_badness:=badness(x ,total_stretch[0]);if last_badness>eqtb[5295].int then begin print_ln; if last_badness>100 then print_nl(855)else print_nl(856);print(867); print_int(last_badness);goto 50;end;end{:674};goto 10; end{:673}else{676:}begin{665:}if total_shrink[3]<>0 then o:=3 else if total_shrink[2]<>0 then o:=2 else if total_shrink[1]<>0 then o:=1 else o :=0{:665};mem[r+5].hh.b1:=o;mem[r+5].hh.b0:=2; if total_shrink[o]<>0 then mem[r+6].gr:=(-x)/total_shrink[o]else begin mem[r+5].hh.b0:=0;mem[r+6].gr:=0.0;end; if(total_shrink[o]<-x)and(o=0)and(mem[r+5].hh.rh<>0)then begin last_badness:=1000000;mem[r+6].gr:=1.0; {677:}if(-x-total_shrink[0]>eqtb[5854].int)or(eqtb[5295].int<100)then begin print_ln;print_nl(868);print_scaled(-x-total_shrink[0]); print(869);goto 50;end{:677}; end else if o=0 then if mem[r+5].hh.rh<>0 then{678:}begin last_badness:= badness(-x,total_shrink[0]); if last_badness>eqtb[5295].int then begin print_ln;print_nl(870); print_int(last_badness);goto 50;end;end{:678};goto 10;end{:676}{:672}; 50:{675:}if output_active then print(858)else begin if pack_begin_line<> 0 then begin print(860);print_int(abs(pack_begin_line));print(861); end else print(862);print_int(line);print_ln;end;begin_diagnostic; show_box(r);end_diagnostic(true){:675};10:vpackage:=r;end; {:668}{679:}procedure append_to_vlist(b:halfword);var d:scaled; p:halfword; begin if cur_list.aux_field.int>-65536000 then begin d:=mem[eqtb[2883]. hh.rh+1].int-cur_list.aux_field.int-mem[b+3].int; if d0)or(x<>0)then begin z:=z+s+16; repeat z:=z-16;g:=eqtb[3940+z].hh.rh;if g<>0 then{708:}begin y:=x; if(y-0>=font_bc[g])and(y-0<=font_ec[g])then begin 22:q:=font_info[ char_base[g]+y].qqqq; if(q.b0>0)then begin if((q.b2-0)mod 4)=3 then begin f:=g;c:=y;goto 40; end;hd:=q.b1-0; u:=font_info[height_base[g]+(hd)div 16].int+font_info[depth_base[g]+(hd) mod 16].int;if u>w then begin f:=g;c:=y;w:=u;if u>=v then goto 40;end; if((q.b2-0)mod 4)=2 then begin y:=q.b3;goto 22;end;end;end;end{:708}; until z<16;end{:707};if large_attempt then goto 40;large_attempt:=true; z:=mem[d].qqqq.b2;x:=mem[d].qqqq.b3;end; 40:if f<>0 then{710:}if((q.b2-0)mod 4)=3 then{713:}begin b:=new_null_box ;mem[b].hh.b0:=1;r:=font_info[exten_base[f]+q.b3].qqqq;{714:}c:=r.b3; u:=height_plus_depth(f,c);w:=0;q:=font_info[char_base[f]+c].qqqq; mem[b+1].int:=font_info[width_base[f]+q.b0].int+font_info[italic_base[f] +(q.b2-0)div 4].int;c:=r.b2;if c<>0 then w:=w+height_plus_depth(f,c); c:=r.b1;if c<>0 then w:=w+height_plus_depth(f,c);c:=r.b0; if c<>0 then w:=w+height_plus_depth(f,c);n:=0; if u>0 then while w0 then w:=w+u; end{:714};c:=r.b2;if c<>0 then stack_into_box(b,f,c);c:=r.b3; for m:=1 to n do stack_into_box(b,f,c);c:=r.b1; if c<>0 then begin stack_into_box(b,f,c);c:=r.b3; for m:=1 to n do stack_into_box(b,f,c);end;c:=r.b0; if c<>0 then stack_into_box(b,f,c);mem[b+2].int:=w-mem[b+3].int; end{:713}else b:=char_box(f,c){:710}else begin b:=new_null_box; mem[b+1].int:=eqtb[5856].int;end; mem[b+4].int:=half(mem[b+3].int-mem[b+2].int)-font_info[22+param_base[ eqtb[3942+s].hh.rh]].int;var_delimiter:=b;end; {:706}{715:}function rebox(b:halfword;w:scaled):halfword;var p:halfword; f:internal_font_number;v:scaled; begin if(mem[b+1].int<>w)and(mem[b+5].hh.rh<>0)then begin if mem[b].hh. b0=1 then b:=hpack(b,0,1);p:=mem[b+5].hh.rh; if((p>=hi_mem_min))and(mem[p].hh.rh=0)then begin f:=mem[p].hh.b0; v:=font_info[width_base[f]+font_info[char_base[f]+mem[p].hh.b1].qqqq.b0] .int;if v<>mem[b+1].int then mem[p].hh.rh:=new_kern(mem[b+1].int-v);end; free_node(b,7);b:=new_glue(12);mem[b].hh.rh:=p; while mem[p].hh.rh<>0 do p:=mem[p].hh.rh;mem[p].hh.rh:=new_glue(12); rebox:=hpack(b,w,0);end else begin mem[b+1].int:=w;rebox:=b;end;end; {:715}{716:}function math_glue(g:halfword;m:scaled):halfword; var p:halfword;n:integer;f:scaled;begin n:=x_over_n(m,65536); f:=remainder;if f<0 then begin n:=n-1;f:=f+65536;end;p:=get_node(4); mem[p+1].int:=mult_and_add(n,mem[g+1].int,xn_over_d(mem[g+1].int,f,65536 ),1073741823);mem[p].hh.b0:=mem[g].hh.b0; if mem[p].hh.b0=0 then mem[p+2].int:=mult_and_add(n,mem[g+2].int, xn_over_d(mem[g+2].int,f,65536),1073741823)else mem[p+2].int:=mem[g+2]. int;mem[p].hh.b1:=mem[g].hh.b1; if mem[p].hh.b1=0 then mem[p+3].int:=mult_and_add(n,mem[g+3].int, xn_over_d(mem[g+3].int,f,65536),1073741823)else mem[p+3].int:=mem[g+3]. int;math_glue:=p;end;{:716}{717:}procedure math_kern(p:halfword; m:scaled);var n:integer;f:scaled; begin if mem[p].hh.b1=99 then begin n:=x_over_n(m,65536);f:=remainder; if f<0 then begin n:=n-1;f:=f+65536;end; mem[p+1].int:=mult_and_add(n,mem[p+1].int,xn_over_d(mem[p+1].int,f,65536 ),1073741823);mem[p].hh.b1:=1;end;end;{:717}{718:}procedure flush_math; begin flush_node_list(mem[cur_list.head_field].hh.rh); flush_node_list(cur_list.aux_field.int); mem[cur_list.head_field].hh.rh:=0; cur_list.tail_field:=cur_list.head_field;cur_list.aux_field.int:=0;end; {:718}{720:}procedure mlist_to_hlist;forward; function clean_box(p:halfword;s:small_number):halfword;label 40; var q:halfword;save_style:small_number;x:halfword;r:halfword; begin case mem[p].hh.rh of 1:begin cur_mlist:=new_noad; mem[cur_mlist+1]:=mem[p];end;2:begin q:=mem[p].hh.lh;goto 40;end; 3:cur_mlist:=mem[p].hh.lh;others:begin q:=new_null_box;goto 40;end end; save_style:=cur_style;cur_style:=s;mlist_penalties:=false; mlist_to_hlist;q:=mem[29997].hh.rh;cur_style:=save_style; {703:}begin if cur_style<4 then cur_size:=0 else cur_size:=16*(( cur_style-2)div 2); cur_mu:=x_over_n(font_info[6+param_base[eqtb[3942+cur_size].hh.rh]].int, 18);end{:703}; 40:if(q>=hi_mem_min)or(q=0)then x:=hpack(q,0,1)else if(mem[q].hh.rh=0) and(mem[q].hh.b0<=1)and(mem[q+4].int=0)then x:=q else x:=hpack(q,0,1); {721:}q:=mem[x+5].hh.rh;if(q>=hi_mem_min)then begin r:=mem[q].hh.rh; if r<>0 then if mem[r].hh.rh=0 then if not(r>=hi_mem_min)then if mem[r]. hh.b0=11 then begin free_node(r,2);mem[q].hh.rh:=0;end;end{:721}; clean_box:=x;end;{:720}{722:}procedure fetch(a:halfword); begin cur_c:=mem[a].hh.b1;cur_f:=eqtb[3940+mem[a].hh.b0+cur_size].hh.rh; if cur_f=0 then{723:}begin begin if interaction=3 then;print_nl(263); print(339);end;print_size(cur_size);print_char(32); print_int(mem[a].hh.b0);print(896);print(cur_c-0);print_char(41); begin help_ptr:=4;help_line[3]:=897;help_line[2]:=898;help_line[1]:=899; help_line[0]:=900;end;error;cur_i:=null_character;mem[a].hh.rh:=0; end{:723}else begin if(cur_c-0>=font_bc[cur_f])and(cur_c-0<=font_ec[ cur_f])then cur_i:=font_info[char_base[cur_f]+cur_c].qqqq else cur_i:= null_character; if not((cur_i.b0>0))then begin char_warning(cur_f,cur_c-0); mem[a].hh.rh:=0;cur_i:=null_character;end;end;end; {:722}{726:}{734:}procedure make_over(q:halfword); begin mem[q+1].hh.lh:=overbar(clean_box(q+1,2*(cur_style div 2)+1),3* font_info[8+param_base[eqtb[3943+cur_size].hh.rh]].int,font_info[8+ param_base[eqtb[3943+cur_size].hh.rh]].int);mem[q+1].hh.rh:=2;end; {:734}{735:}procedure make_under(q:halfword);var p,x,y:halfword; delta:scaled;begin x:=clean_box(q+1,cur_style); p:=new_kern(3*font_info[8+param_base[eqtb[3943+cur_size].hh.rh]].int); mem[x].hh.rh:=p; mem[p].hh.rh:=fraction_rule(font_info[8+param_base[eqtb[3943+cur_size]. hh.rh]].int);y:=vpackage(x,0,1,1073741823); delta:=mem[y+3].int+mem[y+2].int+font_info[8+param_base[eqtb[3943+ cur_size].hh.rh]].int;mem[y+3].int:=mem[x+3].int; mem[y+2].int:=delta-mem[y+3].int;mem[q+1].hh.lh:=y;mem[q+1].hh.rh:=2; end;{:735}{736:}procedure make_vcenter(q:halfword);var v:halfword; delta:scaled;begin v:=mem[q+1].hh.lh; if mem[v].hh.b0<>1 then confusion(543);delta:=mem[v+3].int+mem[v+2].int; mem[v+3].int:=font_info[22+param_base[eqtb[3942+cur_size].hh.rh]].int+ half(delta);mem[v+2].int:=delta-mem[v+3].int;end; {:736}{737:}procedure make_radical(q:halfword);var x,y:halfword; delta,clr:scaled;begin x:=clean_box(q+1,2*(cur_style div 2)+1); if cur_style<2 then clr:=font_info[8+param_base[eqtb[3943+cur_size].hh. rh]].int+(abs(font_info[5+param_base[eqtb[3942+cur_size].hh.rh]].int)div 4)else begin clr:=font_info[8+param_base[eqtb[3943+cur_size].hh.rh]].int ;clr:=clr+(abs(clr)div 4);end; y:=var_delimiter(q+4,cur_size,mem[x+3].int+mem[x+2].int+clr+font_info[8+ param_base[eqtb[3943+cur_size].hh.rh]].int); delta:=mem[y+2].int-(mem[x+3].int+mem[x+2].int+clr); if delta>0 then clr:=clr+half(delta);mem[y+4].int:=-(mem[x+3].int+clr); mem[y].hh.rh:=overbar(x,clr,mem[y+3].int);mem[q+1].hh.lh:=hpack(y,0,1); mem[q+1].hh.rh:=2;end; {:737}{738:}procedure make_math_accent(q:halfword);label 30,31; var p,x,y:halfword;a:integer;c:quarterword;f:internal_font_number; i:four_quarters;s:scaled;h:scaled;delta:scaled;w:scaled; begin fetch(q+4);if(cur_i.b0>0)then begin i:=cur_i;c:=cur_c;f:=cur_f; {741:}s:=0;if mem[q+1].hh.rh=1 then begin fetch(q+1); if((cur_i.b2-0)mod 4)=1 then begin a:=lig_kern_base[cur_f]+cur_i.b3; cur_i:=font_info[a].qqqq; if cur_i.b0>128 then begin a:=lig_kern_base[cur_f]+256*cur_i.b2+cur_i.b3 +32768-256*(128);cur_i:=font_info[a].qqqq;end; while true do begin if cur_i.b1-0=skew_char[cur_f]then begin if cur_i.b2 >=128 then if cur_i.b0<=128 then s:=font_info[kern_base[cur_f]+256*cur_i .b2+cur_i.b3].int;goto 31;end;if cur_i.b0>=128 then goto 31; a:=a+cur_i.b0+1;cur_i:=font_info[a].qqqq;end;end;end;31:{:741}; x:=clean_box(q+1,2*(cur_style div 2)+1);w:=mem[x+1].int;h:=mem[x+3].int; {740:}while true do begin if((i.b2-0)mod 4)<>2 then goto 30;y:=i.b3; i:=font_info[char_base[f]+y].qqqq;if not(i.b0>0)then goto 30; if font_info[width_base[f]+i.b0].int>w then goto 30;c:=y;end;30:{:740}; if h0)or(mem[q+3].hh.rh<>0)then if mem[q+1].hh.rh=1 then {742:}begin flush_node_list(x);x:=new_noad;mem[x+1]:=mem[q+1]; mem[x+2]:=mem[q+2];mem[x+3]:=mem[q+3];mem[q+2].hh:=empty_field; mem[q+3].hh:=empty_field;mem[q+1].hh.rh:=3;mem[q+1].hh.lh:=x; x:=clean_box(q+1,cur_style);delta:=delta+mem[x+3].int-h;h:=mem[x+3].int; end{:742};y:=char_box(f,c);mem[y+4].int:=s+half(w-mem[y+1].int); mem[y+1].int:=0;p:=new_kern(-delta);mem[p].hh.rh:=x;mem[y].hh.rh:=p; y:=vpackage(y,0,1,1073741823);mem[y+1].int:=mem[x+1].int; if mem[y+3].int0 then shift_up:=font_info[9+param_base[eqtb[3942+ cur_size].hh.rh]].int else shift_up:=font_info[10+param_base[eqtb[3942+ cur_size].hh.rh]].int;end{:744}; if mem[q+1].int=0 then{745:}begin if cur_style<2 then clr:=7*font_info[ 8+param_base[eqtb[3943+cur_size].hh.rh]].int else clr:=3*font_info[8+ param_base[eqtb[3943+cur_size].hh.rh]].int; delta:=half(clr-((shift_up-mem[x+2].int)-(mem[z+3].int-shift_down))); if delta>0 then begin shift_up:=shift_up+delta; shift_down:=shift_down+delta;end; end{:745}else{746:}begin if cur_style<2 then clr:=3*mem[q+1].int else clr:=mem[q+1].int;delta:=half(mem[q+1].int); delta1:=clr-((shift_up-mem[x+2].int)-(font_info[22+param_base[eqtb[3942+ cur_size].hh.rh]].int+delta)); delta2:=clr-((font_info[22+param_base[eqtb[3942+cur_size].hh.rh]].int- delta)-(mem[z+3].int-shift_down)); if delta1>0 then shift_up:=shift_up+delta1; if delta2>0 then shift_down:=shift_down+delta2;end{:746}; {747:}v:=new_null_box;mem[v].hh.b0:=1; mem[v+3].int:=shift_up+mem[x+3].int; mem[v+2].int:=mem[z+2].int+shift_down;mem[v+1].int:=mem[x+1].int; if mem[q+1].int=0 then begin p:=new_kern((shift_up-mem[x+2].int)-(mem[z +3].int-shift_down));mem[p].hh.rh:=z; end else begin y:=fraction_rule(mem[q+1].int); p:=new_kern((font_info[22+param_base[eqtb[3942+cur_size].hh.rh]].int- delta)-(mem[z+3].int-shift_down));mem[y].hh.rh:=p;mem[p].hh.rh:=z; p:=new_kern((shift_up-mem[x+2].int)-(font_info[22+param_base[eqtb[3942+ cur_size].hh.rh]].int+delta));mem[p].hh.rh:=y;end;mem[x].hh.rh:=p; mem[v+5].hh.rh:=x{:747}; {748:}if cur_style<2 then delta:=font_info[20+param_base[eqtb[3942+ cur_size].hh.rh]].int else delta:=font_info[21+param_base[eqtb[3942+ cur_size].hh.rh]].int;x:=var_delimiter(q+4,cur_size,delta); mem[x].hh.rh:=v;z:=var_delimiter(q+5,cur_size,delta);mem[v].hh.rh:=z; mem[q+1].int:=hpack(x,0,1){:748};end; {:743}{749:}function make_op(q:halfword):scaled;var delta:scaled; p,v,x,y,z:halfword;c:quarterword;i:four_quarters; shift_up,shift_down:scaled; begin if(mem[q].hh.b1=0)and(cur_style<2)then mem[q].hh.b1:=1; if mem[q+1].hh.rh=1 then begin fetch(q+1); if(cur_style<2)and(((cur_i.b2-0)mod 4)=2)then begin c:=cur_i.b3; i:=font_info[char_base[cur_f]+c].qqqq;if(i.b0>0)then begin cur_c:=c; cur_i:=i;mem[q+1].hh.b1:=c;end;end; delta:=font_info[italic_base[cur_f]+(cur_i.b2-0)div 4].int; x:=clean_box(q+1,cur_style); if(mem[q+3].hh.rh<>0)and(mem[q].hh.b1<>1)then mem[x+1].int:=mem[x+1].int -delta; mem[x+4].int:=half(mem[x+3].int-mem[x+2].int)-font_info[22+param_base[ eqtb[3942+cur_size].hh.rh]].int;mem[q+1].hh.rh:=2;mem[q+1].hh.lh:=x; end else delta:=0; if mem[q].hh.b1=1 then{750:}begin x:=clean_box(q+2,2*(cur_style div 4) +4+(cur_style mod 2));y:=clean_box(q+1,cur_style); z:=clean_box(q+3,2*(cur_style div 4)+5);v:=new_null_box;mem[v].hh.b0:=1; mem[v+1].int:=mem[y+1].int; if mem[x+1].int>mem[v+1].int then mem[v+1].int:=mem[x+1].int; if mem[z+1].int>mem[v+1].int then mem[v+1].int:=mem[z+1].int; x:=rebox(x,mem[v+1].int);y:=rebox(y,mem[v+1].int); z:=rebox(z,mem[v+1].int);mem[x+4].int:=half(delta); mem[z+4].int:=-mem[x+4].int;mem[v+3].int:=mem[y+3].int; mem[v+2].int:=mem[y+2].int; {751:}if mem[q+2].hh.rh=0 then begin free_node(x,7);mem[v+5].hh.rh:=y; end else begin shift_up:=font_info[11+param_base[eqtb[3943+cur_size].hh. rh]].int-mem[x+2].int; if shift_up0 then if(mem[p].hh.b0>=16)and(mem[p].hh.b0<=22)then if mem[p+1]. hh.rh=1 then if mem[p+1].hh.b0=mem[q+1].hh.b0 then begin mem[q+1].hh.rh :=4;fetch(q+1); if((cur_i.b2-0)mod 4)=1 then begin a:=lig_kern_base[cur_f]+cur_i.b3; cur_c:=mem[p+1].hh.b1;cur_i:=font_info[a].qqqq; if cur_i.b0>128 then begin a:=lig_kern_base[cur_f]+256*cur_i.b2+cur_i.b3 +32768-256*(128);cur_i:=font_info[a].qqqq;end; while true do begin{753:}if cur_i.b1=cur_c then if cur_i.b0<=128 then if cur_i.b2>=128 then begin p:=new_kern(font_info[kern_base[cur_f]+256* cur_i.b2+cur_i.b3].int);mem[p].hh.rh:=mem[q].hh.rh;mem[q].hh.rh:=p; goto 10; end else begin begin if interrupt<>0 then pause_for_instructions;end; case cur_i.b2 of 1,5:mem[q+1].hh.b1:=cur_i.b3; 2,6:mem[p+1].hh.b1:=cur_i.b3;3,7,11:begin r:=new_noad; mem[r+1].hh.b1:=cur_i.b3;mem[r+1].hh.b0:=mem[q+1].hh.b0;mem[q].hh.rh:=r; mem[r].hh.rh:=p; if cur_i.b2<11 then mem[r+1].hh.rh:=1 else mem[r+1].hh.rh:=4;end; others:begin mem[q].hh.rh:=mem[p].hh.rh;mem[q+1].hh.b1:=cur_i.b3; mem[q+3]:=mem[p+3];mem[q+2]:=mem[p+2];free_node(p,4);end end; if cur_i.b2>3 then goto 10;mem[q+1].hh.rh:=1;goto 20;end{:753}; if cur_i.b0>=128 then goto 10;a:=a+cur_i.b0+1;cur_i:=font_info[a].qqqq; end;end;end;end;10:end;{:752}{756:}procedure make_scripts(q:halfword; delta:scaled);var p,x,y,z:halfword;shift_up,shift_down,clr:scaled; t:small_number;begin p:=mem[q+1].int; if(p>=hi_mem_min)then begin shift_up:=0;shift_down:=0; end else begin z:=hpack(p,0,1);if cur_style<4 then t:=16 else t:=32; shift_up:=mem[z+3].int-font_info[18+param_base[eqtb[3942+t].hh.rh]].int; shift_down:=mem[z+2].int+font_info[19+param_base[eqtb[3942+t].hh.rh]]. int;free_node(z,7);end; if mem[q+2].hh.rh=0 then{757:}begin x:=clean_box(q+3,2*(cur_style div 4) +5);mem[x+1].int:=mem[x+1].int+eqtb[5857].int; if shift_down0 then begin shift_down:=shift_down+clr; clr:=(abs(font_info[5+param_base[eqtb[3942+cur_size].hh.rh]].int*4)div 5 )-(shift_up-mem[x+2].int);if clr>0 then begin shift_up:=shift_up+clr; shift_down:=shift_down-clr;end;end;mem[x+4].int:=delta; p:=new_kern((shift_up-mem[x+2].int)-(mem[y+3].int-shift_down)); mem[x].hh.rh:=p;mem[p].hh.rh:=y;x:=vpackage(x,0,1,1073741823); mem[x+4].int:=shift_down;end{:759};end; if mem[q+1].int=0 then mem[q+1].int:=x else begin p:=mem[q+1].int; while mem[p].hh.rh<>0 do p:=mem[p].hh.rh;mem[p].hh.rh:=x;end;end; {:756}{762:}function make_left_right(q:halfword;style:small_number; max_d,max_h:scaled):small_number;var delta,delta1,delta2:scaled; begin cur_style:=style; {703:}begin if cur_style<4 then cur_size:=0 else cur_size:=16*(( cur_style-2)div 2); cur_mu:=x_over_n(font_info[6+param_base[eqtb[3942+cur_size].hh.rh]].int, 18);end{:703}; delta2:=max_d+font_info[22+param_base[eqtb[3942+cur_size].hh.rh]].int; delta1:=max_h+max_d-delta2;if delta2>delta1 then delta1:=delta2; delta:=(delta1 div 500)*eqtb[5286].int; delta2:=delta1+delta1-eqtb[5855].int;if delta0 do{727:}begin{728:}21:delta:=0; case mem[q].hh.b0 of 18:case r_type of 18,17,19,20,22,30:begin mem[q].hh .b0:=16;goto 21;end;others:end; 19,21,22,31:begin{729:}if r_type=18 then mem[r].hh.b0:=16{:729}; if mem[q].hh.b0=31 then goto 80;end;{733:}30:goto 80; 25:begin make_fraction(q);goto 82;end;17:begin delta:=make_op(q); if mem[q].hh.b1=1 then goto 82;end;16:make_ord(q);20,23:; 24:make_radical(q);27:make_over(q);26:make_under(q); 28:make_math_accent(q);29:make_vcenter(q); {:733}{730:}14:begin cur_style:=mem[q].hh.b1; {703:}begin if cur_style<4 then cur_size:=0 else cur_size:=16*(( cur_style-2)div 2); cur_mu:=x_over_n(font_info[6+param_base[eqtb[3942+cur_size].hh.rh]].int, 18);end{:703};goto 81;end; 15:{731:}begin case cur_style div 2 of 0:begin p:=mem[q+1].hh.lh; mem[q+1].hh.lh:=0;end;1:begin p:=mem[q+1].hh.rh;mem[q+1].hh.rh:=0;end; 2:begin p:=mem[q+2].hh.lh;mem[q+2].hh.lh:=0;end; 3:begin p:=mem[q+2].hh.rh;mem[q+2].hh.rh:=0;end;end; flush_node_list(mem[q+1].hh.lh);flush_node_list(mem[q+1].hh.rh); flush_node_list(mem[q+2].hh.lh);flush_node_list(mem[q+2].hh.rh); mem[q].hh.b0:=14;mem[q].hh.b1:=cur_style;mem[q+1].int:=0; mem[q+2].int:=0;if p<>0 then begin z:=mem[q].hh.rh;mem[q].hh.rh:=p; while mem[p].hh.rh<>0 do p:=mem[p].hh.rh;mem[p].hh.rh:=z;end;goto 81; end{:731};3,4,5,8,12,7:goto 81; 2:begin if mem[q+3].int>max_h then max_h:=mem[q+3].int; if mem[q+2].int>max_d then max_d:=mem[q+2].int;goto 81;end; 10:begin{732:}if mem[q].hh.b1=99 then begin x:=mem[q+1].hh.lh; y:=math_glue(x,cur_mu);delete_glue_ref(x);mem[q+1].hh.lh:=y; mem[q].hh.b1:=0; end else if(cur_size<>0)and(mem[q].hh.b1=98)then begin p:=mem[q].hh.rh; if p<>0 then if(mem[p].hh.b0=10)or(mem[p].hh.b0=11)then begin mem[q].hh. rh:=mem[p].hh.rh;mem[p].hh.rh:=0;flush_node_list(p);end;end{:732}; goto 81;end;11:begin math_kern(q,cur_mu);goto 81;end; {:730}others:confusion(901)end; {754:}case mem[q+1].hh.rh of 1,4:{755:}begin fetch(q+1); if(cur_i.b0>0)then begin delta:=font_info[italic_base[cur_f]+(cur_i.b2-0 )div 4].int;p:=new_character(cur_f,cur_c-0); if(mem[q+1].hh.rh=4)and(font_info[2+param_base[cur_f]].int<>0)then delta :=0; if(mem[q+3].hh.rh=0)and(delta<>0)then begin mem[p].hh.rh:=new_kern(delta );delta:=0;end;end else p:=0;end{:755};0:p:=0;2:p:=mem[q+1].hh.lh; 3:begin cur_mlist:=mem[q+1].hh.lh;save_style:=cur_style; mlist_penalties:=false;mlist_to_hlist;cur_style:=save_style; {703:}begin if cur_style<4 then cur_size:=0 else cur_size:=16*(( cur_style-2)div 2); cur_mu:=x_over_n(font_info[6+param_base[eqtb[3942+cur_size].hh.rh]].int, 18);end{:703};p:=hpack(mem[29997].hh.rh,0,1);end; others:confusion(902)end;mem[q+1].int:=p; if(mem[q+3].hh.rh=0)and(mem[q+2].hh.rh=0)then goto 82; make_scripts(q,delta){:754}{:728};82:z:=hpack(mem[q+1].int,0,1); if mem[z+3].int>max_h then max_h:=mem[z+3].int; if mem[z+2].int>max_d then max_d:=mem[z+2].int;free_node(z,7);80:r:=q; r_type:=mem[r].hh.b0;if r_type=31 then begin r_type:=30; cur_style:=style; {703:}begin if cur_style<4 then cur_size:=0 else cur_size:=16*(( cur_style-2)div 2); cur_mu:=x_over_n(font_info[6+param_base[eqtb[3942+cur_size].hh.rh]].int, 18);end{:703};end;81:q:=mem[q].hh.rh;end{:727}; {729:}if r_type=18 then mem[r].hh.b0:=16{:729};{760:}p:=29997; mem[p].hh.rh:=0;q:=mlist;r_type:=0;cur_style:=style; {703:}begin if cur_style<4 then cur_size:=0 else cur_size:=16*(( cur_style-2)div 2); cur_mu:=x_over_n(font_info[6+param_base[eqtb[3942+cur_size].hh.rh]].int, 18);end{:703};while q<>0 do begin{761:}t:=16;s:=4;pen:=10000; case mem[q].hh.b0 of 17,20,21,22,23:t:=mem[q].hh.b0;18:begin t:=18; pen:=eqtb[5277].int;end;19:begin t:=19;pen:=eqtb[5278].int;end; 16,29,27,26:;24:s:=5;28:s:=5;25:s:=6; 30,31:t:=make_left_right(q,style,max_d,max_h); 14:{763:}begin cur_style:=mem[q].hh.b1;s:=3; {703:}begin if cur_style<4 then cur_size:=0 else cur_size:=16*(( cur_style-2)div 2); cur_mu:=x_over_n(font_info[6+param_base[eqtb[3942+cur_size].hh.rh]].int, 18);end{:703};goto 83;end{:763}; 8,12,2,7,5,3,4,10,11:begin mem[p].hh.rh:=q;p:=q;q:=mem[q].hh.rh; mem[p].hh.rh:=0;goto 30;end;others:confusion(903)end{:761}; {766:}if r_type>0 then begin case str_pool[r_type*8+t+magic_offset]of 48 :x:=0;49:if cur_style<4 then x:=15 else x:=0;50:x:=15; 51:if cur_style<4 then x:=16 else x:=0; 52:if cur_style<4 then x:=17 else x:=0;others:confusion(905)end; if x<>0 then begin y:=math_glue(eqtb[2882+x].hh.rh,cur_mu); z:=new_glue(y);mem[y].hh.rh:=0;mem[p].hh.rh:=z;p:=z;mem[z].hh.b1:=x+1; end;end{:766}; {767:}if mem[q+1].int<>0 then begin mem[p].hh.rh:=mem[q+1].int; repeat p:=mem[p].hh.rh;until mem[p].hh.rh=0;end; if penalties then if mem[q].hh.rh<>0 then if pen<10000 then begin r_type :=mem[mem[q].hh.rh].hh.b0; if r_type<>12 then if r_type<>19 then begin z:=new_penalty(pen); mem[p].hh.rh:=z;p:=z;end;end{:767};if mem[q].hh.b0=31 then t:=20; r_type:=t;83:r:=q;q:=mem[q].hh.rh;free_node(r,s);30:end{:760};end; {:726}{772:}procedure push_alignment;var p:halfword; begin p:=get_node(5);mem[p].hh.rh:=align_ptr;mem[p].hh.lh:=cur_align; mem[p+1].hh.lh:=mem[29992].hh.rh;mem[p+1].hh.rh:=cur_span; mem[p+2].int:=cur_loop;mem[p+3].int:=align_state; mem[p+4].hh.lh:=cur_head;mem[p+4].hh.rh:=cur_tail;align_ptr:=p; cur_head:=get_avail;end;procedure pop_alignment;var p:halfword; begin begin mem[cur_head].hh.rh:=avail;avail:=cur_head; {dyn_used:=dyn_used-1;}end;p:=align_ptr;cur_tail:=mem[p+4].hh.rh; cur_head:=mem[p+4].hh.lh;align_state:=mem[p+3].int; cur_loop:=mem[p+2].int;cur_span:=mem[p+1].hh.rh; mem[29992].hh.rh:=mem[p+1].hh.lh;cur_align:=mem[p].hh.lh; align_ptr:=mem[p].hh.rh;free_node(p,5);end; {:772}{774:}{782:}procedure get_preamble_token;label 20; begin 20:get_token;while(cur_chr=256)and(cur_cmd=4)do begin get_token; if cur_cmd>100 then begin expand;get_token;end;end; if cur_cmd=9 then fatal_error(604); if(cur_cmd=75)and(cur_chr=2893)then begin scan_optional_equals; scan_glue(2); if eqtb[5311].int>0 then geq_define(2893,117,cur_val)else eq_define(2893 ,117,cur_val);goto 20;end;end;{:782}procedure align_peek;forward; procedure normal_paragraph;forward;procedure init_align; label 30,31,32,22;var save_cs_ptr:halfword;p:halfword; begin save_cs_ptr:=cur_cs;push_alignment;align_state:=-1000000; {776:}if(cur_list.mode_field=203)and((cur_list.tail_field<>cur_list. head_field)or(cur_list.aux_field.int<>0))then begin begin if interaction =3 then;print_nl(263);print(689);end;print_esc(523);print(906); begin help_ptr:=3;help_line[2]:=907;help_line[1]:=908;help_line[0]:=909; end;error;flush_math;end{:776};push_nest; {775:}if cur_list.mode_field=203 then begin cur_list.mode_field:=-1; cur_list.aux_field.int:=nest[nest_ptr-2].aux_field.int; end else if cur_list.mode_field>0 then cur_list.mode_field:=-cur_list. mode_field{:775};scan_spec(6,false);{777:}mem[29992].hh.rh:=0; cur_align:=29992;cur_loop:=0;scanner_status:=4; warning_index:=save_cs_ptr;align_state:=-1000000; while true do begin{778:}mem[cur_align].hh.rh:=new_param_glue(11); cur_align:=mem[cur_align].hh.rh{:778};if cur_cmd=5 then goto 30; {779:}{783:}p:=29996;mem[p].hh.rh:=0; while true do begin get_preamble_token;if cur_cmd=6 then goto 31; if(cur_cmd<=5)and(cur_cmd>=4)and(align_state=-1000000)then if(p=29996) and(cur_loop=0)and(cur_cmd=4)then cur_loop:=cur_align else begin begin if interaction=3 then;print_nl(263);print(915);end;begin help_ptr:=3; help_line[2]:=916;help_line[1]:=917;help_line[0]:=918;end;back_error; goto 31; end else if(cur_cmd<>10)or(p<>29996)then begin mem[p].hh.rh:=get_avail; p:=mem[p].hh.rh;mem[p].hh.lh:=cur_tok;end;end;31:{:783}; mem[cur_align].hh.rh:=new_null_box;cur_align:=mem[cur_align].hh.rh; mem[cur_align].hh.lh:=29991;mem[cur_align+1].int:=-1073741824; mem[cur_align+3].int:=mem[29996].hh.rh;{784:}p:=29996;mem[p].hh.rh:=0; while true do begin 22:get_preamble_token; if(cur_cmd<=5)and(cur_cmd>=4)and(align_state=-1000000)then goto 32; if cur_cmd=6 then begin begin if interaction=3 then;print_nl(263); print(919);end;begin help_ptr:=3;help_line[2]:=916;help_line[1]:=917; help_line[0]:=920;end;error;goto 22;end;mem[p].hh.rh:=get_avail; p:=mem[p].hh.rh;mem[p].hh.lh:=cur_tok;end;32:mem[p].hh.rh:=get_avail; p:=mem[p].hh.rh;mem[p].hh.lh:=6714{:784}; mem[cur_align+2].int:=mem[29996].hh.rh{:779};end; 30:scanner_status:=0{:777};new_save_level(6); if eqtb[3420].hh.rh<>0 then begin_token_list(eqtb[3420].hh.rh,13); align_peek;end;{:774}{786:}{787:}procedure init_span(p:halfword); begin push_nest; if cur_list.mode_field=-102 then cur_list.aux_field.hh.lh:=1000 else begin cur_list.aux_field.int:=-65536000;normal_paragraph;end; cur_span:=p;end;{:787}procedure init_row;begin push_nest; cur_list.mode_field:=(-103)-cur_list.mode_field; if cur_list.mode_field=-102 then cur_list.aux_field.hh.lh:=0 else cur_list.aux_field.int:=0; begin mem[cur_list.tail_field].hh.rh:=new_glue(mem[mem[29992].hh.rh+1]. hh.lh);cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b1:=12; cur_align:=mem[mem[29992].hh.rh].hh.rh;cur_tail:=cur_head; init_span(cur_align);end;{:786}{788:}procedure init_col; begin mem[cur_align+5].hh.lh:=cur_cmd; if cur_cmd=63 then align_state:=0 else begin back_input; begin_token_list(mem[cur_align+3].int,1);end;end; {:788}{791:}function fin_col:boolean;label 10;var p:halfword; q,r:halfword;s:halfword;u:halfword;w:scaled;o:glue_ord;n:halfword; begin if cur_align=0 then confusion(921);q:=mem[cur_align].hh.rh; if q=0 then confusion(921);if align_state<500000 then fatal_error(604); p:=mem[q].hh.rh; {792:}if(p=0)and(mem[cur_align+5].hh.lh<257)then if cur_loop<>0 then {793:}begin mem[q].hh.rh:=new_null_box;p:=mem[q].hh.rh; mem[p].hh.lh:=29991;mem[p+1].int:=-1073741824; cur_loop:=mem[cur_loop].hh.rh;{794:}q:=29996;r:=mem[cur_loop+3].int; while r<>0 do begin mem[q].hh.rh:=get_avail;q:=mem[q].hh.rh; mem[q].hh.lh:=mem[r].hh.lh;r:=mem[r].hh.rh;end;mem[q].hh.rh:=0; mem[p+3].int:=mem[29996].hh.rh;q:=29996;r:=mem[cur_loop+2].int; while r<>0 do begin mem[q].hh.rh:=get_avail;q:=mem[q].hh.rh; mem[q].hh.lh:=mem[r].hh.lh;r:=mem[r].hh.rh;end;mem[q].hh.rh:=0; mem[p+2].int:=mem[29996].hh.rh{:794};cur_loop:=mem[cur_loop].hh.rh; mem[p].hh.rh:=new_glue(mem[cur_loop+1].hh.lh); mem[mem[p].hh.rh].hh.b1:=12; end{:793}else begin begin if interaction=3 then;print_nl(263); print(922);end;print_esc(911);begin help_ptr:=3;help_line[2]:=923; help_line[1]:=924;help_line[0]:=925;end;mem[cur_align+5].hh.lh:=257; error;end{:792};if mem[cur_align+5].hh.lh<>256 then begin unsave; new_save_level(6); {796:}begin if cur_list.mode_field=-102 then begin adjust_tail:=cur_tail ;u:=hpack(mem[cur_list.head_field].hh.rh,0,1);w:=mem[u+1].int; cur_tail:=adjust_tail;adjust_tail:=0; end else begin u:=vpackage(mem[cur_list.head_field].hh.rh,0,1,0); w:=mem[u+3].int;end;n:=0; if cur_span<>cur_align then{798:}begin q:=cur_span;repeat n:=n+1; q:=mem[mem[q].hh.rh].hh.rh;until q=cur_align; if n>255 then confusion(926);q:=cur_span; while mem[mem[q].hh.lh].hh.rhn then begin s:=get_node(2); mem[s].hh.lh:=mem[q].hh.lh;mem[s].hh.rh:=n;mem[q].hh.lh:=s; mem[s+1].int:=w; end else if mem[mem[q].hh.lh+1].intmem[cur_align+1].int then mem[cur_align+1].int:=w; mem[u].hh.b0:=13;mem[u].hh.b1:=n; {659:}if total_stretch[3]<>0 then o:=3 else if total_stretch[2]<>0 then o:=2 else if total_stretch[1]<>0 then o:=1 else o:=0{:659}; mem[u+5].hh.b1:=o;mem[u+6].int:=total_stretch[o]; {665:}if total_shrink[3]<>0 then o:=3 else if total_shrink[2]<>0 then o :=2 else if total_shrink[1]<>0 then o:=1 else o:=0{:665}; mem[u+5].hh.b0:=o;mem[u+4].int:=total_shrink[o];pop_nest; mem[cur_list.tail_field].hh.rh:=u;cur_list.tail_field:=u;end{:796}; {795:}begin mem[cur_list.tail_field].hh.rh:=new_glue(mem[mem[cur_align]. hh.rh+1].hh.lh);cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b1:=12{:795}; if mem[cur_align+5].hh.lh>=257 then begin fin_col:=true;goto 10;end; init_span(p);end;align_state:=1000000;repeat get_x_or_protected; until cur_cmd<>10;cur_align:=p;init_col;fin_col:=false;10:end; {:791}{799:}procedure fin_row;var p:halfword; begin if cur_list.mode_field=-102 then begin p:=hpack(mem[cur_list. head_field].hh.rh,0,1);pop_nest;append_to_vlist(p); if cur_head<>cur_tail then begin mem[cur_list.tail_field].hh.rh:=mem[ cur_head].hh.rh;cur_list.tail_field:=cur_tail;end; end else begin p:=vpackage(mem[cur_list.head_field].hh.rh,0,1,1073741823 );pop_nest;mem[cur_list.tail_field].hh.rh:=p;cur_list.tail_field:=p; cur_list.aux_field.hh.lh:=1000;end;mem[p].hh.b0:=13;mem[p+6].int:=0; if eqtb[3420].hh.rh<>0 then begin_token_list(eqtb[3420].hh.rh,13); align_peek;end;{:799}{800:}procedure do_assignments;forward; procedure resume_after_display;forward;procedure build_page;forward; procedure fin_align;var p,q,r,s,u,v:halfword;t,w:scaled;o:scaled; n:halfword;rule_save:scaled;aux_save:memory_word; begin if cur_group<>6 then confusion(927);unsave; if cur_group<>6 then confusion(928);unsave; if nest[nest_ptr-1].mode_field=203 then o:=eqtb[5860].int else o:=0; {801:}q:=mem[mem[29992].hh.rh].hh.rh;repeat flush_list(mem[q+3].int); flush_list(mem[q+2].int);p:=mem[mem[q].hh.rh].hh.rh; if mem[q+1].int=-1073741824 then{802:}begin mem[q+1].int:=0; r:=mem[q].hh.rh;s:=mem[r+1].hh.lh; if s<>0 then begin mem[0].hh.rh:=mem[0].hh.rh+1;delete_glue_ref(s); mem[r+1].hh.lh:=0;end;end{:802}; if mem[q].hh.lh<>29991 then{803:}begin t:=mem[q+1].int+mem[mem[mem[q].hh .rh+1].hh.lh+1].int;r:=mem[q].hh.lh;s:=29991;mem[s].hh.lh:=p;n:=1; repeat mem[r+1].int:=mem[r+1].int-t;u:=mem[r].hh.lh; while mem[r].hh.rh>n do begin s:=mem[s].hh.lh; n:=mem[mem[s].hh.lh].hh.rh+1;end; if mem[r].hh.rhmem[mem[s].hh.lh+1].int then mem[mem[s]. hh.lh+1].int:=mem[r+1].int;free_node(r,2);end;r:=u;until r=29991; end{:803};mem[q].hh.b0:=13;mem[q].hh.b1:=0;mem[q+3].int:=0; mem[q+2].int:=0;mem[q+5].hh.b1:=0;mem[q+5].hh.b0:=0;mem[q+6].int:=0; mem[q+4].int:=0;q:=p;until q=0{:801};{804:}save_ptr:=save_ptr-2; pack_begin_line:=-cur_list.ml_field; if cur_list.mode_field=-1 then begin rule_save:=eqtb[5861].int; eqtb[5861].int:=0; p:=hpack(mem[29992].hh.rh,save_stack[save_ptr+1].int,save_stack[save_ptr +0].int);eqtb[5861].int:=rule_save; end else begin q:=mem[mem[29992].hh.rh].hh.rh; repeat mem[q+3].int:=mem[q+1].int;mem[q+1].int:=0; q:=mem[mem[q].hh.rh].hh.rh;until q=0; p:=vpackage(mem[29992].hh.rh,save_stack[save_ptr+1].int,save_stack[ save_ptr+0].int,1073741823);q:=mem[mem[29992].hh.rh].hh.rh; repeat mem[q+1].int:=mem[q+3].int;mem[q+3].int:=0; q:=mem[mem[q].hh.rh].hh.rh;until q=0;end;pack_begin_line:=0{:804}; {805:}q:=mem[cur_list.head_field].hh.rh;s:=cur_list.head_field; while q<>0 do begin if not(q>=hi_mem_min)then if mem[q].hh.b0=13 then {807:}begin if cur_list.mode_field=-1 then begin mem[q].hh.b0:=0; mem[q+1].int:=mem[p+1].int; if nest[nest_ptr-1].mode_field=203 then mem[q].hh.b1:=2; end else begin mem[q].hh.b0:=1;mem[q+3].int:=mem[p+3].int;end; mem[q+5].hh.b1:=mem[p+5].hh.b1;mem[q+5].hh.b0:=mem[p+5].hh.b0; mem[q+6].gr:=mem[p+6].gr;mem[q+4].int:=o;r:=mem[mem[q+5].hh.rh].hh.rh; s:=mem[mem[p+5].hh.rh].hh.rh;repeat{808:}n:=mem[r].hh.b1; t:=mem[s+1].int;w:=t;u:=29996;mem[r].hh.b1:=0;while n>0 do begin n:=n-1; {809:}s:=mem[s].hh.rh;v:=mem[s+1].hh.lh;mem[u].hh.rh:=new_glue(v); u:=mem[u].hh.rh;mem[u].hh.b1:=12;t:=t+mem[v+1].int; if mem[p+5].hh.b0=1 then begin if mem[v].hh.b0=mem[p+5].hh.b1 then t:=t+ round(mem[p+6].gr*mem[v+2].int); end else if mem[p+5].hh.b0=2 then begin if mem[v].hh.b1=mem[p+5].hh.b1 then t:=t-round(mem[p+6].gr*mem[v+3].int);end;s:=mem[s].hh.rh; mem[u].hh.rh:=new_null_box;u:=mem[u].hh.rh;t:=t+mem[s+1].int; if cur_list.mode_field=-1 then mem[u+1].int:=mem[s+1].int else begin mem [u].hh.b0:=1;mem[u+3].int:=mem[s+1].int;end{:809};end; if cur_list.mode_field=-1 then{810:}begin mem[r+3].int:=mem[q+3].int; mem[r+2].int:=mem[q+2].int; if t=mem[r+1].int then begin mem[r+5].hh.b0:=0;mem[r+5].hh.b1:=0; mem[r+6].gr:=0.0; end else if t>mem[r+1].int then begin mem[r+5].hh.b0:=1; if mem[r+6].int=0 then mem[r+6].gr:=0.0 else mem[r+6].gr:=(t-mem[r+1]. int)/mem[r+6].int;end else begin mem[r+5].hh.b1:=mem[r+5].hh.b0; mem[r+5].hh.b0:=2; if mem[r+4].int=0 then mem[r+6].gr:=0.0 else if(mem[r+5].hh.b1=0)and(mem [r+1].int-t>mem[r+4].int)then mem[r+6].gr:=1.0 else mem[r+6].gr:=(mem[r +1].int-t)/mem[r+4].int;end;mem[r+1].int:=w;mem[r].hh.b0:=0; end{:810}else{811:}begin mem[r+1].int:=mem[q+1].int; if t=mem[r+3].int then begin mem[r+5].hh.b0:=0;mem[r+5].hh.b1:=0; mem[r+6].gr:=0.0; end else if t>mem[r+3].int then begin mem[r+5].hh.b0:=1; if mem[r+6].int=0 then mem[r+6].gr:=0.0 else mem[r+6].gr:=(t-mem[r+3]. int)/mem[r+6].int;end else begin mem[r+5].hh.b1:=mem[r+5].hh.b0; mem[r+5].hh.b0:=2; if mem[r+4].int=0 then mem[r+6].gr:=0.0 else if(mem[r+5].hh.b1=0)and(mem [r+3].int-t>mem[r+4].int)then mem[r+6].gr:=1.0 else mem[r+6].gr:=(mem[r +3].int-t)/mem[r+4].int;end;mem[r+3].int:=w;mem[r].hh.b0:=1;end{:811}; mem[r+4].int:=0;if u<>29996 then begin mem[u].hh.rh:=mem[r].hh.rh; mem[r].hh.rh:=mem[29996].hh.rh;r:=u;end{:808}; r:=mem[mem[r].hh.rh].hh.rh;s:=mem[mem[s].hh.rh].hh.rh;until r=0; end{:807}else if mem[q].hh.b0=2 then{806:}begin if(mem[q+1].int= -1073741824)then mem[q+1].int:=mem[p+1].int; if(mem[q+3].int=-1073741824)then mem[q+3].int:=mem[p+3].int; if(mem[q+2].int=-1073741824)then mem[q+2].int:=mem[p+2].int; if o<>0 then begin r:=mem[q].hh.rh;mem[q].hh.rh:=0;q:=hpack(q,0,1); mem[q+4].int:=o;mem[q].hh.rh:=r;mem[s].hh.rh:=q;end;end{:806};s:=q; q:=mem[q].hh.rh;end{:805};flush_node_list(p);pop_alignment; {812:}aux_save:=cur_list.aux_field;p:=mem[cur_list.head_field].hh.rh; q:=cur_list.tail_field;pop_nest; if cur_list.mode_field=203 then{1206:}begin do_assignments; if cur_cmd<>3 then{1207:}begin begin if interaction=3 then; print_nl(263);print(1183);end;begin help_ptr:=2;help_line[1]:=907; help_line[0]:=908;end;back_error;end{:1207}else{1197:}begin get_x_token; if cur_cmd<>3 then begin begin if interaction=3 then;print_nl(263); print(1179);end;begin help_ptr:=2;help_line[1]:=1180;help_line[0]:=1181; end;back_error;end;end{:1197};flush_node_list(cur_list.eTeX_aux_field); pop_nest; begin mem[cur_list.tail_field].hh.rh:=new_penalty(eqtb[5279].int); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; begin mem[cur_list.tail_field].hh.rh:=new_param_glue(3); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.rh:=p;if p<>0 then cur_list.tail_field:=q; begin mem[cur_list.tail_field].hh.rh:=new_penalty(eqtb[5280].int); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; begin mem[cur_list.tail_field].hh.rh:=new_param_glue(4); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; cur_list.aux_field.int:=aux_save.int;resume_after_display; end{:1206}else begin cur_list.aux_field:=aux_save; mem[cur_list.tail_field].hh.rh:=p;if p<>0 then cur_list.tail_field:=q; if cur_list.mode_field=1 then build_page;end{:812};end; {785:}procedure align_peek;label 20;begin 20:align_state:=1000000; repeat get_x_or_protected;until cur_cmd<>10; if cur_cmd=34 then begin scan_left_brace;new_save_level(7); if cur_list.mode_field=-1 then normal_paragraph; end else if cur_cmd=2 then fin_align else if(cur_cmd=5)and(cur_chr=258) then goto 20 else begin init_row;init_col;end;end; {:785}{:800}{815:}{826:}function finite_shrink(p:halfword):halfword; var q:halfword; begin if no_shrink_error_yet then begin no_shrink_error_yet:=false; {if eqtb[5300].int>0 then end_diagnostic(true);} begin if interaction=3 then;print_nl(263);print(929);end; begin help_ptr:=5;help_line[4]:=930;help_line[3]:=931;help_line[2]:=932; help_line[1]:=933;help_line[0]:=934;end;error; {if eqtb[5300].int>0 then begin_diagnostic;}end;q:=new_spec(p); mem[q].hh.b1:=0;delete_glue_ref(p);finite_shrink:=q;end; {:826}{829:}procedure try_break(pi:integer;break_type:small_number); label 10,30,31,22,60,40,45;var r:halfword;prev_r:halfword; old_l:halfword;no_break_yet:boolean;{830:}prev_prev_r:halfword; s:halfword;q:halfword;v:halfword;t:integer;f:internal_font_number; l:halfword;node_r_stays_active:boolean;line_width:scaled;fit_class:0..3; b:halfword;d:integer;artificial_demerits:boolean;save_link:halfword; shortfall:scaled;{:830}{1579:}g:scaled; {:1579}begin{831:}if abs(pi)>=10000 then if pi>0 then goto 10 else pi:= -10000{:831};no_break_yet:=true;prev_r:=29993;old_l:=0; cur_active_width[1]:=active_width[1]; cur_active_width[2]:=active_width[2]; cur_active_width[3]:=active_width[3]; cur_active_width[4]:=active_width[4]; cur_active_width[5]:=active_width[5]; cur_active_width[6]:=active_width[6]; while true do begin 22:r:=mem[prev_r].hh.rh; {832:}if mem[r].hh.b0=2 then begin cur_active_width[1]:=cur_active_width [1]+mem[r+1].int;cur_active_width[2]:=cur_active_width[2]+mem[r+2].int; cur_active_width[3]:=cur_active_width[3]+mem[r+3].int; cur_active_width[4]:=cur_active_width[4]+mem[r+4].int; cur_active_width[5]:=cur_active_width[5]+mem[r+5].int; cur_active_width[6]:=cur_active_width[6]+mem[r+6].int; prev_prev_r:=prev_r;prev_r:=r;goto 22;end{:832}; {835:}begin l:=mem[r+1].hh.lh; if l>old_l then begin if(minimum_demerits<1073741823)and((old_l<> easy_line)or(r=29993))then{836:}begin if no_break_yet then{837:}begin no_break_yet:=false;break_width[1]:=background[1]; break_width[2]:=background[2];break_width[3]:=background[3]; break_width[4]:=background[4];break_width[5]:=background[5]; break_width[6]:=background[6];s:=cur_p; if break_type>0 then if cur_p<>0 then{840:}begin t:=mem[cur_p].hh.b1; v:=cur_p;s:=mem[cur_p+1].hh.rh;while t>0 do begin t:=t-1; v:=mem[v].hh.rh;{841:}if(v>=hi_mem_min)then begin f:=mem[v].hh.b0; break_width[1]:=break_width[1]-font_info[width_base[f]+font_info[ char_base[f]+mem[v].hh.b1].qqqq.b0].int; end else case mem[v].hh.b0 of 6:begin f:=mem[v+1].hh.b0; break_width[1]:=break_width[1]-font_info[width_base[f]+font_info[ char_base[f]+mem[v+1].hh.b1].qqqq.b0].int;end; 0,1,2,11:break_width[1]:=break_width[1]-mem[v+1].int; others:confusion(935)end{:841};end; while s<>0 do begin{842:}if(s>=hi_mem_min)then begin f:=mem[s].hh.b0; break_width[1]:=break_width[1]+font_info[width_base[f]+font_info[ char_base[f]+mem[s].hh.b1].qqqq.b0].int; end else case mem[s].hh.b0 of 6:begin f:=mem[s+1].hh.b0; break_width[1]:=break_width[1]+font_info[width_base[f]+font_info[ char_base[f]+mem[s+1].hh.b1].qqqq.b0].int;end; 0,1,2,11:break_width[1]:=break_width[1]+mem[s+1].int; others:confusion(936)end{:842};s:=mem[s].hh.rh;end; break_width[1]:=break_width[1]+disc_width; if mem[cur_p+1].hh.rh=0 then s:=mem[v].hh.rh;end{:840}; while s<>0 do begin if(s>=hi_mem_min)then goto 30; case mem[s].hh.b0 of 10:{838:}begin v:=mem[s+1].hh.lh; break_width[1]:=break_width[1]-mem[v+1].int; break_width[2+mem[v].hh.b0]:=break_width[2+mem[v].hh.b0]-mem[v+2].int; break_width[6]:=break_width[6]-mem[v+3].int;end{:838};12:; 9:break_width[1]:=break_width[1]-mem[s+1].int; 11:if mem[s].hh.b1<>1 then goto 30 else break_width[1]:=break_width[1]- mem[s+1].int;others:goto 30 end;s:=mem[s].hh.rh;end;30:end{:837}; {843:}if mem[prev_r].hh.b0=2 then begin mem[prev_r+1].int:=mem[prev_r+1] .int-cur_active_width[1]+break_width[1]; mem[prev_r+2].int:=mem[prev_r+2].int-cur_active_width[2]+break_width[2]; mem[prev_r+3].int:=mem[prev_r+3].int-cur_active_width[3]+break_width[3]; mem[prev_r+4].int:=mem[prev_r+4].int-cur_active_width[4]+break_width[4]; mem[prev_r+5].int:=mem[prev_r+5].int-cur_active_width[5]+break_width[5]; mem[prev_r+6].int:=mem[prev_r+6].int-cur_active_width[6]+break_width[6]; end else if prev_r=29993 then begin active_width[1]:=break_width[1]; active_width[2]:=break_width[2];active_width[3]:=break_width[3]; active_width[4]:=break_width[4];active_width[5]:=break_width[5]; active_width[6]:=break_width[6];end else begin q:=get_node(7); mem[q].hh.rh:=r;mem[q].hh.b0:=2;mem[q].hh.b1:=0; mem[q+1].int:=break_width[1]-cur_active_width[1]; mem[q+2].int:=break_width[2]-cur_active_width[2]; mem[q+3].int:=break_width[3]-cur_active_width[3]; mem[q+4].int:=break_width[4]-cur_active_width[4]; mem[q+5].int:=break_width[5]-cur_active_width[5]; mem[q+6].int:=break_width[6]-cur_active_width[6];mem[prev_r].hh.rh:=q; prev_prev_r:=prev_r;prev_r:=q;end{:843}; if abs(eqtb[5284].int)>=1073741823-minimum_demerits then minimum_demerits:=1073741822 else minimum_demerits:=minimum_demerits+abs (eqtb[5284].int); for fit_class:=0 to 3 do begin if minimal_demerits[fit_class]<= minimum_demerits then{845:}begin q:=get_node(2);mem[q].hh.rh:=passive; passive:=q;mem[q+1].hh.rh:=cur_p;{pass_number:=pass_number+1; mem[q].hh.lh:=pass_number;}mem[q+1].hh.lh:=best_place[fit_class]; q:=get_node(active_node_size);mem[q+1].hh.rh:=passive; mem[q+1].hh.lh:=best_pl_line[fit_class]+1;mem[q].hh.b1:=fit_class; mem[q].hh.b0:=break_type;mem[q+2].int:=minimal_demerits[fit_class]; if do_last_line_fit then{1586:}begin mem[q+3].int:=best_pl_short[ fit_class];mem[q+4].int:=best_pl_glue[fit_class];end{:1586}; mem[q].hh.rh:=r;mem[prev_r].hh.rh:=q;prev_r:=q; {if eqtb[5300].int>0 then[846:]begin print_nl(937); print_int(mem[passive].hh.lh);print(938);print_int(mem[q+1].hh.lh-1); print_char(46);print_int(fit_class);if break_type=1 then print_char(45); print(939);print_int(mem[q+2].int); if do_last_line_fit then[1587:]begin print(1410); print_scaled(mem[q+3].int);if cur_p=0 then print(1411)else print(1008); print_scaled(mem[q+4].int);end[:1587];print(940); if mem[passive+1].hh.lh=0 then print_char(48)else print_int(mem[mem[ passive+1].hh.lh].hh.lh);end[:846];}end{:845}; minimal_demerits[fit_class]:=1073741823;end; minimum_demerits:=1073741823; {844:}if r<>29993 then begin q:=get_node(7);mem[q].hh.rh:=r; mem[q].hh.b0:=2;mem[q].hh.b1:=0; mem[q+1].int:=cur_active_width[1]-break_width[1]; mem[q+2].int:=cur_active_width[2]-break_width[2]; mem[q+3].int:=cur_active_width[3]-break_width[3]; mem[q+4].int:=cur_active_width[4]-break_width[4]; mem[q+5].int:=cur_active_width[5]-break_width[5]; mem[q+6].int:=cur_active_width[6]-break_width[6];mem[prev_r].hh.rh:=q; prev_prev_r:=prev_r;prev_r:=q;end{:844};end{:836}; if r=29993 then goto 10; {850:}if l>easy_line then begin line_width:=second_width;old_l:=65534; end else begin old_l:=l; if l>last_special_line then line_width:=second_width else if eqtb[3412]. hh.rh=0 then line_width:=first_width else line_width:=mem[eqtb[3412].hh. rh+2*l].int;end{:850};end;end{:835}; {851:}begin artificial_demerits:=false; shortfall:=line_width-cur_active_width[1]; if shortfall>0 then{852:}if(cur_active_width[3]<>0)or(cur_active_width[4 ]<>0)or(cur_active_width[5]<>0)then begin if do_last_line_fit then begin if cur_p=0 then{1581:}begin if(mem[r+3].int=0)or(mem[r+4].int<=0)then goto 45; if(cur_active_width[3]<>fill_width[0])or(cur_active_width[4]<>fill_width [1])or(cur_active_width[5]<>fill_width[2])then goto 45; if mem[r+3].int>0 then g:=cur_active_width[2]else g:=cur_active_width[6] ;if g<=0 then goto 45;arith_error:=false; g:=fract(g,mem[r+3].int,mem[r+4].int,1073741823); if eqtb[5329].int<1000 then g:=fract(g,eqtb[5329].int,1000,1073741823); if arith_error then if mem[r+3].int>0 then g:=1073741823 else g:= -1073741823;if g>0 then{1582:}begin if g>shortfall then g:=shortfall; if g>7230584 then if cur_active_width[2]<1663497 then begin b:=10000; fit_class:=0;goto 40;end;b:=badness(g,cur_active_width[2]); if b>12 then if b>99 then fit_class:=0 else fit_class:=1 else fit_class :=2;goto 40; end{:1582}else if g<0 then{1583:}begin if-g>cur_active_width[6]then g:=- cur_active_width[6];b:=badness(-g,cur_active_width[6]); if b>12 then fit_class:=3 else fit_class:=2;goto 40;end{:1583}; 45:end{:1581};shortfall:=0;end;b:=0;fit_class:=2; end else begin if shortfall>7230584 then if cur_active_width[2]<1663497 then begin b:=10000;fit_class:=0;goto 31;end; b:=badness(shortfall,cur_active_width[2]); if b>12 then if b>99 then fit_class:=0 else fit_class:=1 else fit_class :=2;31:end{:852}else{853:}begin if-shortfall>cur_active_width[6]then b:= 10001 else b:=badness(-shortfall,cur_active_width[6]); if b>12 then fit_class:=3 else fit_class:=2;end{:853}; if do_last_line_fit then{1584:}begin if cur_p=0 then shortfall:=0; if shortfall>0 then g:=cur_active_width[2]else if shortfall<0 then g:= cur_active_width[6]else g:=0;end{:1584}; 40:if(b>10000)or(pi=-10000)then{854:}begin if final_pass and( minimum_demerits=1073741823)and(mem[r].hh.rh=29993)and(prev_r=29993)then artificial_demerits:=true else if b>threshold then goto 60; node_r_stays_active:=false;end{:854}else begin prev_r:=r; if b>threshold then goto 22;node_r_stays_active:=true;end; {855:}if artificial_demerits then d:=0 else{859:}begin d:=eqtb[5270].int +b;if abs(d)>=10000 then d:=100000000 else d:=d*d; if pi<>0 then if pi>0 then d:=d+pi*pi else if pi>-10000 then d:=d-pi*pi; if(break_type=1)and(mem[r].hh.b0=1)then if cur_p<>0 then d:=d+eqtb[5282] .int else d:=d+eqtb[5283].int; if abs(fit_class-mem[r].hh.b1)>1 then d:=d+eqtb[5284].int;end{:859}; {if eqtb[5300].int>0 then[856:]begin if printed_node<>cur_p then[857:] begin print_nl(339); if cur_p=0 then short_display(mem[printed_node].hh.rh)else begin save_link:=mem[cur_p].hh.rh;mem[cur_p].hh.rh:=0;print_nl(339); short_display(mem[printed_node].hh.rh);mem[cur_p].hh.rh:=save_link;end; printed_node:=cur_p;end[:857];print_nl(64); if cur_p=0 then print_esc(606)else if mem[cur_p].hh.b0<>10 then begin if mem[cur_p].hh.b0=12 then print_esc(535)else if mem[cur_p].hh.b0=7 then print_esc(352)else if mem[cur_p].hh.b0=11 then print_esc(341)else print_esc(346);end;print(941); if mem[r+1].hh.rh=0 then print_char(48)else print_int(mem[mem[r+1].hh.rh ].hh.lh);print(942);if b>10000 then print_char(42)else print_int(b); print(943);print_int(pi);print(944); if artificial_demerits then print_char(42)else print_int(d);end[:856];} d:=d+mem[r+2].int; if d<=minimal_demerits[fit_class]then begin minimal_demerits[fit_class] :=d;best_place[fit_class]:=mem[r+1].hh.rh;best_pl_line[fit_class]:=l; if do_last_line_fit then{1585:}begin best_pl_short[fit_class]:=shortfall ;best_pl_glue[fit_class]:=g;end{:1585}; if d0 then if mem[cur_p].hh. b0=7 then begin t:=mem[cur_p].hh.b1;while t>0 do begin t:=t-1; printed_node:=mem[printed_node].hh.rh;end;end[:858]}end; {:829}{877:}procedure post_line_break(d:boolean);label 30,31; var q,r,s:halfword;disc_break:boolean;post_disc_break:boolean; cur_width:scaled;cur_indent:scaled;t:quarterword;pen:integer; cur_line:halfword;LR_ptr:halfword;begin LR_ptr:=cur_list.eTeX_aux_field; {878:}q:=mem[best_bet+1].hh.rh;cur_p:=0;repeat r:=q;q:=mem[q+1].hh.lh; mem[r+1].hh.lh:=cur_p;cur_p:=r;until q=0{:878}; cur_line:=cur_list.pg_field+1; repeat{880:}if(eqtb[5332].int>0)then{1438:}begin q:=mem[29997].hh.rh; if LR_ptr<>0 then begin temp_ptr:=LR_ptr;r:=q; repeat s:=new_math(0,(mem[temp_ptr].hh.lh-1));mem[s].hh.rh:=r;r:=s; temp_ptr:=mem[temp_ptr].hh.rh;until temp_ptr=0;mem[29997].hh.rh:=r;end; while q<>mem[cur_p+1].hh.rh do begin if not(q>=hi_mem_min)then if mem[q] .hh.b0=9 then{1439:}if odd(mem[q].hh.b1)then begin if LR_ptr<>0 then if mem[LR_ptr].hh.lh=(4*(mem[q].hh.b1 div 4)+3)then begin temp_ptr:=LR_ptr; LR_ptr:=mem[temp_ptr].hh.rh;begin mem[temp_ptr].hh.rh:=avail; avail:=temp_ptr;{dyn_used:=dyn_used-1;}end;end; end else begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[q].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end{:1439};q:=mem[q].hh.rh; end;end{:1438};{881:}q:=mem[cur_p+1].hh.rh;disc_break:=false; post_disc_break:=false; if q<>0 then if mem[q].hh.b0=10 then begin delete_glue_ref(mem[q+1].hh. lh);mem[q+1].hh.lh:=eqtb[2890].hh.rh;mem[q].hh.b1:=9; mem[eqtb[2890].hh.rh].hh.rh:=mem[eqtb[2890].hh.rh].hh.rh+1;goto 30; end else begin if mem[q].hh.b0=7 then{882:}begin t:=mem[q].hh.b1; {883:}if t=0 then r:=mem[q].hh.rh else begin r:=q; while t>1 do begin r:=mem[r].hh.rh;t:=t-1;end;s:=mem[r].hh.rh; r:=mem[s].hh.rh;mem[s].hh.rh:=0;flush_node_list(mem[q].hh.rh); mem[q].hh.b1:=0;end{:883}; if mem[q+1].hh.rh<>0 then{884:}begin s:=mem[q+1].hh.rh; while mem[s].hh.rh<>0 do s:=mem[s].hh.rh;mem[s].hh.rh:=r; r:=mem[q+1].hh.rh;mem[q+1].hh.rh:=0;post_disc_break:=true;end{:884}; if mem[q+1].hh.lh<>0 then{885:}begin s:=mem[q+1].hh.lh;mem[q].hh.rh:=s; while mem[s].hh.rh<>0 do s:=mem[s].hh.rh;mem[q+1].hh.lh:=0;q:=s; end{:885};mem[q].hh.rh:=r;disc_break:=true; end{:882}else if mem[q].hh.b0=11 then mem[q+1].int:=0 else if mem[q].hh. b0=9 then begin mem[q+1].int:=0; if(eqtb[5332].int>0)then{1439:}if odd(mem[q].hh.b1)then begin if LR_ptr <>0 then if mem[LR_ptr].hh.lh=(4*(mem[q].hh.b1 div 4)+3)then begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;{dyn_used:=dyn_used-1;} end;end;end else begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[q].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end{:1439};end; end else begin q:=29997;while mem[q].hh.rh<>0 do q:=mem[q].hh.rh;end; {886:}r:=new_param_glue(8);mem[r].hh.rh:=mem[q].hh.rh;mem[q].hh.rh:=r; q:=r{:886};30:{:881}; if(eqtb[5332].int>0)then{1440:}if LR_ptr<>0 then begin s:=29997; r:=mem[s].hh.rh;while r<>q do begin s:=r;r:=mem[s].hh.rh;end;r:=LR_ptr; while r<>0 do begin temp_ptr:=new_math(0,mem[r].hh.lh); mem[s].hh.rh:=temp_ptr;s:=temp_ptr;r:=mem[r].hh.rh;end;mem[s].hh.rh:=q; end{:1440};{887:}r:=mem[q].hh.rh;mem[q].hh.rh:=0;q:=mem[29997].hh.rh; mem[29997].hh.rh:=r; if eqtb[2889].hh.rh<>0 then begin r:=new_param_glue(7);mem[r].hh.rh:=q; q:=r;end{:887}; {889:}if cur_line>last_special_line then begin cur_width:=second_width; cur_indent:=second_indent; end else if eqtb[3412].hh.rh=0 then begin cur_width:=first_width; cur_indent:=first_indent; end else begin cur_width:=mem[eqtb[3412].hh.rh+2*cur_line].int; cur_indent:=mem[eqtb[3412].hh.rh+2*cur_line-1].int;end; adjust_tail:=29995;just_box:=hpack(q,cur_width,0); mem[just_box+4].int:=cur_indent{:889};{888:}append_to_vlist(just_box); if 29995<>adjust_tail then begin mem[cur_list.tail_field].hh.rh:=mem[ 29995].hh.rh;cur_list.tail_field:=adjust_tail;end;adjust_tail:=0{:888}; {890:}if cur_line+1<>best_line then begin q:=eqtb[3679].hh.rh; if q<>0 then begin r:=cur_line;if r>mem[q+1].int then r:=mem[q+1].int; pen:=mem[q+r+1].int;end else pen:=eqtb[5281].int;q:=eqtb[3680].hh.rh; if q<>0 then begin r:=cur_line-cur_list.pg_field; if r>mem[q+1].int then r:=mem[q+1].int;pen:=pen+mem[q+r+1].int; end else if cur_line=cur_list.pg_field+1 then pen:=pen+eqtb[5273].int; if d then q:=eqtb[3682].hh.rh else q:=eqtb[3681].hh.rh; if q<>0 then begin r:=best_line-cur_line-1; if r>mem[q+1].int then r:=mem[q+1].int;pen:=pen+mem[q+r+1].int; end else if cur_line+2=best_line then if d then pen:=pen+eqtb[5275].int else pen:=pen+eqtb[5274].int;if disc_break then pen:=pen+eqtb[5276].int; if pen<>0 then begin r:=new_penalty(pen); mem[cur_list.tail_field].hh.rh:=r;cur_list.tail_field:=r;end; end{:890}{:880};cur_line:=cur_line+1;cur_p:=mem[cur_p+1].hh.lh; if cur_p<>0 then if not post_disc_break then{879:}begin r:=29997; while true do begin q:=mem[r].hh.rh; if q=mem[cur_p+1].hh.rh then goto 31;if(q>=hi_mem_min)then goto 31; if(mem[q].hh.b0<9)then goto 31; if mem[q].hh.b0=11 then if mem[q].hh.b1<>1 then goto 31;r:=q; if mem[q].hh.b0=9 then if(eqtb[5332].int>0)then{1439:}if odd(mem[q].hh. b1)then begin if LR_ptr<>0 then if mem[LR_ptr].hh.lh=(4*(mem[q].hh.b1 div 4)+3)then begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;{dyn_used:=dyn_used-1;} end;end;end else begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[q].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end{:1439};end; 31:if r<>29997 then begin mem[r].hh.rh:=0; flush_node_list(mem[29997].hh.rh);mem[29997].hh.rh:=q;end;end{:879}; until cur_p=0; if(cur_line<>best_line)or(mem[29997].hh.rh<>0)then confusion(951); cur_list.pg_field:=best_line-1;cur_list.eTeX_aux_field:=LR_ptr;end; {:877}{895:}{906:}function reconstitute(j,n:small_number; bchar,hchar:halfword):small_number;label 22,30;var p:halfword; t:halfword;q:four_quarters;cur_rh:halfword;test_char:halfword;w:scaled; k:font_index;begin hyphen_passed:=0;t:=29996;w:=0;mem[29996].hh.rh:=0; {908:}cur_l:=hu[j]+0;cur_q:=t; if j=0 then begin ligature_present:=init_lig;p:=init_list; if ligature_present then lft_hit:=init_lft; while p>0 do begin begin mem[t].hh.rh:=get_avail;t:=mem[t].hh.rh; mem[t].hh.b0:=hf;mem[t].hh.b1:=mem[p].hh.b1;end;p:=mem[p].hh.rh;end; end else if cur_l<256 then begin mem[t].hh.rh:=get_avail; t:=mem[t].hh.rh;mem[t].hh.b0:=hf;mem[t].hh.b1:=cur_l;end;lig_stack:=0; begin if j1 then goto 30;k:=lig_kern_base[hf]+q.b3; q:=font_info[k].qqqq; if q.b0>128 then begin k:=lig_kern_base[hf]+256*q.b2+q.b3+32768-256*(128 );q:=font_info[k].qqqq;end;end; if cur_rh<256 then test_char:=cur_rh else test_char:=cur_r; while true do begin if q.b1=test_char then if q.b0<=128 then if cur_rh< 256 then begin hyphen_passed:=j;hchar:=256;cur_rh:=256;goto 22; end else begin if hchar<256 then if odd(hyf[j])then begin hyphen_passed :=j;hchar:=256;end; if q.b2<128 then{911:}begin if cur_l=256 then lft_hit:=true; if j=n then if lig_stack=0 then rt_hit:=true; begin if interrupt<>0 then pause_for_instructions;end; case q.b2 of 1,5:begin cur_l:=q.b3;ligature_present:=true;end; 2,6:begin cur_r:=q.b3; if lig_stack>0 then mem[lig_stack].hh.b1:=cur_r else begin lig_stack:= new_lig_item(cur_r);if j=n then bchar:=256 else begin p:=get_avail; mem[lig_stack+1].hh.rh:=p;mem[p].hh.b1:=hu[j+1]+0;mem[p].hh.b0:=hf;end; end;end;3:begin cur_r:=q.b3;p:=lig_stack;lig_stack:=new_lig_item(cur_r); mem[lig_stack].hh.rh:=p;end; 7,11:begin if ligature_present then begin p:=new_ligature(hf,cur_l,mem[ cur_q].hh.rh);if lft_hit then begin mem[p].hh.b1:=2;lft_hit:=false;end; if false then if lig_stack=0 then begin mem[p].hh.b1:=mem[p].hh.b1+1; rt_hit:=false;end;mem[cur_q].hh.rh:=p;t:=p;ligature_present:=false;end; cur_q:=t;cur_l:=q.b3;ligature_present:=true;end; others:begin cur_l:=q.b3;ligature_present:=true; if lig_stack>0 then begin if mem[lig_stack+1].hh.rh>0 then begin mem[t]. hh.rh:=mem[lig_stack+1].hh.rh;t:=mem[t].hh.rh;j:=j+1;end;p:=lig_stack; lig_stack:=mem[p].hh.rh;free_node(p,2); if lig_stack=0 then begin if j4 then if q.b2<>7 then goto 30;goto 22;end{:911}; w:=font_info[kern_base[hf]+256*q.b2+q.b3].int;goto 30;end; if q.b0>=128 then if cur_rh=256 then goto 30 else begin cur_rh:=256; goto 22;end;k:=k+q.b0+1;q:=font_info[k].qqqq;end;30:{:909}; {910:}if ligature_present then begin p:=new_ligature(hf,cur_l,mem[cur_q] .hh.rh);if lft_hit then begin mem[p].hh.b1:=2;lft_hit:=false;end; if rt_hit then if lig_stack=0 then begin mem[p].hh.b1:=mem[p].hh.b1+1; rt_hit:=false;end;mem[cur_q].hh.rh:=p;t:=p;ligature_present:=false;end; if w<>0 then begin mem[t].hh.rh:=new_kern(w);t:=mem[t].hh.rh;w:=0;end; if lig_stack>0 then begin cur_q:=t;cur_l:=mem[lig_stack].hh.b1; ligature_present:=true; begin if mem[lig_stack+1].hh.rh>0 then begin mem[t].hh.rh:=mem[lig_stack +1].hh.rh;t:=mem[t].hh.rh;j:=j+1;end;p:=lig_stack; lig_stack:=mem[p].hh.rh;free_node(p,2); if lig_stack=0 then begin if jhc[j]then goto 30;j:=j+1;u:=u+1;until j>hn; {932:}s:=hyph_list[h];while s<>0 do begin hyf[mem[s].hh.lh]:=1; s:=mem[s].hh.rh;end{:932};hn:=hn-1;goto 40;end;30:{:931}; if h>0 then h:=h-1 else h:=307;end;45:hn:=hn-1{:930}; if trie[cur_lang+1].b1<>cur_lang+0 then goto 10;hc[0]:=0;hc[hn+1]:=0; hc[hn+2]:=256; for j:=0 to hn-r_hyf+1 do begin z:=trie[cur_lang+1].rh+hc[j];l:=j; while hc[l]=trie[z].b1-0 do begin if trie[z].b0<>0 then{924:}begin v:= trie[z].b0;repeat v:=v+op_start[cur_lang];i:=l-hyf_distance[v]; if hyf_num[v]>hyf[i]then hyf[i]:=hyf_num[v];v:=hyf_next[v];until v=0; end{:924};l:=l+1;z:=trie[z].rh+hc[l];end;end; 40:for j:=0 to l_hyf-1 do hyf[j]:=0; for j:=0 to r_hyf-1 do hyf[hn-j]:=0{:923}; {902:}for j:=l_hyf to hn-r_hyf do if odd(hyf[j])then goto 41;goto 10; 41:{:902};{903:}q:=mem[hb].hh.rh;mem[hb].hh.rh:=0;r:=mem[ha].hh.rh; mem[ha].hh.rh:=0;bchar:=hyf_bchar; if(ha>=hi_mem_min)then if mem[ha].hh.b0<>hf then goto 42 else begin init_list:=ha;init_lig:=false;hu[0]:=mem[ha].hh.b1-0; end else if mem[ha].hh.b0=6 then if mem[ha+1].hh.b0<>hf then goto 42 else begin init_list:=mem[ha+1].hh.rh;init_lig:=true; init_lft:=(mem[ha].hh.b1>1);hu[0]:=mem[ha+1].hh.b1-0; if init_list=0 then if init_lft then begin hu[0]:=256;init_lig:=false; end;free_node(ha,2); end else begin if not(r>=hi_mem_min)then if mem[r].hh.b0=6 then if mem[r ].hh.b1>1 then goto 42;j:=1;s:=ha;init_list:=0;goto 50;end;s:=cur_p; while mem[s].hh.rh<>ha do s:=mem[s].hh.rh;j:=0;goto 50;42:s:=ha;j:=0; hu[0]:=256;init_lig:=false;init_list:=0;50:flush_node_list(r); {913:}repeat l:=j;j:=reconstitute(j,hn,bchar,hyf_char+0)+1; if hyphen_passed=0 then begin mem[s].hh.rh:=mem[29996].hh.rh; while mem[s].hh.rh>0 do s:=mem[s].hh.rh;if odd(hyf[j-1])then begin l:=j; hyphen_passed:=j-1;mem[29996].hh.rh:=0;end;end; if hyphen_passed>0 then{914:}repeat r:=get_node(2); mem[r].hh.rh:=mem[29996].hh.rh;mem[r].hh.b0:=7;major_tail:=r;r_count:=0; while mem[major_tail].hh.rh>0 do begin major_tail:=mem[major_tail].hh.rh ;r_count:=r_count+1;end;i:=hyphen_passed;hyf[i]:=0;{915:}minor_tail:=0; mem[r+1].hh.lh:=0;hyf_node:=new_character(hf,hyf_char); if hyf_node<>0 then begin i:=i+1;c:=hu[i];hu[i]:=hyf_char; begin mem[hyf_node].hh.rh:=avail;avail:=hyf_node;{dyn_used:=dyn_used-1;} end;end;while l<=i do begin l:=reconstitute(l,i,font_bchar[hf],256)+1; if mem[29996].hh.rh>0 then begin if minor_tail=0 then mem[r+1].hh.lh:= mem[29996].hh.rh else mem[minor_tail].hh.rh:=mem[29996].hh.rh; minor_tail:=mem[29996].hh.rh; while mem[minor_tail].hh.rh>0 do minor_tail:=mem[minor_tail].hh.rh;end; end;if hyf_node<>0 then begin hu[i]:=c;l:=i;i:=i-1;end{:915}; {916:}minor_tail:=0;mem[r+1].hh.rh:=0;c_loc:=0; if bchar_label[hf]<>0 then begin l:=l-1;c:=hu[l];c_loc:=l;hu[l]:=256; end;while l0 then begin hu[c_loc]:=c;c_loc:=0;end; if mem[29996].hh.rh>0 then begin if minor_tail=0 then mem[r+1].hh.rh:= mem[29996].hh.rh else mem[minor_tail].hh.rh:=mem[29996].hh.rh; minor_tail:=mem[29996].hh.rh; while mem[minor_tail].hh.rh>0 do minor_tail:=mem[minor_tail].hh.rh;end; until l>=j;while l>j do{917:}begin j:=reconstitute(j,hn,bchar,256)+1; mem[major_tail].hh.rh:=mem[29996].hh.rh; while mem[major_tail].hh.rh>0 do begin major_tail:=mem[major_tail].hh.rh ;r_count:=r_count+1;end;end{:917};end{:916}; {918:}if r_count>127 then begin mem[s].hh.rh:=mem[r].hh.rh; mem[r].hh.rh:=0;flush_node_list(r);end else begin mem[s].hh.rh:=r; mem[r].hh.b1:=r_count;end;s:=major_tail{:918};hyphen_passed:=j-1; mem[29996].hh.rh:=0;until not odd(hyf[j-1]){:914};until j>hn; mem[s].hh.rh:=q{:913};flush_list(init_list){:903};10:end; {:895}{942:}{944:}function new_trie_op(d,n:small_number; v:quarterword):quarterword;label 10;var h:-trie_op_size..trie_op_size; u:quarterword;l:0..trie_op_size; begin h:=abs(n+313*d+361*v+1009*cur_lang)mod(trie_op_size+trie_op_size)- trie_op_size;while true do begin l:=trie_op_hash[h]; if l=0 then begin if trie_op_ptr=trie_op_size then overflow(961, trie_op_size);u:=trie_used[cur_lang];if u=255 then overflow(962,255); trie_op_ptr:=trie_op_ptr+1;u:=u+1;trie_used[cur_lang]:=u; hyf_distance[trie_op_ptr]:=d;hyf_num[trie_op_ptr]:=n; hyf_next[trie_op_ptr]:=v;trie_op_lang[trie_op_ptr]:=cur_lang; trie_op_hash[h]:=trie_op_ptr;trie_op_val[trie_op_ptr]:=u;new_trie_op:=u; goto 10;end; if(hyf_distance[l]=d)and(hyf_num[l]=n)and(hyf_next[l]=v)and(trie_op_lang [l]=cur_lang)then begin new_trie_op:=trie_op_val[l];goto 10;end; if h>-trie_op_size then h:=h-1 else h:=trie_op_size;end;10:end; {:944}{948:}function trie_node(p:trie_pointer):trie_pointer;label 10; var h:trie_pointer;q:trie_pointer; begin h:=abs(trie_c[p]+1009*trie_o[p]+2718*trie_l[p]+3142*trie_r[p])mod trie_size;while true do begin q:=trie_hash[h]; if q=0 then begin trie_hash[h]:=p;trie_node:=p;goto 10;end; if(trie_c[q]=trie_c[p])and(trie_o[q]=trie_o[p])and(trie_l[q]=trie_l[p]) and(trie_r[q]=trie_r[p])then begin trie_node:=q;goto 10;end; if h>0 then h:=h-1 else h:=trie_size;end;10:end; {:948}{949:}function compress_trie(p:trie_pointer):trie_pointer; begin if p=0 then compress_trie:=0 else begin trie_l[p]:=compress_trie( trie_l[p]);trie_r[p]:=compress_trie(trie_r[p]); compress_trie:=trie_node(p);end;end; {:949}{953:}procedure first_fit(p:trie_pointer);label 45,40; var h:trie_pointer;z:trie_pointer;q:trie_pointer;c:ASCII_code; l,r:trie_pointer;ll:1..256;begin c:=trie_c[p];z:=trie_min[c]; while true do begin h:=z-c; {954:}if trie_max0 do begin if trie[h+trie_c[q]].rh=0 then goto 45;q:=trie_r[q]; end;goto 40{:955};45:z:=trie[z].rh;end;40:{956:}trie_taken[h]:=true; trie_hash[p]:=h;q:=p;repeat z:=h+trie_c[q];l:=trie[z].lh;r:=trie[z].rh; trie[r].lh:=l;trie[l].rh:=r;trie[z].rh:=0; if l<256 then begin if z<256 then ll:=z else ll:=256; repeat trie_min[l]:=r;l:=l+1;until l=ll;end;q:=trie_r[q]; until q=0{:956};end;{:953}{957:}procedure trie_pack(p:trie_pointer); var q:trie_pointer;begin repeat q:=trie_l[p]; if(q>0)and(trie_hash[q]=0)then begin first_fit(q);trie_pack(q);end; p:=trie_r[p];until p=0;end; {:957}{959:}procedure trie_fix(p:trie_pointer);var q:trie_pointer; c:ASCII_code;z:trie_pointer;begin z:=trie_hash[p];repeat q:=trie_l[p]; c:=trie_c[p];trie[z+c].rh:=trie_hash[q];trie[z+c].b1:=c+0; trie[z+c].b0:=trie_o[p];if q>0 then trie_fix(q);p:=trie_r[p];until p=0; end;{:959}{960:}procedure new_patterns;label 30,31;var k,l:0..64; digit_sensed:boolean;v:quarterword;p,q:trie_pointer;first_child:boolean; c:ASCII_code; begin if trie_not_ready then begin if eqtb[5318].int<=0 then cur_lang:=0 else if eqtb[5318].int>255 then cur_lang:=0 else cur_lang:=eqtb[5318]. int;scan_left_brace;{961:}k:=0;hyf[0]:=0;digit_sensed:=false; while true do begin get_x_token; case cur_cmd of 11,12:{962:}if digit_sensed or(cur_chr<48)or(cur_chr>57) then begin if cur_chr=46 then cur_chr:=0 else begin cur_chr:=eqtb[4244+ cur_chr].hh.rh;if cur_chr=0 then begin begin if interaction=3 then; print_nl(263);print(969);end;begin help_ptr:=1;help_line[0]:=968;end; error;end;end;if k<63 then begin k:=k+1;hc[k]:=cur_chr;hyf[k]:=0; digit_sensed:=false;end;end else if k<63 then begin hyf[k]:=cur_chr-48; digit_sensed:=true;end{:962}; 10,2:begin if k>0 then{963:}begin{965:}if hc[1]=0 then hyf[0]:=0; if hc[k]=0 then hyf[k]:=0;l:=k;v:=0; while true do begin if hyf[l]<>0 then v:=new_trie_op(k-l,hyf[l],v); if l>0 then l:=l-1 else goto 31;end;31:{:965};q:=0;hc[0]:=cur_lang; while l<=k do begin c:=hc[l];l:=l+1;p:=trie_l[q];first_child:=true; while(p>0)and(c>trie_c[p])do begin q:=p;p:=trie_r[q];first_child:=false; end;if(p=0)or(c0 then begin begin if interaction=3 then;print_nl(263); print(970);end;begin help_ptr:=1;help_line[0]:=968;end;error;end; trie_o[q]:=v;end{:963};if cur_cmd=2 then goto 30;k:=0;hyf[0]:=0; digit_sensed:=false;end;others:begin begin if interaction=3 then; print_nl(263);print(967);end;print_esc(965);begin help_ptr:=1; help_line[0]:=968;end;error;end end;end;30:{:961}; if eqtb[5331].int>0 then{1590:}begin c:=cur_lang;first_child:=false; p:=0;repeat q:=p;p:=trie_r[q];until(p=0)or(c<=trie_c[p]); if(p=0)or(c0)or((c=255)and first_child) then begin if p=0 then{964:}begin if trie_ptr=trie_size then overflow( 963,trie_size);trie_ptr:=trie_ptr+1;trie_r[trie_ptr]:=p;p:=trie_ptr; trie_l[p]:=0;if first_child then trie_l[q]:=p else trie_r[q]:=p; trie_c[p]:=c;trie_o[p]:=0;end{:964}else trie_c[p]:=c; trie_o[p]:=eqtb[4244+c].hh.rh+0;q:=p;p:=trie_r[q];first_child:=false; end;if first_child then trie_l[q]:=0 else trie_r[q]:=0{:1591}; end{:1590};end else begin begin if interaction=3 then;print_nl(263); print(964);end;print_esc(965);begin help_ptr:=1;help_line[0]:=966;end; error;mem[29988].hh.rh:=scan_toks(false,false);flush_list(def_ref);end; end;{:960}{966:}procedure init_trie;var p:trie_pointer;j,k,t:integer; r,s:trie_pointer;h:two_halves;begin{952:}{945:}op_start[0]:=-0; for j:=1 to 255 do op_start[j]:=op_start[j-1]+trie_used[j-1]-0; for j:=1 to trie_op_ptr do trie_op_hash[j]:=op_start[trie_op_lang[j]]+ trie_op_val[j]; for j:=1 to trie_op_ptr do while trie_op_hash[j]>j do begin k:= trie_op_hash[j];t:=hyf_distance[k];hyf_distance[k]:=hyf_distance[j]; hyf_distance[j]:=t;t:=hyf_num[k];hyf_num[k]:=hyf_num[j];hyf_num[j]:=t; t:=hyf_next[k];hyf_next[k]:=hyf_next[j];hyf_next[j]:=t; trie_op_hash[j]:=trie_op_hash[k];trie_op_hash[k]:=k;end{:945}; for p:=0 to trie_size do trie_hash[p]:=0; trie_r[0]:=compress_trie(trie_r[0]);trie_l[0]:=compress_trie(trie_l[0]); for p:=0 to trie_ptr do trie_hash[p]:=0; for p:=0 to 255 do trie_min[p]:=p+1;trie[0].rh:=1;trie_max:=0{:952}; if trie_l[0]<>0 then begin first_fit(trie_l[0]);trie_pack(trie_l[0]); end; if trie_r[0]<>0 then{1592:}begin if trie_l[0]=0 then for p:=0 to 255 do trie_min[p]:=p+2;first_fit(trie_r[0]);trie_pack(trie_r[0]); hyph_start:=trie_hash[trie_r[0]];end{:1592};{958:}h.rh:=0;h.b0:=0; h.b1:=0;if trie_max=0 then begin for r:=0 to 256 do trie[r]:=h; trie_max:=256;end else begin if trie_r[0]>0 then trie_fix(trie_r[0]); if trie_l[0]>0 then trie_fix(trie_l[0]);r:=0;repeat s:=trie[r].rh; trie[r]:=h;r:=s;until r>trie_max;end;trie[0].b1:=63;{:958}; trie_not_ready:=false;end;{:966}{:942}procedure line_break(d:boolean); label 30,31,32,33,34,35,22;var{862:}auto_breaking:boolean; prev_p:halfword;q,r,s,prev_s:halfword;f:internal_font_number; {:862}{893:}j:small_number;c:0..255; {:893}begin pack_begin_line:=cur_list.ml_field; {816:}mem[29997].hh.rh:=mem[cur_list.head_field].hh.rh; if(cur_list.tail_field>=hi_mem_min)then begin mem[cur_list.tail_field]. hh.rh:=new_penalty(10000); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh; end else if mem[cur_list.tail_field].hh.b0<>10 then begin mem[cur_list. tail_field].hh.rh:=new_penalty(10000); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh; end else begin mem[cur_list.tail_field].hh.b0:=12; delete_glue_ref(mem[cur_list.tail_field+1].hh.lh); flush_node_list(mem[cur_list.tail_field+1].hh.rh); mem[cur_list.tail_field+1].int:=10000;end; mem[cur_list.tail_field].hh.rh:=new_param_glue(14); last_line_fill:=mem[cur_list.tail_field].hh.rh; init_cur_lang:=cur_list.pg_field mod 65536; init_l_hyf:=cur_list.pg_field div 4194304; init_r_hyf:=(cur_list.pg_field div 65536)mod 64;pop_nest; {:816}{827:}no_shrink_error_yet:=true; if(mem[eqtb[2889].hh.rh].hh.b1<>0)and(mem[eqtb[2889].hh.rh+3].int<>0) then begin eqtb[2889].hh.rh:=finite_shrink(eqtb[2889].hh.rh);end; if(mem[eqtb[2890].hh.rh].hh.b1<>0)and(mem[eqtb[2890].hh.rh+3].int<>0) then begin eqtb[2890].hh.rh:=finite_shrink(eqtb[2890].hh.rh);end; q:=eqtb[2889].hh.rh;r:=eqtb[2890].hh.rh; background[1]:=mem[q+1].int+mem[r+1].int;background[2]:=0; background[3]:=0;background[4]:=0;background[5]:=0; background[2+mem[q].hh.b0]:=mem[q+2].int; background[2+mem[r].hh.b0]:=background[2+mem[r].hh.b0]+mem[r+2].int; background[6]:=mem[q+3].int+mem[r+3].int;{1578:}do_last_line_fit:=false; active_node_size:=3; if eqtb[5329].int>0 then begin q:=mem[last_line_fill+1].hh.lh; if(mem[q+2].int>0)and(mem[q].hh.b0>0)then if(background[3]=0)and( background[4]=0)and(background[5]=0)then begin do_last_line_fit:=true; active_node_size:=5;fill_width[0]:=0;fill_width[1]:=0;fill_width[2]:=0; fill_width[mem[q].hh.b0-1]:=mem[q+2].int;end;end{:1578}; {:827}{834:}minimum_demerits:=1073741823; minimal_demerits[3]:=1073741823;minimal_demerits[2]:=1073741823; minimal_demerits[1]:=1073741823;minimal_demerits[0]:=1073741823; {:834}{848:}if eqtb[3412].hh.rh=0 then if eqtb[5862].int=0 then begin last_special_line:=0;second_width:=eqtb[5848].int;second_indent:=0; end else{849:}begin last_special_line:=abs(eqtb[5309].int); if eqtb[5309].int<0 then begin first_width:=eqtb[5848].int-abs(eqtb[5862 ].int); if eqtb[5862].int>=0 then first_indent:=eqtb[5862].int else first_indent :=0;second_width:=eqtb[5848].int;second_indent:=0; end else begin first_width:=eqtb[5848].int;first_indent:=0; second_width:=eqtb[5848].int-abs(eqtb[5862].int); if eqtb[5862].int>=0 then second_indent:=eqtb[5862].int else second_indent:=0;end; end{:849}else begin last_special_line:=mem[eqtb[3412].hh.rh].hh.lh-1; second_width:=mem[eqtb[3412].hh.rh+2*(last_special_line+1)].int; second_indent:=mem[eqtb[3412].hh.rh+2*last_special_line+1].int;end; if eqtb[5287].int=0 then easy_line:=last_special_line else easy_line:= 65535{:848};{863:}threshold:=eqtb[5268].int; if threshold>=0 then begin{if eqtb[5300].int>0 then begin begin_diagnostic;print_nl(945);end;}second_pass:=false; final_pass:=false;end else begin threshold:=eqtb[5269].int; second_pass:=true;final_pass:=(eqtb[5865].int<=0); {if eqtb[5300].int>0 then begin_diagnostic;}end; while true do begin if threshold>10000 then threshold:=10000; if second_pass then{891:}begin if trie_not_ready then init_trie; cur_lang:=init_cur_lang;l_hyf:=init_l_hyf;r_hyf:=init_r_hyf; if trie[hyph_start+cur_lang].b1<>cur_lang+0 then hyph_index:=0 else hyph_index:=trie[hyph_start+cur_lang].rh;end{:891}; {864:}q:=get_node(active_node_size);mem[q].hh.b0:=0;mem[q].hh.b1:=2; mem[q].hh.rh:=29993;mem[q+1].hh.rh:=0; mem[q+1].hh.lh:=cur_list.pg_field+1;mem[q+2].int:=0;mem[29993].hh.rh:=q; if do_last_line_fit then{1580:}begin mem[q+3].int:=0;mem[q+4].int:=0; end{:1580};active_width[1]:=background[1]; active_width[2]:=background[2];active_width[3]:=background[3]; active_width[4]:=background[4];active_width[5]:=background[5]; active_width[6]:=background[6];passive:=0;printed_node:=29997; pass_number:=0;font_in_short_display:=0{:864};cur_p:=mem[29997].hh.rh; auto_breaking:=true;prev_p:=cur_p; while(cur_p<>0)and(mem[29993].hh.rh<>29993)do{866:}begin if(cur_p>= hi_mem_min)then{867:}begin prev_p:=cur_p;repeat f:=mem[cur_p].hh.b0; active_width[1]:=active_width[1]+font_info[width_base[f]+font_info[ char_base[f]+mem[cur_p].hh.b1].qqqq.b0].int;cur_p:=mem[cur_p].hh.rh; until not(cur_p>=hi_mem_min);end{:867}; case mem[cur_p].hh.b0 of 0,1,2:active_width[1]:=active_width[1]+mem[ cur_p+1].int; 8:{1362:}if mem[cur_p].hh.b1=4 then begin cur_lang:=mem[cur_p+1].hh.rh; l_hyf:=mem[cur_p+1].hh.b0;r_hyf:=mem[cur_p+1].hh.b1; if trie[hyph_start+cur_lang].b1<>cur_lang+0 then hyph_index:=0 else hyph_index:=trie[hyph_start+cur_lang].rh;end{:1362}; 10:begin{868:}if auto_breaking then begin if(prev_p>=hi_mem_min)then try_break(0,0)else if(mem[prev_p].hh.b0<9)then try_break(0,0)else if(mem [prev_p].hh.b0=11)and(mem[prev_p].hh.b1<>1)then try_break(0,0);end; if(mem[mem[cur_p+1].hh.lh].hh.b1<>0)and(mem[mem[cur_p+1].hh.lh+3].int<>0 )then begin mem[cur_p+1].hh.lh:=finite_shrink(mem[cur_p+1].hh.lh);end; q:=mem[cur_p+1].hh.lh;active_width[1]:=active_width[1]+mem[q+1].int; active_width[2+mem[q].hh.b0]:=active_width[2+mem[q].hh.b0]+mem[q+2].int; active_width[6]:=active_width[6]+mem[q+3].int{:868}; if second_pass and auto_breaking then{894:}begin prev_s:=cur_p; s:=mem[prev_s].hh.rh; if s<>0 then begin{896:}while true do begin if(s>=hi_mem_min)then begin c:=mem[s].hh.b1-0;hf:=mem[s].hh.b0; end else if mem[s].hh.b0=6 then if mem[s+1].hh.rh=0 then goto 22 else begin q:=mem[s+1].hh.rh;c:=mem[q].hh.b1-0;hf:=mem[q].hh.b0; end else if(mem[s].hh.b0=11)and(mem[s].hh.b1=0)then goto 22 else if(mem[ s].hh.b0=9)and(mem[s].hh.b1>=4)then goto 22 else if mem[s].hh.b0=8 then begin{1363:}if mem[s].hh.b1=4 then begin cur_lang:=mem[s+1].hh.rh; l_hyf:=mem[s+1].hh.b0;r_hyf:=mem[s+1].hh.b1; if trie[hyph_start+cur_lang].b1<>cur_lang+0 then hyph_index:=0 else hyph_index:=trie[hyph_start+cur_lang].rh;end{:1363};goto 22; end else goto 31; if hyph_index=0 then hc[0]:=eqtb[4244+c].hh.rh else if trie[hyph_index+c ].b1<>c+0 then hc[0]:=0 else hc[0]:=trie[hyph_index+c].b0-0; if hc[0]<>0 then if(hc[0]=c)or(eqtb[5306].int>0)then goto 32 else goto 31;22:prev_s:=s;s:=mem[prev_s].hh.rh;end;32:hyf_char:=hyphen_char[hf]; if hyf_char<0 then goto 31;if hyf_char>255 then goto 31; ha:=prev_s{:896};if l_hyf+r_hyf>63 then goto 31;{897:}hn:=0; while true do begin if(s>=hi_mem_min)then begin if mem[s].hh.b0<>hf then goto 33;hyf_bchar:=mem[s].hh.b1;c:=hyf_bchar-0; if hyph_index=0 then hc[0]:=eqtb[4244+c].hh.rh else if trie[hyph_index+c ].b1<>c+0 then hc[0]:=0 else hc[0]:=trie[hyph_index+c].b0-0; if hc[0]=0 then goto 33;if hn=63 then goto 33;hb:=s;hn:=hn+1;hu[hn]:=c; hc[hn]:=hc[0];hyf_bchar:=256; end else if mem[s].hh.b0=6 then{898:}begin if mem[s+1].hh.b0<>hf then goto 33;j:=hn;q:=mem[s+1].hh.rh;if q>0 then hyf_bchar:=mem[q].hh.b1; while q>0 do begin c:=mem[q].hh.b1-0; if hyph_index=0 then hc[0]:=eqtb[4244+c].hh.rh else if trie[hyph_index+c ].b1<>c+0 then hc[0]:=0 else hc[0]:=trie[hyph_index+c].b0-0; if hc[0]=0 then goto 33;if j=63 then goto 33;j:=j+1;hu[j]:=c; hc[j]:=hc[0];q:=mem[q].hh.rh;end;hb:=s;hn:=j; if odd(mem[s].hh.b1)then hyf_bchar:=font_bchar[hf]else hyf_bchar:=256; end{:898}else if(mem[s].hh.b0=11)and(mem[s].hh.b1=0)then begin hb:=s; hyf_bchar:=font_bchar[hf];end else goto 33;s:=mem[s].hh.rh;end; 33:{:897};{899:}if hn=hi_mem_min))then case mem[s].hh.b0 of 6:; 11:if mem[s].hh.b1<>0 then goto 34;8,10,12,3,5,4:goto 34; 9:if mem[s].hh.b1>=4 then goto 34 else goto 31;others:goto 31 end; s:=mem[s].hh.rh;end;34:{:899};hyphenate;end;31:end{:894};end; 11:if mem[cur_p].hh.b1=1 then begin if not(mem[cur_p].hh.rh>=hi_mem_min) and auto_breaking then if mem[mem[cur_p].hh.rh].hh.b0=10 then try_break( 0,0);active_width[1]:=active_width[1]+mem[cur_p+1].int; end else active_width[1]:=active_width[1]+mem[cur_p+1].int; 6:begin f:=mem[cur_p+1].hh.b0; active_width[1]:=active_width[1]+font_info[width_base[f]+font_info[ char_base[f]+mem[cur_p+1].hh.b1].qqqq.b0].int;end; 7:{869:}begin s:=mem[cur_p+1].hh.lh;disc_width:=0; if s=0 then try_break(eqtb[5272].int,1)else begin repeat{870:}if(s>= hi_mem_min)then begin f:=mem[s].hh.b0; disc_width:=disc_width+font_info[width_base[f]+font_info[char_base[f]+ mem[s].hh.b1].qqqq.b0].int; end else case mem[s].hh.b0 of 6:begin f:=mem[s+1].hh.b0; disc_width:=disc_width+font_info[width_base[f]+font_info[char_base[f]+ mem[s+1].hh.b1].qqqq.b0].int;end; 0,1,2,11:disc_width:=disc_width+mem[s+1].int; others:confusion(949)end{:870};s:=mem[s].hh.rh;until s=0; active_width[1]:=active_width[1]+disc_width;try_break(eqtb[5271].int,1); active_width[1]:=active_width[1]-disc_width;end;r:=mem[cur_p].hh.b1; s:=mem[cur_p].hh.rh; while r>0 do begin{871:}if(s>=hi_mem_min)then begin f:=mem[s].hh.b0; active_width[1]:=active_width[1]+font_info[width_base[f]+font_info[ char_base[f]+mem[s].hh.b1].qqqq.b0].int; end else case mem[s].hh.b0 of 6:begin f:=mem[s+1].hh.b0; active_width[1]:=active_width[1]+font_info[width_base[f]+font_info[ char_base[f]+mem[s+1].hh.b1].qqqq.b0].int;end; 0,1,2,11:active_width[1]:=active_width[1]+mem[s+1].int; others:confusion(950)end{:871};r:=r-1;s:=mem[s].hh.rh;end;prev_p:=cur_p; cur_p:=s;goto 35;end{:869}; 9:begin if mem[cur_p].hh.b1<4 then auto_breaking:=odd(mem[cur_p].hh.b1); begin if not(mem[cur_p].hh.rh>=hi_mem_min)and auto_breaking then if mem[ mem[cur_p].hh.rh].hh.b0=10 then try_break(0,0); active_width[1]:=active_width[1]+mem[cur_p+1].int;end;end; 12:try_break(mem[cur_p+1].int,0);4,3,5:;others:confusion(948)end; prev_p:=cur_p;cur_p:=mem[cur_p].hh.rh;35:end{:866}; if cur_p=0 then{873:}begin try_break(-10000,1); if mem[29993].hh.rh<>29993 then begin{874:}r:=mem[29993].hh.rh; fewest_demerits:=1073741823; repeat if mem[r].hh.b0<>2 then if mem[r+2].int2 then begin line_diff:=mem[r+1].hh.lh-best_line ;if((line_diffactual_looseness)and(eqtb[5287].int>=line_diff))then begin best_bet:=r;actual_looseness:=line_diff;fewest_demerits:=mem[r+2].int; end else if(line_diff=actual_looseness)and(mem[r+2].int29993 do begin cur_p:=mem[q].hh.rh; if mem[q].hh.b0=2 then free_node(q,7)else free_node(q,active_node_size); q:=cur_p;end;q:=passive;while q<>0 do begin cur_p:=mem[q].hh.rh; free_node(q,2);q:=cur_p;end{:865}; if not second_pass then begin{if eqtb[5300].int>0 then print_nl(946);} threshold:=eqtb[5269].int;second_pass:=true; final_pass:=(eqtb[5865].int<=0); end else begin{if eqtb[5300].int>0 then print_nl(947);} background[2]:=background[2]+eqtb[5865].int;final_pass:=true;end;end; 30:{if eqtb[5300].int>0 then begin end_diagnostic(true); normalize_selector;end;} if do_last_line_fit then{1588:}if mem[best_bet+3].int=0 then do_last_line_fit:=false else begin q:=new_spec(mem[last_line_fill+1].hh. lh);delete_glue_ref(mem[last_line_fill+1].hh.lh); mem[q+1].int:=mem[q+1].int+mem[best_bet+3].int-mem[best_bet+4].int; mem[q+2].int:=0;mem[last_line_fill+1].hh.lh:=q;end{:1588};{:863}; {876:}post_line_break(d){:876};{865:}q:=mem[29993].hh.rh; while q<>29993 do begin cur_p:=mem[q].hh.rh; if mem[q].hh.b0=2 then free_node(q,7)else free_node(q,active_node_size); q:=cur_p;end;q:=passive;while q<>0 do begin cur_p:=mem[q].hh.rh; free_node(q,2);q:=cur_p;end{:865};pack_begin_line:=0;end; {1387:}function eTeX_enabled(b:boolean;j:quarterword; k:halfword):boolean; begin if not b then begin begin if interaction=3 then;print_nl(263); print(689);end;print_cmd_chr(j,k);begin help_ptr:=1;help_line[0]:=1317; end;error;end;eTeX_enabled:=b;end; {:1387}{1410:}procedure show_save_groups;label 41,42,40,30; var p:0..nest_size;m:-203..203;v:save_pointer;l:quarterword; c:group_code;a:-1..1;i:integer;j:quarterword;s:str_number; begin p:=nest_ptr;nest[p]:=cur_list;v:=save_ptr;l:=cur_level; c:=cur_group;save_ptr:=cur_boundary;cur_level:=cur_level-1;a:=1; print_nl(339);print_ln;while true do begin print_nl(366); print_group(true);if cur_group=0 then goto 30; repeat m:=nest[p].mode_field;if p>0 then p:=p-1 else m:=1;until m<>102; print(287);case cur_group of 1:begin p:=p+1;goto 42;end;2,3:s:=1072; 4:s:=979;5:s:=1071;6:if a=0 then begin if m=-1 then s:=523 else s:=542; a:=1;goto 41;end else begin if a=1 then print(1354)else print_esc(911); if p>=a then p:=p-a;a:=0;goto 40;end;7:begin p:=p+1;a:=-1; print_esc(530);goto 42;end;8:begin print_esc(401);goto 40;end;9:goto 42; 10,13:begin if cur_group=10 then print_esc(352)else print_esc(528); for i:=1 to 3 do if i<=save_stack[save_ptr-2].int then print(871); goto 42;end; 11:begin if save_stack[save_ptr-2].int=255 then print_esc(355)else begin print_esc(331);print_int(save_stack[save_ptr-2].int);end;goto 42;end; 12:begin s:=543;goto 41;end;14:begin p:=p+1;print_esc(515);goto 40;end; 15:begin if m=203 then print_char(36)else if nest[p].mode_field=203 then begin print_cmd_chr(48,save_stack[save_ptr-2].int);goto 40;end; print_char(36);goto 40;end; 16:begin if mem[nest[p+1].eTeX_aux_field].hh.b0=30 then print_esc(887) else print_esc(889);goto 40;end;end; {1412:}i:=save_stack[save_ptr-4].int; if i<>0 then if i<1073741824 then begin if abs(nest[p].mode_field)=1 then j:=21 else j:=22; if i>0 then print_cmd_chr(j,0)else print_cmd_chr(j,1); print_scaled(abs(i));print(400); end else if i<1073807360 then begin if i>=1073774592 then begin print_esc(1186);i:=i-(32768);end;print_esc(540);print_int(i-1073741824); print_char(61);end else print_cmd_chr(31,i-(1073807261)){:1412}; 41:print_esc(s); {1411:}if save_stack[save_ptr-2].int<>0 then begin print_char(32); if save_stack[save_ptr-3].int=0 then print(853)else print(854); print_scaled(save_stack[save_ptr-2].int);print(400);end{:1411}; 42:print_char(123);40:print_char(41);cur_level:=cur_level-1; cur_group:=save_stack[save_ptr].hh.b1; save_ptr:=save_stack[save_ptr].hh.rh end;30:save_ptr:=v;cur_level:=l; cur_group:=c;end;{:1410}{1426:}procedure new_interaction;forward; {:1426}{:815}{934:}procedure new_hyph_exceptions;label 21,10,40,45,46; var n:0..64;j:0..64;h:hyph_pointer;k:str_number;p:halfword;q:halfword; s,t:str_number;u,v:pool_pointer;begin scan_left_brace; if eqtb[5318].int<=0 then cur_lang:=0 else if eqtb[5318].int>255 then cur_lang:=0 else cur_lang:=eqtb[5318].int; if trie_not_ready then begin hyph_index:=0;goto 46;end; if trie[hyph_start+cur_lang].b1<>cur_lang+0 then hyph_index:=0 else hyph_index:=trie[hyph_start+cur_lang].rh;46:{935:}n:=0;p:=0; while true do begin get_x_token; 21:case cur_cmd of 11,12,68:{937:}if cur_chr=45 then{938:}begin if n<63 then begin q:=get_avail;mem[q].hh.rh:=p;mem[q].hh.lh:=n;p:=q;end; end{:938}else begin if hyph_index=0 then hc[0]:=eqtb[4244+cur_chr].hh.rh else if trie[hyph_index+cur_chr].b1<>cur_chr+0 then hc[0]:=0 else hc[0] :=trie[hyph_index+cur_chr].b0-0; if hc[0]=0 then begin begin if interaction=3 then;print_nl(263); print(957);end;begin help_ptr:=2;help_line[1]:=958;help_line[0]:=959; end;error;end else if n<63 then begin n:=n+1;hc[n]:=hc[0];end;end{:937}; 16:begin scan_char_num;cur_chr:=cur_val;cur_cmd:=68;goto 21;end; 10,2:begin if n>1 then{939:}begin n:=n+1;hc[n]:=cur_lang; begin if pool_ptr+n>pool_size then overflow(258,pool_size-init_pool_ptr) ;end;h:=0;for j:=1 to n do begin h:=(h+h+hc[j])mod 307; begin str_pool[pool_ptr]:=hc[j];pool_ptr:=pool_ptr+1;end;end; s:=make_string;{940:}if hyph_count=307 then overflow(960,307); hyph_count:=hyph_count+1; while hyph_word[h]<>0 do begin{941:}k:=hyph_word[h]; if(str_start[k+1]-str_start[k])<(str_start[s+1]-str_start[s])then goto 40; if(str_start[k+1]-str_start[k])>(str_start[s+1]-str_start[s])then goto 45;u:=str_start[k];v:=str_start[s]; repeat if str_pool[u]str_pool[v]then goto 45;u:=u+1;v:=v+1; until u=str_start[k+1];40:q:=hyph_list[h];hyph_list[h]:=p;p:=q; t:=hyph_word[h];hyph_word[h]:=s;s:=t;45:{:941}; if h>0 then h:=h-1 else h:=307;end;hyph_word[h]:=s; hyph_list[h]:=p{:940};end{:939};if cur_cmd=2 then goto 10;n:=0;p:=0;end; others:{936:}begin begin if interaction=3 then;print_nl(263);print(689); end;print_esc(953);print(954);begin help_ptr:=2;help_line[1]:=955; help_line[0]:=956;end;error;end{:936}end;end{:935};10:end; {:934}{968:}function prune_page_top(p:halfword;s:boolean):halfword; var prev_p:halfword;q,r:halfword;begin prev_p:=29997; mem[29997].hh.rh:=p; while p<>0 do case mem[p].hh.b0 of 0,1,2:{969:}begin q:=new_skip_param( 10);mem[prev_p].hh.rh:=q;mem[q].hh.rh:=p; if mem[temp_ptr+1].int>mem[p+3].int then mem[temp_ptr+1].int:=mem[ temp_ptr+1].int-mem[p+3].int else mem[temp_ptr+1].int:=0;p:=0;end{:969}; 8,4,3:begin prev_p:=p;p:=mem[prev_p].hh.rh;end;10,11,12:begin q:=p; p:=mem[q].hh.rh;mem[q].hh.rh:=0;mem[prev_p].hh.rh:=p; if s then begin if disc_ptr[3]=0 then disc_ptr[3]:=q else mem[r].hh.rh:= q;r:=q;end else flush_node_list(q);end;others:confusion(971)end; prune_page_top:=mem[29997].hh.rh;end; {:968}{970:}function vert_break(p:halfword;h,d:scaled):halfword; label 30,45,90;var prev_p:halfword;q,r:halfword;pi:integer;b:integer; least_cost:integer;best_place:halfword;prev_dp:scaled;t:small_number; begin prev_p:=p;least_cost:=1073741823;active_width[1]:=0; active_width[2]:=0;active_width[3]:=0;active_width[4]:=0; active_width[5]:=0;active_width[6]:=0;prev_dp:=0; while true do begin{972:}if p=0 then pi:=-10000 else{973:}case mem[p].hh .b0 of 0,1,2:begin active_width[1]:=active_width[1]+prev_dp+mem[p+3].int ;prev_dp:=mem[p+2].int;goto 45;end;8:{1365:}goto 45{:1365}; 10:if(mem[prev_p].hh.b0<9)then pi:=0 else goto 90; 11:begin if mem[p].hh.rh=0 then t:=12 else t:=mem[mem[p].hh.rh].hh.b0; if t=10 then pi:=0 else goto 90;end;12:pi:=mem[p+1].int;4,3:goto 45; others:confusion(972)end{:973}; {974:}if pi<10000 then begin{975:}if active_width[1]0)or(active_width[4]<>0)or(active_width[5]<>0)then b:=0 else b:=badness(h-active_width[1],active_width[2])else if active_width[1 ]-h>active_width[6]then b:=1073741823 else b:=badness(active_width[1]-h, active_width[6]){:975}; if b<1073741823 then if pi<=-10000 then b:=pi else if b<10000 then b:=b+ pi else b:=100000;if b<=least_cost then begin best_place:=p; least_cost:=b;best_height_plus_depth:=active_width[1]+prev_dp;end; if(b=1073741823)or(pi<=-10000)then goto 30;end{:974}; if(mem[p].hh.b0<10)or(mem[p].hh.b0>11)then goto 45; 90:{976:}if mem[p].hh.b0=11 then q:=p else begin q:=mem[p+1].hh.lh; active_width[2+mem[q].hh.b0]:=active_width[2+mem[q].hh.b0]+mem[q+2].int; active_width[6]:=active_width[6]+mem[q+3].int; if(mem[q].hh.b1<>0)and(mem[q+3].int<>0)then begin begin if interaction=3 then;print_nl(263);print(973);end;begin help_ptr:=4;help_line[3]:=974; help_line[2]:=975;help_line[1]:=976;help_line[0]:=934;end;error; r:=new_spec(q);mem[r].hh.b1:=0;delete_glue_ref(q);mem[p+1].hh.lh:=r; q:=r;end;end;active_width[1]:=active_width[1]+prev_dp+mem[q+1].int; prev_dp:=0{:976}; 45:if prev_dp>d then begin active_width[1]:=active_width[1]+prev_dp-d; prev_dp:=d;end;{:972};prev_p:=p;p:=mem[prev_p].hh.rh;end; 30:vert_break:=best_place;end; {:970}{977:}{1560:}function do_marks(a,l:small_number; q:halfword):boolean;var i:small_number; begin if l<4 then begin for i:=0 to 15 do begin if odd(i)then cur_ptr:= mem[q+(i div 2)+1].hh.rh else cur_ptr:=mem[q+(i div 2)+1].hh.lh; if cur_ptr<>0 then if do_marks(a,l+1,cur_ptr)then begin if odd(i)then mem[q+(i div 2)+1].hh.rh:=0 else mem[q+(i div 2)+1].hh.lh:=0; mem[q].hh.b1:=mem[q].hh.b1-1;end;end; if mem[q].hh.b1=0 then begin free_node(q,9);q:=0;end; end else begin case a of{1561:}0:if mem[q+2].hh.rh<>0 then begin delete_token_ref(mem[q+2].hh.rh);mem[q+2].hh.rh:=0; delete_token_ref(mem[q+3].hh.lh);mem[q+3].hh.lh:=0;end; {:1561}{1563:}1:if mem[q+2].hh.lh<>0 then begin if mem[q+1].hh.lh<>0 then delete_token_ref(mem[q+1].hh.lh);delete_token_ref(mem[q+1].hh.rh); mem[q+1].hh.rh:=0; if mem[mem[q+2].hh.lh].hh.rh=0 then begin delete_token_ref(mem[q+2].hh. lh);mem[q+2].hh.lh:=0; end else mem[mem[q+2].hh.lh].hh.lh:=mem[mem[q+2].hh.lh].hh.lh+1; mem[q+1].hh.lh:=mem[q+2].hh.lh;end; {:1563}{1564:}2:if(mem[q+1].hh.lh<>0)and(mem[q+1].hh.rh=0)then begin mem [q+1].hh.rh:=mem[q+1].hh.lh; mem[mem[q+1].hh.lh].hh.lh:=mem[mem[q+1].hh.lh].hh.lh+1;end; {:1564}{1566:}3:for i:=0 to 4 do begin if odd(i)then cur_ptr:=mem[q+(i div 2)+1].hh.rh else cur_ptr:=mem[q+(i div 2)+1].hh.lh; if cur_ptr<>0 then begin delete_token_ref(cur_ptr); if odd(i)then mem[q+(i div 2)+1].hh.rh:=0 else mem[q+(i div 2)+1].hh.lh :=0;end;end;{:1566}end; if mem[q+2].hh.lh=0 then if mem[q+3].hh.lh=0 then begin free_node(q,4); q:=0;end;end;do_marks:=(q=0);end;{:1560}function vsplit(n:halfword; h:scaled):halfword;label 10,30;var v:halfword;p:halfword;q:halfword; begin cur_val:=n; if cur_val<256 then v:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then v:=0 else v:=mem[cur_ptr+1].hh.rh;end; flush_node_list(disc_ptr[3]);disc_ptr[3]:=0; if sa_root[6]<>0 then if do_marks(0,0,sa_root[6])then sa_root[6]:=0; if cur_mark[3]<>0 then begin delete_token_ref(cur_mark[3]); cur_mark[3]:=0;delete_token_ref(cur_mark[4]);cur_mark[4]:=0;end; {978:}if v=0 then begin vsplit:=0;goto 10;end; if mem[v].hh.b0<>1 then begin begin if interaction=3 then;print_nl(263); print(339);end;print_esc(977);print(978);print_esc(979); begin help_ptr:=2;help_line[1]:=980;help_line[0]:=981;end;error; vsplit:=0;goto 10;end{:978}; q:=vert_break(mem[v+5].hh.rh,h,eqtb[5851].int);{979:}p:=mem[v+5].hh.rh; if p=q then mem[v+5].hh.rh:=0 else while true do begin if mem[p].hh.b0=4 then if mem[p+1].hh.lh<>0 then{1562:}begin find_sa_element(6,mem[p+1].hh .lh,true); if mem[cur_ptr+2].hh.rh=0 then begin mem[cur_ptr+2].hh.rh:=mem[p+1].hh. rh;mem[mem[p+1].hh.rh].hh.lh:=mem[mem[p+1].hh.rh].hh.lh+1; end else delete_token_ref(mem[cur_ptr+3].hh.lh); mem[cur_ptr+3].hh.lh:=mem[p+1].hh.rh; mem[mem[p+1].hh.rh].hh.lh:=mem[mem[p+1].hh.rh].hh.lh+1; end{:1562}else if cur_mark[3]=0 then begin cur_mark[3]:=mem[p+1].hh.rh; cur_mark[4]:=cur_mark[3]; mem[cur_mark[3]].hh.lh:=mem[cur_mark[3]].hh.lh+2; end else begin delete_token_ref(cur_mark[4]); cur_mark[4]:=mem[p+1].hh.rh; mem[cur_mark[4]].hh.lh:=mem[cur_mark[4]].hh.lh+1;end; if mem[p].hh.rh=q then begin mem[p].hh.rh:=0;goto 30;end; p:=mem[p].hh.rh;end;30:{:979};q:=prune_page_top(q,eqtb[5330].int>0); p:=mem[v+5].hh.rh;free_node(v,7); if q<>0 then q:=vpackage(q,0,1,1073741823); if cur_val<256 then eqtb[3683+cur_val].hh.rh:=q else begin find_sa_element(4,cur_val,false); if cur_ptr<>0 then begin mem[cur_ptr+1].hh.rh:=q; mem[cur_ptr+1].hh.lh:=mem[cur_ptr+1].hh.lh+1;delete_sa_ref(cur_ptr);end; end;vsplit:=vpackage(p,h,0,eqtb[5851].int);10:end; {:977}{985:}procedure print_totals;begin print_scaled(page_so_far[1]); if page_so_far[2]<>0 then begin print(313);print_scaled(page_so_far[2]); print(339);end;if page_so_far[3]<>0 then begin print(313); print_scaled(page_so_far[3]);print(312);end; if page_so_far[4]<>0 then begin print(313);print_scaled(page_so_far[4]); print(990);end;if page_so_far[5]<>0 then begin print(313); print_scaled(page_so_far[5]);print(991);end; if page_so_far[6]<>0 then begin print(314);print_scaled(page_so_far[6]); end;end;{:985}{987:}procedure freeze_page_specs(s:small_number); begin page_contents:=s;page_so_far[0]:=eqtb[5849].int; page_max_depth:=eqtb[5850].int;page_so_far[7]:=0;page_so_far[1]:=0; page_so_far[2]:=0;page_so_far[3]:=0;page_so_far[4]:=0;page_so_far[5]:=0; page_so_far[6]:=0;least_page_cost:=1073741823; {if eqtb[5301].int>0 then begin begin_diagnostic;print_nl(999); print_scaled(page_so_far[0]);print(1000);print_scaled(page_max_depth); end_diagnostic(false);end;}end; {:987}{992:}procedure box_error(n:eight_bits);begin error; begin_diagnostic;print_nl(847);show_box(eqtb[3683+n].hh.rh); end_diagnostic(true);flush_node_list(eqtb[3683+n].hh.rh); eqtb[3683+n].hh.rh:=0;end; {:992}{993:}procedure ensure_vbox(n:eight_bits);var p:halfword; begin p:=eqtb[3683+n].hh.rh; if p<>0 then if mem[p].hh.b0=0 then begin begin if interaction=3 then; print_nl(263);print(1001);end;begin help_ptr:=3;help_line[2]:=1002; help_line[1]:=1003;help_line[0]:=1004;end;box_error(n);end;end; {:993}{994:}{1012:}procedure fire_up(c:halfword);label 10; var p,q,r,s:halfword;prev_p:halfword;n:0..255;wait:boolean; save_vbadness:integer;save_vfuzz:scaled;save_split_top_skip:halfword; begin{1013:}if mem[best_page_break].hh.b0=12 then begin geq_word_define( 5307,mem[best_page_break+1].int);mem[best_page_break+1].int:=10000; end else geq_word_define(5307,10000){:1013}; if sa_root[6]<>0 then if do_marks(1,0,sa_root[6])then sa_root[6]:=0; if cur_mark[2]<>0 then begin if cur_mark[0]<>0 then delete_token_ref( cur_mark[0]);cur_mark[0]:=cur_mark[2]; mem[cur_mark[0]].hh.lh:=mem[cur_mark[0]].hh.lh+1; delete_token_ref(cur_mark[1]);cur_mark[1]:=0;end; {1014:}if c=best_page_break then best_page_break:=0; {1015:}if eqtb[3938].hh.rh<>0 then begin begin if interaction=3 then; print_nl(263);print(339);end;print_esc(412);print(1015); begin help_ptr:=2;help_line[1]:=1016;help_line[0]:=1004;end; box_error(255);end{:1015};insert_penalties:=0; save_split_top_skip:=eqtb[2892].hh.rh; if eqtb[5321].int<=0 then{1018:}begin r:=mem[30000].hh.rh; while r<>30000 do begin if mem[r+2].hh.lh<>0 then begin n:=mem[r].hh.b1 -0;ensure_vbox(n); if eqtb[3683+n].hh.rh=0 then eqtb[3683+n].hh.rh:=new_null_box; p:=eqtb[3683+n].hh.rh+5;while mem[p].hh.rh<>0 do p:=mem[p].hh.rh; mem[r+2].hh.rh:=p;end;r:=mem[r].hh.rh;end;end{:1018};q:=29996; mem[q].hh.rh:=0;prev_p:=29998;p:=mem[prev_p].hh.rh; while p<>best_page_break do begin if mem[p].hh.b0=3 then begin if eqtb[ 5321].int<=0 then{1020:}begin r:=mem[30000].hh.rh; while mem[r].hh.b1<>mem[p].hh.b1 do r:=mem[r].hh.rh; if mem[r+2].hh.lh=0 then wait:=true else begin wait:=false; s:=mem[r+2].hh.rh;mem[s].hh.rh:=mem[p+4].hh.lh; if mem[r+2].hh.lh=p then{1021:}begin if mem[r].hh.b0=1 then if(mem[r+1]. hh.lh=p)and(mem[r+1].hh.rh<>0)then begin while mem[s].hh.rh<>mem[r+1].hh .rh do s:=mem[s].hh.rh;mem[s].hh.rh:=0;eqtb[2892].hh.rh:=mem[p+4].hh.rh; mem[p+4].hh.lh:=prune_page_top(mem[r+1].hh.rh,false); if mem[p+4].hh.lh<>0 then begin temp_ptr:=vpackage(mem[p+4].hh.lh,0,1, 1073741823);mem[p+3].int:=mem[temp_ptr+3].int+mem[temp_ptr+2].int; free_node(temp_ptr,7);wait:=true;end;end;mem[r+2].hh.lh:=0; n:=mem[r].hh.b1-0;temp_ptr:=mem[eqtb[3683+n].hh.rh+5].hh.rh; free_node(eqtb[3683+n].hh.rh,7); eqtb[3683+n].hh.rh:=vpackage(temp_ptr,0,1,1073741823); end{:1021}else begin while mem[s].hh.rh<>0 do s:=mem[s].hh.rh; mem[r+2].hh.rh:=s;end;end;{1022:}mem[prev_p].hh.rh:=mem[p].hh.rh; mem[p].hh.rh:=0;if wait then begin mem[q].hh.rh:=p;q:=p; insert_penalties:=insert_penalties+1; end else begin delete_glue_ref(mem[p+4].hh.rh);free_node(p,5);end; p:=prev_p{:1022};end{:1020}; end else if mem[p].hh.b0=4 then if mem[p+1].hh.lh<>0 then{1565:}begin find_sa_element(6,mem[p+1].hh.lh,true); if mem[cur_ptr+1].hh.rh=0 then begin mem[cur_ptr+1].hh.rh:=mem[p+1].hh. rh;mem[mem[p+1].hh.rh].hh.lh:=mem[mem[p+1].hh.rh].hh.lh+1;end; if mem[cur_ptr+2].hh.lh<>0 then delete_token_ref(mem[cur_ptr+2].hh.lh); mem[cur_ptr+2].hh.lh:=mem[p+1].hh.rh; mem[mem[p+1].hh.rh].hh.lh:=mem[mem[p+1].hh.rh].hh.lh+1; end{:1565}else{1016:}begin if cur_mark[1]=0 then begin cur_mark[1]:=mem[ p+1].hh.rh;mem[cur_mark[1]].hh.lh:=mem[cur_mark[1]].hh.lh+1;end; if cur_mark[2]<>0 then delete_token_ref(cur_mark[2]); cur_mark[2]:=mem[p+1].hh.rh; mem[cur_mark[2]].hh.lh:=mem[cur_mark[2]].hh.lh+1;end{:1016};prev_p:=p; p:=mem[prev_p].hh.rh;end;eqtb[2892].hh.rh:=save_split_top_skip; {1017:}if p<>0 then begin if mem[29999].hh.rh=0 then if nest_ptr=0 then cur_list.tail_field:=page_tail else nest[0].tail_field:=page_tail; mem[page_tail].hh.rh:=mem[29999].hh.rh;mem[29999].hh.rh:=p; mem[prev_p].hh.rh:=0;end;save_vbadness:=eqtb[5295].int; eqtb[5295].int:=10000;save_vfuzz:=eqtb[5854].int; eqtb[5854].int:=1073741823; eqtb[3938].hh.rh:=vpackage(mem[29998].hh.rh,best_size,0,page_max_depth); eqtb[5295].int:=save_vbadness;eqtb[5854].int:=save_vfuzz; if last_glue<>65535 then delete_glue_ref(last_glue); {991:}page_contents:=0;page_tail:=29998;mem[29998].hh.rh:=0; last_glue:=65535;last_penalty:=0;last_kern:=0;last_node_type:=-1; page_so_far[7]:=0;page_max_depth:=0{:991}; if q<>29996 then begin mem[29998].hh.rh:=mem[29996].hh.rh;page_tail:=q; end{:1017};{1019:}r:=mem[30000].hh.rh; while r<>30000 do begin q:=mem[r].hh.rh;free_node(r,4);r:=q;end; mem[30000].hh.rh:=30000{:1019}{:1014}; if sa_root[6]<>0 then if do_marks(2,0,sa_root[6])then sa_root[6]:=0; if(cur_mark[0]<>0)and(cur_mark[1]=0)then begin cur_mark[1]:=cur_mark[0]; mem[cur_mark[0]].hh.lh:=mem[cur_mark[0]].hh.lh+1;end; if eqtb[3413].hh.rh<>0 then if dead_cycles>=eqtb[5308].int then{1024:} begin begin if interaction=3 then;print_nl(263);print(1017);end; print_int(dead_cycles);print(1018);begin help_ptr:=3;help_line[2]:=1019; help_line[1]:=1020;help_line[0]:=1021;end;error; end{:1024}else{1025:}begin output_active:=true; dead_cycles:=dead_cycles+1;push_nest;cur_list.mode_field:=-1; cur_list.aux_field.int:=-65536000;cur_list.ml_field:=-line; begin_token_list(eqtb[3413].hh.rh,6);new_save_level(8);normal_paragraph; scan_left_brace;goto 10;end{:1025}; {1023:}begin if mem[29998].hh.rh<>0 then begin if mem[29999].hh.rh=0 then if nest_ptr=0 then cur_list.tail_field:=page_tail else nest[0]. tail_field:=page_tail else mem[page_tail].hh.rh:=mem[29999].hh.rh; mem[29999].hh.rh:=mem[29998].hh.rh;mem[29998].hh.rh:=0;page_tail:=29998; end;flush_node_list(disc_ptr[2]);disc_ptr[2]:=0; ship_out(eqtb[3938].hh.rh);eqtb[3938].hh.rh:=0;end{:1023};10:end; {:1012}procedure build_page;label 10,30,31,22,80,90;var p:halfword; q,r:halfword;b,c:integer;pi:integer;n:0..255;delta,h,w:scaled; begin if(mem[29999].hh.rh=0)or output_active then goto 10; repeat 22:p:=mem[29999].hh.rh; {996:}if last_glue<>65535 then delete_glue_ref(last_glue); last_penalty:=0;last_kern:=0;last_node_type:=mem[p].hh.b0+1; if mem[p].hh.b0=10 then begin last_glue:=mem[p+1].hh.lh; mem[last_glue].hh.rh:=mem[last_glue].hh.rh+1; end else begin last_glue:=65535; if mem[p].hh.b0=12 then last_penalty:=mem[p+1].int else if mem[p].hh.b0= 11 then last_kern:=mem[p+1].int;end{:996}; {997:}{1000:}case mem[p].hh.b0 of 0,1,2:if page_contents<2 then{1001:} begin if page_contents=0 then freeze_page_specs(2)else page_contents:=2; q:=new_skip_param(9); if mem[temp_ptr+1].int>mem[p+3].int then mem[temp_ptr+1].int:=mem[ temp_ptr+1].int-mem[p+3].int else mem[temp_ptr+1].int:=0; mem[q].hh.rh:=p;mem[29999].hh.rh:=q;goto 22; end{:1001}else{1002:}begin page_so_far[1]:=page_so_far[1]+page_so_far[7] +mem[p+3].int;page_so_far[7]:=mem[p+2].int;goto 80;end{:1002}; 8:{1364:}goto 80{:1364}; 10:if page_contents<2 then goto 31 else if(mem[page_tail].hh.b0<9)then pi:=0 else goto 90; 11:if page_contents<2 then goto 31 else if mem[p].hh.rh=0 then goto 10 else if mem[mem[p].hh.rh].hh.b0=10 then pi:=0 else goto 90; 12:if page_contents<2 then goto 31 else pi:=mem[p+1].int;4:goto 80; 3:{1008:}begin if page_contents=0 then freeze_page_specs(1); n:=mem[p].hh.b1;r:=30000; while n>=mem[mem[r].hh.rh].hh.b1 do r:=mem[r].hh.rh;n:=n-0; if mem[r].hh.b1<>n+0 then{1009:}begin q:=get_node(4); mem[q].hh.rh:=mem[r].hh.rh;mem[r].hh.rh:=q;r:=q;mem[r].hh.b1:=n+0; mem[r].hh.b0:=0;ensure_vbox(n); if eqtb[3683+n].hh.rh=0 then mem[r+3].int:=0 else mem[r+3].int:=mem[eqtb [3683+n].hh.rh+3].int+mem[eqtb[3683+n].hh.rh+2].int;mem[r+2].hh.lh:=0; q:=eqtb[2900+n].hh.rh; if eqtb[5333+n].int=1000 then h:=mem[r+3].int else h:=x_over_n(mem[r+3]. int,1000)*eqtb[5333+n].int; page_so_far[0]:=page_so_far[0]-h-mem[q+1].int; page_so_far[2+mem[q].hh.b0]:=page_so_far[2+mem[q].hh.b0]+mem[q+2].int; page_so_far[6]:=page_so_far[6]+mem[q+3].int; if(mem[q].hh.b1<>0)and(mem[q+3].int<>0)then begin begin if interaction=3 then;print_nl(263);print(1010);end;print_esc(398);print_int(n); begin help_ptr:=3;help_line[2]:=1011;help_line[1]:=1012; help_line[0]:=934;end;error;end;end{:1009}; if mem[r].hh.b0=1 then insert_penalties:=insert_penalties+mem[p+1].int else begin mem[r+2].hh.rh:=p; delta:=page_so_far[0]-page_so_far[1]-page_so_far[7]+page_so_far[6]; if eqtb[5333+n].int=1000 then h:=mem[p+3].int else h:=x_over_n(mem[p+3]. int,1000)*eqtb[5333+n].int; if((h<=0)or(h<=delta))and(mem[p+3].int+mem[r+3].int<=eqtb[5866+n].int) then begin page_so_far[0]:=page_so_far[0]-h; mem[r+3].int:=mem[r+3].int+mem[p+3].int; end else{1010:}begin if eqtb[5333+n].int<=0 then w:=1073741823 else begin w:=page_so_far[0]-page_so_far[1]-page_so_far[7]; if eqtb[5333+n].int<>1000 then w:=x_over_n(w,eqtb[5333+n].int)*1000;end; if w>eqtb[5866+n].int-mem[r+3].int then w:=eqtb[5866+n].int-mem[r+3].int ;q:=vert_break(mem[p+4].hh.lh,w,mem[p+2].int); mem[r+3].int:=mem[r+3].int+best_height_plus_depth; {if eqtb[5301].int>0 then[1011:]begin begin_diagnostic;print_nl(1013); print_int(n);print(1014);print_scaled(w);print_char(44); print_scaled(best_height_plus_depth);print(943); if q=0 then print_int(-10000)else if mem[q].hh.b0=12 then print_int(mem[ q+1].int)else print_char(48);end_diagnostic(false);end[:1011];} if eqtb[5333+n].int<>1000 then best_height_plus_depth:=x_over_n( best_height_plus_depth,1000)*eqtb[5333+n].int; page_so_far[0]:=page_so_far[0]-best_height_plus_depth;mem[r].hh.b0:=1; mem[r+1].hh.rh:=q;mem[r+1].hh.lh:=p; if q=0 then insert_penalties:=insert_penalties-10000 else if mem[q].hh. b0=12 then insert_penalties:=insert_penalties+mem[q+1].int;end{:1010}; end;goto 80;end{:1008};others:confusion(1005)end{:1000}; {1005:}if pi<10000 then begin{1007:}if page_so_far[1]0)or(page_so_far[4]<>0)or(page_so_far[5]<>0)then b:=0 else b:=badness(page_so_far[0]-page_so_far[1],page_so_far[2])else if page_so_far[1]-page_so_far[0]>page_so_far[6]then b:=1073741823 else b:= badness(page_so_far[1]-page_so_far[0],page_so_far[6]){:1007}; if b<1073741823 then if pi<=-10000 then c:=pi else if b<10000 then c:=b+ pi+insert_penalties else c:=100000 else c:=b; if insert_penalties>=10000 then c:=1073741823; {if eqtb[5301].int>0 then[1006:]begin begin_diagnostic;print_nl(37); print(939);print_totals;print(1008);print_scaled(page_so_far[0]); print(942);if b=1073741823 then print_char(42)else print_int(b); print(943);print_int(pi);print(1009); if c=1073741823 then print_char(42)else print_int(c); if c<=least_page_cost then print_char(35);end_diagnostic(false); end[:1006];}if c<=least_page_cost then begin best_page_break:=p; best_size:=page_so_far[0];least_page_cost:=c;r:=mem[30000].hh.rh; while r<>30000 do begin mem[r+2].hh.lh:=mem[r+2].hh.rh;r:=mem[r].hh.rh; end;end;if(c=1073741823)or(pi<=-10000)then begin fire_up(p); if output_active then goto 10;goto 30;end;end{:1005}; if(mem[p].hh.b0<10)or(mem[p].hh.b0>11)then goto 80; 90:{1004:}if mem[p].hh.b0=11 then q:=p else begin q:=mem[p+1].hh.lh; page_so_far[2+mem[q].hh.b0]:=page_so_far[2+mem[q].hh.b0]+mem[q+2].int; page_so_far[6]:=page_so_far[6]+mem[q+3].int; if(mem[q].hh.b1<>0)and(mem[q+3].int<>0)then begin begin if interaction=3 then;print_nl(263);print(1006);end;begin help_ptr:=4;help_line[3]:=1007; help_line[2]:=975;help_line[1]:=976;help_line[0]:=934;end;error; r:=new_spec(q);mem[r].hh.b1:=0;delete_glue_ref(q);mem[p+1].hh.lh:=r; q:=r;end;end;page_so_far[1]:=page_so_far[1]+page_so_far[7]+mem[q+1].int; page_so_far[7]:=0{:1004}; 80:{1003:}if page_so_far[7]>page_max_depth then begin page_so_far[1]:= page_so_far[1]+page_so_far[7]-page_max_depth; page_so_far[7]:=page_max_depth;end;{:1003}; {998:}mem[page_tail].hh.rh:=p;page_tail:=p; mem[29999].hh.rh:=mem[p].hh.rh;mem[p].hh.rh:=0;goto 30{:998}; 31:{999:}mem[29999].hh.rh:=mem[p].hh.rh;mem[p].hh.rh:=0; if eqtb[5330].int>0 then begin if disc_ptr[2]=0 then disc_ptr[2]:=p else mem[disc_ptr[1]].hh.rh:=p;disc_ptr[1]:=p; end else flush_node_list(p){:999};30:{:997};until mem[29999].hh.rh=0; {995:}if nest_ptr=0 then cur_list.tail_field:=29999 else nest[0]. tail_field:=29999{:995};10:end;{:994}{1030:}{1043:}procedure app_space; var q:halfword; begin if(cur_list.aux_field.hh.lh>=2000)and(eqtb[2895].hh.rh<>0)then q:= new_param_glue(13)else begin if eqtb[2894].hh.rh<>0 then main_p:=eqtb[ 2894].hh.rh else{1042:}begin main_p:=font_glue[eqtb[3939].hh.rh]; if main_p=0 then begin main_p:=new_spec(0); main_k:=param_base[eqtb[3939].hh.rh]+2; mem[main_p+1].int:=font_info[main_k].int; mem[main_p+2].int:=font_info[main_k+1].int; mem[main_p+3].int:=font_info[main_k+2].int; font_glue[eqtb[3939].hh.rh]:=main_p;end;end{:1042}; main_p:=new_spec(main_p); {1044:}if cur_list.aux_field.hh.lh>=2000 then mem[main_p+1].int:=mem[ main_p+1].int+font_info[7+param_base[eqtb[3939].hh.rh]].int; mem[main_p+2].int:=xn_over_d(mem[main_p+2].int,cur_list.aux_field.hh.lh, 1000); mem[main_p+3].int:=xn_over_d(mem[main_p+3].int,1000,cur_list.aux_field. hh.lh){:1044};q:=new_glue(main_p);mem[main_p].hh.rh:=0;end; mem[cur_list.tail_field].hh.rh:=q;cur_list.tail_field:=q;end; {:1043}{1047:}procedure insert_dollar_sign;begin back_input; cur_tok:=804;begin if interaction=3 then;print_nl(263);print(1029);end; begin help_ptr:=2;help_line[1]:=1030;help_line[0]:=1031;end;ins_error; end;{:1047}{1049:}procedure you_cant;begin begin if interaction=3 then; print_nl(263);print(694);end;print_cmd_chr(cur_cmd,cur_chr);print(1032); print_mode(cur_list.mode_field);end; {:1049}{1050:}procedure report_illegal_case;begin you_cant; begin help_ptr:=4;help_line[3]:=1033;help_line[2]:=1034; help_line[1]:=1035;help_line[0]:=1036;end;error;end; {:1050}{1051:}function privileged:boolean; begin if cur_list.mode_field>0 then privileged:=true else begin report_illegal_case;privileged:=false;end;end; {:1051}{1054:}function its_all_over:boolean;label 10; begin if privileged then begin if(29998=page_tail)and(cur_list. head_field=cur_list.tail_field)and(dead_cycles=0)then begin its_all_over :=true;goto 10;end;back_input; begin mem[cur_list.tail_field].hh.rh:=new_null_box; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field+1].int:=eqtb[5848].int; begin mem[cur_list.tail_field].hh.rh:=new_glue(8); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; begin mem[cur_list.tail_field].hh.rh:=new_penalty(-1073741824); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;build_page;end; its_all_over:=false;10:end;{:1054}{1060:}procedure append_glue; var s:small_number;begin s:=cur_chr;case s of 0:cur_val:=4;1:cur_val:=8; 2:cur_val:=12;3:cur_val:=16;4:scan_glue(2);5:scan_glue(3);end; begin mem[cur_list.tail_field].hh.rh:=new_glue(cur_val); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; if s>=4 then begin mem[cur_val].hh.rh:=mem[cur_val].hh.rh-1; if s>4 then mem[cur_list.tail_field].hh.b1:=99;end;end; {:1060}{1061:}procedure append_kern;var s:quarterword;begin s:=cur_chr; scan_dimen(s=99,false,false); begin mem[cur_list.tail_field].hh.rh:=new_kern(cur_val); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b1:=s;end;{:1061}{1064:}procedure off_save; var p:halfword; begin if cur_group=0 then{1066:}begin begin if interaction=3 then; print_nl(263);print(788);end;print_cmd_chr(cur_cmd,cur_chr); begin help_ptr:=1;help_line[0]:=1054;end;error; end{:1066}else begin back_input;p:=get_avail;mem[29997].hh.rh:=p; begin if interaction=3 then;print_nl(263);print(634);end; {1065:}case cur_group of 14:begin mem[p].hh.lh:=6711;print_esc(519);end; 15:begin mem[p].hh.lh:=804;print_char(36);end; 16:begin mem[p].hh.lh:=6712;mem[p].hh.rh:=get_avail;p:=mem[p].hh.rh; mem[p].hh.lh:=3118;print_esc(1053);end;others:begin mem[p].hh.lh:=637; print_char(125);end end{:1065};print(635); begin_token_list(mem[29997].hh.rh,4);begin help_ptr:=5; help_line[4]:=1048;help_line[3]:=1049;help_line[2]:=1050; help_line[1]:=1051;help_line[0]:=1052;end;error;end;end; {:1064}{1069:}procedure extra_right_brace; begin begin if interaction=3 then;print_nl(263);print(1059);end; case cur_group of 14:print_esc(519);15:print_char(36);16:print_esc(888); end;begin help_ptr:=5;help_line[4]:=1060;help_line[3]:=1061; help_line[2]:=1062;help_line[1]:=1063;help_line[0]:=1064;end;error; align_state:=align_state+1;end;{:1069}{1070:}procedure normal_paragraph; begin if eqtb[5287].int<>0 then eq_word_define(5287,0); if eqtb[5862].int<>0 then eq_word_define(5862,0); if eqtb[5309].int<>1 then eq_word_define(5309,1); if eqtb[3412].hh.rh<>0 then eq_define(3412,118,0); if eqtb[3679].hh.rh<>0 then eq_define(3679,118,0);end; {:1070}{1075:}procedure box_end(box_context:integer);var p:halfword; a:small_number; begin if box_context<1073741824 then{1076:}begin if cur_box<>0 then begin mem[cur_box+4].int:=box_context; if abs(cur_list.mode_field)=1 then begin append_to_vlist(cur_box); if adjust_tail<>0 then begin if 29995<>adjust_tail then begin mem[ cur_list.tail_field].hh.rh:=mem[29995].hh.rh; cur_list.tail_field:=adjust_tail;end;adjust_tail:=0;end; if cur_list.mode_field>0 then build_page; end else begin if abs(cur_list.mode_field)=102 then cur_list.aux_field. hh.lh:=1000 else begin p:=new_noad;mem[p+1].hh.rh:=2; mem[p+1].hh.lh:=cur_box;cur_box:=p;end; mem[cur_list.tail_field].hh.rh:=cur_box;cur_list.tail_field:=cur_box; end;end; end{:1076}else if box_context<1073807360 then{1077:}begin if box_context <1073774592 then begin cur_val:=box_context-1073741824;a:=0; end else begin cur_val:=box_context-1073774592;a:=4;end; if cur_val<256 then if(a>=4)then geq_define(3683+cur_val,119,cur_box) else eq_define(3683+cur_val,119,cur_box)else begin find_sa_element(4, cur_val,true); if(a>=4)then gsa_def(cur_ptr,cur_box)else sa_def(cur_ptr,cur_box);end; end{:1077}else if cur_box<>0 then if box_context>1073807360 then{1078:} begin{404:}repeat get_x_token;until(cur_cmd<>10)and(cur_cmd<>0){:404}; if((cur_cmd=26)and(abs(cur_list.mode_field)<>1))or((cur_cmd=27)and(abs( cur_list.mode_field)=1))then begin append_glue; mem[cur_list.tail_field].hh.b1:=box_context-(1073807261); mem[cur_list.tail_field+1].hh.rh:=cur_box; end else begin begin if interaction=3 then;print_nl(263);print(1077); end;begin help_ptr:=3;help_line[2]:=1078;help_line[1]:=1079; help_line[0]:=1080;end;back_error;flush_node_list(cur_box);end; end{:1078}else ship_out(cur_box);end; {:1075}{1079:}procedure begin_box(box_context:integer);label 10,30; var p,q:halfword;r:halfword;fm:boolean;tx:halfword;m:quarterword; k:halfword;n:halfword;begin case cur_chr of 0:begin scan_register_num; if cur_val<256 then cur_box:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then cur_box:=0 else cur_box:=mem[cur_ptr+1].hh.rh;end; if cur_val<256 then eqtb[3683+cur_val].hh.rh:=0 else begin find_sa_element(4,cur_val,false); if cur_ptr<>0 then begin mem[cur_ptr+1].hh.rh:=0; mem[cur_ptr+1].hh.lh:=mem[cur_ptr+1].hh.lh+1;delete_sa_ref(cur_ptr);end; end;end;1:begin scan_register_num; if cur_val<256 then q:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then q:=0 else q:=mem[cur_ptr+1].hh.rh;end; cur_box:=copy_node_list(q);end;2:{1080:}begin cur_box:=0; if abs(cur_list.mode_field)=203 then begin you_cant;begin help_ptr:=1; help_line[0]:=1082;end;error; end else if(cur_list.mode_field=1)and(cur_list.head_field=cur_list. tail_field)then begin you_cant;begin help_ptr:=2;help_line[1]:=1083; help_line[0]:=1084;end;error;end else begin tx:=cur_list.tail_field; if not(tx>=hi_mem_min)then if(mem[tx].hh.b0=9)and(mem[tx].hh.b1=3)then begin r:=cur_list.head_field;repeat q:=r;r:=mem[q].hh.rh;until r=tx; tx:=q;end; if not(tx>=hi_mem_min)then if(mem[tx].hh.b0=0)or(mem[tx].hh.b0=1)then {1081:}begin q:=cur_list.head_field;p:=0;repeat r:=p;p:=q;fm:=false; if not(q>=hi_mem_min)then if mem[q].hh.b0=7 then begin for m:=1 to mem[q ].hh.b1 do p:=mem[p].hh.rh;if p=tx then goto 30; end else if(mem[q].hh.b0=9)and(mem[q].hh.b1=2)then fm:=true; q:=mem[p].hh.rh;until q=tx;q:=mem[tx].hh.rh;mem[p].hh.rh:=q; mem[tx].hh.rh:=0; if q=0 then if fm then confusion(1081)else cur_list.tail_field:=p else if fm then begin cur_list.tail_field:=r;mem[r].hh.rh:=0; flush_node_list(p);end;cur_box:=tx;mem[cur_box+4].int:=0;end{:1081}; 30:end;end{:1080};3:{1082:}begin scan_register_num;n:=cur_val; if not scan_keyword(853)then begin begin if interaction=3 then; print_nl(263);print(1085);end;begin help_ptr:=2;help_line[1]:=1086; help_line[0]:=1087;end;error;end;scan_dimen(false,false,false); cur_box:=vsplit(n,cur_val);end{:1082};others:{1083:}begin k:=cur_chr-4; save_stack[save_ptr+0].int:=box_context; if k=102 then if(box_context<1073741824)and(abs(cur_list.mode_field)=1) then scan_spec(3,true)else scan_spec(2,true)else begin if k=1 then scan_spec(4,true)else begin scan_spec(5,true);k:=1;end;normal_paragraph; end;push_nest;cur_list.mode_field:=-k; if k=1 then begin cur_list.aux_field.int:=-65536000; if eqtb[3418].hh.rh<>0 then begin_token_list(eqtb[3418].hh.rh,11); end else begin cur_list.aux_field.hh.lh:=1000; if eqtb[3417].hh.rh<>0 then begin_token_list(eqtb[3417].hh.rh,10);end; goto 10;end{:1083}end;box_end(box_context);10:end; {:1079}{1084:}procedure scan_box(box_context:integer); begin{404:}repeat get_x_token;until(cur_cmd<>10)and(cur_cmd<>0){:404}; if cur_cmd=20 then begin_box(box_context)else if(box_context>=1073807361 )and((cur_cmd=36)or(cur_cmd=35))then begin cur_box:=scan_rule_spec; box_end(box_context);end else begin begin if interaction=3 then; print_nl(263);print(1088);end;begin help_ptr:=3;help_line[2]:=1089; help_line[1]:=1090;help_line[0]:=1091;end;back_error;end;end; {:1084}{1086:}procedure package(c:small_number);var h:scaled;p:halfword; d:scaled;begin d:=eqtb[5852].int;unsave;save_ptr:=save_ptr-3; if cur_list.mode_field=-102 then cur_box:=hpack(mem[cur_list.head_field] .hh.rh,save_stack[save_ptr+2].int,save_stack[save_ptr+1].int)else begin cur_box:=vpackage(mem[cur_list.head_field].hh.rh,save_stack[save_ptr+2]. int,save_stack[save_ptr+1].int,d);if c=4 then{1087:}begin h:=0; p:=mem[cur_box+5].hh.rh; if p<>0 then if mem[p].hh.b0<=2 then h:=mem[p+3].int; mem[cur_box+2].int:=mem[cur_box+2].int-h+mem[cur_box+3].int; mem[cur_box+3].int:=h;end{:1087};end;pop_nest; box_end(save_stack[save_ptr+0].int);end; {:1086}{1091:}function norm_min(h:integer):small_number; begin if h<=0 then norm_min:=1 else if h>=63 then norm_min:=63 else norm_min:=h;end;procedure new_graf(indented:boolean); begin cur_list.pg_field:=0; if(cur_list.mode_field=1)or(cur_list.head_field<>cur_list.tail_field) then begin mem[cur_list.tail_field].hh.rh:=new_param_glue(2); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;push_nest; cur_list.mode_field:=102;cur_list.aux_field.hh.lh:=1000; if eqtb[5318].int<=0 then cur_lang:=0 else if eqtb[5318].int>255 then cur_lang:=0 else cur_lang:=eqtb[5318].int; cur_list.aux_field.hh.rh:=cur_lang; cur_list.pg_field:=(norm_min(eqtb[5319].int)*64+norm_min(eqtb[5320].int) )*65536+cur_lang; if indented then begin cur_list.tail_field:=new_null_box; mem[cur_list.head_field].hh.rh:=cur_list.tail_field; mem[cur_list.tail_field+1].int:=eqtb[5845].int;end; if eqtb[3414].hh.rh<>0 then begin_token_list(eqtb[3414].hh.rh,7); if nest_ptr=1 then build_page;end; {:1091}{1093:}procedure indent_in_hmode;var p,q:halfword; begin if cur_chr>0 then begin p:=new_null_box; mem[p+1].int:=eqtb[5845].int; if abs(cur_list.mode_field)=102 then cur_list.aux_field.hh.lh:=1000 else begin q:=new_noad;mem[q+1].hh.rh:=2;mem[q+1].hh.lh:=p;p:=q;end; begin mem[cur_list.tail_field].hh.rh:=p; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;end;end; {:1093}{1095:}procedure head_for_vmode; begin if cur_list.mode_field<0 then if cur_cmd<>36 then off_save else begin begin if interaction=3 then;print_nl(263);print(694);end; print_esc(524);print(1094);begin help_ptr:=2;help_line[1]:=1095; help_line[0]:=1096;end;error;end else begin back_input; cur_tok:=par_token;back_input;cur_input.index_field:=4;end;end; {:1095}{1096:}procedure end_graf; begin if cur_list.mode_field=102 then begin if cur_list.head_field= cur_list.tail_field then pop_nest else line_break(false); if cur_list.eTeX_aux_field<>0 then begin flush_list(cur_list. eTeX_aux_field);cur_list.eTeX_aux_field:=0;end;normal_paragraph; error_count:=0;end;end;{:1096}{1099:}procedure begin_insert_or_adjust; begin if cur_cmd=38 then cur_val:=255 else begin scan_eight_bit_int; if cur_val=255 then begin begin if interaction=3 then;print_nl(263); print(1097);end;print_esc(331);print_int(255);begin help_ptr:=1; help_line[0]:=1098;end;error;cur_val:=0;end;end; save_stack[save_ptr+0].int:=cur_val;save_ptr:=save_ptr+1; new_save_level(11);scan_left_brace;normal_paragraph;push_nest; cur_list.mode_field:=-1;cur_list.aux_field.int:=-65536000;end; {:1099}{1101:}procedure make_mark;var p:halfword;c:halfword; begin if cur_chr=0 then c:=0 else begin scan_register_num;c:=cur_val; end;p:=scan_toks(false,true);p:=get_node(2);mem[p+1].hh.lh:=c; mem[p].hh.b0:=4;mem[p].hh.b1:=0;mem[p+1].hh.rh:=def_ref; mem[cur_list.tail_field].hh.rh:=p;cur_list.tail_field:=p;end; {:1101}{1103:}procedure append_penalty;begin scan_int; begin mem[cur_list.tail_field].hh.rh:=new_penalty(cur_val); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; if cur_list.mode_field=1 then build_page;end; {:1103}{1105:}procedure delete_last;label 10;var p,q:halfword; r:halfword;fm:boolean;tx:halfword;m:quarterword; begin if(cur_list.mode_field=1)and(cur_list.tail_field=cur_list. head_field)then{1106:}begin if(cur_chr<>10)or(last_glue<>65535)then begin you_cant;begin help_ptr:=2;help_line[1]:=1083;help_line[0]:=1099; end;if cur_chr=11 then help_line[0]:=(1100)else if cur_chr<>10 then help_line[0]:=(1101);error;end; end{:1106}else begin tx:=cur_list.tail_field; if not(tx>=hi_mem_min)then if(mem[tx].hh.b0=9)and(mem[tx].hh.b1=3)then begin r:=cur_list.head_field;repeat q:=r;r:=mem[q].hh.rh;until r=tx; tx:=q;end; if not(tx>=hi_mem_min)then if mem[tx].hh.b0=cur_chr then begin q:= cur_list.head_field;p:=0;repeat r:=p;p:=q;fm:=false; if not(q>=hi_mem_min)then if mem[q].hh.b0=7 then begin for m:=1 to mem[q ].hh.b1 do p:=mem[p].hh.rh;if p=tx then goto 10; end else if(mem[q].hh.b0=9)and(mem[q].hh.b1=2)then fm:=true; q:=mem[p].hh.rh;until q=tx;q:=mem[tx].hh.rh;mem[p].hh.rh:=q; mem[tx].hh.rh:=0; if q=0 then if fm then confusion(1081)else cur_list.tail_field:=p else if fm then begin cur_list.tail_field:=r;mem[r].hh.rh:=0; flush_node_list(p);end;flush_node_list(tx);end;end;10:end; {:1105}{1110:}procedure unpackage;label 30,10;var p:halfword;c:0..1; begin if cur_chr>1 then{1598:}begin mem[cur_list.tail_field].hh.rh:= disc_ptr[cur_chr];disc_ptr[cur_chr]:=0;goto 30;end{:1598};c:=cur_chr; scan_register_num; if cur_val<256 then p:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then p:=0 else p:=mem[cur_ptr+1].hh.rh;end; if p=0 then goto 10; if(abs(cur_list.mode_field)=203)or((abs(cur_list.mode_field)=1)and(mem[p ].hh.b0<>1))or((abs(cur_list.mode_field)=102)and(mem[p].hh.b0<>0))then begin begin if interaction=3 then;print_nl(263);print(1109);end; begin help_ptr:=3;help_line[2]:=1110;help_line[1]:=1111; help_line[0]:=1112;end;error;goto 10;end; if c=1 then mem[cur_list.tail_field].hh.rh:=copy_node_list(mem[p+5].hh. rh)else begin mem[cur_list.tail_field].hh.rh:=mem[p+5].hh.rh; if cur_val<256 then eqtb[3683+cur_val].hh.rh:=0 else begin find_sa_element(4,cur_val,false); if cur_ptr<>0 then begin mem[cur_ptr+1].hh.rh:=0; mem[cur_ptr+1].hh.lh:=mem[cur_ptr+1].hh.lh+1;delete_sa_ref(cur_ptr);end; end;free_node(p,7);end; 30:while mem[cur_list.tail_field].hh.rh<>0 do cur_list.tail_field:=mem[ cur_list.tail_field].hh.rh;10:end; {:1110}{1113:}procedure append_italic_correction;label 10; var p:halfword;f:internal_font_number; begin if cur_list.tail_field<>cur_list.head_field then begin if(cur_list .tail_field>=hi_mem_min)then p:=cur_list.tail_field else if mem[cur_list .tail_field].hh.b0=6 then p:=cur_list.tail_field+1 else goto 10; f:=mem[p].hh.b0; begin mem[cur_list.tail_field].hh.rh:=new_kern(font_info[italic_base[f]+ (font_info[char_base[f]+mem[p].hh.b1].qqqq.b2-0)div 4].int); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b1:=1;end;10:end; {:1113}{1117:}procedure append_discretionary;var c:integer; begin begin mem[cur_list.tail_field].hh.rh:=new_disc; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; if cur_chr=1 then begin c:=hyphen_char[eqtb[3939].hh.rh]; if c>=0 then if c<256 then mem[cur_list.tail_field+1].hh.lh:= new_character(eqtb[3939].hh.rh,c);end else begin save_ptr:=save_ptr+1; save_stack[save_ptr-1].int:=0;new_save_level(10);scan_left_brace; push_nest;cur_list.mode_field:=-102;cur_list.aux_field.hh.lh:=1000;end; end;{:1117}{1119:}procedure build_discretionary;label 30,10; var p,q:halfword;n:integer;begin unsave;{1121:}q:=cur_list.head_field; p:=mem[q].hh.rh;n:=0; while p<>0 do begin if not(p>=hi_mem_min)then if mem[p].hh.b0>2 then if mem[p].hh.b0<>11 then if mem[p].hh.b0<>6 then begin begin if interaction =3 then;print_nl(263);print(1119);end;begin help_ptr:=1; help_line[0]:=1120;end;error;begin_diagnostic;print_nl(1121); show_box(p);end_diagnostic(true);flush_node_list(p);mem[q].hh.rh:=0; goto 30;end;q:=p;p:=mem[q].hh.rh;n:=n+1;end;30:{:1121}; p:=mem[cur_list.head_field].hh.rh;pop_nest; case save_stack[save_ptr-1].int of 0:mem[cur_list.tail_field+1].hh.lh:=p ;1:mem[cur_list.tail_field+1].hh.rh:=p; 2:{1120:}begin if(n>0)and(abs(cur_list.mode_field)=203)then begin begin if interaction=3 then;print_nl(263);print(1113);end;print_esc(352); begin help_ptr:=2;help_line[1]:=1114;help_line[0]:=1115;end; flush_node_list(p);n:=0;error; end else mem[cur_list.tail_field].hh.rh:=p; if n<=255 then mem[cur_list.tail_field].hh.b1:=n else begin begin if interaction=3 then;print_nl(263);print(1116);end;begin help_ptr:=2; help_line[1]:=1117;help_line[0]:=1118;end;error;end; if n>0 then cur_list.tail_field:=q;save_ptr:=save_ptr-1;goto 10; end{:1120};end;save_stack[save_ptr-1].int:=save_stack[save_ptr-1].int+1; new_save_level(10);scan_left_brace;push_nest;cur_list.mode_field:=-102; cur_list.aux_field.hh.lh:=1000;10:end; {:1119}{1123:}procedure make_accent;var s,t:real;p,q,r:halfword; f:internal_font_number;a,h,x,w,delta:scaled;i:four_quarters; begin scan_char_num;f:=eqtb[3939].hh.rh;p:=new_character(f,cur_val); if p<>0 then begin x:=font_info[5+param_base[f]].int; s:=font_info[1+param_base[f]].int/65536.0; a:=font_info[width_base[f]+font_info[char_base[f]+mem[p].hh.b1].qqqq.b0] .int;do_assignments;{1124:}q:=0;f:=eqtb[3939].hh.rh; if(cur_cmd=11)or(cur_cmd=12)or(cur_cmd=68)then q:=new_character(f, cur_chr)else if cur_cmd=16 then begin scan_char_num; q:=new_character(f,cur_val);end else back_input{:1124}; if q<>0 then{1125:}begin t:=font_info[1+param_base[f]].int/65536.0; i:=font_info[char_base[f]+mem[q].hh.b1].qqqq; w:=font_info[width_base[f]+i.b0].int; h:=font_info[height_base[f]+(i.b1-0)div 16].int; if h<>x then begin p:=hpack(p,0,1);mem[p+4].int:=x-h;end; delta:=round((w-a)/2.0+h*t-x*s);r:=new_kern(delta);mem[r].hh.b1:=2; mem[cur_list.tail_field].hh.rh:=r;mem[r].hh.rh:=p; cur_list.tail_field:=new_kern(-a-delta); mem[cur_list.tail_field].hh.b1:=2;mem[p].hh.rh:=cur_list.tail_field; p:=q;end{:1125};mem[cur_list.tail_field].hh.rh:=p; cur_list.tail_field:=p;cur_list.aux_field.hh.lh:=1000;end;end; {:1123}{1127:}procedure align_error; begin if abs(align_state)>2 then{1128:}begin begin if interaction=3 then ;print_nl(263);print(1126);end;print_cmd_chr(cur_cmd,cur_chr); if cur_tok=1062 then begin begin help_ptr:=6;help_line[5]:=1127; help_line[4]:=1128;help_line[3]:=1129;help_line[2]:=1130; help_line[1]:=1131;help_line[0]:=1132;end; end else begin begin help_ptr:=5;help_line[4]:=1127;help_line[3]:=1133; help_line[2]:=1130;help_line[1]:=1131;help_line[0]:=1132;end;end;error; end{:1128}else begin back_input; if align_state<0 then begin begin if interaction=3 then;print_nl(263); print(666);end;align_state:=align_state+1;cur_tok:=379; end else begin begin if interaction=3 then;print_nl(263);print(1122); end;align_state:=align_state-1;cur_tok:=637;end;begin help_ptr:=3; help_line[2]:=1123;help_line[1]:=1124;help_line[0]:=1125;end;ins_error; end;end;{:1127}{1129:}procedure no_align_error; begin begin if interaction=3 then;print_nl(263);print(1126);end; print_esc(530);begin help_ptr:=2;help_line[1]:=1134;help_line[0]:=1135; end;error;end;procedure omit_error;begin begin if interaction=3 then; print_nl(263);print(1126);end;print_esc(533);begin help_ptr:=2; help_line[1]:=1136;help_line[0]:=1135;end;error;end; {:1129}{1131:}procedure do_endv;begin base_ptr:=input_ptr; input_stack[base_ptr]:=cur_input; while(input_stack[base_ptr].index_field<>2)and(input_stack[base_ptr]. loc_field=0)and(input_stack[base_ptr].state_field=0)do base_ptr:= base_ptr-1; if(input_stack[base_ptr].index_field<>2)or(input_stack[base_ptr]. loc_field<>0)or(input_stack[base_ptr].state_field<>0)then fatal_error( 604);if cur_group=6 then begin end_graf;if fin_col then fin_row; end else off_save;end;{:1131}{1135:}procedure cs_error; begin begin if interaction=3 then;print_nl(263);print(788);end; print_esc(508);begin help_ptr:=1;help_line[0]:=1138;end;error;end; {:1135}{1136:}procedure push_math(c:group_code);begin push_nest; cur_list.mode_field:=-203;cur_list.aux_field.int:=0;new_save_level(c); end;{:1136}{1138:}{1468:}procedure just_copy(p,h,t:halfword); label 40,45;var r:halfword;words:0..5; begin while p<>0 do begin words:=1; if(p>=hi_mem_min)then r:=get_avail else case mem[p].hh.b0 of 0,1:begin r :=get_node(7);mem[r+6]:=mem[p+6];mem[r+5]:=mem[p+5];words:=5; mem[r+5].hh.rh:=0;end;2:begin r:=get_node(4);words:=4;end; 6:begin r:=get_avail;mem[r]:=mem[p+1];goto 40;end; 11,9:begin r:=get_node(2);words:=2;end;10:begin r:=get_node(2); mem[mem[p+1].hh.lh].hh.rh:=mem[mem[p+1].hh.lh].hh.rh+1; mem[r+1].hh.lh:=mem[p+1].hh.lh;mem[r+1].hh.rh:=0;end; 8:{1357:}case mem[p].hh.b1 of 0:begin r:=get_node(3);words:=3;end; 1,3:begin r:=get_node(2); mem[mem[p+1].hh.rh].hh.lh:=mem[mem[p+1].hh.rh].hh.lh+1;words:=2;end; 2,4:begin r:=get_node(2);words:=2;end;others:confusion(1308)end{:1357}; others:goto 45 end;while words>0 do begin words:=words-1; mem[r+words]:=mem[p+words];end;40:mem[h].hh.rh:=r;h:=r; 45:p:=mem[p].hh.rh;end;mem[h].hh.rh:=t;end; {:1468}{1473:}procedure just_reverse(p:halfword);label 40,30; var l:halfword;t:halfword;q:halfword;m,n:halfword;begin m:=0;n:=0; if mem[29997].hh.rh=0 then begin just_copy(mem[p].hh.rh,29997,0); q:=mem[29997].hh.rh;end else begin q:=mem[p].hh.rh;mem[p].hh.rh:=0; flush_node_list(mem[29997].hh.rh);end;t:=new_edge(cur_dir,0);l:=t; cur_dir:=1-cur_dir;while q<>0 do if(q>=hi_mem_min)then repeat p:=q; q:=mem[p].hh.rh;mem[p].hh.rh:=l;l:=p; until not(q>=hi_mem_min)else begin p:=q;q:=mem[p].hh.rh; if mem[p].hh.b0=9 then{1474:}if odd(mem[p].hh.b1)then if mem[LR_ptr].hh. lh<>(4*(mem[p].hh.b1 div 4)+3)then begin mem[p].hh.b0:=11; LR_problems:=LR_problems+1;end else begin begin temp_ptr:=LR_ptr; LR_ptr:=mem[temp_ptr].hh.rh;begin mem[temp_ptr].hh.rh:=avail; avail:=temp_ptr;{dyn_used:=dyn_used-1;}end;end;if n>0 then begin n:=n-1; mem[p].hh.b1:=mem[p].hh.b1-1; end else begin if m>0 then m:=m-1 else goto 40;mem[p].hh.b0:=11;end; end else begin begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[p].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end; if(n>0)or((mem[p].hh.b1 div 8)<>cur_dir)then begin n:=n+1; mem[p].hh.b1:=mem[p].hh.b1+1;end else begin mem[p].hh.b0:=11;m:=m+1;end; end{:1474};mem[p].hh.rh:=l;l:=p;end;goto 30; 40:mem[t+1].int:=mem[p+1].int;mem[t].hh.rh:=q;free_node(p,2); 30:mem[29997].hh.rh:=l;end;{:1473}procedure init_math;label 21,40,45,30; var w:scaled;j:halfword;x:integer;l:scaled;s:scaled;p:halfword; q:halfword;f:internal_font_number;n:integer;v:scaled;d:scaled; begin get_token; if(cur_cmd=3)and(cur_list.mode_field>0)then{1145:}begin j:=0; w:=-1073741823; if cur_list.head_field=cur_list.tail_field then{1467:}begin pop_nest; {1466:}if cur_list.eTeX_aux_field=0 then x:=0 else if mem[cur_list. eTeX_aux_field].hh.lh>=8 then x:=-1 else x:=1{:1466}; end{:1467}else begin line_break(true); {1146:}{1469:}if(eTeX_mode=1)then{1475:}begin if eqtb[2890].hh.rh=0 then j:=new_kern(0)else j:=new_param_glue(8); if eqtb[2889].hh.rh=0 then p:=new_kern(0)else p:=new_param_glue(7); mem[p].hh.rh:=j;j:=new_null_box;mem[j+1].int:=mem[just_box+1].int; mem[j+4].int:=mem[just_box+4].int;mem[j+5].hh.rh:=p; mem[j+5].hh.b1:=mem[just_box+5].hh.b1; mem[j+5].hh.b0:=mem[just_box+5].hh.b0;mem[j+6].gr:=mem[just_box+6].gr; end{:1475};v:=mem[just_box+4].int; {1466:}if cur_list.eTeX_aux_field=0 then x:=0 else if mem[cur_list. eTeX_aux_field].hh.lh>=8 then x:=-1 else x:=1{:1466}; if x>=0 then begin p:=mem[just_box+5].hh.rh;mem[29997].hh.rh:=0; end else begin v:=-v-mem[just_box+1].int;p:=new_math(0,6); mem[29997].hh.rh:=p;just_copy(mem[just_box+5].hh.rh,p,new_math(0,7)); cur_dir:=1;end;v:=v+2*font_info[6+param_base[eqtb[3939].hh.rh]].int; if(eqtb[5332].int>0)then{1441:}begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=0;mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr; end{:1441}{:1469}; while p<>0 do begin{1147:}21:if(p>=hi_mem_min)then begin f:=mem[p].hh.b0 ; d:=font_info[width_base[f]+font_info[char_base[f]+mem[p].hh.b1].qqqq.b0] .int;goto 40;end;case mem[p].hh.b0 of 0,1,2:begin d:=mem[p+1].int; goto 40;end;6:{652:}begin mem[29988]:=mem[p+1]; mem[29988].hh.rh:=mem[p].hh.rh;p:=29988;goto 21;end{:652}; 11:d:=mem[p+1].int;{1471:}9:begin d:=mem[p+1].int; if(eqtb[5332].int>0)then{1472:}if odd(mem[p].hh.b1)then begin if mem[ LR_ptr].hh.lh=(4*(mem[p].hh.b1 div 4)+3)then begin temp_ptr:=LR_ptr; LR_ptr:=mem[temp_ptr].hh.rh;begin mem[temp_ptr].hh.rh:=avail; avail:=temp_ptr;{dyn_used:=dyn_used-1;}end; end else if mem[p].hh.b1>4 then begin w:=1073741823;goto 30; end end else begin begin temp_ptr:=get_avail; mem[temp_ptr].hh.lh:=(4*(mem[p].hh.b1 div 4)+3); mem[temp_ptr].hh.rh:=LR_ptr;LR_ptr:=temp_ptr;end; if(mem[p].hh.b1 div 8)<>cur_dir then begin just_reverse(p);p:=29997;end; end{:1472}else if mem[p].hh.b1>=4 then begin w:=1073741823;goto 30;end; end;14:begin d:=mem[p+1].int;cur_dir:=mem[p].hh.b1;end; {:1471}10:{1148:}begin q:=mem[p+1].hh.lh;d:=mem[q+1].int; if mem[just_box+5].hh.b0=1 then begin if(mem[just_box+5].hh.b1=mem[q].hh .b0)and(mem[q+2].int<>0)then v:=1073741823; end else if mem[just_box+5].hh.b0=2 then begin if(mem[just_box+5].hh.b1= mem[q].hh.b1)and(mem[q+3].int<>0)then v:=1073741823;end; if mem[p].hh.b1>=100 then goto 40;end{:1148};8:{1361:}d:=0{:1361}; others:d:=0 end{:1147};if v<1073741823 then v:=v+d;goto 45; 40:if v<1073741823 then begin v:=v+d;w:=v;end else begin w:=1073741823; goto 30;end;45:p:=mem[p].hh.rh;end; 30:{1470:}if(eqtb[5332].int>0)then begin while LR_ptr<>0 do begin temp_ptr:=LR_ptr;LR_ptr:=mem[temp_ptr].hh.rh; begin mem[temp_ptr].hh.rh:=avail;avail:=temp_ptr;{dyn_used:=dyn_used-1;} end;end;if LR_problems<>0 then begin w:=1073741823;LR_problems:=0;end; end;cur_dir:=0;flush_node_list(mem[29997].hh.rh){:1470}{:1146};end; {1149:}if eqtb[3412].hh.rh=0 then if(eqtb[5862].int<>0)and(((eqtb[5309]. int>=0)and(cur_list.pg_field+2>eqtb[5309].int))or(cur_list.pg_field+1<- eqtb[5309].int))then begin l:=eqtb[5848].int-abs(eqtb[5862].int); if eqtb[5862].int>0 then s:=eqtb[5862].int else s:=0; end else begin l:=eqtb[5848].int;s:=0; end else begin n:=mem[eqtb[3412].hh.rh].hh.lh; if cur_list.pg_field+2>=n then p:=eqtb[3412].hh.rh+2*n else p:=eqtb[3412 ].hh.rh+2*(cur_list.pg_field+2);s:=mem[p-1].int;l:=mem[p].int; end{:1149};push_math(15);cur_list.mode_field:=203; eq_word_define(5312,-1);eq_word_define(5858,w); cur_list.eTeX_aux_field:=j;if(eTeX_mode=1)then eq_word_define(5328,x); eq_word_define(5859,l);eq_word_define(5860,s); if eqtb[3416].hh.rh<>0 then begin_token_list(eqtb[3416].hh.rh,9); if nest_ptr=1 then build_page;end{:1145}else begin back_input; {1139:}begin push_math(15);eq_word_define(5312,-1); if eqtb[3415].hh.rh<>0 then begin_token_list(eqtb[3415].hh.rh,8); end{:1139};end;end;{:1138}{1142:}procedure start_eq_no; begin save_stack[save_ptr+0].int:=cur_chr;save_ptr:=save_ptr+1; {1139:}begin push_math(15);eq_word_define(5312,-1); if eqtb[3415].hh.rh<>0 then begin_token_list(eqtb[3415].hh.rh,8); end{:1139};end;{:1142}{1151:}procedure scan_math(p:halfword); label 20,21,10;var c:integer;begin 20:{404:}repeat get_x_token; until(cur_cmd<>10)and(cur_cmd<>0){:404}; 21:case cur_cmd of 11,12,68:begin c:=eqtb[5012+cur_chr].hh.rh-0; if c=32768 then begin{1152:}begin cur_cs:=cur_chr+1; cur_cmd:=eqtb[cur_cs].hh.b0;cur_chr:=eqtb[cur_cs].hh.rh;x_token; back_input;end{:1152};goto 20;end;end;16:begin scan_char_num; cur_chr:=cur_val;cur_cmd:=68;goto 21;end;17:begin scan_fifteen_bit_int; c:=cur_val;end;69:c:=cur_chr;15:begin scan_twenty_seven_bit_int; c:=cur_val div 4096;end;others:{1153:}begin back_input;scan_left_brace; save_stack[save_ptr+0].int:=p;save_ptr:=save_ptr+1;push_math(9);goto 10; end{:1153}end;mem[p].hh.rh:=1;mem[p].hh.b1:=c mod 256+0; if(c>=28672)and((eqtb[5312].int>=0)and(eqtb[5312].int<16))then mem[p].hh .b0:=eqtb[5312].int else mem[p].hh.b0:=(c div 256)mod 16;10:end; {:1151}{1155:}procedure set_math_char(c:integer);var p:halfword; begin if c>=32768 then{1152:}begin cur_cs:=cur_chr+1; cur_cmd:=eqtb[cur_cs].hh.b0;cur_chr:=eqtb[cur_cs].hh.rh;x_token; back_input;end{:1152}else begin p:=new_noad;mem[p+1].hh.rh:=1; mem[p+1].hh.b1:=c mod 256+0;mem[p+1].hh.b0:=(c div 256)mod 16; if c>=28672 then begin if((eqtb[5312].int>=0)and(eqtb[5312].int<16))then mem[p+1].hh.b0:=eqtb[5312].int;mem[p].hh.b0:=16; end else mem[p].hh.b0:=16+(c div 4096); mem[cur_list.tail_field].hh.rh:=p;cur_list.tail_field:=p;end;end; {:1155}{1159:}procedure math_limit_switch;label 10; begin if cur_list.head_field<>cur_list.tail_field then if mem[cur_list. tail_field].hh.b0=17 then begin mem[cur_list.tail_field].hh.b1:=cur_chr; goto 10;end;begin if interaction=3 then;print_nl(263);print(1142);end; begin help_ptr:=1;help_line[0]:=1143;end;error;10:end; {:1159}{1160:}procedure scan_delimiter(p:halfword;r:boolean); begin if r then scan_twenty_seven_bit_int else begin{404:}repeat get_x_token;until(cur_cmd<>10)and(cur_cmd<>0){:404}; case cur_cmd of 11,12:cur_val:=eqtb[5589+cur_chr].int; 15:scan_twenty_seven_bit_int;others:cur_val:=-1 end;end; if cur_val<0 then{1161:}begin begin if interaction=3 then;print_nl(263); print(1144);end;begin help_ptr:=6;help_line[5]:=1145;help_line[4]:=1146; help_line[3]:=1147;help_line[2]:=1148;help_line[1]:=1149; help_line[0]:=1150;end;back_error;cur_val:=0;end{:1161}; mem[p].qqqq.b0:=(cur_val div 1048576)mod 16; mem[p].qqqq.b1:=(cur_val div 4096)mod 256+0; mem[p].qqqq.b2:=(cur_val div 256)mod 16; mem[p].qqqq.b3:=cur_val mod 256+0;end; {:1160}{1163:}procedure math_radical; begin begin mem[cur_list.tail_field].hh.rh:=get_node(5); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b0:=24;mem[cur_list.tail_field].hh.b1:=0; mem[cur_list.tail_field+1].hh:=empty_field; mem[cur_list.tail_field+3].hh:=empty_field; mem[cur_list.tail_field+2].hh:=empty_field; scan_delimiter(cur_list.tail_field+4,true); scan_math(cur_list.tail_field+1);end;{:1163}{1165:}procedure math_ac; begin if cur_cmd=45 then{1166:}begin begin if interaction=3 then; print_nl(263);print(1151);end;print_esc(526);print(1152); begin help_ptr:=2;help_line[1]:=1153;help_line[0]:=1154;end;error; end{:1166};begin mem[cur_list.tail_field].hh.rh:=get_node(5); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b0:=28;mem[cur_list.tail_field].hh.b1:=0; mem[cur_list.tail_field+1].hh:=empty_field; mem[cur_list.tail_field+3].hh:=empty_field; mem[cur_list.tail_field+2].hh:=empty_field; mem[cur_list.tail_field+4].hh.rh:=1;scan_fifteen_bit_int; mem[cur_list.tail_field+4].hh.b1:=cur_val mod 256+0; if(cur_val>=28672)and((eqtb[5312].int>=0)and(eqtb[5312].int<16))then mem [cur_list.tail_field+4].hh.b0:=eqtb[5312].int else mem[cur_list. tail_field+4].hh.b0:=(cur_val div 256)mod 16; scan_math(cur_list.tail_field+1);end; {:1165}{1172:}procedure append_choices; begin begin mem[cur_list.tail_field].hh.rh:=new_choice; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; save_ptr:=save_ptr+1;save_stack[save_ptr-1].int:=0;push_math(13); scan_left_brace;end; {:1172}{1174:}{1184:}function fin_mlist(p:halfword):halfword; var q:halfword; begin if cur_list.aux_field.int<>0 then{1185:}begin mem[cur_list. aux_field.int+3].hh.rh:=3; mem[cur_list.aux_field.int+3].hh.lh:=mem[cur_list.head_field].hh.rh; if p=0 then q:=cur_list.aux_field.int else begin q:=mem[cur_list. aux_field.int+2].hh.lh; if(mem[q].hh.b0<>30)or(cur_list.eTeX_aux_field=0)then confusion(888); mem[cur_list.aux_field.int+2].hh.lh:=mem[cur_list.eTeX_aux_field].hh.rh; mem[cur_list.eTeX_aux_field].hh.rh:=cur_list.aux_field.int; mem[cur_list.aux_field.int].hh.rh:=p;end; end{:1185}else begin mem[cur_list.tail_field].hh.rh:=p; q:=mem[cur_list.head_field].hh.rh;end;pop_nest;fin_mlist:=q;end; {:1184}procedure build_choices;label 10;var p:halfword;begin unsave; p:=fin_mlist(0); case save_stack[save_ptr-1].int of 0:mem[cur_list.tail_field+1].hh.lh:=p ;1:mem[cur_list.tail_field+1].hh.rh:=p; 2:mem[cur_list.tail_field+2].hh.lh:=p; 3:begin mem[cur_list.tail_field+2].hh.rh:=p;save_ptr:=save_ptr-1; goto 10;end;end; save_stack[save_ptr-1].int:=save_stack[save_ptr-1].int+1;push_math(13); scan_left_brace;10:end;{:1174}{1176:}procedure sub_sup; var t:small_number;p:halfword;begin t:=0;p:=0; if cur_list.tail_field<>cur_list.head_field then if(mem[cur_list. tail_field].hh.b0>=16)and(mem[cur_list.tail_field].hh.b0<30)then begin p :=cur_list.tail_field+2+cur_cmd-7;t:=mem[p].hh.rh;end; if(p=0)or(t<>0)then{1177:}begin begin mem[cur_list.tail_field].hh.rh:= new_noad;cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; p:=cur_list.tail_field+2+cur_cmd-7; if t<>0 then begin if cur_cmd=7 then begin begin if interaction=3 then; print_nl(263);print(1155);end;begin help_ptr:=1;help_line[0]:=1156;end; end else begin begin if interaction=3 then;print_nl(263);print(1157); end;begin help_ptr:=1;help_line[0]:=1158;end;end;error;end;end{:1177}; scan_math(p);end;{:1176}{1181:}procedure math_fraction; var c:small_number;begin c:=cur_chr; if cur_list.aux_field.int<>0 then{1183:}begin if c>=3 then begin scan_delimiter(29988,false);scan_delimiter(29988,false);end; if c mod 3=0 then scan_dimen(false,false,false); begin if interaction=3 then;print_nl(263);print(1165);end; begin help_ptr:=3;help_line[2]:=1166;help_line[1]:=1167; help_line[0]:=1168;end;error; end{:1183}else begin cur_list.aux_field.int:=get_node(6); mem[cur_list.aux_field.int].hh.b0:=25; mem[cur_list.aux_field.int].hh.b1:=0; mem[cur_list.aux_field.int+2].hh.rh:=3; mem[cur_list.aux_field.int+2].hh.lh:=mem[cur_list.head_field].hh.rh; mem[cur_list.aux_field.int+3].hh:=empty_field; mem[cur_list.aux_field.int+4].qqqq:=null_delimiter; mem[cur_list.aux_field.int+5].qqqq:=null_delimiter; mem[cur_list.head_field].hh.rh:=0; cur_list.tail_field:=cur_list.head_field; {1182:}if c>=3 then begin scan_delimiter(cur_list.aux_field.int+4,false) ;scan_delimiter(cur_list.aux_field.int+5,false);end; case c mod 3 of 0:begin scan_dimen(false,false,false); mem[cur_list.aux_field.int+1].int:=cur_val;end; 1:mem[cur_list.aux_field.int+1].int:=1073741824; 2:mem[cur_list.aux_field.int+1].int:=0;end{:1182};end;end; {:1181}{1191:}procedure math_left_right;var t:small_number;p:halfword; q:halfword;begin t:=cur_chr; if(t<>30)and(cur_group<>16)then{1192:}begin if cur_group=15 then begin scan_delimiter(29988,false);begin if interaction=3 then;print_nl(263); print(788);end;if t=1 then begin print_esc(889);begin help_ptr:=1; help_line[0]:=1169;end;end else begin print_esc(888);begin help_ptr:=1; help_line[0]:=1170;end;end;error;end else off_save; end{:1192}else begin p:=new_noad;mem[p].hh.b0:=t; scan_delimiter(p+1,false);if t=1 then begin mem[p].hh.b0:=31; mem[p].hh.b1:=1;end;if t=30 then q:=p else begin q:=fin_mlist(p);unsave; end;if t<>31 then begin push_math(16);mem[cur_list.head_field].hh.rh:=q; cur_list.tail_field:=p;cur_list.eTeX_aux_field:=p; end else begin begin mem[cur_list.tail_field].hh.rh:=new_noad; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b0:=23;mem[cur_list.tail_field+1].hh.rh:=3; mem[cur_list.tail_field+1].hh.lh:=q;end;end;end; {:1191}{1194:}{1479:}procedure app_display(j,b:halfword;d:scaled); var z:scaled;s:scaled;e:scaled;x:integer;p,q,r,t,u:halfword; begin s:=eqtb[5860].int;x:=eqtb[5328].int; if x=0 then mem[b+4].int:=s+d else begin z:=eqtb[5859].int;p:=b; {1480:}if x>0 then e:=z-d-mem[p+1].int else begin e:=d; d:=z-e-mem[p+1].int;end;if j<>0 then begin b:=copy_node_list(j); mem[b+3].int:=mem[p+3].int;mem[b+2].int:=mem[p+2].int;s:=s-mem[b+4].int; d:=d+s;e:=e+mem[b+1].int-z-s;end; if(mem[p].hh.b1-0)=2 then q:=p else begin r:=mem[p+5].hh.rh; free_node(p,7);if r=0 then confusion(1378);if x>0 then begin p:=r; repeat q:=r;r:=mem[r].hh.rh;until r=0;end else begin p:=0;q:=r; repeat t:=mem[r].hh.rh;mem[r].hh.rh:=p;p:=r;r:=t;until r=0;end; end{:1480};{1481:}if j=0 then begin r:=new_kern(0);t:=new_kern(0); end else begin r:=mem[b+5].hh.rh;t:=mem[r].hh.rh;end;u:=new_math(0,3); if mem[t].hh.b0=10 then begin j:=new_skip_param(8);mem[q].hh.rh:=j; mem[j].hh.rh:=u;j:=mem[t+1].hh.lh;mem[temp_ptr].hh.b0:=mem[j].hh.b0; mem[temp_ptr].hh.b1:=mem[j].hh.b1;mem[temp_ptr+1].int:=e-mem[j+1].int; mem[temp_ptr+2].int:=-mem[j+2].int;mem[temp_ptr+3].int:=-mem[j+3].int; mem[u].hh.rh:=t;end else begin mem[t+1].int:=e;mem[t].hh.rh:=u; mem[q].hh.rh:=t;end;u:=new_math(0,2); if mem[r].hh.b0=10 then begin j:=new_skip_param(7);mem[u].hh.rh:=j; mem[j].hh.rh:=p;j:=mem[r+1].hh.lh;mem[temp_ptr].hh.b0:=mem[j].hh.b0; mem[temp_ptr].hh.b1:=mem[j].hh.b1;mem[temp_ptr+1].int:=d-mem[j+1].int; mem[temp_ptr+2].int:=-mem[j+2].int;mem[temp_ptr+3].int:=-mem[j+3].int; mem[r].hh.rh:=u;end else begin mem[r+1].int:=d;mem[r].hh.rh:=p; mem[u].hh.rh:=r;if j=0 then begin b:=hpack(u,0,1);mem[b+4].int:=s; end else mem[b+5].hh.rh:=u;end{:1481};end;append_to_vlist(b);end; {:1479}procedure after_math;var l:boolean;danger:boolean;m:integer; p:halfword;a:halfword;{1198:}b:halfword;w:scaled;z:scaled;e:scaled; q:scaled;d:scaled;s:scaled;g1,g2:small_number;r:halfword;t:halfword; {:1198}{1476:}j:halfword;{:1476}begin danger:=false; {1477:}if cur_list.mode_field=203 then j:=cur_list.eTeX_aux_field{:1477} ; {1195:}if(font_params[eqtb[3942].hh.rh]<22)or(font_params[eqtb[3958].hh. rh]<22)or(font_params[eqtb[3974].hh.rh]<22)then begin begin if interaction=3 then;print_nl(263);print(1171);end;begin help_ptr:=3; help_line[2]:=1172;help_line[1]:=1173;help_line[0]:=1174;end;error; flush_math;danger:=true; end else if(font_params[eqtb[3943].hh.rh]<13)or(font_params[eqtb[3959]. hh.rh]<13)or(font_params[eqtb[3975].hh.rh]<13)then begin begin if interaction=3 then;print_nl(263);print(1175);end;begin help_ptr:=3; help_line[2]:=1176;help_line[1]:=1177;help_line[0]:=1178;end;error; flush_math;danger:=true;end{:1195};m:=cur_list.mode_field;l:=false; p:=fin_mlist(0); if cur_list.mode_field=-m then begin{1197:}begin get_x_token; if cur_cmd<>3 then begin begin if interaction=3 then;print_nl(263); print(1179);end;begin help_ptr:=2;help_line[1]:=1180;help_line[0]:=1181; end;back_error;end;end{:1197};cur_mlist:=p;cur_style:=2; mlist_penalties:=false;mlist_to_hlist;a:=hpack(mem[29997].hh.rh,0,1); mem[a].hh.b1:=2;unsave;save_ptr:=save_ptr-1; if save_stack[save_ptr+0].int=1 then l:=true;danger:=false; {1477:}if cur_list.mode_field=203 then j:=cur_list.eTeX_aux_field{:1477} ; {1195:}if(font_params[eqtb[3942].hh.rh]<22)or(font_params[eqtb[3958].hh. rh]<22)or(font_params[eqtb[3974].hh.rh]<22)then begin begin if interaction=3 then;print_nl(263);print(1171);end;begin help_ptr:=3; help_line[2]:=1172;help_line[1]:=1173;help_line[0]:=1174;end;error; flush_math;danger:=true; end else if(font_params[eqtb[3943].hh.rh]<13)or(font_params[eqtb[3959]. hh.rh]<13)or(font_params[eqtb[3975].hh.rh]<13)then begin begin if interaction=3 then;print_nl(263);print(1175);end;begin help_ptr:=3; help_line[2]:=1176;help_line[1]:=1177;help_line[0]:=1178;end;error; flush_math;danger:=true;end{:1195};m:=cur_list.mode_field; p:=fin_mlist(0);end else a:=0; if m<0 then{1196:}begin begin mem[cur_list.tail_field].hh.rh:=new_math( eqtb[5846].int,0);cur_list.tail_field:=mem[cur_list.tail_field].hh.rh; end;cur_mlist:=p;cur_style:=2;mlist_penalties:=(cur_list.mode_field>0); mlist_to_hlist;mem[cur_list.tail_field].hh.rh:=mem[29997].hh.rh; while mem[cur_list.tail_field].hh.rh<>0 do cur_list.tail_field:=mem[ cur_list.tail_field].hh.rh; begin mem[cur_list.tail_field].hh.rh:=new_math(eqtb[5846].int,1); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; cur_list.aux_field.hh.lh:=1000;unsave; end{:1196}else begin if a=0 then{1197:}begin get_x_token; if cur_cmd<>3 then begin begin if interaction=3 then;print_nl(263); print(1179);end;begin help_ptr:=2;help_line[1]:=1180;help_line[0]:=1181; end;back_error;end;end{:1197};{1199:}cur_mlist:=p;cur_style:=0; mlist_penalties:=false;mlist_to_hlist;p:=mem[29997].hh.rh; adjust_tail:=29995;b:=hpack(p,0,1);p:=mem[b+5].hh.rh;t:=adjust_tail; adjust_tail:=0;w:=mem[b+1].int;z:=eqtb[5859].int;s:=eqtb[5860].int; if eqtb[5328].int<0 then s:=-s-z;if(a=0)or danger then begin e:=0;q:=0; end else begin e:=mem[a+1].int; q:=e+font_info[6+param_base[eqtb[3942].hh.rh]].int;end; if w+q>z then{1201:}begin if(e<>0)and((w-total_shrink[0]+q<=z)or( total_shrink[1]<>0)or(total_shrink[2]<>0)or(total_shrink[3]<>0))then begin free_node(b,7);b:=hpack(p,z-q,0);end else begin e:=0; if w>z then begin free_node(b,7);b:=hpack(p,z,0);end;end; w:=mem[b+1].int;end{:1201};{1202:}mem[b].hh.b1:=2;d:=half(z-w); if(e>0)and(d<2*e)then begin d:=half(z-w-e); if p<>0 then if not(p>=hi_mem_min)then if mem[p].hh.b0=10 then d:=0; end{:1202}; {1203:}begin mem[cur_list.tail_field].hh.rh:=new_penalty(eqtb[5279].int) ;cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; if(d+s<=eqtb[5858].int)or l then begin g1:=3;g2:=4;end else begin g1:=5; g2:=6;end;if l and(e=0)then begin app_display(j,a,0); begin mem[cur_list.tail_field].hh.rh:=new_penalty(10000); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; end else begin mem[cur_list.tail_field].hh.rh:=new_param_glue(g1); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end{:1203}; {1204:}if e<>0 then begin r:=new_kern(z-w-e-d); if l then begin mem[a].hh.rh:=r;mem[r].hh.rh:=b;b:=a;d:=0; end else begin mem[b].hh.rh:=r;mem[r].hh.rh:=a;end;b:=hpack(b,0,1);end; app_display(j,b,d){:1204}; {1205:}if(a<>0)and(e=0)and not l then begin begin mem[cur_list. tail_field].hh.rh:=new_penalty(10000); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; app_display(j,a,z-mem[a+1].int);g2:=0;end; if t<>29995 then begin mem[cur_list.tail_field].hh.rh:=mem[29995].hh.rh; cur_list.tail_field:=t;end; begin mem[cur_list.tail_field].hh.rh:=new_penalty(eqtb[5280].int); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; if g2>0 then begin mem[cur_list.tail_field].hh.rh:=new_param_glue(g2); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end{:1205}; {1478:}flush_node_list(j){:1478};resume_after_display{:1199};end;end; {:1194}{1200:}procedure resume_after_display; begin if cur_group<>15 then confusion(1182);unsave; cur_list.pg_field:=cur_list.pg_field+3;push_nest; cur_list.mode_field:=102;cur_list.aux_field.hh.lh:=1000; if eqtb[5318].int<=0 then cur_lang:=0 else if eqtb[5318].int>255 then cur_lang:=0 else cur_lang:=eqtb[5318].int; cur_list.aux_field.hh.rh:=cur_lang; cur_list.pg_field:=(norm_min(eqtb[5319].int)*64+norm_min(eqtb[5320].int) )*65536+cur_lang;{443:}begin get_x_token;if cur_cmd<>10 then back_input; end{:443};if nest_ptr=1 then build_page;end; {:1200}{1211:}{1215:}procedure get_r_token;label 20; begin 20:repeat get_token;until cur_tok<>2592; if(cur_cs=0)or(cur_cs>2614)then begin begin if interaction=3 then; print_nl(263);print(1200);end;begin help_ptr:=5;help_line[4]:=1201; help_line[3]:=1202;help_line[2]:=1203;help_line[1]:=1204; help_line[0]:=1205;end;if cur_cs=0 then back_input;cur_tok:=6709; ins_error;goto 20;end;end;{:1215}{1229:}procedure trap_zero_glue; begin if(mem[cur_val+1].int=0)and(mem[cur_val+2].int=0)and(mem[cur_val+3 ].int=0)then begin mem[0].hh.rh:=mem[0].hh.rh+1; delete_glue_ref(cur_val);cur_val:=0;end;end; {:1229}{1236:}procedure do_register_command(a:small_number);label 40,10; var l,q,r,s:halfword;p:0..3;e:boolean;w:integer;begin q:=cur_cmd; e:=false;{1237:}begin if q<>89 then begin get_x_token; if(cur_cmd>=73)and(cur_cmd<=76)then begin l:=cur_chr;p:=cur_cmd-73; goto 40;end;if cur_cmd<>89 then begin begin if interaction=3 then; print_nl(263);print(694);end;print_cmd_chr(cur_cmd,cur_chr);print(695); print_cmd_chr(q,0);begin help_ptr:=1;help_line[0]:=1226;end;error; goto 10;end;end;if(cur_chr<0)or(cur_chr>19)then begin l:=cur_chr; p:=(mem[l].hh.b0 div 16);e:=true;end else begin p:=cur_chr-0; scan_register_num; if cur_val>255 then begin find_sa_element(p,cur_val,true);l:=cur_ptr; e:=true;end else case p of 0:l:=cur_val+5333;1:l:=cur_val+5866; 2:l:=cur_val+2900;3:l:=cur_val+3156;end;end;end; 40:if p<2 then if e then w:=mem[l+2].int else w:=eqtb[l].int else if e then s:=mem[l+1].hh.rh else s:=eqtb[l].hh.rh{:1237}; if q=89 then scan_optional_equals else if scan_keyword(1222)then; arith_error:=false; if q<91 then{1238:}if p<2 then begin if p=0 then scan_int else scan_dimen(false,false,false);if q=90 then cur_val:=cur_val+w; end else begin scan_glue(p); if q=90 then{1239:}begin q:=new_spec(cur_val);r:=s; delete_glue_ref(cur_val);mem[q+1].int:=mem[q+1].int+mem[r+1].int; if mem[q+2].int=0 then mem[q].hh.b0:=0; if mem[q].hh.b0=mem[r].hh.b0 then mem[q+2].int:=mem[q+2].int+mem[r+2]. int else if(mem[q].hh.b00)then begin mem [q+2].int:=mem[r+2].int;mem[q].hh.b0:=mem[r].hh.b0;end; if mem[q+3].int=0 then mem[q].hh.b1:=0; if mem[q].hh.b1=mem[r].hh.b1 then mem[q+3].int:=mem[q+3].int+mem[r+3]. int else if(mem[q].hh.b10)then begin mem [q+3].int:=mem[r+3].int;mem[q].hh.b1:=mem[r].hh.b1;end;cur_val:=q; end{:1239};end{:1238}else{1240:}begin scan_int; if p<2 then if q=91 then if p=0 then cur_val:=mult_and_add(w,cur_val,0, 2147483647)else cur_val:=mult_and_add(w,cur_val,0,1073741823)else cur_val:=x_over_n(w,cur_val)else begin r:=new_spec(s); if q=91 then begin mem[r+1].int:=mult_and_add(mem[s+1].int,cur_val,0, 1073741823); mem[r+2].int:=mult_and_add(mem[s+2].int,cur_val,0,1073741823); mem[r+3].int:=mult_and_add(mem[s+3].int,cur_val,0,1073741823); end else begin mem[r+1].int:=x_over_n(mem[s+1].int,cur_val); mem[r+2].int:=x_over_n(mem[s+2].int,cur_val); mem[r+3].int:=x_over_n(mem[s+3].int,cur_val);end;cur_val:=r;end; end{:1240};if arith_error then begin begin if interaction=3 then; print_nl(263);print(1223);end;begin help_ptr:=2;help_line[1]:=1224; help_line[0]:=1225;end;if p>=2 then delete_glue_ref(cur_val);error; goto 10;end; if p<2 then if e then if(a>=4)then gsa_w_def(l,cur_val)else sa_w_def(l, cur_val)else if(a>=4)then geq_word_define(l,cur_val)else eq_word_define( l,cur_val)else begin trap_zero_glue; if e then if(a>=4)then gsa_def(l,cur_val)else sa_def(l,cur_val)else if(a >=4)then geq_define(l,117,cur_val)else eq_define(l,117,cur_val);end; 10:end;{:1236}{1243:}procedure alter_aux;var c:halfword; begin if cur_chr<>abs(cur_list.mode_field)then report_illegal_case else begin c:=cur_chr;scan_optional_equals; if c=1 then begin scan_dimen(false,false,false); cur_list.aux_field.int:=cur_val;end else begin scan_int; if(cur_val<=0)or(cur_val>32767)then begin begin if interaction=3 then; print_nl(263);print(1229);end;begin help_ptr:=1;help_line[0]:=1230;end; int_error(cur_val);end else cur_list.aux_field.hh.lh:=cur_val;end;end; end;{:1243}{1244:}procedure alter_prev_graf;var p:0..nest_size; begin nest[nest_ptr]:=cur_list;p:=nest_ptr; while abs(nest[p].mode_field)<>1 do p:=p-1;scan_optional_equals; scan_int;if cur_val<0 then begin begin if interaction=3 then; print_nl(263);print(967);end;print_esc(536);begin help_ptr:=1; help_line[0]:=1231;end;int_error(cur_val); end else begin nest[p].pg_field:=cur_val;cur_list:=nest[nest_ptr];end; end;{:1244}{1245:}procedure alter_page_so_far;var c:0..7; begin c:=cur_chr;scan_optional_equals;scan_dimen(false,false,false); page_so_far[c]:=cur_val;end;{:1245}{1246:}procedure alter_integer; var c:small_number;begin c:=cur_chr;scan_optional_equals;scan_int; if c=0 then dead_cycles:=cur_val{1427:}else if c=2 then begin if(cur_val <0)or(cur_val>3)then begin begin if interaction=3 then;print_nl(263); print(1363);end;begin help_ptr:=2;help_line[1]:=1364;help_line[0]:=1365; end;int_error(cur_val);end else begin cur_chr:=cur_val;new_interaction; end;end{:1427}else insert_penalties:=cur_val;end; {:1246}{1247:}procedure alter_box_dimen;var c:small_number;b:halfword; begin c:=cur_chr;scan_register_num; if cur_val<256 then b:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then b:=0 else b:=mem[cur_ptr+1].hh.rh;end; scan_optional_equals;scan_dimen(false,false,false); if b<>0 then mem[b+c].int:=cur_val;end; {:1247}{1257:}procedure new_font(a:small_number);label 50; var u:halfword;s:scaled;f:internal_font_number;t:str_number; old_setting:0..21;flushable_string:str_number; begin if job_name=0 then open_log_file;get_r_token;u:=cur_cs; if u>=514 then t:=hash[u].rh else if u>=257 then if u=513 then t:=1235 else t:=u-257 else begin old_setting:=selector;selector:=21;print(1235); print(u-1);selector:=old_setting; begin if pool_ptr+1>pool_size then overflow(258,pool_size-init_pool_ptr) ;end;t:=make_string;end; if(a>=4)then geq_define(u,87,0)else eq_define(u,87,0); scan_optional_equals;scan_file_name;{1258:}name_in_progress:=true; if scan_keyword(1236)then{1259:}begin scan_dimen(false,false,false); s:=cur_val; if(s<=0)or(s>=134217728)then begin begin if interaction=3 then; print_nl(263);print(1238);end;print_scaled(s);print(1239); begin help_ptr:=2;help_line[1]:=1240;help_line[0]:=1241;end;error; s:=10*65536;end;end{:1259}else if scan_keyword(1237)then begin scan_int; s:=-cur_val; if(cur_val<=0)or(cur_val>32768)then begin begin if interaction=3 then; print_nl(263);print(560);end;begin help_ptr:=1;help_line[0]:=561;end; int_error(cur_val);s:=-1000;end;end else s:=-1000; name_in_progress:=false{:1258};{1260:}flushable_string:=str_ptr-1; for f:=1 to font_ptr do if str_eq_str(font_name[f],cur_name)and str_eq_str(font_area[f],cur_area)then begin if cur_name=flushable_string then begin begin str_ptr:=str_ptr-1;pool_ptr:=str_start[str_ptr];end; cur_name:=font_name[f];end; if s>0 then begin if s=font_size[f]then goto 50; end else if font_size[f]=xn_over_d(font_dsize[f],-s,1000)then goto 50; end{:1260};f:=read_font_info(u,cur_name,cur_area,s); 50:if(a>=4)then geq_define(u,87,f)else eq_define(u,87,f); eqtb[2624+f]:=eqtb[u];hash[2624+f].rh:=t;end; {:1257}{1265:}procedure new_interaction;begin print_ln; interaction:=cur_chr; {75:}if interaction=0 then selector:=16 else selector:=17{:75}; if log_opened then selector:=selector+2;end; {:1265}procedure prefixed_command;label 30,10;var a:small_number; f:internal_font_number;j:halfword;k:font_index;p,q:halfword;n:integer; e:boolean;begin a:=0; while cur_cmd=93 do begin if not odd(a div cur_chr)then a:=a+cur_chr; {404:}repeat get_x_token;until(cur_cmd<>10)and(cur_cmd<>0){:404}; if cur_cmd<=70 then{1212:}begin begin if interaction=3 then; print_nl(263);print(1192);end;print_cmd_chr(cur_cmd,cur_chr); print_char(39);begin help_ptr:=1;help_line[0]:=1193;end; if(eTeX_mode=1)then help_line[0]:=1194;back_error;goto 10;end{:1212}; if eqtb[5304].int>2 then if(eTeX_mode=1)then show_cur_cmd_chr;end; {1213:}if a>=8 then begin j:=3585;a:=a-8;end else j:=0; if(cur_cmd<>97)and((a mod 4<>0)or(j<>0))then begin begin if interaction= 3 then;print_nl(263);print(694);end;print_esc(1184);print(1195); print_esc(1185);begin help_ptr:=1;help_line[0]:=1196;end; if(eTeX_mode=1)then begin help_line[0]:=1197;print(1195); print_esc(1198);end;print(1199);print_cmd_chr(cur_cmd,cur_chr); print_char(39);error;end{:1213}; {1214:}if eqtb[5311].int<>0 then if eqtb[5311].int<0 then begin if(a>=4) then a:=a-4;end else begin if not(a>=4)then a:=a+4;end{:1214}; case cur_cmd of{1217:}87:if(a>=4)then geq_define(3939,120,cur_chr)else eq_define(3939,120,cur_chr); {:1217}{1218:}97:begin if odd(cur_chr)and not(a>=4)and(eqtb[5311].int>=0 )then a:=a+4;e:=(cur_chr>=2);get_r_token;p:=cur_cs;q:=scan_toks(true,e); if j<>0 then begin q:=get_avail;mem[q].hh.lh:=j; mem[q].hh.rh:=mem[def_ref].hh.rh;mem[def_ref].hh.rh:=q;end; if(a>=4)then geq_define(p,111+(a mod 4),def_ref)else eq_define(p,111+(a mod 4),def_ref);end;{:1218}{1221:}94:begin n:=cur_chr;get_r_token; p:=cur_cs;if n=0 then begin repeat get_token;until cur_cmd<>10; if cur_tok=3133 then begin get_token;if cur_cmd=10 then get_token;end; end else begin get_token;q:=cur_tok;get_token;back_input;cur_tok:=q; back_input;end; if cur_cmd>=111 then mem[cur_chr].hh.lh:=mem[cur_chr].hh.lh+1 else if( cur_cmd=89)or(cur_cmd=71)then if(cur_chr<0)or(cur_chr>19)then mem[ cur_chr+1].hh.lh:=mem[cur_chr+1].hh.lh+1; if(a>=4)then geq_define(p,cur_cmd,cur_chr)else eq_define(p,cur_cmd, cur_chr);end;{:1221}{1224:}95:begin n:=cur_chr;get_r_token;p:=cur_cs; if(a>=4)then geq_define(p,0,256)else eq_define(p,0,256); scan_optional_equals;case n of 0:begin scan_char_num; if(a>=4)then geq_define(p,68,cur_val)else eq_define(p,68,cur_val);end; 1:begin scan_fifteen_bit_int; if(a>=4)then geq_define(p,69,cur_val)else eq_define(p,69,cur_val);end; others:begin scan_register_num;if cur_val>255 then begin j:=n-2; if j>3 then j:=5;find_sa_element(j,cur_val,true); mem[cur_ptr+1].hh.lh:=mem[cur_ptr+1].hh.lh+1; if j=5 then j:=71 else j:=89; if(a>=4)then geq_define(p,j,cur_ptr)else eq_define(p,j,cur_ptr); end else case n of 2:if(a>=4)then geq_define(p,73,5333+cur_val)else eq_define(p,73,5333+cur_val); 3:if(a>=4)then geq_define(p,74,5866+cur_val)else eq_define(p,74,5866+ cur_val); 4:if(a>=4)then geq_define(p,75,2900+cur_val)else eq_define(p,75,2900+ cur_val); 5:if(a>=4)then geq_define(p,76,3156+cur_val)else eq_define(p,76,3156+ cur_val); 6:if(a>=4)then geq_define(p,72,3423+cur_val)else eq_define(p,72,3423+ cur_val);end;end end;end;{:1224}{1225:}96:begin j:=cur_chr;scan_int; n:=cur_val; if not scan_keyword(853)then begin begin if interaction=3 then; print_nl(263);print(1085);end;begin help_ptr:=2;help_line[1]:=1216; help_line[0]:=1217;end;error;end;get_r_token;p:=cur_cs;read_toks(n,p,j); if(a>=4)then geq_define(p,111,cur_val)else eq_define(p,111,cur_val);end; {:1225}{1226:}71,72:begin q:=cur_cs;e:=false; if cur_cmd=71 then if cur_chr=0 then begin scan_register_num; if cur_val>255 then begin find_sa_element(5,cur_val,true); cur_chr:=cur_ptr;e:=true;end else cur_chr:=3423+cur_val; end else e:=true;p:=cur_chr;scan_optional_equals; {404:}repeat get_x_token;until(cur_cmd<>10)and(cur_cmd<>0){:404}; if cur_cmd<>1 then{1227:}if(cur_cmd=71)or(cur_cmd=72)then begin if cur_cmd=71 then if cur_chr=0 then begin scan_register_num; if cur_val<256 then q:=eqtb[3423+cur_val].hh.rh else begin find_sa_element(5,cur_val,false); if cur_ptr=0 then q:=0 else q:=mem[cur_ptr+1].hh.rh;end; end else q:=mem[cur_chr+1].hh.rh else q:=eqtb[cur_chr].hh.rh; if q=0 then if e then if(a>=4)then gsa_def(p,0)else sa_def(p,0)else if(a >=4)then geq_define(p,101,0)else eq_define(p,101,0)else begin mem[q].hh. lh:=mem[q].hh.lh+1; if e then if(a>=4)then gsa_def(p,q)else sa_def(p,q)else if(a>=4)then geq_define(p,111,q)else eq_define(p,111,q);end;goto 30;end{:1227}; back_input;cur_cs:=q;q:=scan_toks(false,false); if mem[def_ref].hh.rh=0 then begin if e then if(a>=4)then gsa_def(p,0) else sa_def(p,0)else if(a>=4)then geq_define(p,101,0)else eq_define(p, 101,0);begin mem[def_ref].hh.rh:=avail;avail:=def_ref; {dyn_used:=dyn_used-1;}end; end else begin if(p=3413)and not e then begin mem[q].hh.rh:=get_avail; q:=mem[q].hh.rh;mem[q].hh.lh:=637;q:=get_avail;mem[q].hh.lh:=379; mem[q].hh.rh:=mem[def_ref].hh.rh;mem[def_ref].hh.rh:=q;end; if e then if(a>=4)then gsa_def(p,def_ref)else sa_def(p,def_ref)else if(a >=4)then geq_define(p,111,def_ref)else eq_define(p,111,def_ref);end;end; {:1226}{1228:}73:begin p:=cur_chr;scan_optional_equals;scan_int; if(a>=4)then geq_word_define(p,cur_val)else eq_word_define(p,cur_val); end;74:begin p:=cur_chr;scan_optional_equals; scan_dimen(false,false,false); if(a>=4)then geq_word_define(p,cur_val)else eq_word_define(p,cur_val); end;75,76:begin p:=cur_chr;n:=cur_cmd;scan_optional_equals; if n=76 then scan_glue(3)else scan_glue(2);trap_zero_glue; if(a>=4)then geq_define(p,117,cur_val)else eq_define(p,117,cur_val);end; {:1228}{1232:}85:begin{1233:}if cur_chr=3988 then n:=15 else if cur_chr= 5012 then n:=32768 else if cur_chr=4756 then n:=32767 else if cur_chr= 5589 then n:=16777215 else n:=255{:1233};p:=cur_chr;scan_char_num; p:=p+cur_val;scan_optional_equals;scan_int; if((cur_val<0)and(p<5589))or(cur_val>n)then begin begin if interaction=3 then;print_nl(263);print(1218);end;print_int(cur_val); if p<5589 then print(1219)else print(1220);print_int(n); begin help_ptr:=1;help_line[0]:=1221;end;error;cur_val:=0;end; if p<5012 then if(a>=4)then geq_define(p,120,cur_val)else eq_define(p, 120,cur_val)else if p<5589 then if(a>=4)then geq_define(p,120,cur_val+0) else eq_define(p,120,cur_val+0)else if(a>=4)then geq_word_define(p, cur_val)else eq_word_define(p,cur_val);end; {:1232}{1234:}86:begin p:=cur_chr;scan_four_bit_int;p:=p+cur_val; scan_optional_equals;scan_font_ident; if(a>=4)then geq_define(p,120,cur_val)else eq_define(p,120,cur_val);end; {:1234}{1235:}89,90,91,92:do_register_command(a); {:1235}{1241:}98:begin scan_register_num; if(a>=4)then n:=1073774592+cur_val else n:=1073741824+cur_val; scan_optional_equals; if set_box_allowed then scan_box(n)else begin begin if interaction=3 then;print_nl(263);print(689);end;print_esc(540);begin help_ptr:=2; help_line[1]:=1227;help_line[0]:=1228;end;error;end;end; {:1241}{1242:}79:alter_aux;80:alter_prev_graf;81:alter_page_so_far; 82:alter_integer;83:alter_box_dimen;{:1242}{1248:}84:begin q:=cur_chr; scan_optional_equals;scan_int;n:=cur_val; if n<=0 then p:=0 else if q>3412 then begin n:=(cur_val div 2)+1; p:=get_node(2*n+1);mem[p].hh.lh:=n;n:=cur_val;mem[p+1].int:=n; for j:=p+2 to p+n+1 do begin scan_int;mem[j].int:=cur_val;end; if not odd(n)then mem[p+n+2].int:=0;end else begin p:=get_node(2*n+1); mem[p].hh.lh:=n;for j:=1 to n do begin scan_dimen(false,false,false); mem[p+2*j-1].int:=cur_val;scan_dimen(false,false,false); mem[p+2*j].int:=cur_val;end;end; if(a>=4)then geq_define(q,118,p)else eq_define(q,118,p);end; {:1248}{1252:}99:if cur_chr=1 then begin new_patterns;goto 30; begin if interaction=3 then;print_nl(263);print(1232);end;help_ptr:=0; error;repeat get_token;until cur_cmd=2;goto 10; end else begin new_hyph_exceptions;goto 30;end; {:1252}{1253:}77:begin find_font_dimen(true);k:=cur_val; scan_optional_equals;scan_dimen(false,false,false); font_info[k].int:=cur_val;end;78:begin n:=cur_chr;scan_font_ident; f:=cur_val;scan_optional_equals;scan_int; if n=0 then hyphen_char[f]:=cur_val else skew_char[f]:=cur_val;end; {:1253}{1256:}88:new_font(a);{:1256}{1264:}100:new_interaction; {:1264}others:confusion(1191)end; 30:{1269:}if after_token<>0 then begin cur_tok:=after_token;back_input; after_token:=0;end{:1269};10:end;{:1211}{1270:}procedure do_assignments; label 10;begin while true do begin{404:}repeat get_x_token; until(cur_cmd<>10)and(cur_cmd<>0){:404};if cur_cmd<=70 then goto 10; set_box_allowed:=false;prefixed_command;set_box_allowed:=true;end; 10:end;{:1270}{1275:}procedure open_or_close_in;var c:0..1;n:0..15; begin c:=cur_chr;scan_four_bit_int;n:=cur_val; if read_open[n]<>2 then begin a_close(read_file[n]);read_open[n]:=2;end; if c<>0 then begin scan_optional_equals;scan_file_name; if cur_ext=339 then cur_ext:=802; pack_file_name(cur_name,cur_area,cur_ext); if a_open_in(read_file[n])then read_open[n]:=1;end;end; {:1275}{1279:}procedure issue_message;var old_setting:0..21;c:0..1; s:str_number;begin c:=cur_chr;mem[29988].hh.rh:=scan_toks(false,true); old_setting:=selector;selector:=21;token_show(def_ref); selector:=old_setting;flush_list(def_ref); begin if pool_ptr+1>pool_size then overflow(258,pool_size-init_pool_ptr) ;end;s:=make_string; if c=0 then{1280:}begin if term_offset+(str_start[s+1]-str_start[s])> max_print_line-2 then print_ln else if(term_offset>0)or(file_offset>0) then print_char(32);slow_print(s);break(term_out); end{:1280}else{1283:}begin begin if interaction=3 then;print_nl(263); print(339);end;slow_print(s); if eqtb[3421].hh.rh<>0 then use_err_help:=true else if long_help_seen then begin help_ptr:=1;help_line[0]:=1248; end else begin if interaction<3 then long_help_seen:=true; begin help_ptr:=4;help_line[3]:=1249;help_line[2]:=1250; help_line[1]:=1251;help_line[0]:=1252;end;end;error;use_err_help:=false; end{:1283};begin str_ptr:=str_ptr-1;pool_ptr:=str_start[str_ptr];end; end;{:1279}{1288:}procedure shift_case;var b:halfword;p:halfword; t:halfword;c:eight_bits;begin b:=cur_chr;p:=scan_toks(false,false); p:=mem[def_ref].hh.rh;while p<>0 do begin{1289:}t:=mem[p].hh.lh; if t<4352 then begin c:=t mod 256; if eqtb[b+c].hh.rh<>0 then mem[p].hh.lh:=t-c+eqtb[b+c].hh.rh;end{:1289}; p:=mem[p].hh.rh;end;begin_token_list(mem[def_ref].hh.rh,3); begin mem[def_ref].hh.rh:=avail;avail:=def_ref;{dyn_used:=dyn_used-1;} end;end;{:1288}{1293:}procedure show_whatever;label 50;var p:halfword; t:small_number;m:0..4;l:integer;n:integer; begin case cur_chr of 3:begin begin_diagnostic;show_activities;end; 1:{1296:}begin scan_register_num; if cur_val<256 then p:=eqtb[3683+cur_val].hh.rh else begin find_sa_element(4,cur_val,false); if cur_ptr=0 then p:=0 else p:=mem[cur_ptr+1].hh.rh;end; begin_diagnostic;print_nl(1268);print_int(cur_val);print_char(61); if p=0 then print(413)else show_box(p);end{:1296}; 0:{1294:}begin get_token;if interaction=3 then;print_nl(1264); if cur_cs<>0 then begin sprint_cs(cur_cs);print_char(61);end; print_meaning;goto 50;end{:1294};{1408:}4:begin begin_diagnostic; show_save_groups;end;{:1408}{1422:}6:begin begin_diagnostic; print_nl(339);print_ln;if cond_ptr=0 then begin print_nl(366); print(1360);end else begin p:=cond_ptr;n:=0;repeat n:=n+1; p:=mem[p].hh.rh;until p=0;p:=cond_ptr;t:=cur_if;l:=if_line;m:=if_limit; repeat print_nl(1361);print_int(n);print(575);print_cmd_chr(105,t); if m=2 then print_esc(787);if l<>0 then begin print(1359);print_int(l); end;n:=n-1;t:=mem[p].hh.b1;l:=mem[p+1].int;m:=mem[p].hh.b0; p:=mem[p].hh.rh;until p=0;end;end; {:1422}others:{1297:}begin p:=the_toks;if interaction=3 then; print_nl(1264);token_show(29997);flush_list(mem[29997].hh.rh);goto 50; end{:1297}end;{1298:}end_diagnostic(true);begin if interaction=3 then; print_nl(263);print(1269);end; if selector=19 then if eqtb[5297].int<=0 then begin selector:=17; print(1270);selector:=19;end{:1298}; 50:if interaction<3 then begin help_ptr:=0;error_count:=error_count-1; end else if eqtb[5297].int>0 then begin begin help_ptr:=3; help_line[2]:=1259;help_line[1]:=1260;help_line[0]:=1261;end; end else begin begin help_ptr:=5;help_line[4]:=1259;help_line[3]:=1260; help_line[2]:=1261;help_line[1]:=1262;help_line[0]:=1263;end;end;error; end;{:1293}{1302:}procedure store_fmt_file;label 41,42,31,32; var j,k,l:integer;p,q:halfword;x:integer;w:four_quarters; begin{1304:}if save_ptr<>0 then begin begin if interaction=3 then; print_nl(263);print(1272);end;begin help_ptr:=1;help_line[0]:=1273;end; begin if interaction=3 then interaction:=2;if log_opened then error; {if interaction>0 then debug_help;}history:=3;jump_out;end;end{:1304}; {1328:}selector:=21;print(1286);print(job_name);print_char(32); print_int(eqtb[5291].int);print_char(46);print_int(eqtb[5290].int); print_char(46);print_int(eqtb[5289].int);print_char(41); if interaction=0 then selector:=18 else selector:=19; begin if pool_ptr+1>pool_size then overflow(258,pool_size-init_pool_ptr) ;end;format_ident:=make_string;pack_job_name(797); while not w_open_out(fmt_file)do prompt_file_name(1287,797); print_nl(1288);slow_print(w_make_name_string(fmt_file)); begin str_ptr:=str_ptr-1;pool_ptr:=str_start[str_ptr];end;print_nl(339); slow_print(format_ident){:1328};{1307:}begin fmt_file^.int:=337691162; put(fmt_file);end;{1385:}begin fmt_file^.int:=eTeX_mode;put(fmt_file); end;for j:=0 to-0 do eqtb[5332+j].int:=0; {:1385}{1493:}while pseudo_files<>0 do pseudo_close; {:1493}begin fmt_file^.int:=0;put(fmt_file);end; begin fmt_file^.int:=30000;put(fmt_file);end;begin fmt_file^.int:=6121; put(fmt_file);end;begin fmt_file^.int:=1777;put(fmt_file);end; begin fmt_file^.int:=307;put(fmt_file);end{:1307}; {1309:}begin fmt_file^.int:=pool_ptr;put(fmt_file);end; begin fmt_file^.int:=str_ptr;put(fmt_file);end; for k:=0 to str_ptr do begin fmt_file^.int:=str_start[k];put(fmt_file); end;k:=0;while k+40 do begin dyn_used:=dyn_used-1;p:=mem[p].hh.rh;end; begin fmt_file^.int:=var_used;put(fmt_file);end; begin fmt_file^.int:=dyn_used;put(fmt_file);end;print_ln;print_int(x); print(1275);print_int(var_used);print_char(38); print_int(dyn_used){:1311};{1313:}{1315:}k:=1;repeat j:=k; while j<5267 do begin if(eqtb[j].hh.rh=eqtb[j+1].hh.rh)and(eqtb[j].hh.b0 =eqtb[j+1].hh.b0)and(eqtb[j].hh.b1=eqtb[j+1].hh.b1)then goto 41;j:=j+1; end;l:=5268;goto 31;41:j:=j+1;l:=j; while j<5267 do begin if(eqtb[j].hh.rh<>eqtb[j+1].hh.rh)or(eqtb[j].hh.b0 <>eqtb[j+1].hh.b0)or(eqtb[j].hh.b1<>eqtb[j+1].hh.b1)then goto 31;j:=j+1; end;31:begin fmt_file^.int:=l-k;put(fmt_file);end; while keqtb[j+1].int then goto 32;j:=j+1; end;32:begin fmt_file^.int:=l-k;put(fmt_file);end; while k6121{:1316};begin fmt_file^.int:=par_loc;put(fmt_file);end; begin fmt_file^.int:=write_loc;put(fmt_file);end; {1318:}begin fmt_file^.int:=hash_used;put(fmt_file);end; cs_count:=2613-hash_used; for p:=514 to hash_used do if hash[p].rh<>0 then begin begin fmt_file^. int:=p;put(fmt_file);end;begin fmt_file^.hh:=hash[p];put(fmt_file);end; cs_count:=cs_count+1;end; for p:=hash_used+1 to 2880 do begin fmt_file^.hh:=hash[p];put(fmt_file); end;begin fmt_file^.int:=cs_count;put(fmt_file);end;print_ln; print_int(cs_count);print(1276){:1318}{:1313}; {1320:}begin fmt_file^.int:=fmem_ptr;put(fmt_file);end; for k:=0 to fmem_ptr-1 do begin fmt_file^:=font_info[k];put(fmt_file); end;begin fmt_file^.int:=font_ptr;put(fmt_file);end; for k:=0 to font_ptr do{1322:}begin begin fmt_file^.qqqq:=font_check[k]; put(fmt_file);end;begin fmt_file^.int:=font_size[k];put(fmt_file);end; begin fmt_file^.int:=font_dsize[k];put(fmt_file);end; begin fmt_file^.int:=font_params[k];put(fmt_file);end; begin fmt_file^.int:=hyphen_char[k];put(fmt_file);end; begin fmt_file^.int:=skew_char[k];put(fmt_file);end; begin fmt_file^.int:=font_name[k];put(fmt_file);end; begin fmt_file^.int:=font_area[k];put(fmt_file);end; begin fmt_file^.int:=font_bc[k];put(fmt_file);end; begin fmt_file^.int:=font_ec[k];put(fmt_file);end; begin fmt_file^.int:=char_base[k];put(fmt_file);end; begin fmt_file^.int:=width_base[k];put(fmt_file);end; begin fmt_file^.int:=height_base[k];put(fmt_file);end; begin fmt_file^.int:=depth_base[k];put(fmt_file);end; begin fmt_file^.int:=italic_base[k];put(fmt_file);end; begin fmt_file^.int:=lig_kern_base[k];put(fmt_file);end; begin fmt_file^.int:=kern_base[k];put(fmt_file);end; begin fmt_file^.int:=exten_base[k];put(fmt_file);end; begin fmt_file^.int:=param_base[k];put(fmt_file);end; begin fmt_file^.int:=font_glue[k];put(fmt_file);end; begin fmt_file^.int:=bchar_label[k];put(fmt_file);end; begin fmt_file^.int:=font_bchar[k];put(fmt_file);end; begin fmt_file^.int:=font_false_bchar[k];put(fmt_file);end; print_nl(1279);print_esc(hash[2624+k].rh);print_char(61); print_file_name(font_name[k],font_area[k],339); if font_size[k]<>font_dsize[k]then begin print(751); print_scaled(font_size[k]);print(400);end;end{:1322};print_ln; print_int(fmem_ptr-7);print(1277);print_int(font_ptr-0);print(1278); if font_ptr<>1 then print_char(115){:1320}; {1324:}begin fmt_file^.int:=hyph_count;put(fmt_file);end; for k:=0 to 307 do if hyph_word[k]<>0 then begin begin fmt_file^.int:=k; put(fmt_file);end;begin fmt_file^.int:=hyph_word[k];put(fmt_file);end; begin fmt_file^.int:=hyph_list[k];put(fmt_file);end;end;print_ln; print_int(hyph_count);print(1280);if hyph_count<>1 then print_char(115); if trie_not_ready then init_trie;begin fmt_file^.int:=trie_max; put(fmt_file);end;begin fmt_file^.int:=hyph_start;put(fmt_file);end; for k:=0 to trie_max do begin fmt_file^.hh:=trie[k];put(fmt_file);end; begin fmt_file^.int:=trie_op_ptr;put(fmt_file);end; for k:=1 to trie_op_ptr do begin begin fmt_file^.int:=hyf_distance[k]; put(fmt_file);end;begin fmt_file^.int:=hyf_num[k];put(fmt_file);end; begin fmt_file^.int:=hyf_next[k];put(fmt_file);end;end;print_nl(1281); print_int(trie_max);print(1282);print_int(trie_op_ptr);print(1283); if trie_op_ptr<>1 then print_char(115);print(1284); print_int(trie_op_size); for k:=255 downto 0 do if trie_used[k]>0 then begin print_nl(811); print_int(trie_used[k]-0);print(1285);print_int(k); begin fmt_file^.int:=k;put(fmt_file);end; begin fmt_file^.int:=trie_used[k]-0;put(fmt_file);end;end{:1324}; {1326:}begin fmt_file^.int:=interaction;put(fmt_file);end; begin fmt_file^.int:=format_ident;put(fmt_file);end; begin fmt_file^.int:=69069;put(fmt_file);end;eqtb[5299].int:=0{:1326}; {1329:}w_close(fmt_file){:1329};end; {:1302}{1348:}{1349:}procedure new_whatsit(s:small_number; w:small_number);var p:halfword;begin p:=get_node(w);mem[p].hh.b0:=8; mem[p].hh.b1:=s;mem[cur_list.tail_field].hh.rh:=p; cur_list.tail_field:=p;end; {:1349}{1350:}procedure new_write_whatsit(w:small_number); begin new_whatsit(cur_chr,w); if w<>2 then scan_four_bit_int else begin scan_int; if cur_val<0 then cur_val:=17 else if cur_val>15 then cur_val:=16;end; mem[cur_list.tail_field+1].hh.lh:=cur_val;end; {:1350}procedure do_extension;var i,j,k:integer;p,q,r:halfword; begin case cur_chr of 0:{1351:}begin new_write_whatsit(3); scan_optional_equals;scan_file_name; mem[cur_list.tail_field+1].hh.rh:=cur_name; mem[cur_list.tail_field+2].hh.lh:=cur_area; mem[cur_list.tail_field+2].hh.rh:=cur_ext;end{:1351}; 1:{1352:}begin k:=cur_cs;new_write_whatsit(2);cur_cs:=k; p:=scan_toks(false,false);mem[cur_list.tail_field+1].hh.rh:=def_ref; end{:1352};2:{1353:}begin new_write_whatsit(2); mem[cur_list.tail_field+1].hh.rh:=0;end{:1353}; 3:{1354:}begin new_whatsit(3,2);mem[cur_list.tail_field+1].hh.lh:=0; p:=scan_toks(false,true);mem[cur_list.tail_field+1].hh.rh:=def_ref; end{:1354};4:{1375:}begin get_x_token; if(cur_cmd=59)and(cur_chr<=2)then begin p:=cur_list.tail_field; do_extension;out_what(cur_list.tail_field); flush_node_list(cur_list.tail_field);cur_list.tail_field:=p; mem[p].hh.rh:=0;end else back_input;end{:1375}; 5:{1377:}if abs(cur_list.mode_field)<>102 then report_illegal_case else begin new_whatsit(4,2);scan_int; if cur_val<=0 then cur_list.aux_field.hh.rh:=0 else if cur_val>255 then cur_list.aux_field.hh.rh:=0 else cur_list.aux_field.hh.rh:=cur_val; mem[cur_list.tail_field+1].hh.rh:=cur_list.aux_field.hh.rh; mem[cur_list.tail_field+1].hh.b0:=norm_min(eqtb[5319].int); mem[cur_list.tail_field+1].hh.b1:=norm_min(eqtb[5320].int);end{:1377}; others:confusion(1305)end;end;{:1348}{1376:}procedure fix_language; var l:ASCII_code; begin if eqtb[5318].int<=0 then l:=0 else if eqtb[5318].int>255 then l:= 0 else l:=eqtb[5318].int; if l<>cur_list.aux_field.hh.rh then begin new_whatsit(4,2); mem[cur_list.tail_field+1].hh.rh:=l;cur_list.aux_field.hh.rh:=l; mem[cur_list.tail_field+1].hh.b0:=norm_min(eqtb[5319].int); mem[cur_list.tail_field+1].hh.b1:=norm_min(eqtb[5320].int);end;end; {:1376}{1068:}procedure handle_right_brace;var p,q:halfword;d:scaled; f:integer;begin case cur_group of 1:unsave; 0:begin begin if interaction=3 then;print_nl(263);print(1055);end; begin help_ptr:=2;help_line[1]:=1056;help_line[0]:=1057;end;error;end; 14,15,16:extra_right_brace;{1085:}2:package(0); 3:begin adjust_tail:=29995;package(0);end;4:begin end_graf;package(0); end;5:begin end_graf;package(4);end;{:1085}{1100:}11:begin end_graf; q:=eqtb[2892].hh.rh;mem[q].hh.rh:=mem[q].hh.rh+1;d:=eqtb[5851].int; f:=eqtb[5310].int;unsave;save_ptr:=save_ptr-1; p:=vpackage(mem[cur_list.head_field].hh.rh,0,1,1073741823);pop_nest; if save_stack[save_ptr+0].int<255 then begin begin mem[cur_list. tail_field].hh.rh:=get_node(5); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b0:=3; mem[cur_list.tail_field].hh.b1:=save_stack[save_ptr+0].int+0; mem[cur_list.tail_field+3].int:=mem[p+3].int+mem[p+2].int; mem[cur_list.tail_field+4].hh.lh:=mem[p+5].hh.rh; mem[cur_list.tail_field+4].hh.rh:=q;mem[cur_list.tail_field+2].int:=d; mem[cur_list.tail_field+1].int:=f; end else begin begin mem[cur_list.tail_field].hh.rh:=get_node(2); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b0:=5;mem[cur_list.tail_field].hh.b1:=0; mem[cur_list.tail_field+1].int:=mem[p+5].hh.rh;delete_glue_ref(q);end; free_node(p,7);if nest_ptr=0 then build_page;end; 8:{1026:}begin if(cur_input.loc_field<>0)or((cur_input.index_field<>6) and(cur_input.index_field<>3))then{1027:}begin begin if interaction=3 then;print_nl(263);print(1022);end;begin help_ptr:=2;help_line[1]:=1023; help_line[0]:=1024;end;error;repeat get_token; until cur_input.loc_field=0;end{:1027};end_token_list;end_graf;unsave; output_active:=false;insert_penalties:=0; {1028:}if eqtb[3938].hh.rh<>0 then begin begin if interaction=3 then; print_nl(263);print(1025);end;print_esc(412);print_int(255); begin help_ptr:=3;help_line[2]:=1026;help_line[1]:=1027; help_line[0]:=1028;end;box_error(255);end{:1028}; if cur_list.tail_field<>cur_list.head_field then begin mem[page_tail].hh .rh:=mem[cur_list.head_field].hh.rh;page_tail:=cur_list.tail_field;end; if mem[29998].hh.rh<>0 then begin if mem[29999].hh.rh=0 then nest[0]. tail_field:=page_tail;mem[page_tail].hh.rh:=mem[29999].hh.rh; mem[29999].hh.rh:=mem[29998].hh.rh;mem[29998].hh.rh:=0;page_tail:=29998; end;flush_node_list(disc_ptr[2]);disc_ptr[2]:=0;pop_nest;build_page; end{:1026};{:1100}{1118:}10:build_discretionary; {:1118}{1132:}6:begin back_input;cur_tok:=6710; begin if interaction=3 then;print_nl(263);print(634);end;print_esc(911); print(635);begin help_ptr:=1;help_line[0]:=1137;end;ins_error;end; {:1132}{1133:}7:begin end_graf;unsave;align_peek;end; {:1133}{1168:}12:begin end_graf;unsave;save_ptr:=save_ptr-2; p:=vpackage(mem[cur_list.head_field].hh.rh,save_stack[save_ptr+1].int, save_stack[save_ptr+0].int,1073741823);pop_nest; begin mem[cur_list.tail_field].hh.rh:=new_noad; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b0:=29;mem[cur_list.tail_field+1].hh.rh:=2; mem[cur_list.tail_field+1].hh.lh:=p;end;{:1168}{1173:}13:build_choices; {:1173}{1186:}9:begin unsave;save_ptr:=save_ptr-1; mem[save_stack[save_ptr+0].int].hh.rh:=3;p:=fin_mlist(0); mem[save_stack[save_ptr+0].int].hh.lh:=p; if p<>0 then if mem[p].hh.rh=0 then if mem[p].hh.b0=16 then begin if mem [p+3].hh.rh=0 then if mem[p+2].hh.rh=0 then begin mem[save_stack[ save_ptr+0].int].hh:=mem[p+1].hh;free_node(p,4);end; end else if mem[p].hh.b0=28 then if save_stack[save_ptr+0].int=cur_list. tail_field+1 then if mem[cur_list.tail_field].hh.b0=16 then{1187:}begin q:=cur_list.head_field; while mem[q].hh.rh<>cur_list.tail_field do q:=mem[q].hh.rh; mem[q].hh.rh:=p;free_node(cur_list.tail_field,4);cur_list.tail_field:=p; end{:1187};end;{:1186}others:confusion(1058)end;end; {:1068}procedure main_control; label 60,21,70,80,90,91,92,95,100,101,110,111,112,120,10;var t:integer; begin if eqtb[3419].hh.rh<>0 then begin_token_list(eqtb[3419].hh.rh,12); 60:get_x_token; 21:{1031:}if interrupt<>0 then if OK_to_interrupt then begin back_input; begin if interrupt<>0 then pause_for_instructions;end;goto 60;end; {if panicking then check_mem(false);} if eqtb[5304].int>0 then show_cur_cmd_chr{:1031}; case abs(cur_list.mode_field)+cur_cmd of 113,114,170:goto 70; 118:begin scan_char_num;cur_chr:=cur_val;goto 70;end; 167:begin get_x_token; if(cur_cmd=11)or(cur_cmd=12)or(cur_cmd=68)or(cur_cmd=16)then cancel_boundary:=true;goto 21;end; 112:if cur_list.aux_field.hh.lh=1000 then goto 120 else app_space; 166,267:goto 120;{1045:}1,102,203,11,213,268:; 40,141,242:begin{406:}repeat get_x_token;until cur_cmd<>10{:406}; goto 21;end;15:if its_all_over then goto 10; {1048:}23,123,224,71,172,273,{:1048}{1098:}39,{:1098}{1111:}45,{:1111} {1144:}49,150,{:1144}7,108,209:report_illegal_case; {1046:}8,109,9,110,18,119,70,171,51,152,16,117,50,151,53,154,67,168,54, 155,55,156,57,158,56,157,31,132,52,153,29,130,47,148,212,216,217,230,227 ,236,239{:1046}:insert_dollar_sign; {1056:}37,137,238:begin begin mem[cur_list.tail_field].hh.rh:= scan_rule_spec;cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; if abs(cur_list.mode_field)=1 then cur_list.aux_field.int:=-65536000 else if abs(cur_list.mode_field)=102 then cur_list.aux_field.hh.lh:=1000 ;end;{:1056}{1057:}28,128,229,231:append_glue; 30,131,232,233:append_kern;{:1057}{1063:}2,103:new_save_level(1); 62,163,264:new_save_level(14); 63,164,265:if cur_group=14 then unsave else off_save; {:1063}{1067:}3,104,205:handle_right_brace; {:1067}{1073:}22,124,225:begin t:=cur_chr;scan_dimen(false,false,false); if t=0 then scan_box(cur_val)else scan_box(-cur_val);end; 32,133,234:scan_box(1073807261+cur_chr);21,122,223:begin_box(0); {:1073}{1090:}44:new_graf(cur_chr>0); 12,13,17,69,4,24,36,46,48,27,34,65,66:begin back_input;new_graf(true); end;{:1090}{1092:}145,246:indent_in_hmode; {:1092}{1094:}14:begin normal_paragraph; if cur_list.mode_field>0 then build_page;end; 115:begin if align_state<0 then off_save;end_graf; if cur_list.mode_field=1 then build_page;end; 116,129,138,126,134:head_for_vmode; {:1094}{1097:}38,139,240,140,241:begin_insert_or_adjust; 19,120,221:make_mark;{:1097}{1102:}43,144,245:append_penalty; {:1102}{1104:}26,127,228:delete_last;{:1104}{1109:}25,125,226:unpackage; {:1109}{1112:}146:append_italic_correction; 247:begin mem[cur_list.tail_field].hh.rh:=new_kern(0); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; {:1112}{1116:}149,250:append_discretionary; {:1116}{1122:}147:make_accent; {:1122}{1126:}6,107,208,5,106,207:align_error;35,136,237:no_align_error; 64,165,266:omit_error;{:1126}{1130:}33:init_align; 135:{1434:}if cur_chr>0 then begin if eTeX_enabled((eqtb[5332].int>0), cur_cmd,cur_chr)then begin mem[cur_list.tail_field].hh.rh:=new_math(0, cur_chr);cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; end else{:1434}init_align; 235:if privileged then if cur_group=15 then init_align else off_save; 10,111:do_endv;{:1130}{1134:}68,169,270:cs_error; {:1134}{1137:}105:init_math; {:1137}{1140:}251:if privileged then if cur_group=15 then start_eq_no else off_save; {:1140}{1150:}204:begin begin mem[cur_list.tail_field].hh.rh:=new_noad; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;back_input; scan_math(cur_list.tail_field+1);end; {:1150}{1154:}214,215,271:set_math_char(eqtb[5012+cur_chr].hh.rh-0); 219:begin scan_char_num;cur_chr:=cur_val; set_math_char(eqtb[5012+cur_chr].hh.rh-0);end; 220:begin scan_fifteen_bit_int;set_math_char(cur_val);end; 272:set_math_char(cur_chr);218:begin scan_twenty_seven_bit_int; set_math_char(cur_val div 4096);end; {:1154}{1158:}253:begin begin mem[cur_list.tail_field].hh.rh:=new_noad; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b0:=cur_chr; scan_math(cur_list.tail_field+1);end;254:math_limit_switch; {:1158}{1162:}269:math_radical;{:1162}{1164:}248,249:math_ac; {:1164}{1167:}259:begin scan_spec(12,false);normal_paragraph;push_nest; cur_list.mode_field:=-1;cur_list.aux_field.int:=-65536000; if eqtb[3418].hh.rh<>0 then begin_token_list(eqtb[3418].hh.rh,11);end; {:1167}{1171:}256:begin mem[cur_list.tail_field].hh.rh:=new_style( cur_chr);cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; 258:begin begin mem[cur_list.tail_field].hh.rh:=new_glue(0); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; mem[cur_list.tail_field].hh.b1:=98;end;257:append_choices; {:1171}{1175:}211,210:sub_sup;{:1175}{1180:}255:math_fraction; {:1180}{1190:}252:math_left_right; {:1190}{1193:}206:if cur_group=15 then after_math else off_save; {:1193}{1210:}72,173,274,73,174,275,74,175,276,75,176,277,76,177,278,77, 178,279,78,179,280,79,180,281,80,181,282,81,182,283,82,183,284,83,184, 285,84,185,286,85,186,287,86,187,288,87,188,289,88,189,290,89,190,291,90 ,191,292,91,192,293,92,193,294,93,194,295,94,195,296,95,196,297,96,197, 298,97,198,299,98,199,300,99,200,301,100,201,302,101,202,303: prefixed_command;{:1210}{1268:}41,142,243:begin get_token; after_token:=cur_tok;end;{:1268}{1271:}42,143,244:begin get_token; save_for_after(cur_tok);end;{:1271}{1274:}61,162,263:open_or_close_in; {:1274}{1276:}59,160,261:issue_message; {:1276}{1285:}58,159,260:shift_case; {:1285}{1290:}20,121,222:show_whatever; {:1290}{1347:}60,161,262:do_extension;{:1347}{:1045}end;goto 60; 70:{1034:}main_s:=eqtb[4756+cur_chr].hh.rh; if main_s=1000 then cur_list.aux_field.hh.lh:=1000 else if main_s<1000 then begin if main_s>0 then cur_list.aux_field.hh.lh:=main_s; end else if cur_list.aux_field.hh.lh<1000 then cur_list.aux_field.hh.lh :=1000 else cur_list.aux_field.hh.lh:=main_s;main_f:=eqtb[3939].hh.rh; bchar:=font_bchar[main_f];false_bchar:=font_false_bchar[main_f]; if cur_list.mode_field>0 then if eqtb[5318].int<>cur_list.aux_field.hh. rh then fix_language;begin lig_stack:=avail; if lig_stack=0 then lig_stack:=get_avail else begin avail:=mem[lig_stack ].hh.rh;mem[lig_stack].hh.rh:=0;{dyn_used:=dyn_used+1;}end;end; mem[lig_stack].hh.b0:=main_f;cur_l:=cur_chr+0; mem[lig_stack].hh.b1:=cur_l;cur_q:=cur_list.tail_field; if cancel_boundary then begin cancel_boundary:=false;main_k:=0; end else main_k:=bchar_label[main_f];if main_k=0 then goto 92; cur_r:=cur_l;cur_l:=256;goto 111; 80:{1035:}if cur_l<256 then begin if mem[cur_q].hh.rh>0 then if mem[ cur_list.tail_field].hh.b1=hyphen_char[main_f]+0 then ins_disc:=true; if ligature_present then begin main_p:=new_ligature(main_f,cur_l,mem[ cur_q].hh.rh);if lft_hit then begin mem[main_p].hh.b1:=2;lft_hit:=false; end; if rt_hit then if lig_stack=0 then begin mem[main_p].hh.b1:=mem[main_p]. hh.b1+1;rt_hit:=false;end;mem[cur_q].hh.rh:=main_p; cur_list.tail_field:=main_p;ligature_present:=false;end; if ins_disc then begin ins_disc:=false; if cur_list.mode_field>0 then begin mem[cur_list.tail_field].hh.rh:= new_disc;cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;end; end{:1035};90:{1036:}if lig_stack=0 then goto 21; cur_q:=cur_list.tail_field;cur_l:=mem[lig_stack].hh.b1; 91:if not(lig_stack>=hi_mem_min)then goto 95; 92:if(cur_chrfont_ec[main_f])then begin char_warning(main_f,cur_chr);begin mem[lig_stack].hh.rh:=avail; avail:=lig_stack;{dyn_used:=dyn_used-1;}end;goto 60;end; main_i:=font_info[char_base[main_f]+cur_l].qqqq; if not(main_i.b0>0)then begin char_warning(main_f,cur_chr); begin mem[lig_stack].hh.rh:=avail;avail:=lig_stack; {dyn_used:=dyn_used-1;}end;goto 60;end; mem[cur_list.tail_field].hh.rh:=lig_stack; cur_list.tail_field:=lig_stack{:1036};100:{1038:}get_next; if cur_cmd=11 then goto 101;if cur_cmd=12 then goto 101; if cur_cmd=68 then goto 101;x_token;if cur_cmd=11 then goto 101; if cur_cmd=12 then goto 101;if cur_cmd=68 then goto 101; if cur_cmd=16 then begin scan_char_num;cur_chr:=cur_val;goto 101;end; if cur_cmd=65 then bchar:=256;cur_r:=bchar;lig_stack:=0;goto 110; 101:main_s:=eqtb[4756+cur_chr].hh.rh; if main_s=1000 then cur_list.aux_field.hh.lh:=1000 else if main_s<1000 then begin if main_s>0 then cur_list.aux_field.hh.lh:=main_s; end else if cur_list.aux_field.hh.lh<1000 then cur_list.aux_field.hh.lh :=1000 else cur_list.aux_field.hh.lh:=main_s;begin lig_stack:=avail; if lig_stack=0 then lig_stack:=get_avail else begin avail:=mem[lig_stack ].hh.rh;mem[lig_stack].hh.rh:=0;{dyn_used:=dyn_used+1;}end;end; mem[lig_stack].hh.b0:=main_f;cur_r:=cur_chr+0; mem[lig_stack].hh.b1:=cur_r;if cur_r=false_bchar then cur_r:=256{:1038}; 110:{1039:}if((main_i.b2-0)mod 4)<>1 then goto 80; if cur_r=256 then goto 80;main_k:=lig_kern_base[main_f]+main_i.b3; main_j:=font_info[main_k].qqqq;if main_j.b0<=128 then goto 112; main_k:=lig_kern_base[main_f]+256*main_j.b2+main_j.b3+32768-256*(128); 111:main_j:=font_info[main_k].qqqq; 112:if main_j.b1=cur_r then if main_j.b0<=128 then{1040:}begin if main_j .b2>=128 then begin if cur_l<256 then begin if mem[cur_q].hh.rh>0 then if mem[cur_list.tail_field].hh.b1=hyphen_char[main_f]+0 then ins_disc:= true; if ligature_present then begin main_p:=new_ligature(main_f,cur_l,mem[ cur_q].hh.rh);if lft_hit then begin mem[main_p].hh.b1:=2;lft_hit:=false; end; if rt_hit then if lig_stack=0 then begin mem[main_p].hh.b1:=mem[main_p]. hh.b1+1;rt_hit:=false;end;mem[cur_q].hh.rh:=main_p; cur_list.tail_field:=main_p;ligature_present:=false;end; if ins_disc then begin ins_disc:=false; if cur_list.mode_field>0 then begin mem[cur_list.tail_field].hh.rh:= new_disc;cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;end; end;begin mem[cur_list.tail_field].hh.rh:=new_kern(font_info[kern_base[ main_f]+256*main_j.b2+main_j.b3].int); cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;goto 90;end; if cur_l=256 then lft_hit:=true else if lig_stack=0 then rt_hit:=true; begin if interrupt<>0 then pause_for_instructions;end; case main_j.b2 of 1,5:begin cur_l:=main_j.b3; main_i:=font_info[char_base[main_f]+cur_l].qqqq;ligature_present:=true; end;2,6:begin cur_r:=main_j.b3; if lig_stack=0 then begin lig_stack:=new_lig_item(cur_r);bchar:=256; end else if(lig_stack>=hi_mem_min)then begin main_p:=lig_stack; lig_stack:=new_lig_item(cur_r);mem[lig_stack+1].hh.rh:=main_p; end else mem[lig_stack].hh.b1:=cur_r;end;3:begin cur_r:=main_j.b3; main_p:=lig_stack;lig_stack:=new_lig_item(cur_r); mem[lig_stack].hh.rh:=main_p;end; 7,11:begin if cur_l<256 then begin if mem[cur_q].hh.rh>0 then if mem[ cur_list.tail_field].hh.b1=hyphen_char[main_f]+0 then ins_disc:=true; if ligature_present then begin main_p:=new_ligature(main_f,cur_l,mem[ cur_q].hh.rh);if lft_hit then begin mem[main_p].hh.b1:=2;lft_hit:=false; end; if false then if lig_stack=0 then begin mem[main_p].hh.b1:=mem[main_p]. hh.b1+1;rt_hit:=false;end;mem[cur_q].hh.rh:=main_p; cur_list.tail_field:=main_p;ligature_present:=false;end; if ins_disc then begin ins_disc:=false; if cur_list.mode_field>0 then begin mem[cur_list.tail_field].hh.rh:= new_disc;cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end;end; end;cur_q:=cur_list.tail_field;cur_l:=main_j.b3; main_i:=font_info[char_base[main_f]+cur_l].qqqq;ligature_present:=true; end;others:begin cur_l:=main_j.b3;ligature_present:=true; if lig_stack=0 then goto 80 else goto 91;end end; if main_j.b2>4 then if main_j.b2<>7 then goto 80; if cur_l<256 then goto 110;main_k:=bchar_label[main_f];goto 111; end{:1040}; if main_j.b0=0 then main_k:=main_k+1 else begin if main_j.b0>=128 then goto 80;main_k:=main_k+main_j.b0+1;end;goto 111{:1039}; 95:{1037:}main_p:=mem[lig_stack+1].hh.rh; if main_p>0 then begin mem[cur_list.tail_field].hh.rh:=main_p; cur_list.tail_field:=mem[cur_list.tail_field].hh.rh;end; temp_ptr:=lig_stack;lig_stack:=mem[temp_ptr].hh.rh; free_node(temp_ptr,2);main_i:=font_info[char_base[main_f]+cur_l].qqqq; ligature_present:=true; if lig_stack=0 then if main_p>0 then goto 100 else cur_r:=bchar else cur_r:=mem[lig_stack].hh.b1;goto 110{:1037}{:1034}; 120:{1041:}if eqtb[2894].hh.rh=0 then begin{1042:}begin main_p:= font_glue[eqtb[3939].hh.rh];if main_p=0 then begin main_p:=new_spec(0); main_k:=param_base[eqtb[3939].hh.rh]+2; mem[main_p+1].int:=font_info[main_k].int; mem[main_p+2].int:=font_info[main_k+1].int; mem[main_p+3].int:=font_info[main_k+2].int; font_glue[eqtb[3939].hh.rh]:=main_p;end;end{:1042}; temp_ptr:=new_glue(main_p);end else temp_ptr:=new_param_glue(12); mem[cur_list.tail_field].hh.rh:=temp_ptr;cur_list.tail_field:=temp_ptr; goto 60{:1041};10:end;{:1030}{1284:}procedure give_err_help; begin token_show(eqtb[3421].hh.rh);end; {:1284}{1303:}{524:}function open_fmt_file:boolean;label 40,10; var j:0..buf_size;begin j:=cur_input.loc_field; if buffer[cur_input.loc_field]=38 then begin cur_input.loc_field:= cur_input.loc_field+1;j:=cur_input.loc_field;buffer[last]:=32; while buffer[j]<>32 do j:=j+1; pack_buffered_name(0,cur_input.loc_field,j-1); if w_open_in(fmt_file)then goto 40; pack_buffered_name(11,cur_input.loc_field,j-1); if w_open_in(fmt_file)then goto 40;; write_ln(term_out,'Sorry, I can''t find that format;',' will try PLAIN.' );break(term_out);end;pack_buffered_name(16,1,0); if not w_open_in(fmt_file)then begin; write_ln(term_out,'I can''t find the PLAIN format file!'); open_fmt_file:=false;goto 10;end;40:cur_input.loc_field:=j; open_fmt_file:=true;10:end;{:524}function load_fmt_file:boolean; label 6666,10;var j,k:integer;p,q:halfword;x:integer;w:four_quarters; begin{1308:}x:=fmt_file^.int;if x<>337691162 then goto 6666; {1386:}begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>1)then goto 6666 else eTeX_mode:=x;end; if(eTeX_mode=1)then begin{1548:}max_reg_num:=32767; max_reg_help_line:=1409;{:1548}end else begin{1547:}max_reg_num:=255; max_reg_help_line:=697;{:1547}end;{:1386}begin get(fmt_file); x:=fmt_file^.int;end;if x<>0 then goto 6666;begin get(fmt_file); x:=fmt_file^.int;end;if x<>30000 then goto 6666;begin get(fmt_file); x:=fmt_file^.int;end;if x<>6121 then goto 6666;begin get(fmt_file); x:=fmt_file^.int;end;if x<>1777 then goto 6666;begin get(fmt_file); x:=fmt_file^.int;end;if x<>307 then goto 6666{:1308}; {1310:}begin begin get(fmt_file);x:=fmt_file^.int;end; if x<0 then goto 6666;if x>pool_size then begin; write_ln(term_out,'---! Must increase the ','string pool size'); goto 6666;end else pool_ptr:=x;end;begin begin get(fmt_file); x:=fmt_file^.int;end;if x<0 then goto 6666;if x>max_strings then begin; write_ln(term_out,'---! Must increase the ','max strings');goto 6666; end else str_ptr:=x;end; for k:=0 to str_ptr do begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>pool_ptr)then goto 6666 else str_start[k]:=x;end;k:=0; while k+429986)then goto 6666 else lo_mem_max:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<20)or(x>lo_mem_max)then goto 6666 else rover:=x;end; if(eTeX_mode=1)then for k:=0 to 5 do begin begin get(fmt_file); x:=fmt_file^.int;end; if(x<0)or(x>lo_mem_max)then goto 6666 else sa_root[k]:=x;end;p:=0; q:=rover;repeat for k:=p to q+1 do begin get(fmt_file); mem[k]:=fmt_file^;end;p:=q+mem[q].hh.lh; if(p>lo_mem_max)or((q>=mem[q+1].hh.rh)and(mem[q+1].hh.rh<>rover))then goto 6666;q:=mem[q+1].hh.rh;until q=rover; for k:=p to lo_mem_max do begin get(fmt_file);mem[k]:=fmt_file^;end; if mem_min<-2 then begin p:=mem[rover+1].hh.lh;q:=mem_min+1; mem[mem_min].hh.rh:=0;mem[mem_min].hh.lh:=0;mem[p+1].hh.rh:=q; mem[rover+1].hh.lh:=q;mem[q+1].hh.rh:=rover;mem[q+1].hh.lh:=p; mem[q].hh.rh:=65535;mem[q].hh.lh:=-0-q;end;begin begin get(fmt_file); x:=fmt_file^.int;end; if(x29987)then goto 6666 else hi_mem_min:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>30000)then goto 6666 else avail:=x;end;mem_end:=30000; for k:=hi_mem_min to mem_end do begin get(fmt_file);mem[k]:=fmt_file^; end;begin get(fmt_file);var_used:=fmt_file^.int;end;begin get(fmt_file); dyn_used:=fmt_file^.int;end{:1312};{1314:}{1317:}k:=1; repeat begin get(fmt_file);x:=fmt_file^.int;end; if(x<1)or(k+x>6122)then goto 6666; for j:=k to k+x-1 do begin get(fmt_file);eqtb[j]:=fmt_file^;end;k:=k+x; begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(k+x>6122)then goto 6666; for j:=k to k+x-1 do eqtb[j]:=eqtb[k-1];k:=k+x;until k>6121{:1317}; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<514)or(x>2614)then goto 6666 else par_loc:=x;end; par_token:=4095+par_loc;begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<514)or(x>2614)then goto 6666 else write_loc:=x;end; {1319:}begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<514)or(x>2614)then goto 6666 else hash_used:=x;end;p:=513; repeat begin begin get(fmt_file);x:=fmt_file^.int;end; if(xhash_used)then goto 6666 else p:=x;end; begin get(fmt_file);hash[p]:=fmt_file^.hh;end;until p=hash_used; for p:=hash_used+1 to 2880 do begin get(fmt_file);hash[p]:=fmt_file^.hh; end;begin get(fmt_file);cs_count:=fmt_file^.int;end{:1319}{:1314}; {1321:}begin begin get(fmt_file);x:=fmt_file^.int;end; if x<7 then goto 6666;if x>font_mem_size then begin; write_ln(term_out,'---! Must increase the ','font mem size');goto 6666; end else fmem_ptr:=x;end;for k:=0 to fmem_ptr-1 do begin get(fmt_file); font_info[k]:=fmt_file^;end;begin begin get(fmt_file);x:=fmt_file^.int; end;if x<0 then goto 6666;if x>font_max then begin; write_ln(term_out,'---! Must increase the ','font max');goto 6666; end else font_ptr:=x;end; for k:=0 to font_ptr do{1323:}begin begin get(fmt_file); font_check[k]:=fmt_file^.qqqq;end;begin get(fmt_file); font_size[k]:=fmt_file^.int;end;begin get(fmt_file); font_dsize[k]:=fmt_file^.int;end;begin begin get(fmt_file); x:=fmt_file^.int;end; if(x<0)or(x>65535)then goto 6666 else font_params[k]:=x;end; begin get(fmt_file);hyphen_char[k]:=fmt_file^.int;end; begin get(fmt_file);skew_char[k]:=fmt_file^.int;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>str_ptr)then goto 6666 else font_name[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>str_ptr)then goto 6666 else font_area[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>255)then goto 6666 else font_bc[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>255)then goto 6666 else font_ec[k]:=x;end; begin get(fmt_file);char_base[k]:=fmt_file^.int;end;begin get(fmt_file); width_base[k]:=fmt_file^.int;end;begin get(fmt_file); height_base[k]:=fmt_file^.int;end;begin get(fmt_file); depth_base[k]:=fmt_file^.int;end;begin get(fmt_file); italic_base[k]:=fmt_file^.int;end;begin get(fmt_file); lig_kern_base[k]:=fmt_file^.int;end;begin get(fmt_file); kern_base[k]:=fmt_file^.int;end;begin get(fmt_file); exten_base[k]:=fmt_file^.int;end;begin get(fmt_file); param_base[k]:=fmt_file^.int;end;begin begin get(fmt_file); x:=fmt_file^.int;end; if(x<0)or(x>lo_mem_max)then goto 6666 else font_glue[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>fmem_ptr-1)then goto 6666 else bchar_label[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>256)then goto 6666 else font_bchar[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>256)then goto 6666 else font_false_bchar[k]:=x;end; end{:1323}{:1321};{1325:}begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>307)then goto 6666 else hyph_count:=x;end; for k:=1 to hyph_count do begin begin begin get(fmt_file); x:=fmt_file^.int;end;if(x<0)or(x>307)then goto 6666 else j:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>str_ptr)then goto 6666 else hyph_word[j]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>65535)then goto 6666 else hyph_list[j]:=x;end;end; begin begin get(fmt_file);x:=fmt_file^.int;end;if x<0 then goto 6666; if x>trie_size then begin; write_ln(term_out,'---! Must increase the ','trie size');goto 6666; end else j:=x;end;trie_max:=j;begin begin get(fmt_file); x:=fmt_file^.int;end;if(x<0)or(x>j)then goto 6666 else hyph_start:=x; end;for k:=0 to j do begin get(fmt_file);trie[k]:=fmt_file^.hh;end; begin begin get(fmt_file);x:=fmt_file^.int;end;if x<0 then goto 6666; if x>trie_op_size then begin; write_ln(term_out,'---! Must increase the ','trie op size');goto 6666; end else j:=x;end;trie_op_ptr:=j; for k:=1 to j do begin begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>63)then goto 6666 else hyf_distance[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>63)then goto 6666 else hyf_num[k]:=x;end; begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>255)then goto 6666 else hyf_next[k]:=x;end;end; for k:=0 to 255 do trie_used[k]:=0;k:=256; while j>0 do begin begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>k-1)then goto 6666 else k:=x;end;begin begin get(fmt_file); x:=fmt_file^.int;end;if(x<1)or(x>j)then goto 6666 else x:=x;end; trie_used[k]:=x+0;j:=j-x;op_start[k]:=j-0;end; trie_not_ready:=false{:1325};{1327:}begin begin get(fmt_file); x:=fmt_file^.int;end;if(x<0)or(x>3)then goto 6666 else interaction:=x; end;begin begin get(fmt_file);x:=fmt_file^.int;end; if(x<0)or(x>str_ptr)then goto 6666 else format_ident:=x;end; begin get(fmt_file);x:=fmt_file^.int;end; if(x<>69069)or eof(fmt_file)then goto 6666{:1327};load_fmt_file:=true; goto 10;6666:; write_ln(term_out,'(Fatal format file error; I''m stymied)'); load_fmt_file:=false;10:end; {:1303}{1330:}{1333:}procedure close_files_and_terminate;var k:integer; begin{1378:}for k:=0 to 15 do if write_open[k]then a_close(write_file[k] ){:1378};eqtb[5317].int:=-1; {if eqtb[5299].int>0 then[1334:]if log_opened then begin write_ln( log_file,' '); write_ln(log_file,'Here is how much of TeX''s memory',' you used:'); write(log_file,' ',str_ptr-init_str_ptr:1,' string'); if str_ptr<>init_str_ptr+1 then write(log_file,'s'); write_ln(log_file,' out of ',max_strings-init_str_ptr:1); write_ln(log_file,' ',pool_ptr-init_pool_ptr:1, ' string characters out of ',pool_size-init_pool_ptr:1); write_ln(log_file,' ',lo_mem_max-mem_min+mem_end-hi_mem_min+2:1, ' words of memory out of ',mem_end+1-mem_min:1); write_ln(log_file,' ',cs_count:1, ' multiletter control sequences out of ',2100:1); write(log_file,' ',fmem_ptr:1,' words of font info for ',font_ptr-0:1, ' font');if font_ptr<>1 then write(log_file,'s'); write_ln(log_file,', out of ',font_mem_size:1,' for ',font_max-0:1); write(log_file,' ',hyph_count:1,' hyphenation exception'); if hyph_count<>1 then write(log_file,'s'); write_ln(log_file,' out of ',307:1); write_ln(log_file,' ',max_in_stack:1,'i,',max_nest_stack:1,'n,', max_param_stack:1,'p,',max_buf_stack+1:1,'b,',max_save_stack+6:1, 's stack positions out of ',stack_size:1,'i,',nest_size:1,'n,', param_size:1,'p,',buf_size:1,'b,',save_size:1,'s');end[:1334];}; {642:}while cur_s>-1 do begin if cur_s>0 then begin dvi_buf[dvi_ptr]:= 142;dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap; end else begin begin dvi_buf[dvi_ptr]:=140;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;total_pages:=total_pages+1;end; cur_s:=cur_s-1;end; if total_pages=0 then print_nl(848)else begin begin dvi_buf[dvi_ptr]:= 248;dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; dvi_four(last_bop);last_bop:=dvi_offset+dvi_ptr-5;dvi_four(25400000); dvi_four(473628672);prepare_mag;dvi_four(eqtb[5285].int); dvi_four(max_v);dvi_four(max_h); begin dvi_buf[dvi_ptr]:=max_push div 256;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=max_push mod 256;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=(total_pages div 256)mod 256;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; begin dvi_buf[dvi_ptr]:=total_pages mod 256;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; {643:}while font_ptr>0 do begin if font_used[font_ptr]then dvi_font_def( font_ptr);font_ptr:=font_ptr-1;end{:643};begin dvi_buf[dvi_ptr]:=249; dvi_ptr:=dvi_ptr+1;if dvi_ptr=dvi_limit then dvi_swap;end; dvi_four(last_bop);begin dvi_buf[dvi_ptr]:=2;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end; k:=4+((dvi_buf_size-dvi_ptr)mod 4); while k>0 do begin begin dvi_buf[dvi_ptr]:=223;dvi_ptr:=dvi_ptr+1; if dvi_ptr=dvi_limit then dvi_swap;end;k:=k-1;end; {599:}if dvi_limit=half_buf then write_dvi(half_buf,dvi_buf_size-1); if dvi_ptr>0 then write_dvi(0,dvi_ptr-1){:599};print_nl(849); slow_print(output_file_name);print(287);print_int(total_pages); print(850);if total_pages<>1 then print_char(115);print(851); print_int(dvi_offset+dvi_ptr);print(852);b_close(dvi_file);end{:642}; if log_opened then begin write_ln(log_file);a_close(log_file); selector:=selector-2;if selector=17 then begin print_nl(1289); slow_print(log_name);print_char(46);end;end;end; {:1333}{1335:}procedure final_cleanup;label 10;var c:small_number; begin c:=cur_chr;if c<>1 then eqtb[5317].int:=-1; if job_name=0 then open_log_file; while input_ptr>0 do if cur_input.state_field=0 then end_token_list else end_file_reading;while open_parens>0 do begin print(1290); open_parens:=open_parens-1;end;if cur_level>1 then begin print_nl(40); print_esc(1291);print(1292);print_int(cur_level-1);print_char(41); if(eTeX_mode=1)then show_save_groups;end; while cond_ptr<>0 do begin print_nl(40);print_esc(1291);print(1293); print_cmd_chr(105,cur_if);if if_line<>0 then begin print(1294); print_int(if_line);end;print(1295);if_line:=mem[cond_ptr+1].int; cur_if:=mem[cond_ptr].hh.b1;temp_ptr:=cond_ptr; cond_ptr:=mem[cond_ptr].hh.rh;free_node(temp_ptr,2);end; if history<>0 then if((history=1)or(interaction<3))then if selector=19 then begin selector:=17;print_nl(1296);selector:=19;end; if c=1 then begin for c:=0 to 4 do if cur_mark[c]<>0 then delete_token_ref(cur_mark[c]); if sa_root[6]<>0 then if do_marks(3,0,sa_root[6])then sa_root[6]:=0; for c:=2 to 3 do flush_node_list(disc_ptr[c]); if last_glue<>65535 then delete_glue_ref(last_glue);store_fmt_file; goto 10;print_nl(1297);goto 10;end;10:end; {:1335}{1336:}procedure init_prim;begin no_new_control_sequence:=false; first:=0;{226:}primitive(379,75,2882);primitive(380,75,2883); primitive(381,75,2884);primitive(382,75,2885);primitive(383,75,2886); primitive(384,75,2887);primitive(385,75,2888);primitive(386,75,2889); primitive(387,75,2890);primitive(388,75,2891);primitive(389,75,2892); primitive(390,75,2893);primitive(391,75,2894);primitive(392,75,2895); primitive(393,75,2896);primitive(394,76,2897);primitive(395,76,2898); primitive(396,76,2899);{:226}{230:}primitive(401,72,3413); primitive(402,72,3414);primitive(403,72,3415);primitive(404,72,3416); primitive(405,72,3417);primitive(406,72,3418);primitive(407,72,3419); primitive(408,72,3420);primitive(409,72,3421); {:230}{238:}primitive(423,73,5268);primitive(424,73,5269); primitive(425,73,5270);primitive(426,73,5271);primitive(427,73,5272); primitive(428,73,5273);primitive(429,73,5274);primitive(430,73,5275); primitive(431,73,5276);primitive(432,73,5277);primitive(433,73,5278); primitive(434,73,5279);primitive(435,73,5280);primitive(436,73,5281); primitive(437,73,5282);primitive(438,73,5283);primitive(439,73,5284); primitive(440,73,5285);primitive(441,73,5286);primitive(442,73,5287); primitive(443,73,5288);primitive(444,73,5289);primitive(445,73,5290); primitive(446,73,5291);primitive(447,73,5292);primitive(448,73,5293); primitive(449,73,5294);primitive(450,73,5295);primitive(451,73,5296); primitive(452,73,5297);primitive(453,73,5298);primitive(454,73,5299); primitive(455,73,5300);primitive(456,73,5301);primitive(457,73,5302); primitive(458,73,5303);primitive(459,73,5304);primitive(460,73,5305); primitive(461,73,5306);primitive(462,73,5307);primitive(463,73,5308); primitive(464,73,5309);primitive(465,73,5310);primitive(466,73,5311); primitive(467,73,5312);primitive(468,73,5313);primitive(469,73,5314); primitive(470,73,5315);primitive(471,73,5316);primitive(472,73,5317); primitive(473,73,5318);primitive(474,73,5319);primitive(475,73,5320); primitive(476,73,5321);primitive(477,73,5322); {:238}{248:}primitive(481,74,5845);primitive(482,74,5846); primitive(483,74,5847);primitive(484,74,5848);primitive(485,74,5849); primitive(486,74,5850);primitive(487,74,5851);primitive(488,74,5852); primitive(489,74,5853);primitive(490,74,5854);primitive(491,74,5855); primitive(492,74,5856);primitive(493,74,5857);primitive(494,74,5858); primitive(495,74,5859);primitive(496,74,5860);primitive(497,74,5861); primitive(498,74,5862);primitive(499,74,5863);primitive(500,74,5864); primitive(501,74,5865);{:248}{265:}primitive(32,64,0); primitive(47,44,0);primitive(511,45,0);primitive(512,90,0); primitive(513,40,0);primitive(514,41,0);primitive(515,61,0); primitive(516,16,0);primitive(507,107,0);primitive(517,15,0); primitive(518,92,0);primitive(508,67,0);primitive(519,62,0); hash[2616].rh:=519;eqtb[2616]:=eqtb[cur_val];primitive(520,102,0); primitive(521,88,0);primitive(522,77,0);primitive(523,32,0); primitive(524,36,0);primitive(525,39,0);primitive(331,37,0); primitive(354,18,0);primitive(526,46,0);primitive(527,17,0); primitive(528,54,0);primitive(529,91,0);primitive(530,34,0); primitive(531,65,0);primitive(532,103,0);primitive(336,55,0); primitive(533,63,0);primitive(534,84,3412);primitive(535,42,0); primitive(536,80,0);primitive(537,66,0);primitive(538,96,0); primitive(539,0,256);hash[2621].rh:=539;eqtb[2621]:=eqtb[cur_val]; primitive(540,98,0);primitive(541,109,0);primitive(410,71,0); primitive(355,38,0);primitive(542,33,0);primitive(543,56,0); primitive(544,35,0);{:265}{334:}primitive(606,13,256);par_loc:=cur_val; par_token:=4095+par_loc;{:334}{376:}primitive(638,104,0); primitive(639,104,1);{:376}{384:}primitive(640,110,0); primitive(641,110,1);primitive(642,110,2);primitive(643,110,3); primitive(644,110,4);{:384}{411:}primitive(479,89,0); primitive(503,89,1);primitive(398,89,2);primitive(399,89,3); {:411}{416:}primitive(677,79,102);primitive(678,79,1); primitive(679,82,0);primitive(680,82,1);primitive(681,83,1); primitive(682,83,3);primitive(683,83,2);primitive(684,70,0); primitive(685,70,1);primitive(686,70,2);primitive(687,70,4); primitive(688,70,5);{:416}{468:}primitive(744,108,0); primitive(745,108,1);primitive(746,108,2);primitive(747,108,3); primitive(748,108,4);primitive(749,108,6); {:468}{487:}primitive(767,105,0);primitive(768,105,1); primitive(769,105,2);primitive(770,105,3);primitive(771,105,4); primitive(772,105,5);primitive(773,105,6);primitive(774,105,7); primitive(775,105,8);primitive(776,105,9);primitive(777,105,10); primitive(778,105,11);primitive(779,105,12);primitive(780,105,13); primitive(781,105,14);primitive(782,105,15);primitive(783,105,16); {:487}{491:}primitive(785,106,2);hash[2618].rh:=785; eqtb[2618]:=eqtb[cur_val];primitive(786,106,4);primitive(787,106,3); {:491}{553:}primitive(812,87,0);hash[2624].rh:=812; eqtb[2624]:=eqtb[cur_val];{:553}{780:}primitive(910,4,256); primitive(911,5,257);hash[2615].rh:=911;eqtb[2615]:=eqtb[cur_val]; primitive(912,5,258);hash[2619].rh:=913;hash[2620].rh:=913; eqtb[2620].hh.b0:=9;eqtb[2620].hh.rh:=29989;eqtb[2620].hh.b1:=1; eqtb[2619]:=eqtb[2620];eqtb[2619].hh.b0:=115; {:780}{983:}primitive(982,81,0);primitive(983,81,1);primitive(984,81,2); primitive(985,81,3);primitive(986,81,4);primitive(987,81,5); primitive(988,81,6);primitive(989,81,7); {:983}{1052:}primitive(344,14,0);primitive(1037,14,1); {:1052}{1058:}primitive(1038,26,4);primitive(1039,26,0); primitive(1040,26,1);primitive(1041,26,2);primitive(1042,26,3); primitive(1043,27,4);primitive(1044,27,0);primitive(1045,27,1); primitive(1046,27,2);primitive(1047,27,3);primitive(337,28,5); primitive(341,29,1);primitive(343,30,99); {:1058}{1071:}primitive(1065,21,1);primitive(1066,21,0); primitive(1067,22,1);primitive(1068,22,0);primitive(412,20,0); primitive(1069,20,1);primitive(1070,20,2);primitive(977,20,3); primitive(1071,20,4);primitive(979,20,5);primitive(1072,20,106); primitive(1073,31,99);primitive(1074,31,100);primitive(1075,31,101); primitive(1076,31,102);{:1071}{1088:}primitive(1092,43,1); primitive(1093,43,0);{:1088}{1107:}primitive(1102,25,12); primitive(1103,25,11);primitive(1104,25,10);primitive(1105,23,0); primitive(1106,23,1);primitive(1107,24,0);primitive(1108,24,1); {:1107}{1114:}primitive(45,47,1);primitive(352,47,0); {:1114}{1141:}primitive(1139,48,0);primitive(1140,48,1); {:1141}{1156:}primitive(877,50,16);primitive(878,50,17); primitive(879,50,18);primitive(880,50,19);primitive(881,50,20); primitive(882,50,21);primitive(883,50,22);primitive(884,50,23); primitive(886,50,26);primitive(885,50,27);primitive(1141,51,0); primitive(890,51,1);primitive(891,51,2); {:1156}{1169:}primitive(872,53,0);primitive(873,53,2); primitive(874,53,4);primitive(875,53,6); {:1169}{1178:}primitive(1159,52,0);primitive(1160,52,1); primitive(1161,52,2);primitive(1162,52,3);primitive(1163,52,4); primitive(1164,52,5);{:1178}{1188:}primitive(887,49,30); primitive(888,49,31);hash[2617].rh:=888;eqtb[2617]:=eqtb[cur_val]; {:1188}{1208:}primitive(1184,93,1);primitive(1185,93,2); primitive(1186,93,4);primitive(1187,97,0);primitive(1188,97,1); primitive(1189,97,2);primitive(1190,97,3); {:1208}{1219:}primitive(1207,94,0);primitive(1208,94,1); {:1219}{1222:}primitive(1209,95,0);primitive(1210,95,1); primitive(1211,95,2);primitive(1212,95,3);primitive(1213,95,4); primitive(1214,95,5);primitive(1215,95,6); {:1222}{1230:}primitive(418,85,3988);primitive(422,85,5012); primitive(419,85,4244);primitive(420,85,4500);primitive(421,85,4756); primitive(480,85,5589);primitive(415,86,3940);primitive(416,86,3956); primitive(417,86,3972);{:1230}{1250:}primitive(953,99,0); primitive(965,99,1);{:1250}{1254:}primitive(1233,78,0); primitive(1234,78,1);{:1254}{1262:}primitive(275,100,0); primitive(276,100,1);primitive(277,100,2);primitive(1243,100,3); {:1262}{1272:}primitive(1244,60,1);primitive(1245,60,0); {:1272}{1277:}primitive(1246,58,0);primitive(1247,58,1); {:1277}{1286:}primitive(1253,57,4244);primitive(1254,57,4500); {:1286}{1291:}primitive(1255,19,0);primitive(1256,19,1); primitive(1257,19,2);primitive(1258,19,3); {:1291}{1344:}primitive(1299,59,0);primitive(603,59,1); write_loc:=cur_val;primitive(1300,59,2);primitive(1301,59,3); primitive(1302,59,4);primitive(1303,59,5);{:1344}; no_new_control_sequence:=true;end;{:1336}{1338:}{procedure debug_help; label 888,10;var k,l,m,n:integer;begin break_in(term_in,true); while true do begin;print_nl(1298);break(term_out);read(term_in,m); if m<0 then goto 10 else if m=0 then begin goto 888;888:m:=0; ['BREAKPOINT']end else begin read(term_in,n); case m of[1339:]1:print_word(mem[n]);2:print_int(mem[n].hh.lh); 3:print_int(mem[n].hh.rh);4:print_word(eqtb[n]); 5:print_word(font_info[n]);6:print_word(save_stack[n]);7:show_box(n); 8:begin breadth_max:=10000;depth_threshold:=pool_size-pool_ptr-10; show_node_list(n);end;9:show_token_list(n,0,1000);10:slow_print(n); 11:check_mem(n>0);12:search_mem(n);13:begin read(term_in,l); print_cmd_chr(n,l);end;14:for k:=0 to n do print(buffer[k]); 15:begin font_in_short_display:=0;short_display(n);end; 16:panicking:=not panicking;[:1339]others:print(63)end;end;end;10:end;} {:1338}{:1330}{1332:}begin history:=3;rewrite(term_out,'TTY:','/O'); if ready_already=314159 then goto 1;{14:}bad:=0; if(half_error_line<30)or(half_error_line>error_line-15)then bad:=1; if max_print_line<60 then bad:=2;if dvi_buf_size mod 8<>0 then bad:=3; if 1100>30000 then bad:=4;if 1777>2100 then bad:=5; if max_in_open>=128 then bad:=6;if 30000<267 then bad:=7; {:14}{111:}if(mem_min<>0)or(mem_max<>30000)then bad:=10; if(mem_min>0)or(mem_max<30000)then bad:=10; if(0>0)or(255<127)then bad:=11;if(0>0)or(65535<32767)then bad:=12; if(0<0)or(255>65535)then bad:=13; if(mem_min<0)or(mem_max>=65535)or(-0-mem_min>65536)then bad:=14; if(0<0)or(font_max>255)then bad:=15;if font_max>256 then bad:=16; if(save_size>65535)or(max_strings>65535)then bad:=17; if buf_size>65535 then bad:=18;if 255<255 then bad:=19; {:111}{290:}if 6976>65535 then bad:=21; {:290}{522:}if 20>file_name_size then bad:=31; {:522}{1249:}if 2*65535<30000-mem_min then bad:=41; {:1249}if bad>0 then begin write_ln(term_out, 'Ouch---my internal constants have been clobbered!','---case ',bad:1); goto 9999;end;initialize;if not get_strings_started then goto 9999; init_prim;init_str_ptr:=str_ptr;init_pool_ptr:=pool_ptr; fix_date_and_time;ready_already:=314159;1:{55:}selector:=17;tally:=0; term_offset:=0;file_offset:=0; {:55}{61:}write(term_out,'This is e-TeX, Version 3.141592653','-2.6'); if format_ident=0 then write_ln(term_out,' (no format preloaded)')else begin slow_print(format_ident);print_ln;end;break(term_out); {:61}{528:}job_name:=0;name_in_progress:=false;log_opened:=false; {:528}{533:}output_file_name:=0;{:533}; {1337:}begin{331:}begin input_ptr:=0;max_in_stack:=0;in_open:=0; open_parens:=0;max_buf_stack:=0;grp_stack[0]:=0;if_stack[0]:=0; param_ptr:=0;max_param_stack:=0;first:=buf_size;repeat buffer[first]:=0; first:=first-1;until first=0;scanner_status:=0;warning_index:=0; first:=1;cur_input.state_field:=33;cur_input.start_field:=1; cur_input.index_field:=0;line:=0;cur_input.name_field:=0; force_eof:=false;align_state:=1000000; if not init_terminal then goto 9999;cur_input.limit_field:=last; first:=last+1;end{:331}; {1379:}if(buffer[cur_input.loc_field]=42)and(format_ident=1271)then begin no_new_control_sequence:=false;{1380:}primitive(1315,70,3); primitive(1316,70,6);primitive(750,108,5); {:1380}{1388:}primitive(1318,72,3422);primitive(1319,73,5323); primitive(1320,73,5324);primitive(1321,73,5325);primitive(1322,73,5326); primitive(1323,73,5327);primitive(1324,73,5328);primitive(1325,73,5329); primitive(1326,73,5330);primitive(1327,73,5331); {:1388}{1394:}primitive(1341,70,7);primitive(1342,70,8); {:1394}{1397:}primitive(1343,70,9);primitive(1344,70,10); primitive(1345,70,11);{:1397}{1400:}primitive(1346,70,14); primitive(1347,70,15);primitive(1348,70,16);primitive(1349,70,17); {:1400}{1403:}primitive(1350,70,18);primitive(1351,70,19); primitive(1352,70,20);{:1403}{1406:}primitive(1353,19,4); {:1406}{1415:}primitive(1355,19,5);{:1415}{1417:}primitive(1356,109,1); primitive(1357,109,5);{:1417}{1420:}primitive(1358,19,6); {:1420}{1423:}primitive(1362,82,2);{:1423}{1428:}primitive(889,49,1); {:1428}{1432:}primitive(1366,73,5332);primitive(1367,33,6); primitive(1368,33,7);primitive(1369,33,10);primitive(1370,33,11); {:1432}{1482:}primitive(1379,104,2);{:1482}{1494:}primitive(1381,96,1); {:1494}{1497:}primitive(784,102,1);primitive(1382,105,17); primitive(1383,105,18);primitive(1384,105,19); {:1497}{1505:}primitive(1198,93,8);{:1505}{1513:}primitive(1390,70,25); primitive(1391,70,26);primitive(1392,70,27);primitive(1393,70,28); {:1513}{1536:}primitive(1397,70,12);primitive(1398,70,13); primitive(1399,70,21);primitive(1400,70,22); {:1536}{1540:}primitive(1401,70,23);primitive(1402,70,24); {:1540}{1544:}primitive(1403,18,5);primitive(1404,110,5); primitive(1405,110,6);primitive(1406,110,7);primitive(1407,110,8); primitive(1408,110,9);{:1544}{1596:}primitive(1412,24,2); primitive(1413,24,3);{:1596}{1599:}primitive(1414,84,3679); primitive(1415,84,3680);primitive(1416,84,3681);primitive(1417,84,3682); {:1599}cur_input.loc_field:=cur_input.loc_field+1;eTeX_mode:=1; {1548:}max_reg_num:=32767;max_reg_help_line:=1409;{:1548}end; if not no_new_control_sequence then no_new_control_sequence:=true else {:1379}if(format_ident=0)or(buffer[cur_input.loc_field]=38)then begin if format_ident<>0 then initialize;if not open_fmt_file then goto 9999; if not load_fmt_file then begin w_close(fmt_file);goto 9999;end; w_close(fmt_file); while(cur_input.loc_field255)then cur_input.limit_field:= cur_input.limit_field-1 else buffer[cur_input.limit_field]:=eqtb[5316]. int;fix_date_and_time;{765:}magic_offset:=str_start[904]-9*16{:765}; {75:}if interaction=0 then selector:=16 else selector:=17{:75}; if(cur_input.loc_field0)then start_input;end{:1337};history:=0; main_control;final_cleanup;9998:close_files_and_terminate; 9999:ready_already:=0;end.{:1332}