From 9220032f8017cfb6a4ee0ddea3ee3d510686dc13 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 18 Aug 1998 04:05:05 +0000 Subject: Enclose string dumps in doublequotes to work with visbuf properly. svn path=/trunk/; revision=2045 --- env.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'env.c') diff --git a/env.c b/env.c index 67679d19..3e86ac45 100644 --- a/env.c +++ b/env.c @@ -97,7 +97,12 @@ char *visbuf(const char *buf) while (*buf) { - if (isprint(*buf) || *buf == ' ') + if (*buf == '"') + { + *tp++ = '\\'; *tp++ = '"'; + buf++; + } + else if (isprint(*buf) || *buf == ' ') *tp++ = *buf++; else if (*buf == '\n') { -- cgit v1.2.3