X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_xport.c;h=19c2067a23dc2d654672b6953c2e336e3268551d;hb=705c8b1988cda51a6d8d34215e3fbf3c12a9aa2a;hp=95bf35b67fb431d6fa259df48c9eb72c99730461;hpb=0209ff81818995fcd2e2b7080c0ca504fa14d949;p=rrdtool.git diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 95bf35b..19c2067 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.0.37 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.2.0 Copyright by Tobi Oetiker, 1997-2005 **************************************************************************** * rrd_xport.c export RRD data ****************************************************************************/ @@ -10,7 +10,7 @@ #include "rrd_graph.h" #include "rrd_xport.h" -#ifdef WIN32 +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) #include #include #endif @@ -46,6 +46,7 @@ rrd_xport(int argc, char **argv, int *xsize, time_t start_tmp=0,end_tmp=0; struct rrd_time_value start_tv, end_tv; char *parsetime_error = NULL; + optind = 0; opterr = 0; /* initialize getopt */ rrd_graph_init(&im); @@ -116,7 +117,8 @@ rrd_xport(int argc, char **argv, int *xsize, im.start = start_tmp; im.end = end_tmp; - + im.step = max((long)im.step, (im.end-im.start)/im.xsize); + rrd_graph_script(argc,argv,&im,0); if (rrd_test_error()) { im_free(&im);