s_stop.c
Go to the documentation of this file.
00001 #include "stdio.h"
00002 #include "f2c.h"
00003 
00004 #ifdef KR_headers
00005 extern void f_exit();
00006 int s_stop(s, n) char *s; ftnlen n;
00007 #else
00008 #undef abs
00009 #undef min
00010 #undef max
00011 #include "stdlib.h"
00012 #ifdef __cplusplus
00013 extern "C" {
00014 #endif
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 void f_exit(void);
00019 
00020 int s_stop(char *s, ftnlen n)
00021 #endif
00022 {
00023 int i;
00024 
00025 if(n > 0)
00026         {
00027         fprintf(stderr, "STOP ");
00028         for(i = 0; i<n ; ++i)
00029                 putc(*s++, stderr);
00030         fprintf(stderr, " statement executed\n");
00031         }
00032 #ifdef NO_ONEXIT
00033 f_exit();
00034 #endif
00035 exit(0);
00036 
00037 /* We cannot avoid (useless) compiler diagnostics here:         */
00038 /* some compilers complain if there is no return statement,     */
00039 /* and others complain that this one cannot be reached.         */
00040 
00041 return 0; /* NOT REACHED */
00042 }
00043 #ifdef __cplusplus
00044 }
00045 #endif
00046 #ifdef __cplusplus
00047 }
00048 #endif


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:56