summaryrefslogtreecommitdiff
path: root/macros/latex/base/ltfiles.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/base/ltfiles.dtx')
-rw-r--r--macros/latex/base/ltfiles.dtx80
1 files changed, 47 insertions, 33 deletions
diff --git a/macros/latex/base/ltfiles.dtx b/macros/latex/base/ltfiles.dtx
index 87a7f5e983..33594a7b91 100644
--- a/macros/latex/base/ltfiles.dtx
+++ b/macros/latex/base/ltfiles.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2019
+% Copyright (C) 1993-2020
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfiles.dtx}
- [2019/11/09 v1.2e LaTeX Kernel (File Handling)]
+ [2019/11/11 v1.2f LaTeX Kernel (File Handling)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfiles.dtx}
@@ -745,7 +745,7 @@
% "a b c" -> "a b c"
% a" "b" "c -> "a b c"
% -> ""
-%\end{verbatim}
+%\end{verbatim}
% \begin{macrocode}
\def\quote@name#1{"\quote@@name#1\@gobble""}
\def\quote@@name#1"{#1\quote@@name}
@@ -761,7 +761,7 @@
%
%
% \begin{macro}{\IfFileExists}
-%
+%
% \changes{v1.2a}{2019/07/01}{Support UTF-8}
% \changes{v1.2b}{2019/08/27}{Make command robust}
% \changes{v1.2d}{2019/10/26}{dont quote name}
@@ -796,6 +796,33 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@iffileonpath}
+% If the file is not found by |\openin|, and |\input@path| is defined,
+% look in all the directories specified in |\input@path|.
+% \changes{v0.9p}{1994/01/18}{Macro added}
+% \changes{v1.0f}{1994/05/02}
+% {\cs{@break@loop} renamed to \cs{@break@tfor}}
+% \changes{v1.0t}{1995/05/25}
+% {(CAR) added \cs{long}}
+% \changes{v1.1d}{1996/01/10}
+% {Change argument handling to not require doubled hash. latex/2024}
+% \changes{v1.2d}{2019/10/26}{quote on openin}%
+% \changes{v1.2f}{2019/11/11}{make \cs{@filef@und} match quoting used on \cs{openin}}%
+% \begin{macrocode}
+\long\def\@iffileonpath#1{%
+ \let\reserved@a\@secondoftwo
+ \expandafter\@tfor\expandafter\reserved@b\expandafter
+ :\expandafter=\input@path\do{%
+ \openin\@inputcheck\expandafter\quote@name\expandafter{\reserved@b#1} %
+ \ifeof\@inputcheck\else
+ \edef\@filef@und{\expandafter\quote@name\expandafter{\reserved@b#1} }%
+ \let\reserved@a\@firstoftwo%
+ \closein\@inputcheck
+ \@break@tfor
+ \fi}%
+ \reserved@a}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
%</2ekernel|latexrelease>
@@ -825,38 +852,25 @@
%<latexrelease> \fi
%<latexrelease> \reserved@a}
%<latexrelease>
+%<latexrelease>\long\def\@iffileonpath#1{%
+%<latexrelease> \let\reserved@a\@secondoftwo
+%<latexrelease> \expandafter\@tfor\expandafter\reserved@b\expandafter
+%<latexrelease> :\expandafter=\input@path\do{%
+%<latexrelease> \openin\@inputcheck\reserved@b#1 %
+%<latexrelease> \ifeof\@inputcheck\else
+%<latexrelease> \edef\@filef@und{\reserved@b#1 }%
+%<latexrelease> \let\reserved@a\@firstoftwo%
+%<latexrelease> \closein\@inputcheck
+%<latexrelease> \@break@tfor
+%<latexrelease> \fi}%
+%<latexrelease> \reserved@a}
+%<latexrelease>
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-%
%
%
-% \begin{macro}{\@iffileonpath}
-% If the file is not found by |\openin|, and |\input@path| is defined,
-% look in all the directories specified in |\input@path|.
-% \changes{v0.9p}{1994/01/18}{Macro added}
-% \changes{v1.0f}{1994/05/02}
-% {\cs{@break@loop} renamed to \cs{@break@tfor}}
-% \changes{v1.0t}{1995/05/25}
-% {(CAR) added \cs{long}}
-% \changes{v1.1d}{1996/01/10}
-% {Change argument handling to not require doubled hash. latex/2024}
-% \changes{v1.2d}{2019/10/26}{quote on openin}%
-% \begin{macrocode}
-\long\def\@iffileonpath#1{%
- \let\reserved@a\@secondoftwo
- \expandafter\@tfor\expandafter\reserved@b\expandafter
- :\expandafter=\input@path\do{%
- \openin\@inputcheck\expandafter\quote@name\expandafter{\reserved@b#1} %
- \ifeof\@inputcheck\else
- \edef\@filef@und{"\reserved@b#1" }%
- \let\reserved@a\@firstoftwo%
- \closein\@inputcheck
- \@break@tfor
- \fi}%
- \reserved@a}
-% \end{macrocode}
-% \end{macro}
+%
%
% \begin{macro}{\InputIfFileExists}
% \changes{v0.9b}
@@ -887,7 +901,7 @@
% \end{macrocode}
% \end{macro}
%
-%
+%
% \begin{macro}{\@swaptwoargs}
%
% \changes{v1.1o}{2019/02/07}{Helper macro added}
@@ -898,7 +912,7 @@
% \end{macrocode}
% \end{macro}
%
-%
+%
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease