]> sjero.net Git - wget/blobdiff - src/main.c
Add support for --content-on-error.
[wget] / src / main.c
index ff5e6afaf443d6a2bbc5d5881212ac88c3090c01..b80eef0a9484b324a199e1a58db4683fd2d26df0 100644 (file)
@@ -178,6 +178,7 @@ static struct cmdline_option option_data[] =
     { "continue", 'c', OPT_BOOLEAN, "continue", -1 },
     { "convert-links", 'k', OPT_BOOLEAN, "convertlinks", -1 },
     { "content-disposition", 0, OPT_BOOLEAN, "contentdisposition", -1 },
+    { "content-on-error", 0, OPT_BOOLEAN, "contentonerror", -1 },
     { "cookies", 0, OPT_BOOLEAN, "cookies", -1 },
     { "cut-dirs", 0, OPT_VALUE, "cutdirs", -1 },
     { WHEN_DEBUG ("debug"), 'd', OPT_BOOLEAN, "debug", -1 },
@@ -594,6 +595,8 @@ HTTP options:\n"),
     N_("\
        --content-disposition   honor the Content-Disposition header when\n\
                                choosing local file names (EXPERIMENTAL).\n"),
+    N_("\
+       --content-on-error      output the received content on server errors.\n"),
     N_("\
        --auth-no-challenge     send Basic HTTP authentication information\n\
                                without first waiting for the server's\n\
@@ -710,7 +713,7 @@ Recursive accept/reject:\n"),
   size_t i;
 
   if (printf (_("GNU Wget %s, a non-interactive network retriever.\n"),
-              version_string))
+              version_string) < 0)
     exit (3);
   if (print_usage (0) < 0)
     exit (3);
@@ -824,7 +827,7 @@ print_version (void)
       int line_length = MAX_CHARS_PER_LINE;
       while ((line_length > 0) && (compiled_features[i] != NULL))
         {
-          if (printf ("%s ", compiled_features[i]))
+          if (printf ("%s ", compiled_features[i]) < 0)
             exit (3);
           line_length -= strlen (compiled_features[i]) + 2;
           i++;
@@ -882,9 +885,9 @@ print_version (void)
     exit (3);
 
   /* TRANSLATORS: When available, an actual copyright character
-     (cirle-c) should be used in preference to "(C)". */
+     (circle-c) should be used in preference to "(C)". */
   if (fputs (_("\
-Copyright (C) 2009 Free Software Foundation, Inc.\n"), stdout) < 0)
+Copyright (C) 2011 Free Software Foundation, Inc.\n"), stdout) < 0)
     exit (3);
   if (fputs (_("\
 License GPLv3+: GNU GPL version 3 or later\n\