mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-13 15:10:49 +02:00
commit bash-20070426 snapshot
This commit is contained in:
@@ -119,7 +119,7 @@ ibuffer_space ()
|
||||
if (pop_index > push_index)
|
||||
return (pop_index - push_index - 1);
|
||||
else
|
||||
return (ibuffer_len - (push_index - pop_index));
|
||||
return (ibuffer_len - (push_index - pop_index) - 1);
|
||||
}
|
||||
|
||||
/* Get a key from the buffer of characters to be read.
|
||||
|
||||
@@ -469,10 +469,7 @@ 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)
|
||||
{
|
||||
_rl_trace("rl_getc: result == 0 returning EOF");
|
||||
return (EOF);
|
||||
}
|
||||
|
||||
#if defined (__BEOS__)
|
||||
if (errno == EINTR)
|
||||
@@ -505,13 +502,7 @@ _rl_trace("rl_getc: result == 0 returning EOF");
|
||||
this is simply an interrupted system call to read ().
|
||||
Otherwise, some error ocurred, also signifying EOF. */
|
||||
if (errno != EINTR)
|
||||
{
|
||||
if (RL_ISSTATE(RL_STATE_READCMD))
|
||||
_rl_trace("rl_getc: returning READERR: errno = %d", errno);
|
||||
else
|
||||
_rl_trace("rl_getc: returning EOF: errno = %d", errno);
|
||||
return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user