mirror of https://github.com/lianthony/NT4.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
818 B
46 lines
818 B
/***
|
|
*_endlow.c - lowio terminator function
|
|
*
|
|
* Copyright (c) 1989-1995, Microsoft Corporation. All rights reserved.
|
|
*
|
|
*Purpose:
|
|
* defines _endlowio() - closes any open files
|
|
*
|
|
*Revision History:
|
|
* 04-05-92 PLM MAC version created
|
|
* 02-14-95 GJF Replaced _CALLTYPE2 with __cdecl.
|
|
*
|
|
*******************************************************************************/
|
|
#include <msdos.h>
|
|
#include <internal.h>
|
|
#include <io.h>
|
|
|
|
/***
|
|
*void _endlowio(void) - terminator function
|
|
*
|
|
*Purpose:
|
|
* Closes any files still open at termination
|
|
*
|
|
*Entry:
|
|
*
|
|
*Exit:
|
|
*
|
|
*Exceptions:
|
|
*
|
|
*******************************************************************************/
|
|
|
|
void __cdecl _endlowio (
|
|
void
|
|
)
|
|
{
|
|
int fh;
|
|
/* loop through file handles*/
|
|
for (fh=0; fh <_nfile; fh++)
|
|
{
|
|
if (_osfile[fh] & FOPEN)
|
|
{
|
|
_close(fh);
|
|
}
|
|
}
|
|
|
|
}
|