Mercurial > octave
comparison libcruft/misc/dostop.c @ 1621:0d0c53b02a33
[project @ 1995-11-06 13:24:03 by jwe]
author | jwe |
---|---|
date | Mon, 06 Nov 1995 13:24:03 +0000 |
parents | 9c1fca4bd859 |
children | a032a0a729bd |
comparison
equal
deleted
inserted
replaced
1620:43df82dfb1f7 | 1621:0d0c53b02a33 |
---|---|
23 | 23 |
24 #ifdef HAVE_CONFIG_H | 24 #ifdef HAVE_CONFIG_H |
25 #include "config.h" | 25 #include "config.h" |
26 #endif | 26 #endif |
27 | 27 |
28 #ifdef OCTAVE_SOURCE | |
28 extern void jump_to_top_level (void); | 29 extern void jump_to_top_level (void); |
30 #endif | |
29 | 31 |
30 /* All the STOP statements in the Fortran routines have been replaced | 32 /* All the STOP statements in the Fortran routines have been replaced |
31 with a call to XSTOPX, defined in the file libcruft/misc/xstopx.f. | 33 with a call to XSTOPX, defined in the file libcruft/misc/xstopx.f. |
32 | 34 |
33 The XSTOPX function calls this function, which calls | 35 The XSTOPX function calls this function. If OCTAVE_SOURCE is |
34 jump_to_top_level(), and the user will end up at the top level | 36 defined, this function calls jump_to_top_level(), and the user will |
35 instead of the shell prompt. */ | 37 end up at the top level instead of the shell prompt. Otherwise, we |
38 just stop. */ | |
36 | 39 |
37 volatile void | 40 volatile void |
38 #if defined (F77_APPEND_UNDERSCORE) | 41 #if defined (F77_APPEND_UNDERSCORE) |
39 dostop_ (void) | 42 dostop_ (void) |
40 #else | 43 #else |
41 dostop (void) | 44 dostop (void) |
42 #endif | 45 #endif |
43 { | 46 { |
47 #ifdef OCTAVE_SOURCE | |
44 jump_to_top_level (); | 48 jump_to_top_level (); |
49 #else | |
50 exit (1); | |
51 #endif | |
45 } | 52 } |
46 | 53 |
47 /* | 54 /* |
48 ;;; Local Variables: *** | 55 ;;; Local Variables: *** |
49 ;;; mode: C *** | 56 ;;; mode: C *** |