summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/oberdiek/catchfile.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/catchfile.sty')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/catchfile.sty32
1 files changed, 26 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/catchfile.sty b/Master/texmf-dist/tex/generic/oberdiek/catchfile.sty
index 20b21707ce4..4ee5e898fd6 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/catchfile.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/catchfile.sty
@@ -44,6 +44,9 @@
\fi
\fi
\else
+ \catcode35 6 % #
+ \catcode123 1 % {
+ \catcode125 2 % }
\expandafter\ifx\csname PackageInfo\endcsname\relax
\def\x#1#2{%
\immediate\write-1{Package #1 Info: #2.}%
@@ -57,6 +60,7 @@
\fi
\endgroup
\begingroup
+ \catcode35 6 % #
\catcode40 12 % (
\catcode41 12 % )
\catcode44 12 % ,
@@ -65,6 +69,8 @@
\catcode47 12 % /
\catcode58 12 % :
\catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1#2#3[#4]{\endgroup
\immediate\write-1{Package: #3 #4}%
@@ -80,11 +86,23 @@
\fi
\expandafter\x\csname ver@catchfile.sty\endcsname
\ProvidesPackage{catchfile}%
- [2007/09/09 v1.1 Catches the contents of a file (HO)]
-\expandafter\edef\csname CatchFile@AtEnd\endcsname{%
- \catcode64 \the\catcode64\relax
-}
+ [2007/11/11 v1.2 Catches the contents of a file (HO)]
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname CatchFile@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
\def\TMP@EnsureCode#1#2{%
\edef\CatchFile@AtEnd{%
\CatchFile@AtEnd
@@ -145,8 +163,9 @@
\endgroup
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname IfFileExists\endcsname\relax
+ \input pdftexcmds.sty\relax
\begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname pdffilesize\endcsname\relax
+ \expandafter\ifx\csname pdf@filesize\endcsname\relax
\def\CatchFile@CheckFileExists#1{%
\expandafter\ifx\csname @inputcheck\endcsname\relax
\csname newread\endcsname\@inputcheck
@@ -161,7 +180,8 @@
}%
\else
\def\CatchFile@CheckFileExists#1{%
- \expandafter\ifx\expandafter\\\pdffilesize{#1}\\%
+ \expandafter\expandafter\expandafter\ifx
+ \expandafter\expandafter\expandafter\relax\pdf@filesize{#1}\relax
\let\CatchFile@File\relax
\else
\def\CatchFile@File{#1}%