From: Uwe Hermann Date: Wed, 20 Feb 2013 10:39:38 +0000 (+0100) Subject: Print --help/--version output to stdout (not stderr). X-Git-Tag: pulseview-0.1.0~125 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=9fd5bb6e6468eb6d211aff682f3a64e7f070bb44 Print --help/--version output to stdout (not stderr). Thanks R. Diez 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. --- diff --git a/main.cpp b/main.cpp index ba8e7870..e98506fc 100644 --- a/main.cpp +++ b/main.cpp @@ -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':