summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b1e0d7)
raw | patch | inline | side by side (parent: 9b1e0d7)
author | alex <alex@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 22 Dec 2001 02:49:23 +0000 (02:49 +0000) | ||
committer | alex <alex@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 22 Dec 2001 02:49:23 +0000 (02:49 +0000) |
Also fixed minor bug in vdef_calc().
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@58 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@58 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_graph.c | patch | blob | history |
index 156b1b0a7d93d798ba94a86fd1522b1e63612aa8..27314776c0d3d9e152bd83a4f332c6818e3b341d 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
varname,&strstart
);
if (strstart==0) {
+ im_free(&im);
+ rrd_set_error("Cannot parse '%s' in VDEF '%s'",
+ &argv[i][argstart],
+ im.gdes[im.gdes_c-1].vname);
+ return -1;
+ }
+ if ((im.gdes[im.gdes_c-1].vidx=find_var(&im,varname)) == -1) {
im_free(&im);
rrd_set_error("variable '%s' not known in VDEF '%s'",
varname,
dst->vf.val = DNAN;
dst->vf.when = 0;
} else {
- dst->vf.val = data[steps*src->ds_cnt];
+ dst->vf.val = data[step*src->ds_cnt];
dst->vf.when = src->start + (step+1)*src->step;
}
while (step != steps) {
if (finite(data[step*src->ds_cnt])) {
if (data[step*src->ds_cnt] > dst->vf.val) {
- dst->vf.val = data[steps*src->ds_cnt];
+ dst->vf.val = data[step*src->ds_cnt];
dst->vf.when = src->start + (step+1)*src->step;
}
}
dst->vf.val = DNAN;
dst->vf.when = 0;
} else {
- dst->vf.val = data[steps*src->ds_cnt];
+ dst->vf.val = data[step*src->ds_cnt];
dst->vf.when = src->start + (step+1)*src->step;
}
while (step != steps) {
if (finite(data[step*src->ds_cnt])) {
if (data[step*src->ds_cnt] < dst->vf.val) {
- dst->vf.val = data[steps*src->ds_cnt];
+ dst->vf.val = data[step*src->ds_cnt];
dst->vf.when = src->start + (step+1)*src->step;
}
}