[rrd-developers] Re: Problem with current version of rrd_rpncalc.c

Alex van den Bogaerdt alex at ergens.op.HET.NET
Sat Jul 13 22:04:05 MEST 2002


Tobias Oetiker wrote:

> damn ... I should rely compile after makeing these changes ...
> while looking at the rrd_rpncalc code I
> found a further instance of of DEF_NAM_FMT not being used fixed it
> as well and added an inclusion of rrd_graph.h to the top of the
> file

I'm not sure if the current change is the proper one either.  Jake has
has gone into much trouble to leave rrd_graph.h out of rrd_rpncalc.c
(or so it seems to me).

I wonder if we shouldn't have much more, smaller, include files.  Dito
for the various functions.

As an example:

Stuff that deals with parsing DEFs should worry about DEF_NAM_FMT,
the rest shouldn't. Why not create rrd_graph_def.c and rrd_graph_def.h,
and include rrd_graph_def.h from any place that needs it.  The functions
dealing with vnames then all behave the same, which is of course what we
want.  To start with, DEF_NAM_FMT could be in its own file (just two
lines, together with MAX_VNAME_LEN) which can be included from both
rrd_graph.h and rrd_rpncalc.h

IMHO when done consistently this will eventually result in a better
program.

I know you feel there shouldn't be many files but I urge you to
reconsider, maybe even have a separate directory for rrd_graph and
have all the stuff in there.  It will take a while to find the new
place of a function (which is what you worried about last time we
discussed this) but that should only be temporary.

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list