]> sjero.net Git - wget/blobdiff - src/main.c
No freopen(NULL,...).
[wget] / src / main.c
index 9bae2d236eeb3441f51d9972cf4b3c33735a409b..7c921b77e47a4078a9e9256da8f4005e82ffa159 100644 (file)
@@ -80,6 +80,9 @@ static void redirect_output_signal (int);
 #endif
 
 const char *exec_name;
+
+/* Number of successfully downloaded URLs */
+int numurls = 0;
 \f
 #ifndef TESTING
 /* Initialize I18N/L10N.  That amounts to invoking setlocale, and
@@ -1121,7 +1124,7 @@ for details.\n\n"));
         {
 #ifdef WINDOWS
           FILE *result;
-          result = freopen (NULL, "wb", stdout);
+          result = freopen ("CONAIR$", "wb", stdout);
           if (result == NULL)
             {
               logputs (LOG_NOTQUIET, _("\
@@ -1231,7 +1234,7 @@ WARNING: Can't reopen standard output in binary mode;\n\
       logprintf (LOG_NOTQUIET,
                  _("FINISHED --%s--\nDownloaded: %d files, %s in %s (%s)\n"),
                  datetime_str (time (NULL)),
-                 opt.numurls,
+                 numurls,
                  human_readable (total_downloaded_bytes),
                  secs_to_human_time (total_download_time),
                  retr_rate (total_downloaded_bytes, total_download_time));