summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-07 06:45:33 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-07 06:45:33 -0800
commit08bea85fa1e2b674bf0e03e17ac206545ae1ff2a (patch)
treec9a2e753e84df36e16b566b6cfc46afae602ece7 /input.c
parent6b1acbee2880fddd7d19f296d79f59640dc1f817 (diff)
downloadreadline-08bea85fa1e2b674bf0e03e17ac206545ae1ff2a.tar.gz
readline-08bea85fa1e2b674bf0e03e17ac206545ae1ff2a.tar.bz2
readline-08bea85fa1e2b674bf0e03e17ac206545ae1ff2a.zip
applied patch readline52-007
Diffstat (limited to 'input.c')
-rw-r--r--input.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/input.c b/input.c
index 9660ff1..b91548e 100644
--- a/input.c
+++ b/input.c
@@ -133,8 +133,11 @@ rl_get_char (key)
return (0);
*key = ibuffer[pop_index++];
-
+#if 0
if (pop_index >= ibuffer_len)
+#else
+ if (pop_index > ibuffer_len)
+#endif
pop_index = 0;
return (1);
@@ -250,7 +253,8 @@ rl_gather_tyi ()
while (chars_avail--)
{
k = (*rl_getc_function) (rl_instream);
- rl_stuff_char (k);
+ if (rl_stuff_char (k) == 0)
+ break; /* some problem; no more room */
if (k == NEWLINE || k == RETURN)
break;
}
@@ -373,7 +377,11 @@ rl_stuff_char (key)
RL_SETSTATE (RL_STATE_INPUTPENDING);
}
ibuffer[push_index++] = key;
+#if 0
if (push_index >= ibuffer_len)
+#else
+ if (push_index > ibuffer_len)
+#endif
push_index = 0;
return 1;