]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20090930 snapshot
authorChet Ramey <chet.ramey@case.edu>
Fri, 9 Dec 2011 01:16:46 +0000 (20:16 -0500)
committerChet Ramey <chet.ramey@case.edu>
Fri, 9 Dec 2011 01:16:46 +0000 (20:16 -0500)
36 files changed:
CWRU/CWRU.chlog
CWRU/CWRU.chlog~
autom4te.cache/output.0
autom4te.cache/requests
autom4te.cache/traces.0
bashline.c
bashline.c~
builtins/help.def
builtins/help.def~
configure
configure.in
configure.in~
doc/bashref.texi
doc/bashref.texi~
jobs.c
jobs.c~
lib/readline/terminal.c
parse.y
parse.y~
parser.h
parser.h~
patchlevel.h
patchlevel.h~
po/cs.gmo
po/de.gmo
po/eo.gmo
po/fi.gmo [new file with mode: 0644]
po/ga.gmo [new file with mode: 0644]
po/ga.po
po/lt.gmo
po/sv.gmo
po/vi.gmo
subst.c
subst.c~
subst.h
subst.h~

index 19ae46818e1279ea8a463e9df7a811a626501bf7..b92ac081bd92cce7ed86f691c63e73cbb00ba38e 100644 (file)
@@ -8919,3 +8919,62 @@ lib/sh/fnxform.c
          argument in calls to iconv, since outlen is used to keep track of
          the size of the buffer, and iconv potentially modifies its
          `outbytesleft' argument
+
+                                  9/29
+                                  ----
+subst.c
+       - make skip_to_delim understand how to skip over process substitution
+         constructs the way it skips $(...) command substitution
+
+                                  9/30
+                                  ----
+lib/readline/terminal.c
+       - don't set the `terminal has meta key' flag if the `MT' capability is
+         available; that means something completely different
+
+                                  10/1
+                                  ----
+builtins/help.def
+       - make sure width is at least 7, since we pass `width/2 - 3' to strncpy
+         as the length argument.  Terminal widths <= 6 are converted to 80.
+         Fixes bug reported by Chris Hall <c@pobox.co.uk>
+
+configure.in
+       - changed version to 4.1-alpha
+
+subst.h
+       - new flag for skip_to_delim: SD_NOSKIPCMD, which means to not skip
+         over embedded command and process substitutions, but rather to look
+         for delimiters within them
+
+subst.c
+       - implement semantics of SD_NOSKIPCMD in skip_to_delim
+
+bashline.c
+       - call skip_to_delim with SD_NOSKIPCMD from find_cmd_start, so
+         programmable completion can use the completion defined for `b' for
+         command lines like "a $(b c".  Fixes inconsistency/bug reported by
+         Freddy Vulto <fvulto@gmail.com>
+
+parser.h
+       - replace unused PST_CMDTOKEN parser state value with PST_EXTPAT,
+         means currently parsing an extended glob pattern (extglob)
+
+parse.y
+       - fix cond_node() so that extended_glob is set before parsing the
+         rhs of the `==' or `!=' operators.  For ksh93 compatibility.
+       - reset extended_glob to global value (saved in parse_cond_command())
+         in reset_parser()
+
+                                  10/5
+                                  ----
+jobs.c
+       - change waitchld() to only interrupt the wait builtin when the shell
+         receives SIGCHLD in Posix mode.  It's a posix requirement, but
+         makes easy things hard to do, like run a SIGCHLD trap for every
+         exiting child.  Change prompted by question from Alex Efros
+         <powerman@powerman.name>
+
+doc/bashref.texi
+       - document new posix mode behavior about SIGCHLD arriving while the
+         wait builtin is executing when a trap on SIGCHLD has been set
index a904ef8a0bec812f2c9d99f60c39b31c91ef7306..a3727239b3f188de35e4e0253a3bc9c9730022e0 100644 (file)
@@ -8896,7 +8896,7 @@ configure.in
        - add "darwin10" cases like darwin8 and darwin9 to handle linking with
          included readline and history libraries
 
-                                  9/25
+                                  9/26
                                   ----
 lib/readline/display.c
        - modify change of 7/24 to use prompt_physical_chars instead of
@@ -8919,3 +8919,61 @@ lib/sh/fnxform.c
          argument in calls to iconv, since outlen is used to keep track of
          the size of the buffer, and iconv potentially modifies its
          `outbytesleft' argument
+
+                                  9/29
+                                  ----
+subst.c
+       - make skip_to_delim understand how to skip over process substitution
+         constructs the way it skips $(...) command substitution
+
+                                  9/30
+                                  ----
+lib/readline/terminal.c
+       - don't set the `terminal has meta key' flag if the `MT' capability is
+         available; that means something completely different
+
+                                  10/1
+                                  ----
+builtins/help.def
+       - make sure width is at least 7, since we pass `width/2 - 3' to strncpy
+         as the length argument.  Terminal widths <= 6 are converted to 80.
+         Fixes bug reported by Chris Hall <c@pobox.co.uk>
+
+configure.in
+       - changed version to 4.1-alpha
+
+subst.h
+       - new flag for skip_to_delim: SD_NOSKIPCMD, which means to not skip
+         over embedded command and process substitutions, but rather to look
+         for delimiters within them
+
+subst.c
+       - implement semantics of SD_NOSKIPCMD in skip_to_delim
+
+bashline.c
+       - call skip_to_delim with SD_NOSKIPCMD from find_cmd_start, so
+         programmable completion can use the completion defined for `b' for
+         command lines like "a $(b c".  Fixes inconsistency/bug reported by
+         Freddy Vulto <fvulto@gmail.com>
+
+parser.h
+       - replace unused PST_CMDTOKEN parser state value with PST_EXTPAT,
+         means currently parsing an extended glob pattern (extglob)
+
+parse.y
+       - fix cond_node() so that extended_glob is set before parsing the
+         rhs of the `==' or `!=' operators.  For ksh93 compatibility.
+       - reset extended_glob to global value (saved in parse_cond_command())
+         in reset_parser()
+
+                                  10/5
+                                  ----
+jobs.c
+       - change waitchld() to only interrupt the wait builtin when the shell
+         receives SIGCHLD in Posix mode.  It's a posix requirement, but
+         makes easy things hard to do, like run a SIGCHLD trap for every
+         exiting child
+
+doc/bashref.texi
+       - document new posix mode behavior about SIGCHLD arriving while the
+         wait builtin is executing when a trap on SIGCHLD has been set
index efec19eec9c11a016609108becb1be4612d3cc2c..06be0b42f01b7795600a15a12aec7072e6e73e39 100644 (file)
@@ -1,7 +1,7 @@
 @%:@! /bin/sh
-@%:@ From configure.in for Bash 4.0, version 4.014.
+@%:@ From configure.in for Bash 4.1, version 4.015.
 @%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.63 for bash 4.0-maint.
+@%:@ Generated by GNU Autoconf 2.63 for bash 4.1-alpha.
 @%:@
 @%:@ Report bugs to <bug-bash@gnu.org>.
 @%:@ 
@@ -597,8 +597,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='bash'
 PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='4.0-maint'
-PACKAGE_STRING='bash 4.0-maint'
+PACKAGE_VERSION='4.1-alpha'
+PACKAGE_STRING='bash 4.1-alpha'
 PACKAGE_BUGREPORT='bug-bash@gnu.org'
 
 ac_unique_file="shell.h"
@@ -1411,7 +1411,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 4.0-maint to adapt to many kinds of systems.
+\`configure' configures bash 4.1-alpha to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1476,7 +1476,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bash 4.0-maint:";;
+     short | recursive ) echo "Configuration of bash 4.1-alpha:";;
    esac
   cat <<\_ACEOF
 
@@ -1652,7 +1652,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bash configure 4.0-maint
+bash configure 4.1-alpha
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1666,7 +1666,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 4.0-maint, which was
+It was created by bash $as_me 4.1-alpha, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2077,8 +2077,8 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 ac_config_headers="$ac_config_headers config.h"
 
 
-BASHVERS=4.0
-RELSTATUS=maint
+BASHVERS=4.1
+RELSTATUS=alpha
 
 case "$RELSTATUS" in
 alp*|bet*|dev*|rc*|maint*)     DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -30964,7 +30964,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 4.0-maint, which was
+This file was extended by bash $as_me 4.1-alpha, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -31027,7 +31027,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-bash config.status 4.0-maint
+bash config.status 4.1-alpha
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index 014c1526793ccc20fe5014394befba83e8496a78..4a5e08c959e79308e600ade061bffe6a5fcb00af 100644 (file)
                         '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,
                         '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_GNU_GETTEXT_INTL_SUBDIR' => 1,
                         '_m4_warn' => 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,
                         'AC_CANONICAL_SYSTEM' => 1,
+                        'AM_CONDITIONAL' => 1,
                         'AC_CONFIG_HEADERS' => 1,
                         'AC_DEFINE_TRACE_LITERAL' => 1,
                         'm4_include' => 1,
index 9bdb4732df68fefce54772d79677557b3b9a1dd7..0aa27528ca9b82fca11126e1d0d129eefefc7f3a 100644 (file)
@@ -1,4 +1,4 @@
-m4trace:configure.in:29: -1- AC_INIT([bash], [4.0-maint], [bug-bash@gnu.org])
+m4trace:configure.in:29: -1- AC_INIT([bash], [4.1-alpha], [bug-bash@gnu.org])
 m4trace:configure.in:29: -1- m4_pattern_forbid([^_?A[CHUM]_])
 m4trace:configure.in:29: -1- m4_pattern_forbid([_AC_])
 m4trace:configure.in:29: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
index 1e0f8e3d6fc6a2cfa37dc24bffaf087d8af80d67..d7a309c6f6305dd91ee77b42dba10d0ddebc7dd9 100644 (file)
@@ -1197,7 +1197,7 @@ find_cmd_start (start)
   register int s, os;
 
   os = 0;
-  while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP)) <= start) &&
+  while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP|SD_NOSKIPCMD)) <= start) &&
         rl_line_buffer[s])
     os = s+1;
   return os;
index a2e55c8706fdff5d20883ae9321461afd8f510ff..1e0f8e3d6fc6a2cfa37dc24bffaf087d8af80d67 100644 (file)
@@ -3433,7 +3433,7 @@ bash_execute_unix_command (count, key)
   register int i, r;
   intmax_t mi;
   sh_parser_state_t ps;
-  char *cmd, *value, *l, *ce;
+  char *cmd, *value, *l, *l1, *ce;
   SHELL_VAR *v;
   char ibuf[INT_STRLEN_BOUND(int) + 1];
 
@@ -3482,7 +3482,7 @@ bash_execute_unix_command (count, key)
   v = bind_variable ("READLINE_LINE", rl_line_buffer, 0);
   if (v)
     VSETATTR (v, att_exported);
-  l = value_cell (v);
+  l = v ? value_cell (v) : 0;
   value = inttostr (rl_point, ibuf, sizeof (ibuf));
   v = bind_int_variable ("READLINE_POINT", value);
   if (v)
@@ -3494,7 +3494,8 @@ bash_execute_unix_command (count, key)
   restore_parser_state (&ps);
 
   v = find_variable ("READLINE_LINE");
-  if (value_cell (v) != l)
+  l1 = v ? value_cell (v) : 0;
+  if (l1 != l)
     maybe_make_readline_line (value_cell (v));
   v = find_variable ("READLINE_POINT");
   if (v && legal_number (value_cell (v), &mi))
index 2444e6db0b0939307df6dcae3dfe1e1127acbf34..f857af93f3cf57b7d6067ee1bcf61dfbeb864ed6 100644 (file)
@@ -350,6 +350,8 @@ A star (*) next to a name means that the command is disabled.\n\
   width /= 2;
   if (width > sizeof (blurb))
     width = sizeof (blurb);
+  if (width <= 3)
+    width = 40;
   height = (num_shell_builtins + 1) / 2;       /* number of rows */
 
   for (i = 0; i < height; i++)
index 004abe29f7fbcbf7d7ac62a3238d6703a991e8a6..2444e6db0b0939307df6dcae3dfe1e1127acbf34 100644 (file)
@@ -23,7 +23,7 @@ $PRODUCES help.c
 $BUILTIN help
 $FUNCTION help_builtin
 $DEPENDS_ON HELP_BUILTIN
-$SHORT_DOC help [-ds] [pattern ...]
+$SHORT_DOC help [-dms] [pattern ...]
 Display information about builtin commands.
 
 Displays brief summaries of builtin commands.  If PATTERN is
index 9cc4979155fefcca01a340b0292b6db9f235b69e..567a6e83b8beba7e8dcb8f16d4f25a007da3a18a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.in for Bash 4.0, version 4.014.
+# From configure.in for Bash 4.1, version 4.015.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for bash 4.0-maint.
+# Generated by GNU Autoconf 2.63 for bash 4.1-alpha.
 #
 # Report bugs to <bug-bash@gnu.org>.
 #
@@ -597,8 +597,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='bash'
 PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='4.0-maint'
-PACKAGE_STRING='bash 4.0-maint'
+PACKAGE_VERSION='4.1-alpha'
+PACKAGE_STRING='bash 4.1-alpha'
 PACKAGE_BUGREPORT='bug-bash@gnu.org'
 
 ac_unique_file="shell.h"
@@ -1411,7 +1411,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 4.0-maint to adapt to many kinds of systems.
+\`configure' configures bash 4.1-alpha to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1476,7 +1476,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bash 4.0-maint:";;
+     short | recursive ) echo "Configuration of bash 4.1-alpha:";;
    esac
   cat <<\_ACEOF
 
@@ -1652,7 +1652,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bash configure 4.0-maint
+bash configure 4.1-alpha
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1666,7 +1666,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 4.0-maint, which was
+It was created by bash $as_me 4.1-alpha, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2077,8 +2077,8 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 ac_config_headers="$ac_config_headers config.h"
 
 
-BASHVERS=4.0
-RELSTATUS=maint
+BASHVERS=4.1
+RELSTATUS=alpha
 
 case "$RELSTATUS" in
 alp*|bet*|dev*|rc*|maint*)     DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -30964,7 +30964,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 4.0-maint, which was
+This file was extended by bash $as_me 4.1-alpha, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -31027,7 +31027,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-bash config.status 4.0-maint
+bash config.status 4.1-alpha
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index d0ce865e42a0dc5f324255f89eb9f5fa26aed55d..0d61ceb50c406f3b376b6e014ec0fa2969fcaab1 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl Configure script for bash-4.0
+dnl Configure script for bash-4.1
 dnl
 dnl report bugs to chet@po.cwru.edu
 dnl
@@ -21,10 +21,10 @@ 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.0, version 4.014])dnl
+AC_REVISION([for Bash 4.1, version 4.015])dnl
 
-define(bashvers, 4.0)
-define(relstatus, maint)
+define(bashvers, 4.1)
+define(relstatus, alpha)
 
 AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
 
index 0323e66990f4d78d3cd624baecb4c7a702161cb9..d0ce865e42a0dc5f324255f89eb9f5fa26aed55d 100644 (file)
@@ -540,7 +540,7 @@ if test $opt_readline = yes; then
                # static version specified as -llibname to override the
                # dynamic version
                case "${host_os}" in
-               darwin[[89]]* READLINE_LIB='${READLINE_LIBRARY}' ;;
+               darwin[[89]]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
                *)              READLINE_LIB=-lreadline ;;
                esac
        fi
@@ -575,7 +575,7 @@ if test $opt_history = yes || test $opt_bang_history = yes; then
                # static version specified as -llibname to override the
                # dynamic version
                case "${host_os}" in
-               darwin[[89]]* HISTORY_LIB='${HISTORY_LIBRARY}' ;;
+               darwin[[89]]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
                *)              HISTORY_LIB=-lhistory ;;
                esac
        fi
@@ -803,13 +803,6 @@ dnl
 
 BASH_CHECK_MULTIBYTE
 
-if test "$am_cv_func_iconv" = yes; then
-       OLDLIBS="$LIBS"
-       LIBS="$LIBS $LIBICONV"
-       AC_CHECK_FUNCS(locale_charset)
-       LIBS="$OLDLIBS"
-fi
-
 dnl checks for the dynamic loading library functions in libc and libdl
 if test "$opt_static_link" != yes; then
 AC_CHECK_LIB(dl, dlopen)
index 983852bbe0bd3d00e114534cab5cf58ec43cdd52..8b8be79054b7930919926dc597f845f6ae0a269a 100644 (file)
@@ -6562,6 +6562,11 @@ escape characters are converted.
 The @code{ulimit} builtin uses a block size of 512 bytes for the @option{-c}
 and @option{-f} options.
 
+@item
+The arrival of @code{SIGCHLD}  when a trap is set on @code{SIGCHLD} does
+not interrupt the @code{wait} builtin and cause it to return immediately.
+The trap command is run once for each child that exits.
+
 @end enumerate
 
 There is other @sc{posix} behavior that Bash does not implement by
index 853ccd344f79adabd1699a75f20fda6e1fa1cae7..df80ffcd1220e6b695c6f469abc2b993be75dc1d 100644 (file)
@@ -976,6 +976,9 @@ substitution, and quote removal are performed.
 Conditional operators such as @samp{-f} must be unquoted to be recognized
 as primaries.
 
+When used with @samp{[[}, The @samp{<} and @samp{>} operators sort
+lexicographically using the current locale.
+
 When the @samp{==} and @samp{!=} operators are used, the string to the
 right of the operator is considered a pattern and matched according
 to the rules described below in @ref{Pattern Matching}.
@@ -6559,6 +6562,10 @@ escape characters are converted.
 The @code{ulimit} builtin uses a block size of 512 bytes for the @option{-c}
 and @option{-f} options.
 
+@item
+The arrival of @code{SIGCHLD}  when a trap is set on @code{SIGCHLD} does
+not interrupt the @code{wait} builtin and cause it to return immediately.
+
 @end enumerate
 
 There is other @sc{posix} behavior that Bash does not implement by
diff --git a/jobs.c b/jobs.c
index 8e1740d60fad77b30ddb0e667da82d4f1a4e9e55..f0343e4bf31a0114d7a8c366d3b1e09a014d673b 100644 (file)
--- a/jobs.c
+++ b/jobs.c
@@ -3143,7 +3143,7 @@ waitchld (wpid, block)
   if (job_control && signal_is_trapped (SIGCHLD) && children_exited &&
       trap_list[SIGCHLD] != (char *)IGNORE_SIG)
     {
-      if (this_shell_builtin && this_shell_builtin == wait_builtin)
+      if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin)
        {
          interrupt_immediately = 0;
          trap_handler (SIGCHLD);       /* set pending_traps[SIGCHLD] */
diff --git a/jobs.c~ b/jobs.c~
index dcc1fefba5b9cc1fcdac861fe3ff576340fa081f..33e7b78d62b4c56a3d44d9a896de5a51baea6a29 100644 (file)
--- a/jobs.c~
+++ b/jobs.c~
@@ -2372,6 +2372,8 @@ wait_for (pid)
 
   if (interactive && job_control == 0)
     QUIT;
+  /* Check for terminating signals and exit the shell if we receive one */
+  CHECK_TERMSIG;
 
   /* If we say wait_for (), then we have a record of this child somewhere.
      If it and none of its peers are running, don't call waitchld(). */
@@ -2450,6 +2452,8 @@ wait_for (pid)
         old SIGINT signal handler. */
       if (interactive && job_control == 0)
        QUIT;
+      /* Check for terminating signals and exit the shell if we receive one */
+      CHECK_TERMSIG;
     }
   while (PRUNNING (child) || (job != NO_JOB && RUNNING (job)));
 
@@ -3043,6 +3047,7 @@ waitchld (wpid, block)
                        : 0;
       if (sigchld || block == 0)
        waitpid_flags |= WNOHANG;
+      /* Check for terminating signals and exit the shell if we receive one */
       CHECK_TERMSIG;
 
       pid = WAITPID (-1, &status, waitpid_flags);
@@ -3138,14 +3143,14 @@ waitchld (wpid, block)
   if (job_control && signal_is_trapped (SIGCHLD) && children_exited &&
       trap_list[SIGCHLD] != (char *)IGNORE_SIG)
     {
-      if (this_shell_builtin && this_shell_builtin == wait_builtin)
+      if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin)
        {
          interrupt_immediately = 0;
          trap_handler (SIGCHLD);       /* set pending_traps[SIGCHLD] */
          wait_signal_received = SIGCHLD;
          longjmp (wait_intr_buf, 1);
        }
-
+itrace("waitchld: call run_sigchld_trap (%d)", children_exited);
       run_sigchld_trap (children_exited);
     }
 
index 768ec9bbdece750c7f2e1978c0ec9630f6f85689..ee130926999fa0dcb49d50100dd1a2621a406ca8 100644 (file)
@@ -528,8 +528,8 @@ _rl_init_terminal_io (terminal_name)
 
   /* Check to see if this terminal has a meta key and clear the capability
      variables if there is none. */
-  term_has_meta = (tgetflag ("km") || tgetflag ("MT"));
-  if (!term_has_meta)
+  term_has_meta = tgetflag ("km") != 0;
+  if (term_has_meta == 0)
     _rl_term_mm = _rl_term_mo = (char *)NULL;
 
   /* Attempt to find and bind the arrow keys.  Do not override already
diff --git a/parse.y b/parse.y
index c70ce4938c729351d799f7c41772b89dbbf48fdc..c1e1068ac6a4cdaee4a413daa1c09c7c6229b72b 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -246,10 +246,6 @@ int promptvars = 1;
    quotes. */
 int extended_quote = 1;
 
-/* The decoded prompt string.  Used if READLINE is not defined or if
-   editing is turned off.  Analogous to current_readline_prompt. */
-static char *current_decoded_prompt;
-
 /* The number of lines read from input while creating the current command. */
 int current_command_line_count;
 
@@ -286,6 +282,10 @@ static int function_bstart;
 /* The line number in a script at which an arithmetic for command starts. */
 static int arith_for_lineno;
 
+/* The decoded prompt string.  Used if READLINE is not defined or if
+   editing is turned off.  Analogous to current_readline_prompt. */
+static char *current_decoded_prompt;
+
 /* The last read token, or NULL.  read_token () uses this for context
    checking. */
 static int last_read_token;
@@ -296,6 +296,8 @@ static int token_before_that;
 /* The token read prior to token_before_that. */
 static int two_tokens_ago;
 
+static int global_extglob;
+
 /* The line number in a script where the word in a `case WORD', `select WORD'
    or `for WORD' begins.  This is a nested command maximum, since the array
    index is decremented after a case, select, or for command is parsed. */
@@ -2769,6 +2771,13 @@ reset_parser ()
   dstack.delimiter_depth = 0;  /* No delimiters found so far. */
   open_brace_count = 0;
 
+  /* Reset to global value of extended glob */
+  if (parser_state & PST_EXTPAT)
+{
+itrace("reset_parser: parser_state includes PST_EXTPAT");
+    extended_glob = global_extglob;
+}
+
   parser_state = 0;
 
 #if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
@@ -4043,7 +4052,13 @@ cond_term ()
       /* binop */
       tok = read_token (READ);
       if (tok == WORD && test_binop (yylval.word->word))
-       op = yylval.word;
+       {
+         op = yylval.word;
+         if (op->word[0] == '=' && (op->word[1] == '\0' || (op->word[1] == '=' && op->word[2] == '\0')))
+           parser_state |= PST_EXTPAT;
+         else if (op->word[0] == '!' && op->word[1] == '=' && op->word[2] == '\0')
+           parser_state |= PST_EXTPAT;
+       }
 #if defined (COND_REGEXP)
       else if (tok == WORD && STREQ (yylval.word->word, "=~"))
        {
@@ -4079,8 +4094,13 @@ cond_term ()
        }
 
       /* rhs */
+      if (parser_state & PST_EXTPAT)
+       extended_glob = 1;
       tok = read_token (READ);
-      parser_state &= ~PST_REGEXP;
+      if (parser_state & PST_EXTPAT)
+       extended_glob = global_extglob;
+      parser_state &= ~(PST_REGEXP|PST_EXTPAT);
+
       if (tok == WORD)
        {
          tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
@@ -4125,6 +4145,7 @@ parse_cond_command ()
 {
   COND_COM *cexp;
 
+  global_extglob = extended_glob;
   cexp = cond_expr ();
   return (make_cond_command (cexp));
 }
index 248a715fc62aba28c38f598a568121999bf3d0f9..bc1f07961e71fee0ce257ba0085480fadd58dd0a 100644 (file)
--- a/parse.y~
+++ b/parse.y~
@@ -246,10 +246,6 @@ int promptvars = 1;
    quotes. */
 int extended_quote = 1;
 
-/* The decoded prompt string.  Used if READLINE is not defined or if
-   editing is turned off.  Analogous to current_readline_prompt. */
-static char *current_decoded_prompt;
-
 /* The number of lines read from input while creating the current command. */
 int current_command_line_count;
 
@@ -286,6 +282,10 @@ static int function_bstart;
 /* The line number in a script at which an arithmetic for command starts. */
 static int arith_for_lineno;
 
+/* The decoded prompt string.  Used if READLINE is not defined or if
+   editing is turned off.  Analogous to current_readline_prompt. */
+static char *current_decoded_prompt;
+
 /* The last read token, or NULL.  read_token () uses this for context
    checking. */
 static int last_read_token;
@@ -296,6 +296,8 @@ static int token_before_that;
 /* The token read prior to token_before_that. */
 static int two_tokens_ago;
 
+static int global_extglob;
+
 /* The line number in a script where the word in a `case WORD', `select WORD'
    or `for WORD' begins.  This is a nested command maximum, since the array
    index is decremented after a case, select, or for command is parsed. */
@@ -2769,6 +2771,13 @@ reset_parser ()
   dstack.delimiter_depth = 0;  /* No delimiters found so far. */
   open_brace_count = 0;
 
+  /* Reset to global value of extended glob */
+  if (parser_state & PST_EXTPAT)
+{
+itrace("reset_parser: parser_state includes PST_EXTPAT");
+    extended_glob = global_extglob;
+}
+
   parser_state = 0;
 
 #if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
@@ -4043,7 +4052,13 @@ cond_term ()
       /* binop */
       tok = read_token (READ);
       if (tok == WORD && test_binop (yylval.word->word))
-       op = yylval.word;
+       {
+         op = yylval.word;
+         if (op->word[0] == '=' && (op->word[1] == '\0' || (op->word[1] == '=' && op->word[2] == '\0')))
+           parser_state |= PST_EXTPAT;
+         else if (op->word[0] == '!' && op->word[1] == '=' && op->word[2] == '\0')
+           parser_state |= PST_EXTPAT;
+       }
 #if defined (COND_REGEXP)
       else if (tok == WORD && STREQ (yylval.word->word, "=~"))
        {
@@ -4079,8 +4094,18 @@ cond_term ()
        }
 
       /* rhs */
+      if (parser_state & PST_EXTPAT)
+{
+       extended_glob = 1;
+itrace("cond_node: temporarily set extended_glob to 1");
+}
       tok = read_token (READ);
-      parser_state &= ~PST_REGEXP;
+      if (parser_state & PST_EXTPAT)
+{
+itrace("cond_node: reset extended_glob to %d", global_extglob);
+       extended_glob = global_extglob;
+}
+      parser_state &= ~(PST_REGEXP|PST_EXTPAT);
       if (tok == WORD)
        {
          tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
@@ -4125,6 +4150,7 @@ parse_cond_command ()
 {
   COND_COM *cexp;
 
+  global_extglob = extended_glob;
   cexp = cond_expr ();
   return (make_cond_command (cexp));
 }
@@ -5084,10 +5110,12 @@ decode_prompt_string (string)
                t_string[tlen] = '\0';
 
 #if defined (MACOSX)
-temp = fnx_fromfs (t_string, tlen);
-if (temp != t_string)
-  strcpy (t_string, temp);
+               /* Convert from "fs" format to "input" format */
+               temp = fnx_fromfs (t_string, strlen (t_string));
+               if (temp != t_string)
+                 strcpy (t_string, temp);
 #endif
+
 #define ROOT_PATH(x)   ((x)[0] == '/' && (x)[1] == 0)
 #define DOUBLE_SLASH_ROOT(x)   ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
                /* Abbreviate \W as ~ if $PWD == $HOME */
index 5e71a96a329fcfea95abee327709b380e06ea859..9ff657696f2c1c346228f9df29637026a1350d15 100644 (file)
--- a/parser.h
+++ b/parser.h
 #  include "input.h"
 
 /* Possible states for the parser that require it to do special things. */
-#define PST_CASEPAT    0x00001         /* in a case pattern list */
-#define PST_ALEXPNEXT  0x00002         /* expand next word for aliases */
-#define PST_ALLOWOPNBRC        0x00004         /* allow open brace for function def */
-#define PST_NEEDCLOSBRC        0x00008         /* need close brace */
-#define PST_DBLPAREN   0x00010         /* double-paren parsing */
-#define PST_SUBSHELL   0x00020         /* ( ... ) subshell */
-#define PST_CMDSUBST   0x00040         /* $( ... ) command substitution */
-#define PST_CASESTMT   0x00080         /* parsing a case statement */
-#define PST_CONDCMD    0x00100         /* parsing a [[...]] command */
-#define PST_CONDEXPR   0x00200         /* parsing the guts of [[...]] */
-#define PST_ARITHFOR   0x00400         /* parsing an arithmetic for command */
-#define PST_ALEXPAND   0x00800         /* OK to expand aliases - unused */
-#define PST_CMDTOKEN   0x01000         /* command token OK - unused */
-#define PST_COMPASSIGN 0x02000         /* parsing x=(...) compound assignment */
-#define PST_ASSIGNOK   0x04000         /* assignment statement ok in this context */
-#define PST_EOFTOKEN   0x08000         /* yylex checks against shell_eof_token */
-#define PST_REGEXP     0x10000         /* parsing an ERE/BRE as a single word */
-#define PST_HEREDOC    0x20000         /* reading body of here-document */
-#define PST_REPARSE    0x40000         /* re-parsing in parse_string_to_word_list */
-#define PST_REDIRLIST  0x80000         /* parsing a list of redirctions preceding a simple command name */
+#define PST_CASEPAT    0x000001        /* in a case pattern list */
+#define PST_ALEXPNEXT  0x000002        /* expand next word for aliases */
+#define PST_ALLOWOPNBRC        0x000004        /* allow open brace for function def */
+#define PST_NEEDCLOSBRC        0x000008        /* need close brace */
+#define PST_DBLPAREN   0x000010        /* double-paren parsing */
+#define PST_SUBSHELL   0x000020        /* ( ... ) subshell */
+#define PST_CMDSUBST   0x000040        /* $( ... ) command substitution */
+#define PST_CASESTMT   0x000080        /* parsing a case statement */
+#define PST_CONDCMD    0x000100        /* parsing a [[...]] command */
+#define PST_CONDEXPR   0x000200        /* parsing the guts of [[...]] */
+#define PST_ARITHFOR   0x000400        /* parsing an arithmetic for command */
+#define PST_ALEXPAND   0x000800        /* OK to expand aliases - unused */
+#define PST_EXTPAT     0x001000        /* parsing an extended shell pattern */
+#define PST_COMPASSIGN 0x002000        /* parsing x=(...) compound assignment */
+#define PST_ASSIGNOK   0x004000        /* assignment statement ok in this context */
+#define PST_EOFTOKEN   0x008000        /* yylex checks against shell_eof_token */
+#define PST_REGEXP     0x010000        /* parsing an ERE/BRE as a single word */
+#define PST_HEREDOC    0x020000        /* reading body of here-document */
+#define PST_REPARSE    0x040000        /* re-parsing in parse_string_to_word_list */
+#define PST_REDIRLIST  0x080000        /* parsing a list of redirctions preceding a simple command name */
+
 
 /* Definition of the delimiter stack.  Needed by parse.y and bashhist.c. */
 struct dstack {
index 3c47dc96f0e226b344bbf7688f9d9a961230be6b..5e71a96a329fcfea95abee327709b380e06ea859 100644 (file)
--- a/parser.h~
+++ b/parser.h~
@@ -45,6 +45,7 @@
 #define PST_REGEXP     0x10000         /* parsing an ERE/BRE as a single word */
 #define PST_HEREDOC    0x20000         /* reading body of here-document */
 #define PST_REPARSE    0x40000         /* re-parsing in parse_string_to_word_list */
+#define PST_REDIRLIST  0x80000         /* parsing a list of redirctions preceding a simple command name */
 
 /* Definition of the delimiter stack.  Needed by parse.y and bashhist.c. */
 struct dstack {
index c10ac99e9730574aee937c5769cbc3077c82369a..2af2f568bfa11f0324f8b7a55e50fe876f584b15 100644 (file)
@@ -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_ */
index aaf85dcbc30f5b02fcb028b1c4ebae082e316ae6..c10ac99e9730574aee937c5769cbc3077c82369a 100644 (file)
@@ -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_ */
index 76344569422e46ee46742d536e81f36848960c1b..d603744f7e4f9fc07d89a6ca48898a7caa7f102f 100644 (file)
Binary files a/po/cs.gmo and b/po/cs.gmo differ
index e0340474c2d3d24c05e39d6d5634a538acecbcc6..90965e01de76a6cbd5589dc6bf0bb01f81be8145 100644 (file)
Binary files a/po/de.gmo and b/po/de.gmo differ
index 1761a6ec8d8115b79cd52e1f2d5f3f0d446f8188..6efe3656b80233ed452387be18f687313206b18d 100644 (file)
Binary files a/po/eo.gmo and b/po/eo.gmo differ
diff --git a/po/fi.gmo b/po/fi.gmo
new file mode 100644 (file)
index 0000000..e3580f7
Binary files /dev/null and b/po/fi.gmo differ
diff --git a/po/ga.gmo b/po/ga.gmo
new file mode 100644 (file)
index 0000000..e159a57
Binary files /dev/null and b/po/ga.gmo differ
index 07cc65c7c6f83b9e2dd9c0ee3413d0e3696a7d47..cce76fab0fdbdad2f396a34c5ca98c1ce8f98bc5 100644 (file)
--- a/po/ga.po
+++ b/po/ga.po
@@ -24,12 +24,12 @@ msgstr "droch-fhoscript eagair"
 #: arrayfunc.c:313 builtins/declare.def:474
 #, c-format
 msgid "%s: cannot convert indexed to associative array"
-msgstr ""
+msgstr "%s: ní féidir eagar innéacsaithe a thiontú go heagar comhthiomsaitheach"
 
 #: arrayfunc.c:479
 #, c-format
 msgid "%s: invalid associative array key"
-msgstr ""
+msgstr "%s: eochair neamhbhailí eagair chomhthiomsaithigh"
 
 #: arrayfunc.c:481
 #, c-format
@@ -39,7 +39,7 @@ msgstr "%s: ní féidir sannadh go hinnéacs neamhuimhriúil."
 #: arrayfunc.c:517
 #, c-format
 msgid "%s: %s: must use subscript when assigning associative array"
-msgstr ""
+msgstr "%s: %s: caithfear foscript a úsáid le sannadh chuig eagar comhthiomsaitheach"
 
 #: bashhist.c:379
 #, c-format
@@ -286,7 +286,7 @@ msgstr "Rabhadh: b'fhéidir nach n-oibríonn an rogha -C mar a bheifeá ag súil
 
 #: builtins/complete.def:786
 msgid "not currently executing completion function"
-msgstr ""
+msgstr "níl an fheidhm chomhlánaithe á rith faoi láthair"
 
 #: builtins/declare.def:122
 msgid "can only be used in a function"
@@ -309,7 +309,7 @@ msgstr "%s: ní féidir athróga eagair a scrios mar seo."
 #: builtins/declare.def:468
 #, c-format
 msgid "%s: cannot convert associative to indexed array"
-msgstr ""
+msgstr "%s: ní féidir eagar comhthiomsaitheach a thiontú go heagar innéacsaithe"
 
 #: builtins/enable.def:137 builtins/enable.def:145
 msgid "dynamic loading not available"
@@ -516,12 +516,12 @@ msgstr "%s: comhaireamh neamhbhailí línte"
 #: builtins/mapfile.def:269
 #, c-format
 msgid "%s: invalid array origin"
-msgstr ""
+msgstr "%s: bunphointe neamhbhailí eagair"
 
 #: builtins/mapfile.def:286
 #, c-format
 msgid "%s: invalid callback quantum"
-msgstr ""
+msgstr "%s: candam neamhbhailí aisghlaoigh"
 
 #: builtins/mapfile.def:318
 msgid "empty array variable name"
@@ -846,7 +846,7 @@ msgstr "Ní féidir an tuairisceoir comhaid %d a dhúbailt mar thuairisceoir com
 
 #: expr.c:241
 msgid "expression recursion level exceeded"
-msgstr ""
+msgstr "imithe thar leibhéal athchursála sloinn"
 
 #: expr.c:265
 msgid "recursion stack underflow"
@@ -917,7 +917,7 @@ msgstr "getcwd: ní féidir na máthairchomhadlanna a rochtain."
 #: input.c:94 subst.c:4559
 #, c-format
 msgid "cannot reset nodelay mode for fd %d"
-msgstr ""
+msgstr "ní féidir an mód gan mhoill a athshocrú le haghaidh an tuairisceora chomhaid %d"
 
 #: input.c:258
 #, c-format
@@ -931,12 +931,12 @@ msgstr "save_bash_input: tá an maolán ann cheana le haghaidh an tuairisceoir c
 
 #: jobs.c:466
 msgid "start_pipeline: pgrp pipe"
-msgstr ""
+msgstr "start_pipeline: pgrp píopa"
 
 #: jobs.c:887
 #, c-format
 msgid "forked pid %d appears in running job %d"
-msgstr ""
+msgstr "tá an aitheantas an phróisis ghabhlaithe %d sa jab %d atá ag rith"
 
 #: jobs.c:1005
 #, c-format
@@ -946,7 +946,7 @@ msgstr "Tá an jab stoptha %d leis an ngrúpa próisis %ld á scrios."
 #: jobs.c:1110
 #, c-format
 msgid "add_process: process %5ld (%s) in the_pipeline"
-msgstr ""
+msgstr "add_process: próiseas %5ld (%s) sa phíblíne"
 
 #: jobs.c:1113
 #, c-format
@@ -1002,17 +1002,17 @@ msgstr "(cuimhne dumpáilte)"
 #: jobs.c:1568
 #, c-format
 msgid "  (wd: %s)"
-msgstr ""
+msgstr "  (comhadlann oibre: %s)"
 
 #: jobs.c:1771
 #, c-format
 msgid "child setpgid (%ld to %ld)"
-msgstr ""
+msgstr "setpgid macphróisis (%ld go %ld)"
 
 #: jobs.c:2099 nojobs.c:585
 #, c-format
 msgid "wait: pid %ld is not a child of this shell"
-msgstr "wait: níl an próiseas %ld ina mhac den bhlaosc seo."
+msgstr "wait: níl an próiseas %ld ina mhacphróiseas den bhlaosc seo."
 
 #: jobs.c:2326
 #, c-format
@@ -1047,19 +1047,19 @@ msgstr " (cuimhne dumpáilte)"
 #: jobs.c:3518 jobs.c:3531
 #, c-format
 msgid "(wd now: %s)\n"
-msgstr ""
+msgstr "(comhadlann oibre anois: %s)\n"
 
 #: jobs.c:3563
 msgid "initialize_job_control: getpgrp failed"
-msgstr ""
+msgstr "initialize_job_control: theip ar getpgrp"
 
 #: jobs.c:3623
 msgid "initialize_job_control: line discipline"
-msgstr ""
+msgstr "initialize_job_control: araíonacht líne"
 
 #: jobs.c:3633
 msgid "initialize_job_control: setpgid"
-msgstr ""
+msgstr "initialize_job_control: setpgid"
 
 #: jobs.c:3661
 #, c-format
@@ -1192,7 +1192,7 @@ msgstr "make_here_document: drochchineál ordaithe %d"
 #: make_cmd.c:651
 #, c-format
 msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
-msgstr ""
+msgstr "cáipéis leabaithe ag líne %d teormharcáilte le deireadh comhaid (\"%s\" á lorg)"
 
 #: make_cmd.c:746
 #, c-format
@@ -1337,7 +1337,7 @@ msgstr "%s: srianta: ní féidir aschur a atreorú."
 #: redir.c:162
 #, c-format
 msgid "cannot create temp file for here-document: %s"
-msgstr ""
+msgstr "ní féidir cáipéis shealadach a chruthú don cháipéis leabaithe: %s"
 
 #: redir.c:517
 msgid "/dev/(tcp|udp)/host/port not supported without networking"
@@ -1417,7 +1417,7 @@ msgstr "sigprocmask: %d: oibríocht neamhbhailí"
 
 #: siglist.c:47
 msgid "Bogus signal"
-msgstr ""
+msgstr "Droch-chomhartha"
 
 #: siglist.c:50
 msgid "Hangup"
@@ -1437,7 +1437,7 @@ msgstr "Treoir mídhleathach"
 
 #: siglist.c:66
 msgid "BPT trace/trap"
-msgstr ""
+msgstr "Rianú/gaistiú brisphointe"
 
 #: siglist.c:74
 msgid "ABORT instruction"
@@ -1449,11 +1449,11 @@ msgstr "Treoir EMT"
 
 #: siglist.c:82
 msgid "Floating point exception"
-msgstr ""
+msgstr "Eisceacht snámhphointe"
 
 #: siglist.c:86
 msgid "Killed"
-msgstr ""
+msgstr "Maraithe"
 
 #: siglist.c:90
 msgid "Bus error"
@@ -1461,7 +1461,7 @@ msgstr "Earráid bhus"
 
 #: siglist.c:94
 msgid "Segmentation fault"
-msgstr ""
+msgstr "Fabht deighilte"
 
 #: siglist.c:98
 msgid "Bad system call"
@@ -1473,15 +1473,15 @@ msgstr "Píopa briste"
 
 #: siglist.c:106
 msgid "Alarm clock"
-msgstr ""
+msgstr "Clog aláraim"
 
 #: siglist.c:110
 msgid "Terminated"
-msgstr ""
+msgstr "Críochnaithe"
 
 #: siglist.c:114
 msgid "Urgent IO condition"
-msgstr ""
+msgstr "Staid phráinneach I/A"
 
 #: siglist.c:118
 msgid "Stopped (signal)"
@@ -1493,7 +1493,7 @@ msgstr "Lean ar aghaidh"
 
 #: siglist.c:134
 msgid "Child death or stop"
-msgstr ""
+msgstr "Bás macphróisis nó stopadh"
 
 #: siglist.c:138
 msgid "Stopped (tty input)"
@@ -1509,19 +1509,19 @@ msgstr "I/A ullamh"
 
 #: siglist.c:150
 msgid "CPU limit"
-msgstr ""
+msgstr "Teorainn LAP"
 
 #: siglist.c:154
 msgid "File limit"
-msgstr ""
+msgstr "Teorainn chomhad"
 
 #: siglist.c:158
 msgid "Alarm (virtual)"
-msgstr ""
+msgstr "Aláram (fíorúil)"
 
 #: siglist.c:162
 msgid "Alarm (profile)"
-msgstr ""
+msgstr "Aláram (próifíl)"
 
 #: siglist.c:166
 msgid "Window changed"
@@ -1529,7 +1529,7 @@ msgstr "Fuinneog athraithe"
 
 #: siglist.c:170
 msgid "Record lock"
-msgstr ""
+msgstr "Glas taifid"
 
 #: siglist.c:174
 msgid "User signal 1"
@@ -1541,7 +1541,7 @@ msgstr "Comhartha úsáideora 2"
 
 #: siglist.c:182
 msgid "HFT input data pending"
-msgstr ""
+msgstr "sonraí ionchuir HFT ar feitheamh"
 
 #: siglist.c:186
 msgid "power failure imminent"
@@ -1553,27 +1553,27 @@ msgstr "cliseadh córais ar tí tarlú"
 
 #: siglist.c:194
 msgid "migrate process to another CPU"
-msgstr ""
+msgstr "bog próiseas go LAP eile"
 
 #: siglist.c:198
 msgid "programming error"
-msgstr ""
+msgstr "earráid ríomhchláraithe"
 
 #: siglist.c:202
 msgid "HFT monitor mode granted"
-msgstr ""
+msgstr "mód monatóireachta HFT ceadaithe"
 
 #: siglist.c:206
 msgid "HFT monitor mode retracted"
-msgstr ""
+msgstr "mód monatóireachta HFT cealaithe"
 
 #: siglist.c:210
 msgid "HFT sound sequence has completed"
-msgstr ""
+msgstr "seicheamh fuaime HFT críochnaithe"
 
 #: siglist.c:214
 msgid "Information request"
-msgstr ""
+msgstr "Iarratas faisnéise"
 
 #: siglist.c:222
 msgid "Unknown Signal #"
@@ -1600,7 +1600,7 @@ msgstr "Ní féidir píopa a dhéanamh le haghaidh ionadaíocht próisis."
 
 #: subst.c:4504
 msgid "cannot make child for process substitution"
-msgstr "Ní féidir mac a dhéanamh le haghaidh ionadaíocht próisis."
+msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadaíocht próisis."
 
 #: subst.c:4549
 #, c-format
@@ -1623,7 +1623,7 @@ msgstr "Ní féidir píopa a dhéanamh le haghaidh ionadú ordaithe."
 
 #: subst.c:4799
 msgid "cannot make child for command substitution"
-msgstr "Ní féidir mac a dhéanamh le haghaidh ionadú ordaithe."
+msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadú ordaithe."
 
 #: subst.c:4816
 msgid "command_substitute: cannot duplicate pipe as fd 1"
@@ -1661,7 +1661,7 @@ msgstr "gan meaitseáil: %s"
 
 #: test.c:145
 msgid "argument expected"
-msgstr "Bhíothas ag súil le hargóint"
+msgstr "Bhíothas ag súil le hargóint."
 
 #: test.c:154
 #, c-format
@@ -1675,7 +1675,7 @@ msgstr "Ag súil le \")\""
 #: test.c:264
 #, c-format
 msgid "`)' expected, found %s"
-msgstr "Ag súil le \")\", ach fuarthas %s"
+msgstr "Ag súil le \")\", ach fuarthas %s."
 
 #: test.c:279 test.c:688 test.c:691
 #, c-format
@@ -1740,7 +1740,7 @@ msgstr "Níl \"=\" sa teaghrán easpórtála le haghaidh %s."
 
 #: variables.c:3794
 msgid "pop_var_context: head of shell_variables not a function context"
-msgstr ""
+msgstr "pop_var_context: ní comhthéacs feidhme é ceann shell_variables"
 
 #: variables.c:3807
 msgid "pop_var_context: no global_variables context"
@@ -1748,7 +1748,7 @@ msgstr "pop_var_context: níl comhthéacs global_variables ann"
 
 #: variables.c:3881
 msgid "pop_scope: head of shell_variables not a temporary environment scope"
-msgstr ""
+msgstr "pop_scope: ní scóip shealadach thimpeallachta é ceann shell_variables"
 
 #: version.c:46
 msgid "Copyright (C) 2009 Free Software Foundation, Inc."
@@ -1835,7 +1835,7 @@ msgstr "continue [n]"
 
 #: builtins.c:58
 msgid "builtin [shell-builtin [arg ...]]"
-msgstr ""
+msgstr "builtin [ordú-ionsuite-blaoisce [argóint ...]]"
 
 #: builtins.c:61
 msgid "caller [expr]"
@@ -1875,7 +1875,7 @@ msgstr "typeset [-aAfFilrtux] [-p] ainm[=luach] ..."
 
 #: builtins.c:80
 msgid "local [option] name[=value] ..."
-msgstr "local [rogha] ainm[=luach] ..."
+msgstr "local [ROGHA] AINM[=LUACH] ..."
 
 #: builtins.c:83
 msgid "echo [-neE] [arg ...]"
@@ -1911,39 +1911,39 @@ msgstr "logout [n]"
 
 #: builtins.c:103
 msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
-msgstr ""
+msgstr "fc [-e AINM_E] [-lnr] [CÉAD] [DEIREANACH] nó fc -s [PATRÚN=IONADAÍ] [ORDÚ]"
 
 #: builtins.c:107
 msgid "fg [job_spec]"
-msgstr "fg [sonrú_jab]"
+msgstr "fg [SONRÚ_JAB]"
 
 #: builtins.c:111
 msgid "bg [job_spec ...]"
-msgstr "bg [sonrú_jab ...]"
+msgstr "bg [SONRÚ_JAB ...]"
 
 #: builtins.c:114
 msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
-msgstr "hash [-lr] [-p conair] [-dt] [ainm ...]"
+msgstr "hash [-lr] [-p CONAIR] [-dt] [AINM ...]"
 
 #: builtins.c:117
 msgid "help [-ds] [pattern ...]"
-msgstr "help [-ds] [patrún ...]"
+msgstr "help [-ds] [PATRÚN ...]"
 
 #: builtins.c:121
 msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]"
-msgstr "history [-c] [-d seach-chur] [n] nó history -anrw [comhadainm] nó history -ps argóint [argóint...]"
+msgstr "history [-c] [-d SEACH_CHUR] [n] nó history -anrw [COMHADAINM] nó history -ps ARGÓINT [ARGÓINT...]"
 
 #: builtins.c:125
 msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
-msgstr "jobs [-lnprs] [sonrú_jab ...] nó jobs -x ordú [argóintí]"
+msgstr "jobs [-lnprs] [SONRÚ_JAB ...] nó jobs -x ORDÚ [ARGÓINTÍ]"
 
 #: builtins.c:129
 msgid "disown [-h] [-ar] [jobspec ...]"
-msgstr "disown [-h] [-ar] [sonrú_jab ...]"
+msgstr "disown [-h] [-ar] [SONRÚ_JAB ...]"
 
 #: builtins.c:132
 msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]"
-msgstr ""
+msgstr "kill [-s sonrú_comhartha | -n uimhir_chomhartha | -sonrú_comhartha] aitheantóir_próisis | sonrú_jab ... nó kill -l [sonrú_comhartha]"
 
 #: builtins.c:134
 msgid "let arg [arg ...]"
@@ -1951,7 +1951,7 @@ msgstr "let argóint [argóint ...]"
 
 #: builtins.c:136
 msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-p prompt] [-t timeout] [-u fd] [name ...]"
-msgstr ""
+msgstr "read [-ers] [-a eagar] [-d teormharcóir] [-i téacs] [-n líon_carachtar] [-p leid] [-t teorainn_ama] [-u tuairisceoir_comhaid] [ainm ...]"
 
 #: builtins.c:138
 msgid "return [n]"
@@ -2083,7 +2083,7 @@ msgstr "[[ slonn ]]"
 
 #: builtins.c:210
 msgid "variables - Names and meanings of some shell variables"
-msgstr "variables - Ainmneacha agus mínithe d'athróga áirithe blaoisce"
+msgstr "Athróga - ainmneacha agus mínithe ar fathróga áirithe blaoisce"
 
 #: builtins.c:213
 msgid "pushd [-n] [+N | -N | dir]"
@@ -2107,11 +2107,11 @@ msgstr "printf [-v athróg] formáid [argóintí]"
 
 #: builtins.c:229
 msgid "complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist]  [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]"
-msgstr ""
+msgstr "complete [-abcdefgjksuv] [-pr] [-o rogha] [-A gníomh] [-G patrún] [-W liosta_focal]  [-F feidhm] [-C ordú] [-X patrún_scagaire] [-P réimír] [-S iarmhír] [ainm ...]"
 
 #: builtins.c:233
 msgid "compgen [-abcdefgjksuv] [-o option]  [-A action] [-G globpat] [-W wordlist]  [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
-msgstr ""
+msgstr "compgen [-abcdefgjksuv] [-o rogha]  [-A gníomh] [-G patrún] [-W liosta_focal]  [-F feidhm] [-C ordú] [-X patrún_scagaire] [-P réimír] [-S iarmhír] [focal]"
 
 #: builtins.c:237
 msgid "compopt [-o|+o option] [name ...]"
@@ -2156,7 +2156,7 @@ msgstr ""
 "      -p\tPriontáil gach ailias sainithe i bhfoirm inathúsáidte.\n"
 "    \n"
 "    Stádas Scortha:\n"
-"    Cuireann alias an luach true ar ais mura thugtar AINM nach bhfuil\n"
+"    Aischuirtear an luach true mura thugtar AINM nach bhfuil\n"
 "    ailias sainithe dó."
 
 #: builtins.c:276
@@ -2168,6 +2168,12 @@ msgid ""
 "    \n"
 "    Return success unless a NAME is not an existing alias."
 msgstr ""
+"Bain gach AINM de liosta na n-ailiasanna sainithe.\n"
+"    \n"
+"    Roghanna:\n"
+"      -a\tbain gach sainiú ailias.\n"
+"     \n"
+"    Aischuirtear rath ach sa chás nach bhfuil AINM ann."
 
 #: builtins.c:289
 msgid ""
@@ -2306,7 +2312,7 @@ msgstr ""
 "    Mar réamhshocrú, oibríonn \"pwd\" faoi mar a bheadh \"-L\" sonraithe.\n"
 "    \n"
 "    Stádas Scortha:\n"
-"    Aischuireann luach de 0 mura thugtar rogha neamhbhailí nó mura féidir\n"
+"    Aischuirtear luach de 0 mura thugtar rogha neamhbhailí nó mura féidir\n"
 "    an chomhadlann reatha a léamh."
 
 #: builtins.c:428
@@ -2320,7 +2326,7 @@ msgid ""
 msgstr ""
 "Ordú neamhnitheach.\n"
 "    \n"
-"    Gan éifeacht. Ní dhéanann an t-ordú faic.\n"
+"    Gan éifeacht; ní dhéanann an t-ordú faic.\n"
 "    \n"
 "    Stadas Scortha:\n"
 "    Éiríonn leis i gcónaí."
@@ -2332,6 +2338,10 @@ msgid ""
 "    Exit Status:\n"
 "    Always succeeds."
 msgstr ""
+"Aischuir toradh rathúil.\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Éiríonn leis i gcónaí."
 
 #: builtins.c:448
 msgid ""
@@ -2340,6 +2350,10 @@ msgid ""
 "    Exit Status:\n"
 "    Always fails."
 msgstr ""
+"Aischuir toradh neamhrathúil.\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Teipeann air i gcónaí."
 
 #: builtins.c:457
 msgid ""
@@ -2402,7 +2416,7 @@ msgid ""
 msgstr ""
 "Socraigh luachanna agus airíonna athróg.\n"
 "    \n"
-"    Imithe i léig. Feic 'help declare'."
+"    Imithe i léig. Feic \"help declare\"."
 
 #: builtins.c:520
 msgid ""
@@ -2418,6 +2432,17 @@ msgid ""
 "    Returns success unless an invalid option is supplied, an error occurs,\n"
 "    or the shell is not executing a function."
 msgstr ""
+"Sainigh athróga logánta.\n"
+"    \n"
+"    Cruthaítear athróg logánta darbh ainm AINM, agus cuirtear LUACH leis. Is\n"
+"    féidir le ROGHA a bheith ceann ar bith de na roghanna a ghlacann \"declare\" leo.\n"
+"    \n"
+"    Ní féidir athróga logánta a úsáid ach laistigh de fheidhm. Tá siad infheicthe\n"
+"    san fheidhm ina shainítear iad agus a mic amháin.\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Aischuirtear rath mura thugtar rogha neamhbhailí, nó mura tharlaíonn earráid,\n"
+"    nó mura bhfuil an bhlaosc ag rith feidhme."
 
 #: builtins.c:537
 msgid ""
@@ -2462,6 +2487,15 @@ msgid ""
 "    Exit Status:\n"
 "    Returns success unless a write error occurs."
 msgstr ""
+"Scríobh argóintí go dtí an gnáthaschur.\n"
+"    \n"
+"    Taispeáin na hARGÓINTÍ ar an ngnáthaschur agus líne nua ina ndiaidh.\n"
+"    \n"
+"    Roghanna:\n"
+"      -n\tná hiarcheangail líne nua\n"
+"    \n"
+"    stádas Scortha:\n"
+"    Aischuirtear rath ach i gcás earráide scríofa."
 
 #: builtins.c:586
 msgid ""
@@ -2500,6 +2534,13 @@ msgid ""
 "    Exit Status:\n"
 "    Returns exit status of command or success if command is null."
 msgstr ""
+"Rith argóintí mar ordú blaoisce.\n"
+"    \n"
+"    Cuir ARGÓINTÍ i dteaghrán amháin, úsáid an toradh mar ionchur go dtí\n"
+"    an bhlaosc, agus rith na horduithe toraidh.\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Aischuirtear stádas scortha an ordaithe, nó rath más ordú neamhnitheach é."
 
 #: builtins.c:626
 msgid ""
@@ -2581,6 +2622,10 @@ msgid ""
 "    Exits a login shell with exit status N.  Returns an error if not executed\n"
 "    in a login shell."
 msgstr ""
+"Scoir de bhlaosc logála isteach.\n"
+"    \n"
+"    Scoireann de bhlaosc logála isteach le stádas scortha N. Aischuirtear\n"
+"    earráid má ritear é i mblaosc nach blaosc logála isteach í."
 
 #: builtins.c:708
 msgid ""
@@ -2608,6 +2653,26 @@ msgid ""
 "    Exit Status:\n"
 "    Returns success or status of executed command; non-zero if an error occurs."
 msgstr ""
+"Taispeáin nó rith orduithe ón liosta staire.\n"
+"    \n"
+"    Úsáidtear fc chun orduithe ón liosta staire a liostú, a chur in eagar, nó a ath-rith.\n"
+"    Más uimhreacha iad CÉAD agus DEIREANACH, sonraíonn siad an raon, nó is\n"
+"    féidir le CÉAD bheith ina theaghrán, rud a chiallaíonn an t-ordú is deireanaí a\n"
+"    thosaíonn leis an teaghrán sin.\n"
+"    \n"
+"    Roghanna:\n"
+"      -e AINM_E\troghnaigh an clár eagarthóra atá le húsáid. FCEDIT an réamhshocrú,\n"
+"               \tansin EDITOR, agus ansin vi.\n"
+"      -n\tfág uimhreacha na línte ar lár agus liosta á thaispeáint\n"
+"      -r\taisiompaigh ord na línte (.i. liostaigh an ceann is nuaí ar dtús)\n"
+"    \n"
+"    San fhormáid \"fc -s [PATRÚN=IONADAÍ ...] [ORDÚ]\", ath-ritear ORDÚ\n"
+"    tar éis an t-ionadú SEAN=NUA a dhéanamh.\n"
+"    \n"
+"    Ailias úsáideach is ea r='fc -s', sa chaoi go ritheann \"r cc\" an t-ordú is deireanaí\n"
+"    a thosaíonn le \"cc\", agus ath-ritheann \"r\" an t-ordú is deireanaí.\n"
+"    \n"
+"    Stádas Scortha:n\\     Aischuirtear rath nó stádas an ordaithe rite; neamh-nialas má tharlaíonn earráid."
 
 #: builtins.c:738
 msgid ""
@@ -2620,6 +2685,13 @@ msgid ""
 "    Exit Status:\n"
 "    Status of command placed in foreground, or failure if an error occurs."
 msgstr ""
+"Bog jab go dtí an tulra.\n"
+"    \n"
+"    Cuir an jab a shonraítear le SONRÚ_JAB sa tulra agus é mar an jab reatha.\n"
+"    Mura bhfuil SONRÚ_JAB ann, úsáidtear cibé jab atá reatha de réir na blaoisce.\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Stádas an ordaithe curtha sa tulra, nó teip má tharlaíonn earráid."
 
 #: builtins.c:753
 msgid ""
@@ -2632,6 +2704,14 @@ msgid ""
 "    Exit Status:\n"
 "    Returns success unless job control is not enabled or an error occurs."
 msgstr ""
+"Bog jabanna go dtí an cúlra.\n"
+"    \n"
+"    Cuir an jab a shonraítear le SONRÚ_JAB sa chúlra cosúil le é a thosú le \"&\".\n"
+"    Mura bhfuil SONRÚ_JAB ann, úsáidtear cibé jab atá reatha de réir na blaoisce.\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Aischuirtear rath ach má tharlaíonn earráid nó mura bhfuil\n"
+"    rialú jabanna cumasaithe."
 
 #: builtins.c:767
 msgid ""
@@ -2676,6 +2756,24 @@ msgid ""
 "    Exit Status:\n"
 "    Returns success unless PATTERN is not found or an invalid option is given."
 msgstr ""
+"Taispeáin eolas maidir le horduithe ionsuite.\n"
+"    \n"
+"    Taispeántar achoimrí na n-orduithe ionsuite. Má shonraítear PATRÚN,\n"
+"    taispeántar cabhair chuimsitheach faoi gach ordú a mheaitseálann PATRÚN;\n"
+"    i gcásanna eile taispeántar liosta na n-ábhar cabhrach.\n"
+"    \n"
+"    Roghanna:\n"
+"      -d\ttaispeáin cur síos gairid ar gach ábhar\n"
+"      -m\ttaispeáin úsáid i bhformáid cosúil leis an lámhleabhar man(1)\n"
+"      -s\tná taispeáin ach achoimre gairid úsáide le haghaidh gach ábhair a\n"
+"        \tmheatseálann PATRÚN\n"
+"    \n"
+"    Argóintí:\n"
+"      PATRÚN\tpatrún a shonraíonn ábhar cabhrach\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Aischuirtear rath ach sa chás nach n-aimsítear PATRÚN nó go dtugtar\n"
+"    rogha neamhbhailí."
 
 #: builtins.c:816
 msgid ""
@@ -3138,6 +3236,14 @@ msgid ""
 "    Exit Status:\n"
 "    Always succeeds."
 msgstr ""
+"Taispeáin amanna próisis.\n"
+"    \n"
+"    \n"
+"Taispeántar amanna carntha úsáideora agus córais na blaoisce agus a\n"
+"    macphróiseas.\n"
+"    \n"
+"    Stádas Scortha:\n"
+"    Éiríonn leis i gcónaí."
 
 #: builtins.c:1317
 msgid ""
index 3b3360c2fc3a0bd4c2727f81e4f2bc2fc1a5b610..458ccbfed9550643ae66f3e60ca929c60ab29c3c 100644 (file)
Binary files a/po/lt.gmo and b/po/lt.gmo differ
index 15eda2c52ef89ac0db44abd854438586a90139c4..0a232fdbc18d67c45058387655c52f2689c53fe3 100644 (file)
Binary files a/po/sv.gmo and b/po/sv.gmo differ
index 2411ab4ac3c905d47d8bdc8d2383900a644a9f82..76b51069e487a4423977c964500cd2d1a37c3a5e 100644 (file)
Binary files a/po/vi.gmo and b/po/vi.gmo differ
diff --git a/subst.c b/subst.c
index 8c646cc75a81c5667ef134e6c8225112e0e4036a..a59c785b1e360286a574921b050b918725341506 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -93,6 +93,11 @@ extern int errno;
 #define LPAREN         '('
 #define RPAREN         ')'
 
+#if defined (HANDLE_MULTIBYTE)
+#define WLPAREN                L'('
+#define WRPAREN                L')'
+#endif
+
 /* Evaluates to 1 if C is one of the shell's special parameters whose length
    can be taken, but is also one of the special expansion characters. */
 #define VALID_SPECIAL_LENGTH_PARAM(c) \
@@ -1131,7 +1136,7 @@ extract_command_subst (string, sindex, xflags)
      int *sindex;
      int xflags;
 {
-  if (string[*sindex] == '(')  /*)*/
+  if (string[*sindex] == LPAREN)
     return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/
   else
     {
@@ -1625,7 +1630,7 @@ skip_to_delim (string, start, delims, flags)
      char *delims;
      int flags;
 {
-  int i, pass_next, backq, si, c, invert, skipquote;
+  int i, pass_next, backq, si, c, invert, skipquote, skipcmd;
   size_t slen;
   char *temp;
   DECLARE_MBSTATE;
@@ -1634,6 +1639,7 @@ skip_to_delim (string, start, delims, flags)
   if (flags & SD_NOJMP)
     no_longjmp_on_fatal_error = 1;
   invert = (flags & SD_INVERT);
+  skipcmd = (flags & SD_NOSKIPCMD) == 0;
 
   i = start;
   pass_next = backq = 0;
@@ -1679,7 +1685,7 @@ skip_to_delim (string, start, delims, flags)
                          : skip_double_quoted (string, slen, ++i);
          /* no increment, the skip functions increment past the closing quote. */
        }
-      else if (c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
+      else if (c == '$' && ((skipcmd && string[i+1] == LPAREN) || string[i+1] == LBRACE))
        {
          si = i + 2;
          if (string[si] == '\0')
@@ -1695,6 +1701,20 @@ skip_to_delim (string, start, delims, flags)
          i++;
          continue;
        }
+#if defined (PROCESS_SUBSTITUTION)
+      else if (skipcmd && (c == '<' || c == '>') && string[i+1] == LPAREN)
+       {
+         si = i + 2;
+         if (string[si] == '\0')
+           CQ_RETURN(si);
+         temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+         i = si;
+         if (string[i] == '\0')
+           break;
+         i++;
+         continue;
+       }
+#endif /* PROCESS_SUBSTITUTION */
       else if ((skipquote || invert) && (member (c, delims) == 0))
        break;
       else
@@ -3928,11 +3948,11 @@ match_upattern (string, pat, mtype, sp, ep)
   /* XXX - check this later if I ever implement `**' with special meaning,
      since this will potentially result in `**' at the beginning or end */
   len = STRLEN (pat);
-  if (pat[0] != '*' || (pat[0] == '*' && pat[1] == '(' && extended_glob) || pat[len - 1] != '*')       /*)*/
+  if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*')
     {
       p = npat = (char *)xmalloc (len + 3);
       p1 = pat;
-      if (*p1 != '*' || (*p1 == '*' && p1[1] == '(' && extended_glob)) /*)*/
+      if (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))
        *p++ = '*';
       while (*p1)
        *p++ = *p1++;
@@ -4072,11 +4092,11 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep)
   /* XXX - check this later if I ever implement `**' with special meaning,
      since this will potentially result in `**' at the beginning or end */
   len = wcslen (wpat);
-  if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == L'(' && extended_glob) || wpat[len - 1] != L'*')       /*)*/
+  if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == WLPAREN && extended_glob) || wpat[len - 1] != L'*')
     {
       wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t));
       wp1 = wpat;
-      if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == '(' && extended_glob))     /*)*/
+      if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == WLPAREN && extended_glob))
        *wp++ = L'*';
       while (*wp1 != L'\0')
        *wp++ = *wp1++;
@@ -6542,9 +6562,9 @@ chk_arithsub (s, len)
   i = count = 0;
   while (i < len)
     {
-      if (s[i] == '(')
+      if (s[i] == LPAREN)
        count++;
-      else if (s[i] == ')')
+      else if (s[i] == RPAREN)
        {
          count--;
          if (count < 0)
index 211507bb611ce6a659fc871ad21b5d95d8c5df63..6655861d3b1283c19793db507655e4e6146eb522 100644 (file)
--- a/subst.c~
+++ b/subst.c~
@@ -93,6 +93,11 @@ extern int errno;
 #define LPAREN         '('
 #define RPAREN         ')'
 
+#if defined (HANDLE_MULTIBYTE)
+#define WLPAREN                L'('
+#define WRPAREN                L')'
+#endif
+
 /* Evaluates to 1 if C is one of the shell's special parameters whose length
    can be taken, but is also one of the special expansion characters. */
 #define VALID_SPECIAL_LENGTH_PARAM(c) \
@@ -1131,7 +1136,7 @@ extract_command_subst (string, sindex, xflags)
      int *sindex;
      int xflags;
 {
-  if (string[*sindex] == '(')  /*)*/
+  if (string[*sindex] == LPAREN)
     return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/
   else
     {
@@ -1639,6 +1644,10 @@ skip_to_delim (string, start, delims, flags)
   pass_next = backq = 0;
   while (c = string[i])
     {
+      /* If this is non-zero, we should not let quote characters be delimiters
+        and the current character is a single or double quote.  We should not
+        test whether or not it's a delimiter until after we skip single- or
+        double-quoted strings. */
       skipquote = ((flags & SD_NOQUOTEDELIM) && (c == '\'' || c =='"'));
       if (pass_next)
        {
@@ -1691,6 +1700,20 @@ skip_to_delim (string, start, delims, flags)
          i++;
          continue;
        }
+#if defined (PROCESS_SUBSTITUTION)
+      else if ((c == '<' || c == '>') && string[i+1] == LPAREN)
+       {
+         si = i + 2;
+         if (string[si] == '\0')
+           CQ_RETURN(si);
+         temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+         i = si;
+         if (string[i] == '\0')
+           break;
+         i++;
+         continue;
+       }
+#endif /* PROCESS_SUBSTITUTION */
       else if ((skipquote || invert) && (member (c, delims) == 0))
        break;
       else
@@ -3924,11 +3947,11 @@ match_upattern (string, pat, mtype, sp, ep)
   /* XXX - check this later if I ever implement `**' with special meaning,
      since this will potentially result in `**' at the beginning or end */
   len = STRLEN (pat);
-  if (pat[0] != '*' || (pat[0] == '*' && pat[1] == '(' && extended_glob) || pat[len - 1] != '*')       /*)*/
+  if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*')
     {
       p = npat = (char *)xmalloc (len + 3);
       p1 = pat;
-      if (*p1 != '*' || (*p1 == '*' && p1[1] == '(' && extended_glob)) /*)*/
+      if (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))
        *p++ = '*';
       while (*p1)
        *p++ = *p1++;
@@ -4068,11 +4091,11 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep)
   /* XXX - check this later if I ever implement `**' with special meaning,
      since this will potentially result in `**' at the beginning or end */
   len = wcslen (wpat);
-  if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == L'(' && extended_glob) || wpat[len - 1] != L'*')       /*)*/
+  if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == WLPAREN && extended_glob) || wpat[len - 1] != L'*')
     {
       wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t));
       wp1 = wpat;
-      if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == '(' && extended_glob))     /*)*/
+      if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == WLPAREN && extended_glob))
        *wp++ = L'*';
       while (*wp1 != L'\0')
        *wp++ = *wp1++;
@@ -6538,9 +6561,9 @@ chk_arithsub (s, len)
   i = count = 0;
   while (i < len)
     {
-      if (s[i] == '(')
+      if (s[i] == LPAREN)
        count++;
-      else if (s[i] == ')')
+      else if (s[i] == RPAREN)
        {
          count--;
          if (count < 0)
diff --git a/subst.h b/subst.h
index 6158d11be62cfbe54e2a48895bdb14615a89497c..405654fb6226040bbf20f937e18470692eb2109a 100644 (file)
--- a/subst.h
+++ b/subst.h
@@ -267,6 +267,7 @@ extern char *cond_expand_word __P((WORD_DESC *, int));
 #define SD_NOJMP       0x01    /* don't longjmp on fatal error. */
 #define SD_INVERT      0x02    /* look for chars NOT in passed set */
 #define SD_NOQUOTEDELIM        0x04    /* don't let single or double quotes act as delimiters */
+#define SD_NOSKIPCMD   0x08    /* don't skip over $(, <(, or >( command/process substitution */
 
 extern int skip_to_delim __P((char *, int, char *, int));
 
index 02f8ef15e627e3d202867fcbaeb2a05ff5a0368c..6158d11be62cfbe54e2a48895bdb14615a89497c 100644 (file)
--- a/subst.h~
+++ b/subst.h~
@@ -266,6 +266,7 @@ extern char *cond_expand_word __P((WORD_DESC *, int));
 /* Flags for skip_to_delim */
 #define SD_NOJMP       0x01    /* don't longjmp on fatal error. */
 #define SD_INVERT      0x02    /* look for chars NOT in passed set */
+#define SD_NOQUOTEDELIM        0x04    /* don't let single or double quotes act as delimiters */
 
 extern int skip_to_delim __P((char *, int, char *, int));