%%
%% This is file `tclldoc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tclldoc.dtx  (with options: `pkg')
%% 
%% This file may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%% 
%% This file may only be distributed together with a copy of the source
%% file from which it was generated. You may distribute that source file
%% without this generated file.
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tclldoc}
         [2003/04/05 v2.40
              Tcl documentation
              package]
\RequirePackageWithOptions{xdoc2}[2001/11/03]
\RequirePackage{docidx2e}
\AtEndDocument{%
   \typeout{********************************}%
   \typeout{* Use docindex.ist when\@spaces\@spaces*}%
   \typeout{* sorting .idx and .glo files. *}%
   \typeout{********************************}%
}%
\begingroup
   \catcode`\%=12
   \global\let\TD@percent@token=%
\endgroup
\def\TD@start@n@line@#1{%
   \global\TD@line@indent=\z@
   \TD@nesting@level=\z@
   \def\TD@nesting@stack{\TD@nesting@level}%
   \ifx #1\TD@percent@token
      \expandafter\TD@module
   \else
      \global\advance \c@codelineno \@ne
      \TD@begin@tclpar
      \expandafter\TD@count@indent \expandafter#1%
   \fi
}
\let\TD@start@n@line=\TD@start@n@line@
\def\TD@start@n@line@i{\futurelet\next\TD@start@n@line@}
\begingroup
   \catcode`\!=\active
   \catcode`\"=\active
   \lccode`\!=`\ %
   \lccode`\"=`\^^I%
   \lowercase{%
\endgroup
   \def\TD@count@indent#1{%
      \ifx !#1%
         \global\advance \TD@line@indent \@ne
         \expandafter\TD@count@indent
      \else \ifx "#1%
            \global\divide \TD@line@indent \TD@tab@size
            \global\advance \TD@line@indent \@ne
            \global\multiply \TD@line@indent \TD@tab@size
            \expandafter\expandafter \expandafter\TD@count@indent
         \else
            \TD@setup@parshape
            \expandafter\expandafter \expandafter#1%
      \fi\fi
   }%
}
\def\TD@module{%
   \TD@command
   \futurelet\next
   \TD@ch@angle
}
\begingroup
   \catcode`<=\active
   \catcode`\^^I=\catcode`\^^M \endlinechar=`\^^I \relax
   \catcode`\^^M=\active
   \gdef\TD@ch@angle{%
      \ifx <\next
         \TD@normal
         \global\advance \c@codelineno \@ne
         \TD@begin@tclpar
         \def^^M{\TD@active@CR}%
         \expandafter\futurelet \expandafter\next
         \expandafter\ch@plus@etc
      \fi
   }
\endgroup
\begingroup
   \catcode`\>=\active
   \gdef\TD@pm@module#1>{%
      \Module{#1}%
      \ifnum \guard@level<\c@StandardModuleDepth \else
         \AltMacroFont
      \fi
      \TD@count@indent
   }
\endgroup
\begingroup
   \catcode`\>=\active
   \gdef\TD@star@module#1>{%
      \Module{#1}%
      \TD@end@tclpar
      \TD@command
      \global\advance \guard@level \@ne
      \ifnum \c@StandardModuleDepth<\guard@level
         \global\let\macro@font=\AltMacroFont
         \macro@font
      \fi
   }
   \gdef\TD@slash@module#1>{%
      \Module{#1}%
      \TD@end@tclpar
      \TD@command
      \global\advance \guard@level \m@ne
      \ifnum \guard@level=\c@StandardModuleDepth
         \global\let\macro@font\MacroFont
         \macro@font
      \fi
   }
\endgroup
\def\TD@gobble@whitespace#1{%
   \if \ifx #1\TD@active@space
          0%
       \else
          \ifx #1\TD@active@tab 0\else 1\fi
       \fi 0%
      \expandafter\TD@gobble@whitespace
   \else
      \expandafter#1%
   \fi
}
\def\TD@typography{%
   \protected@edef\TD@nontcl@font{%
      \noexpand\fontencoding{\cf@encoding}%
      \noexpand\fontfamily{\f@family}\noexpand\selectfont
   }%
   \InputModeCode
   \SetUnavailableAction{\leavevmode{%
      \TD@nontcl@font\textbackslash x\TypesetHexNumber{##1}%
   }}%
   \DeclareInputMath{0}{\RIE@undefined{0}}%
   \DeclareInputMath{12}{\RIE@undefined{12}}%
}
\def\TD@typeset@space{\kern\fontdimen\tw@\font}
\def\TD@discretionary@space{%
   \discretionary{\copy\TD@backslash@box}{}{\TD@typeset@space}%
}%
\def\TD@breakable@space{%
   \hbox{\TD@typeset@space}%
   \TD@nesting@penalty
   \vadjust{}%
}
\def\TD@typeset@tab{\kern\TD@tab@size\fontdimen\tw@\font}
\def\TD@visible@whitespace{%
   \def\TD@typeset@space{\char32 }%
   \def\TD@typeset@tab{%
      \hb@xt@\TD@tab@size\fontdimen\tw@\font{%
         $\m@th-\mkern-7mu%
         \cleaders\hbox{$\mkern-2mu-\mkern-2mu$}\hfill
         \mkern-7mu\mathord\rightarrow\mkern-1mu\vrule\mkern1mu$%
      }%
   }%
}
\begingroup
   \catcode\z@=\active
   \gdef\TD@let@active#1{%
      \begingroup
         \lccode\z@=`#1%
         \lowercase{%
      \endgroup
         \let^^@%
      }%
   }%
\endgroup
\def\TD@general{%
   \let\do\do@noligs
   \verbatim@nolig@list
   \let\do\@makeother
   \dospecials
   \catcode`\^^M=\active
   \TD@let@active\^^I\TD@active@tab
   \TD@let@active\^^M\TD@active@CR
   \TD@let@active\ \TD@active@space
   \TD@let@active\\\TD@active@backslash
   \TD@let@active\{\TD@active@braceleft
   \TD@let@active\}\TD@active@braceright
   \TD@let@active\[\TD@active@bracketleft
   \TD@let@active\]\TD@active@bracketright
}
\def\TD@normal{%
   \catcode`\^^I=\active
   \catcode`\ =\active
   \catcode`\\=\active
   \catcode`\{=\active
   \catcode`\}=\active
   \catcode`\[=\active
   \catcode`\]=\active
}
\def\TD@command{%
   \catcode`\^^I=10%
   \catcode`\ =10%
   \catcode`\[=12%
   \catcode`\]=12%
   \catcode`\\=\z@
   \catcode`\{=\@ne
   \catcode`\}=\tw@
}
\def\TD@active@space#1{%
   \ifx #1\TD@active@backslash
      \expandafter\TD@active@space@
   \else
      \ifx #1\TD@active@space
         \TD@typeset@space
      \else\ifx #1\TD@active@tab
         \TD@typeset@space
      \else
         \TD@breakable@space
      \fi\fi
      \expandafter#1%
   \fi
}
\def\TD@active@space@#1{%
   \ifx #1\TD@active@CR
      \TD@typeset@space
   \else
      \TD@breakable@space
   \fi
   \TD@active@backslash #1%
}
\def\TD@active@tab{\TD@typeset@tab}
\def\TD@active@CR{%
   \ifnum \catcode`\\=\z@
      \ifvmode\else
         \PackageError{tclldoc}{Horizontal material on command line}\@ehc
         \@@par
      \fi
      \TD@normal
   \else
      \TD@end@tclpar
   \fi
   \TD@start@n@line
}
\def\TD@active@CRv{%
   \verb@egroup
   \PackageError{tclldoc}{\protect\tclverb\space ended by end of line}%
     \@ehc
}
\def\TD@active@backslash#1{%
   \ifcat \noexpand#1\noexpand~%
      \expandafter\TD@active@backslash@
   \else
      \@backslashchar
   \fi
   #1%
}
\def\TD@active@backslash@#1{%
   \ifcase
      \ifx #1\TD@active@CR 0%
      \else\ifx #1\TD@active@backslash 1%
      \else\ifx #1\TD@active@braceleft 2%
      \else\ifx #1\TD@active@braceright 2%
      \else\ifx #1\TD@active@bracketleft 2%
      \else\ifx #1\TD@active@bracketright 2%
      \else\ifx #1\TD@active@space 3%
      \else 4\fi\fi\fi\fi\fi\fi\fi
   \space
      \expandafter\TD@active@backslash@i
   \or
      \@backslashchar\@backslashchar
   \or
      \@backslashchar \string#1%
   \or
      \@backslashchar \TD@typeset@space
   \else
      \@backslashchar
      \expandafter#1%
   \fi
}
\def\TD@active@backslash@i#1{%
   \ifx #1\TD@percent@token
      \copy\TD@backslash@box
      \expandafter\TD@active@CR
   \else
      \TD@breakable@space
      \global\advance \c@codelineno \@ne
      \expandafter\TD@gobble@whitespace
   \fi
   #1%
}
\def\TD@active@backslash@v#1{%
   \TD@discretionary@space
   \ifx #1\TD@percent@token
      \expandafter\@firstoftwo
   \fi
   \TD@gobble@whitespace #1%
}
\def\TD@active@bracketleft{[\advance\TD@nesting@level\@ne}
\def\TD@active@bracketright{]\advance\TD@nesting@level\m@ne}
\begingroup
   \catcode`\{=12 \catcode`\}=12
   \catcode`\[=1 \catcode`\]=2
   \gdef\TD@active@braceleft[{%
      \expandafter\def \expandafter\TD@nesting@stack \expandafter[%
         \the\expandafter\TD@nesting@level
         \expandafter\def \expandafter\TD@nesting@stack
         \expandafter[\TD@nesting@stack]%
      ]%
      \advance\TD@nesting@level\@ne
   ]
   \gdef\TD@active@braceright[}%
      \advance\TD@nesting@level\m@ne
      \TD@nesting@level=\TD@nesting@stack
   ]
\endgroup
\def\TD@nesting@stack{\TD@nesting@level}
\newbox\TD@backslash@box
\newcount\TD@nesting@level
\def\TD@nesting@penalty{%
   \penalty \the\TD@nesting@level 00\relax
   \ifnum \lastpenalty<-\linepenalty
      \linepenalty=10%
      \advance \linepenalty -\lastpenalty
   \fi
}
\def\TD@reformat@lines{%
   \bgroup
   \unskip
   \count@=\lastpenalty  \unpenalty
   \setbox\z@=\lastbox
   \ifvoid\z@
      \egroup
      \prevdepth=\TD@prevdepth
      \hbox{%
         \unhbox\z@
         \unskip \unpenalty
         \setbox\z@=\lastbox
         \copy\TD@backslash@box
      }%
   \else
      \TD@reformat@lines
      \ifvbox\z@ \unvbox\z@ \else
         \hb@xt@\dimen@{%
            \hfill
            \unhbox\z@
            \unskip \unpenalty
            \setbox\z@=\lastbox
            \copy\TD@backslash@box
         }%
      \fi
   \fi
   \ifnum \count@=\z@ \else \penalty\count@ \fi
   \egroup
}
\def\TD@reformat@par{%
   \unskip
   \count@=\lastpenalty  \unpenalty
   \setbox\z@=\lastbox
   \ifvbox\z@
      \bgroup
      \TD@reformat@par
      \egroup
      \unvbox\z@
   \else\ifnum \prevgraf>\@ne
      \dimen@=\@totalleftmargin
      \advance \dimen@ \linewidth
      \bgroup
      \unskip
      \count@=\lastpenalty  \unpenalty
      \setbox\z@=\lastbox
      \TD@reformat@lines
      \hb@xt@\dimen@{\hfill \unhbox\z@ \unskip}%
   \else
      \unskip
      \prevdepth=\TD@prevdepth
      \box\z@
   \fi\fi
   \ifnum \count@=\z@ \else \penalty\count@ \fi
}
\def\TD@begin@tclpar{%
   \xdef\TD@prevdepth{\the\prevdepth}%
   \setbox\z@=\vbox\bgroup
      \color@begingroup
      \prevdepth=\TD@prevdepth
      \indent
}
\def\TD@end@tclpar{%
      \@@par
      \begingroup
         \skip@=\lastskip
         \TD@reformat@par
         \vskip\skip@
      \endgroup
      \xdef\TD@prevdepth{\the\prevdepth}%
      \color@endgroup
   \egroup
   \unvbox\z@
   \prevdepth=\TD@prevdepth
   \@@par
}
\newcount\TD@line@indent
\def\TD@par@setup{%
   \topsep\MacrocodeTopsep
   \@beginparpenalty\predisplaypenalty
   \if@inlabel\leavevmode\fi
   \trivlist
   \parskip\z@skip
   \item[]%
   \macro@font
   \frenchspacing
   \sbox\TD@backslash@box{\TD@nontcl@font\textbackslash}%
   \parindent=\@totalleftmargin
   \advance \parindent \MacroIndent
   \leftskip=\z@skip
   \rightskip=\z@ \@plus \linewidth\relax
   \global\@newlistfalse
   \global\@minipagefalse
   \ifcodeline@index
      \everypar={\llap{%
         \PrintCodelineNo\ \hskip\codelineindentfactor\@totalleftmargin
      }}%
   \else
      \everypar={}%
   \fi
   \let\pm@module=\TD@pm@module
   \let\star@module=\TD@star@module
   \let\slash@module=\TD@slash@module
}
\let\codelineindentfactor\@empty
\def\TD@setup@parshape{%
   \parfillskip=\fontdimen\tw@\font \@plus 1fil%
   \advance \parfillskip -\wd\TD@backslash@box
   \dimen@=\MacroIndent
   \advance \dimen@ \TD@line@indent\fontdimen\tw@\font
   \advance \dimen@ 1em%
   \dimen@ii=\linewidth
   \advance \dimen@ii -\dimen@
   \dimen4=\linewidth
   \advance \dimen@ \@totalleftmargin
   \advance \dimen4 \@totalleftmargin
   \advance \dimen@ii -\parfillskip
   \advance \dimen4 -\parfillskip
   \parshape \tw@ \z@ \dimen4 \dimen@ \dimen@ii
   \kern \TD@line@indent\fontdimen\tw@\font
}
\newcommand*\settabsize[1]{\chardef\TD@tab@size=#1\relax}
\settabsize{8}
\newenvironment{tcl}{%
   \TD@general
   \TD@typography
   \TD@par@setup
   \TD@command
}{%
   \global\@inlabelfalse
   \endtrivlist
}
\newenvironment{tcl*}{%
   \TD@visible@whitespace
   \TD@general
   \TD@typography
   \TD@par@setup
   \TD@command
}{%
   \global\@inlabelfalse
   \endtrivlist
}
\newcommand\tclverb{%
   \relax\ifmmode\hbox\else\leavevmode\null\fi
   \bgroup
   \@ifstar{\TD@visible@whitespace\TD@verb}\TD@verb
}
\def\TD@verb{%
   \let\TD@active@backslash@i=\TD@active@backslash@v
   \let\TD@active@CR=\TD@active@CRv
   \let\TD@breakable@space=\TD@discretionary@space
   \TD@general
   \catcode`\^^I=\active
   \catcode`\ =\active
   \catcode`\\=\active
   \TD@typography
   \verbatim@font
   \sbox\TD@backslash@box{\TD@nontcl@font\textbackslash}%
   \@sverb
}
\newcommand\TclInput[1]{%
   \IfFileExists{#1}{%
      \@addtofilelist{#1}%
      \begingroup
         \TD@normal
         \let\TD@start@n@line=\TD@start@n@line@i
         \expandafter\TD@start@n@line
         \@@input\@filef@und\TD@percent@token
      \endgroup
   }{\PackageError{tclldoc}{No file #1}\@eha}%
}
\newcommand\MakeShortTclverb[1]{%
   \expandafter\ifx \csname cc\string#1\endcsname\relax
      \PackageInfo{tclldoc}{%
         Made \expandafter\@gobble\string#1 a short %
         reference for \string\tclverb}%
      \add@special{#1}%
      \expandafter\xdef \csname cc\string#1\endcsname{\the\catcode`#1}%
      \begingroup
         \lccode`\~=`#1%
         \lowercase{%
         \global\expandafter\let
            \csname ac\string#1\endcsname ~%
         \gdef~{\tclverb~}}%
      \endgroup
      \global\catcode`#1\active
   \else
      \PackageInfo{tclldoc}{%
         \expandafter\@gobble\string#1 already a short verb %
         reference}%
   \fi
}
\newcommand\setnamespace[1]{%
   \MakeHarmless\TD@namespace{#1}%
   \protected@edef\TD@namespace{%
      \expandafter\TD@convert@colons \TD@namespace ::\relax
   }
}
\def\TD@convert@colons#1::#2{%
   #1%
   \ifx \relax#2\else
      \noexpand\namespaceseparator
      \TD@convert@colons #2%
   \fi
}
\let\TD@namespace\@empty
\newcommand\buildname[2]{%
   \ifx \NoValue#1\@empty
      \ifx \@empty\TD@namespace \else
         \TD@namespace\namespaceseparator
      \fi
   \else
      \ifx $#1$\else #1\namespaceseparator \fi
   \fi
   #2%
}
\DeclareRobustCommand\namespaceseparator{:\penalty\hyphenpenalty:}
\providecommand*\namespacephrase{name\-space}
\@ifpackagewith{docidx2e}{usedocindexps}{%
   \@namedef{TP@I{}{docindex}{index}}#1#2{%
      \begingroup
      \@letinstance\DI@indexitem@i{indexitem}{fixed-r1a}%
      \@letinstance\DI@indexitem@ii{indexitem}{aloneaccept2}%
      \@letinstance\DI@indexitem@iii{indexitem}{fixed3}%
      \columnsep=10pt%
      \parskip=0pt plus 1pt%
      \def\DI@letter@skip{10pt plus 2pt minus 3pt}%
      \def\DI@letter@format##1{%
         \par
         \hb@xt@\hsize{\hfil\textbf{##1}\hfil}%
         \nopagebreak
      }%
      \def\+{-}%
      \IfFileExists{\jobname.ind}{%
         \ifnum \c@IndexColumns>\@ne
            \begin{multicols}{\c@IndexColumns}[#1][\IndexMin]%
         \else
            \enough@room{\IndexMin}%
            #1\par
            \addvspace\multicolsep
         \fi
         \pagestyle{docindex}%
         \small
         \@nobreakfalse
         \DI@ind@setup
         \input{\jobname.ind}%
         \DI@item@nojoin
         \thispagestyle{docindex}
         \ifnum \c@IndexColumns>\@ne
            \end{multicols}%
         \else
            \enough@room\postmulticols
            \addvspace\multicolsep
         \fi
         \normalsize #2\par
      }{\typeout{No file \jobname.ind.}}%
      \endgroup
   }
}{%
   \@namedef{TP@I{}{docindex}{index}}#1#2{%
      \begingroup
      \@letinstance\DI@indexitem@i{indexitem}{fixed-r1a}%
      \@letinstance\DI@indexitem@ii{indexitem}{aloneaccept2}%
      \@letinstance\DI@indexitem@iii{indexitem}{fixed3}%
      \columnsep=10pt%
      \parskip=0pt plus 1pt%
      \def\DI@letter@skip{10pt plus 2pt minus 3pt}%
      \def\DI@letter@format##1{%
         \par
         \hb@xt@\hsize{\hfil\textbf{##1}\hfil}%
         \nopagebreak
      }%
      \def\+{-}%
      \IfFileExists{\jobname.ind}{%
         \ifnum \c@IndexColumns>\@ne
            \begin{multicols}{\c@IndexColumns}[#1][\IndexMin]%
         \else
            \enough@room{\IndexMin}%
            #1\par
            \addvspace\multicolsep
         \fi
         \small
         \@nobreakfalse
         \DI@ind@setup
         \input{\jobname.ind}%
         \DI@item@nojoin
         \ifnum \c@IndexColumns>\@ne
            \end{multicols}%
         \else
            \enough@room\postmulticols
            \addvspace\multicolsep
         \fi
         \normalsize #2\par
      }{\typeout{No file \jobname.ind.}}%
      \endgroup
   }
}
\MetaNormalfont
\NewMacroEnvironment*{variable}%
   {\XD@grab@harmless@oarg\XD@grab@harmless\relax}{2}%
   {\XDParToMargin{\MacroFont\buildname{#1}{#2} \normalfont (var.)}}%
   {\TD@main@index{#1}{#2}{var.}{}}%
   {{\buildname{#1}{#2}}{\texttt{\buildname{#1}{#2}} variable}}
   {}%
\NewMacroEnvironment*{proc}%
   {\XD@grab@harmless@oarg\XD@grab@harmless\relax}{2}%
   {\XDParToMargin{\MacroFont\buildname{#1}{#2} \normalfont (proc)}}%
   {\TD@main@index{#1}{#2}{proc}{}}%
   {{\buildname{#1}{#2}}{\texttt{\buildname{#1}{#2}} proc}}
   {}%
\NewMacroEnvironment*{arrayvar}{%
   \XD@grab@harmless@oarg\XD@grab@harmless\relax\XD@grab@oarg
}{3}%
   {\XDParToMargin{\MacroFont \buildname{#1}{#2}%
      \ifx \NoValue#3%
         \space\normalfont (array)%
      \else
         \penalty\hyphenpenalty(\mbox{\meta@font@select#3})%
      \fi
   }}%
   {\TD@main@index{#1}{#2}{array}{%
      \ifx \NoValue#3\@empty\else
         \LevelSorted{#3}{\protect\mbox{\textit{#3}} entries}%
      \fi
   }}%
   {{\buildname{#1}{#2}}{\texttt{\buildname{#1}{#2}} array}}
   {}%
\NewMacroEnvironment*{arrayentry}{%
   \XD@grab@harmless@oarg\XD@grab@harmless\relax\XD@grab@harmless\relax
}{3}%
   {\XDParToMargin{%
      \MacroFont \buildname{#1}{#2}%
      \penalty\hyphenpenalty(#3)%
   }}%
   {\TD@main@index{#1}{#2}{array}{\LevelSorted{#3}{\texttt{#3}}}}%
   {{\buildname{#1}{#2}(#3)}{\texttt{\buildname{#1}{#2}(#3)}}}
   {}%
\NewDescribeCommand{\describestring}{%
   \XD@grab@oarg\XD@grab@harmless@oarg\XD@grab@harmless{}%
}{3}{%
   \GenericDescribePrint{%
      \MacroFont
      \ifx \NoValue#2\@empty
         #3%
      \else
         \buildname{#2}{#3}%
      \fi
      \ifx \NoValue#1\@empty \else\ \normalfont(#1)\fi
   }%
   \begingroup
      \def\meta##1{(##1)}%
      \unrestored@protected@xdef\@gtempa{#3}%
   \endgroup
   \IndexEntry{%
      \ifx \NoValue#2\@empty
         \LevelSorted{\@gtempa}{%
            \texttt{#3}%
            \ifx \NoValue#1\@empty \else\space(#1)\fi
         }%
      \else
         \LevelSorted{\@gtempa}{%
            \texttt{#3}\ifx \NoValue#1\@empty \else\space(#1)\fi
         }%
         \ifx $#2$%
            \LevelSorted{ }{global \namespacephrase}%
         \else
            \LevelSorted{#2}{\texttt{#2} \namespacephrase}%
         \fi
      \fi
   }{usage}{\thepage}%
}
\NewDescribeCommand{\describeopt}{%
   \XD@grab@sarg{*}\XD@grab@harmless@oarg\XD@grab@harmless{}%
   \XD@grab@oarg\XD@grab@harmless{}%
}{5}{%
   \ifx \BooleanFalse#1%
      \GenericDescribePrint{%
         \MacroFont #5\ \normalfont option%
      }%
   \fi
   \begingroup
      \def\meta##1{(##1)}%
      \unrestored@protected@xdef\@gtempa{#3}%
   \endgroup
   \IndexEntry{%
      \LevelSorted{\@gtempa}{%
         \texttt{#3} (\ifx \NoValue#4\@empty proc\else #4\fi)%
      }%
      \ifx \NoValue#2\@empty
         \LevelSorted{ }{global \namespacephrase}%
      \else
         \LevelSorted{#2}{\texttt{#2} \namespacephrase}%
      \fi
      \LevelSorted{#5}{\texttt{#5} option}%
   }{usage}{\thepage}%
}
\def\TD@main@index#1#2#3#4{%
   \XDMainIndex{%
      \LevelSorted{#2}{\texttt{#2} (#3)}%
      \ifx \NoValue#1\@empty
         \ifx \@empty\TD@namespace
            \LevelSorted{ }{global \namespacephrase}%
         \else
            \LevelSorted{\TD@namespace}%
               {\texttt{\TD@namespace} \namespacephrase}%
         \fi
      \else
         \ifx $#1$%
            \LevelSorted{ }{global \namespacephrase}%
         \else
            \LevelSorted{#1}{\texttt{#1} \namespacephrase}%
         \fi
      \fi
      #4%
   }%
}
\NewMacroEnvironment*{Cfunction}{\XD@grab@harmless\relax}{1}%
   {\XDParToMargin{\small\Cfunctionidentifier{#1} (C~function)}}%
   {\XDMainIndex{%
      \LevelSorted{#1}{\Cfunctionidentifier{#1} (C~function)}%
   }}%
   {{#1}{\Cfunctionidentifier{#1} C~function}}
   {}%
\NewMacroEnvironment*{Cvariable}{\XD@grab@harmless\relax}{1}%
   {\XDParToMargin{\small\Cvariableidentifier{#1} (C~variable)}}%
   {\XDMainIndex{%
      \LevelSorted{#1}{\Cvariableidentifier{#1} (C~variable)}%
   }}%
   {{#1}{\Cvariableidentifier{#1} C~variable}}
   {}%
\NewMacroEnvironment*{Ctype}{\XD@grab@harmless\relax}{1}%
   {\XDParToMargin{\small\Ctypeidentifier{#1} (C~type)}}%
   {\XDMainIndex{%
      \LevelSorted{#1}{\Ctypeidentifier{#1} (C~type)}%
   }}%
   {{#1}{\Ctypeidentifier{#1} C~type}}
   {}%
\newcommand*{\Cfunctionidentifier}[1]{\textit{#1}}
\newcommand*{\Cvariableidentifier}[1]{\textit{#1}}
\newcommand*{\Ctypeidentifier}[1]{\textit{#1}}
\newcommand\regstar{\ensuremath{^*}}
\newcommand\regplus{\ensuremath{^+}}
\newcommand\regopt{\ensuremath{^?}}
\newcount\TD@delim@size
\gdef\TD@delim@size@G{0}
\newenvironment{regblock}[1][]{%
   \leavevmode
   \def\TD@modifier{#1}%
   \TD@delim@size=\TD@delim@size@G
   \let\regalt=\TD@regalt
   \setbox\z@=\hbox\bgroup
      \TD@delim@size=\z@
      \begin{lrbox}{\z@}%
         \gdef\TD@delim@size@G{0}%
         \ignorespaces
}{%
      \end{lrbox}%
      \ifnum \TD@delim@size@G>\TD@delim@size
         \TD@delim@size=\TD@delim@size@G\relax
      \fi
      {\TD@join@branches}%
      \unhbox\z@
      $\TD@size@delimiter)\TD@modifier$%
      \advance \TD@delim@size \@ne
      \xdef\TD@delim@size@G{\the\TD@delim@size}%
   \egroup
   \ifnum \TD@delim@size@G<\TD@delim@size
      \xdef\TD@delim@size@G{\the\TD@delim@size}%
   \fi
   \unhbox\z@
}
\newenvironment{regexp}{\regblock}{\endregblock}
\def\TD@join@branches{%
   \setbox\z@=\lastbox
   \ifvoid\z@
      $\TD@size@delimiter($%
   \else
      {\TD@join@branches}%
      \unhbox\z@
      ~$\TD@size@delimiter\vert$%
      \count@=\TD@delim@size
      \advance \count@ \@ne
      \multiply \count@ -\@lowpenalty
      \penalty\count@\ %
   \fi
}
\newcommand\regalt{%
   \PackageError{tclldoc}{%
      Lonely \protect\regalt--perhaps a missing regblock environment%
   }\@eha
}
\def\TD@regalt{%
   \end{lrbox}%
   \box\z@
   \ifnum \TD@delim@size@G>\TD@delim@size
      \TD@delim@size=\TD@delim@size@G\relax
   \fi
   \begin{lrbox}{\z@}%
   \gdef\TD@delim@size@G{0}%
}
\def\TD@size@delimiter{%
   \ifcase\TD@delim@size
      \or \expandafter\big \or \expandafter\Big \or
      \expandafter\bigg \else \expandafter\Bigg
   \fi
}
\DeclareRobustCommand\word[1]{%
   \leavevmode
   \ifmmode \expandafter \nfss@text \fi
   {%
      $\{$%
      \meta@font@select
      \edef\meta@hyphen@restore
         {\hyphenchar\the\font\the\hyphenchar\font}%
      \hyphenchar\font\m@ne
      \language\l@nohyphenation
      #1\/%
      \meta@hyphen@restore
      $\}$%
   }%
   \ifnum \TD@delim@size@G<\@ne \gdef\TD@delim@size@G{1}\fi
}
\DeclareRobustCommand\Tcllogo{T\kern-0.1em cl}
\AtBeginDocument{%
   \providecommand*\InputModeCode{}%
   \providecommand*\SetUnavailableAction[1]{}%
   \providecommand*\DeclareInputMath[2]{}%
   \providecommand*\RIE@undefined[1]{\@inpenc@undefined}%
}
\endinput
%%
%% End of file `tclldoc.sty'.
