git: b9e5884ef786 - main - bsddialog(3): fix disabled shadow
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 Apr 2022 15:52:45 UTC
The branch main has been updated by asiciliano:
URL: https://cgit.FreeBSD.org/src/commit/?id=b9e5884ef786a6c0fd203064baa07ef308025707
commit b9e5884ef786a6c0fd203064baa07ef308025707
Author: Alfonso S. Siciliano <asiciliano@FreeBSD.org>
AuthorDate: 2022-04-20 15:39:43 +0000
Commit: Alfonso S. Siciliano <asiciliano@FreeBSD.org>
CommitDate: 2022-04-20 15:52:04 +0000
bsddialog(3): fix disabled shadow
Fix dialogs building and updating fault with disabled shadow
(conf.shadow=false and implicitly bsddialog --no-shadow).
While here delete WARNS=2: all warnings were fixed in upstream and
imported in 0.2.
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D34958
---
contrib/bsddialog/lib/lib_util.c | 6 +++---
lib/libbsddialog/Makefile | 2 --
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/contrib/bsddialog/lib/lib_util.c b/contrib/bsddialog/lib/lib_util.c
index 4c2ab76bc592..643830efd58c 100644
--- a/contrib/bsddialog/lib/lib_util.c
+++ b/contrib/bsddialog/lib/lib_util.c
@@ -823,7 +823,7 @@ draw_dialog(struct bsddialog_conf *conf, WINDOW *shadow, WINDOW *widget,
getmaxyx(widget, h, w);
- if (shadow != NULL)
+ if (conf->shadow)
wnoutrefresh(shadow);
draw_borders(conf, widget, h, w, RAISED);
@@ -883,7 +883,7 @@ update_dialog(struct bsddialog_conf *conf, WINDOW *shadow, WINDOW *widget,
{
int error;
- if (shadow != NULL) {
+ if (conf->shadow) {
wclear(shadow);
mvwin(shadow, y + t.shadow.h, x + t.shadow.w);
wresize(shadow, h, w);
@@ -962,7 +962,7 @@ end_dialog(struct bsddialog_conf *conf, WINDOW *shadow, WINDOW *widget,
delwin(shadow);
if (conf->clear)
- hide_widget(y, x, h, w, shadow != NULL);
+ hide_widget(y, x, h, w, conf->shadow);
if (conf->get_height != NULL)
*conf->get_height = h;
diff --git a/lib/libbsddialog/Makefile b/lib/libbsddialog/Makefile
index d5c03cb079ce..08e5bebcb6a5 100644
--- a/lib/libbsddialog/Makefile
+++ b/lib/libbsddialog/Makefile
@@ -24,6 +24,4 @@ MAN= bsddialog.3
LIBADD= ncursesw tinfow formw
CFLAGS+= -D_XOPEN_SOURCE_EXTENDED
-WARNS= 2
-
.include <bsd.lib.mk>