changeset 3583:040cf2894e65 draft

Send --help message to stdout i.s.o stderr This allows fun stuff such as `bitcoin --help | less`, and more easy piping to files. Looking at other tools such as bash, gcc, they all send their help text to stdout.
author Wladimir J. van der Laan <laanwj@gmail.com>
date Thu, 04 Oct 2012 07:56:57 +0200
parents 683f60758d5f
children 5a7e013bf2e7
files src/init.cpp src/qt/guiutil.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -144,7 +144,7 @@
 
             strUsage += "\n" + HelpMessage();
 
-            fprintf(stderr, "%s", strUsage.c_str());
+            fprintf(stdout, "%s", strUsage.c_str());
             return false;
         }
 
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -439,7 +439,7 @@
 {
     // On other operating systems, the expected action is to print the message to the console.
     QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions;
-    fprintf(stderr, "%s", strUsage.toStdString().c_str());
+    fprintf(stdout, "%s", strUsage.toStdString().c_str());
 }
 
 void HelpMessageBox::showOrPrint()