X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_dump.c;h=ccc5349f1c5092e097d4ab8dfd3abb0cb471c6e6;hp=a206230a1b6a5fdda28eacae4f63ed8bb1d50e6c;hb=ce692d2da65c1370c7fe64276f492a553f6d3da3;hpb=fadae458b4eba6719432bf7e3f7680d7f1fae7c0 diff --git a/src/rrd_dump.c b/src/rrd_dump.c index a206230..ccc5349 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3.2 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 ***************************************************************************** * rrd_dump Display a RRD ***************************************************************************** @@ -45,9 +45,7 @@ #include "rrd_rpncalc.h" #include "rrd_client.h" -#ifdef HAVE_LOCALE_H #include -#endif #if !(defined(NETWARE) || defined(WIN32)) extern char *tzname[2]; @@ -59,6 +57,10 @@ size_t rrd_dump_opt_cb_fileout( size_t len, void *user); +int rrd_dump_opt_r( + const char *filename, + char *outname, + int opt_noheader); int rrd_dump_cb_r( const char *filename, @@ -101,9 +103,8 @@ int rrd_dump_cb_r( return (-1); } -#ifdef HAVE_SETLOCALE old_locale = setlocale(LC_NUMERIC, "C"); -#endif + if (opt_header == 1) { CB_PUTS("\n"); @@ -138,7 +139,7 @@ int rrd_dump_cb_r( # error "Need strftime" #endif CB_FMTS("\t%lld \n\n", - (long long) rrd.live_head->last_up, somestring); + (long long int) rrd.live_head->last_up, somestring); for (i = 0; i < rrd.stat_head->ds_cnt; i++) { CB_PUTS("\t\n"); @@ -429,7 +430,7 @@ int rrd_dump_cb_r( #else # error "Need strftime" #endif - CB_FMTS("\t\t\t ", somestring, (long long) now); + CB_FMTS("\t\t\t ", somestring, (long long int) now); for (iii = 0; iii < rrd.stat_head->ds_cnt; iii++) { rrd_read(rrd_file, &my_cdp, sizeof(rrd_value_t) * 1); if (isnan(my_cdp)) { @@ -447,9 +448,7 @@ int rrd_dump_cb_r( rrd_free(&rrd); -#ifdef HAVE_SETLOCALE setlocale(LC_NUMERIC, old_locale); -#endif return rrd_close(rrd_file);