Hi Alex, > to add "flags" field to global context structure, and this way > was able to pass "-q" flag from mode-specific to global code of > rrdtool. > This implementation seems ugly, and the right idea, > I suppose, is this: Pass some structure like "request mode" from main() > to all mode-specific code parts. It would allow to pass full status > information back to main().
the idea behind this is, that a normal rrd_xxx function should not output anything. It should just ready the data to be picked up by whoever is going to call this function ... unfortunately the whole 'returning data' business is not done in a consistant manner across rrdtool ... the implementation I like most, is the one for rrd_info. it is quite generic and could be used in oterh functions as well. with this done, rrdtool (the frontend) could be written in a more generic fashion, and could also take options as to what it should do with the output of a command. Syntax could be: rrdtool [frontend-option] function [function parameters] eg rrdtool --silent graph bla.png ... rrdtool --return-key-value graph bla.png ... size-x=303 size-y=388 the way to go about this is to first write some notes about your vision for implementing something, so that you do not create code that does end up in the bit-bucket because it does not fit my vision for rrdtool. cheers tobi -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten http://it.oetiker.ch [EMAIL PROTECTED] ++41 62 213 9902 _______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
