diff --git a/src/rrd_tool.c b/src/rrd_tool.c
index 1795c8458d6934b70a406b40b8c5850567c61c91..2cb449499a607fb6f8c4d7ac56f1e7351d6a1202 100644 (file)
--- a/src/rrd_tool.c
+++ b/src/rrd_tool.c
char help_main[] =
"RRDtool 1.1.x Copyright 1997-2003 by Tobias Oetiker <tobi@oetiker.ch>\n"
+#ifndef WIN32
" Compiled " MAKE_TIMESTAMP "\n\n"
+#else
+ " Compiled " __DATE__ " " __TIME__ "\n\n"
+#endif
"Usage: rrdtool [options] command command_options\n\n";
char help_list[] =
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 (strcmp(imgfile,"-") != 0)
+ if (!tostdout)
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]);
}