ttyplot

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

commit 651fcbc9acfa9fc388123c64af60488316631f54
parent 5c038d4ea56ce5ffc6682accfb4428b8b8f25a37
Author: Antoni Sawicki <tenox@google.com>
Date:   Wed,  1 May 2019 13:19:55 -0700

added workaround for missing getmaxyx()

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

diff --git a/ttyplot.c b/ttyplot.c @@ -179,7 +179,12 @@ int main(int argc, char *argv[]) { erase(); refresh(); + #ifdef NOGETMAXYX + height=LINES; + width=COLS; + #else getmaxyx(stdscr, height, width); + #endif mvprintw(height/2, (width/2)-14, "waiting for data from stdin"); refresh(); @@ -239,7 +244,12 @@ int main(int argc, char *argv[]) { #ifdef _AIX refresh(); #endif + #ifdef NOGETMAXYX + height=LINES; + width=COLS; + #else getmaxyx(stdscr, height, width); + #endif plotheight=height-4; plotwidth=width-4; if(plotwidth>=(sizeof(values1)/sizeof(double))-1)