Use the Preformatted tag for computer code:
\long\def\@caption#1[#2]#3{% \par %\edef\@tempa{\csname #1TOCLabel\endcsname} \AddContentsLine {\csname ext@#1\endcsname}% {#1@toc}% {\csname #1toclabel\endcsname}% {\ignorespaces #2}% \begingroup \@parboxrestore \normalsize \csname @makecaption#1\endcsname{\ignorespaces #3}\par \endgroup}