--- a/listings.sty 2010-03-05 11:45:11.000000000 -0700 +++ b/listings.sty 2010-03-05 11:44:46.000000000 -0700 @@ -1574,8 +1574,8 @@ \@ifundefined{abovecaptionskip} {\newskip\abovecaptionskip \newskip\belowcaptionskip}{} -\@ifundefined{@makecaption} -{\long\def\@makecaption#1#2{% +\@ifundefined{@lstmakecaption} +{\long\def\@lstmakecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize @@ -1620,7 +1620,7 @@ \par\@parboxrestore\normalsize\normalfont % \noindent (AS) \ifx #1t\allowbreak \fi \ifx\lst@title\@empty - \lst@makecaption\fnum@lstlisting{\ignorespaces \lst@caption} + \lst@lstmakecaption\fnum@lstlisting{\ignorespaces \lst@caption} \else \lst@maketitle\lst@title % (AS) \fi @@ -1628,14 +1628,14 @@ \endgroup}{}% \fi \fi} -\def\lst@makecaption{\@makecaption} -\def\lst@maketitle{\@makecaption\lst@title@dropdelim} +\def\lst@lstmakecaption{\@lstmakecaption} +\def\lst@maketitle{\@lstmakecaption\lst@title@dropdelim} \def\lst@title@dropdelim#1{\ignorespaces} \AtBeginDocument{% \@ifundefined{captionlabelfalse}{}{% - \def\lst@maketitle{\captionlabelfalse\@makecaption\@empty}}% + \def\lst@maketitle{\captionlabelfalse\@lstmakecaption\@empty}}% \@ifundefined{caption@startrue}{}{% - \def\lst@maketitle{\caption@startrue\@makecaption\@empty}}% + \def\lst@maketitle{\caption@startrue\@lstmakecaption\@empty}}% } \def\lst@HRefStepCounter#1{% \begingroup @@ -1846,11 +1846,14 @@ \global\let\lst@name\lst@arg \global\let\lstname\lst@name} \def\lst@filenamerpl{_\textunderscore $\textdollar -\textendash} \def\l@lstlisting#1#2{\@dottedtocline{1}{1.5em}{2.3em}{#1}{#2}} +\def\lsttableofcontents{ +\chapter*{List of Source Code Listings\markboth{LISTINGS}{LISTINGS}} +\renewcommand\baselinestretch{\@spacing}\@normalsize\@starttoc{lol}} \lst@UserCommand\lstlistlistingname{Listings} \lst@UserCommand\lstlistoflistings{\bgroup \let\contentsname\lstlistlistingname \let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}% - \tableofcontents \egroup} + \lsttableofcontents \egroup} \@ifundefined{float@listhead}{}{% \renewcommand*{\lstlistoflistings}{% \begingroup