#2013_10_07 星期一 add by greshem
整个wget 代码的写的比较凌乱 基本和sendmail 差不多, 代码 是一点一点添加上去的
代码也没有 重构的概念
#==========================================================================
J:\portage\net-misc\wget\wget-1.12.chm::/S/196.html#L866
main
890 initialize ();
892 init_switches ();
1294 retrieve_url (url_parsed, *t, &filename, &redirected_URL,
getproxy (u);
http_loop (u, &mynewloc, &local_file, refurl, dt, proxy_url, iri);
2581 gethttp (u, &hstat, dt, proxy, iri); #超大的函数
request_new ();
request_set_method (req, meth, meth_arg);
request_set_header (req, "Referer", (char *) hs->referer, rel_none);
request_set_header (req, "Pragma", "no-cache", rel_none);
request_set_header (req, "Range",
request_set_header (req, "Accept", "*/*", rel_none);
connect_to_host (conn->host, conn->port);
1718 request_send (connreq, sock);
2857 downloaded_file(FILE_DOWNLOADED_NORMALLY, hstat.local_file);
ftp_loop (u, dt, proxy_url, recursive, glob);
register_download (u->url, local_file);
register_redirection (origurl, u->url);
register_html (u->url, local_file);