ttyplot

Realtime terminal plotter
git clone git://git.sgregoratto.me/ttyplot
Log | Files | Refs | README | LICENSE

commit 5c038d4ea56ce5ffc6682accfb4428b8b8f25a37
parent 24cd1419298a5807b565acec679b613408edcf5a
Author: Antoni Sawicki <tenox@google.com>
Date:   Wed,  1 May 2019 11:51:29 -0700

more fixes for aix

Diffstat:
Mttyplot.c | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ttyplot.c b/ttyplot.c @@ -178,6 +178,7 @@ int main(int argc, char *argv[]) { signal(SIGINT, (void*)finish); erase(); + refresh(); getmaxyx(stdscr, height, width); mvprintw(height/2, (width/2)-14, "waiting for data from stdin"); refresh(); @@ -235,6 +236,9 @@ int main(int argc, char *argv[]) { } erase(); + #ifdef _AIX + refresh(); + #endif getmaxyx(stdscr, height, width); plotheight=height-4; plotwidth=width-4; @@ -260,7 +264,11 @@ int main(int argc, char *argv[]) { asctime_r(lt, ls); mvprintw(height-2, width-strlen(ls), "%s", ls); - mvaddch(height-2, 5, plotchar|A_NORMAL); + #ifdef _AIX + mvaddch(height-2, 5, plotchar); + #else + mvvline(height-2, 5, plotchar|A_NORMAL, 1); + #endif mvprintw(height-2, 7, "last=%.1f min=%.1f max=%.1f avg=%.1f %s ", values1[n], min1, max1, avg1, unit); if(rate) printw(" interval=%ds", td);