diff options
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3file.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3file.dtx | 358 |
1 files changed, 235 insertions, 123 deletions
diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index 1c1401e392..2d2ae6a183 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-08-29} +% \date{Released 2023-10-10} % % \maketitle % @@ -448,7 +448,10 @@ % \subsection{Writing to files} % % \begin{function}[updated = 2012-06-05] -% {\iow_now:Nn, \iow_now:NV, \iow_now:Nx, \iow_now:cn, \iow_now:cV, \iow_now:cx} +% { +% \iow_now:Nn, \iow_now:NV, \iow_now:Ne, +% \iow_now:cn, \iow_now:cV, \iow_now:ce +% } % \begin{syntax} % \cs{iow_now:Nn} \meta{stream} \Arg{tokens} % \end{syntax} @@ -457,7 +460,7 @@ % on expansion of \cs{iow_now:Nn}). % \end{function} % -% \begin{function}{\iow_log:n, \iow_log:x} +% \begin{function}{\iow_log:n, \iow_log:e} % \begin{syntax} % \cs{iow_log:n} \Arg{tokens} % \end{syntax} @@ -465,7 +468,7 @@ % file immediately: it is a dedicated version of \cs{iow_now:Nn}. % \end{function} % -% \begin{function}{\iow_term:n, \iow_term:x} +% \begin{function}{\iow_term:n, \iow_term:e} % \begin{syntax} % \cs{iow_term:n} \Arg{tokens} % \end{syntax} @@ -475,8 +478,8 @@ % % \begin{function} % { -% \iow_shipout:Nn, \iow_shipout:Nx, -% \iow_shipout:cn, \iow_shipout:cx +% \iow_shipout:Nn, \iow_shipout:Ne, +% \iow_shipout:cn, \iow_shipout:ce % } % \begin{syntax} % \cs{iow_shipout:Nn} \meta{stream} \Arg{tokens} @@ -486,7 +489,7 @@ % shipout). The \texttt{x}-type variants expand the \meta{tokens} % at the point where the function is used but \emph{not} when the % resulting tokens are written to the \meta{stream} -% (\emph{cf.}~\cs{iow_shipout_x:Nn}). +% (\emph{cf.}~\cs{iow_shipout_e:Nn}). % \begin{texnote} % When using \pkg{expl3} with a format other than \LaTeX{}, new line % characters inserted using \cs{iow_newline:} or using the @@ -496,13 +499,13 @@ % \end{texnote} % \end{function} % -% \begin{function}[updated = 2012-09-08] +% \begin{function}[updated = 2023-09-17] % { -% \iow_shipout_x:Nn, \iow_shipout_x:Nx, -% \iow_shipout_x:cn, \iow_shipout_x:cx +% \iow_shipout_e:Nn, \iow_shipout_e:Ne, +% \iow_shipout_e:cn, \iow_shipout_e:ce % } % \begin{syntax} -% \cs{iow_shipout_x:Nn} \meta{stream} \Arg{tokens} +% \cs{iow_shipout_e:Nn} \meta{stream} \Arg{tokens} % \end{syntax} % This function writes \meta{tokens} to the specified % \meta{stream} when the current page is finalised (\emph{i.e.}~at @@ -528,7 +531,7 @@ % write difficult characters such as |%|, |{|, |}|, % \emph{etc.}~in messages, for example: % \begin{verbatim} -% \iow_now:Nx \g_my_iow { \iow_char:N \{ text \iow_char:N \} } +% \iow_now:Ne \g_my_iow { \iow_char:N \{ text \iow_char:N \} } % \end{verbatim} % The function has no effect if writing is taking place without % expansion (\emph{e.g.}~in the second argument of \cs{iow_now:Nn}). @@ -546,14 +549,14 @@ % character inserted by \cs{iow_newline:} is not recognized by % \TeX{}, which may lead to the insertion of additional unwanted % line-breaks. This issue only affects \cs{iow_shipout:Nn}, -% \cs{iow_shipout_x:Nn} and direct uses of primitive operations. +% \cs{iow_shipout_e:Nn} and direct uses of primitive operations. % \end{texnote} % \end{function} % % \subsection{Wrapping lines in output} % % \begin{function}[added = 2012-06-28, updated = 2017-12-04] -% {\iow_wrap:nnnN, \iow_wrap:nxnN} +% {\iow_wrap:nnnN, \iow_wrap:nenN} % \begin{syntax} % \cs{iow_wrap:nnnN} \Arg{text} \Arg{run-on text} \Arg{set up} \meta{function} % \end{syntax} @@ -705,8 +708,10 @@ % \end{texnote} % \end{variable} % -% \begin{function}[TF, updated = 2012-02-10]{\file_if_exist:n, \file_if_exist:V} +% \begin{function}[EXP, pTF, updated = 2023-09-18] +% {\file_if_exist:n, \file_if_exist:V} % \begin{syntax} +% \cs{file_if_exist_p:n} \Arg{file name} % \cs{file_if_exist:nTF} \Arg{file name} \Arg{true code} \Arg{false code} % \end{syntax} % Searches for \meta{file name} using the current \TeX{} search @@ -714,7 +719,8 @@ % \cs{l_file_search_path_seq}. % \end{function} % -% \begin{function}[noTF, added = 2019-01-16, updated = 2019-02-16]{\file_get:nnN} +% \begin{function}[noTF, added = 2019-01-16, updated = 2019-02-16] +% {\file_get:nnN, \file_get:VnN} % \begin{syntax} % \cs{file_get:nnN} \Arg{filename} \Arg{setup} \meta{tl} % \cs{file_get:nnNTF} \Arg{filename} \Arg{setup} \meta{tl} \Arg{true code} \Arg{false code} @@ -782,7 +788,8 @@ % Quotes (|"|) are invalid in file names and are discarded from the input. % \end{function} % -% \begin{function}[EXP, added = 2020-06-24]{\file_parse_full_name:n} +% \begin{function}[EXP, added = 2020-06-24] +% {\file_parse_full_name:n, \file_parse_full_name:V} % \begin{syntax} % \cs{file_parse_full_name:n} \Arg{full name} % \end{syntax} @@ -791,7 +798,8 @@ % each inside a pair of braces. % \end{function} % -% \begin{function}[EXP, added = 2020-06-24]{\file_parse_full_name_apply:nN} +% \begin{function}[EXP, added = 2020-06-24] +% {\file_parse_full_name_apply:nN, \file_parse_full_name_apply:VN} % \begin{syntax} % \cs{file_parse_full_name_apply:nN} \Arg{full name} \meta{function} % \end{syntax} @@ -801,7 +809,10 @@ % \end{function} % % \begin{function}[rEXP, added = 2019-11-19] -% {\file_hex_dump:n, \file_hex_dump:nnn} +% { +% \file_hex_dump:n, \file_hex_dump:V, +% \file_hex_dump:nnn, \file_hex_dump:Vnn +% } % \begin{syntax} % \cs{file_hex_dump:n} \Arg{file name} % \cs{file_hex_dump:nnn} \Arg{file name} \Arg{start index} \Arg{end index} @@ -819,7 +830,10 @@ % \end{function} % % \begin{function}[noTF, added = 2019-11-19] -% {\file_get_hex_dump:nN, \file_get_hex_dump:nnnN} +% { +% \file_get_hex_dump:nN, \file_get_hex_dump:VN, +% \file_get_hex_dump:nnnN, \file_get_hex_dump:VnnN +% } % \begin{syntax} % \cs{file_get_hex_dump:nN} \Arg{file name} \meta{tl var} % \cs{file_get_hex_dump:nnnN} \Arg{file name} \Arg{start index} \Arg{end index} \meta{tl var} @@ -829,7 +843,8 @@ % If the file is not found, the \meta{tl var} will be set to \cs{q_no_value}. % \end{function} % -% \begin{function}[rEXP, added = 2019-09-03]{\file_mdfive_hash:n} +% \begin{function}[rEXP, added = 2019-09-03] +% {\file_mdfive_hash:n, \file_mdfive_hash:V} % \begin{syntax} % \cs{file_mdfive_hash:n} \Arg{file name} % \end{syntax} @@ -845,7 +860,7 @@ % \end{function} % % \begin{function}[noTF, added = 2017-07-11, updated = 2019-02-16] -% {\file_get_mdfive_hash:nN} +% {\file_get_mdfive_hash:nN, \file_get_mdfive_hash:VN} % \begin{syntax} % \cs{file_get_mdfive_hash:nN} \Arg{file name} \meta{tl var} % \end{syntax} @@ -854,7 +869,7 @@ % the \meta{tl var} will be set to \cs{q_no_value}. % \end{function} % -% \begin{function}[rEXP, added = 2019-09-03]{\file_size:n} +% \begin{function}[rEXP, added = 2019-09-03]{\file_size:n, \file_size:V} % \begin{syntax} % \cs{file_size:n} \Arg{file name} % \end{syntax} @@ -865,7 +880,7 @@ % \end{function} % % \begin{function}[noTF, added = 2017-07-09, updated = 2019-02-16] -% {\file_get_size:nN} +% {\file_get_size:nN, \file_get_size:VN} % \begin{syntax} % \cs{file_get_size:nN} \Arg{file name} \meta{tl var} % \end{syntax} @@ -875,7 +890,8 @@ % This is not available in older versions of \XeTeX{}. % \end{function} % -% \begin{function}[rEXP, added = 2019-09-03]{\file_timestamp:n} +% \begin{function}[rEXP, added = 2019-09-03] +% {\file_timestamp:n, \file_timestamp:V} % \begin{syntax} % \cs{file_timestamp:n} \Arg{file name} % \end{syntax} @@ -891,7 +907,7 @@ % \end{function} % % \begin{function}[noTF, added = 2017-07-09, updated = 2019-02-16] -% {\file_get_timestamp:nN} +% {\file_get_timestamp:nN, \file_get_timestamp:VN} % \begin{syntax} % \cs{file_get_timestamp:nN} \Arg{file name} \meta{tl var} % \end{syntax} @@ -902,7 +918,12 @@ % \end{function} % % \begin{function}[added = 2019-05-13, updated = 2019-09-20, pTF, EXP] -% {\file_compare_timestamp:nNn} +% { +% \file_compare_timestamp:nNn, +% \file_compare_timestamp:nNV, +% \file_compare_timestamp:VNn, +% \file_compare_timestamp:VNV +% } % \begin{syntax} % \cs{file_compare_timestamp_p:nNn} \Arg{file-1} \meta{comparator} \Arg{file-2} % \cs{file_compare_timestamp:nNnTF} \Arg{file-1} \meta{comparator} \Arg{file-2} \Arg{true code} \Arg{false code} @@ -935,7 +956,8 @@ % function. An error is raised if the file is not found. % \end{function} % -% \begin{function}[added = 2023-05-18, EXP]{\file_input_raw:n} +% \begin{function}[added = 2023-05-18, EXP] +% {\file_input_raw:n, \file_input_raw:V} % \begin{syntax} % \cs{file_input_raw:n} \Arg{file name} % \end{syntax} @@ -950,7 +972,13 @@ % \end{texnote} % \end{function} % -% \begin{function}[added = 2014-07-02]{\file_if_exist_input:n, \file_if_exist_input:nF} +% \begin{function}[added = 2014-07-02] +% { +% \file_if_exist_input:n, +% \file_if_exist_input:V, +% \file_if_exist_input:nF, +% \file_if_exist_input:VF +% } % \begin{syntax} % \cs{file_if_exist_input:n} \Arg{file name} % \cs{file_if_exist_input:nF} \Arg{file name} \Arg{false code} @@ -1169,7 +1197,7 @@ { \@@_open_stream:Nn #1 {#2} } { \@@_new:N #1 - \__kernel_tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} } + \__kernel_tl_set:Ne \l_@@_stream_tl { \int_eval:n {#1} } \@@_open_stream:Nn #1 {#2} } } @@ -1178,7 +1206,7 @@ % 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 +\cs_new_protected:Npe \@@_open_stream:Nn #1#2 { \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} @@ -1192,7 +1220,7 @@ % \end{macro} % % \begin{macro}{\ior_shell_open:Nn} -% \begin{macro}{\@@_shell_open:nN} +% \begin{macro}{\@@_shell_open:nN, \@@_shell_open:oN} % Actually much easier than either the standard open or input versions! % When calling \cs{__kernel_ior_open:Nn} the file the pipe is added to % signal a shell command, but the quotes are not added yet---they are @@ -1201,18 +1229,19 @@ \cs_new_protected:Npn \ior_shell_open:Nn #1#2 { \sys_if_shell:TF - { \exp_args:No \@@_shell_open:nN { \tl_to_str:n {#2} } #1 } + { \@@_shell_open:oN { \tl_to_str:n {#2} } #1 } { \msg_error:nn { kernel } { pipe-failed } } } \cs_new_protected:Npn \@@_shell_open:nN #1#2 { \tl_if_in:nnTF {#1} { " } { - \msg_error:nnx + \msg_error:nne { kernel } { quote-in-shell } {#1} } { \__kernel_ior_open:Nn #2 { |#1 } } } +\cs_generate_variant:Nn \@@_shell_open:nN { o } \msg_new:nnnn { kernel } { pipe-failed } { Cannot~run~piped~system~commands. } { @@ -1259,10 +1288,10 @@ { \prop_get:NVNTF \g_@@_streams_prop #2 \l_@@_internal_tl { - \exp_args:Nx #1 + \exp_args:Ne #1 { \token_to_str:N #2 ~ open: ~ \l_@@_internal_tl } } - { \exp_args:Nx #1 { \token_to_str:N #2 ~ closed } } + { \exp_args:Ne #1 { \token_to_str:N #2 ~ closed } } } } % \end{macrocode} @@ -1278,8 +1307,8 @@ % \texttt{show-streams} takes care of translating |ior|/|iow| to % English. % \begin{macrocode} -\cs_new_protected:Npn \ior_show_list: { \@@_list:N \msg_show:nnxxxx } -\cs_new_protected:Npn \ior_log_list: { \@@_list:N \msg_log:nnxxxx } +\cs_new_protected:Npn \ior_show_list: { \@@_list:N \msg_show:nneeee } +\cs_new_protected:Npn \ior_log_list: { \@@_list:N \msg_log:nneeee } \cs_new_protected:Npn \@@_list:N #1 { #1 { kernel } { show-streams } @@ -1643,14 +1672,14 @@ % \begin{macrocode} \cs_new_protected:Npn \iow_open:Nn #1#2 { - \__kernel_tl_set:Nx \l_@@_file_name_tl + \__kernel_tl_set:Ne \l_@@_file_name_tl { \__kernel_file_name_sanitize:n {#2} } \iow_close:N #1 \seq_gpop:NNTF \g_@@_streams_seq \l_@@_stream_tl { \@@_open_stream:NV #1 \l_@@_file_name_tl } { \@@_new:N #1 - \__kernel_tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} } + \__kernel_tl_set:Ne \l_@@_stream_tl { \int_eval:n {#1} } \@@_open_stream:NV #1 \l_@@_file_name_tl } } @@ -1668,24 +1697,25 @@ % \end{macro} % % \begin{macro}{\iow_shell_open:Nn} -% \begin{macro}{\@@_shell_open:nN} +% \begin{macro}{\@@_shell_open:nN, \@@_shell_open:oN} % Very similar to the \texttt{ior} version % \begin{macrocode} \cs_new_protected:Npn \iow_shell_open:Nn #1#2 { \sys_if_shell:TF - { \exp_args:No \@@_shell_open:nN { \tl_to_str:n {#2} } #1 } + { \@@_shell_open:oN { \tl_to_str:n {#2} } #1 } { \msg_error:nn { kernel } { pipe-failed } } } \cs_new_protected:Npn \@@_shell_open:nN #1#2 { \tl_if_in:nnTF {#1} { " } { - \msg_error:nnx + \msg_error:nne { kernel } { quote-in-shell } {#1} } { \__kernel_iow_open:Nn #2 { |#1 } } } +\cs_generate_variant:Nn \@@_shell_open:nN { o } % \end{macrocode} % \end{macro} % \end{macro} @@ -1725,10 +1755,10 @@ { \prop_get:NVNTF \g_@@_streams_prop #2 \l_@@_internal_tl { - \exp_args:Nx #1 + \exp_args:Ne #1 { \token_to_str:N #2 ~ open: ~ \l_@@_internal_tl } } - { \exp_args:Nx #1 { \token_to_str:N #2 ~ closed } } + { \exp_args:Ne #1 { \token_to_str:N #2 ~ closed } } } } % \end{macrocode} @@ -1738,8 +1768,8 @@ % \begin{macro}{\@@_list:N} % Done as for input, but with a copy of the auxiliary so the name is correct. % \begin{macrocode} -\cs_new_protected:Npn \iow_show_list: { \@@_list:N \msg_show:nnxxxx } -\cs_new_protected:Npn \iow_log_list: { \@@_list:N \msg_log:nnxxxx } +\cs_new_protected:Npn \iow_show_list: { \@@_list:N \msg_show:nneeee } +\cs_new_protected:Npn \iow_log_list: { \@@_list:N \msg_log:nneeee } \cs_new_protected:Npn \@@_list:N #1 { #1 { kernel } { show-streams } @@ -1756,29 +1786,40 @@ % % \subsubsection{Deferred writing} % -% \begin{macro}{\iow_shipout_x:Nn, \iow_shipout_x:Nx, \iow_shipout_x:cn, \iow_shipout_x:cx} +% \begin{macro} +% { +% \iow_shipout_e:Nn, \iow_shipout_e:Ne, +% \iow_shipout_e:cn, \iow_shipout_e:ce +% } % First the easy part, this is the primitive, which expects its % argument to be braced. % \begin{macrocode} -\cs_new_protected:Npn \iow_shipout_x:Nn #1#2 +\cs_new_protected:Npn \iow_shipout_e:Nn #1#2 { \tex_write:D #1 {#2} } -\cs_generate_variant:Nn \iow_shipout_x:Nn { c, Nx, cx } +\cs_generate_variant:Nn \iow_shipout_e:Nn { Ne , c, ce } % \end{macrocode} % \end{macro} % -% \begin{macro}{\iow_shipout:Nn, \iow_shipout:Nx, \iow_shipout:cn, \iow_shipout:cx} +% \begin{macro} +% { +% \iow_shipout:Nn, \iow_shipout:Ne, +% \iow_shipout:Nx, +% \iow_shipout:cn, \iow_shipout:ce, +% \iow_shipout:cx +% } % With \eTeX{} available deferred writing without expansion is easy. % \begin{macrocode} \cs_new_protected:Npn \iow_shipout:Nn #1#2 { \tex_write:D #1 { \exp_not:n {#2} } } -\cs_generate_variant:Nn \iow_shipout:Nn { c, Nx, cx } +\cs_generate_variant:Nn \iow_shipout:Nn { Ne , c, ce } +\cs_generate_variant:Nn \iow_shipout:Nn { Nx , cx } % \end{macrocode} % \end{macro} % % \subsubsection{Immediate writing} % % \begin{macro}{\__kernel_iow_with:Nnn} -% \begin{macro}{\@@_with:nNnn} +% \begin{macro}{\@@_with:nNnn, \@@_with:oNnn} % If the integer~|#1| is equal to~|#2|, just leave~|#3| in the input % stream. Otherwise, pass the old value to an auxiliary, which sets % the integer to the new value, runs the code, and restores the @@ -1788,7 +1829,7 @@ { \int_compare:nNnTF {#1} = {#2} { \use:n } - { \exp_args:No \@@_with:nNnn { \int_use:N #1 } #1 {#2} } + { \@@_with:oNnn { \int_use:N #1 } #1 {#2} } } \cs_new_protected:Npn \@@_with:nNnn #1#2#3#4 { @@ -1796,14 +1837,17 @@ #4 \int_set:Nn #2 {#1} } +\cs_generate_variant:Nn \@@_with:nNnn { o } % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro} % { -% \iow_now:Nn, \iow_now:NV, \iow_now:Nx, -% \iow_now:cn, \iow_now:cV, \iow_now:cx +% \iow_now:Nn, \iow_now:NV, \iow_now:Ne, +% \iow_now:Nx, +% \iow_now:cn, \iow_now:cV, \iow_now:ce, +% \iow_now:cx % } % This routine writes the second argument onto the output stream without % expansion. If this stream isn't open, the output goes to the terminal @@ -1822,18 +1866,23 @@ \__kernel_iow_with:Nnn \tex_newlinechar:D { `\^^J } { \tex_immediate:D \tex_write:D #1 { \exp_not:n {#2} } } } -\cs_generate_variant:Nn \iow_now:Nn { NV , Nx , c , cV , cx } +\cs_generate_variant:Nn \iow_now:Nn { NV , Ne , c , cV , ce } +\cs_generate_variant:Nn \iow_now:Nn { Nx , cx } % \end{macrocode} % \end{macro} % -% \begin{macro}{\iow_log:n, \iow_log:x} -% \begin{macro}{\iow_term:n, \iow_term:x} -% Writing to the log and the terminal directly are relatively easy. +% \begin{macro}{\iow_log:n, \iow_log:e, \iow_log:x} +% \begin{macro}{\iow_term:n, \iow_term:e, \iow_term:x} +% Writing to the log and the terminal directly are relatively easy; +% as we need the two \texttt{e}-type variants for bootstrapping, +% they are redefinitions here. % \begin{macrocode} -\cs_set_protected:Npn \iow_log:x { \iow_now:Nx \c_log_iow } \cs_new_protected:Npn \iow_log:n { \iow_now:Nn \c_log_iow } -\cs_set_protected:Npn \iow_term:x { \iow_now:Nx \c_term_iow } +\cs_set_protected:Npn \iow_log:e { \iow_now:Ne \c_log_iow } +\cs_generate_variant:Nn \iow_log:n { x } \cs_new_protected:Npn \iow_term:n { \iow_now:Nn \c_term_iow } +\cs_set_protected:Npn \iow_term:e { \iow_now:Ne \c_term_iow } +\cs_generate_variant:Nn \iow_term:n { x } % \end{macrocode} % \end{macro} % \end{macro} @@ -1902,14 +1951,14 @@ \cs_new:Npn \@@_unindent:w { } \cs_new_protected:Npn \@@_set_indent:n #1 { - \__kernel_tl_set:Nx \l_@@_one_indent_tl + \__kernel_tl_set:Ne \l_@@_one_indent_tl { \exp_args:No \__kernel_str_to_other_fast:n { \tl_to_str:n {#1} } } \int_set:Nn \l_@@_one_indent_int { \str_count:N \l_@@_one_indent_tl } \exp_last_unbraced:NNo \cs_set:Npn \@@_unindent:w \l_@@_one_indent_tl { } } -\exp_args:Nx \@@_set_indent:n { \prg_replicate:nn { 4 } { ~ } } +\exp_args:Ne \@@_set_indent:n { \prg_replicate:nn { 4 } { ~ } } % \end{macrocode} % \end{variable} % \end{macro} @@ -1968,13 +2017,13 @@ % \begin{macrocode} \group_begin: \int_set:Nn \tex_escapechar:D { -1 } - \tl_const:Nx \c_@@_wrap_marker_tl + \tl_const:Ne \c_@@_wrap_marker_tl { \tl_to_str:n { \^^I \^^O \^^W \^^_ \^^W \^^R \^^A \^^P } } \group_end: \tl_map_inline:nn { { end } { newline } { allow_break } { indent } { unindent } } { - \tl_const:cx { c_@@_wrap_ #1 _marker_tl } + \tl_const:ce { c_@@_wrap_ #1 _marker_tl } { \c_@@_wrap_marker_tl #1 @@ -1998,7 +2047,7 @@ \msg_error:nnnn { kernel } { iow-indent } { \iow_wrap:nnnN } { \iow_wrap_allow_break: } } -\cs_new:Npx \@@_wrap_allow_break: { \c_@@_wrap_allow_break_marker_tl } +\cs_new:Npe \@@_wrap_allow_break: { \c_@@_wrap_allow_break_marker_tl } \cs_new:Npn \@@_wrap_allow_break_error: { \msg_expandable_error:nnnn { kernel } { iow-indent } @@ -2026,7 +2075,7 @@ { \iow_wrap:nnnN } { \iow_indent:n } {#1} #1 } -\cs_new:Npx \@@_indent:n #1 +\cs_new:Npe \@@_indent:n #1 { \c_@@_wrap_indent_marker_tl #1 @@ -2043,7 +2092,7 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\iow_wrap:nnnN, \iow_wrap:nxnN} +% \begin{macro}{\iow_wrap:nnnN, \iow_wrap:nenN} % The main wrapping function works as follows. First give |\\|, % \verb*|\ | and other formatting commands the correct definition for % messages and perform the given setup~|#3|. The definition of @@ -2059,11 +2108,11 @@ \group_begin: \cs_if_exist_use:N \conditionally@traceoff \int_set:Nn \tex_escapechar:D { -1 } - \cs_set:Npx \{ { \token_to_str:N \{ } - \cs_set:Npx \# { \token_to_str:N \# } - \cs_set:Npx \} { \token_to_str:N \} } - \cs_set:Npx \% { \token_to_str:N \% } - \cs_set:Npx \~ { \token_to_str:N \~ } + \cs_set:Npe \{ { \token_to_str:N \{ } + \cs_set:Npe \# { \token_to_str:N \# } + \cs_set:Npe \} { \token_to_str:N \} } + \cs_set:Npe \% { \token_to_str:N \% } + \cs_set:Npe \~ { \token_to_str:N \~ } \int_set:Nn \tex_escapechar:D { 92 } \cs_set_eq:NN \\ \iow_newline: \cs_set_eq:NN \ \c_catcode_other_space_tl @@ -2079,7 +2128,7 @@ % \cs{iow_wrap:nnnN}. % \begin{macrocode} \cs_set_eq:NN \protect \token_to_str:N - \__kernel_tl_set:Nx \l_@@_wrap_tl {#1} + \__kernel_tl_set:Ne \l_@@_wrap_tl {#1} \cs_set_eq:NN \iow_wrap_allow_break: \@@_wrap_allow_break_error: \cs_set_eq:NN \iow_indent:n \@@_indent_error:n % \end{macrocode} @@ -2087,8 +2136,8 @@ % then convert to a string) and initialize the target count for lines % (the first line has target count \cs{l_iow_line_count_int} instead). % \begin{macrocode} - \__kernel_tl_set:Nx \l_@@_newline_tl { \iow_newline: #2 } - \__kernel_tl_set:Nx \l_@@_newline_tl { \tl_to_str:N \l_@@_newline_tl } + \__kernel_tl_set:Ne \l_@@_newline_tl { \iow_newline: #2 } + \__kernel_tl_set:Ne \l_@@_newline_tl { \tl_to_str:N \l_@@_newline_tl } \int_set:Nn \l_@@_line_target_int { \l_iow_line_count_int - \str_count:N \l_@@_newline_tl + 1 } % \end{macrocode} @@ -2112,7 +2161,7 @@ \exp_args:NNf \group_end: #4 { \tl_to_str:N \l_@@_wrap_tl } } -\cs_generate_variant:Nn \iow_wrap:nnnN { nx } +\cs_generate_variant:Nn \iow_wrap:nnnN { ne } % \end{macrocode} % \end{macro} % @@ -2128,12 +2177,12 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_wrap_do: { - \__kernel_tl_set:Nx \l_@@_wrap_tl + \__kernel_tl_set:Ne \l_@@_wrap_tl { \exp_args:No \__kernel_str_to_other_fast:n \l_@@_wrap_tl \c_@@_wrap_end_marker_tl } - \__kernel_tl_set:Nx \l_@@_wrap_tl + \__kernel_tl_set:Ne \l_@@_wrap_tl { \exp_after:wN \@@_wrap_fix_newline:w \l_@@_wrap_tl ^^J \q_@@_nil ^^J \s_@@_stop @@ -2397,7 +2446,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_wrap_allow_break:n #1 { - \__kernel_tl_set:Nx \l_@@_line_tl + \__kernel_tl_set:Ne \l_@@_line_tl { \l_@@_line_tl \@@_wrap_trim:N \l_@@_line_part_tl } \bool_set_false:N \l_@@_line_break_bool \tl_if_empty:NTF \l_@@_line_part_tl @@ -2417,7 +2466,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_wrap_indent:n #1 { - \tl_put_right:Nx \l_@@_line_tl { \l_@@_line_part_tl } + \tl_put_right:Ne \l_@@_line_tl { \l_@@_line_part_tl } \bool_set_false:N \l_@@_line_break_bool \int_add:Nn \l_@@_indent_int { \l_@@_one_indent_int } \tl_put_right:No \l_@@_indent_tl { \l_@@_one_indent_tl } @@ -2425,10 +2474,10 @@ } \cs_new_protected:Npn \@@_wrap_unindent:n #1 { - \tl_put_right:Nx \l_@@_line_tl { \l_@@_line_part_tl } + \tl_put_right:Ne \l_@@_line_tl { \l_@@_line_part_tl } \bool_set_false:N \l_@@_line_break_bool \int_sub:Nn \l_@@_indent_int { \l_@@_one_indent_int } - \__kernel_tl_set:Nx \l_@@_indent_tl + \__kernel_tl_set:Ne \l_@@_indent_tl { \exp_after:wN \@@_unindent:w \l_@@_indent_tl } \@@_wrap_chunk:nw {#1} } @@ -2467,9 +2516,9 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_wrap_store_do:n #1 { - \__kernel_tl_set:Nx \l_@@_line_tl + \__kernel_tl_set:Ne \l_@@_line_tl { \l_@@_line_tl \l_@@_line_part_tl } - \__kernel_tl_set:Nx \l_@@_wrap_tl + \__kernel_tl_set:Ne \l_@@_wrap_tl { \l_@@_wrap_tl \l_@@_newline_tl @@ -2495,6 +2544,21 @@ % \end{macrocode} % \end{macro} % +% \subsection{Deprecated functions} +% +% \begin{macro} +% { +% \iow_shipout_x:Nn, \iow_shipout_x:Nx, +% \iow_shipout_x:cn, \iow_shipout_x:cx +% } +% Previously described as \texttt{x}-type, but the hash behaviour is really +% \texttt{e}-type. +% \begin{macrocode} +\cs_new_eq:NN \iow_shipout_x:Nn \iow_shipout_e:Nn +\cs_generate_variant:Nn \iow_shipout_x:Nn { Nx , c, cx } +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} %<@@=file> % \end{macrocode} @@ -2539,7 +2603,7 @@ { \cs_set:Npn \@@_tmp:w ##1 " ##2 " ##3 \s_@@_stop { { } {##2} { } } - \seq_gput_right:Nx \g_@@_stack_seq + \seq_gput_right:Ne \g_@@_stack_seq { \exp_after:wN \@@_tmp:w \tex_jobname:D " \tex_jobname:D " \s_@@_stop @@ -2811,11 +2875,11 @@ % The same idea as the marker for rescanning token lists: this pair of % tokens cannot appear in a file that is being input. % \begin{macrocode} -\tl_const:Nx \c_@@_marker_tl { : \token_to_str:N : } +\tl_const:Ne \c_@@_marker_tl { : \token_to_str:N : } % \end{macrocode} % \end{variable} % -% \begin{macro}[TF]{\file_get:nnN} +% \begin{macro}[TF]{\file_get:nnN, \file_get:VnN} % \begin{macro}{\file_get:nnN,\@@_get_aux:nnN,\@@_get_do:Nw} % The approach here is similar to that for \cs{tl_set_rescan:Nnn}. % The file contents are grabbed as an argument delimited by @@ -2830,6 +2894,7 @@ \file_get:nnNF {#1} {#2} #3 { \tl_set:Nn #3 { \q_no_value } } } +\cs_generate_variant:Nn \file_get:nnN { V } \prg_new_protected_conditional:Npnn \file_get:nnN #1#2#3 { T , F , TF } { \file_get_full_name:nNTF {#1} \l_@@_full_name_tl @@ -2841,7 +2906,8 @@ } { \prg_return_false: } } -\cs_new_protected:Npx \@@_get_aux:nnN #1#2#3 +\prg_generate_conditional_variant:Nnn \file_get:nnN { V } { T , F , TF } +\cs_new_protected:Npe \@@_get_aux:nnN #1#2#3 { \exp_not:N \if_false: { \exp_not:N \fi: \group_begin: @@ -2901,6 +2967,7 @@ \exp_args:Ne \@@_full_name:n { \__kernel_file_name_sanitize:n {#1} } } +\cs_generate_variant:Nn \file_full_name:n { V } % \end{macrocode} % First, we check of the file is just here: no mapping so we do not % need the break part of the broader auxiliary. We are using the fact @@ -3011,7 +3078,7 @@ } { \@@_ext_check:nnw {#1} { #2 #3 / } #4 / #5 \s_@@_stop } } -\cs_new:Npx \@@_ext_check:nnnw #1#2#3#4 . #5 . #6 \s_@@_stop +\cs_new:Npe \@@_ext_check:nnnw #1#2#3#4 . #5 . #6 \s_@@_stop { \exp_not:N \@@_quark_if_nil:nTF {#5} { @@ -3065,15 +3132,14 @@ \cs_generate_variant:Nn \file_get_full_name:nN { V } \prg_new_protected_conditional:Npnn \file_get_full_name:nN #1#2 { T , F , TF } { - \__kernel_tl_set:Nx #2 + \__kernel_tl_set:Ne #2 { \file_full_name:n {#1} } \tl_if_empty:NTF #2 { \prg_return_false: } { \prg_return_true: } } -\cs_generate_variant:Nn \file_get_full_name:nNT { V } -\cs_generate_variant:Nn \file_get_full_name:nNF { V } -\cs_generate_variant:Nn \file_get_full_name:nNTF { V } +\prg_generate_conditional_variant:Nnn \file_get_full_name:nN + { V } { T , F , TF } % \end{macrocode} % \end{macro} % \end{macro} @@ -3086,7 +3152,12 @@ % \end{macrocode} % \end{variable} % -% \begin{macro}[rEXP]{\file_mdfive_hash:n, \file_size:n, \file_timestamp:n} +% \begin{macro}[rEXP] +% { +% \file_mdfive_hash:n, \file_mdfive_hash:V, +% \file_size:n, \file_size:V, +% \file_timestamp:n, \file_timestamp:V +% } % \begin{macro}[rEXP]{\@@_details:nn, \@@_details_aux:nn} % \begin{macro}[rEXP]{\@@_mdfive_hash:n} % Getting file details by expansion is relatively easy if a bit repetitive. @@ -3095,8 +3166,10 @@ % \begin{macrocode} \cs_new:Npn \file_size:n #1 { \@@_details:nn {#1} { size } } +\cs_generate_variant:Nn \file_size:n { V } \cs_new:Npn \file_timestamp:n #1 { \@@_details:nn {#1} { moddate } } +\cs_generate_variant:Nn \file_timestamp:n { V } \cs_new:Npn \@@_details:nn #1#2 { \exp_args:Ne \@@_details_aux:nn @@ -3109,6 +3182,7 @@ } \cs_new:Npn \file_mdfive_hash:n #1 { \exp_args:Ne \@@_mdfive_hash:n { \file_full_name:n {#1} } } +\cs_generate_variant:Nn \file_mdfive_hash:n { V } \cs_new:Npn \@@_mdfive_hash:n #1 { \tex_mdfivesum:D file {#1} } % \end{macrocode} @@ -3116,10 +3190,10 @@ % \end{macro} % \end{macro} % -% \begin{macro}[rEXP]{\file_hex_dump:nnn, \@@_hex_dump_auxi:nnn} +% \begin{macro}[rEXP]{\file_hex_dump:nnn, \file_hex_dump:Vnn, \@@_hex_dump_auxi:nnn} % \begin{macro}[rEXP]{\@@_hex_dump_auxii:nnnn, \@@_hex_dump_auxiii:nnnn} % \begin{macro}[rEXP]{\@@_hex_dump_auxiiv:nnn} -% \begin{macro}[rEXP]{\file_hex_dump:n, \@@_hex_dump:n} +% \begin{macro}[rEXP]{\file_hex_dump:n, \file_hex_dump:V, \@@_hex_dump:n} % These are separate as they need multiple arguments \emph{or} the % file size. For \LuaTeX{}, the emulation does not need the file % size so we save a little on expansion. @@ -3131,6 +3205,7 @@ { \int_eval:n {#2} } { \int_eval:n {#3} } } +\cs_generate_variant:Nn \file_hex_dump:nnn { V } \cs_new:Npn \@@_hex_dump_auxi:nnn #1#2#3 { \bool_lazy_any:nF @@ -3174,6 +3249,7 @@ } \cs_new:Npn \file_hex_dump:n #1 { \exp_args:Ne \@@_hex_dump:n { \file_full_name:n {#1} } } +\cs_generate_variant:Nn \file_hex_dump:n { V } \sys_if_engine_luatex:TF { \cs_new:Npn \@@_hex_dump:n #1 @@ -3197,10 +3273,10 @@ % % \begin{macro}[noTF] % { -% \file_get_hex_dump:nN, -% \file_get_mdfive_hash:nN -% \file_get_size:nN, -% \file_get_timestamp:nN +% \file_get_hex_dump:nN, \file_get_hex_dump:VN, +% \file_get_mdfive_hash:nN, \file_get_mdfive_hash:VN, +% \file_get_size:nN, \file_get_size:VN, +% \file_get_timestamp:nN, \file_get_timestamp:VN % } % \begin{macro}{\@@_get_details:nnN} % Non-expandable wrappers around the above in the case where appropriate @@ -3208,23 +3284,35 @@ % \begin{macrocode} \cs_new_protected:Npn \file_get_hex_dump:nN #1#2 { \file_get_hex_dump:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } +\cs_generate_variant:Nn \file_get_hex_dump:nN { V } \cs_new_protected:Npn \file_get_mdfive_hash:nN #1#2 { \file_get_mdfive_hash:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } +\cs_generate_variant:Nn \file_get_mdfive_hash:nN { V } \cs_new_protected:Npn \file_get_size:nN #1#2 { \file_get_size:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } +\cs_generate_variant:Nn \file_get_size:nN { V } \cs_new_protected:Npn \file_get_timestamp:nN #1#2 { \file_get_timestamp:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } +\cs_generate_variant:Nn \file_get_timestamp:nN { V } \prg_new_protected_conditional:Npnn \file_get_hex_dump:nN #1#2 { T , F , TF } { \@@_get_details:nnN {#1} { hex_dump } #2 } +\prg_generate_conditional_variant:Nnn \file_get_hex_dump:nN + { V } { T , F , TF } \prg_new_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2 { T , F , TF } { \@@_get_details:nnN {#1} { mdfive_hash } #2 } +\prg_generate_conditional_variant:Nnn \file_get_mdfive_hash:nN + { V } { T , F , TF } \prg_new_protected_conditional:Npnn \file_get_size:nN #1#2 { T , F , TF } { \@@_get_details:nnN {#1} { size } #2 } +\prg_generate_conditional_variant:Nnn \file_get_size:nN + { V } { T , F , TF } \prg_new_protected_conditional:Npnn \file_get_timestamp:nN #1#2 { T , F , TF } { \@@_get_details:nnN {#1} { timestamp } #2 } +\prg_generate_conditional_variant:Nnn \file_get_timestamp:nN + { V } { T , F , TF } \cs_new_protected:Npn \@@_get_details:nnN #1#2#3 { - \__kernel_tl_set:Nx #3 + \__kernel_tl_set:Ne #3 { \use:c { file_ #2 :n } {#1} } \tl_if_empty:NTF #3 { \prg_return_false: } @@ -3234,7 +3322,7 @@ % \end{macro} % \end{macro} % -% \begin{macro}[noTF]{\file_get_hex_dump:nnnN} +% \begin{macro}[noTF]{\file_get_hex_dump:nnnN, \file_get_hex_dump:VnnN} % Custom code due to the additional arguments. % \begin{macrocode} \cs_new_protected:Npn \file_get_hex_dump:nnnN #1#2#3#4 @@ -3242,15 +3330,18 @@ \file_get_hex_dump:nnnNF {#1} {#2} {#3} #4 { \tl_set:Nn #4 { \q_no_value } } } +\cs_generate_variant:Nn \file_get_hex_dump:nnnN { V } \prg_new_protected_conditional:Npnn \file_get_hex_dump:nnnN #1#2#3#4 { T , F , TF } { - \__kernel_tl_set:Nx #4 + \__kernel_tl_set:Ne #4 { \file_hex_dump:nnn {#1} {#2} {#3} } \tl_if_empty:NTF #4 { \prg_return_false: } { \prg_return_true: } } +\prg_generate_conditional_variant:Nnn \file_get_hex_dump:nnnN + { V } { T , F , TF } % \end{macrocode} % \end{macro} % @@ -3262,7 +3353,13 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP, pTF]{\file_compare_timestamp:nNn} +% \begin{macro}[EXP, pTF] +% { +% \file_compare_timestamp:nNn, +% \file_compare_timestamp:nNV, +% \file_compare_timestamp:VNn +% \file_compare_timestamp:VNV +% } % \begin{macro}[EXP]{\@@_compare_timestamp:nnN} % \begin{macro}[EXP]{\@@_timestamp:n} % Comparison of file date can be done by using the low-level nature of the @@ -3276,6 +3373,8 @@ { \file_full_name:n {#3} } #2 } +\prg_generate_conditional_variant:Nnn \file_compare_timestamp:nNn + { nNV , V , VNV } { p , T , F , TF } \cs_new:Npn \@@_compare_timestamp:nnN #1#2#3 { \tl_if_blank:nTF {#1} @@ -3320,17 +3419,23 @@ % something, whereas if the file was not located then the return value % is empty. % \begin{macrocode} -\prg_new_protected_conditional:Npnn \file_if_exist:n #1 { T , F , TF } +\prg_new_conditional:Npnn \file_if_exist:n #1 { p , T , F , TF } { - \file_get_full_name:nNTF {#1} \l_@@_full_name_tl - { \prg_return_true: } + \tl_if_blank:eTF { \file_full_name:n {#1} } { \prg_return_false: } + { \prg_return_true: } } -\prg_generate_conditional_variant:Nnn \file_if_exist:n { V } { T , F , TF } +\prg_generate_conditional_variant:Nnn \file_if_exist:n { V } { p , T , F , TF } % \end{macrocode} % \end{macro} % -% \begin{macro}{\file_if_exist_input:n, \file_if_exist_input:nF} +% \begin{macro} +% { +% \file_if_exist_input:n, +% \file_if_exist_input:V, +% \file_if_exist_input:nF, +% \file_if_exist_input:VF +% } % Input of a file with a test for existence. We do not define the |T| % or |TF| variants because the most useful place to place the % \meta{true code} would be inconsistent with other conditionals. @@ -3340,12 +3445,14 @@ \file_get_full_name:nNT {#1} \l_@@_full_name_tl { \@@_input:V \l_@@_full_name_tl } } +\cs_generate_variant:Nn \file_if_exist_input:n { V } \cs_new_protected:Npn \file_if_exist_input:nF #1#2 { \file_get_full_name:nNTF {#1} \l_@@_full_name_tl { \@@_input:V \l_@@_full_name_tl } {#2} } +\cs_generate_variant:Nn \file_if_exist_input:nF { V } % \end{macrocode} % \end{macro} % @@ -3361,7 +3468,7 @@ % \begin{macrocode} \cs_new_protected:Npn \__kernel_file_missing:n #1 { - \msg_error:nnx { kernel } { file-not-found } + \msg_error:nne { kernel } { file-not-found } { \__kernel_file_name_sanitize:n {#1} } } % \end{macrocode} @@ -3384,7 +3491,7 @@ { \__kernel_file_missing:n {#1} } } \cs_generate_variant:Nn \file_input:n { V } -\cs_new_protected:Npx \@@_input:n #1 +\cs_new_protected:Npe \@@_input:n #1 { \exp_not:N \clist_if_exist:NTF \exp_not:N \@filelist { \exp_not:N \@addtofilelist {#1} } @@ -3403,7 +3510,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_input_push:n #1 { - \seq_gpush:Nx \g_@@_stack_seq + \seq_gpush:Ne \g_@@_stack_seq { { \g_file_curr_dir_str } { \g_file_curr_name_str } @@ -3435,12 +3542,13 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\file_input_raw:n, \@@_input_raw:nn} +% \begin{macro}{\file_input_raw:n, \file_input_raw:V, \@@_input_raw:nn} % No error checking, no tracking. % \begin{macrocode} \cs_new:Npn \file_input_raw:n #1 { \exp_args:Ne \@@_input_raw:nn { \file_full_name:n {#1} } {#1} } -\cs_new:Npx \@@_input_raw:nn #1#2 +\cs_generate_variant:Nn \file_input_raw:n { V } +\cs_new:Npe \@@_input_raw:nn #1#2 { \exp_not:N \tl_if_blank:nTF {#1} { @@ -3459,7 +3567,8 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\file_parse_full_name:n, \file_parse_full_name_apply:nN} +% \begin{macro}{\file_parse_full_name:n, \file_parse_full_name:nV} +% \begin{macro}{\file_parse_full_name_apply:nN \file_parse_full_name_apply:VN} % The main parsing macro \cs{file_parse_full_name_apply:nN} passes the % file name |#1| through \cs{__kernel_file_name_sanitize:n} so that we % have a single normalised way to treat files internally. @@ -3472,11 +3581,13 @@ \file_parse_full_name_apply:nN {#1} \prg_do_nothing: } +\cs_generate_variant:Nn \file_parse_full_name:n { V } \cs_new:Npn \file_parse_full_name_apply:nN #1 { \exp_args:Ne \@@_parse_full_name_auxi:nN { \__kernel_file_name_sanitize:n {#1} } } +\cs_generate_variant:Nn \file_parse_full_name_apply:nN { V } % \end{macrocode} % % \begin{macro}{\@@_parse_full_name_auxi:nN} @@ -3549,6 +3660,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\file_parse_full_name:nNNN, \file_parse_full_name:VNNN} % \begin{macrocode} @@ -3575,14 +3687,14 @@ % \cs{AtBeginDocument} into \cs{g_@@_record_seq}), turning it to a % string (this does not affect the commas of this comma list). % \begin{macrocode} -\cs_new_protected:Npn \file_show_list: { \@@_list:N \msg_show:nnxxxx } -\cs_new_protected:Npn \file_log_list: { \@@_list:N \msg_log:nnxxxx } +\cs_new_protected:Npn \file_show_list: { \@@_list:N \msg_show:nneeee } +\cs_new_protected:Npn \file_log_list: { \@@_list:N \msg_log:nneeee } \cs_new_protected:Npn \@@_list:N #1 { \seq_clear:N \l_@@_tmp_seq \clist_if_exist:NT \@filelist { - \exp_args:NNx \seq_set_from_clist:Nn \l_@@_tmp_seq + \exp_args:NNe \seq_set_from_clist:Nn \l_@@_tmp_seq { \tl_to_str:N \@filelist } } \seq_concat:NNN \l_@@_tmp_seq \l_@@_tmp_seq \g_@@_record_seq @@ -3605,7 +3717,7 @@ { \AtBeginDocument { - \exp_args:NNx \seq_set_from_clist:Nn \l_@@_tmp_seq + \exp_args:NNe \seq_set_from_clist:Nn \l_@@_tmp_seq { \tl_to_str:N \@filelist } \seq_gconcat:NNN \g_@@_record_seq @@ -3738,7 +3850,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_mismatched_dependency_error:nn #1 #2 { - \exp_args:NNx \ior_shell_open:Nn \g_@@_internal_ior + \exp_args:NNe \ior_shell_open:Nn \g_@@_internal_ior { kpsewhich ~ --all ~ --engine = \c_sys_engine_exec_str @@ -3869,7 +3981,7 @@ % \begin{macrocode} \sys_if_engine_luatex:TF { - \str_const:Nx \c_sys_platform_str + \str_const:Ne \c_sys_platform_str { \tex_directlua:D { tex.print(os.type) } } } { |