summaryrefslogtreecommitdiffstats
path: root/contrib/dialog/arrows.c
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-09-24 14:52:43 +0000
committerdteske <dteske@FreeBSD.org>2013-09-24 14:52:43 +0000
commit6633bf70ed24c304037f64ca2f28e6ea8d2a0b47 (patch)
tree928bd26d2edefc51e3476336efb87361f214c616 /contrib/dialog/arrows.c
parent8a88ce9ab8eb02eeeb3167855ff0ac0f381dad7e (diff)
downloadFreeBSD-src-6633bf70ed24c304037f64ca2f28e6ea8d2a0b47.zip
FreeBSD-src-6633bf70ed24c304037f64ca2f28e6ea8d2a0b47.tar.gz
Update dialog to 1.2-20130923.
Approved by: re (marius)
Diffstat (limited to 'contrib/dialog/arrows.c')
-rw-r--r--contrib/dialog/arrows.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/dialog/arrows.c b/contrib/dialog/arrows.c
index 5e5c723..44a90df 100644
--- a/contrib/dialog/arrows.c
+++ b/contrib/dialog/arrows.c
@@ -1,5 +1,5 @@
/*
- * $Id: arrows.c,v 1.50 2013/05/24 00:05:21 tom Exp $
+ * $Id: arrows.c,v 1.51 2013/09/02 15:10:09 tom Exp $
*
* arrows.c -- draw arrows to indicate end-of-range for lists
*
@@ -74,9 +74,10 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
int bottom;
if (dialog_vars.help_line != 0
+ && dialog_vars.help_line[0] != 0
&& (bottom = getmaxy(win) - 1) > 0) {
chtype attr = A_NORMAL;
- const int *cols = dlg_index_columns(dialog_vars.help_line);
+ int cols = dlg_count_columns(dialog_vars.help_line);
int other = decorations ? (ON_LEFT + ON_RIGHT) : 0;
int avail = (getmaxx(win) - other - 2);
int limit = dlg_count_real_columns(dialog_vars.help_line) + 2;
@@ -86,7 +87,7 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
other = decorations ? ON_LEFT : 0;
(void) wmove(win, bottom, other + (avail - limit) / 2);
waddch(win, '[');
- dlg_print_text(win, dialog_vars.help_line, cols[limit], &attr);
+ dlg_print_text(win, dialog_vars.help_line, cols, &attr);
waddch(win, ']');
wmove(win, cur_y, cur_x);
}
OpenPOWER on IntegriCloud