diff options
author | Karl Berry <karl@freefriends.org> | 2006-06-01 15:55:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-06-01 15:55:10 +0000 |
commit | a27e39077f6da32d6a49b9af54b92a8380fee0af (patch) | |
tree | efe19bf20d7cdd65b718b3698194bc0b6b729b35 /Master/texmf-dist/tex/latex/listings | |
parent | df41ca308be95dbd0f1d0447874bbd1c58cd24d2 (diff) |
listings 1.3c
git-svn-id: svn://tug.org/texlive/trunk@1639 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/listings')
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/listings.cfg | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/listings.sty | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/lstdoc.sty | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/lstlang1.sty | 13 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/lstlang2.sty | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/lstlang3.sty | 12 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/lstmisc.sty | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/lstpatch.sty | 322 |
8 files changed, 206 insertions, 170 deletions
diff --git a/Master/texmf-dist/tex/latex/listings/listings.cfg b/Master/texmf-dist/tex/latex/listings/listings.cfg index 00c430d8b4f..ebc5c730264 100644 --- a/Master/texmf-dist/tex/latex/listings/listings.cfg +++ b/Master/texmf-dist/tex/latex/listings/listings.cfg @@ -6,17 +6,19 @@ %% %% lstdrvrs-1.3.dtx (with options: `config') %% -%% (w)(c) 1996/1997/1998/1999/2000/2001/2002/2003/2004 Carsten Heinz -%% and/or any other author listed elsewhere in this file. +%% The listings package is copyright 1996--2004 Carsten Heinz, and +%% continued maintenance on the package is copyright 2006 Brooks Moses. +%% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004 any +%% individual author listed in this file. %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. +%% Either version 1.3 or, at your option, any later version. %% %% This file is completely free and comes without any warranty. %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to Brooks Moses at <bmoses@dpdx.net>. %% \ProvidesFile{listings.cfg}[2004/09/05 1.3 listings configuration] \def\lstlanguagefiles diff --git a/Master/texmf-dist/tex/latex/listings/listings.sty b/Master/texmf-dist/tex/latex/listings/listings.sty index 7c3eceb9dcb..8d96f36b944 100644 --- a/Master/texmf-dist/tex/latex/listings/listings.sty +++ b/Master/texmf-dist/tex/latex/listings/listings.sty @@ -10,9 +10,10 @@ %% %% (w)(c) 1996--2004 Carsten Heinz and/or any other author listed %% elsewhere in this file. +%% (c) 2006 Brooks Moses %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to <bmoses@dpdx.net>. %% \def\filedate{2004/09/07} \def\fileversion{1.3} diff --git a/Master/texmf-dist/tex/latex/listings/lstdoc.sty b/Master/texmf-dist/tex/latex/listings/lstdoc.sty index 3b9806fbe59..419da5d1825 100644 --- a/Master/texmf-dist/tex/latex/listings/lstdoc.sty +++ b/Master/texmf-dist/tex/latex/listings/lstdoc.sty @@ -10,9 +10,10 @@ %% %% (w)(c) 1996--2004 Carsten Heinz and/or any other author listed %% elsewhere in this file. +%% (c) 2006 Brooks Moses %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to <bmoses@dpdx.net>. %% \def\filedate{2004/09/07} \def\fileversion{1.3} diff --git a/Master/texmf-dist/tex/latex/listings/lstlang1.sty b/Master/texmf-dist/tex/latex/listings/lstlang1.sty index c108403097d..49521b72aa2 100644 --- a/Master/texmf-dist/tex/latex/listings/lstlang1.sty +++ b/Master/texmf-dist/tex/latex/listings/lstlang1.sty @@ -6,17 +6,19 @@ %% %% lstdrvrs-1.3.dtx (with options: `lang1') %% -%% (w)(c) 1996/1997/1998/1999/2000/2001/2002/2003/2004 Carsten Heinz -%% and/or any other author listed elsewhere in this file. +%% The listings package is copyright 1996--2004 Carsten Heinz, and +%% continued maintenance on the package is copyright 2006 Brooks Moses. +%% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004 any +%% individual author listed in this file. %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. +%% Either version 1.3 or, at your option, any later version. %% %% This file is completely free and comes without any warranty. %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to Brooks Moses at <bmoses@dpdx.net>. %% \ProvidesFile{lstlang1.sty} [2004/09/05 1.3 listings language file] @@ -734,7 +736,8 @@ viewmtx,waitforbuttonpress,waterfall,wavread,wavwrite,what,% whatsnew,which,while,white,whitebg,who,whos,wilkinson,wk1read,% stderr,stdout,plot,set,endif,wk1write,xlabel,xor,ylabel,zeros,% - zlabel,zoom,endwhile,endfunction},% + zlabel,zoom,endwhile,endfunction,printf,case,switch,otherwise,% + system,lsode,endfor},% sensitive=f,% morecomment=[l]\#,% morecomment=[l]\#\#,% diff --git a/Master/texmf-dist/tex/latex/listings/lstlang2.sty b/Master/texmf-dist/tex/latex/listings/lstlang2.sty index c1c9121806f..c95df46f296 100644 --- a/Master/texmf-dist/tex/latex/listings/lstlang2.sty +++ b/Master/texmf-dist/tex/latex/listings/lstlang2.sty @@ -6,17 +6,19 @@ %% %% lstdrvrs-1.3.dtx (with options: `lang2') %% -%% (w)(c) 1996/1997/1998/1999/2000/2001/2002/2003/2004 Carsten Heinz -%% and/or any other author listed elsewhere in this file. +%% The listings package is copyright 1996--2004 Carsten Heinz, and +%% continued maintenance on the package is copyright 2006 Brooks Moses. +%% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004 any +%% individual author listed in this file. %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. +%% Either version 1.3 or, at your option, any later version. %% %% This file is completely free and comes without any warranty. %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to Brooks Moses at <bmoses@dpdx.net>. %% \ProvidesFile{lstlang2.sty} [2004/09/05 1.3 listings language file] diff --git a/Master/texmf-dist/tex/latex/listings/lstlang3.sty b/Master/texmf-dist/tex/latex/listings/lstlang3.sty index b43bc9eac56..09652d7cce2 100644 --- a/Master/texmf-dist/tex/latex/listings/lstlang3.sty +++ b/Master/texmf-dist/tex/latex/listings/lstlang3.sty @@ -6,17 +6,19 @@ %% %% lstdrvrs-1.3.dtx (with options: `lang3') %% -%% (w)(c) 1996/1997/1998/1999/2000/2001/2002/2003/2004 Carsten Heinz -%% and/or any other author listed elsewhere in this file. +%% The listings package is copyright 1996--2004 Carsten Heinz, and +%% continued maintenance on the package is copyright 2006 Brooks Moses. +%% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004 any +%% individual author listed in this file. %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. +%% Either version 1.3 or, at your option, any later version. %% %% This file is completely free and comes without any warranty. %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to Brooks Moses at <bmoses@dpdx.net>. %% \ProvidesFile{lstlang3.sty} [2004/09/05 1.3 listings language file] @@ -146,7 +148,7 @@ round,self,setelement,size,spawn,throw,time,tl,trace,trunc,% tuple,tuple_to_list,unlink,unregister,whereis,error,false,% infinity,nil,ok,true,undefined,when},% - otherkeywords={->,!,[,],\{,\},},% + otherkeywords={->,!,[,],\{,\}},% morecomment=[l]\%,% morestring=[b]",% morestring=[b]'% diff --git a/Master/texmf-dist/tex/latex/listings/lstmisc.sty b/Master/texmf-dist/tex/latex/listings/lstmisc.sty index 9a4f12de342..4180dc84094 100644 --- a/Master/texmf-dist/tex/latex/listings/lstmisc.sty +++ b/Master/texmf-dist/tex/latex/listings/lstmisc.sty @@ -10,9 +10,10 @@ %% %% (w)(c) 1996--2004 Carsten Heinz and/or any other author listed %% elsewhere in this file. +%% (c) 2006 Brooks Moses %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to <bmoses@dpdx.net>. %% \def\filedate{2004/09/07} \def\fileversion{1.3} diff --git a/Master/texmf-dist/tex/latex/listings/lstpatch.sty b/Master/texmf-dist/tex/latex/listings/lstpatch.sty index b07de3ef2e7..1fed6d8234e 100644 --- a/Master/texmf-dist/tex/latex/listings/lstpatch.sty +++ b/Master/texmf-dist/tex/latex/listings/lstpatch.sty @@ -2,30 +2,30 @@ %% This is file `lstpatch.sty', generated manually. %% %% (w)(c) 2004 Carsten Heinz +%% (c) 2006 Brooks Moses %% %% This file may be distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. +%% Either version 1.3 or, at your option, any later version. %% %% Send comments and ideas on the package, error reports and additional -%% programming languages to <cheinz@gmx.de>. +%% programming languages to <bmoses@dpdx.net>. %% -%% This patch file will remove the following bugs from the listings package.
-%% Each item contains the bug finder with date of report and first bug fix
-%% version, a short description of the problem, and the reason for the bug
-%% in parenthesis.
-%%
-%% 1) Frank Atanassow, 2004/10/07, 1.3b
-%%
-%% space after mathescape is not preserved
-%% (\lst@newlines>0)
-%%
-%% 2) Benjamin Lings, 2004/10/15, 1.3b (2004/10/17)
-%%
-%% \usepackage{xy,listings} yields:
-%% "Forbidden control sequence found while scanning use of \lst@lExtend"
-%% (xy-pic correctly resets catcode of ^^L (to active), which is \outer)
-%%
+%% This patch file will remove the following bugs from the listings package. +%% Each item contains the bug finder with date of report and first bug fix +%% version, a short description of the problem, and the reason for the bug +%% in parenthesis. +%% +%% 1) Frank Atanassow, 2004/10/07, 1.3b +%% +%% space after mathescape is not preserved +%% (\lst@newlines>0) +%% +%% 2) Benjamin Lings, 2004/10/15, 1.3b (2004/10/17) +%% +%% \usepackage{xy,listings} yields: +%% "Forbidden control sequence found while scanning use of \lst@lExtend" +%% (xy-pic correctly resets catcode of ^^L (to active), which is \outer) %% %% The following features are added to the base package. %% @@ -55,11 +55,16 @@ %% for begin respectively end of range. Moreover, one can use %% includerangemarker=true|false %% to show or hide the range markers in the output. -%%
-%% 1.3b (2004/10/17)
-%%
-%% b) multicols=<number> (requires loaded multicol package)
%% +%% 1.3b (2004/10/17) +%% +%% b) multicols=<number> (requires loaded multicol package) +%% +%% 1.3c +%% +%% c) speedups suggested by Hendri Adriaens: +%% +%% \lst@for replaced by a faster version. %% \lst@CheckVersion{1.3} {\typeout{^^J% @@ -82,44 +87,44 @@ \divide\@tempcntb\@tempcnta \ifodd\@tempcntb \@testtrue\fi \fi} -%
-% 1) Reset \lst@newlines at end of escape.
-\def\lstpatch@escape{%
-\gdef\lst@Escape##1##2##3##4{%
- \lst@CArgX ##1\relax\lst@CDefX
- {}%
- {\lst@ifdropinput\else
- \lst@TrackNewLines\lst@OutputLostSpace \lst@XPrintToken
- \lst@InterruptModes
- \lst@EnterMode{\lst@TeXmode}{\lst@modetrue}%
- \ifx\^^M##2%
- \lst@CArg ##2\relax\lst@ActiveCDefX
- {}%
- {\lst@escapeend ##4\lst@LeaveAllModes\lst@ReenterModes}%
- {\lst@MProcessListing}%
- \else
- \lst@CArg ##2\relax\lst@ActiveCDefX
- {}%
- {\lst@escapeend ##4\lst@LeaveAllModes\lst@ReenterModes
- \lst@newlines\z@ \lst@whitespacefalse}%
- {}%
- \fi
- ##3\lst@escapebegin
- \fi}%
- {}}%
-}
-%
-% 2) Deactivate \outer definition of ^^L temporarily (inside and outside
-% of \lst@ScanChars) and restore \catcode at end of package.
-\begingroup \catcode12=\active\let^^L\@empty
-\gdef\lst@ScanChars{%
- \let\lsts@ssL^^L%
- \def^^L{\par}%
- \lst@GetChars\lst@RestoreOrigCatcodes\@ne {128}%
- \let^^L\lsts@ssL
- \lst@GetChars\lst@RestoreOrigExtendedCatcodes{128}{256}}
-\endgroup
-\lst@lAddTo\lst@RestoreCatcodes{\catcode12\active}
+% +% 1) Reset \lst@newlines at end of escape. +\def\lstpatch@escape{% +\gdef\lst@Escape##1##2##3##4{% + \lst@CArgX ##1\relax\lst@CDefX + {}% + {\lst@ifdropinput\else + \lst@TrackNewLines\lst@OutputLostSpace \lst@XPrintToken + \lst@InterruptModes + \lst@EnterMode{\lst@TeXmode}{\lst@modetrue}% + \ifx\^^M##2% + \lst@CArg ##2\relax\lst@ActiveCDefX + {}% + {\lst@escapeend ##4\lst@LeaveAllModes\lst@ReenterModes}% + {\lst@MProcessListing}% + \else + \lst@CArg ##2\relax\lst@ActiveCDefX + {}% + {\lst@escapeend ##4\lst@LeaveAllModes\lst@ReenterModes + \lst@newlines\z@ \lst@whitespacefalse}% + {}% + \fi + ##3\lst@escapebegin + \fi}% + {}}% +} +% +% 2) Deactivate \outer definition of ^^L temporarily (inside and outside +% of \lst@ScanChars) and restore \catcode at end of package. +\begingroup \catcode12=\active\let^^L\@empty +\gdef\lst@ScanChars{% + \let\lsts@ssL^^L% + \def^^L{\par}% + \lst@GetChars\lst@RestoreOrigCatcodes\@ne {128}% + \let^^L\lsts@ssL + \lst@GetChars\lst@RestoreOrigExtendedCatcodes{128}{256}} +\endgroup +\lst@lAddTo\lst@RestoreCatcodes{\catcode12\active} % % a) Let's start with the options: \lst@Key{rangeprefix}\relax{\def\lst@rangebeginprefix{#1}% @@ -298,95 +303,114 @@ \ifnum`#1>47\relax \ifnum`#1>57\relax\else \let\lst@next\@firstoftwo \fi\fi} -%
-% b) The following is known to fail with some keys.
-\lst@Key{multicols}{}{\@tempcnta=0#1\relax\def\lst@multicols{#1}}
-\def\lst@Init#1{%
- \begingroup
- \ifx\lst@float\relax\else
- \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}%
- \expandafter\@tempa
- \fi
-% chmod begin
- \ifx\lst@multicols\@empty\else
- \edef\lst@next{\noexpand\multicols{\lst@multicols}}
- \expandafter\lst@next
- \fi
-% chmod end
- \ifhmode\ifinner \lst@boxtrue \fi\fi
- \lst@ifbox
- \lsthk@BoxUnsafe
- \hbox to\z@\bgroup
- $\if t\lst@boxpos \vtop
- \else \if b\lst@boxpos \vbox
- \else \vcenter \fi\fi
- \bgroup \par\noindent
- \else
- \lst@ifdisplaystyle
- \lst@EveryDisplay
- \par\penalty-50\relax
- \vspace\lst@aboveskip
- \fi
- \fi
- \normalbaselines
- \abovecaptionskip\lst@abovecaption\relax
- \belowcaptionskip\lst@belowcaption\relax
- \lst@MakeCaption t%
- \lsthk@PreInit \lsthk@Init
- \lst@ifdisplaystyle
- \global\let\lst@ltxlabel\@empty
- \if@inlabel
- \lst@ifresetmargins
- \leavevmode
- \else
- \xdef\lst@ltxlabel{\the\everypar}%
- \lst@AddTo\lst@ltxlabel{%
- \global\let\lst@ltxlabel\@empty
- \everypar{\lsthk@EveryLine\lsthk@EveryPar}}%
- \fi
- \fi
- \everypar\expandafter{\lst@ltxlabel
- \lsthk@EveryLine\lsthk@EveryPar}%
- \else
- \everypar{}\let\lst@NewLine\@empty
- \fi
- \lsthk@InitVars \lsthk@InitVarsBOL
- \lst@Let{13}\lst@MProcessListing
- \let\lst@Backslash#1%
- \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}%
- \lst@InitFinalize}
-\def\lst@DeInit{%
- \lst@XPrintToken \lst@EOLUpdate
- \global\advance\lst@newlines\m@ne
- \lst@ifshowlines
- \lst@DoNewLines
- \else
- \setbox\@tempboxa\vbox{\lst@DoNewLines}%
- \fi
- \lst@ifdisplaystyle \par\removelastskip \fi
- \lsthk@ExitVars\everypar{}\lsthk@DeInit\normalbaselines\normalcolor
- \lst@MakeCaption b%
- \lst@ifbox
- \egroup $\hss \egroup
- \vrule\@width\lst@maxwidth\@height\z@\@depth\z@
- \else
- \lst@ifdisplaystyle
- \par\penalty-50\vspace\lst@belowskip
- \fi
- \fi
-% chmod begin
- \ifx\lst@multicols\@empty\else
- \def\lst@next{\global\let\@checkend\@gobble
- \endmulticols
- \global\let\@checkend\lst@@checkend}
- \expandafter\lst@next
- \fi
-% chmod end
- \ifx\lst@float\relax\else
- \expandafter\lst@endfloat
- \fi
- \endgroup}
-\let\lst@@checkend\@checkend
+% +% b) The following is known to fail with some keys. +\lst@Key{multicols}{}{\@tempcnta=0#1\relax\def\lst@multicols{#1}} +\def\lst@Init#1{% + \begingroup + \ifx\lst@float\relax\else + \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}% + \expandafter\@tempa + \fi +% chmod begin + \ifx\lst@multicols\@empty\else + \edef\lst@next{\noexpand\multicols{\lst@multicols}} + \expandafter\lst@next + \fi +% chmod end + \ifhmode\ifinner \lst@boxtrue \fi\fi + \lst@ifbox + \lsthk@BoxUnsafe + \hbox to\z@\bgroup + $\if t\lst@boxpos \vtop + \else \if b\lst@boxpos \vbox + \else \vcenter \fi\fi + \bgroup \par\noindent + \else + \lst@ifdisplaystyle + \lst@EveryDisplay + \par\penalty-50\relax + \vspace\lst@aboveskip + \fi + \fi + \normalbaselines + \abovecaptionskip\lst@abovecaption\relax + \belowcaptionskip\lst@belowcaption\relax + \lst@MakeCaption t% + \lsthk@PreInit \lsthk@Init + \lst@ifdisplaystyle + \global\let\lst@ltxlabel\@empty + \if@inlabel + \lst@ifresetmargins + \leavevmode + \else + \xdef\lst@ltxlabel{\the\everypar}% + \lst@AddTo\lst@ltxlabel{% + \global\let\lst@ltxlabel\@empty + \everypar{\lsthk@EveryLine\lsthk@EveryPar}}% + \fi + \fi + \everypar\expandafter{\lst@ltxlabel + \lsthk@EveryLine\lsthk@EveryPar}% + \else + \everypar{}\let\lst@NewLine\@empty + \fi + \lsthk@InitVars \lsthk@InitVarsBOL + \lst@Let{13}\lst@MProcessListing + \let\lst@Backslash#1% + \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}% + \lst@InitFinalize} +\def\lst@DeInit{% + \lst@XPrintToken \lst@EOLUpdate + \global\advance\lst@newlines\m@ne + \lst@ifshowlines + \lst@DoNewLines + \else + \setbox\@tempboxa\vbox{\lst@DoNewLines}% + \fi + \lst@ifdisplaystyle \par\removelastskip \fi + \lsthk@ExitVars\everypar{}\lsthk@DeInit\normalbaselines\normalcolor + \lst@MakeCaption b% + \lst@ifbox + \egroup $\hss \egroup + \vrule\@width\lst@maxwidth\@height\z@\@depth\z@ + \else + \lst@ifdisplaystyle + \par\penalty-50\vspace\lst@belowskip + \fi + \fi +% chmod begin + \ifx\lst@multicols\@empty\else + \def\lst@next{\global\let\@checkend\@gobble + \endmulticols + \global\let\@checkend\lst@@checkend} + \expandafter\lst@next + \fi +% chmod end + \ifx\lst@float\relax\else + \expandafter\lst@endfloat + \fi + \endgroup} +\let\lst@@checkend\@checkend +% +% c) Hendri's suggested change to \lst@for. +% +% \begin{macro}{\lst@for} +% \begin{macro}{\lst@f@r} +% A for-loop with expansion of the loop-variable. +% \begin{macrocode} +\def\lst@for#1\do#2{% + \def\lst@forbody##1{#2}% + \def\@tempa{#1}% + \ifx\@tempa\@empty\else\expandafter\lst@f@r#1,\@nil,\fi +} +\def\lst@f@r#1,{% + \def\@tempa{#1}% + \ifx\@tempa\@nnil\else\lst@forbody{#1}\expandafter\lst@f@r\fi +} +% \end{macrocode} +% \end{macro} +% \end{macro} %% \endinput %% |