]> pd.if.org Git - pdclib/blob - functions/stdlib/_Exit.c
PDCLib includes with quotes, not <>.
[pdclib] / functions / stdlib / _Exit.c
1 /* _Exit( int )
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 <stdlib.h>
8 #include <stdio.h>
9
10 #ifndef REGTEST
11 #include "_PDCLIB_glue.h"
12
13 void _Exit( int status )
14 {
15     /* TODO: Flush and close open streams. Remove tmpfile() files. Make this
16        called on process termination automatically.
17     */
18     _PDCLIB_Exit( status );
19 }
20
21 #endif
22
23 #ifdef TEST
24 #include "_PDCLIB_test.h"
25
26 int main( void )
27 {
28     int UNEXPECTED_RETURN = 0;
29     _Exit( 0 );
30     TESTCASE( UNEXPECTED_RETURN );
31     return TEST_RESULTS;
32 }
33
34 #endif