commit bash-20110422 snapshot

This commit is contained in:
Chet Ramey
2011-12-29 13:07:00 -05:00
parent f6da9f8595
commit 714122265d
15 changed files with 9728 additions and 40852 deletions
+31
View File
@@ -11503,3 +11503,34 @@ trap.c
doc/{bash.1,bashref.texi}
- make it clear that enabling monitor mode means that all jobs run in
separate process groups
4/18
----
builtins/fc.def
- update fix of 4/15/2010 to not take saved_command_line_count into
account when stepping down the history list to make sure that
last_hist indexes something that is valid. Fixes bug reported by
<piuma@piumalab.org>
4/19
----
builtins/fc.def
- fc_gethnum: make sure the calculation to decide the last history
entry is exactly the same as fc_builtin. Fixes bug uncovered by
fix of 4/18 to stop seg fault
4/22
----
lib/readline/terminal.c
- change _rl_enable_meta_key to set a flag indicating that it sent the
enable-meta sequence
- _rl_disable_meta_key: new function to turn off meta mode after we
turned it on with _rl_enable_meta_key
lib/readline/rlprivate.h
- extern declaration for _rl_disable_meta_key
configure.in
- if not cross-compiling, set CFLAGS_FOR_BUILD from any CFLAGS inherited
from the environment. Fixes HP/UX build problem reported by
"Daniel Richard G." <skunk@iSKUNK.ORG>
+1
View File
@@ -1111,6 +1111,7 @@ tests/type.right f
tests/type1.sub f
tests/type2.sub f
tests/type3.sub f
tests/type4.sub f
tests/varenv.right f
tests/varenv.sh f
tests/varenv1.sub f
+3822 -19505
View File
File diff suppressed because it is too large Load Diff
+20 -11
View File
@@ -15,49 +15,58 @@
'configure.in'
],
{
'AM_PROG_F77_C_O' => 1,
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'AM_PROG_F77_C_O' => 1,
'AC_INIT' => 1,
'AC_CANONICAL_TARGET' => 1,
'm4_pattern_forbid' => 1,
'_AM_COND_IF' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_SUBST' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_FC_SRCEXT' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AM_PATH_GUILE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_CONFIG_LINKS' => 1,
'm4_sinclude' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_NLS' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'_m4_warn' => 1,
'AM_PROG_CXX_C_O' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'_AM_COND_ENDIF' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'AM_PROG_MOC' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'LT_INIT' => 1,
'AM_PROG_AR' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
'AH_OUTPUT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AM_PROG_CC_C_O' => 1,
'm4_pattern_allow' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'AM_CONDITIONAL' => 1,
'm4_pattern_allow' => 1,
'AM_PROG_CC_C_O' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_POT_TOOLS' => 1,
'm4_include' => 1,
'_AM_COND_ELSE' => 1,
'AC_SUBST_TRACE' => 1
+1975 -1885
View File
File diff suppressed because it is too large Load Diff
+13 -5
View File
@@ -1,7 +1,7 @@
This file is fc.def, from which is created fc.c.
It implements the builtin "fc" in Bash.
Copyright (C) 1987-2010 Free Software Foundation, Inc.
Copyright (C) 1987-2011 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -85,7 +85,7 @@ $END
extern int errno;
#endif /* !errno */
extern int current_command_line_count, saved_command_line_count;
extern int current_command_line_count;
extern int literal_history;
extern int posixly_correct;
extern int subshell_environment, interactive_shell;
@@ -304,7 +304,7 @@ fc_builtin (list)
last_hist = i - rh - hist_last_line_added;
/* XXX */
if (saved_command_line_count > 0 && i == last_hist && hlist[last_hist] == 0)
if (i == last_hist && hlist[last_hist] == 0)
while (last_hist >= 0 && hlist[last_hist] == 0)
last_hist--;
if (last_hist < 0)
@@ -475,7 +475,7 @@ fc_gethnum (command, hlist)
HIST_ENTRY **hlist;
{
int sign, n, clen, rh;
register int i, j;
register int i, j, last_hist;
register char *s;
sign = 1;
@@ -495,7 +495,15 @@ fc_gethnum (command, hlist)
has been enabled (interactive or not) should use it in the last_hist
calculation as if it were on. */
rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
i -= rh + hist_last_line_added;
last_hist = i - rh - hist_last_line_added;
if (i == last_hist && hlist[last_hist] == 0)
while (last_hist >= 0 && hlist[last_hist] == 0)
last_hist--;
if (last_hist < 0)
return (-1);
i = last_hist;
/* No specification defaults to most recent command. */
if (command == NULL)
Vendored
+3758 -19441
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_REVISION([for Bash 4.2, version 4.039])dnl
AC_REVISION([for Bash 4.2, version 4.040])dnl
define(bashvers, 4.2)
define(relstatus, maint)
@@ -477,6 +477,9 @@ fi
if test "X$cross_compiling" = "Xno"; then
CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"}
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
if test -z "$auto_cflags"; then
CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
fi
else
CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
+1
View File
@@ -340,6 +340,7 @@ extern int _rl_output_character_function PARAMS((int));
extern void _rl_output_some_chars PARAMS((const char *, int));
extern int _rl_backspace PARAMS((int));
extern void _rl_enable_meta_key PARAMS((void));
extern void _rl_disable_meta_key PARAMS((void));
extern void _rl_control_keypad PARAMS((int));
extern void _rl_set_cursor PARAMS((int, int));
+18 -1
View File
@@ -725,12 +725,29 @@ rl_ding ()
/* */
/* **************************************************************** */
static int enabled_meta = 0; /* flag indicating we enabled meta mode */
void
_rl_enable_meta_key ()
{
#if !defined (__DJGPP__)
if (term_has_meta && _rl_term_mm)
tputs (_rl_term_mm, 1, _rl_output_character_function);
{
tputs (_rl_term_mm, 1, _rl_output_character_function);
enabled_meta = 1;
}
#endif
}
void
_rl_disable_meta_key ()
{
#if !defined (__DJGPP__)
if (term_has_meta && _rl_term_mo && enabled_meta)
{
tputs (_rl_term_mo, 1, _rl_output_character_function);
enabled_meta = 0;
}
#endif
}
+2 -2
View File
@@ -1,6 +1,6 @@
/* patchlevel.h -- current bash patch level */
/* Copyright (C) 2001-2010 Free Software Foundation, Inc.
/* Copyright (C) 2001-2011 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
#define PATCHLEVEL 8
#define PATCHLEVEL 10
#endif /* _PATCHLEVEL_H_ */
+1 -1
View File
@@ -1,6 +1,6 @@
/* print_command -- A way to make readable commands from a command tree. */
/* Copyright (C) 1989-2010 Free Software Foundation, Inc.
/* Copyright (C) 1989-2011 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
+37
View File
@@ -96,3 +96,40 @@ EOF
a:file
b:file
c:file
bb is a function
bb ()
{
( cat <<EOF
foo
bar
EOF
)
echo after subshell
}
mkcoprocs is a function
mkcoprocs ()
{
coproc a {
cat <<EOF1
producer 1
EOF1
}
coproc b {
cat <<EOF2
producer 2
EOF2
}
echo "coprocs created"
}
mkcoprocs is a function
mkcoprocs ()
{
coproc COPROC ( b cat <<EOF
heredoc
body
EOF
)
echo "coprocs created"
}
+2
View File
@@ -93,3 +93,5 @@ ${THIS_SH} type1.sub
${THIS_SH} type2.sub
${THIS_SH} type3.sub
${THIS_SH} type4.sub
+43
View File
@@ -0,0 +1,43 @@
bb()
{
(
cat << EOF
foo
bar
EOF
)
echo after subshell
}
type bb
mkcoprocs()
{
coproc a { cat <<EOF1
producer 1
EOF1
}
coproc b { cat << EOF2
producer 2
EOF2
}
echo "coprocs created"
}
type mkcoprocs
unset -f mkcoprocs
mkcoprocs()
{
coproc ( b cat << EOF
heredoc
body
EOF
)
echo "coprocs created"
}
type mkcoprocs