File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 22
33{ $mode objfpc}{ $h+}
44
5+ { $define LFONLY}
6+
57uses
68 cthreads,
79 SysUtils,
@@ -212,15 +214,17 @@ TParser = class
212214 ptr := @pbyte(@ABuffer)[offset];
213215 lineEnd := IndexChar(ptr^, remainder, #$A);
214216
217+ { $IFNDEF LFONLY}
215218 // Mark EOL
216219 ptr[lineEnd-1 ] := 0 ;
220+ { $ENDIF}
217221
218222 // Find delimiter and add null terminator
219- delim := IndexChar(ptr^, lineEnd-2 , ' ;' );
223+ delim := IndexChar(ptr^, lineEnd-{ $IFNDEF LFONLY } 2 { $ELSE } 1 { $ENDIF } , ' ;' );
220224 ptr[delim] := 0 ;
221225
222226 tempStart := PChar(@ptr[delim+1 ]);
223- tempLen := lineEnd-2 -delim;
227+ tempLen := lineEnd-{ $IFNDEF LFONLY } 2 { $ELSE } 1 { $ENDIF } -delim;
224228 tempNeg := False;
225229
226230 if tempStart^ = ' -' then
@@ -294,7 +298,7 @@ TParser = class
294298
295299 function AsNum (AValue, ACount: longint): string;
296300 begin
297- Result := formatfloat(' 0.0' , RoundExDouble(AValue/ACount)/ 10 );
301+ Result := formatfloat(' 0.0' , RoundExDouble(AValue/( ACount * 10 )) );
298302 end ;
299303
300304 procedure TParser.Dump ;
@@ -482,4 +486,4 @@ TParser = class
482486 p.Parse(threads);
483487 p.Dump();
484488 p.Free;
485- end .
489+ end .
You can’t perform that action at this time.
0 commit comments