aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpgcompose.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2017-06-11 12:10:46 +0000
committerNeal H. Walfield <[email protected]>2017-06-11 12:10:46 +0000
commit7aeac20f12ed257d3d159b304afeeac7f406c9d2 (patch)
tree019ac928d1b6f583646188b5656c4485d49f8f82 /g10/gpgcompose.c
parentgpg: Improve some output of gpgcompose. (diff)
downloadgnupg-7aeac20f12ed257d3d159b304afeeac7f406c9d2.tar.gz
gnupg-7aeac20f12ed257d3d159b304afeeac7f406c9d2.zip
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 <[email protected]>
Diffstat (limited to 'g10/gpgcompose.c')
-rw-r--r--g10/gpgcompose.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/g10/gpgcompose.c b/g10/gpgcompose.c
index 98c04f24f..8e29c2fcd 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);