ploot

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

commit fe139dc6e7dddb2211caedff45f9ba2a0ec47723
parent f24b386089412df1f2d658ecefd3471f3bddfda3
Author: Josuah Demangeon <mail@josuah.net>
Date:   Wed,  7 Feb 2018 00:47:33 +0100

fix compilation under Linux

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

diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -Wall -Wextra -Werror -std=c89 -pedantic +CFLAGS = -Wall -Wextra -Werror -std=c89 -pedantic -D_POSIX_C_SOURCE=200809L all:ploot diff --git a/ploot.c b/ploot.c @@ -56,7 +56,7 @@ humanize(char *str, double val) precision = (ABS(val) < 10) ? (3) : (ABS(val) < 100) ? (2) : (1); if (exp == 0) precision++; - snprintf(str, 8, "%+.*f%c", precision, val, label[exp]); + sprintf(str, "%+.*f%c", precision, val, label[exp]); if (val >= 0) str[0] = ' '; } @@ -254,7 +254,7 @@ main(int argc, char **argv) { time_t tbuf[MAX_VAL], *tend; double vbuf[MAX_VAL], *vend; - char c; + int c; while ((c = getopt(argc, argv, "h:t:o:")) != -1) { switch (c) {