]> sjero.net Git - wget/blobdiff - src/main.c
Automated merge.
[wget] / src / main.c
index fcf58861d300f6c2a629f0552bb5f9aaa67f3663..a2d408888e816ef7b0038caa949e58f14c319ffc 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
@@ -736,13 +739,7 @@ format_and_print_line (const char *prefix, const char *line,
          token on the next line. */
       if (remaining_chars <= strlen (token)) 
         {
-          int j;
-          printf ("\n");
-          j = 0;
-          for (j = 0; j < leading_spaces; j++) 
-            {
-              printf (" ");
-            }
+          printf ("\n%*c", leading_spaces, ' ');
           remaining_chars = line_length - leading_spaces;
         }
       printf ("%s ", token);
@@ -1267,7 +1264,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));