diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3file.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3file.dtx | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index 30c212d3015..b60d534c225 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: l3file.dtx Copyright (C) 2009-2011 The LaTeX3 Project +%% File: l3file.dtx Copyright (C) 2009-2012 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3file.dtx 3095 2011-12-26 22:33:23Z joseph $ +\GetIdInfo$Id: l3file.dtx 3158 2012-01-09 00:47:42Z bruno $ {L3 Experimental file operations} %</driver|package> %<*driver> @@ -173,7 +173,7 @@ % sequence. % \end{variable} % -% \begin{variable}{\l_file_name_tl} +% \begin{variable}{\l_file_internal_name_tl} % Used to return the full name of a file for internal use. % \end{variable} % @@ -181,12 +181,12 @@ % The sequence of file paths to search when loading a file. % \end{variable} % -% \begin{variable}{\l_file_search_path_saved_seq} +% \begin{variable}{\l_file_internal_saved_path_seq} % When loaded on top of \LaTeXe{}, there is a need to save the search % path so that \tn{input@path} can be used as appropriate. % \end{variable} % -% \begin{variable}[added = 2011-09-06]{\l_file_tmpa_seq} +% \begin{variable}[added = 2011-09-06]{\l_file_internal_seq} % When loaded on top of \LaTeXe{}, there is a need to convert % the comma lists \tn{input@path} and \tn{@filelist} to sequences. % \end{variable} @@ -257,10 +257,10 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_file_name_tl} +% \begin{variable}{\l_file_internal_name_tl} % Used to return the fully-qualified name of a file. % \begin{macrocode} -\tl_new:N \l_file_name_tl +\tl_new:N \l_file_internal_name_tl % \end{macrocode} % \end{variable} % @@ -271,26 +271,26 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_file_search_path_saved_seq} +% \begin{variable}{\l_file_internal_saved_path_seq} % The current search path has to be saved for package use. % \begin{macrocode} %<*package> -\seq_new:N \l_file_search_path_saved_seq +\seq_new:N \l_file_internal_saved_path_seq %</package> % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_file_tmpa_seq} +% \begin{variable}{\l_file_internal_seq} % Scratch space for comma list conversion in package mode. % \begin{macrocode} %<*package> -\seq_new:N \l_file_tmpa_seq +\seq_new:N \l_file_internal_seq %</package> % \end{macrocode} % \end{variable} % % \begin{macro}{\file_add_path:nN} -% \begin{variable}{\g_file_test_ior} +% \begin{variable}{\g_file_internal_ior} % \begin{macro}[aux]{\file_add_path_search:nN} % The way to test if a file exists is to try to open it: if it does not % exist then \TeX{} will report end-of-file. For files which are in the @@ -299,13 +299,14 @@ % location is of course treated as the correct one. If nothing is found, % |#2| is returned empty. % \begin{macrocode} +\ior_new:N \g_file_internal_ior \cs_new_protected:Npn \file_add_path:nN #1#2 { - \ior_open:Nn \g_file_test_ior {#1} - \ior_if_eof:NTF \g_file_test_ior + \ior_open:Nn \g_file_internal_ior {#1} + \ior_if_eof:NTF \g_file_internal_ior { \file_add_path_search:nN {#1} #2 } { - \ior_close:N \g_file_test_ior + \ior_close:N \g_file_internal_ior \tl_set:Nx #2 {#1} } } @@ -315,16 +316,16 @@ %<*package> \cs_if_exist:NT \input@path { - \seq_set_eq:NN \l_file_search_path_saved_seq \l_file_search_path_seq - \seq_set_from_clist:NN \l_file_tmpa_seq \input@path + \seq_set_eq:NN \l_file_internal_saved_path_seq \l_file_search_path_seq + \seq_set_from_clist:NN \l_file_internal_seq \input@path \seq_concat:NNN \l_file_search_path_seq - \l_file_search_path_seq \l_file_tmpa_seq + \l_file_search_path_seq \l_file_internal_seq } %</package> \seq_map_inline:Nn \l_file_search_path_seq { - \ior_open:Nn \g_file_test_ior { ##1 #1 } - \ior_if_eof:NF \g_file_test_ior + \ior_open:Nn \g_file_internal_ior { ##1 #1 } + \ior_if_eof:NF \g_file_internal_ior { \tl_set:Nx #2 { ##1 #1 } \seq_map_break: @@ -332,9 +333,9 @@ } %<*package> \cs_if_exist:NT \input@path - { \seq_set_eq:NN \l_file_search_path_seq \l_file_search_path_saved_seq } + { \seq_set_eq:NN \l_file_search_path_seq \l_file_internal_saved_path_seq } %</package> - \ior_close:N \g_file_test_ior + \ior_close:N \g_file_internal_ior } % \end{macrocode} % \end{macro} @@ -349,8 +350,8 @@ % \begin{macrocode} \prg_new_protected_conditional:Nnn \file_if_exist:n { T , F , TF } { - \file_add_path:nN {#1} \l_file_name_tl - \tl_if_empty:NTF \l_file_name_tl + \file_add_path:nN {#1} \l_file_internal_name_tl + \tl_if_empty:NTF \l_file_internal_name_tl { \prg_return_false: } { \prg_return_true: } } @@ -363,8 +364,8 @@ % \begin{macrocode} \cs_new_protected:Npn \file_input:n #1 { - \file_add_path:nN {#1} \l_file_name_tl - \tl_if_empty:NF \l_file_name_tl + \file_add_path:nN {#1} \l_file_internal_name_tl + \tl_if_empty:NF \l_file_internal_name_tl { %<*initex> \seq_gput_right:Nx \g_file_record_seq {#1} @@ -374,7 +375,7 @@ %</package> \seq_gpush:NV \g_file_stack_seq \g_file_current_name_tl \tl_gset:Nn \g_file_current_name_tl {#1} - \exp_after:wN \tex_input:D \l_file_name_tl \c_space_tl + \exp_after:wN \tex_input:D \l_file_internal_name_tl \c_space_tl \seq_gpop:NN \g_file_stack_seq \g_file_current_name_tl } } @@ -415,8 +416,8 @@ %<*package> \AtBeginDocument { - \seq_set_from_clist:NN \l_file_tmpa_seq \@filelist - \seq_gconcat:NNN \g_file_record_seq \g_file_record_seq \l_file_tmpa_seq + \seq_set_from_clist:NN \l_file_internal_seq \@filelist + \seq_gconcat:NNN \g_file_record_seq \g_file_record_seq \l_file_internal_seq } %</package> % \end{macrocode} |