summaryrefslogtreecommitdiff
path: root/sed
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2009-01-28 08:54:04 +0100
committerPaolo Bonzini <bonzini@gnu.org>2009-01-28 08:54:04 +0100
commit5dd4f61f546970e84062aacd8af4a8b73ec34fc2 (patch)
treed4f8c1975123ab61f9c8d48977729070603a2fc1 /sed
parent70341ff4532e41f762371c1c93f0dcd8d232a80f (diff)
downloadsed-5dd4f61f546970e84062aacd8af4a8b73ec34fc2.tar.gz
do not print the bug report address when --help is printed and exit status != 0
2009-01-28 Paolo Bonzini <bonzini@gnu.org> * sed/sed.c (usage): Only print the bug report address for `sed --help'. (main): Print it for `sed --version' too. * testsuite/version.gin: Adapt. * testsuite/Makefile.tests: Refine help message test.
Diffstat (limited to 'sed')
-rw-r--r--sed/sed.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sed/sed.c b/sed/sed.c
index 9885521..fd10aaa 100644
--- a/sed/sed.c
+++ b/sed/sed.c
@@ -144,7 +144,11 @@ non-option argument is taken as the sed script to interpret. All\n\
remaining arguments are names of input files; if no input files are\n\
specified, then the standard input is read.\n\
\n"));
- fprintf(out, _("E-mail bug reports to: %s .\n\
+
+ /* Only print the bug report address for `sed --help', otherwise we'll
+ get reports for other people's bugs. */
+ if (!status)
+ fprintf(out, _("E-mail bug reports to: %s .\n\
Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"),
BUG_ADDRESS, PACKAGE);
@@ -306,6 +310,11 @@ This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n\
to the extent permitted by law.\n\
"), COPYRIGHT_NOTICE);
+ fputc('\n', stdout);
+ fprintf(stdout, _("E-mail bug reports to: %s .\n\
+Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"),
+ BUG_ADDRESS, PACKAGE);
+
ck_fclose (NULL);
exit (0);
case 'h':