diff --git a/entries/laksen/src/laksen.lpr b/entries/laksen/src/laksen.lpr index 0e1bee5..c049109 100644 --- a/entries/laksen/src/laksen.lpr +++ b/entries/laksen/src/laksen.lpr @@ -2,6 +2,8 @@ {$mode objfpc}{$h+} +{$define LFONLY} + uses cthreads, SysUtils, @@ -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 @@ -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; @@ -482,4 +486,4 @@ TParser = class p.Parse(threads); p.Dump(); p.Free; -end. +end. \ No newline at end of file diff --git a/entries/sbalazs/src/obrc.lpr b/entries/sbalazs/src/obrc.lpr index 95d21a8..6833794 100644 --- a/entries/sbalazs/src/obrc.lpr +++ b/entries/sbalazs/src/obrc.lpr @@ -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;