summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/getfiledate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-20 00:56:48 +0000
committerKarl Berry <karl@freefriends.org>2009-07-20 00:56:48 +0000
commit87d018dbd1eaffee149bb84d9f3a15f61ec55860 (patch)
treeaa2247d4c8796b08aac908fae4c2919537f835ca /Master/texmf-dist/tex/latex/getfiledate
parentec54778b6f178371dcf1392b3f8b02e31604f0ed (diff)
getfiledate update (18jul09)
git-svn-id: svn://tug.org/texlive/trunk@14334 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/getfiledate')
-rw-r--r--Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty55
1 files changed, 17 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty b/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty
index 6fa71ccf0d0..ea5db858889 100644
--- a/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty
+++ b/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty
@@ -1,12 +1,19 @@
+%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
+% This package fetches and formats the date of last modification of any %
+% existing file. It is based on an idea by Heiko Oberdiek (2009). %
+% %
+% This work may be distributed and/or modified under the conditions %
+% of the LaTeX Project Public License, either version 1.3 of this %
+% license or any later version. The latest version of this license %
+% is in http://www.latex-project.org/lppl.txt and version 1.3 or later %
+% is part of all distributions of LaTeX version 2005/12/01 or later. %
+% %
+% (c) Ahmed Musa 2009 %
+%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
\ProvidesPackage{getfiledate}
[2009/03/05 v1.0 Get date of last modification of existing file]
\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{comment}
-\begin{comment}
- This package fetches and formats the date of last modification of any existing file. It is based on an idea by Heiko Oberdiek (2009).
-
- This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
-\end{comment}
+\RequirePackage{etoolbox}
\RequirePackage{xkeyval}
\RequirePackage[table]{xcolor}
\RequirePackage{amssymb}
@@ -24,9 +31,8 @@
\def\gfd@file{getfiledate.sty}
\let\gfd@align@right\relax
\let\gfd@align@left\relax
-\def\gfd@width{\hsize}
\newdimen\gfd@width\gfd@width=\hsize
-\newdimen\gfd@width@tmp
+\newdimen\gfd@width@tmp\gfd@width@tmp=\z@
\def\gfd@framesep{3pt}
\def\gfd@framerule{0.4pt}
\def\gfd@framecolor{black}
@@ -71,34 +77,7 @@
\DeclareOptionX*{\gfd@warn{Unknown option '\CurrentOption' ignored}}
\ExecuteOptionsX[gfd]<getfiledate>{}
\ProcessOptionsX*[gfd]<getfiledate>\relax
-\long\def\gfd@fifo#1\else#2\fi{\fi#1}
-\ifx\ifcsname\@undefined\gfd@fifo
- \def\ifdefined@gfd#1{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname#1\endcsname\relax
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi
- }
-\else
- \def\ifdefined@gfd#1{%
- \ifcsname#1\endcsname
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- }
-\fi
-\def\ifempty@gfd#1{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname#1\endcsname\@empty
- \expandafter\@firstoftwo%
- \else
- \expandafter\@secondoftwo%
- \fi
-}
-\ifdefined@gfd{pdffilemoddate}{}{%
+\ifcsdef{pdffilemoddate}{}{%
\gfd@err{Missing command \string\pdffilemoddate}{%
Use pdfTeX 1.30.0 or later version}
\expandafter\endinput
@@ -139,8 +118,8 @@
\newcommand\gfd@tempc[9]{\gfd@tempd{#1}{#2}{#3}{#4#5}{#6#7}{#8#9}}
\def\gfd@tempd#1#2#3#4#5#6#7\@nil#8{%
\parbox{\gfd@width}{%
- \@killglue\noindent
- \ifempty@gfd{gfd@marker}{}{\gfd@marker@a}\relax
+ \@killglue\noindent%
+ \ifcsempty{gfd@marker}{}{\gfd@marker@a}\relax
\gfd@prefix\space\T@C{\gfd@filenamecolor}{#8}\space
was\space\T@C{\gfd@datecolor}{#1-#2-#3}\space\T@C{\gfd@separatorcolor}{%
\gfd@separator}\space\T@C{\gfd@datecolor}{#4:#5:#6}.%