mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 18:06:12 +02:00
* Allow to set the write buffer size (enlarged to 4k)
git-svn-id: trunk@23468 -
This commit is contained in:
parent
5d74e0578a
commit
58a6886ed3
@ -72,7 +72,7 @@ type
|
||||
procedure VisitDocumentType(Node: TDOMNode);
|
||||
procedure VisitPI(Node: TDOMNode);
|
||||
public
|
||||
constructor Create(AStream: TStream);
|
||||
constructor Create(AStream: TStream; ACapacity : Cardinal = 4096);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
@ -111,14 +111,14 @@ end;
|
||||
THTMLWriter
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
constructor THTMLWriter.Create(AStream: TStream);
|
||||
constructor THTMLWriter.Create(AStream: TStream; ACapacity : Cardinal = 4096);
|
||||
begin
|
||||
inherited Create;
|
||||
FStream := AStream;
|
||||
// some overhead - always be able to write at least one extra UCS4
|
||||
FBuffer := AllocMem(512+32);
|
||||
FCapacity := ACapacity;
|
||||
FBuffer := AllocMem(FCapacity+32);
|
||||
FBufPos := FBuffer;
|
||||
FCapacity := 512;
|
||||
// Later on, this may be put under user control
|
||||
// for now, take OS setting
|
||||
FLineBreak := sLineBreak;
|
||||
|
Loading…
Reference in New Issue
Block a user