mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Print some diagnostic messages to stderr not to stdout.
This commit is contained in:
parent
bcc2abf116
commit
408126aae0
2
NEWS
2
NEWS
@ -16,6 +16,8 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
|||||||
** Fix a memory leak problem in the GNU TLS backend.
|
** Fix a memory leak problem in the GNU TLS backend.
|
||||||
|
|
||||||
** Autoreconf works again for distributed tarballs.
|
** Autoreconf works again for distributed tarballs.
|
||||||
|
|
||||||
|
** Print some diagnostic messages to stderr not to stdout.
|
||||||
|
|
||||||
* Changes in Wget 1.13.4
|
* Changes in Wget 1.13.4
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
2012-02-23 Giuseppe Scrivano <giuseppe@southpole.se>
|
2012-02-23 Giuseppe Scrivano <giuseppe@southpole.se>
|
||||||
|
|
||||||
|
* main.c (main): Write diagnostic messages to `stderr' not to `stdout'.
|
||||||
|
|
||||||
* main.c (main): Fail gracefully if `malloc' fails.
|
* main.c (main): Fail gracefully if `malloc' fails.
|
||||||
|
|
||||||
* gnutls.c (wgnutls_read): Remove unused variables `timer' and `flags'.
|
* gnutls.c (wgnutls_read): Remove unused variables `timer' and `flags'.
|
||||||
|
11
src/main.c
11
src/main.c
@ -1034,7 +1034,7 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
if (!userrc_ret)
|
if (!userrc_ret)
|
||||||
{
|
{
|
||||||
printf ("Exiting due to error in %s\n", optarg);
|
fprintf (stderr, "Exiting due to error in %s\n", optarg);
|
||||||
exit (2);
|
exit (2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1062,9 +1062,10 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (ret == '?')
|
if (ret == '?')
|
||||||
{
|
{
|
||||||
print_usage (0);
|
print_usage (1);
|
||||||
printf ("\n");
|
fprintf (stderr, "\n");
|
||||||
printf (_("Try `%s --help' for more options.\n"), exec_name);
|
fprintf (stderr, _("Try `%s --help' for more options.\n"),
|
||||||
|
exec_name);
|
||||||
exit (2);
|
exit (2);
|
||||||
}
|
}
|
||||||
/* Find the short option character in the mapping. */
|
/* Find the short option character in the mapping. */
|
||||||
@ -1307,7 +1308,7 @@ for details.\n\n"));
|
|||||||
/* No URL specified. */
|
/* No URL specified. */
|
||||||
fprintf (stderr, _("%s: missing URL\n"), exec_name);
|
fprintf (stderr, _("%s: missing URL\n"), exec_name);
|
||||||
print_usage (1);
|
print_usage (1);
|
||||||
printf ("\n");
|
fprintf (stderr, "\n");
|
||||||
/* #### Something nicer should be printed here -- similar to the
|
/* #### Something nicer should be printed here -- similar to the
|
||||||
pre-1.5 `--help' page. */
|
pre-1.5 `--help' page. */
|
||||||
fprintf (stderr, _("Try `%s --help' for more options.\n"), exec_name);
|
fprintf (stderr, _("Try `%s --help' for more options.\n"), exec_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user