[rrd-users] SV: rrd_graph API change..
Steffen Schumacher
STEFF at tdc.dk
Tue Nov 8 14:54:06 MET 2005
Thnx!
Releaved me of having to do the trial and error my self..
/Steffen
-----Oprindelig meddelelse-----
Fra: Chris Picton [mailto:chrisp at tangent.co.za]
Sendt: 8. november 2005 14:27
Til: Steffen Schumacher
Cc: rrd-users at list.ee.ethz.ch
Emne: Re: [rrd-users] rrd_graph API change..
On Tue, 2005-11-08 at 14:03 +0100, Steffen Schumacher wrote:
> Hi!
>
> I'm trying to build rrdjtool, which is a Java JNI wrapper for
> librrdtool.
> It has function:
> JNIEXPORT jint JNICALL Java_rrd_Rrd_createRrdGraph
> (JNIEnv *env, jobject obj, jobjectArray ar) {
> int n = (*env)->GetArrayLength(env, ar);
> char **tokens = getTokens(env, ar, n);
> char **calcpr;
> int xsize, ysize, i;
> >> int status = rrd_graph(n, tokens, &calcpr, &xsize, &ysize);
I changed this to
double ymin, ymax;
int status = rrd_graph(n, tokens, &calcpr, &xsize, &ysize, NULL,
&ymin, &ymax);
And all seems fine so far
> preserveError();
> if(status != -1) {
> preserveGraphOutput(calcpr, xsize, ysize);
> }
> releaseTokens(tokens, n);
> return status;
> }
>
> Where the rrd_graph(n, tokens, &calcpr, &xsize, &ysize) call was
changed
> to:
> Int rrd_graph(int argc, char **argv, char ***prdata, int *xsize, int
> *ysize, FILE *stream, double *ymin, double *ymax).
> I have no idea when this change was done, and I really only care about
> getting the problem fixed..
>
> So basically FILE *stream, double *ymin, double *ymax was appended i
> think.
>
> My question is: do I have to specify these last few vars or could i
send
> null pointers in stead?
> If not my take in things would be to copy x and ysize vars into
doubles
> and use these for x and ymin. My only problem would then be the FILE.
>
> Anyways if anyone could point me in the direction of a bit more decent
> doc the mere code then that might help too.
>
>
> /Steffen
>
> --
> Unsubscribe
mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive http://lists.ee.ethz.ch/rrd-users
> WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
>
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list