]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
commit readline-20150831 snapshot
authorChet Ramey <chet.ramey@case.edu>
Mon, 21 Sep 2015 20:34:20 +0000 (16:34 -0400)
committerChet Ramey <chet.ramey@case.edu>
Mon, 21 Sep 2015 20:34:20 +0000 (16:34 -0400)
CHANGELOG
Makefile.in
configure
configure.ac
doc/hsuser.texi
examples/Makefile.in
input.c
misc.c
text.c
vi_mode.c

index 9d03dca114bcf25d45a0b231d4fc27ef37fd5f2a..67945911cf4479b6e6fa540f5805906b3e21c7c8 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1299,3 +1299,8 @@ configure.ac,config.h.in
                                   ----
 configure.ac
        - bump library version to 7.0 because of addition of rl_callback_sigcleanup
+
+                                  8/26
+                                  ----
+configure.ac,Makefile.in,examples/Makefile.in
+       - remove references to purify
index 272a329ad886110b6f0a47f414ff2926d0aa1441..6522573631bede5d725dfd022256f24a76a42a71 100644 (file)
@@ -45,8 +45,6 @@ RM = rm -f
 CP = cp
 MV = mv
 
-PURIFY = @PURIFY@
-
 @SET_MAKE@
 SHELL = @MAKE_SHELL@
 
index 1d80b940e9d168cd393b55d7007b08f17abd858a..655a451ab8d891bf6681b2b44f78f4ef9feb11fa 100755 (executable)
--- a/configure
+++ b/configure
@@ -631,7 +631,6 @@ LOCAL_DEFS
 LOCAL_LDFLAGS
 LOCAL_CFLAGS
 BUILD_DIR
-PURIFY
 SHARED_INSTALL_TARGET
 STATIC_INSTALL_TARGET
 SHARED_TARGET
@@ -722,7 +721,6 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 with_curses
-with_purify
 enable_multibyte
 enable_shared
 enable_static
@@ -1360,7 +1358,6 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-curses           use the curses library instead of the termcap
                           library
-  --with-purify           configure to postprocess with purify
 
 Some influential environment variables:
   CC          C compiler command
@@ -2367,7 +2364,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 opt_curses=no
-opt_purify=no
 
 
 # Check whether --with-curses was given.
@@ -2376,22 +2372,10 @@ if test "${with_curses+set}" = set; then :
 fi
 
 
-# Check whether --with-purify was given.
-if test "${with_purify+set}" = set; then :
-  withval=$with_purify; opt_purify=$withval
-fi
-
-
 if test "$opt_curses" = "yes"; then
        prefer_curses=yes
 fi
 
-if test "$opt_purify" = yes; then
-       PURIFY="purify"
-else
-       PURIFY=
-fi
-
 opt_multibyte=yes
 opt_static_libs=yes
 opt_shared_libs=yes
@@ -6624,7 +6608,6 @@ esac
 
 
 
-
 ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc"
 
 ac_config_commands="$ac_config_commands default"
index 42e21fa475e9af89875a45342ef8d6a205a3263d..64f33865b46b55d51c2d9ce10d0cc90a115c547a 100644 (file)
@@ -39,22 +39,14 @@ AC_CANONICAL_BUILD
 
 dnl configure defaults
 opt_curses=no
-opt_purify=no
 
 dnl arguments to configure
 AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
-AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
 
 if test "$opt_curses" = "yes"; then
        prefer_curses=yes
 fi
 
-if test "$opt_purify" = yes; then
-       PURIFY="purify"
-else
-       PURIFY=
-fi
-
 dnl option parsing for optional features
 opt_multibyte=yes
 opt_static_libs=yes
@@ -283,7 +275,6 @@ case "$BUILD_DIR" in
 *)     ;;
 esac
 
-AC_SUBST(PURIFY)
 AC_SUBST(BUILD_DIR)
 
 AC_SUBST(CFLAGS)
index 3aa6cfa2453384b7a888355664d40532c6dd9fed..dcd8daed9cbe103ca37c7f164ffec6f7b332db2b 100644 (file)
@@ -249,6 +249,11 @@ the input stream, making it easy to repeat commands, insert the
 arguments to a previous command into the current input line, or
 fix errors in previous commands quickly.
 
+@ifset BashFeatures
+History expansion is performed immediately after a complete line
+is read, before the shell breaks it into words.
+@end ifset
+
 History expansion takes place in two parts.  The first is to determine
 which line from the history list should be used during substitution.
 The second is to select portions of that line for inclusion into the
@@ -262,7 +267,9 @@ History expansions are introduced by the appearance of the
 history expansion character, which is @samp{!} by default.
 @ifset BashFeatures
 Only @samp{\} and @samp{'} may be used to escape the history expansion
-character.
+character, but the history expansion character is
+also treated as quoted if it immediately precedes the closing double quote
+in a double-quoted string. 
 @end ifset
 
 @ifset BashFeatures
index 2d8f94810fe6810192451865972517a0a0919d9c..572365815f64341f0c9430bf90c25fae6457862c 100644 (file)
@@ -56,8 +56,6 @@ INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
 CCFLAGS  = $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 LDFLAGS = -g -L.. @LDFLAGS@
 
-PURIFY = @PURIFY@
-
 READLINE_LIB = ../libreadline.a
 HISTORY_LIB = ../libhistory.a
 
@@ -104,40 +102,40 @@ uninstall:
        -rmdir $(DESTDIR)$(installdir)
 
 rl$(EXEEXT): rl.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 rlbasic$(EXEEXT): rlbasic.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlbasic.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ rlbasic.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 rlcat$(EXEEXT): rlcat.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 rlevent$(EXEEXT): rlevent.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 fileman$(EXEEXT): fileman.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 rltest$(EXEEXT): rltest.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 rl-callbacktest$(EXEEXT): rl-callbacktest.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl-callbacktest.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ rl-callbacktest.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 rlptytest$(EXEEXT): rlptytest.o $(READLINE_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 rlversion$(EXEEXT): rlversion.o $(READLINE_LIB)
        $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
 
 histexamp$(EXEEXT): histexamp.o $(HISTORY_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
 
 hist_erasedups$(EXEEXT): hist_erasedups.o $(HISTORY_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ hist_erasedups.o -lhistory $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ hist_erasedups.o -lhistory $(TERMCAP_LIB)
 
 hist_purgecmd$(EXEEXT): hist_purgecmd.o $(HISTORY_LIB)
-       $(PURIFY) $(CC) $(LDFLAGS) -o $@ hist_purgecmd.o -lhistory $(TERMCAP_LIB)
+       $(CC) $(LDFLAGS) -o $@ hist_purgecmd.o -lhistory $(TERMCAP_LIB)
 
 clean mostlyclean:
        $(RM) $(OBJECTS) $(OTHEROBJ)
diff --git a/input.c b/input.c
index bbb39478f94544be28664b24e73b2e820f97352e..84faf5a844b0c956f480ca78f6c89964b2b6ab60 100644 (file)
--- a/input.c
+++ b/input.c
@@ -1,6 +1,6 @@
 /* input.c -- character input functions for readline. */
 
-/* Copyright (C) 1994-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2015 Free Software Foundation, Inc.
 
    This file is part of the GNU Readline Library (Readline), a library
    for reading lines of text with interactive input and history editing.      
@@ -216,8 +216,8 @@ rl_gather_tyi ()
 #endif
 
   result = -1;
-#if defined (FIONREAD)
   errno = 0;
+#if defined (FIONREAD)
   result = ioctl (tty, FIONREAD, &chars_avail);
   if (result == -1 && errno == EIO)
     return -1;
@@ -236,6 +236,8 @@ rl_gather_tyi ()
       fcntl (tty, F_SETFL, tem);
       if (chars_avail == -1 && errno == EAGAIN)
        return 0;
+      if (chars_avail == -1 && errno == EIO)
+       return -1;
       if (chars_avail == 0)    /* EOF */
        {
          rl_stuff_char (EOF);
@@ -464,7 +466,7 @@ rl_read_key ()
              if ((r = rl_gather_tyi ()) < 0)   /* XXX - EIO */
                {
                  rl_done = 1;
-                 return ('\n');
+                 return (errno == EIO ? (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF) : '\n');
                }
              else if (r > 0)                   /* read something */
                continue;
diff --git a/misc.c b/misc.c
index a890cdadf9a32c87ffe3a33491a6ee4677bf3ea8..c1adff894116d5e0451daa50adad347ece4c4abb 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -128,7 +128,7 @@ _rl_arg_dispatch (cxt, c)
 
   /* If we see a key bound to `universal-argument' after seeing digits,
       it ends the argument but is otherwise ignored. */
-  if (_rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+  if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
     {
       if ((cxt & NUM_SAWDIGITS) == 0)
        {
@@ -268,6 +268,8 @@ _rl_arg_callback (cxt)
   int c, r;
 
   c = _rl_arg_getchar ();
+  if (c < 0)
+    return (1);                /* EOF */
 
   if (_rl_argcxt & NUM_READONE)
     {
diff --git a/text.c b/text.c
index f2bb22466c5ae3732f5d8f3e42730afc76216fd1..c623e0bf851bde793607ca5ac026b90ec1f18898 100644 (file)
--- a/text.c
+++ b/text.c
@@ -610,7 +610,7 @@ rl_skip_csi_sequence (count, key)
   while (ch >= 0x20 && ch < 0x40);
   RL_UNSETSTATE (RL_STATE_MOREINPUT);
 
-  return 0;
+  return (ch < 0);
 }
 
 int
@@ -622,6 +622,8 @@ rl_arrow_keys (count, c)
   RL_SETSTATE(RL_STATE_MOREINPUT);
   ch = rl_read_key ();
   RL_UNSETSTATE(RL_STATE_MOREINPUT);
+  if (ch < 0)
+    return (1);
 
   switch (_rl_to_upper (ch))
     {
@@ -925,7 +927,12 @@ rl_insert (count, c)
     }
 
   if (n != (unsigned short)-2)         /* -2 = sentinel value for having inserted N */
-    r = rl_execute_next (n);
+    {
+      /* setting rl_pending_input inhibits setting rl_last_func so we do it
+        ourselves here */
+      rl_last_func = rl_insert; 
+      r = rl_execute_next (n);
+    }
 
   return r;
 }
index f4cce5db4405df3aa4c214fff47069ad9b880f1f..c3fa3342b6d4a0fa9d88b25e87cc97b5b56e0ad4 100644 (file)
--- a/vi_mode.c
+++ b/vi_mode.c
@@ -1280,8 +1280,8 @@ _rl_vi_domove_callback (m)
   int c, r;
 
   m->motion = c = rl_vi_domove_getchar (m);
-  /* XXX - what to do if this returns -1?  Should we return 1 for eof to
-     callback code? */
+  if (c < 0)
+    return 1;          /* EOF */
   r = rl_domove_read_callback (m);
 
   return ((r == 0) ? r : 1);   /* normalize return values */