diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2024-06-05 06:51:57 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2024-06-05 06:51:57 +0000 |
commit | efe255ce57bcddf8fc8373373ca36c79825307e8 (patch) | |
tree | 0199c88fb871858655c0c3d20949d8a7f7f12ef4 | |
parent | dc7e64261a0dc8f27947faf8c8c422588f47ba7c (diff) |
[WEB] Correctly count section start markers.
Both WEAVE.WEB and TANGLE.WEB have '@*' and '@ ' markers in their
exposition. Only those at the beginning of a 'line' count.
Make the 'fix-changefile-lines.py' self-executable (on Linux).
git-svn-id: svn://tug.org/texlive/trunk@71437 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/tangle.ch | 112 | ||||
-rwxr-xr-x[-rw-r--r--] | Build/source/texk/web2c/tests/fix-changefile-lines.py | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/weave.ch | 100 |
4 files changed, 118 insertions, 109 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 8607058f7f9..c79e05eb61a 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,9 @@ +2024-06-05 Andreas Scherer <https://ascherer.github.io> + + * tests/fix-changefile-lines.py, + * tangle.ch, + * weave.ch: Correctly count section start markers. + 2024-06-03 David Fuchs <drfuchs@yahoo.com> * tex.ch (check_outer_validity): don't check unless OK_to_interrupt, diff --git a/Build/source/texk/web2c/tangle.ch b/Build/source/texk/web2c/tangle.ch index c318ab1768c..6aff69fee60 100644 --- a/Build/source/texk/web2c/tangle.ch +++ b/Build/source/texk/web2c/tangle.ch @@ -36,7 +36,7 @@ % 11/30/89 (KB) Version 4. % (more recent changes in the ChangeLog) -@x [0] Print only changes. +@x [0.0] l.43 - Print only changes. \pageno=\contentspagenumber \advance\pageno by 1 @y \pageno=\contentspagenumber \advance\pageno by 1 @@ -44,26 +44,26 @@ \def\title{TANGLE changes for C} @z -@x [1] Define my_name +@x [1.1] l.70 - Define my_name @d banner=='This is TANGLE, Version 4.6' @y @d my_name=='tangle' @d banner=='This is TANGLE, Version 4.6' @z -@x [2] Eliminate the |end_of_TANGLE| label. +@x [1.2] l.79 - Eliminate the |end_of_TANGLE| label. calls the `|jump_out|' procedure, which goes to the label |end_of_TANGLE|. @d end_of_TANGLE = 9999 {go here to wrap it up} @y calls the `|jump_out|' procedure. @z -@x +@x [1.2] l.85 label end_of_TANGLE; {go here to finish} @y @z -@x [2] Define and call parse_arguments. +@x [1.2] l.90 - Define and call parse_arguments. procedure initialize; var @<Local variables for initialization@>@/ begin @<Set initial values@>@/ @@ -77,7 +77,7 @@ procedure initialize; @<Set initial values@>@/ @z -@x [8] Constants: increase id lengths, for TeX--XeT and tex2pdf. +@x [1.8] l.183 - Constants: increase id lengths, for TeX--XeT and tex2pdf. @!buf_size=100; {maximum length of input line} @!max_bytes=45000; {|1/ww| times the number of bytes in identifiers, strings, and module names; must be less than 65536} @@ -99,7 +99,7 @@ procedure initialize; @!hash_size=8501; {should be prime} @z -@x +@x [1.8] l.195 @!stack_size=50; {number of simultaneous levels of macro expansion} @!max_id_length=12; {long identifiers are chopped to this length, which must not exceed |line_length|} @@ -116,13 +116,13 @@ procedure initialize; % default type `char' may produce signed integers, which are bad array % indices in C. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -@x +@x [2.12] l.302 @d text_char == char {the data type of characters in text files} @y @d text_char == ASCII_code {the data type of characters in text files} @z -@x [17] enable maximum character set +@x [2.17] l.483 - enable maximum character set for i:=1 to @'37 do xchr[i]:=' '; for i:=@'200 to @'377 do xchr[i]:=' '; @y @@ -130,20 +130,20 @@ for i:=1 to @'37 do xchr[i]:=chr(i); for i:=@'200 to @'377 do xchr[i]:=chr(i); @z -@x [20] terminal output: use standard i/o +@x [3.20] l.509 - terminal output: use standard i/o @d print(#)==write(term_out,#) {`|print|' means write on the terminal} @y @d term_out==stdout @d print(#)==write(term_out,#) {`|print|' means write on the terminal} @z -@x +@x [3.20] l.516 @<Globals...@>= @!term_out:text_file; {the terminal as an output file} @y @z -@x [21] init terminal +@x [3.21] l.519 - init terminal @ Different systems have different ways of specifying that the output on a certain file will appear on the user's terminal. Here is one way to do this on the \PASCAL\ system that was used in \.{TANGLE}'s initial development: @@ -160,32 +160,32 @@ certain file will appear on the user's terminal. {Nothing need be done for C.} @z -@x [22] flush terminal buffer +@x [3.22] l.532 - flush terminal buffer @d update_terminal == break(term_out) {empty the terminal output buffer} @y @d update_terminal == fflush(term_out) {empty the terminal output buffer} @z -@x [24] open input files +@x [3.24] l.548 - open input files begin reset(web_file); reset(change_file); @y begin web_file := kpse_open_file(web_name, kpse_web_format); if chg_name then change_file := kpse_open_file(chg_name, kpse_web_format); @z -@x [26] Open output files (except for the pool file). +@x [3.26] l.558 - Open output files (except for the pool file). @ The following code opens |Pascal_file| and |pool|. @y @ The following code opens |Pascal_file|. Opening |pool| will be deferred until section~\&{64}. @z -@x +@x [3.26] l.565 rewrite(Pascal_file); rewrite(pool); @y rewrite (Pascal_file, pascal_name); @z -@x [28] Fix f^. +@x [3.28] l.591 - Fix f^. begin buffer[limit]:=xord[f^]; get(f); incr(limit); if buffer[limit-1]<>" " then final_limit:=limit; @@ -199,13 +199,13 @@ rewrite (Pascal_file, pascal_name); begin while not eoln(f) do vgetc(f); @z -@x [31] Fix typo as in weave.web. +@x [4.31] l.640 - Fix typo as in weave.web. procedure error; {prints '\..' and location of error message} @y procedure error; {prints `\..' and location of error message} @z -@x [34] Fix `jump_out'. +@x [4.34] l.681 - Fix `jump_out'. and jumps out of the program. This is the only non-local |goto| statement in \.{TANGLE}. It is used when no recovery from a particular error has been provided. @@ -232,7 +232,7 @@ and jumps out of the program. end @z -@x [38] Provide for a larger `byte_mem' and `tok_mem'. Extra capacity: +@x [5.38] l.742 - Provide for a larger `byte_mem' and `tok_mem'. Extra capacity: @d ww=2 {we multiply the byte capacity by approximately this amount} @d zz=3 {we multiply the token capacity by approximately this amount} @y @@ -240,19 +240,19 @@ and jumps out of the program. @d zz=5 {we multiply the token capacity by approximately this amount} @z -@x [38] Provide for larger than 16bit numeric macros. +@x [5.38] l.753 - Provide for larger than 16bit numeric macros. @!equiv: array [0..max_names] of sixteen_bits; {info corresponding to names} @y @!equiv: array [0..max_names] of integer; {info corresponding to names} @z -@x [47] Provide for larger than 16bit numeric macros. +@x [5.47] l.862 - Provide for larger than 16bit numeric macros. their |equiv| value contains the corresponding numeric value plus $2^{15}$. @y their |equiv| value contains the corresponding numeric value plus $2^{30}$. @z -@x [47] Add parametric2 macros (macros that use [] to delimit arguments). +@x [5.47] l.868 - to delimit arguments). \yskip\hang |parametric| identifiers have been defined to be parametric macros; like simple identifiers, their |equiv| value points to the replacement text. @y @@ -260,32 +260,32 @@ like simple identifiers, their |equiv| value points to the replacement text. be parametric macros; like simple identifiers, their |equiv| value points to the replacement text. @z -@x +@x [5.47] l.874 @d parametric=3 {parametric macros have |parametric| ilk} @y @d parametric=3 {parametric macros have |parametric| ilk} @d parametric2=4 {second type of parametric macros have this |ilk|} @z -@x [50] unambig_length is a variable now +@x [6.50] l.945 - unambig_length is a variable now @!chopped_id:array [0..unambig_length] of ASCII_code; {chopped identifier} @y @!chopped_id:array [0..max_id_length] of ASCII_code; {chopped identifier} @z -@x [53] Add parametric2 macros (macros that use [] to delimit arguments). +@x [6.53] l.960 - to delimit arguments). |numeric|, |simple|, or |parametric|. @y |numeric|, |simple|, |parametric|, or |parametric2|. @z -@x [53] unambig_length is a variable. +@x [6.53] l.971 - unambig_length is a variable. @!s:0..unambig_length; {index into |chopped_id|} @y @!s:0..max_id_length; {index into |chopped_id|} @z -@x [58] Case smashing options/strict checking. +@x [6.58] l.1030 - Case smashing options/strict checking. begin if buffer[i]<>"_" then begin if buffer[i]>="a" then chopped_id[s]:=buffer[i]-@'40 @y @@ -297,7 +297,7 @@ the replacement text. chopped_id[s]:=buffer[i]+@'40 @z -@x [63] Case smashing options/strict checking. +@x [6.63] l.1102 - Case smashing options/strict checking. if c<>"_" then begin if c>="a" then c:=c-@'40; {merge lowercase with uppercase} @y @@ -308,7 +308,7 @@ the replacement text. c:=c+@'40; @z -@x [64] Delayed pool file opening / larger numerics. +@x [6.64] l.1123 - Delayed pool file opening / larger numerics. @<Define and output a new string...@>= begin ilk[p]:=numeric; {strings are like numeric macros} if l-double_chars=2 then {this string is for a single character} @@ -327,37 +327,37 @@ else begin l:=l-double_chars-1; @z -@x [85] Add parametric2 macros (macros that use [] to delimit arguments). +@x [9.85] l.1502 - to delimit arguments). begin if ilk[cur_name]=parametric then @y begin if (ilk[cur_name]=parametric) or (ilk[cur_name]=parametric2) then @z -@x [89] Larger numerics. +@x [9.89] l.1586 - Larger numerics. numeric: begin cur_val:=equiv[a]-@'100000; a:=number; @y numeric: begin cur_val:=equiv[a]-@'10000000000; a:=number; @z -@x [89] Add parametric2 macros (macros that use [] to delimit arguments). +@x [9.89] l.1590 - to delimit arguments). parametric: begin @<Put a parameter on the parameter stack, @y parametric,parametric2: begin @<Put a parameter on the parameter stack, @z -@x [90] Add parametric2 macros (macros that use [] to delimit arguments). +@x [9.90] l.1607 - to delimit arguments). if (stack_ptr=0)or(tok_mem[zo,cur_byte]<>"(") then @y if (stack_ptr=0)or((ilk[a]=parametric)and(tok_mem[zo,cur_byte]<>"(")) or((ilk[a]=parametric2)and(tok_mem[zo,cur_byte]<>"[")) then @z -@x [93] Add parametric2 macros (macros that use [] to delimit arguments). +@x [9.93] l.1654 - to delimit arguments). bal:=1; incr(cur_byte); {skip the opening `\.('} @y bal:=1; incr(cur_byte); {skip the opening `\.(' or `['} @z -@x +@x [9.93] l.1662 "(": incr(bal); ")": begin decr(bal); @y @@ -369,7 +369,7 @@ bal:=1; incr(cur_byte); {skip the opening `\.(' or `['} "]": if ilk[a]=parametric2 then begin decr(bal); @z -@x [105] Accept DIV, div, MOD, and mod +@x [10.105] l.1937 - Accept DIV, div, MOD, and mod (((out_contrib[1]="D")and(out_contrib[2]="I")and(out_contrib[3]="V")) or@| ((out_contrib[1]="M")and(out_contrib[2]="O")and(out_contrib[3]="D")) ))or@| @^uppercase@> @@ -380,7 +380,7 @@ bal:=1; incr(cur_byte); {skip the opening `\.(' or `['} ((out_contrib[1]="m")and(out_contrib[2]="o")and(out_contrib[3]="d")) ))or@| @z -@x [110] lowercase ids +@x [10.110] l.2005 - lowercase ids @^uppercase@> if ((out_buf[out_ptr-3]="D")and(out_buf[out_ptr-2]="I")and (out_buf[out_ptr-1]="V"))or @/ @@ -397,7 +397,7 @@ bal:=1; incr(cur_byte); {skip the opening `\.(' or `['} (out_buf[out_ptr-1]="d")) then@/ goto bad_case @z -@x [114] lowercase operators (`and', `or', etc.) +@x [11.114] l.2077 - lowercase operators (`and', `or', etc.) and_sign: begin out_contrib[1]:="A"; out_contrib[2]:="N"; out_contrib[3]:="D"; @^uppercase@> send_out(ident,3); @@ -422,7 +422,7 @@ set_element_sign: begin out_contrib[1]:="i"; out_contrib[2]:="n"; or_sign: begin out_contrib[1]:="o"; out_contrib[2]:="r"; send_out(ident,2); @z -@x [116] Case smashing options. +@x [11.116] l.2120 - Case smashing options. @ Single-character identifiers represent themselves, while longer ones appear in |byte_mem|. All must be converted to uppercase, with underlines removed. Extremely long identifiers must be chopped. @@ -481,36 +481,36 @@ identifier: begin k:=0; j:=byte_start[cur_val]; w:=cur_val mod ww; end; @z -@x [119] Stretch limits of constants to match what we set for expressions. +@x [11.119] l.2199 - Stretch limits of constants to match what we set for expressions. if n>=@'2000000000 then err_print('! Constant too big') @y if n>=@'10000000000 then err_print('! Constant too big') @z -@x +@x [11.119] l.2208 if n>=@"8000000 then err_print('! Constant too big') @y if n>=@"40000000 then err_print('! Constant too big') @z -@x [157] Larger numerics. +@x [14.157] l.2862 - Larger numerics. if abs(accumulator)>=@'100000 then @y if abs(accumulator)>=@'10000000000 then @z -@x [157] Larger numerics. +@x [14.157] l.2866 - Larger numerics. equiv[p]:=accumulator+@'100000; {name |p| now is defined to equal |accumulator|} @y equiv[p]:=accumulator+@'10000000000; {name |p| now is defined to equal |accumulator|} @z -@x [158] Larger numerics. +@x [14.158] l.2889 - Larger numerics. add_in(equiv[q]-@'100000); @y add_in(equiv[q]-@'10000000000); @z -@x [165] Add parametric2 macros (macros that use [] to delimit arguments). +@x [15.165] l.2964 - to delimit arguments). "(": incr(bal); ")": if bal=0 then err_print('! Extra )') @.Extra )@> @@ -530,7 +530,7 @@ equiv[p]:=accumulator+@'10000000000; {name |p| now is defined to equal |accumula "#": if (t=parametric)or(t=parametric2) then a:=param; @z -@x [166] Add parametric2 macros (macros that use [] to delimit arguments). +@x [15.166] l.2988 - to delimit arguments). begin if bal=1 then err_print('! Missing )') else err_print('! Missing ',bal:1,' )''s'); @.Missing n )@> @@ -557,7 +557,7 @@ equiv[p]:=accumulator+@'10000000000; {name |p| now is defined to equal |accumula end @z -@x [173] Add parametric2 macros (macros that use [] to delimit arguments). +@x [16.173] l.3107 - to delimit arguments). else @<If the next text is `\.{(\#)==}', call |define_macro| and |goto continue|@>; @y @@ -565,7 +565,7 @@ equiv[p]:=accumulator+@'10000000000; {name |p| now is defined to equal |accumula and |goto continue|@>; @z -@x [174] Add parametric2 macros (macros that use [] to delimit arguments). +@x [16.174] l.3114 - to delimit arguments). @ @<If the next text is `\.{(\#)==}'...@>= if next_control="(" then begin next_control:=get_next; @@ -622,7 +622,7 @@ else if next_control="[" then end @z -@x [179] make term_in = input +@x [17.179] l.3190 - make term_in = input any error stop will set |debug_cycle| to zero. @y any error stop will set |debug_cycle| to zero. @@ -630,29 +630,29 @@ any error stop will set |debug_cycle| to zero. @d term_in==stdin @z -@x +@x [17.179] l.3198 @!term_in:text_file; {the user's terminal as an input file} @y @z -@x [180] remove term_in reset +@x [17.180] l.3206 - remove term_in reset reset(term_in,'TTY:','/I'); {open |term_in| as the terminal, don't do a |get|} @y @z -@x [182] write newline just before exit; use value of |history| +@x [18.182] l.3248 - write newline just before exit; use value of |history| print_ln(banner); {print a ``banner line''} @y print (banner); {print a ``banner line''} print_ln (version_string); @z -@x Eliminate the |end_of_TANGLE| label. +@x [18.182] l.3252 - Eliminate the |end_of_TANGLE| label. end_of_TANGLE: @y @z -@x +@x [18.182] l.3256 @<Print the job |history|@>; @y @<Print the job |history|@>; @@ -662,7 +662,7 @@ then uexit (1) else uexit (0); @z -@x [188] System-dependent changes. +@x [19.188] l.3308 - System-dependent changes. This module should be replaced, if necessary, by changes to the program that are necessary to make \.{TANGLE} work at a particular installation. It is usually best to design your change file so that all changes to diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py index 3f8c2465525..b5059d5ec27 100644..100755 --- a/Build/source/texk/web2c/tests/fix-changefile-lines.py +++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py @@ -71,9 +71,12 @@ class WebReader: section = self.section_cnt line_number = self._pos - part_inc = line.count("@*") - self.part_cnt += part_inc - self.section_cnt += line.count("@ ") + part_inc + if re.search("^@\*", line): + self.part_cnt += 1 + self.section_cnt += 1 + + if re.search("^@ ", line): + self.section_cnt += 1 return (part, section, line_number), line diff --git a/Build/source/texk/web2c/weave.ch b/Build/source/texk/web2c/weave.ch index f39dcc6b80e..50bca31216c 100644 --- a/Build/source/texk/web2c/weave.ch +++ b/Build/source/texk/web2c/weave.ch @@ -47,28 +47,28 @@ % 11/30/89 KB Version 4. % (more recent changes in the ChangeLog) -@x [0] WEAVE: print changes only +@x [0.0] l.43 - WEAVE: print changes only \def\title{WEAVE} @y \let\maybe=\iffalse \def\title{WEAVE changes for C} @z -@x [1] Define my_name +@x [1.1] l.77 - Define my_name @d banner=='This is WEAVE, Version 4.5' @y @d my_name=='weave' @d banner=='This is WEAVE, Version 4.5' @z -@x [2] No global labels, define and call parse_arguments. +@x [1.2] l.85 - No global labels, define and call parse_arguments. calls the `|jump_out|' procedure, which goes to the label |end_of_WEAVE|. @d end_of_WEAVE = 9999 {go here to wrap it up} @y calls the `|jump_out|' procedure. @z -@x +@x [1.2] l.91 label end_of_WEAVE; {go here to finish} const @<Constants in the outer block@>@/ type @<Types in the outer block@>@/ @@ -91,7 +91,7 @@ procedure initialize; @<Set initial values@>@/ @z -@x [8] Increase constants for tex2pdf, etc. +@x [1.8] l.186 - Increase constants for tex2pdf, etc. @!max_bytes=45000; {|1/ww| times the number of bytes in identifiers, index entries, and module names; must be less than 65536} @!max_names=5000; {number of identifiers, index entries, and module names; @@ -102,7 +102,7 @@ procedure initialize; @!max_names=10239; {number of identifiers, index entries, and module names; must be less than 10240} @z -@x +@x [1.8] l.190 @!max_modules=2000;{greater than the total number of modules} @!hash_size=353; {should be prime} @!buf_size=100; {maximum length of input line} @@ -117,7 +117,7 @@ procedure initialize; @!long_buf_size=buf_size+longest_name; {C arithmetic in \PASCAL\ constant} @!line_length=80; {lines of \TeX\ output have at most this many characters, @z -@x +@x [1.8] l.197 @!max_refs=30000; {number of cross references; must be less than 65536} @!max_toks=30000; {number of symbols in \PASCAL\ texts being parsed; must be less than 65536} @@ -139,13 +139,13 @@ procedure initialize; % default type `char' produces signed integers, which are bad array % indices in C. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -@x +@x [2.12] l.307 @d text_char == char {the data type of characters in text files} @y @d text_char == ASCII_code {the data type of characters in text files} @z -@x [17] enable maximum character set +@x [2.17] l.488 - enable maximum character set for i:=1 to @'37 do xchr[i]:=' '; for i:=@'200 to @'377 do xchr[i]:=' '; @y @@ -153,20 +153,20 @@ for i:=1 to @'37 do xchr[i]:=chr(i); for i:=@'200 to @'377 do xchr[i]:=chr(i); @z -@x [20] Terminal I/O. +@x [3.20] l.514 - Terminal I/O. @d print(#)==write(term_out,#) {`|print|' means write on the terminal} @y @d term_out==stdout @d print(#)==write(term_out,#) {`|print|' means write on the terminal} @z -@x [20] +@x [3.20] l.521 @<Globals...@>= @!term_out:text_file; {the terminal as an output file} @y @z -@x [21] Don't initialize the terminal. +@x [3.21] l.524 - Don't initialize the terminal. @ Different systems have different ways of specifying that the output on a certain file will appear on the user's terminal. Here is one way to do this on the \PASCAL\ system that was used in \.{TANGLE}'s initial development: @@ -183,13 +183,13 @@ certain file will appear on the user's terminal. {nothing need be done} @z -@x [22] `break' is `fflush'. +@x [3.22] l.537 - `break' is `fflush'. @d update_terminal == break(term_out) {empty the terminal output buffer} @y @d update_terminal == fflush(term_out) {empty the terminal output buffer} @z -@x [24] Open input files. +@x [3.24] l.546 - Open input files. @ The following code opens the input files. Since these files were listed in the program header, we assume that the \PASCAL\ runtime system has already checked that suitable file names have been given; therefore no @@ -211,13 +211,13 @@ begin web_file := kpse_open_file(web_name, kpse_web_format); end; @z -@x [26] Opening the .tex file. +@x [3.26] l.569 - Opening the .tex file. rewrite(tex_file); @y rewrite(tex_file,tex_name); @z -@x [28] web2c doesn't understand f^. +@x [3.28] l.597 - web2c doesn't understand f^. begin buffer[limit]:=xord[f^]; get(f); incr(limit); if buffer[limit-1]<>" " then final_limit:=limit; @@ -231,7 +231,7 @@ rewrite(tex_file,tex_name); begin while not eoln(f) do vgetc(f); @z -@x [33] Fix jump_out +@x [4.33] l.678 - Fix jump_out @ The |jump_out| procedure just cuts across all active procedure levels and jumps out of the program. This is the only non-local \&{goto} statement in \.{WEAVE}. It is used when no recovery from a particular error has @@ -248,7 +248,7 @@ and jumps out of the program. It is used when no recovery from a particular error has been provided. @z -@x +@x [4.33] l.689 @d fatal_error(#)==begin new_line; print(#); error; mark_fatal; jump_out; end @@ -275,7 +275,7 @@ stat @<Print statistics about memory usage@>;@+tats@;@/ end; @z -@x [37] extend 'byte_mem' for "pdftex.web + pdftex-final.ch" +@x [5.37] l.726 - extend 'byte_mem' for "pdftex.web + pdftex-final.ch" there are programs that need more than 65536 bytes; \TeX\ is one of these. @y there are programs that need more than 65536 bytes; \TeX\ is one of these @@ -283,7 +283,7 @@ there are programs that need more than 65536 bytes; \TeX\ is one of these its ``final'' change file is applied). @z -@x +@x [5.37] l.729 is either 0 or 1. (For generality, the first index is actually allowed to run between 0 and |ww-1|, where |ww| is defined to be 2; the program will @y @@ -291,13 +291,13 @@ is either 0, 1 or 2. (For generality, the first index is actually allowed to run between 0 and |ww-1|, where |ww| is defined to be 3; the program will @z -@x +@x [5.37] l.734 @d ww=2 {we multiply the byte capacity by approximately this amount} @y @d ww=3 {we multiply the byte capacity by approximately this amount} @z -@x [50] don't enter xrefs if no_xref set +@x [5.50] l.910 - don't enter xrefs if no_xref set @d append_xref(#)==if xref_ptr=max_refs then overflow('cross reference') else begin incr(xref_ptr); num(xref_ptr):=#; end @@ -326,7 +326,7 @@ begin if no_xref then return; if (reserved(p)or(byte_start[p]+1=byte_start[p+ww]))and @z -@x [124] +@x [12.124] l.2199 `\.{\\input webmac}'. @.\\input webmac@> @.webmac@> @@ -341,7 +341,7 @@ command line), then we use alternative \TeX\ macros from `\.{\\input pwebmac}'. @.pwebmac@> @z -@x [124] +@x [12.124] l.2204 out_ptr:=1; out_line:=1; out_buf[1]:="c"; write(tex_file,'\input webma'); @y out_ptr:=1; out_line:=1; out_buf[1]:="c"; @@ -349,7 +349,7 @@ if pdf_output then write(tex_file,'\input pwebma') else write(tex_file,'\input webma'); @z -@x [127] see https://tug.org/pipermail/tex-live/2023-July/049306.htm +@x [12.127] l.2234 - see https://tug.org/pipermail/tex-live/2023-July/049306.htm preceded by another backslash. In the latter case, a |"%"| is output at the break. @y @@ -357,14 +357,14 @@ preceded by another backslash or a \TeX\ comment marker. In the latter case, a |'%'| is output at the break. @z -@x [127] deal with malign user input +@x [12.127] l.2248 - deal with malign user input if (d="\")and(out_buf[k-1]<>"\") then {in this case |k>1|} @y if (d="\")and(out_buf[k-1]<>"\")and(out_buf[k-1]<>"%") then {in this case |k>1|} @z -@x [148] Purify 'reduce' and 'squash'. +@x [15.148] l.3007 - Purify 'reduce' and 'squash'. @d production(#)==@!debug prod(#) gubed; goto found @d reduce(#)==red(#); production @d production_end(#)==@!debug prod(#) gubed; goto found; @@ -376,68 +376,68 @@ preceded by another backslash or a \TeX\ comment marker. In the latter case, a @d squash(#)==begin sq(#); production @z -@x [151] Special case 'k=0'. +@x [15.151] l.3100 - Special case 'k=0'. else if cat[pp+1]=simp then squash(pp+1,1,math,0)(4) @y else if cat[pp+1]=simp then reduce(pp+1,0,math,0)(4) @z -@x [157] Special case 'k=0'. +@x [15.157] l.3151 - Special case 'k=0'. squash(pp,1,intro,-3)(14) @y reduce(pp,0,intro,-3)(14) @z -@x [161] Special case 'k=0'. +@x [15.161] l.3193 - Special case 'k=0'. else squash(pp,1,simp,-2)(25) @y else reduce(pp,0,simp,-2)(25) @z -@x [162] Special case 'k=0'. +@x [15.162] l.3212 - Special case 'k=0'. else if cat[pp+1]=simp then squash(pp+1,1,math,0)(35) @y else if cat[pp+1]=simp then reduce(pp+1,0,math,0)(35) @z -@x [166] Special case 'k=0'. +@x [15.166] l.3272 - Special case 'k=0'. squash(pp,1,terminator,-3)(42) @y reduce(pp,0,terminator,-3)(42) @z -@x [167] Special case 'k=0'. +@x [15.167] l.3275 - Special case 'k=0'. if cat[pp+1]=close then squash(pp,1,stmt,-2)(43) @y if cat[pp+1]=close then reduce(pp,0,stmt,-2)(43) @z -@x [167] Apply 'squash(...,2,...)'. +@x [15.167] l.3277 - Apply 'squash(...,2,...)'. begin app(force); app(backup); app2(pp); reduce(pp,2,intro,-3)(44); @y begin app(force); app(backup); squash(pp,2,intro,-3)(44); @z -@x [169] Special case 'k=0'. +@x [15.169] l.3291 - Special case 'k=0'. squash(pp,1,stmt,-2)(50) @y reduce(pp,0,stmt,-2)(50) @z -@x [170] Special case 'k=0'. +@x [15.170] l.3294 - Special case 'k=0'. if cat[pp+1]=beginning then squash(pp,1,stmt,-2)(51) @y if cat[pp+1]=beginning then reduce(pp,0,stmt,-2)(51) @z -@x [172] Move special case 'k=1' from 'squash' to special case 'k=0' here. +@x [15.172] l.3325 - Move special case 'k=1' from 'squash' to special case 'k=0' here. scrap list. @y scrap list. This procedure takes advantage of the simplification that occurs when |k=0|. @z -@x +@x [15.172] l.3330 begin cat[j]:=c; trans[j]:=text_ptr; freeze_text; @y begin cat[j]:=c; @@ -447,19 +447,19 @@ if k>0 then end; @z -@x [172] Fix spacing. +@x [15.172] l.3337 - Fix spacing. @<Change |pp| to $\max(|scrap_base|,|pp+d|)$@>; @y @<Change |pp| to $\max(|scrap_base|,\,|pp+d|)$@>; @z -@x [173] Fix spacing. +@x [15.173] l.3340 - Fix spacing. @ @<Change |pp| to $\max(|scrap_base|,|pp+d|)$@>= @y @ @<Change |pp| to $\max(|scrap_base|,\,|pp+d|)$@>= @z -@x [174] Rewrite 'squash' to match description in section [148]. +@x [15.174] l.3344 @ Similarly, the `|squash|' macro invokes a procedure called `|sq|'. This procedure takes advantage of the simplification that occurs when |k=1|. @y @@ -467,7 +467,7 @@ procedure takes advantage of the simplification that occurs when |k=1|. combines |app|${}_k$ and |red| for matching numbers~|k|. @z -@x +@x [15.174] l.3349 var i:0..max_scraps; {index into scrap memory} begin if k=1 then begin cat[j]:=c; @<Change |pp|...@>; @@ -488,7 +488,7 @@ begin red(j,k,c,d); @z -@x [239] omit index and module names if no_xref set +@x [19.239] l.4537 - omit index and module names if no_xref set @<Phase III: Output the cross-reference index@>= @y If the user has set the |no_xref| flag (the `\.{-x} option on the @@ -505,14 +505,14 @@ if no_xref then begin else begin @z -@x +@x [19.239] l.4551 print('Done.'); @y end; print('Done.'); @z -@x [258] term_in == stdin, when debugging. +@x [20.258] l.4782 - term_in == stdin, when debugging. any error stop will set |debug_cycle| to zero. @y any error stop will set |debug_cycle| to zero. @@ -520,24 +520,24 @@ any error stop will set |debug_cycle| to zero. @d term_in==stdin @z -@x +@x [20.258] l.4790 @!term_in:text_file; {the user's terminal as an input file} @y @z -@x [259] Take out reset(term_in) +@x [20.259] l.4798 - Take out reset(term_in) reset(term_in,'TTY:','/I'); {open |term_in| as the terminal, don't do a |get|} @y @z -@x [261] print newline at end of run and exit based upon value of history +@x [21.261] l.4851 - print newline at end of run and exit based upon value of history print_ln(banner); {print a ``banner line''} @y print (banner); {print a ``banner line''} print_ln (version_string); @z -@x +@x [21.261] l.4856 end_of_WEAVE: stat @<Print statistics about memory usage@>;@+tats@;@/ @t\4\4@>{here files should be closed if the operating system requires it} @@ -548,7 +548,7 @@ jump_out; end. @z -@x [264] System-dependent changes. +@x [22.264] l.4886 - System-dependent changes. This module should be replaced, if necessary, by changes to the program that are necessary to make \.{WEAVE} work at a particular installation. It is usually best to design your change file so that all changes to |