[master] 6c0c10f Polish the VSC RST typography a bit.

Poul-Henning Kamp phk at FreeBSD.org
Mon May 15 22:36:05 CEST 2017


commit 6c0c10ffae90e7599e0db16542c4cb5816f67663
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon May 15 20:35:24 2017 +0000

    Polish the VSC RST typography a bit.

diff --git a/bin/varnishstat/vsc2rst.c b/bin/varnishstat/vsc2rst.c
index 6446ccb..760f130 100644
--- a/bin/varnishstat/vsc2rst.c
+++ b/bin/varnishstat/vsc2rst.c
@@ -34,7 +34,7 @@
 #include <stdio.h>
 
 #define VSC_LEVEL_F(v,l,e,d)		\
-	static const char VSC_level_##v[] = l;
+	static const char VSC_level_##v[] = #v;
 #include "tbl/vsc_levels.h"
 #undef VSC_LEVEL_F
 
@@ -61,8 +61,19 @@ int main(int argc, char **argv)
 
 #define VSC_DO(U,l,t,h) L(h);
 
-#define VSC_F(n, t, l, s, f, v, d, e)	\
-	printf("%s – %s (%s)\n\t%s\n\n", #n, d, VSC_level_##v, e);
+#define VSC_F(n, t, l, s, f, v, d, e)					\
+	do {								\
+		printf("``%s`` – ", #n);				\
+		if (s == 'c')						\
+			printf("`counter` - ");				\
+		else if (s == 'g')					\
+			printf("`gauge` - ");				\
+		else if (s == 'b')					\
+			printf("`bitmap` - ");				\
+		printf("%s\n\n", VSC_level_##v);			\
+		printf("\t%s\n\n", d);					\
+		printf("\t%s\n\n", e);					\
+	} while (0);
 
 #define VSC_DONE(U,l,t)
 



More information about the varnish-commit mailing list