]> sjero.net Git - wget/blobdiff - src/main.c
[svn] * retr.c (fd_read_body): Report the amount of data *written* as
[wget] / src / main.c
index 0fb65f3b655d2f4f2ab3852661d88d0770b07b57..29eb99d51dec2856a9e884008e887f270d129e95 100644 (file)
@@ -547,13 +547,13 @@ HTTPS (SSL) options:\n"),
     N_("\
 FTP options:\n"),
     N_("\
-       --no-remove-listing  don't remove `.listing' files.\n"),
+       --no-remove-listing     don't remove `.listing' files.\n"),
     N_("\
-       --no-glob            turn off FTP file name globbing.\n"),
+       --no-glob               turn off FTP file name globbing.\n"),
     N_("\
-       --passive-ftp        use the \"passive\" transfer mode.\n"),
+       --passive-ftp           use the \"passive\" transfer mode.\n"),
     N_("\
-       --retr-symlinks      when recursing, get linked-to files (not dir).\n"),
+       --retr-symlinks         when recursing, get linked-to files (not dir).\n"),
     N_("\
        --preserve-permissions  preserve remote file permissions.\n"),
     "\n",
@@ -807,12 +807,14 @@ Can't timestamp and not clobber old files at the same time.\n"));
       print_usage ();
       exit (1);
     }
+#ifdef ENABLE_IPV6
   if (opt.ipv4_only && opt.ipv6_only)
     {
       printf (_("Cannot specify both --inet4-only and --inet6-only.\n"));
       print_usage ();
       exit (1);
     }
+#endif
 
   nurl = argc - optind;
   if (!nurl && !opt.input_filename)
@@ -862,19 +864,23 @@ Can't timestamp and not clobber old files at the same time.\n"));
   /* Open the output filename if necessary.  */
   if (opt.output_document)
     {
+      extern FILE *output_stream;
+      extern int output_stream_regular;
+
       if (HYPHENP (opt.output_document))
-       opt.dfp = stdout;
+       output_stream = stdout;
       else
        {
          struct stat st;
-         opt.dfp = fopen (opt.output_document, opt.always_rest ? "ab" : "wb");
-         if (opt.dfp == NULL)
+         output_stream = fopen (opt.output_document,
+                                opt.always_rest ? "ab" : "wb");
+         if (output_stream == NULL)
            {
              perror (opt.output_document);
              exit (1);
            }
-         if (fstat (fileno (opt.dfp), &st) == 0 && S_ISREG (st.st_mode))
-           opt.od_known_regular = 1;
+         if (fstat (fileno (output_stream), &st) == 0 && S_ISREG (st.st_mode))
+           output_stream_regular = 1;
        }
     }