summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2024-06-28 03:43:34 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2024-06-28 03:43:34 +0000
commitd72cc6bd2ad3264a977e4e1dcd7bcee712106868 (patch)
treed951cc6311621087cae017d780429071928e54cb /Build/source
parent7504ba43b9d894c93a2a798e27ef2fc75ccf6274 (diff)
[WEB] Avoid external adjustment.
'next_line()' returns the 'part, section, line_number' of the line returned. (Note the exception for CWEB's '@i'nclude command.) Also, fix a section number in 'gftype.ch'. (All other observed change files are unaffected from the recent changes to 'f-c-l'.) git-svn-id: svn://tug.org/texlive/trunk@71640 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/gftype.ch2
-rwxr-xr-xBuild/source/texk/web2c/tests/fix-changefile-lines.py16
2 files changed, 7 insertions, 11 deletions
diff --git a/Build/source/texk/web2c/gftype.ch b/Build/source/texk/web2c/gftype.ch
index 83834e76c26..52e1e8416e6 100644
--- a/Build/source/texk/web2c/gftype.ch
+++ b/Build/source/texk/web2c/gftype.ch
@@ -166,7 +166,7 @@ end;
@d text_char == char {the data type of characters in text files}
@z
-@x [21] Redo open_gf_file to do path searching.
+@x [22] Redo open_gf_file to do path searching.
@ To prepare this file for input, we |reset| it.
@p procedure open_gf_file; {prepares to read packed bytes in |gf_file|}
diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py
index c376e949130..6e2e2a6de4b 100755
--- a/Build/source/texk/web2c/tests/fix-changefile-lines.py
+++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py
@@ -67,10 +67,6 @@ class WebReader:
line = self._web_lines[self._pos]
self._pos += 1
- part = self.part_cnt
- section = self.section_cnt
- line_number = self._pos
-
# Look for starred section == part
if line.startswith("@*"):
self.part_cnt += 1
@@ -80,6 +76,11 @@ class WebReader:
if line.startswith("@ ") or line == "@":
self.section_cnt += 1
+ # Prepare return values
+ part = self.part_cnt
+ section = self.section_cnt
+ line_number = self._pos
+
# Look for '@i'nclude line
result = re.match("^@i \"?(\\w+(\\.\\w+)?)\"?", line)
if result:
@@ -88,6 +89,7 @@ class WebReader:
pass
self.part_cnt += inc_reader.part_cnt
self.section_cnt += inc_reader.section_cnt
+ # Do not increase 'part' and 'section' just yet
# Ignore line count in include file; we're only one step beyond
return (part, section, line_number), line
@@ -151,12 +153,6 @@ class ChangeReader:
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()