Bash-4.4 distribution sources and documentation
This commit is contained in:
parent
30a978b7d8
commit
a0c0a00fc4
588 changed files with 130746 additions and 80164 deletions
19
assoc.c
19
assoc.c
|
|
@ -277,7 +277,10 @@ int starsub, quoted;
|
|||
for (i = 1; l && i < start; i++)
|
||||
l = l->next;
|
||||
if (l == 0)
|
||||
return ((char *)NULL);
|
||||
{
|
||||
dispose_words (save);
|
||||
return ((char *)NULL);
|
||||
}
|
||||
for (j = 0,h = t = l; l && j < nelem; j++)
|
||||
{
|
||||
t = l;
|
||||
|
|
@ -433,17 +436,19 @@ assoc_to_assign (hash, quoted)
|
|||
for (i = 0; i < hash->nbuckets; i++)
|
||||
for (tlist = hash_items (i, hash); tlist; tlist = tlist->next)
|
||||
{
|
||||
#if 1
|
||||
if (sh_contains_shell_metas (tlist->key))
|
||||
if (ansic_shouldquote (tlist->key))
|
||||
istr = ansic_quote (tlist->key, 0, (int *)0);
|
||||
else if (sh_contains_shell_metas (tlist->key))
|
||||
istr = sh_double_quote (tlist->key);
|
||||
else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0')
|
||||
istr = sh_double_quote (tlist->key);
|
||||
else
|
||||
istr = tlist->key;
|
||||
#else
|
||||
istr = tlist->key;
|
||||
#endif
|
||||
vstr = tlist->data ? sh_double_quote ((char *)tlist->data) : (char *)0;
|
||||
|
||||
vstr = tlist->data ? (ansic_shouldquote ((char *)tlist->data) ?
|
||||
ansic_quote ((char *)tlist->data, 0, (int *)0) :
|
||||
sh_double_quote ((char *)tlist->data))
|
||||
: (char *)0;
|
||||
|
||||
elen = STRLEN (istr) + 8 + STRLEN (vstr);
|
||||
RESIZE_MALLOCED_BUFFER (ret, rlen, (elen+1), rsize, rsize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue