texlive[71638] Build/source/texk/web2c: [C/WEB] Simpler check for
commits+ascherer at tug.org
commits+ascherer at tug.org
Fri Jun 28 04:53:10 CEST 2024
Revision: 71638
https://tug.org/svn/texlive?view=revision&revision=71638
Author: ascherer
Date: 2024-06-28 04:53:10 +0200 (Fri, 28 Jun 2024)
Log Message:
-----------
[C/WEB] Simpler check for 'change section'.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ChangeLog
trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py
trunk/Build/source/texk/web2c/tex.ch
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog 2024-06-27 23:41:51 UTC (rev 71637)
+++ trunk/Build/source/texk/web2c/ChangeLog 2024-06-28 02:53:10 UTC (rev 71638)
@@ -1,3 +1,9 @@
+2024-06-28 Andreas Scherer <https://ascherer.github.io>
+
+ * cwebdir/ctwill-w2c.ch,
+ * tests/fix-changefile-lines.py,
+ * tex.ch: Simpler check for 'change section'.
+
2024-06-24 Andreas Scherer <https://ascherer.github.io>
* tests/fix-changefile-lines.py,
Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch 2024-06-27 23:41:51 UTC (rev 71637)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch 2024-06-28 02:53:10 UTC (rev 71638)
@@ -1072,11 +1072,10 @@
default: err_print(_("! Improper macro definition")); break;
@z
- at x [12.236] l.4370
+ at x [12.237] l.4370
@ @<Start a format...@>= {
doing_format=true;
@y
-
@ @<Start a format...@>= {
doing_format=true;
is_macro=false;
Modified: trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py
===================================================================
--- trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py 2024-06-27 23:41:51 UTC (rev 71637)
+++ trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py 2024-06-28 02:53:10 UTC (rev 71638)
@@ -151,6 +151,12 @@
eprint(self._match_lines[0])
sys.exit(1)
if tex_line == self._match_lines[0]:
+ if tex_line.startswith("@*"):
+ part += 1
+ section +=1
+ elif tex_line.startswith("@ ") or tex_line == "@":
+ section += 1
+
for i in range(1, len(self._match_lines)):
try:
_, tex_line = web_reader.next_line()
@@ -168,24 +174,6 @@
while self.advance_to_next_chunk():
part, section, line_number = self.find_match_in_web(web_reader)
- # Attempt to catch the case where something is inserted just before
- # the start of a section.
- match_start = self._match_lines[0].strip()[:2]
- for repl_index in range(self._pos + 1, len(self._lines)):
- repl_start = self._lines[repl_index].strip()[:2]
- # CWEB @qcomments@> are ignored; see ctwill-w2c.ch
- if repl_start != "@q":
- break
- if match_start == "@ " or match_start == "@":
- if repl_start in ["@ ", "@*", "@"]:
- section += 1
- elif match_start == "@*":
- if repl_start == "@*":
- part += 1
- section += 1
- elif repl_start in ["@ ", "@"]:
- section += 1
-
# Replace '@x' line with updated information.
new_line = self._lines[self._chunk_start]
Modified: trunk/Build/source/texk/web2c/tex.ch
===================================================================
--- trunk/Build/source/texk/web2c/tex.ch 2024-06-27 23:41:51 UTC (rev 71637)
+++ trunk/Build/source/texk/web2c/tex.ch 2024-06-28 02:53:10 UTC (rev 71638)
@@ -5029,7 +5029,7 @@
else if x<>0 then goto bad_fmt;
@z
- at x [54.1379] l.24996 - extra routines
+ at x [55.1380] l.24996 - extra routines
@* \[55] Index.
@y
More information about the tex-live-commits
mailing list.