diff options
| author | 2024-11-27 11:32:17 -0500 | |
|---|---|---|
| committer | 2024-11-27 11:32:17 -0500 | |
| commit | 28f56a9e1324fbde6854c72d6b234c2f00748d03 (patch) | |
| tree | 253272dcd76b50a155e0087ee5e70c8b6d4d0034 /src/fruits | |
| parent | 9918d2e947dda7ca470eafc811ddb4c8b632b5d3 (diff) | |
| download | camu-28f56a9e1324fbde6854c72d6b234c2f00748d03.tar.gz camu-28f56a9e1324fbde6854c72d6b234c2f00748d03.tar.bz2 camu-28f56a9e1324fbde6854c72d6b234c2f00748d03.zip | |
Sink fixes, update for dependency changes
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/fruits')
| -rw-r--r-- | src/fruits/cmsrv/ui.c | 8 | ||||
| -rw-r--r-- | src/fruits/cmsrv/ui.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/fruits/cmsrv/ui.c b/src/fruits/cmsrv/ui.c index e10db5e..e1e686f 100644 --- a/src/fruits/cmsrv/ui.c +++ b/src/fruits/cmsrv/ui.c @@ -109,7 +109,7 @@ static void erase_lists(struct cmsrv_ui *ui) static void putnwstr_maxwidth_yx(struct ncplane *n, u32 y, u32 x, u32 maxwidth, wstr *w) { ncplane_cursor_move_yx(n, y, x); - u32 end = AL_MIN(w->len, maxwidth); + u32 end = MIN(w->len, maxwidth); for (u32 i = 0; i < end; i++) { ncplane_putwc(n, al_wstr_at(w, i)); } @@ -127,10 +127,10 @@ static void render_lists(struct cmsrv_ui *ui) struct lia_list *list; al_array_foreach(ui->server->lists, i, list) { if (current_line++ >= max_height) break; - ncplane_putnstr_yx(n, i, 0, AL_MIN(max_width, list->name.len), &al_str_at(&list->name, 0)); - s32 index = AL_MAX(list->current - (entries_per_list / 2), 0); + ncplane_putnstr_yx(n, i, 0, MIN(max_width, list->name.len), &al_str_at(&list->name, 0)); + s32 index = MAX(list->current - (entries_per_list / 2), 0); s32 size = (s32)list->entries.size; - s32 end = AL_MIN(index + entries_per_list, size); + s32 end = MIN(index + entries_per_list, size); for (s32 j = index; j < end; j++) { struct lia_list_entry *entry = al_array_at(list->entries, j); u32 y = i + (j - index) + 1; diff --git a/src/fruits/cmsrv/ui.h b/src/fruits/cmsrv/ui.h index 45fdd85..ebf7c1a 100644 --- a/src/fruits/cmsrv/ui.h +++ b/src/fruits/cmsrv/ui.h @@ -1,6 +1,6 @@ -#include <notcurses/notcurses.h> #include <al/types.h> #include <al/array.h> +#include <notcurses/notcurses.h> #include "../../server/server.h" |