% environ.cd % Anders G S Svensson % Source: environ.nw % $Revision: 1.9 $ % $Date: 1996/02/19 19:21:07 $ \def\B#1{\environ@envin@{#1}\@cs@{environ@benv@#1}} \def\E#1{\@cs@{environ@eenv@#1}\environ@envout@{#1}} \def\environ@B@#1{\environ@blockin@{#1}\@cs@{environ@bblo@#1}} \def\environ@E@#1{\@cs@{environ@eblo@#1}\environ@blockout@{#1}} \def\environ@envin@#1{\environ@checkin@{env}{#1}} \def\environ@blockin@#1{\environ@checkin@{blo}{#1}} \def\environ@envout@#1{\environ@checkout@{env}{#1}} \def\environ@blockout@#1{\environ@checkout@{blo}{#1}} \let\environ@checkin@\@eattwo@ \let\environ@checkout@\@eattwo@ \DeclareOption{check} {\def\environ@checkin@#1#2{\relax \@ifundefined@{environ@b#1@#2}{\environ@unknown@{#1}{#2}}{}% \gdef\environ@currenv@{{#1}{#2}}% \xdef\environ@envstack@{{#1}{#2}\environ@envstack@}} \def\environ@checkout@#1#2{\relax \@ifx@\environ@currenv@\environ@topenv@ {\environ@toperror@{#1}{#2}}% {\@strcmp@{#2}{\expandafter\@SecondOfTwo@\environ@currenv@} {\@expandafter@{\expandafter\environ@popenv@\@eattwo@}\environ@envstack@ @}% {\environ@incompat@{#1}{#2}} \@ifundefined@{environ@e#1@#2}{\environ@unknown@{#1}{#2}}{}}}% \def\environ@topenv@{{}{}} \let\environ@currenv@\environ@topenv@ \let\environ@envstack@\environ@topenv@ \def\environ@toperror@#1#2{% \@Warning@{\environ@endstring@{#1}{#2} at top level}} \def\environ@incompat@#1#2{% \@Warning@{\expandafter\environ@beginstring@\environ@currenv@\@space@ terminated by \environ@endstring@{#1}{#2}}} \def\environ@unknown@#1#2{\@Warning@{Unknown \environ@environname@{#1}: #2}} \def\environ@beginstring@#1#2{\@cs@{environ@b#1string@}{#2}} \def\environ@endstring@#1#2{\@cs@{environ@e#1string@}{#2}} \def\environ@benvstring@#1{\string\B{#1}} \def\environ@eenvstring@#1{\string\E{#1}} \def\environ@bblostring@#1{\expandafter\string\csname #1\endcsname} \def\environ@eblostring@#1{\expandafter\string\csname end#1\endcsname} \def\environ@environname@#1{\@cs@{environ@#1name@}} \def\environ@envname@{environment} \def\environ@bloname@{block} \def\environ@popenv@#1#2#3@{% \gdef\environ@currenv@{{#1}{#2}}\gdef\environ@envstack@{#3}}} \def\Bdef{\relax\environ@def@{def}{b}} \def\Blet{\relax\environ@def@{let}{b}} \def\Edef{\relax\environ@def@{def}{e}} \def\Elet{\relax\environ@def@{let}{e}} \def\environ@def@#1#2{% \@ifnextchar@*% {\@expandafter@{\environ@blodef@{#1}{#2}}\@eat@}% {\environ@envdef@{#1}{#2}}} \def\environ@envdef@#1#2#3{% \@cs@{@#1@}{environ@#2env@#3}} \def\environ@blodef@#1#2#3{% \@def@{#3}{\environ@B@{#3}}\@def@{end#3}{\environ@E@{#3}}\@cs@{@#1@}{environ@#2blo@#3}} \def\newgroup{\relax \@ifnextchar@*{\expandafter\environ@newblockgroup@\@eat@}\environ@newenvgroup@} \def\environ@newblockgroup@#1{% \@def@{#1}{\environ@B@{#1}}\@def@{end#1}{\environ@E@{#1}}% \environ@n@wblockgroup@{#1}} \long\def\environ@n@wblockgroup@#1#2#3{% \@def@{environ@bblo@#1}{\begingroup#2} \@def@{environ@eblo@#1}{#3\endgroup}} \def\environ@newenvgroup@#1{% \environ@n@wenvgroup@{#1}} \long\def\environ@n@wenvgroup@#1#2#3{% \@def@{environ@benv@#1}{\begingroup#2} \@def@{environ@eenv@#1}{#3\endgroup}} \def\newpair{\relax \@ifnextchar@*{\expandafter\environ@newblockpair@\@eat@}\environ@newenvpair@} \def\environ@newblockpair@#1{% \@def@{#1}{\environ@B@{#1}}\@def@{end#1}{\environ@E@{#1}}% \environ@n@wblockpair@{#1}} \long\def\environ@n@wblockpair@#1#2#3{% \@def@{environ@bblo@#1}{#2} \@def@{environ@eblo@#1}{#3}} \def\environ@newenvpair@#1{% \environ@n@wenvpair@{#1}} \long\def\environ@n@wenvpair@#1#2#3{% \@def@{environ@benv@#1}{#2} \@def@{environ@eenv@#1}{#3}}