(quote_as_word): Actually test DOUBLE_DOLLARS, instead of always doubling.
authorRoland McGrath <roland@redhat.com>
Mon, 26 Sep 1994 22:45:08 +0000 (22:45 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 26 Sep 1994 22:45:08 +0000 (22:45 +0000)
main.c

diff --git a/main.c b/main.c
index ac4be34def096dd492efc8a0224c5ca725f24240..7aae9f5f816e715ba29d496caecf93b4b6a20ffe 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1555,7 +1555,7 @@ quote_as_word (out, in, double_dollars)
     {
       if (index ("^;'\"*?[]$<>(){}|&~`\\ \t\r\n\f\v", *in) != 0)
        *out++ = '\\';
-      if (*in == '$')
+      if (double_dollars && *in == '$')
        *out++ = '$';
       *out++ = *in++;
     }