pw-dot: send diagnostic messages to stderr, not stdout

This will help when using stdout for other purposes in the
future (e.g. next commit).
This commit is contained in:
Erkki Seppälä 2021-04-02 11:32:06 +03:00
parent 8cf6da467f
commit 4a0b7fa9b8

View file

@ -792,23 +792,23 @@ int main(int argc, char *argv[])
return 0; return 0;
case 'a' : case 'a' :
data.show_all = true; data.show_all = true;
fprintf(stdout, "all option enabled\n"); fprintf(stderr, "all option enabled\n");
break; break;
case 's' : case 's' :
data.show_smart = true; data.show_smart = true;
fprintf(stdout, "smart option enabled\n"); fprintf(stderr, "smart option enabled\n");
break; break;
case 'd' : case 'd' :
data.show_detail = true; data.show_detail = true;
fprintf(stdout, "detail option enabled\n"); fprintf(stderr, "detail option enabled\n");
break; break;
case 'r' : case 'r' :
opt_remote = optarg; opt_remote = optarg;
fprintf(stdout, "set remote to %s\n", opt_remote); fprintf(stderr, "set remote to %s\n", opt_remote);
break; break;
case 'o' : case 'o' :
dot_path = optarg; dot_path = optarg;
fprintf(stdout, "set output file %s\n", dot_path); fprintf(stderr, "set output file %s\n", dot_path);
break; break;
default: default:
show_help(argv[0]); show_help(argv[0]);