summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-11 21:33:04 +0000
committerKarl Berry <karl@freefriends.org>2019-10-11 21:33:04 +0000
commit83b507f56f72909f7552936d229f1130c8fb05c5 (patch)
tree360f905351d9db1e1be9168840b76d7ba8c1e4ca /Master/texmf-dist/source/latex/l3kernel
parentaa2dbb8897371a36028d3ce667140365345dfbfe (diff)
l3 (11oct19)
git-svn-id: svn://tug.org/texlive/trunk@52343 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx155
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins1
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx41
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx17
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx41
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3debug.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx87
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3flag.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx15
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3regex.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sort.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sys.dtx561
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx2
54 files changed, 615 insertions, 411 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 7dfc70847b9..dbbf69a773f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -22,9 +22,9 @@
%
% for those people who are interested.
%
-%<*driver|generic|package>
-\def\ExplFileDate{2019-10-02}%
-%</driver|generic|package>
+%<*driver|generic|package|2ekernel>
+%</driver|generic|package|2ekernel>
+\def\ExplFileDate{2019-10-11}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -1007,7 +1007,7 @@
% \begin{itemize}
% \item \pdfTeX{} v1.40 or later.
% \item \XeTeX{} v0.99992 or later.
-% \item \LuaTeX{} v0.76 or later.
+% \item \LuaTeX{} v0.95 or later.
% \item e-(u)\pTeX{} mid-2012 or later.
% \end{itemize}
%
@@ -1156,19 +1156,31 @@
%</!loader>
% \end{macrocode}
%
-% \subsection{\LaTeXe{} loader}
+% \subsection{\LaTeXe{} loaders}
+%
+% Loading with \LaTeXe{} may be as part of the format (pre-loading)
+% or as a package. We have to allow for both possible paths, and of
+% course the package being loaded on to of the pre-load. That means
+% the the code here must be safe against re-loading.
%
% \begin{macrocode}
-%<*package&loader>
+%<*package&loader|2ekernel>
% \end{macrocode}
%
-% Identify the package.
+% Identify the package or add to the format message.
% \begin{macrocode}
+%<*2ekernel>
+\everyjob\expandafter{\the\everyjob
+ \message{^^J\ExplFileDate\space L3 programming layer}%
+}
+%</2ekernel>
+%<*!2ekernel>
\ProvidesPackage{expl3}
[%
\ExplFileDate\space
L3 programming layer (loader)
]%
+%</!2ekernel>
% \end{macrocode}
%
% \begin{macro}{\ProvidesExplPackage, \ProvidesExplClass, \ProvidesExplFile}
@@ -1194,8 +1206,16 @@
% \end{macro}
%
% Load the business end: this leaves \cs{expl3} syntax on.
+% The test ensures we only load once without needing to know if
+% there was a preloading step.
% \begin{macrocode}
-\input{expl3-code.tex}%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname tex\string _let:D\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+ {\input{expl3-code.tex}}%
% \end{macrocode}
%
% A check that the bootstrap code did not abort loading: if it did,
@@ -1207,34 +1227,55 @@
\fi
% \end{macrocode}
%
+% If \pkg{expl3} was pre-loaded, we now have to deal with the fact that
+% the syntax will not be activated for the package mode version:
+% simply turn it on. We use \tn{@pushfilenameaux} as a marker: it's defined
+% a little later.
+% \begin{macrocode}
+%<*!2ekernel>
+\ifdefined\@pushfilenameaux
+ \ExplSyntaxOn
+\fi
+%</!2ekernel>
+% \end{macrocode}
+%
% \begin{macrocode}
%<@@=expl>
% \end{macrocode}
%
% \begin{variable}{\c_@@_def_ext_tl}
-% Needed by \LaTeXe{}.
+% Needed by \LaTeXe{}, and avoiding a re-load issue.
% \begin{macrocode}
-\tl_const:Nn \c_@@_def_ext_tl { def }
+\cs_if_exist:NF \c_@@_def_ext_tl
+ { \tl_const:Nn \c_@@_def_ext_tl { def } }
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\__kernel_sys_configuration_load:n}
-% For \LaTeXe{}, option loading uses the built-in functionality: as this
-% may be a reload we have to force the issue.
+% \begin{macro}
+% {\__kernel_sys_configuration_load:n,\__kernel_sys_configuration_load_std:n}
+% To load configurations, we have the following cases
+% \begin{itemize}
+% \item \pkg{expl3} is pre-loaded: by the time any configuration loads,
+% we have the full file loading stack, and only need the standard
+% version of the code here.
+% \item The package is loaded with pre-loading: we again use the standard
+% version, but we don't test just yet.
+% \item The package is used without pre-loaded code: we need to manually
+% manage \pkg{expl3} syntax.
+% \end{itemize}
% \begin{macrocode}
-\cs_new_protected:Npn \__kernel_sys_configuration_load:n #1
+\cs_gset_protected:Npn \__kernel_sys_configuration_load:n #1
+%<*!2ekernel>
+ {
+ \ExplSyntaxOff
+ \cs_undefine:c { ver@ #1 .def }
+ \@onefilewithoptions {#1} [ ] [ ]
+ \c_@@_def_ext_tl
+ \ExplSyntaxOn
+ }
+\cs_gset_protected:Npn \__kernel_sys_configuration_load_std:n #1
+%</!2ekernel>
{
- \group_begin:
- \cs_set_protected:Npn \ProvidesExplFile
- {
- \char_set_catcode_space:n { `\ }
- \ProvidesExplFileAux
- }
- \cs_set_protected:Npn \ProvidesExplFileAux ##1##2##3##4
- {
- \group_end:
- \ProvidesFile {##1} [ ##2~v##3~##4 ]
- }
\cs_undefine:c { ver@ #1 .def }
\@onefilewithoptions {#1} [ ] [ ]
\c_@@_def_ext_tl
@@ -1244,10 +1285,12 @@
%
% \begin{variable}{\l_@@_options_clist}
% \begin{macrocode}
+%<*!2ekernel>
\clist_new:N \l_@@_options_clist
\DeclareOption*
{ \clist_put_right:NV \l_@@_options_clist \CurrentOption }
\ProcessOptions \relax
+%</!2ekernel>
% \end{macrocode}
% \end{variable}
%
@@ -1279,10 +1322,46 @@
}
% \end{macrocode}
%
+% A backend has to be in place by the start of the document.
% \begin{macrocode}
+%<*2ekernel>
+\AtBeginDocument
+ {
+ \str_if_exist:NF \c_sys_backend_str
+ { \sys_load_backend:n { } }
+ }
+%</2ekernel>
+%<*!2ekernel>
\keys_set:nV { sys } \l_@@_options_clist
\str_if_exist:NF \c_sys_backend_str
{ \sys_load_backend:n { } }
+%</!2ekernel>
+% \end{macrocode}
+%
+% A test for pre-loading: does \tn{@pushfilenameaux} already exist.
+% The alrady-loaded mechanism will handle everything now.
+% \begin{macrocode}
+%<*!2ekernel>
+\cs_if_exist:NT \@pushfilenameaux
+ {
+ \cs_gset_eq:NN \__kernel_sys_configuration_load:n
+ \__kernel_sys_configuration_load_std:n
+ \endinput
+ }
+%</!2ekernel>
+% \end{macrocode}
+%
+% Load the dynamic part of the code, either now or during the next run.
+% \begin{macrocode}
+\cs_if_free:cTF { ver@expl3.sty }
+ {
+ \tex_everyjob:D \exp_after:wN
+ {
+ \tex_the:D \tex_everyjob:D
+ \sys_everyjob:
+ }
+ }
+ { \sys_everyjob: }
% \end{macrocode}
%
% \begin{macro}{\@pushfilename, \@popfilename}
@@ -1351,8 +1430,23 @@
% \end{macrocode}
% \end{variable}
%
+% Tidy up configuration loading, as promised.
+% \begin{macrocode}
+%<*!2ekernel>
+\cs_gset_eq:NN \__kernel_sys_configuration_load:n
+ \__kernel_sys_configuration_load_std:n
+%</!2ekernel>
+% \end{macrocode}
+%
+% For pre-loading, we have to manually disable the syntax.
+% \begin{macrocode}
+%<*2ekernel>
+\ExplSyntaxOff
+%</2ekernel>
+% \end{macrocode}
+%
% \begin{macrocode}
-%</package&loader>
+%</package&loader|2ekernel>
% \end{macrocode}
%
% \subsection{Generic loader}
@@ -1424,12 +1518,12 @@
% \begin{macro}{\AtBeginDocument}
% \begin{macro}[int]{\expl@AtBeginDocument}
% There are a few uses of \cs{AtBeginDocument} in the package code: the
-% easiest way around that is to simply do nothing for these. As
+% easiest way around that is to simply do the code \enquote{now}. As
% bundles such as \pkg{miniltx} may have defined \cs{AtBeginDocument}
% any existing definition is saved for restoration after the payload.
% \begin{macrocode}
\let\expl@AtBeginDocument\AtBeginDocument
-\def\AtBeginDocument#1{}%
+\def\AtBeginDocument#1{#1}%
\expandafter\def\expandafter\l@expl@tidy@tl\expandafter
{%
\l@expl@tidy@tl
@@ -1475,8 +1569,9 @@
% \end{macrocode}
% \end{macro}
%
-% Load the standard back-end.
+% Load the dynamic code and standard back-end.
% \begin{macrocode}
+\sys_everyjob:
\sys_load_backend:n { }
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
index 343d8d7f186..d9c7f2e6cf2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins
@@ -111,6 +111,7 @@ and all files in that bundle must be distributed together.
}
\generate{\file{expl3.sty} {\from{expl3.dtx} {package,loader}}}
+\generate{\file{expl3.ltx} {\from{expl3.dtx} {2ekernel,loader}}}
\generate{\file{expl3-generic.tex}{\from{expl3.dtx} {generic,loader}}}
\generate{\file{l3doc.cls} {\from{l3doc.dtx} {class}}}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
index 7288e1b72a1..ce75d1f4480 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index a6b92aff81e..bfe28e37887 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -1293,6 +1293,45 @@
% \end{texnote}
% \end{function}
%
+% \subsection{Debugging support}
+%
+% \begin{function}[added = 2017-07-16, updated = 2017-08-02]{\debug_on:n, \debug_off:n}
+% \begin{syntax}
+% \cs{debug_on:n} |{| \meta{comma-separated list} |}|
+% \cs{debug_off:n} |{| \meta{comma-separated list} |}|
+% \end{syntax}
+% Turn on and off within a group various debugging code, some of which
+% is also available as \pkg{expl3} load-time options. The items that
+% can be used in the \meta{list} are
+% \begin{itemize}
+% \item \texttt{check-declarations} that checks all \pkg{expl3}
+% variables used were previously declared and that local/global
+% variables (based on their name or on their first assignment) are
+% only locally/globally assigned;
+% \item \texttt{check-expressions} that checks integer, dimension,
+% skip, and muskip expressions are not terminated prematurely;
+% \item \texttt{deprecation} that makes soon-to-be-deprecated commands produce errors;
+% \item \texttt{log-functions} that logs function definitions;
+% \item \texttt{all} that does all of the above.
+% \end{itemize}
+% Providing these as switches rather than options allows testing code
+% even if it relies on other packages: load all other packages, call
+% \cs{debug_on:n}, and load the code that one is interested in
+% testing. These functions can only be used in \LaTeXe{} package mode
+% loaded with \texttt{enable-debug} or another option implying it.
+% \end{function}
+%
+% \begin{function}[added = 2017-11-28]{\debug_suspend:, \debug_resume:}
+% \begin{syntax}
+% \cs{debug_suspend:} \ldots{} \cs{debug_resume:}
+% \end{syntax}
+% Suppress (locally) errors and logging from \texttt{debug} commands,
+% except for the \texttt{deprecation} errors or warnings. These pairs
+% of commands can be nested. This can be used around pieces of code
+% that are known to fail checks, if such failures should be ignored.
+% See for instance \pkg{l3coffins}.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 7f8da0b60b8..f780908fa0f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -212,24 +212,17 @@
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\else
- \ifnum\luatexversion<70 %
+ \ifnum\luatexversion<95 %
\else
% \end{macrocode}
-% In package mode a category code table is needed: either use a pre-loaded
-% allocator or provide one using the \LaTeXe{}-based generic code. In format
-% mode the table used here can be hard-coded into the \Lua{}.
+% In package mode for \LuaTeX{} we make sure the basic support is loaded:
+% this is only necessary in plain.
% \begin{macrocode}
%<*package>
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname newcatcodetable\endcsname\relax
\input{ltluatex}%
\fi
- \newcatcodetable\ucharcat@table
- \directlua{
- l3kernel = l3kernel or { }
- local charcat_table = \number\ucharcat@table\space
- l3kernel.charcat_table = charcat_table
- }%
%</package>
\directlua{require("expl3")}%
% \end{macrocode}
@@ -269,7 +262,7 @@
These are available in the engines\LineBreak
- pdfTeX v1.40\LineBreak
- XeTeX v0.99992\LineBreak
- - LuaTeX v0.76\LineBreak
+ - LuaTeX v0.95\LineBreak
- e-(u)pTeX mid-2012\LineBreak
or later.\LineBreak
\LineBreak
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index f44b622fcde..21a038538f6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -1027,9 +1027,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\box_set_ht:Nn, \box_set_ht:cn}
-% \begin{macro}{\box_set_dp:Nn, \box_set_dp:cn}
-% \begin{macro}{\box_set_wd:Nn, \box_set_wd:cn}
+% \begin{macro}{\box_set_ht:Nn, \box_set_ht:cn, \box_gset_ht:Nn, \box_gset_ht:cn}
+% \begin{macro}{\box_set_dp:Nn, \box_set_dp:cn, \box_gset_dp:Nn, \box_gset_dp:cn}
+% \begin{macro}{\box_set_wd:Nn, \box_set_wd:cn, \box_gset_wd:Nn, \box_gset_wd:cn}
% Setting the size whilst respecting local scope requires copying;
% the same issue does not come up when working globally.
% When debugging, the dimension expression |#2| is surrounded by
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index 6f50651ed8e..980975dd5f8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -84,45 +84,6 @@
% into the kernel. However, real use sometimes leads to better ideas, so functions from this module are
% \textbf{not necessarily stable} and we may have to adjust them!
%
-% \section{Additions to \pkg{l3basics}}
-%
-% \begin{function}[added = 2017-07-16, updated = 2017-08-02]{\debug_on:n, \debug_off:n}
-% \begin{syntax}
-% \cs{debug_on:n} |{| \meta{comma-separated list} |}|
-% \cs{debug_off:n} |{| \meta{comma-separated list} |}|
-% \end{syntax}
-% Turn on and off within a group various debugging code, some of which
-% is also available as \pkg{expl3} load-time options. The items that
-% can be used in the \meta{list} are
-% \begin{itemize}
-% \item \texttt{check-declarations} that checks all \pkg{expl3}
-% variables used were previously declared and that local/global
-% variables (based on their name or on their first assignment) are
-% only locally/globally assigned;
-% \item \texttt{check-expressions} that checks integer, dimension,
-% skip, and muskip expressions are not terminated prematurely;
-% \item \texttt{deprecation} that makes soon-to-be-deprecated commands produce errors;
-% \item \texttt{log-functions} that logs function definitions;
-% \item \texttt{all} that does all of the above.
-% \end{itemize}
-% Providing these as switches rather than options allows testing code
-% even if it relies on other packages: load all other packages, call
-% \cs{debug_on:n}, and load the code that one is interested in
-% testing. These functions can only be used in \LaTeXe{} package mode
-% loaded with \texttt{enable-debug} or another option implying it.
-% \end{function}
-%
-% \begin{function}[added = 2017-11-28]{\debug_suspend:, \debug_resume:}
-% \begin{syntax}
-% \cs{debug_suspend:} \ldots{} \cs{debug_resume:}
-% \end{syntax}
-% Suppress (locally) errors and logging from \texttt{debug} commands,
-% except for the \texttt{deprecation} errors or warnings. These pairs
-% of commands can be nested. This can be used around pieces of code
-% that are known to fail checks, if such failures should be ignored.
-% See for instance \pkg{l3coffins}.
-% \end{function}
-%
% \section{Additions to \pkg{l3box}}
%
% \subsection{Viewing part of a box}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index 69e2fe67291..baf31892bcc 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 916953285d2..8f4d5aad78a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -816,6 +816,8 @@
% \begin{macro}
% {
% \coffin_set_eq:NN, \coffin_set_eq:Nc,
+% \coffin_set_eq:cN, \coffin_set_eq:cc,
+% \coffin_gset_eq:NN, \coffin_gset_eq:Nc,
% \coffin_gset_eq:cN, \coffin_gset_eq:cc
% }
% Setting two coffins equal is just a wrapper around other functions.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx
index d1ac9bdad4b..be5a23efaa4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx b/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx
index ab64345a3f6..944fc060bfe 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
index c00c7f33cb8..416af9ab8e5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index c5df6600089..ba0eff183af 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -79,7 +79,7 @@ and all files in that bundle must be distributed together.
%
% \title{The \cls{l3doc} class}
% \author{\Team}
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
% \maketitle
% \tableofcontents
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index b9c13c4ef8b..1ae1afc9add 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index fe85c98bd5a..487b32ccafc 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -467,6 +467,7 @@
% \exp_args:NVo,
% \exp_args:Nfo,
% \exp_args:Nff,
+% \exp_args:Nee,
% }
% \begin{syntax}
% \cs{exp_args:Noo} \meta{token} \Arg{tokens_1} \Arg{tokens_2}
@@ -503,7 +504,6 @@
% {
% \exp_args:NNNo,
% \exp_args:NNNV,
-% \exp_args:NNNv,
% \exp_args:Nccc,
% \exp_args:NcNc,
% \exp_args:NcNo,
@@ -1465,6 +1465,7 @@
% \exp_last_unbraced:No,
% \exp_last_unbraced:NV,
% \exp_last_unbraced:Nv,
+% \exp_last_unbraced:Ne,
% \exp_last_unbraced:Nf,
% \exp_last_unbraced:NNo,
% \exp_last_unbraced:NNV,
@@ -2793,7 +2794,7 @@
% {
% \exp_args:Nnc, \exp_args:Nno, \exp_args:NnV, \exp_args:Nnv, \exp_args:Nne, \exp_args:Nnf,
% \exp_args:Noc, \exp_args:Noo, \exp_args:Nof,
-% \exp_args:NVo, \exp_args:Nfo, \exp_args:Nff,
+% \exp_args:NVo, \exp_args:Nfo, \exp_args:Nff, \exp_args:Nee
% }
% \begin{macro}
% {
@@ -2823,6 +2824,7 @@
\@@_tmp:w { Vo }
\@@_tmp:w { fo }
\@@_tmp:w { ff }
+\@@_tmp:w { ee }
\@@_tmp:w { Nx }
\@@_tmp:w { cx }
\@@_tmp:w { nx }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 5dd15d0e3d3..c9c1fd72eea 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -1043,11 +1043,18 @@
%</package>
}
\cs_generate_variant:Nn \__kernel_ior_open:Nn { No }
-\cs_new_protected:Npn \@@_open_stream:Nn #1#2
+% \end{macrocode}
+% Here, we act defensively in case \LuaTeX{} is in use with an
+% extensionless file name.
+% \begin{macrocode}
+\cs_new_protected:Npx \@@_open_stream:Nn #1#2
{
- \tex_global:D \tex_chardef:D #1 = \l_@@_stream_tl \scan_stop:
- \prop_gput:NVn \g_@@_streams_prop #1 {#2}
- \tex_openin:D #1 #2 \scan_stop:
+ \tex_global:D \tex_chardef:D #1 = \exp_not:N \l_@@_stream_tl \scan_stop:
+ \prop_gput:NVn \exp_not:N \g_@@_streams_prop #1 {#2}
+ \tex_openin:D #1
+ \sys_if_engine_luatex:TF
+ { {#2} }
+ { #2 \scan_stop: }
}
% \end{macrocode}
% \end{macro}
@@ -2251,25 +2258,12 @@
% \g_file_curr_ext_str ,
% \g_file_curr_name_str
% }
-% The name of the current file should be available at all times.
-% For the format the file name needs to be picked up at the start of the
-% run. In \LaTeXe{} package mode the current file name is collected from
-% \tn{@currname}.
+% The name of the current file should be available at all times:
+% the name itself is set dynamically.
% \begin{macrocode}
\str_new:N \g_file_curr_dir_str
\str_new:N \g_file_curr_ext_str
\str_new:N \g_file_curr_name_str
-%<*initex>
-\tex_everyjob:D \exp_after:wN
- {
- \tex_the:D \tex_everyjob:D
- \str_gset:Nx \g_file_curr_name_str { \tex_jobname:D }
- }
-%</initex>
-%<*package>
-\cs_if_exist:NT \@currname
- { \str_gset_eq:NN \g_file_curr_name_str \@currname }
-%</package>
% \end{macrocode}
% \end{variable}
%
@@ -2278,7 +2272,8 @@
% mode we can recover the information from the details held by
% \LaTeXe{} (we must be in the preamble and loaded using \tn{usepackage}
% or \tn{RequirePackage}). As \LaTeXe{} doesn't store directory and
-% name separately, we stick to the same convention here.
+% name separately, we stick to the same convention here. In pre-loading,
+% \tn{@currnamestack} is empty so is skipped.
% \begin{macrocode}
\seq_new:N \g_@@_stack_seq
%<*package>
@@ -2301,7 +2296,10 @@
}
}
\cs_if_exist:NT \@currnamestack
- { \exp_after:wN \@@_tmp:w \@currnamestack }
+ {
+ \tl_if_empty:NF \@currnamestack
+ { \exp_after:wN \@@_tmp:w \@currnamestack }
+ }
\group_end:
%</package>
% \end{macrocode}
@@ -2642,9 +2640,27 @@
\cs_new:Npx \@@_file_ext_check_auxiii:nw #1#2 . #3 . #4 \q_stop
{
\exp_not:N \quark_if_nil:nTF {#3}
- { \exp_not:N \__kernel_file_name_quote:n { #1 \tl_to_str:n { .tex } } }
+ {
+ \exp_not:N \exp_args:Nee \exp_not:N \@@_file_ext_check_auxiv:nn
+ { \exp_not:N \__kernel_file_name_quote:n {#1} }
+ {
+ \exp_not:N \__kernel_file_name_quote:n
+ { #1 \tl_to_str:n { .tex } }
+ }
+ }
{#1}
}
+\cs_new:Npn \@@_file_ext_check_auxiv:nn #1#2
+ {
+ \tl_if_blank:eTF { \@@_file_size:n {#2} }
+ {#1}
+ {
+ \int_compare:nNnTF
+ { \@@_file_size:n {#1} } = { \@@_file_size:n {#2} }
+ {#2}
+ {#1}
+ }
+ }
% \end{macrocode}
% Deal with the fact that the primitive might not be available.
% \begin{macrocode}
@@ -2816,7 +2832,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}
+% \begin{macro}[noTF]
% {\file_get_mdfive_hash:nN, \file_get_size:nN, \file_get_timestamp:nN}
% \begin{macro}{\@@_get_details:nnN}
% Non-expandable wrappers around the above in the case where appropriate
@@ -3073,7 +3089,7 @@
\str_gset_eq:NN \g_file_curr_ext_str \l_@@_ext_str
}
%<*package>
-\cs_new_eq:NN \__kernel_file_input_push:n \__file_input_push:n
+\cs_new_eq:NN \__kernel_file_input_push:n \@@_input_push:n
%</package>
\cs_new_protected:Npn \@@_input_pop:
{
@@ -3081,7 +3097,7 @@
\exp_after:wN \@@_input_pop:nnn \l_@@_internal_tl
}
%<*package>
-\cs_new_eq:NN \__kernel_file_input_pop: \__file_input_pop:
+\cs_new_eq:NN \__kernel_file_input_pop: \@@_input_pop:
%</package>
\cs_new_protected:Npn \@@_input_pop:nnn #1#2#3
{
@@ -3191,14 +3207,17 @@
% \cs{g_@@_record_seq}.
% \begin{macrocode}
%<*package>
-\AtBeginDocument
- {
- \exp_args:NNx \seq_set_from_clist:Nn \l_@@_tmp_seq
- { \tl_to_str:N \@filelist }
- \seq_gconcat:NNN
- \g_@@_record_seq
- \g_@@_record_seq
- \l_@@_tmp_seq
+\cs_if_exist:NT \@filelist
+ {
+ \AtBeginDocument
+ {
+ \exp_args:NNx \seq_set_from_clist:Nn \l_@@_tmp_seq
+ { \tl_to_str:N \@filelist }
+ \seq_gconcat:NNN
+ \g_@@_record_seq
+ \g_@@_record_seq
+ \l_@@_tmp_seq
+ }
}
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index 520a329e0db..ebf24ce777a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
index 62f903934b4..f94b5d7c5b3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
index 5262f680b8b..270b492c52b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
% \maketitle
%
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index 63aafee928d..63d21202bd9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index 8764f0212b4..842f2ec8bd5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index a99f3215a9c..158b16b6183 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index a19698934a6..20cdce74c31 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index 1f267a7479b..f3530ccef75 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index 3db19b3cfba..23b758fa8a5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 11ff1e4f27e..b14d045a2db 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
index 7975aa651c1..ccb2791cabe 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index eb68ec0baf3..e8483b0346a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index f76616eef34..8b0a1735326 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
% \maketitle
%
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index 77af2e71ac3..2354328e8a3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index d4e5b7c31dd..6a6b5803847 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
index 8ca49335b4f..983a0815fb8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index 67c3542e559..280c06652db 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
index b8a33eb677d..883e5ae4018 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -462,7 +462,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\intarray_show:N, \intarray_show:c, \intarray_log:c, \intarray_log:N}
+% \begin{macro}{\intarray_show:N, \intarray_show:c, \intarray_log:N, \intarray_log:c}
% Convert the list to a comma list (with spaces after each comma)
% \begin{macrocode}
\cs_new_protected:Npn \intarray_show:N { \@@_show:NN \msg_show:nnxxxx }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
index 66b763ed7b3..2abd9b28191 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index aa2b4df82c5..6cadb629552 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx b/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx
index ca3c96d85d0..a11c5385bc2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index cbc3d7a4e2f..7a59765ed5c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -328,6 +328,7 @@ local os_clock = os.clock
local os_date = os.date
local setcatcode = tex.setcatcode
local sprint = tex.sprint
+local cprint = tex.cprint
local write = tex.write
% \end{macrocode}
%
@@ -354,15 +355,11 @@ end
% \end{macro}
%
% \begin{macro}{l3kernel.charcat}
-% Creating arbitrary chars needs a category code table. As set up here,
-% one may have been assigned earlier (see \pkg{l3bootstrap}) or a hard-coded
-% one is used. The latter is intended for format mode and should be adjusted
-% to match an eventual allocator.
+% Creating arbitrary chars using |tex.cprint|.
% \begin{macrocode}
-local charcat_table = l3kernel.charcat_table or 1
-local function charcat(charcode, catcode)
- setcatcode(charcat_table, charcode, catcode)
- sprint(charcat_table, utf8_char(charcode))
+local charcat
+function charcat(charcode, catcode)
+ cprint(catcode, utf8_char(charcode))
end
l3kernel.charcat = charcat
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index 79a2ecc5ff5..729e5ca7c44 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index c11c837c6ae..a9b587f9e19 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index f984c3aa766..bddc05a7e36 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 2ab8ea46dfb..9bdc4403c65 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index c828aa1d493..6dac83802c9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
index 8d409b2dc5c..cbc6b1b05be 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 0e66adfd812..e5c5126963e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index 1e3962b3935..f9689fb155e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
index 129bcef4561..3f7ad1f5b95 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx
index 86cf7db4691..9f5dd3ab47f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index b961e89df8b..f09bbb4418d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
index 172d9507eb3..c476e67e232 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
@@ -276,6 +276,16 @@
% back deprecations, respectively.
% \end{function}
%
+% \subsection{Final settins}
+%
+% \begin{function}[added = 2019-10-06]{\sys_finalise:}
+% \begin{syntax}
+% \cs{sys_finalise:}
+% \end{syntax}
+% Finalises all system-dependent functionality: required before loading
+% a backend.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -283,34 +293,16 @@
% \section{\pkg{l3sys} implementation}
%
% \begin{macrocode}
-%<*initex|package>
-% \end{macrocode}
-%
-% \begin{macrocode}
%<@@=sys>
% \end{macrocode}
%
-% \subsection{The name of the job}
+% \subsection{Kernel code}
%
-% \begin{variable}{\c_sys_jobname_str}
-% Inherited from the \LaTeX3 name for the primitive: this needs to
-% actually contain the text of the job name rather than the name of
-% the primitive, of course.
% \begin{macrocode}
-%<*initex>
-\tex_everyjob:D \exp_after:wN
- {
- \tex_the:D \tex_everyjob:D
- \str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
- }
-%</initex>
-%<*package>
-\str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
-%</package>
+%<*initex|package>
% \end{macrocode}
-% \end{variable}
%
-% \subsection{Detecting the engine}
+% \subsubsection{Detecting the engine}
%
% \begin{macro}{\@@_const:nn}
% Set the |T|, |F|, |TF|, |p| forms of |#1| to be constants equal to
@@ -373,89 +365,7 @@
% \end{variable}
% \end{macro}
%
-% \subsection{Time and date}
-%
-% \begin{variable}
-% {
-% \c_sys_minute_int,
-% \c_sys_hour_int,
-% \c_sys_day_int,
-% \c_sys_month_int,
-% \c_sys_year_int,
-% }
-% Copies of the information provided by \TeX{}. There is a lot of defensive
-% code in package mode: someone may have moved the primitives, and they can
-% only be recovered if we have \tn{primitive} and it is working correctly.
-% \begin{macrocode}
-%<*initex>
-\int_const:Nn \c_sys_minute_int
- { \int_mod:nn { \tex_time:D } { 60 } }
-\int_const:Nn \c_sys_hour_int
- { \int_div_truncate:nn { \tex_time:D } { 60 } }
-\int_const:Nn \c_sys_day_int { \tex_day:D }
-\int_const:Nn \c_sys_month_int { \tex_month:D }
-\int_const:Nn \c_sys_year_int { \tex_year:D }
-%</initex>
-%<*package>
-\group_begin:
- \cs_set:Npn \@@_tmp:w #1
- {
- \str_if_eq:eeTF { \cs_meaning:N #1 } { \token_to_str:N #1 }
- { #1 }
- {
- \cs_if_exist:NTF \tex_primitive:D
- {
- \bool_lazy_and:nnTF
- { \sys_if_engine_xetex_p: }
- {
- \int_compare_p:nNn
- { \exp_after:wN \use_none:n \tex_XeTeXrevision:D }
- < { 99999 }
- }
- { 0 }
- { \tex_primitive:D #1 }
- }
- { 0 }
- }
- }
- \int_const:Nn \c_sys_minute_int
- { \int_mod:nn { \@@_tmp:w \time } { 60 } }
- \int_const:Nn \c_sys_hour_int
- { \int_div_truncate:nn { \@@_tmp:w \time } { 60 } }
- \int_const:Nn \c_sys_day_int { \@@_tmp:w \day }
- \int_const:Nn \c_sys_month_int { \@@_tmp:w \month }
- \int_const:Nn \c_sys_year_int { \@@_tmp:w \year }
-\group_end:
-%</package>
-% \end{macrocode}
-% \end{variable}
-%
-% \subsection{Detecting the output}
-%
-% \begin{macro}[pTF, EXP]
-% {
-% \sys_if_output_dvi:,
-% \sys_if_output_pdf:
-% }
-% \begin{variable}{\c_sys_output_str}
-% This is a simple enough concept: the two views here are complementary.
-% \begin{macrocode}
-\str_const:Nx \c_sys_output_str
- {
- \int_compare:nNnTF
- { \cs_if_exist_use:NF \tex_pdfoutput:D { 0 } } > { 0 }
- { pdf }
- { dvi }
- }
-\@@_const:nn { sys_if_output_dvi }
- { \str_if_eq_p:Vn \c_sys_output_str { dvi } }
-\@@_const:nn { sys_if_output_pdf }
- { \str_if_eq_p:Vn \c_sys_output_str { pdf } }
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-%
-% \subsection{Randomness}
+% \subsubsection{Randomness}
%
% This candidate function is placed there because
% \cs{sys_if_rand_exist:TF} is used in \pkg{l3fp-rand}.
@@ -468,7 +378,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Platform}
+% \subsubsection{Platform}
%
% \begin{macro}[pTF]{\sys_if_platform_unix:, \sys_if_platform_windows:}
% \begin{variable}{\c_sys_platform_str}
@@ -477,63 +387,95 @@
% \end{variable}
% \end{macro}
%
-% \subsection{Random numbers}
+% \subsubsection{Configurations}
%
-% \begin{macro}[EXP]{\sys_rand_seed:}
-% Unpack the primitive. When random numbers are not available, we
-% return zero after an error (and incidentally make sure the number of
-% expansions needed is the same as with random numbers available).
+% \begin{macro}{\sys_load_backend:n}
+% \begin{macro}{\@@_load_backend_check:N}
+% \begin{variable}{\c_sys_backend_str}
+% Loading the backend code is pretty simply: check that the backend is valid,
+% then load it up.
% \begin{macrocode}
-\sys_if_rand_exist:TF
- { \cs_new:Npn \sys_rand_seed: { \tex_the:D \tex_randomseed:D } }
+\cs_new_protected:Npn \sys_load_backend:n #1
{
- \cs_new:Npn \sys_rand_seed:
+ \sys_finalise:
+ \str_if_exist:NTF \c_sys_backend_str
+ { \__kernel_msg_error:nn { sys } { backend-set } }
{
- \int_value:w
- \__kernel_msg_expandable_error:nnn { kernel } { fp-no-random }
- { \sys_rand_seed: }
- \c_zero_int
+ \tl_if_blank:nF {#1}
+ { \tl_set:Nn \g_@@_backend_tl {#1} }
+ \@@_load_backend_check:N \g_@@_backend_tl
+ \str_const:Nx \c_sys_backend_str { \g_@@_backend_tl }
+ \__kernel_sys_configuration_load:n
+ { l3backend- \c_sys_backend_str }
}
}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\sys_gset_rand_seed:n}
-% The primitive always assigns the seed globally.
-% \begin{macrocode}
-\sys_if_rand_exist:TF
- {
- \cs_new_protected:Npn \sys_gset_rand_seed:n #1
- { \tex_setrandomseed:D \int_eval:n {#1} \exp_stop_f: }
- }
+\cs_new_protected:Npn \@@_load_backend_check:N #1
{
- \cs_new_protected:Npn \sys_gset_rand_seed:n #1
+ \sys_if_engine_xetex:TF
{
- \__kernel_msg_error:nnn { kernel } { fp-no-random }
- { \sys_gset_rand_seed:n {#1} }
+ \str_if_eq:VnF #1 { xdvipdfmx }
+ {
+ \__kernel_msg_error:nnxx { sys } { wrong-backend }
+ #1 { xdvipdfmx }
+ \tl_gset:Nn #1 { xdvipdfmx }
+ }
+ }
+ {
+ \sys_if_output_pdf:TF
+ {
+ \str_if_eq:VnF #1 { pdfmode }
+ {
+ \__kernel_msg_error:nnxx { sys } { wrong-backend }
+ #1 { pdfmode }
+ \tl_gset:Nn #1 { pdfmode }
+ }
+ }
+ {
+ \str_case:VnF #1
+ {
+ { dvipdfmx } { }
+ { dvips } { }
+ { dvisvgm } { }
+ }
+ {
+ \__kernel_msg_error:nnxx { sys } { wrong-backend }
+ #1 { dvips }
+ \tl_gset:Nn #1 { dvips }
+ }
+ }
}
}
% \end{macrocode}
+% \end{variable}
+% \end{macro}
% \end{macro}
%
-% \subsection{Access to the shell}
+% \begin{variable}{\g_@@_debug_bool, \g_@@_deprecation_bool}
+% \begin{macrocode}
+\bool_new:N \g_@@_debug_bool
+\bool_new:N \g_@@_deprecation_bool
+% \end{macrocode}
+% \end{variable}
%
-% \begin{variable}{\c_sys_shell_escape_int}
-% Expose the engine's shell escape status to the user.
+% \begin{macro}{\sys_load_debug:, \sys_load_deprecation:}
+% Simple.
% \begin{macrocode}
-\int_const:Nn \c_sys_shell_escape_int
+\cs_new_protected:Npn \sys_load_debug:
{
- \sys_if_engine_luatex:TF
- {
- \tex_directlua:D
- { tex.sprint(status.shell_escape~or~os.execute()) }
- }
- {
- \tex_shellescape:D
- }
+ \bool_if:NF \g_@@_debug_bool
+ { \__kernel_sys_configuration_load:n { l3debug } }
+ \bool_gset_true:N \g_@@_debug_bool
+ }
+\cs_new_protected:Npn \sys_load_deprecation:
+ {
+ \bool_if:NF \g_@@_deprecation_bool
+ { \__kernel_sys_configuration_load:n { l3deprecation } }
+ \bool_gset_true:N \g_@@_deprecation_bool
}
% \end{macrocode}
-% \end{variable}
+% \end{macro}
+%
+% \subsubsection{Access to the shell}
%
% \begin{variable}{\l_@@_internal_tl}
% \begin{macrocode}
@@ -597,21 +539,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, pTF]{\sys_if_shell:, \sys_if_shell_unrestricted:, \sys_if_shell_restricted:}
-% Performs a check for whether shell escape is enabled. The first set
-% of functions returns true if either of restricted or unrestricted
-% shell escape is enabled, while the other two sets of functions
-% return true in only one of these two cases.
-% \begin{macrocode}
-\@@_const:nn { sys_if_shell }
- { \int_compare_p:nNn \c_sys_shell_escape_int > 0 }
-\@@_const:nn { sys_if_shell_unrestricted }
- { \int_compare_p:nNn \c_sys_shell_escape_int = 1 }
-\@@_const:nn { sys_if_shell_restricted }
- { \int_compare_p:nNn \c_sys_shell_escape_int = 2 }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{variable}{\c_@@_shell_stream_int}
% This is not needed for \LuaTeX{}: shell escape there isn't done using
% a \TeX{} interface.
@@ -659,117 +586,285 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Configurations}
+% \subsection{Dynamic (every job) code}
%
-% \begin{variable}{\g_@@_backend_tl}
-% As the backend has to be checked and possibly adjusted, the approach here
-% is to create a variable and use that in a one-shot to set a constant.
+% \begin{macro}{\sys_everyjob:}
+% \begin{macro}{\@@_everyjob:n}
+% \begin{variable}{\g_@@_everyjob_tl}
% \begin{macrocode}
-\tl_new:N \g_@@_backend_tl
-\tl_gset:Nx \g_@@_backend_tl
+\cs_new_protected:Npn \sys_everyjob:
{
- \sys_if_engine_xetex:TF
- { xdvipdfmx }
- {
- \sys_if_output_pdf:TF
- { pdfmode }
- {
- \bool_lazy_or:nnTF
- { \sys_if_engine_ptex_p: }
- { \sys_if_engine_uptex_p: }
- { dvipdfmx }
- { dvips }
- }
- }
+ \tl_use:N \g_@@_everyjob_tl
+ \tl_gclear:N \g_@@_everyjob_tl
}
+\cs_new_protected:Npn \@@_everyjob:n #1
+ { \tl_gput_right:Nn \g_@@_everyjob_tl {#1} }
+\tl_new:N \g_@@_everyjob_tl
% \end{macrocode}
% \end{variable}
+% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\sys_load_backend:n}
-% \begin{macro}{\@@_load_backend_check:N}
-% \begin{variable}{\c_sys_backend_str}
-% Loading the backend code is pretty simply: check that the backend is valid,
-% then load it up.
+% \subsubsection{The name of the job}
+%
+% \begin{variable}{\c_sys_jobname_str}
+% Inherited from the \LaTeX3 name for the primitive: this needs to
+% actually contain the text of the job name rather than the name of
+% the primitive, of course.
% \begin{macrocode}
-\cs_new_protected:Npn \sys_load_backend:n #1
+\@@_everyjob:n
+ { \str_const:Nx \c_sys_jobname_str { \tex_jobname:D } }
+% \end{macrocode}
+% \end{variable}
+%
+% \subsubsection{Time and date}
+%
+% \begin{variable}
+% {
+% \c_sys_minute_int,
+% \c_sys_hour_int,
+% \c_sys_day_int,
+% \c_sys_month_int,
+% \c_sys_year_int,
+% }
+% Copies of the information provided by \TeX{}. There is a lot of defensive
+% code in package mode: someone may have moved the primitives, and they can
+% only be recovered if we have \tn{primitive} and it is working correctly.
+% For Ini\TeX{} of course that is all redundant but does no harm.
+% \begin{macrocode}
+\@@_everyjob:n
{
- \str_if_exist:NTF \c_sys_backend_str
- { \__kernel_msg_error:nnxx { sys } { backend-set } }
- {
- \tl_if_blank:nF {#1}
- { \tl_set:Nn \g_@@_backend_tl {#1} }
- \@@_load_backend_check:N \g_@@_backend_tl
- \str_const:Nx \c_sys_backend_str { \g_@@_backend_tl }
- \__kernel_sys_configuration_load:n
- { l3backend- \c_sys_backend_str }
- }
+ \group_begin:
+ \cs_set:Npn \@@_tmp:w #1
+ {
+ \str_if_eq:eeTF { \cs_meaning:N #1 } { \token_to_str:N #1 }
+ { #1 }
+ {
+ \cs_if_exist:NTF \tex_primitive:D
+ {
+ \bool_lazy_and:nnTF
+ { \sys_if_engine_xetex_p: }
+ {
+ \int_compare_p:nNn
+ { \exp_after:wN \use_none:n \tex_XeTeXrevision:D }
+ < { 99999 }
+ }
+ { 0 }
+ { \tex_primitive:D #1 }
+ }
+ { 0 }
+ }
+ }
+ \int_const:Nn \c_sys_minute_int
+ { \int_mod:nn { \@@_tmp:w \time } { 60 } }
+ \int_const:Nn \c_sys_hour_int
+ { \int_div_truncate:nn { \@@_tmp:w \time } { 60 } }
+ \int_const:Nn \c_sys_day_int { \@@_tmp:w \day }
+ \int_const:Nn \c_sys_month_int { \@@_tmp:w \month }
+ \int_const:Nn \c_sys_year_int { \@@_tmp:w \year }
+ \group_end:
}
-\cs_new_protected:Npn \@@_load_backend_check:N #1
+% \end{macrocode}
+% \end{variable}
+%
+% \subsubsection{Random numbers}
+%
+% \begin{macro}[EXP]{\sys_rand_seed:}
+% Unpack the primitive. When random numbers are not available, we
+% return zero after an error (and incidentally make sure the number of
+% expansions needed is the same as with random numbers available).
+% \begin{macrocode}
+\@@_everyjob:n
{
- \sys_if_engine_xetex:TF
+ \sys_if_rand_exist:TF
+ { \cs_new:Npn \sys_rand_seed: { \tex_the:D \tex_randomseed:D } }
{
- \str_if_eq:VnF #1 { xdvipdfmx }
+ \cs_new:Npn \sys_rand_seed:
{
- \__kernel_msg_error:nnxx { sys } { wrong-backend }
- #1 { xdvipdfmx }
- \tl_gset:Nn #1 { xdvipdfmx }
+ \int_value:w
+ \__kernel_msg_expandable_error:nnn { kernel } { fp-no-random }
+ { \sys_rand_seed: }
+ \c_zero_int
}
}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sys_gset_rand_seed:n}
+% The primitive always assigns the seed globally.
+% \begin{macrocode}
+\@@_everyjob:n
+ {
+ \sys_if_rand_exist:TF
{
- \sys_if_output_pdf:TF
+ \cs_new_protected:Npn \sys_gset_rand_seed:n #1
+ { \tex_setrandomseed:D \int_eval:n {#1} \exp_stop_f: }
+ }
+ {
+ \cs_new_protected:Npn \sys_gset_rand_seed:n #1
{
- \str_if_eq:VnF #1 { pdfmode }
- {
- \__kernel_msg_error:nnxx { sys } { wrong-backend }
- #1 { pdfmode }
- \tl_gset:Nn #1 { pdfmode }
- }
+ \__kernel_msg_error:nnn { kernel } { fp-no-random }
+ { \sys_gset_rand_seed:n {#1} }
}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Access to the shell}
+%
+% \begin{variable}{\c_sys_shell_escape_int}
+% Expose the engine's shell escape status to the user.
+% \begin{macrocode}
+\@@_everyjob:n
+ {
+ \int_const:Nn \c_sys_shell_escape_int
+ {
+ \sys_if_engine_luatex:TF
{
- \str_case:VnF #1
- {
- { dvipdfmx } { }
- { dvips } { }
- { dvisvgm } { }
- }
- {
- \__kernel_msg_error:nnxx { sys } { wrong-backend }
- #1 { dvips }
- \tl_gset:Nn #1 { dvips }
- }
+ \tex_directlua:D
+ { tex.sprint(status.shell_escape~or~os.execute()) }
}
+ { \tex_shellescape:D }
}
}
% \end{macrocode}
% \end{variable}
-% \end{macro}
+%
+% \begin{macro}[EXP, pTF]{\sys_if_shell:, \sys_if_shell_unrestricted:, \sys_if_shell_restricted:}
+% Performs a check for whether shell escape is enabled. The first set
+% of functions returns true if either of restricted or unrestricted
+% shell escape is enabled, while the other two sets of functions
+% return true in only one of these two cases.
+% \begin{macrocode}
+\@@_everyjob:n
+ {
+ \@@_const:nn { sys_if_shell }
+ { \int_compare_p:nNn \c_sys_shell_escape_int > 0 }
+ \@@_const:nn { sys_if_shell_unrestricted }
+ { \int_compare_p:nNn \c_sys_shell_escape_int = 1 }
+ \@@_const:nn { sys_if_shell_restricted }
+ { \int_compare_p:nNn \c_sys_shell_escape_int = 2 }
+ }
+% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{\g_@@_debug_bool, \g_@@_deprecation_bool}
+% \subsubsection{Held over from \pkg{l3file}}
+%
+% \begin{variable}{\g_file_curr_name_str}
% \begin{macrocode}
-\bool_new:N \g_@@_debug_bool
-\bool_new:N \g_@@_deprecation_bool
+\@@_everyjob:n
+ { \str_gset:Nx \g_file_curr_name_str { \tex_jobname:D } }
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\sys_load_debug:, \sys_load_deprecation:}
-% Simple.
+% \subsection{Last-minute code}
+%
+% \begin{macro}{\sys_finalise:}
+% \begin{macro}{\@@_finalise:n}
+% \begin{variable}{\g_@@_finalise_tl}
+% A simple hook to finalise the system-dependent layer. This is forced by
+% the backend loader, which is forced by the main loader, so we do not need
+% to include that here.
% \begin{macrocode}
-\cs_new_protected:Npn \sys_load_debug:
+\cs_new_protected:Npn \sys_finalise:
{
- \bool_if:NF \g_@@_debug_bool
- { \__kernel_sys_configuration_load:n { l3debug } }
- \bool_gset_true:N \g_@@_debug_bool
+ \sys_everyjob:
+ \tl_use:N \g_@@_finalise_tl
+ \tl_gclear:N \g_@@_finalise_tl
}
-\cs_new_protected:Npn \sys_load_deprecation:
+\cs_new_protected:Npn \@@_finalise:n #1
+ { \tl_gput_right:Nn \g_@@_finalise_tl {#1} }
+\tl_new:N \g_@@_finalise_tl
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Detecting the output}
+%
+% \begin{macro}[pTF, EXP]
+% {
+% \sys_if_output_dvi:,
+% \sys_if_output_pdf:
+% }
+% \begin{variable}{\c_sys_output_str}
+% This is a simple enough concept: the two views here are complementary.
+% \begin{macrocode}
+\@@_finalise:n
{
- \bool_if:NF \g_@@_deprecation_bool
- { \__kernel_sys_configuration_load:n { l3deprecation } }
- \bool_gset_true:N \g_@@_deprecation_bool
+ \str_const:Nx \c_sys_output_str
+ {
+ \int_compare:nNnTF
+ { \cs_if_exist_use:NF \tex_pdfoutput:D { 0 } } > { 0 }
+ { pdf }
+ { dvi }
+ }
+ \@@_const:nn { sys_if_output_dvi }
+ { \str_if_eq_p:Vn \c_sys_output_str { dvi } }
+ \@@_const:nn { sys_if_output_pdf }
+ { \str_if_eq_p:Vn \c_sys_output_str { pdf } }
}
% \end{macrocode}
+% \end{variable}
% \end{macro}
%
+% \subsubsection{Configurations}
+%
+% If there is a class option set, and recognised, we pick it up: these
+% will over-ride anything set automatically but will themsevles be
+% over-written if there is a package option.
+% \begin{macrocode}
+\@@_finalise:n
+ {
+ \cs_if_exist:NT \@classoptionslist
+ {
+ \cs_if_eq:NNF \@classoptionslist \scan_stop:
+ {
+ \clist_map_inline:Nn \@classoptionslist
+ {
+ \str_case:nnT {#1}
+ {
+ { dvipdfmx }
+ { \tl_gset:Nn \g_@@_backend_tl { dvipdfmx } }
+ { dvips }
+ { \tl_gset:Nn \g_@@_backend_tl { dvips } }
+ { dvisvgm }
+ { \tl_gset:Nn \g_@@_backend_tl { dvisvgm } }
+ { pdftex }
+ { \tl_gset:Nn \g_@@_backend_tl { pdfmode } }
+ { xetex }
+ { \tl_gset:Nn \g_@@_backend_tl { xdvipdfmx } }
+ }
+ { \clist_remove_all:Nn \@unusedoptionlist {#1} }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{variable}{\g_@@_backend_tl}
+% As the backend has to be checked and possibly adjusted, the approach here
+% is to create a variable and use that in a one-shot to set a constant.
+% \begin{macrocode}
+\tl_new:N \g_@@_backend_tl
+\@@_finalise:n
+ {
+ \tl_gset:Nx \g_@@_backend_tl
+ {
+ \sys_if_engine_xetex:TF
+ { xdvipdfmx }
+ {
+ \sys_if_output_pdf:TF
+ { pdfmode }
+ { dvips }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
index 3e34bfd8f90..2cd92799738 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index c6eb6aa3f28..adec7596ff6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 51c7b597f05..b8759fbce42 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
index 78d3f1bdb96..8452f2df6ff 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-10-11}
%
% \maketitle
%