Introduction
Introduction Statistics Contact Development Disclaimer Help
remove debug, fix usage, do not die on invalid value - ploot - simple plotting …
git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65…
Log
Files
Refs
Tags
README
LICENSE
---
commit 3a13739bbf95aa2caa1b36afa5f685fac0f0f824
parent 1a593aa504c78dbc507ed118a004cff811620065
Author: Josuah Demangeon <[email protected]>
Date: Tue, 8 May 2018 15:32:49 +0200
remove debug, fix usage, do not die on invalid value
Diffstat:
M Makefile | 4 ++--
M plootxt.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -7,6 +7,7 @@ PLOOT_OBJ = $(PLOOT_SRC:.c=.o)
PLOOTXT_SRC = plootxt.c util.c
PLOOTXT_OBJ = $(PLOOTXT_SRC:.c=.o)
+
LIB = -lm
all:V ploot plootxt
@@ -22,10 +23,9 @@ install:V ploot plootxt
cp ploot plootxt ${PREFIX}/bin
clean:V
- rm -f *.o ploot
+ rm -f *.o
V: # :V acts like .PHONY:
$(PLOOT_SRC) $(PLOOTXT_SRC): \
arg.h ploot.h util.h font.h font_14x7.h
-
diff --git a/plootxt.c b/plootxt.c
@@ -65,7 +65,7 @@ plot_row(long *out, char *line, double *max, int nrow, int nc…
for (n = 0; (tok = strsep(&line, ",")) != NULL; n++) {
if (n >= ncol)
fputs("too many values\n", stderr), exit(1);
- val = eatof(tok);
+ val = atof(tok);
plot_val(out + n * width, val, max[n], nrow);
}
if (n < ncol)
@@ -192,7 +192,6 @@ fmt_labels(char out[LINE_MAX], int ncol, char *labels[LINE_…
{
int i, n;
- printf("%d\n", width);
for (i = 0; i < ncol; labels++, i++) {
n = LINE_MAX - (width + sizeof("│")) * i;
out += snprintf(out, n, "│%-*s", width - 1, *labels);
@@ -202,7 +201,7 @@ fmt_labels(char out[LINE_MAX], int ncol, char *labels[LINE_…
static void
usage(void)
{
- fprintf(stderr, "usage: [-w width] %s maxval... <csv\n", argv0);
+ fprintf(stderr, "usage: %s [-w width] maxval... <csv\n", argv0);
exit(1);
}
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.