1 /* This gives the effect of 2 3 subroutine exit(rc) 4 integer*4 rc 5 stop 6 end 7 8 * with the added side effect of supplying rc as the program's exit code. 9 */ 10 11 #include "f2c.h" 12 #undef abs 13 #undef min 14 #undef max 15 #ifndef KR_headers 16 #include "stdlib.h" 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 extern void f_exit(void); 24 #endif 25 26 void 27 #ifdef KR_headers exit_(rc)28exit_(rc) integer *rc; 29 #else 30 exit_(integer *rc) 31 #endif 32 { 33 #ifdef NO_ONEXIT 34 f_exit(); 35 #endif 36 exit(*rc); 37 } 38 #ifdef __cplusplus 39 } 40 #endif 41 #ifdef __cplusplus 42 } 43 #endif 44