]> sjero.net Git - wget/blobdiff - src/main.c
[svn] Include ETA information in dot progress.
[wget] / src / main.c
index a6dfbd65593e9bb73fb84679830014327f129317..ecbd88083836ddec0639422850256f69c11d82cc 100644 (file)
@@ -51,6 +51,7 @@ so, delete this exception statement from your version.  */
 #include "url.h"
 #include "progress.h"          /* for progress_handle_sigwinch */
 #include "convert.h"
+#include "http.h"              /* for save_cookies */
 
 /* On GNU system this will include system-wide getopt.h. */
 #include "getopt.h"
@@ -63,8 +64,6 @@ struct options opt;
 
 extern char *version_string;
 
-extern struct cookie_jar *wget_cookie_jar;
-
 static void redirect_output_signal (int);
 
 const char *exec_name;
@@ -123,7 +122,7 @@ struct cmdline_option {
   int argtype;                 /* for non-standard options */
 };
 
-struct cmdline_option option_data[] =
+static struct cmdline_option option_data[] =
   {
     { "accept", 'A', OPT_VALUE, "accept", -1 },
     { "append-output", 'a', OPT__APPEND_OUTPUT, NULL, required_argument },
@@ -644,16 +643,8 @@ secs_to_human_time (double interval)
     sprintf (buf, "%dh %dm %ds", hours, mins, secs);
   else if (mins)
     sprintf (buf, "%dm %ds", mins, secs);
-  else if (interval >= 10)
-    sprintf (buf, "%ds", secs);
   else
-    /* For very quick downloads show more exact timing information. */
-    sprintf (buf, "%.*fs",
-            interval < 0.001 ? 0 : /* 0s instead of 0.000s */
-            interval < 0.01 ? 3 :  /* 0.00x */
-            interval < 0.1 ? 2 :   /* 0.0x */
-            1,                     /* 0.x, 1.x, ..., 9.x */
-            interval);
+    sprintf (buf, "%ss", print_decimal (interval));
 
   return buf;
 }
@@ -896,9 +887,6 @@ 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 bool output_stream_regular;
-
       if (HYPHENP (opt.output_document))
        output_stream = stdout;
       else