X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmain.c;h=a2d408888e816ef7b0038caa949e58f14c319ffc;hp=fcf58861d300f6c2a629f0552bb5f9aaa67f3663;hb=78a765739543d5ca3bc83ad70f5d391b9d2af4f5;hpb=0fa023cfffc896d72ba36a8789154630e585435a diff --git a/src/main.c b/src/main.c index fcf58861..a2d40888 100644 --- a/src/main.c +++ b/src/main.c @@ -80,6 +80,9 @@ static void redirect_output_signal (int); #endif const char *exec_name; + +/* Number of successfully downloaded URLs */ +int numurls = 0; #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));