X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_dump.c;h=967e9a19db303462a13f555b3696a98a0415a132;hb=fbe390e15d3484315efe5802577249c8959e3556;hp=9968f2bf6a9fe5afca23f743cbbaa563735e6b21;hpb=518e0d7465fe8061b759c7af470c36ac8dfa2856;p=rrdtool.git
diff --git a/src/rrd_dump.c b/src/rrd_dump.c
index 9968f2b..967e9a1 100644
--- a/src/rrd_dump.c
+++ b/src/rrd_dump.c
@@ -1,5 +1,5 @@
/*****************************************************************************
- * RRDtool 1.2.13 Copyright by Tobi Oetiker, 1997-2006
+ * RRDtool 1.2.21 Copyright by Tobi Oetiker, 1997-2007
*****************************************************************************
* rrd_dump Display a RRD
*****************************************************************************
@@ -44,7 +44,7 @@
#include "rrd_tool.h"
#include "rrd_rpncalc.h"
-#ifndef NETWARE
+#if !(defined(NETWARE) || defined(WIN32))
extern char *tzname[2];
#endif
@@ -115,39 +115,39 @@ rrd_dump_r(const char *filename, char *outname)
fprintf(out_file, "\t %ld \n\n",
rrd.live_head->last_up,somestring);
for(i=0;ids_cnt;i++){
- fprintf(out_file, "\t\n");
- fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].ds_nam);
- fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].dst);
- if (dst_conv(rrd.ds_def[i].dst) != DST_CDEF) {
- fprintf(out_file, "\t\t %lu \n",rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt);
- if (isnan(rrd.ds_def[i].par[DS_min_val].u_val)){
- fprintf(out_file, "\t\t NaN \n");
- } else {
- fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_min_val].u_val);
- }
- if (isnan(rrd.ds_def[i].par[DS_max_val].u_val)){
- fprintf(out_file, "\t\t NaN \n");
- } else {
- fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_max_val].u_val);
- }
- } else { /* DST_CDEF */
- char *str;
- rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]),rrd.ds_def,&str);
- fprintf(out_file, "\t\t %s \n", str);
- free(str);
- }
- fprintf(out_file, "\n\t\t\n");
- fprintf(out_file, "\t\t %s \n",rrd.pdp_prep[i].last_ds);
- if (isnan(rrd.pdp_prep[i].scratch[PDP_val].u_val)){
- fprintf(out_file, "\t\t NaN \n");
- } else {
- fprintf(out_file, "\t\t %0.10e \n",rrd.pdp_prep[i].scratch[PDP_val].u_val);
- }
- fprintf(out_file, "\t\t %lu \n",
- rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt);
+ fprintf(out_file, "\t\n");
+ fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].ds_nam);
+ fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].dst);
+ if (dst_conv(rrd.ds_def[i].dst) != DST_CDEF) {
+ fprintf(out_file, "\t\t %lu \n",rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt);
+ if (isnan(rrd.ds_def[i].par[DS_min_val].u_val)){
+ fprintf(out_file, "\t\t NaN \n");
+ } else {
+ fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_min_val].u_val);
+ }
+ if (isnan(rrd.ds_def[i].par[DS_max_val].u_val)){
+ fprintf(out_file, "\t\t NaN \n");
+ } else {
+ fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_max_val].u_val);
+ }
+ } else { /* DST_CDEF */
+ char *str=NULL;
+ rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]),rrd.ds_def,&str);
+ fprintf(out_file, "\t\t %s \n", str);
+ free(str);
+ }
+ fprintf(out_file, "\n\t\t\n");
+ fprintf(out_file, "\t\t %s \n",rrd.pdp_prep[i].last_ds);
+ if (isnan(rrd.pdp_prep[i].scratch[PDP_val].u_val)){
+ fprintf(out_file, "\t\t NaN \n");
+ } else {
+ fprintf(out_file, "\t\t %0.10e \n",rrd.pdp_prep[i].scratch[PDP_val].u_val);
+ }
+ fprintf(out_file, "\t\t %lu \n",
+ rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt);
- fprintf(out_file, "\t\n\n");
- }
+ fprintf(out_file, "\t\n\n");
+ }
fputs("", out_file);