opnsense-src/contrib/libf2c/libF77/s_stop.c

33 lines
581 B
C
Raw Normal View History

1999-09-18 06:51:31 -04:00
#include <stdio.h>
#include "f2c.h"
#undef abs
#undef min
#undef max
#include <stdlib.h>
2003-07-10 23:42:19 -04:00
void f_exit (void);
1999-09-18 06:51:31 -04:00
2003-07-10 23:42:19 -04:00
int
s_stop (char *s, ftnlen n)
1999-09-18 06:51:31 -04:00
{
2003-07-10 23:42:19 -04:00
int i;
1999-09-18 06:51:31 -04:00
2003-07-10 23:42:19 -04:00
if (n > 0)
{
fprintf (stderr, "STOP ");
for (i = 0; i < n; ++i)
putc (*s++, stderr);
fprintf (stderr, " statement executed\n");
}
1999-09-18 06:51:31 -04:00
#ifdef NO_ONEXIT
2003-07-10 23:42:19 -04:00
f_exit ();
1999-09-18 06:51:31 -04:00
#endif
2003-07-10 23:42:19 -04:00
exit (0);
1999-09-19 01:59:11 -04: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. */
2003-07-10 23:42:19 -04:00
return 0; /* NOT REACHED */
1999-09-18 06:51:31 -04:00
}