mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 03:59:37 +02:00
* make StdOut/StdErr optionally a true alias of Output/ErrOutput, so they share the same underlying TextRec. this reduces data segment usage on small systems by more than 1K.
git-svn-id: trunk@38196 -
This commit is contained in:
parent
980c689d37
commit
07513150e0
@ -1012,10 +1012,12 @@ begin
|
|||||||
Flush(Output);
|
Flush(Output);
|
||||||
if Textrec(ErrOutput).Mode=fmOutput then
|
if Textrec(ErrOutput).Mode=fmOutput then
|
||||||
Flush(ErrOutput);
|
Flush(ErrOutput);
|
||||||
|
{$ifndef FPC_STDOUT_TRUE_ALIAS}
|
||||||
if Textrec(stdout).Mode=fmOutput then
|
if Textrec(stdout).Mode=fmOutput then
|
||||||
Flush(stdout);
|
Flush(stdout);
|
||||||
if Textrec(StdErr).Mode=fmOutput then
|
if Textrec(StdErr).Mode=fmOutput then
|
||||||
Flush(StdErr);
|
Flush(StdErr);
|
||||||
|
{$endif FPC_STDOUT_TRUE_ALIAS}
|
||||||
end;
|
end;
|
||||||
{$endif FPC_HAS_FEATURE_CONSOLEIO}
|
{$endif FPC_HAS_FEATURE_CONSOLEIO}
|
||||||
|
|
||||||
|
@ -766,9 +766,18 @@ Var
|
|||||||
{ Standard In- and Output }
|
{ Standard In- and Output }
|
||||||
ErrOutput,
|
ErrOutput,
|
||||||
Output,
|
Output,
|
||||||
Input,
|
Input : Text;
|
||||||
|
{$ifndef FPC_STDOUT_TRUE_ALIAS}
|
||||||
StdOut,
|
StdOut,
|
||||||
StdErr : Text;
|
StdErr : Text;
|
||||||
|
{$else FPC_STDOUT_TRUE_ALIAS}
|
||||||
|
{ Optionally, make StdOut and StdErr a true alias of Output
|
||||||
|
and ErrOutput. This is benefical on small systems where the
|
||||||
|
data segment size is limited, as it lessens the RTL's data
|
||||||
|
size by a bit more than 1K. }
|
||||||
|
StdOut : Text Absolute Output;
|
||||||
|
StdErr : Text Absolute ErrOutput;
|
||||||
|
{$endif FPC_STDOUT_TRUE_ALIAS}
|
||||||
InOutRes : Word;
|
InOutRes : Word;
|
||||||
{ Stack checking }
|
{ Stack checking }
|
||||||
StackBottom : Pointer;
|
StackBottom : Pointer;
|
||||||
|
Loading…
Reference in New Issue
Block a user