Bash-4.2 patch 1
This commit is contained in:
parent
4692bbe418
commit
49ed961bb0
3 changed files with 9 additions and 6 deletions
|
|
@ -25,6 +25,6 @@
|
||||||
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
||||||
looks for to find the patch level (for the sccs version string). */
|
looks for to find the patch level (for the sccs version string). */
|
||||||
|
|
||||||
#define PATCHLEVEL 0
|
#define PATCHLEVEL 1
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
#endif /* _PATCHLEVEL_H_ */
|
||||||
|
|
|
||||||
12
subst.c
12
subst.c
|
|
@ -1379,10 +1379,12 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
|
||||||
slen = strlen (string + *sindex) + *sindex;
|
slen = strlen (string + *sindex) + *sindex;
|
||||||
|
|
||||||
/* The handling of dolbrace_state needs to agree with the code in parse.y:
|
/* The handling of dolbrace_state needs to agree with the code in parse.y:
|
||||||
parse_matched_pair() */
|
parse_matched_pair(). The different initial value is to handle the
|
||||||
dolbrace_state = 0;
|
case where this function is called to parse the word in
|
||||||
if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
|
${param op word} (SX_WORD). */
|
||||||
dolbrace_state = (flags & SX_POSIXEXP) ? DOLBRACE_QUOTE : DOLBRACE_PARAM;
|
dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM;
|
||||||
|
if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP))
|
||||||
|
dolbrace_state = DOLBRACE_QUOTE;
|
||||||
|
|
||||||
i = *sindex;
|
i = *sindex;
|
||||||
while (c = string[i])
|
while (c = string[i])
|
||||||
|
|
@ -7176,7 +7178,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
|
||||||
{
|
{
|
||||||
/* Extract the contents of the ${ ... } expansion
|
/* Extract the contents of the ${ ... } expansion
|
||||||
according to the Posix.2 rules. */
|
according to the Posix.2 rules. */
|
||||||
value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#') ? SX_POSIXEXP : 0);
|
value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD);
|
||||||
if (string[sindex] == RBRACE)
|
if (string[sindex] == RBRACE)
|
||||||
sindex++;
|
sindex++;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
1
subst.h
1
subst.h
|
|
@ -56,6 +56,7 @@
|
||||||
#define SX_NOLONGJMP 0x0040 /* don't longjmp on fatal error */
|
#define SX_NOLONGJMP 0x0040 /* don't longjmp on fatal error */
|
||||||
#define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */
|
#define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */
|
||||||
#define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */
|
#define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */
|
||||||
|
#define SX_WORD 0x0200 /* extracting word in ${param op word} */
|
||||||
|
|
||||||
/* Remove backslashes which are quoting backquotes from STRING. Modifies
|
/* Remove backslashes which are quoting backquotes from STRING. Modifies
|
||||||
STRING, and returns a pointer to it. */
|
STRING, and returns a pointer to it. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue