summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9532fe1)
raw | patch | inline | side by side (parent: 9532fe1)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 18 May 2005 19:41:08 +0000 (19:41 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 18 May 2005 19:41:08 +0000 (19:41 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@579 a5681a0c-68f1-0310-ab6d-d61299d08faa
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/rrd.h | patch | blob | history | |
src/rrd_gfx.c | patch | blob | history | |
src/rrd_is_thread_safe.h | patch | blob | history | |
src/rrd_tool.c | patch | blob | history | |
src/rrd_update.c | patch | blob | history | |
src/rrd_version.c | [new file with mode: 0644] | patch | blob |
diff --git a/configure.ac b/configure.ac
index 763cf365b06ffa24b5e3daaa1d40dd39cdbc80d6..f45a85bd7fcf5492d6fe69d7a1d65b002fe9f279 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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])
diff --git a/src/Makefile.am b/src/Makefile.am
index 14dd3bcbfc8b4893d62f3cd1219821254258b04d..9ac851f74320aa2e8ef8ca9d561d5e3c4fe6eb8d 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
rrd_rpncalc.c \
rrd_tune.c \
rrd_update.c \
+ rrd_version.c \
rrd_xport.c \
rrd_nan_inf.c \
art_rgba_svp.c \
diff --git a/src/rrd.h b/src/rrd.h
index 8620608866a24b1f452d18b8d2b422e480132205..8feaeb1abfae4c218373707ab3032738c2e665e1 100644 (file)
--- a/src/rrd.h
+++ b/src/rrd.h
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 **);
diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c
index 56f4a98a439537de5777b358b02d7763ba138a2d..eaee87f6a4b112734b66d700b16f2bd4e8f681af 100644 (file)
--- a/src/rrd_gfx.c
+++ b/src/rrd_gfx.c
" \"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");
index d4b8f5907fe43c8313b0e710ad1e74b96f2af78f..85769ed9416fbff9cabd9ab83d8f90e7a059ba17 100644 (file)
--- a/src/rrd_is_thread_safe.h
+++ b/src/rrd_is_thread_safe.h
#endif
#undef strerror
+
+#if( 2 < __GNUC__ )
#pragma GCC poison strtok asctime ctime gmtime localtime tmpnam strerror
+#endif
#ifdef __cplusplus
}
diff --git a/src/rrd_tool.c b/src/rrd_tool.c
index 036e4def9a73ca5004be57ae45823f0780d87507..810e4b706f106250e99a174d1b2817224a633d7b 100644 (file)
--- a/src/rrd_tool.c
+++ b/src/rrd_tool.c
{
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)
diff --git a/src/rrd_update.c b/src/rrd_update.c
index 6fe55672de8d0e21e365cec8da6817f900026a94..347da822bf9dc569719a52a196fed5e87edb56a0 100644 (file)
--- a/src/rrd_update.c
+++ b/src/rrd_update.c
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"
diff --git a/src/rrd_version.c b/src/rrd_version.c
--- /dev/null
+++ b/src/rrd_version.c
@@ -0,0 +1,17 @@
+/*****************************************************************************
+ * 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;
+}
+
+