]> sjero.net Git - wget/blobdiff - src/main.c
[svn] Use the passive FTP transfer mode by default.
[wget] / src / main.c
index 884d9c89797100e73763016ade0463a758421bbc..eb04478323065848144e0bf40f49f4adce176f55 100644 (file)
@@ -1,5 +1,5 @@
 /* Command line parsing.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Wget.
 
@@ -182,6 +182,7 @@ struct cmdline_option option_data[] =
     { "follow-tags", 0, OPT_VALUE, "followtags", -1 },
     { "force-directories", 'x', OPT_BOOLEAN, "dirstruct", -1 },
     { "force-html", 'F', OPT_BOOLEAN, "forcehtml", -1 },
+    { "ftp-passwd", 0, OPT_VALUE, "ftppasswd", -1 },
     { "glob", 0, OPT_BOOLEAN, "glob", -1 },
     { "header", 0, OPT_VALUE, "header", -1 },
     { "help", 'h', OPT_FUNCALL, (void *)print_help, no_argument },
@@ -554,7 +555,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_("\
@@ -629,7 +630,7 @@ print_version (void)
 {
   printf ("GNU Wget %s\n\n", version_string);
   fputs (_("\
-Copyright (C) 2003 Free Software Foundation, Inc.\n"), stdout);
+Copyright (C) 2005 Free Software Foundation, Inc.\n"), stdout);
   fputs (_("\
 This program is distributed in the hope that it will be useful,\n\
 but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
@@ -658,7 +659,8 @@ main (int argc, char *const *argv)
     ++exec_name;
 
 #ifdef WINDOWS
-  windows_main_junk (&argc, (char **) argv, (char **) &exec_name);
+  /* Drop extension (typically .EXE) from executable filename. */
+  windows_main (&argc, (char **) argv, (char **) &exec_name);
 #endif
 
   /* Set option defaults; read the system wgetrc and ~/.wgetrc.  */
@@ -710,7 +712,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;
@@ -852,12 +854,6 @@ Can't timestamp and not clobber old files at the same time.\n"));
     }
   url[i] = NULL;
 
-  /* Change the title of console window on Windows.  #### I think this
-     statement should belong to retrieve_url().  --hniksic.  */
-#ifdef WINDOWS
-  ws_changetitle (*url, nurl);
-#endif
-
   /* Initialize logging.  */
   log_init (opt.lfilename, append_to_log);
 
@@ -874,7 +870,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)