fixed version checks to only complain if xml version is > than current RRD version
[rrdtool.git] / src / rrd_tool.c
index 1795c84..2cb4494 100644 (file)
@@ -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"
+#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[] =
@@ -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;
+       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]);
                }