[rrd-developers] Unsigned chars and optind

John yffffffff4271ef37 at f4n.org
Sun May 1 00:36:01 MEST 2005


Ran into a couple of issues with rrdtool-1.2.0 on Mac OS X 10.4.0.

First of all, no characters beyond ASCII worked. It turned out to be
due to a (implementation defined) signed char. Saw some posts in the
archives about better Unicode support, but until it's added, I propose
the following obvious patch:

--- rrd_gfx.c.orig      2005-04-30 23:53:30.000000000 +0200
+++ rrd_gfx.c   2005-04-30 23:55:25.000000000 +0200
@@ -395,7 +395,7 @@
     /* handle the tabs ...
        have a witespace glyph inserted, but set its width such that the distance
     of the new right edge is x times tabwidth from 0,0 where x is an integer. */    
-    char letter = text[n];
+    unsigned char letter = text[n];
     gottab = 0;
     if (letter == '\\' && n+1 < string->count && text[n+1] == 't'){
             /* we have a tab here so skip the backslash and


Secondly, the RRDs perl interface only works once per execution. I
haven't had time to fully investigate yet, but it's due to RRDs.xs and
rrd_graph.c ending up refering to different optind:s, hence RRDs.xs is
unable to reset the "real" one.

Is there any reason not to let rrd_graph() handle the reset of optind
itself? Shouldn't the caller simply modify the argv it passes if it
wanted rrd_graph to skip some arguments?



I also read a post in the archives about floating point arguments to
LINEx (rrd_graph_helper.c). What is prefered, strtod() or some changes
to the sscanf() (say, checking the return value along with removing c1 and
c2 and instead checking line[*eaten+...] == ':')? Or are there reasons
to keep it LINE1, LINE2 or LINE3 only?

Lastly (and maybe a bit OT), I'm wondering if there's any way of
getting rid of the libart-induced anti-aliasing? A LINEx-patch would
make the lines a bit better (still, I think it's a waste of
resolution, particularly for small images), but I simply cannot stand,
nor read, anti-aliased ~9 pt text.


I'm a big fan of rrdtool, so I hope it will be possible to work out
the issues above. Keep up the good work!

--
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://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list