blob: 66705ded88cc974b44a666e2e7b44866a62f1605 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 2f2387038a7b9aca4c31c0f839cda3b7ab3391c0 Mon Sep 17 00:00:00 2001
From: Guillaume Quintard <guillaume@varnish-software.com>
Date: Thu, 26 Apr 2018 21:59:41 +0200
Subject: [PATCH] Fix gensequences for BusyBox awk
I never thought that I'd have to fix a string concatenation problem in
a BusyBox awk program to generate VT100 code in a container, but here we
are:
echo | awk 'END {print "foo" "" ++a, "foo" ++a}'
should output "foo0 foo1", and for all the ?awk I tested, it does,
except for BusyBox awk who thought funny to output "0 foo1", breaking the
teken_state.h file.
---
bin/varnishtest/gensequences | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/varnishtest/gensequences b/bin/varnishtest/gensequences
index 4337186b8..18a68b43b 100644
--- a/bin/varnishtest/gensequences
+++ b/bin/varnishtest/gensequences
@@ -70,7 +70,7 @@ while (getline > 0) {
l_prefix_parent[n] = prefix;
l_prefix_suffix[n] = sequence[i];
if (!l_prefix_name[n])
- l_prefix_name[n] = "teken_state_" ++npr;
+ l_prefix_name[n] = "teken_state_" "" ++npr;
prefix = n;
}
|