mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
* closes all handles >+ 5
This commit is contained in:
parent
1316bbd21f
commit
7de70e2804
@ -528,16 +528,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$ifdef SYSTEMDEBUG}
|
|
||||||
|
|
||||||
{ Keep Track of open files }
|
{ Keep Track of open files }
|
||||||
const
|
const
|
||||||
max_files = 50;
|
max_files = 50;
|
||||||
free_closed_names : boolean = true;
|
|
||||||
var
|
var
|
||||||
opennames : array [0..max_files-1] of pchar;
|
|
||||||
openfiles : array [0..max_files-1] of boolean;
|
openfiles : array [0..max_files-1] of boolean;
|
||||||
|
{$ifdef SYSTEMDEBUG}
|
||||||
|
opennames : array [0..max_files-1] of pchar;
|
||||||
|
const
|
||||||
|
free_closed_names : boolean = true;
|
||||||
{$endif SYSTEMDEBUG}
|
{$endif SYSTEMDEBUG}
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
@ -546,17 +546,21 @@ end;
|
|||||||
|
|
||||||
procedure ___exit(exitcode:byte);cdecl;external name '___exit';
|
procedure ___exit(exitcode:byte);cdecl;external name '___exit';
|
||||||
|
|
||||||
|
procedure do_close(handle : longint);forward;
|
||||||
|
|
||||||
Procedure system_exit;
|
Procedure system_exit;
|
||||||
{$ifdef SYSTEMDEBUG}
|
|
||||||
var
|
var
|
||||||
h : byte;
|
h : byte;
|
||||||
{$endif SYSTEMDEBUG}
|
|
||||||
begin
|
begin
|
||||||
{$ifdef SYSTEMDEBUG}
|
|
||||||
for h:=0 to max_files-1 do
|
for h:=0 to max_files-1 do
|
||||||
if openfiles[h] then
|
if openfiles[h] then
|
||||||
writeln(stderr,'file ',opennames[h],' not closed at exit');
|
begin
|
||||||
|
{$ifdef SYSTEMDEBUG}
|
||||||
|
writeln(stderr,'file ',opennames[h],' not closed at exit');
|
||||||
{$endif SYSTEMDEBUG}
|
{$endif SYSTEMDEBUG}
|
||||||
|
if h>=5 then
|
||||||
|
do_close(h);
|
||||||
|
end;
|
||||||
{ halt is not allways called !! }
|
{ halt is not allways called !! }
|
||||||
{ not on normal exit !! PM }
|
{ not on normal exit !! PM }
|
||||||
set_pm_interrupt($00,old_int00);
|
set_pm_interrupt($00,old_int00);
|
||||||
@ -1250,7 +1254,10 @@ Begin
|
|||||||
End.
|
End.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.12 1999-05-17 21:52:33 florian
|
Revision 1.13 1999-05-19 16:54:21 pierre
|
||||||
|
* closes all handles >+ 5
|
||||||
|
|
||||||
|
Revision 1.12 1999/05/17 21:52:33 florian
|
||||||
* most of the Object Pascal stuff moved to the system unit
|
* most of the Object Pascal stuff moved to the system unit
|
||||||
|
|
||||||
Revision 1.11 1999/05/04 23:28:40 pierre
|
Revision 1.11 1999/05/04 23:28:40 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user