summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 89b0da2)
raw | patch | inline | side by side (parent: 89b0da2)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 13 Jun 2005 05:43:44 +0000 (05:43 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 13 Jun 2005 05:43:44 +0000 (05:43 +0000) |
program/doc/rrdgraph_data.pod | patch | blob | history | |
program/src/rrd_graph_helper.c | patch | blob | history |
index dba53f3720a4a302b2cc8651545eed3a993bbd89..c3891d467bbbb240be5f2a5bb03363e99ea980b6 100644 (file)
own manual page.
Variable names (I<vname>) must be made up strings of the following characters
-C<A-Z, a-z, 0-9, -,_>, starting with a letter and a maximum length of 255 characters.
+C<A-Z, a-z, 0-9, -,_> and a maximum length of 255 characters.
=head1 DEF
index 2e807419315d39f60767a779b5b4eda27e756569..6babc574c60521930c44e307d1a0a6a68620846f 100644 (file)
@@ -330,16 +330,28 @@ rrd_parse_PVHLAST(char *line, unsigned int *eaten, graph_desc_t *gdp, image_desc
tmpstr[j]='\0';
}
+ /* Number or vname ?
+ * It is a number only if "k" equals either "j" or "i",
+ * depending on which is appropriate
+ */
dprintf("- examining value '%s'\n",tmpstr);
k=0;
if (gdp->gf == GF_VRULE) {
sscanf(tmpstr,"%li%n",&gdp->xrule,&k);
- if (k) dprintf("- found time: %li\n",gdp->xrule);
+ if (((j!=0)&&(k==j))||((j==0)&&(k==i))) {
+ dprintf("- found time: %li\n",gdp->xrule);
+ } else {
+ gdp->xrule=0; /* reset the value to "none" */
+ }
} else {
sscanf(tmpstr,"%lf%n",&gdp->yrule,&k);
- if (k) dprintf("- found number: %f\n",gdp->yrule);
+ if (((j!=0)&&(k==j))||((j==0)&&(k==i))) {
+ dprintf("- found number: %f\n",gdp->yrule);
+ } else {
+ gdp->yrule=DNAN; /* reset the value to "none" */
+ }
}
- if (!k) {
+ if (((j!=0)&&(k!=j))||((j==0)&&(k!=i))) {
if ((gdp->vidx=find_var(im,tmpstr))<0) {
rrd_set_error("Not a valid vname: %s in line %s",tmpstr,line);
return 1;