%%% $Id: list-environment.sty,v 1.2 2011/02/07 05:57:45 makoto Exp $
%%% http://www.nsknet.or.jp/~tony/TeX/faq/macro.htm

\makeatletter%% $B%W%j%"%s%V%k$GDj5A$9$k>l9g$OI,?\(B

%% (j)article $B%/%i%9$N>l9g(B
%% 
\newcounter{programlist}
\renewcommand{\theprogramlist}{\@arabic\c@programlist}
\def\fps@programlist{tbp}
\def\ftype@programlist{4}% figure:1 table:2 programlist:4 ... next 8 16 32 
\def\ext@programlist{lop}% list of programlists
\def\fnum@programlist{\programlistname~\theprogramlist}
\newenvironment{programlist}% 
               {\footnotesize \@float{programlist}}%
               {\end@float}
\newenvironment{programlist*}%
               {\footnotesize \@dblfloat{programlist}}%
               {\end@dblfloat}

\newcommand{\listofprogramlists}{%% $B<L??L\<!(B
  \section*{\listprogramlistname}
  \@mkboth{\listprogramlistname}{\listprogramlistname}%
  \@starttoc{lop}%
}

\newcommand*{\l@programlist}{\@dottedtocline{1}{1.5em}{2.3em}}

\newcommand{\listprogramlistname}{$B%j%9%HL\<!(B}
\newcommand{\programlistname}{list}

\makeatother%% $B%W%j%"%s%V%k$GDj5A$9$k>l9g$OI,?\(B
