diff --git a/entries/sbalazs/src/uweatherstations.pas b/entries/sbalazs/src/uweatherstations.pas index a01df4f..9a19d25 100644 --- a/entries/sbalazs/src/uweatherstations.pas +++ b/entries/sbalazs/src/uweatherstations.pas @@ -4,6 +4,8 @@ {$R-} {$Q-} {$INLINE ON} +{$define LFONLY} + interface uses @@ -314,7 +316,9 @@ procedure TWSThread.ProcessBytes(ABytes: TBytes); Temp := Temp*10 + Ord(ABytes[PCur]) - Ord('0'); if IsNeg then Temp := -Temp; + {$IFNDEF LFONLY} Inc(PCur); + {$ENDIF} DoTemp := False; end; if ABytes[PCur] = 59 then @@ -552,8 +556,13 @@ procedure TWSThreadsWatcher.Execute; if Size > High(LongInt) then Size := High(LongInt) - 100; StartP := FS.Position; - FS.Position :=FS.Position + Size; + FS.Position := FS.Position + Size; + {$IFNDEF LFONLY} GetNextLineBreak(FS); + {$ELSE} + while (FS.Position < FS.Size) and (FS.ReadByte <> 10) do + FS.Seek(1, soCurrent); + {$ENDIF} EndP := FS.Position; WSThread := TWSThread.Create(StartP, EndP, FWSManager); WSThread.Start;