dnl Inspiration from http://autoconf-archive.cryp.to
dnl tell automake the this script is for rrdtool
+dnl the official version number is
+dnl a.b.c
AC_INIT([rrdtool],[1.2.8])
+dnl for testing a numberical version number comes handy
+dnl the released version are
+dnl a.bccc
+dnl the devl versions will be something like
+dnl a.b999yymmddhh
+NUMVERS=1.2008
+AC_SUBST(NUMVERS)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
rrd_rpncalc.c \
rrd_tune.c \
rrd_update.c \
+ rrd_version.c \
rrd_xport.c \
rrd_nan_inf.c \
art_rgba_svp.c \
time_t rrd_last(int, char **);
time_t rrd_first(int, char **);
int rrd_resize(int, char **);
+unsigned long rrd_version(int, char **);
int rrd_xport(int, char **, int *, time_t *, time_t *,
unsigned long *, unsigned long *,
char ***, rrd_value_t **);
" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n"
"<!--\n"
" SVG file created by\n"
-" RRDtool 1.2.8 Tobias Oetiker, http://tobi.oetiker.ch\n"
+" RRDtool " PACKAGE_VERSION " Tobias Oetiker, http://tobi.oetiker.ch\n"
"\n"
" The width/height attributes in the outhermost svg node\n"
" are just default sizes for the browser which is used\n"
gfx_node_t *node;
fputs(
"%!PS-Adobe-3.0 EPSF-3.0\n"
- "%%Creator: RRDtool 1.2.8 Tobias Oetiker, http://tobi.oetiker.ch\n"
+ "%%Creator: RRDtool " PACKAGE_VERSION " Tobias Oetiker, http://tobi.oetiker.ch\n"
/* can't like weird chars here */
"%%Title: (RRDtool output)\n"
"%%DocumentData: Clean7Bit\n"
static void pdf_setup_document(pdf_state *state)
{
- const char *creator = "RRDtool 1.2.8 Tobias Oetiker, http://tobi.oetiker.ch";
+ const char *creator = "RRDtool " PACKAGE_VERSION " Tobias Oetiker, http://tobi.oetiker.ch";
/* all objects created by now, so init code can reference them */
/* HEADER */
pdf_puts(&state->pdf_header, "%PDF-1.3\n");
#endif
#undef strerror
+
+#if( 2 < __GNUC__ )
#pragma GCC poison strtok asctime ctime gmtime localtime tmpnam strerror
+#endif
#ifdef __cplusplus
}
{
char help_main[] =
- "RRDtool 1.2.8 Copyright 1997-2005 by Tobias Oetiker <tobi@oetiker.ch>\n"
+ "RRDtool " PACKAGE_VERSION " Copyright 1997-2005 by Tobias Oetiker <tobi@oetiker.ch>\n"
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
" Compiled " __DATE__ " " __TIME__ "\n\n"
#else
"\t\ttime|N:value[:value...]\n\n"
"\t\tat-time@value[:value...]\n\n"
"\t\t[ time:value[:value...] ..]\n\n";
-
+
char help_fetch[] =
"* fetch - fetch data out of an RRD\n\n"
"\trrdtool fetch filename.rrd CF\n"
strcmp("v", argv[1]) == 0 ||
strcmp("-v", argv[1]) == 0 ||
strcmp("-version", argv[1]) == 0 )
- printf("RRDtool 1.2.8 Copyright by Tobi Oetiker, 1997-2005\n");
+ printf("RRDtool " PACKAGE_VERSION " Copyright by Tobi Oetiker, 1997-2005 (v.%lu)\n",
+ rrd_version(0, NULL));
else if (strcmp("restore", argv[1]) == 0)
rrd_restore(argc-1, &argv[1]);
else if (strcmp("resize", argv[1]) == 0)
main(int argc, char **argv){
rrd_update(argc,argv);
if (rrd_test_error()) {
- printf("RRDtool 1.2.8 Copyright by Tobi Oetiker, 1997-2005\n\n"
+ printf("RRDtool " PACKAGE_VERSION " Copyright by Tobi Oetiker, 1997-2005\n\n"
"Usage: rrdupdate filename\n"
"\t\t\t[--template|-t ds-name:ds-name:...]\n"
"\t\t\ttime|N:value[:value...]\n\n"
--- /dev/null
+/*****************************************************************************
+ * RRDtool 1.2.8 Copyright by Tobi Oetiker, 1997-2005
+ *****************************************************************************
+ * rrd_version Return
+ *****************************************************************************
+ * Initial version by Burton Strauss, ntopSupport.com - 5/2005
+ *****************************************************************************/
+
+#include "rrd_tool.h"
+
+double
+rrd_version(void)
+{
+ return NUMVERS;
+}
+
+