-w -
work as expected.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@701
d4fa192b-c00b-0410-8231-
f00ffab90ce4
Usage();
if (w_opt != NULL) {
- wfile = fopen(w_opt, "w");
+ if (!strcmp(w_opt, "-"))
+ wfile = stdout;
+ else
+ wfile = fopen(w_opt, "w");
if (wfile == NULL) {
perror(w_opt);
exit (1);
if (w_opt == NULL) {
if (o_flag && ++v == 100)
clean_order();
- fflush(stdout);
+ fflush(stderr);
} else if (++v == 100) {
fflush(wfile);
- printf("\nFlushed\n");
+ fprintf(stderr, "\nFlushed\n");
}
usleep(50000);
continue;
perror(w_opt);
u++;
if (!(u % 1000)) {
- printf("%u\r", u);
- fflush(stdout);
+ fprintf(stderr, "%u\r", u);
+ fflush(stderr);
}
continue;
}