mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 07:59:50 +02:00
commit bash-20120322 snapshot
This commit is contained in:
+11
-5
@@ -3704,13 +3704,13 @@ fix_assignment_words (words)
|
||||
{
|
||||
WORD_LIST *w, *wcmd;
|
||||
struct builtin *b;
|
||||
int assoc;
|
||||
int assoc, global;
|
||||
|
||||
if (words == 0)
|
||||
return;
|
||||
|
||||
b = 0;
|
||||
assoc = 0;
|
||||
assoc = global = 0;
|
||||
|
||||
wcmd = words;
|
||||
for (w = words; w; w = w->next)
|
||||
@@ -3735,12 +3735,17 @@ fix_assignment_words (words)
|
||||
#if defined (ARRAY_VARS)
|
||||
if (assoc)
|
||||
w->word->flags |= W_ASSIGNASSOC;
|
||||
if (global)
|
||||
w->word->flags |= W_ASSNGLOBAL;
|
||||
#endif
|
||||
}
|
||||
#if defined (ARRAY_VARS)
|
||||
/* Note that we saw an associative array option to a builtin that takes
|
||||
assignment statements. This is a bit of a kludge. */
|
||||
else if (w->word->word[0] == '-' && strchr (w->word->word, 'A'))
|
||||
else if (w->word->word[0] == '-' && (strchr (w->word->word+1, 'A') || strchr (w->word->word+1, 'g')))
|
||||
#else
|
||||
else if (w->word->word[0] == '-' && strchr (w->word->word+1, 'g'))
|
||||
#endif
|
||||
{
|
||||
if (b == 0)
|
||||
{
|
||||
@@ -3752,10 +3757,11 @@ fix_assignment_words (words)
|
||||
else if (b && (b->flags & ASSIGNMENT_BUILTIN))
|
||||
wcmd->word->flags |= W_ASSNBLTIN;
|
||||
}
|
||||
if (wcmd->word->flags & W_ASSNBLTIN)
|
||||
if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'A'))
|
||||
assoc = 1;
|
||||
if ((wcmd->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'g'))
|
||||
global = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Return 1 if the file found by searching $PATH for PATHNAME, defaulting
|
||||
|
||||
Reference in New Issue
Block a user