|
|
@@ -1035,8 +1035,6 @@ rspamc_counters_output (FILE *out, ucl_object_t *obj) |
|
|
|
const ucl_object_t *cur, *sym, *weight, *freq, *freq_dev, *nhits; |
|
|
|
ucl_object_iter_t iter = NULL; |
|
|
|
gchar fmt_buf[64], dash_buf[82], sym_buf[82]; |
|
|
|
gint l, i; |
|
|
|
gint max_len = sizeof("Symbol") - 1; |
|
|
|
static const gint dashes = 44; |
|
|
|
|
|
|
|
if (obj->type != UCL_ARRAY) { |
|
|
@@ -1050,12 +1048,12 @@ rspamc_counters_output (FILE *out, ucl_object_t *obj) |
|
|
|
} |
|
|
|
|
|
|
|
/* Find maximum width of symbol's name */ |
|
|
|
gint max_len = sizeof("Symbol") - 1; |
|
|
|
while ((cur = ucl_object_iterate (obj, &iter, true)) != NULL) { |
|
|
|
sym = ucl_object_lookup (cur, "symbol"); |
|
|
|
if (sym != NULL) { |
|
|
|
l = sym->len; |
|
|
|
if (l > max_len) { |
|
|
|
max_len = l; |
|
|
|
if (sym->len > max_len) { |
|
|
|
max_len = sym->len; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@@ -1081,7 +1079,7 @@ rspamc_counters_output (FILE *out, ucl_object_t *obj) |
|
|
|
"| %%3d | %%%ds | %%7.1f | %%6.3f(%%5.3f) | %%7ju |\n", max_len); |
|
|
|
|
|
|
|
iter = NULL; |
|
|
|
i = 0; |
|
|
|
gint i = 0; |
|
|
|
while ((cur = ucl_object_iterate (obj, &iter, true)) != NULL) { |
|
|
|
printf (" %s \n", dash_buf); |
|
|
|
sym = ucl_object_lookup (cur, "symbol"); |