[master] d6eeed4 Draw the info segment in the curses app
Martin Blix Grydeland
martin at varnish-cache.org
Wed May 15 14:46:14 CEST 2013
commit d6eeed453970ff8e1dfdcdad5e09f48819a712ef
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Mon May 13 15:43:11 2013 +0200
Draw the info segment in the curses app
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index de3ea95..a2bf8a3 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -752,13 +752,18 @@ draw_bar_b(void)
static void
draw_info(void)
{
- int Y, X;
if (w_info == NULL)
return;
- getmaxyx(w_info, Y, X);
- mvwprintw(w_info, 0, 0, "infotest Y=%d X=%d", Y, X);
+ werase(w_info);
+ if (current < n_ptarray - 1) {
+ /* XXX: Word wrapping, and overflow handling? */
+ mvwprintw(w_info, 0, 0, "%s:",
+ ptarray[current]->vpt->desc->sdesc);
+ mvwprintw(w_info, 1, 0, "%s",
+ ptarray[current]->vpt->desc->ldesc);
+ }
wnoutrefresh(w_info);
}
More information about the varnish-commit
mailing list