From d9526039ebcfb2d8f4d8c7fd85f9b27e9074a82b Mon Sep 17 00:00:00 2001 From: 0xf8 <0xf8.dev@proton.me> Date: Sat, 25 Feb 2023 12:06:54 -0500 Subject: [PATCH] Update 0.3 Signed-off-by: 0xf8 <0xf8.dev@proton.me> --- src/main.c | 11 +++++------ src/main.h | 3 +-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main.c b/src/main.c index 5678a9c..ee7831e 100644 --- a/src/main.c +++ b/src/main.c @@ -175,19 +175,19 @@ int main(int argc, char **argv) { ncplane_putchar_yx(notcurses_stdplane(nc), midr + 0, midc, '|'); ncplane_putchar_yx(notcurses_stdplane(nc), midr + 1, midc, '|'); - struct bignumber_t *bn_houru = bignumber(00, 0, houru); + struct bignumber_t *bn_houru = bignumber(00, houru); drawbignumber(bn_houru, sec, midc - 20, midr - 2, notcurses_stdplane(nc)); free(bn_houru); - struct bignumber_t *bn_hourl = bignumber(15, 1, hourl); + struct bignumber_t *bn_hourl = bignumber(15, hourl); drawbignumber(bn_hourl, sec, midc - 10, midr - 2, notcurses_stdplane(nc)); free(bn_hourl); - struct bignumber_t *bn_minu = bignumber(30, 2, minu); + struct bignumber_t *bn_minu = bignumber(30, minu); drawbignumber(bn_minu, sec, midc + 3, midr - 2, notcurses_stdplane(nc)); free(bn_minu); - struct bignumber_t *bn_minl = bignumber(45, 3, minl); + struct bignumber_t *bn_minl = bignumber(45, minl); drawbignumber(bn_minl, sec, midc + 13, midr - 2, notcurses_stdplane(nc)); free(bn_minl); @@ -204,7 +204,7 @@ int main(int argc, char **argv) { return 0; } -struct bignumber_t *bignumber(int start, uint index, uint mimick) { +struct bignumber_t *bignumber(int start, uint mimick) { struct bignumber_t *bn = (struct bignumber_t *)malloc(sizeof(struct bignumber_t) + 1); uint i = start; @@ -212,7 +212,6 @@ struct bignumber_t *bignumber(int start, uint index, uint mimick) { for (int y = 0; y < 5; y++) bn->matrix[y][x] = i, i++; - bn->index = index; bn->mimick = mimick; return bn; diff --git a/src/main.h b/src/main.h index 21961ca..958a0ca 100644 --- a/src/main.h +++ b/src/main.h @@ -38,7 +38,6 @@ struct string { struct bignumber_t { uint matrix[5][3]; uint mimick; - uint index; }; @@ -49,7 +48,7 @@ void free_string(struct string *s); struct string *pad_int(int n, uint pad, uint maxsize); // this creates a bignumber_t -struct bignumber_t *bignumber(int start, uint index, uint mimick); +struct bignumber_t *bignumber(int start, uint mimick); // this draws a big number void drawbignumber(struct bignumber_t *, int sec, int startx, int starty, struct ncplane *place);