ploot

plot images or real-time plain text from a .csv file
Log | Files | Refs | README

commit 5aea0f435467bfbc052e1635ee3106a84f13372e
parent 4845787880204633c4f75d799ee91c24dd354970
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri,  2 Feb 2018 23:02:03 +0100

centered title

Diffstat:
MMakefile | 2+-
Aploot | 0
Mploot.c | 4++--
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ CFLAGS = -Wall -Wextra -Werror -std=c89 -pedantic all: ploot.o config.h - ${CC} -o ploot ploot.o + ${CC} -static -o ploot ploot.o diff --git a/ploot b/ploot Binary files differ. diff --git a/ploot.c b/ploot.c @@ -56,7 +56,7 @@ title(char *str, int width) { if (str == NULL) return; - printf("%*s\n\n", (int)(width - strlen(str)) / 2 + MARGIN, str); + printf("%*s\n\n", (int)(width + strlen(str) + MARGIN) / 2, str); } /* @@ -145,6 +145,6 @@ main() 1000, 1833, 2452, 432, 1456, 435, 1646, 435, 1345, 554, 5245, 3456, 1456, 3498, 834, 834, 804, 234, 544, 3456, 2984, 983, 2583, 2583 }; - plot(30, val, val + LEN(val), "title"); + plot(30, val, val + LEN(val), "Sample data entered by hand"); return 0; }