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

30
error.c
View file

@ -340,6 +340,36 @@ parser_error (lineno, format, va_alist)
}
#ifdef DEBUG
/* This assumes ASCII and is suitable only for debugging */
char *
strescape (str)
const char *str;
{
char *r, *result;
unsigned char *s;
r = result = (char *)xmalloc (strlen (str) * 2 + 1);
for (s = (unsigned char *)str; s && *s; s++)
{
if (*s < ' ')
{
*r++ = '^';
*r++ = *s+64;
}
else if (*s == 127)
{
*r++ = '^';
*r++ = '?';
}
else
*r++ = *s;
}
*r = '\0';
return result;
}
void
#if defined (PREFER_STDARG)
itrace (const char *format, ...)