1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Fall back to dot progress if the terminal type is "emacs".

Published in <sxsd6vllhsi.fsf@florida.munich.redhat.com>.
This commit is contained in:
hniksic 2002-05-24 07:53:18 -07:00
parent 8d0e351cb3
commit d3a636f2a5
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -801,6 +801,7 @@ static void
bar_set_params (const char *params)
{
int sw;
char *term = getenv ("TERM");
if (params
&& 0 == strcmp (params, "force"))
@ -808,10 +809,19 @@ bar_set_params (const char *params)
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)
{