view src/readline-1-paste.patch @ 3721:933b99febcf1

Expand options to support 3 possible sources of octave * configure.ac: modify --enable-stable rule to --enable-octave=source (stable,alpha,default) * Makefile.am: modify OCTAVE_TARGET based on octave build value set in configure. * index.html: added master-octave information. * src/default-octave.mk: new file. * src/default-octave-1-docinstall.patch * dist-files.mk: add default-octave-1-docinstall.patch default-octave.mk * binary-dist-rules.mk: use OCTAVE_TARGET to decide on tarball/installer name
author John Donoghue <john.donoghue@ieee.org>
date Sun, 19 Oct 2014 22:58:20 -0400
parents 9e62095edc58
children
line wrap: on
line source

diff -u a/input.c b/readline-6.2/input.c
--- a/input.c	2010-05-30 18:33:01.000000000 -0400
+++ b/input.c	2012-06-25 21:08:42.000000000 -0400
@@ -410,5 +412,5 @@
 rl_read_key ()
 {
-  int c;
+  int c, r;
 
   rl_key_sequence_length++;
@@ -430,12 +432,16 @@
 	  while (rl_event_hook)
 	    {
-	      if (rl_gather_tyi () < 0)	/* XXX - EIO */
+	      if (rl_get_char (&c) != 0)
+		break;
+		
+	      if ((r = rl_gather_tyi ()) < 0)	/* XXX - EIO */
 		{
 		  rl_done = 1;
 		  return ('\n');
 		}
+	      else if (r == 1)			/* read something */
+		continue;
+
 	      RL_CHECK_SIGNALS ();
-	      if (rl_get_char (&c) != 0)
-		break;
 	      if (rl_done)		/* XXX - experimental */
 		return ('\n');