> From: David Coppa <[email protected]>
> Date: Wed, Jan 29, 2014 at 3:01 PM
> Subject: Re: ftp(1) progress meter mad
> To: [email protected]
> Cc: [email protected]
> 
> 
> On Wed, Jan 29, 2014 at 2:52 PM, David Coppa <[email protected]> wrote:
> >> From: Roman <[email protected]>
> >> Date: Wed, Jan 29, 2014 at 12:05 PM
> >> Subject: ftp(1) progress meter mad
> >> To: [email protected]
> >>
> >>
> >> >Synopsis:      output of ftp command is ugly when it reads from pipe
> >> >Category:      user
> >> >Environment:
> >>         System      : OpenBSD 5.5
> >>         Details     : OpenBSD 5.5-beta (GENERIC.MP) #225: Fri Jan 24
> >> 12:16:08 MST 2014
> >>
> >> [email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
> >>
> >>         Architecture: OpenBSD.i386
> >>         Machine     : i386
> >> >Description: The progress meter of ftp command misses CR in the end of 
> >> >line
> >> and output is so ugly! Earlier it was ok, at least in 5.4-release.
> >
> >> Works both in tty and in wide X terminal emulators.
> >>
> >> >Fix: Sorry, I'm duck.
> >
> > Thanks for your report.
> >
> > The following diff fixes it.
> > It was a "side-effect" of the addition of "-D" to ftp(1).
> >
> > ok?
> 
> No. Please, forget this.

This should be ok:

Index: util.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/util.c,v
retrieving revision 1.65
diff -u -p -u -p -r1.65 util.c
--- util.c      23 Jan 2014 00:39:15 -0000      1.65
+++ util.c      29 Jan 2014 14:28:41 -0000
@@ -811,7 +811,7 @@ progressmeter(int flag, const char *file
                    dotdot);
                overhead += l + 1;
        } else
-               snprintf(buf, sizeof(buf), "");
+               snprintf(buf, sizeof(buf), "\r");
 
        if (!verbose && title != NULL) {
                int l = strlen(title);

Reply via email to