From ab7be4238ca89b5dca482a1c3b3fd013b105750e Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Thu, 14 Sep 2017 21:43:37 +0100
Subject: More [key]=value tweaks
Some rephrasings.
Update typeset -p for associative arrays to use new syntax.
---
Src/params.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
(limited to 'Src/params.c')
diff --git a/Src/params.c b/Src/params.c
index e0aaaf620..d628ddf37 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -5564,9 +5564,7 @@ printparamvalue(Param p, int printflags)
{
char *t, **u;
- if (printflags & PRINT_KV_PAIR)
- putchar(' ');
- else
+ if (!(printflags & PRINT_KV_PAIR))
putchar('=');
/* How the value is displayed depends *
@@ -5721,7 +5719,11 @@ printparamnode(HashNode hn, int printflags)
zputs(p->node.nam, stdout);
putchar('\n');
} else {
+ if (printflags & PRINT_KV_PAIR)
+ putchar('[');
quotedzputs(p->node.nam, stdout);
+ if (printflags & PRINT_KV_PAIR)
+ printf("]=");
printparamvalue(p, printflags);
}
--
cgit 1.4.1