diff libcruft/misc/quit.h @ 4793:a62215ab8a03

[project @ 2004-02-20 20:59:34 by jwe]
author jwe
date Fri, 20 Feb 2004 20:59:34 +0000
parents 4623ef02a605
children 7191f6e086f9
line wrap: on
line diff
--- a/libcruft/misc/quit.h	Fri Feb 20 18:44:43 2004 +0000
+++ b/libcruft/misc/quit.h	Fri Feb 20 20:59:34 2004 +0000
@@ -68,6 +68,10 @@
 
 extern sig_atomic_t octave_interrupt_immediately;
 
+// > 0: interrupt pending
+//   0: no interrupt pending
+// < 0: handling interrupt
+//
 extern sig_atomic_t octave_interrupt_state;
 
 extern sig_atomic_t octave_allocation_error;
@@ -79,9 +83,9 @@
 #define OCTAVE_QUIT \
   do \
     { \
-      if (octave_interrupt_state) \
+      if (octave_interrupt_state > 0) \
         { \
-          octave_interrupt_state = 0; \
+          octave_interrupt_state = -1; \
           octave_throw_interrupt_exception (); \
         } \
     } \