]> pd.if.org Git - pdclib/blob - functions/_PDCLIB/closeall.c
PDCLIB-6: Didn't increment the specification pointer after the '*' in a precision...
[pdclib] / functions / _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 extern struct _PDCLIB_file_t * _PDCLIB_filelist;
13
14 void _PDCLIB_closeall( void )
15 {
16     struct _PDCLIB_file_t * stream = _PDCLIB_filelist;
17     struct _PDCLIB_file_t * next;
18     while ( stream != NULL )
19     {
20         next = stream->next;
21         fclose( stream );
22         stream = next;
23     }
24 }
25 #endif
26
27 #ifdef TEST
28 #include <_PDCLIB_test.h>
29
30 int main( void )
31 {
32     /* No testdriver */
33     return TEST_RESULTS;
34 }
35
36 #endif
37