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