From: Uwe Hermann Date: Sun, 9 May 2010 18:27:11 +0000 (+0200) Subject: Gnuplot: Nicer output formatting. X-Git-Tag: libsigrok-0.1.0~507 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=114fb93f67f8748352ad4f851afeab31df2f0385;p=libsigrok.git Gnuplot: Nicer output formatting. --- diff --git a/output/output_gnuplot.c b/output/output_gnuplot.c index e379ef29..2c062397 100644 --- a/output/output_gnuplot.c +++ b/output/output_gnuplot.c @@ -36,8 +36,11 @@ const char *gnuplot_header = "\ #\n\ # Generated by: %s on %s%s\ # Timescale: %d %s\n\ -# Column/probe assignment:\n\ -# Column 0: Sample counter (for internal gnuplot purposes)\n%s\n"; +#\n\ +# Column\tProbe\n\ +# -------------------------------------\ +----------------------------------------\n\ +# 0\t\tSample counter (for internal gnuplot purposes)\n%s\n"; const char *gnuplot_header_comment = "\ # Comment: Acquisition with %d/%d probes at %s\n"; @@ -99,7 +102,7 @@ static int init(struct output *o) wbuf[0] = '\0'; for (i = 0; i < ctx->num_enabled_probes; i++) { c = (char *)&wbuf + strlen((char *)&wbuf); - sprintf(c, "# Column %d: %s\n", i + 1, ctx->probelist[i]); + sprintf(c, "# %d\t\t%s\n", i + 1, ctx->probelist[i]); } /* TODO: date: File or signals? Make y/n configurable. */