From 81dadfe5d722bbaf4c2cfb50e2101e1a78bb8fea 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/program@760 a5681a0c-68f1-0310-ab6d-d61299d08faa --- doc/rrdcgi.pod | 6 ++++++ src/rrd_cgi.c | 31 +++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/doc/rrdcgi.pod b/doc/rrdcgi.pod index c8152b4..9860f31 100644 --- a/doc/rrdcgi.pod +++ b/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/src/rrd_cgi.c b/src/rrd_cgi.c index c1684f7..b2195e4 100644 --- a/src/rrd_cgi.c +++ b/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, "