%%
%% This is file `filecontentsdef.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% filecontentsdef.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from filecontentsdef.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file filecontentsdef.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{filecontentsdef}
 [2019/04/20 v1.4 filecontents + macro + verbatim (JFB)]
%%
%% Package: filecontentsdef
%% Version: 1.4 (2019/04/20)
%% License: LPPL 1.3c
%% Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>
%%
\begingroup
\catcode`\^^M\active%
\catcode`\^^L\active\let^^L\relax%
\catcode`\^^I\active%
\gdef\filec@ntentsdef#1#2{%
  \let#2\@empty%
 \if@filesw%
  \openin\@inputcheck#1 %
  \ifeof\@inputcheck%
    \@latex@warning@no@line%
        {Writing file `\@currdir#1'}%
  \else%
    \@latex@warning@no@line%
        {Overwriting file `\@currdir#1'}%
  \fi%
  \closein\@inputcheck%
  \chardef\reserved@c15 %
  \ch@ck7\reserved@c\write%
  \immediate\openout\reserved@c#1\relax%
  \if@tempswa%
    \immediate\write\reserved@c{%
      \@percentchar\@percentchar\space%
          \expandafter\@gobble\string\LaTeX2e file `#1'^^J%
      \@percentchar\@percentchar\space  generated by the %
        `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
      \@percentchar\@percentchar\space from source `\jobname' on %
         \number\year/\two@digits\month/\two@digits\day.^^J%
      \@percentchar\@percentchar}%
  \fi%
 \fi%
  \let\do\@makeother\dospecials%
  \count@=128\relax%
  \loop%
    \ifnum\catcode\count@=\active%
          \lccode`~\count@%
          \lowercase{\def~{\noexpand~}}%
    \else%
          \catcode\count@=11 %
    \fi%
    \advance\count@ by \@ne%
    \ifnum\count@<\@cclvi%
  \repeat%
  \let^^L\relax%
  \edef\E{\@backslashchar end\string{\@currenvir\string}}%
  \edef\reserved@b{\def\noexpand\reserved@b####1\E####2\E####3\relax}%
  \reserved@b{%
    \ifx\relax##3\relax%
      \if@filesw\immediate\write\reserved@c{##1}\fi%
      \toks@\expandafter{#2}%
      {\def^^L{\noexpand^^M\noexpand^^M}\lowercase{\let^^I~}%
       \xdef#2{\the\toks@##1\noexpand^^M}}%
    \else%
      \edef^^M{\noexpand\end{\@currenvir}}%
      \ifx\relax##1\relax%
      \else%
       \if@filesw%
          \@latex@warning{Writing text `##1' before %
             \string\end{\@currenvir}\MessageBreak as last line of #1}%
        \immediate\write\reserved@c{##1}%
       \fi%
        \toks@\expandafter{#2}%
        {\def^^L{\noexpand^^M\noexpand^^M}\lowercase{\let^^I~}%
         \xdef#2{\the\toks@##1\noexpand^^M}}%
      \fi%
      \ifx\relax##2\relax%
      \else%
         \@latex@warning{%
           Ignoring text `##2' after \string\end{\@currenvir}}%
      \fi%
    \fi%
    ^^M}%
  \catcode`\^^L\active%
  \let\L\@undefined%
  \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi^^J^^J}%
  \catcode`\^^I\active%
  \let\I\@undefined%
  \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}%
  \catcode`\^^M\active%
  \edef^^M##1^^M{\noexpand\reserved@b##1\E\E\relax}%
  \catcode32\active\lccode`~32 \lowercase{\def~{\noexpand~}}%
}%
\endgroup
\long\def\filecontentsdef@aux#1\filecontentsdef@aux{\@firstofone}%
\def\filecontentsdef@get#1#2%
{%
  \def\@tempa{#1}\def\@tempb{{#2}}%
  \expandafter\filecontentsdef@aux\@gobbletwo#2\filecontentsdef@aux
  \@thirdofthree
  \filecontentsdef@aux
  {\ifcat\relax\noexpand#2\expandafter\@gobble\else\expandafter\@firstofone\fi}%
  {\edef\@tempb{{\expandafter\noexpand\csname#2\endcsname}}}%
  \expandafter\@tempa\@tempb
}%
\begingroup
\catcode`\*=11
\gdef\filecontentsdef #1{\@tempswatrue\filecontentsdef@get{\filec@ntentsdef{#1}}}%
\gdef\filecontentsdef*#1{\@tempswafalse\filecontentsdef@get{\filec@ntentsdef{#1}}}%
\global\let\endfilecontentsdef \endfilecontents
\global\let\endfilecontentsdef*\endfilecontents
\gdef\filecontentsdefmacro{\@fileswfalse\filecontentsdef@get{\filec@ntentsdef{}}}%
\global\let\endfilecontentsdefmacro\relax
\gdef\filecontentshere #1{\@tempswatrue\filec@ntentsdef{#1}\filecontentsheremacro}%
\gdef\filecontentshere*#1{\@tempswafalse\filec@ntentsdef{#1}\filecontentsheremacro}%
\gdef\endfilecontentshere{\endfilecontentsdef\aftergroup\filecontents@here}%
\global\let\endfilecontentshere*\endfilecontentshere
\gdef\filecontentsprint{\filecontentsdef@get\filecontents@print}%
\catcode`\^^M\active%
\gdef\filecontents@print #1{\let\filecontents@print@EOL^^M\let^^M\relax%
   \begingroup\toks@\expandafter{#1}\edef\x{\endgroup%
            \noexpand\begin{verbatim}^^M%
            \the\toks@\@backslashchar end\string{verbatim\string}}\x^^M%
   \filecontents@print@resetEOL}%
\gdef\filecontents@print@resetEOL{\let^^M\filecontents@print@EOL}%
\endgroup
\def\filecontents@here{\filecontents@print\filecontentsheremacro}%
\def\filecontentsexec{\filecontentsdef@get\filecontents@exec}%
\def\filecontents@exec #1{\newlinechar13
    \scantokens\expandafter{#1}\newlinechar10\relax}%
\endinput
%%
%% End of file `filecontentsdef.sty'.
