mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 18:08:08 +02:00
ErrOutput added
This commit is contained in:
parent
1eea332449
commit
dbc2025604
@ -508,6 +508,7 @@ begin
|
||||
StdErrorHandle:=2;
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
end;
|
||||
@ -538,7 +539,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.17 2004-10-25 15:38:59 peter
|
||||
Revision 1.18 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.17 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.16 2004/09/18 11:18:44 hajny
|
||||
|
@ -60,7 +60,7 @@ function geterrnolocation: Plibcint; cdecl;external clib name '__error';
|
||||
{$else}
|
||||
{$ifdef NetBSD} // from a sparc dump.
|
||||
function geterrnolocation: Plibcint; cdecl;external clib name '__errno';
|
||||
{$else}
|
||||
{$else}
|
||||
{$ifdef Darwin}
|
||||
function geterrnolocation: Plibcint; cdecl;external clib name '__error';
|
||||
{$else}
|
||||
@ -117,7 +117,7 @@ end;
|
||||
{$I system.inc}
|
||||
|
||||
{*****************************************************************************
|
||||
OS Memory allocation / deallocation
|
||||
OS Memory allocation / deallocation
|
||||
****************************************************************************}
|
||||
|
||||
{ OS dependant parts }
|
||||
@ -161,6 +161,7 @@ procedure SysInitStdIO;
|
||||
begin
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
end;
|
||||
@ -208,12 +209,15 @@ Begin
|
||||
ThreadID := 1;
|
||||
{$ifdef HASVARIANT}
|
||||
initvariantmanager;
|
||||
{$endif HASVARIANT}
|
||||
{$endif HASVARIANT}
|
||||
End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.19 2004-07-17 15:31:03 jonas
|
||||
Revision 1.20 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.19 2004/07/17 15:31:03 jonas
|
||||
* initialise StackLength (fixes stack checking in general, and tw2897 in
|
||||
particular)
|
||||
|
||||
|
@ -1167,6 +1167,7 @@ begin
|
||||
*)
|
||||
OpenStdIO (Input, fmInput, StdInputHandle);
|
||||
OpenStdIO (Output, fmOutput, StdOutputHandle);
|
||||
OpenStdIO (ErrOutput, fmOutput, StdErrorHandle);
|
||||
OpenStdIO (StdOut, fmOutput, StdOutputHandle);
|
||||
OpenStdIO (StdErr, fmOutput, StdErrorHandle);
|
||||
(*
|
||||
@ -1321,7 +1322,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.29 2004-10-25 15:38:59 peter
|
||||
Revision 1.30 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.29 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.28 2004/09/18 11:12:49 hajny
|
||||
|
@ -1549,6 +1549,7 @@ procedure SysInitStdIO;
|
||||
begin
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
end;
|
||||
@ -1602,7 +1603,10 @@ Begin
|
||||
End.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.42 2004-11-02 13:35:35 peter
|
||||
Revision 1.43 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.42 2004/11/02 13:35:35 peter
|
||||
* second try for data too large
|
||||
|
||||
Revision 1.41 2004/11/02 07:43:50 peter
|
||||
|
@ -358,6 +358,7 @@ Var
|
||||
{$endif SUPPORT_THREADVAR}
|
||||
ThreadID : SizeUInt;
|
||||
{ Standard In- and Output }
|
||||
ErrOutput,
|
||||
Output,
|
||||
Input,
|
||||
StdOut,
|
||||
@ -769,7 +770,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.105 2004-10-30 20:49:10 marco
|
||||
Revision 1.106 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.105 2004/10/30 20:49:10 marco
|
||||
* arraytostring added
|
||||
|
||||
Revision 1.104 2004/10/14 17:39:33 florian
|
||||
|
@ -102,7 +102,7 @@ function fpgetcwd(buf:pchar;_size:size_t):pchar; cdecl; external name 'getcwd';
|
||||
{$I osmain.inc} // base wrappers *nix RTL (derivatives)
|
||||
|
||||
{*****************************************************************************
|
||||
OS Memory allocation / deallocation
|
||||
OS Memory allocation / deallocation
|
||||
****************************************************************************}
|
||||
|
||||
function SysOSAlloc(size: ptrint): pointer;
|
||||
@ -139,6 +139,7 @@ procedure SysInitStdIO;
|
||||
begin
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
end;
|
||||
@ -184,7 +185,10 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.18 2004-07-09 22:31:22 peter
|
||||
Revision 1.19 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.18 2004/07/09 22:31:22 peter
|
||||
* fixed execpathstr setting
|
||||
|
||||
Revision 1.17 2004/07/08 21:22:15 daniel
|
||||
|
@ -1106,6 +1106,7 @@ begin
|
||||
{$ifdef MACOS_USE_STDCLIB}
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
{$endif }
|
||||
@ -1199,7 +1200,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.24 2004-10-25 15:38:59 peter
|
||||
Revision 1.25 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.24 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.23 2004/10/19 19:56:59 olle
|
||||
|
@ -856,6 +856,7 @@ begin
|
||||
{ * MorphOS doesn't have a separate stderr, just like AmigaOS (???) * }
|
||||
StdErrorHandle:=StdOutputHandle;
|
||||
// OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
// OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
end;
|
||||
|
||||
|
||||
@ -891,7 +892,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.20 2004-10-25 15:38:59 peter
|
||||
Revision 1.21 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.20 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.19 2004/09/03 19:26:15 olle
|
||||
|
@ -215,7 +215,7 @@ begin
|
||||
asm
|
||||
pusha
|
||||
end;
|
||||
stackerr := ( _stackavail < stack_size + 2048);
|
||||
stackerr := ( _stackavail < stack_size + 2048);
|
||||
asm
|
||||
popa
|
||||
end;
|
||||
@ -919,8 +919,10 @@ begin
|
||||
|
||||
{$ifdef StdErrToConsole}
|
||||
AssignStdErrConsole(StdErr);
|
||||
AssignStdErrConsole(ErrOutput);
|
||||
{$else}
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
@ -974,7 +976,10 @@ Begin
|
||||
End.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.29 2004-10-25 18:11:49 armin
|
||||
Revision 1.30 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.29 2004/10/25 18:11:49 armin
|
||||
* saveregisters no longer supported by compiler, for now save all registers in stackcheck
|
||||
|
||||
Revision 1.28 2004/10/25 15:38:59 peter
|
||||
|
@ -1073,8 +1073,10 @@ begin
|
||||
|
||||
{$ifdef StdErrToConsole}
|
||||
AssignStdErrConsole(StdErr);
|
||||
AssignStdErrConsole(ErrOutput);
|
||||
{$else}
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
@ -1185,7 +1187,10 @@ Begin
|
||||
End.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2004-10-25 18:11:49 armin
|
||||
Revision 1.7 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.6 2004/10/25 18:11:49 armin
|
||||
* saveregisters no longer supported by compiler, for now save all registers in stackcheck
|
||||
|
||||
Revision 1.5 2004/10/25 15:38:59 peter
|
||||
|
@ -1110,6 +1110,7 @@ begin
|
||||
*)
|
||||
OpenStdIO (Input, fmInput, StdInputHandle);
|
||||
OpenStdIO (Output, fmOutput, StdOutputHandle);
|
||||
OpenStdIO (ErrOutput, fmOutput, StdErrorHandle);
|
||||
OpenStdIO (StdOut, fmOutput, StdOutputHandle);
|
||||
OpenStdIO (StdErr, fmOutput, StdErrorHandle);
|
||||
(*
|
||||
@ -1526,7 +1527,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.75 2004-10-25 15:38:59 peter
|
||||
Revision 1.76 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.75 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.74 2004/09/18 11:12:09 hajny
|
||||
|
@ -623,6 +623,7 @@ Begin
|
||||
{ Setup stdin, stdout and stderr }
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
{ Reset IO Error }
|
||||
@ -631,7 +632,10 @@ End.
|
||||
*)
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 2004-10-25 15:38:59 peter
|
||||
Revision 1.9 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.8 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.7 2002/11/14 12:18:03 marco
|
||||
|
@ -273,6 +273,7 @@ Begin
|
||||
{ Setup stdin, stdout and stderr }
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
{ Setup environment and arguments }
|
||||
@ -286,7 +287,10 @@ Begin
|
||||
End.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.13 2004-10-25 15:38:59 peter
|
||||
Revision 1.14 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.13 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.12 2004/09/03 19:26:57 olle
|
||||
|
@ -1480,6 +1480,7 @@ procedure SysInitStdIO;
|
||||
begin
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
end;
|
||||
@ -1531,7 +1532,10 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.16 2004-10-25 15:38:59 peter
|
||||
Revision 1.17 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.16 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.15 2004/09/03 19:27:16 olle
|
||||
|
@ -14,8 +14,8 @@ type libcint = longint;
|
||||
{ this unit is just ment to run
|
||||
startup code to get C code to work correctly PM }
|
||||
|
||||
function fpgetCerrno:libcint;
|
||||
procedure fpsetCerrno(err:libcint);
|
||||
function fpgetCerrno:libcint;
|
||||
procedure fpsetCerrno(err:libcint);
|
||||
|
||||
{$ifndef ver1_0}
|
||||
property cerrno:libcint read fpgetCerrno write fpsetcerrno;
|
||||
@ -30,12 +30,12 @@ uses
|
||||
|
||||
function geterrnolocation: Plibcint; cdecl;external name '___errno';
|
||||
|
||||
function fpgetCerrno:libcint;
|
||||
function fpgetCerrno:libcint;
|
||||
begin
|
||||
fpgetCerrno:=geterrnolocation^;
|
||||
end;
|
||||
|
||||
procedure fpsetCerrno(err:libcint);
|
||||
procedure fpsetCerrno(err:libcint);
|
||||
begin
|
||||
geterrnolocation^:=err;
|
||||
end;
|
||||
@ -106,8 +106,9 @@ initialization
|
||||
{ Reinitialize std handles that can be changed }
|
||||
UpdateStdHandle(TextRec(Input),StdInputHandle,GetStdHandle(STD_INPUT_HANDLE));
|
||||
UpdateStdHandle(TextRec(Output),StdOutputHandle,GetStdHandle(STD_OUTPUT_HANDLE));
|
||||
UpdateStdHandle(TextRec(ErrOutput),StdErrorHandle,GetStdHandle(STD_ERROR_HANDLE));
|
||||
TextRec(StdOut).Handle:=StdOutputHandle;
|
||||
UpdateStdHandle(TextRec(Stderr),StdErrorHandle,GetStdHandle(STD_ERROR_HANDLE));
|
||||
TextRec(StdErr).Handle:=StdErrorHandle;
|
||||
|
||||
finalization
|
||||
{ should we pass exit code ?
|
||||
@ -124,7 +125,10 @@ if setjmp(exitjmpbuf)=0 then
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.12 2004-09-14 20:08:58 hajny
|
||||
Revision 1.13 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.12 2004/09/14 20:08:58 hajny
|
||||
* use errno from cygwin (like in fixes branch)
|
||||
|
||||
Revision 1.11 2004/09/12 17:41:40 hajny
|
||||
|
@ -1561,11 +1561,13 @@ begin
|
||||
AssignError(stdout);
|
||||
Assign(Output,'');
|
||||
Assign(Input,'');
|
||||
Assign(ErrOutput,'');
|
||||
end
|
||||
else
|
||||
begin
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
end;
|
||||
@ -1606,7 +1608,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.62 2004-10-25 15:38:59 peter
|
||||
Revision 1.63 2004-11-04 09:32:31 peter
|
||||
ErrOutput added
|
||||
|
||||
Revision 1.62 2004/10/25 15:38:59 peter
|
||||
* compiler defined HEAP and HEAPSIZE removed
|
||||
|
||||
Revision 1.61 2004/09/03 19:27:25 olle
|
||||
|
Loading…
Reference in New Issue
Block a user