From c48c4d29e11a7177a2444b08973aa3470e77f423 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 26 Nov 2023 17:28:58 +0100 Subject: [PATCH] ttyplot.c|README.md: Separate -h and -v from the rest in usage --- README.md | 4 +++- ttyplot.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea6e31e..7087939 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,9 @@ ttyplot also supports *counter* style metrics, calculating *rate* by measured ti ## flags ``` - ttyplot [-h] [-v] [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit] + ttyplot [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit] + ttyplot -h + ttyplot -v -2 read two values and draw two plots, the second one is in reverse video -r rate of a counter (divide value by measured sample interval) diff --git a/ttyplot.c b/ttyplot.c index f4b81f5..63855ed 100644 --- a/ttyplot.c +++ b/ttyplot.c @@ -76,7 +76,11 @@ int width=0, height=0, n=-1, r=0, v=0, c=0, rate=0, two=0, plotwidth=0, plotheig const char *verstring = "https://github.com/tenox7/ttyplot " VERSION_STR; void usage(void) { - printf("Usage:\n ttyplot [-h] [-v] [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit]\n\n" + printf("Usage:\n" + " ttyplot [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit]\n" + " ttyplot -h\n" + " ttyplot -v\n" + "\n" " -2 read two values and draw two plots, the second one is in reverse video\n" " -r rate of a counter (divide value by measured sample interval)\n" " -c character to use for plot line, eg @ # %% . etc\n"