]> pd.if.org Git - pdclib/blob - platform/win32/functions/_PDCLIB/_PDCLIB_Exit.c
Initial pass at a port to win32
[pdclib] / platform / win32 / functions / _PDCLIB / _PDCLIB_Exit.c
1 /* $Id$ */
2
3 /* _PDCLIB_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 /* This is a stub implementation of _PDCLIB_Exit
10 */
11
12 #include <stdlib.h>
13
14 #ifndef REGTEST
15 #include <_PDCLIB_glue.h>
16 #include <errno.h>
17 #include <windows.h>
18
19 void _PDCLIB_Exit( int status )
20 {
21     ExitProcess( status );
22 }
23
24 #endif
25
26 #ifdef TEST
27 #include <_PDCLIB_test.h>
28
29 int main( void )
30 {
31 #ifndef REGTEST
32     int UNEXPECTED_RETURN = 0;
33     _PDCLIB_Exit( 0 );
34     TESTCASE( UNEXPECTED_RETURN );
35 #endif
36     return TEST_RESULTS;
37 }
38
39 #endif