[latex3-commits] [latex2e-public] r1451 - fix write 18 skipping in luatex as reported by Bruno

noreply at latex-project.org noreply at latex-project.org
Mon Apr 10 20:40:03 CEST 2017


Author: carlisle
Date: 2017-04-10 20:40:03 +0200 (Mon, 10 Apr 2017)
New Revision: 1451

Added:
   trunk/base/testfiles/tlb-ealloc-004.luatex.tlg
   trunk/base/testfiles/tlb-ealloc-004.lvt
   trunk/base/testfiles/tlb-ealloc-004.tlg
Modified:
   trunk/base/changes.txt
   trunk/base/ltplain.dtx
Log:
fix write 18 skipping in luatex as reported by Bruno

Modified: trunk/base/changes.txt
===================================================================
--- trunk/base/changes.txt	2017-04-10 13:14:58 UTC (rev 1450)
+++ trunk/base/changes.txt	2017-04-10 18:40:03 UTC (rev 1451)
@@ -9,6 +9,10 @@
 #########################
 
 
+2017-04-10  David Carlisle  <latex-bugs at latex-project.org>
+
+	* ltplain.dtx: fix code to skip write18 for luatex.
+
 2017-04-05  David Carlisle  <latex-bugs at latex-project.org>
 
 	* ltoutenc.dtx: If a composite is declared with an undeclared

Modified: trunk/base/ltplain.dtx
===================================================================
--- trunk/base/ltplain.dtx	2017-04-10 13:14:58 UTC (rev 1450)
+++ trunk/base/ltplain.dtx	2017-04-10 18:40:03 UTC (rev 1451)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltplain.dtx}
-             [2017/01/06 v2.3b LaTeX Kernel (Plain TeX)]
+             [2017/04/10 v2.3c LaTeX Kernel (Plain TeX)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltplain.dtx}
@@ -369,14 +369,19 @@
 %         {Extended stream allocation in luatex (0.85)}
 % \changes{v2.2b}{2015/11/19}
 %         {Only extend allocation of write streams (see luatex list)}
+% \changes{v2.3c}{2017/04/10}
+%         {Correction to code to skip write18 in luatex}
 % Skip |\write18| due to its traditional use as a shell-escape.
 %    \begin{macrocode}
 \ifx\directlua\@undefined
   \def\newwrite   {\e at alloc\write \chardef{\count17}\m at ne\sixt@@n}
 \else
   \def\newwrite   {\e at alloc\write    
-                   {\ifnum\allocationnumber=18 \allocationnumber19\fi
-                     \global\chardef}%
+                   {\ifnum\allocationnumber=18
+                     \global\advance\allocationnumber\@ne
+                     \global\count17\allocationnumber
+                    \fi
+                    \global\chardef}%
                    {\count17}%
                    \m at ne
                    {128}}

Added: trunk/base/testfiles/tlb-ealloc-004.luatex.tlg
===================================================================
--- trunk/base/testfiles/tlb-ealloc-004.luatex.tlg	                        (rev 0)
+++ trunk/base/testfiles/tlb-ealloc-004.luatex.tlg	2017-04-10 18:40:03 UTC (rev 1451)
@@ -0,0 +1,23 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+\foo=\write3
+\foo=\write4
+\foo=\write5
+\foo=\write6
+\foo=\write7
+\foo=\write8
+\foo=\write9
+\foo=\write10
+\foo=\write11
+\foo=\write12
+\foo=\write13
+\foo=\write14
+\foo=\write15
+\foo=\write16
+\foo=\write17
+\foo=\write19
+\foo=\write20
+\foo=\write21
+\foo=\write22
+> \foo=\char"16.
+l. ...\show\foo

Added: trunk/base/testfiles/tlb-ealloc-004.lvt
===================================================================
--- trunk/base/testfiles/tlb-ealloc-004.lvt	                        (rev 0)
+++ trunk/base/testfiles/tlb-ealloc-004.lvt	2017-04-10 18:40:03 UTC (rev 1451)
@@ -0,0 +1,34 @@
+
+\documentclass{article}
+\input{test2e}
+
+
+% Check that only 16 write streams are allocated except for luatex
+% which should skip 18 but go on (to 128 but upper limit not tested here)
+% (this code was fixed in 2015-04-15 release.
+
+
+\START
+
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\newwrite\foo
+\show\foo
+
+\END
\ No newline at end of file

Added: trunk/base/testfiles/tlb-ealloc-004.tlg
===================================================================
--- trunk/base/testfiles/tlb-ealloc-004.tlg	                        (rev 0)
+++ trunk/base/testfiles/tlb-ealloc-004.tlg	2017-04-10 18:40:03 UTC (rev 1451)
@@ -0,0 +1,56 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+\foo=\write3
+\foo=\write4
+\foo=\write5
+\foo=\write6
+\foo=\write7
+\foo=\write8
+\foo=\write9
+\foo=\write10
+\foo=\write11
+\foo=\write12
+\foo=\write13
+\foo=\write14
+\foo=\write15
+! No room for a new \write.
+\e at ch@ck ...message {No room for a new \string #4}
+                                                  \fi \fi 
+l. ...\newwrite\foo
+This error message was generated by an \errmessage
+command, so I can't give any explicit help.
+Pretend that you're Hercule Poirot: Examine all clues,
+and deduce the truth by order and method.
+\foo=\write16
+! No room for a new \write.
+\e at ch@ck ...message {No room for a new \string #4}
+                                                  \fi \fi 
+l. ...\newwrite\foo
+(That was another \errmessage.)
+\foo=\write17
+! No room for a new \write.
+\e at ch@ck ...message {No room for a new \string #4}
+                                                  \fi \fi 
+l. ...\newwrite\foo
+(That was another \errmessage.)
+\foo=\write18
+! No room for a new \write.
+\e at ch@ck ...message {No room for a new \string #4}
+                                                  \fi \fi 
+l. ...\newwrite\foo
+(That was another \errmessage.)
+\foo=\write19
+! No room for a new \write.
+\e at ch@ck ...message {No room for a new \string #4}
+                                                  \fi \fi 
+l. ...\newwrite\foo
+(That was another \errmessage.)
+\foo=\write20
+! No room for a new \write.
+\e at ch@ck ...message {No room for a new \string #4}
+                                                  \fi \fi 
+l. ...\newwrite\foo
+(That was another \errmessage.)
+\foo=\write21
+> \foo=\char"15.
+l. ...\show\foo



More information about the latex3-commits mailing list