From 39f0ddfae890a4a3407e02f5d839f9b59bb7adab Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 6 Feb 2006 19:49:23 +0000 Subject: [PATCH] new rrdcgi function RRD::INTERNAL for accessing VERSION, COPYRIGHT, COMPILETIME, OS -- Guenter Knauf gk gknw.de git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@760 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/doc/rrdcgi.pod | 6 ++++++ program/src/rrd_cgi.c | 31 +++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/program/doc/rrdcgi.pod b/program/doc/rrdcgi.pod index c8152b4e..9860f311 100644 --- a/program/doc/rrdcgi.pod +++ b/program/doc/rrdcgi.pod @@ -138,6 +138,12 @@ If the preceding B tag contained and B arguments, then you can access their output with this tag. The I argument refers to the number of the B argument. This first B has I 0. +=item RRD::INTERNAL + +This tag gets replaced by an internal var. Currently these vars are known: +VERSION, COPYRIGHT, COMPILETIME, OS. +These vars represent the compiled-in values. + =back =head1 EXAMPLE 1 diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c index c1684f7b..b2195e42 100644 --- a/program/src/rrd_cgi.c +++ b/program/src/rrd_cgi.c @@ -61,6 +61,9 @@ char* includefile(long, const char **); /* for how long is the output of the cgi valid ? */ char* rrdgoodfor(long, const char **); +/* return rrdcgi version string */ +char* rrdgetinternal(long, const char **); + char* rrdstrip(char *buf); char* scanargs(char *line, int *argc, char ***args); @@ -284,6 +287,7 @@ rrd_expand_vars(char* buffer) parse(&buffer, i, "