----
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
CP = cp
MV = mv
-PURIFY = @PURIFY@
-
@SET_MAKE@
SHELL = @MAKE_SHELL@
LOCAL_LDFLAGS
LOCAL_CFLAGS
BUILD_DIR
-PURIFY
SHARED_INSTALL_TARGET
STATIC_INSTALL_TARGET
SHARED_TARGET
ac_user_opts='
enable_option_checking
with_curses
-with_purify
enable_multibyte
enable_shared
enable_static
--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
opt_curses=no
-opt_purify=no
# Check whether --with-curses was given.
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
-
ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc"
ac_config_commands="$ac_config_commands default"
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
*) ;;
esac
-AC_SUBST(PURIFY)
AC_SUBST(BUILD_DIR)
AC_SUBST(CFLAGS)
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
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
CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LDFLAGS = -g -L.. @LDFLAGS@
-PURIFY = @PURIFY@
-
READLINE_LIB = ../libreadline.a
HISTORY_LIB = ../libhistory.a
-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)
/* 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.
#endif
result = -1;
-#if defined (FIONREAD)
errno = 0;
+#if defined (FIONREAD)
result = ioctl (tty, FIONREAD, &chars_avail);
if (result == -1 && errno == EIO)
return -1;
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);
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;
/* 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)
{
int c, r;
c = _rl_arg_getchar ();
+ if (c < 0)
+ return (1); /* EOF */
if (_rl_argcxt & NUM_READONE)
{
while (ch >= 0x20 && ch < 0x40);
RL_UNSETSTATE (RL_STATE_MOREINPUT);
- return 0;
+ return (ch < 0);
}
int
RL_SETSTATE(RL_STATE_MOREINPUT);
ch = rl_read_key ();
RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (ch < 0)
+ return (1);
switch (_rl_to_upper (ch))
{
}
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;
}
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 */