Code

vdef calc was using end_orig to determine for which range it should do its
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 28 Sep 2008 15:01:43 +0000 (15:01 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 28 Sep 2008 15:01:43 +0000 (15:01 +0000)
calculations which is odd, since orig is only the requested range as
invocation time and not the data range deliverd by fetch. It does fall
completely flat when shifting since shifting does not affect the original
data. Bug #177 reported by hokiel

git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@1530 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_graph.c
program/src/rrd_tool.c

index 5acb1d7e42a61f6807fb389aed0660043d53b65f..5efbff21951833b01c55ecf56f0e6c12db81965e 100644 (file)
@@ -4463,21 +4463,16 @@ int vdef_calc(
     graph_desc_t *src, *dst;
     rrd_value_t *data;
     long      step, steps;
-    unsigned long end;
 
     dst = &im->gdes[gdi];
     src = &im->gdes[dst->vidx];
     data = src->data + src->ds;
-    end =
-        src->end_orig % (long) src->step ==
-        0 ? src->end_orig : (src->end_orig + (long) src->step -
-                             src->end_orig % (long) src->step);
 
-    steps = (end - src->start) / src->step;
+    steps = (src->end - src->start) / src->step;
 #if 0
     printf
         ("DEBUG: start == %lu, end == %lu, %lu steps\n",
-         src->start, src->end_orig, steps);
+         src->start, src->end, steps);
 #endif
     switch (dst->vf.op) {
     case VDEF_PERCENT:{
index 239a8fc7ebcb5370d1c7c09074f9624a1be3cb1d..33e0b0e100aeb41cf0ef9e728ae34f1b9a1c3f95 100644 (file)
@@ -132,7 +132,7 @@ void PrintUsage(
            "\t\t[-h|--height pixels] [-o|--logarithmic]\n"
            "\t\t[-u|--upper-limit value] [-z|--lazy]\n"
            "\t\t[-l|--lower-limit value] [-r|--rigid]\n"
-           "\t\t[-g|--no-legend]\n"
+           "\t\t[-g|--no-legend] [--full-size-mode]\n"
            "\t\t[-F|--force-rules-legend]\n" "\t\t[-j|--only-graph]\n");
     const char *help_graph2 =
         N_("\t\t[-n|--font FONTTAG:size:font]\n"