texlive[71640] Build/source/texk/web2c: [WEB] Avoid external

commits+ascherer at tug.org commits+ascherer at tug.org
Fri Jun 28 05:43:34 CEST 2024


Revision: 71640
          https://tug.org/svn/texlive?view=revision&revision=71640
Author:   ascherer
Date:     2024-06-28 05:43:34 +0200 (Fri, 28 Jun 2024)
Log Message:
-----------
[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'.)

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/gftype.ch
    trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py

Modified: trunk/Build/source/texk/web2c/gftype.ch
===================================================================
--- trunk/Build/source/texk/web2c/gftype.ch	2024-06-28 03:03:56 UTC (rev 71639)
+++ trunk/Build/source/texk/web2c/gftype.ch	2024-06-28 03:43:34 UTC (rev 71640)
@@ -166,7 +166,7 @@
 @d text_char == char {the data type of characters in text files}
 @z
 
- at x [21] Redo open_gf_file to do path searching.
+ at 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|}

Modified: trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py
===================================================================
--- trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py	2024-06-28 03:03:56 UTC (rev 71639)
+++ trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py	2024-06-28 03:43:34 UTC (rev 71640)
@@ -67,10 +67,6 @@
         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 @@
         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 @@
                 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 @@
                 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()



More information about the tex-live-commits mailing list.