polynomial-c    15/01/21 11:50:44

  Added:                readline-6.3-read-eof.patch
  Log:
  Added a fix from upstream
  
  (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 
0x981CA6FC)

Revision  Changes    Path
1.1                  sys-libs/readline/files/readline-6.3-read-eof.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/readline/files/readline-6.3-read-eof.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/readline/files/readline-6.3-read-eof.patch?rev=1.1&content-type=text/plain

Index: readline-6.3-read-eof.patch
===================================================================
http://lists.gnu.org/archive/html/bug-bash/2014-12/msg00152.html

*** ../bash-4.3-patched/lib/readline/readline.c 2014-10-01 13:08:28.000000000 
-0400
--- lib/readline/readline.c     2014-12-20 22:37:28.000000000 -0500
***************
*** 580,592 ****
        }
  
!       /* EOF typed to a non-blank line is a <NL>.  If we want to change this,
!        to force any existing line to be ignored when read(2) reads EOF,
!        for example, this is the place to change. */
        if (c == EOF && rl_end)
!       c = NEWLINE;
  
        /* The character _rl_eof_char typed to blank line, and not as the
!        previous character is interpreted as EOF. */
!       if (((c == _rl_eof_char && lastc != c) || c == EOF) && !rl_end)
        {
  #if defined (READLINE_CALLBACKS)
--- 587,620 ----
        }
  
!       /* EOF typed to a non-blank line is ^D the first time, EOF the second
!        time in a row.  This won't return any partial line read from the tty.
!        If we want to change this, to force any existing line to be returned
!        when read(2) reads EOF, for example, this is the place to change. */
        if (c == EOF && rl_end)
!       {
!         if (RL_SIG_RECEIVED ())
!           {
!             RL_CHECK_SIGNALS ();
!             if (rl_signal_event_hook)
!               (*rl_signal_event_hook) ();             /* XXX */
!           }
! 
!         /* XXX - reading two consecutive EOFs returns EOF */
!         if (RL_ISSTATE (RL_STATE_TERMPREPPED))
!           {
!             if (lastc == _rl_eof_char || lastc == EOF)
!               rl_end = 0;
!             else
!               c = _rl_eof_char;
!           }
!         else
!           c = NEWLINE;
!       }
  
        /* The character _rl_eof_char typed to blank line, and not as the
!        previous character is interpreted as EOF.  This doesn't work when
!        READLINE_CALLBACKS is defined, so hitting a series of ^Ds will
!        erase all the chars on the line and then return EOF. */
!       if (((c == _rl_eof_char && lastc != c) || c == EOF) && rl_end == 0)
        {
  #if defined (READLINE_CALLBACKS)




Reply via email to