[Pkg-gnupg-commit] [gnupg2] 48/185: gpg: Send gpgcompose --help output to stdout, not stderr.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Aug 7 11:55:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 7aeac20f12ed257d3d159b304afeeac7f406c9d2
Author: Neal H. Walfield <neal at g10code.com>
Date:   Sun Jun 11 14:10:46 2017 +0200

    gpg: Send gpgcompose --help output to stdout, not stderr.
    
    * g10/gpgcompose.c (show_help): Send gpgcompose --help output to
    stdout, not stderr.
    
    Reported-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
 g10/gpgcompose.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/g10/gpgcompose.c b/g10/gpgcompose.c
index 98c04f2..8e29c2f 100644
--- a/g10/gpgcompose.c
+++ b/g10/gpgcompose.c
@@ -281,18 +281,18 @@ show_help (struct option options[])
         {
           const char *o = option[0] ? option : "ARG";
           l = strlen (o);
-          fprintf (stderr, "%s", o);
+          fprintf (stdout, "%s", o);
         }
 
       if (! help)
         {
-          fputc ('\n', stderr);
+          fputc ('\n', stdout);
           continue;
         }
 
       if (option)
         for (j = l; j < max_length + 2; j ++)
-          fputc (' ', stderr);
+          fputc (' ', stdout);
 
 #define BOLD_START "\033[1m"
 #define NORMAL_RESTORE "\033[0m"
@@ -314,7 +314,7 @@ show_help (struct option options[])
 
       if (! option)
         {
-          fprintf (stderr, "\n%s\n", formatted);
+          printf ("\n%s\n", formatted);
           break;
         }
 
@@ -330,10 +330,10 @@ show_help (struct option options[])
 
           if (p != formatted)
             for (j = 0; j < max_length + 2; j ++)
-              fputc (' ', stderr);
+              fputc (' ', stdout);
 
-          fwrite (p, l, 1, stderr);
-          fputc ('\n', stderr);
+          fwrite (p, l, 1, stdout);
+          fputc ('\n', stdout);
         }
 
       xfree (formatted);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list