diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3file.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3file.dtx | 72 |
1 files changed, 70 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index a89f6540c68..d3f57f9deba 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 2021-05-11} +% \date{Released 2021-05-25} % % \maketitle % @@ -151,6 +151,21 @@ % to other programmers. % \end{function} % +% \begin{function}[added = 2021-05-11] +% { +% \ior_show:N, \ior_show:c, \ior_log:N, \ior_log:c, +% \iow_show:N, \iow_show:c, \iow_log:N, \iow_log:c +% } +% \begin{syntax} +% \cs{ior_show:N} \meta{stream} +% \cs{ior_log:N} \meta{stream} +% \cs{iow_show:N} \meta{stream} +% \cs{iow_log:N} \meta{stream} +% \end{syntax} +% Display (to the terminal or log file) the file name associated to +% the (read or write) \meta{stream}. +% \end{function} +% % \begin{function}[added = 2017-06-27] % { % \ior_show_list:, \ior_log_list:, @@ -1118,6 +1133,29 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\ior_show:N, \ior_log:N, \@@_show:NN} +% Seek the stream in the \cs{g_@@_streams_prop} list, then show the +% stream as open or closed accordingly. +% \begin{macrocode} +\cs_new_protected:Npn \ior_show:N { \@@_show:NN \tl_show:n } +\cs_generate_variant:Nn \ior_show:N { c } +\cs_new_protected:Npn \ior_log:N { \@@_show:NN \tl_log:n } +\cs_generate_variant:Nn \ior_log:N { c } +\cs_new_protected:Npn \@@_show:NN #1#2 + { + \__kernel_chk_defined:NT #2 + { + \prop_get:NVNTF \g_@@_streams_prop #2 \l_@@_internal_tl + { + \exp_args:Nx #1 + { \token_to_str:N #2 ~ open: ~ \l_@@_internal_tl } + } + { \exp_args:Nx #1 { \token_to_str:N #2 ~ closed } } + } + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\ior_show_list:, \ior_log_list:} % \begin{macro}{\@@_list:N} % Show the property lists, but with some \enquote{pretty printing}. @@ -1354,6 +1392,13 @@ % % \subsubsection{Variables and constants} % +% \begin{variable}{\l_@@_internal_tl} +% Used as a short-term scratch variable. +% \begin{macrocode} +\tl_new:N \l_@@_internal_tl +% \end{macrocode} +% \end{variable} +% % \begin{variable}{\c_log_iow, \c_term_iow} % Here we allocate two output streams for writing to the transcript % file only (\cs{c_log_iow}) and to both the terminal and transcript @@ -1520,6 +1565,29 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\iow_show:N, \iow_log:N, \@@_show:NN} +% Seek the stream in the \cs{g_@@_streams_prop} list, then show the +% stream as open or closed accordingly. +% \begin{macrocode} +\cs_new_protected:Npn \iow_show:N { \@@_show:NN \tl_show:n } +\cs_generate_variant:Nn \iow_show:N { c } +\cs_new_protected:Npn \iow_log:N { \@@_show:NN \tl_log:n } +\cs_generate_variant:Nn \iow_log:N { c } +\cs_new_protected:Npn \@@_show:NN #1#2 + { + \__kernel_chk_defined:NT #2 + { + \prop_get:NVNTF \g_@@_streams_prop #2 \l_@@_internal_tl + { + \exp_args:Nx #1 + { \token_to_str:N #2 ~ open: ~ \l_@@_internal_tl } + } + { \exp_args:Nx #1 { \token_to_str:N #2 ~ closed } } + } + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\iow_show_list:, \iow_log_list:} % \begin{macro}{\@@_list:N} % Done as for input, but with a copy of the auxiliary so the name is correct. @@ -3130,7 +3198,7 @@ \@@_str_cmp:nn { \@@_timestamp:n {#1} } { \@@_timestamp:n {#2} } - #3 0 \exp_stop_f: + #3 \c_zero_int \prg_return_true: \else: \prg_return_false: |