%%
%% This is file `ifoption.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ifoption.dtx 
%% 
%% Copyright 2001, 2010 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}
\ProvidesPackage{ifoption}[2002/03/04 v1.02]
\let\@xp\expandafter \let\@nx\noexpand
\def\@True{00}
\def\@False{01}
\def\CurrentPackage{\@currname}
\let\CurrentClass\CurrentPackage
\newcommand{\IfOption}{}
\def\IfPackageOption{\@ifpackagewith}
\def\IfClassOption{\@ifclasswith}
\def\IfOption{%
  \ifx\@currext\@pkgextension \@xp\IfPackageOption
  \else \@xp\IfClassOption
  \fi
  \@currname
}
\newcommand{\DeclareExclusiveOptions}[1]{%
  \xdef\@declaredoptions{\@declaredoptions,#1}%
  \gdef\ProcessExclusiveOptions{\relax}%
  \@for\CurrOption:=#1\do{%
    \@xp\deo@a\csname ds@\CurrOption\@xp\endcsname\@xp{\CurrOption}{#1}%
  }%
}
\def\DeclareBooleanOption{\DeclareExclusiveOptions}
\def\deo@a#1#2#3{%
  \def#1{%
    \g@addto@macro\ProcessExclusiveOptions{\OptionsFalseTrue{#3}{#2}}%
  }%
}
\def\cull@options#1,{%
  \@xp\ifx\csname ds@#1\@gobble\@percentchar\@empty\endcsname\@False
  \else #1,\fi
  \cull@options
}

\newcommand{\OptionsFalseTrue}[2]{%
  \begingroup
  \@for\CurrentOption:=#1\do{%
    \@xp\let\csname ds@\CurrentOption\endcsname\@False
  }%
  \let\ds@\@False
  \@xp\xdef\csname opt@\@currname.\@currext\endcsname{%
    \@xp\@xp\@xp\cull@options\csname opt@\@currname.\@currext\endcsname
      ,\@firstoftwo\@firstoftwo,#2%
  }%
  \endgroup
}
\endinput
%%
%% End of file `ifoption.sty'.
