]> sjero.net Git - wget/blobdiff - src/main.c
[svn] Added reordering of addresses to try IPv4 first and the associated
[wget] / src / main.c
index f9827dd8b58a03b03d171cda32cfdeb5e0f7bcae..4d2163abfca5fd96e1f637c770c6457b594b5496 100644 (file)
@@ -61,7 +61,6 @@ extern int errno;
 #include "retr.h"
 #include "recur.h"
 #include "host.h"
-#include "cookies.h"
 #include "url.h"
 #include "progress.h"          /* for progress_handle_sigwinch */
 #include "convert.h"
@@ -215,6 +214,7 @@ struct cmdline_option option_data[] =
     { "passive-ftp", 0, OPT_BOOLEAN, "passiveftp", -1 },
     { "post-data", 0, OPT_VALUE, "postdata", -1 },
     { "post-file", 0, OPT_VALUE, "postfile", -1 },
+    { "prefer-family", 0, OPT_VALUE, "preferfamily", -1 },
     { "preserve-permissions", 0, OPT_BOOLEAN, "preservepermissions", -1 },
     { "progress", 0, OPT_VALUE, "progress", -1 },
     { "protocol-directories", 0, OPT_BOOLEAN, "protocoldirectories", -1 },
@@ -466,6 +466,9 @@ Download:\n"),
   -4,  --inet4-only              connect only to IPv4 addresses.\n"),
     N_("\
   -6,  --inet6-only              connect only to IPv6 addresses.\n"),
+    N_("\
+       --prefer-family=FAMILY    connect first to addresses of specified family,\n\
+                                 one of IPv6, IPv4, or none.\n"),
 #endif
     "\n",
 
@@ -532,8 +535,6 @@ HTTPS (SSL) options:\n"),
        --sslcertfile=FILE    optional client certificate.\n"),
     N_("\
        --sslcertkey=KEYFILE  optional keyfile for this certificate.\n"),
-    N_("\
-       --egd-file=FILE       file name of the EGD socket.\n"),
     N_("\
        --sslcadir=DIR        dir where hash list of CA's are stored.\n"),
     N_("\
@@ -545,6 +546,8 @@ HTTPS (SSL) options:\n"),
     N_("\
        --sslprotocol=0-3     choose SSL protocol; 0=automatic,\n\
                              1=SSLv2 2=SSLv3 3=TLSv1.\n"),
+    N_("\
+       --egd-file=FILE       file name of the EGD socket.\n"),
     "\n",
 #endif /* HAVE_SSL */
 
@@ -555,7 +558,7 @@ FTP options:\n"),
     N_("\
        --no-glob               turn off FTP file name globbing.\n"),
     N_("\
-       --passive-ftp           use the \"passive\" transfer mode.\n"),
+       --no-passive-ftp        disable the \"passive\" transfer mode.\n"),
     N_("\
        --retr-symlinks         when recursing, get linked-to files (not dir).\n"),
     N_("\
@@ -660,7 +663,7 @@ main (int argc, char *const *argv)
 
 #ifdef WINDOWS
   /* Drop extension (typically .EXE) from executable filename. */
-  windows_main_junk (&argc, (char **) argv, (char **) &exec_name);
+  windows_main (&argc, (char **) argv, (char **) &exec_name);
 #endif
 
   /* Set option defaults; read the system wgetrc and ~/.wgetrc.  */
@@ -712,7 +715,7 @@ main (int argc, char *const *argv)
          break;
        case OPT_FUNCALL:
          {
-           void (*func) PARAMS ((void)) = opt->data;
+           void (*func) PARAMS ((void)) = (void (*) PARAMS ((void))) opt->data;
            func ();
          }
          break;
@@ -870,7 +873,7 @@ Can't timestamp and not clobber old files at the same time.\n"));
        output_stream = stdout;
       else
        {
-         struct stat st;
+         struct_stat st;
          output_stream = fopen (opt.output_document,
                                 opt.always_rest ? "ab" : "wb");
          if (output_stream == NULL)
@@ -944,17 +947,17 @@ Can't timestamp and not clobber old files at the same time.\n"));
     {
       logprintf (LOG_NOTQUIET,
                 _("\nFINISHED --%s--\nDownloaded: %s bytes in %d files\n"),
-                time_str (NULL), legible_large_int (total_downloaded_bytes),
+                time_str (NULL), with_thousand_seps_large (total_downloaded_bytes),
                 opt.numurls);
       /* Print quota warning, if exceeded.  */
       if (opt.quota && total_downloaded_bytes > opt.quota)
        logprintf (LOG_NOTQUIET,
                   _("Download quota (%s bytes) EXCEEDED!\n"),
-                  legible (opt.quota));
+                  with_thousand_seps_large (opt.quota));
     }
 
-  if (opt.cookies_output && wget_cookie_jar)
-    cookie_jar_save (wget_cookie_jar, opt.cookies_output);
+  if (opt.cookies_output)
+    save_cookies ();
 
   if (opt.convert_links && !opt.delete_after)
     convert_all_links ();