diff options
Diffstat (limited to 'mystringlistunit.pas')
-rw-r--r-- | mystringlistunit.pas | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mystringlistunit.pas b/mystringlistunit.pas index 7b91f75..3f49b0b 100644 --- a/mystringlistunit.pas +++ b/mystringlistunit.pas @@ -32,8 +32,7 @@ type function stillNeed(bez: string): boolean; function needInLine(bez: string; lin: longint): boolean; procedure insert(index: longint; const s: ansistring); override; - function unfoldMacros: boolean; overload; inline; - function unfoldMacros(kvs: tKnownValues; cbgv: tCallBackGetValue): boolean; overload; + function unfoldMacros(kvs: tKnownValues = nil; cbgv: tCallBackGetValue = nil): boolean; procedure subst(regex,ersatz: string); procedure dump(pro: tProtokollant; prefix: string); procedure nichtInSubRoutine(s: string); @@ -248,11 +247,6 @@ begin if index<=line then inc(line); end; -function tMyStringlist.unfoldMacros: boolean; -begin - result:=unfoldMacros(nil,nil); -end; - function tMyStringlist.unfoldMacros(kvs: tKnownValues; cbgv: tCallBackGetValue): boolean; var i,j,k,l,Ebene: longint; @@ -315,7 +309,14 @@ begin end; inc(i); end; - if wasGefunden then continue; + + for i:=0 to count-1 do begin // Shellvariablen auswerten + s:=shellExpand(self[i]); + if s<>self[i] then begin + wasGefunden:=true; + self[i]:=s; + end; + end; i:=count-1; while i>=0 do begin // Substitutionen auswerten @@ -392,7 +393,7 @@ begin s:=trim(s); while length(s)>0 do begin // Schleifenzähler laufen lassen - u:=erstesArgument(s); + u:=unEscape(erstesArgument(s)); for j:=0 to SchleifenInhalt.Count-1 do begin // Schleifenkörper ... v:=SchleifenInhalt[j]; k:=length(v); |