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