]> sjero.net Git - wget/blobdiff - src/init.c
[svn] Resurrect opt.dot_style.
[wget] / src / init.c
index 0d61b668139cf5def6f4cf9044c9fce09ec53e16..8a76c17a30d1536bf1b52b0aca48107d79e85e9e 100644 (file)
@@ -122,6 +122,7 @@ static struct {
   { "dotbytes",                &opt.dot_bytes,         cmd_bytes },
   { "dotsinline",      &opt.dots_in_line,      cmd_number },
   { "dotspacing",      &opt.dot_spacing,       cmd_number },
+  { "dotstyle",                &opt.dot_style,         cmd_string },
   { "excludedirectories", &opt.excludes,       cmd_directory_vector },
   { "excludedomains",  &opt.exclude_domains,   cmd_vector },
   { "followftp",       &opt.follow_ftp,        cmd_boolean },
@@ -142,6 +143,7 @@ static struct {
   { "includedirectories", &opt.includes,       cmd_directory_vector },
   { "input",           &opt.input_filename,    cmd_file },
   { "killlonger",      &opt.kill_longer,       cmd_boolean },
+  { "limitrate",       &opt.limit_rate,        cmd_bytes },
   { "loadcookies",     &opt.cookies_input,     cmd_file },
   { "logfile",         &opt.lfilename,         cmd_file },
   { "login",           &opt.ftp_acc,           cmd_string },
@@ -521,17 +523,22 @@ static int myatoi PARAMS ((const char *s));
 static int
 cmd_address (const char *com, const char *val, void *closure)
 {
+  struct address_list *al;
   struct sockaddr_in sin;
   struct sockaddr_in **target = (struct sockaddr_in **)closure;
 
   memset (&sin, '\0', sizeof (sin));
 
-  if (!lookup_host (val, (unsigned char *)&sin.sin_addr))
+  al = lookup_host (val, 1);
+  if (!al)
     {
       fprintf (stderr, _("%s: %s: Cannot convert `%s' to an IP address.\n"),
               exec_name, com, val);
       return 0;
     }
+  address_list_copy_one (al, 0, (unsigned char *)&sin.sin_addr);
+  address_list_release (al);
+
   sin.sin_family = AF_INET;
   sin.sin_port = 0;
 
@@ -1011,6 +1018,7 @@ check_user_specified_header (const char *s)
 void cleanup_html_url PARAMS ((void));
 void res_cleanup PARAMS ((void));
 void downloaded_files_free PARAMS ((void));
+void http_cleanup PARAMS ((void));
 
 
 /* Free the memory allocated by global variables.  */
@@ -1033,14 +1041,16 @@ cleanup (void)
 #ifdef DEBUG_MALLOC
   recursive_cleanup ();
   res_cleanup ();
+  http_cleanup ();
+  cleanup_html_url ();
+  downloaded_files_free ();
+  cookies_cleanup ();
   host_cleanup ();
+
   {
     extern acc_t *netrc_list;
     free_netrc (netrc_list);
   }
-  cleanup_html_url ();
-  downloaded_files_free ();
-  cookies_cleanup ();
   FREE_MAYBE (opt.lfilename);
   xfree (opt.dir_prefix);
   FREE_MAYBE (opt.input_filename);