mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Move numurls out of options struct.
This commit is contained in:
parent
47bf277fb5
commit
f33c275621
@ -1,3 +1,11 @@
|
||||
2008-11-16 Steven Schubiger <stsc@members.fsf.org>
|
||||
|
||||
* main.c: Declare and initialize the numurls counter.
|
||||
|
||||
* ftp.c, http.c: Make the counter visible here and use it.
|
||||
|
||||
* options.h: Remove old declaration from options struct.
|
||||
|
||||
2008-11-15 Steven Schubiger <stsc@members.fsf.org>
|
||||
|
||||
* init.c (defaults): Set default waitretry value.
|
||||
|
@ -69,6 +69,7 @@ typedef struct
|
||||
struct url *proxy; /* FTWK-style proxy */
|
||||
} ccon;
|
||||
|
||||
extern int numurls;
|
||||
|
||||
/* Look for regexp "( *[0-9]+ *byte" (literal parenthesis) anywhere in
|
||||
the string S, and return the number converted to wgint, if found, 0
|
||||
@ -1295,7 +1296,7 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con)
|
||||
number of bytes and files downloaded. */
|
||||
{
|
||||
total_downloaded_bytes += len;
|
||||
opt.numurls++;
|
||||
numurls++;
|
||||
}
|
||||
|
||||
/* Deletion of listing files is not controlled by --delete-after, but
|
||||
@ -1310,7 +1311,7 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con)
|
||||
for instance, may want to know how many bytes and files they've
|
||||
downloaded through it. */
|
||||
total_downloaded_bytes += len;
|
||||
opt.numurls++;
|
||||
numurls++;
|
||||
|
||||
if (opt.delete_after)
|
||||
{
|
||||
|
@ -142,6 +142,8 @@ struct request {
|
||||
int hcount, hcapacity;
|
||||
};
|
||||
|
||||
extern int numurls;
|
||||
|
||||
/* Create a new, empty request. At least request_set_method must be
|
||||
called before the request can be used. */
|
||||
|
||||
@ -2760,7 +2762,7 @@ Remote file exists.\n\n"));
|
||||
number_to_static_string (hstat.contlen),
|
||||
hstat.local_file, count);
|
||||
}
|
||||
++opt.numurls;
|
||||
++numurls;
|
||||
total_downloaded_bytes += hstat.len;
|
||||
|
||||
/* Remember that we downloaded the file for later ".orig" code. */
|
||||
@ -2788,7 +2790,7 @@ Remote file exists.\n\n"));
|
||||
tms, u->url, number_to_static_string (hstat.len),
|
||||
hstat.local_file, count);
|
||||
}
|
||||
++opt.numurls;
|
||||
++numurls;
|
||||
total_downloaded_bytes += hstat.len;
|
||||
|
||||
/* Remember that we downloaded the file for later ".orig" code. */
|
||||
|
@ -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
|
||||
@ -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));
|
||||
|
@ -124,10 +124,6 @@ struct options
|
||||
SUM_SIZE_INT quota; /* Maximum file size to download and
|
||||
store. */
|
||||
|
||||
int numurls; /* Number of successfully downloaded
|
||||
URLs #### should be removed because
|
||||
it's not a setting, but a global var */
|
||||
|
||||
bool server_response; /* Do we print server response? */
|
||||
bool save_headers; /* Do we save headers together with
|
||||
file? */
|
||||
|
Loading…
Reference in New Issue
Block a user