mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-30 00:49:57 +02:00
commit bash-20080424 snapshot
This commit is contained in:
+22
-1
@@ -15331,7 +15331,7 @@ lib/readline/rltty.c
|
||||
3/6
|
||||
---
|
||||
{MANIFEST,Makefile.in},lib/sh/{casemod,uconvert,ufuncs}.c
|
||||
- new library sources from bash-4.0-devel triee
|
||||
- new library sources from bash-4.0-devel tree
|
||||
|
||||
lib/sh/spell.c
|
||||
- moved cdspell() here from builtins/cd.def, renamed dirspell()
|
||||
@@ -15592,3 +15592,24 @@ expr.c
|
||||
- fix operator precendence in expcond(): term after the `:' is
|
||||
a conditional-expression, not a logical-OR-expression (using C
|
||||
terminology). Bug reported by <archimerged@gmail.com>
|
||||
|
||||
4/22
|
||||
----
|
||||
bashintl.h
|
||||
- new P_ define for using ngettext to decide on plural forms
|
||||
(currently unused)
|
||||
|
||||
4/25
|
||||
----
|
||||
execute_cmd.c
|
||||
- in execute_disk_command, if the command is not found, search for
|
||||
a shell function named `command_not_found_handle' and call it
|
||||
with the words in the command as arguments. Inspired by Debian
|
||||
feature.
|
||||
|
||||
doc/{bash.1,bashref.texi}
|
||||
- document new command_not_found_handle behavior in COMMAND EXECUTION
|
||||
section
|
||||
|
||||
configure.in
|
||||
- change default version to bash-4.0-devel
|
||||
|
||||
@@ -15585,3 +15585,31 @@ MANIFEST,Makefile.in,builtins/Makefile.in
|
||||
|
||||
arrayfunc.[ch]
|
||||
- new function, bind_array_element, to support mapfile builtin
|
||||
|
||||
4/20
|
||||
----
|
||||
expr.c
|
||||
- fix operator precendence in expcond(): term after the `:' is
|
||||
a conditional-expression, not a logical-OR-expression (using C
|
||||
terminology). Bug reported by <archimerged@gmail.com>
|
||||
|
||||
4/22
|
||||
----
|
||||
bashintl.h
|
||||
- new P_ define for using ngettext to decide on plural forms
|
||||
(currently unused)
|
||||
|
||||
4/25
|
||||
----
|
||||
execute_cmd.c
|
||||
- in execute_disk_command, if the command is not found, search for
|
||||
a shell function named `command_not_found_handle' and call it
|
||||
with the words in the command as arguments. Inspired by Debian
|
||||
feature.
|
||||
|
||||
doc/{bash.1,bashref.texi}
|
||||
- document new command_not_found_handle behavior in COMMAND EXECUTION
|
||||
section
|
||||
|
||||
configure.in
|
||||
- change default version to bash-4.0-devel
|
||||
|
||||
@@ -465,24 +465,55 @@ po/LINGUAS f
|
||||
po/Makefile.in.in f
|
||||
po/Makevars f
|
||||
po/POTFILES.in f
|
||||
po/README f
|
||||
po/Rules-builtins f
|
||||
po/Rules-quot f
|
||||
po/bash.pot f
|
||||
po/boldquot.sed f
|
||||
po/en@quot.header f
|
||||
po/en@boldquot.gmo f
|
||||
po/en@boldquot.header f
|
||||
po/en@quot.po f
|
||||
po/en@boldquot.po f
|
||||
po/en@quot.gmo f
|
||||
po/en@boldquot.gmo f
|
||||
po/bg.po f
|
||||
po/en@quot.header f
|
||||
po/en@quot.po f
|
||||
po/af.gmo f
|
||||
po/af.po f
|
||||
po/bg.gmo f
|
||||
po/ru.po f
|
||||
po/bg.po f
|
||||
po/ca.gmo f
|
||||
po/ca.po f
|
||||
po/de.gmo f
|
||||
po/de.po f
|
||||
po/eo.gmo f
|
||||
po/eo.po f
|
||||
po/es.gmo f
|
||||
po/es.po f
|
||||
po/et.gmo f
|
||||
po/et.po f
|
||||
po/fr.gmo f
|
||||
po/fr.po f
|
||||
po/hu.gmo f
|
||||
po/hu.po f
|
||||
po/ja.gmo f
|
||||
po/ja.po f
|
||||
po/nl.gmo f
|
||||
po/nl.po f
|
||||
po/pl.gmo f
|
||||
po/pl.po f
|
||||
po/pt_BR.gmo f
|
||||
po/pt_BR.po f
|
||||
po/ro.gmo f
|
||||
po/ro.po f
|
||||
po/ru.gmo f
|
||||
po/sk.po f
|
||||
po/ru.po f
|
||||
po/sk.gmo f
|
||||
po/sv.po f
|
||||
po/sk.po f
|
||||
po/sv.gmo f
|
||||
po/sv.po f
|
||||
po/tr.gmo f
|
||||
po/tr.po f
|
||||
po/vi.gmo f
|
||||
po/vi.po f
|
||||
po/insert-header.sin f
|
||||
po/quot.sed f
|
||||
po/remove-potcdate.sin f
|
||||
|
||||
+12
-12
@@ -1,7 +1,7 @@
|
||||
@%:@! /bin/sh
|
||||
@%:@ From configure.in for Bash 3.2, version 3.197.
|
||||
@%:@ From configure.in for Bash 4.0, version 4.001.
|
||||
@%:@ Guess values for system-dependent variables and create Makefiles.
|
||||
@%:@ Generated by GNU Autoconf 2.60 for bash 3.2-maint.
|
||||
@%:@ Generated by GNU Autoconf 2.60 for bash 4.0-devel.
|
||||
@%:@
|
||||
@%:@ Report bugs to <bug-bash@gnu.org>.
|
||||
@%:@
|
||||
@@ -560,8 +560,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='3.2-maint'
|
||||
PACKAGE_STRING='bash 3.2-maint'
|
||||
PACKAGE_VERSION='4.0-devel'
|
||||
PACKAGE_STRING='bash 4.0-devel'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
|
||||
ac_unique_file="shell.h"
|
||||
@@ -1267,7 +1267,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures bash 3.2-maint to adapt to many kinds of systems.
|
||||
\`configure' configures bash 4.0-devel to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1332,7 +1332,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 3.2-maint:";;
|
||||
short | recursive ) echo "Configuration of bash 4.0-devel:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1495,7 +1495,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 3.2-maint
|
||||
bash configure 4.0-devel
|
||||
generated by GNU Autoconf 2.60
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1509,7 +1509,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bash $as_me 3.2-maint, which was
|
||||
It was created by bash $as_me 4.0-devel, which was
|
||||
generated by GNU Autoconf 2.60. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -1902,8 +1902,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
BASHVERS=3.2
|
||||
RELSTATUS=maint
|
||||
BASHVERS=4.0
|
||||
RELSTATUS=devel
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
@@ -32259,7 +32259,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by bash $as_me 3.2-maint, which was
|
||||
This file was extended by bash $as_me 4.0-devel, which was
|
||||
generated by GNU Autoconf 2.60. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -32312,7 +32312,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
bash config.status 3.2-maint
|
||||
bash config.status 4.0-devel
|
||||
configured by $0, generated by GNU Autoconf 2.60,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
+43
-43
@@ -15,26 +15,26 @@
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
@@ -52,22 +52,22 @@
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_SUBST_TRACE' => 1,
|
||||
'AC_INIT' => 1,
|
||||
@@ -79,48 +79,48 @@
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
@@ -140,19 +140,19 @@
|
||||
{
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
@@ -171,17 +171,17 @@
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
@@ -203,33 +203,33 @@
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
m4trace:configure.in:30: -1- AC_INIT([bash], [3.2-maint], [bug-bash@gnu.org])
|
||||
m4trace:configure.in:30: -1- AC_INIT([bash], [4.0-devel], [bug-bash@gnu.org])
|
||||
m4trace:configure.in:30: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:30: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:30: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#define N_(msgid) msgid
|
||||
#define D_(d, msgid) dgettext(d, msgid)
|
||||
|
||||
#define P_(m1, m2, n) ngettext(m1, m2, n)
|
||||
|
||||
#if defined (HAVE_SETLOCALE) && !defined (LC_ALL)
|
||||
# undef HAVE_SETLOCALE
|
||||
#endif
|
||||
|
||||
+1
-4
@@ -125,10 +125,7 @@ help_builtin (list)
|
||||
|
||||
if (glob_pattern_p (list->word->word))
|
||||
{
|
||||
if (list->next)
|
||||
printf (_("Shell commands matching keywords `"));
|
||||
else
|
||||
printf (_("Shell commands matching keyword `"));
|
||||
printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
|
||||
print_word_list (list, ", ");
|
||||
printf ("'\n\n");
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ $END
|
||||
|
||||
$BUILTIN select
|
||||
$SHORT_DOC select NAME [in WORDS ... ;] do COMMANDS; done
|
||||
Select words from a list and execute commands..
|
||||
Select words from a list and execute commands.
|
||||
|
||||
The WORDS are expanded, generating a list of words. The
|
||||
set of expanded words is printed on the standard error, each
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.in for Bash 3.2, version 3.197.
|
||||
# From configure.in for Bash 4.0, version 4.001.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.60 for bash 3.2-maint.
|
||||
# Generated by GNU Autoconf 2.60 for bash 4.0-devel.
|
||||
#
|
||||
# Report bugs to <bug-bash@gnu.org>.
|
||||
#
|
||||
@@ -560,8 +560,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='3.2-maint'
|
||||
PACKAGE_STRING='bash 3.2-maint'
|
||||
PACKAGE_VERSION='4.0-devel'
|
||||
PACKAGE_STRING='bash 4.0-devel'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
|
||||
ac_unique_file="shell.h"
|
||||
@@ -1267,7 +1267,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures bash 3.2-maint to adapt to many kinds of systems.
|
||||
\`configure' configures bash 4.0-devel to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1332,7 +1332,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 3.2-maint:";;
|
||||
short | recursive ) echo "Configuration of bash 4.0-devel:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1495,7 +1495,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 3.2-maint
|
||||
bash configure 4.0-devel
|
||||
generated by GNU Autoconf 2.60
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1509,7 +1509,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bash $as_me 3.2-maint, which was
|
||||
It was created by bash $as_me 4.0-devel, which was
|
||||
generated by GNU Autoconf 2.60. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -1902,8 +1902,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
BASHVERS=3.2
|
||||
RELSTATUS=maint
|
||||
BASHVERS=4.0
|
||||
RELSTATUS=devel
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
@@ -32259,7 +32259,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by bash $as_me 3.2-maint, which was
|
||||
This file was extended by bash $as_me 4.0-devel, which was
|
||||
generated by GNU Autoconf 2.60. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -32312,7 +32312,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
bash config.status 3.2-maint
|
||||
bash config.status 4.0-devel
|
||||
configured by $0, generated by GNU Autoconf 2.60,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
dnl
|
||||
dnl Configure script for bash-3.2
|
||||
dnl Configure script for bash-4.0
|
||||
dnl
|
||||
dnl report bugs to chet@po.cwru.edu
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
# Copyright (C) 1987-2007 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1987-2008 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -22,10 +22,10 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
AC_REVISION([for Bash 3.2, version 3.197])dnl
|
||||
AC_REVISION([for Bash 4.0, version 4.001])dnl
|
||||
|
||||
define(bashvers, 3.2)
|
||||
define(relstatus, maint)
|
||||
define(bashvers, 4.0)
|
||||
define(relstatus, devel)
|
||||
|
||||
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
|
||||
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ AC_ARG_ENABLE(bang-history, AC_HELP_STRING([--enable-bang-history], [turn on csh
|
||||
AC_ARG_ENABLE(brace-expansion, AC_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval)
|
||||
AC_ARG_ENABLE(command-timing, AC_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval)
|
||||
AC_ARG_ENABLE(cond-command, AC_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval)
|
||||
AC_ARG_ENABLE(cond-regexp, AC_HELP_STRING([--enable-cond-regexp], [enable extgended regular expression matching in conditional commands]), opt_cond_regexp=$enableval)
|
||||
AC_ARG_ENABLE(cond-regexp, AC_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval)
|
||||
AC_ARG_ENABLE(debugger, AC_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval)
|
||||
AC_ARG_ENABLE(directory-stack, AC_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval)
|
||||
AC_ARG_ENABLE(disabled-builtins, AC_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval)
|
||||
|
||||
@@ -1,441 +1,282 @@
|
||||
*** ../bash-3.2-patched/builtins/read.def 2007-08-25 13:47:07.000000000 -0400
|
||||
--- builtins/read.def 2008-02-09 16:34:39.000000000 -0500
|
||||
*** ../bash-20080221/doc/bashref.texi 2008-02-22 21:44:51.000000000 -0500
|
||||
--- doc/bashref.texi 2008-04-25 12:32:42.000000000 -0400
|
||||
***************
|
||||
*** 1,7 ****
|
||||
This file is read.def, from which is created read.c.
|
||||
It implements the builtin "read" in Bash.
|
||||
*** 681,688 ****
|
||||
waits for each command to terminate in turn. The return status is the
|
||||
exit status of the last command executed.
|
||||
|
||||
! Copyright (C) 1987-2005 Free Software Foundation, Inc.
|
||||
! The control operators @samp{&&} and @samp{||}
|
||||
! denote @sc{and} lists and @sc{or} lists, respectively.
|
||||
An @sc{and} list has the form
|
||||
@example
|
||||
@var{command1} && @var{command2}
|
||||
--- 681,691 ----
|
||||
waits for each command to terminate in turn. The return status is the
|
||||
exit status of the last command executed.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
--- 1,7 ----
|
||||
This file is read.def, from which is created read.c.
|
||||
It implements the builtin "read" in Bash.
|
||||
|
||||
! Copyright (C) 1987-2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
***************
|
||||
*** 23,50 ****
|
||||
|
||||
$BUILTIN read
|
||||
$FUNCTION read_builtin
|
||||
! $SHORT_DOC read [-ers] [-u fd] [-t timeout] [-p prompt] [-a array] [-n nchars] [-d delim] [name ...]
|
||||
! One line is read from the standard input, or from file descriptor FD if the
|
||||
! -u option is supplied, and the first word is assigned to the first NAME,
|
||||
! the second word to the second NAME, and so on, with leftover words assigned
|
||||
! to the last NAME. Only the characters found in $IFS are recognized as word
|
||||
! delimiters. If no NAMEs are supplied, the line read is stored in the REPLY
|
||||
! variable. If the -r option is given, this signifies `raw' input, and
|
||||
! backslash escaping is disabled. The -d option causes read to continue
|
||||
! until the first character of DELIM is read, rather than newline. If the -p
|
||||
! option is supplied, the string PROMPT is output without a trailing newline
|
||||
! before attempting to read. If -a is supplied, the words read are assigned
|
||||
! to sequential indices of ARRAY, starting at zero. If -e is supplied and
|
||||
! the shell is interactive, readline is used to obtain the line. If -n is
|
||||
! supplied with a non-zero NCHARS argument, read returns after NCHARS
|
||||
! characters have been read. The -s option causes input coming from a
|
||||
! terminal to not be echoed.
|
||||
! @sc{and} and @sc{or} lists are sequences of one or more pipelines
|
||||
! separated by the control operators @samp{&&} and @samp{||},
|
||||
! respectively. @sc{and} and @sc{or} lists are executed with left
|
||||
! associativity.
|
||||
!
|
||||
! The -t option causes read to time out and return failure if a complete line
|
||||
! of input is not read within TIMEOUT seconds. If the TMOUT variable is set,
|
||||
! its value is the default timeout. The return code is zero, unless end-of-file
|
||||
! is encountered, read times out, or an invalid file descriptor is supplied as
|
||||
! the argument to -u.
|
||||
$END
|
||||
An @sc{and} list has the form
|
||||
@example
|
||||
@var{command1} && @var{command2}
|
||||
***************
|
||||
*** 2298,2304 ****
|
||||
(see the description of @code{hash} in @ref{Bourne Shell Builtins}).
|
||||
A full search of the directories in @env{$PATH}
|
||||
is performed only if the command is not found in the hash table.
|
||||
! If the search is unsuccessful, the shell prints an error
|
||||
message and returns an exit status of 127.
|
||||
|
||||
#include <config.h>
|
||||
--- 23,57 ----
|
||||
@item
|
||||
--- 2301,2312 ----
|
||||
(see the description of @code{hash} in @ref{Bourne Shell Builtins}).
|
||||
A full search of the directories in @env{$PATH}
|
||||
is performed only if the command is not found in the hash table.
|
||||
! If the search is unsuccessful, the shell searches for a defined shell
|
||||
! function named @code{command_not_found_handle}.
|
||||
! If that function exists, it is invoked with the original command and
|
||||
! the original command's arguments as its arguments, and the function's
|
||||
! exit status becomes the exit status of the shell.
|
||||
! If that function is not defined, the shell prints an error
|
||||
message and returns an exit status of 127.
|
||||
|
||||
$BUILTIN read
|
||||
$FUNCTION read_builtin
|
||||
! $SHORT_DOC read [-ers] [-a array] [-d delim] [-n nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
|
||||
! Reads a single line from the standard input, or from file descriptor FD
|
||||
! if the -u option is supplied. The line is split into fields as with word
|
||||
! splitting, and the first word is assigned to the first NAME, the second
|
||||
! word to the second NAME, and so on, with any leftover words assigned to
|
||||
! the last NAME. Only the characters found in $IFS are recognized as word
|
||||
! delimiters.
|
||||
@item
|
||||
***************
|
||||
*** 3129,3134 ****
|
||||
--- 3137,3143 ----
|
||||
Readline initialization file (@pxref{Readline Init File}),
|
||||
but each binding or command must be passed as a separate argument; e.g.,
|
||||
@samp{"\C-x\C-r":re-read-init-file}.
|
||||
+
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
@table @code
|
||||
***************
|
||||
*** 3262,3268 ****
|
||||
|
||||
The @option{-p} option will display the attributes and values of each
|
||||
@var{name}.
|
||||
! When @option{-p} is used, additional options are ignored.
|
||||
The @option{-F} option inhibits the display of function definitions;
|
||||
only the function name and attributes are printed.
|
||||
If the @code{extdebug} shell option is enabled using @code{shopt}
|
||||
--- 3271,3286 ----
|
||||
|
||||
The @option{-p} option will display the attributes and values of each
|
||||
@var{name}.
|
||||
! When @option{-p} is used with @var{name} arguments, additional options
|
||||
! are ignored.
|
||||
!
|
||||
! If no NAMEs are supplied, the line read is stored in the REPLY variable.
|
||||
! When @option{-p} is supplied without @var{name} arguments, @code{declare}
|
||||
! will display the attributes and values of all variables having the
|
||||
! attributes specified by the additional options.
|
||||
! If no other options are supplied with @option{-p}, @code{declare} will
|
||||
! display the attributes and values of all shell variables. The @option{-f}
|
||||
! option will restrict the display to shell functions.
|
||||
!
|
||||
! Options:
|
||||
! -a array assign the words read to sequential indices of the array
|
||||
! variable ARRAY, starting at zero
|
||||
! -d delim continue until the first character of DELIM is read, rather
|
||||
! than newline
|
||||
! -e use Readline to obtain the line in an interactive shell
|
||||
! -n nchars return after reading NCHARS characters rather than waiting
|
||||
! for a newline
|
||||
! -p prompt output the string PROMPT without a trailing newline before
|
||||
! attempting to read
|
||||
! -r do not allow backslashes to escape any characters
|
||||
! -s do not echo input coming from a terminal
|
||||
! -t timeout time out and return failure if a complete line of input is
|
||||
! not read withint TIMEOUT seconds. The value of the TMOUT
|
||||
! variable is the default timeout.
|
||||
! -u fd read from file descriptor FD instead of the standard input
|
||||
The @option{-F} option inhibits the display of function definitions;
|
||||
only the function name and attributes are printed.
|
||||
If the @code{extdebug} shell option is enabled using @code{shopt}
|
||||
***************
|
||||
*** 3400,3413 ****
|
||||
@item help
|
||||
@btindex help
|
||||
@example
|
||||
! help [-s] [@var{pattern}]
|
||||
@end example
|
||||
Display helpful information about builtin commands.
|
||||
If @var{pattern} is specified, @code{help} gives detailed help
|
||||
on all commands matching @var{pattern}, otherwise a list of
|
||||
the builtins is printed.
|
||||
! The @option{-s} option restricts the information displayed to a short
|
||||
! usage synopsis.
|
||||
The return status is zero unless no command matches @var{pattern}.
|
||||
|
||||
@item let
|
||||
--- 3418,3441 ----
|
||||
@item help
|
||||
@btindex help
|
||||
@example
|
||||
! help [-dms] [@var{pattern}]
|
||||
@end example
|
||||
Display helpful information about builtin commands.
|
||||
If @var{pattern} is specified, @code{help} gives detailed help
|
||||
on all commands matching @var{pattern}, otherwise a list of
|
||||
the builtins is printed.
|
||||
!
|
||||
! The return code is zero, unless end-of-file is encountered, read times out,
|
||||
! or an invalid file descriptor is supplied as the argument to -u.
|
||||
$END
|
||||
|
||||
#include <config.h>
|
||||
***************
|
||||
*** 87,92 ****
|
||||
--- 94,105 ----
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
+ struct ttsave
|
||||
+ {
|
||||
+ int fd;
|
||||
+ TTYSTRUCT *attrs;
|
||||
+ };
|
||||
+
|
||||
#if defined (READLINE)
|
||||
static void reset_attempted_completion_function __P((char *));
|
||||
static char *edit_line __P((char *));
|
||||
***************
|
||||
*** 94,99 ****
|
||||
--- 107,116 ----
|
||||
static void reset_eol_delim __P((char *));
|
||||
#endif
|
||||
static SHELL_VAR *bind_read_variable __P((char *, char *));
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ static int read_mbchar __P((int, char *, int, int, int));
|
||||
+ #endif
|
||||
+ static void ttyrestore __P((struct ttsave *));
|
||||
|
||||
static sighandler sigalrm __P((int));
|
||||
static void reset_alarm __P((void));
|
||||
***************
|
||||
*** 134,142 ****
|
||||
intmax_t intval;
|
||||
char c;
|
||||
char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
|
||||
! char *e, *t, *t1, *ps2;
|
||||
struct stat tsb;
|
||||
SHELL_VAR *var;
|
||||
#if defined (ARRAY_VARS)
|
||||
WORD_LIST *alist;
|
||||
#endif
|
||||
--- 151,161 ----
|
||||
intmax_t intval;
|
||||
char c;
|
||||
char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
|
||||
! char *e, *t, *t1, *ps2, *tofree;
|
||||
struct stat tsb;
|
||||
SHELL_VAR *var;
|
||||
+ TTYSTRUCT ttattrs, ttset;
|
||||
+ struct ttsave termsave;
|
||||
#if defined (ARRAY_VARS)
|
||||
WORD_LIST *alist;
|
||||
#endif
|
||||
***************
|
||||
*** 263,268 ****
|
||||
--- 282,289 ----
|
||||
ifs_chars = getifs ();
|
||||
if (ifs_chars == 0) /* XXX - shouldn't happen */
|
||||
ifs_chars = "";
|
||||
+ for (skip_ctlesc = skip_ctlnul = 0, e = ifs_chars; *e; e++)
|
||||
+ skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL;
|
||||
|
||||
input_string = (char *)xmalloc (size = 112); /* XXX was 128 */
|
||||
|
||||
***************
|
||||
*** 326,333 ****
|
||||
--- 347,359 ----
|
||||
code = setjmp (alrmbuf);
|
||||
if (code)
|
||||
{
|
||||
+ #if 0
|
||||
run_unwind_frame ("read_builtin");
|
||||
return (EXECUTION_FAILURE);
|
||||
+ #else
|
||||
+ retval = EXECUTION_FAILURE;
|
||||
+ goto assign_vars;
|
||||
+ #endif
|
||||
}
|
||||
old_alrm = set_signal_handler (SIGALRM, sigalrm);
|
||||
add_unwind_protect (reset_alarm, (char *)NULL);
|
||||
***************
|
||||
*** 361,379 ****
|
||||
#endif
|
||||
if (input_is_tty)
|
||||
{
|
||||
! ttsave ();
|
||||
if (silent)
|
||||
! ttcbreak ();
|
||||
else
|
||||
! ttonechar ();
|
||||
! add_unwind_protect ((Function *)ttrestore, (char *)NULL);
|
||||
}
|
||||
}
|
||||
else if (silent) /* turn off echo but leave term in canonical mode */
|
||||
{
|
||||
! ttsave ();
|
||||
! ttnoecho ();
|
||||
! add_unwind_protect ((Function *)ttrestore, (char *)NULL);
|
||||
}
|
||||
|
||||
/* This *must* be the top unwind-protect on the stack, so the manipulation
|
||||
--- 387,416 ----
|
||||
#endif
|
||||
if (input_is_tty)
|
||||
{
|
||||
! /* ttsave() */
|
||||
! termsave.fd = fd;
|
||||
! ttgetattr (fd, &ttattrs);
|
||||
! termsave.attrs = &ttattrs;
|
||||
! Options, if supplied, have the following meanings:
|
||||
!
|
||||
! ttset = ttattrs;
|
||||
if (silent)
|
||||
! ttfd_cbreak (fd, &ttset); /* ttcbreak () */
|
||||
else
|
||||
! ttfd_onechar (fd, &ttset); /* ttonechar () */
|
||||
! add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
|
||||
}
|
||||
}
|
||||
else if (silent) /* turn off echo but leave term in canonical mode */
|
||||
{
|
||||
! /* ttsave (); */
|
||||
! termsave.fd = fd;
|
||||
! ttgetattr (fd, &ttattrs);
|
||||
! termsave.attrs = &ttattrs;
|
||||
! @table @code
|
||||
! @item -d
|
||||
! Display a short description of each @var{pattern}
|
||||
! @item -m
|
||||
! Display the description of each @var{pattern} in a manpage-like format
|
||||
! @item -s
|
||||
! Display only a short usage synopsis for each @var{pattern}
|
||||
! @end table
|
||||
!
|
||||
! ttset = ttattrs;
|
||||
! ttfd_noecho (fd, &ttset); /* ttnoecho (); */
|
||||
!
|
||||
! add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
|
||||
}
|
||||
The return status is zero unless no command matches @var{pattern}.
|
||||
|
||||
/* This *must* be the top unwind-protect on the stack, so the manipulation
|
||||
@item let
|
||||
***************
|
||||
*** 439,445 ****
|
||||
}
|
||||
#endif
|
||||
*** 3443,3448 ****
|
||||
--- 3471,3516 ----
|
||||
Exit a login shell, returning a status of @var{n} to the shell's
|
||||
parent.
|
||||
|
||||
! if (i + 2 >= size)
|
||||
{
|
||||
input_string = (char *)xrealloc (input_string, size += 128);
|
||||
remove_unwind_protect ();
|
||||
--- 476,482 ----
|
||||
}
|
||||
#endif
|
||||
|
||||
! if (i + 4 >= size) /* XXX was i + 2; use i + 4 for multibyte/read_mbchar */
|
||||
{
|
||||
input_string = (char *)xrealloc (input_string, size += 128);
|
||||
remove_unwind_protect ();
|
||||
+ @item mapfile
|
||||
+ @btindex mapfile
|
||||
+ @example
|
||||
+ mapfile [-n @var{count}] [-O @var{origin}] [-s @var{count}] [-t] [-u @var{fd}] [
|
||||
+ -C @var{callback}] [-c @var{quantum}] [@var{array}]
|
||||
+ @end example
|
||||
+ Read lines from the standard input into array variable @var{array},
|
||||
+ or from file descriptor @var{fd}
|
||||
+ if the @option{-u} option is supplied.
|
||||
+ The variable @code{MAPFILE} is the default @var{array}.
|
||||
+ Options, if supplied, have the following meanings:
|
||||
+ @table @code
|
||||
+
|
||||
+ @item -n
|
||||
+ Copy at most @var{count} lines. If @var{count} is 0, all lines are copied.
|
||||
+ @item -O
|
||||
+ Begin assigning to @var{array} at index @var{origin}.
|
||||
+ The default index is 0.
|
||||
+ @item -s
|
||||
+ Discard the first @var{count} lines read.
|
||||
+ @item -t
|
||||
+ Remove a trailing line from each line read.
|
||||
+ @item -u
|
||||
+ Read lines from file descriptor @var{fd} instead of the standard input.
|
||||
+ @item -C
|
||||
+ Evaluate @var{callback} each time @var{quantum}P lines are read.
|
||||
+ The @option{-c} option specifies @var{quantum}.
|
||||
+ @item -c
|
||||
+ Specify the number of lines read between each call to @var{callback}.
|
||||
+ @end table
|
||||
+
|
||||
+ If @option{-C} is specified without @option{-c},
|
||||
+ the default quantum is 5000.
|
||||
+
|
||||
+ If not supplied with an explicit origin, @code{mapfile} will clear @var{array}
|
||||
+ before assigning to it.
|
||||
+
|
||||
+ @code{mapfile} returns successfully unless an invalid option or option
|
||||
+ argument is supplied, or @var{array} is invalid or unassignable.
|
||||
+
|
||||
@item printf
|
||||
@btindex printf
|
||||
@example
|
||||
***************
|
||||
*** 462,479 ****
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == '\\' && raw == 0)
|
||||
{
|
||||
pass_next++;
|
||||
! saw_escape++;
|
||||
! input_string[i++] = CTLESC;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((unsigned char)c == delim)
|
||||
break;
|
||||
|
||||
! if (c == CTLESC || c == CTLNUL)
|
||||
{
|
||||
saw_escape++;
|
||||
input_string[i++] = CTLESC;
|
||||
--- 499,520 ----
|
||||
continue;
|
||||
}
|
||||
|
||||
+ /* This may cause problems if IFS contains CTLESC */
|
||||
if (c == '\\' && raw == 0)
|
||||
{
|
||||
pass_next++;
|
||||
! if (skip_ctlesc == 0)
|
||||
! {
|
||||
! saw_escape++;
|
||||
! input_string[i++] = CTLESC;
|
||||
! }
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((unsigned char)c == delim)
|
||||
break;
|
||||
|
||||
! if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL))
|
||||
{
|
||||
saw_escape++;
|
||||
input_string[i++] = CTLESC;
|
||||
*** 3476,3482 ****
|
||||
@item read
|
||||
@btindex read
|
||||
@example
|
||||
! read [-ers] [-a @var{aname}] [-d @var{delim}] [-n @var{nchars}] [-p @var{prompt}] [-t @var{timeout}] [-u @var{fd}] [@var{name} @dots{}]
|
||||
@end example
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
@var{fd} supplied as an argument to the @option{-u} option, and the first word
|
||||
--- 3544,3550 ----
|
||||
@item read
|
||||
@btindex read
|
||||
@example
|
||||
! read [-ers] [-a @var{aname}] [-d @var{delim}] [-i @var{text}] [-n @var{nchars}] [-p @var{prompt}] [-t @var{timeout}] [-u @var{fd}] [@var{name} @dots{}]
|
||||
@end example
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
@var{fd} supplied as an argument to the @option{-u} option, and the first word
|
||||
***************
|
||||
*** 481,486 ****
|
||||
--- 522,536 ----
|
||||
*** 3510,3515 ****
|
||||
--- 3578,3587 ----
|
||||
@item -e
|
||||
Readline (@pxref{Command Line Editing}) is used to obtain the line.
|
||||
|
||||
add_char:
|
||||
input_string[i++] = c;
|
||||
+ @item -i @var{text}
|
||||
+ If Readline is being used to read the line, @var{text} is placed into
|
||||
+ the editing buffer before editing begins.
|
||||
+
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ if (nchars > 0 && MB_CUR_MAX > 1)
|
||||
+ {
|
||||
+ input_string[i] = '\0'; /* for simplicity and debugging */
|
||||
+ i += read_mbchar (fd, input_string, i, c, unbuffered_read);
|
||||
+ }
|
||||
+ #endif
|
||||
+
|
||||
nr++;
|
||||
|
||||
if (nchars > 0 && nr >= nchars)
|
||||
@item -n @var{nchars}
|
||||
@code{read} returns after reading @var{nchars} characters rather than
|
||||
waiting for a complete line of input.
|
||||
***************
|
||||
*** 513,522 ****
|
||||
else
|
||||
#endif
|
||||
if (input_is_tty)
|
||||
! ttrestore ();
|
||||
}
|
||||
else if (silent)
|
||||
! ttrestore ();
|
||||
*** 3581,3588 ****
|
||||
If the @option{-f} option is used, @code{type} does not attempt to find
|
||||
shell functions, as with the @code{command} builtin.
|
||||
|
||||
if (unbuffered_read == 0)
|
||||
zsyncfd (fd);
|
||||
--- 563,572 ----
|
||||
else
|
||||
#endif
|
||||
if (input_is_tty)
|
||||
! ttyrestore (&termsave);
|
||||
}
|
||||
else if (silent)
|
||||
! ttyrestore (&termsave);
|
||||
! The return status is zero if any of the @var{names} are found, non-zero
|
||||
! if none are found.
|
||||
|
||||
if (unbuffered_read == 0)
|
||||
zsyncfd (fd);
|
||||
@item typeset
|
||||
@btindex typeset
|
||||
--- 3653,3660 ----
|
||||
If the @option{-f} option is used, @code{type} does not attempt to find
|
||||
shell functions, as with the @code{command} builtin.
|
||||
|
||||
! The return status is zero if all of the @var{names} are found, non-zero
|
||||
! if any are not found.
|
||||
|
||||
@item typeset
|
||||
@btindex typeset
|
||||
***************
|
||||
*** 527,532 ****
|
||||
--- 577,584 ----
|
||||
|
||||
retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
|
||||
|
||||
+ assign_vars:
|
||||
+
|
||||
#if defined (ARRAY_VARS)
|
||||
/* If -a was given, take the string read, break it into a list of words,
|
||||
an assign them to `arrayname' in turn. */
|
||||
*** 3596,3602 ****
|
||||
@item ulimit
|
||||
@btindex ulimit
|
||||
@example
|
||||
! ulimit [-acdefilmnpqrstuvxSH] [@var{limit}]
|
||||
@end example
|
||||
@code{ulimit} provides control over the resources available to processes
|
||||
started by the shell, on systems that allow such control. If an
|
||||
--- 3668,3674 ----
|
||||
@item ulimit
|
||||
@btindex ulimit
|
||||
@example
|
||||
! ulimit [-abcdefilmnpqrstuvxHST] [@var{limit}]
|
||||
@end example
|
||||
@code{ulimit} provides control over the resources available to processes
|
||||
started by the shell, on systems that allow such control. If an
|
||||
***************
|
||||
*** 603,609 ****
|
||||
for (t = input_string; ifs_chars && *ifs_chars && spctabnl(*t) && isifs(*t); t++)
|
||||
;
|
||||
input_string = t;
|
||||
-
|
||||
for (; list->next; list = list->next)
|
||||
{
|
||||
varname = list->word->word;
|
||||
--- 655,660 ----
|
||||
***************
|
||||
*** 674,685 ****
|
||||
#else
|
||||
/* Check whether or not the number of fields is exactly the same as the
|
||||
number of variables. */
|
||||
if (*input_string)
|
||||
{
|
||||
t1 = input_string;
|
||||
t = get_word_from_string (&input_string, ifs_chars, &e);
|
||||
if (*input_string == 0)
|
||||
! input_string = t;
|
||||
else
|
||||
input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
|
||||
}
|
||||
--- 725,737 ----
|
||||
#else
|
||||
/* Check whether or not the number of fields is exactly the same as the
|
||||
number of variables. */
|
||||
+ tofree = NULL;
|
||||
if (*input_string)
|
||||
{
|
||||
t1 = input_string;
|
||||
t = get_word_from_string (&input_string, ifs_chars, &e);
|
||||
if (*input_string == 0)
|
||||
! tofree = input_string = t;
|
||||
else
|
||||
input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
|
||||
}
|
||||
***************
|
||||
*** 694,699 ****
|
||||
--- 746,753 ----
|
||||
else
|
||||
var = bind_read_variable (list->word->word, input_string);
|
||||
stupidly_hack_special_variables (list->word->word);
|
||||
+ FREE (tofree);
|
||||
+
|
||||
if (var)
|
||||
VUNSETATTR (var, att_invisible);
|
||||
xfree (orig_input_string);
|
||||
***************
|
||||
*** 715,720 ****
|
||||
--- 769,830 ----
|
||||
#endif /* !ARRAY_VARS */
|
||||
}
|
||||
*** 3611,3616 ****
|
||||
--- 3683,3691 ----
|
||||
@item -a
|
||||
All current limits are reported.
|
||||
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ static int
|
||||
+ read_mbchar (fd, string, ind, ch, unbuffered)
|
||||
+ int fd;
|
||||
+ char *string;
|
||||
+ int ind, ch, unbuffered;
|
||||
+ {
|
||||
+ char mbchar[MB_LEN_MAX + 1];
|
||||
+ int i, n, r;
|
||||
+ char c;
|
||||
+ size_t ret;
|
||||
+ mbstate_t ps, ps_back;
|
||||
+ wchar_t wc;
|
||||
+ @item -b
|
||||
+ The maximum socket buffer size.
|
||||
+
|
||||
+ memset (&ps, '\0', sizeof (mbstate_t));
|
||||
+ memset (&ps_back, '\0', sizeof (mbstate_t));
|
||||
+
|
||||
+ mbchar[0] = ch;
|
||||
+ i = 1;
|
||||
+ for (n = 0; n <= MB_LEN_MAX; n++)
|
||||
+ {
|
||||
+ ps_back = ps;
|
||||
+ ret = mbrtowc (&wc, mbchar, i, &ps);
|
||||
+ if (ret == (size_t)-2)
|
||||
+ {
|
||||
+ ps = ps_back;
|
||||
+ if (unbuffered)
|
||||
+ r = zread (fd, &c, 1);
|
||||
+ else
|
||||
+ r = zreadc (fd, &c);
|
||||
+ if (r < 0)
|
||||
+ goto mbchar_return;
|
||||
+ mbchar[i++] = c;
|
||||
+ continue;
|
||||
+ }
|
||||
+ else if (ret == (size_t)-1 || ret == (size_t)0 || ret > (size_t)0)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ mbchar_return:
|
||||
+ if (i > 1) /* read a multibyte char */
|
||||
+ /* mbchar[0] is already string[ind-1] */
|
||||
+ for (r = 1; r < i; r++)
|
||||
+ string[ind+r-1] = mbchar[r];
|
||||
+ return i - 1;
|
||||
+ }
|
||||
+ #endif
|
||||
+
|
||||
+
|
||||
+ static void
|
||||
+ ttyrestore (ttp)
|
||||
+ struct ttsave *ttp;
|
||||
+ {
|
||||
+ ttsetattr (ttp->fd, ttp->attrs);
|
||||
+ }
|
||||
+
|
||||
#if defined (READLINE)
|
||||
static rl_completion_func_t *old_attempted_completion_function = 0;
|
||||
@item -c
|
||||
The maximum size of core files created.
|
||||
|
||||
***************
|
||||
*** 3659,3664 ****
|
||||
--- 3734,3742 ----
|
||||
@item -x
|
||||
The maximum number of file locks.
|
||||
|
||||
+ @item -T
|
||||
+ The maximum number of threads.
|
||||
+
|
||||
@end table
|
||||
|
||||
If @var{limit} is given, it is the new value of the specified resource;
|
||||
***************
|
||||
*** 7049,7056 ****
|
||||
|
||||
@item
|
||||
Bash provides a programmable word completion mechanism
|
||||
! (@pxref{Programmable Completion}), and two builtin commands,
|
||||
! @code{complete} and @code{compgen}, to manipulate it.
|
||||
|
||||
@item
|
||||
Bash has command history (@pxref{Bash History Facilities}) and the
|
||||
--- 7127,7135 ----
|
||||
|
||||
@item
|
||||
Bash provides a programmable word completion mechanism
|
||||
! (@pxref{Programmable Completion}), and builtin commands
|
||||
! @code{complete}, @code{compgen}, and @code{compopt}, to
|
||||
! manipulate it.
|
||||
|
||||
@item
|
||||
Bash has command history (@pxref{Bash History Facilities}) and the
|
||||
|
||||
+8
-3
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Sat Apr 12 17:15:24 EDT 2008
|
||||
.\" Last Change: Fri Apr 25 12:26:57 EDT 2008
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2008 April 12" "GNU Bash-3.2"
|
||||
.TH BASH 1 "2008 April 25" "GNU Bash-4.0"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -3791,7 +3791,12 @@ A full search of the directories in
|
||||
.SM
|
||||
.B PATH
|
||||
is performed only if the command is not found in the hash table.
|
||||
If the search is unsuccessful, the shell prints an error
|
||||
If the search is unsuccessful, the shell searches for a defined shell
|
||||
function named \fBcommand_not_found_handle\fP.
|
||||
If that function exists, it is invoked with the original command and
|
||||
the original command's arguments as its arguments, and the function's
|
||||
exit status becomes the exit status of the shell.
|
||||
If that function is not defined, the shell prints an error
|
||||
message and returns an exit status of 127.
|
||||
.PP
|
||||
If the search is successful, or if the command name contains
|
||||
|
||||
+60
@@ -7389,6 +7389,66 @@ is supplied, or
|
||||
.B logout
|
||||
Exit a login shell.
|
||||
.TP
|
||||
\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcou
|
||||
nt\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \f
|
||||
Iquantum\fP] [\fIarray\fP]
|
||||
Read lines from the standard input into array variable
|
||||
.IR array ,
|
||||
or from file descriptor
|
||||
.IR fd
|
||||
if the
|
||||
.B \-u
|
||||
option is supplied.
|
||||
The variable \fBMAPFILE\fP is the default \fIarray\fP.
|
||||
Options, if supplied, have the following meanings:
|
||||
.RS
|
||||
.PD 0
|
||||
.TP
|
||||
.B \-n
|
||||
Copy at most
|
||||
.I count
|
||||
lines. If \fIcount\fP is 0, all lines are copied.
|
||||
.TP
|
||||
.B \-O
|
||||
Begin assigning to
|
||||
.I array
|
||||
at index
|
||||
.IR origin .
|
||||
The default index is 0.
|
||||
.TP
|
||||
.B \-s
|
||||
Discard the first \fIcount\fP lines read.
|
||||
.TP
|
||||
.B \-t
|
||||
Remove a trailing line from each line read.
|
||||
.TP
|
||||
.B \-u
|
||||
Read lines from file descriptor \fIfd\fP instead of the standard input.
|
||||
.TP
|
||||
.B \-C
|
||||
Evaluate
|
||||
.I callback
|
||||
each time \fIquantum\fP lines are read. The \fB\-c\fP option specifies
|
||||
.IR quantum .
|
||||
.TP
|
||||
.B \-c
|
||||
Specify the number of lines read between each call to
|
||||
.IR callback .
|
||||
.PD
|
||||
.PP
|
||||
If
|
||||
.B \-C
|
||||
is specified without
|
||||
.BR \-c ,
|
||||
the default quantum is 5000.
|
||||
.PP
|
||||
If not supplied with an explicit origin, \fBmapfile\fP will clear \fIarray\fP
|
||||
before assigning to it.
|
||||
.PP
|
||||
\fBmapfile\fP returns successfully unless an invalid option or option
|
||||
argument is supplied, or \fIarray\fP is invalid or unassignable.
|
||||
.RE
|
||||
.TP
|
||||
\fBpopd\fP [\-\fBn\fP] [+\fIn\fP] [\-\fIn\fP]
|
||||
Removes entries from the directory stack. With no arguments,
|
||||
removes the top directory from the stack, and performs a
|
||||
|
||||
+6
-1
@@ -2301,7 +2301,12 @@ pathnames of executable files to avoid multiple @env{PATH} searches
|
||||
(see the description of @code{hash} in @ref{Bourne Shell Builtins}).
|
||||
A full search of the directories in @env{$PATH}
|
||||
is performed only if the command is not found in the hash table.
|
||||
If the search is unsuccessful, the shell prints an error
|
||||
If the search is unsuccessful, the shell searches for a defined shell
|
||||
function named @code{command_not_found_handle}.
|
||||
If that function exists, it is invoked with the original command and
|
||||
the original command's arguments as its arguments, and the function's
|
||||
exit status becomes the exit status of the shell.
|
||||
If that function is not defined, the shell prints an error
|
||||
message and returns an exit status of 127.
|
||||
|
||||
@item
|
||||
|
||||
@@ -3466,6 +3466,46 @@ logout [@var{n}]
|
||||
Exit a login shell, returning a status of @var{n} to the shell's
|
||||
parent.
|
||||
|
||||
@item mapfile
|
||||
@btindex mapfile
|
||||
@example
|
||||
mapfile [-n @var{count}] [-O @var{origin}] [-s @var{count}] [-t] [-u @var{fd}] [
|
||||
-C @var{callback}] [-c @var{quantum}] [@var{array}]
|
||||
@end example
|
||||
Read lines from the standard input into array variable @var{array},
|
||||
or from file descriptor @var{fd}
|
||||
if the @option{-u} option is supplied.
|
||||
The variable @code{MAPFILE} is the default @var{array}.
|
||||
Options, if supplied, have the following meanings:
|
||||
@table @code
|
||||
|
||||
@item -n
|
||||
Copy at most @var{count} lines. If @var{count} is 0, all lines are copied.
|
||||
@item -O
|
||||
Begin assigning to @var{array} at index @var{origin}.
|
||||
The default index is 0.
|
||||
@item -s
|
||||
Discard the first @var{count} lines read.
|
||||
@item -t
|
||||
Remove a trailing line from each line read.
|
||||
@item -u
|
||||
Read lines from file descriptor @var{fd} instead of the standard input.
|
||||
@item -C
|
||||
Evaluate @var{callback} each time @var{quantum}P lines are read.
|
||||
The @option{-c} option specifies @var{quantum}.
|
||||
@item -c
|
||||
Specify the number of lines read between each call to @var{callback}.
|
||||
@end table
|
||||
|
||||
If @option{-C} is specified without @option{-c},
|
||||
the default quantum is 5000.
|
||||
|
||||
If not supplied with an explicit origin, @code{mapfile} will clear @var{array}
|
||||
before assigning to it.
|
||||
|
||||
@code{mapfile} returns successfully unless an invalid option or option
|
||||
argument is supplied, or @var{array} is invalid or unassignable.
|
||||
|
||||
@item printf
|
||||
@btindex printf
|
||||
@example
|
||||
|
||||
+4
-4
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2008 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Sat Apr 12 17:15:43 EDT 2008
|
||||
@set LASTCHANGE Fri Apr 25 12:33:01 EDT 2008
|
||||
|
||||
@set EDITION 3.2
|
||||
@set VERSION 3.2
|
||||
@set UPDATED 12 April 2008
|
||||
@set EDITION 4.0
|
||||
@set VERSION 4.0
|
||||
@set UPDATED 25 April 2008
|
||||
@set UPDATED-MONTH April 2008
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2008 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Sat Apr 5 22:13:08 EDT 2008
|
||||
@set LASTCHANGE Sat Apr 12 17:15:43 EDT 2008
|
||||
|
||||
@set EDITION 3.2
|
||||
@set VERSION 3.2
|
||||
@set UPDATED 5 April 2008
|
||||
@set UPDATED 12 April 2008
|
||||
@set UPDATED-MONTH April 2008
|
||||
|
||||
+18
-3
@@ -1,6 +1,6 @@
|
||||
/* execute_cmd.c -- Execute a COMMAND structure. */
|
||||
|
||||
/* Copyright (C) 1987-2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -3646,6 +3646,12 @@ setup_async_signals ()
|
||||
this gnarly hair, for no good reason.
|
||||
|
||||
NOTE: callers expect this to fork or exit(). */
|
||||
|
||||
/* Name of a shell function to call when a command name is not found. */
|
||||
#ifndef NOTFOUND_HOOK
|
||||
# define NOTFOUND_HOOK "command_not_found_handle"
|
||||
#endif
|
||||
|
||||
static void
|
||||
execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
|
||||
async, fds_to_close, cmdflags)
|
||||
@@ -3659,6 +3665,8 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
|
||||
char *pathname, *command, **args;
|
||||
int nofork;
|
||||
pid_t pid;
|
||||
SHELL_VAR *hookf;
|
||||
WORD_LIST *wl;
|
||||
|
||||
nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */
|
||||
pathname = words->word->word;
|
||||
@@ -3755,8 +3763,15 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
|
||||
|
||||
if (command == 0)
|
||||
{
|
||||
internal_error (_("%s: command not found"), pathname);
|
||||
exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
|
||||
hookf = find_function (NOTFOUND_HOOK);
|
||||
if (hookf == 0)
|
||||
{
|
||||
internal_error (_("%s: command not found"), pathname);
|
||||
exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
|
||||
}
|
||||
|
||||
wl = make_word_list (make_word (NOTFOUND_HOOK), words);
|
||||
exit (execute_shell_function (hookf, wl));
|
||||
}
|
||||
|
||||
/* Execve expects the command name to be in args[0]. So we
|
||||
|
||||
+18
-3
@@ -2552,7 +2552,7 @@ execute_cond_node (cond)
|
||||
if (arg1 == 0)
|
||||
arg1 = nullstr;
|
||||
arg2 = cond_expand_word (cond->right->op,
|
||||
(rmatch && shell_compatibility_level == 31) ? 2 : (patmatch ? 1 : 0));
|
||||
(rmatch && shell_compatibility_level > 31) ? 2 : (patmatch ? 1 : 0));
|
||||
if (arg2 == 0)
|
||||
arg2 = nullstr;
|
||||
|
||||
@@ -3646,6 +3646,12 @@ setup_async_signals ()
|
||||
this gnarly hair, for no good reason.
|
||||
|
||||
NOTE: callers expect this to fork or exit(). */
|
||||
|
||||
/* Name of a shell function to call when a command name is not found. */
|
||||
#ifndef NOTFOUND_HOOK
|
||||
# define NOTFOUND_HOOK "command_not_found_handle"
|
||||
#endif
|
||||
|
||||
static void
|
||||
execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
|
||||
async, fds_to_close, cmdflags)
|
||||
@@ -3659,6 +3665,8 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
|
||||
char *pathname, *command, **args;
|
||||
int nofork;
|
||||
pid_t pid;
|
||||
SHELL_VAR *hookf;
|
||||
WORD_LIST *wl;
|
||||
|
||||
nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */
|
||||
pathname = words->word->word;
|
||||
@@ -3755,8 +3763,15 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
|
||||
|
||||
if (command == 0)
|
||||
{
|
||||
internal_error (_("%s: command not found"), pathname);
|
||||
exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
|
||||
hookf = find_function (NOTFOUND_HOOK);
|
||||
if (hookf == 0)
|
||||
{
|
||||
internal_error (_("%s: command not found"), pathname);
|
||||
exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
|
||||
}
|
||||
|
||||
wl = make_word_list (make_word (NOTFOUND_HOOK), words);
|
||||
exit (execute_shell_function (hookf, wl));
|
||||
}
|
||||
|
||||
/* Execve expects the command name to be in args[0]. So we
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* patchlevel.h -- current bash patch level */
|
||||
|
||||
/* Copyright (C) 2001-2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2008 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 33
|
||||
#define PATCHLEVEL 0
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
|
||||
+1
-1
@@ -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 17
|
||||
#define PATCHLEVEL 33
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
# Set of available languages.
|
||||
en@quot en@boldquot ru sv bg sk
|
||||
en@quot en@boldquot af bg ca de eo es et fr hu ja nl pl pt_BR ro ru sk sv tr vi
|
||||
|
||||
@@ -26,6 +26,7 @@ builtins/inlib.def
|
||||
builtins/jobs.def
|
||||
builtins/kill.def
|
||||
builtins/let.def
|
||||
builtins/mapfile.def
|
||||
builtins/mkbuiltins.c
|
||||
builtins/printf.def
|
||||
builtins/pushd.def
|
||||
|
||||
+2260
-1122
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+3552
-1890
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+3535
-1857
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+6090
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,84 @@
|
||||
*** ../bash-3.2-patched/execute_cmd.c 2007-12-14 21:12:39.000000000 -0500
|
||||
--- execute_cmd.c 2008-02-22 21:20:40.000000000 -0500
|
||||
***************
|
||||
*** 2547,2551 ****
|
||||
if (arg1 == 0)
|
||||
arg1 = nullstr;
|
||||
! arg2 = cond_expand_word (cond->right->op, rmatch ? 2 : (patmatch ? 1 : 0));
|
||||
if (arg2 == 0)
|
||||
arg2 = nullstr;
|
||||
--- 2552,2557 ----
|
||||
if (arg1 == 0)
|
||||
arg1 = nullstr;
|
||||
! arg2 = cond_expand_word (cond->right->op,
|
||||
! (rmatch && shell_compatibility_level > 31) ? 2 : (patmatch ? 1 : 0));
|
||||
if (arg2 == 0)
|
||||
arg2 = nullstr;
|
||||
*** ../bash-3.2-patched/shell.h 2003-06-01 15:04:36.000000000 -0400
|
||||
--- shell.h 2008-02-22 21:16:48.000000000 -0500
|
||||
***************
|
||||
*** 90,93 ****
|
||||
--- 90,94 ----
|
||||
extern int interactive, interactive_shell;
|
||||
extern int startup_state;
|
||||
+ extern int shell_compatibility_level;
|
||||
|
||||
/* Structure to pass around that holds a bitmap of file descriptors
|
||||
*** ../bash-3.2-patched/version.c 2007-12-14 21:12:29.000000000 -0500
|
||||
--- version.c 2008-04-10 08:22:22.000000000 -0400
|
||||
***************
|
||||
*** 44,47 ****
|
||||
--- 44,50 ----
|
||||
const char *sccs_version = SCCSVERSION;
|
||||
|
||||
+ /* If == 31, shell compatible with bash-3.1, = =32 with bash-3.2, and so on */
|
||||
+ int shell_compatibility_level = 32;
|
||||
+
|
||||
/* Functions for getting, setting, and displaying the shell version. */
|
||||
|
||||
*** ../bash-3.2-patched/builtins/shopt.def 2005-02-19 17:25:03.000000000 -0500
|
||||
--- builtins/shopt.def 2008-04-10 08:13:32.000000000 -0400
|
||||
***************
|
||||
*** 102,105 ****
|
||||
--- 102,107 ----
|
||||
static int set_shellopts_after_change __P((int));
|
||||
|
||||
+ static int set_compatibility_level __P((int));
|
||||
+
|
||||
#if defined (RESTRICTED_SHELL)
|
||||
static int set_restricted_shell __P((int));
|
||||
***************
|
||||
*** 107,110 ****
|
||||
--- 109,113 ----
|
||||
|
||||
static int shopt_login_shell;
|
||||
+ static int shopt_compat31;
|
||||
|
||||
typedef int shopt_set_func_t __P((int));
|
||||
***************
|
||||
*** 122,125 ****
|
||||
--- 125,129 ----
|
||||
{ "cmdhist", &command_oriented_history, (shopt_set_func_t *)NULL },
|
||||
#endif
|
||||
+ { "compat31", &shopt_compat31, set_compatibility_level },
|
||||
{ "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
|
||||
{ "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
|
||||
***************
|
||||
*** 460,463 ****
|
||||
--- 464,479 ----
|
||||
}
|
||||
|
||||
+ static int
|
||||
+ set_compatibility_level (mode)
|
||||
+ int mode;
|
||||
+ {
|
||||
+ /* Need to change logic here as we add more compatibility levels */
|
||||
+ if (shopt_compat31)
|
||||
+ shell_compatibility_level = 31;
|
||||
+ else
|
||||
+ shell_compatibility_level = 32;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
#if defined (RESTRICTED_SHELL)
|
||||
/* Don't allow the value of restricted_shell to be modified. */
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ const char * const release_status = (char *)0;
|
||||
#endif
|
||||
const char * const sccs_version = SCCSVERSION;
|
||||
|
||||
/* If == 31, shell compatible with bash-3.1, = =32 with bash-3.2, and so on */
|
||||
/* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */
|
||||
int shell_compatibility_level = DEFAULT_COMPAT_LEVEL;
|
||||
|
||||
/* Functions for getting, setting, and displaying the shell version. */
|
||||
|
||||
+4
-1
@@ -1,6 +1,6 @@
|
||||
/* version.c -- distribution and version numbers. */
|
||||
|
||||
/* Copyright (C) 1989-2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1989-2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -43,6 +43,9 @@ const char * const release_status = (char *)0;
|
||||
#endif
|
||||
const char * const sccs_version = SCCSVERSION;
|
||||
|
||||
/* If == 31, shell compatible with bash-3.1, = =32 with bash-3.2, and so on */
|
||||
int shell_compatibility_level = DEFAULT_COMPAT_LEVEL;
|
||||
|
||||
/* Functions for getting, setting, and displaying the shell version. */
|
||||
|
||||
/* Forward declarations so we don't have to include externs.h */
|
||||
|
||||
Reference in New Issue
Block a user