X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_xport.c;h=21110b84705e66a4efa209287bfae31985a2a69c;hb=7d0d6b07c9f5bd5dfd99aa7fe9826eebf2181f1f;hp=10c020f0d09736d9e2009f2860e0a8dd36b6d33d;hpb=2a6a270edfda89b04722b42b57992907f871c671;p=rrdtool.git diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 10c020f..21110b8 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -51,13 +51,21 @@ int rrd_xport( * will be changed to represent reality */ unsigned long *col_cnt, /* number of data columns in the result */ char ***legend_v, /* legend entries */ - rrd_value_t ** data) + rrd_value_t **data) { /* two dimensional array containing the data */ image_desc_t im; time_t start_tmp = 0, end_tmp = 0; struct rrd_time_value start_tv, end_tv; char *parsetime_error = NULL; + struct option long_options[] = { + {"start", required_argument, 0, 's'}, + {"end", required_argument, 0, 'e'}, + {"maxrows", required_argument, 0, 'm'}, + {"step", required_argument, 0, 261}, + {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */ + {0, 0, 0, 0} + }; optind = 0; opterr = 0; /* initialize getopt */ @@ -68,14 +76,6 @@ int rrd_xport( parsetime("now", &end_tv); while (1) { - static struct option long_options[] = { - {"start", required_argument, 0, 's'}, - {"end", required_argument, 0, 'e'}, - {"maxrows", required_argument, 0, 'm'}, - {"step", required_argument, 0, 261}, - {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */ - {0, 0, 0, 0} - }; int option_index = 0; int opt; @@ -159,7 +159,7 @@ int rrd_xport( int rrd_xport_fn( - image_desc_t * im, + image_desc_t *im, time_t *start, time_t *end, /* which time frame do you want ? * will be changed to represent reality */ @@ -167,7 +167,7 @@ int rrd_xport_fn( * will be changed to represent reality */ unsigned long *col_cnt, /* number of data columns in the result */ char ***legend_v, /* legend entries */ - rrd_value_t ** data) + rrd_value_t **data) { /* two dimensional array containing the data */ int i = 0, j = 0;