summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/snapshot/snapshot.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-09-18 21:56:20 +0000
committerKarl Berry <karl@freefriends.org>2019-09-18 21:56:20 +0000
commit9b3a2ee50ca73ddd52fbbf5564c5b8973e6e60bd (patch)
tree2a7db17b614a0630f2d087971e4ea465b3e3c94e /Master/texmf-dist/tex/latex/snapshot/snapshot.sty
parentd2c6acc248de8e1c88c013396ad2e5810e1c8b8e (diff)
snapshot (18sep19)
git-svn-id: svn://tug.org/texlive/trunk@52115 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/snapshot/snapshot.sty')
-rw-r--r--Master/texmf-dist/tex/latex/snapshot/snapshot.sty524
1 files changed, 349 insertions, 175 deletions
diff --git a/Master/texmf-dist/tex/latex/snapshot/snapshot.sty b/Master/texmf-dist/tex/latex/snapshot/snapshot.sty
index 6646abaa2c7..286ccdce706 100644
--- a/Master/texmf-dist/tex/latex/snapshot/snapshot.sty
+++ b/Master/texmf-dist/tex/latex/snapshot/snapshot.sty
@@ -6,51 +6,70 @@
%%
%% snapshot.dtx
%%
-%%% ====================================================================
-%%% @LaTeX-doc-source-file{
-%%% filename = "snapshot.dtx",
-%%% version = "1.14",
-%%% date = "2002/03/05",
-%%% time = "15:29:00 EST",
-%%% checksum = "39090 807 3449 29761",
-%%% author = "American Mathematical Society",
-%%% copyright = "Copyright 2001 American Mathematical Society,
-%%% all rights reserved. Copying of this file is
-%%% authorized only if either:
-%%% (1) you make absolutely no changes to your copy,
-%%% including name; OR
-%%% (2) if you do make changes, you first rename it
-%%% to some other name.",
-%%% address = "American Mathematical Society,
-%%% Electronic Products and Services,
-%%% PO Box 6248,
-%%% Providence, RI 02940,
-%%% USA",
-%%% email = "tech-support@ams.org",
-%%% URL = "http://www.ams.org/",
-%%% supported = "yes",
-%%% keywords = "version, compatibility, dependencies, LaTeX",
-%%% abstract = "This package provides a way for a LaTeX
-%%% document to specify, for each external file
-%%% on which the document depends, which version
-%%% is required to guarantee output fidelity.",
-%%% docstring = "The checksum field above contains a CRC-16
-%%% checksum as the first value, followed by the
-%%% equivalent of the standard UNIX wc (word
-%%% count) utility output of lines, words, and
-%%% characters. This is produced by Robert
-%%% Solovay's checksum utility.",
-%%% }
-%%% ====================================================================
+%% Copyright 2001, 2004, 2006, 2007, 2010, 2012 American Mathematical Society.
+%%
+%% American Mathematical Society
+%% Technical Support
+%% Publications Technical Group
+%% 201 Charles Street
+%% Providence, RI 02904
+%% USA
+%% tel: (401) 455-4080
+%% (800) 321-4267 (USA and Canada only)
+%% fax: (401) 331-3842
+%% email: tech-support@ams.org
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% 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.3c 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 the American Mathematical
+%% Society.
+%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{snapshot}[2002/03/05 v1.14]
-\let\@xp\expandafter \let\@nx\noexpand
-\newcommand{\RequireVersions}[2][]{%
- \let\snap@check\snap@compare@versions
- \let\snap@selfcheck\snap@selfcheck@a
- \@ifnextchar *\snap@store@version\snap@store@error#2*{end}{}{}%
+\ProvidesPackage{snapshot}[2012/08/06 v2.13]
+\let\@xp=\expandafter \let\@nx=\noexpand
+\def\str@cmp#1#2\str@cmp#3{%
+ \if #1#3\else F\@car\fi \str@cmp#2\str@cmp
+}
+\def\string@equal#1#2{%
+ \str@cmp#1\relax\str@cmp#2{\relax\@gobbletwo}\@nil TT%
+}
+\newcommand{\RequireVersions}[2][]{}%
+\renewcommand{\RequireVersions}[1][]{%
+ \def\snap@check{\snap@compare@versions}%
+ \toks@{#1}\afterassignment\snap@storem
+ \let\@let@token=
+}
+\def\snap@storem{%
+ \ifx\@let@token\bgroup
+ \else
+ \PackageError{snapshot}{Expected a `\@charlb' character here}\@ehc
+ \@xp\@gobblefour
+ \fi
+ \futurelet\@let@token\snap@branch
}
\@onlypreamble\RequireVersions
+\let\snap@check\@gobble
+\def\snap@finish{\toks@\bgroup}
+\def\snap@branch{%
+ \ifx\@let@token\egroup
+ \@xp\snap@finish
+ \else\ifx\@let@token *%
+ \let\reserved@c\snap@store@version
+ \else\ifx\@let@token\@sptoken
+ \lowercase{\def\reserved@c} {\futurelet\@let@token\snap@branch}%
+ \else
+ \let\reserved@c\snap@store@error
+ \fi\fi\fi
+ \reserved@c
+}
\def\snap@store@error#1{%
\PackageError{snapshot}{Expected '*' here, not '#1'}\@ehc
}
@@ -59,34 +78,68 @@
\@xp\snap@store@b\csname snapx@#2\endcsname{#2}{#3}{#4}%
}
\@onlypreamble\snap@store@version
+\ifx\OmegaVersion\@@undefined
+\else
+ \edef\snapshotApplication{%
+ {Omega}\space\space\space
+ {0000/00/00 v\OmegaVersion}%
+ }%
+\fi
+\ifx\eTeXversion\@@undefined
+\else
+ \edef\snapshotApplication{%
+ {eTeX}\space\space\space\space
+ {0000/00/00 v\number\eTeXversion\eTeXrevision}%
+ }%
+\fi
+\ifx\pdftexversion\@@undefined
+\else
+ \edef\snapshotApplication{%
+ \ifx\eTeXversion\@@undefined
+ {pdfTeX}\space\space
+ \else
+ {pdfeTeX}\space
+ \fi
+ {0000/00/00 v0.\number\pdftexversion\pdftexrevision}%
+ }%
+\fi
+\@ifundefined{snapshotApplication}{%
+ \edef\snapshotApplication{%
+ {TeX}\space\space\space\space\space
+ {1990/03/25 v3.x}%
+ }%
+}{}
\def\@fmtextension{fmt}
\def\@tfmextension{tfm}
\edef\snapx@package{.\@pkgextension}
\edef\snapx@class{.\@clsextension}
\edef\snapx@format{.\@fmtextension}
\edef\snapx@tfm{.\@tfmextension}
-\long\def\snapx@application{}
-\let\snap@file=\@empty
+\long\def\snapx@ignore{}
+\let\snapx@application=\snapx@ignore
+\let\snapx@file=\@empty
\let\snapx@end\@@end
+\expandafter\let\csname snapx@-------\endcsname\snapx@end
\def\snap@store@b#1#2#3#4{%
\ifx#1\snapx@end
- \@xp\@gobblefour
+ \@xp\snap@finish
\else
\ifx#1\relax \let#1\@empty\fi
\def\@tempa##1 ##2 ##3\@nil{##1 ##2}%
\ifx#1\snapx@application
+ \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
\else
- \xdef\rqv@list{\rqv@list
- \ifx\@empty\rqv@list\else,\fi
- #3#1%
- }%
- \fi
- \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
- \ifx#1\snapx@format \snap@check{#3.fmt}%
- \else \snap@selfcheck{#3.sty}%
+ \xdef\rqv@list{\rqv@list{#3#1}}%
+ \@xp\xdef\csname rqv@#3#1\endcsname{\@tempa#4 v?.? ? \relax\@nil}%
+ \snap@intest{#3}{#1}%
+ \ifx#1\snapx@format \snap@check{#3.fmt}%
+ \else
+ \edef\@tempa{\@nx\string@equal{snapshot.sty}{#3#1}}%
+ \if\@tempa \snap@selfcheck \fi
+ \fi
\fi
\fi
- \@ifnextchar *\snap@store@version\snap@store@error
+ \futurelet\@let@token\snap@branch
}
\@onlypreamble\snap@store@b
\def\snap@write{\immediate\write\snap@out}
@@ -97,10 +150,8 @@
\DeclareOption{log}{%
\let\snap@write\typeout
}
-\let\snap@fake@b\relax
-\DeclareOption{test}{%
- \def\snap@fake@b{\endinput \futurelet\@let@token\snap@ignoline}%
-}
+\let\snap@intest=\@gobbletwo
+\DeclareOption{test}{\def\snap@intest{True}}
\DeclareOption{tfm}{%
\typeout{Option 'tfm' not implemented yet [1999/09/23]}%
}
@@ -108,17 +159,20 @@
\def\snap@mismatch{\snap@mismatch@warning}
\DeclareOption{error}{%
\def\snap@mismatch{\PackageError}%
+ \def\snap@selfcheck{\snap@selfcheck@a}%
\ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
}
\DeclareOption{warning}{%
\def\snap@mismatch{\snap@mismatch@warning}%
+ \def\snap@selfcheck{\snap@selfcheck@a}%
\ifx\snap@select\@empty \let\snap@select\snap@select@all \fi
}
\def\snap@select@all#1#2 #3#4 #5\@nil{#1#2 #3#4}
\let\snap@select\@empty
-\DeclareOption{date}{%
- \def\snap@select#1#2 #3\@nil{#1#2}%
-}
+\def\snap@seldate#1#2 #3\@nil{#1#2}%
+\def\snap@selversion#1#2 #3{\snap@select@version #3}%
+\def\snap@selmajor#1#2 #3{\snap@select@major #3}%
+\DeclareOption{date}{\let\snap@select=\snap@seldate}
\def\snap@select@version#1{%
\ifodd 0#11 \@xp\snap@sva\@xp#1\else\@xp\snap@select@version\fi
}
@@ -127,13 +181,26 @@
\ifodd 0#11 \@xp\snap@svm\@xp#1\else\@xp\snap@select@major\fi
}
\def\snap@svm#1.#2\@nil{#1}
-\DeclareOption{version}{%
- \def\snap@select#1#2 #3{\snap@select@version #3}%
+\DeclareOption{version}{\let\snap@select\snap@selversion}
+\DeclareOption{major-version}{\let\snap@select\snap@selmajor}
+\def\snap@bbinfo{01}
+\DeclareOption{bbinfo}{\def\snap@bbinfo{00}}
+\let\snap@splitter=?
+\AtBeginDocument{%
+ \xdef\@filelist{\@filelist\snap@splitter}%
}
-\DeclareOption{major-version}{%
- \def\snap@select#1#2 #3{\snap@select@major #3}%
+\let\snap@selfcheck\@empty
+\let\snap@selfcheck@a\@empty
+\DeclareOption{self-warning}{%
+ \def\snap@selfcheck{%
+ \begingroup
+ \def\snap@mismatch{\snap@mismatch@warning}%
+ \snap@selfcheck@a
+ \endgroup
+ }
}
-\ProcessOptions\par
+\ExecuteOptions{warning}
+\ProcessOptions\relax
\edef\snap@restore@extensions{%
\def\@nx\@pkgextension{\@pkgextension}%
\def\@nx\@clsextension{\@clsextension}%
@@ -157,42 +224,29 @@
}%
\fi
\listfiles
-\def\@dofilelist{%
- \snap@restore@extensions
- \ifx\rqv@list\@empty
- \else \rqv@compare@lists
- \fi
- \ifx\snap@write\typeout
+\def\snap@doit#1{%
+ \begingroup
+ \ifx\delimiter#1\delimiter
\else
- \newwrite\snap@out
- \immediate\openout\snap@out=\jobname.dep \relax
- \fi
- \snap@write{\string\RequireVersions\@charlb}%
- \snap@write{\space\space *{application}{TeX}%
- \space\space\space\space\space{1990/03/25 v3.x}}%
- \@for\@currname:=\@filelist\do{%
- \filename@parse\@currname
+ \filename@parse{#1}%
+ \let\@tempd\@empty
\ifx\filename@ext\relax
- \def\@tempa{file}\def\@tempd{.tex}\def\filename@ext{tex}%
- \def\@tempb{~~~}%
+ \def\@tempa{file}\def\@tempb{~~~}%
\else\ifx\filename@ext\@pkgextension
- \def\@tempa{package}\let\@tempd\@empty
- \def\@tempb{}%
+ \def\@tempa{package}\let\@tempb\@empty
\else\ifx\filename@ext\@clsextension
- \def\@tempa{class}\let\@tempd\@empty
- \def\@tempb{~~}%
+ \def\@tempa{class}\def\@tempb{~~}%
\else\ifx\filename@ext\@fmtextension
- \def\@tempa{format}\let\@tempd\@empty
- \def\@tempb{~}%
+ \def\@tempa{format}\def\@tempb{~}%
\else\ifx\filename@ext\@tfmextension
- \def\@tempa{tfm}\let\@tempd\@empty
- \def\@tempb{~~~~}%
+ \def\@tempa{tfm}\def\@tempb{~~~~}%
\else
\def\@tempa{file}\edef\@tempd{.\filename@ext}%
\def\@tempb{~~~}%
\fi\fi\fi\fi\fi
\@xp\let\@xp\@tempe
- \csname ver@\filename@base.\filename@ext\endcsname
+ \csname ver@\filename@base %
+ \ifx\filename@ext\relax\else.\filename@ext\fi\endcsname
\ifx\@tempe\@empty \let\@tempe\relax \fi
\edef\@tempe{%
\ifx\@tempe\relax 0000/00/00 v0.0%
@@ -202,99 +256,161 @@
}%
\edef\@tempc{\filename@area\filename@base\@tempd}% full file name
\@xp\snap@pad\@tempc\space~~~~~~~~~~~~~~~~\@nil\@tempd
- \begingroup \let~\space
- \snap@write{\space\space *{\@tempa}\@tempb{\@tempc}\@tempd{\@tempe}}%
- \endgroup
+ \let~\space
+ \snap@write{\space\space *{\@tempa}\@tempb{\@tempc}\@tempd{\@tempe}}%
+ \fi
+ \aftergroup\snap@doit
+ \endgroup
+}%
+\def\snap@bracify#1#2,{%
+ \ifx\@empty#1\expandafter\@gobble\else {#1#2}\fi \snap@bracify
+}
+\def\snap@splitter@a{%
+ \iffalse{{\fi }}% close current file name, end definition
+ \xdef\specific@files{%
+ \iffalse}\fi
+ \specific@files
+ \expandafter\@gobble\string % discard one closing brace
+}
+\def\snap@fdcheck#1{%
+ \ifx\delimiter#1\@xp\@gobble
+ \else\snap@fda#1\@empty.fd\@empty ?\@nil
+ \fi
+ \snap@fdcheck
+}
+\def\snap@fda#1.fd\@empty#2#3\@nil{%
+ \if ?#2%
+ \xdef\specific@files{\specific@files {#1}}%
+ \else
+ \xdef\general@files{\general@files {#1.fd}}%
+ \fi
+}
+\let\general@files\@empty
+\let\specific@files\@empty
+\newcommand{\SpecialInput}[1]{%
+ \xdef\specific@files{\specific@files{#1}}%
+ \@@input#1\relax
+}
+\def\@dofilelist{%
+ \snap@restore@extensions
+ \xdef\general@files{\@xp\snap@bracify \@filelist \@empty,\@empty,}%
+ \let\snap@splitter\snap@splitter@a
+ \xdef\general@files{\general@files}%
+ \let\@tempa\specific@files \global\let\specific@files\@empty
+ \@xp\snap@fdcheck\@tempa{\delimiter}%
+ \ifx\rqv@list\@empty
+ \else \rqv@compare@lists
+ \fi
+ \ifx\snap@write\typeout
+ \else
+ \newwrite\snap@out
+ \immediate\openout\snap@out=\jobname.dep \relax
+ \fi
+ \snap@write{\string\RequireVersions\@charlb}%
+ \snap@write{\space\space *{application}%
+ \snapshotApplication
}%
+ \@xp\snap@doit\general@files{\delimiter\aftergroup\@gobble\@gobble}%
+ \ifx\specific@files\@empty
+ \else
+ \snap@specific
+ \fi
\snap@write{\@charrb}%
\ifx\snap@write\typeout
\else \immediate\closeout\snap@out
\typeout{Dependency list written on \jobname.dep.}%
\fi
}%
-\def\rqv@condense#1,{%
- \if ,#1,%
+\def\snap@specific{%
+ \snap@write{ \space *{-------}{Document-specific files:}{----}}%
+ \@xp\snap@doit\specific@files{\delimiter\aftergroup\@gobble\@gobble}%
+}
+\def\rqv@condense#1{%
+ \@xp\ifx\csname ver@#1\endcsname\N
\else
- \@xp\ifx\csname ver@#1\endcsname\N
- \else
- \edef\L{\L,#1}%
- \@xp\let\csname ver@#1\endcsname=\N
- \fi
+ \edef\L{\L{#1}}%
+ \@xp\let\csname ver@#1\endcsname=\N
\fi
\rqv@condense
}
-\def\rqv@compare@lists{%
- \begingroup
- \def\N{1}\let\L=\@gobble
- \@xp\rqv@condense \rqv@list,TeX,{,\relax\@xp\@gobbletwo\@xp},%
- \ifx\L\@gobble\let\L\@empty\fi
- \let\rqv@list=\L
- \let\L=\@gobble
- \@xp\rqv@condense \@filelist,{,\relax\@xp\@gobbletwo\@xp},%
- \ifx\L\@gobble\let\L\@empty\fi
- \@for\@currname:=\L\do{%
- \snap@mismatch{snapshot}{^^J%
- File \@currname\space loaded though not in
- \noexpand\RequireVersions list%
- }\@ehc
- }%
- \def\N{2}\let\L=\@gobble
- \@xp\rqv@condense\@filelist,TeX,{,\relax\@xp\@gobbletwo\@xp},%
- \let\L=\@gobble
- \@xp\rqv@condense\rqv@list,{,\relax\@xp\@gobbletwo\@xp},%
- \ifx\L\@gobble\let\L\@empty\fi
- \@for\@currname:=\L\do{%
- \snap@mismatch{snapshot}{^^J%
- File \@currname\space [\csname rqv@\@currname\endcsname]
- required but not loaded%
- }\@ehc
- }%
- \endgroup
+\def\rqv@condend{\endcsname ?\fi
+ \@xp\@xp\@xp\@gobbletwo\csname @xp\iftrue}
+\def\rqv@overloaded#1{%
+ \snap@mismatch{snapshot}{^^J%
+ File #1 loaded though not in \noexpand\RequireVersions list%
+ }\@ehc
}
-\begingroup \catcode\endlinechar=12\relax %
-\long\gdef\snap@ignoline#1
-{}\endgroup %
-\def\snap@fake@input#1#2#3#4{%
- \ifx#1\snapx@end
- \aftergroup\@@end \@xp\@gobblefour
- \else
- \ifx#1\snapx@format
- \else
- \message{^^J}%
- \@xp\snap@fake@b\@@input #3#1\relax
- \fi
- \fi
- \@ifnextchar *\snap@store@version\snap@store@error
+\def\rqv@notloaded#1{%
+ \snap@mismatch{snapshot}{^^J%
+ File #1 [\csname rqv@#1\endcsname] required but not loaded%
+ }\@ehc
}
-\newcommand{\rqvTest}[2][]{%
- \begingroup \catcode\endlinechar=12
- \catcode`\%=12 \catcode`\{=12 \catcode`\}=12\relax
- \let\snapx@application=\snapx@format \let\snapx@tfm=\snap@format
- \@ifnextchar *\snap@store@version\snap@store@error#2*{end}{}{}%
+\def\rqv@set#1{\@xp\let\csname ver@#1\endcsname\N \rqv@set}
+\def\rqv@test#1{\csname ver@#1\endcsname{#1}\rqv@test}
+\def\rqv@compare@lists{%
+ \begingroup
+ \def\N{1}\let\L\@empty
+ \@xp\rqv@condense\rqv@list\rqv@condend
+ \global\let\rqv@list=\L
+ \def\N{2}\let\L\@empty
+ \@xp\rqv@condense\general@files\rqv@condend
+ \global\let\general@files=\L
+ \def\T{\@firstoftwo{\endcsname\@empty\@gobbletwo}}%
+ \let\N\rqv@overloaded \@xp\rqv@set\general@files \T
+ \let\N\@gobble \@xp\rqv@set\rqv@list \T
+ \@xp\rqv@test\general@files{\endcsname\csname @gobbletwo}%
+ \let\N\rqv@notloaded \@xp\rqv@set\rqv@list \T
+ \let\N\@gobble \@xp\rqv@set\general@files \T
+ \@xp\rqv@test\rqv@list{\endcsname\csname @gobbletwo}%
\endgroup
}
-\@ifundefined{snap@fake@b}{}{%
- \let\snap@store@b\snap@fake@input
- \let\RequireVersions\rqvTest
-}
\AtBeginDocument{%
\@ifundefined{ver@amsgen}{}{%
\@xp\let\csname ver@amsgen.sty\@xp\endcsname
\csname ver@amsgen\endcsname
}%
}
-\let\snap@compare@versions\@gobble \let\snap@check\@gobble
-\let\snap@selfcheck\@gobble \let\snap@selfcheck@a\@gobble
-\ifx\snap@select\@empty \endinput \fi
-\begingroup \catcode`\.=11\relax
-\gdef\snap@selfcheck@b#1\rqv@snapshot.sty#2#3\@nil{T#2}
-\gdef\snap@selfcheck@a#1{%
- \if\@xp\snap@selfcheck@b\csname rqv@#1\endcsname T%
- \rqv@snapshot.sty F\@nil
- \snap@check{#1}%
+\def\ProvidesFile#1{%
+ \def\snap@checker{\snap@check{#1}}%
+ \begingroup
+ \aftergroup\snap@checker
+ \catcode`\ 10
+ \ifnum\endlinechar < 256
+ \ifnum \endlinechar>\m@ne
+ \catcode\endlinechar 10
+ \fi
+ \fi
+ \@makeother\/%
+ \@makeother\&%
+ \kernel@ifnextchar[{\snap@providesfile{#1}}{\snap@providesfile{#1}[]}%
+}
+\def\snap@graphic@test#1#2#3\@nil{r\if G#1#2\else X\fi}
+\def\snap@providesfile#1[#2]{%
+ \wlog{File: #1 #2}%
+ \if\snap@graphic@test#2@@\@nil
+ \snap@record@graphic#1\relax #2 (type ??)\@nil
+ \else
+ \expandafter\xdef\csname ver@#1\endcsname{#2}%
\fi
+ \endgroup
}
-\endgroup
+\def\snap@record@graphic#1\relax #2(type #3)#4\@nil{%
+ \expandafter\xdef\csname ver@#1\endcsname{%
+ Graphic%
+ \if\snap@bbinfo :bb=\Gin@llx/\Gin@lly/\Gin@urx/\Gin@ury\fi
+ \space v0.0%
+ }%
+}
+\def\@pr@videpackage [#1]{%
+ \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
+ \ifx\@currext\@clsextension
+ \typeout{Document Class: \@gtempa\space#1}%
+ \else
+ \wlog{Package: \@gtempa\space#1}%
+ \fi
+ \snap@check{\@currname.\@currext}%
+}
+\def\snap@selfcheck@a{\snap@check{snapshot.sty}}
\def\@nofmt#1.fmt.#2 {#1 }
\def\snap@mismatch@a#1#2#3{%
\snap@mismatch{snapshot}{^^J%
@@ -317,24 +433,82 @@
\fi
}%
\endgroup
+ \snap@test@abort
}
-\def\ProvidesFile#1{%
- \def\snap@checker{\snap@check{#1}}%
- \begingroup
- \aftergroup\snap@checker
- \catcode`\ 10\catcode\endlinechar 10 %
- \@makeother\/%
- \@makeother\&%
- \@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}%
+\let\snap@test@abort=\@empty
+\ifx\snap@select\@empty
+ \let\snap@compare@versions\@gobble
+ \let\snap@check\@gobble
+\fi
+\providecommand{\controldates}[1]{}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifx\snap@intest\@gobbletwo \endinput \fi
+\def\restore@some@catcodes{}
+\def\save@some@catcodes{%
+ \edef\restore@some@catcodes{%
+ \catcode\number`\@=\number\catcode`\@
+ \catcode\number`\"=\number\catcode`\"
+ \catcode\number`\^=\number\catcode`\^
+ \catcode\number`\_=\number\catcode`\_
+ \relax
+ }%
}
-\def\@pr@videpackage[#1]{%
- \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}%
- \ifx\@currext\@clsextension
- \typeout{Document Class: \@gtempa\space#1}%
+\def\snap@intest#1#2{%
+ \message{^^J}%
+ \begingroup \edef\0{#1#2}\def\9{latex209.def}%
+ \ifx\0\9\global\@compatibilitytrue \fi
+ \ifx#2\snapx@format
+ \def\snap@test@abort{\endgroup}%
\else
- \wlog{Package: \@gtempa\space#1}%
+ \edef\N{%
+ \noexpand\snap@intest@b{#1#2}%
+ {#1}{\@xp\@gobble#2\@empty}%
+ {\csname rqv@#1#2\endcsname}}%
+ \expandafter\endgroup\N
\fi
- \snap@check{\@currname.\@currext}%
+}
+\def\snap@intest@b#1#2#3#4{%
+ \def\@currname{#2}\def\@currext{#3}%
+ \begingroup \lccode`\/=`\0\relax\lowercase{\endgroup
+ \ifnum\snap@seldate#4 00 0\@nil>\z@
+ }% matches \lowercase
+ \save@some@catcodes
+ \@@input #1 \relax
+ \restore@some@catcodes
+ \else
+ \snap@specialtest{#1}{#4}%
+ \fi
+}
+\def\snap@specialtest#1#2{%
+ \fake@input{#1}%
+}
+\def\fake@input#1{%
+ \begingroup
+ % Ensure that outer \foo or unmatched braces don't trip us up
+ \catcode`\\=12 \catcode`\{=12 \catcode`\}=12
+ \endinput
+ \def\G{\@car\endgroup}%
+ \expandafter\futurelet\expandafter\?\expandafter\G\@@input#1 \relax\@nil
+}
+\let\snap@test@abort=\endinput
+\let\snap@selfcheck=\@empty
+\def\snap@finish{%%
+ \endgroup \message{^^J}%
+ \def\X##1{##1,\X}%
+ \edef\@filelist{\@xp\X\rqv@list{\@gobbletwo}}%
+ \def\X##1,?{##1}\edef\@filelist{\@xp\X\@filelist ?}%
+ \@dofilelist
+ \@@end
+}%
+\def\snap@mismatch#1#2#3{}
+\renewcommand{\RequireVersions}[2][]{%
+ \begingroup
+ \makeatletter
+ \def\snap@check{\snap@compare@versions}%%
+ \let\snapx@tfm=\snap@ignore
+ \def\ProvidesLanguage##1{\ProvidesFile{##1.ldf}}%
+ \iffalse{\fi \futurelet\@let@token\snap@branch #2}%
+ \endgroup
}
\endinput
%%