[glib: 5/9] gobject-query: Print --help output to stdout rather than stderr




commit ad77557277b13833fab6ed3b13df64376f9e405c
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Jun 9 13:22:51 2022 +0100

    gobject-query: Print --help output to stdout rather than stderr
    
    UNIX tools print `--help` output to stdout by convention.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 gobject/gobject-query.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gobject/gobject-query.c b/gobject/gobject-query.c
index 84626d4251..c6b56ab13e 100644
--- a/gobject/gobject-query.c
+++ b/gobject/gobject-query.c
@@ -83,18 +83,18 @@ show_nodes (GType        type,
 }
 
 static gint
-help (gchar *arg)
+help (const gchar *arg)
 {
-  g_fprintf (stderr, "usage: gobject-query <qualifier> [-r <type>] [-{i|b} \"\"] [-s #] [-{h|x|y}]\n");
-  g_fprintf (stderr, "       -r       specify root type\n");
-  g_fprintf (stderr, "       -n       don't descend type tree\n");
-  g_fprintf (stderr, "       -h       show help\n");
-  g_fprintf (stderr, "       -b       specify indent string\n");
-  g_fprintf (stderr, "       -i       specify incremental indent string\n");
-  g_fprintf (stderr, "       -s       specify line spacing\n");
-  g_fprintf (stderr, "qualifiers:\n");
-  g_fprintf (stderr, "       froots   iterate over fundamental roots\n");
-  g_fprintf (stderr, "       tree     print type tree\n");
+  g_fprintf (stdout, "usage: gobject-query <qualifier> [-r <type>] [-{i|b} \"\"] [-s #] [-{h|x|y}]\n");
+  g_fprintf (stdout, "       -r       specify root type\n");
+  g_fprintf (stdout, "       -n       don't descend type tree\n");
+  g_fprintf (stdout, "       -h       show help\n");
+  g_fprintf (stdout, "       -b       specify indent string\n");
+  g_fprintf (stdout, "       -i       specify incremental indent string\n");
+  g_fprintf (stdout, "       -s       specify line spacing\n");
+  g_fprintf (stdout, "qualifiers:\n");
+  g_fprintf (stdout, "       froots   iterate over fundamental roots\n");
+  g_fprintf (stdout, "       tree     print type tree\n");
   
   return arg != NULL;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]