From b6c02297232cf270bf7e9e884944090f3ccf1b34 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 7 Feb 2018 14:36:42 +0100 Subject: tools.pas: testeSummen verwirft nun stderr, sodass "sha512sum -c" auch funktioniert, wenn viele Fehler auftreten --- Make.lps | 133 +++++++++++++++++++++++++++++++------------------------------- tools.pas | 17 +++++--- 2 files changed, 78 insertions(+), 72 deletions(-) diff --git a/Make.lps b/Make.lps index c006a4b..0417b99 100644 --- a/Make.lps +++ b/Make.lps @@ -7,33 +7,34 @@ - - - + + + - + - - - + + + + - - - + + + @@ -42,10 +43,10 @@ - - - - + + + + @@ -63,9 +64,9 @@ - + - + @@ -104,9 +105,9 @@ - - - + + + @@ -142,122 +143,122 @@ - + - + - + - + - - + + - - - + + - - + + - - + + - + - - + + - - + + - + + - - + + - - + + - + - + - + - + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/tools.pas b/tools.pas index 9d2a0dd..b9df964 100644 --- a/tools.pas +++ b/tools.pas @@ -58,7 +58,7 @@ function dateienMitGueltigerSumme(sumNam: string): tMyStringList; implementation uses - lowlevelunit; + lowlevelunit, math; // tDateienMitDaten ************************************************************ @@ -489,11 +489,12 @@ var function testeSummen(sumNam: string): tMyStringListBArray; var - p: tProcess; - rb,i: longint; - s: string; - erg: tStringList; - gut: boolean; + p: tProcess; + rb,i: longint; + s: string; + erg: tStringList; + gut: boolean; + dummy: array of byte; const leseHappen=65536; begin for i:=0 to length(summenVorrat)-1 do @@ -513,7 +514,11 @@ begin p.execute; rb:=0; s:=''; + setLength(dummy,1024); + fillchar(dummy[0],length(dummy),0); while p.running do begin + while p.stderr.numBytesAvailable>0 do + p.stderr.read(dummy[0],min(length(dummy),p.stderr.numBytesAvailable)); if p.output.numBytesAvailable=0 then sleep(10) else begin setLength(s,rb+leseHappen); -- cgit v1.2.3-70-g09d2