[Iftop-users] drawing bar scale with bandwidth_in_bytes option

James Lay jlay at slave-tothe-box.net
Tue, 3 Apr 2012 04:54:56 -0600


On Mar 31, 2012, at 5:00 PM, Stephen Hamer wrote:
> The bar scale at the top of the window doesn't change units along with =
the bandwidth_in_bytes option. Given that the host bars change to be in =
bytes it seems reasonable for the scale to change as well.
> I've included the diff to make this change below.
>=20
> Cheers,
> Stephen Hamer
>=20
>=20
> *** ui.c.orig	2012-03-31 18:47:53.460042245 -0400
> --- ui.c	2012-03-31 18:47:51.146083037 -0400
> ***************
> *** 263,269 ****
>               char s[40], *p;
>               int x;
>               /* This 1024 vs 1000 stuff is just plain evil */
> !             readable_size(i, s, sizeof s, options.log_scale ? 1000 : =
1024, 0);
>               p =3D s + strspn(s, " ");
>               x =3D get_bar_length(i * 8);
>               mvaddch(*y + 1, x, ACS_BTEE);


This seemed to be already changed in the latest pre?

James=