Print --help/--version output to stdout (not stderr).

Thanks R. Diez <rdiezmail-comparevcd@yahoo.de> for the patch!

This is not a feasible practice for CLI tools where the output might
be piped into other tools (and you don't want to pipe help messages or
other non-data). However, for the PulseView GUI this is acceptable since
it's not meant to be used that way.
This commit is contained in:
Uwe Hermann 2013-02-20 11:39:38 +01:00
parent 94fe58efe5
commit 9fd5bb6e64
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ QApplication *g_app = NULL;
void usage()
{
fprintf(stderr,
fprintf(stdout,
"Usage:\n"
" %s — %s\n"
"\n"
@ -95,7 +95,7 @@ int main(int argc, char *argv[])
switch (c) {
case 'V':
// Print version info
fprintf(stderr, "%s %s\n", PV_TITLE, PV_VERSION_STRING);
fprintf(stdout, "%s %s\n", PV_TITLE, PV_VERSION_STRING);
return 0;
case 'h':