| 1 |
#include "stdio.h" |
| 2 |
#include "f2c.h" |
| 3 |
|
| 4 |
#ifdef KR_headers |
| 5 |
extern void f_exit(); |
| 6 |
int s_stop(s, n) char *s; ftnlen n; |
| 7 |
#else |
| 8 |
#undef abs |
| 9 |
#undef min |
| 10 |
#undef max |
| 11 |
#include "stdlib.h" |
| 12 |
#ifdef __cplusplus |
| 13 |
extern "C" { |
| 14 |
#endif |
| 15 |
#ifdef __cplusplus |
| 16 |
extern "C" { |
| 17 |
#endif |
| 18 |
void f_exit(void); |
| 19 |
|
| 20 |
int s_stop(char *s, ftnlen n) |
| 21 |
#endif |
| 22 |
{ |
| 23 |
int i; |
| 24 |
|
| 25 |
if(n > 0) |
| 26 |
{ |
| 27 |
fprintf(stderr, "STOP "); |
| 28 |
for(i = 0; i<n ; ++i) |
| 29 |
putc(*s++, stderr); |
| 30 |
fprintf(stderr, " statement executed\n"); |
| 31 |
} |
| 32 |
#ifdef NO_ONEXIT |
| 33 |
f_exit(); |
| 34 |
#endif |
| 35 |
exit(0); |
| 36 |
|
| 37 |
/* We cannot avoid (useless) compiler diagnostics here: */ |
| 38 |
/* some compilers complain if there is no return statement, */ |
| 39 |
/* and others complain that this one cannot be reached. */ |
| 40 |
|
| 41 |
return 0; /* NOT REACHED */ |
| 42 |
} |
| 43 |
#ifdef __cplusplus |
| 44 |
} |
| 45 |
#endif |
| 46 |
#ifdef __cplusplus |
| 47 |
} |
| 48 |
#endif |