Bash-4.3 distribution sources and documentation

This commit is contained in:
Chet Ramey 2014-02-26 09:36:43 -05:00
commit ac50fbac37
497 changed files with 129395 additions and 87598 deletions

View file

@ -133,7 +133,7 @@ substring (string, start, end)
len = end - start;
result = (char *)xmalloc (len + 1);
strncpy (result, string + start, len);
memcpy (result, string + start, len);
result[len] = '\0';
return (result);
}
@ -158,7 +158,7 @@ strsub (string, pat, rep, global)
if (replen)
RESIZE_MALLOCED_BUFFER (temp, templen, replen, tempsize, (replen * 2));
for (r = rep; *r; )
for (r = rep; *r; ) /* can rep == "" */
temp[templen++] = *r++;
i += patlen ? patlen : 1; /* avoid infinite recursion */