+2002-05-24 Hrvoje Niksic <hniksic@arsdigita.com>
+
+ * progress.c (bar_set_params): Fall back to dot progress if the
+ terminal type is "emacs".
+
2002-05-20 Hrvoje Niksic <hniksic@arsdigita.com>
* log.c: Don't #undef WGET_USE_STDARG.
bar_set_params (const char *params)
{
int sw;
+ char *term = getenv ("TERM");
if (params
&& 0 == strcmp (params, "force"))
if ((opt.lfilename
#ifdef HAVE_ISATTY
+ /* The progress bar doesn't make sense if the output is not a
+ TTY -- when logging to file, it is better to review the
+ dots. */
|| !isatty (fileno (stderr))
#else
1
#endif
+ /* Normally we don't depend on terminal type because the
+ progress bar only uses ^M to move the cursor to the
+ beginning of line, which works even on dumb terminals. But
+ Jamie Zawinski reports that ^M and ^H tricks don't work in
+ Emacs shell buffers, and only make a mess. */
+ || (term && 0 == strcmp (term, "emacs"))
)
&& !current_impl_locked)
{