summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b14df8d)
raw | patch | inline | side by side (parent: b14df8d)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 1 Mar 2003 22:25:56 +0000 (22:25 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 1 Mar 2003 22:25:56 +0000 (22:25 +0000) |
program/src/rrd_tool.c | patch | blob | history |
diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c
index 1795c8458d6934b70a406b40b8c5850567c61c91..037894085141c1a3c54d5cc18e19c28061f25274 100644 (file)
--- a/program/src/rrd_tool.c
+++ b/program/src/rrd_tool.c
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]);
}