diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2009-01-28 08:54:04 +0100 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2009-01-28 08:54:04 +0100 |
commit | 5dd4f61f546970e84062aacd8af4a8b73ec34fc2 (patch) | |
tree | d4f8c1975123ab61f9c8d48977729070603a2fc1 /sed | |
parent | 70341ff4532e41f762371c1c93f0dcd8d232a80f (diff) | |
download | sed-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.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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': |