------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-03-27
06:23 -------
(In reply to comment #5)
> (In reply to comment #0)
> John Eaton's last word on the subject:
______________________________________________________________
Here is a fix for the Ctrl-C crashes Octave on Cygwin problem.
My apologies to the GCC people for thinking this was a bug with GCC.
jwe
liboctave/ChangeLog:
2005-03-26 John W. Eaton <[EMAIL PROTECTED]>
* cmd-edit.cc (do_readline): Wrap call to ::octave_rl_readline
with {BEGIN,END}_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE.
src/ChangeLog:
2005-03-26 John W. Eaton <[EMAIL PROTECTED]>
* input.cc (gnu_readline): Don't wrap call to command_editor::readline
with {BEGIN,END}_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE.
Index: liboctave/cmd-edit.cc
===================================================================
RCS file: /cvs/octave/liboctave/cmd-edit.cc,v
retrieving revision 1.23
diff -u -r1.23 cmd-edit.cc
--- liboctave/cmd-edit.cc 25 Nov 2003 06:05:20 -0000 1.23
+++ liboctave/cmd-edit.cc 26 Mar 2005 17:53:14 -0000
@@ -36,6 +36,8 @@
#include <unistd.h>
#endif
+#include "quit.h"
+
#include "cmd-edit.h"
#include "cmd-hist.h"
#include "lo-error.h"
@@ -192,7 +194,13 @@
eof = false;
- char *line = ::octave_rl_readline (prompt.c_str ());
+ char *line = 0;
+
+ BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
+
+ line = ::octave_rl_readline (prompt.c_str ());
+
+ END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
if (line)
{
Index: src/input.cc
===================================================================
RCS file: /cvs/octave/src/input.cc,v
retrieving revision 1.160
diff -u -r1.160 input.cc
--- src/input.cc 4 Mar 2005 02:46:08 -0000 1.160
+++ src/input.cc 26 Mar 2005 17:53:27 -0000
@@ -177,12 +177,8 @@
{
bool eof;
- BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
-
retval = command_editor::readline (s, eof);
- END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE;
-
if (! eof && retval.empty ())
retval = "\n";
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20442