@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.627 2020/10/31 18:05:16 rillig Exp $ */
+/* $NetBSD: var.c,v 1.628 2020/10/31 18:14:59 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -129,7 +129,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.627 2020/10/31 18:05:16 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.628 2020/10/31 18:14:59 rillig Exp $");
#define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
#define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -1636,7 +1636,6 @@
static char *
VarQuote(const char *str, Boolean quoteDollar)
{
- char *res;
Buffer buf;
Buf_Init(&buf, 0);
@@ -1655,9 +1654,7 @@
Buf_AddStr(&buf, "\\$");
}
- res = Buf_Destroy(&buf, FALSE);
- VAR_DEBUG1("QuoteMeta: [%s]\n", res);
- return res;
+ return Buf_Destroy(&buf, FALSE);
}
/* Compute the 32-bit hash of the given string, using the MurmurHash3
@@ -38,7 +38,6 @@
Result of ${VAR:S,2,two,} is "1 two 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${VAR:Q} with VARE_UNDEFERR|VARE_WANTRES
Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-QuoteMeta: [1\ 2\ 3]
Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${VAR:tu:tl:Q} with VARE_UNDEFERR|VARE_WANTRES
Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
@@ -46,7 +45,6 @@
Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Result of ${VAR:tl} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-QuoteMeta: [1\ 2\ 3]
Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} with VARE_UNDEFERR|VARE_WANTRES
Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)