From 0fbbdbbcc63e580418e4427e533a33900c2bbff4 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Mon, 20 Jul 2020 15:27:35 +0000 Subject: Update changefiles for TeX and friends. * Place Web2c changes together. * Avoid overful hboxes in tables-of-contents. * WEBify code in comment. * Adapt all dependent chamgefiles. git-svn-id: svn://tug.org/texlive/trunk@55885 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ChangeLog | 5 + Build/source/texk/web2c/pdftexdir/ChangeLog | 4 + Build/source/texk/web2c/pdftexdir/pdftex.ch | 4 - Build/source/texk/web2c/tex.ch | 159 +++++++++++---------- Build/source/texk/web2c/xetexdir/ChangeLog | 5 + .../texk/web2c/xetexdir/char-warning-xetex.ch | 2 +- Build/source/texk/web2c/xetexdir/xetex.ch | 24 ++-- 7 files changed, 111 insertions(+), 92 deletions(-) (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index c1e7c2bc92c..053dd931993 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,8 @@ +2020-07-20 Andreas Scherer + + * tex.ch: Place Web2c changes together; + avoid overful hboxes in the amended table-of-contents. + 2020-07-19 Karl Berry * doc/web2c.texi (TeX extensions): add [e][u]pTeX. Other small diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 400996e8206..d0172e59afc 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,7 @@ +2020-07-20 Andreas Scherer + + * pdftex.ch: Avoid overful hboxes in table-of-contents. + 2020-07-19 Karl Berry * char-warning-pdftex.ch: new file to implement new feature; diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.ch b/Build/source/texk/web2c/pdftexdir/pdftex.ch index 2d6a73ba5de..d7e036c2d79 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftex.ch +++ b/Build/source/texk/web2c/pdftexdir/pdftex.ch @@ -16,12 +16,8 @@ % this program. If not, see . % @x [0.0] l.83 - WEAVE: we want the whole file - \def\?##1]{\hbox{Changes to \hbox to 1em{\hfil##1}.\ }} - } \let\maybe=\iffalse @y 83 - \def\?##1]{\hbox{Changes to \hbox to 1em{\hfil##1}.\ }} - } \let\maybe=\iftrue @z diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch index 9d8b48b98dc..5b549168236 100644 --- a/Build/source/texk/web2c/tex.ch +++ b/Build/source/texk/web2c/tex.ch @@ -54,7 +54,7 @@ \def\?##1]{\hbox to 1in{\hfil##1.\ }} } @y 83 - \def\?##1]{\hbox{Changes to \hbox to 1em{\hfil##1}.\ }} + \def\?##1]{\hbox{Changes to ##1.\ }} } \let\maybe=\iffalse @z @@ -4442,6 +4442,16 @@ var j:small_number; {write stream number} @x [54.1376] l.24903 - Add editor-switch variables to globals. @* \[54] System-dependent changes. +This section should be replaced, if necessary, by any special +modifications of the program +that are necessary to make \TeX\ work at a particular installation. +It is usually best to design your change file so that all changes to +previous sections preserve the section numbering; then everybody's version +will be consistent with the published program. More extensive changes, +which introduce new sections, can be inserted here; then only the index +itself will get a new section number. +@^system dependencies@> + @y @* \[54/web2c] System-dependent changes for Web2c. Here are extra variables for Web2c. (This numbering of the @@ -4617,8 +4627,77 @@ slow_make_string:=t; exit:end; -@* \[54/ML\TeX] System-dependent changes for ML\TeX. +@* \[54/web2c] More changes for Web2c. +% Related to [25.366] expansion depth check +Sometimes, recursive calls to the |expand| routine may +cause exhaustion of the run-time calling stack, resulting in +forced execution stops by the operating system. To diminish the chance +of this happening, a counter is used to keep track of the recursion +depth, in conjunction with a constant called |expand_depth|. + +This does not catch all possible infinite recursion loops, just the ones +that exhaust the application calling stack. The actual maximum value of +|expand_depth| is outside of our control, but the initial setting of +|10000| should be enough to prevent problems. +@^system dependencies@> + +@= +expand_depth_count:integer; + +@ @= +expand_depth_count:=0; + +@ % Related to [29.526] expansion depth check +When |scan_file_name| starts it looks for a |left_brace| +(skipping \.{\\relax}es, as other \.{\\toks}-like primitives). +If a |left_brace| is found, then the procedure scans a file +name contained in a balanced token list, expanding tokens as +it goes. When the scanner finds the balanced token list, it +is converted into a string and fed character-by-character to +|more_name| to do its job the same as in the ``normal'' file +name scanning. + +@p procedure scan_file_name_braced; +var + @!save_scanner_status: small_number; {|scanner_status| upon entry} + @!save_def_ref: pointer; {|def_ref| upon entry, important if inside `\.{\\message}} + @!save_cur_cs: pointer; + @!s: str_number; {temp string} + @!p: pointer; {temp pointer} + @!i: integer; {loop tally} + @!save_stop_at_space: boolean; {this should be in tex.ch} + @!dummy: boolean; + {Initializing} +begin save_scanner_status := scanner_status; {|scan_toks| sets |scanner_status| to |absorbing|} + save_def_ref := def_ref; {|scan_toks| uses |def_ref| to point to the token list just read} + save_cur_cs := cur_cs; {we set |cur_cs| back a few tokens to use in runaway errors} + {Scanning a token list} + cur_cs := warning_index; {for possible runaway error} + {mimick |call_func| from pdfTeX} + if scan_toks(false, true) <> 0 then do_nothing; {actually do the scanning} + {|s := tokens_to_string(def_ref);|} + old_setting := selector; selector:=new_string; + show_token_list(link(def_ref),null,pool_size-pool_ptr); + selector := old_setting; + s := make_string; + {turns the token list read in a string to input} + {Restoring some variables} + delete_token_ref(def_ref); {remove the token list from memory} + def_ref := save_def_ref; {and restore |def_ref|} + cur_cs := save_cur_cs; {restore |cur_cs|} + scanner_status := save_scanner_status; {restore |scanner_status|} + {Passing the read string to the input machinery} + save_stop_at_space := stop_at_space; {save |stop_at_space|} + stop_at_space := false; {set |stop_at_space| to false to allow spaces in file names} + begin_name; + for i:=str_start[s] to str_start[s+1]-1 do + dummy := more_name(str_pool[i]); {add each read character to the current file name} + stop_at_space := save_stop_at_space; {restore |stop_at_space|} +end; + +@* \[54/ML\TeX] System-dependent changes for ML\TeX. +@^system dependencies@> The boolean variable |mltex_p| is set by web2c according to the given command line option (or an entry in the configuration file) before any \TeX{} function is called. @@ -4885,16 +4964,15 @@ if x<>@"4D4C5458 then goto bad_fmt; undump_int(x); {undump |mltex_p| flag into |mltex_enabled_p|} if x=1 then mltex_enabled_p:=true else if x<>0 then goto bad_fmt; - - -@* \[54] System-dependent changes. @z @x [54.1379] l.24916 - extra routines @* \[55] Index. @y -@ @= +@* \[54] System-dependent changes. + +@= procedure insert_src_special; var toklist, p, q : pointer; @@ -4940,74 +5018,5 @@ begin end; -@* \[54/web2c] More changes for Web2c. -% Related to [25.366] expansion depth check -Sometimes, recursive calls to the |expand| routine may -cause exhaustion of the run-time calling stack, resulting in -forced execution stops by the operating system. To diminish the chance -of this happening, a counter is used to keep track of the recursion -depth, in conjunction with a constant called |expand_depth|. - -This does not catch all possible infinite recursion loops, just the ones -that exhaust the application calling stack. The actual maximum value of -|expand_depth| is outside of our control, but the initial setting of -|10000| should be enough to prevent problems. -@^system dependencies@> - -@= -expand_depth_count:integer; - -@ @= -expand_depth_count:=0; - -@ % Related to [29.526] expansion depth check -When |scan_file_name| starts it looks for a |left_brace| -(skipping \.{\\relax}es, as other \.{\\toks}-like primitives). -If a |left_brace| is found, then the procedure scans a file -name contained in a balanced token list, expanding tokens as -it goes. When the scanner finds the balanced token list, it -is converted into a string and fed character-by-character to -|more_name| to do its job the same as in the ``normal'' file -name scanning. - -@p procedure scan_file_name_braced; -var - @!save_scanner_status: small_number; {|scanner_status| upon entry} - @!save_def_ref: pointer; {|def_ref| upon entry, important if inside `\.{\\message}} - @!save_cur_cs: pointer; - @!s: str_number; {temp string} - @!p: pointer; {temp pointer} - @!i: integer; {loop tally} - @!save_stop_at_space: boolean; {this should be in tex.ch} - @!dummy: boolean; - {Initializing} -begin save_scanner_status := scanner_status; {|scan_toks| sets |scanner_status| to |absorbing|} - save_def_ref := def_ref; {|scan_toks| uses |def_ref| to point to the token list just read} - save_cur_cs := cur_cs; {we set |cur_cs| back a few tokens to use in runaway errors} - {Scanning a token list} - cur_cs := warning_index; {for possible runaway error} - {mimick |call_func| from pdfTeX} - if scan_toks(false, true) <> 0 then do_nothing; {actually do the scanning} - {|s := tokens_to_string(def_ref);|} - old_setting := selector; selector:=new_string; - show_token_list(link(def_ref),null,pool_size-pool_ptr); - selector := old_setting; - s := make_string; - {turns the token list read in a string to input} - {Restoring some variables} - delete_token_ref(def_ref); {remove the token list from memory} - def_ref := save_def_ref; {and restore |def_ref|} - cur_cs := save_cur_cs; {restore |cur_cs|} - scanner_status := save_scanner_status; {restore |scanner_status|} - {Passing the read string to the input machinery} - save_stop_at_space := stop_at_space; {save |stop_at_space|} - stop_at_space := false; {set |stop_at_space| to false to allow spaces in file names} - begin_name; - for i:=str_start[s] to str_start[s+1]-1 do - dummy := more_name(str_pool[i]); {add each read character to the current file name} - stop_at_space := save_stop_at_space; {restore |stop_at_space|} -end; - - @* \[55] Index. @z diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index 279ddbbbffe..4400966472e 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,8 @@ +2020-07-20 Andreas Scherer + + * char-warning-xetex.ch: WEBify variable in comment. + * xetex.ch: Place Web2c changes together. + 2020-07-19 Karl Berry * char-warning-xetex.ch: new file; see ../pdftexdir/ChangeLog. diff --git a/Build/source/texk/web2c/xetexdir/char-warning-xetex.ch b/Build/source/texk/web2c/xetexdir/char-warning-xetex.ch index 246c0489ce5..55f0d8ff1bf 100644 --- a/Build/source/texk/web2c/xetexdir/char-warning-xetex.ch +++ b/Build/source/texk/web2c/xetexdir/char-warning-xetex.ch @@ -34,7 +34,7 @@ begin if tracing_lost_chars>0 then end; end; @y -procedure print_ucs_code(@!n: UnicodeScalar); { cf. print_hex } +procedure print_ucs_code(@!n: UnicodeScalar); { cf.~|print_hex| } var k: 0..22; {index to current digit; we assume that $0\L n<16^{22}$} begin k := 0; diff --git a/Build/source/texk/web2c/xetexdir/xetex.ch b/Build/source/texk/web2c/xetexdir/xetex.ch index c9c57f3c395..c7fe814adbf 100644 --- a/Build/source/texk/web2c/xetexdir/xetex.ch +++ b/Build/source/texk/web2c/xetexdir/xetex.ch @@ -891,6 +891,18 @@ end; while s>65535 do {first 64K strings don't really exist in the pool!} @z +@x [54/web2c.1407] - scan a bgroup/egroup-delimited file name + stop_at_space := false; {set |stop_at_space| to false to allow spaces in file names} + begin_name; + for i:=str_start[s] to str_start[s+1]-1 do + dummy := more_name(str_pool[i]); {add each read character to the current file name} +@y + stop_at_space := false; {set |stop_at_space| to false to allow spaces in file names} + begin_name; + for i:=str_start_macro(s) to str_start_macro(s+1)-1 do + dummy := more_name(str_pool[i]); {add each read character to the current file name} +@z + @x @!mltex_enabled_p:boolean; {enable character substitution} @y @@ -940,15 +952,3 @@ exit:end; @# @@; @z - -@x [54/web2c.1407] - scan a bgroup/egroup-delimited file name - stop_at_space := false; {set |stop_at_space| to false to allow spaces in file names} - begin_name; - for i:=str_start[s] to str_start[s+1]-1 do - dummy := more_name(str_pool[i]); {add each read character to the current file name} -@y - stop_at_space := false; {set |stop_at_space| to false to allow spaces in file names} - begin_name; - for i:=str_start_macro(s) to str_start_macro(s+1)-1 do - dummy := more_name(str_pool[i]); {add each read character to the current file name} -@z -- cgit v1.2.3