[master] 7c67df5 Polish the RST we generate for params.
Poul-Henning Kamp
phk at varnish-cache.org
Tue Oct 1 10:49:26 CEST 2013
commit 7c67df5547936ca3f690268f9e46048681493f4f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Sep 24 05:51:34 2013 +0000
Polish the RST we generate for params.
Add a link-tag for each param for easy cross-referencing using
(:ref:`ref_param_$param`)
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index e2af69b..e75191e 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -916,13 +916,17 @@ MCF_DumpRstParam(void)
{
const struct parspec *pp;
const char *p, *q;
- int i;
+ int i, j;
printf("\n.. The following is the autogenerated "
"output from varnishd -x dumprstparam\n\n");
for (i = 0; i < nparspec; i++) {
pp = parspecs[i];
+ printf(".. _ref_param_%s:\n\n", pp->name);
printf("%s\n", pp->name);
+ for (j = 0; j < strlen(pp->name); j++)
+ printf("~");
+ printf("\n");
if (pp->units != NULL && *pp->units != '\0')
printf("\t- Units: %s\n", pp->units);
printf("\t- Default: %s\n", pp->def);
diff --git a/bin/varnishd/mgt/mgt_param_bits.c b/bin/varnishd/mgt/mgt_param_bits.c
index faeff24..1816e1b 100644
--- a/bin/varnishd/mgt/mgt_param_bits.c
+++ b/bin/varnishd/mgt/mgt_param_bits.c
@@ -239,13 +239,13 @@ tweak_feature(struct cli *cli, const struct parspec *par, const char *arg)
const struct parspec VSL_parspec[] = {
{ "vsl_mask", tweak_vsl_mask, NULL, 0, 0,
"Mask individual VSL messages from being logged.\n"
- "\tdefault\tSet default value\n"
+ "\tdefault\tSet default value\n\n"
"Use +/- prefixe in front of VSL tag name, to mask/unmask "
"individual VSL messages.",
0, "default", "" },
{ "debug", tweak_debug, NULL, 0, 0,
"Enable/Disable various kinds of debugging.\n"
- "\tnone\t\tDisable all debugging\n"
+ "\tnone\t\tDisable all debugging\n\n"
"Use +/- prefix to set/reset individual bits:\n"
#define DEBUG_BIT(U, l, p, d) "\t" #l "\t" p d "\n"
#include "tbl/debug_bits.h"
@@ -253,7 +253,7 @@ const struct parspec VSL_parspec[] = {
, 0, "none", "" },
{ "feature", tweak_feature, NULL, 0, 0,
"Enable/Disable various minor features.\n"
- "\tnone\t\tDisable all features.\n"
+ "\tnone\t\tDisable all features.\n\n"
"Use +/- prefix to enable/disable individual feature:\n"
#define FEATURE_BIT(U, l, p, d, ld) "\t" #l "\t" p d "\n"
#include "tbl/feature_bits.h"
More information about the varnish-commit
mailing list