texlive[74553] Build/source/texk/web2c: [TANGLE] Reject strings as
commits+ascherer at tug.org
commits+ascherer at tug.org
Mon Mar 10 18:10:39 CET 2025
Revision: 74553
https://tug.org/svn/texlive?view=revision&revision=74553
Author: ascherer
Date: 2025-03-10 18:10:39 +0100 (Mon, 10 Mar 2025)
Log Message:
-----------
[TANGLE] Reject strings as macro names.
In message <https://tug.org/pipermail/tex-k/2025-March/004163.html>
Benjamin Gray reported inconsistent behavior of TANGLE when processing
"strings" as a macro name. WEAVE outright objects to this.
His suggested patch is simplified to an existing check point, although
his specific error message is no used. This particular coding attempt
has never occurred in WEB's history.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ChangeLog
trunk/Build/source/texk/web2c/tangle.ch
trunk/Build/source/texk/web2c/tangleboot.pin
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog 2025-03-10 16:32:27 UTC (rev 74552)
+++ trunk/Build/source/texk/web2c/ChangeLog 2025-03-10 17:10:39 UTC (rev 74553)
@@ -1,7 +1,16 @@
2025-03-10 Andreas Scherer <https://ascherer.github.io>
* texk/web2c/tangle.ch,
+ * texk/web2c/tangleboot.pin: Reject strings as macro names.
+ Report and initial patch from Benjamin Gray
+ (https://tug.org/pipermail/tex-k/2025-March/004163.html).
+
+2025-03-10 Andreas Scherer <https://ascherer.github.io>
+
+ * texk/web2c/tangle.ch,
* texk/web2c/tangleboot.pin: Change case for letters only.
+ Report and initial patch from Benjamin Gray
+ (https://tug.org/pipermail/tex-k/2025-March/004161.html).
2025-02-01 Karl Berry <karl at freefriends.org>
Modified: trunk/Build/source/texk/web2c/tangle.ch
===================================================================
--- trunk/Build/source/texk/web2c/tangle.ch 2025-03-10 16:32:27 UTC (rev 74552)
+++ trunk/Build/source/texk/web2c/tangle.ch 2025-03-10 17:10:39 UTC (rev 74553)
@@ -573,6 +573,12 @@
end
@z
+ at x [1.2] l.3 - Reject strings as macro names.
+ if next_control<>identifier then
+ at y
+ if (next_control<>identifier) or (buffer[id_first]="""") then
+ at z
+
@x [16.173] l.3107 - Add parametric2 macros (macros that use [] to delimit arguments).
else @<If the next text is `\.{(\#)==}', call |define_macro|
and |goto continue|@>;
Modified: trunk/Build/source/texk/web2c/tangleboot.pin
===================================================================
--- trunk/Build/source/texk/web2c/tangleboot.pin 2025-03-10 16:32:27 UTC (rev 74552)
+++ trunk/Build/source/texk/web2c/tangleboot.pin 2025-03-10 17:10:39 UTC (rev 74553)
@@ -807,8 +807,8 @@
while true do begin 22:while nextcontrol<=132 do begin nextcontrol:=
skipahead;if nextcontrol=135 then begin loc:=loc-2;nextcontrol:=getnext;
end;end;if nextcontrol<>133 then goto 30;nextcontrol:=getnext;
-if nextcontrol<>130 then begin begin writeln(stdout);
-write(stdout,'! Definition flushed, must start with ',
+if(nextcontrol<>130)or(buffer[idfirst]=34)then begin begin writeln(
+stdout);write(stdout,'! Definition flushed, must start with ',
'identifier of length > 1');error;end;goto 22;end;nextcontrol:=getnext;
if nextcontrol=61 then begin scannumeric(idlookup(1));goto 22;
end else if nextcontrol=30 then begin definemacro(2);goto 22;
More information about the tex-live-commits
mailing list.