% \iffalse
%% Package `regcount' to use with LaTeX 2e
%% Copyright (C) 1997, 1998, 1999 Jean-Pierre F. Drucbert, all rights reserved
%%
%% You may use and distribute this file freely, provided that
%% you don't pretend that you wrote it.
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.1
% 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.1 or later is part of all distributions of LaTeX 
% version 1999/06/01 or later.
%
%<package>\NeedsTeXFormat{LaTeX2e}[1999/06/01]
%<package>\ProvidesPackage{regcount}
%<package>         [1999/08/03 v1.0 Register counting (JPFD)]
%
%<*driver>
\documentclass{ltxdoc}
\AtBeginDocument{\DeleteShortVerb{\|}}
\IfFileExists{regcount.sty}{\usepackage{regcount}}{}
\def\filedate{1999/08/03}
\def\fileversion{v1.1}
\EnableCrossrefs         
%\DisableCrossrefs   % Say \DisableCrossrefs if index is ready
\RecordChanges                  % Gather update information
% \CodelineIndex                  % Index code by line number
\title{The \pkg{regcount} package}
\author{Jean-Pierre F. Drucbert\\\texttt{drucbert@onecert.fr}}%
\def\bs{\texttt{\char'134}}
\let\pkg\textsf
\newcommand\file[1]{\texttt {#1}}
\begin{document}
\date{Printed \today, file dated \filedate}
\maketitle
\DocInput{regcount.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{102}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%
% \changes{v1.0}{1999/08/03}{(JPFD) First officially released version.}
% \changes{v1.1}{1999/08/03}{(JPFD) Corrected typos.}
%
% \DoNotIndex{\@Mii,\@Miv,\@cons,\@currlist,\@dblarg,\@dbldeferlist}
% \DoNotIndex{\@dblfloat,\@dottedtocline,\@eha,\@Esphack,\@float}
% \DoNotIndex{\@floatpenalty,\@ifnextchar,\@ifundefined,\@latexerr}
% \DoNotIndex{\@mkboth,\@namedef,\@nameuse,\@parboxrestore,\@spaces}
% \DoNotIndex{\@starttoc,\@tempa,\@tempboxa,\@tempdima,\@warning}
% \DoNotIndex{\addcontentsline,\addtocounter,\advance,\arabic,\bfseries}
% \DoNotIndex{\bgroup,\box,\chapter,\columnwidth,\csname,\def,\dimen,\docdate}
% \DoNotIndex{\edef,\egroup,\else,\endcsname,\endinput,\expandafter,\fi}
% \DoNotIndex{\filedate,\fileversion,\global,\hbadness,\hbox,\hfil,\hrule}
% \DoNotIndex{\hsize,\ht,\if@twocolumn,\ifdim,\iffalse,\ifnum,\iftrue,\ifvbox}
% \DoNotIndex{\ifx,\ignorespaces,\intextsep,\kern,\let,\long,\moveleft,\newbox}
% \DoNotIndex{\newcommand,\newcounter,\newif,\newsavebox,\noexpand,\normalsize}
% \DoNotIndex{\numberline,\PackageError,\PackageWarning,\par,\parindent}
% \DoNotIndex{\penalty,\prevdepth,\protect,\refstepcounter,\relax}
% \DoNotIndex{\renewcommand,\rmfamily,\section,\setbox,\setcounter,\space}
% \DoNotIndex{\textheight,\the,\typeout,\unvbox,\uppercase,\vadjust,\value}
% \DoNotIndex{\vbox,\vrule,\vskip,\vspace,\wd,\z@,\item\subitem}
%
% \GetFileInfo{regcount.sty}
%
% \MakeShortVerb{\|}
%
% \begin{abstract}
% This package\footnote{%
% \begin{tabular}[t]{l}
% Copyright \copyright\ 1997, 1998, 1999 by\\
% Jean-Pierre F. Drucbert\vphantom{bp}\\
% ONERA/Centre de Toulouse SRI\vphantom{bp}\\
% Office National d'\'Etudes et de Recherches A\'erospatiales\vphantom{bp}\\
% Centre de Toulouse\vphantom{bp}\\
% Service R\'eseaux et Informatique\vphantom{bp}\\
% Complexe Scientifique de Rangueil\vphantom{bp}\\
% \\
% 2, Avenue \'Edouard Belin\vphantom{bp}\\
% BP 4025 F-31055 TOULOUSE CEDEX\vphantom{bp}\\
% FRANCE\vphantom{bp}\\
% \vphantom{bp}\\
% Email: \texttt{drucbert@onecert.fr}\vphantom{bp}\\
% \end{tabular}}
% writes in the \file{.log} file the allocation status of various \TeX\
% registers (counters, lengths, skips, etc.). It \emph{does not produces
% anything} in the document.
% \end{abstract}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{The \pkg{regcount} package}
% \DescribeMacro{\rgcounts}
% This package defines the \cs{rgcounts} macro who writes in the \file{.log}
% the allocation status of the various kinds of \TeX\ registers. The user
% can call this macro at any time, but it is always invoked at the
% |\begin{document}| and |\end{document}| limits. The \cs{rgcounts} does not
% write anything in your document.
%
% The main use of this package and of the \cs{rgcounts} macro is to see the needs in \TeX\
% registers of the packages you are loading in your document, so you can add \cs{rgcounts}
% commands before and after the \cs{usepackage} commands.
%
% \StopEventually{\setcounter{IndexColumns}{2}}
%
% \clearpage
% \section{Implementation}
%
% \begin{macro}{\rgcounts}
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
% \end{macro}
% There is one internal macro for each kind of \TeX\ register. I hope I do not
% forget some ones. The allocation counters are dependent of the release, but it
% seems stable.
% \begin{enumerate}
%    \item Counter registers:
% \begin{macro}{\rgc@counts}
%    \begin{macrocode}
\def\rgc@counters{\GenericInfo{}{%
        (regcount)\@spaces Allocated counter registers= \the\count10\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Dimension registers:
% \begin{macro}{\rgc@dimens}
%    \begin{macrocode}
\def\rgc@dimens{\GenericInfo{}{%
        (regcount)\@spaces Allocated dimen registers= \the\count11\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Skip registers:
% \begin{macro}{\rgc@skips}
%    \begin{macrocode}
\def\rgc@skips{\GenericInfo{}{%
        (regcount)\@spaces Allocated skip registers= \the\count12\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Muskip registers:
% \begin{macro}{\rgc@muskips}
%    \begin{macrocode}
\def\rgc@muskips{\GenericInfo{}{%
        (regcount)\@spaces Allocated muskip registers= \the\count13\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Box registers:
% \begin{macro}{\rgc@boxes}
%    \begin{macrocode}
\def\rgc@boxes{\GenericInfo{}{%
        (regcount)\@spaces Allocated box registers= \the\count14\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Token registers:
% \begin{macro}{\rgc@tokens}
%    \begin{macrocode}
\def\rgc@tokens{\GenericInfo{}{%
        (regcount)\@spaces Allocated token registers= \the\count15\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Input channels:
% \begin{macro}{\rgc@inputs}
%    \begin{macrocode}
\def\rgc@inputs{\GenericInfo{}{%
        (regcount)\@spaces Allocated input channels= \the\count16\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Output channels:
% \begin{macro}{\rgc@outouts}
%    \begin{macrocode}
\def\rgc@outputs{\GenericInfo{}{%
        (regcount)\@spaces Allocated output channels= \the\count17\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Math families:
% \begin{macro}{\rgc@mathfamilies}
%    \begin{macrocode}
\def\rgc@mathfamilies{\GenericInfo{}{%
        (regcount)\@spaces Allocated math families= \the\count18\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Languages:
% \begin{macro}{\rgc@languages}
%    \begin{macrocode}
\def\rgc@languages{\GenericInfo{}{%
        (regcount)\@spaces Allocated languages= \the\count19\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Insertions:
% \begin{macro}{\rgc@insertions}
%    \begin{macrocode}
\def\rgc@insertions{\GenericInfo{}{%
        (regcount)\@spaces Allocated insertions= \the\count20\@spaces}}
%    \end{macrocode}
% \end{macro}
% \end{enumerate}

% \begin{macro}{\rgcounts}
% This (user) macro calls all the preceeding ones, and add some text.
%    \begin{macrocode}
\def\rgcounts{%
\GenericInfo{}{(regcount)\@spaces===========ALLOCATIONS===================\@spaces}%
\rgc@counters
\rgc@dimens
\rgc@skips
\rgc@muskips
\rgc@boxes
\rgc@tokens
\rgc@inputs
\rgc@outputs
\rgc@mathfamilies
\rgc@languages
\rgc@insertions
\GenericInfo{}{(regcount)\@spaces=========================================\@spaces}%
\ignorespaces}
%    \end{macrocode}
% \end{macro}

% And we add two automatic calls:
%    \begin{macrocode}
\AtBeginDocument{\rgcounts}
\AtEndDocument{\rgcounts}
\endinput
%    \end{macrocode}

%
% \PrintChanges
% \PrintIndex
% \Finale
% \end{document}
\endinput
