Daily bump.
[official-gcc.git] / libf2c / libF77 / s_stop.c
blob975edb7d4ad08148294166a6573fc6e10ecd980d
1 #include <stdio.h>
2 #include "f2c.h"
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 #undef min
10 #undef max
11 #include <stdlib.h>
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 void f_exit(void);
17 int s_stop(char *s, ftnlen n)
18 #endif
20 int i;
22 if(n > 0)
24 fprintf(stderr, "STOP ");
25 for(i = 0; i<n ; ++i)
26 putc(*s++, stderr);
27 fprintf(stderr, " statement executed\n");
29 #ifdef NO_ONEXIT
30 f_exit();
31 #endif
32 exit(0);
34 /* We cannot avoid (useless) compiler diagnostics here: */
35 /* some compilers complain if there is no return statement, */
36 /* and others complain that this one cannot be reached. */
38 return 0; /* NOT REACHED */
40 #ifdef __cplusplus
42 #endif