diff libcruft/misc/quit.h @ 5142:0f9108f298ab

[project @ 2005-02-12 02:29:34 by jwe]
author jwe
date Sat, 12 Feb 2005 02:29:35 +0000
parents 7191f6e086f9
children 4c8a2e4e0717
line wrap: on
line diff
--- a/libcruft/misc/quit.h	Thu Feb 10 18:37:55 2005 +0000
+++ b/libcruft/misc/quit.h	Sat Feb 12 02:29:35 2005 +0000
@@ -77,6 +77,10 @@
 
 extern sig_atomic_t octave_allocation_error;
 
+extern sig_atomic_t octave_signal_caught;
+
+extern void octave_handle_signal (void);
+
 extern void octave_throw_interrupt_exception (void) GCC_ATTR_NORETURN;
 
 extern void octave_throw_bad_alloc (void) GCC_ATTR_NORETURN;
@@ -84,10 +88,10 @@
 #define OCTAVE_QUIT \
   do \
     { \
-      if (octave_interrupt_state > 0) \
+      if (octave_signal_caught) \
         { \
-          octave_interrupt_state = -1; \
-          octave_throw_interrupt_exception (); \
+          octave_signal_caught = 0; \
+          octave_handle_signal (); \
         } \
     } \
   while (0)
@@ -169,6 +173,7 @@
 /* These should only be declared for C++ code, and should also be
    outside of any extern "C" block.  */
 
+extern void (*octave_signal_hook) (void);
 extern void (*octave_interrupt_hook) (void);
 extern void (*octave_bad_alloc_hook) (void);