X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_tool.c;h=d2a562df5bbd41495ad438fbbbf18df2b1eae3c7;hb=d92fa11949eb31c2ac038286fde8fab63bffd9c0;hp=7464b3cd7f7789c97cea01976b31ccd555c5e59b;hpb=7412ab0c1230f2609313913793f9e6c0a93b28b1;p=rrdtool.git diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 7464b3c..d2a562d 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3.2 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.4.2 Copyright by Tobi Oetiker, 1997-2009 ***************************************************************************** * rrd_tool.c Startup wrapper *****************************************************************************/ @@ -18,9 +18,8 @@ #include "rrd_xport.h" #include "rrd_i18n.h" -#ifdef HAVE_LOCALE_H #include -#endif + void PrintUsage( char *cmd); @@ -48,7 +47,7 @@ void PrintUsage( const char *help_main = N_("RRDtool %s" - " Copyright 1997-2008 by Tobias Oetiker \n" + " Copyright 1997-2009 by Tobias Oetiker \n" " Compiled %s %s\n\n" "Usage: rrdtool [options] command command_options\n\n"); @@ -408,11 +407,10 @@ int main( #ifdef MUST_DISABLE_FPMASK fpsetmask(0); #endif -#ifdef HAVE_LOCALE_H + /* initialize locale settings according to localeconv(3) */ setlocale(LC_ALL, ""); -#endif #if defined(HAVE_LIBINTL_H) && defined(BUILD_LIBINTL) bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); @@ -714,6 +712,7 @@ int HandleInputLine( if (rrd_xport (argc - 1, &argv[1], &xxsize, &start, &end, &step, &col_cnt, &legend_v, &data) != -1) { + char *old_locale = setlocale(LC_NUMERIC, "C"); row_cnt = (end - start) / step; ptr = data; printf("\n\n", @@ -766,6 +765,7 @@ int HandleInputLine( free(data); printf(" \n", DATA_TAG); printf("\n", ROOT_TAG); + setlocale(LC_NUMERIC, old_locale); } free(vtag); } else if (strcmp("graph", argv[1]) == 0) {