projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update timestamp continuity checks in rrd_cached ... allow sub-second precision
[rrdtool.git]
/
src
/
rrd_tool.c
diff --git
a/src/rrd_tool.c
b/src/rrd_tool.c
index
45296c8
..
bb1bc3e
100644
(file)
--- a/
src/rrd_tool.c
+++ b/
src/rrd_tool.c
@@
-695,6
+695,7
@@
int HandleInputLine(
free(data);
}
} else if (strcmp("xport", argv[1]) == 0) {
free(data);
}
} else if (strcmp("xport", argv[1]) == 0) {
+#ifdef HAVE_RRD_GRAPH
int xxsize;
unsigned long int j = 0;
time_t start, end, ti;
int xxsize;
unsigned long int j = 0;
time_t start, end, ti;
@@
-714,7
+715,8
@@
int HandleInputLine(
if (rrd_xport
(argc - 1, &argv[1], &xxsize, &start, &end, &step, &col_cnt,
&legend_v, &data) != -1) {
if (rrd_xport
(argc - 1, &argv[1], &xxsize, &start, &end, &step, &col_cnt,
&legend_v, &data) != -1) {
- char *old_locale = setlocale(LC_NUMERIC, "C");
+ char *old_locale = setlocale(LC_NUMERIC,NULL);
+ setlocale(LC_NUMERIC, "C");
row_cnt = (end - start) / step;
ptr = data;
printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n\n",
row_cnt = (end - start) / step;
ptr = data;
printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n\n",
@@
-770,7
+772,11
@@
int HandleInputLine(
setlocale(LC_NUMERIC, old_locale);
}
free(vtag);
setlocale(LC_NUMERIC, old_locale);
}
free(vtag);
+#else
+ rrd_set_error("the instance of rrdtool has been compiled without graphics");
+#endif
} else if (strcmp("graph", argv[1]) == 0) {
} else if (strcmp("graph", argv[1]) == 0) {
+#ifdef HAVE_RRD_GRAPH
char **calcpr;
#ifdef notused /*XXX*/
char **calcpr;
#ifdef notused /*XXX*/
@@
-804,7
+810,11
@@
int HandleInputLine(
}
}
}
}
+#else
+ rrd_set_error("the instance of rrdtool has been compiled without graphics");
+#endif
} else if (strcmp("graphv", argv[1]) == 0) {
} else if (strcmp("graphv", argv[1]) == 0) {
+#ifdef HAVE_RRD_GRAPH
rrd_info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */
grinfo = rrd_graph_v(argc - 1, &argv[1]);
rrd_info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */
grinfo = rrd_graph_v(argc - 1, &argv[1]);
@@
-812,7
+822,9
@@
int HandleInputLine(
rrd_info_print(grinfo);
rrd_info_free(grinfo);
}
rrd_info_print(grinfo);
rrd_info_free(grinfo);
}
-
+#else
+ rrd_set_error("the instance of rrdtool has been compiled without graphics");
+#endif
} else if (strcmp("tune", argv[1]) == 0)
rrd_tune(argc - 1, &argv[1]);
#ifndef WIN32
} else if (strcmp("tune", argv[1]) == 0)
rrd_tune(argc - 1, &argv[1]);
#ifndef WIN32