Add $TerminalBackground special variable.

This commit is contained in:
Dianne Skoll
2022-10-09 12:40:48 -04:00
parent ec72c74016
commit 7218d55f08
4 changed files with 91 additions and 1 deletions

View File

@@ -1260,7 +1260,12 @@ void PrintValue (Value *v, FILE *fp)
case '\v': fprintf(ErrFp, "\\v"); break;
case '"': fprintf(ErrFp, "\\\""); break;
case '\\': fprintf(ErrFp, "\\\\"); break;
default: putc(*s, ErrFp); break;
default:
if (*s < 32 || *s > 126) {
fprintf(ErrFp, "\\x%02x", (unsigned int) *s);
} else {
putc(*s, ErrFp); break;
}
}
s++;
}