On Fri, Feb 24, 2023 at 12:28 PM Jarno Mäkipää <jmaki...@gmail.com> wrote:
>
> On Thu, Feb 23, 2023 at 10:42 PM enh via Toybox
> <toybox@lists.landley.net> wrote:
> >
> > My earlier trick to ensure that we buffer whole screens full works fine
> > on glibc, but both bionic and musl have a tiny 1024-byte BUFSIZ that
> > makes it unsuitable for this kind of use, even on laptop screens.
> >
> > Explicitly say 8192, since 4096 is slightly too small for my larger
> > laptop's screen (and I don't use a particularly small font).
>
> Should setvbuf be used instead of setbuf if passing buffer size other
> than BUFSIZ?

yes, you're right. that or setbuffer().

new patch attached.

> >
> > At some point we should probably move this into tty.c, dynamically
> > allocate based on screen size (plus space for escape sequences/non-ASCII
> > characters), and track SIGWINCH in case the window grows. But this stops
> > top and vi flickering today, which is good enough for now. (Amusingly, I
> > hit the vi problem -- which is actually much worse, for dense strace
> > output -- while debugging the top problem, while debugging the ps
> > problem, while debugging the thing I was actually supposed to be doing
> > _yesterday_. So definitely time to back out of a few rat holes!)
> > ---
> >  toys/pending/vi.c | 2 +-
> >  toys/posix/ps.c   | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > _______________________________________________
> > Toybox mailing list
> > Toybox@lists.landley.net
> > http://lists.landley.net/listinfo.cgi/toybox-landley.net
>
> -Jarno

Attachment: 0001-ps-vi-fix-flicker.patch
Description: Binary data

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to