]> sjero.net Git - wget/commitdiff
[svn] Resurrect opt.dot_style.
authorhniksic <devnull@localhost>
Wed, 28 Nov 2001 02:44:18 +0000 (18:44 -0800)
committerhniksic <devnull@localhost>
Wed, 28 Nov 2001 02:44:18 +0000 (18:44 -0800)
src/ChangeLog
src/init.c
src/main.c
src/options.h
src/progress.c

index 4d25068dd070784fa7ac34c060c755e7493c1953..0dea6fddc86afb2990aa8e1960ffbe2d2c6c2bbe 100644 (file)
@@ -1,3 +1,15 @@
+2001-11-28  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * progress.c (dot_set_params): If PARAMS is unspecified, use
+       dot_style, if available.
+
+       * init.c: Ditto.
+
+       * main.c (main): Resurect --dot-style.
+
+       * progress.c (dot_finish): Print the quantity if we're left at the
+       beginning of a row.
+
 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * cmpt.c (random): Removed.
index 2b1db499f08cfa6bd2250964e1c9556697996916..8a76c17a30d1536bf1b52b0aca48107d79e85e9e 100644 (file)
@@ -122,6 +122,7 @@ static struct {
   { "dotbytes",                &opt.dot_bytes,         cmd_bytes },
   { "dotsinline",      &opt.dots_in_line,      cmd_number },
   { "dotspacing",      &opt.dot_spacing,       cmd_number },
+  { "dotstyle",                &opt.dot_style,         cmd_string },
   { "excludedirectories", &opt.excludes,       cmd_directory_vector },
   { "excludedomains",  &opt.exclude_domains,   cmd_vector },
   { "followftp",       &opt.follow_ftp,        cmd_boolean },
index f552ba6dcb1c6dc145c17ca87d2be3c59d46245b..5dc9bb0332da9dd9533606769ca4029e5078e29e 100644 (file)
@@ -492,13 +492,7 @@ GNU General Public License for more details.\n"));
          setval ("header", optarg);
          break;
        case 134:
-         /* Supported for compatibility; --dot-style=foo equivalent
-            to --progress=dot:foo.  */
-         {
-           char *tmp = alloca (3 + 1 + strlen (optarg));
-           sprintf (tmp, "dot:%s", optarg);
-           setval ("progress", tmp);
-         }
+         setval ("dotstyle", optarg);
          break;
        case 135:
          setval ("htmlify", optarg);
index 92b812a4edb8cab41ba4b8e5b1ce2eb14743c04c..fcbee7045dc79e41666dbefc6d3d367d4f08fecc 100644 (file)
@@ -139,6 +139,7 @@ struct options
   int htmlify;                 /* Do we HTML-ify the OS-dependent
                                   listings? */
 
+  char *dot_style;
   long dot_bytes;              /* How many bytes in a printing
                                   dot. */
   int dots_in_line;            /* How many dots in one line. */
index e932da36fb4f941e243a35b84731bdaf5e4455fe..18732c77d794d6c7ebf23465cbca717ab31a4c6d 100644 (file)
@@ -288,6 +288,8 @@ dot_finish (void *progress, long dltime)
 
   log_set_flush (0);
 
+  if (dp->dots == 0)
+    logprintf (LOG_VERBOSE, "\n%5ldK", dp->rows * row_bytes / 1024);
   for (i = dp->dots; i < opt.dots_in_line; i++)
     {
       if (i % opt.dot_spacing == 0)
@@ -323,6 +325,9 @@ dot_finish (void *progress, long dltime)
 static void
 dot_set_params (const char *params)
 {
+  if (!params || !*params)
+    params = opt.dot_style;
+
   if (!params)
     return;
 
@@ -409,7 +414,7 @@ bar_create (long initial, long total)
   bp->width = screen_width;
   bp->buffer = xmalloc (bp->width + 1);
 
-  logputs (LOG_VERBOSE, "\n\n");
+  logputs (LOG_VERBOSE, "\n");
 
   create_image (bp, 0);
   display_image (bp->buffer);