@x [1] m.2 l.250 - e-TeX basic @d eTeX_version_string=='2.1' {current \eTeX\ version} @d eTeX_version=2 { \.{\\eTeXversion} } @d eTeX_revision==".1" { \.{\\eTeXrevision} } @# @d eTeX_banner=='This is e-TeX, Version ',eTeX_version_string {printed when \eTeX\ starts} @# @d TEX==ETEX {change program name into |ETEX|} @y @d eTeX_version_string=='2.1' {current \eTeX\ version} @d eTeX_version=2 { \.{\\eTeXversion} } @d eTeX_revision==".1" { \.{\\eTeXrevision} } @d eeTeX_version_string=='-e2' {current \eTeX\ version} @d eeTeX_version=2 { \.{\\eeTeXversion} } @# @d eTeX_banner=='This is eeTeX, Version ',eTeX_version_string,eeTeX_version_string {printed when e\eTeX\ starts} @# @d TEX==EETEX {change program name into |EETEX|} @z @x @d hi_mem_stat_min==mem_top-14 {smallest statically allocated word in the one-word |mem|} @d hi_mem_stat_usage=15 {the number of one-word nodes always present} @y @d hi_mem_stat_min==mem_top-17 {smallest statically allocated word in the one-word |mem|} {this change needed for \.{\\listsep}} @d hi_mem_stat_usage=18 {the number of one-word nodes always present} @z @x [15] m.210 l.4311 @d call=max_command+11 {non-long, non-outer control sequence} @d long_call=max_command+12 {long, non-outer control sequence} @d outer_call=max_command+13 {non-long, outer control sequence} @d long_outer_call=max_command+14 {long, outer control sequence} @d end_template=max_command+15 {end of an alignment template} @d dont_expand=max_command+16 {the following token was marked by \.{\\noexpand}} @d glue_ref=max_command+17 {the equivalent points to a glue specification} @d shape_ref=max_command+18 {the equivalent points to a parshape specification} @d box_ref=max_command+19 {the equivalent points to a box node, or is |null|} @d data=max_command+20 {the equivalent is simply a halfword number} @y @d list_call=max_command+11 {the equivalent is a list} @d dict_call=max_command+12 {the equivalent is a dictionary} @d call=max_command+13 {non-long, non-outer control sequence} @d long_call=max_command+14 {long, non-outer control sequence} @d outer_call=max_command+15 {non-long, outer control sequence} @d long_outer_call=max_command+16 {long, outer control sequence} @d end_template=max_command+17 {end of an alignment template} @d dont_expand=max_command+18 {the following token was marked by \.{\\noexpand}} @d glue_ref=max_command+19 {the equivalent points to a glue specification} @d shape_ref=max_command+20 {the equivalent points to a parshape specification} @d box_ref=max_command+21 {the equivalent points to a box node, or is |null|} @d data=max_command+22 {the equivalent is simply a halfword number} @z @x l.4655 @d frozen_null_font=frozen_control_sequence+10 {permanent `\.{\\nullfont}'} @y @d frozen_null_font=frozen_control_sequence+11 {permanent `\.{\\nullfont}'} @z @x [17] m.223 l.4673 @= begin sprint_cs(n); print_char("="); print_cmd_chr(eq_type(n),equiv(n)); if eq_type(n)>=call then begin print_char(":"); show_token_list(link(equiv(n)),null,32); end; end @y @= begin sprint_cs(n); print_char("="); print_cmd_chr(eq_type(n),equiv(n)); if eq_type(n)>=list_call then if eq_type(n)=list_call then begin print_char(":"); print_char("("); print_int(info(equiv(n))); print_char(")"); print_char(" "); save_cs:=cur_cs; cur_cs:=n; show_the_list; cur_cs:=save_cs; end else begin print_char(":"); show_token_list(link(equiv(n)),null,32); end; end @z @x [17] m.230 l.4859 @d err_help_loc=token_base+12 {points to token list for \.{\\errhelp}} @d toks_base=token_base+13 {table of 256 token list registers} @d box_base=toks_base+256 {table of 256 box registers} @d cur_font_loc=box_base+256 {internal font number outside math mode} @d math_font_base=cur_font_loc+1 {table of 48 math font numbers} @d cat_code_base=math_font_base+48 {table of 256 command codes (the ``catcodes'')} @d lc_code_base=cat_code_base+256 {table of 256 lowercase mappings} @d uc_code_base=lc_code_base+256 {table of 256 uppercase mappings} @d sf_code_base=uc_code_base+256 {table of 256 spacefactor mappings} @d ef_code_base=sf_code_base+256 {table of 256 font-expand factor mappings} @d lp_code_base=ef_code_base+256 {table of 256 left-protruding factor mappings} @d rp_code_base=lp_code_base+256 {table of 256 right-protruding factor mappings} @d math_code_base=rp_code_base+256 {table of 256 math mode mappings} @d int_base=math_code_base+256 {beginning of region 5} @# @d par_shape_ptr==equiv(par_shape_loc) @d output_routine==equiv(output_routine_loc) @d every_par==equiv(every_par_loc) @d every_math==equiv(every_math_loc) @d every_display==equiv(every_display_loc) @d every_hbox==equiv(every_hbox_loc) @d every_vbox==equiv(every_vbox_loc) @d every_job==equiv(every_job_loc) @d every_cr==equiv(every_cr_loc) @d pdf_pages_attr==equiv(pdf_pages_attr_loc) @d pdf_page_attr==equiv(pdf_page_attr_loc) @d pdf_page_resources==equiv(pdf_page_resources_loc) @d err_help==equiv(err_help_loc) @d toks(#)==equiv(toks_base+#) @d box(#)==equiv(box_base+#) @d cur_font==equiv(cur_font_loc) @d fam_fnt(#)==equiv(math_font_base+#) @d cat_code(#)==equiv(cat_code_base+#) @d lc_code(#)==equiv(lc_code_base+#) @d uc_code(#)==equiv(uc_code_base+#) @d sf_code(#)==equiv(sf_code_base+#) @d ef_code(#)==equiv(ef_code_base+#) @d lp_code(#)==equiv(lp_code_base+#) @d rp_code(#)==equiv(rp_code_base+#) @d math_code(#)==equiv(math_code_base+#) {Note: |math_code(c)| is the true math code plus |min_halfword|} @y @d list_sep_loc=token_base+12 {points to token list for \.{\\listsep}} @d err_help_loc=token_base+13 {points to token list for \.{\\errhelp}} @d toks_base=token_base+14 {table of 256 token list registers} @d box_base=toks_base+256 {table of 256 box registers} @d cur_font_loc=box_base+256 {internal font number outside math mode} @d math_font_base=cur_font_loc+1 {table of 48 math font numbers} @d cat_code_base=math_font_base+48 {table of 256 command codes (the ``catcodes'')} @d lc_code_base=cat_code_base+256 {table of 256 lowercase mappings} @d uc_code_base=lc_code_base+256 {table of 256 uppercase mappings} @d sf_code_base=uc_code_base+256 {table of 256 spacefactor mappings} @d ef_code_base=sf_code_base+256 {table of 256 font-expand factor mappings} @d lp_code_base=ef_code_base+256 {table of 256 left-protruding factor mappings} @d rp_code_base=lp_code_base+256 {table of 256 right-protruding factor mappings} @d math_code_base=rp_code_base+256 {table of 256 math mode mappings} @d int_base=math_code_base+256 {beginning of region 5} @# @d par_shape_ptr==equiv(par_shape_loc) @d output_routine==equiv(output_routine_loc) @d every_par==equiv(every_par_loc) @d every_math==equiv(every_math_loc) @d every_display==equiv(every_display_loc) @d every_hbox==equiv(every_hbox_loc) @d every_vbox==equiv(every_vbox_loc) @d every_job==equiv(every_job_loc) @d every_cr==equiv(every_cr_loc) @d pdf_pages_attr==equiv(pdf_pages_attr_loc) @d pdf_page_attr==equiv(pdf_page_attr_loc) @d pdf_page_resources==equiv(pdf_page_resources_loc) @d err_help==equiv(err_help_loc) @d list_sep==equiv(list_sep_loc) @d toks(#)==equiv(toks_base+#) @d box(#)==equiv(box_base+#) @d cur_font==equiv(cur_font_loc) @d fam_fnt(#)==equiv(math_font_base+#) @d cat_code(#)==equiv(cat_code_base+#) @d lc_code(#)==equiv(lc_code_base+#) @d uc_code(#)==equiv(uc_code_base+#) @d sf_code(#)==equiv(sf_code_base+#) @d ef_code(#)==equiv(ef_code_base+#) @d lp_code(#)==equiv(lp_code_base+#) @d rp_code(#)==equiv(rp_code_base+#) @d math_code(#)==equiv(math_code_base+#) {Note: |math_code(c)| is the true math code plus |min_halfword|} @z @x [17] m.230 l.4910 primitive("errhelp",assign_toks,err_help_loc); @!@:err_help_}{\.{\\errhelp} primitive@> @y primitive("listsep",assign_toks,list_sep_loc); @!@:list_sep_}{\.{\\listsep} primitive@> primitive("errhelp",assign_toks,err_help_loc); @!@:err_help_}{\.{\\errhelp} primitive@> @z @x [17] m.231 l.4926 every_cr_loc: print_esc("everycr"); @/@@/ @y every_cr_loc: print_esc("everycr"); list_sep_loc: print_esc("listsep"); @/@@/ @z @x [17] m.236 l.5101 @d int_pars=55 {total number of integer parameters} @d tracing_assigns_code=int_pars {show assignments} @d tracing_groups_code=int_pars+1 {show save/restore groups} @d tracing_ifs_code=int_pars+2 {show conditionals} @d tracing_scan_tokens_code=int_pars+3 {show pseudo file open and close} @d tracing_nesting_code=int_pars+4 {show incomplete groups and ifs within files} @d pre_display_direction_code=int_pars+5 {text direction preceding a display} @d last_line_fit_code=int_pars+6 {adjustment for last line of paragraph} @d saving_vdiscards_code=int_pars+7 {save items discarded from vlists} @d saving_hyph_codes_code=int_pars+8 {save hyphenation codes for languages} @d eTeX_state_code=int_pars+9 {\eTeX\ state variables} @y @d sgml_mode_code=65 @d int_pars=55 {total number of integer parameters} @d tracing_assigns_code=int_pars {show assignments} @d tracing_groups_code=int_pars+1 {show save/restore groups} @d tracing_ifs_code=int_pars+2 {show conditionals} @d tracing_scan_tokens_code=int_pars+3 {show pseudo file open and close} @d tracing_nesting_code=int_pars+4 {show incomplete groups and ifs within files} @d tracing_lists_code=int_pars+5 {show list operations} @d tracing_lists==int_par(tracing_lists_code) @d pre_display_direction_code=int_pars+6 {text direction preceding a display} @d last_line_fit_code=int_pars+7 {adjustment for last line of paragraph} @d saving_vdiscards_code=int_pars+8 {save items discarded from vlists} @d saving_hyph_codes_code=int_pars+9 {save hyphenation codes for languages} @d eTeX_state_code=int_pars+10 {\eTeX\ state variables} @z @x [17] m.236 l.5175 @d error_context_lines==int_par(error_context_lines_code) @y @d error_context_lines==int_par(error_context_lines_code) @d sgml_mode==int_par(sgml_mode_code) @z @x [17] m.237 l.5248 error_context_lines_code:print_esc("errorcontextlines"); @y error_context_lines_code:print_esc("errorcontextlines"); sgml_mode_code:print_esc("sgmlmode"); @z @x l.5583 @ Here is a procedure that displays the contents of |eqtb[n]| symbolically. @p@t\4@>@@;@/ @!stat procedure show_eqtb(@!n:pointer); begin if n else if n else if n else if n else if n<=eqtb_size then @ else print_char("?"); {this can't happen either} end; tats @y @ Here is a procedure that displays the contents of |eqtb[n]| symbolically. TH: Needed a variable top save |cur_cs| in for showing a list (Region 2). @p@t\4@>@@;@/ @!stat procedure show_eqtb(@!n:pointer); var @!save_cs:halfword; begin if n else if n else if n else if n else if n<=eqtb_size then @ else print_char("?"); {this can't happen either} end; tats @z @x l.6142 @ To save a value of |eqtb[p]| that was established at level |l|, we can use the following subroutine. @p procedure eq_save(@!p:pointer;@!l:quarterword); {saves |eqtb[p]|} begin check_full_save_stack; if l=level_zero then save_type(save_ptr):=restore_zero else begin save_stack[save_ptr]:=eqtb[p]; incr(save_ptr); save_type(save_ptr):=restore_old_value; end; save_level(save_ptr):=l; save_index(save_ptr):=p; incr(save_ptr); end; @y @ To save a value of |eqtb[s]| that was established at level |l|, we can use the following subroutine. @p procedure eq_save(@!s:pointer;@!l:quarterword); {saves |eqtb[s]|} var a,b,p,q:pointer; {pointers for list copying} begin check_full_save_stack; if l=level_zero then save_type(save_ptr):=restore_zero else begin save_stack[save_ptr]:=eqtb[s]; incr(save_ptr); save_type(save_ptr):=restore_old_value; end; save_level(save_ptr):=l; save_index(save_ptr):=s; incr(save_ptr); end; @z @x [20] m.296 l.6523 @ The |print_meaning| subroutine displays |cur_cmd| and |cur_chr| in symbolic form, including the expansion of a macro or mark. @p procedure print_meaning; begin print_cmd_chr(cur_cmd,cur_chr); if cur_cmd>=call then begin print_char(":"); print_ln; token_show(cur_chr); end else if (cur_cmd=top_bot_mark)and(cur_chr=list_call then begin print_char(":"); print_ln; if cur_cmd=list_call then begin expand_list; end else token_show(cur_chr); end else if (cur_cmd=top_bot_mark)and(cur_chr template} @d v_template=2 {|token_type| code for \ template} @d backed_up=3 {|token_type| code for text to be reread} @d inserted=4 {|token_type| code for inserted texts} @d macro=5 {|token_type| code for defined control sequences} @d output_text=6 {|token_type| code for output routines} @d every_par_text=7 {|token_type| code for \.{\\everypar}} @d every_math_text=8 {|token_type| code for \.{\\everymath}} @d every_display_text=9 {|token_type| code for \.{\\everydisplay}} @d every_hbox_text=10 {|token_type| code for \.{\\everyhbox}} @d every_vbox_text=11 {|token_type| code for \.{\\everyvbox}} @d every_job_text=12 {|token_type| code for \.{\\everyjob}} @d every_cr_text=13 {|token_type| code for \.{\\everycr}} @d every_eof_text=14 {|token_type| code for \.{\\everyeof}} @d mark_text=15 {|token_type| code for \.{\\topmark}, etc.} @d write_text=16 {|token_type| code for \.{\\write}} @d pdf_pages_attr_text = 17 {|token_type| code for \.{\\pdfpagesattr}} @d pdf_page_attr_text = 18 {|token_type| code for \.{\\pdfpageattr}} @d pdf_page_resources_text = 19 {|token_type| code for \.{\\pdfpageresources}} @y @d token_list=0 {|state| code when scanning a token list} @d token_type==index {type of current token list} @d param_start==limit {base of macro parameters in |param_stack|} @d parameter=0 {|token_type| code for parameter} @d u_template=1 {|token_type| code for \ template} @d v_template=2 {|token_type| code for \ template} @d backed_up=3 {|token_type| code for text to be reread} @d inserted=4 {|token_type| code for inserted texts} @d list_insert=5 {|token_type| code for list expansions} @d list_scan=6 {|token_type| code for scanned lists} @d macro=7 {|token_type| code for defined control sequences} @d output_text=8 {|token_type| code for output routines} @d every_par_text=9 {|token_type| code for \.{\\everypar}} @d every_math_text=10 {|token_type| code for \.{\\everymath}} @d every_display_text=11 {|token_type| code for \.{\\everydisplay}} @d every_hbox_text=12 {|token_type| code for \.{\\everyhbox}} @d every_vbox_text=13 {|token_type| code for \.{\\everyvbox}} @d every_job_text=14 {|token_type| code for \.{\\everyjob}} @d every_cr_text=15 {|token_type| code for \.{\\everycr}} @d every_eof_text=16 {|token_type| code for \.{\\everyeof}} @d mark_text=17 {|token_type| code for \.{\\topmark}, etc.} @d write_text=18 {|token_type| code for \.{\\write}} @d pdf_pages_attr_text = 19 {|token_type| code for \.{\\pdfpagesattr}} @d pdf_page_attr_text = 20 {|token_type| code for \.{\\pdfpageattr}} @d pdf_page_resources_text = 21 {|token_type| code for \.{\\pdfpageresources}} @z @x l.7054 @ @= case token_type of parameter: print_nl(" "); u_template,v_template: print_nl("