diff options
author | Pete Travis <immanetize@fedoraproject.org> | 2014-10-01 11:54:54 -0600 |
---|---|---|
committer | Pete Travis <immanetize@fedoraproject.org> | 2014-10-01 11:54:54 -0600 |
commit | b7fb238e0ec327db793aefa670ffedb8cbd63f0b (patch) | |
tree | d795a1fa84fedd491d912cd97c26d80ec523c1fa /SOURCES/readline-4.3-input.dif | |
parent | 08b01b8f3f227bda87ee2591c7e6ccb379fad187 (diff) | |
download | rpmbuild-sles11.1-bash.tar.gz rpmbuild-sles11.1-bash.tar.xz rpmbuild-sles11.1-bash.zip |
starting bash bracnch for sles 11.1sles11.1-bash
Diffstat (limited to 'SOURCES/readline-4.3-input.dif')
-rw-r--r-- | SOURCES/readline-4.3-input.dif | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/SOURCES/readline-4.3-input.dif b/SOURCES/readline-4.3-input.dif new file mode 100644 index 0000000..ad51e5c --- /dev/null +++ b/SOURCES/readline-4.3-input.dif @@ -0,0 +1,46 @@ +--- lib/readline/input.c ++++ lib/readline/input.c Mon Mar 17 19:03:51 2003 +@@ -415,6 +415,8 @@ + return (c); + } + ++extern int _rl_read_zero_char_from_tty; ++ + int + rl_getc (stream) + FILE *stream; +@@ -432,7 +434,10 @@ + /* 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) +--- lib/readline/readline.c ++++ lib/readline/readline.c Mon Mar 17 19:02:52 2003 +@@ -387,6 +387,9 @@ + return (eof ? (char *)NULL : savestring (the_line)); + } + ++/* Catch EOF from tty, do not return command line */ ++int _rl_read_zero_char_from_tty = 0; ++ + STATIC_CALLBACK int + #if defined (READLINE_CALLBACKS) + readline_internal_char () +@@ -421,6 +424,10 @@ + RL_SETSTATE(RL_STATE_READCMD); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_READCMD); ++ ++ /* Return here if terminal is closed */ ++ if (c == EOF && _rl_read_zero_char_from_tty) ++ return (rl_done = 1); + + /* EOF typed to a non-blank line is a <NL>. */ + if (c == EOF && rl_end) |