home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / f2c-93.04.28-src.tgz / tar.out / fsf / f2c / libF77 / s_stop.c < prev    next >
C/C++ Source or Header  |  1996-09-28  |  465b  |  34 lines

  1. #include "stdio.h"
  2. #include "f2c.h"
  3.  
  4. #ifdef KR_headers
  5. extern void f_exit();
  6. VOID s_stop(s, n) char *s; ftnlen n;
  7. #else
  8. #undef abs
  9. #include "stdlib.h"
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. void f_exit(void);
  14.  
  15. int s_stop(char *s, ftnlen n)
  16. #endif
  17. {
  18. int i;
  19.  
  20. if(n > 0)
  21.     {
  22.     fprintf(stderr, "STOP ");
  23.     for(i = 0; i<n ; ++i)
  24.         putc(*s++, stderr);
  25.     fprintf(stderr, " statement executed\n");
  26.     }
  27. f_exit();
  28. exit(0);
  29. #ifdef __cplusplus
  30. return 0; /* NOT REACHED */
  31. }
  32. #endif
  33. }
  34.