home *** CD-ROM | disk | FTP | other *** search
- /*-----------------------------------------------------------------------*
- * filename - xfclose.c
- *
- * function(s)
- * _xfclose - closes streams
- *-----------------------------------------------------------------------*/
-
- /*[]------------------------------------------------------------[]*/
- /*| |*/
- /*| Turbo C Run Time Library - Version 3.0 |*/
- /*| |*/
- /*| |*/
- /*| Copyright (c) 1987,1988,1990 by Borland International |*/
- /*| All Rights Reserved. |*/
- /*| |*/
- /*[]------------------------------------------------------------[]*/
-
- #include <stdio.h>
-
- /*---------------------------------------------------------------------*
-
- Name _xfclose - closes streams
-
- Usage void _xfclose(void)
-
- Description called at exit to close open streams
-
- *---------------------------------------------------------------------*/
- void _xfclose( void )
- {
- register FILE *fp;
- register int i;
-
- for( i = 0, fp = _streams; i < FOPEN_MAX; fp++, i++ )
- {
- if( fp->flags & _F_RDWR ) fclose( fp );
- }
- }
-