Bash-4.3 distribution sources and documentation
This commit is contained in:
parent
4539d736f1
commit
ac50fbac37
497 changed files with 129395 additions and 87598 deletions
30
error.c
30
error.c
|
@ -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, ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue