%%
%% 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/09/29 v1.5 filecontents + macro + verbatim (JFB)]
%%
%% Package: filecontentsdef
%% Version: 1.5 (2019/09/29)
%% License: LPPL 1.3c
%% Copyright (C) 2016-2019 Jean-Francois Burnol <jfbu at free dot fr>
%%
\let\FCD@global\global
\begingroup
\catcode`\^^M\active%
\catcode`\^^L\active\let^^L\relax%
\catcode`\^^I\active%
\gdef\FCD@main#1#2{%
  \def\FCD@defmacro%
     {\toks@\expandafter{#2}%
      \edef\x{\endgroup\def\noexpand#2{\the\toks@}%
              \begingroup\def\noexpand\@currenvir{\@currenvir}}%
      \x}%
  \FCD@global\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\FCD@reserved@c15 %
  \ch@ck7\FCD@reserved@c\write%
  \immediate\openout\FCD@reserved@c#1\relax%
  \if@tempswa%
    \immediate\write\FCD@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\FCD@E{\@backslashchar end\string{\@currenvir\string}}%
  \edef\FCD@reserved@b{\def\noexpand\FCD@reserved@b####1\FCD@E####2\FCD@E####3\relax}%
  \FCD@reserved@b{%
    \ifx\relax##3\relax%
      \if@filesw%
        \let^^L\FCDformfeedtofile%
        \let^^I\FCDtabtofile%
        \immediate\write\FCD@reserved@c{##1}%
      \fi%
      \toks@\expandafter{#2}%
      \let^^L\FCDformfeedtomacro%
      \let^^I\FCDtabtomacro%
      \FCD@global\edef#2{\the\toks@##1\noexpand^^M}%
    \else%
      \edef^^M{\noexpand\end{\@currenvir}}%
      \ifx\relax##1\relax%
      \else%
        \if@filesw%
          \let^^L\FCDformfeedtofile%
          \let^^I\FCDtabtofile%
          \immediate\write\FCD@reserved@c{##1}%
        \fi%
        \toks@\expandafter{#2}%
        \let^^L\FCDformfeedtomacro%
        \let^^I\FCDtabtomacro%
        \FCD@global\edef#2{\the\toks@##1\noexpand\empty\noexpand^^M}%
      \fi%
      \ifx\relax##2\relax%
      \else%
         \@latex@warning{%
           Ignoring text `##2' after \string\end{\@currenvir}}%
      \fi%
    \fi%
    ^^M}%
  \catcode`\^^L\active%
  \catcode`\^^I\active%
  \catcode`\^^M\active%
  \edef^^M##1^^M{\noexpand\FCD@reserved@b##1\FCD@E\FCD@E\relax}%
  \catcode32\active\lccode`~32 \lowercase{\def~{\noexpand~}}%
}%
\gdef\FCDformfeedtofile{^^J^^J}%
\gdef\FCDformfeedtomacro{\noexpand^^M\noexpand^^M}%
\gdef\FCDtabtofile{ }%
\catcode32\active\gdef\FCDtabtomacro{\noexpand }%
\endgroup%
\long\def\FCD@get@aux#1\FCD@get@aux#2{#2}%
\def\FCD@get#1#2%
{%
  \def\FCD@tempa{#1}\def\FCD@tempb{{#2}}%
  \expandafter\FCD@get@aux\@gobbletwo#2\FCD@get@aux
  \@thirdofthree
  \FCD@get@aux
  {\ifcat\relax\noexpand#2\expandafter\@gobble\else\expandafter\@firstofone\fi}%
  {\edef\FCD@tempb{{\expandafter\noexpand\csname#2\endcsname}}}%
  \expandafter\FCD@tempa\FCD@tempb
}%
\begingroup
\catcode`\*=11
\gdef\filecontentsdef #1{\let\FCD@global\@empty
                         \@tempswatrue\FCD@get{\FCD@main{#1}}}%
\gdef\filecontentsdef*#1{\let\FCD@global\@empty
                         \@tempswafalse\FCD@get{\FCD@main{#1}}}%
\global\let\filecontentsdefstarred\filecontentsdef*
\gdef\filecontentsgdef #1{\@tempswatrue\FCD@get{\FCD@main{#1}}}%
\gdef\filecontentsgdef*#1{\@tempswafalse\FCD@get{\FCD@main{#1}}}%
\global\let\filecontentsgdefstarred\filecontentsgdef*
\gdef\endfilecontentsdef{\immediate\closeout\FCD@reserved@c\FCD@defmacro}%
\global\let\endfilecontentsdef*\endfilecontentsdef
\global\let\endfilecontentsdefstarred\endfilecontentsdef
\gdef\endfilecontentsgdef{\immediate\closeout\FCD@reserved@c}%
\global\let\endfilecontentsgdef*\endfilecontentsgdef
\global\let\endfilecontentsgdefstarred\endfilecontentsgdef
\gdef\filecontentsdefmacro{\let\FCD@global\@empty
                           \@fileswfalse\FCD@get{\FCD@main{}}}%
\gdef\endfilecontentsdefmacro{\FCD@defmacro}%
\gdef\filecontentsgdefmacro{\@fileswfalse\FCD@get{\FCD@main{}}}%
\global\let\endfilecontentsgdefmacro\relax
\gdef\filecontentshere #1{\let\FCD@global\@empty
                           \@tempswatrue\FCD@main{#1}\filecontentsheremacro}%
\gdef\filecontentshere*#1{\let\FCD@global\@empty
                           \@tempswafalse\FCD@main{#1}\filecontentsheremacro}%
\global\let\filecontentsherestarred\filecontentshere*
\gdef\endfilecontentshere{\endfilecontentsdef\aftergroup\FCD@here}%
\global\let\endfilecontentshere*\endfilecontentshere
\global\let\endfilecontentsherestarred\endfilecontentshere
\gdef\filecontentsprint{\FCD@get\FCD@print}%
\catcode`\^^M\active%
\gdef\FCD@print #1{\let\FCD@print@EOL^^M\let^^M\relax%
   \begingroup\toks@\expandafter{#1}%
    \edef\x{\endgroup%
        \noexpand\begin{\FCDprintenvname}\FCDprintenvoptions^^M%
        \the\toks@\@backslashchar end\string{\FCDprintenvname\string}}%
   \x^^M%
   \FCD@print@resetEOL}%
\gdef\FCD@print@resetEOL{\let^^M\FCD@print@EOL}%
\gdef\filecontentsprintviascan{\FCD@get\FCD@printviascan}%
\gdef\FCD@printviascan#1{%
   \toks@\expandafter{#1}%
   \edef\FCD@envwithcontents{%
        \noexpand\begin{\FCDprintenvname}\FCDprintenvoptions\noexpand^^M%
        \the\toks@\@backslashchar end{\FCDprintenvname}\noexpand^^M}%
   \FCD@exec\FCD@envwithcontents}%
\endgroup
\def\FCDprintenvname{verbatim}%
\let\FCDprintenvoptions\@empty
\def\FCD@here{\FCD@print\filecontentsheremacro}%
\def\filecontentsexec{\FCD@get\FCD@exec}%
\def\FCD@exec #1{\edef\FCD@newlinechar{\the\newlinechar}%
    \newlinechar13
    \scantokens\expandafter{#1}\newlinechar\FCD@newlinechar\relax}%
\endinput
%%
%% End of file `filecontentsdef.sty'.
