From cc655ac3a75a0bf9ce53c6acc5e0c0128a599af5 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 5 Dec 2010 00:11:13 +0000
Subject: fink 2.2 (4dec10)

git-svn-id: svn://tug.org/texlive/trunk@20654 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/fink/fink.sty | 43 ++++++++++++++++---------------
 1 file changed, 22 insertions(+), 21 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/fink/fink.sty')

diff --git a/Master/texmf-dist/tex/latex/fink/fink.sty b/Master/texmf-dist/tex/latex/fink/fink.sty
index 03c6b6e877a..9bf6b1c9027 100644
--- a/Master/texmf-dist/tex/latex/fink/fink.sty
+++ b/Master/texmf-dist/tex/latex/fink/fink.sty
@@ -4,11 +4,11 @@
 %%
 %% The original source files were:
 %%
-%% fink.dtx 
+%% fink.dtx  (with options: `header,fink')
 %% 
 
 
-%% Copyright (C) 1999, 2000, 2001, 2002, 2007 Didier Verna
+%% Copyright (C) 1999, 2000, 2001, 2002, 2007, 2010 Didier Verna
 
 %% This file is part of FiNK.
 
@@ -38,8 +38,7 @@
 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %%   Right brace   \}     Tilde         \~}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fink}[2008/02/27 v2.1.1
-                       Keep track of the current filename]
+\ProvidesPackage{fink}[2010/12/03 v2.2 Keep track of the current filename]
 
 \RequirePackage{kvoptions}
 \SetupKeyvalOptions{family=fnk,prefix=fnk@}
@@ -76,28 +75,30 @@
 
 \PackageInfo{FiNK}{main file set to "\finkpath"}
 
-\newcommand*\fink@prepare[1]{%
+\@ifclassloaded{memoir}{
+  \let\fink@beginfile\m@matbeginf
+  \def\fink@endfile#1{\m@matendf{#1}\killm@matf{#1}}}{%
+  \def\fink@beginfile#1{}
+  \def\fink@endfile#1{}}
+
+\newcommand*\fink@input[1]{%
   \begingroup%
     \filename@parse{#1}%
-    \xdef\fink@nextdir{%
+    \xdef\finkdir{%
       \ifx\filename@area\@empty%
         \fnk@maindir%
       \else%
         \fnk@maindir\filename@area%
       \fi}%
-    \xdef\fink@nextbase{\filename@base}%
-    \xdef\fink@nextext{\ifx\filename@ext\relax tex\else\filename@ext\fi}%
-    \xdef\fink@nextfile{\fink@file{\fink@nextbase}{\fink@nextext}}%
-    \xdef\fink@nextpath{\fink@nextdir\fink@nextfile}%
-  \endgroup}
+    \xdef\finkbase{\filename@base}%
+    \xdef\finkext{\ifx\filename@ext\relax tex\else\filename@ext\fi}%
+    \xdef\finkfile{\fink@file{\finkbase}{\finkext}}%
+    \xdef\finkpath{\finkdir\finkfile}%
+  \endgroup%
+  \fink@beginfile{#1}%
+  \@@input\@filef@und%
+  \fink@endfile{#1}}
 
-\newcommand*\fink@input{%
-  \xdef\finkdir{\fink@nextdir}%
-  \xdef\finkbase{\fink@nextbase}%
-  \xdef\finkext{\fink@nextext}%
-  \xdef\finkfile{\fink@nextfile}%
-  \xdef\finkpath{\fink@nextpath}%
-  \@@input\@filef@und}
 \newcommand*\fink@restore[1]{%
   \begingroup%
     \filename@parse{#1}%
@@ -111,9 +112,9 @@
 \long\def\InputIfFileExists#1#2{%
   \IfFileExists{#1}{%
     #2\@addtofilelist{#1}%
-    \fink@prepare{#1}%
-    \expandafter\fink@input%
-    \expandafter\fink@restore\expandafter{\finkpath}}}
+    \edef\fink@before{\noexpand\fink@input{#1}}%
+    \edef\fink@after{\noexpand\fink@restore{\finkpath}}%
+    \expandafter\fink@before\fink@after}}
 
 \endinput
 %%
-- 
cgit v1.2.3

