From 2da6563dfad4f724da1ebd92cb0f1fb3cd104a15 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 3 Jul 2020 11:31:29 +0200 Subject: readALine() und readAnAndorString() sind nun Funktionen -- workaround für regression in fpc-3.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epost.lps | 140 +++++++++++++++++++++++++++++----------------------------- epostunit.pas | 53 +++++++++++----------- werteunit.pas | 2 +- 3 files changed, 98 insertions(+), 97 deletions(-) diff --git a/epost.lps b/epost.lps index e162aa8..8badae8 100644 --- a/epost.lps +++ b/epost.lps @@ -7,9 +7,8 @@ - - - + + @@ -24,17 +23,18 @@ - - + + + - - + + @@ -42,8 +42,8 @@ - - + + @@ -75,8 +75,7 @@ - - + @@ -86,7 +85,7 @@ - + @@ -94,7 +93,7 @@ - + @@ -113,8 +112,8 @@ - - + + @@ -210,120 +209,123 @@ - + - - + + - - + + - - + + - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + + - - + + - - + + - - + + - - + + - - + + - - + + + - - + + - + diff --git a/epostunit.pas b/epostunit.pas index 628b627..71487b0 100644 --- a/epostunit.pas +++ b/epostunit.pas @@ -1923,19 +1923,19 @@ begin end; assignFile(f,dateien[i].name); reset(f,1); - readALine(f,s); + s:=readALine(f); if s<>'Andor Technology Multi-Channel File' then begin gibAus('Syntax-Fehler in '''+dateien[i].name+''': erkenne Andor Datei nicht ('+intToStr(filePos(f))+')!',3); closeFile(f); exit; end; - readALine(f,s); + s:=readALine(f); if s<>'65538 1' then begin gibAus('Syntax-Fehler in '''+dateien[i].name+''': diese Andor Datei hält der strengen Prüfung nicht stand ('+intToStr(filePos(f))+')!',3); closeFile(f); exit; end; - readALine(f,s); + s:=readALine(f); for j:=0 to 4 do erstesArgument(s,' ',false); try @@ -2002,14 +2002,13 @@ begin for j:=22 to 75 do erstesArgument(s,' ',false); try - readAnAndorString(f,(dateien[i] as tAndorInputDateiInfo).detektorTyp,strToInt64(s),true); + (dateien[i] as tAndorInputDateiInfo).detektorTyp:=readAnAndorString(f,strToInt64(s),true); except gibAus('Syntax-Fehler in '''+dateien[i].name+''': Detektor-String nicht lesbar ('+intToStr(filePos(f))+')!',3); closeFile(f); exit; end; - readALine(f,s); - s:=trim(s); + s:=trim(readALine(f)); try (dateien[i] as tAndorInputDateiInfo).detektorGroesze['x']:=strToInt64(erstesArgument(s,' ',false)); (dateien[i] as tAndorInputDateiInfo).detektorGroesze['y']:=strToInt64(erstesArgument(s,' ',false)); @@ -2023,7 +2022,7 @@ begin dateien[i].tStop:=(dateien[i] as tAndorInputDateiInfo).detektorGroesze['y']-1; end; try - readAnAndorString(f,(dateien[i] as tAndorInputDateiInfo).dateiName,strToInt64(s),true); + (dateien[i] as tAndorInputDateiInfo).dateiName:=readAnAndorString(f,strToInt64(s),true); except gibAus('Syntax-Fehler in '''+dateien[i].name+''': originaler Dateiname nicht lesbar ('+intToStr(filePos(f))+')!',3); closeFile(f); @@ -2031,11 +2030,11 @@ begin end; if extractFileName((dateien[i] as tAndorInputDateiInfo).dateiName) <> extractFileName(dateien[i].name) then gibAus('Warnung in '''+dateien[i].name+''': interner Name ist '''+extractFileName((dateien[i] as tAndorInputDateiInfo).dateiName)+'''.',3); - readALine(f,s); + s:=readALine(f); erstesArgument(s); seek(f,filePos(f)+strToInt64(s)); for j:=0 to 2 do - readALine(f,s); + s:=readALine(f); for j:=0 to 3 do erstesArgument(s,' ',false); try @@ -2047,7 +2046,7 @@ begin exit; end; for j:=0 to (dateien[i] as tAndorInputDateiInfo).detectorSkipLines do - readALine(f,s); + s:=readALine(f); try dateien[i].xStart:=strToFloat(erstesArgument(s,' ',false)); except @@ -2064,18 +2063,18 @@ begin exit; end; for j:=1 to (dateien[i] as tAndorInputDateiInfo).detectorSkipLines2 do - readALine(f,s); + s:=readALine(f); try - readAnAndorString(f,(dateien[i] as tAndorInputDateiInfo).xAchsenTitel,false); - readAnAndorString(f,(dateien[i] as tAndorInputDateiInfo).datenTypTitel,false); - readAnAndorString(f,(dateien[i] as tAndorInputDateiInfo).yAchsenTitel,false); + (dateien[i] as tAndorInputDateiInfo).xAchsenTitel:=readAnAndorString(f,false); + (dateien[i] as tAndorInputDateiInfo).datenTypTitel:=readAnAndorString(f,false); + (dateien[i] as tAndorInputDateiInfo).yAchsenTitel:=readAnAndorString(f,false); except gibAus('Syntax-Fehler in '''+dateien[i].name+''': Achsenbeschriftung nicht lesbar ('+intToStr(filePos(f))+')!',3); closeFile(f); exit; end; - readALine(f,s); - readALine(f,t); + s:=readALine(f); + t:=readALine(f); splitStrToInt(s+' '+t,iArr); if (iArr[0]<>65541) or (iArr[9]<>65538) or (iArr[16]<>0) then begin gibAus('Syntax-Fehler in '''+dateien[i].name+''': inkonsistenter Kopf ('+intToStr(filePos(f))+'): '+intArrayToStr(iArr),3); @@ -2122,13 +2121,13 @@ begin exit; end; while j>=0 do begin - readAnAndorString(f,s,false); // labels + s:=readAnAndorString(f,false); // labels dec(j); end; (dateien[i] as tAndorInputDateiInfo).datenStart:=filePos(f); seek(f,(dateien[i] as tAndorInputDateiInfo).datenStart+dateien[i].xSteps*dateien[i].tSiz*sizeOf(single)); try - readAnAndorString(f,s,false); + s:=readAnAndorString(f,false); except s:='falsch'; end; @@ -2137,26 +2136,26 @@ begin closeFile(f); exit; end; - readALine(f,s); + s:=readALine(f); (dateien[i] as tAndorInputDateiInfo).hatHintergrund:=s='1'; // es kommen noch Daten if (dateien[i] as tAndorInputDateiInfo).hatHintergrund then begin // wir überspringen den Header und hoffen, dass der mit dem anderen übereinstimmt (was er nicht muss!) for j:=0 to 4 do - readALine(f,s); + s:=readALine(f); erstesArgument(s); seek(f,filePos(f)+strToInt64(s)); for j:=0 to 3 + (dateien[i] as tAndorInputDateiInfo).detectorSkipLines + (dateien[i] as tAndorInputDateiInfo).detectorSkipLines2 do - readALine(f,s); + readALine(f); for j:=0 to 2 do - readAnAndorString(f,s,false); + readAnAndorString(f,false); for j:=0 to 1 do - readALine(f,s); + readALine(f); for j:=0 to 1 do - readAnAndorString(f,s,false); + readAnAndorString(f,false); (dateien[i] as tAndorInputDateiInfo).hintergrundStart:=filePos(f); seek(f,(dateien[i] as tAndorInputDateiInfo).hintergrundStart+dateien[i].xSteps*dateien[i].tSiz*sizeOf(single)); try - readAnAndorString(f,s,false); + s:=readAnAndorString(f,false); except s:='falsch'; end; @@ -2165,14 +2164,14 @@ begin closeFile(f); exit; end; - readALine(f,s); + s:=readALine(f); if s<>'0' then begin gibAus('Syntax-Fehler in '''+dateien[i].name+''': hier gibt es zusätzlich zum Hintergrund und den Daten noch mehr (eine Referenz?) - das versteh ich (noch) nicht ('+intToStr(filePos(f))+').',3); closeFile(f); exit; end; if not eof(f) then begin - readALine(f,s); + s:=readALine(f); if s<>'' then begin gibAus('Syntax-Fehler in '''+dateien[i].name+''': Nach dem Hintergrund kommen noch unerwartete Daten: '''+s+''' ('+intToStr(filePos(f))+'/'+intToStr(fileSize(f))+').',3); closeFile(f); diff --git a/werteunit.pas b/werteunit.pas index e4e79e3..9ffa8cd 100644 --- a/werteunit.pas +++ b/werteunit.pas @@ -687,7 +687,7 @@ begin end; end{of case}; try - readAnAndorString(f,s,false); + s:=readAnAndorString(f,false); except s:='falsch'; end; -- cgit v1.2.3-54-g00ecf