summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3file.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx104
1 files changed, 12 insertions, 92 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 7ee7df53475..553c5419cbc 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 2020-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -910,7 +910,7 @@
% \TestFiles{m3file001}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \subsection{Input operations}
@@ -939,16 +939,9 @@
%
% \begin{variable}{\g_@@_streams_seq}
% A list of the currently-available input streams to be used as a
-% stack. In format mode, all streams (from $0$ to~$15$) are
-% available, while the package requests streams to \LaTeXe{} as they
-% are needed (initially none are needed), so the starting point
-% varies!
+% stack.
% \begin{macrocode}
\seq_new:N \g_@@_streams_seq
-%<*initex>
-\seq_gset_split:Nnn \g_@@_streams_seq { , }
- { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 }
-%</initex>
% \end{macrocode}
% \end{variable}
%
@@ -970,7 +963,6 @@
% it holds the value of the \emph{last} stream allocated.
% \begin{macrocode}
\prop_new:N \g_@@_streams_prop
-%<*package>
\int_step_inline:nnn
{ 0 }
{
@@ -984,7 +976,6 @@
{
\prop_gput:Nnn \g_@@_streams_prop {#1} { Reserved~by~format }
}
-%</package>
% \end{macrocode}
% \end{variable}
%
@@ -1043,7 +1034,7 @@
% \end{macro}
%
% \begin{macro}{\@@_new:N}
-% In package mode, streams are reserved using \tn{newread} before they
+% Streams are reserved using \tn{newread} before they
% can be managed by \pkg{ior}. To prevent \pkg{ior} from being
% affected by redefinitions of \tn{newread} (such as done by the
% third-party package \pkg{morewrites}), this macro is saved here
@@ -1053,7 +1044,6 @@
% that \tn{newread} works like our own: it actually checks before
% altering definition.
% \begin{macrocode}
-%<*package>
\exp_args:NNf \cs_new_protected:Npn \@@_new:N
{ \exp_args:NNc \exp_after:wN \exp_stop_f: { newread } }
\cs_if_exist:NT \normalend
@@ -1065,15 +1055,13 @@
\@@_new_aux:N #1
}
}
-%</package>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\__kernel_ior_open:Nn, \__kernel_ior_open:No}
% \begin{macro}{\@@_open_stream:Nn}
% The stream allocation itself uses the fact that there is a list of all of
-% those available, so allocation is simply a question of using the number at
-% the top of the list. In package mode, life gets more complex as it's
+% those available. Life gets more complex as it's
% important to keep things in sync. That is done using a two-part approach:
% any streams that have already been taken up by \pkg{ior} but are now free
% are tracked, so we first try those. If that fails, ask plain \TeX{} or \LaTeXe{}
@@ -1084,16 +1072,11 @@
\ior_close:N #1
\seq_gpop:NNTF \g_@@_streams_seq \l_@@_stream_tl
{ \@@_open_stream:Nn #1 {#2} }
-%<*initex>
- { \__kernel_msg_fatal:nn { kernel } { input-streams-exhausted } }
-%</initex>
-%<*package>
{
\@@_new:N #1
\tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:Nn #1 {#2}
}
-%</package>
}
\cs_generate_variant:Nn \__kernel_ior_open:Nn { No }
% \end{macrocode}
@@ -1392,20 +1375,9 @@
%
% \begin{variable}{\g_@@_streams_seq}
% A list of the currently-available output streams to be used as a
-% stack. The stream $18$ is special, as \tn{write}18 is used to
-% denote commands to be sent to the OS\@.
+% stack.
% \begin{macrocode}
\seq_new:N \g_@@_streams_seq
-%<*initex>
-\exp_args:Nnx \use:n
- { \seq_gset_split:Nnn \g_@@_streams_seq { } }
- {
- \int_step_function:nnN { 0 } { \c_term_iow }
- \prg_do_nothing:
- }
-\int_compare:nNnF \c_term_iow < { 18 }
- { \seq_gremove_all:Nn \g_@@_streams_seq { 18 } }
-%</initex>
% \end{macrocode}
% \end{variable}
%
@@ -1421,7 +1393,6 @@
% check on.
% \begin{macrocode}
\prop_new:N \g_@@_streams_prop
-%<*package>
\int_step_inline:nnn
{ 0 }
{
@@ -1435,7 +1406,6 @@
{
\prop_gput:Nnn \g_@@_streams_prop {#1} { Reserved~by~format }
}
-%</package>
% \end{macrocode}
% \end{variable}
%
@@ -1483,13 +1453,11 @@
% \end{variable}
%
% \begin{macro}{\@@_new:N}
-% As for read streams, copy \tn{newwrite} in package mode, making sure
+% As for read streams, copy \tn{newwrite}, making sure
% that it is not \tn{outer}.
% \begin{macrocode}
-%<*package>
\exp_args:NNf \cs_new_protected:Npn \@@_new:N
{ \exp_args:NNc \exp_after:wN \exp_stop_f: { newwrite } }
-%</package>
% \end{macrocode}
% \end{macro}
%
@@ -1512,16 +1480,11 @@
\iow_close:N #1
\seq_gpop:NNTF \g_@@_streams_seq \l_@@_stream_tl
{ \@@_open_stream:NV #1 \l_@@_file_name_tl }
-%<*initex>
- { \__kernel_msg_fatal:nn { kernel } { output-streams-exhausted } }
-%</initex>
-%<*package>
{
\@@_new:N #1
\tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:NV #1 \l_@@_file_name_tl
}
-%</package>
}
\cs_generate_variant:Nn \iow_open:Nn { c }
\cs_new_protected:Npn \@@_open_stream:Nn #1#2
@@ -1876,7 +1839,7 @@
\cs_new_protected:Npn \iow_wrap:nnnN #1#2#3#4
{
\group_begin:
-%<package> \cs_if_exist_use:N \conditionally@traceoff
+ \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 \# }
@@ -1897,7 +1860,7 @@
% definition: it only works in the first argument of
% \cs{iow_wrap:nnnN}.
% \begin{macrocode}
-%<package> \cs_set_eq:NN \protect \token_to_str:N
+ \cs_set_eq:NN \protect \token_to_str:N
\tl_set:Nx \l_@@_wrap_tl {#1}
\cs_set_eq:NN \iow_allow_break: \@@_allow_break_error:
\cs_set_eq:NN \iow_indent:n \@@_indent_error:n
@@ -2351,7 +2314,6 @@
% \tn{@currnamestack} is empty so is skipped.
% \begin{macrocode}
\seq_new:N \g_@@_stack_seq
-%<*package>
\group_begin:
\cs_set_protected:Npn \@@_tmp:w #1#2#3
{
@@ -2376,25 +2338,16 @@
{ \exp_after:wN \@@_tmp:w \@currnamestack }
}
\group_end:
-%</package>
% \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_record_seq}
% The total list of files used is recorded separately from the current
% file stack, as nothing is ever popped from this list. The current
-% file name should be included in the file list! In format mode, this
-% is done at the very start of the \TeX{} run. In package mode we
+% file name should be included in the file list! We
% will eventually copy the contents of \cs{@filelist}.
% \begin{macrocode}
\seq_new:N \g_@@_record_seq
-%<*initex>
-\tex_everyjob:D \exp_after:wN
- {
- \tex_the:D \tex_everyjob:D
- \seq_gput_right:NV \g_@@_record_seq \g_file_curr_name_str
- }
-%</initex>
% \end{macrocode}
% \end{variable}
%
@@ -2424,11 +2377,9 @@
% \end{variable}
%
% \begin{variable}{\l_@@_tmp_seq}
-% Scratch space for comma list conversion in package mode.
+% Scratch space for comma list conversion.
% \begin{macrocode}
-%<*package>
\seq_new:N \l_@@_tmp_seq
-%</package>
% \end{macrocode}
% \end{variable}
%
@@ -2734,13 +2685,11 @@
{
\seq_map_tokens:Nn \l_file_search_path_seq
{ \@@_full_name_aux:Nnn \seq_map_break:n {#1} }
-%<*package>
\cs_if_exist:NT \input@path
{
\tl_map_tokens:Nn \input@path
{ \@@_full_name_aux:Nnn \tl_map_break:n {#1} }
}
-%</package>
\@@_name_end:
}
{ \@@_ext_check:n {#1} }
@@ -2879,13 +2828,11 @@
\@@_get_full_name_search:nN { } \use:n
\seq_map_inline:Nn \l_file_search_path_seq
{ \@@_get_full_name_search:nN { ##1 / } \seq_map_break:n }
-%<*package>
\cs_if_exist:NT \input@path
{
\tl_map_inline:Nn \input@path
{ \@@_get_full_name_search:nN { ##1 } \tl_map_break:n }
}
-%</package>
\tl_set:Nn \l_@@_full_name_tl { \q_no_value }
\prg_break_point:
\quark_if_no_value:NTF \l_@@_full_name_tl
@@ -3319,14 +3266,9 @@
}
\cs_new_protected:Npx \@@_input:n #1
{
-%<*initex>
- \seq_gput_right:Nn \exp_not:N \g_@@_record_seq {#1}
-%</initex>
-%<*package>
\exp_not:N \clist_if_exist:NTF \exp_not:N \@filelist
{ \exp_not:N \@addtofilelist {#1} }
{ \seq_gput_right:Nn \exp_not:N \g_@@_record_seq {#1} }
-%</package>
\exp_not:N \@@_input_push:n {#1}
\exp_not:N \tex_input:D
\sys_if_engine_luatex:TF
@@ -3353,17 +3295,13 @@
\str_gset_eq:NN \g_file_curr_name_str \l_@@_name_str
\str_gset_eq:NN \g_file_curr_ext_str \l_@@_ext_str
}
-%<*package>
\cs_new_eq:NN \__kernel_file_input_push:n \@@_input_push:n
-%</package>
\cs_new_protected:Npn \@@_input_pop:
{
\seq_gpop:NN \g_@@_stack_seq \l_@@_internal_tl
\exp_after:wN \@@_input_pop:nnn \l_@@_internal_tl
}
-%<*package>
\cs_new_eq:NN \__kernel_file_input_pop: \@@_input_pop:
-%</package>
\cs_new_protected:Npn \@@_input_pop:nnn #1#2#3
{
\str_gset:Nn \g_file_curr_dir_str {#1}
@@ -3498,13 +3436,11 @@
\cs_new_protected:Npn \@@_list:N #1
{
\seq_clear:N \l_@@_tmp_seq
-%<*package>
\clist_if_exist:NT \@filelist
{
\exp_args:NNx \seq_set_from_clist:Nn \l_@@_tmp_seq
{ \tl_to_str:N \@filelist }
}
-%</package>
\seq_concat:NNN \l_@@_tmp_seq \l_@@_tmp_seq \g_@@_record_seq
\seq_remove_duplicates:N \l_@@_tmp_seq
#1 { LaTeX/kernel } { file-list }
@@ -3521,7 +3457,6 @@
% \cs{@filelist} must be turned to strings before being added to
% \cs{g_@@_record_seq}.
% \begin{macrocode}
-%<*package>
\cs_if_exist:NT \@filelist
{
\AtBeginDocument
@@ -3534,7 +3469,6 @@
\l_@@_tmp_seq
}
}
-%</package>
% \end{macrocode}
%
% \subsection{GetIfInfo}
@@ -3626,20 +3560,6 @@
#1 \\
.............
}
-\__kernel_msg_new:nnnn { kernel } { input-streams-exhausted }
- { Input~streams~exhausted }
- {
- TeX~can~only~open~up~to~16~input~streams~at~one~time.\\
- All~16~are~currently~in~use,~and~something~wanted~to~open~
- another~one.
- }
-\__kernel_msg_new:nnnn { kernel } { output-streams-exhausted }
- { Output~streams~exhausted }
- {
- TeX~can~only~open~up~to~16~output~streams~at~one~time.\\
- All~16~are~currently~in~use,~and~something~wanted~to~open~
- another~one.
- }
\__kernel_msg_new:nnnn { kernel } { unbalanced-quote-in-filename }
{ Unbalanced~quotes~in~file~name~'#1'. }
{
@@ -3699,7 +3619,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}