فهرست منبع

* support for hevea
* provided local copies or required styles since debian does not
supply the listings.sty anymore

peter 22 سال پیش
والد
کامیت
356a3d1609

+ 74 - 35
docs/Makefile

@@ -24,8 +24,12 @@
 # Which docs are made when 'html' is specified
 HTML = user units ref prog
 
-# Can be 'report','book' or 'html'
+# Can be 'report','book', 'html', 'hevea'
+ifdef USEHEVEA
+PREAMBLETYPE = hevea
+else
 PREAMBLETYPE = report
+endif
 
 # Where do you want the html files to be put ?
 ifndef PREFIXINSTALLDIR
@@ -59,6 +63,11 @@ LATEX2HTMLOPTS = -no_reuse -up_url "../fpctoc.html"\
                  -html_version 4.0 -split 3
 endif
 
+# Hevea conversion.
+ifndef HEVEA
+HEVEA = /usr/bin/hevea
+endif
+
 # Ascii mode ? (i.e. no pics)
 ifndef ASCIIMODE
 ASCIIMODE=NO
@@ -115,7 +124,8 @@ GTKPDF=$(addsuffix .pdf,$(addprefix gtk, 1 2 3 4 5))
 
 # Check if ascii-mode requested
 ifeq ($(ASCIIMODE),YES)
-LATEX2HTMLOPTS:=$(LATEX2HTMLOPTS) -ascii_mode
+LATEX2HTMLOPTS+=-ascii_mode
+HEVEAOPTS+=-text
 endif
 
 
@@ -175,11 +185,14 @@ help:
 
 clean:
 	-rm -f preamble.inc date.inc
-	-rm -f *.htex
+	-rm -f *.htex *.hind *.haux *.htoc $(addsuffix .html,$(HTML))
 	-rm -rf $(HTML) onechap
 	-rm -f $(TOC) $(LOG) $(DVI) $(PDF) $(AUX) $(OUT) $(PS) *.i* $(LOT) $(TXT) $(CHK)
 	-rm -f onechap.dvi onechap.pdf onechap.ps onechap.out onechap.log onechap.aux
 
+# Styles
+	-rm -f $(notdir $(wildcard styles/*))
+
 # Units
 	-$(MAKE) -C crtex clean
 	-$(MAKE) -C dosex clean
@@ -274,12 +287,17 @@ scripts.chk:
 	touch scripts.chk
 endif
 
+# Local copy of the required styles
+syntax.sty: styles/syntax.sty
+	cp $(wildcard styles/*) .
+
 ifndef inWinNT
-includes: date.inc preamble.inc scripts.chk
+includes: date.inc preamble.inc syntax.sty scripts.chk
 else
-includes: date.inc preamble.inc
+includes: date.inc preamble.inc syntax.sty
 endif
 
+
 #####################################################################
 # Tex from XML
 #####################################################################
@@ -330,6 +348,43 @@ all : dvi ps pdf txt html
 # Html creation
 #####################################################################
 
+.PHONY: htex user prog units onechap ref internal html hevea
+
+ifdef INSTALLDEBUG
+#
+# Installation debugging
+#
+$(HTML):
+	mkdir $@
+	cp [email protected] $@/index.html
+
+html: $(HTML)
+
+else
+
+ifdef USEHEVEA
+#
+# Hevea tex 2 html conversion
+#
+
+htmlincludes: includes
+
+%.html: %.tex fpc-hevea.tex
+	$(HEVEA) $(HEVEAOPTS) $<
+
+user: htmlincludes user.html
+units: htmlincludes units.html
+prog: htmlincludes prog.html
+onechap: htmlincludes onechap.html
+ref: htmlincludes ref.html
+
+html: htmlincludes $(addsuffix .html,$(HTML))
+
+else
+#
+# Latex2HTML
+#
+
 htex: htex.chk
 htex.chk: $(wildcard *.tex) includes
 	./tex2htex
@@ -337,15 +392,12 @@ htex.chk: $(wildcard *.tex) includes
 
 user: user.chk
 user.chk: htex.chk includes
-ifdef INSTALLDEBUG
-	mkdir user
-	cp user.tex user/index.html
-else
 	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 2 -link 2\
 	-t "User's guide for Free Pascal" user.htex
 	-sed -f foot.sed <user/footnode.html >user/footnote.html
 	-mv user/footnote.html user/footnode.html
+ifndef DEBUG
 	-rm -f user/labels.pl user/internals.pl user/.*.pag user/.*.dir
 	-rm -f user/images.* user/*.log user/WARNINGS
 endif
@@ -353,10 +405,6 @@ endif
 
 units: units.chk
 units.chk: unitex.chk htex.chk includes
-ifdef INSTALLDEBUG
-	mkdir units
-	cp units.tex units/index.html
-else
 	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 3 -link 2\
 	-t "Unit reference for Free Pascal" units.htex
@@ -365,16 +413,11 @@ else
 ifndef DEBUG
 	-rm -f units/labels.pl units/internals.pl units/.*.pag units/.*.dir
 	-rm -f units/images.* units/*.log units/WARNINGS
-endif
 endif
 	touch units.chk
 
 ref: ref.chk
 ref.chk: refex.chk htex.chk includes
-ifdef INSTALLDEBUG
-	mkdir ref
-	cp ref.tex ref/index.html
-else
 	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 4 -link 2\
 	-t "Free Pascal reference guide" ref.htex
@@ -383,16 +426,11 @@ else
 ifndef DEBUG
 	-rm -f ref/labels.pl ref/internals.pl ref/.*.pag ref/.*.dir
 	-rm -f ref/images.* ref/*.log ref/WARNINGS
-endif
 endif
 	touch ref.chk	
 
 prog: prog.chk
 prog.chk: progex.chk htex.chk includes
-ifdef INSTALLDEBUG
-	mkdir prog
-	cp prog.tex prog/index.html
-else
 	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 2 -link 2\
 	-t "Free Pascal programmers guide" prog.htex
@@ -401,16 +439,11 @@ else
 ifndef DEBUG
 	-rm -f prog/labels.pl prog/internals.pl prog/.*.pag prog/.*.dir
 	-rm -f prog/images.* prog/*.log prog/WARNINGS
-endif
 endif
 	touch prog.chk
 
 internal: internal.chk
 internal.chk: htex.chk
-ifdef INSTALLDEBUG
-	mkdir internal
-	cp internal.tex internal/index.html
-else
 	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 4 -link 2\
 	-t "Free Pascal Compiler Documentation" internal.htex
@@ -419,16 +452,11 @@ else
 ifndef DEBUG
 	-rm -f internal/labels.pl internal/internals.pl internal/.*.pag internal/.*.dir
 	-rm -f internal/images.* internal/*.log internal/WARNINGS
-endif
 endif
 	touch internal.chk	
 
 onechap: onechap.chk
 onechap.chk: unitex.chk htex.chk includes
-ifdef INSTALLDEBUG
-	mkdir onechap
-	cp onechap.tex onechap/index.html
-else
 	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 4 -link 2\
 	-t "Free Pascal reference guide" onechap.htex
@@ -437,12 +465,18 @@ else
 ifndef DEBUG
 	-rm -f onechap/labels.pl onechap/internals.pl onechap/.*.pag onechap/.*.dir
 	-rm -f onechap/images.* onechap/*.log onechap/WARNINGS
-endif
 endif
 	touch onechap.chk	
 
 html: $(HTML)
 
+endif  # USEHEVEA
+
+endif  # INSTALLDEBUG
+
+hevea:
+	$(MAKE) html USEHEVEA=1
+
 classes: classes/index.html
 
 classes/index.html: classes.xml
@@ -589,7 +623,12 @@ execute:
 
 #
 # $Log$
-# Revision 1.16  2003-02-24 23:37:52  michael
+# Revision 1.17  2003-03-16 15:22:18  peter
+#   * support for hevea
+#   * provided local copies or required styles since debian does not
+#     supply the listings.sty anymore
+#
+# Revision 1.16  2003/02/24 23:37:52  michael
 # + Preparations for version 1.0.8
 #
 # Revision 1.15  2002/11/10 12:22:10  carl

+ 2 - 1
docs/dos.tex

@@ -477,9 +477,10 @@ name is left as it is, otherwise it is converted to uppercase.
 \Errors
 \seep{FSplit}
 \SeeAlso
-\lstinputlisting{dosex/ex5.pp}
 \end{functionl}
 
+\FPCexample{ex5}
+
 \begin{procedure}{FindClose}
 \Declaration
 Procedure FindClose (Var F: SearchRec);

+ 180 - 0
docs/fpc-hevea.tex

@@ -0,0 +1,180 @@
+%
+%   $Id$
+%
+%   This file is part of the FPC documentation.
+%   Copyright (C) 1997, by Michael Van Canneyt
+%
+%   The FPC documentation is free text; you can redistribute it and/or
+%   modify it under the terms of the GNU Library General Public License as
+%   published by the Free Software Foundation; either version 2 of the
+%   License, or (at your option) any later version.
+%
+%   The FPC Documentation is distributed in the hope that it will be useful,
+%   but WITHOUT ANY WARRANTY; without even the implied warranty of
+%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%   Library General Public License for more details.
+%
+%   You should have received a copy of the GNU Library General Public
+%   License along with the FPC documentation; see the file COPYING.LIB.  If not,
+%   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+%   Boston, MA 02111-1307, USA.
+
+\usepackage{makeidx}
+\usepackage{ifthen}
+
+%
+% Fake packages
+%
+\newcommand{\xspace}{ }
+\newenvironment{multicols}[1]{}{}
+
+\newcommand{\docdescription}[1]{\def\@FPCDescription{#1}}
+\gdef\@FPCDescription{}%
+\newcommand{\docversion}[1]{\def\@FPCVersion{#1}}
+\gdef\@FPCVersion{}%
+
+%
+% FPC environments
+%
+% Remarks
+\newenvironment{remark}{\par\textbf{Remark:} }{\par}
+% List
+\newenvironment{FPCList}{\begin{list}}{\end{list}}
+% For Tables.
+\newenvironment{FPCtable}[2]{\begin{table}\caption{#2}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
+% The same, but with label in third argument (tab:#3)
+\newenvironment{FPCltable}[3]{\begin{table}\caption{#2}\label{tab:#3}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
+
+%
+% Refs
+%
+\newcommand{\seefig}[1]{Figure \ref{fig:#1}\xspace}
+\newcommand{\seefl}[2]{\ahref{fu:#2}{#1}}
+\newcommand{\seepl}[2]{\ahref{pro:#2}{#1}}
+\newcommand{\seetypel}[2]{\ahref{ty:#2}{#1}}
+\newcommand{\seeconstl}[2]{\ahref{co:#2}{#1}}
+\newcommand{\seevarl}[2]{\ahref{var:#2}{#1}}
+\newcommand{\seec}[1]{chapter \ref{ch:#1}\xspace}
+\newcommand{\sees}[1]{section \ref{se:#1}\xspace}
+\newcommand{\seeo}[1]{\var{-#1}, (see \ref{option:#1})\xspace}
+\newcommand{\seet}[1]{table (\ref{tab:#1})\xspace}
+
+%
+% Function/procedure environments
+%
+\newenvironment{functionl}[2]{\subsection{#1}\index{#1}\label{fu:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{procedurel}[2]{\subsection{#1}\index{#1}\label{pro:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{method}[2]{\subsection{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{property}[2]{\subsection{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{function}[1]{\begin{functionl}{#1}{#1}}{\end{functionl}}
+\newenvironment{procedure}[1]{\begin{procedurel}{#1}{#1}}{\end{procedurel}}
+\newenvironment{typel}[2]{\subsection{#1}\index{#1}\label{ty:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{type}[1]{\begin{typel}{#1}{#1}}{\end{typel}}
+\newenvironment{constantl}[2]{\subsection{#1}\index{#1}\label{co:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{constant}[1]{\begin{constantl}{#1}{#1}}{\end{constantl}}
+\newenvironment{variablel}[2]{\subsection{#1}\index{#1}\label{var:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{variable}[1]{\begin{variablel}{#1}{#1}}{\end{variablel}}
+\newenvironment{ver2}{\par\textbf{version 2.0 only:}}{\par}
+\newcommand{\Declaration}{\item[Declaration]\ttfamily}
+\newcommand{\Description}{\item[Description]\rmfamily}
+\newcommand{\Portability}{\item[Portability]\rmfamily}
+\newcommand{\Errors}{\item[Errors]\rmfamily}
+\newcommand{\Visibility}{\item[Visibility]\rmfamily}
+\newcommand{\Access}{\item[Access]\rmfamily}
+\newcommand{\Synopsis}{\item[Synopsis]\rmfamily}
+\newcommand{\Arguments}{\item[Arguments]\rmfamily}
+\newcommand{\SeeAlso}{\item[See also]\rmfamily}
+%
+% Ref without labels
+%
+\newcommand{\seef}[1]{\seefl{#1}{#1}}
+\newcommand{\seep}[1]{\seepl{#1}{#1}}
+\newcommand{\seetype}[1]{\seetypel{#1}{#1}}
+\newcommand{\seevar}[1]{\seevarl{#1}{#1}}
+\newcommand{\seeconst}[1]{\seeconstl{#1}{#1}}
+%
+% man page references don't need labels.
+%
+\newcommand{\seem}[2]{\texttt{#1} (#2) }
+%
+% HTML references
+%
+\newcommand{\seeurl}[2]{\ahref{#2}{#1}}
+%
+% for easy typesetting of variables.
+%
+\newcommand{\var}[1]{\texttt {#1}}
+\newcommand{\file}[1]{\textsf {#1}}
+\newcommand{\key}[1]{\textsc{#1}}
+\newcommand{\menu}[1]{\textbf{"#1"}}
+%
+% Useful references.
+%
+\newcommand{\progref}{\ahref{../prog/prog.html}{Programmers guide}\xspace}
+\newcommand{\refref}{\ahref{../ref/ref.html}{Reference guide}\xspace}
+\newcommand{\userref}{\ahref{../user/user.html}{Users guide}\xspace}
+\newcommand{\unitsref}{\ahref{../units/units.html}{Unit reference}\xspace}
+%
+% Commands to reference these things.
+%
+\newcommand{\olabel}[1]{\label{option:#1}}
+%
+% some OSes
+%
+\newcommand{\linux}{\textsc{linux}\xspace}
+\newcommand{\unix}{\textsc{unix}\xspace}
+\newcommand{\dos}  {\textsc{dos}\xspace}
+\newcommand{\msdos}{\textsc{ms-dos}\xspace}
+\newcommand{\ostwo}{\textsc{os/2}\xspace}
+\newcommand{\windows}{\textsc{Windows}\xspace}
+\newcommand{\windowsnt}{\textsc{Windows NT}\xspace}
+\newcommand{\fpc}{Free Pascal\xspace}
+\newcommand{\gnu}{\textsc{gnu}\xspace}
+\newcommand{\atari}{\textsc{Atari}\xspace}
+\newcommand{\amiga}{\textsc{Amiga}\xspace}
+\newcommand{\solaris}{\textsc{Solaris}\xspace}
+\newcommand{\qnx}{\textsc{QNX Realtime platform}\xspace}
+\newcommand{\beos}{\textsc{BeOS}\xspace}
+\newcommand{\palmos}{\textsc{PalmOS}\xspace}
+\newcommand{\netbsd}{\textsc{NetBSD}\xspace}
+\newcommand{\openbsd}{\textsc{OpenBSD}\xspace}
+\newcommand{\win}{\textsc{Win32}\xspace}
+\newcommand{\freebsd}{\textsc{FreeBSD}\xspace}
+\newcommand{\tp}{Turbo Pascal\xspace}
+\newcommand{\delphi}{Delphi}
+%
+% Some versions
+%
+\newcommand{\fpcversion}{1.0.8}
+%
+% For examples
+%
+\newcommand{\FPCexample}[1]{\begin{verbatim}\input{\exampledir/#1.pp}\end{verbatim}}
+\newcommand{\Cexample}[1]{\begin{verbatim}\input{\exampledir/#1.c}\end{verbatim}}
+\newcommand{\exampledir}{.}
+\newcommand{\FPCexampledir}[1]{\renewcommand{\exampledir}{#1}}
+%
+% Picture including
+%
+\newcommand{\FPCpic}[3]{%
+  \linebreak%
+  \begin{center}
+  \textbf{Figure \ref{fig:#3} #1}%
+  \linebreak%
+  \label{fig:#3}%
+  \imgsrc{../pics/#2/#3.png}%
+  \end{center}
+  \linebreak%
+}
+%
+% Categorical Function/procedure overviews
+%
+\newenvironment{funclist}{\begin{list}}{\end{list}}
+\newcommand{\funcrefl}[3]{\item[\ahref{#2}{fu:#2} #3]}
+\newcommand{\funcref}[2]{\item[\ahref{#1}{fu:#1} #2]}
+\newcommand{\procrefl}[3]{\item[\ahref{#2}{pro:#2} #3]}
+\newcommand{\procref}[2]{\item[\ahref{#1}{pro:#1} #2]}
+
+%
+% end of fpc-html.tex
+%

+ 24 - 5
docs/fpc.sty

@@ -149,6 +149,10 @@
 %
 \newcommand{\seem}[2]{\texttt{#1} (#2) }
 %
+% HTML references
+%
+\newcommand{\seeurl}[2]{\htmladdnormallink{#1}{#2}}
+%
 % for easy typesetting of variables.
 %
 \newcommand{\var}[1]{\texttt {#1}}
@@ -194,6 +198,7 @@
 \newcommand{\beos}{\textsc{BeOS}\xspace}
 \newcommand{\palmos}{\textsc{PalmOS}\xspace}
 \newcommand{\netbsd}{\textsc{NetBSD}\xspace}
+\newcommand{\openbsd}{\textsc{OpenBSD}\xspace}
 \newcommand{\win}{\textsc{Win32}\xspace}
 \newcommand{\freebsd}{\textsc{FreeBSD}\xspace}
 \newcommand{\tp}{Turbo Pascal\xspace}
@@ -234,19 +239,33 @@
 %
 % For examples
 %
-\latex{%
-  \newcommand{\FPCexample}[1]{%
+\newcommand{\FPCexample}[1]{%
     \par \file{\textbf{Listing:} \exampledir/#1.pp}%
     \lstinputlisting{\exampledir/#1.pp}%
-  }
-  \newcommand{\Cexample}[1]{%
+}
+\newcommand{\Cexample}[1]{%
     \par \file{\textbf{Listing:} \exampledir/#1.c}%
     \lstinputlisting[language=c]{\exampledir/#1.c}%
-  }
 }
 \newcommand{\exampledir}{.}
 \newcommand{\FPCexampledir}[1]{\renewcommand{\exampledir}{#1}}
 %
+% Picture including
+%
+\newcommand{\FPCpic}[3]{%
+  \begin{figure}[ht]%
+  \begin{center}
+  \caption{#1}%
+  \label{fig:#3}%
+  \ifpdf%
+    \epsfig{file=pics/#2/#3.png,width=\textwidth}%
+  \else%
+    \epsfig{file=pics/#2/#3.eps,width=\textwidth}%
+  \fi%
+  \end{center}
+  \end{figure}%
+}
+%
 % Categorical Function/procedure overviews
 %
 \newenvironment{funclist}{%

+ 3 - 2
docs/getopts.tex

@@ -19,6 +19,8 @@
 %   Boston, MA 02111-1307, USA. 
 %
 \chapter{The GETOPTS unit.}
+\FPCexampledir{optex}
+
 This document describes the GETOPTS unit for Free Pascal. It was written for
 \linux\ by Micha\"el Van Canneyt. It now also works for all supported platforms.
 
@@ -137,6 +139,5 @@ then gives the character which caused the error. If \var{OptErr} is
 \SeeAlso
 \seef{GetLongOpts}, \seem{getopt}{3}
 \end{function}
-\latex{\lstinputlisting{optex/optex.pp}}
-\html{\input{optex/optex.tex}}
 
+\FPCexample{optex}

+ 17 - 27
docs/go32.tex

@@ -1,4 +1,7 @@
 \chapter{The GO32 unit}
+\label{ch:go32unit}
+
+\FPCexampledir{go32ex}
 This chapter of the documentation describe the GO32 unit for the Free Pascal
 compiler under \dos. It was donated by Thomas Schatzl
 (tom\_at\[email protected]), for which my thanks.
@@ -16,7 +19,7 @@ I hope the following explanations and introductions aren't too confusing at
 all. If you notice an error or bug send it to the FPC mailing list or
 directly to me.
 So let's get started and happy and error free coding I wish you....
-\hfill Thomas Schatzl, 25. August 1998
+Thomas Schatzl, 25. August 1998
 \section{Protected mode memory organization}
 \subsection{What is DPMI}
 The \dos Protected Mode Interface helps you with various aspects of protected
@@ -155,8 +158,7 @@ interrupt) command to the responsible controller; this is acomplished by
 sending the value 20h to port 20h (for the first controller) or A0h (for the
 second controller).
 The following example shows how to redirect the keyboard interrupt.
-\latex{\lstinputlisting{go32ex/keyclick.pp}}
-\html{\input{go32ex/keyclick.tex}}
+\FPCexample{keyclick}
 \subsection{Software interrupts}
 Ordinarily, a handler installed with
 \seefl{set\_pm\_interrupt}{setpminterrupt} only services software
@@ -193,10 +195,8 @@ See also:
 \seefl{global\_dos\_free}{globaldosfree},
 \seef{realintr}
 The following examples illustrate the use of software interrupts.
-\latex{\lstinputlisting{go32ex/softint.pp}}
-\html{\input{go32ex/softint.tex}}
-\latex{\lstinputlisting{go32ex/rmpmint.pp}}
-\html{\input{go32ex/rmpmint.tex}}
+\FPCexample{softint}
+\FPCexample{rmpmint}
 \subsection{Real mode callbacks}
 The callback mechanism can be thought of as the converse of calling a real
 mode procedure (i.e. interrupt), which allows your program to pass
@@ -387,8 +387,7 @@ function.
 \seefl{set\_segment\_base\_address}{setsegmentbaseaddress} 
 
 \end{functionl}
-\latex{\lstinputlisting{go32ex/seldes.pp}}
-\html{\input{go32ex/seldes.tex}}
+\FPCexample{seldes}
 \begin{functionl}{allocate\_memory\_block}{allocatememoryblock}
 \Declaration
 Function allocate\_memory\_block (size:Longint) : Longint;
@@ -525,8 +524,7 @@ Notes: No range check is performed.
 \seepl{seg\_fillchar}{segfillchar},
 \seepl{seg\_fillword}{segfillword} 
 \end{procedure}
-\latex{\lstinputlisting{go32ex/textmess.pp}}
-\html{\input{go32ex/textmess.tex}}
+\FPCexample{textmess}
 \begin{procedure}{dosmemfillword}
 \Declaration
 Procedure dosmemfillword (seg,ofs : Word; count : Longint; w : Word);
@@ -819,8 +817,7 @@ Check the \var{int31error} variable.
 \SeeAlso
 \seefl{get\_page\_size}{getpagesize} 
 \end{functionl}
-\latex{\lstinputlisting{go32ex/meminfo.pp}}
-\html{\input{go32ex/meminfo.tex}}
+\FPCexample{meminfo}
 \begin{functionl}{get\_next\_selector\_increment\_value}{getnextselectorincrementvalue}
 \Declaration
 Function get\_next\_selector\_increment\_value  : Word;
@@ -904,8 +901,7 @@ Check the \var{int31error} variable.
 \SeeAlso
 \seefl{free\_rm\_callback}{freermcallback} 
 \end{functionl}
-\latex{\lstinputlisting{go32ex/callback.pp}}
-\html{\input{go32ex/callback.tex}}
+\FPCexample{callback}
 \begin{functionl}{get\_rm\_interrupt}{getrminterrupt}
 \Declaration
 Function get\_rm\_interrupt (vector : byte; var intaddr :
@@ -943,8 +939,7 @@ None.
 \SeeAlso
  constants returned by \seefl{get\_run\_mode}{getrunmode}  
 \end{functionl}
-\latex{\lstinputlisting{go32ex/getrunmd.pp}}
-\html{\input{go32ex/getrunmd.tex}}
+\FPCexample{getrunmd}
 \begin{functionl}{get\_segment\_base\_address}{getsegmentbaseaddress}
 \Declaration
 Function get\_segment\_base\_address  
@@ -1036,8 +1031,7 @@ should only be freed by a \seefl{global\_dos\_free}{globaldosfree}  call.
 \SeeAlso
  \seefl{global\_dos\_free}{globaldosfree} 
 \end{functionl}
-\latex{\lstinputlisting{go32ex/buffer.pp}}
-\html{\input{go32ex/buffer.tex}}
+\FPCexample{buffer}
 \begin{functionl}{global\_dos\_free}{globaldosfree}
 \Declaration
 Function global\_dos\_free (selector :Word) : boolean;
@@ -1201,8 +1195,7 @@ Return values: None.
 \SeeAlso
 \seef{inportb}, \seep{outportl}, \seep{outportw} 
 \end{procedure}
-\latex{\lstinputlisting{go32ex/outport.pp}}
-\html{\input{go32ex/outport.tex}}
+\FPCexample{outport}
 \begin{procedure}{outportl}
 \Declaration
 Procedure outportl (port : Word; data : Longint);
@@ -1264,8 +1257,7 @@ executing an IRET.
 \SeeAlso
 
 \end{function}
-\latex{\lstinputlisting{go32ex/flags.pp}}
-\html{\input{go32ex/flags.tex}}
+\FPCexample{flags}
 \begin{procedurel}{seg\_fillchar}{segfillchar}
 \Declaration
 Procedure seg\_fillchar (seg : Word; ofs : Longint; count : Longint; c : char);
@@ -1294,8 +1286,7 @@ Notes: No range check is done in any way.
 \seepl{dosmemput}{dosmemput},
 \seepl{dosmemmove}{dosmemmove} 
 \end{procedurel}
-\latex{\lstinputlisting{go32ex/vgasel.pp}}
-\html{\input{go32ex/vgasel.tex}}
+\FPCexample{vgasel}
 \begin{procedurel}{seg\_fillword}{segfillword}
 \Declaration
 Procedure seg\_fillword (seg : Word; ofs : Longint; count : Longint; w :Word);
@@ -1432,8 +1423,7 @@ protected mode address.
 \seefl{set\_rm\_interrupt}{setrminterrupt},
 \seefl{get\_rm\_interrupt}{getrminterrupt} 
 \end{functionl}
-\latex{\lstinputlisting{go32ex/intpm.pp}}
-\html{\input{go32ex/intpm.tex}}
+\FPCexample{intpm}
 \begin{functionl}{set\_rm\_interrupt}{setrminterrupt}
 \Declaration
 Function set\_rm\_interrupt (vector : byte; const intaddr :

+ 2 - 2
docs/gpm.tex

@@ -216,7 +216,7 @@ None.
 \seefl{Gpm\_Open}{GpmOpen}
 \end{functionl}
 
-for an example, see \seefl{Gpm_GetEvent}{GpmGetEvent}.
+for an example, see \seefl{Gpm\_GetEvent}{GpmGetEvent}.
 
 \begin{functionl}{Gpm\_FitValues}{GpmFitValues}
 \Declaration
@@ -360,7 +360,7 @@ On Error, the return value is -1.
 \seefl{Gpm\_Open}{GpmOpen}
 \end{functionl}
 
-for an example, see \seefl{Gpm_GetEvent}{GpmGetEvent}.
+for an example, see \seefl{Gpm\_GetEvent}{GpmGetEvent}.
 
 \begin{functionl}{Gpm\_PopRoi}{GpmPopRoi}
 \Declaration

+ 11 - 6
docs/heaptrc.tex

@@ -19,6 +19,8 @@
 %   Boston, MA 02111-1307, USA. 
 %
 \chapter{The HEAPTRC unit.}
+\FPCexampledir{heapex}
+
 This chapter describes the HEAPTRC unit for \fpc. It was written by 
 Pierre Muller. It is system independent, and works on all supported systems.
 
@@ -53,8 +55,8 @@ If you use the \var{-gh} switch, the compiler will insert the unit by itself,
 so you don't have to include it in your uses clause.
 
 The following example shows how to use the heaptrc unit.
-\latex{\lstinputlisting{heapex/heapex.pp}}
-\html{\input{heapex/heapex.tex}}
+
+\FPCexample{heapex}
 
 This is the memory dump shown when running this program:
 \begin{verbatim}
@@ -186,8 +188,7 @@ output, and a \seep{DumpHeap} is executed.
 
 \end{procedure}
 
-\latex{\lstinputlisting{heapex/setinfo.pp}}
-\html{\input{heapex/setinfo.tex}}
+\FPCexample{setinfo}
 
 \begin{procedure}{SetHeapTraceOutput}
 \Declaration
@@ -206,7 +207,12 @@ trace.
 
 %
 % $Log$
-% Revision 1.1  2000-07-13 09:10:04  michael
+% Revision 1.2  2003-03-16 15:22:18  peter
+%   * support for hevea
+%   * provided local copies or required styles since debian does not
+%     supply the listings.sty anymore
+%
+% Revision 1.1  2000/07/13 09:10:04  michael
 % + Initial import
 %
 % Revision 1.6  2000/07/11 18:07:26  peter
@@ -227,4 +233,3 @@ trace.
 % Revision 1.1  1998/12/14 23:17:02  michael
 % + INitial implementation
 %
-%

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 117 - 603
docs/ide.tex


+ 6 - 7
docs/ipc.tex

@@ -19,6 +19,9 @@
 %   Boston, MA 02111-1307, USA. 
 %
 \chapter{The IPC unit.}
+\label{ch:ipcunit}
+
+\FPCexampledir{ipcex}
 This chapter describes the IPC unit for Free Pascal. It was written for
 \linux by Micha\"el Van Canneyt. It gives all the functionality of system V 
 Inter-Process Communication: shared memory, semaphores and messages.
@@ -410,8 +413,7 @@ On error, \var{False} is returned, and \var{IPCerror} is set accordingly.
 \seef{msgget}, \seef{msgsnd}, \seef{msgrcv}
 \end{function}
 
-\latex{\lstinputlisting{ipcex/msgtool.pp}}
-\html{\input{ipcex/msgtool.tex}}
+\FPCexample{msgtool}
 
 \begin{function}{semget}
 \Declaration
@@ -547,9 +549,7 @@ The function returns -1 on error, and \var{IPCerror} is set accordingly.
 \seef{semget}, \seef{semop}
 \end{function}
 
-\latex{\lstinputlisting{ipcex/semtool.pp}}
-\html{\input{ipcex/semtool.tex}}
-
+\FPCexample{semtool}
 
 \begin{function}{shmget}
 \Declaration
@@ -652,5 +652,4 @@ is set.
 \seef{shmget}, \seef{shmat}, \seef{shmdt}
 \end{function}
 
-\latex{\lstinputlisting{ipcex/shmtool.pp}}
-\html{\input{ipcex/shmtool.tex}}
+\FPCexample{shmtool}

+ 66 - 89
docs/objects.tex

@@ -19,6 +19,9 @@
 %   Boston, MA 02111-1307, USA. 
 %
 \chapter{The Objects unit.}
+\label{ch:objectsunit}
+
+\FPCexampledir{objectex}
 This chapter documents the \file{objects} unit. The unit was implemented by
 many people, and was mainly taken from the FreeVision sources. It has been 
 ported to all supported platforms.
@@ -158,8 +161,7 @@ If not enough memory is available, an 'out of memory' error will occur.
 \seep{DisposeStr}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex40.pp}}
-\html{\input{objectex/ex40.tex}}
+\FPCexample{ex40}
 
 \begin{procedure}{DisposeStr}
 \Declaration
@@ -235,8 +237,7 @@ In case of error (if a object with the same \var{ObjType}) is already
 registered), run-time error 212 occurs.
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/myobject.pp}}
-\html{\input{objectex/myobject.tex}}
+\FPCexample{myobject}
 
 \begin{function}{LongMul}
 \Declaration
@@ -295,8 +296,7 @@ None.
 \seef{TRect.Equals}, \seef{TRect.Contains}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex1.pp}}
-\html{\input{objectex/ex1.tex}}
+\FPCexample{ex1}
 
 \begin{function}{TRect.Equals}      
 \Declaration
@@ -337,8 +337,7 @@ None.
 \seepl{Assign}{TRect.Assign}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex2.pp}}
-\html{\input{objectex/ex2.tex}}
+\FPCexample{ex2}
 
 \begin{procedure}{TRect.Union}
 \Declaration
@@ -352,8 +351,7 @@ None.
 \seepl{Intersect}{TRect.Intersect}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex3.pp}}
-\html{\input{objectex/ex3.tex}}
+\FPCexample{ex3}
 
 \begin{procedure}{TRect.Intersect}
 \Declaration
@@ -368,8 +366,7 @@ None.
 \seepl{Union}{TRect.Union}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex4.pp}}
-\html{\input{objectex/ex4.tex}}
+\FPCexample{ex4}
 
 \begin{procedure}{TRect.Move}
 \Declaration
@@ -384,8 +381,7 @@ None.
 \seepl{Grow}{TRect.Grow}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex5.pp}}
-\html{\input{objectex/ex5.tex}}
+\FPCexample{ex5}
 
 \begin{procedure}{TRect.Grow}
 \Declaration
@@ -406,8 +402,7 @@ None.
 \end{procedure}
 
 
-\latex{\lstinputlisting{objectex/ex6.pp}}
-\html{\input{objectex/ex7.tex}}
+\FPCexample{ex6}
 
 \begin{procedure}{TRect.Assign}
 \Declaration
@@ -463,8 +458,7 @@ the object is indeed allocated on the heap.
 \seepl{Init}{TObject.Init}, \seepl{Done}{TObject.Done}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex7.pp}}
-\html{\input{objectex/ex7.tex}}
+\FPCexample{ex7}
 
 \begin{procedure}{TObject.Done}
 \Declaration
@@ -480,8 +474,7 @@ None.
 \seepl{Free}{TObject.Free}, \seepl{Init}{TObject.Init}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex8.pp}}
-\html{\input{objectex/ex8.tex}}
+\FPCexample{ex8}
 
 \section{TStream}
 \label{se:TStream}
@@ -539,8 +532,7 @@ On error, \var{TStream.Status} is set, and NIL is returned.
 \seepl{Put}{TStream.Put}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex9.pp}}
-\html{\input{objectex/ex9.tex}}
+\FPCexample{ex9}
 
 \begin{function}{TStream.StrRead}
 \Declaration
@@ -555,8 +547,7 @@ On error, \var{Nil} is returned.
 \seepl{StrWrite}{TStream.StrWrite}, \seefl{ReadStr}{TStream.ReadStr}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex10.pp}}
-\html{\input{objectex/ex10.tex}}
+\FPCexample{ex10}
 
 
 \begin{function}{TStream.GetPos}
@@ -571,8 +562,7 @@ position in the stream. Otherwise it returns \var{-1}
 \seepl{Seek}{TStream.Seek}, \seefl{GetSize}{TStream.GetSize}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex11.pp}}
-\html{\input{objectex/ex11.tex}}
+\FPCexample{ex11}
 
 
 \begin{function}{TStream.GetSize}
@@ -587,8 +577,7 @@ the size of the stream, otherwise it returns \var{-1}.
 \seepl{Seek}{TStream.Seek}, \seefl{GetPos}{TStream.GetPos}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex12.pp}}
-\html{\input{objectex/ex12.tex}}
+\FPCexample{ex12}
 
 
 \begin{function}{TStream.ReadStr}
@@ -604,8 +593,8 @@ On error (e.g. not enough memory), \var{Nil} is returned.
 \seefl{StrRead}{TStream.StrRead}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex13.pp}}
-\html{\input{objectex/ex13.tex}}
+\FPCexample{ex13}
+
 
 \begin{procedure}{TStream.Open}
 \Declaration
@@ -775,8 +764,8 @@ No checking is done to see if \var{Buf} is large enough to contain
 \seefl{StrRead}{TStream.StrRead}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex18.pp}}
-\html{\input{objectex/ex18.tex}}
+\FPCexample{ex18}
+
 
 \begin{procedure}{TStream.Write}
 \Declaration
@@ -810,8 +799,8 @@ None.
 \seepl{Read}{TStream.Read}, \seepl{Write}{TStream.Write}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex19.pp}}
-\html{\input{objectex/ex19.tex}}
+\FPCexample{ex19}
+
 
 \section{TDosStream}
 \label{se:TDosStream}
@@ -913,8 +902,8 @@ If an error occurs, the stream's status is set to \var{stError} and
 \seep{TStream.Truncate}, \seefl{GetSize}{TStream.GetSize}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex16.pp}}
-\html{\input{objectex/ex16.tex}}
+\FPCexample{ex16}
+
 
 \begin{procedure}{TDosStream.Seek}
 \Declaration
@@ -930,8 +919,8 @@ and the OS error code is stored in \var{ErrorInfo}.
 \seep{TStream.Seek}, \seefl{GetPos}{TStream.GetPos}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex17.pp}}
-\html{\input{objectex/ex17.tex}}
+\FPCexample{ex17}
+
 
 \begin{procedure}{TDosStream.Open}
 \Declaration
@@ -947,8 +936,8 @@ to \var{stOpenError}, and the OS error code is stored in \var{ErrorInfo}
 \seep{TStream.Open}, \seepl{Close}{TDosStream.Close}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex14.pp}}
-\html{\input{objectex/ex14.tex}}
+\FPCexample{ex14}
+
 
 \begin{procedure}{TDosStream.Read}
 \Declaration
@@ -1093,8 +1082,8 @@ see \seepl{Write}{TBufStream.Write} for more info on the errors.
 \seepl{Done}{TBufStream.Done}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex15.pp}}
-\html{\input{objectex/ex15.tex}}
+\FPCexample{ex15}
+
 
 \begin{procedure}{TBufStream.Truncate}
 \Declaration
@@ -1260,8 +1249,8 @@ to \var{stError}
 \seep{TStream.Truncate}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex20.pp}}
-\html{\input{objectex/ex20.tex}}
+\FPCexample{ex20}
+
 
 \begin{procedure}{TMemoryStream.Read}
 \Declaration
@@ -1381,8 +1370,8 @@ Errors returned can be those of \seefl{GetItem}{TCollection.GetItem}.
 \seepl{Done}{TCollection.Done}.
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex22.pp}}
-\html{\input{objectex/ex22.tex}}
+\FPCexample{ex22}
+
 
 \begin{procedure}{TCollection.Done}
 \Declaration
@@ -1414,8 +1403,8 @@ error.
 \seepl{Insert}{TCollection.Insert}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex23.pp}}
-\html{\input{objectex/ex23.tex}}
+\FPCexample{ex23}
+
 
 \begin{function}{TCollection.IndexOf}
 \Declaration
@@ -1427,8 +1416,8 @@ If \var{Item} isn't present in the collection, -1 is returned.
 \SeeAlso
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex24.pp}}
-\html{\input{objectex/ex24.pp}}
+\FPCexample{ex24}
+
 
 \begin{function}{TCollection.GetItem}
 \Declaration
@@ -1456,8 +1445,8 @@ None.
 \seefl{FirstThat}{TCollection.FirstThat}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex25.pp}}
-\html{\input{objectex/ex25.tex}}
+\FPCexample{ex25}
+
 
 \begin{function}{TCollection.FirstThat}
 \Declaration
@@ -1472,8 +1461,8 @@ None.
 \seefl{LastThat}{TCollection.LastThat}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex26.pp}}
-\html{\input{objectex/ex26.tex}}
+\FPCexample{ex26}
+
 
 \begin{procedure}{TCollection.Pack}
 \Declaration
@@ -1489,8 +1478,8 @@ None.
 \seepl{SetLimit}{TCollection.SetLimit}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex26.pp}}
-\html{\input{objectex/ex26.tex}}
+\FPCexample{ex26}
+
 
 \begin{procedure}{TCollection.FreeAll}
 \Declaration
@@ -1504,9 +1493,7 @@ does set \var{Count} to zero.
 \seepl{DeleteAll}{TCollection.DeleteAll}, \seepl{FreeItem}{TCollection.FreeItem}
 \end{procedure}
 
-
-\latex{\lstinputlisting{objectex/ex28.pp}}
-\html{\input{objectex/ex28.tex}}
+\FPCexample{ex28}
 
 
 \begin{procedure}{TCollection.DeleteAll}
@@ -1523,8 +1510,7 @@ None.
 \seepl{FreeAll}{TCollection.FreeAll}, \seepl{Delete}{TCollection.Delete}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex29.pp}}
-\html{\input{objectex/ex29.tex}}
+\FPCexample{ex29}
 
 
 \begin{procedure}{TCollection.Free}
@@ -1540,9 +1526,8 @@ If the \var{Item} is not in the collection, \var{Error} will be called with
 \seepl{FreeItem}{TCollection.FreeItem},
 \end{procedure}
 
+\FPCexample{ex30}
 
-\latex{\lstinputlisting{objectex/ex30.pp}}
-\html{\input{objectex/ex30.tex}}
 
 \begin{procedure}{TCollection.Insert}
 \Declaration
@@ -1572,9 +1557,8 @@ If the \var{Item} is not in the collection, \var{Error} will be called with
 \seepl{AtDelete}{TCollection.AtDelete},\seepl{Free}{TCollection.Free}
 \end{procedure}
 
+\FPCexample{ex31}
 
-\latex{\lstinputlisting{objectex/ex31.pp}}
-\html{\input{objectex/ex31.tex}}
 
 \begin{procedure}{TCollection.AtFree}
 \Declaration
@@ -1589,8 +1573,7 @@ with \var{CoIndexError}.
 \seepl{Free}{TCollection.Free}, \seepl{AtDelete}{TCollection.AtDelete}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex32.pp}}
-\html{\input{objectex/ex32.tex}}
+\FPCexample{ex32}
 
 
 \begin{procedure}{TCollection.FreeItem}
@@ -1622,8 +1605,8 @@ with \var{CoIndexError}.
 \end{procedure}
 
 
-\latex{\lstinputlisting{objectex/ex33.pp}}
-\html{\input{objectex/ex33.tex}}
+\FPCexample{ex33}
+
 
 \begin{procedure}{TCollection.ForEach}
 \Declaration
@@ -1640,9 +1623,7 @@ None.
 \seefl{FirstThat}{TCollection.FirstThat}, \seefl{LastThat}{TCollection.LastThat}
 \end{procedure}
 
-
-\latex{\lstinputlisting{objectex/ex21.pp}}
-\html{\input{objectex/ex21.tex}}
+\FPCexample{ex21}
 
 
 \begin{procedure}{TCollection.SetLimit}
@@ -1704,9 +1685,8 @@ with \var{CoIndexError}. If the collection fails to expand, then
 \seepl{Insert}{TCollection.Insert}
 \end{procedure}
 
+\FPCexample{ex34}
 
-\latex{\lstinputlisting{objectex/ex34.pp}}
-\html{\input{objectex/ex34.tex}}
 
 \begin{procedure}{TCollection.Store}
 \Declaration
@@ -1779,8 +1759,8 @@ TYPE
 In the subsequent examples, the following descendent of
 \var{TSortedCollection} is used:
 
-\latex{\lstinputlisting{objectex/mysortc.pp}}
-\html{\input{objectex/mysortc.tex}}
+\FPCexample{mysortc}
+
 
 \begin{procedure}{TSortedCollection.Init}
 \Declaration
@@ -1883,8 +1863,7 @@ An 'abstract run-time error' will be generated if you call
 \seefl{Search}{TSortedCollection.Search}
 \end{function}
 
-\latex{\lstinputlisting{objectex/mysortc.pp}}
-\html{\input{objectex/mysortc.tex}}
+\FPCexample{mysortc}
 
 
 \begin{function}{TSortedCollection.Search}
@@ -1907,8 +1886,8 @@ None.
 \seefl{IndexOf}{TCollection.IndexOf}.
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex36.pp}}
-\html{\input{objectex/ex36.tex}}
+\FPCexample{ex36}
+
 
 \begin{procedure}{TSortedCollection.Insert}
 \Declaration
@@ -1927,8 +1906,8 @@ None.
 \seepl{AtInsert}{TCollection.AtInsert}
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex35.pp}}
-\html{\input{objectex/ex35.tex}}
+\FPCexample{ex35}
+
 
 \begin{procedure}{TSortedCollection.Store}
 \Declaration
@@ -2003,8 +1982,8 @@ None.
 \seef{TSortedCollection.Compare}
 \end{function}
 
-\latex{\lstinputlisting{objectex/ex37.pp}}
-\html{\input{objectex/ex37.tex}}
+\FPCexample{ex37}
+
 
 \begin{procedure}{TStringCollection.FreeItem}
 \Declaration
@@ -2091,9 +2070,7 @@ None.
 \seef{TSortedCollection.Compare}
 \end{function}
 
-
-\latex{\lstinputlisting{objectex/ex38.pp}}
-\html{\input{objectex/ex38.tex}}
+\FPCexample{ex38}
 
 
 \begin{procedure}{TStrCollection.FreeItem}
@@ -2155,8 +2132,8 @@ strings.
 \SeeAlso
 \end{procedure}
 
-\latex{\lstinputlisting{objectex/ex39.pp}}
-\html{\input{objectex/ex39.tex}}
+\FPCexample{ex39}
+
 
 \section{TResourceCollection}
 \label{se:TResourceCollection}

+ 1 - 1
docs/options.tex

@@ -44,7 +44,7 @@ Short & long & Opt & Explanation \\ \hline
 %
 \end{FPCltable}
 
-\begin{FPCltable}{llll}{Options and directves}{options}
+\begin{FPCltable}{llll}{Options and directives}{options}
 Short & long & Opt & Explanation \\ \hline
          & \dir{APPTYPE} & \copt{W} & Application type (Win32/OS2) \\
          & \dir{ASMMODE} & \copt{R} & Assembler reader modus \\

+ 5 - 0
docs/preamble.hevea

@@ -0,0 +1,5 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Preamble for HTML output using Hevea
+%
+\documentclass{report}
+\input{fpc-hevea.tex}

+ 5 - 2
docs/printer.tex

@@ -19,6 +19,9 @@
 %   Boston, MA 02111-1307, USA. 
 %
 \chapter{The PRINTER unit.}
+\label{ch:printerunit}
+
+\FPCexampledir{printex}
 This chapter describes the PRINTER unit for Free Pascal. It was written for
 \dos by Florian Kl\"ampfl, and it was written for \linux by Micha\"el Van 
 Canneyt, and has been ported to \windows and \ostwo as well. 
@@ -65,5 +68,5 @@ Procedure AssignLst  ( Var F : text; ToFile : string[255]);
 \SeeAlso
 \seem{lpr}{1}
 \end{procedure}
-\latex{\lstinputlisting{printex/printex.pp}}
-\html{\input{printex/printex.tex}}
+
+\FPCexample{printex}

+ 15 - 59
docs/prog.tex

@@ -21,7 +21,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Preamble.
 \input{preamble.inc}
-\latex{%
+\begin{latexonly}
   \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)
            /Title(Programmers' Guide)
@@ -29,7 +29,8 @@
            /Keywords(Free Pascal)
            }
   \fi
-}
+\end{latexonly}
+
 %
 % Settings
 %
@@ -53,7 +54,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Introduction
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{About this document}
+\section{About this document}
 This is the programmer's manual for \fpc.
 
 It describes some of the peculiarities of the \fpc compiler, and provides a
@@ -3495,24 +3496,9 @@ be available on all platforms (either emulated via software
 or directly via hardware).
 
 The memory format of the \var{single} format looks like
-\begin{htmlonly}
-this:
-\fpcaddimg{../pics/single.png}
-\end{htmlonly}
-\begin{latexonly}
-what is shown in \seefig{singleformat}.
-\begin{figure}
-\caption{The single format}
-\label{fig:singleformat}
-\begin{center}
-\ifpdf
-\epsfig{file=pics/single.png}
-\else
-\epsfig{file=pics/single.eps}
-\fi
-\end{center}
-\end{figure}
-\end{latexonly}
+what is shown in \seefig{single}.
+
+\FPCpic{The single format}{}{single}
 
 
 \subsubsection{double}
@@ -3522,24 +3508,9 @@ and its memory structure is the same as the IEEE-754 double
 type.
 
 The memory format of the \var{double} format looks like
-\begin{htmlonly}
-this:
-\fpcaddimg{../pics/double.png}
-\end{htmlonly}
-\begin{latexonly}
-like what is shown in \seefig{doubleformat}.
-\begin{figure}
-\begin{center}
-\caption{The double format}
-\label{fig:doubleformat}
-\ifpdf
-\epsfig{file=pics/double.png}
-\else
-\epsfig{file=pics/double.eps}
-\fi
-\end{center}
-\end{figure}
-\end{latexonly}
+like what is shown in \seefig{double}.
+
+\FPCpic{The double format}{}{double}
 
 
 On processors which do not support co-processor operations (and which have
@@ -3861,7 +3832,7 @@ by default, the fast alignment is used to align the data.
 \label{se:StructuredAlignment}
 
 By default all elements in a structure are aligned to a 2 byte boundary,
-unless the {\var{\$PACKRECORDS} directive or \var{packed} modifier is used
+unless the \var{\$PACKRECORDS} directive or \var{packed} modifier is used
 to align the data in another way. For example a \var{record} or \var{object}
 having a 1 byte element, will have its size rounded up to 2, so the size of
 the structure will actually be 2 bytes.
@@ -5027,7 +4998,7 @@ This can be compiled using the following command:
 \begin{verbatim}
 gcc -o ctest2 ctest2.c -ldl
 \end{verbatim}
-\lstset{language=delphi}
+
 The \var{-ldl} tells gcc that the program needs the \file{libdl.so} library
 to load dynamical libraries.
 
@@ -5263,24 +5234,9 @@ to date or not. Furthermore, it contains all public symbols defined
 for a module.
 
 The general format of the \var{ppu} file format is shown
-\begin{htmlonly}
-here:
-\fpcaddimg{../pics/ppu.png}
-\end{htmlonly}
-\begin{latexonly}
-in \seefig{ppuformat}.
-\begin{figure}
-\caption{The PPU file format}
-\label{fig:ppuformat}
-\begin{center}
-\ifpdf
-\epsfig{file=pics/ppu.png}
-\else
-\epsfig{file=pics/ppu.eps}
-\fi
-\end{center}
-\end{figure}
-\end{latexonly}
+in \seefig{ppu}.
+
+\FPCpic{The PPU file format}{}{ppu}
 
 To read or write the ppufile, the ppu unit \file{ppu.pas} can be used,
 which has an object called tppufile which holds all routines that deal

+ 4 - 2
docs/ref.tex

@@ -21,14 +21,16 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Preamble.
 \input{preamble.inc}
-\latex{%
+\begin{latexonly}
   \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)
            /Title(Standard units Reference Guide)
            /Subject(Free Pascal Reference guide)
            /Keywords(Free Pascal, Language, System Unit)
            }
-\fi}
+  \fi
+\end{latexonly}
+
 %
 % Settings
 %

+ 7 - 6
docs/sockets.tex

@@ -19,6 +19,9 @@
 %   Boston, MA 02111-1307, USA. 
 %
 \chapter{The SOCKETS unit.}
+\label{ch:socketsunit}
+
+\FPCexampledir{sockex}
 This chapter describes the SOCKETS unit for Free Pascal. 
 it was written for \linux by Micha\"el Van Canneyt, and ported to \windows
 by Florian Kl\"ampfl.
@@ -125,8 +128,7 @@ operation.
 \seef{Listen}, \seef{Connect}
 \end{function}
 
-\latex{\lstinputlisting{sockex/socksvr.pp}}
-\html{\input{sockex/socksvr.tex}}
+\FPCexample{socksvr}
 
 \begin{functionl}{Accept}{AltAAccept}
 \Declaration
@@ -234,8 +236,7 @@ On error, \var{-1} is returned and errors are reported in
 \SeeAlso
 \seef{Listen}, \seef{Bind},\seef{Accept}
 \end{function}
-\latex{\lstinputlisting{sockex/sockcli.pp}}
-\html{\input{sockex/sockcli.tex}}
+\FPCexample{sockcli}
 \begin{functionl}{Connect}{AltAConnect}
 \Declaration
 Function Connect (Sock:longint;const addr:string;var SockIn,SockOut:text) : Boolean;
@@ -284,8 +285,8 @@ The errors are those of \seef{Connect}.
 \SeeAlso
 \seef{Connect}
 \end{functionl}
-\latex{\lstinputlisting{sockex/pfinger.pp}}
-\html{\input{sockex/pfinger.tex}}
+\FPCexample{pfinger}
+
 \begin{function}{GetPeerName}
 \Declaration
 Function GetPeerName (Sock:Longint;Var Addr;Var Addrlen:Longint) : Longint;

+ 4 - 0
docs/styles/README

@@ -0,0 +1,4 @@
+These styles will be copied local when building the documentation.
+
+The styles are provided here because not all distributions supply the
+required packages or have outdated versions.

+ 44 - 0
docs/styles/listings.cfg

@@ -0,0 +1,44 @@
+%%
+%% This is file `listings.cfg',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lstdrvrs.dtx  (with options: `config')
+%% 
+%% (w)(c) 1996/1997/1998/1999/2000 Carsten Heinz and/or any other author
+%% listed elsewhere 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.
+%%
+%% This file is completely free and comes without any warranty.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+\def\lstlanguagefiles
+    {lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty}
+\lstset{defaultdialect=[R/3 4.6C]ABAP,
+        defaultdialect=[95]Ada,
+        defaultdialect=[68]Algol,
+        defaultdialect=[Visual]Basic,
+        defaultdialect=[ANSI]C,
+        defaultdialect=[light]Caml,
+        defaultdialect=[1985]Cobol,
+        defaultdialect=[ANSI]C++,
+        defaultdialect=[95]Fortran,
+        defaultdialect=[3.0]Mathematica,
+        defaultdialect=[OMG]OCL,
+        defaultdialect=[Standard]Pascal,
+        defaultdialect=[67]Simula,
+        defaultdialect=[plain]TeX}
+\lstalias[]{TclTk}[tk]{tcl}
+\endinput
+%%
+%% End of file `listings.cfg'.

+ 1546 - 0
docs/styles/listings.sty

@@ -0,0 +1,1546 @@
+%%
+%% This is file `listings.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% listings.dtx  (with options: `kernel')
+%% 
+%% Please read the software license in listings.dtx or listings.dvi.
+%%
+%% (w)(c) 1996/1997/1998/1999/2000 Carsten Heinz and/or any other author
+%% listed elsewhere 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.
+%%
+%% The listings package is free software.
+%%
+%% However, if you distribute the package as part of a commercial
+%% product or if you use the package to prepare a document and sell the
+%% document (books, journals, and so on), I'd like to encourage you to
+%% make a donation to the LaTeX3 fund. The size of this `license fee'
+%% should depend on the value of the package for your product.
+%%
+%% If you use the package to typeset a non-commercial document, please
+%% send me a copy of the document (.dvi, .ps, .pdf, hardcopy, etc.) to
+%% support further development.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{listings}[2000/08/23 v0.21 (Carsten Heinz)]
+\def\lst@version{0.21}
+\def\lst@InputCatcodes{%
+    \makeatletter \catcode`\"12%
+    \catcode`\^^@\active
+    \catcode`\^^I9%
+    \catcode`\^^L9%
+    \catcode`\^^M9%
+    \catcode`\%14%
+    \catcode`\~\active}
+\def\lst@RestoreCatcodes#1{%
+    \ifx\relax#1\else
+        \noexpand\catcode`\noexpand#1\the\catcode`#1\relax
+        \expandafter\lst@RestoreCatcodes
+    \fi}
+\edef\lst@RestoreCatcodes{%
+    \lst@RestoreCatcodes\"\^^I\^^M\~\^^@\relax}
+\lst@InputCatcodes
+\AtEndOfPackage{\lst@RestoreCatcodes}
+\def\@lst{lst}
+\def\lst@IfSubstring#1#2{%
+    \def\lst@temp##1#1##2##3\relax{%
+        \ifx \@empty##2\expandafter\@secondoftwo
+                 \else \expandafter\@firstoftwo \fi}%
+    \expandafter\lst@temp#2#1\@empty\relax}
+\def\lst@IfOneOf#1\relax#2{%
+    \def\lst@temp##1,#1,##2##3\relax{%
+        \ifx \@empty##2\expandafter\@secondoftwo
+                 \else \expandafter\@firstoftwo \fi}%
+    \expandafter\lst@temp\expandafter,#2,#1,\@empty\relax}
+\def\lst@DeleteKeysIn#1#2{%
+    \expandafter\lst@DeleteKeysIn@\expandafter#1#2,\relax,}
+\def\lst@DeleteKeysIn@#1#2,{%
+    \ifx\relax#2\@empty
+        \expandafter\@firstoftwo\expandafter\lst@RemoveCommas
+    \else
+        \ifx\@empty#2\@empty\else
+            \def\lst@temp##1,#2,##2{%
+                ##1%
+                \ifx\@empty##2\@empty\else
+                    \expandafter\lst@temp\expandafter,%
+                \fi ##2}%
+            \edef#1{\expandafter\lst@temp\expandafter,#1,#2,\@empty}%
+        \fi
+    \fi
+    \lst@DeleteKeysIn@#1}
+\def\lst@RemoveCommas#1{\edef#1{\expandafter\lst@RC@#1\@empty}}
+\def\lst@RC@#1{\ifx,#1\expandafter\lst@RC@ \else #1\fi}
+\def\lst@ReplaceIn#1#2{%
+    \expandafter\lst@ReplaceIn@\expandafter#1#2\@empty\@empty}
+\def\lst@ReplaceInArg#1#2{\lst@ReplaceIn@#1#2\@empty\@empty}
+\def\lst@ReplaceIn@#1#2#3{%
+    \ifx\@empty#3\relax\else
+        \def\lst@temp##1#2##2{%
+            \ifx\@empty##2%
+                \lst@lAddTo#1{##1}%
+            \else
+                \lst@lAddTo#1{##1#3}\expandafter\lst@temp
+            \fi ##2}%
+        \let\@tempa#1\let#1\@empty
+        \expandafter\lst@temp\@tempa#2\@empty
+        \expandafter\lst@ReplaceIn@\expandafter#1%
+    \fi}
+\providecommand*\@gobblethree[3]{}
+\def\lst@Swap#1#2{#2#1}
+\def\lst@true{\let\lst@if\iftrue}
+\def\lst@false{\let\lst@if\iffalse}
+\lst@false
+\def\lst@IfNextCharsArg#1{%
+    \def\lst@tofind{#1}\lst@IfNextChars\lst@tofind}
+\def\lst@IfNextChars#1#2#3{%
+    \let\lst@tofind#1\def\@tempa{#2}\def\@tempb{#3}%
+    \let\lst@eaten\@empty \lst@IfNextChars@}
+\def\lst@IfNextChars@{\expandafter\lst@IfNextChars@@\lst@tofind\relax}
+\def\lst@IfNextChars@@#1#2\relax#3{%
+    \def\lst@tofind{#2}\lst@lAddTo\lst@eaten{#3}%
+    \ifx#1#3%
+        \ifx\lst@tofind\@empty
+            \let\lst@next\@tempa
+        \else
+            \let\lst@next\lst@IfNextChars@
+        \fi
+        \expandafter\lst@next
+    \else
+        \expandafter\@tempb
+    \fi}
+\def\lst@IfNextCharActive#1#2#3{%
+    \begingroup \lccode`\~=`#3\lowercase{\endgroup
+    \ifx~}#3%
+        \def\lst@next{#1}%
+    \else
+        \def\lst@next{#2}%
+    \fi \lst@next #3}
+\def\lst@for#1\do#2{%
+    \def\lst@forbody##1{#2}%
+    \@for\lst@forvar:=#1\do
+    {\expandafter\lst@forbody\expandafter{\lst@forvar}}}
+\def\lst@MakeActive#1{%
+    \let\lst@temp\@empty \lst@MakeActive@#1%
+    \relax\relax\relax\relax\relax\relax\relax\relax\relax}
+\begingroup
+\catcode`\^^@=\active \catcode`\^^A=\active \catcode`\^^B=\active
+\catcode`\^^C=\active \catcode`\^^D=\active \catcode`\^^E=\active
+\catcode`\^^F=\active \catcode`\^^G=\active \catcode`\^^H=\active
+\gdef\lst@MakeActive@#1#2#3#4#5#6#7#8#9{\let\lst@next\relax
+    \ifx#1\relax
+    \else \lccode`\^^@=`#1%
+    \ifx#2\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@}}%
+    \else \lccode`\^^A=`#2%
+    \ifx#3\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A}}%
+    \else \lccode`\^^B=`#3%
+    \ifx#4\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B}}%
+    \else \lccode`\^^C=`#4%
+    \ifx#5\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C}}%
+    \else \lccode`\^^D=`#5%
+    \ifx#6\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D}}%
+    \else \lccode`\^^E=`#6%
+    \ifx#7\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E}}%
+    \else \lccode`\^^F=`#7%
+    \ifx#8\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F}}%
+    \else \lccode`\^^G=`#8%
+    \ifx#9\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F^^G}}%
+    \else \lccode`\^^H=`#9%
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F^^G^^H}}%
+        \let\lst@next\lst@MakeActive@
+    \fi \fi \fi \fi \fi \fi \fi \fi \fi
+    \lst@next}
+\endgroup
+\def\lst@DefActive#1#2{\lst@MakeActive{#2}\let#1\lst@temp}
+\def\lst@DefOther#1#2{%
+    \begingroup \def#1{#2}\escapechar\m@ne \expandafter\endgroup
+    \expandafter\lst@DefOther@\meaning#1\relax#1}
+\def\lst@DefOther@#1->#2\relax#3{\edef#3{\zap@space#2 \@empty}}
+\def\lst@InsideConvert#1{\lst@InsideConvert@#1 \@empty}
+\begingroup \lccode`\~=`\ \relax \lowercase{%
+\gdef\lst@InsideConvert@#1 #2{%
+    \lst@MakeActive{#1}%
+    \ifx\@empty#2%
+        \lst@lExtend\lst@arg{\lst@temp}%
+    \else
+        \lst@lExtend\lst@arg{\lst@temp~}%
+        \expandafter\lst@InsideConvert@
+    \fi #2}
+}\endgroup
+\gdef\lst@FVConvert{\futurelet\@let@token\lst@FVConvert@@}
+\gdef\lst@FVConvert@@{%
+    \ifcat\noexpand\@let@token\bgroup \expandafter\lst@FVConvertArg
+                                \else \expandafter\lst@FVConvert@ \fi}
+\gdef\lst@FVConvertArg#1{%
+    {\let\lst@arg\@empty
+     \lst@FVConvert#1\@nil
+     \global\let\@gtempa\lst@arg}%
+     \lst@if
+         \lst@lExtend\lst@arg{\expandafter{\@gtempa\lst@PrintToken}}%
+     \else
+         \lst@lExtend\lst@arg{\expandafter{\@gtempa}}%
+     \fi
+     \lst@FVConvert}
+\gdef\lst@FVConvert@#1{%
+    \ifx \@nil#1\else
+        \lst@if
+            \if\relax\noexpand#1%
+                \lst@lAddTo\lst@arg{\lst@UseLostSpace\lst@PrintToken#1}%
+            \else
+                \lccode`\~=`#1\lowercase{\lst@lAddTo\lst@arg~}%
+            \fi
+        \else
+            \lccode`\~=`#1\lowercase{\lst@lAddTo\lst@arg~}%
+        \fi
+        \expandafter\lst@FVConvert
+    \fi}
+\def\lst@Require#1#2#3#4#5{%
+    \begingroup
+    \aftergroup\lst@true
+    \ifx\@empty#3\@empty\else
+        \def\lst@prefix{#2}\let\lst@require\@empty
+        \edef\lst@temp{\expandafter\zap@space#3 \@empty}%
+        \lst@for\lst@temp\do{%
+          \ifx\@empty##1\@empty\else \lstKV@OptArg[]{##1}{%
+            #4[####1]{####2}%
+            \@ifundefined{\@lst\lst@prefix @\lst@malias $\lst@oalias}%
+            {\edef\lst@require{\lst@require,\lst@malias $\lst@oalias}}%
+            {}}%
+          \fi}%
+        \global\let\lst@loadaspects\@empty
+        \lst@InputCatcodes
+        \ifx\lst@require\@empty\else
+            \lst@for{#5}\do{%
+                \ifx\lst@require\@empty\else
+                    \InputIfFileExists{##1}{}{}%
+                \fi}%
+        \fi
+        \ifx\lst@require\@empty\else
+            \PackageError{Listings}{Couldn't load requested #1}%
+            {The following #1s weren't loadable:^^J\@spaces
+             \lst@require^^JThis may cause errors in the sequel.}%
+            \aftergroup\lst@false
+        \fi
+        \ifx\lst@loadaspects\@empty\else
+            \lst@RequireAspects\lst@loadaspects
+        \fi
+    \fi
+    \endgroup}
+\def\lst@IfRequired[#1]#2{%
+    \lst@NormedDef\lst@temp{[#1]#2}%
+    \expandafter\lst@IfRequired@\lst@temp\relax}
+\def\lst@IfRequired@[#1]#2\relax#3{%
+    \lst@IfOneOf #2$#1\relax\lst@require
+        {\lst@DeleteKeysIn@\lst@require#2$#1,\relax,%
+         \global\expandafter\let
+             \csname\@lst\lst@prefix @#2$#1\endcsname\@empty
+         #3}}
+\let\lst@require\@empty
+\def\lst@NoAlias[#1]#2{%
+    \lst@NormedDef\lst@oalias{#1}\lst@NormedDef\lst@malias{#2}}
+\gdef\lst@LAS#1#2#3#4#5#6#7{%
+    \lst@Require{#1}{#2}{#3}#4#5%
+    #4#3%
+    \@ifundefined{lst#2@\lst@malias$\lst@oalias}%
+        {\PackageError{Listings}%
+         {#1 \ifx\@empty\lst@oalias\else \lst@oalias\space of \fi
+          \lst@malias\space undefined}%
+         {The #1 is not loadable or just mispellt.^^J%
+          Type <RETURN> to proceed without changing the #1.}}%
+        {#6\csname lst#2@\lst@malias $\lst@oalias\endcsname #7}}
+\def\lst@RequireAspects#1{%
+    \lst@Require{aspect}{asp}{#1}\lst@NoAlias\lstaspectfiles}
+\let\lstloadaspects\lst@RequireAspects
+\@ifundefined{lstaspectfiles}
+    {\newcommand\lstaspectfiles{lstmisc0.sty,lstmisc.sty}}{}
+\gdef\lst@DefDriver#1#2#3#4{%
+    \@ifnextchar[{\lst@DefDriver@{#1}{#2}#3#4}%
+                 {\lst@DefDriver@{#1}{#2}#3#4[]}}
+\gdef\lst@DefDriver@#1#2#3#4[#5]#6{%
+    \def\lst@name{#1}\let\lst@if#4%
+    \lst@NormedDef\lst@driver{\@lst#2@#6$#5}%
+    \lst@IfRequired[#5]{#6}{\begingroup \lst@true}%
+                           {\begingroup}%
+    \lst@setcatcodes
+    \@ifnextchar[{\lst@XDefDriver{#1}#3}{\lst@DefDriver@@#3}}
+\gdef\lst@DefDriver@@#1#2{%
+    \lst@if
+        \global\@namedef{\lst@driver}{#1{#2}}%
+    \fi
+    \endgroup
+    \@ifnextchar[\lst@XXDefDriver\@empty}
+\gdef\lst@XXDefDriver[#1]{%
+    \ifx\@empty#1\@empty\else
+        \lst@if
+            \lstloadaspects{#1}%
+        \else
+            \@ifundefined{\lst@driver}{}%
+            {\xdef\lst@loadaspects{\lst@loadaspects,#1}}%
+        \fi
+    \fi}
+\gdef\lst@XDefDriver#1#2[#3]#4#5{\lst@DefDriver@@#2{also#1=[#3]#4,#5}}
+\let\lst@UserCommand\gdef
+\newcommand*\lst@BeginAspect[2][]{%
+    \def\lst@curraspect{#2}%
+    \ifx \lst@curraspect\@empty
+        \expandafter\lst@GobbleAspect
+    \else
+        \let\lst@next\@empty
+        \lst@IfRequired[]{#2}%
+            {\lst@RequireAspects{#1}%
+             \lst@if\else \let\lst@next\lst@GobbleAspect \fi}%
+            {\let\lst@next\lst@GobbleAspect}%
+        \expandafter\lst@next
+    \fi}
+\def\lst@EndAspect{%
+    \csname\@lst patch@\lst@curraspect\endcsname
+    \let\lst@curraspect\@empty}
+\long\def\lst@GobbleAspect#1\lst@EndAspect{\let\lst@curraspect\@empty}
+\def\lst@Key#1#2{%
+    \@ifnextchar[{\lstKV@def{#1}{#2}}%
+                 {\def\lst@temp{\lst@Key@{#1}{#2}}
+                  \afterassignment\lst@temp
+                  \global\@namedef{KV@\@lst @#1}####1}}
+\def\lstKV@def#1#2[#3]{%
+    \global\@namedef{KV@\@lst @#1@default\expandafter}\expandafter
+        {\csname KV@\@lst @#1\endcsname{#3}}%
+    \def\lst@temp{\lst@Key@{#1}{#2}}\afterassignment\lst@temp
+    \global\@namedef{KV@\@lst @#1}##1}
+\def\lst@Key@#1#2{%
+    \ifx\relax#2\@empty\else
+        \begingroup \globaldefs\@ne
+        \csname KV@\@lst @#1\endcsname{#2}%
+        \endgroup
+    \fi}
+\def\lst@UseHook#1{\csname\@lst hk@#1\endcsname}
+\def\lst@AddToHook{\lst@ATH@\iffalse\lst@AddTo}
+\def\lst@AddToHookExe{\lst@ATH@\iftrue\lst@AddTo}
+\def\lst@AddToHookAtTop{\lst@ATH@\iffalse\lst@AddToAtTop}
+\long\def\lst@ATH@#1#2#3#4{%
+    \@ifundefined{\@lst hk@#3}{%
+        \expandafter\gdef\csname\@lst hk@#3\endcsname{}}{}%
+    \expandafter#2\csname\@lst hk@#3\endcsname{#4}%
+    \def\lst@temp{#4}%
+    #1% \iftrue|false
+        \begingroup \globaldefs\@ne \lst@temp \endgroup
+    \fi}
+\long\def\lst@AddTo#1#2{%
+    \expandafter\gdef\expandafter#1\expandafter{#1#2}}
+\def\lst@AddToAtTop#1#2{\def\lst@temp{#2}%
+    \expandafter\expandafter\expandafter\gdef
+    \expandafter\expandafter\expandafter#1%
+    \expandafter\expandafter\expandafter{\expandafter\lst@temp#1}}
+\def\lst@lAddTo#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
+\def\lst@Extend#1#2{%
+    \expandafter\lst@AddTo\expandafter#1\expandafter{#2}}
+\def\lst@lExtend#1#2{%
+    \expandafter\lst@lAddTo\expandafter#1\expandafter{#2}}
+\RequirePackage{keyval}[1997/11/10]
+\def\lstKV@TwoArg#1#2{\gdef\@gtempa##1##2{#2}\@gtempa#1{}{}}
+\def\lstKV@ThreeArg#1#2{\gdef\@gtempa##1##2##3{#2}\@gtempa#1{}{}{}}
+\def\lstKV@FourArg#1#2{\gdef\@gtempa##1##2##3##4{#2}\@gtempa#1{}{}{}{}}
+\def\lstKV@OptArg[#1]#2#3{%
+    \gdef\@gtempa[##1]##2{#3}\lstKV@OptArg@{#1}#2\@}
+\def\lstKV@OptArg@#1{\@ifnextchar[\lstKV@OptArg@@{\lstKV@OptArg@@[#1]}}
+\def\lstKV@OptArg@@[#1]#2\@{\@gtempa[#1]{#2}}
+\def\lstKV@XOptArg[#1]#2#3{%
+    \global\let\@gtempa#3\lstKV@OptArg@{#1}#2\@}
+\def\lstKV@CSTwoArg#1#2{%
+    \gdef\@gtempa##1,##2,##3\relax{#2}%
+    \@gtempa#1,,\relax}
+\def\lstKV@SetIf#1{\lstKV@SetIf@#1\relax}
+\def\lstKV@SetIf@#1#2\relax#3{\lowercase{%
+    \expandafter\let\expandafter#3%
+        \csname if\ifx #1t}true\else false\fi\endcsname}
+\lst@UserCommand\lstset{\begingroup \lst@setcatcodes \lstset@}
+\def\lstset@#1{\endgroup \ifx\@empty#1\@empty\else\setkeys{lst}{#1}\fi}
+\def\lst@setcatcodes{\makeatletter \catcode`\"=12\relax}
+\def\lst@NewMode#1{%
+    \ifx\@undefined#1%
+        \lst@mode\lst@newmode\relax \advance\lst@mode\@ne
+        \xdef\lst@newmode{\the\lst@mode}%
+        \global\chardef#1=\lst@mode
+        \lst@mode\lst@nomode
+    \fi}
+\newcount\lst@mode
+\def\lst@newmode{\m@ne}% init
+\lst@NewMode\lst@nomode % init (of \lst@mode :-)
+\def\lst@UseDynamicMode{%
+    \@tempcnta\lst@dynamicmode\relax \advance\@tempcnta\@ne
+    \edef\lst@dynamicmode{\the\@tempcnta}%
+    \expandafter\lst@Swap\expandafter{\expandafter{\lst@dynamicmode}}}
+\lst@AddToHook{InitVars}{\let\lst@dynamicmode\lst@newmode}
+\def\lst@modetrue{\let\lst@ifmode\iftrue \lsthk@ModeTrue}
+\let\lst@ifmode\iffalse % init
+\lst@AddToHook{ModeTrue}{}% init
+\def\lst@EnterMode#1#2{%
+    \bgroup \lst@mode=#1\relax #2%
+    \lst@iffontadjust \lsthk@FontAdjust \fi
+    \lst@lAddTo\lst@entermodes{\lst@EnterMode{#1}{#2}}}
+\lst@AddToHook{InitVars}{\let\lst@entermodes\@empty}
+\def\lst@LeaveMode{%
+    \ifnum\lst@mode=\lst@nomode\else
+        \egroup \expandafter\lsthk@EndGroup
+    \fi}
+\lst@AddToHook{EndGroup}{}% init
+\def\lst@InterruptModes{%
+    \lst@Extend\lst@modestack{\expandafter{\lst@entermodes}}%
+    \lst@LeaveAllModes}
+\lst@AddToHook{InitVars}{\global\let\lst@modestack\@empty}
+\def\lst@ReenterModes{%
+    \ifx\lst@modestack\@empty\else
+        \lst@LeaveAllModes
+        \global\let\@gtempa\lst@modestack
+        \global\let\lst@modestack\@empty
+        \expandafter\lst@ReenterModes@\@gtempa\relax
+    \fi}
+\def\lst@ReenterModes@#1#2{%
+    \ifx\relax#2\@empty
+        \gdef\@gtempa##1{#1}%
+        \expandafter\@gtempa
+    \else
+        \lst@AddTo\lst@modestack{{#1}}%
+        \expandafter\lst@ReenterModes@
+    \fi
+    {#2}}
+\def\lst@LeaveAllModes{%
+    \ifnum\lst@mode=\lst@nomode
+        \expandafter\lsthk@EndGroup
+    \else
+        \expandafter\egroup\expandafter\lst@LeaveAllModes
+    \fi}
+\lst@AddToHook{ExitVars}{\lst@LeaveAllModes}
+\lst@NewMode\lst@Pmode
+\lst@NewMode\lst@GPmode
+\def\lst@NormedDef#1#2{\lowercase{\edef#1{\zap@space#2 \@empty}}}
+\def\lst@NormedNameDef#1#2{%
+    \lowercase{\edef\lst@temp{\zap@space#1 \@empty}%
+    \expandafter\xdef\csname\lst@temp\endcsname{\zap@space#2 \@empty}}}
+\def\lst@GetFreeMacro#1{%
+    \@tempcnta\z@ \def\lst@freemacro{#1\the\@tempcnta}%
+    \lst@GFM@}
+\def\lst@GFM@{%
+    \expandafter\ifx \csname\lst@freemacro\endcsname \relax
+        \edef\lst@freemacro{\csname\lst@freemacro\endcsname}%
+    \else
+        \advance\@tempcnta\@ne
+        \expandafter\lst@GFM@
+    \fi}
+\lst@AddToAtTop{\try@load@fontshape}{\def\space{ }}
+\newtoks\lst@token \newcount\lst@length
+\lst@AddToHook{InitVarsBOL}{\lst@token{}\lst@length\z@}
+\lst@AddToHook{EndGroup}{\lst@token{}\lst@length\z@}
+\lst@AddToHook{InitVarsBOL}{\let\lst@lastother\@empty}
+\def\lst@Append#1{\advance\lst@length\@ne
+    \expandafter\lst@token\expandafter{\the\lst@token#1}}
+\def\lst@AppendOther{\futurelet\lst@lastother\lst@Append}
+\def\lst@lettertrue{\let\lst@ifletter\iftrue}
+\def\lst@letterfalse{\let\lst@ifletter\iffalse}
+\lst@AddToHook{InitVars}{\lst@letterfalse}
+\def\lst@PrintToken{%
+    \lst@ifletter
+        \lst@Output\lst@letterfalse
+    \else
+        \lst@OutputOther \let\lst@lastother\@empty
+    \fi}
+\def\lst@whitespacetrue{\global\let\lst@ifwhitespace\iftrue}
+\def\lst@whitespacefalse{\global\let\lst@ifwhitespace\iffalse}
+\lst@AddToHook{InitVarsBOL}{\lst@whitespacetrue}
+\def\lst@ProcessLetter{%
+    \lst@ifletter\else \lst@OutputOther\lst@lettertrue \fi
+    \lst@whitespacefalse \lst@Append}
+\def\lst@ProcessOther{%
+    \lst@ifletter \lst@Output\lst@letterfalse \fi
+    \lst@whitespacefalse \lst@AppendOther}
+\def\lst@ProcessDigit{%
+    \lst@whitespacefalse
+    \lst@ifletter \expandafter\lst@Append
+            \else \expandafter\lst@AppendOther\fi}
+\lst@Key{tabsize}{8}
+    {\ifnum#1>\z@ \def\lst@tabsize{#1}\else
+         \PackageError{Listings}{Strict positive integer expected}%
+         {You can't use `#1' as tabulator size.^^J%
+          Type <RETURN> to forget it and to proceed.}%
+     \fi}
+\def\lst@ProcessTabulator{%
+    \lst@PrintToken \lst@letterfalse
+    \global\advance\lst@column -\lst@pos
+    \@whilenum \lst@pos<\@ne \do
+        {\global\advance\lst@pos\lst@tabsize}%
+    \lst@length\lst@pos
+    \lst@whitespacetrue
+    \lst@PreGotoTabStop}
+\def\lst@PreGotoTabStop{%
+    \lst@ifvisibletabs
+        \lst@TrackNewLines
+        \setbox\@tempboxa\hbox to\lst@length\lst@width
+            {{\lst@currstyle{\hss\lst@tab}}}%
+        \lst@CalcLostSpaceAndOutput
+    \else
+        \lst@ifkeepspaces
+            \@tempcnta\lst@length \lst@length\z@
+            \@whilenum \@tempcnta>\z@ \do
+                {\lst@AppendOther\lst@outputspace
+                 \advance\@tempcnta\m@ne}%
+            \lst@OutputOther
+        \else
+            \lst@GotoTabStop
+        \fi
+    \fi
+    \lst@length\z@ \global\lst@pos\z@}
+\lst@Key{visibletabs}f[t]{\lstKV@SetIf{#1}\lst@ifvisibletabs}
+\lst@Key{tab}{\kern.06em\hbox{\vrule\@height.3ex}%
+              \hrulefill\hbox{\vrule\@height.3ex}}
+    {\def\lst@tab{#1}}
+\def\lst@outputspace{\ }
+\def\lst@visiblespace{\lst@ttfamily{\char32}\textvisiblespace}
+\lst@Key{visiblespaces}{false}[t]{\lstKV@SetIf{#1}\lst@ifvisiblespaces}
+\lst@Key{keepspaces}{false}[t]{\lstKV@SetIf{#1}\lst@ifkeepspaces}
+\lst@AddToHook{Init}
+    {\lst@ifvisiblespaces
+         \let\lst@outputspace\lst@visiblespace
+         \lst@keepspacestrue
+     \fi}
+\def\lst@keepspacestrue{\let\lst@ifkeepspaces\iftrue}
+\def\lst@ProcessSpace{%
+    \lst@ifletter
+        \lst@Output\lst@letterfalse
+        \lst@AppendOther\lst@outputspace
+    \else \lst@ifkeepspaces
+        \lst@AppendOther\lst@outputspace
+    \else \ifx\lst@newlines\@empty
+        \lst@AppendSpecialSpace
+    \else \ifnum\lst@length=\z@
+            \global\advance\lst@lostspace\lst@width
+            \global\advance\lst@pos\m@ne
+        \else
+            \lst@AppendSpecialSpace
+        \fi
+    \fi \fi \fi
+    \lst@whitespacetrue}
+\def\lst@AppendSpecialSpace{%
+    \lst@ifwhitespace
+        \lst@OutputOther
+        \global\advance\lst@lostspace\lst@width
+        \global\advance\lst@pos\m@ne
+    \else
+        \lst@AppendOther\lst@outputspace
+    \fi}
+\lst@Key{formfeed}{\bigbreak}{\def\lst@formfeed{#1}}
+\def\lst@ProcessFormFeed{%
+    \lst@PrintToken
+    \ifx\lst@newlines\@empty
+        \lst@EOLUpdate \lst@formfeed
+    \else
+        \lst@lAddTo\lst@newlines{\lst@EOLUpdate \lst@formfeed}%
+    \fi
+    \lst@whitespacetrue}
+\def\lst@Def#1{\lccode`\~=#1\lowercase{\def~}}
+\def\lst@Let#1{\lccode`\~=#1\lowercase{\let~}}
+\def\lst@SaveDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~}}
+\def\lst@DefSaveDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~\def~}}
+\def\lst@LetSaveDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~\let~}}
+\def\lst@SelectStdCharTable{%
+    \lst@Let{9}\lst@ProcessTabulator
+    \lst@Let{12}\lst@ProcessFormFeed
+    \lst@Let{32}\lst@ProcessSpace}
+\def\lst@CCUse#1#2{%
+    \ifnum#2=\z@
+        \expandafter\@gobbletwo
+    \else
+        \lccode`\~=#2\lccode`\/=#2\lowercase{\lst@CCUse@~{#1/}}%
+    \fi
+    \lst@CCUse#1}
+\def\lst@CCUse@#1#2{\lst@lAddTo\lst@SelectStdCharTable{\def#1{#2}}}
+\lst@CCUse \lst@ProcessOther
+    {"21}{"22}{"27}{"28}{"29}{"2B}{"2C}{"2E}{"2F}
+    {"3A}{"3B}{"3D}{"3F}{"5B}{"5D}{"60}
+    \z@
+\lst@CCUse \lst@ProcessDigit
+    {"30}{"31}{"32}{"33}{"34}{"35}{"36}{"37}{"38}{"39}
+    \z@
+\lst@CCUse \lst@ProcessLetter
+    {"40}{"41}{"42}{"43}{"44}{"45}{"46}{"47}
+    {"48}{"49}{"4A}{"4B}{"4C}{"4D}{"4E}{"4F}
+    {"50}{"51}{"52}{"53}{"54}{"55}{"56}{"57}
+    {"58}{"59}{"5A}
+         {"61}{"62}{"63}{"64}{"65}{"66}{"67}
+    {"68}{"69}{"6A}{"6B}{"6C}{"6D}{"6E}{"6F}
+    {"70}{"71}{"72}{"73}{"74}{"75}{"76}{"77}
+    {"78}{"79}{"7A}
+    \z@
+\def\lst@CCUseMacro#1#2#3{%
+    \ifnum#2=\z@ \else
+        \begingroup\lccode`\~=#2\relax \lccode`\/=#2\relax
+        \lowercase{\endgroup\expandafter\lst@CCUseMacro@
+            \csname lstum@/\expandafter\endcsname
+            \csname lstum@/@\endcsname /~}#1{#3}%
+        \expandafter\lst@CCUseMacro
+    \fi}
+\def\lst@CCUseMacro@#1#2#3#4#5#6{%
+    \lst@lAddTo\lst@SelectStdCharTable{\def#4{#5#1}}%
+    \def#1{\lst@UM#3}%
+    \def#2{#6}}
+\def\lst@UM#1{\csname lstum@#1@\endcsname}
+\lst@CCUseMacro
+    \lst@ProcessOther {"23}\#
+    \lst@ProcessLetter{"24}\textdollar
+    \lst@ProcessOther {"25}\%
+    \lst@ProcessOther {"26}\&
+    \lst@ProcessOther {"2A}{\lst@ttfamily*\textasteriskcentered}
+    \lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{$-$}}
+    \lst@ProcessOther {"3C}{\lst@ttfamily<\textless}
+    \lst@ProcessOther {"3E}{\lst@ttfamily>\textgreater}
+    \lst@ProcessOther {"5C}{\lst@ttfamily{\char92}\textbackslash}
+    \lst@ProcessOther {"5E}\textasciicircum
+    \lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}\textunderscore}
+    \lst@ProcessOther {"7B}{\lst@ttfamily{\char123}\textbraceleft}
+    \lst@ProcessOther {"7C}{\lst@ttfamily|\textbar}
+    \lst@ProcessOther {"7D}{\lst@ttfamily{\char125}\textbraceright}
+    \lst@ProcessOther {"7E}\textasciitilde
+    \lst@ProcessOther {"7F}-
+    \@empty\z@\@empty
+\def\lst@ttfamily#1#2{\ifx\f@family\ttdefault#1\relax\else#2\fi}
+\lst@AddToHook{Init}{\edef\ttdefault{\ttdefault}}
+\def\lst@SaveOutputDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{%
+    \def\lst@temp##1\def~##2##3\relax}{%
+        \global\expandafter\let\expandafter#2\@gobble##2\relax}%
+    \expandafter\lst@temp\lst@SelectStdCharTable\relax
+    \endgroup}
+\lst@SaveOutputDef{"5C}\lstum@backslash
+\def\lst@activecharstrue{\let\lst@ifactivechars\iftrue}
+\def\lst@activecharsfalse{\let\lst@ifactivechars\iffalse}
+\lst@activecharstrue
+\def\lst@SelectCharTable{%
+    \lst@SelectStdCharTable
+    \lst@ifec \lst@DefEC \fi
+    \lst@ifactivechars
+        \catcode9\active \catcode12\active \catcode13\active
+        \@tempcnta=32\relax
+        \@whilenum\@tempcnta<128\do
+            {\catcode\@tempcnta\active\advance\@tempcnta\@ne}%
+    \fi
+    \lsthk@SelectCharTable
+    \lst@DeveloperSCT
+    \ifx\lst@Backslash\relax\else
+        \lst@LetSaveDef{"5C}\lsts@backslash\lst@Backslash
+    \fi}
+\lst@Key{SelectCharTable}{}{\def\lst@DeveloperSCT{#1}}
+\lst@Key{MoreSelectCharTable}\relax{\lst@lAddTo\lst@DeveloperSCT{#1}}
+\lst@AddToHook{SetLanguage}{\let\lst@DeveloperSCT\@empty}
+\lst@AddToHook{Init}
+    {\let\lsts@nfss@catcodes\nfss@catcodes
+     \let\nfss@catcodes\lst@nfss@catcodes}
+\def\lst@nfss@catcodes{%
+    \lst@makeletter
+        ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\relax
+    \@makeother 0\@makeother 1\@makeother 2\@makeother 3\@makeother 4%
+    \@makeother 5\@makeother 6\@makeother 7\@makeother 8\@makeother 9%
+    \lsts@nfss@catcodes}
+\def\lst@makeletter#1{%
+    \ifx\relax#1\else\catcode`#111\relax \expandafter\lst@makeletter\fi}
+\lst@AddToHook{Init}
+    {\edef\lst@OldOutput{\the\output}%
+     \output{\begingroup \lsts@nfss@catcodes
+             \let\lst@ProcessLetter\@empty
+             \let\lst@ProcessOther\@empty
+             \let\lst@ProcessDigit\@empty
+             \lst@OldOutput
+             \endgroup}}
+\lst@Key{alsoletter}\relax{\lst@DefOther\lst@arg{#1}%
+    \expandafter\lstalso@\lst@also \lst@arg\@empty\@empty}
+\lst@Key{alsodigit}\relax{\lst@DefOther\lst@arg{#1}%
+    \expandafter\lstalso@\lst@also \@empty\lst@arg\@empty}
+\lst@Key{alsoother}\relax{\lst@DefOther\lst@arg{#1}%
+    \expandafter\lstalso@\lst@also \@empty\@empty\lst@arg}
+\def\lstalso@#1#2#3#4#5#6{%
+    \ifx#4\@empty \ifx#5\@empty \ifx#6\@empty \else
+        \edef\lst@also{{#1}{#2}{#6}}%
+    \fi\else
+        \edef\lst@also{{#1}{#5}{#3}}%
+    \fi\else
+        \edef\lst@also{{#4}{#2}{#3}}%
+    \fi}
+\lst@AddToHook{SetLanguage}{\def\lst@also{{}{}{}}}
+\def\lst@UseBasicClasses{\expandafter\lst@UBC@\lst@also}
+\def\lst@UBC@#1#2#3#4#5#6{\def\lst@also{{#1#4}{#2#5}{#3#6}}}
+\lst@AddToHook{SelectCharTable}
+    {\expandafter\lst@ChangeBasicClasses\lst@also}
+\def\lst@ChangeBasicClasses#1#2#3{%
+    \lst@CBC@\lst@ProcessOther#3\relax
+    \lst@CBC@\lst@ProcessDigit#2\relax
+    \lst@CBC@\lst@ProcessLetter#1\relax}
+\def\lst@CBC@#1#2{%
+    \ifx\relax#2\expandafter\@gobbletwo \else
+        \lccode`\~=`#2\lowercase
+        {\edef~{\noexpand#1\expandafter\lst@CBC@@~}}%
+    \fi
+    \lst@CBC@#1}
+\def\lst@CBC@@#1#2{\noexpand#2}
+\lst@Key{extendedchars}{false}[t]{\lstKV@SetIf{#1}\lst@ifec}
+\def\lst@DefEC{%
+    \lst@CCECUse \lst@ProcessLetter
+      ^^80^^81^^82^^83^^84^^85^^86^^87^^88^^89^^8a^^8b^^8c^^8d^^8e^^8f%
+      ^^90^^91^^92^^93^^94^^95^^96^^97^^98^^99^^9a^^9b^^9c^^9d^^9e^^9f%
+      ^^a0^^a1^^a2^^a3^^a4^^a5^^a6^^a7^^a8^^a9^^aa^^ab^^ac^^ad^^ae^^af%
+      ^^b0^^b1^^b2^^b3^^b4^^b5^^b6^^b7^^b8^^b9^^ba^^bb^^bc^^bd^^be^^bf%
+      ^^c0^^c1^^c2^^c3^^c4^^c5^^c6^^c7^^c8^^c9^^ca^^cb^^cc^^cd^^ce^^cf%
+      ^^d0^^d1^^d2^^d3^^d4^^d5^^d6^^d7^^d8^^d9^^da^^db^^dc^^dd^^de^^df%
+      ^^e0^^e1^^e2^^e3^^e4^^e5^^e6^^e7^^e8^^e9^^ea^^eb^^ec^^ed^^ee^^ef%
+      ^^f0^^f1^^f2^^f3^^f4^^f5^^f6^^f7^^f8^^f9^^fa^^fb^^fc^^fd^^fe^^ff%
+      ^^00}
+\def\lst@CCECUse#1#2{%
+    \ifnum`#2=\z@
+        \expandafter\@gobbletwo
+    \else
+        \ifnum\catcode`#2=\active
+            \lccode`\~=`#2\lccode`\/=`#2\lowercase{\lst@CCECUse@#1~/}%
+        \else
+            \lst@ifactivechars \catcode`#2=\active \fi
+            \lccode`\~=`#2\lccode`\/=`#2\lowercase{\def~{#1/}}%
+        \fi
+    \fi
+    \lst@CCECUse#1}
+\def\lst@CCECUse@#1#2#3{%
+   \expandafter\def\csname lst@EC#3\endcsname{\lst@UM#3}%
+   \expandafter\let\csname lstum@#3@\endcsname #2%
+   \edef#2{\noexpand#1\expandafter\noexpand\csname lst@EC#3\endcsname}}
+\def\lst@SAC[#1]#2#3#4#5#6#7#8#9{%
+    \ifx #9\@empty \let#7\@empty \fi
+    \ifx\@empty#2\@empty\else
+        \lst@IfOneOf#1\relax#5%
+        {\lst@IfOneOf#1\relax#6%
+         {\@ifundefined{\@lst @#3@#1}%
+             {\lst@lExtend#7{\expandafter\lst@UseDynamicMode
+                             \csname\@lst @#3DM@#1\endcsname}}%
+             {\lst@lExtend#7{\csname\@lst @#3@#1\endcsname}}}%
+         {\lst@lExtend#7{\expandafter\lst@DefineSAC
+                         \csname\@lst @Process#3@#1\endcsname #4}}%
+         \lst@false \let\lst@arg\@empty
+         \@ifnextchar[\lst@SAC@ #8%
+         #2\@nil
+         \lst@lExtend#7{\lst@arg\@empty}}%
+        {\PackageError{Listings}{Illegal type `#1'}{#3 types are #5.}}%
+     \fi}
+\def\lst@SAC@[#1]#2{\def\lst@arg{[#1]}\reserved@b}
+\def\lst@SACDelete[#1]#2#3#4#5#6#7{%
+    \lst@IfOneOf#1\relax#6%
+    {\@ifundefined{\@lst @#3@#1}%
+        {\edef\lst@temp{\noexpand\lst@UseDynamicMode\expandafter
+                        \noexpand\csname\@lst @#3DM@#1\endcsname}}%
+        {\edef\lst@temp{\expandafter
+                        \noexpand\csname\@lst @#3@#1\endcsname}}}%
+    {\edef\lst@temp{\noexpand\lst@DefineSAC\expandafter\noexpand
+                    \csname\@lst @Process#3@#1\endcsname #4}}%
+    \expandafter\lst@SACDelete@\lst@temp\relax#7}
+\def\lst@SACDelete@#1\relax#2{%
+    \def\lst@temp##1#1##2\@empty##3{%
+        \lst@lAddTo#2{##1}%
+        \ifx\relax##3\else
+            \expandafter\lst@temp
+        \fi ##3}
+    \let\@tempa#2\let#2\@empty
+    \expandafter\lst@temp\@tempa#1{}\@empty\relax}
+\def\lst@DefineSAC#1#2#3{%
+    \ifx\@empty#3%
+        \expandafter\@gobblethree
+    \else
+        \lccode`\~=`#3\lccode`\/=`#3\lowercase{%
+            \expandafter\let\csname\@lst s@#2/\endcsname~%
+            \def~{#1/}}%
+    \fi
+    \lst@DefineSAC#1{#2}}
+\def\lst@CArgX#1#2\relax{%
+    \lst@DefActive\lst@arg{#1#2}%
+    \expandafter\lst@CArg\lst@arg\relax}
+\def\lst@CArg#1#2\relax{%
+    \lccode`\/=`#1\lowercase{\def\lst@temp{/}}%
+    \lst@GetFreeMacro{lst@c\lst@temp d}%
+    \expandafter\lst@CArg@\lst@freemacro#1#2\@empty\@empty\relax}
+\def\lst@CArg@#1#2#3#4\@empty#5\relax#6{#6#2#3{#4}#1}
+\def\lst@CDef#1#2#3#4#5#6#7{%
+    \let#4#1%
+    \ifx\@empty#2\@empty
+        \def#1{#5\def\lst@next{#6#4#7}\lst@next}%
+    \else \ifx\@empty#3\@empty
+        \def#1##1{%
+            #5%
+            \ifx##1#2\def\lst@next{#6#4#2#7}\else
+                     \def\lst@next{#4##1}\fi
+            \lst@next}%
+    \else
+        \def#1{%
+            #5%
+            \lst@IfNextCharsArg{#2#3}{#6#4#2#3#7}%
+                                     {\expandafter#4\lst@eaten}}%
+    \fi \fi}
+\def\lst@CDefX#1#2#3#4#5#6#7{%
+    \let#4#1%
+    \ifx\@empty#2\@empty
+        \def#1{#5\def\lst@next{#6#7}\lst@next}%
+    \else \ifx\@empty#3\@empty
+        \def#1##1{%
+            #5%
+            \ifx##1#2\def\lst@next{#6#7}\else
+                     \def\lst@next{#4##1}\fi
+            \lst@next}%
+    \else
+        \def#1{%
+            #5%
+            \lst@IfNextCharsArg{#2#3}{#6#7}%
+                                     {\expandafter#4\lst@eaten}}%
+    \fi \fi}
+\def\lst@CArgEmpty#1\@empty{#1}
+\lst@Key{excludedelims}\relax
+    {\lsthk@ExcludeDelims \lst@NormedDef\lst@temp{#1}%
+     \expandafter\lst@for\lst@temp\do
+     {\expandafter\let\csname\@lst @ifex##1\endcsname\iftrue}}
+\def\lst@ReplaceInput#1{\lst@CArgX #1\relax\lst@CDefX{}{}}
+\lst@Key{literate}{}{\def\lst@literate{#1}}
+\lst@AddToHook{SelectCharTable}
+    {\ifx\lst@literate\@empty\else
+         \expandafter\lst@Literate\lst@literate{}\relax\z@
+     \fi}
+\def\lst@Literate#1#2#3{%
+    \ifx\relax#2\@empty\else
+        \lst@ReplaceInput{#1}%
+            {\lst@PrintToken \lst@letterfalse
+             \lst@token{#2}\lst@length#3\relax\lst@PrintToken}%
+        \expandafter\lst@Literate
+    \fi}
+\def\lst@BeginDropInput#1{%
+    \lst@EnterMode{#1}%
+    {\lst@modetrue
+     \let\lst@ProcessLetter\@gobble
+     \let\lst@ProcessDigit\@gobble
+     \let\lst@ProcessOther\@gobble
+     \let\lst@ProcessSpace\@empty
+     \let\lst@ProcessTabulator\@empty
+     \let\lst@ProcessFormFeed\@empty}}
+\lst@Key{identifierstyle}{}{\def\lst@identifierstyle{#1}}
+\lst@AddToHook{EmptyStyle}{\let\lst@identifierstyle\@empty}
+\lst@Key{flexiblecolumns}{false}[t]{\lstKV@SetIf{#1}\lst@ifflexible}
+\def\lst@flexibletrue{\let\lst@ifflexible\iftrue}
+\def\lst@flexiblefalse{\let\lst@ifflexible\iffalse}
+\lst@Key{columns}{fixed}{\def\lst@arg{#1}%
+    \def\lst@temp{fixed}%
+    \ifx\lst@arg\lst@temp
+        \lst@flexibletrue
+    \else
+        \def\lst@temp{flexible}%
+        \ifx\lst@arg\lst@temp
+            \lst@flexiblefalse
+        \else
+            \PackageWarning{Listings}{Unknown column format `#1'}%
+        \fi
+    \fi}
+\newdimen\lst@width
+\lst@Key{basewidth}{0.6em,0.45em}{\lstKV@CSTwoArg{#1}%
+    {\def\lst@widthfixed{##1}\def\lst@widthflexible{##2}%
+     \ifx\lst@widthflexible\@empty
+         \let\lst@widthflexible\lst@widthfixed
+     \fi
+     \gdef\lst@error{\PackageError{Listings}%
+         {Nonnegative value(s) treated as zero}%
+         {Type <RETURN> to proceed.}}%
+     \global\let\@gtempa\relax
+     \ifdim \lst@widthfixed<\z@
+         \global\let\@gtempa\lst@error \let\lst@widthfixed\z@
+     \fi
+     \ifdim \lst@widthflexible<\z@
+         \global\let\@gtempa\lst@error \let\lst@widthflexible\z@
+     \fi
+     \@gtempa}}
+\lst@AddToHook{FontAdjust}
+    {\lst@width=\lst@ifflexible\lst@widthflexible
+                          \else\lst@widthfixed\fi \relax}
+\lst@Key{fontadjust}{false}[t]{\lstKV@SetIf{#1}\lst@iffontadjust}
+\lst@AddToHook{InitVars}{\lsthk@FontAdjust}
+\def\lst@FontAdjustPre{%
+    \lst@iffontadjust
+        \setbox\@tempboxa\hbox{{\lst@thestyle{\lsthk@FontAdjust
+            \xdef\@gtempa{\noexpand\lst@width\the\lst@width\relax}}}}%
+        \@gtempa
+    \fi}
+\def\lst@FontAdjustPost{\lst@iffontadjust \lsthk@FontAdjust \fi}
+\newdimen\lst@currlwidth % \global
+\newcount\lst@column \newcount\lst@pos % \global
+\lst@AddToHook{InitVarsBOL}
+    {\global\lst@currlwidth\z@ \global\lst@pos\z@ \global\lst@column\z@}
+\def\lst@CalcLineLength{%
+            \@tempcnta\lst@column
+    \advance\@tempcnta\lst@length
+    \advance\@tempcnta-\lst@pos}
+\newdimen\lst@lostspace % \global
+\lst@AddToHook{InitVarsBOL}{\global\lst@lostspace\z@}
+\def\lst@UseLostSpace{\ifdim\lst@lostspace>\z@ \lst@InsertLostSpace \fi}
+\def\lst@InsertLostSpace{%
+    \lst@Kern\lst@lostspace \global\lst@lostspace\z@}
+\def\lst@InsertHalfLostSpace{%
+    \global\[email protected]\lst@lostspace \lst@Kern\lst@lostspace}
+\def\lstoutputpos@#1#2\relax{%
+    \ifx #1l%
+        \let\lst@lefthss\@empty \let\lst@righthss\hss
+        \let\lst@leftinsert\@empty
+    \else\ifx #1c%
+        \let\lst@lefthss\hss \let\lst@righthss\hss
+        \let\lst@leftinsert\lst@InsertHalfLostSpace
+    \else
+        \let\lst@lefthss\hss \let\lst@righthss\@empty
+        \let\lst@leftinsert\lst@InsertLostSpace
+        \ifx #1r\else \PackageWarning{Listings}%
+            {Unknown positioning for output boxes}%
+        \fi
+    \fi\fi}
+\lst@Key{outputpos}{c}{\lstoutputpos@#1\relax\relax}
+\def\lst@OutputBox#1{\lst@alloverstyle{\box#1}\lsthk@PostOutput}
+\let\lst@alloverstyle\@empty % init
+\lst@AddToHook{PostOutput}{}% init
+\def\lst@Kern#1{%
+    \setbox\z@\hbox{{\lst@currstyle{\kern#1}}}%
+    \global\advance\lst@currlwidth \wd\z@
+    \lst@OutputBox\z@}
+\def\lst@CalcLostSpaceAndOutput{%
+    \global\advance\lst@lostspace \lst@length\lst@width
+    \global\advance\lst@lostspace-\wd\@tempboxa
+    \global\advance\lst@currlwidth \wd\@tempboxa
+    \global\advance\lst@pos -\lst@length
+    \ifdim\lst@lostspace>\z@ \lst@leftinsert \fi
+    \lst@OutputBox\@tempboxa}
+\def\lst@OutputToken{%
+    \lst@TrackNewLines \lst@UseLostSpace
+    \lst@FontAdjustPre
+    \setbox\@tempboxa\lst@hbox
+        {\lsthk@OutputBox
+        {\lst@lefthss
+         \lst@thestyle
+             {\expandafter\lst@FillOutputBox\the\lst@token\@empty}%
+         \lst@righthss}}%
+    \lst@CalcLostSpaceAndOutput
+    \lst@FontAdjustPost
+    \lst@token{}\lst@length\z@}
+\lst@AddToHook{OutputBox}{}% init
+\def\lst@FillOutputBox#1{#1\lst@FillOutputBox@}
+\def\lst@FillOutputBox@#1{%
+    \ifx\@empty#1\else \hss#1\expandafter\lst@FillOutputBox@ \fi}
+\def\lst@hbox{\hbox to\lst@length\lst@width}% init
+\def\lst@OutputOther{%
+    \ifnum\lst@length=\z@\else
+        \let\lst@thestyle\lst@currstyle
+        \lsthk@OutputOther
+        \lst@OutputToken
+    \fi}
+\lst@AddToHook{OutputOther}{}% init
+\let\lst@currstyle\relax % init
+\def\lst@Output{%
+    \ifnum\lst@length=\z@\else
+        \ifx\lst@currstyle\relax
+            \let\lst@thestyle\lst@identifierstyle
+        \else
+            \let\lst@thestyle\lst@currstyle
+        \fi
+        \lsthk@Output
+        \lst@OutputToken
+    \fi
+    \let\lst@lastother\relax}
+\lst@AddToHook{Output}{}% init
+\def\lst@GotoTabStop{%
+    \ifx\lst@newlines\@empty
+        \setbox\@tempboxa\hbox{\lst@outputspace}%
+        \setbox\@tempboxa\hbox to\wd\@tempboxa{{\lst@currstyle{\hss}}}%
+        \lst@CalcLostSpaceAndOutput
+    \else
+        \global\advance\lst@lostspace \lst@length\lst@width
+        \global\advance\lst@column\lst@length \lst@length\z@
+    \fi}
+\lst@AddToHook{Init}
+    {\lst@ifflexible
+         \let\lst@FillOutputBox\@empty
+         \let\lst@lefthss\@empty
+         \let\lst@righthss\@empty
+         \let\lst@hbox\hbox
+     \fi}
+\def\lst@NewLine{%
+    \ifx\lst@OutputBox\@gobble\else
+        \par\noindent \hbox{}%
+    \fi \lst@newlinetrue}
+\lst@AddToHook{InitVars}{\global\let\lst@newlines\@empty}
+\lst@AddToHook{InitVarsBOL}{\lst@AddTo\lst@newlines\lst@NewLine}
+\def\lst@TrackNewLines{%
+    \ifx\lst@newlines\@empty\else
+        \lsthk@OnNewLine
+        \lst@newlines
+        \global\let\lst@newlines\@empty
+    \fi}
+\lst@AddToHook{OnNewLine}{}% init
+\def\lst@newlinetrue{\global\let\lst@ifnewline\iftrue}
+\lst@AddToHook{PostOutput}{\global\let\lst@ifnewline\iffalse}
+\global\let\lst@ifnewline\iffalse
+\def\lst@RemoveNewLine{%
+    \def\lst@temp##1\lst@NewLine##2\@empty{%
+        \ifx\@empty##2\@empty \expandafter\@gobble \else
+            \expandafter\lst@RNL@\lst@newlines\@empty
+        \fi}%
+    \expandafter\lst@temp\lst@newlines\lst@NewLine\@empty}
+\def\lst@RNL@#1\lst@NewLine#2\@empty#3{%
+    \gdef\lst@newlines{#1#2}#3}
+\def\lst@BeginDropOutput#1{%
+    \global\let\lst@BDOnewlines\lst@newlines
+    \lst@EnterMode{#1}%
+        {\lst@modetrue
+         \let\lst@OutputBox\@gobble
+         \aftergroup\lst@BDORestore}}
+\def\lst@BDORestore{\global\let\lst@newlines\lst@BDOnewlines}
+\lst@Key{basicstyle}\relax{\def\lst@basicstyle{#1}}
+\lst@AddToHook{Init}{\lst@basicstyle}
+\lst@AddToHookExe{EmptyStyle}{\let\lst@basicstyle\@empty}
+\def\lst@parshape{\parshape\@ne \z@ \linewidth}
+\lst@AddToHookAtTop{EveryLine}{\lst@parshape}
+\lst@AddToHookAtTop{EndGroup}{\lst@parshape}
+\newcount\lst@lineno % \global
+\lst@AddToHook{InitVars}{\global\lst@lineno\@ne}
+\lst@Key{print}{true}[t]{\lstKV@SetIf{#1}\lst@ifprint}
+\lst@Key{first}\relax{\def\lst@firstline{#1\relax}}
+\lst@Key{last}\relax{\def\lst@lastline{#1\relax}}
+\lst@AddToHook{PreSet}
+    {\let\lst@firstline\@ne \def\lst@lastline{9999999\relax}}
+\lst@Key{continue}\relax[t]{\lstKV@SetIf{#1}\lst@ifcontinue}
+\def\lst@continuetrue{\let\lst@ifcontinue\iftrue}
+\def\lst@continuefalse{\let\lst@ifcontinue\iffalse}
+\lst@AddToHook{PreSet}{\let\lst@ifcontinue\@undefined}
+\lst@AddToHook{PreInit}
+    {\ifx\lst@ifcontinue\@undefined \lst@continuefalse \fi}
+\lst@Key{captionpos}{t}{\def\lst@captionpos{#1}}
+\lst@Key{abovecaptionskip}\smallskipamount{\def\lst@abovecaption{#1}}
+\lst@Key{belowcaptionskip}\smallskipamount{\def\lst@belowcaption{#1}}
+\lst@Key{label}\relax{\def\lst@label{#1}}
+\lst@Key{title}\relax{\def\lst@title{#1}\let\lst@caption\relax}
+\lst@Key{caption}\relax{\lstKV@OptArg[{#1}]{#1}%
+    {\def\lst@caption{##2}\def\lst@@caption{##1}}%
+     \let\lst@title\@empty}
+\lst@AddToHook{PreSet}
+    {\let\lst@caption\@empty \let\lst@@caption\@empty
+     \let\lst@title\@empty \let\lst@label\@empty}
+\lst@AddToHook{TextStyle}
+    {\let\lst@caption\@empty \let\lst@@caption\@empty
+     \let\lst@title\@empty \let\lst@label\@empty}
+\@ifundefined{thechapter}
+    {\newcounter{lstlisting}
+     \renewcommand\thelstlisting{\@arabic\c@lstlisting}}
+    {\newcounter{lstlisting}[chapter]
+     \renewcommand\thelstlisting
+         {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@lstlisting}}
+\lst@UserCommand\lstlistingname{Listing}
+\def\lst@MakeCaption#1{%
+    \ifx #1t%
+        \ifx\lst@@caption\@empty\expandafter\lst@HRefStepCounter \else
+                                \expandafter\refstepcounter
+        \fi {lstlisting}%
+        \ifx\lst@label\@empty\else \label{\lst@label}\fi
+    \fi
+    \ifx\lst@caption\@empty\else
+        \lst@IfSubstring #1\lst@captionpos
+            {\par\normalsize\normalfont
+             \ifx\lst@title\@empty
+                 \expandafter\@makecaption
+             \else
+                 \expandafter\lst@maketitle
+             \fi
+                {\noindent\lstlistingname
+                 \ifx\lst@@caption\@empty\else~\thelstlisting\fi}%
+                \lst@caption}{}%
+    \fi}
+\def\lst@maketitle#1#2{%
+    \vskip\abovecaptionskip
+    \sbox\@tempboxa{\lst@title}%
+    \ifdim \wd\@tempboxa >\hsize
+        \lst@title\par
+    \else
+        \global \@minipagefalse
+        \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+    \fi
+    \vskip\belowcaptionskip}
+\AtBeginDocument{\@ifundefined{as@makecaption}{}{%
+\def\lst@maketitle#1#2{%
+  \vskip\abovecaptionskip
+  \setlength{\as@captionwidth}{\linewidth}%
+  \setlength{\leftskip}{\captionmargin}%
+  \setlength{\rightskip}{\captionmargin}%
+  \addtolength{\as@captionwidth}{-2\captionmargin}%
+  \captionfont
+  \sbox{\as@captionbox}{\lst@title}%
+  \ifdim \wd\as@captionbox >\as@captionwidth
+    \as@caption\ignorespaces\lst@title
+  \else
+    \as@shortcaption\ignorespaces\lst@title
+  \fi
+  \vskip\belowcaptionskip}%
+}%
+\@ifundefined{caption@make}{}{%
+\def\lst@maketitle#1#2{%
+    \begingroup
+    \captionstyle{lsttitle}\@makecaption{}\lst@title
+    \endgroup}
+\newcaptionstyle{lsttitle}{\caption@make{lsttitle}}%
+\def\caption@@@lsttitle{\captiontext\par}%
+}}
+\def\lst@HRefStepCounter#1{%
+    \c@lstlisting\lst@neglisting
+    \advance\c@lstlisting\m@ne \xdef\lst@neglisting{\the\c@lstlisting}%
+    \ifx\hyper@refstepcounter\@undefined\else
+        \hyper@refstepcounter{#1}%
+    \fi}
+\gdef\lst@neglisting{\z@}% init
+\lst@Key{boxpos}{c}{\def\lst@boxpos{#1}}
+\def\lst@boxtrue{\let\lst@ifbox\iftrue}
+\let\lst@ifbox\iffalse
+\lst@Key{float}\relax[\lst@floatplacement]{\edef\lst@float{#1}}
+\lst@Key{floatplacement}{tbp}{\def\lst@floatplacement{#1}}
+\lst@AddToHook{PreSet}{\let\lst@float\relax}
+\lst@AddToHook{TextStyle}{\let\lst@float\relax}
+\AtBeginDocument{%
+\@ifundefined{c@float@type}%
+    {\edef\ftype@lstlisting{\ifx\c@figure\@undefined 1\else 4\fi}}
+    {\edef\ftype@lstlisting{\the\c@float@type}%
+     \addtocounter{float@type}{\value{float@type}}}%
+}
+\lst@Key{aboveskip}\medskipamount{\def\lst@aboveskip{#1}}
+\lst@Key{belowskip}\medskipamount{\def\lst@belowskip{#1}}
+\lst@AddToHook{TextStyle}
+    {\let\lst@aboveskip\z@ \let\lst@belowskip\z@}
+\def\lst@Init#1{%
+    \begingroup
+    \ifx\lst@float\relax\else
+        \edef\@tempa{\noexpand\@float{lstlisting}[\lst@float]}%
+        \expandafter\@tempa
+    \fi
+    \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
+    \else
+        \par\penalty-50\relax
+        \vspace\lst@aboveskip
+    \fi
+    \normalbaselines
+    \abovecaptionskip\lst@abovecaption\relax
+    \belowcaptionskip\lst@belowcaption\relax
+    \lst@MakeCaption t%
+    \lsthk@PreInit \lsthk@Init
+    \everypar{\lsthk@EveryLine\lsthk@EveryPar}%
+    \lsthk@InitVars \lsthk@InitVarsBOL
+    \lst@Let{13}\lst@MProcessListing
+    \let\lst@Backslash#1%
+    \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}}
+\lst@AddToHook{InitVars}
+    {\rightskip\z@ \leftskip\z@ \parfillskip=\z@ plus 1fil
+     \let\par\@@par}
+\lst@AddToHook{EveryLine}{}% init
+\lst@AddToHook{EveryPar}{}% init
+\lst@Key{showlines}f[t]{\lstKV@SetIf{#1}\lst@ifshowlines}
+\def\lst@DeInit{%
+    \lst@PrintToken \lst@EOLUpdate
+    \lst@RemoveNewLine\@empty
+    \lst@RemoveNewLine{%
+        \lst@ifshowlines
+            \lst@TrackNewLines
+        \else
+            \setbox\@tempboxa\vbox{\lst@TrackNewLines}%
+        \fi}%
+    \par\removelastskip
+    \everypar{}\lsthk@ExitVars \lsthk@DeInit
+    \lst@MakeCaption b%
+    \lst@ifbox
+        \egroup $\hss \egroup
+        \vrule\@width\lst@maxwidth\@height\z@\@depth\z@
+    \else
+        \par\penalty-50\vspace\lst@belowskip
+    \fi
+    \ifx\lst@float\relax\else
+        \expandafter\end@float
+    \fi
+    \endgroup}
+\newdimen\lst@maxwidth % \global
+\lst@AddToHook{InitVars}{\global\lst@maxwidth\z@}
+\lst@AddToHook{InitVarsEOL}
+    {\ifdim\lst@currlwidth>\lst@maxwidth
+         \global\lst@maxwidth\lst@currlwidth
+     \fi}
+\def\lst@EOLUpdate{\lsthk@EOL \lsthk@InitVarsEOL \lsthk@InitVarsBOL}
+\def\lst@MProcessListing{%
+    \lst@PrintToken \lst@EOLUpdate \global\advance\lst@lineno\@ne
+    \ifnum \lst@lineno>\lst@lastline
+        \expandafter\lst@EndProcessListing
+    \else
+        \expandafter\lst@BOLGobble
+    \fi}
+\let\lst@EndProcessListing\endinput
+\lst@Key{gobble}{0}{\def\lst@gobble{#1}}
+\def\lst@BOLGobble{%
+    \ifnum\lst@gobble>\z@
+        \@tempcnta\lst@gobble\relax
+        \expandafter\lst@BOLGobble@
+\fi}
+\def\lst@BOLGobble@@{%
+    \ifnum\@tempcnta>\z@
+        \expandafter\lst@BOLGobble@
+    \fi}
+\def\lstenv@BOLGobble@@{%
+    \lst@IfNextChars\lstenv@endstring{\lstenv@End}%
+    {\advance\@tempcnta\m@ne \expandafter\lst@BOLGobble@@\lst@eaten}}
+\def\lst@BOLGobble@#1{%
+    \let\lst@next#1%
+    \ifx \lst@next\relax\else
+    \ifx \lst@next\lst@MProcessListing\else
+    \ifx \lst@next\lst@ProcessFormFeed\else
+    \ifx \lst@next\lstenv@backslash
+        \let\lst@next\lstenv@BOLGobble@@
+    \else
+        \let\lst@next\lst@BOLGobble@@
+        \ifx #1\lst@ProcessTabulator
+            \advance\@tempcnta-\lst@tabsize\relax
+            \ifnum\@tempcnta<\z@
+                \lst@length-\@tempcnta \lst@PreGotoTabStop
+            \fi
+        \else
+            \advance\@tempcnta\m@ne
+        \fi
+    \fi \fi \fi \fi
+    \lst@next}
+\lst@AddToHookExe{PreSet}{\global\let\lst@intname\@empty}
+\lst@AddToHook{PreInit}{%
+    \let\lst@arg\lst@intname \lst@ReplaceIn\lst@arg\lst@filenamerpl
+    \global\let\lst@name\lst@arg}
+\def\lst@filenamerpl{_\textunderscore $\textdollar -\textendash}
+\def\l@lstlisting#1#2{\@dottedtocline{1}{1.5em}{2.3em}{#1}{#2}}
+\lst@AddToHook{Init}
+    {\ifx\lst@@caption\@empty
+         \ifx\lst@caption\@empty
+             \lst@ifcontinue\else
+                 \ifx\lst@intname\@empty \else \def\lst@temp{ }%
+                 \ifx\lst@intname\lst@temp \else
+                     \addcontentsline{lol}{lstlisting}\lst@name
+                 \fi\fi
+             \fi
+         \fi
+     \else
+         \addcontentsline{lol}{lstlisting}%
+             {\protect\numberline{\thelstlisting}\lst@@caption}%
+     \fi}
+\lst@UserCommand\lstlistlistingname{Listings}
+\lst@UserCommand\lstlistoflistings{\bgroup
+    \let\contentsname\lstlistlistingname
+    \let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}%
+    \tableofcontents \egroup}
+\newcommand\lstinline[1][]{%
+    \leavevmode\hbox\bgroup
+        \def\lst@boxpos{b}\let\lst@ifflexible\iftrue
+        \lsthk@PreSet\lstset{#1}%
+        \lsthk@TextStyle \lst@Init\relax
+        \everypar{}\let\lsthk@Endgroup\@empty
+        \lstinline@}
+\def\lstinline@#1{\lst@IfNextCharActive{\lst@InlineM#1}{\lst@InlineJ#1}}
+\lst@AddToHook{TextStyle}{}% init
+\lst@AddToHook{SelectCharTable}{\lst@inlinechars}
+\global\let\lst@inlinechars\@empty
+\def\lst@InlineM#1{\gdef\lst@inlinechars{%
+    \lst@Def{`#1}{\lst@DeInit\egroup \global\let\lst@inlinechars\@empty}%
+    \lst@Def{13}{\lst@DeInit\egroup \global\let\lst@inlinechars\@empty
+        \PackageError{Listings}{lstinline ended by EOL}\@ehc}}%
+    \lst@inlinechars}
+\def\lst@InlineJ#1{%
+    \def\lst@temp##1#1{%
+        \let\lst@arg\@empty \lst@InsideConvert{##1}\lst@arg
+        \lst@DeInit\egroup}%
+    \lst@temp}
+\newcommand\lstinputlisting[2][]{%
+    \def\lst@set{#1}%
+    \IfFileExists{#2}%
+        {\lst@InputListing{#2}}%
+        {\filename@parse{#2}%
+         \edef\reserved@a{\noexpand\lst@MissingFileError
+             {\filename@area\filename@base}%
+             {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
+         \reserved@a}%
+    \@doendpe \@newlistfalse \ignorespaces}
+\def\lst@MissingFileError#1#2{%
+    \typeout{^^J! Package Listings Error: File `#1.#2' not found.^^J^^J%
+        Type X to quit or <RETURN> to proceed,^^J%
+        or enter new name. (Default extension: #2)^^J}%
+    \message{Enter file name: }%
+    {\endlinechar\m@ne \global\read\m@ne to\@gtempa}%
+    \ifx\@gtempa\@empty \else %
+        \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+        \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+        \filename@parse\@gtempa %
+        \edef\filename@ext{%
+            \ifx\filename@ext\relax#2\else\filename@ext\fi}%
+        \edef\reserved@a{\noexpand\IfFileExists %
+                {\filename@area\filename@base.\filename@ext}%
+            {\noexpand\lst@InputListing %
+                {\filename@area\filename@base.\filename@ext}}%
+            {\noexpand\lst@MissingFileError
+                {\filename@area\filename@base}{\filename@ext}}}%
+        \expandafter\reserved@a %
+    \fi}
+\def\lst@InputListing#1{%
+    \begingroup
+    \lsthk@PreSet \gdef\lst@intname{#1}%
+    \expandafter\lstset\expandafter{\lst@set}%
+    \lst@ifprint
+        \lst@Init\relax \let\lst@gobble\z@
+        \lst@SkipToFirst \input{#1}\lst@DeInit
+    \else
+        \begin{center}%
+        \footnotesize --- Listing of #1 has been skipped. ---
+        \end{center}%
+    \fi
+    \endgroup}
+\def\lst@SkipToFirst{%
+    \ifnum \lst@lineno<\lst@firstline
+        \lst@BeginDropInput\lst@Pmode
+        \lst@Let{13}\lst@MSkipToFirst
+        \lst@Let{10}\lst@MSkipToFirst
+    \else
+        \expandafter\lst@BOLGobble
+    \fi}
+\def\lst@MSkipToFirst{%
+    \global\advance\lst@lineno\@ne
+    \ifnum \lst@lineno=\lst@firstline
+        \lst@LeaveMode \global\let\lst@newlines\@empty
+        \lsthk@InitVarsBOL
+        \expandafter\lst@BOLGobble
+    \fi}
+\def\lstenv@DroppedWarning{%
+    \ifx\lst@dropped\@undefined\else
+        \PackageWarning{Listings}{Text dropped after begin of listing}%
+    \fi}
+\let\lst@dropped\@undefined % init
+\begingroup \lccode`\~=`\^^M\lowercase{%
+\gdef\lstenv@Process#1{%
+    \ifx~#1%
+        \lstenv@DroppedWarning \let\lst@next\lst@SkipToFirst
+    \else\ifx^^J#1%
+        \lstenv@DroppedWarning \let\lst@next\lstenv@ProcessJ
+    \else
+        \let\lst@dropped#1\let\lst@next\lstenv@Process
+    \fi \fi
+    \lst@next}
+}\endgroup
+\def\lstenv@ProcessJ{%
+    \let\lst@arg\@empty
+    \ifx\@currenvir\lstenv@name
+        \expandafter\lstenv@ProcessJEnv
+    \else
+        \expandafter\def\expandafter\lst@temp\expandafter##1%
+            \csname end\lstenv@name\endcsname
+                {\lst@InsideConvert{##1}\lstenv@ProcessJ@}%
+        \expandafter\lst@temp
+    \fi}
+\begingroup \lccode`\~=`\\\lowercase{%
+\gdef\lstenv@ProcessJ@{%
+    \lst@lExtend\lst@arg
+        {\expandafter\ \expandafter~\lstenv@endstring}%
+    \catcode10=\active \lst@Let{10}\lst@MProcessListing
+    \lst@SkipToFirst \lst@arg}
+}\endgroup
+\def\lstenv@ProcessJEnv#1\end#2{\def\lst@temp{#2}%
+    \ifx\lstenv@name\lst@temp
+        \lst@InsideConvert{#1}%
+        \expandafter\lstenv@ProcessJ@
+    \else
+        \lst@InsideConvert{#1\\end\{#2\}}%
+        \expandafter\lstenv@ProcessJEnv
+    \fi}
+\def\lstenv@backslash{%
+    \lst@IfNextChars\lstenv@endstring
+        {\lstenv@End}%
+        {\expandafter\lsts@backslash \lst@eaten}}%
+\def\lstenv@End{%
+    \ifx\@currenvir\lstenv@name
+        \edef\lst@next{\noexpand\end{\lstenv@name}}%
+    \else
+        \def\lst@next{\csname end\lstenv@name\endcsname}%
+    \fi
+    \lst@next}
+\lst@UserCommand\lstnewenvironment#1#2#{%
+    \@ifundefined{#1}%
+        {\lst@false \let\lst@arg\@empty
+         \lst@FVConvert{#1}\@nil
+         \expandafter\lstnewenvironment@\lst@arg{#1}{#2}}%
+        {\PackageError{Listings}{Environment `#1' already defined}\@eha
+         \@gobbletwo}}
+\def\@tempa#1#2#3{%
+\gdef\lstnewenvironment@##1##2##3##4##5{%
+    \global\@namedef{end##2}{\lstenv@Error{##2}}%
+    \global\@namedef{##2}{\def\lstenv@name{##2}%
+        \begingroup \catcode\active=\active \csname##2@\endcsname}%
+    \let\l@ngrel@x\global
+    \expandafter\new@command\csname##2@\endcsname##3%
+        {\lsthk@PreSet ##4%
+         \ifx\@currenvir\lstenv@name
+             \def\lstenv@endstring{#1#2##1#3}%
+         \else
+             \def\lstenv@endstring{#1##1}%
+         \fi
+         \@namedef{end##2}{\lst@DeInit ##5\endgroup
+                          \@doendpe \@ignoretrue}%
+         \lst@Init\lstenv@backslash
+         \let\lst@EndProcessListing\lstenv@SkipToEnd
+         \lst@ifprint
+             \expandafter\lstenv@Process
+         \else
+             \expandafter\lstenv@SkipToEnd
+         \fi}}%
+}
+\let\lst@arg\@empty \lst@false \lst@FVConvert{end}\{\}\@nil
+\expandafter\@tempa\lst@arg
+\begingroup \lccode`\~=`\\\lowercase{%
+\gdef\lstenv@SkipToEnd{%
+    \long\expandafter\def\expandafter\lst@temp\expandafter##\expandafter
+        1\expandafter~\lstenv@endstring{\lstenv@End}%
+    \lst@temp}
+}\endgroup
+\def\lstenv@Error#1{\PackageError{Listings}{Extra \string\end#1}%
+    {I'm ignoring this, since I wasn't doing a \csname#1\endcsname.}}
+\begingroup \lccode`\~=`\^^M\lowercase{%
+\gdef\lst@TestEOLChar#1{%
+    \ifx ~#1\@empty \lst@EOLCharError \else
+    \ifx^^J#1\@empty \lst@EOLCharError \else
+        \gdef\lst@intname{#1}%
+    \fi \fi}
+}\endgroup
+\def\lst@EOLCharError{%
+    \PackageError{Listings}%
+    {Oops! It seems you've forgotten the argument to\MessageBreak
+     a listing environment. Assuming empty argument}%
+    {Type <RETURN> to proceed.}}
+\lstnewenvironment{lstlisting}[2][]
+    {\lst@TestEOLChar{#2}%
+     \lstset{#1}%
+     \csname lst@SetFirstLabel\endcsname}
+    {\csname lst@SaveFirstLabel\endcsname}
+\lst@Key{fancyvrb}\relax[t]{%
+    \lstKV@SetIf{#1}\lst@iffancyvrb
+    \lstFV@fancyvrb}
+\ifx\lstFV@fancyvrb\@undefined
+    \gdef\lstFV@fancyvrb{\lst@RequireAspects{fancyvrb}\lstFV@fancyvrb}
+\fi
+\@ifundefined{ocp}{}
+    {\lst@AddToHook{OutputBox}{\lsthk@OmegaOutputBox}
+     \lst@AddToHook{OmegaOutputBox}{}}
+\lst@AddToHook{OmegaOutputBox}
+    {\let\lst@ProcessLetter\@firstofone
+     \let\lst@ProcessDigit\@firstofone
+     \let\lst@ProcessOther\@firstofone
+     \let\lst@ProcessString@b\@firstofone
+     \let\lst@ProcessString@d\@firstofone
+     \let\lst@ProcessString@m\@firstofone
+     \let\lst@ProcessString@bd\@firstofone
+     \let\lst@ProcessString@db\@firstofone}
+\DeclareOption*{\expandafter\lst@ProcessOption\CurrentOption\relax}
+\def\lst@ProcessOption#1#2\relax{%
+    \ifx #1!%
+        \lst@DeleteKeysIn\lst@loadaspects{#2}%
+    \else
+        \lst@lAddTo\lst@loadaspects{,#1#2}%
+    \fi}
+\ifx\lst@loadaspects\@undefined
+    \def\lst@loadaspects{strings,comments,escape,style,language,%
+        keywords,labels,lineshape,frames,emph,breaklines,index}%
+\fi
+\lst@AddToHook{DeInit}{\everypar{}}
+\def\lst@DefineSAC#1#2#3{%
+    \ifx\@empty#3%
+        \expandafter\@gobblethree
+    \else
+        \lccode`\~=`#3\lccode`\/=`#3\lowercase{\def\lst@temp{#1/}}%
+        \lowercase{\ifx~}\lst@temp\else % not defined yet
+            \lowercase{\expandafter\let\csname\@lst s@#2/\endcsname~%
+            \let~}\lst@temp
+        \fi
+    \fi
+    \lst@DefineSAC#1{#2}}
+\lst@AddToHook{Init}{\lst@ifactivechars \catcode13\active \fi}
+\def\lst@MakeCaption#1{%
+    \ifx #1t%
+        \ifx\lst@@caption\@empty\expandafter\lst@HRefStepCounter \else
+                                \expandafter\refstepcounter
+        \fi {lstlisting}%
+        \ifx\lst@label\@empty\else \label{\lst@label}\fi
+    \fi
+    \ifx\lst@caption\@empty\else
+        \lst@IfSubstring #1\lst@captionpos
+            {\lst@Let{13}\space
+             \protected@edef\lst@caption{\lst@caption}%
+             \protected@edef\lst@@caption{\lst@@caption}%
+             \par\normalsize\normalfont
+             \ifx\lst@title\@empty
+                 \expandafter\@makecaption
+             \else
+                 \expandafter\lst@maketitle
+             \fi
+                {\noindent\lstlistingname
+                 \ifx\lst@@caption\@empty\else~\thelstlisting\fi}%
+                \lst@caption}{}%
+    \fi}
+\lst@NewMode\lst@commentmode
+\gdef\lst@BeginCDATA#1\@empty{%
+    \lst@TrackNewLines \lst@PrintToken
+    \lst@EnterMode\lst@GPmode{}\let\lst@ifmode\iffalse
+    \lst@mode\lst@insidemode #1\lst@mode\lst@GPmode\relax\lst@modetrue}
+\IfFileExists{lstpatch.sty}
+    {\def\lst@topatch{0.19}\input{lstpatch.sty}%
+     \let\lst@next\relax
+     \ifx\lstlanguage@\@undefined\else \let\lst@next\@empty \fi
+     \ifx\lst@version\lst@topatch\else \let\lst@next\@empty \fi
+     \ifx\lst@next\relax\else
+        \typeout{^^J%
+        ***^^J%
+        *** Patch file `lstpatch.sty' for version \lst@topatch^^J%
+        *** is not suitable for `listings.sty' version \lst@version.^^J%
+        *** Please delete old patch files and try again.^^J%
+        ***^^J}%
+        \batchmode \@@end
+     \fi}{}
+\let\lst@ifsavemem\iffalse
+\DeclareOption{savemem}{\let\lst@ifsavemem\iftrue}
+\DeclareOption{noaspects}{\let\lst@loadaspects\@empty}
+\ProcessOptions
+\lst@RequireAspects\lst@loadaspects
+\let\lst@loadaspects\@empty
+\lst@UseHook{SetStyle}\lst@UseHook{EmptyStyle}
+\lst@UseHook{SetLanguage}\lst@UseHook{EmptyLanguage}
+\InputIfFileExists{listings.cfg}{}{}
+\InputIfFileExists{lstlocal.cfg}{}{}
+\endinput
+%%
+%% End of file `listings.sty'.

+ 268 - 0
docs/styles/lstdoc.sty

@@ -0,0 +1,268 @@
+%%
+%% This is file `lstdoc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% listings.dtx  (with options: `doc')
+%% 
+%% Please read the software license in listings.dtx or listings.dvi.
+%%
+%% (w)(c) 1996/1997/1998/1999/2000 Carsten Heinz and/or any other author
+%% listed elsewhere 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.
+%%
+%% The listings package is free software.
+%%
+%% However, if you distribute the package as part of a commercial
+%% product or if you use the package to prepare a document and sell the
+%% document (books, journals, and so on), I'd like to encourage you to
+%% make a donation to the LaTeX3 fund. The size of this `license fee'
+%% should depend on the value of the package for your product.
+%%
+%% If you use the package to typeset a non-commercial document, please
+%% send me a copy of the document (.dvi, .ps, .pdf, hardcopy, etc.) to
+%% support further development.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+\lst@AddToAtTop{\try@load@fontshape}{\def\space{ }}
+\def\lst@BeginRemark#1{%
+    \begin{quote}\topsep0pt\let\small\footnotesize\small#1:}
+\def\lst@EndRemark{\end{quote}}
+\newenvironment{TODO}
+    {\lst@BeginRemark{To do}}{\lst@EndRemark}
+\newenvironment{ALTERNATIVE}
+    {\lst@BeginRemark{Alternative}}{\lst@EndRemark}
+\newenvironment{REMOVED}
+    {\lst@BeginRemark{Removed}}{\lst@EndRemark}
+\newenvironment{OLDDEF}
+    {\lst@BeginRemark{Old definition}}{\lst@EndRemark}
+\long\def\m@cro@#1#2#3{\endgroup \topsep\MacroTopsep \trivlist
+  \edef\saved@macroname{\string#3}%
+  \def\makelabel##1{\llap{##1}}%
+  \if@inlabel
+    \let\@tempa\@empty \count@\macro@cnt
+    \loop \ifnum\count@>\z@
+      \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
+    \edef\makelabel##1{\llap{\vtop to\baselineskip
+                               {\@tempa\hbox{##1}\vss}}}%
+    \advance \macro@cnt \@ne
+  \else  \macro@cnt\@ne  \fi
+  \edef\@tempa{\noexpand\item[%
+     #1%
+       \noexpand\PrintMacroName
+     \else
+       \expandafter\noexpand\csname Print#2Name\endcsname % MODIFIED
+     \fi
+     {\string#3}]}%
+  \@tempa
+  \global\advance\c@CodelineNo\@ne
+   #1%
+      \SpecialMainIndex{#3}\nobreak
+      \DoNotIndex{#3}%
+   \else
+      \csname SpecialMain#2Index\endcsname{#3}\nobreak % MODIFIED
+   \fi
+  \global\advance\c@CodelineNo\m@ne
+  \ignorespaces}
+\def\macro{\begingroup
+   \catcode`\\12
+   \MakePrivateLetters \m@cro@ \iftrue {Macro}}% MODIFIED
+\def\environment{\begingroup
+   \catcode`\\12
+   \MakePrivateLetters \m@cro@ \iffalse {Env}}% MODIFIED
+\def\newdocenvironment#1#2#3#4{%
+    \@namedef{#1}{#3\begingroup \catcode`\\12\relax
+                  \MakePrivateLetters \m@cro@ \iffalse {#2}}%
+    \@namedef{end#1}{#4\endmacro}%
+    \@ifundefined{Print#2Name}{\expandafter
+        \let\csname Print#2Name\endcsname\PrintMacroName}{}%
+    \@ifundefined{SpecialMain#2Index}{\expandafter
+        \let\csname SpecialMain#2Index\endcsname\SpecialMainIndex}{}}
+\newdocenvironment{aspect}{Aspect}{}{}
+\def\PrintAspectName#1{}
+\def\SpecialMainAspectIndex#1{%
+    \@bsphack
+    \index{aspects:\levelchar\protect\aspectname{#1}\encapchar main}%
+    \@esphack}
+\newdocenvironment{lstkey}{Key}{}{}
+\def\PrintKeyName#1{\strut\keyname{#1}\ }
+\def\SpecialMainKeyIndex#1{%
+    \@bsphack
+    \index{keys:\levelchar\protect\keyname{#1}\encapchar main}%
+    \@esphack}
+\newcounter{argcount}
+\def\labelargcount{\texttt{\#\arabic{argcount}}\hskip\labelsep$=$}
+\def\macroargs{\list\labelargcount
+    {\usecounter{argcount}\leftmargin=2\leftmargin
+     \parsep \z@ \@plus\z@ \@minus\z@
+     \topsep4\p@ \@plus\p@ \@minus2\p@
+     \itemsep\z@ \@plus\z@ \@minus\z@
+     \def\makelabel##1{\hss\llap{##1}}}}
+\def\endmacroargs{\endlist\@endparenv}
+\lst@RequireAspects{writefile}
+\newbox\lst@samplebox
+\lstnewenvironment{lstsample}[2]
+    {\lst@TestEOLChar{#1}\global\let\lst@intname\@empty
+     \gdef\lst@sample{#1}%
+     \setbox\lst@samplebox=\hbox\bgroup
+         \setkeys{lst}{language={},style={},tabsize=4,gobble=5,%
+             basicstyle=\small\ttfamily,basewidth=0.51em}
+         #2%
+         \lst@BeginAlsoWriteFile{\jobname.tmp}}
+    {\lst@EndWriteFile\egroup
+     \ifdim \wd\lst@samplebox>.5\linewidth
+         \begin{center}%
+         \begin{minipage}{0.9\linewidth}%
+             \hbox to\linewidth{\box\lst@samplebox\hss}%
+         \end{minipage}%
+         \end{center}%
+         \lst@sampleInput
+     \else
+         \begin{center}%
+         \begin{minipage}{0.45\linewidth}\lst@sampleInput\end{minipage}%
+         \qquad
+         \begin{minipage}{0.45\linewidth}%
+             \hbox to\linewidth{\box\lst@samplebox\hss}%
+         \end{minipage}%
+         \end{center}%
+     \fi}
+\def\lst@sampleInput{%
+    \MakePercentComment\catcode`\^^M=10\relax
+    \small\lst@sample
+    {\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
+                                  {\lst@ProcessTabulator}}%
+     \leavevmode \input{\jobname.tmp}}\MakePercentIgnore}
+\def\lstscanlanguages#1#2#3{%
+    \begingroup
+        \def\lst@DefDriver@##1##2##3##4[##5]##6{%
+           \lst@false
+           \lst@lAddTo\lst@scan{##6(##5),}%
+           \begingroup
+           \@ifnextchar[{\lst@XDefDriver{##1}##3}{\lst@DefDriver@@##3}}%
+        \def\lst@XXDefDriver[##1]{}%
+        \lst@InputCatcodes
+        \def\lst@dontinput{#3}%
+        \let\lst@scan\@empty
+        \lst@for{#2}\do{%
+            \lst@IfOneOf##1\relax\lst@dontinput
+                {}%
+                {\InputIfFileExists{##1}{}{}}}%
+        \global\let\@gtempa\lst@scan
+    \endgroup
+    \let#1\@gtempa}
+\def\lstprintlanguages#1{%
+    \def\do##1{\setbox\@tempboxa\hbox{##1\space\space}%
+        \ifdim\wd\@tempboxa<.5\linewidth \wd\@tempboxa.5\linewidth
+                                   \else \wd\@tempboxa\linewidth \fi
+        \box\@tempboxa\allowbreak}%
+    \begin{quote}
+      \par\noindent
+      \hyphenpenalty=\@M \rightskip=\z@\@plus\linewidth\relax
+      \lst@BubbleSort#1%
+      \expandafter\lst@NextLanguage#1\relax(\relax),%
+    \end{quote}}
+\def\lst@NextLanguage#1(#2),{%
+    \ifx\relax#1\else
+        \def\lst@language{#1}\def\lst@dialects{(#2),}%
+        \expandafter\lst@NextLanguage@
+    \fi}
+\def\lst@NextLanguage@#1(#2),{%
+    \def\lst@temp{#1}%
+    \ifx\lst@temp\lst@language
+        \lst@lAddTo\lst@dialects{(#2),}%
+        \expandafter\lst@NextLanguage@
+    \else
+        \do{\lst@language
+        \ifx\lst@dialects\lst@emptydialect\else
+            \expandafter\lst@NormedDef\expandafter\lst@language
+                \expandafter{\lst@language}%
+            \space(%
+            \lst@BubbleSort\lst@dialects
+            \expandafter\lst@PrintDialects\lst@dialects(\relax),%
+            )%
+        \fi}%
+        \def\lst@next{\lst@NextLanguage#1(#2),}%
+        \expandafter\lst@next
+    \fi}
+\def\lst@emptydialect{(),}
+\def\lst@PrintDialects(#1),{%
+    \ifx\@empty#1\@empty empty\else
+        \lst@PrintDialect{#1}%
+    \fi
+    \lst@PrintDialects@}
+\def\lst@PrintDialects@(#1),{%
+    \ifx\relax#1\else
+        ,\lst@PrintDialect{#1}%
+        \expandafter\lst@PrintDialects@
+    \fi}
+\def\lst@PrintDialect#1{%
+    \lst@NormedDef\lst@temp{#1}%
+    \expandafter\ifx\csname lstdd@\lst@language\endcsname\lst@temp
+        \texttt{\underbar{#1}}%
+    \else
+        \texttt{#1}%
+    \fi}
+\def\lst@IfLE#1#2\@empty#3#4\@empty{%
+    \ifx #1\relax
+        \let\lst@next\@firstoftwo
+    \else \ifx #3\relax
+        \let\lst@next\@secondoftwo
+    \else
+        \lowercase{\ifx#1#3}%
+            \def\lst@next{\lst@IfLE#2\@empty#4\@empty}%
+        \else
+            \lowercase{\ifnum`#1<`#3}\relax
+                \let\lst@next\@firstoftwo
+            \else
+                \let\lst@next\@secondoftwo
+            \fi
+        \fi
+    \fi \fi
+    \lst@next}
+\def\lst@BubbleSort#1{%
+    \ifx\@empty#1\else
+        \lst@false
+        \expandafter\lst@BubbleSort@#1\relax,\relax,%
+        \expandafter\lst@BubbleSort@\expandafter,\lst@sorted
+                                      \relax,\relax,%
+        \let#1\lst@sorted
+        \lst@if
+            \def\lst@next{\lst@BubbleSort#1}%
+            \expandafter\expandafter\expandafter\lst@next
+        \fi
+    \fi}
+\def\lst@BubbleSort@#1,#2,{%
+    \ifx\@empty#1\@empty
+        \def\lst@sorted{#2,}%
+        \def\lst@next{\lst@BubbleSort@@}%
+    \else
+        \let\lst@sorted\@empty
+        \def\lst@next{\lst@BubbleSort@@#1,#2,}%
+    \fi
+    \lst@next}
+\def\lst@BubbleSort@@#1,#2,{%
+    \ifx\relax#1\else
+        \ifx\relax#2%
+            \lst@lAddTo\lst@sorted{#1,}%
+            \expandafter\expandafter\expandafter\lst@BubbleSort@@@
+        \else
+            \lst@IfLE #1\relax\@empty #2\relax\@empty
+                          {\lst@lAddTo\lst@sorted{#1,#2,}}%
+                {\lst@true \lst@lAddTo\lst@sorted{#2,#1,}}%
+            \expandafter\expandafter\expandafter\lst@BubbleSort@@
+        \fi
+    \fi}
+\def\lst@BubbleSort@@@#1\relax,{}
+\endinput
+%%
+%% End of file `lstdoc.sty'.

+ 595 - 0
docs/styles/lstlang1.sty

@@ -0,0 +1,595 @@
+%%
+%% This is file `lstlang1.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lstdrvrs.dtx  (with options: `lang1')
+%% 
+%% (w)(c) 1996/1997/1998/1999/2000 Carsten Heinz and/or any other author
+%% listed elsewhere 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.
+%%
+%% This file is completely free and comes without any warranty.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+%%
+%% Ada 95 definition (c) Torsten Neuer <[email protected]>
+%%
+\lst@definelanguage[95]{Ada}[83]{Ada}%
+  {morekeywords={abstract,aliased,protected,requeue,tagged,until}}%
+\lst@definelanguage[83]{Ada}%
+  {morekeywords={abort,abs,accept,access,all,and,array,at,begin,body,%
+      case,constant,declare,delay,delta,digits,do,else,elsif,end,entry,%
+      exception,exit,for,function,generic,goto,if,in,is,limited,loop,%
+      mod,new,not,null,of,or,others,out,package,pragma,private,%
+      procedure,raise,range,record,rem,renames,return,reverse,select,%
+      separate,subtype,task,terminate,then,type,use,when,while,with,%
+      xor},%
+   sensitive=f,%
+   morecomment=[l]--,%
+   morestring=[m]",% percent not defined as stringizer so far
+   morestring=[m]'%
+  }[keywords,comments,strings]%
+\lst@definelanguage[Visual]{C++}[ANSI]{C++}%
+  {morekeywords={__asm,__based,__cdecl,__declspec,dllexport,%
+      dllimport,__except,__fastcall,__finally,__inline,__int8,__int16,%
+      __int32,__int64,naked,__stdcall,thread,__try,__leave},%
+  }%
+\lst@definelanguage[ANSI]{C++}[ANSI]{C}%
+  {morekeywords={asm,bad_cast,bad_typeid,bool,catch,class,const_cast,%
+      delete,dynamic_cast,false,friend,inline,namespace,new,operator,%
+      private,protected,public,reinterpret_cast,static_cast,template,%
+      this,throw,true,try,type_info,typeid,using,virtual,xalloc,%
+      __multiple_inheritance,__single_inheritance,%
+      __virtual_inheritance},%
+   morecomment=[l]//%
+  }%
+%%
+%% Objective-C definition (c) 1997 Detlev Droege
+%%                                 <[email protected]>
+%%
+\lst@definelanguage[Objective]{C}[ANSI]{C}
+  {morekeywords={bycopy,id,in,inout,oneway,out,self,super,%
+      @class,@defs,@encode,@end,@implementation,@interface,@private,%
+      @protected,@protocol,@public,@selector},%
+   morecomment=[l]//,%
+   moredirectives={import}%
+  }%
+\lst@definelanguage[ANSI]{C}%
+  {morekeywords={auto,break,case,char,const,continue,default,do,double,%
+      else,enum,extern,float,for,goto,if,int,long,register,return,%
+      short,signed,sizeof,static,struct,switch,typedef,union,unsigned,%
+      void,volatile,while},%
+   sensitive,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[b]",%
+   morestring=[b]',%
+   moredirectives={define,elif,else,endif,error,if,ifdef,ifndef,line,%
+      include,pragma,undef,warning}%
+  }[keywords,comments,strings,directives]%
+%%
+%% csh definition (c) 1998 Kai Below <[email protected]>
+%%
+\lst@definelanguage{csh}
+  {morekeywords={alias,awk,cat,echo,else,end,endif,endsw,exec,exit,%
+      foreach,glob,goto,history,if,logout,nice,nohup,onintr,repeat,sed,%
+      set,setenv,shift,source,switch,then,time,while,umask,unalias,%
+      unset,wait,while,@,env,argv,child,home,ignoreeof,noclobber,%
+      noglob,nomatch,path,prompt,shell,status,verbose,print,printf,%
+      sqrt,BEGIN,END},%
+   morecomment=[l]\#,%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+\lst@definelanguage[90]{Fortran}[95]{Fortran}{}
+\lst@definelanguage[95]{Fortran}[77]{Fortran}%
+  {deletekeywords=SAVE,
+   morekeywords={ACTION,ADVANCE,ALLOCATE,ALLOCATABLE,ASSIGNMENT,CASE,%
+      CONTAINS,CYCLE,DEALLOCATE,DEFAULT,DELIM,EXIT,INCLUDE,IN,NONE,IN,%
+      OUT,INTENT,INTERFACE,IOLENGTH,KIND,LEN,MODULE,NAME,NAMELIST,NMT,%
+      NULLIFY,ONLY,OPERATOR,OPTIONAL,OUT,PAD,POINTER,POSITION,PRIVATE,%
+      PUBLIC,READWRITE,RECURSIVE,RESULT,SELECT,SEQUENCE,SIZE,STAT,%
+      TARGET,USE,WHERE,WHILE,BLOCKDATA,DOUBLEPRECISION,ELSEIF,%
+      ENDBLOCKDATA,ENDDO,ENDFILE,ENDFUNCTION,ENDIF,ENDINTERFACE,%
+      ENDMODULE,ENDPROGRAM,ENDSELECT,ENDSUBROUTINE,ENDTYPE,ENDWHERE,%
+      GOTO,INOUT,SELECTCASE},%
+   morecomment=[l]!,%
+   deletecomment=[f]% no fixed comment line: 1998 Magne Rudshaug
+  }%
+\lst@definelanguage[77]{Fortran}%
+  {morekeywords={ACCESS,ASSIGN,BACKSPACE,BLANK,BLOCK,CALL,CHARACTER,%
+      CLOSE,COMMON,COMPLEX,CONTINUE,DATA,DIMENSION,DIRECT,DO,DOUBLE,%
+      ELSE,END,ENTRY,EOF,EQUIVALENCE,ERR,EXIST,EXTERNAL,FILE,FMT,FORM,%
+      FORMAT,FORMATTED,FUNCTION,GO,TO,IF,IMPLICIT,INQUIRE,INTEGER,%
+      INTRINSIC,IOSTAT,LOGICAL,NAMED,NEXTREC,NUMBER,OPEN,OPENED,%
+      PARAMETER,PAUSE,PRECISION,PRINT,PROGRAM,READ,REAL,REC,RECL,%
+      RETURN,REWIND,SEQUENTIAL,STATUS,STOP,SUBROUTINE,THEN,TYPE,%
+      UNFORMATTED,UNIT,WRITE,SAVE},%
+   sensitive=f,%% not Fortran standard %%
+   morecomment=[f]*Cc,%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+\lst@definelanguage{HTML}%
+  {morekeywords={A,ADDRESS,APPLET,B,BASE,BASEFONT,BIG,BLOCKQUOTE,BODY,%
+      BR,CENTER,CITE,CODE,DFN,DIR,DIV,DOCTYPE,EM,FONT,FORM,HEAD,HR,%
+      H1,H2,H3,H4,H5,H6,HTML,I,IMG,INPUT,ISINDEX,KBD,LI,LINK,LISTING,%
+      MAP,META,MENU,P,PLAINTEXT,PRE,OL,SAMP,SCRIPT,SELECT,SMALL,STRIKE,%
+      STRING,SUB,SUP,STYLE,TABLE,TEXTAREA,TITLE,TT,U,UL,VAR,XMP,%
+      action,align,alink,alt,background,bgcolor,border,cellpadding,%
+      cellspacing,checked,code,codebase,color,cols,colspan,entype,%
+      height,href,hspace,ismap,link,maxlength,method,multiple,name,%
+      noshade,nowrap,rel,rev,rows,rowspan,selected,shape,size,src,text,%
+      title,type,usemap,valign,value,vlink,vspace,width},%
+   keywordsinside=<>,
+   sensitive=f,%
+   morestring=[d]",% ??? doubled
+   MoreSelectCharTable=%
+      \lst@CArgX--\relax\lst@CommentB\lst@GPmode{}{}%
+          {\ifnum\lst@mode=\lst@insidemode\else
+               \expandafter\@gobblethree
+           \fi}\lst@commentstyle
+      \lst@CArgX--\relax\lst@CommentE\lst@GPmode{}{}{}%
+  }[keywords,comments,strings,html]%
+\lst@definelanguage{Java}%
+  {morekeywords={abstract,boolean,break,byte,case,catch,char,class,%
+      const,continue,default,do,double,else,extends,final,finally,%
+      float,for,goto,if,implements,import,instanceof,int,interface,%
+      long,native,new,null,package,private,protected,public,return,%
+      short,static,super,switch,synchronized,this,throw,throws,%
+      transient,try,void,volatile,while,true,false},%
+   sensitive,%
+   morecomment=[l]//,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[b]",%
+   morestring=[b]',%
+  }[keywords,comments,strings]%
+\lst@definelanguage{Matlab}%
+  {morekeywords={gt,lt,gt,lt,amp,abs,acos,acosh,acot,acoth,acsc,acsch,%
+      all,angle,ans,any,asec,asech,asin,asinh,atan,atan2,atanh,auread,%
+      auwrite,axes,axis,balance,bar,bessel,besselk,bessely,beta,%
+      betainc,betaln,blanks,bone,break,brighten,capture,cart2pol,%
+      cart2sph,caxis,cd,cdf2rdf,cedit,ceil,chol,cla,clabel,clc,clear,%
+      clf,clock,close,colmmd,Colon,colorbar,colormap,ColorSpec,colperm,%
+      comet,comet3,compan,compass,computer,cond,condest,conj,contour,%
+      contour3,contourc,contrast,conv,conv2,cool,copper,corrcoef,cos,%
+      cosh,cot,coth,cov,cplxpair,cputime,cross,csc,csch,csvread,%
+      csvwrite,cumprod,cumsum,cylinder,date,dbclear,dbcont,dbdown,%
+      dbquit,dbstack,dbstatus,dbstep,dbstop,dbtype,dbup,ddeadv,ddeexec,%
+      ddeinit,ddepoke,ddereq,ddeterm,ddeunadv,deblank,dec2hex,deconv,%
+      del2,delete,demo,det,diag,diary,diff,diffuse,dir,disp,dlmread,%
+      dlmwrite,dmperm,dot,drawnow,echo,eig,ellipj,ellipke,else,elseif,%
+      end,engClose,engEvalString,engGetFull,engGetMatrix,engOpen,%
+      engOutputBuffer,engPutFull,engPutMatrix,engSetEvalCallback,%
+      engSetEvalTimeout,engWinInit,eps,erf,erfc,erfcx,erfinv,error,%
+      errorbar,etime,etree,eval,exist,exp,expint,expm,expo,eye,fclose,%
+      feather,feof,ferror,feval,fft,fft2,fftshift,fgetl,fgets,figure,%
+      fill,fill3,filter,filter2,find,findstr,finite,fix,flag,fliplr,%
+      flipud,floor,flops,fmin,fmins,fopen,for,format,fplot,fprintf,%
+      fread,frewind,fscanf,fseek,ftell,full,function,funm,fwrite,fzero,%
+      gallery,gamma,gammainc,gammaln,gca,gcd,gcf,gco,get,getenv,%
+      getframe,ginput,global,gplot,gradient,gray,graymon,grid,griddata,%
+      gtext,hadamard,hankel,help,hess,hex2dec,hex2num,hidden,hilb,hist,%
+      hold,home,hostid,hot,hsv,hsv2rgb,if,ifft,ifft2,imag,image,%
+      imagesc,Inf,info,input,int2str,interp1,interp2,interpft,inv,%
+      invhilb,isempty,isglobal,ishold,isieee,isinf,isletter,isnan,%
+      isreal,isspace,issparse,isstr,jet,keyboard,kron,lasterr,lcm,%
+      legend,legendre,length,lin2mu,line,linspace,load,log,log10,log2,%
+      loglog,logm,logspace,lookfor,lower,ls,lscov,lu,magic,matClose,%
+      matDeleteMatrix,matGetDir,matGetFp,matGetFull,matGetMatrix,%
+      matGetNextMatrix,matGetString,matlabrc,matlabroot,matOpen,%
+      matPutFull,matPutMatrix,matPutString,max,mean,median,menu,mesh,%
+      meshc,meshgrid,meshz,mexAtExit,mexCallMATLAB,mexdebug,%
+      mexErrMsgTxt,mexEvalString,mexFunction,mexGetFull,mexGetMatrix,%
+      mexGetMatrixPtr,mexPrintf,mexPutFull,mexPutMatrix,mexSetTrapFlag,%
+      min,more,movie,moviein,mu2lin,mxCalloc,mxCopyCharacterToPtr,%
+      mxCopyComplex16ToPtr,mxCopyInteger4ToPtr,mxCopyPtrToCharacter,%
+      mxCopyPtrToComplex16,mxCopyPtrToInteger4,mxCopyPtrToReal8,%
+      mxCopyReal8ToPtr,mxCreateFull,mxCreateSparse,mxCreateString,%
+      mxFree,mxFreeMatrix,mxGetIr,mxGetJc,mxGetM,mxGetN,mxGetName,%
+      mxGetNzmax,mxGetPi,mxGetPr,mxGetScalar,mxGetString,mxIsComplex,%
+      mxIsFull,mxIsNumeric,mxIsSparse,mxIsString,mxIsTypeDouble,%
+      mxSetIr,mxSetJc,mxSetM,mxSetN,mxSetName,mxSetNzmax,mxSetPi,%
+      mxSetPr,NaN,nargchk,nargin,nargout,newplot,nextpow2,nnls,nnz,%
+      nonzeros,norm,normest,null,num2str,nzmax,ode23,ode45,orient,orth,%
+      pack,pascal,patch,path,pause,pcolor,pi,pink,pinv,plot,plot3,%
+      pol2cart,polar,poly,polyder,polyeig,polyfit,polyval,polyvalm,%
+      pow2,print,printopt,prism,prod,pwd,qr,qrdelete,qrinsert,quad,%
+      quad8,quit,quiver,qz,rand,randn,randperm,rank,rat,rats,rbbox,%
+      rcond,real,realmax,realmin,refresh,rem,reset,reshape,residue,%
+      return,rgb2hsv,rgbplot,rootobject,roots,rose,rosser,rot90,rotate,%
+      round,rref,rrefmovie,rsf2csf,save,saxis,schur,sec,sech,semilogx,%
+      semilogy,set,setstr,shading,sign,sin,sinh,size,slice,sort,sound,%
+      spalloc,sparse,spaugment,spconvert,spdiags,specular,speye,spfun,%
+      sph2cart,sphere,spinmap,spline,spones,spparms,sprandn,sprandsym,%
+      sprank,sprintf,spy,sqrt,sqrtm,sscanf,stairs,startup,std,stem,%
+      str2mat,str2num,strcmp,strings,strrep,strtok,subplot,subscribe,%
+      subspace,sum,surf,surface,surfc,surfl,surfnorm,svd,symbfact,%
+      symmmd,symrcm,tan,tanh,tempdir,tempname,terminal,text,tic,title,%
+      toc,toeplitz,trace,trapz,tril,triu,type,uicontrol,uigetfile,%
+      uimenu,uiputfile,unix,unwrap,upper,vander,ver,version,view,%
+      viewmtx,waitforbuttonpress,waterfall,wavread,wavwrite,what,%
+      whatsnew,which,while,white,whitebg,who,whos,wilkinson,wk1read,%
+      wk1write,xlabel,xor,ylabel,zeros,zlabel,zoom},%
+   sensitive,%
+   morecomment=[l]\%,%
+   morestring=[m]'%
+  }[keywords,comments,strings]%
+%%
+%% Mathematica definitions (c) 1999 Michael Wiese <[email protected]>
+%%
+\lst@definelanguage[3.0]{Mathematica}[1.0]{Mathematica}%
+  {morekeywords={Abort,AbortProtect,AbsoluteDashing,AbsolutePointSize,%
+      AbsoluteThickness,AbsoluteTime,AccountingFormAiry,AiPrime,AiryBi,%
+      AiryBiPrime,Alternatives,AnchoredSearch,AxesEdge,AxesOrigin,%
+      AxesStyle,Background,BetaRegularized,BoxStyle,C,CheckAbort,%
+      Circle,ClebschGordan,CMYKColor,ColorFunction,ColorOutput,Compile,%
+      Compiled,CompiledFunction,ComplexExpand,ComposeList,Composition,%
+      ConstrainedMax,ConstrainedMin,Contexts,ContextToFilename,%
+      ContourLines,Contours,ContourShading,ContourSmoothing,%
+      ContourStyle,CopyDirectory,CopyFile,CosIntegral,CreateDirectory,%
+      Cuboid,Date,DeclarePackage,DefaultColor,DefaultFont,Delete,%
+      DeleteCases,DeleteDirectory,DeleteFile,Dialog,DialogIndent,%
+      DialogProlog,DialogSymbols,DigitQ,Directory,DirectoryStack,Disk,%
+      Dispatch,DownValues,DSolve,Encode,Epilog,Erfc,Evaluate,%
+      ExponentFunction,FaceGrids,FileByteCount,FileDate,FileNames,%
+      FileType,Find,FindList,FixedPointList,FlattenAt,Fold,FoldList,%
+      Frame,FrameLabel,FrameStyle,FrameTicks,FromCharacterCode,%
+      FromDate,FullGraphics,FullOptions,GammaRegularized,%
+      GaussianIntegers,GraphicsArray,GraphicsSpacing,GridLines,%
+      GroebnerBasis,Heads,HeldPart,HomeDirectory,Hue,IgnoreCases,%
+      InputStream,Install,InString,IntegerDigits,InterpolatingFunction,%
+      InterpolatingPolynomial,Interpolation,Interrupt,InverseFunction,%
+      InverseFunctions,JacobiZeta,LetterQ,LinearProgramming,ListPlay,%
+      LogGamma,LowerCaseQ,MachineNumberQ,MantissaExponent,MapIndexed,%
+      MapThread,MatchLocalNames,MatrixExp,MatrixPower,MeshRange,%
+      MeshStyle,MessageList,Module,NDSolve,NSolve,NullRecords,%
+      NullWords,NumberFormat,NumberPadding,NumberSigns,OutputStream,%
+      PaddedForm,ParentDirectory,Pause,Play,PlayRange,PlotRegion,%
+      PolygonIntersections,PolynomialGCD,PolynomialLCM,PolynomialMod,%
+      PostScript,PowerExpand,PrecisionGoal,PrimePi,Prolog,%
+      QRDecomposition,Raster,RasterArray,RealDigits,Record,RecordLists,%
+      RecordSeparators,ReleaseHold,RenameDirectory,RenameFile,%
+      ReplaceHeldPart,ReplacePart,ResetDirectory,Residue,%
+      RiemannSiegelTheta,RiemannSiegelZ,RotateLabel,SameTest,%
+      SampleDepth,SampledSoundFunction,SampledSoundList,SampleRate,%
+      SchurDecomposition,SessionTime,SetAccuracy,SetDirectory,%
+      SetFileDate,SetPrecision,SetStreamPosition,Shallow,SignPadding,%
+      SinIntegral,SixJSymbol,Skip,Sound,SpellingCorrection,%
+      SphericalRegion,Stack,StackBegin,StackComplete,StackInhibit,%
+      StreamPosition,Streams,StringByteCount,StringConversion,%
+      StringDrop,StringInsert,StringPosition,StringReplace,%
+      StringReverse,StringTake,StringToStream,SurfaceColor,%
+      SyntaxLength,SyntaxQ,TableAlignments,TableDepth,%
+      TableDirections,TableHeadings,TableSpacing,ThreeJSymbol,TimeUsed,%
+      TimeZone,ToCharacterCode,ToDate,ToHeldExpression,TokenWords,%
+      ToLowerCase,ToUpperCase,Trace,TraceAbove,TraceBackward,%
+      TraceDepth,TraceDialog,TraceForward,TraceOff,TraceOn,%
+      TraceOriginal,TracePrint,TraceScan,Trig,Unevaluated,Uninstall,%
+      UnsameQ,UpperCaseQ,UpValues,ViewCenter,ViewVertical,With,Word,%
+      WordSearch,WordSeparators},%
+    morendkeywords={Stub,Temporary,$Aborted,$BatchInput,$BatchOutput,%
+      $CreationDate,$DefaultFont,$DumpDates,$DumpSupported,$Failed,%
+      $Input,$Inspector,$IterationLimit,$Language,$Letters,$Linked,%
+      $LinkSupported,$MachineEpsilon,$MachineID,$MachineName,%
+      $MachinePrecision,$MachineType,$MaxMachineNumber,$MessageList,%
+      $MessagePrePrint,$MinMachineNumber,$ModuleNumber,$NewMessage,%
+      $NewSymbol,$Notebooks,$OperatingSystem,$Packages,$PipeSupported,%
+      $PreRead,$ReleaseNumber,$SessionID,$SoundDisplayFunction,%
+      $StringConversion,$StringOrder,$SyntaxHandler,$TimeUnit,%
+      $VersionNumber}%
+  }%
+\lst@definelanguage[1.0]{Mathematica}%
+  {morekeywords={Abs,Accuracy,AccurayGoal,AddTo,AiryAi,AlgebraicRules,%
+      AmbientLight,And,Apart,Append,AppendTo,Apply,ArcCos,ArcCosh,%
+      ArcCot,ArcCoth,ArcCsc,ArcCsch,ArcSec,ArcSech,ArcSin,ArcSinh,%
+      ArcTan,ArcTanh,Arg,ArithmeticGeometricMean,Array,AspectRatio,%
+      AtomQ,Attributes,Axes,AxesLabel,BaseForm,Begin,BeginPackage,%
+      BernoulliB,BesselI,BesselJ,BesselK,BesselY,Beta,Binomial,Blank,%
+      BlankNullSequence,BlankSequence,Block,Boxed,BoxRatios,Break,Byte,%
+      ByteCount,Cancel,Cases,Catch,Ceiling,CForm,Character,Characters,%
+      ChebyshevT,ChebyshevU,Check,Chop,Clear,ClearAll,ClearAttributes,%
+      ClipFill,Close,Coefficient,CoefficientList,Collect,ColumnForm,%
+      Complement,Complex,CompoundExpression,Condition,Conjugate,%
+      Constants,Context,Continuation,Continue,ContourGraphics,%
+      ContourPlot,Cos,Cosh,Cot,Coth,Count,Csc,Csch,Cubics,Cyclotomic,%
+      D,Dashing,Decompose,Decrement,Default,Definition,Denominator,%
+      DensityGraphics,DensityPlot,Depth,Derivative,Det,DiagonalMatrix,%
+      DigitBlock,Dimensions,DirectedInfinity,Display,DisplayFunction,%
+      Distribute,Divide,DivideBy,Divisors,DivisorSigma,Do,Dot,Drop,Dt,%
+      Dump,EdgeForm,Eigensystem,Eigenvalues,Eigenvectors,Eliminate,%
+      EllipticE,EllipticExp,EllipticF,EllipticK,EllipticLog,EllipticPi,%
+      EllipticTheta,End,EndPackage,EngineeringForm,Environment,Equal,%
+      Erf,EulerE,EulerPhi,EvenQ,Exit,Exp,Expand,ExpandAll,%
+      ExpandDenominator,ExpandNumerator,ExpIntegralE,ExpIntegralEi,%
+      Exponent,Expression,ExtendedGCD,FaceForm,Factor,FactorComplete,%
+      Factorial,Factorial2,FactorInteger,FactorList,FactorSquareFree,%
+      FactorSquareFreeList,FactorTerms,FactorTermsList,FindMinimum,%
+      FindRoot,First,Fit,FixedPoint,Flatten,Floor,FontForm,For,Format,%
+      FormatType,FortranForm,Fourier,FreeQ,FullDefinition,FullForm,%
+      Function,Gamma,GCD,GegenbauerC,General,Get,Goto,Graphics,%
+      Graphics3D,GrayLevel,Greater,GreaterEqual,Head,HermiteH,%
+      HiddenSurface,Hold,HoldForm,Hypergeometric0F1, Hypergeometric1F1,%
+      Hypergeometric2F1,HypergeometricU,Identity,IdentityMatrix,If,Im,%
+      Implies,In,Increment,Indent,Infix,Information,Inner,Input,%
+      InputForm,InputString,Insert,Integer,IntegerQ,Integrate,%
+      Intersection,Inverse,InverseFourier,InverseJacobiSN,%
+      InverseSeries,JacobiAmplitude,JacobiP,JacobiSN,JacobiSymbol,Join,%
+      Label,LaguerreL,Last,LatticeReduce,LCM,LeafCount,LegendreP,%
+      LegendreQ,LegendreType,Length,LerchPhi,Less,LessEqual,Level,%
+      Lighting,LightSources,Limit,Line,LinearSolve,LineBreak,List,%
+      ListContourPlot,ListDensityPlot,ListPlot,ListPlot3D,Literal,Log,%
+      LogicalExpand,LogIntegral,MainSolve,Map,MapAll,MapAt,MatchQ,%
+      MatrixForm,MatrixQ,Max,MaxBend,MaxMemoryUsed,MemberQ,%
+      MemoryConstrained,MemoryInUse,Mesh,Message,MessageName,Messages,%
+      Min,Minors,Minus,Mod,Modulus,MoebiusMu,Multinomial,N,NameQ,Names,%
+      NBernoulliB,Needs,Negative,Nest,NestList,NIntegrate,%
+      NonCommutativeMultiply,NonConstants,NonNegative,Normal,Not,%
+      NProduct,NSum,NullSpace,Number,NumberForm,NumberPoint,NumberQ,%
+      NumberSeparator,Numerator,O,OddQ,Off,On,OpenAppend,OpenRead,%
+      OpenTemporary,OpenWrite,Operate,Optional,Options,Or,Order,%
+      OrderedQ,Out,Outer,OutputForm,PageHeight,PageWidth,%
+      ParametricPlot,ParametricPlot3D,Part,Partition,PartitionsP,%
+      PartitionsQ,Pattern,Permutations,Plot,Plot3D,PlotDivision,%
+      PlotJoined,PlotLabel,PlotPoints,PlotRange,PlotStyle,Pochhammer,%
+      Plus,Point,PointSize,PolyGamma,Polygon,PolyLog,PolynomialQ,%
+      PolynomialQuotient,PolynomialRemainder,Position,Positive,Postfix,%
+      Power,PowerMod,PrecedenceForm,Precision,PreDecrement,Prefix,%
+      PreIncrement,Prepend,PrependTo,Prime,PrimeQ,Print,PrintForm,%
+      Product,Protect,PseudoInverse,Put,PutAppend,Quartics,Quit,%
+      Quotient,Random,Range,Rational,Rationalize,Raw,Re,Read,ReadList,%
+      Real,Rectangle,Reduce,Remove,RenderAll,Repeated,RepeatedNull,%
+      Replace,ReplaceAll,ReplaceRepeated,Rest,Resultant,Return,Reverse,%
+      RGBColor,Roots,RotateLeft,RotateRight,Round,RowReduce,Rule,%
+      RuleDelayed,Run,RunThrough,SameQ,Save,Scaled,Scan,ScientificForm,%
+      Sec,Sech,SeedRandom,Select,Sequence,SequenceForm,Series,%
+      SeriesData,Set,SetAttributes,SetDelayed,SetOptions,Shading,Share,%
+      Short,Show,Sign,Signature,Simplify,Sin,SingularValues,Sinh,%
+      Skeleton,Slot,SlotSequence,Solve,SolveAlways,Sort,%
+      SphericalHarmonicY,Splice,Sqrt,StirlingS1,StirlingS2,String,%
+      StringBreak,StringForm,StringJoin,StringLength,StringMatchQ,%
+      StringSkeleton,Subscript,Subscripted,Subtract,SubtractForm,Sum,%
+      Superscript,SurfaceGraphics,Switch,Symbol,Table,TableForm,TagSet,%
+      TagSetDelayed,TagUnset,Take,Tan,Tanh,ToString,TensorRank,TeXForm,%
+      Text,TextForm,Thickness,Thread,Through,Throw,Ticks,%
+      TimeConstrained,Times,TimesBy,Timing,ToExpression,Together,%
+      ToRules,ToString,TotalHeight,TotalWidth,Transpose,TreeForm,TrueQ,%
+      Unequal,Union,Unique,Unprotect,Unset,Update,UpSet,UpSetDelayed,%
+      ValueQ,Variables,VectorQ,ViewPoint,WeierstrassP,%
+      WeierstrassPPrime,Which,While,WorkingPrecision,Write,WriteString,%
+      Xor,ZeroTest,Zeta},%
+   morendkeywords={All,Automatic,Catalan,ComplexInfinity,Constant,%
+      Degree,E,EndOfFile,EulerGamma,False,Flat,GoldenRatio,HoldAll,%
+      HoldFirst,HoldRest,I,Indeterminate,Infinity,Listable,Locked,%
+      Modular,None,Null,OneIdentity,Orderless,Pi,Protected,%
+      ReadProtected,True,$CommandLine,$Context,$ContextPath,$Display,%
+      $DisplayFunction,$Echo,$Epilog,$IgnoreEOF,$Line,$Messages,%
+      $Output,$Path,$Post,$Pre,$PrePrint,$RecursionLimit,$System,%
+      $Urgent,$Version},%
+   sensitive,%
+   morecomment=[s]{(*}{*)},%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+\lst@definelanguage[XSC]{Pascal}[Standard]{Pascal}
+  {deletekeywords={alfa,byte,pack,unpack},% 1998 Andreas Stephan
+   morekeywords={dynamic,external,forward,global,module,nil,operator,%
+      priority,sum,type,use,dispose,mark,page,release,cimatrix,%
+      cinterval,civector,cmatrix,complex,cvector,dotprecision,imatrix,%
+      interval,ivector,rmatrix,rvector,string,im,inf,re,sup,chr,comp,%
+      eof,eoln,expo,image,ival,lb,lbound,length,loc,mant,maxlength,odd,%
+      ord,pos,pred,round,rval,sign,substring,succ,trunc,ub,ubound}%
+  }%
+\lst@definelanguage[Borland6]{Pascal}[Standard]{Pascal}
+  {morekeywords={asm,constructor,destructor,implementation,inline,%
+      interface,nil,object,shl,shr,string,unit,uses,xor},%
+   morendkeywords={Abs,Addr,ArcTan,Chr,Concat,Copy,Cos,CSeg,DiskFree,%
+      DiskSize,DosExitCode,DosVersion,DSeg,EnvCount,EnvStr,Eof,Eoln,%
+      Exp,FExpand,FilePos,FileSize,Frac,FSearch,GetBkColor,GetColor,%
+      GetDefaultPalette,GetDriverName,GetEnv,GetGraphMode,GetMaxMode,%
+      GetMaxX,GetMaxY,GetModeName,GetPaletteSize,GetPixel,GetX,GetY,%
+      GraphErrorMsg,GraphResult,Hi,ImageSize,InstallUserDriver,%
+      InstallUserFont,Int,IOResult,KeyPressed,Length,Lo,MaxAvail,%
+      MemAvail,MsDos,Odd,Ofs,Ord,OvrGetBuf,OvrGetRetry,ParamCount,%
+      ParamStr,Pi,Pos,Pred,Ptr,Random,ReadKey,Round,SeekEof,SeekEoln,%
+      Seg,SetAspectRatio,Sin,SizeOf,Sound,SPtr,Sqr,Sqrt,SSeg,Succ,%
+      Swap,TextHeight,TextWidth,Trunc,TypeOf,UpCase,WhereX,WhereY,%
+      Append,Arc,Assign,AssignCrt,Bar,Bar3D,BlockRead,BlockWrite,ChDir,%
+      Circle,ClearDevice,ClearViewPort,Close,CloseGraph,ClrEol,ClrScr,%
+      Dec,Delay,Delete,DelLine,DetectGraph,Dispose,DrawPoly,Ellipse,%
+      Erase,Exec,Exit,FillChar,FillEllipse,FillPoly,FindFirst,FindNext,%
+      FloodFill,Flush,FreeMem,FSplit,GetArcCoords,GetAspectRatio,%
+      GetDate,GetDefaultPalette,GetDir,GetCBreak,GetFAttr,%
+      GetFillSettings,GetFTime,GetImage,GetIntVec,GetLineSettings,%
+      GetMem,GetPalette,GetTextSettings,GetTime,GetVerify,%
+      GetViewSettings,GoToXY,Halt,HighVideo,Inc,InitGraph,Insert,%
+      InsLine,Intr,Keep,Line,LineRel,LineTo,LowVideo,Mark,MkDir,Move,%
+      MoveRel,MoveTo,MsDos,New,NormVideo,NoSound,OutText,OutTextXY,%
+      OvrClearBuf,OvrInit,OvrInitEMS,OvrSetBuf,PackTime,PieSlice,%
+      PutImage,PutPixel,Randomize,Rectangle,Release,Rename,%
+      RestoreCrtMode,RmDir,RunError,Sector,Seek,SetActivePage,%
+      SetAllPalette,SetBkColor,SetCBreak,SetColor,SetDate,SetFAttr,%
+      SetFillPattern,SetFillStyle,SetFTime,SetGraphBufSize,%
+      SetGraphMode,SetIntVec,SetLineStyle,SetPalette,SetRGBPalette,%
+      SetTextBuf,SetTextJustify,SetTextStyle,SetTime,SetUserCharSize,%
+      SetVerify,SetViewPort,SetVisualPage,SetWriteMode,Sound,Str,%
+      SwapVectors,TextBackground,TextColor,TextMode,Truncate,%
+      UnpackTime,Val,Window}%
+  }%
+\lst@definelanguage[Standard]{Pascal}%
+  {morekeywords={alfa,and,array,begin,boolean,byte,case,char,const,div,%
+      do,downto,else,end,false,file,for,function,get,goto,if,in,%
+      integer,label,maxint,mod,new,not,of,or,pack,packed,page,program,%
+      put,procedure,read,readln,real,record,repeat,reset,rewrite,set,%
+      text,then,to,true,type,unpack,until,var,while,with,write,%
+      writeln},%
+   sensitive=f,%
+   morecomment=[d]{(*}{*)}{\{}{\}},%
+   morestring=[d]'%
+  }[keywords,comments,strings]%
+\lst@definelanguage{Perl}%
+  {morekeywords={abs,accept,alarm,atan2,bind,binmode,bless,caller,%
+      chdir,chmod,chomp,chop,chown,chr,chroot,close,closedir,connect,%
+      continue,cos,crypt,dbmclose,dbmopen,defined,delete,die,do,dump,%
+      each,else,elsif,endgrent,endhostent,endnetent,endprotoent,%
+      endpwent,endservent,eof,eval,exec,exists,exit,exp,fcntl,fileno,%
+      flock,for,foreach,fork,format,formline,getc,getgrent,getgrgid,%
+      getgrnam,gethostbyaddr,gethostbyname,gethostent,getlogin,%
+      getnetbyaddr,getnetbyname,getnetent,getpeername,getpgrp,%
+      getppid,getpriority,getprotobyname,getprotobynumber,getprotoent,%
+      getpwent,getpwnam,getpwuid,getservbyname,getservbyport,%
+      getservent,getsockname,getsockopt,glob,gmtime,goto,grep,hex,if,%
+      import,index,int,ioctl,join,keys,kill,last,lc,lcfirst,length,%
+      link,listen,local,localtime,log,lstat,m,map,mkdir,msgctl,msgget,%
+      msgrcv,msgsnd,my,next,no,oct,open,opendir,ord,pack,package,pipe,%
+      pop,pos,print,printf,prototype,push,q,qq,quotemeta,qw,qx,rand,%
+      read,readdir,readlink,recv,redo,ref,rename,require,reset,return,%
+      reverse,rewinddir,rindex,rmdir,s,scalar,seek,seekdir,select,%
+      semctl,semget,semop,send,setgrent,sethostent,setnetent,setpgrp,%
+      setpriority,setprotoent,setpwent,setservent,setsockopt,shift,%
+      shmctl,shmget,shmread,shmwrite,shutdown,sin,sleep,socket,%
+      socketpair,sort,splice,split,sprintf,sqrt,srand,stat,study,sub,%
+      substr,symlink,syscall,sysopen,sysread,system,syswrite,tell,%
+      telldir,tie,tied,time,times,tr,truncate,uc,ucfirst,umask,undef,%
+      unless,unlink,unpack,unshift,untie,until,use,utime,values,vec,%
+      wait,waitpid,wantarray,warn,while,write,y},%
+   sensitive,%
+   morecomment=[l]\#,%
+   morestring=[b]",%
+   morestring=[b]',%
+   MoreSelectCharTable=%
+      \lst@ReplaceInput{\$\#}{\lst@ProcessOther\$\lst@ProcessOther\#}%
+  }[keywords,comments,strings]%
+%%
+%% POV definition (c) 1999 Berthold Höllmann <[email protected]>
+%%
+\lst@definelanguage{POV}%
+  {morekeywords={abs,absorption,acos,acosh,adaptive,adc_bailout,agate,%
+      agate_turb,all,alpha,ambient,ambient_light,angle,aperture,append,%
+      arc_angle,area_light,array,asc,asin,asinh,assumed_gamma,atan,%
+      atan2,atanh,average,background,bezier_spline,bicubic_patch,%
+      black_hole,blob,blue,blur_samples,bounded_by,box,boxed,bozo,%
+      break,brick,brick_size,brightness,brilliance,bumps,bump_map,%
+      bump_size,camera,case,caustics,ceil,checker,chr,clipped_by,clock,%
+      clock_delta,color,color_map,colour,colour_map,component,%
+      composite,concat,cone,confidence,conic_sweep,control0,control1,%
+      cos,cosh,count,crackle,crand,cube,cubic,cubic_spline,cubic_wave,%
+      cylinder,cylindrical,debug,declare,default,defined,degrees,%
+      density,density_file,density_map,dents,difference,diffuse,%
+      dimensions,dimension_size,direction,disc,distance,%
+      distance_maximum,div,eccentricity,else,emission,end,error,%
+      error_bound,exp,extinction,fade_distance,fade_power,falloff,%
+      falloff_angle,false,fclose,file_exists,filter,finish,fisheye,%
+      flatness,flip,floor,focal_point,fog,fog_alt,fog_offset,fog_type,%
+      fopen,frequency,gif,global_settings,gradient,granite,%
+      gray_threshold,green,height_field,hexagon,hf_gray_16,hierarchy,%
+      hollow,hypercomplex,if,ifdef,iff,ifndef,image_map,include,int,%
+      interior,interpolate,intersection,intervals,inverse,ior,irid,%
+      irid_wavelength,jitter,julia_fractal,lambda,lathe,leopard,%
+      light_source,linear_spline,linear_sweep,local,location,log,%
+      looks_like,look_at,low_error_factor,macro,mandel,map_type,marble,%
+      material,material_map,matrix,max,max_intersections,max_iteration,%
+      max_trace_level,media,media_attenuation,media_interaction,merge,%
+      mesh,metallic,min,minimum_reuse,mod,mortar,nearest_count,no,%
+      normal,normal_map,no_shadow,number_of_waves,object,octaves,off,%
+      offset,omega,omnimax,on,once,onion,open,orthographic,panoramic,%
+      perspective,pgm,phase,phong,phong_size,pi,pigment,pigment_map,%
+      planar,plane,png,point_at,poly,polygon,poly_wave,pot,pow,ppm,%
+      precision,prism,pwr,quadratic_spline,quadric,quartic,quaternion,%
+      quick_color,quick_colour,quilted,radial,radians,radiosity,radius,%
+      rainbow,ramp_wave,rand,range,ratio,read,reciprocal,%
+      recursion_limit,red,reflection,reflection_exponent,refraction,%
+      render,repeat,rgb,rgbf,rgbft,rgbt,right,ripples,rotate,roughness,%
+      samples,scale,scallop_wave,scattering,seed,shadowless,sin,%
+      sine_wave,sinh,sky,sky_sphere,slice,slope_map,smooth,%
+      smooth_triangle,sor,specular,sphere,spherical,spiral1,spiral2,%
+      spotlight,spotted,sqr,sqrt,statistics,str,strcmp,strength,strlen,%
+      strlwr,strupr,sturm,substr,superellipsoid,switch,sys,t,tan,tanh,%
+      text,texture,texture_map,tga,thickness,threshold,tightness,tile2,%
+      tiles,torus,track,transform,translate,transmit,triangle,%
+      triangle_wave,true,ttf,turbulence,turb_depth,type,u,%
+      ultra_wide_angle,undef,union,up,use_color,use_colour,use_index,%
+      u_steps,v,val,variance,vaxis_rotate,vcross,vdot,version,vlength,%
+      vnormalize,vrotate,v_steps,warning,warp,water_level,waves,while,%
+      width,wood,wrinkles,write,x,y,yes,z},%
+   moredirectives={break,case,debug,declare,default,else,end,fclose,%
+      fopen,local,macro,read,render,statistics,switch,undef,version,%
+      warning,write},%
+   sensitive,%
+   morecomment=[l]//,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[d]",%
+  }[keywords,directives,comments,strings]%
+%%
+%% Python definition (c) 1998 Michael Weber
+%%                            <[email protected]>
+%%
+\lst@definelanguage{Python}%
+  {morekeywords={access,and,break,class,continue,def,del,elif,else,%
+      except,exec,finally,for,from,global,if,import,in,is,lambda,not,%
+      or,pass,print,raise,return,try,while},%
+   sensitive=true,%
+   morecomment=[l]\#,%
+   morecomment=[s]{'''}{'''},% used for documentation text
+   morestring=',%
+   morestring="%
+  }%
+%%
+%% SQL definition (c) 1998 Christian Haul
+%%                         <[email protected]>
+%%
+\lst@definelanguage{SQL}%
+  {morekeywords={ABSOLUTE,ACTION,ADD,ALLOCATE,ALTER,ARE,ASSERTION,AT,%
+      BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,%
+      CATALOG,CHAR,CHAR_LENGTH,CHARACTER_LENGTH,CLUSTER,COALESCE,%
+      COLLATE,COLLATION,COLUMN,CONNECT,CONNECTION,CONSTRAINT,%
+      CONSTRAINTS,CONVERT,CORRESPONDING,CREATE,CROSS,CURRENT_DATE,%
+      CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,DATE,DAY,DEALLOCATE,%
+      DEC,DECIMAL,DEFERRABLE,DEFERED,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,%
+      DISCONNECT,DOMAIN,DROP,ELSE,END,EXEC,EXCEPT,EXCEPTION,EXECUTE,%
+      EXTERNAL,EXTRACT,FALSE,FIRST,FLOAT,FOREIGN,FROM,FULL,GET,GLOBAL,%
+      GRAPHIC,HAVING,HOUR,IDENTITY,IMMEDIATE,INDEX,INITIALLY,INNER,%
+      INPUT,INSENSITIVE,INT,INTEGER,INTERSECT,INTERVAL,ISOLATION,JOIN,%
+      KEY,LAST,LEADING,LEFT,LEVEL,LOCAL,LOWER,MATCH,MINUTE,MONTH,NAMES,%
+      NATIONAL,NATURAL,NCHAR,NEXT,NO,NOT,NULL,NULLIF,OCTET_LENGTH,ON,%
+      ONLY,ORDERED,OUTER,OUTPUT,OVERLAPS,PAD,PARTIAL,POSITION,PREPARE,%
+      PRESERVE,PRIMARY,PRIOR,READ,RELATIVE,RESTRICT,REVOKE,RIGHT,ROWS,%
+      SCROLL,SECOND,SELECT,SESSION,SESSION_USER,SIZE,SMALLINT,SPACE,%
+      SQLSTATE,SUBSTRING,SYSTEM_USER,TABLE,TEMPORARY,THEN,TIME,%
+      TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,TRAILING,TRANSACTION,%
+      TRANSLATE,TRANSLATION,TRIM,TRUE,UNIQUE,UNKNOWN,UPPER,USAGE,USING,%
+      VALUE,VARCHAR,VARGRAPHIC,VARYING,WHEN,WHERE,WRITE,YEAR,ZONE},%
+   sensitive,%
+   morecomment=[l]--,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[d]',%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+%%
+%% VHDL definition (c) 1997 Kai Wollenweber <[email protected]>
+%%
+\lst@definelanguage{VHDL}%
+  {morekeywords={ALL,ARCHITECTURE,ABS,AND,ASSERT,ARRAY,AFTER,ALIAS,%
+      ACCESS,ATTRIBUTE,BEGIN,BODY,BUS,BLOCK,BUFFER,CONSTANT,CASE,%
+      COMPONENT,CONFIGURATION,DOWNTO,ELSE,ELSIF,END,ENTITY,EXIT,%
+      FUNCTION,FOR,FILE,GENERIC,GENERATE,GUARDED,GROUP,IF,IN,INOUT,IS,%
+      INERTIAL,IMPURE,LIBRARY,LOOP,LABEL,LITERAL,LINKAGE,MAP,MOD,NOT,%
+      NOR,NAND,NULL,NEXT,NEW,OUT,OF,OR,OTHERS,ON,OPEN,PROCESS,PORT,%
+      PACKAGE,PURE,PROCEDURE,POSTPONED,RANGE,REM,ROL,ROR,REPORT,RECORD,%
+      RETURN,REGISTER,REJECT,SIGNAL,SUBTYPE,SLL,SRL,SLA,SRA,SEVERITY,%
+      SELECT,THEN,TYPE,TRANSPORT,TO,USE,UNITS,UNTIL,VARIABLE,WHEN,WAIT,%
+      WHILE,XOR,XNOR},%
+   sensitive=f,% 1998 Gaurav Aggarwal
+   morecomment=[l]--,%
+   morestring=[d]{"}%
+  }[keywords,comments,strings]%
+\endinput
+%%
+%% End of file `lstlang1.sty'.

+ 634 - 0
docs/styles/lstlang2.sty

@@ -0,0 +1,634 @@
+%%
+%% This is file `lstlang2.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lstdrvrs.dtx  (with options: `lang2')
+%% 
+%% (w)(c) 1996/1997/1998/1999/2000 Carsten Heinz and/or any other author
+%% listed elsewhere 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.
+%%
+%% This file is completely free and comes without any warranty.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+%%
+%% Abap definition by Knut Lickert <[email protected]>
+%%
+\lst@definelanguage[R/3 4.6C]{ABAP}[R/3 3.1]{ABAP}%
+  {morekeywords={method,ref,class,create,object},%
+   literate={->}{{$\to$}}1,%
+  }[keywords,comments,strings]
+\lst@definelanguage[R/3 3.1]{ABAP}[R/2 5.0]{ABAP}{}%
+\lst@definelanguage[R/2 5.0]{ABAP}%
+  {sensitive=f,%
+   morekeywords={*,add,after,alias,analyzer,and,append,area,assign,at,%
+        authority-check,before,binary,blank,break-point,calendar,call,%
+        case,change,changing,check,clear,cnt,co,collect,commit,common,%
+        component,compute,condense,cos,cp,cs,currency-conversion,%
+        cursor,data,database,dataset,decimals,define,delete,dequeue,%
+        describe,detail,dialog,directory,div,divide,do,documentation,%
+        during,dynpro,else,end-of-page,end-of-selection,endat,endcase,%
+        enddo,endfor,endform,endif,endloop,endmodule,endselect,%
+        endwhile,enqueue,exceptions,exit,exp,export,exporting,extract,%
+        field,field-groups,field-symbols,find,for,form,format,free,%
+        from,function,generating,get,giving,hide,id,if,import,%
+        importing,in,incl,include,initial,initialization,input,insert,%
+        interrupt,into,is,language,leave,like,line,lines,line-count,
+        line-selection,list-processing,load,local,log,logfile,loop,%
+        margin,mark,mask,memory,menue,message,mod,modify,module,move,%
+        move-text,multiply,na,new,new-line,new-page,no-gaps,np,ns,%
+        number,obligatory,occurs,of,on,or,others,output,parameter,%
+        parameters,parts,perform,pf-status,places,position,process,%
+        raise,raising,ranges,read,refresh,refresh-dynpro,reject,remote,%
+        replace,report,reserve,reset,restart,run,screen,scroll,search,%
+        segments,select,select-options,selection-screen,set,shift,sin,%
+        single,sqrt,start-of-selection,statement,structure,submit,%
+        subtract,summary,summing,suppress,system,table,tables,task,%
+        text,time,to,top-of-page,trace,transaction,transfer,%
+        transfer-dynpro,translate,type,unpack,update,user-command,%
+        using,value,when,where,while,window,with,workfile,write,},%
+  morecomment=[l]",%
+  morecomment=[f][0]*,%
+  }[keywords,comments,strings]
+\lst@definelanguage[R/2 4.3]{ABAP}[R/2 5.0]{ABAP}%
+  {deletekeywords={function,importing,exporting,changing,exceptions,%
+        raise,raising}%
+  }[keywords,comments,strings]
+%%
+%% Corba IDL definition (c) 1999 Jens T. Berger Thielemann
+%%                               <[email protected]>
+%%
+\lst@definelanguage[CORBA]{IDL}%
+  {morekeywords={any,attribute,boolean,case,char,const,context,default,%
+      double,enum,exception,fixed,float,in,inout,interface,long,module,%
+      native,Object,octet,oneway,out,raises,readonly,sequence,short,%
+      string,struct,switch,typedef,union,unsigned,void,wchar,wstring,%
+      FALSE,TRUE},%
+   sensitive,%
+   moredirectives={define,elif,else,endif,error,if,ifdef,ifndef,line,%
+      include,pragma,undef,warning},%
+   morecomment=[l]//,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[b]"%
+  }[keywords,comments,strings]%
+%%
+%% (Objective) Caml definition (c) 1999 Patrick Cousot
+%%                                      <[email protected]>
+%%
+%% Objective CAML and Caml light are freely available, together with a
+%% reference manual, at URL ftp.inria.fr/lang/caml-light for the Unix,
+%% Windows and Macintosh OS operating systems.
+%%
+\lst@definelanguage[Objective]{Caml}[light]{Caml}
+  {deletekeywords={not,prefix,value,where},%
+   morekeywords={assert,asr,class,closed,constraint,external,false,%
+      functor,include,inherit,land,lazy,lor,lsl,lsr,lxor,method,mod,%
+      module,new,open,parser,private,sig,struct,true,val,virtual,when},%
+  }%
+\lst@definelanguage[light]{Caml}
+  {morekeywords={and,as,begin,do,done,downto,else,end,exception,for,%
+      fun,function,if,in,let,match,mutable,not,of,or,prefix,rec,then,%
+      to,try,type,value,where,while,with},%
+   sensitive,%
+   morecomment=[n]{(*}{*)},%
+   morestring=[b]",%
+   moredirectives={open,close,include}%
+  }[keywords,comments,strings,directives]%
+\lst@definelanguage[ibm]{Cobol}[1985]{Cobol}%
+  {morekeywords={ADDRESS,BEGINNING,COMP-3,COMP-4,COMPUTATIONAL,%
+      COMPUTATIONAL-3,COMPUTATIONAL-4,DISPLAY-1,EGCS,EJECT,ENDING,%
+      ENTRY,GOBACK,ID,MORE-LABELS,NULL,NULLS,PASSWORD,RECORDING,%
+      RETURN-CODE,SERVICE,SKIP1,SKIP2,SKIP3,SORT-CONTROL,SORT-RETURN,%
+      SUPPRESS,TITLE,WHEN-COMPILED},%
+  }%
+\lst@definelanguage[1985]{Cobol}[1974]{Cobol}%
+  {morekeywords={ALPHABET,ALPHABETIC-LOWER,ALPHABETIC-UPPER,%
+      ALPHANUMERIC,ALPHANUMERIC-EDITED,ANY,CLASS,COMMON,CONTENT,%
+      CONTINUE,DAY-OF-WEEK,END-ADD,END-CALL,END-COMPUTE,END-DELETE,%
+      END-DIVIDE,END-EVALUATE,END-IF,END-MULTIPLY,END-PERFORM,END-READ,%
+      END-RECEIVE,END-RETURN,END-REWRITE,END-SEARCH,END-START,%
+      END-STRING,END-SUBTRACT,END-UNSTRING,END-WRITE,EVALUATE,EXTERNAL,%
+      FALSE,GLOBAL,INITIALIZE,NUMERIC-EDITED,ORDER,OTHER,%
+      PACKED-DECIMAL,PADDING,PURGE,REFERENCE,RELOAD,REPLACE,STANDARD-1,%
+      STANDARD-2,TEST,THEN,TRUE},%
+  }%
+\lst@definelanguage[1974]{Cobol}%
+  {morekeywords={ACCEPT,ACCESS,ADD,ADVANCING,AFTER,ALL,ALPHABETIC,ALSO,%
+      ALTER,ALTERNATE,AND,ARE,AREA,AREAS,ASCENDING,ASSIGN,AT,AUTHOR,%
+      BEFORE,BINARY,BLANK,BLOCK,BOTTOM,BY,CALL,CANCEL,CD,CF,CH,%
+      CHARACTER,CHARACTERS,CLOCK-UNITS,CLOSE,COBOL,CODE,CODE-SET,%
+      COLLATING,COLUMN,COMMA,COMMUNICATION,COMP,COMPUTE,CONFIGURATION,%
+      CONTAINS,CONTROL,CONTROLS,CONVERTING,COPY,CORR,CORRESPONDING,%
+      COUNT,CURRENCY,DATA,DATE,DATE-COMPILED,DATE-WRITTEN,DAY,DE,%
+      DEBUG-CONTENTS,DEGUB-ITEM,DEBUG-LINE,DEBUG-NAME,DEBUG-SUB1,%
+      DEBUG-SUB2,DEBUG-SUB3,DEBUGGING,DECIMAL-POINT,DECLARATIVES,%
+      DELETE,DELIMITED,DELIMITER,DEPENDING,DESCENDING,DESTINATION,%
+      DETAIL,DISABLE,DISPLAY,DIVIDE,DIVISION,DOWN,DUPLICATES,DYNAMIC,%
+      EGI,ELSE,EMI,ENABLE,END,END-OF-PAGE,ENTER,ENVIRONMENT,EOP,EQUAL,%
+      ERROR,ESI,EVERY,EXCEPTION,EXIT,EXTEND,FD,FILE,FILE-CONTROL,%
+      FILLER,FINAL,FIRST,FOOTING,FOR,FROM,GENERATE,GIVING,GO,GREATER,%
+      GROUP,HEADING,HIGH-VALUE,HIGH-VALUES,I-O,I-O-CONTROL,%
+      IDENTIFICATION,IF,IN,INDEX,INDEXED,INDICATE,INITIAL,INITIATE,%
+      INPUT,INPUT-OUTPUT,INSPECT,INSTALLATION,INTO,INVALID,IS,JUST,%
+      JUSTIFIED,KEY,LABEL,LAST,LEADING,LEFT,LENGTH,LESS,LIMIT,LIMITS,%
+      LINAGE,LINAGE-COUNTER,LINE,LINE-COUNTER,LINES,LINKAGE,LOCK,%
+      LOW-VALUE,LOW-VALUES,MEMORY,MERGE,MESSAGE,MODE,MODULES,MOVE,%
+      MULTIPLE,MULTIPLY,NATIVE,NEGATIVE,NEXT,NO,NOT,NUMBER,NUMERIC,%
+      OBJECT-COMPUTER,OCCURS,OF,OFF,OMITTED,ON,OPEN,OPTIONAL,OR,%
+      ORGANIZATION,OUTPUT,OVERFLOW,PAGE,PAGE-COUNTER,PERFORM,PF,PH,PIC,%
+      PICTURE,PLUS,POINTER,POSITION,PRINTING,POSITIVE,PRINTING,%
+      PROCEDURE,PROCEDURES,PROCEED,PROGRAM,PROGRAM-ID,QUEUE,QUOTE,%
+      QUOTES,RANDOM,RD,READ,RECEIVE,RECORD,RECORDING,RECORDS,REDEFINES,%
+      REEL,REFERENCES,RELATIVE,RELEASE,REMAINDER,REMOVAL,RENAMES,%
+      REPLACING,REPORT,REPORTING,REPORTS,RERUN,RESERVE,RESET,RETURN,%
+      REVERSED,REWIND,REWRITE,RF,RH,RIGHT,ROUNDED,RUN,SAME,SD,SEARCH,%
+      SECTION,SECURITY,SEGMENT,SEGMENT-LIMIT,SELECT,SEND,SENTENCE,%
+      SEPARATE,SEQUENCE,SEQUENTIAL,SET,SIGN,SIZE,SORT,SORT-MERGE,%
+      SOURCE,SOURCE-COMPUTER,SPACE,SPACES,SPECIAL-NAMES,STANDARD,START,%
+      STATUS,STOP,STRING,SUB-QUEUE-1,SUB-QUEUE-2,SUB-QUEUE-3,SUBTRACT,%
+      SUM,SYMBOLIC,SYNC,SYNCHRONIZED,TABLE,TALLYING,TAPE,TERMINAL,%
+      TERMINATE,TEXT,THAN,THROUGH,THRU,TIME,TIMES,TO,TOP,TRAILING,TYPE,%
+      UNIT,UNSTRING,UNTIL,UP,UPON,USAGE,USE,USING,VALUE,VALUES,VARYING,%
+      WHEN,WITH,WORDS,WORKING-STORAGE,WRITE,ZERO,ZEROES,ZEROS},%
+   sensitive=f,% ???
+   morecomment=[f][6]*,%
+   morestring=[d]"% ??? doubled
+  }[keywords,comments,strings]%
+\lst@definelanguage{Delphi}%
+  {morekeywords={and,as,asm,array,begin,case,class,const,constructor,%
+      destructor,div,do,downto,else,end,except,exports,file,finally,%
+      for,function,goto,if,implementation,in,inherited,inline,%
+      initialization,interface,is,label,library,mod,nil,not,object,of,%
+      or,packed,procedure,program,property,raise,record,repeat,set,%
+      shl,shr,string,then,to,try,type,unit,until,uses,var,while,with,%
+      xor,%
+      absolute,abstract,assembler,at,cdecl,default,dynamic,export,%
+      external,far,forward,index,name,near,nodefault,on,override,%
+      private,protected,public,published,read,resident,storedDir,%
+      virtual,write},%
+   morendkeywords={Abs,AddExitProc,Addr,AllocMem,AnsiCompareStr,%
+      AnsiCompareText,AnsiLowerCase,AnsiUpperCase,Append,AppendStr,%
+      ArcTan,AssignCrt,Assigned,AssignFile,BlockRead,BlockWrite,Break,%
+      ChangeFileExt,ChDir,Chr,CloseFile,ClrEol,ClrScr,Concat,Continue,%
+      Copy,Cos,CSeg,CursorTo,Date,DateTimeToFileDate,DateTimeToStr,%
+      DateTimeToString,DateToStr,DayOfWeek,Dec,DecodeDate,DecodeTime,%
+      Delete,DeleteFile,DiskFree,DiskSize,Dispose,DisposeStr,%
+      DoneWinCrt,DSeg,EncodeDate,EncodeTime,Eof,Eoln,Erase,Exclude,%
+      Exit,Exp,ExpandFileName,ExtractFileExt,ExtractFileName,%
+      ExtractFilePath,FileAge,FileClose,FileDateToDateTime,FileExists,%
+      FileGetAttr,FileGetDate,FileOpen,FilePos,FileRead,FileSearch,%
+      FileSeek,FileSetAttr,FileSetDate,FileSize,FillChar,FindClose,%
+      FindFirst,FindNext,FloatToDecimal,FloatToStrF,FloatToStr,%
+      FloatToText,FloatToTextFmt,Flush,FmtLoadStr,FmtStr,Format,%
+      FormatBuf,FormatDateTime,FormatFloat,Frac,Free,FreeMem,GetDir,%
+      GetMem,GotoXY,Halt,Hi,High,Inc,Include,InitWinCrt,Insert,Int,%
+      IntToHex,IntToStr,IOResult,IsValidIdent,KeyPressed,Length,Ln,Lo,%
+      LoadStr,Low,LowerCase,MaxAvail,MemAvail,MkDir,Move,New,NewStr,%
+      Now,Odd,Ofs,Ord,ParamCount,ParamStr,Pi,Pos,Pred,Ptr,Random,%
+      Randomize,Read,ReadBuf,ReadKey,Readln,ReAllocMem,Rename,%
+      RenameFile,Reset,Rewrite,RmDir,Round,RunError,ScrollTo,Seek,%
+      SeekEof,SeekEoln,Seg,SetTextBuf,Sin,SizeOf,SPtr,Sqr,Sqrt,SSeg,%
+      Str,StrCat,StrComp,StrCopy,StrDispose,StrECopy,StrEnd,StrFmt,%
+      StrLCat,StrIComp,StrLComp,StrLCopy,StrLen,StrLFmt,StrLIComp,%
+      StrLower,StrMove,StrNew,StrPas,StrPCopy,StrPos,StrScan,StrRScan,%
+      StrToDate,StrToDateTime,StrToFloat,StrToInt,StrToIntDef,%
+      StrToTime,StrUpper,Succ,Swap,TextToFloat,Time,TimeToStr,%
+      TrackCursor,Trunc,Truncate,TypeOf,UpCase,UpperCase,Val,WhereX,%
+      WhereY,Write,WriteBuf,WriteChar,Writeln},%
+   sensitive=f,%
+   morecomment=[d]{(*}{*)}{\{}{\}},%
+   morestring=[d]'%
+  }[keywords,comments,strings]%
+\lst@definelanguage{Eiffel}%
+  {morekeywords={alias,all,and,as,BIT,BOOLEAN,CHARACTER,check,class,%
+      creation,Current,debug,deferred,do,DOUBLE,else,elseif,end,%
+      ensure,expanded,export,external,false,feature,from,frozen,if,%
+      implies,indexing,infix,inherit,inspect,INTEGER,invariant,is,%
+      like,local,loop,NONE,not,obsolete,old,once,or,POINTER,prefix,%
+      REAL,redefine,rename,require,rescue,Result,retry,select,%
+      separate,STRING,strip,then,true,undefine,unique,until,variant,%
+      when,xor},%
+   sensitive,%
+   morecomment=[l]--,%
+   morestring=[d]",%
+   stringtest=false%
+  }[keywords,comments,strings]%
+%%
+%% Euphoria definition (c) 1998 Detlef Reimers <[email protected]>
+%%
+\lst@definelanguage{Euphoria}%
+  {morekeywords={abort,and,and_bits,append,arctan,atom,by,call,%
+      call_proc,call_func,c_proc,c_func,clear_screen,close,%
+      command_line,compare,constant,cos,do,date,else,elsif,end,exit,%
+      find,floor,for,function,getc,getenv,get_key,gets,global,%
+      get_pixel,if,include,integer,length,log,match,machine_func,%
+      machine_proc,mem_copy,mem_set,not,not_bits,or,object,open,%
+      or_bits,procedure,puts,position,prepend,print,printf,power,peek,%
+      poke,pixel,poke4,peek4s,peek4u,return,rand,repeat,remainder,%
+      routine_id,sequence,sqrt,sin,system,sprintf,then,type,to,time,%
+      trace,tan,while,with,without,xor,xor_bits},%
+   sensitive,%
+   morecomment=[l]--,%
+   morestring=[d]',%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+%%
+%% Haskell98 as implemented in Hugs98. See http://www.haskell.org
+%% All keywords from Prelude and Standard Libraries
+%% (c) 1999 Peter Bartke <[email protected]>
+%%
+\lst@definelanguage{Haskell}%
+  {otherkeywords={=>},%
+   keywords={abstype,if,then,else,case,class,data,default,deriving,%
+      hiding,if,in,infix,infixl,infixr,import,instance,let,module,%
+      newtype,of,qualified,type,where,do,AbsoluteSeek,AppendMode,%
+      Array,BlockBuffering,Bool,BufferMode,Char,Complex,Double,Either,%
+      FilePath,Float,Int,Integer,IO,IOError,Ix,LineBuffering,Maybe,%
+      Ordering,NoBuffering,ReadMode,ReadWriteMode,ReadS,RelativeSeek,%
+      SeekFromEnd,SeekMode,ShowS,StdGen,String,Void,Bounded,Enum,Eq,%
+      Eval,ExitCode,exitFailure,exitSuccess,Floating,Fractional,%
+      Functor,Handle,HandlePosn,IOMode,Integral,List,Monad,MonadPlus,%
+      MonadZero,Num,Numeric,Ord,Random,RandomGen,Ratio,Rational,Read,%
+      Real,RealFloat,RealFrac,Show,System,Prelude,EQ,False,GT,Just,%
+      Left,LT,Nothing,Right,WriteMode,True,abs,accum,accumArray,%
+      accumulate,acos,acosh,all,and,any,ap,appendFile,applyM,%
+      approxRational,array,asTypeOf,asin,asinh,assocs,atan,atan2,atanh,%
+      bounds,bracket,bracket_,break,catch,catMaybes,ceiling,chr,cis,%
+      compare,concat,concatMap,conjugate,const,cos,cosh,curry,cycle,%
+      decodeFloat,delete,deleteBy,deleteFirstsBy,denominator,%
+      digitToInt,div,divMod,drop,dropWhile,either,elem,elems,elemIndex,%
+      elemIndices,encodeFloat,enumFrom,enumFromThen,enumFromThenTo,%
+      enumFromTo,error,even,exitFailure,exitWith,exp,exponent,fail,%
+      filter,filterM,find,findIndex,findIndices,flip,floatDigits,%
+      floatRadix,floatRange,floatToDigits,floor,foldl,foldM,foldl1,%
+      foldr,foldr1,fromDouble,fromEnum,fromInt,fromInteger,%
+      fromIntegral,fromJust,fromMaybe,fromRat,fromRational,%
+      fromRealFrac,fst,gcd,genericLength,genericTake,genericDrop,%
+      genericSplitAt,genericIndex,genericReplicate,getArgs,getChar,%
+      getContents,getEnv,getLine,getProgName,getStdGen,getStdRandom,%
+      group,groupBy,guard,hClose,hFileSize,hFlush,hGetBuffering,%
+      hGetChar,hGetContents,hGetLine,hGetPosn,hIsClosed,hIsEOF,hIsOpen,%
+      hIsReadable,hIsSeekable,hIsWritable,hLookAhead,hPutChar,hPutStr,%
+      hPutStrLn,hPrint,hReady,hSeek,hSetBuffering,hSetPosn,head,%
+      hugsIsEOF,hugsHIsEOF,hugsIsSearchErr,hugsIsNameErr,%
+      hugsIsWriteErr,id,ioError,imagPart,index,indices,init,inits,%
+      inRange,insert,insertBy,interact,intersect,intersectBy,%
+      intersperse,intToDigit,ioeGetErrorString,ioeGetFileName,%
+      ioeGetHandle,isAlreadyExistsError,isAlreadyInUseError,isAlpha,%
+      isAlphaNum,isAscii,isControl,isDenormalized,isDoesNotExistError,%
+      isDigit,isEOF,isEOFError,isFullError,isHexDigit,isIEEE,%
+      isIllegalOperation,isInfinite,isJust,isLower,isNaN,%
+      isNegativeZero,isNothing,isOctDigit,isPermissionError,isPrefixOf,%
+      isPrint,isSpace,isSuffixOf,isUpper,isUserError,iterate,ixmap,%
+      join,last,lcm,length,lex,lexDigits,lexLitChar,liftM,liftM2,%
+      liftM3,liftM4,liftM5,lines,listArray,listToMaybe,log,logBase,%
+      lookup,magnitude,makePolar,map,mapAccumL,mapAccumR,mapAndUnzipM,%
+      mapM,mapM_,mapMaybe,max,maxBound,maximum,maximumBy,maybe,%
+      maybeToList,min,minBound,minimum,minimumBy,mkPolar,mkStdGen,%
+      mplus,mod,msum,mzero,negate,next,newStdGen,not,notElem,nub,nubBy,%
+      null,numerator,odd,openFile,or,ord,otherwise,partition,phase,pi,%
+      polar,pred,print,product,properFraction,putChar,putStr,putStrLn,%
+      quot,quotRem,random,randomIO,randomR,randomRIO,randomRs,randoms,%
+      rangeSize,read,readDec,readFile,readFloat,readHex,readInt,readIO,%
+      readList,readLitChar,readLn,readParen,readOct,readSigned,reads,%
+      readsPrec,realPart,realToFrac,recip,rem,repeat,replicate,return,%
+      reverse,round,scaleFloat,scanl,scanl1,scanr,scanr1,seq,sequence,%
+      sequence_,setStdGen,show,showChar,showEFloat,showFFloat,%
+      showFloat,showGFloat,showInt,showList,showLitChar,showParen,%
+      showSigned,showString,shows,showsPrec,significand,signum,sin,%
+      sinh,snd,sort,sortBy,span,split,splitAt,sqrt,stderr,stdin,stdout,%
+      strict,subtract,succ,sum,system,tail,tails,take,takeWhile,tan,%
+      tanh,toEnum,toInt,toInteger,toLower,toRational,toUpper,transpose,%
+      truncate,try,uncurry,undefined,unfoldr,union,unionBy,unless,%
+      unlines,until,unwords,unzip,unzip3,unzip4,unzip5,unzip6,unzip7,%
+      userError,when,words,writeFile,zero,zip,zip3,zip4,zip5,zip6,zip7,%
+      zipWith,zipWithM,zipWithM_,zipWith3,zipWith4,zipWith5,zipWith6,%
+      zipWith7},%
+   sensitive,%
+   morecomment=[l]--,%
+   morecomment=[n]{\{-}{-\}},%
+   morestrings=[b]"%
+  }[keywords,comments,strings]%
+%%
+%% IDL definition (c) 1998 Juergen Heim <[email protected]>
+%%
+\lst@definelanguage{IDL}%
+  {morekeywords={and,begin,case,common,do,else,end,endcase,endelse,%
+      endfor,endif,endrep,endwhile,eq,for,function,ge,goto,gt,if,le,lt,%
+      mod,ne,not,of,on_ioerror,or,pro,repeat,return,then,until,while,%
+      xor,on_error,openw,openr,openu,print,printf,printu,plot,read,%
+      readf,readu,writeu,stop},%
+   sensitive=f,%
+   morecomment=[l];,%
+   morestring=[d]'%
+  }[keywords,comments,strings]%
+\lst@definelanguage{Lisp}%
+  {morekeywords={abort,abs,acons,acos,acosh,adjoin,alphanumericp,alter,%
+      append,apply,apropos,aref,arrayp,ash,asin,asinh,assoc,atan,atanh,%
+      atom,bit,boole,boundp,break,butlast,byte,catenate,ceiling,cerror,%
+      char,character,characterp,choose,chunk,cis,close,clrhash,coerce,%
+      collect,commonp,compile,complement,complex,complexp,concatenate,%
+      conjugate,cons,consp,constantp,continue,cos,cosh,cotruncate,%
+      count,delete,denominator,describe,directory,disassemble,%
+      documentation,dpb,dribble,ed,eighth,elt,enclose,endp,eq,eql,%
+      equal,equalp,error,eval,evalhook,evenp,every,exp,expand,export,%
+      expt,fboundp,fceiling,fdefinition,ffloor,fifth,fill,find,first,%
+      float,floatp,floor,fmakunbound,format,fourth,fround,ftruncate,%
+      funcall,functionp,gatherer,gcd,generator,gensym,gentemp,get,getf,%
+      gethash,identity,imagpart,import,inspect,integerp,intern,%
+      intersection,tively,isqrt,keywordp,last,latch,lcm,ldb,ldiff,%
+      length,list,listen,listp,load,log,logand,logbitp,logcount,logeqv,%
+      logior,lognand,lognor,lognot,logtest,logxor,macroexpand,%
+      makunbound,map,mapc,mapcan,mapcar,mapcon,maphash,mapl,maplist,%
+      mask,max,member,merge,min,mingle,minusp,mismatch,mod,namestring,%
+      nbutlast,nconc,nintersection,ninth,not,notany,notevery,nreconc,%
+      nreverse,nsublis,nsubst,nth,nthcdr,null,numberp,numerator,nunion,%
+      oddp,open,packagep,pairlis,pathname,pathnamep,phase,plusp,%
+      position,positions,pprint,previous,princ,print,proclaim,provide,%
+      random,rassoc,rational,rationalize,rationalp,read,readtablep,%
+      realp,realpart,reduce,rem,remhash,remove,remprop,replace,require,%
+      rest,revappend,reverse,room,round,rplaca,rplacd,sbit,scan,schar,%
+      search,second,series,set,seventh,shadow,signal,signum,sin,sinh,%
+      sixth,sleep,some,sort,split,sqrt,streamp,string,stringp,sublis,%
+      subseq,subseries,subsetp,subst,substitute,subtypep,svref,sxhash,%
+      symbolp,tailp,tan,tanh,tenth,terpri,third,truename,truncate,%
+      typep,unexport,unintern,union,until,values,vector,vectorp,warn,%
+      write,zerop,and,assert,case,ccase,cond,ctypecase,decf,declaim,%
+      defclass,defconstant,defgeneric,defmacro,defmethod,defpackage,%
+      defparameter,defsetf,defstruct,deftype,defun,defvar,do,dolist,%
+      dotimes,ecase,encapsulated,etypecase,flet,formatter,gathering,%
+      incf,iterate,labels,let,locally,loop,macrolet,mapping,or,pop,%
+      producing,prog,psetf,psetq,push,pushnew,remf,return,rotatef,%
+      setf,shiftf,step,time,trace,typecase,unless,untrace,when},%
+   sensitive,% ???
+   alsodigit=-,%
+   morecomment=[l];,%
+   morecomment=[s]{\#|}{|\#},% 1997 Aslak Raanes
+   morestring=[b]"%
+  }[keywords,comments,strings]%
+%%
+%% Make definitions (c) 2000 Rolf Niepraschk <[email protected]>
+%%
+\lst@definelanguage[gnu]{make}%
+  {morekeywords={SHELL,MAKE,MAKEFLAGS,$@,$\%,$<,$?,$^,$+,$*,%
+      export,unexport,include,override,define,ifdef,ifneq,ifeq,else,%
+      endif,vpath,subst,patsubst,strip,findstring,filter,filter-out,%
+      sort,dir,notdir,suffix,basename,addsuffix,addprefix,join,word,%
+      words,firstword,wildcard,shell,origin,foreach,%
+      @D,@F,*D,*F,\%D,\%F,<D,<F,^D,^F,+D,+F,?D,?F,%
+      AR,AS,CC,CXX,CO,CPP,FC,GET,LEX,PC,YACC,YACCR,MAKEINFO,TEXI2DVI,%
+      WEAVE,CWEAVE,TANGLE,CTANGLE,RM,M2C,LINT,COMPILE,LINK,PREPROCESS,%
+      CHECKOUT,%
+      ARFLAGS,ASFLAGS,CFLAGS,CXXFLAGS,COFLAGS,CPPFLAGS,FFLAGS,GFLAGS,%
+      LDFLAGS,LOADLIBES,LFLAGS,PFLAGS,RFLAGS,YFLAGS,M2FLAGS,MODFLAGS,%
+      LINTFLAGS,MAKEINFO_FLAGS,TEXI2DVI_FLAGS,COFLAGS,GFLAGS,%
+      OUTPUT_OPTION,SCCS_OUTPUT_OPTION%
+      .PHONY,.SUFFIXES,.DEFAULT,.PRECIOUS,.INTERMEDIATE,.SECONDARY,%
+      .IGNORE,.SILENT,.EXPORT_ALL_VARIABLES,MAKEFILES,VPATH,MAKESHELL,%
+      MAKELEVEL,MAKECMDGOALS,SUFFIXES},%
+   sensitive=true,
+   morecomment=[l]\#,%
+   morestring="%
+  }[keywords,comments,strings,make]%
+\lst@definelanguage{make}
+  {morekeywords={SHELL,MAKE,MAKEFLAGS,$@,$\%,$<,$?,$^,$+,$*},%
+   sensitive=true,%
+   morecomment=[l]\#,%
+   morestring="%
+  }[keywords,comments,strings,make]%
+%%
+%% Mercury definition (c) 1997 Dominique de Waleffe <[email protected]>
+%%
+\lst@definelanguage{Mercury}%
+  {otherkeywords={::,->,-->,--->,:-},%
+   morekeywords={pred,type,module,end_module,import_module,mode,%
+      pragma,func,lambda,det,semidet,erroneous,multi,true,fail,is,in,%
+      out,di,uo,ui,interface,implementation},%
+   sensitive=f,%
+   morecomment=[l]\%,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[bd]",%
+   morestring=[bd]'%
+  }[keywords,comments,strings]%
+%%
+%% Miranda definition (c) 1998 Peter Bartke <[email protected]>
+%%
+%% Miranda: pure lazy functional language with polymorphic type system,
+%%          garbage collection and functions as first class citizens
+%%
+\lst@definelanguage{Miranda}%
+  {morekeywords={abstype,div,if,mod,otherwise,readvals,show,type,where,%
+     with,bool,char,num,sys_message,False,True,Appendfile,Closefile,%
+     Exit,Stderr,Stdout,System,Tofile,\%include,\%export,\%free,%
+     \%insert,abs,and,arctan,cjustify,code,concat,const,converse,cos,%
+     decode,digit,drop,dropwhile,entier,error,exp,filemode,filter,%
+     foldl,foldl1,foldr,foldr1,force,fst,getenv,hd,hugenum,id,index,%
+     init,integer,iterate,last,lay,layn,letter,limit,lines,ljustify,%
+     log,log10,map,map2,max,max2,member,merge,min,min2,mkset,neg,%
+     numval,or,pi,postfix,product,read,rep,repeat,reverse,rjustify,%
+     scan,seq,showfloat,shownum,showscaled,sin,snd,sort,spaces,sqrt,%
+     subtract,sum,system,take,takewhile,tinynum,tl,transpose,undef,%
+     until,zip2,zip3,zip4,zip5,zip6,zip},%
+   sensitive,%
+   morecomment=[l]||,%
+   morestring=[b]"%
+  }[keywords,comments,strings]%
+%%
+%% ML definition (c) 1999 Torben Hoffmann <[email protected]>
+%%
+\lst@definelanguage{ML}%
+  {morekeywords={abstype,and,andalso,as,case,do,datatype,else,end,%
+       eqtype,exception,fn,fun,functor,handle,if,in,include,infix,%
+       infixr,let,local,nonfix,of,op,open,orelse,raise,rec,sharing,sig,%
+       signature,struct,structure,then,type,val,with,withtype,while},%
+   sensitive,%
+   morecomment=[n]{(*}{*)},%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+%%
+%% Prolog definition (c) 1997 Dominique de Waleffe <[email protected]>
+%%
+\lst@definelanguage{Prolog}%
+  {morekeywords={op,mod,abort,ancestors,arg,ascii,ask,assert,asserta,%
+      assertz,atom,atomic,char,clause,close,concat,consult,ed,ef,em,%
+      eof,fail,file,findall,write,functor,getc,integer,is,length,%
+      listing,load,name,nl,nonvar,not,numbervars,op,or,pp,prin,print,%
+      private,prompt,putc,ratom,read,read_from_this_file,rename,repeat,%
+      retract,retractall,save,see,seeing,seen,sh,skip,statistics,%
+      subgoal_of,system,tab,tell,telling,time,told,trace,true,unload,%
+      untrace,var,write},%
+   sensitive=f,%
+   morecomment=[l]\%,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[bd]",%
+   morestring=[bd]'%
+  }[keywords,comments,strings]%
+%%
+%% SHELXL definition (c) 1999 Aidan Philip Heerdegen
+%%                            <[email protected]>
+%%
+\lst@definelanguage{SHELXL}%
+  {morekeywords={TITL,CELL,ZERR,LATT,SYMM,SFAC,DISP,UNIT,LAUE,%
+      REM,MORE,TIME,END,HKLF,OMIT,SHEL,BASF,TWIN,EXTI,SWAT,%
+      MERG,SPEC,RESI,MOVE,ANIS,AFIX,HFIX,FRAG,FEND,EXYZ,EADP,%
+      EQIV,OMIT,CONN,PART,BIND,FREE,DFIX,BUMP,SAME,SADI,CHIV,%
+      FLAT,DELU,SIMU,DEFS,ISOR,SUMP,L.S.,CGLS,SLIM,BLOC,DAMP,%
+      WGHT,FVAR,BOND,CONF,MPLA,RTAB,LIST,ACTA,SIZE,TEMP,WPDB,%
+      FMAP,GRID,PLAN,MOLE},%
+   sensitive=false,%
+   alsoother=_,% Makes the syntax highlighting ignore the underscores
+   morecomment=[l]{! },%
+  }%
+%%
+%% Tcl/Tk definition (c) Gerd Neugebauer <[email protected]>
+%%
+\lst@definelanguage[tk]{tcl}[]{tcl}%
+  {morekeywords={activate,add,separator,radiobutton,checkbutton,%
+      command,cascade,all,bell,bind,bindtags,button,canvas,canvasx,%
+      canvasy,cascade,cget,checkbutton,config,configu,configur,%
+      configure,clipboard,create,arc,bitmap,image,line,oval,polygon,%
+      rectangle,text,textwindow,curselection,delete,destroy,end,entry,%
+      entrycget,event,focus,font,actual,families,measure,metrics,names,%
+      frame,get,grab,current,release,status,grid,columnconfigure,%
+      rowconfigure,image,image,create,bitmap,photo,delete,height,types,%
+      widt,names,index,insert,invoke,itemconfigure,label,listbox,lower,%
+      menu,menubutton,message,move,option,add,clear,get,readfile,pack,%
+      photo,place,radiobutton,raise,scale,scroll,scrollbar,search,see,%
+      selection,send,stdin,stdout,stderr,tag,bind,text,tk,tkerror,%
+      tkwait,window,variable,visibility,toplevel,unknown,update,winfo,%
+      class,exists,ismapped,parent,reqwidth,reqheight,rootx,rooty,%
+      width,height,wm,aspect,client,command,deiconify,focusmodel,frame,%
+      geometry,group,iconbitmap,iconify,iconmask,iconname,iconposition,%
+      iconwindow,maxsize,minsize,overrideredirect,positionfrom,%
+      protocol,sizefrom,state,title,transient,withdraw,xview,yview,%
+      yposition,%
+      -accelerator,-activebackground,-activeborderwidth,%
+      -activeforeground,-after,-anchor,-arrow,-arrowshape,-aspect,%
+      -async,-background,-before,-bg,-bigincrement,-bitmap,-bordermode,%
+      -borderwidth,-button,-capstyle,-channel,-class,-closeenough,%
+      -colormap,-column,-columnspan,-command,-confine,-container,%
+      -count,-cursor,-data,-default,-detail,-digits,-direction,%
+      -displayof,-disableforeground,-elementborderwidth,-expand,%
+      -exportselection,-extend,-family,-fg,-file,-fill,-focus,-font,%
+      -fontmap,-foreground,-format,-from,-gamma,-global,-height,%
+      -highlightbackground,-highlightcolor,-highlightthickness,-icon,%
+      -image,-in,-insertbackground,-insertborderwidth,-insertofftime,%
+      -insertontime,-imsertwidth,-ipadx,-ipady,-joinstyle,-jump,%
+      -justify,-keycode,-keysym,-label,-lastfor,-length,-maskdata,%
+      -maskfile,-menu,-message,-mode,-offvalue,-onvalue,-orient,%
+      -outlien,-outlinestipple,-overstrike,-override,-padx,-pady,%
+      -pageanchor,-pageheight,-pagewidth,-pagey,-pagey,-palette,%
+      -parent,-place,-postcommand,-relheight,-relief,-relwidth,-relx,%
+      -rely,-repeatdelay,-repeatinterval,-resolution,-root,-rootx,%
+      -rooty,-rotate,-row,-rowspan,-screen,-selectcolor,-selectimage,%
+      -sendevent,-serial,-setgrid,-showvalue,-shrink,-side,-size,%
+      -slant,-sliderlength,-sliderrelief,-smooth,-splinesteps,-state,%
+      -sticky,-stipple,-style,-subsample,-subwindow,-tags,-takefocus,%
+      -tearoff,-tearoffcommand,-text,-textvariable,-tickinterval,-time,%
+      -title,-to,-troughcolor,-type,-underline,-use,-value,-variable,%
+      -visual,-width,-wrap,-wraplength,-x,-xscrollcommand,-y,%
+      -bgstipple,-fgstipple,-lmargin1,-lmargin2,-rmargin,-spacing1,%
+      -spacing2,-spacing3,-tabs,-yscrollcommand,-zoom,%
+      activate,add,addtag,bbox,cget,clone,configure,coords,%
+      curselection,debug,delete,delta,deselect,dlineinfo,dtag,dump,%
+      entrycget,entryconfigure,find,flash,fraction,get,gettags,handle,%
+      icursor,identify,index,insert,invoke,itemcget,itemconfigure,mark,%
+      moveto,own,post,postcascade,postscript,put,redither,ranges,%
+      scale,select,show,tag,type,unpost,xscrollcommand,xview,%
+      yscrollcommand,yview,yposition}%
+  }%
+\lst@definelanguage[]{tcl}%
+  {alsoletter={.:,*=&-},%
+   morekeywords={after,append,array,names,exists,anymore,donesearch,%
+      get,nextelement,set,size,startsearch,auto_mkindex,binary,break,%
+      case,catch,cd,clock,close,concat,console,continue,default,else,%
+      elseif,eof,error,eval,exec,-keepnewline,exit,expr,fblocked,%
+      fconfigure,fcopy,file,atime,dirname,executable,exists,extension,%
+      isdirectory,isfile,join,lstat,mtime,owned,readable,readlink,%
+      rootname,size,stat,tail,type,writable,-permissions,-group,-owner,%
+      -archive,-hidden,-readonly,-system,-creator,-type,-force,%
+      fileevent,flush,for,foreach,format,gets,glob,global,history,if,%
+      incr,info,argsbody,cmdcount,commands,complete,default,exists,%
+      globals,level,library,locals,patchlevel,procs,script,tclversion,%
+      vars,interp,join,lappend,lindex,linsert,list,llength,lrange,%
+      lreplace,lsearch,-exact,-regexp,-glob,lsort,-ascii,-integer,%
+      -real,-dictionary,-increasing,-decreasing,-index,-command,load,%
+      namespace,open,package,forget,ifneeded,provide,require,unknown,%
+      vcompare,versions,vsatisfies,pid,proc,puts,-nonewline,pwd,read,%
+      regexp,-indices,regsub,-all,-nocaserename,return,scan,seek,set,%
+      socket,source,split,string,compare,first,index,last,length,match,%
+      range,tolower,toupper,trim,trimleft,trimright,subst,switch,tell,%
+      time,trace,variable,vdelete,vinfo,unknown,unset,uplevel,upvar,%
+      vwait,while,acos,asin,atan,atan2,ceil,cos,cosh,exp,floor,fmod,%
+      hypot,log,log10,pow,sin,sinh,sqrt,tan,tanh,abs,double,int,round%
+      },%
+   morestring=[d]",%
+   MoreSelectCharTable=%
+      \lst@CArgX\#\relax\lst@CommentB\lst@CLmode{}{}%
+          {\ifx\lst@lastother\lstum@backslash
+               \expandafter\@gobblethree
+           \fi}\lst@commentstyle
+  }[keywords,comments,strings]%
+%%
+%% VBScript definition (c) 2000 Sonja Weidmann <[email protected]>
+%%
+\lst@definelanguage{VBScript}%
+  {morekeywords={Call,Case,Const,Dim,Do,Each,Else,End,Erase,Error,Exit,%
+      Explicit,For,Function,If,Loop,Next,On,Option,Private,Public,%
+      Randomize,ReDim,Rem,Select,Set,Sub,Then,Wend,While,Abs,Array,Asc,%
+      Atn,CBool,CByte,CCur,CDate,CDbl,Chr,CInt,CLng,Cos,CreateObject,%
+      CSng,CStr,Date,DateAdd,DateDiff,DatePart,DateSerial,DateValue,%
+      Day,Exp,Filter,Fix,FormatCurrency,FormatDateTime,FormatNumber,%
+      FormatPercent,GetObject,Hex,Hour,InputBox,InStr,InStrRev,Int,%
+      IsArray,IsDate,IsEmpty,IsNull,IsNumeric,IsObject,Join,LBound,%
+      LCase,Left,Len,LoadPicture,Log,LTrim,Mid,Minute,Month,MonthName,%
+      MsgBox,Now,Oct,Replace,RGB,Right,Rnd,Round,RTrim,ScriptEngine,%
+      ScriptEngineBuildVersion,ScriptEngineMajorVersion,%
+      ScriptEngineMinorVersion,Second,Sgn,Sin,Space,Split,Sqr,StrComp,%
+      StrReverse,String,Tan,Time,TimeSerial,TimeValue,Trim,TypeName,%
+      UBound,UCase,VarType,Weekday,WeekdayName,Year, And,Eqv,Imp,Is,%
+      Mod,Not,Or,Xor,Add,BuildPath,Clear,Close,Copy,CopyFile,%
+      CopyFolder,CreateFolder,CreateTextFile,Delete,DeleteFile,%
+      DeleteFolder,Dictionary,Drive,DriveExists,Drives,Err,Exists,File,%
+      FileExists,FileSystemObject,Files,Folder,FolderExists,Folders,%
+      GetAbsolutePathName,GetBaseName,GetDrive,GetDriveName,%
+      GetExtensionName,GetFile,GetFileName,GetFolder,%
+      GetParentFolderName,GetSpecialFolder,GetTempName,Items,Keys,Move,%
+      MoveFile,MoveFolder,OpenAsTextStream,OpenTextFile,Raise,Read,%
+      ReadAll,ReadLine,Remove,RemoveAll,Skip,SkipLine,TextStream,Write,%
+      WriteBlankLines,WriteLine,Alias,Archive,CDROM,Compressed,%
+      Directory,Fixed,ForAppending,ForReading,ForWriting,Hidden,Normal,%
+      RAMDisk,ReadOnly,Remote,Removable,System,SystemFolder,%
+      TemporaryFolder,TristateFalse,TristateTrue,TristateUseDefault,%
+      Unknown,Volume,WindowsFolder,vbAbortRetryIgnore,%
+      vbApplicationModal,vbArray,vbBinaryCompare,vbBlack,vbBlue,%
+      vbBoolean,vbByte,vbCr,vbCrLf,vbCritical,vbCurrency,vbCyan,%
+      vbDataObject,vbDate,vbDecimal,vbDefaultButton1,vbDefaultButton2,%
+      vbDefaultButton3,vbDefaultButton4,vbDouble,vbEmpty,vbError,%
+      vbExclamation,vbFirstFourDays,vbFirstFullWeek,vbFirstJan1,%
+      vbFormFeed,vbFriday,vbGeneralDate,vbGreen,vbInformation,%
+      vbInteger,vbLf,vbLong,vbLongDate,vbLongTime,vbMagenta,vbMonday,%
+      vbNewLine,vbNull,vbNullChar,vbNullString,vbOKC,ancel,vbOKOnly,%
+      vbObject,vbObjectError,vbQuestion,vbRed,vbRetryCancel,vbSaturday,%
+      vbShortDate,vbShortTime,vbSingle,vbString,vbSunday,vbSystemModal,%
+      vbTab,vbTextCompare,vbThursday,vbTuesday,vbUseSystem,%
+      vbUseSystemDayOfWeek,vbVariant,vbVerticalTab,vbWednesday,vbWhite,%
+      vbYellow,vbYesNo,vbYesNoCancel},%
+   sensitive=f,%
+   morecomment=[l]',%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+\endinput
+%%
+%% End of file `lstlang2.sty'.

+ 568 - 0
docs/styles/lstlang3.sty

@@ -0,0 +1,568 @@
+%%
+%% This is file `lstlang3.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lstdrvrs.dtx  (with options: `lang3')
+%% 
+%% (w)(c) 1996/1997/1998/1999/2000 Carsten Heinz and/or any other author
+%% listed elsewhere 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.
+%%
+%% This file is completely free and comes without any warranty.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+\lst@definelanguage[68]{Algol}%
+  {morekeywords={abs,and,arg,begin,bin,bits,bool,by,bytes,case,channel,%
+      char,co,comment,compl,conj,divab,do,down,elem,elif,else,empty,%
+      end,entier,eq,esac,exit,false,fi,file,flex,for,format,from,ge,%
+      goto,gt,heap,if,im,in,int,is,isnt,le,leng,level,loc,long,lt,lwb,%
+      minusab,mod,modab,mode,ne,nil,not,od,odd,of,op,or,ouse,out,over,%
+      overab,par,plusab,plusto,pr,pragmat,prio,proc,re,real,ref,repr,%
+      round,sema,shl,short,shorten,shr,sign,skip,string,struct,then,%
+      timesab,to,true,union,up,upb,void,while},%
+   sensitive=f,% ???
+   morecomment=[s]{\#}{\#},%
+   keywordcomment={co,comment}%
+  }[keywords,comments,keywordcomments]%
+\lst@definelanguage[60]{Algol}%
+  {morekeywords={array,begin,Boolean,code,comment,div,do,else,end,%
+      false,for,goto,if,integer,label,own,power,procedure,real,step,%
+      string,switch,then,true,until,value,while},%
+   sensitive=f,% ???
+   keywordcommentsemicolon={end}{else,end}{comment}%
+  }[keywords,keywordcomments]%
+%%
+%% Visual Basic definition (c) 2001 Frédéric Jacquet
+%%                             <[email protected]>
+%%
+\lstdefinelanguage[Visual]{Basic}
+  {morekeywords={AddressOf,Abs,And,AppActivate,Array,As,Asc,Atn,Base,%
+      Beep,Binary,ByRef,ByVal,CVErr,Call,CallByName,Case,ChDir,ChDrive,%
+      Choose,Chr,Close,Command,Compare,Comparison,Const,Cos,%
+      CreateObject,CurDir,DDB,Date,DateAdd,DateDiff,DatePart,%
+      DateSerial,DateValue,Day,Declare,Deftype,DeleteSetting,Dim,Dir,%
+      Do,DoEvents,EOF,Each,Else,Empty,End,Enum,Environ,Eqv,Erase,Error,%
+      Event,Exit,Exp,Explicit,FV,False,FileAttr,FileCopy,FileDateTime,%
+      FileLen,Filter,Fix,For,Format,FormatCurrency,FormatDateRime,%
+      FormatNumber,FormatPercent,Friend,Function,Get,GetAllSettings,%
+      GetAttr,GetAutoServerSettings,GetObject,GetSetting,GoSub,GoTo,%
+      Hex,Hour,IIf,IMEStatus,IPmt,IRR,If,Imp,Implements,InStr,InStrRev,%
+      Input,InputBox,Int,Is,IsArray,IsDate,IsEmpty,IsError,IsMissing,%
+      IsNull,IsNumeric,IsObject,Join,Kill,LBound,LCase,LOF,LSet,LTrim,%
+      Left,Len,Let,Like,Line,Load,LoadPicture,LoadResData,%
+      LoadResPicture,LoadResString,Loc,Lock,Lock,Log,Loop,MIRR,Math,Me,%
+      Mid,Minute,MkDir,Mod,Month,MonthName,MsgBox,NPV,NPer,Name,New,%
+      Next,Not,Nothing,Now,Null,Oct,On,Open,Option,Optional,Or,PPmt,PV,%
+      Paramarray,Partition,Pmt,Print,Private,Property,Public,Put,%
+      QBColor,RGB,RSet,RTrim,RaiseEvent,Randomize,Rate,ReDim,Rem,%
+      Replace,Resume,Return,Right,RmDir,Rnd,Round,SLN,SYD,SavePicture,%
+      SaveSetting,Second,Seek,Select,SendKeys,Set,SetAttr,Sgn,Shell,%
+      Sin,Space,Spc,Split,Sqr,Static,Step,Stop,Str,StrComp,StrConv,%
+      StrReverse,String,Sub,Switch,Tab,Tan,Then,Time,TimeSerial,%
+      TimeValue,Timer,Trim,True,Type,TypeName,UBound,UCase,Unload,%
+      Unlock,Val,VarType,Weekday,WeekdayName,Wend,While,Width,With,%
+      Withevents,Write,Xor,Year},%
+   sensitive=false,%
+   morecomment=[l]\',%
+   morestring=[b]"%
+  }%
+%%
+%% Clean definition (c) 1999 José Romildo Malaquias <[email protected]>
+%%
+%% Clean 1.3 :  some standard functional language: pure, lazy,
+%%              polymorphic type system, modules, type classes,
+%%              garbage collection, functions as first class citizens
+%%
+\lst@definelanguage{Clean}%
+  {otherkeywords={:,::,=,:==,=:,=>,->,<-,<-:,\{,\},\{|,|\},\#,\#!,|,\&,[,],!,.,\\\\,;,_},%
+   keywords={from,definition,implementation,import,module,system,case,code,%
+             if,in,let,let!,of,where,with,infix,infixl,infixr},%
+   ndkeywords={True,False,Start,Int,Real,Char,Bool,String,World,File,ProcId},%
+   sensitive,%
+   morecomment=[l]//%
+   morecomment=[n]{/*}{*/},%
+   morestring=[b]"%
+  }[keywords,comments,strings]%
+\lst@definelanguage{Comal 80}%
+  {morekeywords={AND,AUTO,CASE,DATA,DEL,DIM,DIV,DO,ELSE,ENDCASE,ENDIF,%
+      ENDPROC,ENDWHILE,EOD,EXEC,FALSE,FOR,GOTO,IF,INPUT,INT,LIST,LOAD,%
+      MOD,NEW,NEXT,NOT,OF,OR,PRINT,PROC,RANDOM,RENUM,REPEAT,RND,RUN,%
+      SAVE,SELECT,STOP,TAB,THEN,TRUE,UNTIL,WHILE,ZONE},%
+   sensitive=f,% ???
+   morecomment=[l]//,%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+\lst@definelanguage{Elan}%
+  {morekeywords={ABS,AND,BOOL,CAND,CASE,CAT,COLUMNS,CONCR,CONJ,CONST,%
+      COR,DECR,DEFINES,DET,DIV,DOWNTO,ELIF,ELSE,END,ENDIF,ENDOP,%
+      ENDPACKET,ENDPROC,ENDREP,ENDSELECT,FALSE,FI,FILE,FOR,FROM,IF,%
+      INCR,INT,INV,LEAVE,LENGTH,LET,MOD,NOT,OF,OP,OR,OTHERWISE,PACKET,%
+      PROC,REAL,REP,REPEAT,ROW,ROWS,SELECT,SIGN,STRUCT,SUB,TEXT,THEN,%
+      TRANSP,TRUE,TYPE,UNTIL,UPTO,VAR,WHILE,WITH,XOR,%
+      maxint,sign,abs,min,max,random,initializerandom,subtext,code,%
+      replace,text,laenge,pos,compress,change,maxreal,smallreal,floor,%
+      pi,e,ln,log2,log10,sqrt,exp,tan,tand,sin,sind,cos,cosd,arctan,%
+      arctand,int,real,lastconversionok,put,putline,line,page,get,%
+      getline,input,output,sequentialfile,maxlinelaenge,reset,eof,%
+      close,complexzero,complexone,complexi,complex,realpart,imagpart,%
+      dphi,phi,vector,norm,replace,matrix,idn,row,column,sub,%
+      replacerow,replacecolumn,replaceelement,transp,errorsstop,stop},%
+   sensitive,%
+   morestring=[d]"%
+  }[keywords,strings]%
+\lst@definelanguage{Logo}%
+  {morekeywords={and,atan,arctan,both,break,bf,bl,butfirst,butlast,%
+      cbreak, close,co,continue,cos,count,clearscreen,cs,debquit,%
+      describe,diff,difference,ed,edit,either,emptyp,equalp,er,erase,%
+      errpause,errquit,fifp,filefprint,fifty,fileftype,fip,fileprint,%
+      fird,fileread,fity,filetype,fiwd,fileword,f,first,or,fp,fprint,%
+      fput,fty,ftype,full,fullscreen,go,bye,goodbye,gprop,greaterp,%
+      help,if,iff,iffalse,ift,iftrue,nth,item,keyp,llast,lessp,list,%
+      local,lput,make,max,maximum,memberp,memtrace,min,minimum,namep,%
+      not,numberp,oflush,openr,openread,openw,openwrite,op,output,%
+      pause,plist,pots,pow,pprop,pps,pr,print,product,quotient,random,%
+      rc,readchar,rl,readlist,remprop,repcount,repeat,request,rnd,run,%
+      se,sentence,sentencep,setc,setcolor,setipause,setqpause,po,show,%
+      sin,split,splitscreen,sqrt,stop,sum,test,text,textscreen,thing,%
+      to,tone,top,toplevel,type,untrace,wait,word,wordp,yaccdebug,is,%
+      mod,remainder,trace,zerop,back,bk,bto,btouch,fd,forward,fto,%
+      ftouch,getpen,heading,hit,hitoot,ht,hideturtle,loff,lampoff,lon,%
+      lampon,lt,left,lot,lotoot,lto,ltouch,penc,pencolor,pd,pendown,pe,%
+      penerase,penmode,pu,penup,px,penreverse,rt,right,rto,rtouch,%
+      scrunch,seth,setheading,setscrun,setscrunch,setxy,shownp,st,%
+      showturtle,towardsxy,clean,wipeclean,xcor,ycor,tur,turtle,%
+      display,dpy},%
+   sensitive=f% ???
+  }[keywords]%
+\lst@definelanguage{Modula-2}%
+  {morekeywords={AND,ARRAY,BEGIN,BY,CASE,CONST,DIV,DO,ELSE,ELSIF,END,%
+      EXIT,EXPORT,FOR,FROM,IF,IMPLEMENTATION,IMPORT,IN,MOD,MODULE,NOT,%
+      OF,OR,POINTER,PROCEDURE,QUALIFIED,RECORD,REPEAT,RETURN,SET,THEN,%
+      TYPE,UNTIL,VAR,WHILE,WITH,ABS,BITSET,BOOLEAN,CAP,CARDINAL,CHAR,%
+      CHR,DEC,EXCL,FALSE,FLOAT,HALT,HIGH,INC,INCL,INTEGER,LONGCARD,%
+      LONGINT,LONGREAL,MAX,MIN,NIL,ODD,ORD,PROC,REAL,SIZE,TRUE,TRUNC,%
+      VAL,DEFINITION,LOOP},% added keywords due to Peter Bartke 99/07/22
+   sensitive,%
+   morecomment=[n]{(*}{*)},%
+   morestring=[d]',%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+\lst@definelanguage{Oberon-2}%
+  {morekeywords={ARRAY,BEGIN,BOOLEAN,BY,CASE,CHAR,CONST,DIV,DO,ELSE,%
+      ELSIF,END,EXIT,FALSE,FOR,IF,IMPORT,IN,INTEGER,IS,LONGINT,%
+      LONGREAL,LOOP,MOD,MODULE,NIL,OF,OR,POINTER,PROCEDURE,REAL,RECORD,%
+      REPEAT,RETURN,SET,SHORTINT,THEN,TO,TRUE,TYPE,UNTIL,VAR,WHILE,%
+      WITH,ABS,ASH,CAP,CHR,COPY,DEC,ENTIER,EXCL,HALT,INC,INCL,LEN,LONG,%
+      MAX,MIN,NEW,ODD,ORD,SHORT,SIZE},%
+   sensitive,%
+   morecomment=[n]{(*}{*)},%
+   morestring=[d]',%
+   morestring=[d]"%
+  }[keywords,comments,strings]%
+%%
+%% OCL definition (c) 2000 Achim D. Brucker <[email protected]>
+%% You are allowed to use, modify and distribute this code either under
+%% the terms of the LPPL (version 1.0 or later) or the GPL (version 2.0 or later).
+%%
+%% First we define are very decorative style. In the OMG standard only the boolean (infix (?))
+%% operations are highlighted, but I think all OCL-defined operations should be
+%% highlighted, because they are \emph{guaranteed} to be side-effect-free (in OCL only side effect
+%% free evaluations or path expressions are allowed).
+%%
+\lst@definelanguage[decorative]{OCL}[OMG]{OCL}
+  {otherkeywords={@pre},%
+   morendkeywords={name,attributes,associatoinEnds,operations,%
+      supertypes,allSupertypes,allInstances,oclIsKindOf,oclIsTypeOf,%
+      oclAsType,oclInState,oclIsNew,evaluationType,abs,floor,round,max,%
+      min,div,mod,size,concat,toUpper,toLower,substring,includes,%
+      excludes,count,includesAll,exludesAll,isEmpty,notEmpty,sum,%
+      exists,forAll,isUnique,sortedBy,iterate,union,intersection,%
+      including,excluding,symmetricDifference,select,reject,collect,%
+      asSequence,asBag,asSequence,asSet,append,prepend,subSequence,at,%
+      first,last,true,false,isQuery}%
+  }%
+%% Remark: "isQuery" is not real OCL, but a important Attribute of the
+%%         underlying UML model.
+%%
+%% The dialect called \texttt{OMG} is a very spare version. If you use
+%% this variant with bold style for first and second order keywords you
+%% get the look and feel of the OMG standard.
+\lst@definelanguage[OMG]{OCL}%
+    {morekeywords={context,pre,inv,post},
+    ndkeywords={or,xor,and,not,implies,if,then,else,endif},%
+    morerdkeywords={Boolean,Integer,Real,String,Set,Sequence,Bag,%
+       OclType,OclAny,OclExpression,Enumeration,Collection,},%
+    sensitive=t,%
+    morecomment=[l]--,%
+    morestring=[d]'%
+   }[keywords,rdkeywords,comments,strings]%
+\lst@definelanguage{PL/I}%
+  {morekeywords={ABS,ATAN,AUTOMATIC,AUTO,ATAND,BEGIN,BINARY,BIN,BIT,%
+      BUILTIN,BY,CALL,CHARACTER,CHAR,CHECK,COLUMN,COL,COMPLEX,CPLX,%
+      COPY,COS,COSD,COSH,DATA,DATE,DECIMAL,DEC,DECLARE,DCL,DO,EDIT,%
+      ELSE,END,ENDFILE,ENDPAGE,ENTRY,EXP,EXTERNAL,EXT,FINISH,FIXED,%
+      FIXEDOVERFLOW,FOFL,FLOAT,FORMAT,GET,GO,GOTO,IF,IMAG,INDEX,%
+      INITIAL,INIT,INTERNAL,INT,LABEL,LENGTH,LIKE,LINE,LIST,LOG,LOG2,%
+      LOG10,MAIN,MAX,MIN,MOD,NOCHECK,NOFIXEDOVERFLOW,NOFOFL,NOOVERFLOW,%
+      NOOFL,NOSIZE,NOUNDERFLOW,NOUFL,NOZERODIVIDE,NOZDIV,ON,OPTIONS,%
+      OVERFLOW,OFL,PAGE,PICTURE,PROCEDURE,PROC,PUT,READ,REPEAT,RETURN,%
+      RETURNS,ROUND,SIN,SIND,SINH,SIZE,SKIP,SQRT,STATIC,STOP,STRING,%
+      SUBSTR,SUM,SYSIN,SYSPRINT,TAN,TAND,TANH,THEN,TO,UNDERFLOW,UFL,%
+      VARYING,WHILE,WRITE,ZERODIVIDE,ZDIV},%
+   sensitive=f,%
+   morecomment=[s]{/*}{*/},%
+   morestring=[d]'%
+  }[keywords,comments,strings]%
+\lst@definelanguage[IBM]{Simula}[DEC]{Simula}{}%
+\lst@definelanguage[DEC]{Simula}[67]{Simula}%
+  {morekeywords={and,eq,eqv,ge,gt,hidden,imp,le,long,lt,ne,not,%
+      options,or,protected,short}%
+  }%
+\lst@definelanguage[CII]{Simula}[67]{Simula}%
+  {morekeywords={and,equiv,exit,impl,not,or,stop}}%
+\lst@definelanguage[67]{Simula}%
+  {morekeywords={activate,after,array,at,before,begin,boolean,%
+      character,class,comment,delay,detach,do,else,end,external,false,%
+      for,go,goto,if,in,inner,inspect,integer,is,label,name,new,none,%
+      notext,otherwise,prior,procedure,qua,reactivate,real,ref,resume,%
+      simset,simulation,step,switch,text,then,this,to,true,until,value,%
+      virtual,when,while},%
+   sensitive=f,%
+   keywordcommentsemicolon={end}{else,end,otherwise,when}{comment},%
+   morestring=[d]",%
+   morestring=[d]'%
+  }[keywords,keywordcomments,strings]%
+\lst@definelanguage{S}[]{R}{}
+\lst@definelanguage[PLUS]{S}[]{R}{}
+\lst@definelanguage{R}%
+  {keywords={abbreviate,abline,abs,acos,acosh,action,add1,add,%
+      aggregate,alias,Alias,alist,all,anova,any,aov,aperm,append,apply,%
+      approx,approxfun,apropos,Arg,args,array,arrows,as,asin,asinh,%
+      atan,atan2,atanh,attach,attr,attributes,autoload,autoloader,ave,%
+      axis,backsolve,barplot,basename,besselI,besselJ,besselK,besselY,%
+      beta,binomial,body,box,boxplot,break,browser,bug,builtins,bxp,by,%
+      c,C,call,Call,case,cat,category,cbind,ceiling,character,char,%
+      charmatch,check,chol,chol2inv,choose,chull,class,close,cm,codes,%
+      coef,coefficients,co,col,colnames,colors,colours,commandArgs,%
+      comment,complete,complex,conflicts,Conj,contents,contour,%
+      contrasts,contr,control,helmert,contrib,convolve,cooks,coords,%
+      distance,coplot,cor,cos,cosh,count,fields,cov,covratio,wt,CRAN,%
+      create,crossprod,cummax,cummin,cumprod,cumsum,curve,cut,cycle,D,%
+      data,dataentry,date,dbeta,dbinom,dcauchy,dchisq,de,debug,%
+      debugger,Defunct,default,delay,delete,deltat,demo,de,density,%
+      deparse,dependencies,Deprecated,deriv,description,detach,%
+      dev2bitmap,dev,cur,deviance,off,prev,,dexp,df,dfbetas,dffits,%
+      dgamma,dgeom,dget,dhyper,diag,diff,digamma,dim,dimnames,dir,%
+      dirname,dlnorm,dlogis,dnbinom,dnchisq,dnorm,do,dotplot,double,%
+      download,dpois,dput,drop,drop1,dsignrank,dt,dummy,dump,dunif,%
+      duplicated,dweibull,dwilcox,dyn,edit,eff,effects,eigen,else,%
+      emacs,end,environment,env,erase,eval,equal,evalq,example,exists,%
+      exit,exp,expand,expression,External,extract,extractAIC,factor,%
+      fail,family,fft,file,filled,find,fitted,fivenum,fix,floor,for,%
+      For,formals,format,formatC,formula,Fortran,forwardsolve,frame,%
+      frequency,ftable,ftable2table,function,gamma,Gamma,gammaCody,%
+      gaussian,gc,gcinfo,gctorture,get,getenv,geterrmessage,getOption,%
+      getwd,gl,glm,globalenv,gnome,GNOME,graphics,gray,grep,grey,grid,%
+      gsub,hasTsp,hat,heat,help,hist,home,hsv,httpclient,I,identify,if,%
+      ifelse,Im,image,\%in\%,index,influence,measures,inherits,install,%
+      installed,integer,interaction,interactive,Internal,intersect,%
+      inverse,invisible,IQR,is,jitter,kappa,kronecker,labels,lapply,%
+      layout,lbeta,lchoose,lcm,legend,length,levels,lgamma,library,%
+      licence,license,lines,list,lm,load,local,locator,log,log10,log1p,%
+      log2,logical,loglin,lower,lowess,ls,lsfit,lsf,ls,machine,Machine,%
+      mad,mahalanobis,make,link,margin,match,Math,matlines,mat,matplot,%
+      matpoints,matrix,max,mean,median,memory,menu,merge,methods,min,%
+      missing,Mod,mode,model,response,mosaicplot,mtext,mvfft,na,nan,%
+      names,omit,nargs,nchar,ncol,NCOL,new,next,NextMethod,nextn,%
+      nlevels,nlm,noquote,NotYetImplemented,NotYetUsed,nrow,NROW,null,%
+      numeric,\%o\%,objects,offset,old,on,Ops,optim,optimise,optimize,%
+      options,or,order,ordered,outer,package,packages,page,pairlist,%
+      pairs,palette,panel,par,parent,parse,paste,path,pbeta,pbinom,%
+      pcauchy,pchisq,pentagamma,persp,pexp,pf,pgamma,pgeom,phyper,pico,%
+      pictex,piechart,Platform,plnorm,plogis,plot,pmatch,pmax,pmin,%
+      pnbinom,pnchisq,pnorm,points,poisson,poly,polygon,polyroot,pos,%
+      postscript,power,ppoints,ppois,predict,preplot,pretty,Primitive,%
+      print,prmatrix,proc,prod,profile,proj,prompt,prop,provide,%
+      psignrank,ps,pt,ptukey,punif,pweibull,pwilcox,q,qbeta,qbinom,%
+      qcauchy,qchisq,qexp,qf,qgamma,qgeom,qhyper,qlnorm,qlogis,qnbinom,%
+      qnchisq,qnorm,qpois,qqline,qqnorm,qqplot,qr,Q,qty,qy,qsignrank,%
+      qt,qtukey,quantile,quasi,quit,qunif,quote,qweibull,qwilcox,%
+      rainbow,range,rank,rbeta,rbind,rbinom,rcauchy,rchisq,Re,read,csv,%
+      csv2,fwf,readline,socket,real,Recall,rect,reformulate,regexpr,%
+      relevel,remove,rep,repeat,replace,replications,report,require,%
+      resid,residuals,restart,return,rev,rexp,rf,rgamma,rgb,rgeom,R,%
+      rhyper,rle,rlnorm,rlogis,rm,rnbinom,RNGkind,rnorm,round,row,%
+      rownames,rowsum,rpois,rsignrank,rstandard,rstudent,rt,rug,runif,%
+      rweibull,rwilcox,sample,sapply,save,scale,scan,scan,screen,sd,se,%
+      search,searchpaths,segments,seq,sequence,setdiff,setequal,set,%
+      setwd,show,sign,signif,sin,single,sinh,sink,solve,sort,source,%
+      spline,splinefun,split,sqrt,stars,start,stat,stem,step,stop,%
+      storage,strstrheight,stripplot,strsplit,structure,strwidth,sub,%
+      subset,substitute,substr,substring,sum,summary,sunflowerplot,svd,%
+      sweep,switch,symbol,symbols,symnum,sys,status,system,t,table,%
+      tabulate,tan,tanh,tapply,tempfile,terms,terrain,tetragamma,text,%
+      time,title,topo,trace,traceback,transform,tri,trigamma,trunc,try,%
+      ts,tsp,typeof,unclass,undebug,undoc,union,unique,uniroot,unix,%
+      unlink,unlist,unname,untrace,update,upper,url,UseMethod,var,%
+      variable,vector,Version,vi,warning,warnings,weighted,weights,%
+      which,while,window,write,\%x\%,x11,X11,xedit,xemacs,xinch,xor,%
+      xpdrows,xy,xyinch,yinch,zapsmall,zip},%
+   otherkeywords={!,!=,~,$,*,\&,\%/\%,\%*\%,\%\%,<-,<<-,_,/},%
+   alsoother={._$},%
+   sensitive,%
+   morecomment=[l]\#,%
+   morestring=[d]"%
+  }%
+\lst@definelanguage{SAS}%
+  {prockeywords={proc},%
+   morekeywords={DATA,AND,OR,NOT,EQ,GT,LT,GE,LE,NE,INFILE,INPUT,DO,BY,%
+      TO,SIN,COS,OUTPUT,END,PLOT,RUN,LIBNAME,VAR,TITLE,FIRSTOBS,OBS,%
+      DELIMITER,DLM,EOF,ABS,DIM,HBOUND,LBOUND,MAX,MIN,MOD,SIGN,SQRT,%
+      CEIL,FLOOR,FUZZ,INT,ROUND,TRUNC,DIGAMMA,ERF,ERFC,EXP,GAMMA,%
+      LGAMMA,LOG,LOG2,LOG10,ARCOS,ARSIN,ATAN,COSH,SINH,TANH,TAN,%
+      POISSON,PROBBETA,PROBBNML,PROBCHI,PROBF,PROBGAM,PROBHYPR,%
+      PROBNEGB,PROBNORM,PROBT,BETAINV,CINV,FINV,GAMINV,PROBIT,TINV,CSS,%
+      CV,KURTOSIS,MEAN,NMISS,RANGE,SKEWNESS,STD,STDERR,SUM,USS,NORMAL,%
+      RANBIN,RANCAU,RANEXP,RANGAM,RANNOR,RANPOI,RANTBL,RANTRI,RANUNI,%
+      UNIFORM,IF,THEN,ELSE,WHILE,UNTIL,DROP,KEEP,LABEL,DEFAULT,ARRAY,%
+      MERGE,CARDS,CARDS4,PUT,SET,UPDATE,ABORT,DELETE,DISPLAY,LIST,%
+      LOSTCARD,MISSING,STOP,WHERE,ARRAY,DROP,KEEP,WINDOW,LENGTH,RENAME,%
+      RETAIN,MEANS,UNIVARIATE,SUMMARY,TABULATE,CORR,FREQ,FOOTNOTE,NOTE,%
+      SHOW},%
+   otherkeywords={!,!=,~,$,*,\&,_,/,<,>=,=<,>},%
+   morestring=[d]'%
+   }%
+\lst@definelanguage[AlLaTeX]{TeX}[LaTeX]{TeX}%
+  {moretexcs={AtBeginDocument,AtBeginDvi,AtEndDocument,AtEndOfClass,%
+      AtEndOfPackage,ClassError,ClassInfo,ClassWarning,%
+      ClassWarningNoLine,CurrentOption,DeclareErrorFont,%
+      DeclareFixedFont,DeclareFontEncoding,DeclareFontEncodingDefaults,%
+      DeclareFontFamily,DeclareFontShape,DeclareFontSubstitution,%
+      DeclareMathAccent,DeclareMathAlphabet,DeclareMathAlphabet,%
+      DeclareMathDelimiter,DeclareMathRadical,DeclareMathSizes,%
+      DeclareMathSymbol,DeclareMathVersion,DeclareOldFontCommand,%
+      DeclareOption,DeclarePreloadSizes,DeclareRobustCommand,%
+      DeclareSizeFunction,DeclareSymbolFont,DeclareSymbolFontAlphabet,%
+      DeclareTextAccent,DeclareTextAccentDefault,DeclareTextCommand,%
+      DeclareTextCommandDefault,DeclareTextComposite,%
+      DeclareTextCompositeCommand,DeclareTextFontCommand,%
+      DeclareTextSymbol,DeclareTextSymbolDefault,ExecuteOptions,%
+      GenericError,GenericInfo,GenericWarning,IfFileExists,%
+      InputIfFileExists,LoadClass,LoadClassWithOptions,MessageBreak,%
+      OptionNotUsed,PackageError,PackageInfo,PackageWarning,%
+      PackageWarningNoLine,PassOptionsToClass,PassOptionsToPackage,%
+      ProcessOptionsProvidesClass,ProvidesFile,ProvidesFile,%
+      ProvidesPackage,ProvideTextCommand,RequirePackage,%
+      RequirePackageWithOptions,SetMathAlphabet,SetSymbolFont,%
+      TextSymbolUnavailable,UseTextAccent,UseTextSymbol},%
+   morekeywords={array,center,displaymath,document,enumerate,eqnarray,%
+      equation,flushleft,flushright,itemize,list,lrbox,math,minipage,%
+      picture,sloppypar,tabbing,tabular,trivlist,verbatim}%
+  }%
+\lst@definelanguage[LaTeX]{TeX}[common]{TeX}%
+  {moretexcs={a,AA,aa,addcontentsline,addpenalty,addtocontents,%
+      addtocounter,addtolength,addtoversion,addvspace,alph,Alph,and,%
+      arabic,array,arraycolsep,arrayrulewidth,arraystretch,author,%
+      baselinestretch,begin,bezier,bfseries,bibcite,bibdata,bibitem,%
+      bibliography,bibliographystyle,bibstyle,bigskip,boldmath,%
+      botfigrule,bottomfraction,Box,caption,center,CheckCommand,circle,%
+      citation,cite,cleardoublepage,clearpage,cline,columnsep,%
+      columnseprule,columnwidth,contentsline,dashbox,date,dblfigrule,%
+      dblfloatpagefraction,dblfloatsep,dbltextfloatsep,dbltopfraction,%
+      defaultscriptratio,defaultscriptscriptratio,depth,Diamond,%
+      displaymath,document,documentclass,documentstyle,doublerulesep,%
+      em,emph,endarray,endcenter,enddisplaymath,enddocument,%
+      endenumerate,endeqnarray,endequation,endflushleft,endflushright,%
+      enditemize,endlist,endlrbox,endmath,endminipage,endpicture,%
+      endsloppypar,endtabbing,endtabular,endtrivlist,endverbatim,%
+      enlargethispage,ensuremath,enumerate,eqnarray,equation,%
+      evensidemargin,extracolsep,fbox,fboxrule,fboxsep,filecontents,%
+      fill,floatpagefraction,floatsep,flushbottom,flushleft,flushright,%
+      fnsymbol,fontencoding,fontfamily,fontseries,fontshape,fontsize,%
+      fontsubfuzz,footnotemark,footnotesep,footnotetext,footskip,frac,%
+      frame,framebox,fussy,glossary,headheight,headsep,height,hline,%
+      hspace,I,include,includeonly,index,inputlineno,intextsep,%
+      itemindent,itemize,itemsep,iterate,itshape,Join,kill,label,%
+      labelsep,labelwidth,LaTeX,LaTeXe,leadsto,lefteqn,leftmargin,%
+      leftmargini,leftmarginii,leftmarginiii,leftmarginiv,leftmarginv,%
+      leftmarginvi,leftmark,lhd,lim,linebreak,linespread,linethickness,%
+      linewidth,list,listfiles,listfiles,listparindent,lrbox,%
+      makeatletter,makeatother,makebox,makeglossary,makeindex,%
+      makelabel,MakeLowercase,MakeUppercase,marginpar,marginparpush,%
+      marginparsep,marginparwidth,markboth,markright,math,mathbf,%
+      mathellipsis,mathgroup,mathit,mathrm,mathsf,mathsterling,mathtt,%
+      mathunderscore,mathversion,mbox,mdseries,mho,minipage,%
+      multicolumn,multiput,NeedsTeXFormat,newcommand,newcounter,%
+      newenvironment,newfont,newhelp,newlabel,newlength,newline,%
+      newmathalphabet,newpage,newsavebox,newtheorem,nobreakspace,%
+      nobreakspace,nocite,nocorr,nocorrlist,nofiles,nolinebreak,%
+      nonumber,nopagebreak,normalcolor,normalfont,normalmarginpar,%
+      numberline,obeycr,oddsidemargin,oldstylenums,onecolumn,oval,%
+      pagebreak,pagenumbering,pageref,pagestyle,paperheight,paperwidth,%
+      paragraphmark,parbox,parsep,partopsep,picture,poptabs,pounds,%
+      protect,pushtabs,put,qbezier,qbeziermax,r,raggedleft,raisebox,%
+      ref,refstepcounter,renewcommand,renewenvironment,restorecr,%
+      reversemarginpar,rhd,rightmargin,rightmark,rmfamily,roman,Roman,%
+      rootbox,rule,samepage,sbox,scshape,secdef,section,sectionmark,%
+      selectfont,setcounter,settodepth,settoheight,settowidth,sffamily,%
+      shortstack,showoutput,showoverfull,sloppy,sloppypar,slshape,%
+      smallskip,sqsubset,sqsupset,SS,stackrel,stepcounter,stop,stretch,%
+      subparagraphmark,subsectionmark,subsubsectionmark,sum,%
+      suppressfloats,symbol,tabbing,tabbingsep,tabcolsep,tabular,%
+      tabularnewline,textasciicircum,textasciitilde,textbackslash,%
+      textbar,textbf,textbraceleft,textbraceright,textbullet,%
+      textcircled,textcompwordmark,textdagger,textdaggerdbl,textdollar,%
+      textellipsis,textemdash,textendash,textexclamdown,textfloatsep,%
+      textfraction,textgreater,textheight,textit,textless,textmd,%
+      textnormal,textparagraph,textperiodcentered,textquestiondown,%
+      textquotedblleft,textquotedblright,textquoteleft,textquoteright,%
+      textregistered,textrm,textsc,textsection,textsf,textsl,%
+      textsterling,textsuperscript,texttrademark,texttt,textunderscore,%
+      textup,textvisiblespace,textwidth,thanks,thefootnote,thempfn,%
+      thempfn,thempfootnote,thepage,thepage,thicklines,thinlines,%
+      thispagestyle,title,today,topfigrule,topfraction,topmargin,%
+      topsep,totalheight,tracingfonts,trivlist,ttfamily,twocolumn,%
+      typein,typeout,unboldmath,unitlength,unlhd,unrhd,upshape,usebox,%
+      usecounter,usefont,usepackage,value,vector,verb,verbatim,vline,%
+      vspace,width,%
+      normalsize,small,footnotesize,scriptsize,tiny,large,Large,LARGE,%
+      huge,Huge}%
+  }%
+\lst@definelanguage[plain]{TeX}[common]{TeX}%
+  {moretexcs={advancepageno,beginsection,bf,bffam,bye,cal,cleartabs,%
+      columns,dosupereject,endinsert,eqalign,eqalignno,fiverm,fivebf,%
+      fivei,fivesy,folio,footline,hang,headline,it,itemitem,itfam,%
+      leqalignno,magnification,makefootline,makeheadline,midinsert,mit,%
+      mscount,nopagenumbers,normalbottom,of,oldstyle,pagebody,%
+      pagecontents,pageinsert,pageno,plainoutput,preloaded,proclaim,rm,%
+      settabs,sevenbf,seveni,sevensy,sevenrm,sl,slfam,supereject,%
+      tabalign,tabs,tabsdone,tabsyet,tenbf,tenex,teni,tenit,tenrm,%
+      tensl,tensy,tentt,textindent,topglue,topins,topinsert,tt,ttfam,%
+      ttraggedright,vfootnote}%
+  }%
+\lst@definelanguage[common]{TeX}[primitive]{TeX}
+  {moretexcs={active,acute,ae,AE,aleph,allocationnumber,allowbreak,%
+      alpha,amalg,angle,approx,arccos,arcsin,arctan,arg,arrowvert,%
+      Arrowvert,ast,asymp,b,backslash,bar,beta,bgroup,big,Big,bigbreak,%
+      bigcap,bigcirc,bigcup,bigg,Bigg,biggl,Biggl,biggm,Biggm,biggr,%
+      Biggr,bigl,Bigl,bigm,Bigm,bigodot,bigoplus,bigotimes,bigr,Bigr,%
+      bigskip,bigskipamount,bigsqcup,bigtriangledown,bigtriangleup,%
+      biguplus,bigvee,bigwedge,bmod,bordermatrix,bot,bowtie,brace,%
+      braceld,bracelu,bracerd,braceru,bracevert,brack,break,breve,%
+      buildrel,bullet,c,cap,cases,cdot,cdotp,cdots,centering,%
+      centerline,check,chi,choose,circ,clubsuit,colon,cong,coprod,%
+      copyright,cos,cosh,cot,coth,csc,cup,d,dag,dagger,dashv,ddag,%
+      ddagger,ddot,ddots,deg,delta,Delta,det,diamond,diamondsuit,dim,%
+      displaylines,div,do,dospecials,dot,doteq,dotfill,dots,downarrow,%
+      Downarrow,downbracefill,egroup,eject,ell,empty,emptyset,endgraf,%
+      endline,enskip,enspace,epsilon,equiv,eta,exists,exp,filbreak,%
+      flat,fmtname,fmtversion,footins,footnote,footnoterule,forall,%
+      frenchspacing,frown,gamma,Gamma,gcd,ge,geq,gets,gg,goodbreak,%
+      grave,H,hat,hbar,heartsuit,hglue,hideskip,hidewidth,hom,%
+      hookleftarrow,hookrightarrow,hphantom,hrulefill,i,ialign,iff,Im,%
+      imath,in,inf,infty,int,interdisplaylinepenalty,%
+      interfootnotelinepenalty,intop,iota,item,j,jmath,joinrel,jot,%
+      kappa,ker,l,L,lambda,Lambda,land,langle,lbrace,lbrack,lceil,%
+      ldotp,ldots,le,leavevmode,leftarrow,Leftarrow,leftarrowfill,%
+      leftharpoondown,leftharpoonup,leftline,leftrightarrow,%
+      Leftrightarrow,leq,lfloor,lg,lgroup,lhook,lim,liminf,limsup,line,%
+      ll,llap,lmoustache,ln,lnot,log,longleftarrow,Longleftarrow,%
+      longleftrightarrow,Longleftrightarrow,longmapsto,longrightarrow,%
+      Longrightarrow,loop,lor,lq,magstep,magstep,magstephalf,mapsto,%
+      mapstochar,mathhexbox,mathpalette,mathstrut,matrix,max,maxdimen,%
+      medbreak,medskip,medskipamount,mid,min,models,mp,mu,multispan,%
+      nabla,narrower,natural,ne,nearrow,neg,negthinspace,neq,newbox,%
+      newcount,newdimen,newfam,newif,newinsert,newlanguage,newmuskip,%
+      newread,newskip,newtoks,newwrite,next,ni,nobreak,nointerlineskip,%
+      nonfrenchspacing,normalbaselines,normalbaselineskip,%
+      normallineskip,normallineskiplimit,not,notin,nu,null,nwarrow,o,O,%
+      oalign,obeylines,obeyspaces,odot,oe,OE,offinterlineskip,oint,%
+      ointop,omega,Omega,ominus,ooalign,openup,oplus,oslash,otimes,%
+      overbrace,overleftarrow,overrightarrow,owns,P,parallel,partial,%
+      perp,phantom,phi,Phi,pi,Pi,pm,pmatrix,pmod,Pr,prec,preceq,prime,%
+      prod,propto,psi,Psi,qquad,quad,raggedbottom,raggedright,rangle,%
+      rbrace,rbrack,rceil,Re,relbar,Relbar,removelastskip,repeat,%
+      rfloor,rgroup,rho,rhook,rightarrow,Rightarrow,rightarrowfill,%
+      rightharpoondown,rightharpoonup,rightleftharpoons,rightline,rlap,%
+      rmoustache,root,rq,S,sb,searrow,sec,setminus,sharp,showhyphens,%
+      sigma,Sigma,sim,simeq,sin,sinh,skew,slash,smallbreak,smallint,%
+      smallskip,smallskipamount,smash,smile,sp,space,spadesuit,sqcap,%
+      sqcup,sqrt,sqsubseteq,sqsupseteq,ss,star,strut,strutbox,subset,%
+      subseteq,succ,succeq,sum,sup,supset,supseteq,surd,swarrow,t,tan,%
+      tanh,tau,TeX,theta,Theta,thinspace,tilde,times,to,top,tracingall,%
+      triangle,triangleleft,triangleright,u,underbar,underbrace,%
+      uparrow,Uparrow,upbracefill,updownarrow,Updownarrow,uplus,%
+      upsilon,Upsilon,v,varepsilon,varphi,varpi,varrho,varsigma,%
+      vartheta,vdash,vdots,vec,vee,vert,Vert,vglue,vphantom,wedge,%
+      widehat,widetilde,wlog,wp,wr,xi,Xi,zeta}%
+  }%
+\lst@definelanguage[primitive]{TeX}%
+  {moretexcs={above,abovedisplayshortskip,abovedisplayskip,aftergroup,%
+      abovewithdelims,accent,adjdemerits,advance,afterassignment,atop,%
+      atopwithdelims,badness,baselineskip,batchmode,begingroup,%
+      belowdisplayshortskip,belowdisplayskip,binoppenalty,botmark,box,%
+      boxmaxdepth,brokenpenalty,catcode,char,chardef,cleaders,closein,%
+      closeout,clubpenalty,copy,count,countdef,cr,crcr,csname,day,%
+      deadcycles,def,defaulthyphenchar,defaultskewchar,delcode,%
+      delimiter,delimiterfactor,delimitershortfall,dimen,dimendef,%
+      discretionary,displayindent,displaylimits,displaystyle,%
+      displaywidowpenalty,displaywidth,divide,doublehyphendemerits,dp,%
+      edef,else,emergencystretch,end,endcsname,endgroup,endinput,%
+      endlinechar,eqno,errhelp,errmessage,errorcontextlines,%
+      errorstopmode,escapechar,everycr,everydisplay,everyhbox,everyjob,%
+      everymath,everypar,everyvbox,exhyphenpenalty,expandafter,fam,fi,%
+      finalhypendemerits,firstmark,floatingpenalty,font,fontdimen,%
+      fontname,futurelet,gdef,global,globaldefs,halign,hangafter,%
+      hangindent,hbadness,hbox,hfil,hfill,hfilneg,hfuzz,hoffset,%
+      holdinginserts,hrule,hsize,hskip,hss,ht,hyphenation,hyphenchar,%
+      hyphenpenalty,if,ifcase,ifcat,ifdim,ifeof,iffalse,ifhbox,ifhmode,%
+      ifinner,ifmmode,ifnum,ifodd,iftrue,ifvbox,ifvmode,ifvoid,ifx,%
+      ignorespaces,immediate,indent,input,insert,insertpenalties,%
+      interlinepenalty,jobname,kern,language,lastbox,lastkern,%
+      lastpenalty,lastskip,lccode,leaders,left,lefthyphenmin,leftskip,%
+      leqno,let,limits,linepenalty,lineskip,lineskiplimits,long,%
+      looseness,lower,lowercase,mag,mark,mathaccent,mathbin,mathchar,%
+      mathchardef,mathchoice,mathclose,mathcode,mathinner,mathop,%
+      mathopen,mathord,mathpunct,mathrel,mathsurround,maxdeadcycles,%
+      maxdepth,meaning,medmuskip,message,mkern,month,moveleft,%
+      moveright,mskip,multiply,muskip,muskipdef,newlinechar,noalign,%
+      noboundary,noexpand,noindent,nolimits,nonscript,nonstopmode,%
+      nulldelimiterspace,nullfont,number,omit,openin,openout,or,outer,%
+      output,outputpenalty,over,overfullrule,overline,overwithdelims,%
+      pagedepth,pagefilllstretch,pagefillstretch,pagefilstretch,%
+      pagegoal,pageshrink,pagestretch,pagetotal,par,parfillskip,%
+      parindent,parshape,parskip,patterns,pausing,penalty,%
+      postdisplaypenalty,predisplaypenalty,predisplaysize,pretolerance,%
+      prevdepth,prevgraf,radical,raise,read,relax,relpenalty,right,%
+      righthyphenmin,rightskip,romannumeral,scriptfont,%
+      scriptscriptfont,scriptscriptstyle,scriptspace,scriptstyle,%
+      scrollmode,setbox,setlanguage,sfcode,shipout,show,showbox,%
+      showboxbreadth,showboxdepth,showlists,showthe,skewchar,skip,%
+      skipdef,spacefactor,spaceskip,span,special,splitbotmark,%
+      splitfirstmark,splitmaxdepth,splittopskip,string,tabskip,%
+      textfont,textstyle,the,thickmuskip,thinmuskip,time,toks,toksdef,%
+      tolerance,topmark,topskip,tracingcommands,tracinglostchars,%
+      tracingmacros,tracingonline,tracingoutput,tracingpages,%
+      tracingparagraphs,tracingrestores,tracingstats,uccode,uchyph,%
+      underline,unhbox,unhcopy,unkern,unpenalty,unskip,unvbox,unvcopy,%
+      uppercase,vadjust,valign,vbadness,vbox,vcenter,vfil,vfill,%
+      vfilneg,vfuzz,voffset,vrule,vsize,vskip,vsplit,vss,vtop,wd,%
+      widowpenalty,write,xdef,xleaders,xspaceskip,year},%
+   sensitive,%
+   alsoother={0123456789$_},%
+   morecomment=[l]\%%
+  }[keywords,tex,comments]%
+\endinput
+%%
+%% End of file `lstlang3.sty'.

+ 1942 - 0
docs/styles/lstmisc.sty

@@ -0,0 +1,1942 @@
+%%
+%% This is file `lstmisc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% listings.dtx  (with options: `misc')
+%% 
+%% Please read the software license in listings.dtx or listings.dvi.
+%%
+%% (w)(c) 1996/1997/1998/1999/2000 Carsten Heinz and/or any other author
+%% listed elsewhere 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.
+%%
+%% The listings package is free software.
+%%
+%% However, if you distribute the package as part of a commercial
+%% product or if you use the package to prepare a document and sell the
+%% document (books, journals, and so on), I'd like to encourage you to
+%% make a donation to the LaTeX3 fund. The size of this `license fee'
+%% should depend on the value of the package for your product.
+%%
+%% If you use the package to typeset a non-commercial document, please
+%% send me a copy of the document (.dvi, .ps, .pdf, hardcopy, etc.) to
+%% support further development.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+\ProvidesFile{lstmisc.sty}[2000/08/23 v0.21 (Carsten Heinz)]
+\lst@AddToAtTop{\try@load@fontshape}{\def\space{ }}
+\lst@BeginAspect{strings}
+\gdef\lst@stringtypes{d,b,m,bd,db}
+\global\let\lst@xstringtypes\@empty
+\lst@Key{string}\relax{%
+    \lstKV@XOptArg[d]{#1}\lst@SAC
+         {String}s\lst@stringtypes\lst@xstringtypes
+         \lst@DefStrings\lst@FVConvert \@empty}
+\lst@Key{morestring}\relax{%
+    \lstKV@XOptArg[d]{#1}\lst@SAC
+         {String}s\lst@stringtypes\lst@xstringtypes
+         \lst@DefStrings\lst@FVConvert \relax}
+\lst@Key{deletestring}\relax{%
+    \lstKV@XOptArg[d]{#1}\lst@SACDelete
+         {String}s\lst@stringtypes\lst@xstringtypes
+         \lst@DefStrings}
+\lst@AddToHook{SetLanguage}{\let\lst@DefStrings\@empty}
+\lst@AddToHook{SelectCharTable}{\lst@DefStrings}
+\lst@Key{stringstyle}{}{\def\lst@stringstyle{#1}}
+\lst@AddToHook{EmptyStyle}{\let\lst@stringstyle\@empty}
+\lst@Key{stringspaces}{true}[t]{\lstKV@SetIf{#1}\lst@ifstringspaces}
+\lst@NewMode\lst@stringmode
+\gdef\lst@BeginString#1#2{%
+    \lst@TrackNewLines
+    \lst@ifexstrings #2\lst@PrintToken \fi
+    \lst@EnterMode{#1}%
+        {\lst@modetrue \let\lst@currstyle\lst@stringstyle}%
+    \lst@ifexstrings\else #2\lst@PrintToken \fi
+    \lst@ifstringspaces
+        \lst@keepspacestrue
+        \let\lst@outputspace\lst@visiblespace
+    \fi}
+\lst@AddToHookExe{ExcludeDelims}{\let\lst@ifexstrings\iffalse}
+\gdef\lst@EndString#1{%
+    \lst@ifexstrings
+          \lst@PrintToken \lst@LeaveMode
+        #1\lst@PrintToken
+    \else
+        #1\lst@PrintToken \lst@LeaveMode
+    \fi}
+\lst@Key{stringtest}\relax[t]{\lstKV@SetIf{#1}\lst@ifstringtest}
+\lst@AddToHook{SetLanguage}{\let\lst@ifstringtest\iftrue}
+\lst@AddToHook{Init}
+    {\lst@ifstringtest\else \let\lst@TestStringMode\@empty \fi}
+\gdef\lst@TestStringMode{%
+     \ifnum\lst@mode=\lst@stringmode
+         \PackageWarning{Listings}{String constant exceeds line}%
+         \lst@EndString{}%
+     \fi}
+\lst@AddToHook{EOL}{\lst@TestStringMode}
+\gdef\lst@ProcessString@d#1{%
+    \lst@ifletter \lst@Output\lst@letterfalse \fi
+    \let\lst@next\@empty
+    \ifnum\lst@mode=\lst@stringmode
+        \ifx #1\lst@closestring
+            \let\lst@next\lst@EndString
+        \fi
+    \else
+        \lst@ifmode\else
+            \let\lst@closestring#1%
+            \def\lst@next{\lst@BeginString\lst@stringmode}%
+        \fi
+    \fi
+    \expandafter\lst@next\csname\@lst s@s#1\endcsname}
+\gdef\lst@ProcessString@b#1{%
+    \lst@ifletter \lst@Output\lst@letterfalse \fi
+    \let\lst@next\@empty
+    \ifnum\lst@mode=\lst@stringmode
+        \ifx\lst@lastother\lstum@backslash\else
+            \ifx #1\lst@closestring
+                \let\lst@next\lst@EndString
+            \fi
+        \fi
+    \else
+        \lst@ifmode\else
+            \let\lst@closestring#1%
+            \def\lst@next{\lst@BeginString\lst@stringmode}%
+        \fi
+    \fi
+    \expandafter\lst@next\csname lsts@s#1\endcsname}
+\global\let\lst@ProcessString@bd\lst@ProcessString@b
+\global\let\lst@ProcessString@db\lst@ProcessString@bd
+\gdef\lst@ProcessString@m#1{%
+    \let\lst@next\@empty
+    \ifnum\lst@mode=\lst@stringmode
+        \lst@ifletter \lst@Output\lst@letterfalse \fi
+        \ifx #1\lst@closestring
+            \let\lst@next\lst@EndString
+        \fi
+    \else
+        \lst@ifletter
+            \lst@Output\lst@letterfalse
+        \else
+            \ifx\lst@lastother)\else \lst@ifmode\else
+                \let\lst@closestring#1%
+                \def\lst@next{\lst@BeginString\lst@stringmode}%
+            \fi \fi
+        \fi
+    \fi
+    \expandafter\lst@next\csname lsts@s#1\endcsname}
+\lst@EndAspect
+\lst@BeginAspect{comments}
+\gdef\lst@commenttypes{l,f,s,d,n}
+\gdef\lst@xcommenttypes{l,f,s,d,n}
+\lst@Key{comment}{}
+    {\lstKV@XOptArg[]{#1}\lst@SAC
+         {Comment}c\lst@commenttypes\lst@xcommenttypes
+         \lst@DefComments\lst@FVConvert \@empty}
+\lst@Key{morecomment}\relax
+    {\lstKV@XOptArg[]{#1}\lst@SAC
+         {Comment}c\lst@commenttypes\lst@xcommenttypes
+         \lst@DefComments\lst@FVConvert \relax}
+\lst@Key{deletecomment}\relax{%
+    \lstKV@XOptArg[]{#1}\lst@SACDelete
+         {Comment}c\lst@commenttypes\lst@xcommenttypes
+         \lst@DefComments}
+\lst@AddToHook{SelectCharTable}{\lst@DefComments}
+\lst@AddToHook{SetLanguage}{\let\lst@DefComments\@empty}
+\lst@Key{commentstyle}{}{\def\lst@commentstyle{#1}}
+\lst@AddToHook{EmptyStyle}{\let\lst@commenstyle\itshape}
+\gdef\lst@BeginComment#1#2#3\@empty{%
+    \lst@TrackNewLines \lst@PrintToken
+    \lst@EnterMode{#1}{\lst@modetrue \let\lst@currstyle#2}%
+    \lst@mode\lst@nomode #3\lst@mode#1\relax
+    \lsthk@AfterBeginComment}
+\lst@AddToHook{AfterBeginComment}{}
+\gdef\lst@EndComment#1\@empty{%
+    #1%
+    \lst@PrintToken \lst@LeaveMode
+    \let\lst@lastother\@empty}
+\gdef\lst@CommentB#1#2#3#4#5#6#7#8#9{%
+    \lst@CDef#1#2{#3}#4%
+        {#6}%
+        {\let\lst@bnext\lst@CArgEmpty
+         \lst@ifmode #7\else
+             #8%
+             \def\lst@bnext{\lst@BeginComment#5#9}%
+         \fi
+         \lst@bnext}%
+        \@empty}
+\gdef\lst@CommentE#1#2#3#4#5#6#7#8{%
+    \lst@CDef#1#2{#3}#4%
+        {#6}%
+        {\let\lst@enext\lst@CArgEmpty
+         \ifnum\lst@mode=#5%
+             #7%
+             \let\lst@enext\lst@EndComment
+         \else
+             #8%
+         \fi
+         \lst@enext}%
+        \@empty}
+\lst@AddToHook{Init}{\let\lst@bnext\relax \let\lst@enext\relax}
+\lst@NewMode\lst@CLmode
+\lst@AddToHook{EOL}{\ifnum\lst@mode=\lst@CLmode \lst@LeaveMode \fi}
+\gdef\lst@Comment@l#1\@empty{%
+    \lst@CArg #1\relax
+        \lst@CommentB\lst@CLmode{}{}{}\lst@commentstyle}
+\gdef\lst@Comment@f{\@ifnextchar[\lst@Comment@@f{\lst@Comment@@f[0]}}
+\gdef\lst@Comment@@f[#1]#2{%
+    \ifx\@empty#2\@empty\else
+        \lst@CArg #2\relax\lst@CommentB\lst@CLmode{}{}%
+            {\lst@CalcLineLength
+             \ifnum\@tempcnta=#1\else
+                \expandafter\@gobblethree
+             \fi}%
+            \lst@commentstyle
+        \def\lst@next{\lst@Comment@@f[#1]}%
+        \expandafter\lst@next
+    \fi}
+\gdef\lst@CommentDM@s#1#2#3\@empty{%
+    \lst@CArg #2\relax\lst@CommentB{#1}{}{}{}\lst@commentstyle
+    \lst@CArg #3\relax\lst@CommentE{#1}{}{}{}}
+\gdef\lst@Comment@d#1\@empty{\lstKV@FourArg{#1}%
+    {\ifx\@empty##4\@empty\else
+         \lst@UseDynamicMode\lst@CommentDM@s{##1}{##2}\@empty
+         \lst@UseDynamicMode\lst@CommentDM@s{##3}{##4}\@empty
+     \fi}}
+\gdef\lst@CommentDM@n#1#2\@empty{\lstKV@TwoArg{#2}%
+    {\ifx\@empty##2\@empty\else
+         \def\@tempa{##1}\def\@tempb{##2}%
+         \ifx\@tempa\@tempb
+             \PackageError{Listings}{Identical delimiters}%
+             {These delimiters make no sense with nested comments.}%
+         \else
+             \lst@CArg ##1\relax\lst@CommentB{#1}%
+                 {}%
+                 {\ifnum\lst@mode=#1\relax \expandafter\@gobble \fi}%
+                 {}\lst@commentstyle
+             \lst@CArg ##2\relax\lst@CommentE{#1}{}{}{}%
+         \fi
+     \fi}}
+\lst@EndAspect
+\lst@BeginAspect{pod}
+\lst@Key{printpod}{false}[t]{\lstKV@SetIf{#1}\lst@ifprintpod}
+\lst@Key{podcomment}{false}[t]{\lstKV@SetIf{#1}\lst@ifpodcomment}
+\lst@AddToHookExe{SetLanguage}{\let\lst@ifpodcomment\iffalse}
+\lst@NewMode\lst@PODmode
+\lst@NewMode\lst@PODmode
+\lst@AddToHook{SelectCharTable}
+    {\lst@ifpodcomment
+         \lst@CArgX =\relax\lst@CommentB\lst@PODmode
+           {}{}%
+           {\ifnum\@tempcnta=\z@
+                \lst@ifprintpod\else
+                    \def\lst@bnext{\lst@BeginDropOutput\lst@PODmode}%
+                    \expandafter\expandafter\expandafter\@gobblethree
+                \fi
+            \else
+               \expandafter\@gobblethree
+            \fi}%
+           \lst@commentstyle
+         \lst@CArgX =cut\^^M\relax\lst@CommentE\lst@PODmode
+           {\lst@CalcLineLength}%
+           {\ifnum\@tempcnta=\z@\else
+                \expandafter\@gobblethree
+            \fi}%
+           {}%
+ \fi}
+\lst@EndAspect
+\lst@BeginAspect{escape}
+\lst@Key{texcl}{false}[t]{\lstKV@SetIf{#1}\lst@iftexcl}
+\lst@AddToHook{TextStyle}{\let\lst@iftexcl\iffalse}
+\lst@AddToHook{EOL}
+    {\ifnum\lst@mode=\lst@TeXCLmode
+         \expandafter\lst@escapeend
+         \expandafter\lst@LeaveAllModes
+         \expandafter\lst@ReenterModes
+     \fi}
+\lst@AddToHook{AfterBeginComment}
+    {\lst@iftexcl \ifnum\lst@mode=\lst@CLmode
+         \lst@PrintToken
+         \lst@LeaveMode \lst@InterruptModes
+         \lst@EnterMode{\lst@TeXCLmode}{\lst@modetrue\lst@commentstyle}%
+         \expandafter\expandafter\expandafter\lst@escapebegin
+     \fi \fi}
+\lst@NewMode\lst@TeXCLmode
+\gdef\lst@ActiveCDefX#1#2#3#4#5#6#7{%
+    \let#4#1%
+    \catcode`#1\active\lccode`\~=`#1%
+    \ifx\@empty#2\@empty
+        \lowercase{\def~}{#5\def\lst@next{#6#7}\lst@next}%
+    \else \ifx\@empty#3\@empty
+        \lowercase{\def~}##1{%
+            #5%
+            \ifx##1#2\def\lst@next{#6#7}\else
+                     \def\lst@next{#4##1}\fi
+            \lst@next}%
+    \else
+        \lowercase{\def~}{%
+            #5%
+            \lst@IfNextCharsArg{#2#3}{#6#7}%
+                                     {\expandafter#4\lst@eaten}}%
+    \fi \fi}
+\gdef\lst@Escape#1#2#3#4{%
+    \lst@CArgX #1\relax\lst@CDefX
+        {}%
+        {\lst@TrackNewLines\lst@UseLostSpace \lst@PrintToken
+         \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}%
+                 {}%
+         \fi
+         #3\lst@escapebegin}%
+        {}}
+\lst@NewMode\lst@TeXmode
+\lst@Key{escapebegin}{}{\def\lst@escapebegin{#1}}
+\lst@Key{escapeend}{}{\def\lst@escapeend{#1}}
+\lst@Key{escapechar}{}
+    {\ifx\@empty#1\@empty
+         \let\lst@DefEsc\relax
+     \else
+         \def\lst@DefEsc{\lst@Escape{#1}{#1}{}{}}%
+     \fi}
+\lst@AddToHook{TextStyle}{\let\lst@DefEsc\@empty}
+\lst@AddToHook{SelectCharTable}{\lst@DefEsc}
+\lst@Key{escapeinside}{}{\lstKV@TwoArg{#1}%
+    {\let\lst@DefEsc\@empty
+     \ifx\@empty##1@empty\else \ifx\@empty##2\@empty\else
+         \def\lst@DefEsc{\lst@Escape{##1}{##2}{}{}}%
+     \fi\fi}}
+\lst@Key{mathescape}{false}[t]{\lstKV@SetIf{#1}\lst@ifmathescape}
+\lst@AddToHook{SelectCharTable}
+    {\lst@ifmathescape \lst@Escape{\$}{\$}%
+        {\setbox\@tempboxa=\hbox\bgroup$}%
+        {$\egroup \lst@CalcLostSpaceAndOutput}\fi}
+\lst@EndAspect
+\lst@BeginAspect{writefile}
+\newwrite\lst@WF \newtoks\lst@WFtoken
+\lst@AddToHook{InitVarsBOL}{\global\lst@WFtoken{}}
+\gdef\lst@WFWriteToFile{%
+  \begingroup
+   \let\lst@UM\@empty
+   \expandafter\edef\expandafter\lst@temp\expandafter{\the\lst@WFtoken}%
+   \immediate\write\lst@WF{\lst@temp}%
+  \endgroup
+  \global\lst@WFtoken{}}
+\gdef\lst@WFAppend#1{%
+    \global\expandafter\lst@WFtoken\expandafter{\the\lst@WFtoken#1}}
+\gdef\lst@BeginWriteFile{%
+    \begingroup
+    \let\lst@OutputBox\@gobble
+    \lst@WFBegin}
+\gdef\lst@BeginAlsoWriteFile{\begingroup \lst@WFBegin}
+\begingroup \catcode`\^^I=11
+\gdef\lst@WFBegin#1{%
+    \def\lst@Append##1{\advance\lst@length\@ne
+        \expandafter\lst@token\expandafter{\the\lst@token##1}%
+        \lst@WFAppend##1}%
+    \def\lst@AppendOther##1{%
+        \let\lst@lastother=##1\advance\lst@length\@ne
+        \expandafter\lst@token\expandafter{\the\lst@token##1}%
+        \ifx ##1\lst@outputspace
+            \lst@WFAppend{ }%
+        \else
+            \lst@WFAppend##1%
+        \fi}%
+    \lst@lAddTo\lst@PreGotoTabStop{\lst@WFAppend{^^I}}%
+    \def\lst@ProcessSpace{%
+        \lst@ifletter \lst@Output\lst@letterfalse \fi
+        \lst@AppendOther\lst@outputspace}%
+    \let\lst@DeInit\lst@WFDeInit
+    \let\lst@MProcessListing\lst@WFMProcessListing
+    \immediate\openout\lst@WF=#1\relax}%
+\endgroup
+\gdef\lst@EndWriteFile{\immediate\closeout\lst@WF \endgroup}
+\global\let\lst@WFMProcessListing\lst@MProcessListing
+\global\let\lst@WFDeInit\lst@DeInit
+\lst@AddToAtTop\lst@WFMProcessListing{\lst@WFWriteToFile}
+\lst@AddToAtTop\lst@WFDeInit{%
+    \ifnum\lst@length=\z@\else \lst@WFWriteToFile \fi}
+\lst@EndAspect
+\lst@BeginAspect{keywords}
+\lst@ifsavemem\else
+\gdef\lst@KeywordTest#1#2#3{%
+    \begingroup \let\lst@UM\@empty
+    \global\expandafter\let\expandafter\@gtempa
+        \csname lst#1@\the\lst@token\endcsname
+    \endgroup
+    \ifx\@gtempa\relax\else
+        \let\lst@thestyle\@gtempa
+    \fi}
+\gdef\lst@KEYWORDTEST{%
+    \uppercase\expandafter{\expandafter
+        \lst@KEYWORDTEST@\the\lst@token}\relax}
+\gdef\lst@KEYWORDTEST@#1\relax#2#3#4{%
+    \begingroup \let\lst@UM\@empty
+    \global\expandafter\let\expandafter\@gtempa
+        \csname lst#2@#1\endcsname
+    \endgroup
+    \ifx\@gtempa\relax\else
+        \let\lst@thestyle\@gtempa
+    \fi}
+\gdef\lst@WorkingTest#1#2#3{%
+    \begingroup \let\lst@UM\@empty
+    \global\expandafter\let\expandafter\@gtempa
+        \csname lst#1@\the\lst@token\endcsname
+    \endgroup
+    \@gtempa}
+\gdef\lst@WORKINGTEST{%
+    \uppercase\expandafter{\expandafter
+        \lst@WORKINGTEST@\the\lst@token}\relax}
+\gdef\lst@WORKINGTEST@#1\relax#2#3#4{%
+    \begingroup \let\lst@UM\@empty
+    \global\expandafter\let\expandafter\@gtempa
+        \csname lst#2@#1\endcsname
+    \endgroup
+    \@gtempa}
+\gdef\lst@DefineKeywords#1#2#3{%
+    \lst@ifsensitive
+        \def\lst@next{\lst@for#2}%
+    \else
+        \def\lst@next{\uppercase\expandafter{\expandafter\lst@for#2}}%
+    \fi
+    \lst@next\do
+    {\expandafter\ifx\csname lst#1@##1\endcsname\relax
+        \global\expandafter\let\csname lst#1@##1\endcsname#3%
+     \fi}}
+\gdef\lst@UndefineKeywords#1#2#3{%
+    \lst@ifsensitivedefed
+        \def\lst@next{\lst@for#2}%
+    \else
+        \def\lst@next{\uppercase\expandafter{\expandafter\lst@for#2}}%
+    \fi
+    \lst@next\do
+    {\expandafter\ifx\csname lst#1@##1\endcsname#3%
+        \global\expandafter\let\csname lst#1@##1\endcsname\relax
+     \fi}}
+\fi
+\lst@ifsavemem
+\gdef\lst@IfOneOutOf#1\relax#2{%
+    \def\lst@temp##1,#1,##2##3\relax{%
+        \ifx\@empty##2\else \expandafter\lst@IOOOfirst \fi}%
+    \def\lst@next{\lst@IfOneOutOf@#1\relax}%
+    \expandafter\lst@next#2\relax\relax}
+\gdef\lst@IfOneOutOf@#1\relax#2#3{%
+    \ifx#2\relax
+        \expandafter\@secondoftwo
+    \else
+        \expandafter\lst@temp\expandafter,#2,#1,\@empty\relax
+        \expandafter\lst@next
+    \fi}
+\ifx\iffalse\else\fi
+\gdef\lst@IOOOfirst#1\relax#2#3{\fi#2}
+\gdef\lst@IFONEOUTOF#1\relax#2{%
+    \uppercase{\def\lst@temp##1,#1},##2##3\relax{%
+        \ifx\@empty##2\else \expandafter\lst@IOOOfirst \fi}%
+    \def\lst@next{\lst@IFONEOUTOF@#1\relax}%
+    \expandafter\lst@next#2\relax}
+\gdef\lst@IFONEOUTOF@#1\relax#2#3{%
+    \ifx#2\relax
+        \expandafter\@secondoftwo
+    \else
+        \uppercase
+            {\expandafter\lst@temp\expandafter,#2,#1,\@empty\relax}%
+        \expandafter\lst@next
+    \fi}
+\gdef\lst@KWTest{%
+    \begingroup \let\lst@UM\@empty
+    \expandafter\xdef\expandafter\@gtempa\expandafter{\the\lst@token}%
+    \endgroup
+    \expandafter\lst@IfOneOutOf\@gtempa\relax}
+\gdef\lst@KeywordTest#1#2#3{\lst@KWTest #2{\let\lst@thestyle#3}{}}
+\global\let\lst@KEYWORDTEST\lst@KeywordTest
+\gdef\lst@WorkingTest#1#2#3{\lst@KWTest #2#3{}}
+\global\let\lst@WORKINGTEST\lst@WorkingTest
+\fi
+\lst@Key{sensitive}\relax[t]{\lstKV@SetIf{#1}\lst@ifsensitive}
+\lst@AddToHookExe{SetLanguage}{\let\lst@ifsensitive\iftrue}
+\lst@AddToHook{Init}
+    {\lst@ifsensitive\else
+         \let\lst@KeywordTest\lst@KEYWORDTEST
+         \let\lst@WorkingTest\lst@WORKINGTEST
+         \let\lst@IfOneOutOf\lst@IFONEOUTOF
+     \fi}
+\gdef\lst@MakeMacroUppercase#1{%
+    \ifx\@undefined#1\else \uppercase\expandafter
+        {\expandafter\def\expandafter#1\expandafter{#1}}%
+    \fi}
+\gdef\lst@InstallTest#1#2#3#4#5#6#7#8{%
+    \lst@AddToHook{TrackKeywords}{\lst@TrackKeywords{#1}#2#4#6#7#8}%
+    \lst@AddToHook{PostTrackKeywords}{\lst@PostTrackKeywords#2#3#4#5}}
+\lst@AddToHook{Init}{\lsthk@TrackKeywords\lsthk@PostTrackKeywords}
+\lst@AddToHook{TrackKeywords}{}% init
+\lst@AddToHook{PostTrackKeywords}{}% init
+\lst@AddToHook{Output}{\lst@ifkeywords \lsthk@DetectKeywords \fi}
+\lst@AddToHook{DetectKeywords}{}% init
+\lst@AddToHook{ModeTrue}{\let\lst@ifkeywords\iffalse}
+\lst@AddToHook{Init}{\let\lst@ifkeywords\iftrue}
+\gdef\lst@InstallTestNow#1#2#3#4#5{%
+    \@ifundefined{\string#2#1}%
+    {\global\@namedef{\string#2#1}{}%
+     \edef\@tempa{%
+         \noexpand\lst@AddToHook{\ifx#5dDetectKeywords\else Output\fi}%
+         {\ifx #4w\noexpand\lst@WorkingTest
+             \else\noexpand\lst@KeywordTest \fi
+          {#1}\noexpand#2\noexpand#3}}%
+     \lst@ifsavemem
+         \@tempa
+     \else
+         \@ifundefined{lst@if#1@ins}%
+             {\@tempa \global\@namedef{lst@if#1@ins}{}}%
+             {}%
+     \fi}
+    {}}
+\gdef\lst@TrackKeywords#1#2#3#4#5#6{%
+    \lst@false
+    \def\lst@arg{{#1}#4}%
+    \expandafter\expandafter\expandafter\lst@TK@
+        \expandafter\lst@arg#2\relax\relax
+    \lst@ifsavemem\else
+        \def\lst@arg{{#1}#4#2}%
+        \expandafter\expandafter\expandafter\lst@TK@@
+            \expandafter\lst@arg#3\relax\relax
+    \fi
+    \lst@if \lst@InstallTestNow{#1}#2#4#5#6\fi}
+\gdef\lst@TK@#1#2#3#4{%
+    \ifx\lst@ifsensitive\lst@ifsensitivedefed
+        \ifx#3#4\else
+            \lst@true
+            \lst@ifsavemem\else
+                \lst@UndefineKeywords{#1}#4#2%
+                \lst@DefineKeywords{#1}#3#2%
+            \fi
+        \fi
+    \else
+        \ifx#3\relax\else
+            \lst@true
+            \lst@ifsavemem\else
+                \lst@UndefineKeywords{#1}#4#2%
+                \lst@DefineKeywords{#1}#3#2%
+            \fi
+        \fi
+    \fi
+    \lst@ifsavemem \ifx#3\relax\else
+        \lst@ifsensitive\else \lst@MakeMacroUppercase#3\fi
+    \fi \fi
+    \ifx#3\relax
+        \expandafter\@gobblethree
+    \fi
+    \lst@TK@{#1}#2}
+\gdef\lst@TK@@#1#2#3#4#5{%
+    \ifx#4\relax
+        \expandafter\@gobblefour
+    \else
+        \lst@IfSubstring{#4#5}#3{}{\lst@UndefineKeywords{#1}#5#2}%
+    \fi
+    \lst@TK@@{#1}#2#3}
+\lst@AddToHook{InitVars}
+    {\global\let\lst@ifsensitivedefed\lst@ifsensitive}
+\global\let\lst@ifsensitivedefed\iffalse % init % \global
+\gdef\lst@PostTrackKeywords#1#2#3#4{%
+    \lst@ifsavemem\else
+        \global\let#3#1%
+        \global\let#4#2%
+    \fi}
+\lst@Key{defaultclass}\@ne{\def\lst@defaultclass{#1}}
+\gdef\lst@InstallFamily#1#2#3#4#5{%
+    \lst@Key{#2}\relax{\lst@UseFamily{#2}##1\relax\lst@MakeKeywords}%
+    \lst@Key{more#2}\relax
+        {\lst@UseFamily{#2}##1\relax\lst@MakeMoreKeywords}%
+    \lst@Key{delete#2}\relax
+        {\lst@UseFamily{#2}##1\relax\lst@DeleteKeywords}%
+    \ifx\@empty#3\@empty\else
+        \lst@Key{#3}{#4}{\lstKV@OptArg[\lst@defaultclass]{##1}%
+            {\@tempcnta####1\relax
+             \@namedef{lst@#3\ifnum\@tempcnta=\@ne\else \the\@tempcnta
+                             \fi}{####2}}}%
+    \fi
+    \expandafter\lst@InstallFamily@
+        \csname lst@#2@data\expandafter\endcsname
+        \csname lst@#5\endcsname {#1}{#2}{#3}}
+\gdef\lst@InstallFamily@#1#2#3#4#5#6#7#8{%
+    \gdef#1{{#3}{#4}{#5}#2#7}%
+    \long\def\lst@temp##1{#6}%
+    \ifx\lst@temp\@gobble
+        \lst@AddTo#1{s#8}%
+    \else
+        \lst@AddTo#1{w#8}%
+        \global\@namedef{lst@g#4@wp}##1{#6}%
+    \fi}
+\gdef\lst@ProvideFamily#1{%
+    \@ifundefined{lst@#1\ifnum\@tempcnta=\@ne\else \the\@tempcnta \fi}%
+    {\expandafter\expandafter\expandafter\lst@ProvideFamily@
+         \csname lst@#1@data\endcsname
+         {\ifnum\@tempcnta=\@ne\else \the\@tempcnta \fi}}%
+    {}}
+\gdef\lst@ProvideFamily@#1#2#3#4#5#6#7#8{%
+    \expandafter\xdef\csname lst@g#2#8@sty\endcsname
+    {\if #6w%
+         \expandafter\noexpand\csname lst@g#2@wp\endcsname{#8}%
+     \else
+         \expandafter\noexpand\csname lst@#3#8\endcsname
+     \fi}%
+    \ifx\@empty#3\@empty\else
+        \edef\lst@temp{\noexpand\lst@AddToHook{Init}{%
+            \noexpand\lst@ProvideStyle\expandafter\noexpand
+                \csname lst@#3#8\endcsname\noexpand#4}}%
+        \lst@temp
+    \fi
+    \expandafter\lst@ProvideFamily@@
+         \csname lst@#2#8@list\expandafter\endcsname
+         \csname lst@#2#8\expandafter\endcsname
+         \csname lst@#2#8@also\expandafter\endcsname
+         \csname lst@g#2#8@list\expandafter\endcsname
+         \csname lst@g#2#8\expandafter\endcsname
+         \csname lst@g#2#8@sty\expandafter\endcsname
+         {#1}#5#6#7}
+\gdef\lst@ProvideFamily@@#1#2#3#4#5#6#7#8{%
+    \gdef#1{#2#5}\global\let#2\@empty \global\let#3\@empty % init
+    \gdef#4{#2#5}\global\let#5\@empty % init
+    \lst@AddToHook{Init}{\expandafter\lst@UseBasicClasses#3{}{}{}}%
+    \if #8l\relax
+        \lst@AddToHook{SetLanguage}{\def#1{#2#5}\let#2\@empty}%
+    \fi
+    \lst@InstallTest{#7}#1#2#4#5#6}
+\gdef\lst@UseFamily#1{%
+    \def\lst@family{#1}%
+    \@ifnextchar[\lst@UseFamily@{\lst@UseFamily@[\lst@defaultclass]}}
+\gdef\lst@UseFamily@[#1]{%
+    \@tempcnta#1\relax
+    \lst@ProvideFamily\lst@family
+    \lst@UseFamily@a
+        {\lst@family\ifnum\@tempcnta=\@ne\else \the\@tempcnta \fi}}
+\gdef\lst@UseFamily@a#1{%
+    \expandafter\lst@UseFamily@b
+       \csname lst@#1@list\expandafter\endcsname
+       \csname lst@#1\expandafter\endcsname
+       \csname lst@#1@also\expandafter\endcsname
+       \csname lst@g#1\endcsname}
+\gdef\lst@UseFamily@b#1#2#3#4#5\relax#6{\lstKV@XOptArg[]{#5}#6#1#2#3#4}
+\gdef\lst@InstallKeywords#1#2#3#4#5{%
+    \lst@Key{#2}\relax
+        {\lst@UseFamily{#2}[\@ne]##1\relax\lst@MakeKeywords}%
+    \lst@Key{more#2}\relax
+        {\lst@UseFamily{#2}[\@ne]##1\relax\lst@MakeMoreKeywords}%
+    \lst@Key{delete#2}\relax
+        {\lst@UseFamily{#2}[\@ne]##1\relax\lst@DeleteKeywords}%
+    \ifx\@empty#3\@empty\else
+        \lst@Key{#3}{#4}{\@namedef{lst@#3}{##1}}%
+    \fi
+    \expandafter\lst@InstallFamily@
+        \csname lst@#2@data\expandafter\endcsname
+        \csname lst@#5\endcsname {#1}{#2}{#3}}
+\gdef\lst@ProvideStyle#1#2{%
+    \ifx#1\@undefined \let#1#2%
+    \else\ifx#1\relax \let#1#2\fi\fi}
+\gdef\lst@BuildClassList#1#2,{%
+    \ifx\relax#2\@empty\else
+        \ifx\@empty#2\@empty\else
+            \lst@lExtend#1{\csname lst@#2\expandafter\endcsname
+                           \csname lst@g#2\endcsname}%
+        \fi
+        \expandafter\lst@BuildClassList\expandafter#1
+    \fi}
+\gdef\lst@DeleteClassesIn#1#2{%
+    \expandafter\lst@DCI@\expandafter#1#2\relax\relax}
+\gdef\lst@DCI@#1#2#3{%
+    \ifx#2\relax
+        \expandafter\@gobbletwo
+    \else
+        \def\lst@temp##1#2#3##2{%
+            \lst@lAddTo#1{##1}%
+            \ifx ##2\relax\else
+                \expandafter\lst@temp
+            \fi ##2}%
+        \let\@tempa#1\let#1\@empty
+        \expandafter\lst@temp\@tempa#2#3\relax
+    \fi
+    \lst@DCI@#1}
+\gdef\lst@MakeKeywords[#1]#2#3#4#5#6{%
+    \def#3{#4#6}\let#4\@empty \let#5\@empty
+    \lst@MakeMoreKeywords[#1]{#2}#3#4#5#6}
+\gdef\lst@MakeMoreKeywords[#1]#2#3#4#5#6{%
+    \lst@BuildClassList#3#1,\relax,%
+    \lst@DefOther\lst@temp{,#2}\lst@lExtend#4\lst@temp
+    \expandafter\lst@SpecialKeywordScan\expandafter
+        #4\expandafter#5#5{}{}}
+\gdef\lst@DeleteKeywords[#1]#2#3#4#5#6{%
+    \lst@MakeKeywords[#1]{#2}\@tempa\@tempb#5#6%
+    \lst@DeleteClassesIn#3\@tempa
+    \lst@DeleteKeysIn#4\@tempb
+    \lst@SpecialKeywordScan#4#5{}{}}
+\lst@Key{specialscan}t[t]{\lstKV@SetIf{#1}\lst@ifspecialscan}
+\lst@AddToHook{SelectLanguage}{\let\lst@ifspecialscan\iftrue}
+\lst@DefOther\lst@others{!"\#\%&'()*+-./0123456789:;<=>?[\]^`\{|\}~}
+\global\let\lst@others\lst@others % init
+\gdef\lst@SpecialKeywordScan#1#2#3#4{%
+    \lst@ifspecialscan
+        \def\lst@ialsoletter{#3}\def\lst@ialsodigit{#4}%
+        \expandafter\lst@SKS@\expandafter#1\lst@others\relax
+        \edef#2{{\lst@ialsoletter}{\lst@ialsodigit}}%
+    \fi}
+\gdef\lst@SKS@#1#2{%
+    \ifx\relax#2%
+        \expandafter\@gobbletwo
+    \else
+        \def\lst@temp##1#2##2##3\relax{%
+            \ifx\@empty##2\else
+                \def\lst@temp####1,#2####2####3\relax{%
+                    \ifx\@empty####2%
+                        \lst@SKS@@#2%
+                    \else
+                        \lst@SKSAdd\lst@ialsoletter#2%
+                    \fi}%
+                \expandafter\lst@temp\expandafter,#1,#2\@empty\relax
+            \fi}%
+        \expandafter\lst@temp #1#2\@empty\relax
+    \fi
+    \lst@SKS@#1}
+\gdef\lst@SKS@@#1{%
+    \ifnum`#1<`0%
+        \lst@SKSAdd\lst@ialsodigit#1%
+    \else\ifnum`#1>`9%
+        \lst@SKSAdd\lst@ialsodigit#1%
+    \fi \fi}
+\gdef\lst@SKSAdd#1#2{%
+    \def\lst@temp##1#2##2\relax{%
+        \ifx\@empty##2\@empty \lst@lAddTo#1{#2}\fi}%
+    \expandafter\lst@temp#1#2\relax}
+\lst@InstallFamily k{keywords}{keywordstyle}\bfseries{keywordstyle}{}ld
+\lst@Key{ndkeywords}\relax
+    {\lst@UseFamily{keywords}[\tw@]#1\relax\lst@MakeKeywords}%
+\lst@Key{morendkeywords}\relax
+    {\lst@UseFamily{keywords}[\tw@]#1\relax\lst@MakeMoreKeywords}%
+\lst@Key{deletendkeywords}\relax
+    {\lst@UseFamily{keywords}[\tw@]#1\relax\lst@DeleteKeywords}%
+\lst@Key{ndkeywordstyle}\relax{\@namedef{lst@keywordstyle2}{#1}}%
+\lst@Key{otherkeywords}{}{\lst@DefActive\lst@otherkeywords{#1}}
+\lst@AddToHook{SelectCharTable}
+    {\expandafter\lst@DefineOtherKeywords\lst@otherkeywords,\relax,}
+\gdef\lst@DefineOtherKeywords#1,{%
+    \ifx\relax#1\@empty\else
+        \ifx\@empty#1\@empty\else
+            \lst@CArg#1\relax\lst@CDef {}\lst@PrintOtherKeyword\@empty
+        \fi
+        \expandafter\lst@DefineOtherKeywords
+    \fi}
+\gdef\lst@PrintOtherKeyword#1\@empty{%
+    \lst@PrintToken
+    \begingroup
+        \lst@modetrue \lsthk@TextStyle
+        \let\lst@ProcessDigit\lst@ProcessLetter
+        \let\lst@ProcessOther\lst@ProcessLetter
+        \lst@lettertrue
+        \lst@gkeywords@sty{#1\lst@PrintToken}%
+    \endgroup}
+\lst@EndAspect
+\lst@BeginAspect[keywords]{emph}
+\lst@InstallFamily e{emph}{emphstyle}\relax{empty}{}od
+\lst@EndAspect
+\lst@BeginAspect[keywords]{tex}
+\lst@InstallKeywords{cs}{texcs}{texcsstyle}\relax{keywordstyle}
+    {\ifx\lst@lastother\lstum@backslash
+         \let\lst@thestyle\lst@texcsstyle
+     \fi}
+    ld
+\lst@EndAspect
+\lst@BeginAspect[keywords]{directives}
+\lst@NewMode\lst@CDmode
+\lst@AddToHook{EOL}{\ifnum\lst@mode=\lst@CDmode \lst@LeaveMode \fi}
+\lst@InstallKeywords{d}{directives}{directivestyle}\relax{keywordstyle}
+    {\ifnum\lst@mode=\lst@CDmode
+         \let\lst@thestyle\lst@directivestyle
+     \fi}
+    ld
+\lst@AddToHook{SelectCharTable}
+    {\ifx\lst@directives\@empty\else
+         \lst@DefSaveDef{`\#}\lsts@CCD
+         {\lst@CalcLineLength
+          \lst@ifmode\else
+              \ifnum\@tempcnta=\z@
+                  \lst@EnterMode{\lst@CDmode}{}%
+              \fi
+          \fi
+          \ifnum\lst@mode=\lst@CDmode
+              \ifnum\@tempcnta=\z@
+                  \lst@PrintToken
+                  {\let\lst@currstyle\lst@directivestyle
+                   \lsts@CCD\lst@PrintToken}%
+              \else \lsts@CCD
+              \fi
+          \else \lsts@CCD
+          \fi}%
+     \fi}
+\lst@AddTo\lst@stringtypes{,directive}
+\lst@AddTo\lst@xstringtypes{,directive}
+\gdef\lst@StringDM@directive#1#2#3\@empty{%
+    \lst@CArg #2\relax\lst@CDef
+        {}%
+        {\let\lst@bnext\lst@CArgEmpty
+         \ifnum\lst@mode=\lst@CDmode
+             \def\lst@bnext{\lst@EnterMode#1{\lst@modetrue
+                 \let\lst@currstyle\lst@stringstyle}}%
+         \fi
+         \lst@bnext}%
+        \@empty
+    \lst@CArg #3\relax\lst@CDef
+        {}%
+        {\let\lst@enext\lst@CArgEmpty
+         \ifnum\lst@mode=#1%
+             \let\lst@bnext\lst@EndXString
+         \fi
+         \lst@bnext}%
+        \@empty}
+\gdef\lst@EndXString#1\@empty{#1\lst@EndString}
+\lst@EndAspect
+\lst@BeginAspect[keywords]{html}
+\lst@NewMode\lst@insidemode
+\lst@Key{keywordsinside}{}{\lstKV@TwoArg{#1}
+    {\let\lst@DefInside\@empty
+     \ifx\@empty##1\@empty\else \ifx\@empty##2\@empty\else
+         \def\lst@DefInside{%
+             \lst@DefSaveDef{`##1}\lsts@insideb
+                 {\lst@ifmode\else \ifnum\lst@mode=\lst@insidemode\else
+                      \lst@PrintToken
+                      \lst@EnterMode\lst@insidemode{}%
+                  \fi\fi
+                  \lsts@insideb}%
+             \lst@DefSaveDef{`##2}\lsts@insidee
+                  {\ifnum\lst@mode=\lst@insidemode
+                       \lsts@insidee \lst@PrintToken\lst@LeaveMode
+                   \else
+                       \expandafter\lsts@insidee
+                   \fi}}%
+     \fi\fi}}
+\lst@AddToHook{SelectCharTable}{\lst@DefInside}
+\lst@AddToHook{Output}
+    {\ifx\lst@DefInside\@empty\else \ifx\lst@thestyle\lst@gkeywords@sty
+         \ifnum\lst@mode=\lst@insidemode\else
+             \let\lst@thestyle\@empty
+         \fi
+     \fi\fi}
+\lst@Key{usekeywordsinside}t[t]{\lstKV@SetIf{#1}\lst@ifusekeysinside}
+\lst@AddToHook{Output}
+    {\ifnum\lst@mode=\lst@insidemode \lst@ifusekeysinside\else
+         \let\lst@thestyle\lst@gkeywords@sty
+     \fi\fi}
+\lst@EndAspect
+\lst@BeginAspect[keywords,comments]{keywordcomments}
+\lst@NewMode\lst@KCmode \lst@NewMode\lst@KCSmode
+\gdef\lst@BeginKC{%
+    \lst@token{}\lst@length\z@
+    \lst@BeginComment\lst@KCmode\lst@commentstyle\@empty}
+\gdef\lst@BeginKCS{%
+    \lst@token{}\lst@length\z@
+    \lst@BeginComment\lst@KCSmode\lst@commentstyle\@empty}
+\lst@AddToHook{PostOutput}{\lst@KCpost \global\let\lst@KCpost\@empty}
+\global\let\lst@KCpost\@empty
+\gdef\lst@EndKC{%
+    \xdef\@gtempa{%
+        \noexpand\lst@token{\the\lst@token}%
+        \noexpand\lst@length\the\lst@length\relax}%
+    \aftergroup\@gtempa \lst@LeaveMode}
+\lst@InstallKeywords{kc}{keywordcomment}{}\relax{}
+    {\ifnum\lst@mode=\lst@KCmode
+         \edef\lst@temp{\the\lst@token}%
+         \ifx\lst@temp\lst@KCmatch
+             \lst@EndKC
+         \fi
+     \else
+         \lst@ifmode\else
+             \xdef\lst@KCmatch{\the\lst@token}%
+             \global\let\lst@KCpost\lst@BeginKC
+         \fi
+     \fi}
+    lo
+\lst@Key{keywordcommentsemicolon}{}{\lstKV@ThreeArg{#1}%
+    {\def\lst@KCAkeywordsB{##1}%
+     \def\lst@KCAkeywordsE{##2}%
+     \def\lst@KCBkeywordsB{##3}%
+     \def\lst@KCkeywords{##1##2##3}}}
+\lst@AddToHook{SelectCharTable}
+    {\ifx\lst@KCkeywords\@empty\else
+        \lst@DefSaveDef{`\;}\lsts@EKC
+            {\lst@ifletter \lst@Output\lst@letterfalse \fi
+             \ifnum\lst@mode=\lst@KCmode \lst@EndComment \else
+             \ifnum\lst@mode=\lst@KCSmode \lst@EndComment
+             \fi \fi
+             \lsts@EKC}%
+     \fi}
+\gdef\lst@KCAWorkB{%
+    \lst@ifmode\else \global\let\lst@KCpost\lst@BeginKC \fi}
+\gdef\lst@KCBWorkB{%
+    \lst@ifmode\else \global\let\lst@KCpost\lst@BeginKCS \fi}
+\gdef\lst@KCAWorkE{\ifnum\lst@mode=\lst@KCmode \lst@EndKC \fi}
+\lst@ProvideFamily@@
+    \lst@KCAkeywordsB@list\lst@KCAkeywordsB \lst@KC@also
+    \lst@gKCAkeywordsB@list\lst@gKCAkeywordsB \lst@KCAWorkB
+    {kcb}owo % prefix, other key, working procedure, Output hook
+\lst@ProvideFamily@@
+    \lst@KCAkeywordsE@list\lst@KCAkeywordsE \lst@KC@also
+    \lst@gKCAkeywordsE@list\lst@gKCAkeywordsE \lst@KCAWorkE
+    {kce}owo
+\lst@ProvideFamily@@
+    \lst@KCBkeywordsB@list\lst@KCBkeywordsB \lst@KC@also
+    \lst@gKCBkeywordsB@list\lst@gKCBkeywordsB \lst@KCBWorkB
+    {kcs}owo
+\lst@EndAspect
+\lst@BeginAspect[keywords]{index}
+\lst@InstallFamily w{index}{indexstyle}\lstindexmacro{indexstyle1}
+    {\csname lst@indexstyle#1\expandafter\endcsname
+         \expandafter{\the\lst@token}}
+    od
+\lst@UserCommand\lstindexmacro#1{\index{{\ttfamily#1}}}
+\lst@EndAspect
+\lst@BeginAspect[keywords]{procnames}
+\gdef\lst@procnametrue{\global\let\lst@ifprocname\iftrue}
+\gdef\lst@procnamefalse{\global\let\lst@ifprocname\iffalse}
+\lst@AddToHook{Init}{\lst@procnamefalse}
+\lst@AddToHook{DetectKeywords}
+    {\lst@ifprocname
+         \let\lst@thestyle\lst@procnamestyle
+         \lst@ifindexproc \csname lst@gindex@sty\endcsname \fi
+         \lst@procnamefalse
+     \fi}
+\lst@Key{procnamestyle}{}{\def\lst@procnamestyle{#1}}
+\lst@Key{indexprocnames}{false}[t]{\lstKV@SetIf{#1}\lst@ifindexproc}
+\lst@AddToHook{Init}
+    {\lst@ifindexproc
+         \@ifundefined{lst@indexstyle1}%
+             {\@namedef{lst@indexstyle1}##1{}}%
+             {}%
+     \fi \fi}
+\lst@InstallKeywords w{procnamekeys}{}\relax{}
+    {\global\let\lst@PNpost\lst@procnametrue}
+    od
+\lst@AddToHook{PostOutput}{\lst@PNpost\global\let\lst@PNpost\@empty}
+\global\let\lst@PNpost\@empty % init
+\lst@EndAspect
+\lst@BeginAspect{style}
+\@ifundefined{lststylefiles}
+    {\lst@UserCommand\lststylefiles{lststy0.sty}}{}
+\lst@UserCommand\lstdefinestyle{\lst@DefStyle\iftrue}
+\lst@UserCommand\lst@definestyle{\lst@DefStyle\iffalse}
+\gdef\lst@DefStyle{\lst@DefDriver{style}{sty}\lstset}
+\global\@namedef{lststy@$}{\lsthk@EmptyStyle}
+\lst@AddToHook{EmptyStyle}{}% init
+\lst@Key{style}\relax{%
+    \lst@LAS{style}{sty}{[]{#1}}\lst@NoAlias\lststylefiles
+        \lsthk@SetStyle
+        {}}
+\lst@AddToHook{SetStyle}{}% init
+\lst@EndAspect
+\lst@BeginAspect{language}
+\@ifundefined{lstdriverfiles}
+    {\lst@UserCommand\lstlanguagefiles{lstlang0.sty}}{}
+\lst@UserCommand\lstdefinelanguage{\lst@DefLang\iftrue}
+\lst@UserCommand\lst@definelanguage{\lst@DefLang\iffalse}
+\gdef\lst@DefLang{\lst@DefDriver{language}{lang}\lstset}
+\lstdefinelanguage{}{}
+\lst@Key{language}\relax{\lstKV@OptArg[]{#1}%
+    {\lst@LAS{language}{lang}{[##1]{##2}}\lst@FindAlias\lstlanguagefiles
+         \lsthk@SetLanguage
+         {\lst@FindAlias[##1]{##2}%
+          \let\lst@language\lst@malias
+          \let\lst@dialect\lst@oalias}}}
+\lst@Key{alsolanguage}\relax{\lstKV@OptArg[]{#1}%
+    {\lst@LAS{language}{lang}{[##1]{##2}}\lst@FindAlias\lstlanguagefiles
+         {}%
+         {\lst@FindAlias[##1]{##2}%
+          \let\lst@language\lst@malias
+          \let\lst@dialect\lst@oalias}}}
+\lst@AddToHook{SetLanguage}{}% init
+\lst@UserCommand\lstalias{\@ifnextchar[\lstalias@\lstalias@@}
+\gdef\lstalias@[#1]#2[#3]#4{\lst@NormedNameDef{lsta@#2$#1}{#4$#3}}
+\gdef\lstalias@@#1#2{\lst@NormedNameDef{lsta@#1}{#2}}
+\lst@Key{defaultdialect}\relax
+    {\lstKV@OptArg[]{#1}{\lst@NormedNameDef{lstdd@##2}{##1}}}
+\gdef\lst@FindAlias[#1]#2{%
+    \lst@NormedDef\lst@oalias{#1}%
+    \lst@NormedDef\lst@malias{#2}%
+    \@ifundefined{lsta@\lst@malias}{}%
+        {\edef\lst@malias{\csname lsta@\lst@malias\endcsname}}%
+    \ifx\@empty\lst@oalias \@ifundefined{lstdd@\lst@malias}{}%
+        {\edef\lst@oalias{\csname lstdd@\lst@malias\endcsname}}%
+    \fi
+    \edef\lst@temp{\lst@malias $\lst@oalias}%
+    \@ifundefined{lsta@\lst@temp}{}%
+        {\edef\lst@temp{\csname lsta@\lst@temp\endcsname}}%
+    \expandafter\lst@FindAlias@\lst@temp $}
+\gdef\lst@FindAlias@#1$#2${%
+    \def\lst@malias{#1}\def\lst@oalias{#2}%
+    \ifx\@empty\lst@oalias \@ifundefined{lstdd@\lst@malias}{}%
+        {\edef\lst@oalias{\csname lstdd@\lst@malias\endcsname}}%
+    \fi}
+\gdef\lst@RequireLanguages#1{%
+    \lst@Require{language}{lang}{#1}\lst@FindAlias\lstlanguagefiles
+    \ifx\lst@loadaspects\@empty\else
+        \lst@RequireAspects\lst@loadaspects
+    \fi}
+\global\let\lstloadlanguages\lst@RequireLanguages
+\lst@EndAspect
+\lst@BeginAspect{formats}
+\@ifundefined{lstformatfiles}
+    {\lst@UserCommand\lstformatfiles{lstfmt0.sty}}{}
+\lst@UserCommand\lstdefineformat{\lst@DefFormat\iftrue}
+\lst@UserCommand\lst@defineformat{\lst@DefFormat\iffalse}
+\gdef\lst@DefFormat{\lst@DefDriver{format}{fmt}\lst@UseFormat}
+\lstdefineformat{}{}
+\lst@Key{format}\relax{%
+    \lst@LAS{format}{fmt}{[]{#1}}\lst@NoAlias\lstformatfiles
+        \lsthk@SetFormat
+        {}}
+\lst@AddToHook{SetFormat}{\let\lst@fmtformat\@empty}% init
+\gdef\lst@fmtSplit#1#2{%
+    \def\lst@temp##1#2##2\relax##3{%
+        \ifnum##3=\z@
+            \ifx\@empty##2\@empty
+                \lst@false
+                \let\lst@fmta#1%
+                \let\lst@fmtb\@empty
+            \else
+                \expandafter\lst@temp#1\relax\@ne
+            \fi
+        \else
+            \def\lst@fmta{##1}\def\lst@fmtb{##2}%
+        \fi}%
+    \lst@true
+    \expandafter\lst@temp#1#2\relax\z@}
+\gdef\lst@IfNextCharWhitespace#1#2#3{%
+    \lst@IfSubstring#3\lst@whitespaces{#1}{#2}#3}
+\begingroup
+\catcode`\^^I=12\catcode`\^^J=12\catcode`\^^M=12\catcode`\^^L=12\relax%
+\lst@DefActive\lst@whitespaces{\ ^^I^^J^^M}% ^^L removed
+\global\let\lst@whitespaces\lst@whitespaces%
+\endgroup
+\gdef\lst@fmtIfIdentifier#1{%
+    \ifx\relax#1\@empty
+        \expandafter\@secondoftwo
+    \else
+        \expandafter\lst@fmtIfIdentifier@\expandafter#1%
+    \fi}
+\gdef\lst@fmtIfIdentifier@#1#2\relax{%
+    \let\lst@next\@secondoftwo
+    \ifnum`#1=`_\else
+    \ifnum`#1<64\else
+    \ifnum`#1<91\let\lst@next\@firstoftwo\else
+    \ifnum`#1<97\else
+    \ifnum`#1<123\let\lst@next\@firstoftwo\else
+    \fi \fi \fi \fi \fi
+    \lst@next}
+\gdef\lst@fmtIfNextCharIn#1{%
+    \ifx\@empty#1\@empty \expandafter\@secondoftwo \else
+                         \def\lst@next{\lst@fmtIfNextCharIn@{#1}}%
+                         \expandafter\lst@next\fi}
+\gdef\lst@fmtIfNextCharIn@#1#2#3#4{%
+    \def\lst@temp##1#4##2##3\relax{%
+        \ifx \@empty##2\expandafter\@secondoftwo
+                 \else \expandafter\@firstoftwo \fi}%
+    \lst@temp#1#4\@empty\relax{#2}{#3}#4}
+\gdef\lst@fmtCDef#1#2#3#4#5#6#7{%
+    \let#4#1%
+    \ifx\@empty#2\@empty
+        \def#1{\lst@fmtIfNextCharIn{#5}{#4}{#6#4#7}}%
+    \else \ifx\@empty#3\@empty
+        \def#1##1{%
+            \ifx##1#2%
+                \def\lst@next{\lst@fmtIfNextCharIn{#5}{#4##1}%
+                                                      {#6#4#2#7}}%
+            \else
+                 \def\lst@next{#4##1}%
+            \fi
+            \lst@next}%
+    \else
+        \def#1{%
+            \lst@IfNextCharsArg{#2#3}%
+                {\lst@fmtIfNextCharIn{#5}{\expandafter#4\lst@eaten}%
+                                         {#6#4#2#3#7}}%
+                {\expandafter#4\lst@eaten}}%
+    \fi \fi}
+\gdef\lst@fmtCDefX#1#2#3#4#5#6#7{%
+    \let#4#1%
+    \ifx\@empty#2\@empty
+        \def#1{\lst@fmtIfNextCharIn{#5}{#4}{#6#7}}%
+    \else \ifx\@empty#3\@empty
+        \def#1##1{%
+            \ifx##1#2%
+                \def\lst@next{\lst@fmtIfNextCharIn{#5}{#4##1}%
+                                                      {#6#7}}%
+            \else
+                 \def\lst@next{#4##1}%
+            \fi
+            \lst@next}%
+    \else
+        \def#1{%
+            \lst@IfNextCharsArg{#2#3}%
+                {\lst@fmtIfNextCharIn{#5}{\expandafter#4\lst@eaten}%
+                                         {#6#7}}%
+                {\expandafter#4\lst@eaten}}%
+    \fi \fi}
+\gdef\lst@UseFormat#1{%
+    \def\lst@fmtwhole{#1}%
+    \lst@UseFormat@}
+\gdef\lst@UseFormat@{%
+    \lst@fmtSplit\lst@fmtwhole,%
+    \let\lst@fmtwhole\lst@fmtb
+    \ifx\lst@fmta\@empty\else
+        \lst@fmtSplit\lst@fmta=%
+        \ifx\@empty\lst@fmta\else
+            \expandafter\lstKV@XOptArg\expandafter[\expandafter]%
+                \expandafter{\lst@fmtb}\lst@UseFormat@b
+        \fi
+    \fi
+    \ifx\lst@fmtwhole\@empty\else
+        \expandafter\lst@UseFormat@
+    \fi}
+\gdef\lst@UseFormat@b[#1]#2{%
+    \def\lst@fmtc{{#1}}\lst@lExtend\lst@fmtc{\expandafter{\lst@fmta}}%
+    \def\lst@fmtb{#2}%
+    \lst@fmtSplit\lst@fmtb\string
+    \ifx\@empty\lst@fmta
+        \lst@lAddTo\lst@fmtc{{}}%
+    \else
+        \lst@lExtend\lst@fmtc{\expandafter
+            {\expandafter\lst@fmtPre\expandafter{\lst@fmta}}}%
+    \fi
+    \ifx\@empty\lst@fmtb
+        \lst@lAddTo\lst@fmtc{{}}%
+    \else
+        \lst@lExtend\lst@fmtc{\expandafter
+            {\expandafter\lst@fmtPost\expandafter{\lst@fmtb}}}%
+    \fi
+    \expandafter\lst@UseFormat@c\lst@fmtc}
+\gdef\lst@UseFormat@c#1#2#3#4{%
+    \lst@fmtIfIdentifier#2\relax
+    {\lst@fmtIdentifier{#2}%
+     \lst@if\else \PackageWarning{Listings}%
+         {Cannot drop identifier in format definition}%
+     \fi}%
+    {\lst@if
+         \lst@lAddTo\lst@fmtformat{\lst@CArgX#2\relax\lst@fmtCDef}%
+     \else
+         \lst@lAddTo\lst@fmtformat{\lst@CArgX#2\relax\lst@fmtCDefX}%
+     \fi
+     \lst@DefActive\lst@fmtc{#1}%
+     \lst@lExtend\lst@fmtformat{\expandafter{\lst@fmtc}{#3}{#4}}}}
+\lst@AddToHook{SelectCharTable}{\lst@fmtformat}
+\global\let\lst@fmtformat\@empty
+\gdef\lst@fmtPre#1{%
+    \lst@PrintToken
+    \begingroup
+    \let\newline\lst@fmtEnsureNewLine
+    \let\space\lst@fmtEnsureSpace
+    \let\indent\lst@fmtIndent
+    \let\noindent\lst@fmtNoindent
+    #1%
+    \endgroup}
+\gdef\lst@fmtPost#1{%
+    \global\let\lst@fmtPostOutput\@empty
+    \begingroup
+    \def\newline{\lst@AddTo\lst@fmtPostOutput\lst@fmtEnsureNewLine}%
+    \def\space{\aftergroup\lst@fmtEnsurePostSpace}%
+    \def\indent{\lst@AddTo\lst@fmtPostOutput\lst@fmtIndent}%
+    \def\noindent{\lst@AddTo\lst@fmtPostOutput\lst@fmtNoindent}%
+    \aftergroup\lst@PrintToken
+    #1%
+    \endgroup}
+\lst@AddToHook{Init}{\global\let\lst@fmtPostOutput\@empty}
+\lst@AddToHook{PostOutput}
+    {\lst@fmtPostOutput \global\let\lst@fmtPostOutput\@empty}
+\gdef\lst@fmtEnsureSpace{%
+    \lst@ifwhitespace\else \expandafter\lst@ProcessSpace \fi}
+\gdef\lst@fmtEnsurePostSpace{%
+    \lst@IfNextCharWhitespace{}{\lst@ProcessSpace}}
+\lst@Key{fmtindent}{20pt}{\def\lst@fmtindent{#1}}
+\newdimen\lst@fmtcurrindent
+\lst@AddToHook{InitVars}{\global\lst@fmtcurrindent\z@}
+\gdef\lst@fmtIndent{\global\advance\lst@fmtcurrindent\lst@fmtindent}
+\gdef\lst@fmtNoindent{\global\advance\lst@fmtcurrindent-\lst@fmtindent}
+\gdef\lst@fmtEnsureNewLine{%
+    \ifx\lst@newlines\@empty
+        \lst@AddTo\lst@newlines\lst@EnsuredNewLine
+    \fi
+    \lst@fmtignoretrue}
+\gdef\lst@EnsuredNewLine#1{%
+    \lst@ifnewline\else
+        \ifx#1\lst@NewLine\else \lst@NewLine \fi
+    \fi
+    #1}
+\lst@AddToHook{PostOutput}{\global\let\lst@ifnewline\iffalse}
+\gdef\lst@fmtignoretrue{\let\lst@fmtifignore\iftrue}
+\gdef\lst@fmtignorefalse{\let\lst@fmtifignore\iffalse}
+\lst@AddToHook{InitVars}{\lst@fmtignorefalse}
+\lst@AddToHook{Output}{\lst@fmtignorefalse}
+\gdef\lst@fmtUseLostSpace{%
+    \lst@ifnewline \kern\lst@fmtcurrindent \global\lst@lostspace\z@
+    \else
+        \ifdim\lst@lostspace>\z@ \lst@InsertLostSpace \fi
+    \fi}
+\lst@AddToHook{Init}
+    {\lst@true
+     \ifx\lst@fmtformat\@empty \ifx\lst@fmt\@empty \lst@false \fi\fi
+     \lst@if
+        \let\lst@UseLostSpace\lst@fmtUseLostSpace
+        \let\lst@ProcessSpace\lst@fmtProcessSpace
+     \fi}
+\gdef\lst@fmtProcessSpace{%
+    \lst@ifletter
+        \lst@Output\lst@letterfalse
+        \lst@fmtifignore\else
+            \lst@AppendOther\lst@outputspace
+        \fi
+    \else \lst@ifkeepspaces
+        \lst@AppendOther\lst@outputspace
+    \else \ifx\lst@newlines\@empty
+        \lst@AppendSpecialSpace
+    \else \ifnum\lst@length=\z@
+            \global\advance\lst@lostspace\lst@width
+            \global\advance\lst@pos\m@ne
+        \else
+            \lst@AppendSpecialSpace
+        \fi
+    \fi \fi \fi
+    \lst@whitespacetrue}
+\lst@InstallTest{f}
+    \lst@fmt@list\lst@fmt \lst@gfmt@list\lst@gfmt
+    \lst@gfmt@wp
+    wd
+\gdef\lst@fmt@list{\lst@fmt\lst@gfmt}\global\let\lst@fmt\@empty
+\gdef\lst@gfmt@list{\lst@fmt\lst@gfmt}\global\let\lst@gfmt\@empty
+\gdef\lst@gfmt@wp{%
+    \begingroup \let\lst@UM\@empty
+    \let\lst@PrintToken\@empty
+    \csname\lst@ @fmt$\the\lst@token\endcsname
+    \endgroup}
+\gdef\lst@fmtIdentifier#1#2#3#4{%
+    \lst@DefOther\lst@fmta{#2}\edef\lst@fmt{\lst@fmt,\lst@fmta}%
+    \@namedef{\lst@ @fmt$\lst@fmta}{#3#4}}
+\lst@EndAspect
+\lst@BeginAspect{labels}
+\lst@Key{labelstyle}{}{\def\lst@labelstyle{#1}}
+\lst@Key{labelsep}{10pt}{\def\lst@labelsep{#1}}
+\lst@Key{labelstep}{0}{\def\lst@labelstep{#1\relax}}
+\lst@Key{firstlabel}\relax{\def\lst@firstlabel{#1\relax}}
+\lst@Key{advancelabel}\relax{\def\lst@advancelabel{#1\relax}}
+\lst@AddToHook{EmptyStyle}{\let\lst@labelstep\z@}
+\lst@AddToHook{PreSet}
+    {\let\lst@firstlabel\@undefined \let\lst@advancelabel\z@}
+\lst@AddToHook{PreInit}
+    {\ifx\lst@firstlabel\@undefined
+         \let\lst@firstlabel\lst@firstline
+     \fi}
+\gdef\lst@SetFirstLabel{%
+    \ifx\lst@firstlabel\@undefined
+        \@tempcnta 0\csname lstno@\lst@intname\endcsname\relax
+        \ifnum\@tempcnta=\z@ \@tempcnta\@ne \else \lst@continuetrue \fi
+        \advance\@tempcnta\lst@advancelabel
+        \edef\lst@firstlabel{\the\@tempcnta\relax}%
+    \fi}
+\gdef\lst@SaveFirstLabel{%
+    \expandafter\xdef
+        \csname lstno\ifx\lst@intname\@empty @ \else @\lst@intname\fi
+        \endcsname{\the\c@lstlabel}}
+\newcounter{lstlabel}% \global
+\renewcommand*\thelstlabel{\@arabic\c@lstlabel}
+\lst@AddToHook{EveryPar}
+    {\global\advance\c@lstlabel\lst@labeladvance \lst@SkipOrPrintLabel}
+\global\let\lst@labeladvance\@ne
+\lst@AddToHook{Init}{\def\@currentlabel{\thelstlabel}}
+\lst@AddToHook{InitVars}
+    {\global\c@lstlabel\lst@firstlabel
+     \global\advance\c@lstlabel\lst@advancelabel
+     \global\advance\c@lstlabel-\lst@labeladvance}
+\lst@AddToHook{ExitVars}
+    {\global\advance\c@lstlabel\lst@labeladvance}
+\newcount\lst@skiplabels % \global
+\lst@AddToHook{Init}
+    {\ifnum \z@>\lst@labelstep
+         \let\lst@labeladvance\m@ne
+         \edef\lst@labelstep{-\lst@labelstep}%
+     \fi
+     \ifnum \z@<\lst@labelstep
+         \global\lst@skiplabels\lst@firstlabel
+         \global\divide\lst@skiplabels\lst@labelstep
+         \global\multiply\lst@skiplabels-\lst@labelstep
+         \global\advance\lst@skiplabels\lst@firstlabel
+         \ifnum\lst@skiplabels>\z@
+             \global\advance\lst@skiplabels -\lst@labelstep
+         \fi
+     \else
+         \let\lst@SkipOrPrintLabel\relax
+     \fi}
+\gdef\lst@SkipOrPrintLabel{%
+    \ifnum\lst@skiplabels=\z@
+        \global\advance\lst@skiplabels-\lst@labelstep\relax
+        \llap{\normalfont\lst@labelstyle{\thelstlabel}%
+              \kern\lst@labelsep}%
+    \fi
+    \global\advance\lst@skiplabels\@ne}
+\lst@EndAspect
+\lst@BeginAspect{lineshape}
+\newdimen\lst@innerspread \newdimen\lst@outerspread
+\lst@AddToHook{BoxUnsafe}{\lst@outerspread\z@ \lst@innerspread\z@}
+\lst@Key{wholeline}{false}[t]{\lstKV@SetIf{#1}\lst@ifwholeline}
+\lst@Key{linewidth}\linewidth{\def\lst@linewidth{#1}}
+\lst@AddToHook{PreInit}{\linewidth\lst@linewidth\relax}
+\lst@Key{indent}{\z@}{\def\lst@indent{#1}}
+\lst@AddToHook{TextStyle}{\let\lst@indent\z@ \let\lst@ifwholeline\iftrue}
+\lst@Key{spread}{\z@,\z@}{\lstKV@CSTwoArg{#1}%
+    {\lst@innerspread##1\relax
+     \ifx\@empty##2\@empty
+         \divide\lst@innerspread\tw@\relax
+         \lst@outerspread\lst@innerspread
+     \else
+         \lst@outerspread##2\relax
+     \fi}}
+\gdef\lst@parshape{%
+    \parshape\@ne
+        \ifodd\c@page -\lst@innerspread\else -\lst@outerspread\fi
+        \linewidth}
+\lst@AddToHook{Init}
+    {\advance\linewidth\lst@innerspread
+     \advance\linewidth\lst@outerspread
+     \advance\linewidth-\lst@indent\relax
+     \advance\lst@innerspread-\lst@indent\relax
+     \advance\lst@outerspread-\lst@indent\relax
+     \lst@ifwholeline
+         \advance\linewidth\@totalleftmargin
+     \else
+         \advance\lst@innerspread-\@totalleftmargin
+         \advance\lst@outerspread-\@totalleftmargin
+     \fi
+     \if@twoside\else \lst@outerspread\lst@innerspread \fi}
+\lst@Key{lineskip}{\z@}{\def\lst@lineskip{#1\relax}}
+\lst@AddToHook{Init}{\parskip\lst@lineskip}
+\lst@EndAspect
+\lst@BeginAspect[lineshape]{breaklines}
+\lst@Key{breaklines}{false}[t]{\lstKV@SetIf{#1}\lst@ifbreaklines}
+\lst@Key{breakindent}{20pt}{\def\lst@breakindent{#1}}
+\lst@Key{breakautoindent}{t}[t]{\lstKV@SetIf{#1}\lst@ifbreakautoindent}
+\lst@Key{prebreak}{}{\def\lst@prebreak{#1}}
+\lst@Key{postbreak}{}{\def\lst@postbreak{#1}}
+\lst@AddToHook{Init}
+    {\lst@ifbreaklines
+         \hbadness\@M \pretolerance\@M
+         \def\lst@parshape{\parshape\tw@
+             \ifodd\c@page -\lst@innerspread\else -\lst@outerspread\fi
+             \linewidth %
+             \lst@breakshape}%
+     \else
+         \let\lst@discretionary\relax
+     \fi}
+\lst@AddToHook{OnNewLine}
+    {\lst@ifbreaklines \lst@breakNewLine \fi}
+\gdef\lst@discretionary{%
+    \discretionary{\let\space\lst@spacekern\lst@prebreak}%
+                  {\llap{\lsthk@EveryLine \kern\lst@breakcurrindent}%
+                   \let\space\lst@spacekern\lst@postbreak}{}}
+\lst@AddToHook{PostOutput}{\lst@discretionary}
+\gdef\lst@spacekern{\kern\lst@width}
+\gdef\lst@breakNewLine{%
+    \@tempdima\lst@breakindent\relax
+    \lst@ifbreakautoindent \advance\@tempdima\lst@lostspace \fi
+    \@tempdimb\@tempdima \@tempdimc-\@tempdima
+    \advance\@tempdima-\lst@innerspread
+    \advance\@tempdimb-\lst@outerspread
+    \advance\@tempdimc\linewidth
+    \xdef\lst@breakshape{\noexpand\lst@breakcurrindent \the\@tempdimc}%
+    \xdef\lst@breakcurrindent{%
+        \noexpand\ifodd\c@page \the\@tempdima
+        \noexpand\else \the\@tempdimb \noexpand\fi}}
+\gdef\lst@breakProcessOther#1{%
+    \lst@ifletter \lst@Output\lst@letterfalse \fi
+    \lst@AppendOther#1\lst@OutputOther}
+\lst@AddToHook{SelectCharTable}
+    {\lst@ifbreaklines \lst@Def{`)}{\lst@breakProcessOther)}\fi}
+\lst@EndAspect
+\lst@BeginAspect[lineshape]{frames}
+\lst@Key{framerulewidth}{.4pt}{\def\lst@framerulewidth{#1}}
+\lst@Key{framerulesep}{2pt}{\def\lst@framerulesep{#1}}
+\lst@Key{frametextsep}{3pt}{\def\lst@frametextsep{#1}}
+\lst@Key{framespread}{\z@}{\def\lst@framespread{#1}}
+\lst@Key{frameshape}{}{\lstKV@FourArg{#1}%
+    {\uppercase{\def\lst@frametshape{##1}}%
+     \uppercase{\def\lst@framelshape{##2}}%
+     \uppercase{\def\lst@framershape{##3}}%
+     \uppercase{\def\lst@framebshape{##4}}%
+     \let\lst@ifframeround\iffalse
+     \lst@IfSubstring R\lst@frametshape{\let\lst@ifframeround\iftrue}{}%
+     \lst@IfSubstring R\lst@framebshape{\let\lst@ifframeround\iftrue}{}%
+     \def\lst@frame{##1##2##3##4}}}
+\lst@Key{frameround}\relax
+    {\uppercase{\def\lst@frameround{#1}}%
+     \expandafter\lstframe@\lst@frameround ffff\relax}
+\global\let\lst@frameround\@empty
+\lst@Key{frame}\relax
+    {\def\lst@frame{#1}%
+     \expandafter\lstframe@\lst@frameround ffff\relax}
+\gdef\lstframe@#1#2#3#4#5\relax{%
+    \lst@IfSubstring T\lst@frame{\edef\lst@frame{t\lst@frame}}{}%
+    \lst@IfSubstring R\lst@frame{\edef\lst@frame{r\lst@frame}}{}%
+    \lst@IfSubstring B\lst@frame{\edef\lst@frame{b\lst@frame}}{}%
+    \lst@IfSubstring L\lst@frame{\edef\lst@frame{l\lst@frame}}{}%
+    \let\lst@frametshape\@empty \let\lst@framebshape\@empty
+    \lst@frameCheck
+        ltr\lst@framelshape\lst@frametshape\lst@framershape #4#1%
+    \lst@frameCheck
+        LTR\lst@framelshape\lst@frametshape\lst@framershape #4#1%
+    \lst@frameCheck
+        lbr\lst@framelshape\lst@framebshape\lst@framershape #3#2%
+    \lst@frameCheck
+        LBR\lst@framelshape\lst@framebshape\lst@framershape #3#2%
+    \let\lst@ifframeround\iffalse
+    \lst@IfSubstring R\lst@frametshape{\let\lst@ifframeround\iftrue}{}%
+    \lst@IfSubstring R\lst@framebshape{\let\lst@ifframeround\iftrue}{}%
+    \let\lst@framelshape\@empty \let\lst@framershape\@empty
+    \lst@IfSubstring L\lst@frame
+        {\def\lst@framelshape{YY}}%
+        {\lst@IfSubstring l\lst@frame{\def\lst@framelshape{Y}}{}}%
+    \lst@IfSubstring R\lst@frame
+        {\def\lst@framershape{YY}}%
+        {\lst@IfSubstring r\lst@frame{\def\lst@framershape{Y}}{}}}
+\gdef\lst@frameCheck#1#2#3#4#5#6#7#8{%
+    \lst@IfSubstring #1\lst@frame
+        {\if #7T\def#4{R}\else \def#4{Y}\fi}%
+        {\def#4{N}}%
+    \lst@IfSubstring #3\lst@frame
+        {\if #8T\def#6{R}\else \def#6{Y}\fi}%
+        {\def#6{N}}%
+    \lst@IfSubstring #2\lst@frame{\edef#5{#5#4Y#6}}{}}
+\lst@Key{backgroundcolor}{}{\lstKV@OptArg[]{#1}%
+    {\ifx\@empty##2\@empty
+         \let\lst@bkgcolor\@empty
+     \else
+         \ifx\@empty##1\@empty
+             \def\lst@bkgcolor{\color{##2}}%
+         \else
+             \def\lst@bkgcolor{\color[##1]{##2}}%
+         \fi
+     \fi}}
+\lst@Key{framerulecolor}{}{\lstKV@OptArg[]{#1}%
+    {\ifx\@empty##2\@empty
+         \let\lst@framerulecolor\@empty
+     \else
+         \ifx\@empty##1\@empty
+             \def\lst@framerulecolor{\color{##2}}%
+         \else
+             \def\lst@framerulecolor{\color[##1]{##2}}%
+         \fi
+     \fi}}
+\lst@AddToHook{EveryLine}
+    {\ifx\lst@bkgcolor\@empty\else
+         \@tempdima\linewidth \advance\@tempdima\lst@indent
+         \rlap{\begingroup \lst@bkgcolor
+               \kern-\lst@indent\relax
+               \color@block{\@tempdima}{\ht\strutbox}{\dp\strutbox}%
+               \endgroup}%
+     \fi}
+\gdef\lst@frameBkgBox#1{%
+    \ifx\lst@bkgcolor\@empty\else
+        \setbox#1\hbox{\begingroup \lst@bkgcolor
+                       \color@block{\wd#1}{\ht#1}{\dp#1}%
+                       \endgroup \box#1}%
+    \fi}
+\gdef\lst@frameR{%
+    \strut\smash{\expandafter\lst@frameR@\lst@framershape\relax}%
+    \kern-\lst@framerulesep}
+\gdef\lst@frameR@#1{%
+    \ifx\relax#1\@empty\else
+        \if #1Y\lst@framevrule \else \kern\lst@framerulewidth \fi
+        \kern\lst@framerulesep
+        \expandafter\lst@frameR@
+    \fi}
+\gdef\lst@frameL{%
+    \kern-\lst@framerulesep
+    \strut\smash{\expandafter\lst@frameL@\lst@framelshape\relax}}
+\gdef\lst@frameL@#1{%
+    \ifx\relax#1\@empty\else
+        \kern\lst@framerulesep
+        \if#1Y\lst@framevrule \else \kern\lst@framerulewidth \fi
+        \expandafter\lst@frameL@
+    \fi}
+\gdef\lst@frameH#1#2{%
+    \global\let\lst@framediml\z@ \global\let\lst@framedimr\z@
+    \setbox\z@\hbox{}\@tempcntb\z@
+    \expandafter\lst@frameH@\expandafter#1#2\relax\relax\relax
+    \ifx\lst@bkgcolor\@empty\else
+        \@tempdima\lst@framediml
+        \advance\@tempdima\lst@indent
+        \setbox\z@\hbox{\rlap{%
+            \kern-\@tempdima
+            \kern-\ifodd\c@page\lst@innerspread\else\lst@outerspread\fi
+            \kern-\lst@framehalfspread
+            \advance\@tempdima\linewidth
+            \advance\@tempdima\lst@framedimr
+            \advance\@tempdima\lst@framespread
+            \begingroup \lst@bkgcolor
+            \color@block{\@tempdima}{\ht\z@}{\dp\z@}%
+            \endgroup}%
+            \box\z@}%
+    \fi}
+\gdef\lst@frameH@#1#2#3#4{%
+    \ifx\relax#4\@empty\else
+        \lst@frameh \@tempcntb#1#2#3#4%
+        \advance\@tempcntb\@ne
+        \expandafter\lst@frameH@\expandafter#1%
+    \fi}
+\gdef\lst@frameh#1#2#3#4#5{%
+    \lst@frameCalcDimA#1%
+    \lst@ifframeround \@getcirc\@tempdima \fi
+    \setbox\z@=\hbox{\rlap{\copy\z@}%
+      \setbox\z@=\hbox{%
+        \begingroup \lst@framerulecolor
+        \kern-\lst@indent
+        \kern\ifodd\c@page -\lst@innerspread\else -\lst@outerspread\fi
+        \kern-\lst@framehalfspread
+        \lst@frameCornerX\llap{#2L}#3%
+        \ifdim\lst@framediml<\@tempdimb
+            \xdef\lst@framediml{\the\@tempdimb}%
+        \fi
+        \begingroup
+        \if#4Y\else\let\lst@framerulewidth\z@ \fi
+        \vrule\@width\lst@framespread\@height\lst@framerulewidth
+              \@depth\z@
+        \vrule\@width\lst@indent\@height\lst@framerulewidth\@depth\z@
+        \vrule\@width\linewidth\@height\lst@framerulewidth\@depth\z@
+        \endgroup
+        \lst@frameCornerX\rlap{#2R}#5%
+        \ifdim\lst@framedimr<\@tempdimb
+            \xdef\lst@framedimr{\the\@tempdimb}%
+        \fi
+        \kern-\lst@framehalfspread
+        \endgroup}%
+    \if#2T\raise\dp\z@\copy\z@
+     \else\lower\ht\z@\copy\z@ \fi}}
+\gdef\lst@frameCornerX#1#2#3{%
+    \setbox\@tempboxa\hbox{\csname lst@frame\if#3RR\fi #2\endcsname}%
+    \@tempdimb\wd\@tempboxa
+    \if #3R%
+        #1{\box\@tempboxa}%
+    \else
+        \if #3Y\expandafter#1\else
+               \@tempdimb\z@ \expandafter\vphantom \fi
+        {\box\@tempboxa}
+    \fi}
+\gdef\lst@frameCalcDimA#1{%
+            \@tempdima\lst@framerulesep
+    \advance\@tempdima\lst@framerulewidth
+    \multiply\@tempdima#1\relax
+    \advance\@tempdima\lst@frametextsep
+    \advance\@tempdima\lst@framerulewidth
+    \multiply\@tempdima\tw@}
+\lst@AddToHook{Init}{\ifx\lst@frame\@empty\else \lst@frameInit \fi}
+\gdef\lst@frameInit{%
+    \ifx\lst@framelshape\@empty \let\lst@frameL\relax \fi
+    \ifx\lst@framershape\@empty \let\lst@frameR\relax \fi
+    \def\lst@framelr{%
+        \begingroup \lst@framerulecolor
+        \setbox\z@\hbox{\lst@frameL \kern\lst@frametextsep
+                        \kern\lst@framehalfspread}%
+        \lst@frameBkgBox\z@
+        \llap{\box\z@ \kern\lst@indent}%
+        \setbox\z@\hbox{\kern\lst@framehalfspread \kern\lst@frametextsep
+                        \lst@frameR}%
+        \lst@frameBkgBox\z@
+        \rlap{\kern\linewidth \box\z@}%
+        \endgroup}%
+    \ifx\lst@frameL\relax \ifx\lst@frameR\relax
+        \let\lst@framelr\strut
+    \fi \fi
+    \@tempdima\ht\strutbox \advance\@tempdima\lst@lineskip
+    \@tempdimb\dp\strutbox \advance\@tempdimb\lst@lineskip
+    \edef\lst@framevrule{%
+        \vrule\noexpand\@height\the\@tempdima
+              \noexpand\@depth\the\@tempdimb
+              \noexpand\@width\noexpand\lst@framerulewidth}%
+    \@tempdima\lst@framerulewidth \divide\@tempdima\tw@
+    \edef\lst@framerulehalfwidth{\the\@tempdima}%
+    \@tempdima\lst@framespread\relax \divide\@tempdima\tw@
+    \edef\lst@framehalfspread{\the\@tempdima}%
+    \lst@ifframeround
+        \lst@frameCalcDimA\z@ \@getcirc\@tempdima
+        \@tempdimb\@tempdima \divide\@tempdimb\tw@
+        \advance\@tempdimb -\@wholewidth
+        \edef\lst@frametextsep{\the\@tempdimb}%
+        \edef\lst@framerulewidth{\the\@wholewidth}%
+        \edef\lst@framerulehalfwidth{\the\@halfwidth}%
+        \lst@frameCalcDimA\@ne \@getcirc\@tempdima
+        \@tempdimb\@tempdima \divide\@tempdimb\tw@
+        \advance\@tempdimb -\tw@\@wholewidth
+        \advance\@tempdimb -\lst@frametextsep
+        \edef\lst@framerulesep{\the\@tempdimb}%
+    \fi
+    \expandafter\lst@frameH T\lst@frametshape
+    \ifvoid\z@\else
+        \par\parshape\z@
+        \@tempdima-\baselineskip \advance\@tempdima\ht\z@
+        \ifdim\prevdepth<\@cclvi\p@\else
+            \advance\@tempdima\prevdepth
+        \fi
+        \ifdim\@tempdima<\z@
+            \vskip\@tempdima\vskip\lineskip
+        \fi
+        \noindent\box\z@\par
+        \lineskiplimit\maxdimen \lineskip\z@
+    \fi
+    \lst@frameSpreadV}
+\lst@AddToHook{EveryLine}{\lst@framelr}
+\global\let\lst@framelr\@empty
+\lst@AddToHook{DeInit}{\ifx\lst@frame\@empty\else \lst@frameExit \fi}
+\gdef\lst@frameExit{%
+    \lst@frameSpreadV
+    \lst@frameH B\lst@framebshape
+    \ifvoid\z@\else
+        \everypar{}\par\nointerlineskip\noindent\box\z@
+    \fi}
+\gdef\lst@frameSpreadV{%
+    \ifdim\z@=\lst@framespread\else
+        \everypar{}\par\lst@parshape\nointerlineskip\noindent
+        \setbox\z@=\hbox{%
+          \def\lst@framevrule{\vrule\@height\lst@framehalfspread
+              \@depth\z@\@width\lst@framerulewidth}%
+          \def\strut{\vrule\@height\lst@framehalfspread
+              \@depth\z@\@width\z@}%
+          \lst@framelr
+          \kern-\lst@indent
+          \ifx\lst@bkgcolor\@empty\else
+          \begingroup \lst@bkgcolor
+          \vrule\@height\lst@framehalfspread\@depth\z@\@width\linewidth
+          \vrule\@height\lst@framehalfspread\@depth\z@\@width\lst@indent
+          \endgroup
+          \fi}%
+        \rlap{\box\z@}%
+    \fi}
+\gdef\lst@frameTR{%
+    \vrule\@width.5\@tempdima\@height\lst@framerulewidth\@depth\z@
+    \kern-\lst@framerulewidth
+    \raise\lst@framerulewidth\hbox{%
+        \vrule\@width\lst@framerulewidth\@height\z@\@depth.5\@tempdima}}
+\gdef\lst@frameBR{%
+    \vrule\@width.5\@tempdima\@height\lst@framerulewidth\@depth\z@
+    \kern-\lst@framerulewidth
+    \vrule\@width\lst@framerulewidth\@height.5\@tempdima\@depth\z@}
+\gdef\lst@frameBL{%
+    \vrule\@width\lst@framerulewidth\@height.5\@tempdima\@depth\z@
+    \kern-\lst@framerulewidth
+    \vrule\@width.5\@tempdima\@height\lst@framerulewidth\@depth\z@}
+\gdef\lst@frameTL{%
+    \raise\lst@framerulewidth\hbox{%
+        \vrule\@width\lst@framerulewidth\@height\z@\@depth.5\@tempdima}%
+    \kern-\lst@framerulewidth
+    \vrule\@width.5\@tempdima\@height\lst@framerulewidth\@depth\z@}
+\gdef\lst@frameRoundT{%
+    \setbox\@tempboxa\hbox{\@circlefnt\char\@tempcnta}%
+    \ht\@tempboxa\lst@framerulewidth
+    \box\@tempboxa}
+\gdef\lst@frameRoundB{%
+    \setbox\@tempboxa\hbox{\@circlefnt\char\@tempcnta}%
+    \dp\@tempboxa\z@
+    \box\@tempboxa}
+\gdef\lst@frameRTR{%
+    \hb@[email protected]\@tempdima{\kern-\lst@framerulewidth
+                           \kern.5\@tempdima \lst@frameRoundT \hss}}
+\gdef\lst@frameRBR{%
+    \hb@[email protected]\@tempdima{\kern-\lst@framerulewidth
+    \advance\@tempcnta\@ne \kern.5\@tempdima \lst@frameRoundB \hss}}
+\gdef\lst@frameRBL{%
+    \advance\@tempcnta\tw@ \lst@frameRoundB
+    \kern-.5\@tempdima}
+\gdef\lst@frameRTL{%
+    \advance\@tempcnta\thr@@\lst@frameRoundT
+    \kern-.5\@tempdima}
+\lst@EndAspect
+\lst@BeginAspect[keywords]{make}
+\lst@NewMode\lst@makemode
+\gdef\lst@makekeyfalse{\let\lst@ifmakekey\iffalse}
+\gdef\lst@makekeytrue{\let\lst@ifmakekey\iftrue}
+\global\lst@makekeyfalse
+\lst@Key{makemacrouse}f[t]{\lstKV@SetIf{#1}\lst@ifmakemacrouse}
+\lst@AddToHook{SelectCharTable}
+    {\lst@ifmakemacrouse
+         \lst@ReplaceInput{$(}{%
+             \lst@PrintToken
+             \lst@EnterMode\lst@makemode{\lst@makekeyfalse}%
+             \def\lst@aside{\lst@ProcessOther\$\lst@ProcessOther(}}%
+         \lst@ReplaceInput{)}{%
+             \ifnum\lst@mode=\lst@makemode
+                 \lst@PrintToken
+                 \begingroup
+                     \lst@ProcessOther)%
+                     \lst@ifmakekey
+                         \lst@gkeywords@sty\lst@OutputOther
+                     \else
+                         \lst@OutputOther
+                     \fi
+                 \endgroup
+                 \lst@LeaveMode
+             \else
+                 \expandafter\lst@ProcessOther\expandafter)%
+             \fi}%
+     \else \ifx\lst@language\lst@make
+         \lst@ReplaceInput{$(}{\lst@ProcessOther\$\lst@ProcessOther(}%
+     \fi \fi}
+\gdef\lst@make{make}
+\lst@AddToHook{InitVars}{\let\lst@aside\@empty}
+\gdef\lst@makePrintAside#1{%
+    \ifx\lst@aside\@empty\else
+        \begingroup
+        \lst@token{}\lst@length\z@ \lst@aside \let\lst@aside\@empty
+        #1{\lst@OutputOther}%
+        \endgroup
+        \let\lst@aside\@empty
+    \fi}
+\lst@AddToHook{OutputOther}{\lst@makePrintAside\relax}
+\lst@AddToHook{Output}{%
+    \ifnum\lst@mode=\lst@makemode
+        \ifx\lst@thestyle\lst@gkeywords@sty
+            \lst@makekeytrue
+        \fi
+    \fi
+    \lst@makePrintAside\lst@thestyle}
+\lst@EndAspect
+\lst@BeginAspect{fancyvrb}
+\@ifundefined{FancyVerbFormatLine}
+    {\typeout{^^J%
+     ***^^J%
+     *** `listings.sty' needs `fancyvrb.sty' right now.^^J%
+     *** Please ensure its availability and try again.^^J%
+     ***^^J}%
+     \batchmode \@@end}{}
+\gdef\lstFV@fancyvrb{%
+    \lst@iffancyvrb
+        \ifx\FancyVerbFormatLine\lstFV@FancyVerbFormatLine\else
+            \let\lstFV@FVFL\FancyVerbFormatLine
+            \let\FancyVerbFormatLine\lstFV@FancyVerbFormatLine
+        \fi
+    \else
+        \ifx\lstFV@FVFL\@undefined\else
+            \let\FancyVerbFormatLine\lstFV@FVFL
+            \let\lstFV@FVFL\@undefined
+        \fi
+    \fi}
+\gdef\lstFV@VerbatimBegin{%
+    \ifx\FancyVerbFormatLine\lstFV@FancyVerbFormatLine
+        \lsthk@TextStyle \lsthk@BoxUnsafe
+        \lsthk@PreSet
+        \lst@activecharsfalse
+        \let\normalbaselines\relax
+        \lst@Init\relax
+        \lst@ifwholeline \advance\linewidth-\@totalleftmargin \fi
+        \everypar{}\global\let\lst@newlines\@empty
+        \lst@mode\lst@nomode \let\lst@entermodes\@empty
+        \lst@InterruptModes
+%% D.G. modification begin - Nov. 25, 1998
+        \let\@noligs\relax
+%% D.G. modification end
+    \fi}
+\gdef\lstFV@VerbatimEnd{%
+    \ifx\FancyVerbFormatLine\lstFV@FancyVerbFormatLine
+        \global\setbox\lstFV@gtempboxa\box\@tempboxa
+        \global\let\@gtempa\FV@ProcessLine
+        \lst@mode\lst@Pmode
+        \lst@DeInit
+        \let\FV@ProcessLine\@gtempa
+        \setbox\@tempboxa\box\lstFV@gtempboxa
+    \fi}
+\newbox\lstFV@gtempboxa
+\lst@AddTo\FV@VerbatimBegin\lstFV@VerbatimBegin
+\lst@AddToAtTop\FV@VerbatimEnd\lstFV@VerbatimEnd
+\lst@AddTo\FV@LVerbatimBegin\lstFV@VerbatimBegin
+\lst@AddToAtTop\FV@LVerbatimEnd\lstFV@VerbatimEnd
+\lst@AddTo\FV@BVerbatimBegin\lstFV@VerbatimBegin
+\lst@AddToAtTop\FV@BVerbatimEnd\lstFV@VerbatimEnd
+\gdef\lstFV@FancyVerbFormatLine#1{%
+    \let\lst@arg\@empty \lst@true \lst@FVConvert#1\@nil
+    \global\let\lst@newlines\@empty
+    \vtop{\leavevmode\lst@parshape
+          \lst@ReenterModes
+          \lst@arg \lst@PrintToken\lst@EOLUpdate
+          \lst@InterruptModes}}
+\lst@EndAspect
+\lst@BeginAspect[keywords,comments,strings,language]{lgrind}
+\gdef\lst@LGGetNames#1:#2\relax{%
+    \lst@NormedDef\lstlang@{#1}\lst@ReplaceInArg\lstlang@{|,}%
+    \def\lst@arg{:#2}}
+\gdef\lst@LGGetValue#1{%
+    \lst@false
+    \def\lst@temp##1:#1##2##3\relax{%
+        \ifx\@empty##2\else \lst@LGGetValue@{#1}\fi}
+    \expandafter\lst@temp\lst@arg:#1\@empty\relax}
+\gdef\lst@LGGetValue@#1{%
+    \lst@true
+    \def\lst@temp##1:#1##2:##3\relax{%
+        \@ifnextchar=\lst@LGGetValue@@{\lst@LGGetValue@@=}##2\relax
+        \def\lst@arg{##1:##3}}%
+    \expandafter\lst@temp\lst@arg\relax}
+\gdef\lst@LGGetValue@@=#1\relax{\def\lst@LGvalue{#1}}
+\gdef\lst@LGGetComment#1#2{%
+    \let#2\@empty
+    \lst@LGGetValue{#1b}%
+    \lst@if
+        \let#2\lst@LGvalue
+        \lst@LGGetValue{#1e}%
+        \ifx\lst@LGvalue\lst@LGEOL
+            \edef\lstlang@{\lstlang@,commentline={#2}}%
+            \let#2\@empty
+        \else
+            \edef#2{{#2}{\lst@LGvalue}}%
+        \fi
+    \fi}
+\gdef\lst@LGGetString#1#2{%
+    \lst@LGGetValue{#1b}%
+    \lst@if
+        \let#2\lst@LGvalue
+        \lst@LGGetValue{#1e}%
+        \ifx\lst@LGvalue\lst@LGEOL
+            \edef\lstlang@{\lstlang@,morestringizer=[l]{#2}}%
+        \else
+            \ifx #2\lst@LGvalue
+                \edef\lstlang@{\lstlang@,morestringizer=[d]{#2}}%
+            \else
+                \edef\lst@temp{\lst@LGe#2}%
+                \ifx \lst@temp\lst@LGvalue
+                    \edef\lstlang@{\lstlang@,morestringizer=[b]{#2}}%
+                \else
+                    \PackageWarning{Listings}%
+                    {String #2...\lst@LGvalue\space not supported}%
+                \fi
+            \fi
+        \fi
+    \fi}
+\gdef\lst@LGDefLang{%
+    \lst@LGReplace
+    \let\lstlang@\empty
+    \lst@LGGetValue{kw}%
+    \lst@if
+        \lst@ReplaceInArg\lst@LGvalue{{ },}%
+        \edef\lstlang@{\lstlang@,keywords={\lst@LGvalue}}%
+    \fi
+    \lst@LGGetValue{oc}%
+    \lst@if
+        \edef\lstlang@{\lstlang@,sensitive=f}%
+    \fi
+    \lst@LGGetValue{id}%
+    \lst@if
+        \edef\lstlang@{\lstlang@,alsoletter=\lst@LGvalue}%
+    \fi
+    \lst@LGGetComment a\lst@LGa
+    \lst@LGGetComment c\lst@LGc
+    \ifx\lst@LGa\@empty
+        \ifx\lst@LGc\@empty\else
+            \edef\lstlang@{\lstlang@,singlecomment=\lst@LGc}%
+        \fi
+    \else
+        \ifx\lst@LGc\@empty
+            \edef\lstlang@{\lstlang@,singlecomment=\lst@LGa}%
+        \else
+            \edef\lstlang@{\lstlang@,doublecomment=\lst@LGc\lst@LGa}%
+        \fi
+    \fi
+    \lst@LGGetString s\lst@LGa
+    \lst@LGGetString l\lst@LGa
+    \lst@LGGetValue{tc}%
+    \lst@if
+        \edef\lstlang@{\lstlang@,lgrindef=\lst@LGvalue}%
+    \fi
+    \expandafter\xdef\csname lstLGlang@\lst@language@\endcsname
+        {\noexpand\lstset{\lstlang@}}%
+    \lst@ReplaceInArg\lst@arg{{: :}:}\let\lst@LGvalue\@empty
+    \expandafter\lst@LGDroppedCaps\lst@arg\relax\relax
+    \ifx\lst@LGvalue\@empty\else
+        \PackageWarningNoLine{Listings}{Ignored capabilities for
+            \space `\lst@language@' are\MessageBreak\lst@LGvalue}%
+    \fi}
+\gdef\lst@LGDroppedCaps#1:#2#3{%
+    \ifx#2\relax
+        \lst@RemoveCommas\lst@LGvalue
+    \else
+        \edef\lst@LGvalue{\lst@LGvalue,#2#3}%
+        \expandafter\lst@LGDroppedCaps
+    \fi}
+\begingroup
+\catcode`\/=0
+\lccode`\z=`\:\lccode`\y=`\^\lccode`\x=`\$\lccode`\v=`\|
+\catcode`\\=12\relax
+/lowercase{%
+/gdef/lst@LGReplace{/lst@ReplaceInArg/lst@arg
+    {{\:}{z }{\^}{y}{\$}{x}{\|}{v}{ \ }{ }{:\ :}{:}{\ }{ }{\(}({\)})}}
+/gdef/lst@LGe{\e}
+}
+/endgroup
+\gdef\lst@LGRead#1\par{%
+    \lst@LGGetNames#1:\relax
+    \def\lst@temp{endoflanguagedefinitions}%
+    \ifx\lstlang@\lst@temp
+        \let\lst@next\endinput
+    \else
+        \expandafter\lst@IfOneOf\lst@language@\relax\lstlang@
+            {\lst@LGDefLang \let\lst@next\endinput}%
+            {\let\lst@next\lst@LGRead}%
+    \fi
+    \lst@next}
+\lst@Key{lgrindef}\relax{%
+    \lst@NormedDef\lst@language@{#1}%
+    \begingroup
+    \@ifundefined{lstLGlang@\lst@language@}%
+        {\everypar{\lst@LGRead}%
+         \catcode`\\=12\catcode`\{=12\catcode`\}=12\catcode`\%=12%
+         \catcode`\#=14\catcode`\$=12\catcode`\^=12\catcode`\_=12\relax
+         \input{\lstlgrindeffile}%
+        }{}%
+    \endgroup
+    \@ifundefined{lstLGlang@\lst@language@}%
+        {\PackageError{Listings}%
+         {LGrind language \lst@language@\space undefined}%
+         {The language is not loadable or just mispellt.^^J%
+          Type <RETURN> to proceed without changing the language.}}%
+        {\lsthk@SetLanguage
+         \csname lstLGlang@\lst@language@\endcsname}}
+\@ifundefined{lstlgrindeffile}
+    {\lst@UserCommand\lstlgrindeffile{lgrindef.}}{}
+\lst@EndAspect
+\lst@BeginAspect[keywords]{hyper}
+\lst@Key{hyperanchor}\hyper@@anchor{\let\lst@hyperanchor#1}
+\lst@Key{hyperlink}\hyperlink{\let\lst@hyperlink#1}
+\lst@InstallKeywords{h}{hyperref}{}\relax{}
+    {\begingroup
+         \let\lst@UM\@empty \xdef\@gtempa{\the\lst@token}%
+     \endgroup
+     \lst@GetFreeMacro{lstHR@\@gtempa}%
+     \global\expandafter\let\lst@freemacro\@empty
+     \@tempcntb\@tempcnta \advance\@tempcntb\m@ne
+     \edef\lst@alloverstyle##1{%
+         \let\noexpand\lst@alloverstyle\noexpand\@empty
+         \noexpand\smash{\raise\baselineskip\hbox
+             {\noexpand\lst@hyperanchor{lst.\@gtempa\the\@tempcnta}%
+                                       {\relax}}}%
+         \ifnum\@tempcnta=\z@ ##1\else
+             \noexpand\lst@hyperlink{lst.\@gtempa\the\@tempcntb}{##1}%
+         \fi}%
+    }
+    od
+\lst@EndAspect
+\endinput
+%%
+%% End of file `lstmisc.sty'.

+ 379 - 0
docs/styles/lstpatch.sty

@@ -0,0 +1,379 @@
+%%
+%% This is file `lstpatch.sty', generated manually :-)
+%%
+%% Please read the software license in listings.dtx or listings.dvi.
+%%
+%% (w)(c) 2000,2001 Carsten Heinz
+%%
+%% 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.
+%%
+%% Permission is granted to change this file. You are not allowed to
+%% distribute any changed version of this file, neither under the same
+%% name nor under a different one.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <[email protected]>.
+%%
+%%
+%% This patch file does *not* include any experimental material I sent to
+%% various people. These people will have to copy and paste the definitions.
+%%
+%% 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) Andreas Deininger, 2000/08/25, 0.21a
+%%
+%%     `breaklines,first>1' leads to ``undefined control sequence'' error
+%%     (\lst@breakshape undefined in this case)
+%%
+%%  2) Vespe Savikko, 2000/09/27, 0.21a (2000/11/02)
+%%
+%%     stringstyle used also on previous other characters
+%%     (missing \lst@PrintToken in \lst@BeginString)
+%%
+%%  3) Richard Hoefter, 2000/11/03, 0.21b (2000/11/04)
+%%
+%%     no keyword detection in case of language=HTML,language=Java
+%%     (missing deactivation of `keywordsinside' in hook `SetLanguage')
+%%
+%%  4) Vespe Savikko, 2000/11/06, 0.21c (2000/11/06)
+%%
+%%     bad output of doc-strings if HTML and Python are loaded
+%%     (missing group braces around mode argument in \lst@CommentB causes
+%%      a number `0' appearing in the output)
+%%
+%%  5) Christian Gudrian, 2000/11/13, 0.21d (2000/11/16)
+%%
+%%     \ref{lst:line} jumps to top of listing and not to the line
+%%     (\refstepcounter not used on \c@lstlabel)
+%%
+%%  6) Dr. Jobst Hoffmann, 2000/11/17, 0.21e (2000/11/20)
+%%
+%%     incompatibility with typehtml package
+%%     (bad lccode of /)
+%%
+%%  7) Kalle Tuulos, 2001/01/14, 0.21f (2001/01/17)
+%%
+%%     formfeed characters gobbles next output unit
+%%     (\lst@newlines contains \lst@EOLUpdate, which calls \lst@ResetToken)
+%%
+%%  8) Adam Prugel-Bennett, 2001/02/19, 0.21g
+%%
+%%     \abovecaptionskip undefined in slides.cls
+%%
+%%  9) Gabriel Tauro, 2001/04/18, 0.21g
+%%
+%%     unexpected `)' if the character appears before first printed line
+%%     (\lst@breakProcessOther is active)
+%%
+%% 10) Jens Schwarzer, 2001/05/29, 0.21g
+%%
+%%     wrong line numbering of lstlisting with first>1
+%%     (\lst@firstline not taken into accout in this case)
+%%
+%% 11) Jens Schwarzer, 2001/05/29, 0.21g (2001/06/21)
+%%
+%%     caption and title font are not equal
+%%     (\lst@maketitle not suitable for koma script)
+%%
+%% 12) Thorsten Vitt, 2001/06/25, 0.21h
+%%
+%%     fancyhdr + listings crossing pages ==> ~ in header, not space
+%%     (old problem with \output: explicitly redefine ~)
+%%
+%% 13) Martin Steffen, 2001/04/07, 0.21h
+%%
+%%     mathescape drops following space
+%%     (bad \lst@ifwhitespace)
+%%
+%% 14) Walter E. Brown, 2001/05/22, 0.21h (2001/06/27)
+%%
+%%     pdftex 3.14159-14f warning: destination with the same identifier
+%%     (bad default of \theHlstlabel)
+%%
+%% 15) Bradford Chamberlain, 2001/07/07, 0.21i
+%%
+%%     otherkeywords={@,@^} does not work
+%%     (argument treated as one long keyword)
+%%
+%% 16) GP Gores, 2001/07/11, 0.21i (2001/07/11)
+%%
+%%     a) inserts \par after each \lstinline
+%%     (\lst@Init has been modified, but I missed \lst@DeInit)
+%%
+%% 17) Carsten Heinz, 2001/07/16, 0.21j (2001/07/22)
+%%
+%%     16) makes first line of lstlisting textstyle
+%%     (bad modification of \lst@DeInit)
+%%
+%%
+%% Moreover the following functionality is added.
+%%
+%%  a) allow line breaks in \lstinline (experimental)
+%%
+%%  b) everydisplay=<token string>
+%%
+%%  c) nolol=<true|false> is mainly equivalent to the continue key, but
+%%     it will also drop lol-entries for lstlisting in the next version
+%%
+%%
+\ProvidesFile{lstpatch}[2001/07/22 v0.21j (Carsten Heinz)]
+\def\lst@topatch{0.21}
+\ifx\lst@version\lst@topatch\else
+    \typeout{^^J%
+    ***^^J%
+    *** Patch file `lstpatch.sty' for version \lst@topatch^^J%
+    *** is not suitable for `listings.sty' version \lst@version.^^J%
+    ***^^J
+    *** Patch file not loaded.^^J%
+    ***^^J}%
+    \let\lst@topatch\lst@version
+    \expandafter\endinput
+\fi
+%%
+%%  1) Just define \lst@breakshape.
+\gdef\lst@breakshape{%
+    \ifodd \c@page -\lst@innerspread \else -\lst@outerspread \fi
+    \linewidth}
+%%
+%%  2) Add \lst@PrintToken after \lst@TrackNewLines.
+\def\lstpatch@strings{%
+\gdef\lst@BeginString##1##2{%
+    \lst@TrackNewLines \lst@PrintToken
+    \lst@ifexstrings ##2\lst@PrintToken \fi
+    \lst@EnterMode{##1}%
+        {\lst@modetrue \let\lst@currstyle\lst@stringstyle}%
+    \lst@ifexstrings\else ##2\lst@PrintToken \fi
+    \lst@ifstringspaces
+        \lst@keepspacestrue
+        \let\lst@outputspace\lst@visiblespace
+    \fi}
+}
+%%
+%%  3) Insert deactivation.
+\def\lstpatch@html{%
+   \lst@AddToHook{SetLanguage}{\let\lst@DefInside\@empty}%
+}
+%%
+%%  4) Insert argument braces around ##5.
+\def\lstpatch@comments{%
+\gdef\lst@CommentB##1##2##3##4##5##6##7##8##9{%
+    \lst@CDef##1##2{##3}##4%
+        {##6}%
+        {\let\lst@bnext\lst@CArgEmpty
+         \lst@ifmode ##7\else
+             ##8%
+             \def\lst@bnext{\lst@BeginComment{##5}##9}%
+         \fi
+         \lst@bnext}%
+        \@empty}%
+}
+%%
+%%  5) Use `lstlabel' with \refstepcounter.
+\def\lstpatch@labels{%
+\lst@AddToHook{EveryPar}
+    {\global\advance\c@lstlabel\m@ne \refstepcounter{lstlabel}}%
+%%
+%% 14) Define appropriate \theHlstlabel.
+\AtBeginDocument{\def\theHlstlabel{\thelstlisting.\thelstlabel}}%
+}
+%%
+%%  6) Restore lccode.
+\lccode`\/=`\/
+%%
+%%  7) Don't add \lst@EOLUpdate to \lst@newlines. Since I don't know the
+%%     reason for adding it a long time ago :-(, it's probably better to
+%%     remove \lst@ResetToken (v0.22) from `InitVarsBOL' hook. Well, I'll
+%%     just wait for other bug reports ...
+\def\lst@ProcessFormFeed{%
+    \lst@PrintToken
+    \ifx\lst@newlines\@empty
+        \lst@EOLUpdate \lst@formfeed
+    \else
+%        \lst@lAddTo\lst@newlines{\lst@EOLUpdate \lst@formfeed}%
+        \lst@lAddTo\lst@newlines{\lst@formfeed}%
+    \fi
+    \lst@whitespacetrue}
+%%
+%%  8) Allocate \abovecaptionskip and \belowcaptionskip if necessary.
+%%     Additionally define \@makecaption (exact copy from report.cls).
+\@ifundefined{abovecaptionskip}
+{\newskip\abovecaptionskip
+ \newskip\belowcaptionskip
+ \long\def\@makecaption#1#2{%
+   \vskip\abovecaptionskip
+   \sbox\@tempboxa{#1: #2}%
+   \ifdim \wd\@tempboxa >\hsize
+     #1: #2\par
+   \else
+     \global \@minipagefalse
+     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+   \fi
+   \vskip\belowcaptionskip}%
+}{}
+%%
+%%  9) Also deactivate \lst@breakProcessOther.
+\def\lst@BeginDropInput#1{%
+    \lst@EnterMode{#1}%
+    {\lst@modetrue
+     \let\lst@ProcessLetter\@gobble
+     \let\lst@ProcessDigit\@gobble
+     \let\lst@ProcessOther\@gobble
+     \let\lst@breakProcessOther\@gobble
+     \let\lst@ProcessSpace\@empty
+     \let\lst@ProcessTabulator\@empty
+     \let\lst@ProcessFormFeed\@empty}}
+%%
+%% 10) Replace \@tempcnta\@ne by \@tempcnta\lst@firstline.
+\def\lstpatch@labels{%
+\gdef\lst@SetFirstLabel{%
+    \ifx\lst@firstlabel\@undefined
+        \@tempcnta 0\csname lstno@\lst@intname\endcsname\relax
+        \ifnum\@tempcnta=\z@ \@tempcnta\lst@firstline
+                       \else \lst@continuetrue \fi
+        \advance\@tempcnta\lst@advancelabel
+        \edef\lst@firstlabel{\the\@tempcnta\relax}%
+    \fi}%
+}
+%%
+%% 11) Define \lst@maketitle in terms of \@makecaption. Note
+%%     thet this need not to work for all packages and classes.
+%%     The \let command here is especially for koma script.
+\def\lst@maketitle#1#2{%
+    {\let\captionformat\@empty
+     \@makecaption{}\lst@title}}
+%%
+%% 12) Redefine ~ in output routine.
+\lst@AddToHook{Init}
+    {\let\lsts@OldOutput\lst@OldOutput
+     \def\lst@OldOutput{\def~{\nobreakspace{}}%
+                        \lsts@OldOutput}%
+    }
+%%
+%% 13) Use \lst@whitespacefalse at end of escape.
+\def\lstpatch@escape{%
+    \lst@Key{escapeend}{}{\def\lst@escapeend{##1\lst@whitespacefalse}}%
+}
+%%
+%% 15) Make `other keywords' active iteratively.
+\def\lstpatch@keywords{%
+\gdef\lst@AddOtherKey##1,{%
+    \ifx\relax##1\@empty\else
+        \ifx\@empty##1\@empty\else
+            \lst@MakeActive{##1}%
+            \lst@lExtend\lst@otherkeywords{\expandafter,\lst@temp}%
+        \fi
+        \expandafter\lst@AddOtherKey
+    \fi}%
+\lst@Key{otherkeywords}{}%
+    {\let\lst@otherkeywords\@empty
+     \lst@AddOtherKey##1,\relax,}
+}
+%%
+%% a) Remove \hbox in front of \bgroup and ...
+\renewcommand\lstinline[1][]{%
+    \leavevmode\bgroup
+        \def\lst@boxpos{b}\let\lst@ifflexible\iftrue
+        \lsthk@PreSet\lstset{#1}%
+        \lsthk@TextStyle \lst@Init\relax
+        \everypar{}\let\lsthk@Endgroup\@empty
+        \let\lst@newlines\@empty \let\lst@breakcurrindent\z@
+        \lstinline@}
+%% 17) Add switch to distinguish text and display style listings.
+\lst@AddToHook{TextStyle}{\let\lst@iftextstyle\iftrue}
+\lst@AddToHook{DisplayStyle}{\let\lst@iftextstyle\iffalse}
+\let\lst@iftextstyle\iffalse
+% ... back to a):
+\def\lst@InputListing#1{%
+    \begingroup
+    \lsthk@PreSet \gdef\lst@intname{#1}%
+    \expandafter\lstset\expandafter{\lst@set}%
+    \lst@ifprint
+        \par % inserted to switch to vmode
+        \lst@Init\relax \let\lst@gobble\z@
+        \lst@SkipToFirst \input{#1}\lst@DeInit
+    \else
+        \begin{center}%
+        \footnotesize --- Listing of #1 has been skipped. ---
+        \end{center}%
+    \fi
+    \endgroup}
+\def\lst@Init#1{%
+    \begingroup
+    \ifx\lst@float\relax\else
+        \edef\@tempa{\noexpand\@float{lstlisting}[\lst@float]}%
+        \expandafter\@tempa
+    \fi
+    \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
+    \else
+%% 17) Don't check for vertical mode, use \lst@iftextstyle.
+        \lst@iftextstyle\else
+\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
+    \everypar{\lsthk@EveryLine\lsthk@EveryPar}%
+    \lsthk@InitVars
+    \lsthk@InitVarsBOL
+    \lst@Let{13}\lst@MProcessListing
+    \let\lst@Backslash#1%
+    \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}}
+%%
+%% 16) Adjust \lst@DeInit accordingly.
+\def\lst@DeInit{%
+    \lst@PrintToken \lst@EOLUpdate
+    \lst@RemoveNewLine\@empty
+    \lst@RemoveNewLine{%
+        \lst@ifshowlines
+            \lst@TrackNewLines
+        \else
+            \setbox\@tempboxa\vbox{\lst@TrackNewLines}%
+        \fi}%
+%% 17) Don't check for vertical mode, use \lst@iftextstyle.
+    \lst@iftextstyle\else
+        \par\removelastskip
+    \fi
+    \everypar{}\lsthk@ExitVars \lsthk@DeInit
+    \lst@MakeCaption b%
+    \lst@ifbox
+        \egroup $\hss \egroup
+        \vrule\@width\lst@maxwidth\@height\z@\@depth\z@
+    \else
+%% check for vertical mode.
+        \ifvmode
+            \par\penalty-50\vspace\lst@belowskip
+        \fi
+    \fi
+    \ifx\lst@float\relax\else
+        \expandafter\end@float
+    \fi
+    \endgroup}
+%%
+%% b) Define key, the material is inserted above.
+\lst@Key{everydisplay}{}{\def\lst@EveryDisplay{#1}}
+%%
+%% c) New key sets value of continue key.
+\lst@Key{nolol}{false}[t]{\lstKV@SetIf{#1}\lst@ifnolol}
+\lst@AddToHook{PreInit}{\lst@ifcontinue\else \lst@SetIfContinue \fi}
+\def\lst@SetIfContinue{\let\lst@ifcontinue\lst@ifnolol}
+%%
+\endinput
+%%
+%% End of file `lstpatch.sty'.

+ 817 - 0
docs/styles/syntax.sty

@@ -0,0 +1,817 @@
+%%
+%% This is file `syntax.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% syntax.dtx  (with options: `package')
+%% doafter.dtx  (with options: `macro')
+%% 
+%% IMPORTANT NOTICE
+%%
+%% syntax package -- typesetting syntax descriptions
+%% Copyright (c) 1996 Mark Wooding
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{syntax}
+                [1996/05/17 1.9 Syntax typesetting (MDW)]
+%% \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         \~}
+%%
+\DeclareOption{rounded}{\sd@roundtrue}
+\DeclareOption{square}{\sd@roundfalse}
+\DeclareOption{nounderscore}{\@uscorefalse}
+\newif\ifsd@round
+\newif\if@uscore\@uscoretrue
+\ExecuteOptions{square}
+\ProcessOptions
+\def\addspecial#1{%
+  \remspecial{#1}%
+  \expandafter\def\expandafter\dospecials\expandafter{\dospecials\do#1}%
+  \expandafter\def\expandafter\@santize\expandafter{%
+    \@sanitize\@makeother#1}%
+}
+\def\remspecial#1{%
+  \def\do##1{\ifnum`#1=`##1 \else\noexpand\do\noexpand##1\fi}%
+  \edef\dospecials{\dospecials}%
+  \def\@makeother##1{\ifnum`#1=`##1 \else%
+    \noexpand\@makeother\noexpand##1\fi}%
+  \edef\@sanitize{\@sanitize}%
+  \def\@makeother##1{\catcode`##112}%
+}
+\def\underscore{%
+  \leavevmode%
+  \kern.06em%
+  \vbox{%
+    \hrule\@width.6em\@depth.4ex\@height-.34ex%
+  }%
+  \ifdim\fontdimen\@ne\font=\z@%
+    \kern.06em%
+  \fi%
+}
+\let\usc@builtindischyphen\-
+\def\@uscore.{%
+  \ifmmode%
+    \expandafter\@firstoftwo%
+  \else%
+    \expandafter\@secondoftwo%
+  \fi%
+  \sb%
+  {\textunderscore\@ifnextchar_{}{\usc@builtindischyphen}}%
+}
+\if@uscore
+  \AtBeginDocument{%
+    \catcode`\_\active%
+    \begingroup%
+    \lccode`\~`\_%
+    \lowercase{\endgroup\def~{\protect\@uscore.}}%
+  }
+\fi
+\expandafter\let\csname?\string\textunderscore\endcsname\underscore
+\def\shortverb#1{%
+  \@ifundefined{cc@\string#1}{%
+    \addspecial#1%
+    \begingroup%
+    \lccode`\~`#1%
+    \lowercase{%
+      \endgroup%
+      \expandafter\let\csname mn@\string#1\endcsname~%
+      \expandafter\edef\csname cc@\string#1\endcsname{%
+        \catcode`\noexpand#1\the\catcode`#1%
+        \let\noexpand~\expandafter\noexpand%
+          \csname mn@\string#1\endcsname%
+        \noexpand\remspecial\noexpand#1%
+        \let\csname cc@\string#1\endcsname\relax%
+      }%
+      \def~{\verb~\syn@ttspace}%
+    }%
+    \catcode`#1\active%
+  }{%
+    \PackageWarning{syntax}{Character `\expandafter\@gobble\string#1'
+                            is already a verbatim\MessageBreak
+                            delimiter}%
+  }%
+}
+\def\unverb#1{%
+  \@ifundefined{cc@\string#1}{%
+    \PackageWarning{syntax}{Character `\expandafter\@gobble\string#1'
+                            is not a verbatim\MessageBreak
+                            delimiter}%
+  }{%
+    \csname cc@\string#1\endcsname%
+  }%
+}
+\newcommand{\syntleft}{$\langle$\normalfont\itshape}
+\newcommand{\syntright}{$\rangle$}
+\newcommand{\ulitleft}{\normalfont\ttfamily\syn@ttspace\frenchspacing}
+\newcommand{\ulitright}{}
+\newcommand{\litleft}{`\bgroup\ulitleft}
+\newcommand{\litright}{\ulitright\egroup'}
+\def\synt#1{\mbox{\syntleft{#1\/}\syntright}}
+\def\lit{\@ifstar{\lit@i\ulitleft\ulitright}{\lit@i\litleft\litright}}
+\def\lit@i#1#2#3{\mbox{#1{#3\/}#2}}
+\def\syn@ttspace@{\spaceskip.35em\@plus.2em\@minus.15em\relax}
+\def\ttthinspace{\let\syn@ttspace\syn@ttspace@}
+\def\ttthickspace{\let\syn@ttspace\@empty}
+\ttthinspace
+\def\readupto#1#2#3{%
+  \bgroup%
+  \verb@eol@error%
+  \let\do\@makeother\dospecials%
+  #2%
+  \catcode`#1\active%
+  \lccode`\~`#1%
+  \gdef\verb@balance@group{\verb@egroup%
+     \@latex@error{\noexpand\verb illegal in command argument}\@ehc}%
+  \def\@vhook{\verb@egroup#3}%
+  \aftergroup\verb@balance@group%
+  \lowercase{\let~\@vhook}%
+}
+\def\syn@assist#1#2#3#4#5{%
+  \mbox\bgroup%
+  \chardef\\`\\%
+  \chardef\>`\>%
+  \chardef\'`\'%
+  \chardef\"`\"%
+  \chardef\ `\ %
+  \def\ch##1{\char`##1}%
+  \def\act##1{%
+    \catcode`##1\active%
+    \begingroup%
+    \lccode`\~`##1%
+    \lowercase{\endgroup\def~}%
+  }%
+  #1%
+  \begingroup%
+  \readupto#3{%
+    \catcode`\\0%
+    \catcode`\ 10%
+    #2%
+  }{%
+    \/\endgroup#4\egroup#5%
+  }%
+}
+\begingroup
+\catcode`\<\active
+\catcode`\|\active
+\catcode`\"\active
+\catcode`\`\active
+\gdef\syn@shorts#1#2{%
+  \def<{%
+    #1%
+    \syn@assist%
+      \syntleft%
+      {\act_{\@foundunderscore}}%
+      >%
+      \syntright%
+      {#2}%
+  }%
+  \def`{%
+    #1%
+    \syn@assist%
+      \litleft%
+      \relax%
+      '%
+      \litright%
+      {#2}%
+  }%
+  \def"{%
+    #1%
+    \syn@assist%
+      \ulitleft%
+      \relax%
+      "%
+      \ulitright%
+      {#2}%
+  }%
+  \def|{\textbar}%
+}
+\endgroup
+\def\syntaxShortcuts#1#2{%
+  \syn@shorts{#1}{#2}%
+  \addspecial\`%
+  \addspecial\<%
+  \addspecial\|%
+  \addspecial\"%
+  \catcode`\|\active%
+  \catcode`\<\active%
+  \catcode`\"\active%
+  \catcode`\`\active%
+}
+\def\synshorts{\syntaxShortcuts\relax\relax}
+\def\synshortsoff{%
+  \catcode`\|12%
+  \catcode`\<12%
+  \catcode`\"12%
+  \catcode`\`12%
+}
+\def\syntax#{\bgroup\syntaxShortcuts\relax\relax\let\@let@token}
+\newskip\grammarparsep
+  \grammarparsep8\p@\@plus\p@\@minus\p@
+\newdimen\grammarindent
+  \grammarindent2em
+\newcommand{\grammarlabel}[2]{%
+  \synt{#1} \hfill#2%
+}
+\def\gr@implitem<#1> #2 {%
+  \sbox\z@{\hskip\labelsep\grammarlabel{#1}{#2}}%
+  \strut\@@par%
+  \vskip-\parskip%
+  \vskip-\baselineskip%
+  \hrule\@height\z@\@depth\z@\relax%
+  \item[\unhbox\z@]%
+  \catcode`\<\active%
+}
+\let\gr@leftsq\[
+\let\gr@rightsq\]
+\def\[{\gr@leftsq}
+\def\]{\gr@rightsq}
+\newenvironment{grammar}{%
+  \list{}{%
+    \labelwidth\grammarindent%
+    \leftmargin\grammarindent%
+    \advance\grammarindent\labelsep
+    \itemindent\z@%
+    \listparindent\z@%
+    \parsep\grammarparsep%
+  }%
+  \let\\\@normalcr
+  \syntaxShortcuts\relax\relax%
+  \def\alt{\\\llap{\textbar\quad}}%
+  \def\gr@setpar{%
+    \def\par{%
+      \parshape\@ne\@totalleftmargin\linewidth%
+      \@@par%
+      \catcode`\<12%
+      \everypar{%
+        \everypar{}%
+        \catcode`\<\active%
+        \gr@implitem%
+      }%
+    }%
+  }%
+  \gr@setpar%
+  \par%
+  \def\gr@endsyntdiag]{\end{syntdiag}\gr@setpar\par}%
+  \def\[{\@ifnextchar[{\begin{syntdiag}\@gobble}\gr@leftsq}%
+  \def\]{\@ifnextchar]\gr@endsyntdiag\gr@rightsq}%
+}{%
+  \@newlistfalse%
+  \everypar{}%
+  \endlist%
+}
+\newskip\sdstartspace
+\newskip\sdendspace
+\newskip\sdmidskip
+\newskip\sdtokskip
+\newskip\sdfinalskip
+\newdimen\sdrulewidth
+\newdimen\sdcirclediam
+\newdimen\sdindent
+\dimendef\sd@lower\z@
+\dimendef\sd@upper\tw@
+\dimendef\sd@mid4
+\dimendef\sd@topcirc6
+\dimendef\sd@botcirc8
+\def\sd@setsize{%
+  \sd@mid\ht\strutbox%
+  \advance\sd@mid-\dp\strutbox%
+  \[email protected]\sd@mid%
+  \sd@upper\sdrulewidth%
+    \advance\sd@upper\sd@mid%
+  \sd@lower\sdrulewidth%
+    \advance\sd@lower-\sd@mid%
+  \[email protected]\sdcirclediam%
+    \advance\sd@topcirc\sd@mid%
+  \[email protected]\sdcirclediam%
+    \advance\sd@botcirc-\sd@mid%
+}
+\newcommand{\sdsize}{%
+  \small%
+}
+\newcommand{\sdlengths}{%
+  \setlength{\sdstartspace}{1em minus 10pt}%
+  \setlength{\sdendspace}{1em minus 10pt}%
+  \setlength{\sdmidskip}{0.5em plus 0.0001fil}%
+  \setlength{\sdtokskip}{0.25em plus 0.0001fil}%
+  \setlength{\sdfinalskip}{0.5em plus 10000fil}%
+  \setlength{\sdrulewidth}{0.2pt}%
+  \setlength{\sdcirclediam}{8pt}%
+  \setlength{\sdindent}{0pt}%
+}
+\newif\ifsd@base
+\newif\ifsd@top
+\newif\ifsd@toplayer
+\newif\ifsd@backwards
+\def\sd@err{\PackageError{syntax}}
+\def\sd@arrow{%
+  \ht\tw@\z@%
+  \dp\tw@\z@%
+  \raise\sd@mid\box\tw@%
+  \egroup%
+}
+\def\sd@rightarr{%
+  \bgroup%
+  \setbox\tw@\hbox{\kern-6\p@\@linefnt\char'55}%
+  \sd@arrow%
+}
+\def\sd@leftarr{%
+  \bgroup%
+  \raise\sd@mid\hbox{\@linefnt\char'33\kern-6\p@}%
+  \sd@arrow%
+}
+\def\sd@uparr{%
+  \bgroup%
+  \setbox\tw@\hb@xt@\z@{\kern-\sdrulewidth\@linefnt\char'66\hss}%
+  \setbox\tw@\hbox{\lower10\p@\box\tw@}%
+  \sd@arrow%
+}
+\def\sd@downarr{%
+  \bgroup%
+  \setbox\tw@\hb@xt@\z@{\kern-\sdrulewidth\@linefnt\char'77\hss}%
+  \sd@arrow%
+}
+\def\sd@circ#1{%
+  \@getcirc\sdcirclediam%
+  \advance\@tempcnta#1%
+  \setbox\tw@\hbox{\lower\sdrulewidth%
+    \hbox{\@circlefnt\char\@tempcnta}}%
+  \wd\tw@\z@%
+  \leavevmode%
+}
+\def\sd@tlcirc{{%
+  \sd@circ3%
+  \ht\tw@\sdrulewidth%
+  \dp\[email protected]\sdcirclediam%
+  \kern-\tw@\sdrulewidth%
+  \raise\sd@mid\box\tw@%
+  \kern.5\sdcirclediam%
+}}
+\def\sd@trcirc{{%
+  \sd@circ0%
+  \ht\tw@\sdrulewidth%
+  \dp\[email protected]\sdcirclediam%
+  \kern.5\sdcirclediam%
+  \raise\sd@mid\box\tw@%
+}}
+\def\sd@blcirc{{%
+  \sd@circ2%
+  \ht\[email protected]\sdcirclediam%
+  \dp\tw@\sdrulewidth%
+  \kern-\tw@\sdrulewidth%
+  \raise\sd@mid\box\tw@%
+  \kern.5\sdcirclediam%
+}}
+\def\sd@brcirc{{%
+  \sd@circ1%
+  \ht\[email protected]\sdcirclediam%
+  \dp\tw@\sdrulewidth%
+  \kern.5\sdcirclediam%
+  \raise\sd@mid\box\tw@%
+}}
+\def\sd@llc#1{%
+  \hb@[email protected]\sdcirclediam{%
+    \sd@rule\hskip.5\sdcirclediam%
+    \hss%
+    #1%
+  }%
+}
+\def\sd@rlc#1{%
+  \hb@[email protected]\sdcirclediam{%
+    #1%
+    \hss%
+    \sd@rule\hskip.5\sdcirclediam%
+  }%
+}
+\def\sd@rule{\leaders\hrule\@height\sd@upper\@depth\sd@lower}
+\def\sd@gap#1{%
+  \ifsd@base%
+    \skip@#1%
+      \divide\skip\z@\tw@%
+    \nobreak\sd@rule\hskip\skip@%
+    \discretionary{%
+      \sd@qarrow{->}%
+    }{%
+      \hbox{%
+        \sd@qarrow{>-}%
+        \sd@rule\hskip\sdstartspace%
+        \sd@rule\hskip3.5\p@%
+      }%
+    }{%
+    }%
+    \nobreak\sd@rule\hskip\skip@%
+  \else%
+    \sd@rule\hskip#1%
+  \fi%
+}
+\def\syntdiag{%
+  \syntaxShortcuts\sd@tok@i\sd@tok@ii%
+  \@ifnextchar[\syntdiag@i{\syntdiag@i[]}%
+}
+\def\syntdiag@i[#1]{%
+  \sdsize\sdlengths%
+  #1%
+  \sd@setsize%
+  \list{}{%
+    \leftmargin\sdindent%
+    \rightmargin\leftmargin%
+    \labelsep\z@%
+    \labelwidth\z@%
+  }%
+  \item[]%
+  \parfillskip\z@%
+  \noindent%
+  \sd@qarrow{>>-}%
+  \nobreak\sd@rule\hskip\sdstartspace%
+  \sd@basetrue%
+  \sloppy%
+  \interlinepenalty100%
+  \hyphenpenalty0%
+  \catcode`\ 9%
+  \catcode`\^^M9%
+  \def\gr@leftsq{\begin{stack}\\}%
+  \def\gr@rightsq{\end{stack}}%
+  \def\({\begin{stack}}%
+  \def\){\end{stack}}%
+  \def\<{\begin{rep}}%
+  \def\>{\end{rep}}%
+  \let\\\sd@newline%
+  \ignorespaces%
+}
+\def\endsyntdiag{%
+  \unskip%
+  \nobreak\sd@rule\hskip\sdmidskip%
+  \sd@rule\hskip\sdfinalskip%
+  \sd@qarrow{-><}%
+  \endlist%
+}
+\@namedef{syntdiag*}{%
+  \syntaxShortcuts\sd@tok@i\sd@tok@ii%
+  \@ifnextchar[\syntdiag@s@i{\syntdiag@s@i[]}%
+}
+\def\syntdiag@s@i[#1]{%
+  \@ifnextchar[{\syntdiag@s@ii{#1}}{\syntdiag@s@iii{#1}{\hbox}}%
+}
+\def\syntdiag@s@ii#1[#2]{\syntdiag@s@iii{#1}{\hb@xt@#2}}
+\def\syntdiag@s@iii#1#2{%
+  \leavevmode%
+  #2\bgroup%
+  \let\@@left\left%
+  \let\@@right\right%
+  \def\left##1{\def\sd@startarr{##1}}%
+  \def\right##1{\def\sd@endarr{##1}}%
+  \left{>-}\right{->}%
+  \sdsize\sdlengths%
+  #1%
+  \sd@setsize%
+  \let\left\@@left%
+  \let\right\@@right%
+  \sd@qarrow\sd@startarr%
+  \sd@rule\hskip\sdmidskip%
+  \sd@basefalse%
+  \catcode`\ 9%
+  \catcode`\^^M9%
+  \ignorespaces%
+}
+\@namedef{endsyntdiag*}{%
+  \unskip%
+  \sd@rule\hskip\sdmidskip%
+  \sd@rule\hskip\sdfinalskip%
+  \sd@qarrow\sd@endarr%
+  \egroup%
+}
+\def\sd@qarrow#1{%
+  \begingroup%
+  \lccode`\~=`\<\lowercase{\def~{<}}%
+  \hbox{\csname sd@arr@#1\endcsname}%
+  \endgroup%
+}
+\@namedef{sd@arr@>>-}{\sd@rightarr\kern-.5\p@\sd@rightarr\kern-\p@}
+\@namedef{sd@arr@>-}{\sd@rightarr\kern-\p@}
+\@namedef{sd@arr@->}{\sd@rightarr}
+\@namedef{sd@arr@-><}{\sd@rightarr\kern-\p@\sd@leftarr}
+\@namedef{sd@arr@...}{$\cdots$}
+\@namedef{sd@arr@-}{}
+\def\sd@newline{\@ifstar{\vadjust{\penalty\@M}\sd@nl@i}\sd@nl@i}
+\def\sd@nl@i{\@ifnextchar[\sd@nl@ii\sd@nl@iii}
+\def\sd@nl@ii[#1]{\vspace{#1}\sd@nl@iii}
+\def\sd@nl@iii{%
+  \nobreak\sd@rule\hskip\sdmidskip%
+  \sd@rule\hskip\sdfinalskip%
+  \kern-3\p@%
+  \sd@rightarr%
+  \newline%
+  \sd@rightarr%
+  \nobreak\sd@rule\hskip\sdstartspace%
+  \sd@rule\hskip3.5\p@%
+}
+\def\sdbox#1{%
+  \@tempskipa#1\relax%
+  \sd@gap\@tempskipa%
+  \setbox\z@\hbox\bgroup%
+    \begingroup%
+    \catcode`\ 10%
+    \catcode`\^^M5%
+    \synshortsoff%
+}
+\def\endsdbox{%
+    \endgroup%
+  \egroup%
+  \@tempdima\ht\z@%
+  \advance\@tempdima-\dp\z@%
+  \advance\@tempdima-\tw@\sd@mid%
+  \lower.5\@tempdima\box\z@%
+  \sd@gap\@tempskipa%
+}
+\def\sd@tok@i{%
+  \sdbox\sdtokskip%
+  \strut%
+  \space%
+}
+\def\sd@tok@ii{%
+  \space%
+  \endsdbox%
+}
+\def\tok#{%
+  \sdbox\sdtokskip%
+  \strut%
+  \enspace%
+  \syntaxShortcuts\relax\relax%
+  \doafter\sd@tok%
+}
+\def\sd@tok{%
+  \enspace%
+  \endsdbox%
+}
+\newcommand\stack[1][t]{%
+  \sd@gap\sdmidskip%
+  \begingroup\sd@basefalse%
+  \sd@toplayertrue%
+  \let\\\sd@stackcr%
+  \if#1t%
+    \let\@tempa\vtop%
+    \sd@toptrue%
+    \ifsd@round\llap{\sd@trcirc\kern\tw@\sdrulewidth}\fi%
+  \else\if#1b%
+    \let\@tempa\vbox%
+    \sd@topfalse%
+    \ifsd@round\llap{\sd@brcirc\kern\tw@\sdrulewidth}\fi%
+  \else%
+    \sd@err{Bad position argument passed to stack}%
+           {The positioning argument must be one of `t' or `b'.  I%
+            have^^Jassumed you meant to type `t'.}%
+    \let\@tempa\vtop%
+  \fi\fi%
+  \@tempa\bgroup%
+  \offinterlineskip%
+  \ialign\bgroup%
+    ##\cr%
+  \setbox\z@\hbox\bgroup%
+    \strut%
+}
+\def\endstack{%
+  \egroup%
+  \ifsd@toplayer%
+    \sd@dostack\sd@upper\sd@lower\relax\relax%
+  \else%
+    \ifsd@round%
+      \ifsd@top%
+        \sd@dostack{\ht\z@}\sd@botcirc\sd@blcirc\sd@brcirc%
+      \else%
+        \sd@dostack{\ht\z@}\sd@botcirc\relax\relax%
+      \fi%
+    \else%
+      \sd@dostack{\ht\z@}\sd@lower\relax\relax%
+    \fi%
+  \fi%
+  \egroup%
+  \egroup%
+  \ifsd@round%
+    \ifsd@top
+      \rlap{\kern\tw@\sdrulewidth\sd@tlcirc}%
+    \else%
+      \rlap{\kern\tw@\sdrulewidth\sd@blcirc}%
+    \fi%
+  \fi%
+  \endgroup\sd@gap\sdmidskip%
+}
+\def\sd@stackcr{%
+  \egroup%
+  \ifsd@toplayer%
+    \ifsd@round%
+      \ifsd@top%
+        \sd@dostack\sd@topcirc{\dp\z@}\relax\relax%
+      \else%
+        \sd@dostack\sd@topcirc{\dp\z@}\sd@tlcirc\sd@trcirc%
+      \fi%
+    \else%
+      \sd@dostack\sd@upper{\dp\z@}\relax\relax%
+    \fi%
+  \else%
+    \ifsd@round%
+      \ifsd@top%
+        \sd@dostack{\ht\z@}{\dp\z@}\sd@blcirc\sd@brcirc%
+      \else%
+        \sd@dostack{\ht\z@}{\dp\z@}\sd@tlcirc\sd@trcirc%
+      \fi%
+    \else%
+      \sd@dostack{\ht\z@}{\dp\z@}\relax\relax%
+    \fi%
+  \fi%
+  \sd@toplayerfalse%
+  \setbox\z@\hbox\bgroup%
+    \strut%
+}
+\def\sd@dostack#1#2#3#4{%
+  \@tempdima#1%
+  \@tempdimb#2%
+  \kern-\tw@\sdrulewidth%
+  \vrule\@height\@tempdima\@depth\@tempdimb\@width\tw@\sdrulewidth%
+  #3%
+  \sd@rule\hfill%
+  \sd@gap\sdtokskip%
+  \unhbox\z@%
+  \sd@gap\sdtokskip%
+  \sd@rule\hfill%
+  #4%
+  \vrule\@height\@tempdima\@depth\@tempdimb\@width\tw@\sdrulewidth%
+  \kern-\tw@\sdrulewidth%
+  \cr%
+}
+\newcommand\rep[1][t]{%
+  \sd@gap\sdmidskip%
+  \begingroup\sd@basefalse%
+  \ifsd@backwards\sd@backwardsfalse\else\sd@backwardstrue\fi%
+   \let\\\sd@loop%
+  \if#1t%
+    \let\@tempa\vbox%
+    \sd@toptrue%
+  \else\if#1b%
+    \let\@tempa\vtop%
+    \sd@topfalse%
+  \else%
+    \sd@err{Bad position argument passed to loop}%
+           {The positioning argument must be `t' or `b'.  I have^^J%
+            assumed you meant to type `t'.}%
+    \let\@tempa\vbox%
+    \sd@toptrue%
+  \fi\fi%
+  \@tempa\bgroup%
+  \setbox\tw@\copy\strutbox%
+  \setbox\z@\hbox\bgroup\strut%
+}
+\def\endrep{%
+  \egroup%
+  \ifsd@top%
+    \ifsd@round%
+      \sd@doloop\tw@\z@\relax\relax%
+        \sd@tlcirc\sd@trcirc{\sd@rlc\sd@blcirc}{\sd@llc\sd@brcirc}%
+    \else%
+      \sd@doloop\tw@\z@\relax\sd@downarr\relax\relax\relax\relax%
+    \fi%
+  \else%
+    \ifsd@round%
+      \sd@doloop\z@\tw@\relax\relax%
+        {\sd@rlc\sd@tlcirc}{\sd@llc\sd@trcirc}\sd@blcirc\sd@brcirc%
+    \else%
+      \sd@doloop\z@\tw@\sd@uparr\relax\relax\relax\relax\relax%
+    \fi%
+  \fi%
+  \egroup%
+  \endgroup\sd@gap\sdmidskip%
+}
+\def\sd@loop{%
+  \egroup%
+  \def\\{\sd@err{Too many \string\\\space commands in loop}\@ehc}%
+  \setbox\tw@\hbox\bgroup\strut%
+}
+\def\sd@doloop#1#2#3#4#5#6#7#8{%
+  \@tempdima\dp#1\relax%
+  \@tempdimb\ht#2\relax%
+  \offinterlineskip%
+  \ialign{%
+    ##\cr%
+    \ifsd@round%
+      \sd@doloop@i#1#3\sd@topcirc\@tempdima{#5}{#6}%
+      \sd@doloop@i#2#4\@tempdimb\sd@botcirc{#7}{#8}%
+    \else%
+      \sd@doloop@i#1#3\sd@upper\@tempdima{#5}{#6}%
+      \sd@doloop@i#2#4\@tempdimb\sd@lower{#7}{#8}%
+    \fi%
+  }%
+}
+\def\sd@doloop@i#1#2#3#4#5#6{%
+  \ifsd@backwards#2\fi%
+  \kern-\tw@\sdrulewidth%
+  \vrule\@height#3\@depth#4\@width\tw@\sdrulewidth%
+  #5%
+  \sd@rule\hfill%
+  \sd@gap\sdtokskip%
+  \unhbox#1%
+  \sd@gap\sdtokskip%
+  \sd@rule\hfill%
+  #6%
+  \vrule\@height#3\@depth#4\@width\tw@\sdrulewidth%
+  \ifsd@backwards\else#2\fi%
+  \kern-\tw@\sdrulewidth%
+  \cr%
+}
+%%
+%% doafter package -- insert a token really after a group
+%% Copyright (c) 1996 Peter Schmitt and Mark Wooding
+%%
+\let\@@aftergroup\aftergroup
+\def\doafter#1{%
+  \def\@tempa{\@@aftergroup#1}%
+  \afterassignment\doafter@i\let\@let@token%
+}
+\def\doafter@i{%
+  \@let@token%
+  \let\aftergroup\@my@aftergroup%
+  \@@aftergroup\@prepare@after\@tempa%
+}
+\def\ag@cnt@local{0 }
+\let\ag@cnt@global\ag@cnt@local
+\def\@my@aftergroup{%
+  \begingroup%
+    \count@\ag@cnt@local%
+    \advance\count@\@ne%
+    \xdef\ag@cnt@global{\the\count@\space}%
+  \endgroup%
+  \let\ag@cnt@local\ag@cnt@global%
+  \@@aftergroup\@after@token\@@aftergroup%
+}
+\def\@after@token{%
+  \@start@after@group%
+  \@after@token%
+}
+\def\@start@after@group{%
+  \begingroup%
+  \count@\ag@cnt@global%
+  \clubpenalty\ag@cnt@local%
+  \let\@after@token\@after@token@i%
+}
+\def\@after@token@i{%
+  \advance\count@\m@ne%
+  \ifnum\count@=\clubpenalty%
+    \global\let\ag@cnt@global\ag@cnt@local%
+    \expandafter\@after@aftertoken\expandafter\@after@all%
+  \else%
+    \expandafter\@@aftergroup%
+  \fi%
+}
+\let\@after@all\endgroup
+\def\@prepare@after{%
+  \ifx\ag@cnt@local\ag@cnt@global\else%
+    \expandafter\@prepare@after@i%
+  \fi%
+}
+\def\@prepare@after@i#1{%
+  \@start@after@group%
+  \def\@after@all{\@@aftergroup#1\endgroup}%
+}
+\def\@after@aftertoken#1{%
+  \let\bgroup\relax\let\egroup\relax%
+  \toks@{#1}%
+  \futurelet\@let@token\@after@aftertoken@i%
+}
+\def\@after@aftertoken@i{%
+  \ifcat\noexpand\@let@token{%
+    \@@aftergroup{%
+  \else\ifcat\noexpand\@let@token}%
+    \@@aftergroup}%
+  \else%
+    \def\@tempa##1{\@@aftergroup##1\the\toks@}%
+    \expandafter\expandafter\expandafter\@tempa%
+  \fi\fi%
+}
+\endinput
+%%
+%% End of file `syntax.sty'.

+ 2 - 2
docs/typinfo.tex

@@ -26,11 +26,11 @@
 \FPCexampledir{typinfex}
 The \file{TypeInfo} unit contains many routines which can be used for
 the querying of the Run-Time Type Information (RTTI) which is generated
-by the compiler for classes that are compiled under the \var{\{\*M+\}}
+by the compiler for classes that are compiled under the \var{\{\$M+\}}
 switch. This information can be used to retrieve or set property values
 for published properties for totally unknown classes. In particular, it
 can be used to stream classes. The \var{TPersistent} class in the 
-\file{Classes} unit is compiled in the \var{\{\*M+\}} state and serves
+\file{Classes} unit is compiled in the \var{\{\$M+\}} state and serves
 as the base class for all classes that need to be streamed.
 
 The unit should be compatible to the Delphi 5 unit with the same name. 

+ 3 - 2
docs/units.tex

@@ -21,7 +21,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Preamble.
 \input{preamble.inc}
-\latex{%
+\begin{latexonly}
   \ifpdf
     \pdfinfo{/Author(Michael Van Canneyt)
              /Title(Standard units Reference Guide)
@@ -29,7 +29,8 @@
              /Keywords(Free Pascal, Units, RTL)
              }
   \fi
-}
+\end{latexonly}
+
 %
 % Settings
 %

+ 13 - 32
docs/user.tex

@@ -21,14 +21,16 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Preamble.
 \input{preamble.inc}
-\latex{%
+\begin{latexonly}
   \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)
            /Title(Users' Guide)
            /Subject(Free Pascal Users' guide)
            /Keywords(Free Pascal)
            }
-\fi}
+  \fi
+\end{latexonly}
+
 %
 % Settings
 %
@@ -115,7 +117,7 @@ If the documentation doesn't give an answer to your questions,
 you can obtain more information on the Internet, on the following addresses:
 \begin{itemize}
 \item
-\htmladdnormallink{http://www.freepascal.org/}
+\seeurl{http://www.freepascal.org/}
 {http://www.freepascal.org} is the main
 site. It contains also useful mail addresses and
 links to other places.
@@ -123,7 +125,7 @@ It also contains the instructions for inscribing to the
 \textit{mailing-list}.
 
 \item
-\htmladdnormallink{http://community.freepascal.org:10000/}
+\seeurl{http://community.freepascal.org:10000/}
 {http://community.freepascal.org:10000/} is a forum site where
 questions can be posted.
 \end{itemize}
@@ -131,7 +133,7 @@ Other than that, some mirrors exist.
 
 Finally, if you think something should be added to this manual
 (entirely possible), please do not hesitate and contact me at
-\htmladdnormallink{[email protected]}{mailto:[email protected]}.
+\seeurl{[email protected]}{mailto:[email protected]}.
 .
 
 Let's get on with something useful.
@@ -206,31 +208,10 @@ compiler distribution.  The distribution zip file contains an
 installation program \file{INSTALL.EXE}. You must run this program to install
 the compiler.
 
-\begin{htmlonly}
-The first screen of the installation program looks like this:
-\fpcaddimg{../pics/install1.png}
-And the second screen looks like
-\fpcaddimg{../pics/install2.png}
-\end{htmlonly}
-\begin{latexonly}
-The screen of the installation program looks like figure \ref{fig:install}.
-\begin{figure}
-\caption{The \dos install program screen.}
-\label{fig:install}
-\ifpdf
-\epsfig{file=pics/install1.png,width=\textwidth}
-\end{figure}
-\begin{figure}
-\caption{The \dos install program screen.}
-\label{fig:installb}
-\epsfig{file=pics/install2.png,width=\textwidth}
-%\epsfig{file=pics/install2s.png}
-\else
-\epsfig{file=pics/install1.eps,width=\textwidth}
-\epsfig{file=pics/install2.eps,width=\textwidth}
-\fi
-\end{figure}
-\end{latexonly}
+The screen of the installation program looks like figure \ref{fig:install1}.
+
+\FPCpic{The \dos install program screen}{}{install1}
+\FPCpic{}{}{install2}
 
 The program allows you to select:
 \begin{itemize}
@@ -1946,9 +1927,9 @@ period                 &     . \\
 \end{FPCltable}
 
 The \textbf{Options} codewords define actions to be taken when the keyword before
-the equal sign is found, \seet{options}
+the equal sign is found, \seet{ptopoptions}
 
-\begin{FPCltable}{lll}{Possible options}{options}
+\begin{FPCltable}{lll}{Possible options}{ptopoptions}
 Option         &     does what \\ \hline
 crsupp         &     suppress CR before the keyword.\\
 crbefore       &     force CR before keyword\\

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است