]> pd.if.org Git - pdclib/blob - functions/_PDCLIB/_PDCLIB_closeall.c
Cosmetic comment fixes.
[pdclib] / functions / _PDCLIB / _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 #ifndef REGTEST
10 #include "_PDCLIB_io.h"
11 extern _PDCLIB_file_t * _PDCLIB_filelist;
12
13 void _PDCLIB_closeall( void )
14 {
15     _PDCLIB_file_t * stream = _PDCLIB_filelist;
16     _PDCLIB_file_t * next;
17     while ( stream != NULL )
18     {
19         next = stream->next;
20         fclose( stream );
21         stream = next;
22     }
23 }
24 #endif
25
26 #ifdef TEST
27 #include "_PDCLIB_test.h"
28
29 int main( void )
30 {
31     /* No testdriver */
32     return TEST_RESULTS;
33 }
34
35 #endif
36