summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7bff043)
raw | patch | inline | side by side (parent: 7bff043)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 1 Aug 2006 13:08:33 +0000 (13:08 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 1 Aug 2006 13:08:33 +0000 (13:08 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@863 a5681a0c-68f1-0310-ab6d-d61299d08faa
doc/rrdxport.pod | patch | blob | history | |
src/rrd_tool.c | patch | blob | history | |
src/rrd_xport.c | patch | blob | history |
diff --git a/doc/rrdxport.pod b/doc/rrdxport.pod
index f5738154b937e17e7e29eb7f84389da6e47ab05e..a668a20f33434ecaddf514a75e37a80c7e32c07a 100644 (file)
--- a/doc/rrdxport.pod
+++ b/doc/rrdxport.pod
<v0>val</v0><v1>val</v1>
-=item B<--unknwonaszero>
-
-Turn UNKNWON into '0' on output.
-
=item B<DEF:>I<vname>B<=>I<rrd>B<:>I<ds-name>B<:>I<CF>
See I<rrdgraph> documentation.
diff --git a/src/rrd_tool.c b/src/rrd_tool.c
index a331df7c57ca043f3492f68de3760813d58d1102..cf29cd983d4c7d5df2333880f87cffd83fde666c 100644 (file)
--- a/src/rrd_tool.c
+++ b/src/rrd_tool.c
"\t\t[-m|--maxrows rows]\n"
"\t\t[--step seconds]\n"
"\t\t[--enumds]\n"
- "\t\t[--unknownaszero]\n"
"\t\t[DEF:vname=rrd:ds-name:CF]\n"
"\t\t[CDEF:vname=rpn-expression]\n"
"\t\t[XPORT:vname:legend]\n\n";
rrd_value_t *data,*ptr;
char **legend_v;
int enumds = 0;
- int unknownaszero = 0;
int i;
char *vtag = NULL;
vtag = malloc( strlen(COL_DATA_TAG)+10);
for ( i = 2; i < argc; i++){
if (strcmp("--enumds", argv[i]) == 0)
enumds = 1;
- if (strcmp("--unknownaszero", argv[i]) == 0)
- unknownaszero = 1;
}
if(rrd_xport(argc-1, &argv[1], &xxsize,&start,&end,&step,&col_cnt,&legend_v,&data) != -1) {
rrd_value_t newval = DNAN;
newval = *ptr;
if(isnan(newval)){
- if (unknownaszero == 1)
- printf("<%s>0</%s>", vtag,vtag);
- else
- printf("<%s>NaN</%s>", vtag,vtag);
+ printf("<%s>NaN</%s>", vtag,vtag);
} else {
printf("<%s>%0.10e</%s>", vtag, newval, vtag);
};
diff --git a/src/rrd_xport.c b/src/rrd_xport.c
index f427762f60f3eb1b6270f10a5ba94c1b9424924d..4fc0071a59e045f2e03c314a4583a149533e12f4 100644 (file)
--- a/src/rrd_xport.c
+++ b/src/rrd_xport.c
{"maxrows", required_argument, 0, 'm'},
{"step", required_argument, 0, 261},
{"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */
- {"unknownaszero", no_argument, 0, 263}, /* just ignore them here */
{0,0,0,0}
};
int option_index = 0;
im.step = atoi(optarg);
break;
case 262:
- case 263:
break;
case 's':
if ((parsetime_error = parsetime(optarg, &start_tv))) {