ttyplot

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

commit fba7d595d5156d57856132bdf642a0253a2cb1b3
parent 651fcbc9acfa9fc388123c64af60488316631f54
Author: Antoni Sawicki <tenox@google.com>
Date:   Wed,  1 May 2019 17:49:52 -0700

break long lines fore readability

Diffstat:
Mttyplot.c | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/ttyplot.c b/ttyplot.c @@ -94,10 +94,20 @@ void plot_values(int h, int w, int ph, int pw, double *v1, double *v2, double ma int x=3; for(i=n+1; i<pw; i++) - draw_line(x++, ph, (v1[i]>hm) ? ph : (int)((v1[i]/max)*(double)ph), (v2[i]>hm) ? ph : (int)((v2[i]/max)*(double)ph), (v1[i]>hm) ? ce : pc, (v2[i]>hm) ? ce : pc, ce); + draw_line(x++, ph, + (v1[i]>hm) ? ph : (int)((v1[i]/max)*(double)ph), + (v2[i]>hm) ? ph : (int)((v2[i]/max)*(double)ph), + (v1[i]>hm) ? ce : pc, + (v2[i]>hm) ? ce : pc, + ce); for(i=0; i<=n; i++) - draw_line(x++, ph, (v1[i]>hm) ? ph : (int)((v1[i]/max)*(double)ph), (v2[i]>hm) ? ph : (int)((v2[i]/max)*(double)ph), (v1[i]>hm) ? ce : pc, (v2[i]>hm) ? ce : pc, ce); + draw_line(x++, ph, + (v1[i]>hm) ? ph : (int)((v1[i]/max)*(double)ph), + (v2[i]>hm) ? ph : (int)((v2[i]/max)*(double)ph), + (v1[i]>hm) ? ce : pc, + (v2[i]>hm) ? ce : pc, + ce); } void resize(int sig) {