Hi Peter, Today Peter Childs wrote:
> > Hello Tobi > > On 5/08/13 6:57 PM, "Tobias Oetiker" <t...@oetiker.ch> wrote: > > >Hi Peter, > > > >Today Peter Childs wrote: > > > >> > >> Gday folks. > >> > >> I have been doing some testing of some options only in /trunk (not > >>1.4.8) and have noticed that some of the applications I am testing that > >>use 'rrdtool graph' are doing things like? > >> > >> AREA:inbits0#B6D14B:'eth0 In ': > >> and > >> AREA:outbits0_neg#A0A0E5:: > >> > >> Looking at http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html I > >>would assume this sytnax is probably incorrect > >> > >> It appears from my testing 1.4.7 / 1.4.8 etc all "eat" these empty > >>options without failing. > >> > >> 1.x/TRUNK appears to generate ERRORS, which cause the graphs to not be > >>generated. > >> > >> My question would be in the interests of backward compatibility is > >>there some 'half-way' point where warnings could be generated rather > >>than errors? > > > >the argument parsing in trunk is all new, and still has some kinks > >to have worked out. I think it would be find to just silently drop > >'empty' arguments. That should take care of this problem ... > > > >what do you think ? > > I think that could be workable. I assume that 'knowing' that someone has > put some rubbish into the syntax is an interesting idea which may prevent > much nashing-of-teeth, but perhaps enabled by a debug or verbose flag (if > such a thing exists). > > I'm not sure how syntax such as > HRULE:foo#999999::dashes > would go with the 'ignore unknown stuff' option.... Currently this works > in 1.4.7/8 but doesn't on 'trunk' there are positional fields, they would obviously not be ignored ... the behaviour should NOT be ignore unknown stuff, but rather treat an empty optional argument as a NOP. cheers tobi > > > >cheers > >tobi > > > > > >> Regards, > >> Peter > >> > >> > >> $ diff -c src/rrd_graph_helper.c.orig src/rrd_graph_helper.c > >> *** src/rrd_graph_helper.c.orig 2013-08-05 14:21:22.126330617 +0930 > >> --- src/rrd_graph_helper.c 2013-08-05 14:50:11.046181137 +0930 > >> *************** > >> *** 1429,1435 **** > >> /* check for unprocessed keyvalue args */ > >> char *s; > >> if ((s=checkUnusedValues(&pa))) { > >> ! rrd_set_error("Unused Arguments in %s: %s",pa.arg_orig,s); > >> freeParsedArguments(&pa); > >> free(s); > >> return; > >> --- 1429,1435 ---- > >> /* check for unprocessed keyvalue args */ > >> char *s; > >> if ((s=checkUnusedValues(&pa))) { > >> ! //rrd_set_error("Unused Arguments in %s: %s",pa.arg_orig,s); > >> freeParsedArguments(&pa); > >> free(s); > >> Return; > >> > >> > >> > >> > >> > > > >-- > >Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland > >http://it.oetiker.ch t...@oetiker.ch ++41 62 775 9902 / sb: -9900 > > -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland http://it.oetiker.ch t...@oetiker.ch ++41 62 775 9902 / sb: -9900 _______________________________________________ rrd-developers mailing list rrd-developers@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers