%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% This is file 'skeyval-ltxcmds.tex', version 1.3, 2013/05/15.             %
%                                                                          %
% This package and accompanying files may be distributed and/or            %
% modified under the conditions of the LaTeX Project Public License,       %
% either version 1.3 of this license or any later version. The latest      %
% version of this license is in http://www.latex-project.org/lppl.txt      %
% and version 1.3 or later is part of all distributions of LaTeX           %
% version 2005/12/01 or later.                                             %
%                                                                          %
% The LPPL maintenance status of this software is 'author-maintained'.     %
%                                                                          %
% This software is provided 'as it is', without warranty of any kind,      %
% either expressed or implied, including, but not limited to, the          %
% implied warranties of merchantability and fitness for a particular       %
% purpose.                                                                 %
%                                                                          %
% The following files constitute the skeyval bundle and must be            %
% distributed as a whole:                                                  %
%                                                                          %
%  README, skeyval.sty, skeyval-core.tex, skeyval-for.tex,                 %
%  skeyval-view.sty, skeyval-ltxpatch.sty, skeyval-ltxcmds.tex,            %
%  skeyval-pstkey.sty, skeyval-pstkey.tex, skeyval-testclass.cls,          %
%  skeyval-testpkg.sty, skeyval-pokayoke1, skeyval-pokayoke2,              %
%  skeyval-view-pokayoke1.                                                 %
%                                                                          %
% Copyright (c) 2010-2013 Ahmed Musa (amusa22@gmail.com).                  %
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%

\begingroup%
\let\e\endlinechar\edef\p{\the\e}\e13\edef\n{\the\catcode\e}%
\xdef\skv@ltxcmds@restorecatcodes{%
  \let\noexpand\skv@ltxcmds@restorecatcodes\relax%
  \endlinechar=\p\relax\catcode\number\e=\n\relax%
  \catcode\string`\noexpand`\string=\the\catcode\string``\relax%
  \catcode\string`\noexpand=\string=\the\catcode\string`=\relax%
}%
\endgroup%
\endlinechar\string=13\relax%
\catcode13\string=5\relax%
\catcode\string``\string=12\relax
\catcode\string`=\string=12\relax
\long\def\skvgobble#1{}
\def\do#1{\catcode`\expandafter\skvgobble\string#1=\the\catcode`#1\relax}
\edef\skv@ltxcmds@restorecatcodes{%
  \unexpanded\expandafter{\skv@ltxcmds@restorecatcodes}%
  \do\ \do\%\do\@\do\(\do\)\do\[\do\]\do\|\do\:\do\;\do\,\do\.%
  \do\>\do\<\do\!\do\*\do\+\do\-\do\^\do\_\do\&\do\$\do\~\do\'%
  \do\"\do\
}
\catcode`\ =10\relax
\catcode`\@=11 \catcode`\(=12 \catcode`\)=12 \catcode`\[=12
\catcode`\]=12 \catcode`\|=12 \catcode`\:=12 \catcode`\;=12
\catcode`\,=12 \catcode`\*=12 \catcode`\+=12 \catcode`\-=12
\catcode`\<=12 \catcode`\>=12 \catcode`\!=12 \catcode`\.=12
\catcode`\^=07 \catcode`\_=08 \catcode`\&=04 \catcode`\$=03
\catcode`\~=13 \catcode`\%=14 \catcode`\'=12 \catcode`\"=12

\csname skeyval-ltxcmds-loaded\endcsname
\expandafter\let\csname skeyval-ltxcmds-loaded\endcsname\endinput

\message{skeyval-ltxcmds 2013/05/15 v1.3 LaTeX header for skeyval (AM)}

\countdef\m@ne=22 \m@ne=-1
\def\wlog{\immediate\write\m@ne}
\countdef\count@=255
\dimendef\dimen@=0
\dimendef\dimen@i=1
\dimendef\dimen@ii=2
\skipdef\skip@=0
\toksdef\toks@=0
\newif\if@tempswa
\newcount\@tempcnta
\newcount\@tempcntb
\newdimen\@tempdima
\newdimen\@tempdimb
\newdimen\@tempdimc
\newbox\@tempboxa
\newskip\@tempskipa
\newskip\@tempskipb
\newtoks\@temptokena
\def\@nnil{\@nil}
\def\@empty{}
\def\space{ }
\def\@space{ }
\long\def\@firstofone#1{#1}
\let\@iden\@firstofone
\long\def\@firstoftwo#1#2{#1}
\long\def\@secondoftwo#1#2{#2}
\long\def\@gobble#1{}
\long\def\@gobbletwo#1#2{}
\lowercase{\def\@gobblespace} {}
\def\@nameuse#1{\csname#1\endcsname}
\def\@namedef#1{\expandafter\def\csname#1\endcsname}
\let\l@ngrel@x\relax
\def\loop#1\repeat{%
  \def\iterate{#1\relax\expandafter\iterate\fi}%
  \iterate\let\iterate\relax
}
\let\repeat\fi
\protected\def\newif#1{%
  \count@\escapechar
  \escapechar\m@ne
  \let#1\iffalse
  \ltx@booldef#1\iftrue
  \ltx@booldef#1\iffalse
  \escapechar\count@
}
\protected\def\ltx@booldef#1#2{%
  \expandafter\def\csname\expandafter\@gobbletwo\string#1%
  \expandafter\@gobbletwo\string#2\endcsname{\let#1#2}%
}
\long\protected\def\@ifnextchar#1#2#3{%
  \let\reserved@d=#1%
  \def\reserved@a{#2}%
  \def\reserved@b{#3}%
  \futurelet\@let@token\@ifnch
}
\def\@ifnch{%
  \ifx\@let@token\@sptoken
    \let\reserved@c\@xifnch
  \else
    \ifx\@let@token\reserved@d
      \let\reserved@c\reserved@a
    \else
      \let\reserved@c\reserved@b
    \fi
  \fi
  \reserved@c
}
\lowercase{\lowercase{\let\@sptoken= } }
\lowercase{\def\@xifnch} {\futurelet\@let@token\@ifnch}
\let\kernel@ifnextchar\@ifnextchar
\long\def\@testopt#1#2{\kernel@ifnextchar[{#1}{#1[{#2}]}}
\protected\def\@expandtwoargs#1#2#3{%
  \edef\reserved@a{\noexpand#1{#2}{#3}}\reserved@a
}
\edef\@backslashchar{\expandafter\@gobble\string\\}
\newif\ifin@
\def\strip@prefix#1>{}
\protected\def\@onelevel@sanitize#1{%
  \edef#1{\expandafter\strip@prefix\meaning#1}%
}
\long\protected\def\g@addto@macro#1#2{%
  \begingroup
  \toks@\expandafter{#1#2}%
  \xdef#1{\the\toks@}%
  \endgroup
}
% In case we call \@latex@error, etc, without LaTeX:
\newwrite\@unused
\def\typeout#1{%
  \begingroup
  \let\protect\string
  \immediate\write\@unused{#1}%
  \endgroup
}
\let\MessageBreak\relax
\protected\def\GenericInfo#1#2{%
  \begingroup
  \def\MessageBreak{^^J#1}%
  \let\protect\string
  \immediate\write\m@ne{#2\on@line.}%
  \endgroup
}
\protected\def\GenericWarning#1#2{%
  \begingroup
  \def\MessageBreak{^^J#1}%
  \let\protect\string
  \immediate\write\@unused{^^J#2\on@line.^^J}%
  \endgroup
}

\begingroup
\lccode`\@=`\ %
\lccode`\~=`\ %
\lccode`\}=`\ %
\lccode`\{=`\ %
\lccode`\T=`\T%
\lccode`\H=`\H%
\catcode`\ =11\relax%
\lowercase{\endgroup%
\protected\def\GenericError#1#2#3#4{%
\begingroup%
\immediate\write\@unused{}%
\def\MessageBreak{^^J}%
\let\protect\string%
\edef%
\@err@                                                                 % \@err@
{{#4}}%
\errhelp
\@err@                                                                 % \@err@
\let
\@err@                                                                 % \@err@
\@empty
\def\MessageBreak{^^J#1}%
\def~{\errmessage{%
#2.^^J^^J%
#3^^J%
Type  H <return>  for immediate help%
\@err@                                                                 % \@err@
}}%
~%
\endgroup}}%

\def\PackageError#1#2#3{%
  \GenericError{%
    (#1)\@spaces\@spaces\@spaces\@spaces
  }{%
    Package #1 Error: #2%
  }{%
    See the #1 package documentation for explanation.%
  }{#3}%
}
\def\PackageWarning#1#2{%
  \GenericWarning{%
    (#1)\@spaces\@spaces\@spaces\@spaces
  }{%
    Package #1 Warning: #2%
  }%
}
\def\PackageWarningNoLine#1#2{%
  \PackageWarning{#1}{#2\@gobble}%
}
\def\PackageInfo#1#2{%
  \GenericInfo{%
    (#1) \@spaces\@spaces\@spaces
  }{%
    Package #1 Info: #2%
  }%
}
\def\ClassError#1#2#3{%
  \GenericError{%
    (#1) \space\@spaces\@spaces\@spaces
  }{%
    Class #1 Error: #2%
  }{%
    See the #1 class documentation for explanation.%
  }{#3}%
}
\def\ClassWarning#1#2{%
  \GenericWarning{%
    (#1) \space\@spaces\@spaces\@spaces
  }{%
    Class #1 Warning: #2%
  }%
}
\def\ClassWarningNoLine#1#2{%
  \ClassWarning{#1}{#2\@gobble}%
}
\def\ClassInfo#1#2{%
  \GenericInfo{%
    (#1) \space\space\@spaces\@spaces
  }{%
    Class #1 Info: #2%
  }%
}
\def\@latex@error#1#2{%
  \GenericError{%
    \space\space\space\@spaces\@spaces\@spaces
  }{%
    LaTeX Error: #1%
  }{%
    See the LaTeX manual or LaTeX Companion for explanation.%
  }{#2}%
}
\let\@latexerr\@latex@error
\def\@latex@warning#1{%
  \GenericWarning{%
    \space\space\space\@spaces\@spaces\@spaces
  }{%
    LaTeX Warning: #1%
  }%
}
\let\@warning\@latex@warning
\def\@warningnoline#1{\@latex@warning{#1\@gobble}}
\def\@latex@info#1{%
  \GenericInfo{%
    \@spaces\@spaces\@spaces
  }{%
    LaTeX Info: #1%
  }%
}
\def\@infonoline#1{\@latex@info{#1\@gobble}}
\errorcontextlines=\m@ne
\ifnum\inputlineno=\m@ne
  \let\on@line\@empty
\else
  \def\on@line{ on input line \the\inputlineno}
\fi

\def\@spaces{\space\space\space\space}
\def\@ehd{%
  There is a problem here. Investigate it before
  \MessageBreak proceeding. Try typing <return>
  to proceed.\MessageBreak If that doesn't  work,
  type X <return> to quit.
}
\def\showoverfull{\tracingonline\@ne}
\def\loggingoutput{%
  \tracingoutput\@ne\showboxbreadth\maxdimen
  \showboxdepth\maxdimen\errorstopmode
}
\def\loggingall{%
  \tracingcommands\tw@\tracingstats\tw@
  \tracingpages\@ne\tracinglostchars\@ne
  \tracingmacros\tw@\tracingparagraphs\@ne
  \tracingrestores\@ne\errorcontextlines\maxdimen
  \loggingoutput
}
\def\tracingall{\loggingall\showoverfull}

\skv@ltxcmds@restorecatcodes
\endinput

%% End of file 'skeyval-ltxcmds.tex'.
