From 6724ba505dc36e39f27d143e3b726f4625564c81 Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 20 Jul 2012 21:18:45 +0000 Subject: [PATCH] =?UTF-8?q?make=20'typeset=20-p'=20(and=20soon=20${foo@$})?= =?UTF-8?q?=20output=20strings=20safe=20for=20re-entry=20into=20AT&T=20ksh?= =?UTF-8?q?93=20(that=20we=20still=20must=20use=20octal,=20in=20this=20day?= =?UTF-8?q?=20and=20age,=20because=20dgk=E2=80=99s=20\x=20is=20broken?= =?UTF-8?q?=E2=80=A6=20tss=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit not round-trip, as ksh93 doesn’t encode hi-bit7 or \v, but safe --- misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc.c b/misc.c index fb8e8e7..22364ee 100644 --- a/misc.c +++ b/misc.c @@ -30,7 +30,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.195 2012/07/01 15:54:56 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.196 2012/07/20 21:18:45 tg Exp $"); #define KSH_CHVT_FLAG #ifdef MKSH_SMALL @@ -1139,7 +1139,7 @@ print_value_quoted(struct shf *shf, const char *s) if (c < 32 || c > 0x7E) { /* FALLTHROUGH */ case '\'': - shf_fprintf(shf, "\\x%02X", c); + shf_fprintf(shf, "\\%03o", c); break; }