/*****************************************************************************
- * RRDtool 1.2rc7 Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005
*****************************************************************************
* rrd_update.c RRD Update Function
*****************************************************************************
#include "rrd_rpncalc.h"
#include "rrd_is_thread_safe.h"
+#include "unused.h"
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
/*
#ifdef HAVE_MMAP
info_t *write_RRA_row (rrd_t *rrd, unsigned long rra_idx,
unsigned long *rra_current,
- unsigned short CDP_scratch_idx, FILE *rrd_file,
+ unsigned short CDP_scratch_idx,
+#ifndef DEBUG
+FILE UNUSED(*rrd_file),
+#else
+FILE *rrd_file,
+#endif
info_t *pcdp_summary, time_t *rra_time, void *rrd_mmaped_file);
#else
info_t *write_RRA_row (rrd_t *rrd, unsigned long rra_idx,
main(int argc, char **argv){
rrd_update(argc,argv);
if (rrd_test_error()) {
- printf("RRDtool 1.2rc7 Copyright by Tobi Oetiker, 1997-2005\n\n"
+ printf("RRDtool 1.2.6 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"
char *template = NULL;
info_t *result = NULL;
infoval rc;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1) {
static struct option long_options[] =
{
char *template = NULL;
int rc;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1) {
static struct option long_options[] =
* critical except during the burning cycles. */
if (schedule_smooth)
{
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
rrd_file = fopen(filename,"rb+");
-#else
- rrd_file = fopen(filename,"r+");
-#endif
rra_start = rra_begin;
for (i = 0; i < rrd.stat_head -> rra_cnt; ++i)
{
#ifdef HAVE_MMAP
info_t
*write_RRA_row (rrd_t *rrd, unsigned long rra_idx, unsigned long *rra_current,
- unsigned short CDP_scratch_idx, FILE *rrd_file,
+ unsigned short CDP_scratch_idx,
+#ifndef DEBUG
+FILE UNUSED(*rrd_file),
+#else
+FILE *rrd_file,
+#endif
info_t *pcdp_summary, time_t *rra_time, void *rrd_mmaped_file)
#else
info_t