Code

prepare for the release of rrdtool-1.2.22
[rrdtool.git] / src / rrdupdate.c
1 /*****************************************************************************
2  * RRDtool 1.2.22  Copyright by Tobi Oetiker, 1997-2007
3  *****************************************************************************
4  * rrdupdate.c  Main program for the (standalone) rrdupdate utility
5  *****************************************************************************
6  * $Id$
7  *****************************************************************************/
9 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H)
10 #include "../win32/config.h"
11 #else
12 #ifdef HAVE_CONFIG_H
13 #include "../rrd_config.h"
14 #endif
15 #endif
17 #include "rrd.h"
19 int 
20 main(int argc, char **argv){
21         rrd_update(argc,argv);
22         if (rrd_test_error()) {
23                 printf("RRDtool " PACKAGE_VERSION "  Copyright by Tobi Oetiker, 1997-2007\n\n"
24                         "Usage: rrdupdate filename\n"
25                         "\t\t\t[--template|-t ds-name:ds-name:...]\n"
26                         "\t\t\ttime|N:value[:value...]\n\n"
27                         "\t\t\tat-time@value[:value...]\n\n"
28                         "\t\t\t[ time:value[:value...] ..]\n\n");
29                                    
30                 printf("ERROR: %s\n",rrd_get_error());
31                 rrd_clear_error();                                                            
32                 return 1;
33         }
34         return 0;
35 }