]> pd.if.org Git - pdclib/blob - functions/_PDCLIB/closeall.c
Comment cleanups.
[pdclib] / functions / _PDCLIB / closeall.c
1 /* _PDCLIB_closeall( void )
2
3    This file is part of the Public Domain C Library (PDCLib).
4    Permission is granted to use, modify, and / or redistribute at will.
5 */
6
7 #include <stdio.h>
8
9 extern struct _PDCLIB_file_t * _PDCLIB_filelist;
10
11 void _PDCLIB_closeall( void )
12 {
13     struct _PDCLIB_file_t * stream = _PDCLIB_filelist;
14     struct _PDCLIB_file_t * next;
15     while ( stream != NULL )
16     {
17         next = stream->next;
18         fclose( stream );
19         stream = next;
20     }
21 }
22
23 #ifdef TEST
24 #include <_PDCLIB_test.h>
25
26 int main( void )
27 {
28     /* No testdriver */
29     return TEST_RESULTS;
30 }
31
32 #endif
33