Mercurial > hg > octave-nkf
changeset 1618:9c1fca4bd859
[project @ 1995-11-03 17:08:53 by jwe]
author | jwe |
---|---|
date | Fri, 03 Nov 1995 17:09:33 +0000 |
parents | 14d95b8282d7 |
children | 1a35c8c91349 |
files | libcruft/misc/dostop.c src/sighandlers.cc src/utils.cc src/utils.h |
diffstat | 4 files changed, 10 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/misc/dostop.c +++ b/libcruft/misc/dostop.c @@ -25,21 +25,14 @@ #include "config.h" #endif -#include <signal.h> -#include <stdlib.h> +extern void jump_to_top_level (void); -/* - * All the STOP statements in the Fortran routines have been replaced - * with a call to XSTOPX, defined in the file libcruft/misc/xstopx.f. - * - * The XSTOPX function calls this function, which will send a SIGINT - * signal to the program that invoked it. - * - * Octave\'s SIGINT signal handler calls jump_to_top_level(), and the - * user will end up at the top level instead of the shell prompt. - * - * Programs that don\'t handle SIGINT will be interrupted. - */ +/* All the STOP statements in the Fortran routines have been replaced + with a call to XSTOPX, defined in the file libcruft/misc/xstopx.f. + + The XSTOPX function calls this function, which calls + jump_to_top_level(), and the user will end up at the top level + instead of the shell prompt. */ volatile void #if defined (F77_APPEND_UNDERSCORE) @@ -48,8 +41,7 @@ dostop (void) #endif { - raise (SIGINT); - abort (); + jump_to_top_level (); } /*
--- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -171,9 +171,6 @@ // Handle SIGINT by restarting the parser (see octave.cc). -// XXX FIXME XXX -- it would probably be good to try to use POSIX -// signal interface if it is available. - static RETSIGTYPE sigint_handler (int /* sig */) {
--- a/src/utils.cc +++ b/src/utils.cc @@ -245,7 +245,7 @@ // Return to the main command loop in octave.cc. -void +extern "C" void jump_to_top_level (void) { run_all_unwind_protects ();
--- a/src/utils.h +++ b/src/utils.h @@ -47,7 +47,7 @@ extern char **pathstring_to_vector (char *pathstring); -extern void jump_to_top_level (void) NORETURN; +extern "C" void jump_to_top_level (void) NORETURN; extern int almost_match (const char *std, const char *s, int min_match_len = 1, int case_sens = 1);