summaryrefslogtreecommitdiff
path: root/curses.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-04 11:08:23 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-04 11:08:23 -0700
commita28369258b89e013103edcca20355eb61fffdf69 (patch)
treee514c8804fcdb5f282a012d8e8931b057585aba0 /curses.c
parent3492c24cc533e9088e8b12f929f5d922c8787cba (diff)
downloaddartboat-a28369258b89e013103edcca20355eb61fffdf69.tar.gz
dartboat-a28369258b89e013103edcca20355eb61fffdf69.tar.xz
formatting
Diffstat (limited to 'curses.c')
-rw-r--r--curses.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/curses.c b/curses.c
index 12141af..174a6b9 100644
--- a/curses.c
+++ b/curses.c
@@ -94,7 +94,8 @@ void curses_draw(struct leg *l1, struct leg *l2)
int buflen = 0;
int wlines = LINES - 3;
- int n_visits = l1->n_visits > l2->n_visits ? l1->n_visits : l2->n_visits;
+ int n_visits = l1->n_visits > l2->n_visits ? l1->n_visits :
+ l2->n_visits;
int start_visit = (wlines > n_visits) ? 0 : (n_visits - wlines);
int offset = 0;
@@ -132,7 +133,8 @@ void curses_draw(struct leg *l1, struct leg *l2)
for (int j = 0; j < v->n_darts; ++j) {
char *n = segment_name(v->darts[j]);
- buflen += sprintf(buf + buflen, j == 0 ? " %4s" :" %4s", n);
+ buflen += sprintf(buf + buflen,
+ j == 0 ? " %4s" :" %4s", n);
free(n);
}
flushbuf(buf, &buflen, COLOR_PAIR(C_DARTS));