# HG changeset patch # User jwe # Date 815418573 0 # Node ID 9c1fca4bd859707e979f1263a13f9ad75e5e8377 # Parent 14d95b8282d70e0bbc21d0b4c535a644295858cf [project @ 1995-11-03 17:08:53 by jwe] diff -r 14d95b8282d7 -r 9c1fca4bd859 libcruft/misc/dostop.c --- a/libcruft/misc/dostop.c Fri Nov 03 16:44:45 1995 +0000 +++ b/libcruft/misc/dostop.c Fri Nov 03 17:09:33 1995 +0000 @@ -25,21 +25,14 @@ #include "config.h" #endif -#include -#include +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 (); } /* diff -r 14d95b8282d7 -r 9c1fca4bd859 src/sighandlers.cc --- a/src/sighandlers.cc Fri Nov 03 16:44:45 1995 +0000 +++ b/src/sighandlers.cc Fri Nov 03 17:09:33 1995 +0000 @@ -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 */) { diff -r 14d95b8282d7 -r 9c1fca4bd859 src/utils.cc --- a/src/utils.cc Fri Nov 03 16:44:45 1995 +0000 +++ b/src/utils.cc Fri Nov 03 17:09:33 1995 +0000 @@ -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 (); diff -r 14d95b8282d7 -r 9c1fca4bd859 src/utils.h --- a/src/utils.h Fri Nov 03 16:44:45 1995 +0000 +++ b/src/utils.h Fri Nov 03 17:09:33 1995 +0000 @@ -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);