From 9ecf6970815ff1c7281f63fec6c3209ab9e34093 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 15 Nov 2009 10:51:10 +0000 Subject: [PATCH] Switch LC_NUMERIC to C prior to creating rrd_xport output. This makes sure that numbers are always output with a . and not with a , git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1968 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_tool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rrd_tool.c b/src/rrd_tool.c index cd27b5f..a733e55 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -718,6 +718,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", @@ -770,8 +771,10 @@ 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) { char **calcpr; -- 2.30.2