summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/filemod/filemod-expmin.tex
blob: dc43b328d6343359594f26728132187438f96a98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
%%
%% Copyright (C) 2011 by Martin Scharrer <martin@scharrer.me>
%% ----------------------------------------------------------
%% 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 (at your option) 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.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
%% This work consists of the files filemod.dtx and filemod.ins
%% and the derived files filemod.sty, filemod-expmin.sty,
%% filemod.tex and filemod-expmin.tex.
%%
\expandafter\edef\csname filemod@cat\endcsname{\noexpand\catcode`\noexpand\@=\the\catcode`\@\relax}
\catcode`\@=11
\newif\iffilemod@direct
\filemod@directtrue
\ifx\pdffilemoddate\@undefined
   \input pdftexcmds.sty
    \filemod@directfalse
    \ifx\pdf@filemoddate\@undefined
        \edef\filemod@help
        {The required command \string\pdffilemoddate\space is not defined.
         This means that the used\space\space LaTeX compiler does not support it.
         Please make sure that pdfLaTeX 1.30.0 or\space\space\space newer or LuaLaTeX is used.
         XeLaTeX does not support reading file modification\space\space dates.
        }%
    \errhelp\expandafter{\filemod@help}
    \errmessage{filemod package: Required command \string\pdffilemoddate\space is not defined!}
    \fi
\fi
\begingroup
\catcode`\D=12
\catcode`\Z=12
\catcode`\:=12
\iffilemod@direct
\gdef\filemodNumdate#1{%
    \expandafter\filemod@Numdate\pdffilemoddate{#1}D:00000000000000Z\relax
}
\else
\gdef\filemodNumdate#1{%
    \expandafter\expandafter
    \expandafter\filemod@Numdate\pdf@filemoddate{#1}D:00000000000000Z\relax
}
\fi
\gdef\filemod@Numdate D:#1#2#3#4#5#6#7#8#9\relax{%
    #1#2#3#4#5#6#7#8%
}
\iffilemod@direct
\gdef\filemodNumtime#1{%
    \expandafter\filemod@Numtime\pdffilemoddate{#1}D:00000000000000Z\relax
}
\else
\gdef\filemodNumtime#1{%
    \expandafter\expandafter
    \expandafter\filemod@Numtime\pdf@filemoddate{#1}D:00000000000000Z\relax
}
\fi
\gdef\filemod@Numtime D:#1#2#3#4#5#6#7#8#9\relax{%
    \filemod@@Numtime#9\relax
}
\gdef\filemod@@Numtime#1#2#3#4#5#6#7\relax{%
    #1#2#3#4#5#6%
}
\endgroup
\def\filemodCmp#1#2%
{%
    \ifcase0%
        \ifnum\filemodNumdate{#2}>\filemodNumdate{#1} 1\else
            \ifnum\filemodNumdate{#2}=\filemodNumdate{#1} %
                \ifnum\filemodNumtime{#2}>\filemodNumtime{#1} 1\fi
            \fi
        \fi
    \space
       \expandafter\@firstoftwo
    \or
       \expandafter\@secondoftwo
    \fi
}
\long\def\@firstoftwo#1#2{#1}
\long\def\@secondoftwo#1#2{#2}
\filemod@cat
\expandafter\let\csname filemod@cat\endcsname\relax
\endinput
%%
%% End of file `filemod-expmin.tex'.