annotate libcruft/misc/dostop.c @ 1617:14d95b8282d7

[project @ 1995-11-03 16:44:45 by jwe]
author jwe
date Fri, 03 Nov 1995 16:44:45 +0000
parents 611d403c7f3d
children 9c1fca4bd859
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
280
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
1 /* dostop.c -*- C -*- */
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
2 /*
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
3
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
4 Copyright (C) 1992, 1993 John W. Eaton
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
5
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
7
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
11 later version.
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
12
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
16 for more details.
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
17
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
19 along with Octave; see the file COPYING. If not, write to the Free
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 280
diff changeset
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
280
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
21
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
22 */
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
23
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
24 #ifdef HAVE_CONFIG_H
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
25 #include "config.h"
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
26 #endif
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
27
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
28 #include <signal.h>
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
29 #include <stdlib.h>
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
30
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
31 /*
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
32 * All the STOP statements in the Fortran routines have been replaced
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
33 * with a call to XSTOPX, defined in the file libcruft/misc/xstopx.f.
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
34 *
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
35 * The XSTOPX function calls this function, which will send a SIGINT
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
36 * signal to the program that invoked it.
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
37 *
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
38 * Octave\'s SIGINT signal handler calls jump_to_top_level(), and the
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
39 * user will end up at the top level instead of the shell prompt.
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
40 *
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
41 * Programs that don\'t handle SIGINT will be interrupted.
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
42 */
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
43
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
44 volatile void
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
45 #if defined (F77_APPEND_UNDERSCORE)
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
46 dostop_ (void)
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
47 #else
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
48 dostop (void)
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
49 #endif
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
50 {
1617
14d95b8282d7 [project @ 1995-11-03 16:44:45 by jwe]
jwe
parents: 1315
diff changeset
51 raise (SIGINT);
280
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
52 abort ();
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
53 }
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
54
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
55 /*
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
56 ;;; Local Variables: ***
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
57 ;;; mode: C ***
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
58 ;;; page-delimiter: "^/\\*" ***
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
59 ;;; End: ***
7e60a6f52cd4 [project @ 1994-01-09 03:59:32 by jwe]
jwe
parents:
diff changeset
60 */