From dbb3357c278921c702a97fa696b2b52fb053f15b Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 4 May 2021 10:39:20 -0400 Subject: [PATCH] adapt to notcurses 2.2.9 --- CMakeLists.txt | 2 +- README.md | 2 +- src/ui/notcurses/iface.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4796660..9513c57e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ pkg_check_modules(LIBREADLINE REQUIRED readline) pkg_check_modules(LIBUDEV REQUIRED libudev>=175) pkg_check_modules(LIBZ REQUIRED zlib>=1.2.11) if(${USE_NOTCURSES}) - find_package(Notcurses 2.0.7 CONFIG) + find_package(Notcurses 2.2.9 CONFIG) set_package_properties(Notcurses PROPERTIES TYPE REQUIRED) endif() diff --git a/README.md b/README.md index 942c60b0..84e433e4 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ sockets. Packet transmission requires at least a 2.6.29 kernel. The line-based UI (`omphalos-readline`) requires GNU Readline. -The fullscreen UI (`omphalos`) requires Notcurses 2.0.7+. +The fullscreen UI (`omphalos`) requires Notcurses 2.2.9+. arp-scan's `get-oui` program is used to build the IANA OUI file. diff --git a/src/ui/notcurses/iface.c b/src/ui/notcurses/iface.c index 8a0162d7..d6da18bd 100644 --- a/src/ui/notcurses/iface.c +++ b/src/ui/notcurses/iface.c @@ -716,10 +716,10 @@ void iface_box(const interface *i, const iface_state *is, struct ncplane *n, ncplane_set_styles(n, attrs); ncplane_set_fg_rgb(n, bcolor); ncplane_cursor_move_yx(n, 0, 1); - cell c = CELL_TRIVIAL_INITIALIZER; - cell_load(n, &c, "─"); - cell_set_fg_rgb(&c, bcolor); - cell_set_styles(&c, attrs); + nccell c = CELL_TRIVIAL_INITIALIZER; + nccell_load(n, &c, "─"); + nccell_set_fg_rgb(&c, bcolor); + nccell_set_styles(&c, attrs); ncplane_hline(n, &c, cols - 3); ncplane_putegc_yx(n, 0, cols - 1, "╮", NULL); ncplane_off_styles(n, NCSTYLE_REVERSE); @@ -765,10 +765,10 @@ void iface_box(const interface *i, const iface_state *is, struct ncplane *n, ncplane_off_styles(n, NCSTYLE_REVERSE); attrs = NCSTYLE_BOLD | (active ? NCSTYLE_REVERSE : 0); ncplane_set_styles(n, attrs); - cell_set_fg_rgb(&c, bcolor); - cell_set_styles(&c, attrs); + nccell_set_fg_rgb(&c, bcolor); + nccell_set_styles(&c, attrs); ncplane_hline(n, &c, cols - 3); - cell_release(n, &c); + nccell_release(n, &c); ncplane_putegc_yx(n, rows - 1, cols - 1, "╯", NULL); ncplane_printf_yx(n, rows - 1, 2, "["); ncplane_set_fg_rgb(n, hcolor);