1998-02-01 09:37:08 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "f2c.h"
|
|
|
|
|
|
|
|
#undef abs
|
|
|
|
#undef min
|
|
|
|
#undef max
|
|
|
|
#include <stdlib.h>
|
2002-06-01 20:38:32 +08:00
|
|
|
void f_exit (void);
|
1998-02-01 09:37:08 +08:00
|
|
|
|
2002-06-01 20:38:32 +08:00
|
|
|
int
|
|
|
|
s_stop (char *s, ftnlen n)
|
1998-02-01 09:37:08 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
int i;
|
1998-02-01 09:37:08 +08:00
|
|
|
|
2002-06-01 20:38:32 +08:00
|
|
|
if (n > 0)
|
|
|
|
{
|
|
|
|
fprintf (stderr, "STOP ");
|
|
|
|
for (i = 0; i < n; ++i)
|
|
|
|
putc (*s++, stderr);
|
|
|
|
fprintf (stderr, " statement executed\n");
|
|
|
|
}
|
1998-02-01 09:37:08 +08:00
|
|
|
#ifdef NO_ONEXIT
|
2002-06-01 20:38:32 +08:00
|
|
|
f_exit ();
|
1998-02-01 09:37:08 +08:00
|
|
|
#endif
|
2002-06-01 20:38:32 +08:00
|
|
|
exit (0);
|
1999-05-10 22:40:59 +08:00
|
|
|
|
|
|
|
/* We cannot avoid (useless) compiler diagnostics here: */
|
|
|
|
/* some compilers complain if there is no return statement, */
|
|
|
|
/* and others complain that this one cannot be reached. */
|
|
|
|
|
2002-06-01 20:38:32 +08:00
|
|
|
return 0; /* NOT REACHED */
|
1998-02-01 09:37:08 +08:00
|
|
|
}
|