X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmain.c;h=0727b1db5ac3d85bbb095fdca1cf699e45e612f6;hp=4f0336975ee730a1e1ca2aacb558eef53d6bf1ee;hb=8fc5241a2d391f2b0b460e6ee2a4cd71aa764d1e;hpb=4aab9e8f0af29d8fb5d59746e4e5270080f95468 diff --git a/src/main.c b/src/main.c index 4f033697..0727b1db 100644 --- a/src/main.c +++ b/src/main.c @@ -306,7 +306,7 @@ static void init_switches (void) { char *p = short_options; - int i, o = 0; + size_t i, o = 0; for (i = 0; i < countof (option_data); i++) { struct cmdline_option *opt = &option_data[i]; @@ -652,7 +652,7 @@ Recursive accept/reject:\n"), N_("Mail bug reports and suggestions to .\n") }; - int i; + size_t i; printf (_("GNU Wget %s, a non-interactive network retriever.\n"), version_string); @@ -1021,7 +1021,19 @@ for details.\n\n")); if (opt.output_document) { if (HYPHENP (opt.output_document)) - output_stream = stdout; + { +#ifdef WINDOWS + FILE *result; + result = freopen (NULL, "wb", stdout); + if (result == NULL) + { + logputs (LOG_NOTQUIET, _("\ +WARNING: Can't reopen standard output in binary mode;\n\ + downloaded file may contain inappropriate line endings.\n")); + } +#endif + output_stream = stdout; + } else { struct_fstat st;