Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions entries/laksen/src/laksen.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

{$mode objfpc}{$h+}

{$define LFONLY}

uses
cthreads,
SysUtils,
Expand Down Expand Up @@ -212,15 +214,17 @@ TParser = class
ptr := @pbyte(@ABuffer)[offset];
lineEnd := IndexChar(ptr^, remainder, #$A);

{$IFNDEF LFONLY}
// Mark EOL
ptr[lineEnd-1] := 0;
{$ENDIF}

// Find delimiter and add null terminator
delim := IndexChar(ptr^, lineEnd-2, ';');
delim := IndexChar(ptr^, lineEnd-{$IFNDEF LFONLY}2{$ELSE}1{$ENDIF}, ';');
ptr[delim] := 0;

tempStart := PChar(@ptr[delim+1]);
tempLen := lineEnd-2-delim;
tempLen := lineEnd-{$IFNDEF LFONLY}2{$ELSE}1{$ENDIF}-delim;
tempNeg := False;

if tempStart^ = '-' then
Expand Down Expand Up @@ -294,7 +298,7 @@ TParser = class

function AsNum(AValue, ACount: longint): string;
begin
Result := formatfloat('0.0', RoundExDouble(AValue/ACount)/10);
Result := formatfloat('0.0', RoundExDouble(AValue/(ACount * 10)));
end;

procedure TParser.Dump;
Expand Down Expand Up @@ -482,4 +486,4 @@ TParser = class
p.Parse(threads);
p.Dump();
p.Free;
end.
end.
8 changes: 4 additions & 4 deletions entries/sbalazs/src/obrc.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@

if (Trim(ParamStr(2)) <> '') then
begin
TC := StrToIntDef(ParamStr(2), 16);
if TC < 16 then
TC := 16;
TC := StrToIntDef(ParamStr(2), 8);
if TC < 8 then
TC := 8;
end
else
TC := 16;
TC := 8;

FWSManager := TWSManager.Create(ParamStr(1), TC);
FWSManager.WSThreadsWatcher.Start;
Expand Down