Mercurial > hg > octave-nkf
diff libcruft/misc/f77-fcn.c @ 3808:885b296ef83a
[project @ 2001-03-27 19:12:58 by jwe]
author | jwe |
---|---|
date | Tue, 27 Mar 2001 19:12:59 +0000 |
parents | 8b262e771614 |
children | ec80db02d436 |
line wrap: on
line diff
--- a/libcruft/misc/f77-fcn.c +++ b/libcruft/misc/f77-fcn.c @@ -24,9 +24,11 @@ #include <config.h> #endif +#include <stdlib.h> #include <string.h> #include "f77-fcn.h" +#include "lo-error.h" void copy_f77_context (void *from, void *to, unsigned int size) @@ -34,6 +36,22 @@ memcpy (to, from, size); } +/* All the STOP statements in the Fortran routines have been replaced + with a call to XSTOPX. + + XSTOPX jumps back to the entry point for the Fortran function that + called us. Then the calling function should do whatever cleanup + is necessary. */ + +volatile void +F77_FCN (xstopx, XSTOPX) (const char *s, long int slen) +{ + if (s && slen > 0) + (*current_liboctave_error_handler) ("%.*s", s, slen); + + longjmp (f77_context, 1); +} + /* ;;; Local Variables: *** ;;; mode: C++ ***