summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-23 09:17:13 +0200
committerErich Eckner <git@eckner.net>2018-05-23 09:17:13 +0200
commit24261adb0ff5b4ee1a1250930b1dc6032f3fb47b (patch)
tree53fcbd6da6c02d5128096128d0454c1371489867
parenta36f632ed5e56196b64e8db410a9d396acf90970 (diff)
downloadMake-24261adb0ff5b4ee1a1250930b1dc6032f3fb47b.tar.xz
escape-Funktionen nach units/lowlevelunit.pas ausgelagert
-rw-r--r--Make.lps103
-rw-r--r--dateibeziehungen.pas2
-rw-r--r--tools.pas38
3 files changed, 51 insertions, 92 deletions
diff --git a/Make.lps b/Make.lps
index 658fae9..55cb9cc 100644
--- a/Make.lps
+++ b/Make.lps
@@ -22,8 +22,8 @@
<Filename Value="tools.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="5"/>
- <TopLine Value="85"/>
- <CursorPos X="93" Y="16"/>
+ <TopLine Value="59"/>
+ <CursorPos Y="68"/>
<UsageCount Value="107"/>
<Loaded Value="True"/>
</Unit2>
@@ -42,9 +42,9 @@
<UnitName Value="dateiBeziehungen"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
- <TopLine Value="369"/>
- <CursorPos X="63" Y="561"/>
- <FoldState Value=" T3kL03C pkIl80B4]95kQ0l222n"/>
+ <TopLine Value="223"/>
+ <CursorPos X="30" Y="496"/>
+ <FoldState Value=" T3kL03C pkIl80B41222/"/>
<UsageCount Value="96"/>
<Loaded Value="True"/>
</Unit4>
@@ -63,8 +63,8 @@
<Unit7>
<Filename Value="../units/lowlevelunit.pas"/>
<EditorIndex Value="4"/>
- <TopLine Value="13"/>
- <CursorPos X="5" Y="47"/>
+ <TopLine Value="142"/>
+ <CursorPos X="24" Y="162"/>
<UsageCount Value="31"/>
<Loaded Value="True"/>
</Unit7>
@@ -149,122 +149,119 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="298" Column="35" TopLine="279"/>
+ <Caret Line="1251" Column="11" TopLine="1237"/>
</Position1>
<Position2>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1238" TopLine="1203"/>
+ <Caret Line="1255" Column="58" TopLine="1237"/>
</Position2>
<Position3>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1241" Column="34" TopLine="1203"/>
+ <Caret Line="1258" Column="20" TopLine="1238"/>
</Position3>
<Position4>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="137" Column="23" TopLine="118"/>
+ <Caret Line="269" Column="81" TopLine="269"/>
</Position4>
<Position5>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1249" Column="14" TopLine="1231"/>
</Position5>
<Position6>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1251" Column="15" TopLine="1233"/>
+ <Filename Value="tools.pas"/>
+ <Caret Line="240" TopLine="219"/>
</Position6>
<Position7>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="129" Column="18" TopLine="120"/>
+ <Caret Line="239" TopLine="206"/>
</Position7>
<Position8>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="137" Column="34" TopLine="120"/>
+ <Filename Value="tools.pas"/>
+ <Caret Line="681" Column="49" TopLine="673"/>
</Position8>
<Position9>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="238" Column="11" TopLine="169"/>
+ <Filename Value="tools.pas"/>
+ <Caret Line="727" Column="78" TopLine="710"/>
</Position9>
<Position10>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="137" Column="129" TopLine="109"/>
+ <Caret Line="674" Column="68" TopLine="665"/>
</Position10>
<Position11>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="272" Column="104" TopLine="255"/>
+ <Caret Line="1242" Column="158" TopLine="1217"/>
</Position11>
<Position12>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1237" Column="9" TopLine="1205"/>
+ <Caret Line="108" Column="28" TopLine="90"/>
</Position12>
<Position13>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1253" Column="19" TopLine="1235"/>
+ <Caret Line="1042" TopLine="1017"/>
</Position13>
<Position14>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1251" Column="6" TopLine="1236"/>
+ <Caret Line="77" Column="26" TopLine="60"/>
</Position14>
<Position15>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1254" Column="20" TopLine="1236"/>
+ <Filename Value="tools.pas"/>
+ <Caret Line="86" Column="55" TopLine="67"/>
</Position15>
<Position16>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1251" Column="11" TopLine="1237"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="148" Column="120" TopLine="124"/>
</Position16>
<Position17>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1255" Column="58" TopLine="1237"/>
+ <Filename Value="tools.pas"/>
+ <Caret Line="579" Column="90" TopLine="564"/>
</Position17>
<Position18>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1258" Column="20" TopLine="1238"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="1330" Column="31" TopLine="1316"/>
</Position18>
<Position19>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="269" Column="81" TopLine="269"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="164" TopLine="145"/>
</Position19>
<Position20>
- <Filename Value="dateibeziehungen.pas"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="162" Column="18" TopLine="144"/>
</Position20>
<Position21>
- <Filename Value="tools.pas"/>
- <Caret Line="240" TopLine="219"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
</Position21>
<Position22>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="239" TopLine="206"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="162" Column="18" TopLine="133"/>
</Position22>
<Position23>
- <Filename Value="tools.pas"/>
- <Caret Line="681" Column="49" TopLine="673"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="1315" Column="102" TopLine="1303"/>
</Position23>
<Position24>
- <Filename Value="tools.pas"/>
- <Caret Line="727" Column="78" TopLine="710"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
</Position24>
<Position25>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="674" Column="68" TopLine="665"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="163" Column="65" TopLine="133"/>
</Position25>
<Position26>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1242" Column="158" TopLine="1217"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="120" Column="18" TopLine="108"/>
</Position26>
<Position27>
- <Filename Value="Make.lpr"/>
- <Caret Line="3" TopLine="51"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="869" Column="18" TopLine="870"/>
</Position27>
<Position28>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="108" Column="28" TopLine="90"/>
+ <Filename Value="../units/lowlevelunit.pas"/>
+ <Caret Line="1331" Column="10" TopLine="1320"/>
</Position28>
<Position29>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1042" TopLine="1017"/>
+ <Caret Line="563" Column="92" TopLine="365"/>
</Position29>
<Position30>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="77" Column="26" TopLine="60"/>
</Position30>
</JumpHistory>
</ProjectSession>
diff --git a/dateibeziehungen.pas b/dateibeziehungen.pas
index ebcc892..7bd4560 100644
--- a/dateibeziehungen.pas
+++ b/dateibeziehungen.pas
@@ -493,7 +493,7 @@ begin
if pos('{',zielFkt)=0 then begin
if not quellErsetzung(zielFkt,rtKein,quellen,quellen.count) then exit;
if pos('*',zielFkt)=0 then begin
- zielFkt:=unescape(zielFkt);
+ zielFkt:=unEscapeCommas(zielFkt);
ziele.add(_dats.finde(zielFkt,result));
end
else begin
diff --git a/tools.pas b/tools.pas
index 032e3a7..599fc1c 100644
--- a/tools.pas
+++ b/tools.pas
@@ -9,7 +9,6 @@ uses
type
tAktualitaet = (aNichtVorhanden,aVeraltet,aAktuell,aWirdErneuert);
- tRegexTyp = (rtKein,rtFpc,rtShell);
tMyStringListBArray = array[boolean] of tMyStringList;
tSummenDatei = record
name: string;
@@ -66,9 +65,6 @@ function notQuotedPos(was,worin: string): longint;
function unEscapedPos(was,worin: string): longint;
procedure testeObBefehlLokal(bef, ordner: string; dateiListe: tMyStringList; lokTest: tRegExpr);
function extrahiereAlleDateien(woraus: string; dateiListe: tMyStringList): tMyStringList;
-function unescape(s: string): string;
-function escape(s,toe,es: string): string;
-function escapeStringToRegex(s: string; typ: tRegexTyp; extras: string = ''): string; inline;
procedure ersetzeAlleVorkommen(var worin: string; was,wodurch: string);
function unterVerzeichnisRegex(dateien: array of const): string;
function vergleicheNamenVonDateienMitDaten(item1,item2: pointer): integer;
@@ -592,40 +588,6 @@ begin
end;
end;
-function unescape(s: string): string;
-begin
- result:=s;
- while pos('\,',result)>0 do
- delete(result,pos('\,',result),1);
-end;
-
-function escape(s,toe,es: string): string;
-var
- i,j: longint;
- b: boolean;
-begin
- result:='';
- for i:=1 to length(s) do begin
- b:=false;
- for j:=1 to length(toe) do
- b:=b or (toe[j]=s[i]);
- if b then result:=result+es;
- result:=result+s[i];
- end;
-end;
-
-function escapeStringToRegex(s: string; typ: tRegexTyp; extras: string = ''): string;
-begin
- case typ of
- rtKein:
- result:=s;
- rtFpc:
- result:=escape(s,'\.[+^$'+extras,'\');
- rtShell:
- result:=escape(s,'\.[^$'+extras,'\');
- end{of case};
-end;
-
procedure ersetzeAlleVorkommen(var worin: string; was,wodurch: string);
begin
while pos(was,worin)>0 do begin