fix for LINENO after shell errors; fix for crash with !&; new read -E option

This commit is contained in:
Chet Ramey
2023-08-18 16:41:55 -04:00
parent 50ffbc9ddc
commit b64a7d8cbe
43 changed files with 7277 additions and 6868 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ info dvi ps pdf html:
# update these someday
$(OBJECTS): ${top_builddir}/config.h libgnuintl.h
$(OBJECTS): ${top_builddir}/config.h libgnuintl.h libintl.h
bindtextdom.o dcgettext.o dcigettext.o dcngettext.o dgettext.o dngettext.o finddomain.o gettext.o intl-compat.o loadmsgcat.o localealias.o ngettext.o textdomain.o: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
dcigettext.o loadmsgcat.o: $(srcdir)/hash-string.h
explodename.o l10nflist.o: $(srcdir)/loadinfo.h
+4 -4
View File
@@ -288,14 +288,14 @@ current one.
The line selected from the history is called the @dfn{event},
and the portions of that line that are acted upon are called @dfn{words}.
The dfn{event designator} selects the event, the optional
The line is broken into words in the same fashion
that Bash does, so that several words
surrounded by quotes are considered one word.
The @dfn{event designator} selects the event, the optional
@dfn{word designator} selects words from the event, and
various optional @dfn{modifiers} are available to manipulate the
selected words.
The line is broken into words in the same fashion
that Bash does, so that several words
surrounded by quotes are considered one word.
History expansions are introduced by the appearance of the
history expansion character, which is @samp{!} by default.
History expansions may appear anywhere in the input, but do not nest.
+15 -13
View File
@@ -49,6 +49,8 @@
extern int errno;
#endif /* !errno */
int _rl_use_tty_xon_xoff = 1;
rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal;
rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal;
@@ -275,15 +277,16 @@ prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop)
}
#if defined (TIOCGETC)
# if defined (USE_XON_XOFF)
/* Get rid of terminal output start and stop characters. */
tiop->tchars.t_stopc = -1; /* C-s */
tiop->tchars.t_startc = -1; /* C-q */
if (_rl_use_tty_xon_xoff == 0)
{
/* Get rid of terminal output start and stop characters. */
tiop->tchars.t_stopc = -1; /* C-s */
tiop->tchars.t_startc = -1; /* C-q */
/* If there is an XON character, bind it to restart the output. */
if (oldtio.tchars.t_startc != -1)
rl_bind_key (oldtio.tchars.t_startc, rl_restart_output);
# endif /* USE_XON_XOFF */
/* If there is an XON character, bind it to restart the output. */
if (oldtio.tchars.t_startc != -1)
rl_bind_key (oldtio.tchars.t_startc, rl_restart_output);
}
/* If there is an EOF char, bind _rl_eof_char to it. */
if (oldtio.tchars.t_eofc != -1)
@@ -514,14 +517,13 @@ prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop)
if ((unsigned char) oldtio.c_cc[VEOF] != (unsigned char) _POSIX_VDISABLE)
_rl_eof_char = oldtio.c_cc[VEOF];
#if defined (USE_XON_XOFF)
if (_rl_use_tty_xon_xoff == 0)
#if defined (IXANY)
tiop->c_iflag &= ~(IXON | IXANY);
tiop->c_iflag &= ~(IXON | IXANY);
#else
/* `strict' Posix systems do not define IXANY. */
tiop->c_iflag &= ~IXON;
/* `strict' Posix systems do not define IXANY. */
tiop->c_iflag &= ~IXON;
#endif /* IXANY */
#endif /* USE_XON_XOFF */
/* Only turn this off if we are using all 8 bits. */
if (((tiop->c_cflag & CSIZE) == CS8) || meta_flag)
+1 -1
View File
@@ -56,7 +56,7 @@
#if defined (HAVE_LOCALE_CHARSET)
extern const char *locale_charset (void);
#else
extern char *get_locale_var (char *);
extern char *get_locale_var (const char *);
#endif
extern int locale_utf8locale;