projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed version checks to only complain if xml version is > than current RRD version
[rrdtool.git]
/
src
/
rrd_tool.c
diff --git
a/src/rrd_tool.c
b/src/rrd_tool.c
index
1795c84
..
2cb4494
100644
(file)
--- a/
src/rrd_tool.c
+++ b/
src/rrd_tool.c
@@
-23,7
+23,11
@@
void PrintUsage(char *cmd)
char help_main[] =
"RRDtool 1.1.x Copyright 1997-2003 by Tobias Oetiker <tobi@oetiker.ch>\n"
char help_main[] =
"RRDtool 1.1.x Copyright 1997-2003 by Tobias Oetiker <tobi@oetiker.ch>\n"
+#ifndef WIN32
" Compiled " MAKE_TIMESTAMP "\n\n"
" Compiled " MAKE_TIMESTAMP "\n\n"
+#else
+ " Compiled " __DATE__ " " __TIME__ "\n\n"
+#endif
"Usage: rrdtool [options] command command_options\n\n";
char help_list[] =
"Usage: rrdtool [options] command command_options\n\n";
char help_list[] =
@@
-583,12
+587,13
@@
int HandleInputLine(int argc, char **argv, FILE* out)
const char *imgfile = argv[2]; /* rrd_graph changes argv pointer */
int xsize, ysize;
int i;
const char *imgfile = argv[2]; /* rrd_graph changes argv pointer */
int xsize, ysize;
int i;
+ int tostdout = (strcmp(argv[2],"-") == 0);
if( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize) != -1 ) {
if( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize) != -1 ) {
- if (
strcmp(imgfile,"-") != 0
)
+ if (
!tostdout
)
printf ("%dx%d\n",xsize,ysize);
if (calcpr) {
for(i=0;calcpr[i];i++){
printf ("%dx%d\n",xsize,ysize);
if (calcpr) {
for(i=0;calcpr[i];i++){
- if (
strcmp(imgfile,"-") != 0
)
+ if (
!tostdout
)
printf("%s\n",calcpr[i]);
free(calcpr[i]);
}
printf("%s\n",calcpr[i]);
free(calcpr[i]);
}