summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-07 06:48:00 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-07 06:48:00 -0800
commitd93d4f85e18e68d3ae5da2a0b1e85e275b898b44 (patch)
tree6f65a0cadcc93cac4e9ba52ca6e365f54d3b663b /input.c
parent166ad723228a76d62bdf8620f1c12fe185d4eb49 (diff)
downloadreadline-d93d4f85e18e68d3ae5da2a0b1e85e275b898b44.tar.gz
readline-d93d4f85e18e68d3ae5da2a0b1e85e275b898b44.tar.bz2
readline-d93d4f85e18e68d3ae5da2a0b1e85e275b898b44.zip
input
Diffstat (limited to 'input.c')
-rw-r--r--input.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/input.c b/input.c
index 4206a3e..34ba67e 100644
--- a/input.c
+++ b/input.c
@@ -456,6 +456,8 @@ rl_read_key ()
return (c);
}
+extern int _rl_read_zero_char_from_tty;
+
int
rl_getc (stream)
FILE *stream;
@@ -477,7 +479,10 @@ rl_getc (stream)
/* If zero characters are returned, then the file that we are
reading from is empty! Return EOF in that case. */
if (result == 0)
- return (EOF);
+ {
+ _rl_read_zero_char_from_tty = 1;
+ return (EOF);
+ }
#if defined (__BEOS__)
if (errno == EINTR)