#include "recur.h"
#include "netrc.h"
#include "cookies.h" /* for cookies_cleanup */
+#include "progress.h"
#ifndef errno
extern int errno;
CMD_DECLARE (cmd_spec_header);
CMD_DECLARE (cmd_spec_htmlify);
CMD_DECLARE (cmd_spec_mirror);
-/*CMD_DECLARE (cmd_spec_progress);*/
+CMD_DECLARE (cmd_spec_progress);
CMD_DECLARE (cmd_spec_recursive);
CMD_DECLARE (cmd_spec_useragent);
{ "pagerequisites", &opt.page_requisites, cmd_boolean },
{ "passiveftp", &opt.ftp_pasv, cmd_lockable_boolean },
{ "passwd", &opt.ftp_pass, cmd_string },
- { "progress", &opt.progress_type, cmd_string },
+ { "progress", &opt.progress_type, cmd_spec_progress },
{ "proxypasswd", &opt.proxy_passwd, cmd_string },
{ "proxyuser", &opt.proxy_user, cmd_string },
{ "quiet", &opt.quiet, cmd_boolean },
return 1;
}
-#if 0
static int
cmd_spec_progress (const char *com, const char *val, void *closure)
{
exec_name, com, val);
return 0;
}
- set_progress_implementation (val);
+ FREE_MAYBE (opt.progress_type);
+
+ /* Don't call set_progress_implementation here. It will be called
+ in main() when it becomes clear what the log output is. */
+ opt.progress_type = xstrdup (val);
return 1;
}
-#endif
static int
cmd_spec_recursive (const char *com, const char *val, void *closure)