Hello community,
here is the log from the commit of package bash for openSUSE:Factory
checked in at Fri Mar 20 19:04:15 CET 2009.
--------
--- bash/bash.changes 2009-03-04 17:36:58.000000000 +0100
+++ bash/bash.changes 2009-03-16 11:38:57.156011581 +0100
@@ -1,0 +2,16 @@
+Mon Mar 16 11:38:14 CET 2009 - werner@suse.de
+
+- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault
+
+-------------------------------------------------------------------
+Thu Mar 12 15:05:55 CET 2009 - werner@suse.de
+
+- Add patch from bug-bash@gnu.org to enable |& not only for
+ builtins and shell functions but for all commands.
+
+-------------------------------------------------------------------
+Tue Mar 10 14:50:55 CET 2009 - werner@suse.de
+
+- Switch to official patches, now we are on patch level 10
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
bash-4.0-complete.dif
New:
----
bash-4.0.10-bar-and-piping.patch
bash-4.0.10-segfault.patch
bash-4.0.10-typo.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bash.spec ++++++
--- /var/tmp/diff_new_pack.E21690/_old 2009-03-20 18:58:50.000000000 +0100
+++ /var/tmp/diff_new_pack.E21690/_new 2009-03-20 18:58:50.000000000 +0100
@@ -27,7 +27,7 @@
Suggests: command-not-found
AutoReqProv: on
Version: 4.0
-Release: 6
+Release: 7
Summary: The GNU Bourne-Again Shell
Url: http://www.gnu.org/software/bash/bash.html
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2
@@ -52,12 +52,14 @@
Patch14: bash-3.2-sigrestart.patch
Patch15: bash-3.2-longjmp.dif
Patch16: bash-4.0-setlocale.dif
-Patch17: bash-4.0-complete.dif
Patch20: readline-%{rl_vers}.dif
Patch21: readline-4.3-input.dif
Patch22: readline-6.0-wrap.patch
Patch23: readline-5.2-conf.patch
Patch30: readline-6.0-destdir.patch
+Patch40: bash-4.0.10-bar-and-piping.patch
+Patch41: bash-4.0.10-segfault.patch
+Patch42: bash-4.0.10-typo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global _incdir %{_includedir}
@@ -85,7 +87,7 @@
Provides: bash:%{_infodir}/bash.info.gz
PreReq: %install_info_prereq
Version: 4.0
-Release: 6
+Release: 7
AutoReqProv: on
%description -n bash-doc
@@ -105,7 +107,7 @@
Group: System/Libraries
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
Version: 6.0
-Release: 6
+Release: 7
Recommends: readline-doc = %{version}
# bug437293
%ifarch ppc64
@@ -134,7 +136,7 @@
Group: Development/Libraries/C and C++
Provides: bash:%{_libdir}/libreadline.a
Version: 6.0
-Release: 6
+Release: 7
Requires: libreadline6 = %{version}
Requires: ncurses-devel
Recommends: readline-doc = %{version}
@@ -163,7 +165,7 @@
Provides: readline:%{_infodir}/readline.info.gz
PreReq: %install_info_prereq
Version: 6.0
-Release: 6
+Release: 7
AutoReqProv: on
%description -n readline-doc
@@ -198,10 +200,12 @@
%patch14 -p0 -b .sigrestart
%patch15 -p0 -b .longjmp
%patch16 -p0 -b .setlocale
-%patch17 -p0 -b .complete
%patch21 -p0 -b .zerotty
%patch22 -p0 -b .wrap
%patch23 -p0 -b .conf
+%patch40 -p0 -b .pipe
+%patch41 -p0 -b .segfault
+%patch42 -p0 -b .typo
%patch0 -p0
cd ../readline-%{rl_vers}
for p in ../readline-%{rl_vers}-patches/*; do
@@ -507,6 +511,13 @@
%doc %{_defaultdocdir}/readline/
%changelog
+* Mon Mar 16 2009 werner@suse.de
+- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault
+* Thu Mar 12 2009 werner@suse.de
+- Add patch from bug-bash@gnu.org to enable |& not only for
+ builtins and shell functions but for all commands.
+* Tue Mar 10 2009 werner@suse.de
+- Switch to official patches, now we are on patch level 10
* Wed Mar 04 2009 werner@suse.de
- Use patches from bug-bash@gnu.org to make it work
* Wed Mar 04 2009 werner@suse.de
++++++ bash-4.0.10-bar-and-piping.patch ++++++
|> On Wed, Mar 11, 2009 at 09:50:18PM -0400, Matt
|> > rm 2>&1 | grep --color op
|> > rm |& grep --color op
|> >
|> > Notice that they are behaving differently.
|>
|> Confirmed in 4.0.0 and 4.0.10:
|
|Interesting. Only for non-builtin simple commands and some shell functions.
|The attached patch fixes it for me.
|
|Chet
|
*** parse.y 2009-03-09 10:27:05.000000000 -0400
--- parse.y 2009-03-12 09:02:31.000000000 -0400
***************
*** 1123,1127 ****
REDIRECT *r;
! tc = $1;
rd.dest = 1;
r = make_redirection (2, r_duplicating_output, rd);
--- 1123,1127 ----
REDIRECT *r;
! tc = $1->type == cm_simple ? $1->value.Simple : $1;
rd.dest = 1;
r = make_redirection (2, r_duplicating_output, rd);
++++++ bash-4.0.10-segfault.patch ++++++
| Date: Sat, 14 Mar 2009 14:00:35 +0800
| From: "Clark J. Wang"
| To: Bash - Bug
| Subject: [bash-bug] [PATCH] bash-4.0.10: segfault with `; &' at the end of case statement
|
| With bash version: 4.0.10, the following case statement crashed with
| segfault:
|
| $ cat foo.sh
| case a in
| a) echo a ;&
| esac
| $ bash4 foo.sh
| a
| Segmentation fault
| $
|
| In an interactive shell, that case statement causes current shell to hang
| with nearly 100% CPU usage.
|
| The following patch fixes this for me:
|
*** execute_cmd.c 2009-02-14 05:41:41.000000000 +0800
--- execute_cmd.c 2009-03-14 13:47:15.000000000 +0800
***************
*** 2932,2938 ****
retval = execute_command (clauses->action);
}
while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
! if ((clauses->flags & CASEPAT_TESTNEXT) == 0)
EXIT_CASE ();
else
break;
--- 2932,2938 ----
retval = execute_command (clauses->action);
}
while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
! if (!clauses || (clauses->flags & CASEPAT_TESTNEXT) == 0)
EXIT_CASE ();
else
break;
++++++ bash-4.0.10-typo.patch ++++++
| Date: Sat, 14 Mar 2009 21:14:06 +0100
| From: Andreas Schwab
| To: bug-bash@gnu.org
| Subject: [bash-bug] Doc typo
|
| A small typo in the bash doc.
|
| Andreas.
|
--- doc/bashref.texi 2009-02-18 21:14:43.000000000 +0100
+++ doc/bashref.texi 2009-03-14 21:11:36.000000000 +0100
@@ -864,7 +864,7 @@ operator terminates a pattern list.
A list of patterns and an associated command-list is known
as a @var{clause}.
-Each clause must be terminated with @samp{;;}, @samp{,&}, or @samp{;;&}.
+Each clause must be terminated with @samp{;;}, @samp{;&}, or @samp{;;&}.
The @var{word} undergoes tilde expansion, parameter expansion, command
substitution, arithmetic expansion, and quote removal before matching is
attempted. Each @var{pattern} undergoes tilde expansion, parameter
++++++ bash-4.0-patches.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-001 new/bash-4.0-patches/bash40-001
--- old/bash-4.0-patches/bash40-001 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-001 2009-03-09 16:00:52.000000000 +0100
@@ -0,0 +1,162 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-001
+
+Bug-Reported-by: Mike Frysinger
+Bug-Reference-ID: <200902211821.42188.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00147.html
+
+Bug-Description:
+
+Bash has problems parsing certain constructs inside Posix-style $(...)
+command substitutions, mostly with backslash-quoting and reserved word
+recognition. This is an issue because the contents are parsed at the
+time the word containing the command substitution is read.
+
+Patch:
+
+*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
+--- parse.y 2009-03-06 20:32:35.000000000 -0500
+***************
+*** 2928,2931 ****
+--- 2932,2936 ----
+ #define LEX_HEREDELIM 0x100 /* reading here-doc delimiter */
+ #define LEX_STRIPDOC 0x200 /* <<- strip tabs from here doc delim */
++ #define LEX_INWORD 0x400
+
+ #define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) == '|')
+***************
+*** 3180,3184 ****
+ int *lenp, flags;
+ {
+! int count, ch, peekc, tflags, lex_rwlen, lex_firstind;
+ int nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans, *heredelim;
+--- 3188,3192 ----
+ int *lenp, flags;
+ {
+! int count, ch, peekc, tflags, lex_rwlen, lex_wlen, lex_firstind;
+ int nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans, *heredelim;
+***************
+*** 3201,3205 ****
+
+ start_lineno = line_number;
+! lex_rwlen = 0;
+
+ heredelim = 0;
+--- 3209,3213 ----
+
+ start_lineno = line_number;
+! lex_rwlen = lex_wlen = 0;
+
+ heredelim = 0;
+***************
+*** 3268,3271 ****
+--- 3276,3319 ----
+ }
+
++ if (tflags & LEX_PASSNEXT) /* last char was backslash */
++ {
++ /*itrace("parse_comsub:%d: lex_passnext -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
++ tflags &= ~LEX_PASSNEXT;
++ if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
++ {
++ if (retind > 0)
++ retind--; /* swallow previously-added backslash */
++ continue;
++ }
++
++ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
++ if MBTEST(ch == CTLESC || ch == CTLNUL)
++ ret[retind++] = CTLESC;
++ ret[retind++] = ch;
++ continue;
++ }
++
++ /* If this is a shell break character, we are not in a word. If not,
++ we either start or continue a word. */
++ if MBTEST(shellbreak (ch))
++ {
++ tflags &= ~LEX_INWORD;
++ /*itrace("parse_comsub:%d: lex_inword -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
++ }
++ else
++ {
++ if (tflags & LEX_INWORD)
++ {
++ lex_wlen++;
++ /*itrace("parse_comsub:%d: lex_inword == 1 ch = `%c' lex_wlen = %d (%d)", line_number, ch, lex_wlen, __LINE__);*/
++ }
++ else
++ {
++ /*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, __LINE__);*/
++ tflags |= LEX_INWORD;
++ lex_wlen = 0;
++ }
++ }
++
+ /* Skip whitespace */
+ if MBTEST(shellblank (ch) && lex_rwlen == 0)
+***************
+*** 3400,3428 ****
+ }
+ else
+! ch = peekc; /* fall through and continue XXX - this skips comments if peekc == '#' */
+ }
+! /* Not exactly right yet, should handle shell metacharacters, too. If
+! any changes are made to this test, make analogous changes to subst.c:
+! extract_delimited_string(). */
+! else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1])))
+ tflags |= LEX_INCOMMENT;
+
+! if (tflags & LEX_PASSNEXT) /* last char was backslash */
+! {
+! tflags &= ~LEX_PASSNEXT;
+! if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
+! {
+! if (retind > 0)
+! retind--; /* swallow previously-added backslash */
+! continue;
+! }
+!
+! RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+! if MBTEST(ch == CTLESC || ch == CTLNUL)
+! ret[retind++] = CTLESC;
+! ret[retind++] = ch;
+! continue;
+! }
+! else if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+--- 3442,3454 ----
+ }
+ else
+! ch = peekc; /* fall through and continue XXX */
+ }
+! else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (((tflags & LEX_RESWDOK) && lex_rwlen == 0) || ((tflags & LEX_INWORD) && lex_wlen == 0)))
+! {
+! /*itrace("parse_comsub:%d: lex_incomment -> 1 (%d)", line_number, __LINE__);*/
+ tflags |= LEX_INCOMMENT;
++ }
+
+! if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 0
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-002 new/bash-4.0-patches/bash40-002
--- old/bash-4.0-patches/bash40-002 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-002 2009-03-09 16:00:52.000000000 +0100
@@ -0,0 +1,43 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-002
+
+Bug-Reported-by: phil@Arcturus.universe
+Bug-Reference-ID: <20090221143709.13878.qmail@Arcturus.universe>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00142.html
+
+Bug-Description:
+
+A line inadvertenly omitted from a submitted patch results in core dumps
+when attempting filename completion while using the bash-completion
+package.
+
+Patch:
+
+*** ../bash-4.0/pcomplete.c 2009-02-01 17:12:31.000000000 -0500
+--- pcomplete.c 2009-02-22 17:08:25.000000000 -0500
+***************
+*** 1033,1036 ****
+--- 1033,1037 ----
+
+ pps = &ps;
++ save_parser_state (pps);
+ begin_unwind_frame ("gen-shell-function-matches");
+ add_unwind_protect (restore_parser_state, (char *)pps);
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-003 new/bash-4.0-patches/bash40-003
--- old/bash-4.0-patches/bash40-003 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-003 2009-03-09 16:00:52.000000000 +0100
@@ -0,0 +1,70 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-003
+
+Bug-Reported-by: Bernd Eggink
+Bug-Reference-ID: <49A323F5.60503@sudrala.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00177.html
+
+Bug-Description:
+
+Under certain circumstances, constructs containing command substitutions
+prevent PS1 from being re-evaluated and updated before being displayed.
+
+Patch:
+
+*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
+--- parse.y 2009-02-25 15:58:25.000000000 -0500
+***************
+*** 1616,1623 ****
+ int *ret;
+
+! ret = (int *)xmalloc (3 * sizeof (int));
+ ret[0] = last_read_token;
+ ret[1] = token_before_that;
+ ret[2] = two_tokens_ago;
+ return ret;
+ }
+--- 1616,1624 ----
+ int *ret;
+
+! ret = (int *)xmalloc (4 * sizeof (int));
+ ret[0] = last_read_token;
+ ret[1] = token_before_that;
+ ret[2] = two_tokens_ago;
++ ret[3] = current_token;
+ return ret;
+ }
+***************
+*** 1632,1635 ****
+--- 1633,1637 ----
+ token_before_that = ts[1];
+ two_tokens_ago = ts[2];
++ current_token = ts[3];
+ }
+
+***************
+*** 2669,2672 ****
+--- 2671,2675 ----
+ word_desc_to_read = (WORD_DESC *)NULL;
+
++ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
+ token_to_read = '\n';
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-004 new/bash-4.0-patches/bash40-004
--- old/bash-4.0-patches/bash40-004 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-004 2009-03-09 16:00:53.000000000 +0100
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-004
+
+Bug-Reported-by: Mike Frysinger
+Bug-Reference-ID: <200902231720.30519.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00176.html
+
+Bug-Description:
+
+In some cases, enabling the `checkjobs' shell option will cause the shell
+to core dump when executing the `exit' builtin.
+
+Patch:
+
+*** ../bash-4.0/builtins/exit.def 2009-01-04 14:32:22.000000000 -0500
+--- builtins/exit.def 2009-02-23 22:56:58.000000000 -0500
+***************
+*** 114,118 ****
+ if (jobs[i] && STOPPED (i))
+ stopmsg = JSTOPPED;
+! else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
+ stopmsg = JRUNNING;
+
+--- 114,118 ----
+ if (jobs[i] && STOPPED (i))
+ stopmsg = JSTOPPED;
+! else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i))
+ stopmsg = JRUNNING;
+
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-005 new/bash-4.0-patches/bash40-005
--- old/bash-4.0-patches/bash40-005 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-005 2009-03-09 16:00:53.000000000 +0100
@@ -0,0 +1,63 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-005
+
+Bug-Reported-by: Pierre Gaston
+Bug-Reference-ID:
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00206.html
+
+Bug-Description:
+
+The `declare' builtin dumped core when attempting to assign associative
+array indices containing some special characters, even when they were
+quoted before being expanded.
+
+Patch:
+
+*** ../bash-4.0/builtins/declare.def 2009-01-04 14:32:22.000000000 -0500
+--- builtins/declare.def 2009-02-26 11:40:16.000000000 -0500
+***************
+*** 296,299 ****
+--- 296,306 ----
+ if (t = strchr (name, '[')) /* ] */
+ {
++ /* If offset != 0 we have already validated any array reference */
++ if (offset == 0 && valid_array_reference (name) == 0)
++ {
++ sh_invalidid (name);
++ assign_error++;
++ NEXT_VARIABLE ();
++ }
+ subscript_start = t;
+ *t = '\0';
+***************
+*** 485,489 ****
+ /* declare -a name[[n]] or declare name[n] makes name an indexed
+ array variable. */
+! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0)
+ var = convert_var_to_array (var);
+ #endif /* ARRAY_VARS */
+--- 492,496 ----
+ /* declare -a name[[n]] or declare name[n] makes name an indexed
+ array variable. */
+! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0)
+ var = convert_var_to_array (var);
+ #endif /* ARRAY_VARS */
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-006 new/bash-4.0-patches/bash40-006
--- old/bash-4.0-patches/bash40-006 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-006 2009-03-09 16:00:54.000000000 +0100
@@ -0,0 +1,43 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-006
+
+Bug-Reported-by: Evgeniy Zhemchugov
+Bug-Reference-ID:
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00202.html
+
+Bug-Description:
+
+Bash did not parse pipelines using the |& construct correctly if the
+pipeline elements were not simple commands.
+
+Patch:
+
+*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
+--- parse.y 2009-02-25 17:25:56.000000000 -0500
+***************
+*** 4478,4481 ****
+--- 4478,4482 ----
+ case AND_AND:
+ case BANG:
++ case BAR_AND:
+ case DO:
+ case DONE:
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-007 new/bash-4.0-patches/bash40-007
--- old/bash-4.0-patches/bash40-007 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-007 2009-03-09 16:00:54.000000000 +0100
@@ -0,0 +1,263 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-007
+
+Bug-Reported-by: AnMaster
+Bug-Reference-ID: <49A41C18.80807@tele2.se>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00188.html
+
+Bug-Description:
+
+Bash had a number of problems parsing associative array subscripts containing
+special characters. The subscripts are supposed to be read as if they are
+enclosed between double quotes.
+
+Patch:
+
+*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
+--- parse.y 2009-02-25 17:25:56.000000000 -0500
+***************
+*** 2919,2922 ****
+--- 2919,2923 ----
+ #define P_COMMAND 0x08 /* parsing a command, so look for comments */
+ #define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
++ #define P_ARRAYSUB 0x20 /* parsing a [...] array subscript for assignment */
+
+ /* Lexical state while parsing a grouping construct or $(...). */
+***************
+*** 3134,3137 ****
+--- 3134,3139 ----
+ FREE (nestret);
+ }
++ else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
++ goto parse_dollar_word;
+ }
+ /* Parse an old-style command substitution within double quotes as a
+***************
+*** 3150,3153 ****
+--- 3150,3154 ----
+ /* check for $(), $[], or ${} inside quoted string. */
+ {
++ parse_dollar_word:
+ if (open == ch) /* undo previous increment */
+ count--;
+***************
+*** 4277,4281 ****
+ (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+ {
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+--- 4277,4281 ----
+ (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+ {
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+*** ../bash-4.0/arrayfunc.c 2009-01-04 14:32:21.000000000 -0500
+--- arrayfunc.c 2009-02-25 07:58:54.000000000 -0500
+***************
+*** 605,666 ****
+ }
+
+! /* This function assumes s[i] == '['; returns with s[ret] == ']' if
+! an array subscript is correctly parsed. */
+! int
+! skipsubscript (s, i)
+! const char *s;
+! int i;
+! {
+! int count, c;
+! #if defined (HANDLE_MULTIBYTE)
+! mbstate_t state, state_bak;
+! size_t slength, mblength;
+! #endif
+!
+! #if defined (HANDLE_MULTIBYTE)
+! memset (&state, '\0', sizeof (mbstate_t));
+! slength = strlen (s + i);
+! #endif
+!
+! count = 1;
+! while (count)
+! {
+! /* Advance one (possibly multibyte) character in S starting at I. */
+! #if defined (HANDLE_MULTIBYTE)
+! if (MB_CUR_MAX > 1)
+! {
+! state_bak = state;
+! mblength = mbrlen (s + i, slength, &state);
+!
+! if (MB_INVALIDCH (mblength))
+! {
+! state = state_bak;
+! i++;
+! slength--;
+! }
+! else if (MB_NULLWCH (mblength))
+! return i;
+! else
+! {
+! i += mblength;
+! slength -= mblength;
+! }
+! }
+! else
+! #endif
+! ++i;
+!
+! c = s[i];
+!
+! if (c == 0)
+! break;
+! else if (c == '[')
+! count++;
+! else if (c == ']')
+! count--;
+! }
+!
+! return i;
+! }
+
+ /* This function is called with SUB pointing to just after the beginning
+--- 605,609 ----
+ }
+
+! /* skipsubscript moved to subst.c to use private functions. 2009/02/24. */
+
+ /* This function is called with SUB pointing to just after the beginning
+*** ../bash-4.0/subst.c 2009-01-28 14:34:12.000000000 -0500
+--- subst.c 2009-02-25 09:18:33.000000000 -0500
+***************
+*** 223,226 ****
+--- 223,227 ----
+ static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int));
+ static char *extract_dollar_brace_string __P((char *, int *, int, int));
++ static int skip_matched_pair __P((const char *, int, int, int, int));
+
+ static char *pos_params __P((char *, int, int, int));
+***************
+*** 1375,1378 ****
+--- 1376,1480 ----
+ #define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
+
++ /* This function assumes s[i] == open; returns with s[ret] == close; used to
++ parse array subscripts. FLAGS currently unused. */
++ static int
++ skip_matched_pair (string, start, open, close, flags)
++ const char *string;
++ int start, open, close, flags;
++ {
++ int i, pass_next, backq, si, c, count;
++ size_t slen;
++ char *temp, *ss;
++ DECLARE_MBSTATE;
++
++ slen = strlen (string + start) + start;
++ no_longjmp_on_fatal_error = 1;
++
++ i = start + 1; /* skip over leading bracket */
++ count = 1;
++ pass_next = backq = 0;
++ ss = (char *)string;
++ while (c = string[i])
++ {
++ if (pass_next)
++ {
++ pass_next = 0;
++ if (c == 0)
++ CQ_RETURN(i);
++ ADVANCE_CHAR (string, slen, i);
++ continue;
++ }
++ else if (c == '\\')
++ {
++ pass_next = 1;
++ i++;
++ continue;
++ }
++ else if (backq)
++ {
++ if (c == '`')
++ backq = 0;
++ ADVANCE_CHAR (string, slen, i);
++ continue;
++ }
++ else if (c == '`')
++ {
++ backq = 1;
++ i++;
++ continue;
++ }
++ else if (c == open)
++ {
++ count++;
++ i++;
++ continue;
++ }
++ else if (c == close)
++ {
++ count--;
++ if (count == 0)
++ break;
++ i++;
++ continue;
++ }
++ else if (c == '\'' || c == '"')
++ {
++ i = (c == '\'') ? skip_single_quoted (ss, slen, ++i)
++ : skip_double_quoted (ss, slen, ++i);
++ /* no increment, the skip functions increment past the closing quote. */
++ }
++ else if (c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
++ {
++ si = i + 2;
++ if (string[si] == '\0')
++ CQ_RETURN(si);
++
++ if (string[i+1] == LPAREN)
++ temp = extract_delimited_string (ss, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
++ else
++ temp = extract_dollar_brace_string (ss, &si, 0, SX_NOALLOC);
++ i = si;
++ if (string[i] == '\0') /* don't increment i past EOS in loop */
++ break;
++ i++;
++ continue;
++ }
++ else
++ ADVANCE_CHAR (string, slen, i);
++ }
++
++ CQ_RETURN(i);
++ }
++
++ #if defined (ARRAY_VARS)
++ int
++ skipsubscript (string, start)
++ const char *string;
++ int start;
++ {
++ return (skip_matched_pair (string, start, '[', ']', 0));
++ }
++ #endif
++
+ /* Skip characters in STRING until we find a character in DELIMS, and return
+ the index of that character. START is the index into string at which we
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-008 new/bash-4.0-patches/bash40-008
--- old/bash-4.0-patches/bash40-008 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-008 2009-03-09 16:00:54.000000000 +0100
@@ -0,0 +1,49 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-008
+
+Bug-Reported-by: Mike Frysinger
+Bug-Reference-ID: <200902261030.54062.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00230.html
+
+Bug-Description:
+
+Patch:
+
+*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
+--- parse.y 2009-02-26 17:22:15.000000000 -0500
+***************
+*** 3443,3448 ****
+ else
+ shell_ungetc (peekc);
+! tflags |= LEX_HEREDELIM;
+! lex_firstind = -1;
+ continue;
+ }
+--- 3443,3451 ----
+ else
+ shell_ungetc (peekc);
+! if (peekc != '<')
+! {
+! tflags |= LEX_HEREDELIM;
+! lex_firstind = -1;
+! }
+ continue;
+ }
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-009 new/bash-4.0-patches/bash40-009
--- old/bash-4.0-patches/bash40-009 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-009 2009-03-09 16:00:55.000000000 +0100
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-009
+
+Bug-Reported-by: "Chris F.A. Johnson"
+Bug-Reference-ID: <4d6b7$49a88cec$cef88ba3$16813@TEKSAVVY.COM>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00255.html
+
+Bug-Description:
+
+When the read builtin returned due to a timeout supplied with the -t option,
+it did not restore any modified terminal attribtues.
+
+Patch:
+
+*** ../bash-4.0/builtins/read.def 2009-01-15 23:11:21.000000000 -0500
+--- builtins/read.def 2009-03-02 10:15:39.000000000 -0500
+***************
+*** 370,381 ****
+ if (code)
+ {
+! #if 0
+ run_unwind_frame ("read_builtin");
+- return (EXECUTION_FAILURE);
+- #else
+ input_string[i] = '\0'; /* make sure it's terminated */
+! retval = 128+SIGALRM;;
+ goto assign_vars;
+- #endif
+ }
+ old_alrm = set_signal_handler (SIGALRM, sigalrm);
+--- 370,381 ----
+ if (code)
+ {
+! /* Tricky. The top of the unwind-protect stack is the free of
+! input_string. We want to run all the rest and use input_string,
+! so we have to remove it from the stack. */
+! remove_unwind_protect ();
+ run_unwind_frame ("read_builtin");
+ input_string[i] = '\0'; /* make sure it's terminated */
+! retval = 128+SIGALRM;
+ goto assign_vars;
+ }
+ old_alrm = set_signal_handler (SIGALRM, sigalrm);
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash40-010 new/bash-4.0-patches/bash40-010
--- old/bash-4.0-patches/bash40-010 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.0-patches/bash40-010 2009-03-09 16:00:55.000000000 +0100
@@ -0,0 +1,63 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-010
+
+Bug-Reported-by: Mike Frysinger
+Bug-Reference-ID: <200903030122.56206.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00023.html
+
+Bug-Description:
+
+Bash has problems parsing comments in case statements when they appear in
+$(...) subshells.
+
+Patch:
+
+*** ../bash-4.0/parse.y 2009-03-07 15:18:35.000000000 -0500
+--- parse.y 2009-03-07 14:16:32.000000000 -0500
+***************
+*** 3413,3419 ****
+ tflags &= ~LEX_RESWDOK;
+ }
+! else if (shellbreak (ch) == 0)
+ {
+! tflags &= ~LEX_RESWDOK;
+ /*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
+ }
+--- 3415,3433 ----
+ tflags &= ~LEX_RESWDOK;
+ }
+! else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
+! ; /* don't modify LEX_RESWDOK if we're starting a comment */
+! else if MBTEST((tflags & LEX_INCASE) && ch != '\n')
+! /* If we can read a reserved word and we're in case, we're at the
+! point where we can read a new pattern list or an esac. We
+! handle the esac case above. If we read a newline, we want to
+! leave LEX_RESWDOK alone. If we read anything else, we want to
+! turn off LEX_RESWDOK, since we're going to read a pattern list. */
+ {
+! tflags &= ~LEX_RESWDOK;
+! /*itrace("parse_comsub:%d: lex_incase == 1 found `%c', lex_reswordok -> 0", line_number, ch);*/
+! }
+! else if MBTEST(shellbreak (ch) == 0)
+! {
+! tflags &= ~LEX_RESWDOK;
+ /*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
+ }
+*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-associative-array-subscripts.patch new/bash-4.0-patches/bash-4.0-associative-array-subscripts.patch
--- old/bash-4.0-patches/bash-4.0-associative-array-subscripts.patch 2009-03-04 17:19:20.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-associative-array-subscripts.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,230 +0,0 @@
-*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
---- parse.y 2009-02-25 17:25:56.000000000 -0500
-***************
-*** 2916,2919 ****
---- 2919,2923 ----
- #define P_COMMAND 0x08 /* parsing a command, so look for comments */
- #define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
-+ #define P_ARRAYSUB 0x20 /* parsing a [...] array subscript for assignment */
-
- /* Lexical state while parsing a grouping construct or $(...). */
-***************
-*** 3130,3133 ****
---- 3134,3139 ----
- FREE (nestret);
- }
-+ else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
-+ goto parse_dollar_word;
- }
- /* Parse an old-style command substitution within double quotes as a
-***************
-*** 3146,3149 ****
---- 3152,3156 ----
- /* check for $(), $[], or ${} inside quoted string. */
- {
-+ parse_dollar_word:
- if (open == ch) /* undo previous increment */
- count--;
-***************
-*** 4249,4253 ****
- (token_index == 0 && (parser_state&PST_COMPASSIGN))))
- {
-! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
- if (ttok == &matched_pair_error)
- return -1; /* Bail immediately. */
---- 4256,4260 ----
- (token_index == 0 && (parser_state&PST_COMPASSIGN))))
- {
-! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB);
- if (ttok == &matched_pair_error)
- return -1; /* Bail immediately. */
-*** ../bash-4.0/arrayfunc.c 2009-01-04 14:32:21.000000000 -0500
---- arrayfunc.c 2009-02-25 07:58:54.000000000 -0500
-***************
-*** 605,666 ****
- }
-
-! /* This function assumes s[i] == '['; returns with s[ret] == ']' if
-! an array subscript is correctly parsed. */
-! int
-! skipsubscript (s, i)
-! const char *s;
-! int i;
-! {
-! int count, c;
-! #if defined (HANDLE_MULTIBYTE)
-! mbstate_t state, state_bak;
-! size_t slength, mblength;
-! #endif
-!
-! #if defined (HANDLE_MULTIBYTE)
-! memset (&state, '\0', sizeof (mbstate_t));
-! slength = strlen (s + i);
-! #endif
-!
-! count = 1;
-! while (count)
-! {
-! /* Advance one (possibly multibyte) character in S starting at I. */
-! #if defined (HANDLE_MULTIBYTE)
-! if (MB_CUR_MAX > 1)
-! {
-! state_bak = state;
-! mblength = mbrlen (s + i, slength, &state);
-!
-! if (MB_INVALIDCH (mblength))
-! {
-! state = state_bak;
-! i++;
-! slength--;
-! }
-! else if (MB_NULLWCH (mblength))
-! return i;
-! else
-! {
-! i += mblength;
-! slength -= mblength;
-! }
-! }
-! else
-! #endif
-! ++i;
-!
-! c = s[i];
-!
-! if (c == 0)
-! break;
-! else if (c == '[')
-! count++;
-! else if (c == ']')
-! count--;
-! }
-!
-! return i;
-! }
-
- /* This function is called with SUB pointing to just after the beginning
---- 605,609 ----
- }
-
-! /* skipsubscript moved to subst.c to use private functions. 2009/02/24. */
-
- /* This function is called with SUB pointing to just after the beginning
-*** ../bash-4.0/subst.c 2009-01-28 14:34:12.000000000 -0500
---- subst.c 2009-02-25 09:18:33.000000000 -0500
-***************
-*** 223,226 ****
---- 223,227 ----
- static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int));
- static char *extract_dollar_brace_string __P((char *, int *, int, int));
-+ static int skip_matched_pair __P((const char *, int, int, int, int));
-
- static char *pos_params __P((char *, int, int, int));
-***************
-*** 1375,1378 ****
---- 1376,1480 ----
- #define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
-
-+ /* This function assumes s[i] == open; returns with s[ret] == close; used to
-+ parse array subscripts. FLAGS currently unused. */
-+ static int
-+ skip_matched_pair (string, start, open, close, flags)
-+ const char *string;
-+ int start, open, close, flags;
-+ {
-+ int i, pass_next, backq, si, c, count;
-+ size_t slen;
-+ char *temp, *ss;
-+ DECLARE_MBSTATE;
-+
-+ slen = strlen (string + start) + start;
-+ no_longjmp_on_fatal_error = 1;
-+
-+ i = start + 1; /* skip over leading bracket */
-+ count = 1;
-+ pass_next = backq = 0;
-+ ss = (char *)string;
-+ while (c = string[i])
-+ {
-+ if (pass_next)
-+ {
-+ pass_next = 0;
-+ if (c == 0)
-+ CQ_RETURN(i);
-+ ADVANCE_CHAR (string, slen, i);
-+ continue;
-+ }
-+ else if (c == '\\')
-+ {
-+ pass_next = 1;
-+ i++;
-+ continue;
-+ }
-+ else if (backq)
-+ {
-+ if (c == '`')
-+ backq = 0;
-+ ADVANCE_CHAR (string, slen, i);
-+ continue;
-+ }
-+ else if (c == '`')
-+ {
-+ backq = 1;
-+ i++;
-+ continue;
-+ }
-+ else if (c == open)
-+ {
-+ count++;
-+ i++;
-+ continue;
-+ }
-+ else if (c == close)
-+ {
-+ count--;
-+ if (count == 0)
-+ break;
-+ i++;
-+ continue;
-+ }
-+ else if (c == '\'' || c == '"')
-+ {
-+ i = (c == '\'') ? skip_single_quoted (ss, slen, ++i)
-+ : skip_double_quoted (ss, slen, ++i);
-+ /* no increment, the skip functions increment past the closing quote. */
-+ }
-+ else if (c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
-+ {
-+ si = i + 2;
-+ if (string[si] == '\0')
-+ CQ_RETURN(si);
-+
-+ if (string[i+1] == LPAREN)
-+ temp = extract_delimited_string (ss, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
-+ else
-+ temp = extract_dollar_brace_string (ss, &si, 0, SX_NOALLOC);
-+ i = si;
-+ if (string[i] == '\0') /* don't increment i past EOS in loop */
-+ break;
-+ i++;
-+ continue;
-+ }
-+ else
-+ ADVANCE_CHAR (string, slen, i);
-+ }
-+
-+ CQ_RETURN(i);
-+ }
-+
-+ #if defined (ARRAY_VARS)
-+ int
-+ skipsubscript (string, start)
-+ const char *string;
-+ int start;
-+ {
-+ return (skip_matched_pair (string, start, '[', ']', 0));
-+ }
-+ #endif
-+
- /* Skip characters in STRING until we find a character in DELIMS, and return
- the index of that character. START is the index into string at which we
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-comsub-backslash-metacharacters.patch new/bash-4.0-patches/bash-4.0-comsub-backslash-metacharacters.patch
--- old/bash-4.0-patches/bash-4.0-comsub-backslash-metacharacters.patch 2009-03-04 17:23:14.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-comsub-backslash-metacharacters.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
---- parse.y 2009-02-22 16:08:54.000000000 -0500
-***************
-*** 3307,3311 ****
-
- /* Meta-characters that can introduce a reserved word. Not perfect yet. */
-! if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
- {
- /* Add this character. */
---- 3307,3311 ----
-
- /* Meta-characters that can introduce a reserved word. Not perfect yet. */
-! if MBTEST((tflags & LEX_PASSNEXT) == 0 && (tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
- {
- /* Add this character. */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-comsub-comments.patch new/bash-4.0-patches/bash-4.0-comsub-comments.patch
--- old/bash-4.0-patches/bash-4.0-comsub-comments.patch 2009-03-04 17:40:23.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-comsub-comments.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
---- parse.y 2009-03-03 16:58:50.000000000 -0500
-***************
-*** 3172,3175 ****
---- 3179,3187 ----
- }
-
-+ /* Not exactly right yet, should handle shell metacharacters, too. If
-+ any changes are made to this test, make analogous changes to subst.c:
-+ extract_delimited_string(). */
-+ #define COMMENT_BEGIN(x) ((x) == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1])))
-+
- /* Parse a $(...) command substitution. This is messier than I'd like, and
- reproduces a lot more of the token-reading code than I'd like. */
-***************
-*** 3365,3369 ****
- tflags &= ~LEX_RESWDOK;
- }
-! else if (shellbreak (ch) == 0)
- {
- tflags &= ~LEX_RESWDOK;
---- 3377,3383 ----
- tflags &= ~LEX_RESWDOK;
- }
-! else if MBTEST((tflags & LEX_CKCOMMENT) && COMMENT_BEGIN(ch))
-! ; /* don't turn off LEX_RESWDOK if we're starting a comment */
-! else if MBTEST(shellbreak (ch) == 0)
- {
- tflags &= ~LEX_RESWDOK;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-comsub-herestring.patch new/bash-4.0-patches/bash-4.0-comsub-herestring.patch
--- old/bash-4.0-patches/bash-4.0-comsub-herestring.patch 2009-03-04 17:17:23.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-comsub-herestring.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
---- parse.y 2009-02-26 17:22:15.000000000 -0500
-***************
-*** 3395,3400 ****
- else
- shell_ungetc (peekc);
-! tflags |= LEX_HEREDELIM;
-! lex_firstind = -1;
- continue;
- }
---- 3402,3410 ----
- else
- shell_ungetc (peekc);
-! if (peekc != '<')
-! {
-! tflags |= LEX_HEREDELIM;
-! lex_firstind = -1;
-! }
- continue;
- }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-declare-identifier.patch new/bash-4.0-patches/bash-4.0-declare-identifier.patch
--- old/bash-4.0-patches/bash-4.0-declare-identifier.patch 2009-03-04 17:18:10.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-declare-identifier.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-*** ../bash-4.0/builtins/declare.def 2009-01-04 14:32:22.000000000 -0500
---- builtins/declare.def 2009-02-26 11:40:16.000000000 -0500
-***************
-*** 296,299 ****
---- 296,306 ----
- if (t = strchr (name, '[')) /* ] */
- {
-+ /* If offset != 0 we have already validated any array reference */
-+ if (offset == 0 && valid_array_reference (name) == 0)
-+ {
-+ sh_invalidid (name);
-+ assign_error++;
-+ NEXT_VARIABLE ();
-+ }
- subscript_start = t;
- *t = '\0';
-***************
-*** 485,489 ****
- /* declare -a name[[n]] or declare name[n] makes name an indexed
- array variable. */
-! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0)
- var = convert_var_to_array (var);
- #endif /* ARRAY_VARS */
---- 492,496 ----
- /* declare -a name[[n]] or declare name[n] makes name an indexed
- array variable. */
-! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0)
- var = convert_var_to_array (var);
- #endif /* ARRAY_VARS */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-exit-checkjobs.patch new/bash-4.0-patches/bash-4.0-exit-checkjobs.patch
--- old/bash-4.0-patches/bash-4.0-exit-checkjobs.patch 2009-03-04 17:21:40.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-exit-checkjobs.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-*** ../bash-4.0/builtins/exit.def 2009-01-04 14:32:22.000000000 -0500
---- builtins/exit.def 2009-02-23 22:56:58.000000000 -0500
-***************
-*** 114,118 ****
- if (jobs[i] && STOPPED (i))
- stopmsg = JSTOPPED;
-! else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
- stopmsg = JRUNNING;
-
---- 114,118 ----
- if (jobs[i] && STOPPED (i))
- stopmsg = JSTOPPED;
-! else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i))
- stopmsg = JRUNNING;
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-pipeline-reserved-word.patch new/bash-4.0-patches/bash-4.0-pipeline-reserved-word.patch
--- old/bash-4.0-patches/bash-4.0-pipeline-reserved-word.patch 2009-03-04 17:18:40.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-pipeline-reserved-word.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
---- parse.y 2009-02-25 17:25:56.000000000 -0500
-***************
-*** 4450,4453 ****
---- 4457,4461 ----
- case AND_AND:
- case BANG:
-+ case BAR_AND:
- case DO:
- case DONE:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-reset-parser-current-token.patch new/bash-4.0-patches/bash-4.0-reset-parser-current-token.patch
--- old/bash-4.0-patches/bash-4.0-reset-parser-current-token.patch 2009-03-04 17:20:51.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-reset-parser-current-token.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
---- parse.y 2009-02-25 15:58:25.000000000 -0500
-***************
-*** 2669,2672 ****
---- 2671,2675 ----
- word_desc_to_read = (WORD_DESC *)NULL;
-
-+ current_token = '\n'; /* XXX */
- last_read_token = '\n';
- token_to_read = '\n';
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bash-4.0-patches/bash-4.0-save-current-token.patch new/bash-4.0-patches/bash-4.0-save-current-token.patch
--- old/bash-4.0-patches/bash-4.0-save-current-token.patch 2009-03-04 17:20:23.000000000 +0100
+++ new/bash-4.0-patches/bash-4.0-save-current-token.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
---- parse.y 2009-02-23 22:40:55.000000000 -0500
-***************
-*** 1616,1623 ****
- int *ret;
-
-! ret = (int *)xmalloc (3 * sizeof (int));
- ret[0] = last_read_token;
- ret[1] = token_before_that;
- ret[2] = two_tokens_ago;
- return ret;
- }
---- 1616,1624 ----
- int *ret;
-
-! ret = (int *)xmalloc (4 * sizeof (int));
- ret[0] = last_read_token;
- ret[1] = token_before_that;
- ret[2] = two_tokens_ago;
-+ ret[3] = current_token;
- return ret;
- }
-***************
-*** 1632,1635 ****
---- 1633,1637 ----
- token_before_that = ts[1];
- two_tokens_ago = ts[2];
-+ current_token = ts[3];
- }
-
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org