summaryrefslogtreecommitdiff
path: root/web/web_scoreboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_scoreboard.c')
-rw-r--r--web/web_scoreboard.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c
index 6207d4a..8746cc9 100644
--- a/web/web_scoreboard.c
+++ b/web/web_scoreboard.c
@@ -177,6 +177,11 @@ void draw_visits()
struct dom_elem **elemv = malloc(6 * (n_visits + 1) * sizeof(*elemv));
int elemc = 0;
+ elemv[elemc++] = create_div(state->legs[0]->name, "visit-name1");
+ if (state->mode != M_P)
+ elemv[elemc++] = create_div(state->legs[1]->name,
+ "visit-name2");
+
char buf[32], buf2[32];
snprintf(buf, sizeof(buf), "%d", state->legs[0]->start);
elemv[elemc++] = create_div(buf, "visit-col2");
@@ -213,10 +218,11 @@ void draw_visits()
elemv[elemc++] = create_div(buf, buf2);
if (v->n_darts) {
+ char *ptr = buf;
for (int j = 0; j < v->n_darts; ++j) {
char *n = segment_name(v->darts[j]);
- snprintf(buf + (j * 5), sizeof(buf) - (j * 5),
- " %4s", n);
+ ptr += snprintf(ptr, sizeof(buf) - (ptr - buf),
+ j == 0 ? "%s" : "-%s", n);
free(n);
}
elemv[elemc++] = create_div(buf, "visit-col6");