[rrd-developers] Re: Unsigned chars and optind
Tobias Oetiker
oetiker at ee.ethz.ch
Sun May 1 12:25:25 MEST 2005
Hi John,
> 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
>
will be in 1.2.1
>
> 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?
you are right .. will be in 1.2.1
> 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?
1.2.1 will accept float arguments
> Lastly (and maybe a bit OT), I'm wondering if there's any way of
> getting rid of the libart-induced anti-aliasing?
not for the graphics as fahr as I know. The fonts on the other hand could be drawn
non antialiased if freetype was called appropriately ... I will be
glad to accept a patch wich adds an appropriate option to rrdgraph
cheers
tobi
> 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
>
--
______ __ _
/_ __/_ / / (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
/ // _ \/ _ \/ / System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/ http://people.ee.ethz.ch/oetiker +41(0)44-632-5286
--
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