File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
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 .
Original file line number Diff line number Diff line change 2929
3030 if (Trim(ParamStr(2 )) <> ' ' ) then
3131 begin
32- TC := StrToIntDef(ParamStr(2 ), 16 );
33- if TC < 16 then
34- TC := 16 ;
32+ TC := StrToIntDef(ParamStr(2 ), 8 );
33+ if TC < 8 then
34+ TC := 8 ;
3535 end
3636 else
37- TC := 16 ;
37+ TC := 8 ;
3838
3939 FWSManager := TWSManager.Create(ParamStr(1 ), TC);
4040 FWSManager.WSThreadsWatcher.Start;
You can’t perform that action at this time.
0 commit comments