exit_.c 543 B

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