Commit 665b5a6b authored by Guillaume Pasero's avatar Guillaume Pasero

MRG: Merge bugfixes from branch 'release-6.2' into develop

parents c6f02268 b9ec696e
......@@ -344,8 +344,8 @@ def GetApplicationExamplePythonSnippet(app,idx,expand = False, inputpath="",outp
#app.SetParameterString(param,value)
output+= "\t" + appname + ".SetParameterString(" + EncloseString(param) + "," + EncloseString(value) + ")" + linesep
if paramtype == otbApplication.ParameterType_Empty:
app.SetParameterString(param,"1")
output+= "\t" + appname + ".SetParameterString("+EncloseString(param)+",\"1\")" + linesep
app.EnableParameter(param)
output+= "\t" + appname + ".EnableParameter("+EncloseString(param)+")" + linesep
if paramtype == otbApplication.ParameterType_Int \
or paramtype == otbApplication.ParameterType_Radius \
or paramtype == otbApplication.ParameterType_RAM:
......
%%
%% 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-1.3.dtx or listings-1.3.pdf.
%%
%% (w)(c) 1996--2004 Carsten Heinz and/or any other author listed
%% elsewhere in this file.
%% (c) 2006 Brooks Moses
%%
%% Send comments and ideas on the package, error reports and additional
%% programming languages to <bmoses@dpdx.net>.
%%
\def\filedate{2007/02/22}
\def\fileversion{1.4}
\NeedsTeXFormat{LaTeX2e}
\AtEndOfPackage{\ProvidesPackage{listings}
[\filedate\space\fileversion\space(Carsten Heinz)]}
\def\lst@CheckVersion#1{\edef\reserved@a{#1}%
\ifx\lst@version\reserved@a \expandafter\@gobble
\else \expandafter\@firstofone \fi}
\let\lst@version\fileversion
\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{%
\noexpand\lccode`\noexpand\/`\noexpand\/%
\lst@RestoreCatcodes\"\^^I\^^M\~\^^@\relax
\catcode12\active}
\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@GobbleNil#1\@nil{}
\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}%
\def\@tempa{#1}%
\ifx\@tempa\@empty\else\expandafter\lst@f@r#1,\@nil,\fi
}
\def\lst@f@r#1,{%
\def\@tempa{#1}%
\ifx\@tempa\@nnil\else\lst@forbody{#1}\expandafter\lst@f@r\fi
}
\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@ifmathescape
\lst@InsideConvert@e#1$\@nil
\lst@if
\lst@InsideConvert@ey#1\@nil
\else
\lst@InsideConvert@#1 \@empty
\expandafter\@gobbletwo
\fi
\expandafter\lst@next
\else
\lst@InsideConvert@#1 \@empty
\fi}
\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
\def\lst@InsideConvert@e#1$#2\@nil{%
\ifx\@empty#2\@empty \lst@false \else \lst@true \fi}
\def\lst@InsideConvert@ey#1$#2$#3\@nil{%
\lst@InsideConvert@#1 \@empty
\lst@lAddTo\lst@arg{%
\lst@ifdropinput\else
\lst@TrackNewLines\lst@OutputLostSpace \lst@XPrintToken
\setbox\@tempboxa=\hbox\bgroup$\lst@escapebegin
#2%
\lst@escapeend$\egroup \lst@CalcLostSpaceAndOutput
\lst@whitespacefalse
\fi}%
\def\lst@next{\lst@InsideConvert{#3}}%
}
\def\lst@XConvert{\@ifnextchar\bgroup \lst@XConvertArg\lst@XConvert@}
\def\lst@XConvertArg#1{%
{\lst@false \let\lst@arg\@empty
\lst@XConvert#1\@nil
\global\let\@gtempa\lst@arg}%
\lst@lExtend\lst@arg{\expandafter{\@gtempa}}%
\lst@XConvertNext}
\def\lst@XConvert@#1{%
\ifx\@nil#1\else
\begingroup\lccode`\~=`#1\lowercase{\endgroup
\lst@lAddTo\lst@arg~}%
\expandafter\lst@XConvertNext
\fi}
\def\lst@XConvertNext{%
\lst@if \expandafter\lst@XConvertX
\else \expandafter\lst@XConvert \fi}
\def\lst@XConvertX#1{%
\ifx\@nil#1\else
\lst@XConvertX@#1\relax
\expandafter\lst@XConvert
\fi}
\def\lst@XConvertX@#1#2\relax{%
\begingroup\lccode`\~=`#1\lowercase{\endgroup
\lst@XCConvertX@@~}{#2}}
\def\lst@XCConvertX@@#1#2{\lst@lAddTo\lst@arg{{#1#2}}}
\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. \@ehc}}%
{#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}
\def\lstKV@SwitchCases#1#2#3{%
\def\lst@temp##1\\#1&##2\\##3##4\@nil{%
\ifx\@empty##3%
#3%
\else
##2%
\fi
}%
\lst@temp\\#2\\#1&\\\@empty\@nil}
\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@EnterMode#1#2{%
\bgroup \lst@mode=#1\relax #2%
\lst@FontAdjust
\lst@lAddTo\lst@entermodes{\lst@EnterMode{#1}{#2}}}
\lst@AddToHook{InitVars}{\let\lst@entermodes\@empty}
\let\lst@entermodes\@empty % init
\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@modetrue{\let\lst@ifmode\iftrue \lsthk@ModeTrue}
\let\lst@ifmode\iffalse % init
\lst@AddToHook{ModeTrue}{}% init
\def\lst@Lmodetrue{\let\lst@ifLmode\iftrue}
\let\lst@ifLmode\iffalse % init
\lst@AddToHook{EOL}{\@whilesw \lst@ifLmode\fi \lst@LeaveMode}
\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}
\newbox\lst@gtempboxa
\newtoks\lst@token \newcount\lst@length
\def\lst@ResetToken{\lst@token{}\lst@length\z@}
\lst@AddToHook{InitVarsBOL}{\lst@ResetToken \let\lst@lastother\@empty}
\lst@AddToHook{EndGroup}{\lst@ResetToken \let\lst@lastother\@empty}
\def\lst@lettertrue{\let\lst@ifletter\iftrue}
\def\lst@letterfalse{\let\lst@ifletter\iffalse}
\lst@AddToHook{InitVars}{\lst@letterfalse}
\def\lst@Append#1{\advance\lst@length\@ne
\lst@token=\expandafter{\the\lst@token#1}}
\def\lst@AppendOther{%
\lst@ifletter \lst@Output\lst@letterfalse \fi
\futurelet\lst@lastother\lst@Append}
\def\lst@AppendLetter{%
\lst@ifletter\else \lst@OutputOther\lst@lettertrue \fi
\lst@Append}
\def\lst@SaveToken{%
\global\let\lst@gthestyle\lst@thestyle
\global\let\lst@glastother\lst@lastother
\xdef\lst@RestoreToken{\noexpand\lst@token{\the\lst@token}%
\noexpand\lst@length\the\lst@length\relax
\noexpand\let\noexpand\lst@thestyle
\noexpand\lst@gthestyle
\noexpand\let\noexpand\lst@lastother
\noexpand\lst@glastother}}
\def\lst@IfLastOtherOneOf#1{\lst@IfLastOtherOneOf@ #1\relax}
\def\lst@IfLastOtherOneOf@#1{%
\ifx #1\relax
\expandafter\@secondoftwo
\else
\ifx\lst@lastother#1%
\lst@IfLastOtherOneOf@t
\else
\expandafter\expandafter\expandafter\lst@IfLastOtherOneOf@
\fi
\fi}
\def\lst@IfLastOtherOneOf@t#1\fi\fi#2\relax{\fi\fi\@firstoftwo}
\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@CalcColumn{%
\@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\lst@lostspace.5\lst@lostspace \lst@Kern\lst@lostspace}
\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
\def\lst@temp{\PackageError{Listings}%
{Negative value(s) treated as zero}%
\@ehc}%
\let\lst@error\@empty
\ifdim \lst@widthfixed<\z@
\let\lst@error\lst@temp \let\lst@widthfixed\z@
\fi
\ifdim \lst@widthflexible<\z@
\let\lst@error\lst@temp \let\lst@widthflexible\z@
\fi
\lst@error}}
\lst@AddToHook{FontAdjust}
{\lst@width=\lst@ifflexible\lst@widthflexible
\else\lst@widthfixed\fi \relax}
\lst@Key{fontadjust}{false}[t]{\lstKV@SetIf{#1}\lst@iffontadjust}
\def\lst@FontAdjust{\lst@iffontadjust \lsthk@FontAdjust \fi}
\lst@AddToHook{InitVars}{\lsthk@FontAdjust}
\def\lst@OutputBox#1{\lst@alloverstyle{\box#1}}
\def\lst@alloverstyle#1{#1}% 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
\setbox\@tempboxa\hbox{\let\lst@OutputBox\box
\ifdim\lst@lostspace>\z@ \lst@leftinsert \fi
\box\@tempboxa
\ifdim\lst@lostspace>\z@ \lst@rightinsert \fi}%
\lst@OutputBox\@tempboxa \lsthk@PostOutput}
\lst@AddToHook{PostOutput}{}% init
\def\lst@OutputToken{%
\lst@TrackNewLines \lst@OutputLostSpace
\lst@ifgobbledws
\lst@gobbledwhitespacefalse
\lst@@discretionary
\fi
\lst@CheckMerge
{\lst@thestyle{\lst@FontAdjust
\setbox\@tempboxa\lst@hbox
{\lsthk@OutputBox
\lst@lefthss
\expandafter\lst@FillOutputBox\the\lst@token\@empty
\lst@righthss}%
\lst@CalcLostSpaceAndOutput}}%
\lst@ResetToken}
\lst@AddToHook{OutputBox}{}% init
\def\lst@gobbledwhitespacetrue{\global\let\lst@ifgobbledws\iftrue}
\def\lst@gobbledwhitespacefalse{\global\let\lst@ifgobbledws\iffalse}
\lst@AddToHookExe{InitBOL}{\lst@gobbledwhitespacefalse}% init
\def\lst@Delay#1{%
\lst@CheckDelay
#1%
\lst@GetOutputMacro\lst@delayedoutput
\edef\lst@delayed{\the\lst@token}%
\edef\lst@delayedlength{\the\lst@length}%
\lst@ResetToken}
\def\lst@Merge#1{%
\lst@CheckMerge
#1%
\edef\lst@merged{\the\lst@token}%
\edef\lst@mergedlength{\the\lst@length}%
\lst@ResetToken}
\def\lst@MergeToken#1#2{%
\advance\lst@length#2%
\lst@lExtend#1{\the\lst@token}%
\expandafter\lst@token\expandafter{#1}%
\let#1\@empty}
\def\lst@CheckDelay{%
\ifx\lst@delayed\@empty\else
\lst@GetOutputMacro\@gtempa
\ifx\lst@delayedoutput\@gtempa
\lst@MergeToken\lst@delayed\lst@delayedlength
\else
{\lst@ResetToken
\lst@MergeToken\lst@delayed\lst@delayedlength
\lst@delayedoutput}%
\let\lst@delayed\@empty
\fi
\fi}
\def\lst@CheckMerge{%
\ifx\lst@merged\@empty\else
\lst@MergeToken\lst@merged\lst@mergedlength
\fi}
\let\lst@delayed\@empty % init
\let\lst@merged\@empty % init
\def\lst@column@fixed{%
\lst@flexiblefalse
\lst@width\lst@widthfixed\relax
\let\lst@OutputLostSpace\lst@UseLostSpace
\let\lst@FillOutputBox\lst@FillFixed
\let\lst@hss\hss
\def\lst@hbox{\hbox to\lst@length\lst@width}}
\def\lst@FillFixed#1{#1\lst@FillFixed@}
\def\lst@FillFixed@#1{%
\ifx\@empty#1\else \lst@hss#1\expandafter\lst@FillFixed@ \fi}
\def\lst@column@flexible{%
\lst@flexibletrue
\lst@width\lst@widthflexible\relax
\let\lst@OutputLostSpace\lst@UseLostSpace
\let\lst@FillOutputBox\@empty
\let\lst@hss\@empty
\let\lst@hbox\hbox}
\def\lst@column@fullflexible{%
\lst@column@flexible
\def\lst@OutputLostSpace{\lst@ifnewline \lst@UseLostSpace\fi}%
\let\lst@leftinsert\@empty
\let\lst@rightinsert\@empty}
\def\lst@column@spaceflexible{%
\lst@column@flexible
\def\lst@OutputLostSpace{%
\lst@ifwhitespace
\ifx\lst@outputspace\lst@visiblespace
\else
\lst@UseLostSpace
\fi
\else
\lst@ifnewline \lst@UseLostSpace\fi
\fi}%
\let\lst@leftinsert\@empty
\let\lst@rightinsert\@empty}
\def\lst@outputpos#1#2\relax{%
\def\lst@lefthss{\lst@hss}\let\lst@righthss\lst@lefthss
\let\lst@rightinsert\lst@InsertLostSpace
\ifx #1c%
\let\lst@leftinsert\lst@InsertHalfLostSpace
\else\ifx #1r%
\let\lst@righthss\@empty
\let\lst@leftinsert\lst@InsertLostSpace
\let\lst@rightinsert\@empty
\else
\let\lst@lefthss\@empty
\let\lst@leftinsert\@empty
\ifx #1l\else \PackageWarning{Listings}%
{Unknown positioning for output boxes}%
\fi
\fi\fi}
\def\lst@flexibletrue{\let\lst@ifflexible\iftrue}
\def\lst@flexiblefalse{\let\lst@ifflexible\iffalse}
\lst@Key{columns}{[c]fixed}{\lstKV@OptArg[]{#1}{%
\ifx\@empty##1\@empty\else \lst@outputpos##1\relax\relax \fi
\expandafter\let\expandafter\lst@arg
\csname\@lst @column@##2\endcsname
\lst@arg
\ifx\lst@arg\relax
\PackageWarning{Listings}{Unknown column format `##2'}%
\else
\lst@ifflexible
\let\lst@columnsflexible\lst@arg
\else
\let\lst@columnsfixed\lst@arg
\fi
\fi}}
\let\lst@columnsfixed\lst@column@fixed % init
\let\lst@columnsflexible\lst@column@flexible % init