summaryrefslogtreecommitdiff
path: root/romunit.pas
diff options
context:
space:
mode:
Diffstat (limited to 'romunit.pas')
-rw-r--r--romunit.pas14
1 files changed, 14 insertions, 0 deletions
diff --git a/romunit.pas b/romunit.pas
index 8d48b62..5e1bf79 100644
--- a/romunit.pas
+++ b/romunit.pas
@@ -30,6 +30,7 @@ procedure fft(var dat: tExtPointArray);
procedure interpoliere(var dat: tExtPointArray);
procedure normiere(var dat: tExtPointArray);
procedure berechneRefPuls(inPuls,surTraj: tExtPointArray; betaGlaette: longint; betaBound: extended; out cRefPuls: tExtPointArray);
+function shellSubst(s: string): string;
type
tSortThread = class(tThread)
@@ -1015,6 +1016,19 @@ begin
setlength(cRefPuls,anz);
end;
+function shellSubst(s: string): string;
+var name: string;
+begin
+ result:=s;
+ while pos('${',result)>0 do begin
+ s:=leftStr(result,pos('${',result)-1);
+ delete(result,1,pos('${',result)-1+length('${'));
+ name:=leftStr(result,pos('}',result)-1);
+ delete(result,1,length(name+'}'));
+ result:=s+GetEnvironmentVariable(name)+result;
+ end;
+end;
+
// tSortThread *****************************************************************
constructor tSortThread.create(pd: pTExtPointArray; sta, sto: longint);