From ae6c02b0c82a9bf1621e1c073f0a3fbcb48db463 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sat, 4 Jul 2009 22:03:12 -0600 Subject: [PATCH] Improve docs and parsing of graph args further. --- doc/variables.xml | 10 ++++++---- src/specials.c | 6 ++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/variables.xml b/doc/variables.xml index 47e7924..1f8d2e0 100644 --- a/doc/variables.xml +++ b/doc/variables.xml @@ -934,7 +934,7 @@ default_graph_size config setting. Takes the switch '-t' to use a temperature gradient, which makes the gradient values change depending on the amplitude of a particular graph - value (try it and see). + value (try it and see). If -t or -l is your first argument, you may need to preceed it by a space (' '). @@ -978,7 +978,7 @@ Same as execgraph, but takes an interval arg and - graphs values. + graphs values. If -t or -l is your first argument, you may need to preceed it by a space (' '). @@ -1716,8 +1716,10 @@ + - (1,2,3)> System load average, 1 is for past 1 + System load average, 1 is for past 1 minute, 2 for past 5 minutes and 3 for past 15 minutes. @@ -1726,7 +1728,7 @@ - Load1 average graph, similar to xload, with diff --git a/src/specials.c b/src/specials.c index f5af204..f8007d7 100644 --- a/src/specials.c +++ b/src/specials.c @@ -119,14 +119,12 @@ char *scan_graph(const char *args, int *w, int *h, *tempgrad = FALSE; *showaslog = FALSE; if (args) { - if (strstr(args, " "TEMPGRAD)) { + if (strstr(args, " "TEMPGRAD) || strncmp(args, TEMPGRAD, strlen(TEMPGRAD)) == 0) { *tempgrad = TRUE; } - if (strstr(args, " "LOGGRAPH)) { + if (strstr(args, " "LOGGRAPH) || strncmp(args, LOGGRAPH, strlen(LOGGRAPH)) == 0) { *showaslog = TRUE; } - DBGP("printing graph as %s, other args are: %s", (*showaslog ? "log" : "normal"), args); - //check the rest of the args if (sscanf(args, "%d,%d %x %x %u", h, w, first_colour, last_colour, scale) == 5) { return NULL; } -- 1.7.9.5