home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / utils / f2c / f77lib / s_stop.c~ < prev    next >
Encoding:
Text File  |  1992-11-09  |  439 b   |  30 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" void f_exit(void);
  12. #else
  13. extern void f_exit(void);
  14. #endif
  15. void 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. }
  30.